[
  {
    "path": ".all-contributorsrc",
    "content": "{\n  \"projectName\": \"docz\",\n  \"projectOwner\": \"pedronauck\",\n  \"repoType\": \"github\",\n  \"repoHost\": \"https://github.com\",\n  \"badgeTemplate\": \"\",\n  \"files\": [\"README.md\", \"CONTRIBUTING.md\"],\n  \"imageSize\": 60,\n  \"commit\": true,\n  \"contributors\": [\n    {\n      \"login\": \"pedronauck\",\n      \"name\": \"Pedro Nauck\",\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/2029172?v=4\",\n      \"profile\": \"https://github.com/pedronauck\",\n      \"contributions\": [\"code\", \"doc\", \"bug\", \"review\"]\n    }\n  ]\n}\n"
  },
  {
    "path": ".circleci/config.yml",
    "content": "# Javascript Node CircleCI 2.0 configuration file\n#\n# Check https://circleci.com/docs/2.0/language-javascript/ for more details\n#\nversion: 2\njobs:\n  build:\n    docker:\n      - image: circleci/node:latest\n      # Specify service dependencies here if necessary\n      # CircleCI maintains a library of pre-built images\n      # documented at https://circleci.com/docs/2.0/circleci-images/\n      # - image: circleci/mongo:3.4.4\n\n    working_directory: ~/repo\n\n    steps:\n      - checkout\n\n      # Download and cache dependencies\n      - restore_cache:\n          keys:\n            - v6-dependencies-{{ checksum \"package.json\" }}\n            # fallback to using the latest cache if no exact match is found\n            - v6-dependencies-\n\n      - run: yarn install\n\n      - save_cache:\n          paths:\n            - node_modules\n          key: v5-dependencies-{{ checksum \"package.json\" }}\n\n      - run: yarn bs\n      # build, lint and test\n      - run: yarn packages\n\n      - run: sudo apt-get install -y lsof\n\n      # - run: cd other-packages/e2e-tests && node index.js || true\n\n      - store_test_results:\n          path: /tmp/test-result\n"
  },
  {
    "path": ".commitlintrc.json",
    "content": "{\n  \"extends\": [\n    \"@commitlint/config-conventional\",\n    \"@commitlint/config-lerna-scopes\"\n  ]\n}\n"
  },
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\nindent_style = space\nindent_size = 2\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true"
  },
  {
    "path": ".eslintignore",
    "content": "dist\nnode_modules\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: pedronauck\npatreon: pedronauck\nopen_collective: pedronauck\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/---bug-report.md",
    "content": "---\nname: \"\\U0001F41B Bug report\"\nabout: \"Something is broken? \\U0001F528\"\n---\n\n## Bug Report\n\n**Describe the bug**\n\nA clear and concise description of what the bug is.\n\n**To Reproduce**\n\nPlease try to build a small repo with a repro of your problem and provide a link to it.\n\nDoing that allows more people to quickly help you.\n\nIf you can't provide a repo then provide clear steps describing how to reproduce the issue.\n\n1. create-docz-app my-docz-app && cd my-docz-app\n2. Change src/index.mdx to\n\n```mdx\n### Some mdx content\n\n<IDontExist />\n```\n\n4. Run npm run docz dev\n5. See error in browser\n\n```shell\nFOR BUGS: Insert debug trace\n```\n\n**Expected behavior**\n\nA clear and concise description of what you expected to happen..\n\n**Environment**\n\n- docz version: [e.g. 2.0.0-rc.x or 1.3.2]\n- OS: [e.g. OSX 10.13.4, Windows 10]\n- Node/npm version: [e.g. Node 8/npm 5]\n\n**Additional context/Screenshots**\nAdd any other context about the problem here. If applicable, add screenshots to help explain.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/---feature-request.md",
    "content": "---\nname: \"\\U0001F680 Feature Request\"\nabout: \"I have a suggestion (and may want to implement it \\U0001F642)!\"\n---\n\n👆👆👆 CLICK ON PREVIEW, PLEASE! 👆👆👆\n\n---\n\n## Awesome, do you have an idea? 😍\n\nPlease, if you have any **feature request, improvement or idea** to give us, check it [our official roadmap](http://feedback.docz.site/roadmap) to see if this is already being planned or not!\n\n### 👉 &nbsp; [Go to Roadmap](http://feedback.docz.site/roadmap)\n\nIf your feature request isn't there, post it here on Github, we will discuss a lot about it and then maybe became official on our roadmap 🤟\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/---support-question.md",
    "content": "---\nname: \"\\U0001F917 Support Question\"\nabout: \"I have a question \\U0001F4AC\"\n---\n\n## Question\n\n**Description**\n*Give more information about your doubt*\n\n* Twitter: If it's just a quick question you can ping me on Twitter: https://twitter.com/pedronauck\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "### Description\n\nAdd here a description about your Pull Request\n\n### Review\n\n- [ ] Check the copy\n- [ ] ...\n- [ ] ...\n\n### Pre-merge checklist\n\n- [ ] ...\n- [ ] ...\n\n### Screenshots\n\n| Before | After |\n| ------ | ----- |\n| Image  | Image |"
  },
  {
    "path": ".github/stale.yml",
    "content": "# Number of days of inactivity before an issue becomes stale\ndaysUntilStale: 60\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# Label to use when marking an issue as stale\nstaleLabel: stale\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: false\n"
  },
  {
    "path": ".gitignore",
    "content": "logs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npids\n*.pid\n*.seed\n*.pid.lock\nlib-cov\ncoverage\n.nyc_output\n.grunt\nbower_components\n.lock-wscript\nbuild/Release\nnode_modules/\njspm_packages/\ntypings/\n.npm\n.npmrc\n.eslintcache\n.node_repl_history\n*.tgz\n.yarn-integrity\n.env\nes\ncore/docz-utils/lib\nstats.html\nbuild\ndist\n.rpt2_cache\n.cache\n.docz\n.idea\n\nstorage\n.e2e-tests-cache\n\nexamples/**/yarn.lock"
  },
  {
    "path": ".huskyrc",
    "content": "{\n  \"hooks\": {\n    \"pre-commit\": \"lerna run precommit --parallel\",\n    \"commit-msg\": \"commitlint -E HUSKY_GIT_PARAMS\"\n  }\n}\n"
  },
  {
    "path": ".prettierignore",
    "content": "**/*.mdx\nMIGRATION_GUIDE.md\n"
  },
  {
    "path": ".prettierrc",
    "content": "{\n  \"requirePragma\": false,\n  \"printWidth\": 80,\n  \"tabWidth\": 2,\n  \"useTabs\": false,\n  \"semi\": false,\n  \"singleQuote\": true,\n  \"trailingComma\": \"es5\",\n  \"bracketSpacing\": true,\n  \"jsxBracketSameLine\": false\n}\n"
  },
  {
    "path": ".vscode/launch.json",
    "content": "{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"Docz dev\",\n      \"type\": \"node\",\n      \"request\": \"launch\",\n      \"protocol\": \"inspector\",\n      \"program\": \"${workspaceRoot}/node_modules/docz/bin/index.js\",\n      \"cwd\": \"${workspaceFolder}/examples/basic\",\n      \"args\": [\"dev\"],\n      \"runtimeArgs\": [\"--debug\"],\n      \"stopOnEntry\": false,\n      \"sourceMaps\": false\n    },\n    {\n      \"name\": \"Docz build\",\n      \"type\": \"node\",\n      \"request\": \"launch\",\n      \"protocol\": \"inspector\",\n      \"program\": \"${workspaceRoot}/node_modules/docz/bin/index.js\",\n      \"cwd\": \"${workspaceFolder}/examples/basic\",\n      \"args\": [\"build\"],\n      \"stopOnEntry\": false,\n      \"sourceMaps\": false\n    },\n    {\n      \"name\": \"Gatsby develop\",\n      \"type\": \"node\",\n      \"request\": \"launch\",\n      \"protocol\": \"inspector\",\n      \"program\": \"${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby\",\n      \"cwd\": \"${workspaceFolder}/examples/gatsby\",\n      \"args\": [\"develop\"],\n      \"stopOnEntry\": false,\n      \"runtimeArgs\": [\"--nolazy\"],\n      \"sourceMaps\": false\n    },\n    {\n      \"name\": \"Gatsby build\",\n      \"type\": \"node\",\n      \"request\": \"launch\",\n      \"protocol\": \"inspector\",\n      \"program\": \"${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby\",\n      \"cwd\": \"${workspaceFolder}/examples/gatsby\",\n      \"args\": [\"build\"],\n      \"stopOnEntry\": false,\n      \"runtimeArgs\": [\"--nolazy\"],\n      \"sourceMaps\": false\n    }\n  ]\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n  \"typescript.tsdk\": \"node_modules/typescript/lib\",\n  \"javascript.format.enable\": false,\n  \"eslint.validate\": [\n    \"javascript\",\n    \"javascriptreact\",\n    \"typescript\",\n    \"typescriptreact\"\n  ],\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.eslint\": true\n  }\n}\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **babel-plugin-export-metadata:** fix `hasOwnProperty` method call ([#1581](https://github.com/doczjs/docz/issues/1581)) ([9067ffb](https://github.com/doczjs/docz/commit/9067ffb))\n* **dev-env/basic:** building and running development ([#1646](https://github.com/doczjs/docz/issues/1646)) ([7baaaf2](https://github.com/doczjs/docz/commit/7baaaf2))\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n* **docz-utils:** fix closing tag detection in `removeTags` ([#1696](https://github.com/doczjs/docz/issues/1696)) ([bfcd923](https://github.com/doczjs/docz/commit/bfcd923))\n* **examples:** import alert component by correct lib name. ([#1605](https://github.com/doczjs/docz/issues/1605)) ([fadb6dd](https://github.com/doczjs/docz/commit/fadb6dd))\n* **gatsby-theme-docz:** wrong imports ([ed169cf](https://github.com/doczjs/docz/commit/ed169cf))\n* add functions never to eslint rule ([#1487](https://github.com/doczjs/docz/issues/1487)) ([becd589](https://github.com/doczjs/docz/commit/becd589))\n\n\n### Features\n\n* add gatsby https flag to use in dev mode ([#1569](https://github.com/doczjs/docz/issues/1569)) ([9d91503](https://github.com/doczjs/docz/commit/9d91503))\n* **docz-core:** add modifyEntry plugin supported ([#1621](https://github.com/doczjs/docz/issues/1621)) ([317987e](https://github.com/doczjs/docz/commit/317987e))\n* **gatsby-theme-docz:** configure SEO information from md/mdx files ([#1477](https://github.com/doczjs/docz/issues/1477)) ([24bb600](https://github.com/doczjs/docz/commit/24bb600))\n* **gatsby-theme-docz:** no reload on relative links ([#1482](https://github.com/doczjs/docz/issues/1482)) ([ff7211c](https://github.com/doczjs/docz/commit/ff7211c))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **babel-plugin-export-metadata:** fix `hasOwnProperty` method call ([#1581](https://github.com/doczjs/docz/issues/1581)) ([9067ffb](https://github.com/doczjs/docz/commit/9067ffb))\n* **dev-env/basic:** building and running development ([#1646](https://github.com/doczjs/docz/issues/1646)) ([7baaaf2](https://github.com/doczjs/docz/commit/7baaaf2))\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n* **examples:** import alert component by correct lib name. ([#1605](https://github.com/doczjs/docz/issues/1605)) ([fadb6dd](https://github.com/doczjs/docz/commit/fadb6dd))\n* **gatsby-theme-docz:** wrong imports ([ed169cf](https://github.com/doczjs/docz/commit/ed169cf))\n* add functions never to eslint rule ([#1487](https://github.com/doczjs/docz/issues/1487)) ([becd589](https://github.com/doczjs/docz/commit/becd589))\n\n\n### Features\n\n* add gatsby https flag to use in dev mode ([#1569](https://github.com/doczjs/docz/issues/1569)) ([9d91503](https://github.com/doczjs/docz/commit/9d91503))\n* **docz-core:** add modifyEntry plugin supported ([#1621](https://github.com/doczjs/docz/issues/1621)) ([317987e](https://github.com/doczjs/docz/commit/317987e))\n* **gatsby-theme-docz:** configure SEO information from md/mdx files ([#1477](https://github.com/doczjs/docz/issues/1477)) ([24bb600](https://github.com/doczjs/docz/commit/24bb600))\n* **gatsby-theme-docz:** no reload on relative links ([#1482](https://github.com/doczjs/docz/issues/1482)) ([ff7211c](https://github.com/doczjs/docz/commit/ff7211c))\n\n\n\n\n\n## [2.3.2-alpha.0](https://github.com/doczjs/docz/compare/v2.3.1...v2.3.2-alpha.0) (2020-04-07)\n\n\n### Bug Fixes\n\n* **docz-core:** use user-provided 404 page when it exists ([05417d3](https://github.com/doczjs/docz/commit/05417d3))\n\n\n\n\n\n## [2.3.1](https://github.com/doczjs/docz/compare/v2.3.1-alpha.0...v2.3.1) (2020-04-05)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n## [2.3.1-alpha.0](https://github.com/doczjs/docz/compare/v2.3.0...v2.3.1-alpha.0) (2020-04-05)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix theme components customization bug ([a9384b0](https://github.com/doczjs/docz/commit/a9384b0))\n\n\n\n\n\n# [2.3.0](https://github.com/doczjs/docz/compare/v2.3.0-alpha.14...v2.3.0) (2020-04-02)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.14](https://github.com/doczjs/docz/compare/v2.3.0-alpha.13...v2.3.0-alpha.14) (2020-03-31)\n\n\n### Bug Fixes\n\n* **babel-plugin-export-metadata:** add case for export default… ([#1417](https://github.com/doczjs/docz/issues/1417)) ([31ebd08](https://github.com/doczjs/docz/commit/31ebd08))\n* **docz-core:** always use custom prop filter if it's provided… ([#1415](https://github.com/doczjs/docz/issues/1415)) ([53063ff](https://github.com/doczjs/docz/commit/53063ff))\n* **gatsby-theme-docz:** add pre-wrap to error ([#1406](https://github.com/doczjs/docz/issues/1406)) ([ca6b02d](https://github.com/doczjs/docz/commit/ca6b02d))\n* **gatsby-theme-docz:** content overflowing issue ([#1437](https://github.com/doczjs/docz/issues/1437)) ([56f4cb8](https://github.com/doczjs/docz/commit/56f4cb8))\n\n\n### Features\n\n* **docz:** bump babel-preset-react-app to 9.1.2 ([#1435](https://github.com/doczjs/docz/issues/1435)) ([8f071eb](https://github.com/doczjs/docz/commit/8f071eb))\n* **gatsby-theme-docz:** include MDX transclusion support ([#1436](https://github.com/doczjs/docz/issues/1436)) ([435001a](https://github.com/doczjs/docz/commit/435001a))\n\n\n\n\n\n# [2.3.0-alpha.13](https://github.com/doczjs/docz/compare/v2.3.0-alpha.12...v2.3.0-alpha.13) (2020-02-13)\n\n\n### Bug Fixes\n\n* **docz:** pass useScoping to theme Playground ([6ec7315](https://github.com/doczjs/docz/commit/6ec7315)), closes [#1390](https://github.com/doczjs/docz/issues/1390)\n* **gatsby-theme-docz:** flex component aligmItems -> alignItems ([#1391](https://github.com/doczjs/docz/issues/1391)) ([b80524f](https://github.com/doczjs/docz/commit/b80524f))\n\n\n\n\n\n# [2.3.0-alpha.12](https://github.com/doczjs/docz/compare/v2.3.0-alpha.11...v2.3.0-alpha.12) (2020-02-12)\n\n\n### Bug Fixes\n\n* **docz-core:** pass down host when running serve ([#1384](https://github.com/doczjs/docz/issues/1384)) ([80a0e1e](https://github.com/doczjs/docz/commit/80a0e1e))\n* **gatsby-theme-docz:** use sx instead of style prop in Playgro… ([#1389](https://github.com/doczjs/docz/issues/1389)) ([98f3311](https://github.com/doczjs/docz/commit/98f3311))\n\n\n\n\n\n# [2.3.0-alpha.11](https://github.com/doczjs/docz/compare/v2.3.0-alpha.10...v2.3.0-alpha.11) (2020-02-07)\n\n\n### Bug Fixes\n\n* **docz-core:** be explicit about cli args ([6f5b4ee](https://github.com/doczjs/docz/commit/6f5b4ee))\n\n\n### Features\n\n* **docz-core:** pass down cli args to Gatsby + fix open flag ([385b006](https://github.com/doczjs/docz/commit/385b006))\n* **gatsby-theme-docz:** create MainContainer component ([#1381](https://github.com/doczjs/docz/issues/1381)) ([e8d1c04](https://github.com/doczjs/docz/commit/e8d1c04))\n\n\n\n\n\n# [2.3.0-alpha.10](https://github.com/doczjs/docz/compare/v2.3.0-alpha.9...v2.3.0-alpha.10) (2020-02-06)\n\n\n### Bug Fixes\n\n* **docz-core:** parse port when running serve ([29d0edd](https://github.com/doczjs/docz/commit/29d0edd))\n\n\n\n\n\n# [2.3.0-alpha.9](https://github.com/doczjs/docz/compare/v2.3.0-alpha.8...v2.3.0-alpha.9) (2020-02-06)\n\n\n### Bug Fixes\n\n* **docz:** fix capitalization of ts interfaces ([9e950eb](https://github.com/doczjs/docz/commit/9e950eb))\n\n\n\n\n\n# [2.3.0-alpha.8](https://github.com/doczjs/docz/compare/v2.3.0-alpha.7...v2.3.0-alpha.8) (2020-02-06)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.7](https://github.com/doczjs/docz/compare/v2.3.0-alpha.6...v2.3.0-alpha.7) (2020-02-04)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** removed unused gatsby-plugin-manifest ([#1368](https://github.com/doczjs/docz/issues/1368)) ([44edc68](https://github.com/doczjs/docz/commit/44edc68))\n* warning in Alert component ([#1353](https://github.com/doczjs/docz/issues/1353)) ([8ee156d](https://github.com/doczjs/docz/commit/8ee156d))\n* **gatsby-theme-docz:** fix playground react-resize-detector usage ([#1350](https://github.com/doczjs/docz/issues/1350)) ([f0baf67](https://github.com/doczjs/docz/commit/f0baf67))\n\n\n### Features\n\n* add hook to find docgen props ([#1371](https://github.com/doczjs/docz/issues/1371)) ([8fffa26](https://github.com/doczjs/docz/commit/8fffa26))\n* add the ability to hide a document from the menu ([#1354](https://github.com/doczjs/docz/issues/1354)) ([95b0d7f](https://github.com/doczjs/docz/commit/95b0d7f))\n\n\n\n\n\n# [2.3.0-alpha.6](https://github.com/doczjs/docz/compare/v2.3.0-alpha.5...v2.3.0-alpha.6) (2020-01-02)\n\n\n### Bug Fixes\n\n* **docz-core:** prevent falsy error code on cli ([#1332](https://github.com/doczjs/docz/issues/1332)) ([1437b59](https://github.com/doczjs/docz/commit/1437b59))\n* **docz-core:** revert ts auto-detect ([f0ce584](https://github.com/doczjs/docz/commit/f0ce584))\n\n\n\n\n\n# [2.3.0-alpha.5](https://github.com/doczjs/docz/compare/v2.3.0-alpha.4...v2.3.0-alpha.5) (2019-12-17)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** src -> gatsbyRoot for file system source ([71dd572](https://github.com/doczjs/docz/commit/71dd572))\n\n\n### Features\n\n* **docz-core:** introduce gatsbyRoot to use for fs sourcing ([8e89d64](https://github.com/doczjs/docz/commit/8e89d64))\n\n\n\n\n\n# [2.3.0-alpha.4](https://github.com/doczjs/docz/compare/v2.3.0-alpha.3...v2.3.0-alpha.4) (2019-12-16)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** make Props isToggle work again ([#1326](https://github.com/doczjs/docz/issues/1326)) ([4921ef5](https://github.com/doczjs/docz/commit/4921ef5))\n* update dev-env dependencies ([e1b185f](https://github.com/doczjs/docz/commit/e1b185f))\n\n\n\n\n\n# [2.3.0-alpha.3](https://github.com/doczjs/docz/compare/v2.3.0-alpha.2...v2.3.0-alpha.3) (2019-12-16)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix preview padding ([ebebd1c](https://github.com/doczjs/docz/commit/ebebd1c)), closes [#1325](https://github.com/doczjs/docz/issues/1325)\n\n\n\n\n\n# [2.3.0-alpha.2](https://github.com/doczjs/docz/compare/v2.3.0-alpha.1...v2.3.0-alpha.2) (2019-12-14)\n\n\n### Bug Fixes\n\n* **docz-core:** forward cli status code properly ([#1319](https://github.com/doczjs/docz/issues/1319)) ([99ebf82](https://github.com/doczjs/docz/commit/99ebf82))\n\n\n### Features\n\n* **docz-core:** allow custom pattern for globbing components with docgenConfig.searchPatterns ([#1316](https://github.com/doczjs/docz/issues/1316)) ([29e0165](https://github.com/doczjs/docz/commit/29e0165))\n* **docz-core:** support kebab & pascal case component file name pattern ([#1314](https://github.com/doczjs/docz/issues/1314)) ([9d5b129](https://github.com/doczjs/docz/commit/9d5b129))\n* **docz-utils:** add exports parser to add to Playground scope ([9c564d0](https://github.com/doczjs/docz/commit/9c564d0)), closes [#1247](https://github.com/doczjs/docz/issues/1247)\n* **rehype-docz:** add mdx exports to Playground scope ([d902e2a](https://github.com/doczjs/docz/commit/d902e2a)), closes [#1247](https://github.com/doczjs/docz/issues/1247)\n\n\n\n\n\n# [2.3.0-alpha.1](https://github.com/doczjs/docz/compare/v2.3.0-alpha.0...v2.3.0-alpha.1) (2019-12-13)\n\n\n### Bug Fixes\n\n* **docz-core:** properly support node_modules for multiple file patterns ([#1315](https://github.com/doczjs/docz/issues/1315)) ([4d9f9b3](https://github.com/doczjs/docz/commit/4d9f9b3))\n* **docz-core:** use docz-utils for get and mergeWith ([f222083](https://github.com/doczjs/docz/commit/f222083))\n\n\n### Features\n\n* **docz-utils:** export mergeWith and get from lodash@4 ([53fbde0](https://github.com/doczjs/docz/commit/53fbde0)), closes [#1313](https://github.com/doczjs/docz/issues/1313)\n\n\n\n\n\n# [2.3.0-alpha.0](https://github.com/doczjs/docz/compare/v2.2.1-alpha.1...v2.3.0-alpha.0) (2019-12-12)\n\n\n### Features\n\n* **docz-core:** detect typescript without config ([bbaecb2](https://github.com/doczjs/docz/commit/bbaecb2))\n\n\n\n\n\n## [2.2.1-alpha.1](https://github.com/doczjs/docz/compare/v2.2.1-alpha.0...v2.2.1-alpha.1) (2019-12-12)\n\n\n### Bug Fixes\n\n* **docz-core:** add native styled-components support ([b072f78](https://github.com/doczjs/docz/commit/b072f78))\n\n\n\n\n\n## [2.2.1-alpha.0](https://github.com/doczjs/docz/compare/v2.2.0...v2.2.1-alpha.0) (2019-12-11)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix mdx components theming from config ([3a9bdb7](https://github.com/doczjs/docz/commit/3a9bdb7)), closes [#1309](https://github.com/doczjs/docz/issues/1309)\n\n\n\n\n\n# [2.2.0](https://github.com/doczjs/docz/compare/v2.2.0-alpha.8...v2.2.0) (2019-12-11)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.2.0-alpha.8](https://github.com/doczjs/docz/compare/v2.2.0-alpha.7...v2.2.0-alpha.8) (2019-12-06)\n\n\n### Features\n\n* **gatsby-theme-docz:** add optional iframe for preview and ed… ([#1305](https://github.com/doczjs/docz/issues/1305)) ([9c5082e](https://github.com/doczjs/docz/commit/9c5082e)), closes [#1306](https://github.com/doczjs/docz/issues/1306)\n\n\n\n\n\n# [2.2.0-alpha.7](https://github.com/doczjs/docz/compare/v2.2.0-alpha.6...v2.2.0-alpha.7) (2019-12-03)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix infinite renders in playground on hot reload ([3451fd1](https://github.com/doczjs/docz/commit/3451fd1)), closes [#1299](https://github.com/doczjs/docz/issues/1299)\n\n\n\n\n\n# [2.2.0-alpha.6](https://github.com/doczjs/docz/compare/v2.2.0-alpha.5...v2.2.0-alpha.6) (2019-12-03)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix horizontal code overflow ([a0b7823](https://github.com/doczjs/docz/commit/a0b7823))\n\n\n\n\n\n# [2.2.0-alpha.5](https://github.com/doczjs/docz/compare/v2.2.0-alpha.4...v2.2.0-alpha.5) (2019-12-01)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix tsx parsing in code blocks ([b321ff8](https://github.com/doczjs/docz/commit/b321ff8))\n\n\n\n\n\n# [2.2.0-alpha.4](https://github.com/doczjs/docz/compare/v2.2.0-alpha.3...v2.2.0-alpha.4) (2019-11-30)\n\n\n### Features\n\n* **gatsby-theme-docz:** add showMarkdownEditButton flag ([8fd04e8](https://github.com/doczjs/docz/commit/8fd04e8)), closes [#1291](https://github.com/doczjs/docz/issues/1291)\n\n\n\n\n\n# [2.2.0-alpha.3](https://github.com/doczjs/docz/compare/v2.2.0-alpha.2...v2.2.0-alpha.3) (2019-11-29)\n\n\n### Bug Fixes\n\n* **docz-core:** re-sync .docz on build ([dfd4262](https://github.com/doczjs/docz/commit/dfd4262))\n\n\n\n\n\n# [2.2.0-alpha.2](https://github.com/doczjs/docz/compare/v2.2.0-alpha.1...v2.2.0-alpha.2) (2019-11-29)\n\n\n### Bug Fixes\n\n* **docz-core:** log errors that happen in gatsby-config ([fe1e2da](https://github.com/doczjs/docz/commit/fe1e2da))\n\n\n### Features\n\n* **docz-core:** copy .env ([51f7027](https://github.com/doczjs/docz/commit/51f7027))\n\n\n\n\n\n# [2.2.0-alpha.1](https://github.com/doczjs/docz/compare/v2.2.0-alpha.0...v2.2.0-alpha.1) (2019-11-28)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** remove typo from the theme styles ([a25da88](https://github.com/doczjs/docz/commit/a25da88))\n\n\n### Features\n\n* **docz-core:** add all gatsby node apis to generated gatsby-node ([918b44c](https://github.com/doczjs/docz/commit/918b44c)), closes [#1285](https://github.com/doczjs/docz/issues/1285)\n\n\n\n\n\n# [2.2.0-alpha.0](https://github.com/doczjs/docz/compare/v2.1.1...v2.2.0-alpha.0) (2019-11-28)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** set gatsby root from doczrc src ([e6b1521](https://github.com/doczjs/docz/commit/e6b1521))\n\n\n### Features\n\n* **docz-core:** recommend commands on typo ([#1282](https://github.com/doczjs/docz/issues/1282)) ([0f8430d](https://github.com/doczjs/docz/commit/0f8430d))\n\n\n\n\n\n## [2.1.1](https://github.com/doczjs/docz/compare/v2.1.0...v2.1.1) (2019-11-27)\n\n\n### Bug Fixes\n\n* **docz-core:** prepend dot to default mdx extensions ([18f78d6](https://github.com/doczjs/docz/commit/18f78d6))\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n\n### Bug Fixes\n\n* **docz:** remove lowercasing of enum ts prop type ([8f7b949](https://github.com/doczjs/docz/commit/8f7b949))\n* **gatsby-theme-docz:** allow empty ts prop defaultValue ([2512aa1](https://github.com/doczjs/docz/commit/2512aa1))\n* **gatsby-theme-docz:** fix min-height ([34fc31f](https://github.com/doczjs/docz/commit/34fc31f))\n\n\n### Features\n\n* **docz:** spread remaining props to Props component ([#1276](https://github.com/doczjs/docz/issues/1276)) ([531244f](https://github.com/doczjs/docz/commit/531244f))\n* **docz-core:** add mdxExtensions to config ([77b84e8](https://github.com/doczjs/docz/commit/77b84e8))\n* **gatsby-theme-docz:** use mdxExtensions from config ([7d405c5](https://github.com/doczjs/docz/commit/7d405c5))\n\n\n\n\n\n\n\n### Bug Fixes\n\n\n\n* **docz-core:** add docz init command ([43cdeca](https://github.com/pedronauck/docz/commit/43cdeca))\n* **docz-core:** remove installation step in .docz 🎉 ([4d01ead](https://github.com/pedronauck/docz/commit/4d01ead))\n* **docz-gatsby-monorepo:** add example showing docz usage in a monorepo ([241c757](https://github.com/pedronauck/docz/commit/241c757))\n* add normalize for trailing slashes ([4b0a710](https://github.com/pedronauck/docz/commit/4b0a710))\n* adds theme path overrrite option ([bb62c6b](https://github.com/pedronauck/docz/commit/bb62c6b))\n* rewrite dest path for themeDir override ([7418e55](https://github.com/pedronauck/docz/commit/7418e55))\n\n\n\n\n\n# [2.0.0-rc.33](https://github.com/pedronauck/docz/compare/v2.0.0-rc.32...v2.0.0-rc.33) (2019-09-04)\n\n\n### Features\n\n* **docz-core:** remove installation step in .docz 🎉 ([6790179](https://github.com/pedronauck/docz/commit/6790179))\n\n\n\n\n\n# [2.0.0-rc.32](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.32) (2019-09-04)\n\n### Bug Fixes\n\n- **docz:** add @emotion/core dependency ([52126df](https://github.com/pedronauck/docz/commit/52126df))\n- **docz:** better default playground component ([80b1c66](https://github.com/pedronauck/docz/commit/80b1c66))\n- **docz:** bump docz-core version ([c56e0c6](https://github.com/pedronauck/docz/commit/c56e0c6))\n- **docz:** initialize components context with defaultComponents ([a808795](https://github.com/pedronauck/docz/commit/a808795))\n- **docz:** use playground from docz-components ([52874c4](https://github.com/pedronauck/docz/commit/52874c4))\n- **docz-components:** better prop types for playground ([f35f3ca](https://github.com/pedronauck/docz/commit/f35f3ca))\n- **docz-components:** fix development example ([faf2134](https://github.com/pedronauck/docz/commit/faf2134))\n- **docz-components:** fix syntax highlighting in Playground ([c72c575](https://github.com/pedronauck/docz/commit/c72c575))\n- **docz-components:** typo boder -> border ([1246b19](https://github.com/pedronauck/docz/commit/1246b19))\n- **docz-core:** make onCreateWebpackConfig extendable ([8968a6c](https://github.com/pedronauck/docz/commit/8968a6c))\n- **docz-core:** run init on build if docz is not initialized ([26aa7f6](https://github.com/pedronauck/docz/commit/26aa7f6))\n- **docz-core:** set yarn production to false to download all deps ([2b4cc6b](https://github.com/pedronauck/docz/commit/2b4cc6b))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n- **gatsby-theme-docz:** expose gatsby actions to plugin ([66546a4](https://github.com/pedronauck/docz/commit/66546a4))\n- **gatsby-theme-docz:** fix style differences between dev and build ([9cb5237](https://github.com/pedronauck/docz/commit/9cb5237))\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n### Features\n\n- **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n- **docz-components:** working playground ([344ffbb](https://github.com/pedronauck/docz/commit/344ffbb))\n- **docz-core:** add docz init command ([43cdeca](https://github.com/pedronauck/docz/commit/43cdeca))\n- **docz-gatsby-monorepo:** add example showing docz usage in a monorepo ([241c757](https://github.com/pedronauck/docz/commit/241c757))\n\n# [2.0.0-rc.31](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.31) (2019-09-03)\n\n### Bug Fixes\n\n- **docz:** add @emotion/core dependency ([52126df](https://github.com/pedronauck/docz/commit/52126df))\n- **docz:** better default playground component ([80b1c66](https://github.com/pedronauck/docz/commit/80b1c66))\n- **docz:** bump docz-core version ([c56e0c6](https://github.com/pedronauck/docz/commit/c56e0c6))\n- **docz:** initialize components context with defaultComponents ([a808795](https://github.com/pedronauck/docz/commit/a808795))\n- **docz:** use playground from docz-components ([52874c4](https://github.com/pedronauck/docz/commit/52874c4))\n- **docz-components:** better prop types for playground ([f35f3ca](https://github.com/pedronauck/docz/commit/f35f3ca))\n- **docz-components:** fix development example ([faf2134](https://github.com/pedronauck/docz/commit/faf2134))\n- **docz-components:** fix syntax highlighting in Playground ([c72c575](https://github.com/pedronauck/docz/commit/c72c575))\n- **docz-components:** typo boder -> border ([1246b19](https://github.com/pedronauck/docz/commit/1246b19))\n- **docz-core:** make onCreateWebpackConfig extendable ([8968a6c](https://github.com/pedronauck/docz/commit/8968a6c))\n- **docz-core:** run init on build if docz is not initialized ([fe984fd](https://github.com/pedronauck/docz/commit/fe984fd))\n- **docz-core:** set yarn production to false to download all deps ([1258553](https://github.com/pedronauck/docz/commit/1258553))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n- **gatsby-theme-docz:** fix style differences between dev and build ([9cb5237](https://github.com/pedronauck/docz/commit/9cb5237))\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n### Features\n\n- **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n- **docz-components:** working playground ([344ffbb](https://github.com/pedronauck/docz/commit/344ffbb))\n- **docz-core:** add docz init command ([2cd87ee](https://github.com/pedronauck/docz/commit/2cd87ee))\n- **docz-gatsby-monorepo:** add example showing docz usage in a monorepo ([241c757](https://github.com/pedronauck/docz/commit/241c757))\n\n# [2.0.0-rc.30](https://github.com/pedronauck/docz/compare/v2.0.0-rc.29...v2.0.0-rc.30) (2019-09-03)\n\n### Bug Fixes\n\n- **docz-core:** set yarn production to false to download all deps ([c9db7f1](https://github.com/pedronauck/docz/commit/c9db7f1))\n\n# [2.0.0-rc.29](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.29) (2019-09-03)\n\n### Bug Fixes\n\n- **docz:** add @emotion/core dependency ([52126df](https://github.com/pedronauck/docz/commit/52126df))\n- **docz:** better default playground component ([80b1c66](https://github.com/pedronauck/docz/commit/80b1c66))\n- **docz:** bump docz-core version ([c56e0c6](https://github.com/pedronauck/docz/commit/c56e0c6))\n- **docz:** initialize components context with defaultComponents ([a808795](https://github.com/pedronauck/docz/commit/a808795))\n- **docz:** use playground from docz-components ([52874c4](https://github.com/pedronauck/docz/commit/52874c4))\n- **docz-components:** better prop types for playground ([f35f3ca](https://github.com/pedronauck/docz/commit/f35f3ca))\n- **docz-components:** fix development example ([faf2134](https://github.com/pedronauck/docz/commit/faf2134))\n- **docz-components:** fix syntax highlighting in Playground ([c72c575](https://github.com/pedronauck/docz/commit/c72c575))\n- **docz-components:** typo boder -> border ([1246b19](https://github.com/pedronauck/docz/commit/1246b19))\n- **docz-core:** make onCreateWebpackConfig extendable ([d2aff82](https://github.com/pedronauck/docz/commit/d2aff82))\n- **docz-core:** run init on build if docz is not initialized ([23bc575](https://github.com/pedronauck/docz/commit/23bc575))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n- **gatsby-theme-docz:** fix style differences between dev and build ([9cb5237](https://github.com/pedronauck/docz/commit/9cb5237))\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n### Features\n\n- **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n- **docz-components:** working playground ([344ffbb](https://github.com/pedronauck/docz/commit/344ffbb))\n- **docz-core:** add docz init command ([6aaa3e4](https://github.com/pedronauck/docz/commit/6aaa3e4))\n- **docz-gatsby-monorepo:** add example showing docz usage in a monorepo ([241c757](https://github.com/pedronauck/docz/commit/241c757))\n\n# [2.0.0-rc.28](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.28) (2019-09-03)\n\n### Bug Fixes\n\n- **docz:** add @emotion/core dependency ([52126df](https://github.com/pedronauck/docz/commit/52126df))\n- **docz:** better default playground component ([80b1c66](https://github.com/pedronauck/docz/commit/80b1c66))\n- **docz:** bump docz-core version ([c56e0c6](https://github.com/pedronauck/docz/commit/c56e0c6))\n- **docz:** initialize components context with defaultComponents ([a808795](https://github.com/pedronauck/docz/commit/a808795))\n- **docz:** use playground from docz-components ([52874c4](https://github.com/pedronauck/docz/commit/52874c4))\n- **docz-components:** better prop types for playground ([f35f3ca](https://github.com/pedronauck/docz/commit/f35f3ca))\n- **docz-components:** fix development example ([faf2134](https://github.com/pedronauck/docz/commit/faf2134))\n- **docz-components:** fix syntax highlighting in Playground ([c72c575](https://github.com/pedronauck/docz/commit/c72c575))\n- **docz-components:** typo boder -> border ([1246b19](https://github.com/pedronauck/docz/commit/1246b19))\n- **docz-core:** make onCreateWebpackConfig extendable ([d2aff82](https://github.com/pedronauck/docz/commit/d2aff82))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n- **gatsby-theme-docz:** fix style differences between dev and build ([9cb5237](https://github.com/pedronauck/docz/commit/9cb5237))\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n### Features\n\n- **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n- **docz-components:** working playground ([344ffbb](https://github.com/pedronauck/docz/commit/344ffbb))\n- **docz-gatsby-monorepo:** add example showing docz usage in a monorepo ([241c757](https://github.com/pedronauck/docz/commit/241c757))\n\n### Bug Fixes\n\n- **docz:** add @emotion/core dependency ([52126df](https://github.com/pedronauck/docz/commit/52126df))\n- **docz:** better default playground component ([80b1c66](https://github.com/pedronauck/docz/commit/80b1c66))\n- **docz:** bump docz-core version ([c56e0c6](https://github.com/pedronauck/docz/commit/c56e0c6))\n- **docz:** initialize components context with defaultComponents ([a808795](https://github.com/pedronauck/docz/commit/a808795))\n- **docz:** use playground from docz-components ([52874c4](https://github.com/pedronauck/docz/commit/52874c4))\n- **docz-components:** better prop types for playground ([f35f3ca](https://github.com/pedronauck/docz/commit/f35f3ca))\n- **docz-components:** fix development example ([faf2134](https://github.com/pedronauck/docz/commit/faf2134))\n- **docz-components:** fix syntax highlighting in Playground ([c72c575](https://github.com/pedronauck/docz/commit/c72c575))\n- **docz-components:** typo boder -> border ([1246b19](https://github.com/pedronauck/docz/commit/1246b19))\n- **docz-core:** make onCreateWebpackConfig extendable ([d2aff82](https://github.com/pedronauck/docz/commit/d2aff82))\n- **docz-core:** run init on build if docz is not initialized ([23bc575](https://github.com/pedronauck/docz/commit/23bc575))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n- **gatsby-theme-docz:** fix style differences between dev and build ([9cb5237](https://github.com/pedronauck/docz/commit/9cb5237))\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n### Features\n\n- **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n- **docz-components:** working playground ([344ffbb](https://github.com/pedronauck/docz/commit/344ffbb))\n- **docz-core:** add docz init command ([6aaa3e4](https://github.com/pedronauck/docz/commit/6aaa3e4))\n- **docz-gatsby-monorepo:** add example showing docz usage in a monorepo ([241c757](https://github.com/pedronauck/docz/commit/241c757))\n\n# [2.0.0-rc.27](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.27) (2019-09-02)\n\n### Bug Fixes\n\n- **docz:** add @emotion/core dependency ([52126df](https://github.com/pedronauck/docz/commit/52126df))\n- **docz:** better default playground component ([80b1c66](https://github.com/pedronauck/docz/commit/80b1c66))\n- **docz:** bump docz-core version ([c56e0c6](https://github.com/pedronauck/docz/commit/c56e0c6))\n- **docz:** initialize components context with defaultComponents ([a808795](https://github.com/pedronauck/docz/commit/a808795))\n- **docz:** use playground from docz-components ([52874c4](https://github.com/pedronauck/docz/commit/52874c4))\n- **docz-components:** better prop types for playground ([f35f3ca](https://github.com/pedronauck/docz/commit/f35f3ca))\n- **docz-components:** fix development example ([faf2134](https://github.com/pedronauck/docz/commit/faf2134))\n- **docz-components:** fix syntax highlighting in Playground ([c72c575](https://github.com/pedronauck/docz/commit/c72c575))\n- **docz-components:** typo boder -> border ([d101f9c](https://github.com/pedronauck/docz/commit/d101f9c))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n- **gatsby-theme-docz:** fix style differences between dev and build ([45b7767](https://github.com/pedronauck/docz/commit/45b7767))\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n### Features\n\n- **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n- **docz-components:** working playground ([344ffbb](https://github.com/pedronauck/docz/commit/344ffbb))\n- **docz-gatsby-monorepo:** add example showing docz usage in a monorepo ([241c757](https://github.com/pedronauck/docz/commit/241c757))\n\n# [2.0.0-rc.9](https://github.com/pedronauck/docz/compare/v2.0.0-rc.7...v2.0.0-rc.9) (2019-08-30)\n\n### Bug Fixes\n\n- **docz:** better default playground component ([f90d7a9](https://github.com/pedronauck/docz/commit/f90d7a9))\n- **docz:** bump docz-core version ([f60fce8](https://github.com/pedronauck/docz/commit/f60fce8))\n\n# [2.0.0-rc.7](https://github.com/pedronauck/docz/compare/v2.0.0-rc.6...v2.0.0-rc.7) (2019-08-29)\n\n### Bug Fixes\n\n- **docz:** initialize components context with defaultComponents ([ceaafea](https://github.com/pedronauck/docz/commit/ceaafea))\n\n# [2.0.0-rc.6](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.6) (2019-08-29)\n\n### Bug Fixes\n\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([cf9ea90](https://github.com/pedronauck/docz/commit/cf9ea90))\n\n# [2.0.0-rc.2](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2019-08-28)\n\n### Bug Fixes\n\n- **docz:** make scheduler dependency explicit ([84918d8](https://github.com/pedronauck/docz/commit/84918d8))\n- **docz:** remove window check from useCurrentDoc fixes [#985](https://github.com/pedronauck/docz/issues/985) ([#1023](https://github.com/pedronauck/docz/issues/1023)) ([b90ea82](https://github.com/pedronauck/docz/commit/b90ea82))\n- **docz-core:** extend base config instead of overwriting user config ([#1028](https://github.com/pedronauck/docz/issues/1028)) ([7b46c2b](https://github.com/pedronauck/docz/commit/7b46c2b))\n- **docz-core:** wait for app to be ready before opening the browser ([c5cd14d](https://github.com/pedronauck/docz/commit/c5cd14d))\n- **docz-example-basic:** add explicit dependency to scheduler ([a4c5f9c](https://github.com/pedronauck/docz/commit/a4c5f9c))\n- **docz-example-flow:** add scheduler dep ([5063fc2](https://github.com/pedronauck/docz/commit/5063fc2))\n- **docz-example-styled-components:** add scheduler and remove caaf ([1d66cad](https://github.com/pedronauck/docz/commit/1d66cad))\n- **docz-example-typescript:** add extension of tsx file in mdx ([f43f454](https://github.com/pedronauck/docz/commit/f43f454))\n- **docz-example-typescript:** add externally usable tsconfig ([1806abb](https://github.com/pedronauck/docz/commit/1806abb))\n- **docz-example-typescript:** add scheduler dep and docs [#1020](https://github.com/pedronauck/docz/issues/1020) ([fbc8e89](https://github.com/pedronauck/docz/commit/fbc8e89))\n- **gatsby-theme-docz:** add missing source sans pro font ([#991](https://github.com/pedronauck/docz/issues/991)) ([51240df](https://github.com/pedronauck/docz/commit/51240df))\n- **gatsby-theme-docz:** replace fragment tag to the short syntax ([#992](https://github.com/pedronauck/docz/issues/992)) ([044f351](https://github.com/pedronauck/docz/commit/044f351))\n\n### Features\n\n- **docz-core:** setup jest and add first test ([bf02ac1](https://github.com/pedronauck/docz/commit/bf02ac1))\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n### Bug Fixes\n\n- bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n- resizable props import ([2926896](https://github.com/pedronauck/docz/commit/2926896))\n- **babel-plugin-export-metadata:** disable enumerable for \\_\\_filemeta ([38d10fc](https://github.com/pedronauck/docz/commit/38d10fc))\n- **babel-plugin-export-metadata:** fix root relative path ([eccbac4](https://github.com/pedronauck/docz/commit/eccbac4))\n- **babel-plugin-export-metadata:** transform to Unix slash ([#825](https://github.com/pedronauck/docz/issues/825)) ([#829](https://github.com/pedronauck/docz/issues/829)) ([f823cc6](https://github.com/pedronauck/docz/commit/f823cc6))\n- **docz:** component Props false positives when looking in state ([baa9bb3](https://github.com/pedronauck/docz/commit/baa9bb3))\n- **docz:** parse description of props ([0672c3e](https://github.com/pedronauck/docz/commit/0672c3e))\n- **docz:** props markdown compiler ([99ba83c](https://github.com/pedronauck/docz/commit/99ba83c))\n- **docz-core:** create deps algorithm ([a4b8eb9](https://github.com/pedronauck/docz/commit/a4b8eb9))\n- **docz-core:** some adjustments ([86f95b5](https://github.com/pedronauck/docz/commit/86f95b5))\n- **docz-core:** vendor react-docgen-external-proptypes-handler ([#866](https://github.com/pedronauck/docz/issues/866)) ([efb89ee](https://github.com/pedronauck/docz/commit/efb89ee)), closes [#727](https://github.com/pedronauck/docz/issues/727)\n- **gatsby-theme-docz:** entry not in context ([e582221](https://github.com/pedronauck/docz/commit/e582221))\n- **gatsby-theme-docz:** resizable import ([3916265](https://github.com/pedronauck/docz/commit/3916265))\n- on create webpack plugin hook ([56e974a](https://github.com/pedronauck/docz/commit/56e974a))\n- packages rollup config ([534d7bf](https://github.com/pedronauck/docz/commit/534d7bf))\n- remove react & react-dom from dependencies [#924](https://github.com/pedronauck/docz/issues/924) ([faf4288](https://github.com/pedronauck/docz/commit/faf4288))\n- **remark-docz:** fix alias in the src of a mdx's image [#897](https://github.com/pedronauck/docz/issues/897) ([058732d](https://github.com/pedronauck/docz/commit/058732d))\n- some typescript adjustments ([4ba6eaf](https://github.com/pedronauck/docz/commit/4ba6eaf))\n- **gatsby-theme-docz:** prisms theme by themeConfig ([c0b5c34](https://github.com/pedronauck/docz/commit/c0b5c34))\n- eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n- no-undef eslint rule ([125c5cf](https://github.com/pedronauck/docz/commit/125c5cf))\n\n### Features\n\n- **docz-core:** ensure files before running machine ([1876540](https://github.com/pedronauck/docz/commit/1876540))\n- **docz-core:** watch custom theme files ([5ee7abe](https://github.com/pedronauck/docz/commit/5ee7abe))\n- **docz-core:** watch gatsby config files ([1539378](https://github.com/pedronauck/docz/commit/1539378))\n- **gatsby-theme-docz:** add blockquote styles ([b9f11a1](https://github.com/pedronauck/docz/commit/b9f11a1))\n- **gatsby-theme-docz:** add custom logo support ([dec4b2b](https://github.com/pedronauck/docz/commit/dec4b2b))\n- **gatsby-theme-docz:** add iframe and re-resizable on playground ([6922717](https://github.com/pedronauck/docz/commit/6922717))\n- **gatsby-theme-docz:** add new Pre component ([a6be6a1](https://github.com/pedronauck/docz/commit/a6be6a1))\n- **gatsby-theme-docz:** add new Props component ([8eb780d](https://github.com/pedronauck/docz/commit/8eb780d))\n- **gatsby-theme-docz:** add showLiveError on Playground ([e593897](https://github.com/pedronauck/docz/commit/e593897))\n- **gatsby-theme-docz:** add some improvements ([03d9fec](https://github.com/pedronauck/docz/commit/03d9fec))\n- **gatsby-theme-docz:** improve documentation ([80b35f8](https://github.com/pedronauck/docz/commit/80b35f8))\n- a lot of improvements ([64f75da](https://github.com/pedronauck/docz/commit/64f75da))\n- adapt core plugins to gatsby hooks ([4caa47a](https://github.com/pedronauck/docz/commit/4caa47a))\n- add main package improvements ([8c8005d](https://github.com/pedronauck/docz/commit/8c8005d))\n- add markdown parsing on props description ([1087539](https://github.com/pedronauck/docz/commit/1087539))\n- add new Playground component ([7bf03b2](https://github.com/pedronauck/docz/commit/7bf03b2))\n- add new theme sidebar ([a01d100](https://github.com/pedronauck/docz/commit/a01d100))\n- add typescript support (need fix) ([13947f9](https://github.com/pedronauck/docz/commit/13947f9))\n- docz running using gatsby under the hood ([10ffd48](https://github.com/pedronauck/docz/commit/10ffd48))\n- dynamic src and root path ([c071556](https://github.com/pedronauck/docz/commit/c071556))\n- open browser integration ([132c472](https://github.com/pedronauck/docz/commit/132c472))\n- some playground improvements ([afa00df](https://github.com/pedronauck/docz/commit/afa00df))\n- **docz-core:** add build and serve command with gatsby ([e85c82b](https://github.com/pedronauck/docz/commit/e85c82b))\n- **docz-core:** add doczrc config watcher on dev ([5aa0455](https://github.com/pedronauck/docz/commit/5aa0455))\n- **docz-core:** add initial gatsby bundler algorithm ([9249e34](https://github.com/pedronauck/docz/commit/9249e34))\n- **gatsby-theme-docz:** improve code highlight ([d265444](https://github.com/pedronauck/docz/commit/d265444))\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n### Bug Fixes\n\n- **docz-theme-default:** allow use of link component in ssr ([#854](https://github.com/pedronauck/docz/issues/854)) ([90c27e0](https://github.com/pedronauck/docz/commit/90c27e0)), closes [#832](https://github.com/pedronauck/docz/issues/832)\n- **docz-theme-default:** useMemo with conditional ([3b653e5](https://github.com/pedronauck/docz/commit/3b653e5))\n\n### Features\n\n- **docz-core:** add config docgen ts resolver ([#848](https://github.com/pedronauck/docz/issues/848)) ([256b600](https://github.com/pedronauck/docz/commit/256b600))\n- **docz-core:** add serve command ([#855](https://github.com/pedronauck/docz/issues/855)) ([73311bd](https://github.com/pedronauck/docz/commit/73311bd))\n- resolve markdown images ([#851](https://github.com/pedronauck/docz/issues/851)) ([0fb41c8](https://github.com/pedronauck/docz/commit/0fb41c8))\n- **docz-core:** add config not use specifiers ([#849](https://github.com/pedronauck/docz/issues/849)) ([d8595a9](https://github.com/pedronauck/docz/commit/d8595a9))\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n### Bug Fixes\n\n- correct props loading ([#836](https://github.com/pedronauck/docz/issues/836)) ([ed85f14](https://github.com/pedronauck/docz/commit/ed85f14))\n- **docz:** non latin menu headings ([#840](https://github.com/pedronauck/docz/issues/840)) ([80b186c](https://github.com/pedronauck/docz/commit/80b186c))\n- **docz-core:** prevent watch in production ([d673262](https://github.com/pedronauck/docz/commit/d673262))\n\n### Features\n\n- **docz-core:** extended path configuration for docgen ([#846](https://github.com/pedronauck/docz/issues/846)) ([aa96739](https://github.com/pedronauck/docz/commit/aa96739))\n- **docz-core:** use react-dev-utils create compiler ([4d062de](https://github.com/pedronauck/docz/commit/4d062de))\n- **docz-theme-default:** add options to the props component ([#823](https://github.com/pedronauck/docz/issues/823)) ([9edaac8](https://github.com/pedronauck/docz/commit/9edaac8))\n\n## [1.0.4](https://github.com/pedronauck/docz/compare/v1.0.3...v1.0.4) (2019-04-18)\n\n### Bug Fixes\n\n- **babel-plugin-export-metadata:** avoid adding \\_\\_filemeta to non-extensible objects ([#798](https://github.com/pedronauck/docz/issues/798)) ([794ebc4](https://github.com/pedronauck/docz/commit/794ebc4))\n- **babel-plugin-export-metadata:** re-export causes meta error ([#805](https://github.com/pedronauck/docz/issues/805)) ([9401676](https://github.com/pedronauck/docz/commit/9401676))\n- **docz-rollup:** fixed rollup configs to be Windows tolerant ([#812](https://github.com/pedronauck/docz/issues/812)) ([10f6bfd](https://github.com/pedronauck/docz/commit/10f6bfd))\n- **docz-theme-default:** logo link point to dynamic base ([#815](https://github.com/pedronauck/docz/issues/815)) ([f7cc750](https://github.com/pedronauck/docz/commit/f7cc750))\n\n## [1.0.3](https://github.com/pedronauck/docz/compare/v1.0.2...v1.0.3) (2019-04-15)\n\n### Bug Fixes\n\n- **docz:** props parser for build ([31612e7](https://github.com/pedronauck/docz/commit/31612e7))\n\n## [1.0.2](https://github.com/pedronauck/docz/compare/v1.0.1...v1.0.2) (2019-04-15)\n\n### Bug Fixes\n\n- **docz-theme-default:** overlay just for mobile resolutions ([a927389](https://github.com/pedronauck/docz/commit/a927389))\n- pin typescript version ([8ae97d3](https://github.com/pedronauck/docz/commit/8ae97d3))\n- window check ([cfbda29](https://github.com/pedronauck/docz/commit/cfbda29))\n\n## [1.0.1](https://github.com/pedronauck/docz/compare/v1.0.0...v1.0.1) (2019-04-14)\n\n### Bug Fixes\n\n- **babel-plugin-export-metadata:** fix re-export default ([#790](https://github.com/pedronauck/docz/issues/790)) ([#791](https://github.com/pedronauck/docz/issues/791)) ([89b3928](https://github.com/pedronauck/docz/commit/89b3928))\n\n# [1.0.0](https://github.com/pedronauck/docz/compare/v1.0.0-rc.8...v1.0.0) (2019-04-11)\n\n### Bug Fixes\n\n- **babel-plugin-export-metadata:** remove cache folders from parse ([2978a26](https://github.com/pedronauck/docz/commit/2978a26))\n- **docz:** crash using suspense ([315f7ad](https://github.com/pedronauck/docz/commit/315f7ad))\n- **docz-core:** typescript doesn't work with several exports ([#771](https://github.com/pedronauck/docz/issues/771)) ([c96878d](https://github.com/pedronauck/docz/commit/c96878d))\n- **docz-theme-default:** styled error margin ([53104e8](https://github.com/pedronauck/docz/commit/53104e8))\n- **docz-theme-default:** table media query style ([#782](https://github.com/pedronauck/docz/issues/782)) ([205ce75](https://github.com/pedronauck/docz/commit/205ce75))\n\n### Features\n\n- **docz-core:** auto open browser when start dev mode ([#774](https://github.com/pedronauck/docz/issues/774)) ([c0e6c13](https://github.com/pedronauck/docz/commit/c0e6c13))\n\n# [1.0.0-rc.4](https://github.com/pedronauck/docz/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2019-03-29)\n\n### Bug Fixes\n\n- **docz-core:** add src as prefix on ignore ([2bae93b](https://github.com/pedronauck/docz/commit/2bae93b))\n- **docz-core:** remove DataServer from production build ([b8770ec](https://github.com/pedronauck/docz/commit/b8770ec))\n- add missing dependency on examples ([af8ec2d](https://github.com/pedronauck/docz/commit/af8ec2d))\n- get component filename relative (fix [#706](https://github.com/pedronauck/docz/issues/706)) ([84b23ea](https://github.com/pedronauck/docz/commit/84b23ea))\n- remove data server from build ([8715129](https://github.com/pedronauck/docz/commit/8715129))\n- remove modularized lodash packages ([d81c568](https://github.com/pedronauck/docz/commit/d81c568))\n- **docz:** incompatible props on Link ([281cb13](https://github.com/pedronauck/docz/commit/281cb13))\n- **docz-core:** base prop for router ([9ca39d7](https://github.com/pedronauck/docz/commit/9ca39d7))\n- **docz-core:** entries not initialized on build ([#725](https://github.com/pedronauck/docz/issues/725)) ([3e99db0](https://github.com/pedronauck/docz/commit/3e99db0))\n- **docz-core:** resolve symlinks right for the react-docgen ([#699](https://github.com/pedronauck/docz/issues/699)) ([783a836](https://github.com/pedronauck/docz/commit/783a836))\n- **docz-theme-default:** allows hamburger menu to be opened on mobile ([#698](https://github.com/pedronauck/docz/issues/698)) ([fd06381](https://github.com/pedronauck/docz/commit/fd06381))\n- **docz-theme-default:** apply ignore in props parsing ([#723](https://github.com/pedronauck/docz/issues/723)) ([6dd068c](https://github.com/pedronauck/docz/commit/6dd068c))\n- **docz-theme-default:** mobile menu following anchor clicks ([#713](https://github.com/pedronauck/docz/issues/713)) ([e3bbf1a](https://github.com/pedronauck/docz/commit/e3bbf1a))\n- **docz-theme-default:** stop nested ul from rendering flat ([#714](https://github.com/pedronauck/docz/issues/714)) ([2711e6d](https://github.com/pedronauck/docz/commit/2711e6d))\n\n# [1.0.0-rc.3](https://github.com/pedronauck/docz/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2019-03-21)\n\n### Bug Fixes\n\n- **gatsby-theme-docz:** menu field on entry source node ([05457f2](https://github.com/pedronauck/docz/commit/05457f2))\n\n# [1.0.0-beta.0](https://github.com/pedronauck/docz/compare/v1.0.0-alpha.1...v1.0.0-beta.0) (2019-03-19)\n\n**Note:** Version bump only for package docz\n\n# [1.0.0-alpha.1](https://github.com/pedronauck/docz/compare/v1.0.0-alpha.0...v1.0.0-alpha.1) (2019-03-19)\n\n### Bug Fixes\n\n- bump internal versions ([1658aaf](https://github.com/pedronauck/docz/commit/1658aaf))\n\n# [1.0.0-alpha.0](https://github.com/pedronauck/docz/compare/v0.13.5...v1.0.0-alpha.0) (2019-03-19)\n\n### Bug Fixes\n\n- **babel-plugin-export-metadata:** update snapshot test ([6ca7b87](https://github.com/pedronauck/docz/commit/6ca7b87))\n- **docz:** add window check to useWindowSize hook ([#669](https://github.com/pedronauck/docz/issues/669)) ([e4d7cb4](https://github.com/pedronauck/docz/commit/e4d7cb4))\n- **docz:** merge menus on useMenus ([af4afe2](https://github.com/pedronauck/docz/commit/af4afe2))\n- **docz:** merge new config for useConfig hook ([c63bbc8](https://github.com/pedronauck/docz/commit/c63bbc8))\n- **docz:** optional opts for useMenus() ([571ffcd](https://github.com/pedronauck/docz/commit/571ffcd))\n- **docz:** remove config conditional from hooks ([6b6f134](https://github.com/pedronauck/docz/commit/6b6f134))\n- **docz:** remove null return on routes ([5bbbbb3](https://github.com/pedronauck/docz/commit/5bbbbb3))\n- **docz-core:** config passed on argv ([12f6385](https://github.com/pedronauck/docz/commit/12f6385))\n- **docz-core:** hot loader and mdx plugins ([0531d65](https://github.com/pedronauck/docz/commit/0531d65))\n- **docz-core:** initialize config state on data server start ([#678](https://github.com/pedronauck/docz/issues/678)) ([8c740b8](https://github.com/pedronauck/docz/commit/8c740b8))\n- **docz-core:** remove dev things from prod build ([3f5b5d7](https://github.com/pedronauck/docz/commit/3f5b5d7))\n- **docz-core:** remove order from Entry class ([e12c37d](https://github.com/pedronauck/docz/commit/e12c37d))\n- **docz-core:** write first imports ([b856168](https://github.com/pedronauck/docz/commit/b856168))\n- **docz-theme-default:** active menu link ([5e04e0d](https://github.com/pedronauck/docz/commit/5e04e0d))\n- **docz-theme-default:** add active class manually for gatsby ([c3faed3](https://github.com/pedronauck/docz/commit/c3faed3))\n- **docz-theme-default:** react live error size ([7f2e0ff](https://github.com/pedronauck/docz/commit/7f2e0ff))\n- **docz-theme-default:** support absolute page elements ([#683](https://github.com/pedronauck/docz/issues/683)) ([a4ced2b](https://github.com/pedronauck/docz/commit/a4ced2b))\n- **docz-theme-default:** toggle active links on location change ([#666](https://github.com/pedronauck/docz/issues/666)) ([1274b97](https://github.com/pedronauck/docz/commit/1274b97))\n- **docz-utils:** add docz imports on react live scope ([01004ed](https://github.com/pedronauck/docz/commit/01004ed))\n- **gatsby-theme-docz:** add null fields for entries ([b0409a8](https://github.com/pedronauck/docz/commit/b0409a8))\n- **gatsby-theme-docz:** add ssr support for styled-components ([b490010](https://github.com/pedronauck/docz/commit/b490010))\n- **gatsby-theme-docz:** check entries before find on it ([8565128](https://github.com/pedronauck/docz/commit/8565128))\n- **gatsby-theme-docz:** create pages hook ([2f5765e](https://github.com/pedronauck/docz/commit/2f5765e))\n- **gatsby-theme-docz:** readme typo ([9e3314a](https://github.com/pedronauck/docz/commit/9e3314a))\n- **gatsby-theme-docz:** throws false for json stringify ([289ca75](https://github.com/pedronauck/docz/commit/289ca75))\n- gatsby theme fixes ([dcc5f19](https://github.com/pedronauck/docz/commit/dcc5f19))\n- **gatsby-theme-docz:** check data before access ([8f8ed12](https://github.com/pedronauck/docz/commit/8f8ed12))\n- **gatsby-theme-docz:** use options from gatsby-config ([#665](https://github.com/pedronauck/docz/issues/665)) ([c694bdf](https://github.com/pedronauck/docz/commit/c694bdf))\n- **rehype-docz:** update tests ([548f940](https://github.com/pedronauck/docz/commit/548f940))\n- immutable merge with lodash ([2fe94d4](https://github.com/pedronauck/docz/commit/2fe94d4))\n- **remark-docz:** visit correct nodes ([d5e243d](https://github.com/pedronauck/docz/commit/d5e243d))\n- some general adjustments ([0c61f64](https://github.com/pedronauck/docz/commit/0c61f64))\n- **load-cfg:** merge default config on load ([d3b4bc6](https://github.com/pedronauck/docz/commit/d3b4bc6))\n- use lodash merge instead of deepmerge ([18ac37b](https://github.com/pedronauck/docz/commit/18ac37b))\n- **docz-theme-default:** styles adjustments ([aca1bee](https://github.com/pedronauck/docz/commit/aca1bee))\n- **gatsby-theme-docz:** add specific nodes for entries ([26f7f90](https://github.com/pedronauck/docz/commit/26f7f90))\n- define right internal dependencies version ([30a91b4](https://github.com/pedronauck/docz/commit/30a91b4))\n- prop types parser ([a3cc319](https://github.com/pedronauck/docz/commit/a3cc319))\n- **babel-plugin-export-metadata:** just define pro non-primitive types ([ed78a13](https://github.com/pedronauck/docz/commit/ed78a13))\n- **babel-plugin-export-metadata:** prettier fix script ([3a34b72](https://github.com/pedronauck/docz/commit/3a34b72))\n- **docz:** remove deduplicated search results (thanks [@ivan-dalmet](https://github.com/ivan-dalmet)) ([1b456f7](https://github.com/pedronauck/docz/commit/1b456f7))\n- **docz:** sort menu and submenus alphabetically ([fbbd51c](https://github.com/pedronauck/docz/commit/fbbd51c))\n- **docz:** use @loadable/component instead of react-imported-component ([18f02f2](https://github.com/pedronauck/docz/commit/18f02f2))\n- **docz-core:** add spaces when write db.json ([3a84af3](https://github.com/pedronauck/docz/commit/3a84af3))\n- **docz-core:** add typescript as dependency ([9f314cd](https://github.com/pedronauck/docz/commit/9f314cd))\n- **docz-core:** apply mdast plugins to entries parse too ([c2554b8](https://github.com/pedronauck/docz/commit/c2554b8))\n- **docz-core:** docgen if file has not component definition ([b0fb846](https://github.com/pedronauck/docz/commit/b0fb846))\n- **docz-core:** exclude node modules from source map loader ([1c7c9f7](https://github.com/pedronauck/docz/commit/1c7c9f7))\n- **docz-core:** mdx loader options ([9114f9b](https://github.com/pedronauck/docz/commit/9114f9b))\n- **docz-core:** props state parser ([87767e8](https://github.com/pedronauck/docz/commit/87767e8))\n- **docz-core:** react docgen typescript performance ([2967e7c](https://github.com/pedronauck/docz/commit/2967e7c))\n- **docz-core:** return http server on bundler.start() ([cdba3bf](https://github.com/pedronauck/docz/commit/cdba3bf))\n- **docz-core:** run right hook name ([f500971](https://github.com/pedronauck/docz/commit/f500971))\n- **docz-theme-default:** fix padding in Playground elements ([4af7376](https://github.com/pedronauck/docz/commit/4af7376)), closes [/github.com/pedronauck/docz/issues/398#issuecomment-453663552](https://github.com//github.com/pedronauck/docz/issues/398/issues/issuecomment-453663552)\n- **docz-theme-default:** force codemirror to refresh ([#637](https://github.com/pedronauck/docz/issues/637)) ([#638](https://github.com/pedronauck/docz/issues/638)) ([e745c7d](https://github.com/pedronauck/docz/commit/e745c7d))\n- **docz-theme-default:** show cursor on playground editor focus ([9f99c30](https://github.com/pedronauck/docz/commit/9f99c30))\n- **docz-theme-default:** show heading anchor on hover ([3e453f5](https://github.com/pedronauck/docz/commit/3e453f5))\n- **docz-utils:** extract headings from ast ([9f8565b](https://github.com/pedronauck/docz/commit/9f8565b))\n- **docz-utils:** parser config for prettier ([54ad0fa](https://github.com/pedronauck/docz/commit/54ad0fa))\n- **gatsby-theme-docz:** hot reload ([bf4e440](https://github.com/pedronauck/docz/commit/bf4e440))\n- **gatsby-theme-docz:** use createPages instead of createPagesStatefully ([37b73c6](https://github.com/pedronauck/docz/commit/37b73c6))\n- **load-cfg:** use babel register in order to require using es6 ([7ad3b64](https://github.com/pedronauck/docz/commit/7ad3b64))\n- a lot of bug fixes ([c10a8bd](https://github.com/pedronauck/docz/commit/c10a8bd))\n- scroll to anchor if url has hash ([389577f](https://github.com/pedronauck/docz/commit/389577f))\n- trim whitespaces before and after class ([a184913](https://github.com/pedronauck/docz/commit/a184913))\n- use custom rollup config to build instead of libundler ([ee42a5a](https://github.com/pedronauck/docz/commit/ee42a5a))\n- wrapper property is ignored in <Playground> ([3cda0de](https://github.com/pedronauck/docz/commit/3cda0de))\n\n### Features\n\n- **docz:** add filter option for useMenus ([aeeb311](https://github.com/pedronauck/docz/commit/aeeb311))\n- **docz:** use getInitialProps instead of getInitialData ([d4406e0](https://github.com/pedronauck/docz/commit/d4406e0))\n- new Props component ([80451b1](https://github.com/pedronauck/docz/commit/80451b1))\n- **docz:** hooks migrations ([f57f987](https://github.com/pedronauck/docz/commit/f57f987))\n- **docz-core:** remove ordering deprecated field ([39660bb](https://github.com/pedronauck/docz/commit/39660bb))\n- **docz-core:** support for configuring the separator during slugifying ([10bb134](https://github.com/pedronauck/docz/commit/10bb134))\n- **docz-theme-default:** automatically render links with relative path ([624bbf0](https://github.com/pedronauck/docz/commit/624bbf0))\n- **docz-theme-default:** use styled-components instead of emotion ([19047fd](https://github.com/pedronauck/docz/commit/19047fd))\n- **gatsby-theme-docz:** add custom theme support ([fdfddcb](https://github.com/pedronauck/docz/commit/fdfddcb))\n- **gatsby-theme-docz:** add wrapper support ([a99d62f](https://github.com/pedronauck/docz/commit/a99d62f))\n- add initial gatsby integration ([#630](https://github.com/pedronauck/docz/issues/630)) ([70d40cc](https://github.com/pedronauck/docz/commit/70d40cc)), closes [#609](https://github.com/pedronauck/docz/issues/609)\n- add playground component ([cde6511](https://github.com/pedronauck/docz/commit/cde6511))\n- docgen refactoring ([#545](https://github.com/pedronauck/docz/issues/545)) ([85499a8](https://github.com/pedronauck/docz/commit/85499a8))\n- split router logic from theme ([a9c26e6](https://github.com/pedronauck/docz/commit/a9c26e6))\n- use @reach/router instead of react-router ([81a4a82](https://github.com/pedronauck/docz/commit/81a4a82))\n\n### BREAKING CHANGES\n\n- <Playground> does not wrap the component anymore before\n  passing it to the renderer. Instead it passes the wrapper explicitly to\n  the renderer, making it the renderer's duty to apply the wrapper.\n\n## [0.13.6](https://github.com/pedronauck/docz/compare/v0.13.5...v0.13.6) (2018-12-26)\n\n### Bug Fixes\n\n- **docz-core:** default value for arguments ([5644343](https://github.com/pedronauck/docz/commit/5644343))\n- **docz-core:** happypack plugin name ([cbf7692](https://github.com/pedronauck/docz/commit/cbf7692))\n\n## [0.13.5](https://github.com/pedronauck/docz/compare/v0.13.4...v0.13.5) (2018-12-19)\n\n### Bug Fixes\n\n- **docz-core:** add react docgen loader inside happypack ([4433561](https://github.com/pedronauck/docz/commit/4433561))\n- **docz-core:** close data server when need ([6a2b96a](https://github.com/pedronauck/docz/commit/6a2b96a))\n- **docz-core:** escape template string in playground ([#529](https://github.com/pedronauck/docz/issues/529)) ([5ab2349](https://github.com/pedronauck/docz/commit/5ab2349))\n- **docz-core:** public folder in dev mode ([abb3626](https://github.com/pedronauck/docz/commit/abb3626))\n- **docz-core:** webpack dev server log level ([1d72539](https://github.com/pedronauck/docz/commit/1d72539))\n- **docz-theme-default:** add default value for rgba of polished ([dcb74af](https://github.com/pedronauck/docz/commit/dcb74af))\n- **docz-utils:** add missing dependency for codesandbox ([3a51066](https://github.com/pedronauck/docz/commit/3a51066))\n- **docz-utils:** escape code for playground ([3fc4187](https://github.com/pedronauck/docz/commit/3fc4187))\n\n## [0.13.4](https://github.com/pedronauck/docz/compare/v0.13.3...v0.13.4) (2018-12-17)\n\n### Bug Fixes\n\n- **docz-theme-default:** remove overflow from playground wrapper ([e007762](https://github.com/pedronauck/docz/commit/e007762))\n\n## [0.13.3](https://github.com/pedronauck/docz/compare/v0.13.2...v0.13.3) (2018-12-17)\n\n### Bug Fixes\n\n- **docz-core:** react hot loader config for hooks ([444cac2](https://github.com/pedronauck/docz/commit/444cac2))\n\n### Features\n\n- **docz-core:** add sourcemap config argument ([3baad4a](https://github.com/pedronauck/docz/commit/3baad4a))\n\n## [0.13.2](https://github.com/pedronauck/docz/compare/v0.13.1...v0.13.2) (2018-12-17)\n\n### Bug Fixes\n\n- **docz-core:** ensure dir for promise logger ([6240f21](https://github.com/pedronauck/docz/commit/6240f21))\n\n## [0.13.1](https://github.com/pedronauck/docz/compare/v0.13.0...v0.13.1) (2018-12-17)\n\n### Bug Fixes\n\n- **docz-core:** typescript loader config ([01f568e](https://github.com/pedronauck/docz/commit/01f568e))\n\n# [0.13.0](https://github.com/pedronauck/docz/compare/v0.12.17...v0.13.0) (2018-12-17)\n\n### Bug Fixes\n\n- **docz:** ts warning ([19ccc09](https://github.com/pedronauck/docz/commit/19ccc09))\n- **docz-core:** add setMaxListener for chokidar watchers ([6053c16](https://github.com/pedronauck/docz/commit/6053c16))\n- **docz-core:** log level based on debug argument ([507e149](https://github.com/pedronauck/docz/commit/507e149))\n- **docz-core:** node path resolve modules merge ([27102fd](https://github.com/pedronauck/docz/commit/27102fd))\n- **docz-core:** turn off htmlMinifier when loading from templates ([#518](https://github.com/pedronauck/docz/issues/518)) ([9cb0e1d](https://github.com/pedronauck/docz/commit/9cb0e1d))\n- **docz-core:** use webpack-dev-server instead of webpack-serve ([4157e05](https://github.com/pedronauck/docz/commit/4157e05))\n\n### Features\n\n- **docz-core:** add onCreateWebpackChain hook ([70bb242](https://github.com/pedronauck/docz/commit/70bb242))\n- **docz-core:** add promise logger using progress-estimator ([2797608](https://github.com/pedronauck/docz/commit/2797608))\n- **docz-core:** use NODE_PATH to resolve modules ([#516](https://github.com/pedronauck/docz/issues/516)) ([cc86f93](https://github.com/pedronauck/docz/commit/cc86f93))\n- **docz-theme-default:** set max lines before scroll editor ([#519](https://github.com/pedronauck/docz/issues/519)) ([698261b](https://github.com/pedronauck/docz/commit/698261b))\n\n## [0.12.17](https://github.com/pedronauck/docz/compare/v0.12.16...v0.12.17) (2018-12-14)\n\n### Bug Fixes\n\n- **docz:** cycled dependency ([5132195](https://github.com/pedronauck/docz/commit/5132195))\n- **docz-theme-default:** link color ([21d58fb](https://github.com/pedronauck/docz/commit/21d58fb))\n- **docz-theme-default:** some fixes on styles ([a17e914](https://github.com/pedronauck/docz/commit/a17e914))\n- **docz-theme-default:** use theme getter instead of literal obj access ([89e1d03](https://github.com/pedronauck/docz/commit/89e1d03))\n\n## [0.12.16](https://github.com/pedronauck/docz/compare/v0.12.15...v0.12.16) (2018-12-13)\n\n### Bug Fixes\n\n- **docz-core:** correct koa mounting path on windows systems ([#491](https://github.com/pedronauck/docz/issues/491)) ([6addd32](https://github.com/pedronauck/docz/commit/6addd32))\n- **docz-theme-default:** refresh editor after it's mounted ([#406](https://github.com/pedronauck/docz/issues/406)) ([#506](https://github.com/pedronauck/docz/issues/506)) ([c67fa41](https://github.com/pedronauck/docz/commit/c67fa41))\n- edit page button is overlayed by github link ([341e03a](https://github.com/pedronauck/docz/commit/341e03a))\n- **docz-theme-default:** ts warning ([452904b](https://github.com/pedronauck/docz/commit/452904b))\n\n## [0.12.15](https://github.com/pedronauck/docz/compare/v0.12.14...v0.12.15) (2018-12-04)\n\n### Bug Fixes\n\n- babel class plugin update ([236331a](https://github.com/pedronauck/docz/commit/236331a))\n- **docz-core:** add setMaxListener in the top of script ([2eef307](https://github.com/pedronauck/docz/commit/2eef307))\n- **docz-core:** update react-hot-loader to support hooks ([4394a5b](https://github.com/pedronauck/docz/commit/4394a5b))\n\n### Features\n\n- add native support for react-native ([f998874](https://github.com/pedronauck/docz/commit/f998874))\n\n## [0.12.14](https://github.com/pedronauck/docz/compare/v0.12.13...v0.12.14) (2018-12-04)\n\n### Bug Fixes\n\n- some typings warnings ([4afb87b](https://github.com/pedronauck/docz/commit/4afb87b))\n- **docz-core:** set max listener ([898010b](https://github.com/pedronauck/docz/commit/898010b))\n- **docz-core:** watcher close ([caa8151](https://github.com/pedronauck/docz/commit/caa8151))\n- **docz-theme-default:** editor border-radius ([7a7d1f8](https://github.com/pedronauck/docz/commit/7a7d1f8))\n- **docz-theme-default:** overlay logic ([8b3fdc9](https://github.com/pedronauck/docz/commit/8b3fdc9))\n- **docz-theme-default:** playground relative position ([a097b5f](https://github.com/pedronauck/docz/commit/a097b5f))\n\n### Features\n\n- **docz:** add preload async route ([f800c70](https://github.com/pedronauck/docz/commit/f800c70))\n\n## [0.12.13](https://github.com/pedronauck/docz/compare/v0.12.12...v0.12.13) (2018-11-23)\n\n### Bug Fixes\n\n- **docz:** resolve react warnings in ErrorReporter ([#465](https://github.com/pedronauck/docz/issues/465)) ([1b0e09d](https://github.com/pedronauck/docz/commit/1b0e09d))\n- **docz-theme-default:** fixes flexbox text overflow issue ([#471](https://github.com/pedronauck/docz/issues/471)) ([b37f25e](https://github.com/pedronauck/docz/commit/b37f25e))\n- **docz-theme-default:** fullscreen mode ([ac02c17](https://github.com/pedronauck/docz/commit/ac02c17))\n- **rehype-docz:** scope for playground ([677a785](https://github.com/pedronauck/docz/commit/677a785))\n\n## [0.12.12](https://github.com/pedronauck/docz/compare/v0.12.11...v0.12.12) (2018-11-16)\n\n### Bug Fixes\n\n- **docz-theme-default:** add theme provider around all theme ([5596446](https://github.com/pedronauck/docz/commit/5596446))\n- **docz-utils:** add .scss to codesandbox assemble files ([59e8fa8](https://github.com/pedronauck/docz/commit/59e8fa8))\n\n## [0.12.11](https://github.com/pedronauck/docz/compare/v0.12.10...v0.12.11) (2018-11-15)\n\n### Bug Fixes\n\n- **docz-core:** add happypack again :cry: ([f0e219e](https://github.com/pedronauck/docz/commit/f0e219e))\n- **docz-core:** create app files before start server ([43bc3fd](https://github.com/pedronauck/docz/commit/43bc3fd))\n- **docz-theme-default:** adjust z-index of menu ([ea9a864](https://github.com/pedronauck/docz/commit/ea9a864))\n- **docz-theme-default:** font size of heading ([5cf6144](https://github.com/pedronauck/docz/commit/5cf6144))\n\n## [0.12.10](https://github.com/pedronauck/docz/compare/v0.12.9...v0.12.10) (2018-11-15)\n\n### Bug Fixes\n\n- **docz-core:** add cache just for non-debug ([cede436](https://github.com/pedronauck/docz/commit/cede436))\n- **docz-core:** add default favicon ([a0ed2ab](https://github.com/pedronauck/docz/commit/a0ed2ab))\n- **docz-core:** add ignore md files by args ([d8c8045](https://github.com/pedronauck/docz/commit/d8c8045))\n- **docz-core:** kill server on signals ([be0855f](https://github.com/pedronauck/docz/commit/be0855f))\n- **docz-core:** use assets from public folder ([210c3a1](https://github.com/pedronauck/docz/commit/210c3a1))\n- **docz-theme-default:** add styles or classname on playground ([01110d4](https://github.com/pedronauck/docz/commit/01110d4))\n- **docz-utils:** resolve codesandbox code ([33dc6e5](https://github.com/pedronauck/docz/commit/33dc6e5))\n\n### Features\n\n- **docz-core:** add detect-one-changed in development ([#433](https://github.com/pedronauck/docz/issues/433)) ([0585b97](https://github.com/pedronauck/docz/commit/0585b97))\n- **docz-core:** add two new plugin hooks ([#431](https://github.com/pedronauck/docz/issues/431)) ([f4a122f](https://github.com/pedronauck/docz/commit/f4a122f))\n- **docz-theme-default:** show and hide playground ([b665f81](https://github.com/pedronauck/docz/commit/b665f81))\n\n## [0.12.9](https://github.com/pedronauck/docz/compare/v0.12.8...v0.12.9) (2018-11-01)\n\n### Bug Fixes\n\n- **docz-theme-default:** table margin bottom ([36e322f](https://github.com/pedronauck/docz/commit/36e322f))\n- **docz-theme-default:** use class inside playground ([cecbea1](https://github.com/pedronauck/docz/commit/cecbea1))\n\n### Features\n\n- **docz-theme-default:** add style for hr component ([5b24400](https://github.com/pedronauck/docz/commit/5b24400))\n- **docz-theme-default:** hide playground editor by default ([0ccda92](https://github.com/pedronauck/docz/commit/0ccda92))\n\n## [0.12.8](https://github.com/pedronauck/docz/compare/v0.12.7...v0.12.8) (2018-10-31)\n\n### Bug Fixes\n\n- **docz:** update to new react imported component api ([759160e](https://github.com/pedronauck/docz/commit/759160e))\n- **docz-core:** add support to react hooks ([f26a990](https://github.com/pedronauck/docz/commit/f26a990))\n\n## [0.12.7](https://github.com/pedronauck/docz/compare/v0.12.6...v0.12.7) (2018-10-30)\n\n### Bug Fixes\n\n- **docz-core:** webpack chain minimizer config ([ab13208](https://github.com/pedronauck/docz/commit/ab13208))\n\n## [0.12.6](https://github.com/pedronauck/docz/compare/v0.12.5...v0.12.6) (2018-10-30)\n\n### Bug Fixes\n\n- **docz:** conditionally description column on PropsTable ([#385](https://github.com/pedronauck/docz/issues/385)) ([829a3aa](https://github.com/pedronauck/docz/commit/829a3aa)), closes [#427](https://github.com/pedronauck/docz/issues/427) [#421](https://github.com/pedronauck/docz/issues/421)\n- **docz-theme-default:** fill adjustments ([119e4a7](https://github.com/pedronauck/docz/commit/119e4a7))\n- **docz-theme-default:** rename playground container to avoid conflicts ([#429](https://github.com/pedronauck/docz/issues/429)) ([86845bf](https://github.com/pedronauck/docz/commit/86845bf))\n- **docz-theme-default:** text alignment in table thead ([#403](https://github.com/pedronauck/docz/issues/403)) ([475eb52](https://github.com/pedronauck/docz/commit/475eb52))\n- **docz-theme-default:** tooltip component ([9234b5e](https://github.com/pedronauck/docz/commit/9234b5e))\n\n### Features\n\n- add support to disable codesandbox ([be94b0e](https://github.com/pedronauck/docz/commit/be94b0e))\n- **docz:** render [Empty String] on PropsTable ([#427](https://github.com/pedronauck/docz/issues/427)) ([10a3eda](https://github.com/pedronauck/docz/commit/10a3eda))\n- **docz:** render [Empty String] on PropsTable ([#427](https://github.com/pedronauck/docz/issues/427)) ([2a9db98](https://github.com/pedronauck/docz/commit/2a9db98))\n- **docz-theme-default:** add code editor toggle on playground ([#387](https://github.com/pedronauck/docz/issues/387)) ([f833eaa](https://github.com/pedronauck/docz/commit/f833eaa))\n- **docz-theme-default:** add support to show/hide playground editor ([cacc6fb](https://github.com/pedronauck/docz/commit/cacc6fb))\n\n<a name=\"0.12.5\"></a>\n\n## [0.12.5](https://github.com/pedronauck/docz/compare/v0.12.4...v0.12.5) (2018-09-30)\n\n### Bug Fixes\n\n- **docz-core:** close dataserver connection on build ([0f6bd7b](https://github.com/pedronauck/docz/commit/0f6bd7b))\n- **docz-theme-default:** adjust theme colors ([eed7212](https://github.com/pedronauck/docz/commit/eed7212))\n\n<a name=\"0.12.4\"></a>\n\n## [0.12.4](https://github.com/pedronauck/docz/compare/v0.12.3...v0.12.4) (2018-09-28)\n\n### Bug Fixes\n\n- **docz:** merge menus and submenus ([f8249da](https://github.com/pedronauck/docz/commit/f8249da))\n\n<a name=\"0.12.3\"></a>\n\n## [0.12.3](https://github.com/pedronauck/docz/compare/v0.12.2...v0.12.3) (2018-09-28)\n\n### Bug Fixes\n\n- **docz:** remove Children.only ([656d8f1](https://github.com/pedronauck/docz/commit/656d8f1))\n\n<a name=\"0.11.2\"></a>\n\n## [0.11.2](https://github.com/pedronauck/docz/compare/v0.11.1...v0.11.2) (2018-09-11)\n\n### Bug Fixes\n\n- **docz:** prevent crash when use imported props ([ef6de9d](https://github.com/pedronauck/docz/commit/ef6de9d))\n- **docz-core:** add watcher outside of update method scope ([18c744d](https://github.com/pedronauck/docz/commit/18c744d))\n- **docz-core:** prevent entries block when parse mdx crash ([07ae769](https://github.com/pedronauck/docz/commit/07ae769))\n- **docz-core:** remove https option and fix message ([#321](https://github.com/pedronauck/docz/issues/321)) ([ea88841](https://github.com/pedronauck/docz/commit/ea88841))\n- **docz-theme-default:** scrolling and overflows performance ([a28ab79](https://github.com/pedronauck/docz/commit/a28ab79))\n- heading hash link with hash router config ([7d7f557](https://github.com/pedronauck/docz/commit/7d7f557))\n\n### Features\n\n- add native config for doczrc ([2580712](https://github.com/pedronauck/docz/commit/2580712))\n\n<a name=\"0.11.1\"></a>\n\n## [0.11.1](https://github.com/pedronauck/docz/compare/v0.11.0...v0.11.1) (2018-09-07)\n\n### Bug Fixes\n\n- **docz:** add react router inside the docz bundle ([a293aa4](https://github.com/pedronauck/docz/commit/a293aa4))\n- **docz-core:** basename configuration ([5fad743](https://github.com/pedronauck/docz/commit/5fad743))\n- update no documents found text ([#289](https://github.com/pedronauck/docz/issues/289)) ([cb782f9](https://github.com/pedronauck/docz/commit/cb782f9))\n- **docz-core:** chokidar performance improvements ([0c344d8](https://github.com/pedronauck/docz/commit/0c344d8))\n- **docz-core:** literal value of headings for menus ([85e4083](https://github.com/pedronauck/docz/commit/85e4083))\n- **docz-core:** open js and ts loader scope of files ([03c01b7](https://github.com/pedronauck/docz/commit/03c01b7))\n- **docz-theme-default:** prevent sidebar toggle on desktop ([7a3b97d](https://github.com/pedronauck/docz/commit/7a3b97d))\n\n### Features\n\n- **docz-core:** add config as parameter for onPrebuild and onPostBuild ([98692bb](https://github.com/pedronauck/docz/commit/98692bb))\n\n<a name=\"0.11.0\"></a>\n\n# [0.11.0](https://github.com/pedronauck/docz/compare/v0.10.3...v0.11.0) (2018-09-02)\n\n### Bug Fixes\n\n- **docz-core:** dispose hmr on imports ([ba51086](https://github.com/pedronauck/docz/commit/ba51086))\n- **docz-core:** join head tags ([#255](https://github.com/pedronauck/docz/issues/255)) ([065e8b3](https://github.com/pedronauck/docz/commit/065e8b3))\n- **docz-core:** update react-docgen-typescript-loader to fix props table ([34b2fdf](https://github.com/pedronauck/docz/commit/34b2fdf))\n- **docz-plugin-css:** fix empty loaderOpts ([193367b](https://github.com/pedronauck/docz/commit/193367b))\n- **docz-plugin-css:** fix empty loaderOpts ([bb9b946](https://github.com/pedronauck/docz/commit/bb9b946))\n- **docz-theme-default:** add prop to keep codemirror last line ([5c1e813](https://github.com/pedronauck/docz/commit/5c1e813))\n- **docz-theme-default:** add prop to keep codemirror last line ([bf19ad5](https://github.com/pedronauck/docz/commit/bf19ad5))\n- **docz-theme-default:** codemirror line end bug ([9b07d27](https://github.com/pedronauck/docz/commit/9b07d27))\n- **docz-theme-default:** fix mobile menu peaking ([#262](https://github.com/pedronauck/docz/issues/262)) ([77b627f](https://github.com/pedronauck/docz/commit/77b627f))\n- **docz-theme-default:** remove react-breakpoints ([c8288b0](https://github.com/pedronauck/docz/commit/c8288b0))\n- **docz-theme-default:** update the empty message ([9db9231](https://github.com/pedronauck/docz/commit/9db9231))\n- **load-cfg:** use fs-extra to read json sync instead of JSON.parse ([04d1e1a](https://github.com/pedronauck/docz/commit/04d1e1a))\n- base url and hash router making weird url ([f483638](https://github.com/pedronauck/docz/commit/f483638))\n\n### Features\n\n- add link of repository from website ([#245](https://github.com/pedronauck/docz/issues/245)) ([85cc9e7](https://github.com/pedronauck/docz/commit/85cc9e7))\n- **babel-preset-docz:** add new babel preset ([5efb568](https://github.com/pedronauck/docz/commit/5efb568))\n- **docz:** move docz/docz-core to dev dependency on examples ([e7153a4](https://github.com/pedronauck/docz/commit/e7153a4))\n- integration with react native ([#271](https://github.com/pedronauck/docz/issues/271)) ([ac359ce](https://github.com/pedronauck/docz/commit/ac359ce))\n- **docz-example-styled-components:** add new example ([0cef75e](https://github.com/pedronauck/docz/commit/0cef75e))\n- **docz-theme-default:** add auto close tags on playground editor ([a6e5cf7](https://github.com/pedronauck/docz/commit/a6e5cf7))\n- **docz-theme-default:** add blockquote component ([86ada87](https://github.com/pedronauck/docz/commit/86ada87))\n- **docz-theme-default:** add refresh btn on playground ([#254](https://github.com/pedronauck/docz/issues/254)) ([ebefd91](https://github.com/pedronauck/docz/commit/ebefd91)), closes [#251](https://github.com/pedronauck/docz/issues/251)\n- **docz-theme-default:** add scrollbar on playground ([#279](https://github.com/pedronauck/docz/issues/279)) ([0f6ea2a](https://github.com/pedronauck/docz/commit/0f6ea2a))\n\n<a name=\"0.10.3\"></a>\n\n## [0.10.3](https://github.com/pedronauck/docz/compare/v0.9.6...v0.10.3) (2018-08-16)\n\n### Bug Fixes\n\n- **docz-core:** correct data server websocket port ([47fe714](https://github.com/pedronauck/docz/commit/47fe714))\n- **docz-core:** try catch on get repo info ([2016736](https://github.com/pedronauck/docz/commit/2016736))\n- **docz-example-typescript:** fix dependencies ([#222](https://github.com/pedronauck/docz/issues/222)) ([67e68aa](https://github.com/pedronauck/docz/commit/67e68aa))\n- **docz-theme-default:** add playground min-height just on fullscreen ([a82903a](https://github.com/pedronauck/docz/commit/a82903a))\n- **docz-theme-default:** use padding on link instead of margin ([b15457c](https://github.com/pedronauck/docz/commit/b15457c))\n\n### Features\n\n- **docz-core:** add editBranch option to mount repo link ([c619d9c](https://github.com/pedronauck/docz/commit/c619d9c))\n\n<a name=\"0.10.2\"></a>\n\n## [0.10.2](https://github.com/pedronauck/docz/compare/v0.10.1...v0.10.2) (2018-08-13)\n\n### Bug Fixes\n\n- prevent codemirror bug on build ([3d0894e](https://github.com/pedronauck/docz/commit/3d0894e))\n- **docz-core:** remove data server cache :confused: ([9683280](https://github.com/pedronauck/docz/commit/9683280))\n- **docz-core:** try catch on get repo info ([bdfbf0b](https://github.com/pedronauck/docz/commit/bdfbf0b))\n\n<a name=\"0.10.1\"></a>\n\n## [0.10.1](https://github.com/pedronauck/docz/compare/v0.10.0...v0.10.1) (2018-08-13)\n\n### Bug Fixes\n\n- **docz-core:** prevent crash when not have cache ([cd3609a](https://github.com/pedronauck/docz/commit/cd3609a))\n- **docz-example-flow:** scale and outline props ([#211](https://github.com/pedronauck/docz/issues/211)) ([c8a4195](https://github.com/pedronauck/docz/commit/c8a4195))\n\n<a name=\"0.10.0\"></a>\n\n# [0.10.0](https://github.com/pedronauck/docz/compare/v0.9.6...v0.10.0) (2018-08-13)\n\n### Bug Fixes\n\n- bug template typo ([#197](https://github.com/pedronauck/docz/issues/197)) ([497fcfb](https://github.com/pedronauck/docz/commit/497fcfb))\n- bug template typo ([#197](https://github.com/pedronauck/docz/issues/197)) ([fce98c4](https://github.com/pedronauck/docz/commit/fce98c4))\n- **docz:** add initial loading as true ([3f05536](https://github.com/pedronauck/docz/commit/3f05536))\n- **docz-core:** prevent crash on delete entry ([28e1728](https://github.com/pedronauck/docz/commit/28e1728))\n- **docz-core:** prevent delete entire app folder on build ([e345896](https://github.com/pedronauck/docz/commit/e345896))\n- **docz-theme-default:** playground overflow on mobile ([db1eb5b](https://github.com/pedronauck/docz/commit/db1eb5b))\n- **rehype-docz:** add props on playground scope ([ee4b6c0](https://github.com/pedronauck/docz/commit/ee4b6c0))\n- **rehype-docz:** allow ticks and backticks inside playground ([#203](https://github.com/pedronauck/docz/issues/203)) ([fa4ff40](https://github.com/pedronauck/docz/commit/fa4ff40))\n\n### Features\n\n- **docz:** fetch data on documents ([04ff0d6](https://github.com/pedronauck/docz/commit/04ff0d6))\n- **docz-core:** add cache system for entries ([b90e598](https://github.com/pedronauck/docz/commit/b90e598))\n- **docz-core:** add htmlContext and mini-html-webpack-plugin ([4b6ec0f](https://github.com/pedronauck/docz/commit/4b6ec0f))\n- **docz-core:** resolve markdown files by default ([#210](https://github.com/pedronauck/docz/issues/210)) ([e0a95b3](https://github.com/pedronauck/docz/commit/e0a95b3))\n- add github repository link ([78a19f6](https://github.com/pedronauck/docz/commit/78a19f6))\n- allow edit code inside playground ([#205](https://github.com/pedronauck/docz/issues/205)) ([4f948f7](https://github.com/pedronauck/docz/commit/4f948f7))\n\n<a name=\"0.9.6\"></a>\n\n## [0.9.6](https://github.com/pedronauck/docz/compare/v0.9.5...v0.9.6) (2018-08-06)\n\n### Bug Fixes\n\n- **docz-core:** remove [@babel](https://github.com/babel)/runtime alias ([0dbd8f0](https://github.com/pedronauck/docz/commit/0dbd8f0))\n- **docz-theme-default:** using lodash.get to prevent classname crash ([befc643](https://github.com/pedronauck/docz/commit/befc643))\n\n<a name=\"0.9.5\"></a>\n\n## [0.9.5](https://github.com/pedronauck/docz/compare/v0.9.4...v0.9.5) (2018-08-04)\n\n### Bug Fixes\n\n- **docz-theme-default:** copy html output ([#189](https://github.com/pedronauck/docz/issues/189)) ([2cb834c](https://github.com/pedronauck/docz/commit/2cb834c))\n\n<a name=\"0.9.4\"></a>\n\n## [0.9.4](https://github.com/pedronauck/docz/compare/v0.9.4-beta.1...v0.9.4) (2018-08-04)\n\n### Bug Fixes\n\n- **docz-core:** use of src config in edit button link ([#186](https://github.com/pedronauck/docz/issues/186)) ([553f90c](https://github.com/pedronauck/docz/commit/553f90c))\n- remove external deps ([470bdd3](https://github.com/pedronauck/docz/commit/470bdd3))\n\n<a name=\"0.9.3\"></a>\n\n## [0.9.3](https://github.com/pedronauck/docz/compare/v0.9.2...v0.9.3) (2018-08-03)\n\n### Bug Fixes\n\n- **docz-core:** use of src config in edit button link ([#186](https://github.com/pedronauck/docz/issues/186)) ([553f90c](https://github.com/pedronauck/docz/commit/553f90c))\n\n<a name=\"0.9.2\"></a>\n\n## [0.9.2](https://github.com/pedronauck/docz/compare/v0.9.1...v0.9.2) (2018-08-02)\n\n### Bug Fixes\n\n- **docz-core:** add isProd to remove hot client overlay on build ([83f2e36](https://github.com/pedronauck/docz/commit/83f2e36))\n\n<a name=\"0.9.1\"></a>\n\n## [0.9.1](https://github.com/pedronauck/docz/compare/v0.9.0...v0.9.1) (2018-08-02)\n\n### Bug Fixes\n\n- **docz:** finish process after build ([58bebb6](https://github.com/pedronauck/docz/commit/58bebb6))\n\n<a name=\"0.9.0\"></a>\n\n# [0.9.0](https://github.com/pedronauck/docz/compare/v0.9.0-beta.1...v0.9.0) (2018-08-02)\n\n### Bug Fixes\n\n- **docz:** transform and merge theme config ([999ab73](https://github.com/pedronauck/docz/commit/999ab73))\n- **docz:** using context for imports to prevent disposed hmr ([b37284c](https://github.com/pedronauck/docz/commit/b37284c))\n- **docz-plugin-babel6:** change babel syntax dynamic import when needed ([8cb278a](https://github.com/pedronauck/docz/commit/8cb278a))\n- **docz-plugin-css:** pass default parameter ([389979a](https://github.com/pedronauck/docz/commit/389979a))\n- **docz-theme-default:** support chinese input method ([#182](https://github.com/pedronauck/docz/issues/182)) ([94544a6](https://github.com/pedronauck/docz/commit/94544a6))\n- **docz-theme-default:** table layout adjustment ([e8e8ec8](https://github.com/pedronauck/docz/commit/e8e8ec8))\n- **docz-theme-default:** use docz link when href is internal ([00deef5](https://github.com/pedronauck/docz/commit/00deef5))\n\n<a name=\"0.9.0-beta.1\"></a>\n\n# [0.9.0-beta.1](https://github.com/pedronauck/docz/compare/v0.9.0-beta.0...v0.9.0-beta.1) (2018-08-01)\n\n**Note:** Version bump only for package undefined\n\n<a name=\"0.9.0-beta.0\"></a>\n\n# [0.9.0-beta.0](https://github.com/pedronauck/docz/compare/v0.8.0...v0.9.0-beta.0) (2018-08-01)\n\n### Bug Fixes\n\n- **docz:** add playground wrapper just around children ([66abfe8](https://github.com/pedronauck/docz/commit/66abfe8))\n- **docz-core:** remove babel plugin/presets when needed ([011baad](https://github.com/pedronauck/docz/commit/011baad))\n- **docz-theme-default:** hot reload on fullscreen mode ([1c68e2d](https://github.com/pedronauck/docz/commit/1c68e2d))\n- **docz-theme-default:** not found typo ([#173](https://github.com/pedronauck/docz/issues/173)) ([8c9f74e](https://github.com/pedronauck/docz/commit/8c9f74e))\n- **docz-theme-default:** resolve emotion theming conflict ([659cd79](https://github.com/pedronauck/docz/commit/659cd79))\n\n### Features\n\n- **docz-core:** add webpack-serve-overlay as error overlay ([263badf](https://github.com/pedronauck/docz/commit/263badf))\n- **docz-core:** support env files to set configuration ([#171](https://github.com/pedronauck/docz/issues/171)) ([259b72d](https://github.com/pedronauck/docz/commit/259b72d)), closes [#140](https://github.com/pedronauck/docz/issues/140)\n- **docz-plugin-svgr:** add initial version of plugin ([1ac1ea8](https://github.com/pedronauck/docz/commit/1ac1ea8))\n- **docz-theme-default:** add edit button for document ([#180](https://github.com/pedronauck/docz/issues/180)) ([e125a4f](https://github.com/pedronauck/docz/commit/e125a4f))\n\n<a name=\"0.8.0\"></a>\n\n# [0.8.0](https://github.com/pedronauck/docz/compare/v0.7.1...v0.8.0) (2018-07-28)\n\n### Bug Fixes\n\n- change link on readme ([#168](https://github.com/pedronauck/docz/issues/168)) ([30a9390](https://github.com/pedronauck/docz/commit/30a9390))\n- **docz:** humanize array type of flow (fix [#167](https://github.com/pedronauck/docz/issues/167)) ([18798bc](https://github.com/pedronauck/docz/commit/18798bc))\n- **docz-theme-default:** get fullscreen from localstorage ([0f8aa56](https://github.com/pedronauck/docz/commit/0f8aa56))\n\n### Features\n\n- **docz-theme-default:** add html output on playground ([be7a749](https://github.com/pedronauck/docz/commit/be7a749))\n\n<a name=\"0.7.1\"></a>\n\n## [0.7.1](https://github.com/pedronauck/docz/compare/v0.7.0...v0.7.1) (2018-07-24)\n\n### Bug Fixes\n\n- **docz:** add wrapper prop on Playground ([566aaf8](https://github.com/pedronauck/docz/commit/566aaf8))\n- **docz:** sort algorithm off docs and menus ([dad83ce](https://github.com/pedronauck/docz/commit/dad83ce))\n- **docz-plugin-css:** allow css from node_modules ([c21929a](https://github.com/pedronauck/docz/commit/c21929a))\n\n<a name=\"0.7.0\"></a>\n\n# [0.7.0](https://github.com/pedronauck/docz/compare/v0.6.2...v0.7.0) (2018-07-23)\n\n### Bug Fixes\n\n- **docz:** humanize prop types on PropTable ([c1f4c6f](https://github.com/pedronauck/docz/commit/c1f4c6f))\n- **docz-plugin-css:** css modules applied logic ([c5fa378](https://github.com/pedronauck/docz/commit/c5fa378))\n- **docz-theme-default:** not found page ([fb1ac49](https://github.com/pedronauck/docz/commit/fb1ac49))\n- **docz-theme-default:** resize bar style ([df0ae82](https://github.com/pedronauck/docz/commit/df0ae82))\n\n### Features\n\n- **docz:** add rawCode for Playground ([70d4735](https://github.com/pedronauck/docz/commit/70d4735))\n- **docz-theme-default:** add close on esc on playground fullscreen ([4ebf202](https://github.com/pedronauck/docz/commit/4ebf202))\n- **docz-theme-default:** add copy to clipboard on pre ([78149ad](https://github.com/pedronauck/docz/commit/78149ad))\n- **docz-theme-default:** add fullpage support for docs ([af88d0e](https://github.com/pedronauck/docz/commit/af88d0e))\n- **docz-theme-default:** add line numbers on Playground ([204f1bb](https://github.com/pedronauck/docz/commit/204f1bb))\n- **docz-theme-default:** add resize bar for fullscreen playground ([392009f](https://github.com/pedronauck/docz/commit/392009f))\n- **docz-theme-default:** add responsive mode for playground ([e04452e](https://github.com/pedronauck/docz/commit/e04452e))\n\n<a name=\"0.6.2\"></a>\n\n## [0.6.2](https://github.com/pedronauck/docz/compare/v0.6.1...v0.6.2) (2018-07-20)\n\n### Bug Fixes\n\n- **docz-core:** set env vars for commands ([29f0098](https://github.com/pedronauck/docz/commit/29f0098))\n\n<a name=\"0.6.1\"></a>\n\n## [0.6.1](https://github.com/pedronauck/docz/compare/v0.6.0...v0.6.1) (2018-07-19)\n\n### Bug Fixes\n\n- **docz:** default DocPreview components ([ff7cf32](https://github.com/pedronauck/docz/commit/ff7cf32))\n- **docz-theme-default:** add background and color on NotFound ([f0bd532](https://github.com/pedronauck/docz/commit/f0bd532))\n\n<a name=\"0.6.0\"></a>\n\n# [0.6.0](https://github.com/pedronauck/docz/compare/v0.5.9...v0.6.0) (2018-07-19)\n\n### Bug Fixes\n\n- **docz:** prevent default components object with no render ([4535aef](https://github.com/pedronauck/docz/commit/4535aef))\n- **docz-core:** add error when dest is working directory ([b1c87b5](https://github.com/pedronauck/docz/commit/b1c87b5))\n- **docz-core:** process.env vars for scripts ([f6b6260](https://github.com/pedronauck/docz/commit/f6b6260))\n- **docz-core:** serve static files from public ([c866856](https://github.com/pedronauck/docz/commit/c866856))\n- **docz-theme-default:** open menu if has some link active ([8399aad](https://github.com/pedronauck/docz/commit/8399aad))\n\n### Features\n\n- **docz-core:** add onCreateApp plugin method ([13c07e7](https://github.com/pedronauck/docz/commit/13c07e7))\n\n<a name=\"0.5.9\"></a>\n\n## [0.5.9](https://github.com/pedronauck/docz/compare/v0.5.8...v0.5.9) (2018-07-16)\n\n### Bug Fixes\n\n- **docz-theme-default:** add overflow config on Pre component ([#146](https://github.com/pedronauck/docz/issues/146)) ([9d4ce59](https://github.com/pedronauck/docz/commit/9d4ce59))\n\n<a name=\"0.5.8\"></a>\n\n## [0.5.8](https://github.com/pedronauck/docz/compare/v0.5.7...v0.5.8) (2018-07-11)\n\n### Bug Fixes\n\n- **docz-theme-default:** config transform function ([fdb3118](https://github.com/pedronauck/docz/commit/fdb3118))\n\n<a name=\"0.5.7\"></a>\n\n## [0.5.7](https://github.com/pedronauck/docz/compare/v0.5.6...v0.5.7) (2018-07-11)\n\n### Bug Fixes\n\n- **docz-plugin-babel6:** props parsing when typescript is enable ([0564bdf](https://github.com/pedronauck/docz/commit/0564bdf))\n\n<a name=\"0.5.6\"></a>\n\n## [0.5.6](https://github.com/pedronauck/docz/compare/v0.5.5...v0.5.6) (2018-07-11)\n\n### Bug Fixes\n\n- **docz:** add theme config transform before merge ([dc3448a](https://github.com/pedronauck/docz/commit/dc3448a))\n- **docz-theme-default:** sidebar search ([8fd77ec](https://github.com/pedronauck/docz/commit/8fd77ec))\n\n### Features\n\n- **docz:** add classname and style props for Playground ([1b64ed3](https://github.com/pedronauck/docz/commit/1b64ed3))\n- **docz-core:** add webpack-serve-waitpage ([83c493b](https://github.com/pedronauck/docz/commit/83c493b))\n\n<a name=\"0.5.5\"></a>\n\n## [0.5.5](https://github.com/pedronauck/docz/compare/v0.5.4...v0.5.5) (2018-07-07)\n\n### Bug Fixes\n\n- **docz-core:** add ordering to initial config data object ([2926ade](https://github.com/pedronauck/docz/commit/2926ade))\n- **docz-theme-default:** padding on sidebar footer ([df25fa1](https://github.com/pedronauck/docz/commit/df25fa1))\n\n<a name=\"0.5.4\"></a>\n\n## [0.5.4](https://github.com/pedronauck/docz/compare/v0.5.3...v0.5.4) (2018-07-07)\n\n**Note:** Version bump only for package undefined\n\n<a name=\"0.5.3\"></a>\n\n## [0.5.3](https://github.com/pedronauck/docz/compare/v0.5.2...v0.5.3) (2018-07-05)\n\n### Bug Fixes\n\n- **docz-theme-default:** link isActive logic ([205ea8d](https://github.com/pedronauck/docz/commit/205ea8d))\n\n<a name=\"0.5.2\"></a>\n\n## [0.5.2](https://github.com/pedronauck/docz/compare/v0.5.1...v0.5.2) (2018-07-05)\n\n### Bug Fixes\n\n- props table css class ([#116](https://github.com/pedronauck/docz/issues/116)) ([065473c](https://github.com/pedronauck/docz/commit/065473c))\n- **docz-core:** remove unnescessary Entry.check ([1871db8](https://github.com/pedronauck/docz/commit/1871db8))\n\n<a name=\"0.5.1\"></a>\n\n## [0.5.1](https://github.com/pedronauck/docz/compare/v0.3.4...v0.5.1) (2018-07-03)\n\n### Bug Fixes\n\n- broken links to examples ([#101](https://github.com/pedronauck/docz/issues/101)) ([26458f2](https://github.com/pedronauck/docz/commit/26458f2))\n- **docz-core:** add a fallback name on Entry ([ec38139](https://github.com/pedronauck/docz/commit/ec38139))\n- **docz-core:** app running port message ([4aec595](https://github.com/pedronauck/docz/commit/4aec595))\n- CHANGELOG.md ([8be3724](https://github.com/pedronauck/docz/commit/8be3724))\n- **docz-core:** check name on package json ([6cdbebc](https://github.com/pedronauck/docz/commit/6cdbebc))\n- **docz-theme-default:** add overflow auto to nav ([4cdbcfd](https://github.com/pedronauck/docz/commit/4cdbcfd))\n\n### Features\n\n- **docz-core:** add ordering property for config ([efd215e](https://github.com/pedronauck/docz/commit/efd215e))\n- **docz-core:** read name from package.json to populate initial title ([1eeb049](https://github.com/pedronauck/docz/commit/1eeb049))\n- **docz-theme-default:** add automatic table of content ([#106](https://github.com/pedronauck/docz/issues/106)) ([6ce9e84](https://github.com/pedronauck/docz/commit/6ce9e84))\n- **docz-theme-default:** add sidebar search ([7886e75](https://github.com/pedronauck/docz/commit/7886e75))\n\n<a name=\"0.5.0\"></a>\n\n# [0.5.0](https://github.com/pedronauck/docz/compare/v0.3.4...v0.5.0) (2018-07-03)\n\n### Bug Fixes\n\n- **docz-core:** app running port message ([1b94114](https://github.com/pedronauck/docz/commit/1b94114))\n\n### Features\n\n- **docz-core:** add ordering property for config ([a6c307d](https://github.com/pedronauck/docz/commit/a6c307d))\n- **docz-core:** read name from package.json to populate initial title ([4f10a6d](https://github.com/pedronauck/docz/commit/4f10a6d))\n- **docz-theme-default:** add automatic table of content ([#106](https://github.com/pedronauck/docz/issues/106)) ([6ce9e84](https://github.com/pedronauck/docz/commit/6ce9e84))\n- **docz-theme-default:** add sidebar search ([8218dc1](https://github.com/pedronauck/docz/commit/8218dc1))\n\n<a name=\"0.4.0\"></a>\n\n# [0.4.0](https://github.com/pedronauck/docz/compare/v0.3.4...v0.4.0) (2018-06-30)\n\n### Bug Fixes\n\n- broken links to examples ([#101](https://github.com/pedronauck/docz/issues/101)) ([26458f2](https://github.com/pedronauck/docz/commit/26458f2))\n- **docz-core:** add a fallback name on Entry ([ec38139](https://github.com/pedronauck/docz/commit/ec38139))\n- **docz-theme-default:** add overflow auto to nav ([4cdbcfd](https://github.com/pedronauck/docz/commit/4cdbcfd))\n\n### Features\n\n- **docz-theme-default:** add automatic table of content ([#106](https://github.com/pedronauck/docz/issues/106)) ([6ce9e84](https://github.com/pedronauck/docz/commit/6ce9e84))\n\n<a name=\"0.3.4\"></a>\n\n## [0.3.4](https://github.com/pedronauck/docz/compare/v0.3.3...v0.3.4) (2018-06-26)\n\n### Bug Fixes\n\n- remove color transparent on body ([#93](https://github.com/pedronauck/docz/issues/93)) ([a1942ef](https://github.com/pedronauck/docz/commit/a1942ef))\n- unclosed tag in README.md ([#89](https://github.com/pedronauck/docz/issues/89)) ([0552351](https://github.com/pedronauck/docz/commit/0552351))\n\n<a name=\"0.3.0\"></a>\n\n# [0.3.0](https://github.com/pedronauck/docz/compare/v0.3.0-beta.0...v0.3.0) (2018-06-25)\n\n### Bug Fixes\n\n- **docz-theme-default:** prettier format ([cb5643d](https://github.com/pedronauck/docz/commit/cb5643d))\n\n<a name=\"0.3.0-beta.0\"></a>\n\n# [0.3.0-beta.0](https://github.com/pedronauck/docz/compare/v0.2.11...v0.3.0-beta.0) (2018-06-25)\n\n### Bug Fixes\n\n- **docz-theme-default:** change background based on toggle ([2241f8b](https://github.com/pedronauck/docz/commit/2241f8b))\n- **docz-theme-default:** change chevronDown to burguer icon with animation ([8649938](https://github.com/pedronauck/docz/commit/8649938))\n- **docz-theme-default:** include breakpoints as const ([43490bb](https://github.com/pedronauck/docz/commit/43490bb))\n- **docz-theme-default:** lint code ([7c97a41](https://github.com/pedronauck/docz/commit/7c97a41))\n- **docz-theme-default:** made container responsive ([ddf078d](https://github.com/pedronauck/docz/commit/ddf078d))\n- **docz-theme-default:** responsive position for wrapper ([bb56449](https://github.com/pedronauck/docz/commit/bb56449))\n- **docz-theme-default:** sidebar toggle for links and sub-links ([9cd6321](https://github.com/pedronauck/docz/commit/9cd6321))\n\n### Features\n\n- **docz-theme-default:** add dark mode 🌚 ([#81](https://github.com/pedronauck/docz/issues/81)) ([964cf4d](https://github.com/pedronauck/docz/commit/964cf4d))\n- **docz-theme-default:** include breakpoints reactive on sidebar ([d3911b4](https://github.com/pedronauck/docz/commit/d3911b4))\n- **docz-theme-default:** include media queries facepaint ([5f78734](https://github.com/pedronauck/docz/commit/5f78734))\n- **docz-theme-default:** include toggle to sidebar ([a94e517](https://github.com/pedronauck/docz/commit/a94e517))\n- **docz-theme-default:** include ToggleBackground ([cac7ecd](https://github.com/pedronauck/docz/commit/cac7ecd))\n- **docz-theme-default:** table responsive ([0580a77](https://github.com/pedronauck/docz/commit/0580a77))\n\n<a name=\"0.3.3\"></a>\n\n## [0.3.3](https://github.com/pedronauck/docz/compare/v0.3.2...v0.3.3) (2018-06-26)\n\n### Bug Fixes\n\n- **docz-core:** copy templates files for dist ([#88](https://github.com/pedronauck/docz/issues/88)) ([5e4b98d](https://github.com/pedronauck/docz/commit/5e4b98d))\n\n<a name=\"0.3.2\"></a>\n\n## [0.3.2](https://github.com/pedronauck/docz/compare/v0.3.1...v0.3.2) (2018-06-25)\n\n### Bug Fixes\n\n- **docz:** mdxtag import ([4ed20bf](https://github.com/pedronauck/docz/commit/4ed20bf))\n\n<a name=\"0.3.1\"></a>\n\n## [0.3.1](https://github.com/pedronauck/docz/compare/v0.2.11...v0.3.1) (2018-06-25)\n\n### Bug Fixes\n\n- **docz:** mdx provider import ([ded8cbb](https://github.com/pedronauck/docz/commit/ded8cbb))\n- use docz-theme-default as docz-core dependency ([1a2fb67](https://github.com/pedronauck/docz/commit/1a2fb67))\n\n### Features\n\n- **docz-default-theme:** dark mode and responsiveness ([#87](https://github.com/pedronauck/docz/issues/87)) ([a4db115](https://github.com/pedronauck/docz/commit/a4db115)), closes [#81](https://github.com/pedronauck/docz/issues/81)\n\n<a name=\"0.3.0\"></a>\n\n# [0.3.0](https://github.com/pedronauck/docz/compare/v0.3.0-beta.0...v0.3.0) (2018-06-25)\n\n### Bug Fixes\n\n- **docz-theme-default:** prettier format ([cb5643d](https://github.com/pedronauck/docz/commit/cb5643d))\n\n<a name=\"0.3.0-beta.0\"></a>\n\n# [0.3.0-beta.0](https://github.com/pedronauck/docz/compare/v0.2.11...v0.3.0-beta.0) (2018-06-25)\n\n### Bug Fixes\n\n- **docz-theme-default:** change background based on toggle ([2241f8b](https://github.com/pedronauck/docz/commit/2241f8b))\n- **docz-theme-default:** change chevronDown to burguer icon with animation ([8649938](https://github.com/pedronauck/docz/commit/8649938))\n- **docz-theme-default:** include breakpoints as const ([43490bb](https://github.com/pedronauck/docz/commit/43490bb))\n- **docz-theme-default:** lint code ([7c97a41](https://github.com/pedronauck/docz/commit/7c97a41))\n- **docz-theme-default:** made container responsive ([ddf078d](https://github.com/pedronauck/docz/commit/ddf078d))\n- **docz-theme-default:** responsive position for wrapper ([bb56449](https://github.com/pedronauck/docz/commit/bb56449))\n- **docz-theme-default:** sidebar toggle for links and sub-links ([9cd6321](https://github.com/pedronauck/docz/commit/9cd6321))\n\n### Features\n\n- **docz-theme-default:** add dark mode 🌚 ([#81](https://github.com/pedronauck/docz/issues/81)) ([964cf4d](https://github.com/pedronauck/docz/commit/964cf4d))\n- **docz-theme-default:** include breakpoints reactive on sidebar ([d3911b4](https://github.com/pedronauck/docz/commit/d3911b4))\n- **docz-theme-default:** include media queries facepaint ([5f78734](https://github.com/pedronauck/docz/commit/5f78734))\n- **docz-theme-default:** include toggle to sidebar ([a94e517](https://github.com/pedronauck/docz/commit/a94e517))\n- **docz-theme-default:** include ToggleBackground ([cac7ecd](https://github.com/pedronauck/docz/commit/cac7ecd))\n- **docz-theme-default:** table responsive ([0580a77](https://github.com/pedronauck/docz/commit/0580a77))\n\n<a name=\"0.2.11\"></a>\n\n## [0.2.11](https://github.com/pedronauck/docz/compare/v0.2.10...v0.2.11) (2018-06-22)\n\n### Bug Fixes\n\n- **docz-core:** node env for production ([615aa1f](https://github.com/pedronauck/docz/commit/615aa1f))\n- **docz-plugin-css:** production build ([1a66d8a](https://github.com/pedronauck/docz/commit/1a66d8a))\n- **docz-theme-default:** use webfontloader instead of css import ([5973969](https://github.com/pedronauck/docz/commit/5973969))\n- some changes on css examples ([058660f](https://github.com/pedronauck/docz/commit/058660f))\n\n<a name=\"0.2.10\"></a>\n\n## [0.2.10](https://github.com/pedronauck/docz/compare/v0.2.9...v0.2.10) (2018-06-21)\n\n### Features\n\n- **docz-plugin-css:** add initial version ([#78](https://github.com/pedronauck/docz/issues/78)) ([299372e](https://github.com/pedronauck/docz/commit/299372e))\n\n<a name=\"0.2.9\"></a>\n\n## [0.2.9](https://github.com/pedronauck/docz/compare/v0.2.8...v0.2.9) (2018-06-21)\n\n**Note:** Version bump only for package undefined\n\n<a name=\"0.2.8\"></a>\n\n## [0.2.8](https://github.com/pedronauck/docz/compare/v0.2.7...v0.2.8) (2018-06-21)\n\n### Bug Fixes\n\n- **docz-core:** typescript resolve extensions ([689b057](https://github.com/pedronauck/docz/commit/689b057))\n\n<a name=\"0.2.7\"></a>\n\n## [0.2.7](https://github.com/pedronauck/docz/compare/v0.2.6...v0.2.7) (2018-06-20)\n\n### Bug Fixes\n\n- **docz:** typo ([#63](https://github.com/pedronauck/docz/issues/63)) ([6af5db2](https://github.com/pedronauck/docz/commit/6af5db2))\n- **docz-plugin-babel6:** documentation for babel plugin ([#60](https://github.com/pedronauck/docz/issues/60)) ([8a14e2a](https://github.com/pedronauck/docz/commit/8a14e2a))\n- **docz-plugin-babel6:** readme typo ([b77e986](https://github.com/pedronauck/docz/commit/b77e986))\n- **docz-plugin-babel6:** typo ([d2f92b7](https://github.com/pedronauck/docz/commit/d2f92b7))\n- **docz-theme-default:** improve spacing on jsx attributes ([#54](https://github.com/pedronauck/docz/issues/54)) ([49fe0b8](https://github.com/pedronauck/docz/commit/49fe0b8))\n\n<a name=\"0.2.6\"></a>\n\n## [0.2.6](https://github.com/pedronauck/docz/compare/v0.2.5...v0.2.6) (2018-06-17)\n\n### Bug Fixes\n\n- **docz-core:** change filepath entry for windows ([#31](https://github.com/pedronauck/docz/issues/31)) ([14bf0e2](https://github.com/pedronauck/docz/commit/14bf0e2))\n\n### Features\n\n- **docz-example-babel6:** add package ([92ead5a](https://github.com/pedronauck/docz/commit/92ead5a))\n- **docz-plugin-babel6:** add package ([68e364a](https://github.com/pedronauck/docz/commit/68e364a))\n\n<a name=\"0.2.5\"></a>\n\n## [0.2.5](https://github.com/pedronauck/docz/compare/v0.2.4...v0.2.5) (2018-06-15)\n\n### Bug Fixes\n\n- **docz:** add extractTypeDescribedValue to PropsTable ([#38](https://github.com/pedronauck/docz/issues/38)) ([cca862c](https://github.com/pedronauck/docz/commit/cca862c))\n- **docz:** PropsTable component ([48638cc](https://github.com/pedronauck/docz/commit/48638cc))\n\n<a name=\"0.2.4\"></a>\n\n## [0.2.4](https://github.com/pedronauck/docz/compare/v0.2.3...v0.2.4) (2018-06-13)\n\n**Note:** Version bump only for package undefined\n\n<a name=\"0.2.3\"></a>\n\n## [0.2.3](https://github.com/pedronauck/docz/compare/v0.2.2...v0.2.3) (2018-06-13)\n\n### Bug Fixes\n\n- **docz-core:** change config hosts to support windows os ([9e3c4f6](https://github.com/pedronauck/docz/commit/9e3c4f6))\n- readme typo ([a13dc3c](https://github.com/pedronauck/docz/commit/a13dc3c))\n\n<a name=\"0.2.2\"></a>\n\n## [0.2.2](https://github.com/pedronauck/docz/compare/v0.2.1...v0.2.2) (2018-06-12)\n\n**Note:** Version bump only for package undefined\n\n<a name=\"0.2.1\"></a>\n\n## [0.2.1](https://github.com/pedronauck/docz/compare/v0.2.0...v0.2.1) (2018-06-12)\n\n### Bug Fixes\n\n- corrections on readme [#2](https://github.com/pedronauck/docz/issues/2) ([bd1b7a6](https://github.com/pedronauck/docz/commit/bd1b7a6))\n- playground component destructuring bug ([#4](https://github.com/pedronauck/docz/issues/4)) ([f9026cf](https://github.com/pedronauck/docz/commit/f9026cf))\n- readme typos ([16662eb](https://github.com/pedronauck/docz/commit/16662eb))\n\n<a name=\"0.2.0\"></a>\n\n# [0.2.0](https://github.com/pedronauck/docz/compare/v0.2.0-beta.2...v0.2.0) (2018-06-11)\n\n### Bug Fixes\n\n- readme image ([470b235](https://github.com/pedronauck/docz/commit/470b235))\n- readme links ([61de7cd](https://github.com/pedronauck/docz/commit/61de7cd))\n- readme links ([f7b1120](https://github.com/pedronauck/docz/commit/f7b1120))\n\n<a name=\"0.2.0-beta.2\"></a>\n\n# [0.2.0-beta.2](https://github.com/doczjs/docz/compare/v0.2.0-beta.1...v0.2.0-beta.2) (2018-06-10)\n\n### Bug Fixes\n\n- **docz-core:** autolink headings ([0b8369d](https://github.com/doczjs/docz/commit/0b8369d))\n\n<a name=\"0.2.0-beta.1\"></a>\n\n# [0.2.0-beta.1](https://github.com/doczjs/docz/compare/v0.2.0-beta.0...v0.2.0-beta.1) (2018-06-10)\n\n### Features\n\n- **docz-core:** add headings property for entries and autolink on headings ([7711c3c](https://github.com/doczjs/docz/commit/7711c3c))\n\n<a name=\"0.2.0-beta.0\"></a>\n\n# [0.2.0-beta.0](https://github.com/doczjs/docz/compare/v0.1.2-beta.6...v0.2.0-beta.0) (2018-06-10)\n\n### Features\n\n- **docz-core:** add indexHtml property on project configuration ([6bb5167](https://github.com/doczjs/docz/commit/6bb5167))\n\n<a name=\"0.1.2-beta.6\"></a>\n\n## [0.1.2-beta.6](https://github.com/doczjs/docz/compare/v0.1.2-beta.5...v0.1.2-beta.6) (2018-06-09)\n\n### Bug Fixes\n\n- **docz:** typing definition ([1a3648e](https://github.com/doczjs/docz/commit/1a3648e))\n\n<a name=\"0.1.2-beta.5\"></a>\n\n## [0.1.2-beta.5](https://github.com/doczjs/docz/compare/v0.1.2-beta.4...v0.1.2-beta.5) (2018-06-09)\n\n### Bug Fixes\n\n- **docz-core:** build when base prop ([6001171](https://github.com/doczjs/docz/commit/6001171))\n- **docz-theme-default:** loading component height ([b198075](https://github.com/doczjs/docz/commit/b198075))\n\n<a name=\"0.1.2-beta.4\"></a>\n\n## [0.1.2-beta.4](https://github.com/doczjs/docz/compare/v0.1.2-beta.3...v0.1.2-beta.4) (2018-06-09)\n\n**Note:** Version bump only for package undefined\n\n<a name=\"0.1.2-beta.3\"></a>\n\n## [0.1.2-beta.3](https://github.com/doczjs/docz/compare/v0.1.2-beta.2...v0.1.2-beta.3) (2018-06-09)\n\n**Note:** Version bump only for package undefined\n\n<a name=\"0.1.2-beta.2\"></a>\n\n## [0.1.2-beta.2](https://github.com/doczjs/docz/compare/v0.1.2-beta.1...v0.1.2-beta.2) (2018-06-09)\n\n### Features\n\n- **docz:** add support for custom not found route ([455dcca](https://github.com/doczjs/docz/commit/455dcca))\n- **docz-theme-default:** add custom not found component ([1773fe1](https://github.com/doczjs/docz/commit/1773fe1))\n\n<a name=\"0.1.2-beta.1\"></a>\n\n## [0.1.2-beta.1](https://github.com/doczjs/docz/compare/v0.1.2-beta.0...v0.1.2-beta.1) (2018-06-09)\n\n### Bug Fixes\n\n- **docz-theme-default:** emotion typings ([270e38c](https://github.com/doczjs/docz/commit/270e38c))\n\n### Features\n\n- **docz:** add loading component setting for loadable ([4352ce3](https://github.com/doczjs/docz/commit/4352ce3))\n- **docz-core:** add base config argument ([20f29c2](https://github.com/doczjs/docz/commit/20f29c2))\n- **docz-core:** add dest config property ([d6c5506](https://github.com/doczjs/docz/commit/d6c5506))\n- **docz-core:** add modifyBundlerConfig configuration property ([ec04bee](https://github.com/doczjs/docz/commit/ec04bee))\n- **docz-core:** use html template as component ([b7a2dc0](https://github.com/doczjs/docz/commit/b7a2dc0))\n- **docz-theme-default:** add Loading component for DocPreview ([97859e2](https://github.com/doczjs/docz/commit/97859e2))\n\n<a name=\"0.1.2-beta.0\"></a>\n\n## [0.1.2-beta.0](https://github.com/doczjs/docz/compare/v0.1.1...v0.1.2-beta.0) (2018-06-02)\n\n**Note:** Version bump only for package undefined\n\n<a name=\"0.1.1-beta.6\"></a>\n\n## [0.1.1-beta.6](https://github.com/doczjs/docz/compare/v0.1.1-beta.5...v0.1.1-beta.6) (2018-06-01)\n\n### Bug Fixes\n\n- **docz:** add docz-theme-default as dependecy ([0dff6c0](https://github.com/doczjs/docz/commit/0dff6c0))\n\n<a name=\"0.1.1-beta.5\"></a>\n\n## [0.1.1-beta.5](https://github.com/doczjs/docz/compare/v0.1.1-beta.4...v0.1.1-beta.5) (2018-06-01)\n\n### Bug Fixes\n\n- **docz:** link component ([7626982](https://github.com/doczjs/docz/commit/7626982))\n- **load-cfg:** add namedExports options ([d36194d](https://github.com/doczjs/docz/commit/d36194d))\n\n### Features\n\n- **load-cfg:** add esm module loader ([12a7610](https://github.com/doczjs/docz/commit/12a7610))\n\n<a name=\"0.1.1-beta.4\"></a>\n\n## [0.1.1-beta.4](https://github.com/doczjs/docz/compare/v0.1.1-beta.3...v0.1.1-beta.4) (2018-05-29)\n\n### Bug Fixes\n\n- **docz:** add isActive to Link components ([9cecc08](https://github.com/doczjs/docz/commit/9cecc08))\n- **docz-core:** module rule test for typescript ([bdeffc1](https://github.com/doczjs/docz/commit/bdeffc1))\n\n<a name=\"0.1.1-beta.3\"></a>\n\n## [0.1.1-beta.3](https://github.com/doczjs/docz/compare/v0.1.1-beta.2...v0.1.1-beta.3) (2018-05-29)\n\n**Note:** Version bump only for package undefined\n\n<a name=\"0.1.1-beta.2\"></a>\n\n## [0.1.1-beta.2](https://github.com/doczjs/docz/compare/v0.1.1-beta.0...v0.1.1-beta.2) (2018-05-29)\n\n### Bug Fixes\n\n- **docz:** set docz-core as dependency ([6c257e8](https://github.com/doczjs/docz/commit/6c257e8))\n\n<a name=\"0.1.1-beta.1\"></a>\n\n## [0.1.1-beta.1](https://github.com/doczjs/docz/compare/v0.1.1-beta.0...v0.1.1-beta.1) (2018-05-29)\n\n**Note:** Version bump only for package undefined\n\n<a name=\"0.1.1-beta.0\"></a>\n\n## [0.1.1-beta.0](https://github.com/doczjs/docz/compare/v0.1.0...v0.1.1-beta.0) (2018-05-29)\n\n### Bug Fixes\n\n- **docz:** add bin folder for npm publish ([f463a98](https://github.com/doczjs/docz/commit/f463a98))\n\n<a name=\"0.1.0\"></a>\n\n# 0.1.0 (2018-05-29)\n\n### Bug Fixes\n\n- **docz:** Docs render props orders and types ([d7e9ee2](https://github.com/doczjs/docz/commit/d7e9ee2))\n- **docz:** docs categories for themes ([687720c](https://github.com/doczjs/docz/commit/687720c))\n- **docz:** flow props parser integration ([5a83610](https://github.com/doczjs/docz/commit/5a83610))\n- **docz:** validate route passed for docs.route() ([48a0484](https://github.com/doczjs/docz/commit/48a0484))\n- **docz-core:** async plugin ([ddfbcf1](https://github.com/doczjs/docz/commit/ddfbcf1))\n- **docz-core:** check if found name exist when parse entry ([f75881e](https://github.com/doczjs/docz/commit/f75881e))\n- **docz-core:** config watch for directory operations ([43fa7ab](https://github.com/doczjs/docz/commit/43fa7ab))\n- **docz-core:** create plugin to fix paragraph parse on mdx ([42b4f05](https://github.com/doczjs/docz/commit/42b4f05))\n- **docz-core:** data server class ([12c0558](https://github.com/doczjs/docz/commit/12c0558))\n- **docz-core:** don't exit when catch prettier ([5423d96](https://github.com/doczjs/docz/commit/5423d96))\n- **docz-core:** entries filepath ([e45fea0](https://github.com/doczjs/docz/commit/e45fea0))\n- webpack errors message ([90f6064](https://github.com/doczjs/docz/commit/90f6064))\n- **docz-core:** entries rewrite ([986ba65](https://github.com/doczjs/docz/commit/986ba65))\n- **docz-core:** entries updates ([7147ac1](https://github.com/doczjs/docz/commit/7147ac1))\n- **docz-core:** packages splitting ([d2e74ee](https://github.com/doczjs/docz/commit/d2e74ee))\n- **docz-core:** templates files ([a5cda97](https://github.com/doczjs/docz/commit/a5cda97))\n- **docz-core:** throw error when parse ast ([05138bf](https://github.com/doczjs/docz/commit/05138bf))\n- **docz-example-basic:** package name ([dec5713](https://github.com/doczjs/docz/commit/dec5713))\n\n### Features\n\n- **docz-core:** add title and description on settings ([ad9ee58](https://github.com/doczjs/docz/commit/ad9ee58))\n- add basic monorepo structure ([5a977ed](https://github.com/doczjs/docz/commit/5a977ed))\n- **docz:** add a mvp version of project ([05ac064](https://github.com/doczjs/docz/commit/05ac064))\n- **docz:** add components parser ([a4127d9](https://github.com/doczjs/docz/commit/a4127d9))\n- **docz:** add custom routes for docs ([8458d91](https://github.com/doczjs/docz/commit/8458d91))\n- **docz:** add doc page wrapper as component ([1150373](https://github.com/doczjs/docz/commit/1150373))\n- **docz:** add groups feature ([9652b30](https://github.com/doczjs/docz/commit/9652b30))\n- **docz:** add module declarations for typescript ([ae597af](https://github.com/doczjs/docz/commit/ae597af))\n- **docz:** add routes from parsed entries ([fc37f73](https://github.com/doczjs/docz/commit/fc37f73))\n- **docz:** add some improvements for default package ([51188d4](https://github.com/doczjs/docz/commit/51188d4))\n- **docz:** make server bundler api concise ([ae5f0c0](https://github.com/doczjs/docz/commit/ae5f0c0))\n- **docz:** some refactors ([7f6660c](https://github.com/doczjs/docz/commit/7f6660c))\n- **docz:** use webpack 4 instead of parcel ([1e5742c](https://github.com/doczjs/docz/commit/1e5742c))\n- **docz-bundler-webpack:** add bundler as package ([d7be8a9](https://github.com/doczjs/docz/commit/d7be8a9))\n- **docz-bundler-webpack:** improve webpack config ([964832a](https://github.com/doczjs/docz/commit/964832a))\n- **docz-core:** add basic plugin logic ([add17ad](https://github.com/doczjs/docz/commit/add17ad))\n- **docz-core:** add build command ([ef7abd2](https://github.com/doczjs/docz/commit/ef7abd2))\n- **docz-core:** add chokidar to watch new entries ([2f073d5](https://github.com/doczjs/docz/commit/2f073d5))\n- **docz-core:** add entry settings field ([2ec5d66](https://github.com/doczjs/docz/commit/2ec5d66))\n- **docz-core:** add hot reload ([9ebe65d](https://github.com/doczjs/docz/commit/9ebe65d))\n- **docz-core:** add playground code parse section ([6bbf158](https://github.com/doczjs/docz/commit/6bbf158))\n- **docz-core:** add setConfig method for Plugin ([9ba6507](https://github.com/doczjs/docz/commit/9ba6507))\n- **docz-core:** add some improvements to work with server config ([8bf33bc](https://github.com/doczjs/docz/commit/8bf33bc))\n- **docz-core:** add support for custom head or scripts ([69f4d56](https://github.com/doczjs/docz/commit/69f4d56))\n- **docz-core:** add support for load custom themes ([ade98ce](https://github.com/doczjs/docz/commit/ade98ce))\n- **docz-core:** add support for parse sections via ast ([6db0cd8](https://github.com/doczjs/docz/commit/6db0cd8))\n- **docz-core:** add template using art-template ([7484267](https://github.com/doczjs/docz/commit/7484267))\n- **docz-core:** add typescript support ([17dae8b](https://github.com/doczjs/docz/commit/17dae8b))\n- **docz-core:** improve plugin and add support to modify babel ([cf3ec4e](https://github.com/doczjs/docz/commit/cf3ec4e))\n- **docz-core:** pass theme config via websockets for dev ([5222de7](https://github.com/doczjs/docz/commit/5222de7))\n- **docz-core:** set babel on the fly ([672be49](https://github.com/doczjs/docz/commit/672be49))\n- **docz-core:** split bundler logic ([a7db904](https://github.com/doczjs/docz/commit/a7db904))\n- **docz-core:** use websockets instead of generate json to process entries ([e0773a0](https://github.com/doczjs/docz/commit/e0773a0))\n- **docz-core:** webpack middlewares ([68cbcba](https://github.com/doczjs/docz/commit/68cbcba))\n- **docz-example-flow:** add example folder ([27002d8](https://github.com/doczjs/docz/commit/27002d8))\n- refac to use mdx ([04b59e5](https://github.com/doczjs/docz/commit/04b59e5))\n- **docz-example-typescript:** add new example ([9052d0f](https://github.com/doczjs/docz/commit/9052d0f))\n- **docz-theme-default:** add default theme as a package ([108dc4c](https://github.com/doczjs/docz/commit/108dc4c))\n- **docz-theme-default:** add highlight code on theme ([1126e67](https://github.com/doczjs/docz/commit/1126e67))\n- **docz-theme-default:** add logo option ([435da9b](https://github.com/doczjs/docz/commit/435da9b))\n- **docz-theme-default:** add sidebar footer ([ffc4b18](https://github.com/doczjs/docz/commit/ffc4b18))\n- **docz-theme-default:** add tooltip on props ([dc3c4cd](https://github.com/doczjs/docz/commit/dc3c4cd))\n- **docz-theme-default:** improve theme styles ([2ca5e21](https://github.com/doczjs/docz/commit/2ca5e21))\n- **docz-theme-default:** start logic to create theme feature ([900cf2b](https://github.com/doczjs/docz/commit/900cf2b))\n- **docz-theme-default:** use typescript instead of javascript ([4de326a](https://github.com/doczjs/docz/commit/4de326a))\n- use custom render method on section ([8ccf99c](https://github.com/doczjs/docz/commit/8ccf99c))\n- **load-cfg:** add script as package ([11e409c](https://github.com/doczjs/docz/commit/11e409c))\n- **load-cfg:** set cache to require file ([c49fc64](https://github.com/doczjs/docz/commit/c49fc64))\n- add component props parse feature ([987627d](https://github.com/doczjs/docz/commit/987627d))\n- add support for highlight code sections ([19bf7ea](https://github.com/doczjs/docz/commit/19bf7ea))\n- improve docz theme to use theme config ([9207ed2](https://github.com/doczjs/docz/commit/9207ed2))\n- parse doc class to object ([e7f9cf0](https://github.com/doczjs/docz/commit/e7f9cf0))\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at pedronauck@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing\n\nContributions, issues and feature requests are very welcome.\n\nIf you are using this package and fixed a bug for yourself, please consider submitting a PR!\n\n## Pre-requisites\n\n- _Node:_ `^9.0.0` or higher.\n- _Npm:_ `6.0.0` or higher.\n- _Yarn:_ `^1.7.0` or higher.\n\n## Getting started\n\nClone the project from Github :\n\n```sh\ngit clone git@github.com:doczjs/docz.git\ncd docz\n```\n\nInstall dependencies :\n\n```sh\nyarn\n```\n\nSetup development environment:\n\n```sh\nyarn dev\n```\n\nThat's it you're ready to start contributing 👍!\n\nThe example docz app is in `dev-env/basic` and runs on `http://localhost:3000`\n\nYou can change any of the core packages and see the effect or edit the mdx and jsx in `dev-env/basic`\n\n### What does `yarn dev` do ?\n\n1. Builds and watches all core docz packages.\n2. Copies build output to local dev-env node_modules on every change.\n3. Runs a docz app on `http://localhost:3000/` that listens to changes of docz packages' build output.\n\n### Other questions or concerns ?\n\nFeel free to join [our contributors' slack channel](https://join.slack.com/t/docz-workspace/shared_invite/enQtNzc4ODc2ODA3NzUxLWI0ZmYwY2NhNjhkNDFjN2UzYzlmMDcwZjQyZGY4MWQ1NmQwZDVlZDE4MmE3N2I4MWRjZTAxZjY4ODk4NGMzZjg) for longer form discussion.\n\n## Developing\n\n### Project structure\n\ndocz follows the [Monorepo](https://en.wikipedia.org/wiki/Monorepo) design managed by [Lerna](https://github.com/lerna/lerna).\n\nThe are just two directories to care about if you would like to contribute:\n\n- **Packages**: Host all docz source code.\n- **Examples**: Host all available usage examples.\n\n#### Packages\n\nThere are lots of [packages](https://github.com/pedronauck/docz/tree/master/core) that are necessary to run docz, the most important packages that are important to care about:\n\n#### **[docz-core](https://github.com/pedronauck/docz/tree/master/core/docz-core)**\n\n- This is the core of docz. All build algorithms, server process and parses belongs to here.\n- If you break this package, probably you'll break all packages! Please, be careful.\n- All CLI commands are built here and imported on `docz` package using `./bin` script.\n- Do not create scripts that run on browser here, only node scripts.\n\n#### **[docz](https://github.com/pedronauck/docz/tree/master/core/docz)**\n\n- Main and top level package.\n- Scripts that run on browser belongs to this package\n- Built-ins components are built here, most specifically on [this folder](https://github.com/pedronauck/docz/tree/master/core/docz/src/components)\n- This package shouldn't have any component style, just boilerplate and logic!\n\n### Creating plugins\n\nIf there are some plugins that you want to create, please contact me before to talk about the possibility to make this plugin official!\n\n## Commit messages\n\nCommit messages should follow the [commit message convention](https://conventionalcommits.org/) so, changelogs could be generated automatically by that. Commit messages are validated automatically upon commit. If you aren't familiar with the commit message convention, you can use yarn commit (or `npm run commit`) instead of git commit, which provides an interactive CLI for generating proper commit messages.\n\n### Pull Requests\n\n- Work in the **src** folder of a respective package and **DO NOT** check `dist` in the commits.\n\n- It's OK - and a very nice thing - to have multiple small commits as you work on the PR - we will let GitHub automatically squash it before merging.\n\n### If adding a new feature:\n\n- Make sure that [all examples](https://github.com/pedronauck/docz/tree/master/examples) are running as expected\n- Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it.\n\n## Contributors\n\nThis project exists thanks to all the people who contribute.\n\n<a href=\"https://github.com/pedronauck/docz/graphs/contributors\"><img src=\"https://opencollective.com/docz/contributors.svg?width=890&button=false\" /></a>\n"
  },
  {
    "path": "LICENSE.md",
    "content": "MIT License\n\nCopyright (c) 2018 Pedro Nauck\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": "MIGRATION_GUIDE.md",
    "content": "# Migration Guide\n\nThe [v2 release](https://github.com/pedronauck/docz/pull/950) is our biggest release in terms of changes to our core scripts. Our bundler system was entirely modified in order to use Gatsby as default bundler and you will need to update your code if you’re coming from a previous version. \n\nIt’s not a big deal, but you will need to follow this guide in order to get Docz running properly on your project after the upgrade.\n\n## Gatsby as default bundler\n\nThe biggest change in the new v2 is that our core is now entirely built using Gatsby behind the scenes. This is a huge win for Docz, since now we can focus on building new features instead of handling a lot of bundlers issues (our biggest bottleneck) and leverage the entire Gatsby ecosystem.\n\nSo, in order to refactor our core, we need to change a lot of things and remove others that no longer make sense. The most expressive changes here is about the configuration for `doczrc.js` and the plugin system.\n\n### List of removed properties from `doczrc.js`\n* **`websocketHost`** ▶︎ _no longer need_\n* **`websocketPort`** ︎︎︎▶︎ _no longer need_\n* **`wrapper`** ▶︎ _removed_\n* **`theme`** ▶︎ _removed_\n* **`indexHtml`** ▶︎ _removed_\n* **`codeSandbox`** ▶︎ _removed_\n* **`onCreateWebpackChain`** ▶︎ _removed_\n* **`modifyBundlerConfig`** ▶︎ use Gatsby [`onCreateWebpackConfig`](https://www.gatsbyjs.org/docs/node-apis/#onCreateWebpackConfig) hook\n* **`modifyBabelRc`** ▶︎ use Gatsby [`onCreateBabelConfig`](https://www.gatsbyjs.org/docs/node-apis/#onCreateBabelConfig) hook\n\n## New hooks for plugins\nThe `createPlugin` method also changed in order to fit with Gatsby now.\n\n### List of removed/changed properties from `createPlugin()`\n\n* **`modifyBundlerConfig`** ▶︎ `onCreateWebpackConfig`\n* **`modifyBabelRc`** ▶︎ `onCreateBabelConfig`\n* **`onCreateApp`** ▶︎ `onCreateDevServer`\n* **`onPreCreateApp`** ▶︎ _removed_\n* **`onServerListening`** ▶︎ _removed_\n* **`onPreRender`** ▶︎ _removed_\n* **`onPostRender`** ▶︎ _removed_\n\n> All methods that changed now are using the same API as Gatsby hooks.\n> You can have more details about then [here](https://www.gatsbyjs.org/docs/node-apis).\n\n## `docz-theme-default` removed\n\nMake sure to remove `docz-theme-default` from your dependencies when migrating : \n\n```sh\nyarn remove docz-theme-default # npm uninstall docz-theme-default\n```\n\nThe main reason that made us change our core to use Gatsby is that they have added a feature called themes. \n\nIn the last major version we launched our own Gatsby theme `gatsby-theme-docz` and this was a huge step forward because we can now use Docz inside a Gatsby project and bring a lot of new possibilities when creating documentation.\n\nOne of the best benefits of Gatsby themes is a feature called Component Shadowing, that’s the ability to replace theme files just by creating your own file following a file naming convention. This is awesome and is something that people very often ask, for example: “I want just to change the head in the Docz theme”.\n\nIn order to get Docz running with component shadowing we removed `docz-theme-default` and now you don’t need to install it anymore. You can just add `docz` to your project.\n\nCheck [here](https://github.com/doczjs/docz/tree/master/core/gatsby-theme-docz#customizing-components) for more information about customizing the Gatsby theme.\n\n### Code highlight with PrismJS\n\nIn the last version of Docz we used Codemirror to highlight code inside `<Playground>` and code blocks. Starting from v2 docz uses [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer) together with Theme UI.\n\nCheck [here](https://github.com/FormidableLabs/prism-react-renderer) for more information.\n\n### New `themeConfig` properties\n\nAnother great thing launched in the newest version is the integration with [Theme UI](https://theme-ui.com). Theme UI is a library for building consistent, themeable React apps based on constraint-based design principles. \n\nSo, in order to integrate it with our new theme, a lot of changes have been made inside the `themeConfig` object.\n\n\n## `theme` property removed\n\nThe property used to define your Docz theme inside the `doczrc.js` was removed. But you can still create and use your own theme from scratch if you want.\n\nIf you want to use your own theme, just create a file called `src/gatsby-theme-docz/index.js` in order to use component shadowing and replace it with your new theme.\n\n```js\n// src/gatsby-theme-docz/index.js\nimport React from 'react'\nimport Theme from './my-custom-theme'\n\nexport default (props) => <Theme {...props} />\n```\n\nCheck [here](https://www.docz.site/docs/creating-your-themes) for more information about how to create themes.\n\n## `wrapper` property removed\nThe same thing happened here for the oldest `wrapper` property. Now you can wrap your entire application by just creating a file called `src/gatsby-theme-docz/wrapper.js`\n\n```js\n// src/gatsby-theme-docz/index.js\nimport React from 'react'\n\nexport default ({ children }) => (\n  <div>\n    <h1>My custom wrapper</h1>\n    {children}\n  </div>\n)\n```\n\n## CSS preprocessors managed by gatsby\n\nCSS preprocessors and modules were handled by [`docz-plugin-css`](https://github.com/doczjs/docz-plugin-css) which hooked into the bundler config to add different loader support via webpack.\n\nWith the change to gatsby, css preprocessors like `sass` can be handled by gatsby via [Plugins](https://www.gatsbyjs.org/plugins/)\n\nThese plugins are added by adding a `gatsby-config.js` in your project root or modifying an existing one. For example if you want to add support for `sass` you would do the following:\n\n1. Install [`node-sass`](https://github.com/sass/node-sass) and [`gatsby-plugin-sass`](https://www.gatsbyjs.org/packages/gatsby-plugin-sass/)\n```bash\n# npm\nnpm install --save node-sass gatsby-plugin-sass\n\n# yarn\nyarn add node-sass gatsby-plugin-sass\n```\n\n2. Add the plugin to your `gatsby-config.js`\n```js\n//gatsby-config.js\nmodule.exports = {\n  plugins: ['gatsby-plugin-sass']\n}\n```\n"
  },
  {
    "path": "README.md",
    "content": "# Docz\n\nDocz makes it easy to write and publish beautiful interactive documentation for your code.\nCreate MDX files showcasing your code and Docz turns them into a live-reloading, production-ready site.\n\n## Why?\n\nDocumenting code is one of the most important and time-consuming tasks when developing software.\n\nA lot of time is spent on building and maintaining custom documentation sites.\n\nDocz enables you to quickly create a live-reloading, SEO-friendly, production-ready documentation site with MDX and customize the look, feel and behavior when required by leveraging [GatsbyJS](https://www.gatsbyjs.org) and [Gatsby theme shadowing](https://www.gatsbyjs.org/docs/themes/shadowing/).\n\n## Getting started\n\nStart by adding `docz` as a dependency to your project with Yarn or npm:\n\n```bash\n$ yarn add docz # react react-dom\n\n# or\n\n$ npm install docz # react react-dom\n```\n\n> **Note**: `react` and `react-dom` will not be installed automatically. You'll have to install them yourself.\n\nThen, create `.mdx` files anywhere in your project:\n\n```mdx\n---\nname: Button\nroute: /\n---\n\nimport { Playground, Props } from 'docz'\nimport Button from './Button'\n\n# Button\n\n<Props of={Button} />\n\n## Basic usage\n\n<Playground>\n  <Button type=\"submit\">Click me</Button>\n  <Button>No, click me</Button>\n</Playground>\n```\n\nAnd a Button component `Button.jsx`:\n\n```typescript\nimport React from 'react'\nimport t from 'prop-types'\n\nconst Button = ({ children, type }) => <button type={type}>{children}</button>\n\nButton.propTypes = {\n  /**\n   * This is a description for this prop.\n   * Button type.\n   */\n  type: t.oneOf(['button', 'submit', 'reset']),\n}\nButton.defaultProps = {\n  type: 'button',\n}\nexport default Button\n```\n\nFinally, run:\n\n```bash\nyarn docz dev\n```\n\nThis starts a local development server and opens your documentation site in the browser.\n\n## Build\n\n`yarn docz build` generates a static site in `.docz/dist/`.\n\nTry it with `yarn docz serve` or by serving the generated site with your favorite static file server (e.g. `npx serve .docz/dist`).\n\nYou can have `yarn docz build` emit to a different directory by providing a path to the `dest` field in your `doczrc.js` or from the command line: `yarn docz build --dest docs-site-directory`.\n\n## Deploying\n\nThe output of docz consists of static assets only.\nThis allows you to deploy your generated `docz` site with any static site hosting provider you'd like.\n\nStart by building your site with `yarn docz build`, if you haven't provided a `dest` flag to your config then you will find your generated files in `.docz/dist` to copy to the server.\n\n## Examples\n\n- **[with basic](https://github.com/doczjs/docz/tree/main/examples/basic)**\n- **[with a gatsby site](https://github.com/doczjs/docz/tree/main/examples/gatsby)**\n- **[with react native](https://github.com/doczjs/docz/tree/main/examples/react-native)**\n- **[with styled-components](https://github.com/doczjs/docz/tree/main/examples/styled-components)**\n- **[with typescript](https://github.com/doczjs/docz/tree/main/examples/typescript)**\n- **[with algolia search](https://github.com/doczjs/docz/tree/main/examples/with-algolia-search)**\n- **[with gatsby-remark-vscode](https://github.com/doczjs/docz/tree/main/examples/with-gatsby-remark-vscode)**\n- **[with react-router](https://github.com/doczjs/docz/tree/main/examples/react-router)**\n- **[with flow](https://github.com/doczjs/docz/tree/main/examples/flow)**\n- **[with images](https://github.com/doczjs/docz/tree/main/examples/images)**\n- **[with sass](https://github.com/doczjs/docz/tree/main/examples/sass)**\n- **[with less](https://github.com/doczjs/docz/tree/main/examples/less)**\n- **[with stylus](https://github.com/doczjs/docz/tree/main/examples/css-stylus)**\n- **with css modules**: works out of the box.\n\n### You can check the complete list of docz examples [here](https://github.com/doczjs/docz/tree/main/examples).\n\n## Used by\n\n- **[Welcome UI](https://welcome-ui.com/)**: Customizable design system with react • styled-components • styled-system and reakit.\n- **[React Hooks Testing Library](https://react-hooks-testing-library.com/)**: 🐏 Simple and complete React hooks testing utilities that encourage good testing practices.\n- **[Mobx React](https://mobx-react.js.org/)**: mobx-react documentation site.\n- **[React Google Charts](https://react-google-charts.com/)**: A thin, typed, React wrapper over Google Charts Visualization and Charts API.\n- **[Entur](https://developer.entur.org/)**: Entur operates the national registry for all public transport in Norway.\n- **[FAB Specification](https://fab.dev/)**: 💎 FABs are a compile target for frontend applications.\n- **[@umijs/hooks](https://hooks.umijs.org/)**: React Hooks Library.\n- **[React Yandex Maps](https://react-yandex-maps.now.sh/)**: Yandex Maps API bindings for React.\n- **[Components-extra](https://components-extra.netlify.com)**: Customizable react component blocks built with material-ui and styled-components.\n- **[Add your site](https://github.com/doczjs/docz/edit/main/README.md)**\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\n<a href=\"https://github.com/doczjs/docz/graphs/contributors\"><img src=\"https://opencollective.com/docz/contributors.svg?width=890&button=false\" /></a>\n\n## Contributing\n\nAll kinds of contributions are very welcome and appreciated!\n\nIf you want to contribute time to docz then here's a list of suggestions to get you started:\n\n1. Star the project on GitHub.\n2. Help people in the [issues](https://github.com/doczjs/docz/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) by sharing your knowledge and experience.\n3. Find and report issues.\n4. Submit pull requests to help solve issues or add features.\n5. Influence the future of docz with feature requests.\n\nIf you're looking for a place to start make sure to check issues tagged with the `good first issue` label:\n\n[![Good First Issue](https://img.shields.io/github/issues/doczjs/docz/good%20first%20issue.svg)](https://github.com/doczjs/docz/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)\n\nRead the [Contributing Guide](/CONTRIBUTING.md) before you open a pull request.\n\nYou can also sponsor us via OpenCollective to help secure docz's future.\n\n<p align=\"center\">\n  <a href=\"https://opencollective.com/docz\" target=\"_blank\">\n    <img src=\"https://cdn-std.dprcdn.net/files/acc_649651/Q5nVhT\" height=\"80\" alt=\"Open Collective\">\n  </a>\n</p>\n"
  },
  {
    "path": "core/docz/.babelrc",
    "content": "{\n  \"plugins\": [\"@babel/plugin-syntax-dynamic-import\", \"lodash\"]\n}\n"
  },
  {
    "path": "core/docz/.eslintignore",
    "content": "dist\n"
  },
  {
    "path": "core/docz/.eslintrc.js",
    "content": "module.exports = {\n  extends: 'docz-ts',\n}\n"
  },
  {
    "path": "core/docz/.lintstagedrc",
    "content": "{\n  \"*.{ts,tsx}\": [\"yarn fix\", \"git add\"]\n}\n"
  },
  {
    "path": "core/docz/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n## [2.3.2-alpha.0](https://github.com/doczjs/docz/compare/v2.3.1...v2.3.2-alpha.0) (2020-04-07)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n## [2.3.1](https://github.com/doczjs/docz/compare/v2.3.1-alpha.0...v2.3.1) (2020-04-05)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n## [2.3.1-alpha.0](https://github.com/doczjs/docz/compare/v2.3.0...v2.3.1-alpha.0) (2020-04-05)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0](https://github.com/doczjs/docz/compare/v2.3.0-alpha.14...v2.3.0) (2020-04-02)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.14](https://github.com/doczjs/docz/compare/v2.3.0-alpha.13...v2.3.0-alpha.14) (2020-03-31)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.13](https://github.com/doczjs/docz/compare/v2.3.0-alpha.12...v2.3.0-alpha.13) (2020-02-13)\n\n\n### Bug Fixes\n\n* **docz:** pass useScoping to theme Playground ([6ec7315](https://github.com/doczjs/docz/commit/6ec7315)), closes [#1390](https://github.com/doczjs/docz/issues/1390)\n\n\n\n\n\n# [2.3.0-alpha.12](https://github.com/doczjs/docz/compare/v2.3.0-alpha.11...v2.3.0-alpha.12) (2020-02-12)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.11](https://github.com/doczjs/docz/compare/v2.3.0-alpha.10...v2.3.0-alpha.11) (2020-02-07)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.10](https://github.com/doczjs/docz/compare/v2.3.0-alpha.9...v2.3.0-alpha.10) (2020-02-06)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.9](https://github.com/doczjs/docz/compare/v2.3.0-alpha.8...v2.3.0-alpha.9) (2020-02-06)\n\n\n### Bug Fixes\n\n* **docz:** fix capitalization of ts interfaces ([9e950eb](https://github.com/doczjs/docz/commit/9e950eb))\n\n\n\n\n\n# [2.3.0-alpha.8](https://github.com/doczjs/docz/compare/v2.3.0-alpha.7...v2.3.0-alpha.8) (2020-02-06)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.7](https://github.com/doczjs/docz/compare/v2.3.0-alpha.6...v2.3.0-alpha.7) (2020-02-04)\n\n\n### Features\n\n* add hook to find docgen props ([#1371](https://github.com/doczjs/docz/issues/1371)) ([8fffa26](https://github.com/doczjs/docz/commit/8fffa26))\n\n\n\n\n\n# [2.3.0-alpha.6](https://github.com/doczjs/docz/compare/v2.3.0-alpha.5...v2.3.0-alpha.6) (2020-01-02)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.5](https://github.com/doczjs/docz/compare/v2.3.0-alpha.4...v2.3.0-alpha.5) (2019-12-17)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.4](https://github.com/doczjs/docz/compare/v2.3.0-alpha.3...v2.3.0-alpha.4) (2019-12-16)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.3](https://github.com/doczjs/docz/compare/v2.3.0-alpha.2...v2.3.0-alpha.3) (2019-12-16)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.2](https://github.com/doczjs/docz/compare/v2.3.0-alpha.1...v2.3.0-alpha.2) (2019-12-14)\n\n\n### Features\n\n* **docz-core:** support kebab & pascal case component file name pattern ([#1314](https://github.com/doczjs/docz/issues/1314)) ([9d5b129](https://github.com/doczjs/docz/commit/9d5b129))\n\n\n\n\n\n# [2.3.0-alpha.1](https://github.com/doczjs/docz/compare/v2.3.0-alpha.0...v2.3.0-alpha.1) (2019-12-13)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.3.0-alpha.0](https://github.com/doczjs/docz/compare/v2.2.1-alpha.1...v2.3.0-alpha.0) (2019-12-12)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n## [2.2.1-alpha.1](https://github.com/doczjs/docz/compare/v2.2.1-alpha.0...v2.2.1-alpha.1) (2019-12-12)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n## [2.2.1-alpha.0](https://github.com/doczjs/docz/compare/v2.2.0...v2.2.1-alpha.0) (2019-12-11)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.2.0](https://github.com/doczjs/docz/compare/v2.2.0-alpha.8...v2.2.0) (2019-12-11)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.2.0-alpha.8](https://github.com/doczjs/docz/compare/v2.2.0-alpha.7...v2.2.0-alpha.8) (2019-12-06)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.2.0-alpha.7](https://github.com/doczjs/docz/compare/v2.2.0-alpha.6...v2.2.0-alpha.7) (2019-12-03)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.2.0-alpha.6](https://github.com/doczjs/docz/compare/v2.2.0-alpha.5...v2.2.0-alpha.6) (2019-12-03)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.2.0-alpha.5](https://github.com/doczjs/docz/compare/v2.2.0-alpha.4...v2.2.0-alpha.5) (2019-12-01)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.2.0-alpha.4](https://github.com/doczjs/docz/compare/v2.2.0-alpha.3...v2.2.0-alpha.4) (2019-11-30)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.2.0-alpha.3](https://github.com/doczjs/docz/compare/v2.2.0-alpha.2...v2.2.0-alpha.3) (2019-11-29)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.2.0-alpha.2](https://github.com/doczjs/docz/compare/v2.2.0-alpha.1...v2.2.0-alpha.2) (2019-11-29)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.2.0-alpha.1](https://github.com/doczjs/docz/compare/v2.2.0-alpha.0...v2.2.0-alpha.1) (2019-11-28)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.2.0-alpha.0](https://github.com/doczjs/docz/compare/v2.1.1...v2.2.0-alpha.0) (2019-11-28)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n## [2.1.1](https://github.com/doczjs/docz/compare/v2.1.0...v2.1.1) (2019-11-27)\n\n**Note:** Version bump only for package docz\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n\n### Bug Fixes\n\n* **docz:** remove lowercasing of enum ts prop type ([8f7b949](https://github.com/doczjs/docz/commit/8f7b949))\n\n\n### Features\n\n* **docz:** spread remaining props to Props component ([#1276](https://github.com/doczjs/docz/issues/1276)) ([531244f](https://github.com/doczjs/docz/commit/531244f))\n\n\n\n\n\n\n\n\n\n\n\n* **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n* **docz-core:** remove installation step in .docz 🎉 ([4d01ead](https://github.com/pedronauck/docz/commit/4d01ead))\n\n\n\n\n\n# [2.0.0-rc.33](https://github.com/pedronauck/docz/compare/v2.0.0-rc.32...v2.0.0-rc.33) (2019-09-04)\n\n\n### Features\n\n* **docz-core:** remove installation step in .docz 🎉 ([6790179](https://github.com/pedronauck/docz/commit/6790179))\n\n\n\n\n\n# [2.0.0-rc.32](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.32) (2019-09-04)\n\n### Bug Fixes\n\n- **docz:** add @emotion/core dependency ([52126df](https://github.com/pedronauck/docz/commit/52126df))\n- **docz:** better default playground component ([80b1c66](https://github.com/pedronauck/docz/commit/80b1c66))\n- **docz:** bump docz-core version ([c56e0c6](https://github.com/pedronauck/docz/commit/c56e0c6))\n- **docz:** initialize components context with defaultComponents ([a808795](https://github.com/pedronauck/docz/commit/a808795))\n- **docz:** use playground from docz-components ([52874c4](https://github.com/pedronauck/docz/commit/52874c4))\n- **docz-components:** fix syntax highlighting in Playground ([c72c575](https://github.com/pedronauck/docz/commit/c72c575))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n\n### Features\n\n- **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n\n# [2.0.0-rc.31](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.31) (2019-09-03)\n\n### Bug Fixes\n\n- **docz:** add @emotion/core dependency ([52126df](https://github.com/pedronauck/docz/commit/52126df))\n- **docz:** better default playground component ([80b1c66](https://github.com/pedronauck/docz/commit/80b1c66))\n- **docz:** bump docz-core version ([c56e0c6](https://github.com/pedronauck/docz/commit/c56e0c6))\n- **docz:** initialize components context with defaultComponents ([a808795](https://github.com/pedronauck/docz/commit/a808795))\n- **docz:** use playground from docz-components ([52874c4](https://github.com/pedronauck/docz/commit/52874c4))\n- **docz-components:** fix syntax highlighting in Playground ([c72c575](https://github.com/pedronauck/docz/commit/c72c575))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n\n### Features\n\n- **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n\n<<<<<<< HEAD\n\n# [2.0.0-rc.28](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.28) (2019-09-02)\n\n### Bug Fixes\n\n- **docz:** add @emotion/core dependency ([52126df](https://github.com/pedronauck/docz/commit/52126df))\n- **docz:** better default playground component ([80b1c66](https://github.com/pedronauck/docz/commit/80b1c66))\n- **docz:** bump docz-core version ([c56e0c6](https://github.com/pedronauck/docz/commit/c56e0c6))\n- **docz:** initialize components context with defaultComponents ([a808795](https://github.com/pedronauck/docz/commit/a808795))\n- **docz:** use playground from docz-components ([52874c4](https://github.com/pedronauck/docz/commit/52874c4))\n- **docz-components:** fix syntax highlighting in Playground ([c72c575](https://github.com/pedronauck/docz/commit/c72c575))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n\n### Features\n\n- **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n\n=======\n\n# [2.0.0-rc.29](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.29) (2019-09-03)\n\n### Bug Fixes\n\n- **docz:** add @emotion/core dependency ([52126df](https://github.com/pedronauck/docz/commit/52126df))\n- **docz:** better default playground component ([80b1c66](https://github.com/pedronauck/docz/commit/80b1c66))\n- **docz:** bump docz-core version ([c56e0c6](https://github.com/pedronauck/docz/commit/c56e0c6))\n- **docz:** initialize components context with defaultComponents ([a808795](https://github.com/pedronauck/docz/commit/a808795))\n- **docz:** use playground from docz-components ([52874c4](https://github.com/pedronauck/docz/commit/52874c4))\n- **docz-components:** fix syntax highlighting in Playground ([c72c575](https://github.com/pedronauck/docz/commit/c72c575))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n\n### Features\n\n- **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n\n# [2.0.0-rc.28](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.28) (2019-09-03)\n\n> > > > > > > v2.0.0-rc.29\n\n### Bug Fixes\n\n- **docz:** add @emotion/core dependency ([52126df](https://github.com/pedronauck/docz/commit/52126df))\n- **docz:** better default playground component ([80b1c66](https://github.com/pedronauck/docz/commit/80b1c66))\n- **docz:** bump docz-core version ([c56e0c6](https://github.com/pedronauck/docz/commit/c56e0c6))\n- **docz:** initialize components context with defaultComponents ([a808795](https://github.com/pedronauck/docz/commit/a808795))\n- **docz:** use playground from docz-components ([52874c4](https://github.com/pedronauck/docz/commit/52874c4))\n- **docz-components:** fix syntax highlighting in Playground ([c72c575](https://github.com/pedronauck/docz/commit/c72c575))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n\n### Features\n\n- **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n\n# [2.0.0-rc.27](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.27) (2019-09-02)\n\n### Bug Fixes\n\n- **docz:** add @emotion/core dependency ([52126df](https://github.com/pedronauck/docz/commit/52126df))\n- **docz:** better default playground component ([80b1c66](https://github.com/pedronauck/docz/commit/80b1c66))\n- **docz:** bump docz-core version ([c56e0c6](https://github.com/pedronauck/docz/commit/c56e0c6))\n- **docz:** initialize components context with defaultComponents ([a808795](https://github.com/pedronauck/docz/commit/a808795))\n- **docz:** use playground from docz-components ([52874c4](https://github.com/pedronauck/docz/commit/52874c4))\n- **docz-components:** fix syntax highlighting in Playground ([c72c575](https://github.com/pedronauck/docz/commit/c72c575))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n\n### Features\n\n- **docz-component:** initialize ([73fafd1](https://github.com/pedronauck/docz/commit/73fafd1))\n\n# [2.0.0-rc.9](https://github.com/pedronauck/docz/compare/v2.0.0-rc.7...v2.0.0-rc.9) (2019-08-30)\n\n### Bug Fixes\n\n- **docz:** better default playground component ([f90d7a9](https://github.com/pedronauck/docz/commit/f90d7a9))\n- **docz:** bump docz-core version ([f60fce8](https://github.com/pedronauck/docz/commit/f60fce8))\n\n# [2.0.0-rc.7](https://github.com/pedronauck/docz/compare/v2.0.0-rc.6...v2.0.0-rc.7) (2019-08-29)\n\n### Bug Fixes\n\n- **docz:** initialize components context with defaultComponents ([ceaafea](https://github.com/pedronauck/docz/commit/ceaafea))\n\n# [2.0.0-rc.6](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.6) (2019-08-29)\n\n**Note:** Version bump only for package docz\n\n# [2.0.0-rc.2](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2019-08-28)\n\n### Bug Fixes\n\n- **docz:** make scheduler dependency explicit ([84918d8](https://github.com/pedronauck/docz/commit/84918d8))\n- **docz:** remove window check from useCurrentDoc fixes [#985](https://github.com/pedronauck/docz/issues/985) ([#1023](https://github.com/pedronauck/docz/issues/1023)) ([b90ea82](https://github.com/pedronauck/docz/commit/b90ea82))\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n### Bug Fixes\n\n- bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n- **docz:** component Props false positives when looking in state ([baa9bb3](https://github.com/pedronauck/docz/commit/baa9bb3))\n- **docz:** parse description of props ([0672c3e](https://github.com/pedronauck/docz/commit/0672c3e))\n- **docz:** props markdown compiler ([99ba83c](https://github.com/pedronauck/docz/commit/99ba83c))\n- eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n- packages rollup config ([534d7bf](https://github.com/pedronauck/docz/commit/534d7bf))\n- remove react & react-dom from dependencies [#924](https://github.com/pedronauck/docz/issues/924) ([faf4288](https://github.com/pedronauck/docz/commit/faf4288))\n\n### Features\n\n- a lot of improvements ([64f75da](https://github.com/pedronauck/docz/commit/64f75da))\n- add markdown parsing on props description ([1087539](https://github.com/pedronauck/docz/commit/1087539))\n- **gatsby-theme-docz:** add new Props component ([8eb780d](https://github.com/pedronauck/docz/commit/8eb780d))\n- add main package improvements ([8c8005d](https://github.com/pedronauck/docz/commit/8c8005d))\n- add new theme sidebar ([a01d100](https://github.com/pedronauck/docz/commit/a01d100))\n- add typescript support (need fix) ([13947f9](https://github.com/pedronauck/docz/commit/13947f9))\n- docz running using gatsby under the hood ([10ffd48](https://github.com/pedronauck/docz/commit/10ffd48))\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n**Note:** Version bump only for package docz\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n### Bug Fixes\n\n- correct props loading ([#836](https://github.com/pedronauck/docz/issues/836)) ([ed85f14](https://github.com/pedronauck/docz/commit/ed85f14))\n- **docz:** non latin menu headings ([#840](https://github.com/pedronauck/docz/issues/840)) ([80b186c](https://github.com/pedronauck/docz/commit/80b186c))\n- **docz-core:** prevent watch in production ([d673262](https://github.com/pedronauck/docz/commit/d673262))\n\n### Features\n\n- **docz-core:** extended path configuration for docgen ([#846](https://github.com/pedronauck/docz/issues/846)) ([aa96739](https://github.com/pedronauck/docz/commit/aa96739))\n- **docz-theme-default:** add options to the props component ([#823](https://github.com/pedronauck/docz/issues/823)) ([9edaac8](https://github.com/pedronauck/docz/commit/9edaac8))\n\n## [1.0.4](https://github.com/pedronauck/docz/compare/v1.0.3...v1.0.4) (2019-04-18)\n\n### Bug Fixes\n\n- **docz-rollup:** fixed rollup configs to be Windows tolerant ([#812](https://github.com/pedronauck/docz/issues/812)) ([10f6bfd](https://github.com/pedronauck/docz/commit/10f6bfd))\n- **docz-theme-default:** logo link point to dynamic base ([#815](https://github.com/pedronauck/docz/issues/815)) ([f7cc750](https://github.com/pedronauck/docz/commit/f7cc750))\n\n## [1.0.3](https://github.com/pedronauck/docz/compare/v1.0.2...v1.0.3) (2019-04-15)\n\n### Bug Fixes\n\n- **docz:** props parser for build ([31612e7](https://github.com/pedronauck/docz/commit/31612e7))\n\n## [1.0.2](https://github.com/pedronauck/docz/compare/v1.0.1...v1.0.2) (2019-04-15)\n\n### Bug Fixes\n\n- window check ([cfbda29](https://github.com/pedronauck/docz/commit/cfbda29))\n\n## [1.0.1](https://github.com/pedronauck/docz/compare/v1.0.0...v1.0.1) (2019-04-14)\n\n**Note:** Version bump only for package docz\n\n# [1.0.0](https://github.com/pedronauck/docz/compare/v1.0.0-rc.8...v1.0.0) (2019-04-11)\n\n### Bug Fixes\n\n- **docz:** crash using suspense ([315f7ad](https://github.com/pedronauck/docz/commit/315f7ad))\n- **docz-core:** typescript doesn't work with several exports ([#771](https://github.com/pedronauck/docz/issues/771)) ([c96878d](https://github.com/pedronauck/docz/commit/c96878d))\n\n# [1.0.0-rc.4](https://github.com/pedronauck/docz/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2019-03-29)\n\n### Bug Fixes\n\n- remove modularized lodash packages ([d81c568](https://github.com/pedronauck/docz/commit/d81c568))\n- **docz:** incompatible props on Link ([281cb13](https://github.com/pedronauck/docz/commit/281cb13))\n- **docz-core:** base prop for router ([9ca39d7](https://github.com/pedronauck/docz/commit/9ca39d7))\n\n# [1.0.0-rc.3](https://github.com/pedronauck/docz/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2019-03-21)\n\n**Note:** Version bump only for package docz\n\n# [1.0.0-beta.0](https://github.com/pedronauck/docz/compare/v1.0.0-alpha.1...v1.0.0-beta.0) (2019-03-19)\n\n**Note:** Version bump only for package docz\n\n# [1.0.0-alpha.0](https://github.com/pedronauck/docz/compare/v0.13.5...v1.0.0-alpha.0) (2019-03-19)\n\n### Bug Fixes\n\n- **docz:** remove null return on routes ([5bbbbb3](https://github.com/pedronauck/docz/commit/5bbbbb3))\n- gatsby theme fixes ([dcc5f19](https://github.com/pedronauck/docz/commit/dcc5f19))\n- **docz:** add window check to useWindowSize hook ([#669](https://github.com/pedronauck/docz/issues/669)) ([e4d7cb4](https://github.com/pedronauck/docz/commit/e4d7cb4))\n- **docz:** merge menus on useMenus ([af4afe2](https://github.com/pedronauck/docz/commit/af4afe2))\n- **docz:** merge new config for useConfig hook ([c63bbc8](https://github.com/pedronauck/docz/commit/c63bbc8))\n- **docz:** remove config conditional from hooks ([6b6f134](https://github.com/pedronauck/docz/commit/6b6f134))\n- a lot of bug fixes ([c10a8bd](https://github.com/pedronauck/docz/commit/c10a8bd))\n- prop types parser ([a3cc319](https://github.com/pedronauck/docz/commit/a3cc319))\n- scroll to anchor if url has hash ([389577f](https://github.com/pedronauck/docz/commit/389577f))\n- some general adjustments ([0c61f64](https://github.com/pedronauck/docz/commit/0c61f64))\n- use lodash merge instead of deepmerge ([18ac37b](https://github.com/pedronauck/docz/commit/18ac37b))\n- **docz:** optional opts for useMenus() ([571ffcd](https://github.com/pedronauck/docz/commit/571ffcd))\n- **docz:** remove deduplicated search results (thanks [@ivan-dalmet](https://github.com/ivan-dalmet)) ([1b456f7](https://github.com/pedronauck/docz/commit/1b456f7))\n- **docz:** sort menu and submenus alphabetically ([fbbd51c](https://github.com/pedronauck/docz/commit/fbbd51c))\n- **docz:** use @loadable/component instead of react-imported-component ([18f02f2](https://github.com/pedronauck/docz/commit/18f02f2))\n- **gatsby-theme-docz:** hot reload ([bf4e440](https://github.com/pedronauck/docz/commit/bf4e440))\n- use custom rollup config to build instead of libundler ([ee42a5a](https://github.com/pedronauck/docz/commit/ee42a5a))\n- wrapper property is ignored in <Playground> ([3cda0de](https://github.com/pedronauck/docz/commit/3cda0de))\n\n### Features\n\n- **docz:** add filter option for useMenus ([aeeb311](https://github.com/pedronauck/docz/commit/aeeb311))\n- **docz:** use getInitialProps instead of getInitialData ([d4406e0](https://github.com/pedronauck/docz/commit/d4406e0))\n- add playground component ([cde6511](https://github.com/pedronauck/docz/commit/cde6511))\n- new Props component ([80451b1](https://github.com/pedronauck/docz/commit/80451b1))\n- **docz-core:** remove ordering deprecated field ([39660bb](https://github.com/pedronauck/docz/commit/39660bb))\n- docgen refactoring ([#545](https://github.com/pedronauck/docz/issues/545)) ([85499a8](https://github.com/pedronauck/docz/commit/85499a8))\n- use @reach/router instead of react-router ([81a4a82](https://github.com/pedronauck/docz/commit/81a4a82))\n- **docz:** hooks migrations ([f57f987](https://github.com/pedronauck/docz/commit/f57f987))\n- **docz-theme-default:** use styled-components instead of emotion ([19047fd](https://github.com/pedronauck/docz/commit/19047fd))\n- add initial gatsby integration ([#630](https://github.com/pedronauck/docz/issues/630)) ([70d40cc](https://github.com/pedronauck/docz/commit/70d40cc)), closes [#609](https://github.com/pedronauck/docz/issues/609)\n- split router logic from theme ([a9c26e6](https://github.com/pedronauck/docz/commit/a9c26e6))\n\n### BREAKING CHANGES\n\n- <Playground> does not wrap the component anymore before\n  passing it to the renderer. Instead it passes the wrapper explicitly to\n  the renderer, making it the renderer's duty to apply the wrapper.\n\n## [0.13.6](https://github.com/pedronauck/docz/compare/v0.13.5...v0.13.6) (2018-12-26)\n\n**Note:** Version bump only for package docz\n\n## [0.13.5](https://github.com/pedronauck/docz/compare/v0.13.4...v0.13.5) (2018-12-19)\n\n**Note:** Version bump only for package docz\n\n## [0.13.4](https://github.com/pedronauck/docz/compare/v0.13.3...v0.13.4) (2018-12-17)\n\n**Note:** Version bump only for package docz\n\n## [0.13.3](https://github.com/pedronauck/docz/compare/v0.13.2...v0.13.3) (2018-12-17)\n\n**Note:** Version bump only for package docz\n\n## [0.13.2](https://github.com/pedronauck/docz/compare/v0.13.1...v0.13.2) (2018-12-17)\n\n**Note:** Version bump only for package docz\n\n## [0.13.1](https://github.com/pedronauck/docz/compare/v0.13.0...v0.13.1) (2018-12-17)\n\n**Note:** Version bump only for package docz\n\n# [0.13.0](https://github.com/pedronauck/docz/compare/v0.12.17...v0.13.0) (2018-12-17)\n\n### Bug Fixes\n\n- **docz:** ts warning ([19ccc09](https://github.com/pedronauck/docz/commit/19ccc09))\n- **docz-core:** use webpack-dev-server instead of webpack-serve ([4157e05](https://github.com/pedronauck/docz/commit/4157e05))\n\n### Features\n\n- **docz-theme-default:** set max lines before scroll editor ([#519](https://github.com/pedronauck/docz/issues/519)) ([698261b](https://github.com/pedronauck/docz/commit/698261b))\n\n## [0.12.17](https://github.com/pedronauck/docz/compare/v0.12.16...v0.12.17) (2018-12-14)\n\n### Bug Fixes\n\n- **docz:** cycled dependency ([5132195](https://github.com/pedronauck/docz/commit/5132195))\n\n## [0.12.16](https://github.com/pedronauck/docz/compare/v0.12.15...v0.12.16) (2018-12-13)\n\n**Note:** Version bump only for package docz\n\n## [0.12.15](https://github.com/pedronauck/docz/compare/v0.12.14...v0.12.15) (2018-12-04)\n\n**Note:** Version bump only for package docz\n\n## [0.12.14](https://github.com/pedronauck/docz/compare/v0.12.13...v0.12.14) (2018-12-04)\n\n### Features\n\n- **docz:** add preload async route ([f800c70](https://github.com/pedronauck/docz/commit/f800c70))\n\n## [0.12.13](https://github.com/pedronauck/docz/compare/v0.12.12...v0.12.13) (2018-11-23)\n\n### Bug Fixes\n\n- **docz:** resolve react warnings in ErrorReporter ([#465](https://github.com/pedronauck/docz/issues/465)) ([1b0e09d](https://github.com/pedronauck/docz/commit/1b0e09d))\n\n## [0.12.12](https://github.com/pedronauck/docz/compare/v0.12.11...v0.12.12) (2018-11-16)\n\n**Note:** Version bump only for package docz\n\n## [0.12.11](https://github.com/pedronauck/docz/compare/v0.12.10...v0.12.11) (2018-11-15)\n\n**Note:** Version bump only for package docz\n\n## [0.12.10](https://github.com/pedronauck/docz/compare/v0.12.9...v0.12.10) (2018-11-15)\n\n**Note:** Version bump only for package docz\n\n## [0.12.9](https://github.com/pedronauck/docz/compare/v0.12.8...v0.12.9) (2018-11-01)\n\n### Bug Fixes\n\n- **docz-theme-default:** use class inside playground ([cecbea1](https://github.com/pedronauck/docz/commit/cecbea1))\n\n## [0.12.8](https://github.com/pedronauck/docz/compare/v0.12.7...v0.12.8) (2018-10-31)\n\n### Bug Fixes\n\n- **docz:** update to new react imported component api ([759160e](https://github.com/pedronauck/docz/commit/759160e))\n\n## [0.12.7](https://github.com/pedronauck/docz/compare/v0.12.6...v0.12.7) (2018-10-30)\n\n**Note:** Version bump only for package docz\n\n## [0.12.6](https://github.com/pedronauck/docz/compare/v0.12.5...v0.12.6) (2018-10-30)\n\n### Bug Fixes\n\n- **docz:** conditionally description column on PropsTable ([#385](https://github.com/pedronauck/docz/issues/385)) ([829a3aa](https://github.com/pedronauck/docz/commit/829a3aa)), closes [#427](https://github.com/pedronauck/docz/issues/427) [#421](https://github.com/pedronauck/docz/issues/421)\n- **docz-theme-default:** text alignment in table thead ([#403](https://github.com/pedronauck/docz/issues/403)) ([475eb52](https://github.com/pedronauck/docz/commit/475eb52))\n\n### Features\n\n- **docz:** render [Empty String] on PropsTable ([#427](https://github.com/pedronauck/docz/issues/427)) ([10a3eda](https://github.com/pedronauck/docz/commit/10a3eda))\n- **docz:** render [Empty String] on PropsTable ([#427](https://github.com/pedronauck/docz/issues/427)) ([2a9db98](https://github.com/pedronauck/docz/commit/2a9db98))\n- **docz-theme-default:** add support to show/hide playground editor ([cacc6fb](https://github.com/pedronauck/docz/commit/cacc6fb))\n\n<a name=\"0.12.5\"></a>\n\n## [0.12.5](https://github.com/pedronauck/docz/compare/v0.12.4...v0.12.5) (2018-09-30)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.12.4\"></a>\n\n## [0.12.4](https://github.com/pedronauck/docz/compare/v0.12.3...v0.12.4) (2018-09-28)\n\n### Bug Fixes\n\n- **docz:** merge menus and submenus ([f8249da](https://github.com/pedronauck/docz/commit/f8249da))\n\n<a name=\"0.12.3\"></a>\n\n## [0.12.3](https://github.com/pedronauck/docz/compare/v0.12.2...v0.12.3) (2018-09-28)\n\n### Bug Fixes\n\n- **docz:** remove Children.only ([656d8f1](https://github.com/pedronauck/docz/commit/656d8f1))\n\n<a name=\"0.11.2\"></a>\n\n## [0.11.2](https://github.com/pedronauck/docz/compare/v0.11.1...v0.11.2) (2018-09-11)\n\n### Bug Fixes\n\n- **docz:** prevent crash when use imported props ([ef6de9d](https://github.com/pedronauck/docz/commit/ef6de9d))\n\n### Features\n\n- add native config for doczrc ([2580712](https://github.com/pedronauck/docz/commit/2580712))\n\n<a name=\"0.11.1\"></a>\n\n## [0.11.1](https://github.com/pedronauck/docz/compare/v0.11.0...v0.11.1) (2018-09-07)\n\n### Bug Fixes\n\n- **docz:** add react router inside the docz bundle ([a293aa4](https://github.com/pedronauck/docz/commit/a293aa4))\n- **docz-core:** basename configuration ([5fad743](https://github.com/pedronauck/docz/commit/5fad743))\n\n<a name=\"0.11.0\"></a>\n\n# [0.11.0](https://github.com/pedronauck/docz/compare/v0.10.3...v0.11.0) (2018-09-02)\n\n### Bug Fixes\n\n- base url and hash router making weird url ([f483638](https://github.com/pedronauck/docz/commit/f483638))\n\n<a name=\"0.10.3\"></a>\n\n## [0.10.3](https://github.com/pedronauck/docz/compare/v0.9.6...v0.10.3) (2018-08-16)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.10.2\"></a>\n\n## [0.10.2](https://github.com/pedronauck/docz/compare/v0.10.1...v0.10.2) (2018-08-13)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.10.1\"></a>\n\n## [0.10.1](https://github.com/pedronauck/docz/compare/v0.10.0...v0.10.1) (2018-08-13)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.10.0\"></a>\n\n# [0.10.0](https://github.com/pedronauck/docz/compare/v0.9.6...v0.10.0) (2018-08-13)\n\n### Bug Fixes\n\n- **docz:** add initial loading as true ([3f05536](https://github.com/pedronauck/docz/commit/3f05536))\n- **docz-core:** prevent crash on delete entry ([28e1728](https://github.com/pedronauck/docz/commit/28e1728))\n\n### Features\n\n- add github repository link ([78a19f6](https://github.com/pedronauck/docz/commit/78a19f6))\n- allow edit code inside playground ([#205](https://github.com/pedronauck/docz/issues/205)) ([4f948f7](https://github.com/pedronauck/docz/commit/4f948f7))\n\n<a name=\"0.9.6\"></a>\n\n## [0.9.6](https://github.com/pedronauck/docz/compare/v0.9.5...v0.9.6) (2018-08-06)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.9.5\"></a>\n\n## [0.9.5](https://github.com/pedronauck/docz/compare/v0.9.4...v0.9.5) (2018-08-04)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.9.4\"></a>\n\n## [0.9.4](https://github.com/pedronauck/docz/compare/v0.9.4-beta.1...v0.9.4) (2018-08-04)\n\n### Bug Fixes\n\n- remove external deps ([470bdd3](https://github.com/pedronauck/docz/commit/470bdd3))\n\n<a name=\"0.9.3\"></a>\n\n## [0.9.3](https://github.com/pedronauck/docz/compare/v0.9.2...v0.9.3) (2018-08-03)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.9.2\"></a>\n\n## [0.9.2](https://github.com/pedronauck/docz/compare/v0.9.1...v0.9.2) (2018-08-02)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.9.1\"></a>\n\n## [0.9.1](https://github.com/pedronauck/docz/compare/v0.9.0...v0.9.1) (2018-08-02)\n\n### Bug Fixes\n\n- **docz:** finish process after build ([58bebb6](https://github.com/pedronauck/docz/commit/58bebb6))\n\n<a name=\"0.9.0\"></a>\n\n# [0.9.0](https://github.com/pedronauck/docz/compare/v0.9.0-beta.1...v0.9.0) (2018-08-02)\n\n### Bug Fixes\n\n- **docz:** transform and merge theme config ([999ab73](https://github.com/pedronauck/docz/commit/999ab73))\n- **docz:** using context for imports to prevent disposed hmr ([b37284c](https://github.com/pedronauck/docz/commit/b37284c))\n\n<a name=\"0.9.0-beta.1\"></a>\n\n# [0.9.0-beta.1](https://github.com/pedronauck/docz/compare/v0.9.0-beta.0...v0.9.0-beta.1) (2018-08-01)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.9.0-beta.0\"></a>\n\n# [0.9.0-beta.0](https://github.com/pedronauck/docz/compare/v0.8.0...v0.9.0-beta.0) (2018-08-01)\n\n### Bug Fixes\n\n- **docz:** add playground wrapper just around children ([66abfe8](https://github.com/pedronauck/docz/commit/66abfe8))\n\n### Features\n\n- **docz-core:** support env files to set configuration ([#171](https://github.com/pedronauck/docz/issues/171)) ([259b72d](https://github.com/pedronauck/docz/commit/259b72d)), closes [#140](https://github.com/pedronauck/docz/issues/140)\n\n<a name=\"0.8.0\"></a>\n\n# [0.8.0](https://github.com/pedronauck/docz/compare/v0.7.1...v0.8.0) (2018-07-28)\n\n### Bug Fixes\n\n- **docz:** humanize array type of flow (fix [#167](https://github.com/pedronauck/docz/issues/167)) ([18798bc](https://github.com/pedronauck/docz/commit/18798bc))\n\n<a name=\"0.7.1\"></a>\n\n## [0.7.1](https://github.com/pedronauck/docz/compare/v0.7.0...v0.7.1) (2018-07-24)\n\n### Bug Fixes\n\n- **docz:** add wrapper prop on Playground ([566aaf8](https://github.com/pedronauck/docz/commit/566aaf8))\n- **docz:** sort algorithm off docs and menus ([dad83ce](https://github.com/pedronauck/docz/commit/dad83ce))\n\n<a name=\"0.7.0\"></a>\n\n# [0.7.0](https://github.com/pedronauck/docz/compare/v0.6.2...v0.7.0) (2018-07-23)\n\n### Bug Fixes\n\n- **docz:** humanize prop types on PropTable ([c1f4c6f](https://github.com/pedronauck/docz/commit/c1f4c6f))\n\n### Features\n\n- **docz:** add rawCode for Playground ([70d4735](https://github.com/pedronauck/docz/commit/70d4735))\n- **docz-theme-default:** add resize bar for fullscreen playground ([392009f](https://github.com/pedronauck/docz/commit/392009f))\n\n<a name=\"0.6.2\"></a>\n\n## [0.6.2](https://github.com/pedronauck/docz/compare/v0.6.1...v0.6.2) (2018-07-20)\n\n### Bug Fixes\n\n- **docz-core:** set env vars for commands ([29f0098](https://github.com/pedronauck/docz/commit/29f0098))\n\n<a name=\"0.6.1\"></a>\n\n## [0.6.1](https://github.com/pedronauck/docz/compare/v0.6.0...v0.6.1) (2018-07-19)\n\n### Bug Fixes\n\n- **docz:** default DocPreview components ([ff7cf32](https://github.com/pedronauck/docz/commit/ff7cf32))\n\n<a name=\"0.6.0\"></a>\n\n# [0.6.0](https://github.com/pedronauck/docz/compare/v0.5.9...v0.6.0) (2018-07-19)\n\n### Bug Fixes\n\n- **docz:** prevent default components object with no render ([4535aef](https://github.com/pedronauck/docz/commit/4535aef))\n\n<a name=\"0.5.9\"></a>\n\n## [0.5.9](https://github.com/pedronauck/docz/compare/v0.5.8...v0.5.9) (2018-07-16)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.5.8\"></a>\n\n## [0.5.8](https://github.com/pedronauck/docz/compare/v0.5.7...v0.5.8) (2018-07-11)\n\n### Bug Fixes\n\n- **docz-theme-default:** config transform function ([fdb3118](https://github.com/pedronauck/docz/commit/fdb3118))\n\n<a name=\"0.5.7\"></a>\n\n## [0.5.7](https://github.com/pedronauck/docz/compare/v0.5.6...v0.5.7) (2018-07-11)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.5.6\"></a>\n\n## [0.5.6](https://github.com/pedronauck/docz/compare/v0.5.5...v0.5.6) (2018-07-11)\n\n### Bug Fixes\n\n- **docz:** add theme config transform before merge ([dc3448a](https://github.com/pedronauck/docz/commit/dc3448a))\n\n### Features\n\n- **docz:** add classname and style props for Playground ([1b64ed3](https://github.com/pedronauck/docz/commit/1b64ed3))\n\n<a name=\"0.5.5\"></a>\n\n## [0.5.5](https://github.com/pedronauck/docz/compare/v0.5.4...v0.5.5) (2018-07-07)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.5.4\"></a>\n\n## [0.5.4](https://github.com/pedronauck/docz/compare/v0.5.3...v0.5.4) (2018-07-07)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.5.3\"></a>\n\n## [0.5.3](https://github.com/pedronauck/docz/compare/v0.5.2...v0.5.3) (2018-07-05)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.5.2\"></a>\n\n## [0.5.2](https://github.com/pedronauck/docz/compare/v0.5.1...v0.5.2) (2018-07-05)\n\n### Bug Fixes\n\n- props table css class ([#116](https://github.com/pedronauck/docz/issues/116)) ([065473c](https://github.com/pedronauck/docz/commit/065473c))\n\n<a name=\"0.5.1\"></a>\n\n## [0.5.1](https://github.com/pedronauck/docz/compare/v0.3.4...v0.5.1) (2018-07-03)\n\n### Features\n\n- **docz-core:** add ordering property for config ([efd215e](https://github.com/pedronauck/docz/commit/efd215e))\n- **docz-theme-default:** add automatic table of content ([#106](https://github.com/pedronauck/docz/issues/106)) ([6ce9e84](https://github.com/pedronauck/docz/commit/6ce9e84))\n- **docz-theme-default:** add sidebar search ([7886e75](https://github.com/pedronauck/docz/commit/7886e75))\n\n<a name=\"0.5.0\"></a>\n\n# [0.5.0](https://github.com/pedronauck/docz/compare/v0.3.4...v0.5.0) (2018-07-03)\n\n### Features\n\n- **docz-core:** add ordering property for config ([a6c307d](https://github.com/pedronauck/docz/commit/a6c307d))\n- **docz-theme-default:** add automatic table of content ([#106](https://github.com/pedronauck/docz/issues/106)) ([6ce9e84](https://github.com/pedronauck/docz/commit/6ce9e84))\n- **docz-theme-default:** add sidebar search ([8218dc1](https://github.com/pedronauck/docz/commit/8218dc1))\n\n<a name=\"0.4.0\"></a>\n\n# [0.4.0](https://github.com/pedronauck/docz/compare/v0.3.4...v0.4.0) (2018-06-30)\n\n### Features\n\n- **docz-theme-default:** add automatic table of content ([#106](https://github.com/pedronauck/docz/issues/106)) ([6ce9e84](https://github.com/pedronauck/docz/commit/6ce9e84))\n\n<a name=\"0.3.4\"></a>\n\n## [0.3.4](https://github.com/pedronauck/docz/compare/v0.3.3...v0.3.4) (2018-06-26)\n\n<a name=\"0.3.0\"></a>\n\n# [0.3.0](https://github.com/pedronauck/docz/compare/v0.3.0-beta.0...v0.3.0) (2018-06-25)\n\n<a name=\"0.3.0-beta.0\"></a>\n\n# [0.3.0-beta.0](https://github.com/pedronauck/docz/compare/v0.2.11...v0.3.0-beta.0) (2018-06-25)\n\n### Features\n\n- **docz-theme-default:** add dark mode 🌚 ([#81](https://github.com/pedronauck/docz/issues/81)) ([964cf4d](https://github.com/pedronauck/docz/commit/964cf4d))\n\n<a name=\"0.3.3\"></a>\n\n## [0.3.3](https://github.com/pedronauck/docz/compare/v0.3.2...v0.3.3) (2018-06-26)\n\n### Bug Fixes\n\n- **docz-core:** copy templates files for dist ([#88](https://github.com/pedronauck/docz/issues/88)) ([5e4b98d](https://github.com/pedronauck/docz/commit/5e4b98d))\n\n<a name=\"0.3.2\"></a>\n\n## [0.3.2](https://github.com/pedronauck/docz/compare/v0.3.1...v0.3.2) (2018-06-25)\n\n### Bug Fixes\n\n- **docz:** mdxtag import ([4ed20bf](https://github.com/pedronauck/docz/commit/4ed20bf))\n\n<a name=\"0.3.1\"></a>\n\n## [0.3.1](https://github.com/pedronauck/docz/compare/v0.2.11...v0.3.1) (2018-06-25)\n\n### Bug Fixes\n\n- **docz:** mdx provider import ([ded8cbb](https://github.com/pedronauck/docz/commit/ded8cbb))\n- use docz-theme-default as docz-core dependency ([1a2fb67](https://github.com/pedronauck/docz/commit/1a2fb67))\n\n### Features\n\n- **docz-default-theme:** dark mode and responsiveness ([#87](https://github.com/pedronauck/docz/issues/87)) ([a4db115](https://github.com/pedronauck/docz/commit/a4db115)), closes [#81](https://github.com/pedronauck/docz/issues/81)\n\n<a name=\"0.3.0\"></a>\n\n# [0.3.0](https://github.com/pedronauck/docz/compare/v0.3.0-beta.0...v0.3.0) (2018-06-25)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.3.0-beta.0\"></a>\n\n# [0.3.0-beta.0](https://github.com/pedronauck/docz/compare/v0.2.11...v0.3.0-beta.0) (2018-06-25)\n\n### Features\n\n- **docz-theme-default:** add dark mode 🌚 ([#81](https://github.com/pedronauck/docz/issues/81)) ([964cf4d](https://github.com/pedronauck/docz/commit/964cf4d))\n\n<a name=\"0.2.11\"></a>\n\n## [0.2.11](https://github.com/pedronauck/docz/compare/v0.2.10...v0.2.11) (2018-06-22)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.2.10\"></a>\n\n## [0.2.10](https://github.com/pedronauck/docz/compare/v0.2.9...v0.2.10) (2018-06-21)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.2.9\"></a>\n\n## [0.2.9](https://github.com/pedronauck/docz/compare/v0.2.8...v0.2.9) (2018-06-21)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.2.8\"></a>\n\n## [0.2.8](https://github.com/pedronauck/docz/compare/v0.2.7...v0.2.8) (2018-06-21)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.2.7\"></a>\n\n## [0.2.7](https://github.com/pedronauck/docz/compare/v0.2.6...v0.2.7) (2018-06-20)\n\n### Bug Fixes\n\n- **docz:** typo ([#63](https://github.com/pedronauck/docz/issues/63)) ([6af5db2](https://github.com/pedronauck/docz/commit/6af5db2))\n\n<a name=\"0.2.6\"></a>\n\n## [0.2.6](https://github.com/pedronauck/docz/compare/v0.2.5...v0.2.6) (2018-06-17)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.2.5\"></a>\n\n## [0.2.5](https://github.com/pedronauck/docz/compare/v0.2.4...v0.2.5) (2018-06-15)\n\n### Bug Fixes\n\n- **docz:** add extractTypeDescribedValue to PropsTable ([#38](https://github.com/pedronauck/docz/issues/38)) ([cca862c](https://github.com/pedronauck/docz/commit/cca862c))\n- **docz:** PropsTable component ([48638cc](https://github.com/pedronauck/docz/commit/48638cc))\n\n<a name=\"0.2.4\"></a>\n\n## [0.2.4](https://github.com/pedronauck/docz/compare/v0.2.3...v0.2.4) (2018-06-13)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.2.3\"></a>\n\n## [0.2.3](https://github.com/pedronauck/docz/compare/v0.2.2...v0.2.3) (2018-06-13)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.2.2\"></a>\n\n## [0.2.2](https://github.com/pedronauck/docz/compare/v0.2.1...v0.2.2) (2018-06-12)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.2.1\"></a>\n\n## [0.2.1](https://github.com/pedronauck/docz/compare/v0.2.0...v0.2.1) (2018-06-12)\n\n### Bug Fixes\n\n- playground component destructuring bug ([#4](https://github.com/pedronauck/docz/issues/4)) ([f9026cf](https://github.com/pedronauck/docz/commit/f9026cf))\n\n<a name=\"0.2.0\"></a>\n\n# [0.2.0](https://github.com/pedronauck/docz/compare/v0.2.0-beta.2...v0.2.0) (2018-06-11)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.2.0-beta.2\"></a>\n\n# [0.2.0-beta.2](https://github.com/doczjs/docz/compare/v0.2.0-beta.1...v0.2.0-beta.2) (2018-06-10)\n\n### Bug Fixes\n\n- **docz-core:** autolink headings ([0b8369d](https://github.com/doczjs/docz/commit/0b8369d))\n\n<a name=\"0.2.0-beta.1\"></a>\n\n# [0.2.0-beta.1](https://github.com/doczjs/docz/compare/v0.2.0-beta.0...v0.2.0-beta.1) (2018-06-10)\n\n### Features\n\n- **docz-core:** add headings property for entries and autolink on headings ([7711c3c](https://github.com/doczjs/docz/commit/7711c3c))\n\n<a name=\"0.2.0-beta.0\"></a>\n\n# [0.2.0-beta.0](https://github.com/doczjs/docz/compare/v0.1.2-beta.6...v0.2.0-beta.0) (2018-06-10)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.1.2-beta.6\"></a>\n\n## [0.1.2-beta.6](https://github.com/doczjs/docz/compare/v0.1.2-beta.5...v0.1.2-beta.6) (2018-06-09)\n\n### Bug Fixes\n\n- **docz:** typing definition ([1a3648e](https://github.com/doczjs/docz/commit/1a3648e))\n\n<a name=\"0.1.2-beta.5\"></a>\n\n## [0.1.2-beta.5](https://github.com/doczjs/docz/compare/v0.1.2-beta.4...v0.1.2-beta.5) (2018-06-09)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.1.2-beta.4\"></a>\n\n## [0.1.2-beta.4](https://github.com/doczjs/docz/compare/v0.1.2-beta.3...v0.1.2-beta.4) (2018-06-09)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.1.2-beta.3\"></a>\n\n## [0.1.2-beta.3](https://github.com/doczjs/docz/compare/v0.1.2-beta.2...v0.1.2-beta.3) (2018-06-09)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.1.2-beta.2\"></a>\n\n## [0.1.2-beta.2](https://github.com/doczjs/docz/compare/v0.1.2-beta.1...v0.1.2-beta.2) (2018-06-09)\n\n### Features\n\n- **docz:** add support for custom not found route ([455dcca](https://github.com/doczjs/docz/commit/455dcca))\n\n<a name=\"0.1.2-beta.1\"></a>\n\n## [0.1.2-beta.1](https://github.com/doczjs/docz/compare/v0.1.2-beta.0...v0.1.2-beta.1) (2018-06-09)\n\n### Features\n\n- **docz:** add loading component setting for loadable ([4352ce3](https://github.com/doczjs/docz/commit/4352ce3))\n- **docz-core:** add base config argument ([20f29c2](https://github.com/doczjs/docz/commit/20f29c2))\n\n<a name=\"0.1.2-beta.0\"></a>\n\n## [0.1.2-beta.0](https://github.com/doczjs/docz/compare/v0.1.1...v0.1.2-beta.0) (2018-06-02)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.1.1-beta.6\"></a>\n\n## [0.1.1-beta.6](https://github.com/doczjs/docz/compare/v0.1.1-beta.5...v0.1.1-beta.6) (2018-06-01)\n\n### Bug Fixes\n\n- **docz:** add docz-theme-default as dependecy ([0dff6c0](https://github.com/doczjs/docz/commit/0dff6c0))\n\n<a name=\"0.1.1-beta.5\"></a>\n\n## [0.1.1-beta.5](https://github.com/doczjs/docz/compare/v0.1.1-beta.4...v0.1.1-beta.5) (2018-06-01)\n\n### Bug Fixes\n\n- **docz:** link component ([7626982](https://github.com/doczjs/docz/commit/7626982))\n\n<a name=\"0.1.1-beta.4\"></a>\n\n## [0.1.1-beta.4](https://github.com/doczjs/docz/compare/v0.1.1-beta.3...v0.1.1-beta.4) (2018-05-29)\n\n### Bug Fixes\n\n- **docz:** add isActive to Link components ([9cecc08](https://github.com/doczjs/docz/commit/9cecc08))\n\n<a name=\"0.1.1-beta.3\"></a>\n\n## [0.1.1-beta.3](https://github.com/doczjs/docz/compare/v0.1.1-beta.2...v0.1.1-beta.3) (2018-05-29)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.1.1-beta.2\"></a>\n\n## [0.1.1-beta.2](https://github.com/doczjs/docz/compare/v0.1.1-beta.0...v0.1.1-beta.2) (2018-05-29)\n\n### Bug Fixes\n\n- **docz:** set docz-core as dependency ([6c257e8](https://github.com/doczjs/docz/commit/6c257e8))\n\n<a name=\"0.1.1-beta.1\"></a>\n\n## [0.1.1-beta.1](https://github.com/doczjs/docz/compare/v0.1.1-beta.0...v0.1.1-beta.1) (2018-05-29)\n\n**Note:** Version bump only for package docz\n\n<a name=\"0.1.1-beta.0\"></a>\n\n## [0.1.1-beta.0](https://github.com/doczjs/docz/compare/v0.1.0...v0.1.1-beta.0) (2018-05-29)\n\n### Bug Fixes\n\n- **docz:** add bin folder for npm publish ([f463a98](https://github.com/doczjs/docz/commit/f463a98))\n\n<a name=\"0.1.0\"></a>\n\n# 0.1.0 (2018-05-29)\n\n### Bug Fixes\n\n- **docz:** Docs render props orders and types ([d7e9ee2](https://github.com/doczjs/docz/commit/d7e9ee2))\n- **docz:** docs categories for themes ([687720c](https://github.com/doczjs/docz/commit/687720c))\n- **docz:** flow props parser integration ([5a83610](https://github.com/doczjs/docz/commit/5a83610))\n- **docz:** validate route passed for docs.route() ([48a0484](https://github.com/doczjs/docz/commit/48a0484))\n- **docz-core:** entries rewrite ([986ba65](https://github.com/doczjs/docz/commit/986ba65))\n\n### Features\n\n- **docz:** add doc page wrapper as component ([1150373](https://github.com/doczjs/docz/commit/1150373))\n- **docz:** add groups feature ([9652b30](https://github.com/doczjs/docz/commit/9652b30))\n- **docz:** make server bundler api concise ([ae5f0c0](https://github.com/doczjs/docz/commit/ae5f0c0))\n- **docz-core:** add build command ([ef7abd2](https://github.com/doczjs/docz/commit/ef7abd2))\n- **docz-core:** add entry settings field ([2ec5d66](https://github.com/doczjs/docz/commit/2ec5d66))\n- **docz-core:** add playground code parse section ([6bbf158](https://github.com/doczjs/docz/commit/6bbf158))\n- **docz-core:** add title and description on settings ([ad9ee58](https://github.com/doczjs/docz/commit/ad9ee58))\n- **docz-core:** add typescript support ([17dae8b](https://github.com/doczjs/docz/commit/17dae8b))\n- **docz-core:** pass theme config via websockets for dev ([5222de7](https://github.com/doczjs/docz/commit/5222de7))\n- add component props parse feature ([987627d](https://github.com/doczjs/docz/commit/987627d))\n- improve docz theme to use theme config ([9207ed2](https://github.com/doczjs/docz/commit/9207ed2))\n- parse doc class to object ([e7f9cf0](https://github.com/doczjs/docz/commit/e7f9cf0))\n- refac to use mdx ([04b59e5](https://github.com/doczjs/docz/commit/04b59e5))\n- use custom render method on section ([8ccf99c](https://github.com/doczjs/docz/commit/8ccf99c))\n- **docz-core:** use websockets instead of generate json to process entries ([e0773a0](https://github.com/doczjs/docz/commit/e0773a0))\n- **docz-theme-default:** add logo option ([435da9b](https://github.com/doczjs/docz/commit/435da9b))\n- **docz-theme-default:** add tooltip on props ([dc3c4cd](https://github.com/doczjs/docz/commit/dc3c4cd))\n"
  },
  {
    "path": "core/docz/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) 2018 Pedro Nauck\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": "core/docz/README.md",
    "content": "<p align=\"center\" style=\"margin-bottom: -20px\">\n  <img src=\"https://cdn-std.dprcdn.net/files/acc_649651/BSPk3z\">\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/docz\" target=\"_blank\">\n    <img src=\"https://badgen.net/npm/v/docz\" alt=\"\">\n  </a>\n  <a href=\"LICENSE.md\" target=\"_blank\">\n    <img src=\"https://badgen.net/badge/license/MIT/blue\" alt=\"\">\n  </a>\n  <a href=\"https://www.npmjs.com/package/docz\" target=\"_blank\">\n    <img src=\"https://badgen.net/npm/dt/docz\" alt=\"\">\n  </a>\n  <a href=\"http://feedback.docz.site/roadmap\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/check-our%20roadmap-5362F5.svg\" alt=\"Chat\">\n  </a>\n</p>\n\nDocz makes it easy to write and publish beautiful interactive documentation for your code.\n\nCreate MDX files showcasing your code and Docz turns them into a live-reloading, production-ready site.\n\n![docz example](https://cdn-std.dprcdn.net/files/acc_649651/S2YCID)\n\n## Table of Contents\n\n\n- [Why ?](#why)\n- [Start a New Project](#start-a-new-project)\n- [Add Docz to an Existing Project](#add-docz-to-an-existing-project)\n- [Build](#build)\n- [Deploy](#deploy)\n- [Examples](#examples)\n- [More info on docz.site](#more-info-on-doczsite)\n- [Used by](#used-by)\n- [Contributors](#contributors)\n- [Contributing](#contributing)\n\n## Why ?\n\nDocumenting code is one of the most important and time-heavy processes when developing software.\n\nA lot of time is spent on building and maintaining custom documentation sites. \n\nDocz enables you to quickly create live-reloading, seo-friendly, production-ready documentation sites with MDX and customize the look, feel and behavior when required by leveraging [GatsbyJS](https://www.gatsbyjs.org) and [Gatsby theme shadowing](https://www.gatsbyjs.org/docs/themes/shadowing/).\n\n## Start a New Project\n\nUse [create-docz-app](https://www.npmjs.com/package/create-docz-app) to quickly get started :\n\n```sh\nnpx create-docz-app my-docz-app\n# or\nyarn create docz-app my-docz-app --example typescript\n```\n\n## Add Docz to an Existing Project\n\nStart by adding `docz` as a dependency :\n\n```bash\n$ yarn add docz@next # react react-dom\n\n# or\n\n$ npm install docz@next # react react-dom\n```\n\n> **Note**: `react` and `react-dom` will not be installed automatically. You'll have to install them yourself.\n\nThen, add `.mdx` files anywhere in your project:\n\n```mdx\n---\nname: Button\nroute: /\n---\n\nimport { Playground, Props } from 'docz'\nimport Button from './Button'\n\n# Button\n\n<Props of={Button} />\n\n## Basic usage\n\n<Playground>\n  <Button type=\"submit\">Click me</Button>\n  <Button>No, click me</Button>\n</Playground>\n```\n\nAnd a Button component `Button.jsx`:\n\n```typescript\nimport React from 'react'\nimport t from 'prop-types'\n\nconst Button = ({ children, type }) => <button type={type}>{children}</button>\n\nButton.propTypes = {\n  /**\n   * This is a description for this prop.\n   * Button type.\n   */\n  type: t.oneOf(['button', 'submit', 'reset']),\n}\nButton.defaultProps = {\n  type: 'button',\n}\nexport default Button\n```\n\nFinally, run:\n\n```bash\nyarn docz dev\n```\n\nThis will start a local development server and open your documentation site in the browser.\n\n## Build \n\n`yarn docz build` will generate a static site for your site in `.docz/dist/`.\n\nYou can try it out with `yarn docz serve` or by serving the generated site with your favorite static file server (e.g. `npx serve .docz/dist`). \n\nYou can have `yarn docz build` emit to a different directory by providing a path to the `dest` field in your doczrc.js or from the command line : `yarn docz build --dest docs-site-directory`. \n\n## Deploy\n\nThe output of docz consists of static assets only. This allows you to deploy your generated `docz` site with any static site hosting provider you'd like. \n\nStart by building your site with `yarn docz build`, if you haven't provided a `dest` flag to your config then you will find your generated files in `.docz/dist` to copy to the server.\n\n## Examples\n\n- **[basic](https://github.com/doczjs/docz/tree/master/examples/basic)** - Barebones example.\n- **[gatsby](https://github.com/doczjs/docz/tree/master/examples/gatsby)** - Example using Docz in a Gastby project.\n- **[react native](https://github.com/doczjs/docz/tree/master/examples/react-native)** - Using Docz in a React Native project.\n- **[styled-components](https://github.com/doczjs/docz/tree/master/examples/styled-components)** - Using Docz with `styled-components`.\n- **[with typescript](https://github.com/doczjs/docz/tree/master/examples/typescript)** - Using Docz with Typescript.\n- **[with flow](https://github.com/doczjs/docz/tree/master/examples/flow)** - Using Docz with Flow.\n- **[with images](https://github.com/doczjs/docz/tree/master/examples/images)** - Using Docz with images in mdx and jsx.\n\n- **[with sass](https://github.com/doczjs/docz/tree/master/examples/sass)** - Using Docz parsing CSS with SASS.\n- **[with less](https://github.com/doczjs/docz/tree/master/examples/less)** - Using Docz parsing CSS with LESS.\n- **[with stylus](https://github.com/doczjs/docz/tree/master/examples/css-stylus)** - Using Docz parsing CSS with Stylus.\n- **with css modules**: works out of the box with gatsby\n\nYou can check the complete list of docz examples [here](https://github.com/doczjs/docz/tree/master/examples).\n\n## More info on [docz.site](https://docz.site)\n\n## Used by\n\n- **[Smooth UI](https://smooth-ui.smooth-code.com/)** - Modern React UI library.\n- **[Set Protocol Docs](https://docs.setprotocol.com/)** - Documentation site of Set Protocol.\n- **[RBX](https://dfee.github.io/rbx)** - The Comprehensive Bulma UI Framework for React.\n- **[Circuit UI](https://circuit.sumup.com/#/)** - React component library for [SumUp](https://sumup.com) web apps.\n- **[Fannypack](https://fannypack.style)** - A friendly & accessible React UI Kit built with [Reakit](https://reakit.io/).\n- **[React Pixi](https://reactpixi.org/#/)** - React Fiber renderer for Pixi.\n- **[React Hotkey Tooltip](https://react-hotkey-tooltip.netlify.com/#/)** - A global Hotkey provider with built in tooltip for React.\n- **[Sajari React SDK](https://sajari-sdk-react.netlify.com/)** - Library of React Components for the Sajari.\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\n<a href=\"https://github.com/doczjs/docz/graphs/contributors\"><img src=\"https://opencollective.com/docz/contributors.svg?width=890&button=false\" /></a>\n\n## Contributing\n\nAll kinds of contributions are very welcome and appreciated !\n\nIf you want to contribute time to docz then here's a list of suggestions to get you started :\n\n1. Star the project.\n2. Help people in the [issues](https://github.com/doczjs/docz/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) by sharing your knowledge and experience.\n3. Find and report issues.\n4. Submit PRs to help solve issues or add features.\n5. Influence the future of docz with feature requests.\n\nIf you're looking for a place to start make sure to check issues tagged with :\n\n[![Good First Issue](https://img.shields.io/github/issues/doczjs/docz/good%20first%20issue.svg)](https://github.com/doczjs/docz/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)\n\nAnd make sure to read the [Contributing Guide](/CONTRIBUTING.md) before making a pull request.\n\nYou can also contribute money to help secure docz's future.\n\n<p align=\"center\">\n  <a href=\"https://opencollective.com/docz\" target=\"_blank\">\n    <img src=\"https://cdn-std.dprcdn.net/files/acc_649651/Q5nVhT\" height=\"80\" alt=\"Open Collective\">\n  </a>\n</p>"
  },
  {
    "path": "core/docz/bin/index.js",
    "content": "#!/usr/bin/env node\nrequire('docz-core').cli()\n"
  },
  {
    "path": "core/docz/package.json",
    "content": "{\n  \"name\": \"docz\",\n  \"version\": \"2.4.0\",\n  \"description\": \"It's has never been so easy to documents your things!\",\n  \"license\": \"MIT\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.esm.js\",\n  \"typings\": \"dist/index.d.ts\",\n  \"bin\": {\n    \"docz\": \"./bin/index.js\"\n  },\n  \"files\": [\n    \"bin/\",\n    \"dist/\",\n    \"package.json\",\n    \"README.md\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"core/docz\"\n  },\n  \"scripts\": {\n    \"dev\": \"cross-env NODE_ENV=development yarn build -w\",\n    \"build\": \"cross-env NODE_ENV=production rollup -c\",\n    \"fix\": \"yarn lint --fix\",\n    \"lint\": \"eslint . --ext mdx,ts,tsx\",\n    \"precommit\": \"lint-staged\"\n  },\n  \"dependencies\": {\n    \"@emotion/react\": \"^11.1.1\",\n    \"@mdx-js/react\": \"^1.0.27\",\n    \"array-sort\": \"^1.0.0\",\n    \"capitalize\": \"^2.0.0\",\n    \"docz-core\": \"^2.4.0\",\n    \"fast-deep-equal\": \"^2.0.1\",\n    \"gatsby\": \"^2.13.27\",\n    \"gatsby-plugin-eslint\": \"^2.0.5\",\n    \"gatsby-plugin-typescript\": \"^2.1.6\",\n    \"gatsby-theme-docz\": \"^2.4.0\",\n    \"lodash\": \"^4.17.14\",\n    \"marksy\": \"^8.0.0\",\n    \"match-sorter\": \"^3.1.1\",\n    \"pascal-case\": \"^3.1.0\",\n    \"prop-types\": \"^15.7.2\",\n    \"scheduler\": \"^0.15.0\",\n    \"ulid\": \"^2.3.0\",\n    \"yargs\": \"^13.3.0\"\n  },\n  \"peerDependencies\": {\n    \"react\": \"^16.8.0 || ^17.0.2\",\n    \"react-dom\": \"^16.8.0 || ^17.0.2\"\n  }\n}\n"
  },
  {
    "path": "core/docz/rollup.config.js",
    "content": "import { config } from 'docz-rollup'\n\nexport default config({\n  input: './src/index.ts',\n})\n"
  },
  {
    "path": "core/docz/src/components/Link.tsx",
    "content": "export { Link, GatsbyLinkProps as LinkProps } from 'gatsby'\n"
  },
  {
    "path": "core/docz/src/components/Playground.tsx",
    "content": "import React from 'react'\nimport { ComponentType, FC } from 'react'\nimport { useComponents } from '../hooks'\n\nexport interface PlaygroundProps {\n  className?: string\n  style?: any\n  wrapper?: ComponentType<any>\n  children: any\n  __scope: Record<string, any>\n  __position: number\n  __code: string\n  useScoping?: boolean\n  language?: string\n}\n\nexport const Playground: FC<PlaygroundProps> = ({\n  className,\n  children,\n  style,\n  wrapper,\n  __scope,\n  __position,\n  __code,\n  language,\n  useScoping,\n}) => {\n  const components = useComponents()\n  const PlaygroundComponent = components.playground\n  if (!PlaygroundComponent) return null\n\n  return (\n    <PlaygroundComponent\n      components={components}\n      component={children}\n      className={className}\n      style={style}\n      wrapper={wrapper}\n      scope={__scope}\n      position={__position}\n      code={__code}\n      language={language}\n      useScoping={useScoping}\n    />\n  )\n}\n"
  },
  {
    "path": "core/docz/src/components/Props.tsx",
    "content": "import React from 'react'\nimport { FC, ComponentType } from 'react'\nimport { get } from 'lodash/fp'\n\nimport { useComponents, useComponentProps } from '../hooks'\nimport { humanize } from '../utils/humanize-prop'\n\nexport interface EnumValue {\n  value: string\n  computed: boolean\n}\n\nexport interface FlowTypeElement {\n  name: string\n  value: string\n}\n\nexport interface FlowTypeArgs {\n  name: string\n  type: {\n    name: string\n  }\n}\n\nexport interface PropType {\n  name: string\n  value?: any\n  raw?: any\n  computed?: boolean\n}\n\nexport interface FlowType extends PropType {\n  elements: FlowTypeElement[]\n  name: string\n  raw: string\n  type?: string\n  computed?: boolean\n  signature?: {\n    arguments: FlowTypeArgs[]\n    return: {\n      name: string\n    }\n  }\n}\n\nexport interface Prop {\n  required: boolean\n  description?: string\n  type: PropType\n  defaultValue?: {\n    value: string\n    computed: boolean\n  }\n  flowType?: FlowType\n}\n\nexport type ComponentWithDocGenInfo = ComponentType & {\n  __docgenInfo: {\n    description?: string\n    props?: Record<string, Prop>\n  }\n}\n\nexport interface PropsProps {\n  title?: Node\n  isRaw?: boolean\n  isToggle?: boolean\n  of: ComponentWithDocGenInfo\n  [key: string]: any\n}\n\nexport const getPropType = (prop: Prop) => {\n  const propName = get('name', prop.flowType || prop.type)\n  if (!propName) return null\n\n  const isEnum = propName.startsWith('\"') || propName === 'enum'\n  const name = isEnum ? 'enum' : propName\n  const value = get('type.value', prop)\n  if (!name) return null\n\n  if (\n    (isEnum && typeof value === 'string') ||\n    (!prop.flowType && !isEnum && !value) ||\n    (prop.flowType && !prop.flowType.elements)\n  ) {\n    return name\n  }\n\n  return prop.flowType ? humanize(prop.flowType) : humanize(prop.type)\n}\n\nexport interface PropsComponentProps {\n  title?: Node\n  isRaw?: boolean\n  isToggle?: boolean\n  props: Record<string, Prop>\n  getPropType(prop: Prop): string\n  of: ComponentWithDocGenInfo\n  [key: string]: any\n}\n\nexport const Props: FC<PropsProps> = ({\n  title,\n  isToggle,\n  isRaw,\n  of: component,\n  ...rest\n}) => {\n  const components = useComponents()\n  const PropsComponent = components.props\n  const fileName = get('__filemeta.filename', component)\n  const filemetaName = get('__filemeta.name', component)\n  const componentName =\n    filemetaName || get('displayName', component) || get('name', component)\n\n  const props = useComponentProps({ componentName, fileName })\n  if (!PropsComponent) return null\n  return (\n    <PropsComponent\n      title={title}\n      isRaw={isRaw}\n      isToggle={isToggle}\n      props={props}\n      getPropType={getPropType}\n      of={component}\n      {...rest}\n    />\n  )\n}\n"
  },
  {
    "path": "core/docz/src/hooks/index.ts",
    "content": "export * from './useComponents'\nexport { useConfig, UseConfigObj } from './useConfig'\nexport { useComponentProps } from './useComponentProps'\nexport { useCurrentDoc } from './useCurrentDoc'\nexport { useDataServer } from './useDataServer'\nexport { useDocs } from './useDocs'\nexport { useMenus } from './useMenus'\nexport { usePrevious } from './usePrevious'\nexport { useWindowSize } from './useWindowSize'\n"
  },
  {
    "path": "core/docz/src/hooks/useComponentProps.ts",
    "content": "import { createElement, useContext, useMemo } from 'react'\nimport { assoc, first, get, mapValues, kebabCase } from 'lodash/fp'\nimport { pascalCase } from 'pascal-case'\nimport marksy from 'marksy'\n\nimport { useComponents } from '../hooks'\nimport { doczState } from '../state'\n\ninterface UseComponentPropsParams {\n  componentName: string\n  fileName: string\n}\n\nexport const useComponentProps = ({\n  componentName,\n  fileName,\n}: UseComponentPropsParams) => {\n  const components = useComponents()\n  const { props: stateProps } = useContext(doczState.context)\n\n  const componentMatcher = (componentName: string, item: any) => {\n    const matchingPatterns = [\n      fileName,\n      `/${componentName}.`,\n      `/${kebabCase(componentName)}.`,\n      `/${pascalCase(componentName)}.`,\n    ]\n    return !!matchingPatterns.find(pattern => item.key.includes(pattern))\n  }\n\n  const found =\n    stateProps &&\n    stateProps.length > 0 &&\n    stateProps.find(item => componentMatcher(componentName, item))\n\n  const value = get('value', found) || []\n  const firstDefinition = first(value)\n  const definition = value.find((i: any) => i.displayName === componentName)\n\n  const compile = useMemo(\n    () => marksy({ createElement, elements: components }),\n    [components]\n  )\n\n  const props = useMemo(() => {\n    const props = get('props', definition || firstDefinition)\n    const parseDescs = mapValues((prop: any) => {\n      const desc = get('description', prop)\n      return !desc ? prop : assoc('description', compile(desc).tree, prop)\n    })\n\n    return parseDescs(props)\n  }, [compile, definition || firstDefinition])\n\n  return props\n}\n"
  },
  {
    "path": "core/docz/src/hooks/useComponents.tsx",
    "content": "import React, { useContext, createContext } from 'react'\nimport { FC, ComponentType as CT } from 'react'\n\nimport { Entry } from '../state'\n\nexport interface PlaygroundProps {\n  className?: string\n  style?: any\n  wrapper?: CT<any>\n  components: ComponentsMap\n  component: JSX.Element\n  position: number\n  code: string\n  scope: Record<string, any>\n  language?: string\n  showLivePreview?: boolean\n  useScoping?: boolean\n}\n\nexport interface LayoutProps {\n  doc: Entry\n  [key: string]: any\n}\n\nexport interface ComponentsMap {\n  notFound?: CT\n  layout?: CT<LayoutProps>\n  playground?: CT<PlaygroundProps>\n  [key: string]: any\n}\n\nconst DefNotFound: FC = () => <>Not found</>\nconst DefLayout: FC = ({ children }) => <>{children}</>\nconst DefPlayground: FC<PlaygroundProps> = ({ component, code }) => (\n  <div>\n    {component}\n    <pre>{code}</pre>\n  </div>\n)\n\nconst defaultComponents: ComponentsMap = {\n  layout: DefLayout,\n  notFound: DefNotFound,\n  playground: DefPlayground,\n}\n\nexport interface ComponentsProviderProps {\n  components: ComponentsMap\n}\n\nconst ctx = createContext<ComponentsMap>(defaultComponents)\nexport const ComponentsProvider: FC<ComponentsProviderProps> = ({\n  components: themeComponents = {},\n  children,\n}) => (\n  <ctx.Provider value={{ ...defaultComponents, ...themeComponents }}>\n    {children}\n  </ctx.Provider>\n)\n\nexport const useComponents = (): ComponentsMap => {\n  return useContext(ctx)\n}\n"
  },
  {
    "path": "core/docz/src/hooks/useConfig.ts",
    "content": "import { useContext } from 'react'\nimport { merge } from 'lodash/fp'\n\nimport { doczState, ThemeConfig, Config } from '../state'\n\nexport interface UseConfigObj extends Config {\n  themeConfig: ThemeConfig\n}\n\nexport const useConfig = (): UseConfigObj => {\n  const state = useContext(doczState.context)\n  const { transform, config, themeConfig = {} } = state\n  const newConfig = merge(themeConfig, config ? config.themeConfig : {})\n  const transformed = transform ? transform(newConfig) : newConfig\n\n  return {\n    ...config,\n    themeConfig: transformed,\n  }\n}\n"
  },
  {
    "path": "core/docz/src/hooks/useCurrentDoc.tsx",
    "content": "import { useContext } from 'react'\nimport { get } from 'lodash/fp'\n\nimport { doczState } from '../state'\n\nexport const useCurrentDoc = () => {\n  const state = useContext(doczState.context)\n  return get('currentEntry.value', state)\n}\n"
  },
  {
    "path": "core/docz/src/hooks/useDataServer.ts",
    "content": "import { useEffect } from 'react'\nimport { doczState } from '../state'\n\nconst updateState = (ev: any) => {\n  const { type, payload } = JSON.parse(ev.data)\n  const prop = type.startsWith('state.') && type.split('.')[1]\n\n  if (prop) {\n    doczState.set(state => ({ ...state, [prop]: payload }))\n  }\n}\n\nexport const useDataServer = (url: string | undefined) => {\n  useEffect(() => {\n    if (!url) return\n    const socket = new WebSocket(url)\n    socket.onmessage = updateState\n    return () => socket.close()\n  }, [])\n}\n"
  },
  {
    "path": "core/docz/src/hooks/useDocs.ts",
    "content": "import { useContext } from 'react'\nimport sort from 'array-sort'\n\nimport { doczState, Entry } from '../state'\nimport { compare } from '../utils/helpers'\n\nexport const useDocs = (): Entry[] | null => {\n  const { entries = [] } = useContext(doczState.context)\n  const arr = entries.map(({ value }) => value)\n  return sort(arr, (a: Entry, b: Entry) => compare(a.name, b.name))\n}\n"
  },
  {
    "path": "core/docz/src/hooks/useMenus.ts",
    "content": "import { useMemo, useContext } from 'react'\nimport { pipe, get, omit, flattenDepth, unionBy } from 'lodash/fp'\nimport { ulid } from 'ulid'\nimport match from 'match-sorter'\nimport sort from 'array-sort'\n\nimport { compare, flatArrFromObject } from '../utils/helpers'\nimport { Entry, MenuItem, doczState } from '../state'\n\nconst noMenu = (entry: Entry) => !entry.menu\nconst fromMenu = (menu: string) => (entry: Entry) => entry.menu === menu\n\nconst entriesOfMenu = (menu: string, entries: Entry[]) =>\n  entries.filter(fromMenu(menu))\n\nconst parseMenu = (entries: Entry[]) => (name: string) => ({\n  name,\n  menu: entriesOfMenu(name, entries),\n})\n\ntype Menus = MenuItem[]\n\nconst menusFromEntries = (entries: Entry[]) => {\n  const entriesWithoutMenu = entries.filter(noMenu)\n  const menus = flatArrFromObject(entries, 'menu').map(parseMenu(entries))\n  return unionBy('name', menus, entriesWithoutMenu as any)\n}\n\nconst parseItemStr = (item: MenuItem | string) =>\n  typeof item === 'string' ? { name: item } : item\n\nconst normalize = (item: MenuItem | string): MenuItem => {\n  const selected = parseItemStr(item) as MenuItem\n  return {\n    ...selected,\n    id: selected.id || ulid(),\n    parent: get('parent', selected) || get('parent', item),\n    menu: Array.isArray(selected.menu)\n      ? selected.menu.map(normalize)\n      : selected.menu,\n  }\n}\n\nconst clean = (item: MenuItem) =>\n  item.href || item.route ? omit('menu', item) : item\n\nconst normalizeAndClean = pipe(\n  normalize,\n  clean\n)\n\nconst mergeMenus = (entriesMenu: Menus, configMenu: Menus): Menus => {\n  const first = entriesMenu.map(normalizeAndClean)\n  const second = configMenu.map(normalizeAndClean)\n  const merged = unionBy('name', first, second) as MenuItem[]\n\n  return merged.map(item => {\n    if (!item.menu) return item\n    const found: any = second.find(i => i.name === item.name)\n    const foundMenu = found && found.menu\n\n    return {\n      ...item,\n      menu: foundMenu\n        ? mergeMenus(item.menu, foundMenu)\n        : item.menu || found.menu,\n    }\n  })\n}\n\nconst UNKNOWN_POS = Infinity\n\nconst findPos = (item: any, orderedList: string[] = []) => {\n  const name = typeof item !== 'string' ? get('name', item) : item\n  const pos = orderedList.findIndex(item => item === name)\n  return pos !== -1 ? pos : UNKNOWN_POS\n}\n\ntype ToCompare = Menus | undefined\nconst compareWithMenu = (to: ToCompare = []) => (a: string, b: string) => {\n  const list = to.map((i: any) => i.name || i)\n  return compare(findPos(a, list), findPos(b, list))\n}\n\nconst sortByName = (a: MenuItem, b: MenuItem) => {\n  return a.name < b.name ? -1 : a.name > b.name ? 1 : 0\n}\n\nconst sortMenus = (first: Menus, second: Menus | undefined = []): Menus => {\n  const sorted: Menus = sort(first, compareWithMenu(second), sortByName)\n\n  return sorted.map(item => {\n    if (!item.menu) return item\n    const found = second.find(menu => menu.name === item.name)\n    const foundMenu = found && found.menu\n\n    return {\n      ...item,\n      menu: foundMenu\n        ? sortMenus(item.menu, foundMenu)\n        : sort(item.menu, sortByName),\n    }\n  })\n}\n\nconst search = (val: string, menu: MenuItem[]) => {\n  const items = menu.map(item => [item].concat(item.menu || []))\n  const flattened = flattenDepth(2, items)\n  const flattenedDeduplicated = Array.from(new Set(flattened))\n  return match(flattenedDeduplicated, val, { keys: ['name'] })\n}\n\ntype FilterFn = (item: MenuItem) => boolean\n\nconst filterMenus = (items: MenuItem[], filter?: FilterFn) => {\n  if (!filter) return items\n  return items.filter(filter).map(item => {\n    if (!item.menu) return item\n    return { ...item, menu: item.menu.filter(filter) }\n  })\n}\n\nexport interface UseMenusParams {\n  query?: string\n  filter?: FilterFn\n}\n\nexport const useMenus = (opts?: UseMenusParams) => {\n  const { query = '' } = opts || {}\n  const { entries, config } = useContext(doczState.context)\n  if (!entries) return null\n\n  const arr = entries.map(({ value }) => value) as Entry[]\n  const entriesMenu = menusFromEntries(arr)\n  const sorted = useMemo(() => {\n    const merged = mergeMenus(entriesMenu as any[], config.menu)\n    const result = sortMenus(merged, config.menu) as MenuItem[]\n    return filterMenus(result, opts && opts.filter)\n  }, [entries, config])\n\n  return query && query.length > 0\n    ? (search(query, sorted) as MenuItem[])\n    : sorted\n}\n"
  },
  {
    "path": "core/docz/src/hooks/usePrevious.ts",
    "content": "import { useEffect, useRef } from 'react'\n\nexport const usePrevious = (value: any, defaultValue?: any) => {\n  const ref = useRef(defaultValue)\n  useEffect(() => {\n    ref.current = value\n  })\n  return ref.current\n}\n"
  },
  {
    "path": "core/docz/src/hooks/useWindowSize.ts",
    "content": "import { useState, useEffect } from 'react'\nimport { throttle } from 'lodash/fp'\n\nconst isClient = typeof window === 'object'\n\nconst getSize = (initialWidth: number, initialHeight: number) => ({\n  innerHeight: isClient ? window.innerHeight : initialHeight,\n  innerWidth: isClient ? window.innerWidth : initialWidth,\n  outerHeight: isClient ? window.outerHeight : initialHeight,\n  outerWidth: isClient ? window.outerWidth : initialWidth,\n})\n\nexport const useWindowSize = (\n  throttleMs: number = 300,\n  _initialWidth = Infinity,\n  initialHeight = Infinity\n) => {\n  const [windowSize, setWindowSize] = useState(\n    getSize(initialHeight, initialHeight)\n  )\n  const tSetWindowResize = throttle(throttleMs, () =>\n    setWindowSize(getSize(initialHeight, initialHeight))\n  )\n\n  useEffect(() => {\n    window.addEventListener('resize', tSetWindowResize)\n    return () => void window.removeEventListener('resize', tSetWindowResize)\n  }, [])\n\n  return windowSize\n}\n"
  },
  {
    "path": "core/docz/src/index.ts",
    "content": "export { Link, LinkProps } from './components/Link'\nexport { Playground, PlaygroundProps } from './components/Playground'\nexport { Props, PropsComponentProps } from './components/Props'\n\nexport * from './hooks'\nexport { theme } from './theme'\nexport { doczState, Entry, MenuItem, ThemeConfig } from './state'\n"
  },
  {
    "path": "core/docz/src/state.tsx",
    "content": "import { create } from './utils/createState'\n\nexport interface Heading {\n  depth: number\n  slug: string\n  value: string\n}\n\nexport interface Entry {\n  id: string\n  filepath: string\n  slug: string\n  route: string\n  name: string\n  order: number\n  menu: string | null\n  headings: Heading[]\n  [key: string]: any\n}\n\nexport interface MenuItem {\n  id: string\n  name: string\n  route?: string\n  href?: string\n  menu?: MenuItem[]\n  order?: number\n  parent?: string\n  [key: string]: any\n}\n\nexport type ThemeConfig = Record<string, any>\nexport interface Config {\n  title: string\n  description: string\n  themeConfig: ThemeConfig\n  menu: MenuItem[]\n  version: string | null\n  repository: string | null\n  native: boolean\n  separator: string\n  base?: string\n}\n\nexport type Entries = { key: string; value: Entry }[]\nexport type Props = { key: string; value: any }[]\nexport type TransformFn = (config: ThemeConfig) => ThemeConfig\n\nexport interface Database {\n  config: Config\n  currentEntry: Entry\n  props?: Props\n  entries?: Entries\n}\n\nexport interface DoczState extends Database {\n  themeConfig?: ThemeConfig\n  transform?: TransformFn\n}\n\nexport const doczState = create<DoczState>({} as any)\n"
  },
  {
    "path": "core/docz/src/theme.tsx",
    "content": "import React, { memo } from 'react'\nimport { FC, ComponentType as CT } from 'react'\nimport { doczState, Database, ThemeConfig, TransformFn, Entry } from './state'\n\nexport interface ThemeProps {\n  db: Database\n  currentEntry: Entry\n  children(WrappedComponent: CT): JSX.Element\n}\n\nexport function theme(\n  themeConfig: ThemeConfig,\n  transform: TransformFn = c => c\n): (WrappedComponent: CT) => CT<ThemeProps> {\n  return WrappedComponent => {\n    const Theme: FC<ThemeProps> = memo(props => {\n      const { db, currentEntry, children } = props\n      const initial: any = { ...db, currentEntry, themeConfig, transform }\n\n      return (\n        <doczState.Provider initial={initial}>\n          <WrappedComponent>{children}</WrappedComponent>\n        </doczState.Provider>\n      )\n    })\n\n    Theme.displayName = WrappedComponent.displayName || 'DoczTheme'\n    return Theme\n  }\n}\n"
  },
  {
    "path": "core/docz/src/types.d.ts",
    "content": "declare module '@mdx-js/react'\ndeclare module 'array-sort'\ndeclare module 'capitalize'\ndeclare module 'match-sorter'\ndeclare module 'marksy'\ndeclare module 'react-router-hash-link'\ndeclare module 'use-react-router'\n"
  },
  {
    "path": "core/docz/src/utils/createState.tsx",
    "content": "import React, { createContext } from 'react'\nimport { Component, ReactNode, Context, ComponentType } from 'react'\nimport equal from 'fast-deep-equal'\n\nexport interface ProviderProps<T> {\n  initial?: T\n}\n\nexport type PrevState<T> = (prevState: T) => T\nexport type GetFn<T> = (state: T) => ReactNode\nexport type Dispatch<T> = T | PrevState<T>\n\nexport interface State<T> {\n  context: Context<T>\n  set: (param: Dispatch<T>) => void\n  Provider: ComponentType<ProviderProps<T>>\n}\n\nexport function create<T = any>(initial: T): State<T> {\n  const ctx = createContext<T>(initial)\n  const listeners = new Set()\n\n  const dispatch = (fn: Dispatch<T>) => {\n    listeners.forEach((listener: any) => listener(fn))\n  }\n\n  return {\n    context: ctx,\n    set: fn => dispatch(fn),\n    Provider: class Provider extends Component<ProviderProps<T>, T> {\n      public static displayName = 'DoczStateProvider'\n      public static getDerivedStateFromProps(props: any, state: any): any {\n        if (!equal(props.initial, state)) return props.initial\n        return null\n      }\n      public state = this.props.initial || initial || ({} as T)\n      public componentDidMount(): void {\n        listeners.add((fn: Dispatch<T>) => this.setState(fn))\n      }\n      public componentWillUnmount(): void {\n        listeners.clear()\n      }\n      public render(): ReactNode {\n        return (\n          <ctx.Provider value={this.state}>{this.props.children}</ctx.Provider>\n        )\n      }\n    },\n  }\n}\n"
  },
  {
    "path": "core/docz/src/utils/helpers.ts",
    "content": "import { get } from 'lodash/fp'\n\nexport const isFn = (value: any): boolean => typeof value === 'function'\n\nexport function flatArrFromObject<T>(arr: T[], prop: string): string[] {\n  const reducer = (arr: string[], obj: T): string[] => {\n    const value = get(prop)(obj)\n    return value ? arr.concat([value]) : arr\n  }\n\n  return Array.from(new Set(arr.reduce(reducer, [])))\n}\n\nexport function compare<T>(a: T, b: T, reverse?: boolean): number {\n  if (a < b) return reverse ? 1 : -1\n  if (a > b) return reverse ? -1 : 1\n  return 0\n}\n"
  },
  {
    "path": "core/docz/src/utils/humanize-prop.ts",
    "content": "import capitalize from 'capitalize'\n\nimport { PropType, FlowType } from '../components/Props'\n\nconst RE_OBJECTOF = /(?:React\\.)?(?:PropTypes\\.)?objectOf\\((?:React\\.)?(?:PropTypes\\.)?(\\w+)\\)/\n\nconst getTypeStr = (type: PropType | FlowType): any => {\n  switch (type.name.toLowerCase()) {\n    case 'instanceof':\n      return `Class(${type.value})`\n    case 'enum':\n      if (type.computed) return type.value\n      return type.value\n        ? type.value.map((v: any) => `${v.value}`).join(' │ ')\n        : type.raw\n    case 'union':\n      return type.value\n        ? type.value.map((t: any) => `${getTypeStr(t)}`).join(' │ ')\n        : type.raw\n    case 'array':\n      return type.raw\n    case 'arrayof':\n      return `Array<${getTypeStr(type.value)}>`\n    case 'custom':\n      if (type.raw.indexOf('function') !== -1 || type.raw.indexOf('=>') !== -1)\n        return 'Custom(Function)'\n      else if (type.raw.toLowerCase().indexOf('objectof') !== -1) {\n        const m = type.raw.match(RE_OBJECTOF)\n        if (m && m[1]) return `ObjectOf(${capitalize(m[1])})`\n        return 'ObjectOf'\n      }\n      return 'Custom'\n    case 'bool':\n      return 'Boolean'\n    case 'func':\n      return 'Function'\n    case 'shape':\n      const shape = type.value\n      const rst: any = {}\n      Object.keys(shape).forEach(key => {\n        rst[key] = getTypeStr(shape[key])\n      })\n\n      return JSON.stringify(rst, null, 2)\n    default:\n      return type.name\n  }\n}\n\nexport const humanize = (type: PropType | FlowType) => getTypeStr(type)\n"
  },
  {
    "path": "core/docz/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"module\": \"esnext\",\n    \"declaration\": true,\n    \"sourceMap\": false,\n    \"outDir\": \"./dist\",\n    \"rootDir\": \"./src\",\n    \"baseUrl\": \"./\",\n    \"typeRoots\": [\"../../node_modules/@types\", \"node_modules/@types\"]\n  },\n  \"include\": [\"src/**/*\"],\n  \"exclude\": [\"node_modules/**\", \"templates/**\"]\n}\n"
  },
  {
    "path": "core/docz-core/.babelrc",
    "content": "{\n  \"plugins\": [\"lodash\"],\n  \"presets\": [\n    \"@babel/preset-typescript\",\n    [\n      \"@babel/preset-env\",\n      {\n        \"targets\": {\n          \"node\": \"current\"\n        }\n      }\n    ]\n  ]\n}\n"
  },
  {
    "path": "core/docz-core/.eslintignore",
    "content": "dist\n"
  },
  {
    "path": "core/docz-core/.eslintrc.js",
    "content": "module.exports = {\n  extends: 'docz-ts',\n}\n"
  },
  {
    "path": "core/docz-core/.lintstagedrc",
    "content": "{\n  \"*.{ts,tsx}\": [\"yarn fix\", \"git add\"]\n}\n"
  },
  {
    "path": "core/docz-core/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n### Features\n\n* add gatsby https flag to use in dev mode ([#1569](https://github.com/doczjs/docz/issues/1569)) ([9d91503](https://github.com/doczjs/docz/commit/9d91503))\n* **docz-core:** add modifyEntry plugin supported ([#1621](https://github.com/doczjs/docz/issues/1621)) ([317987e](https://github.com/doczjs/docz/commit/317987e))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n### Features\n\n* add gatsby https flag to use in dev mode ([#1569](https://github.com/doczjs/docz/issues/1569)) ([9d91503](https://github.com/doczjs/docz/commit/9d91503))\n* **docz-core:** add modifyEntry plugin supported ([#1621](https://github.com/doczjs/docz/issues/1621)) ([317987e](https://github.com/doczjs/docz/commit/317987e))\n\n\n\n\n\n## [2.3.2-alpha.0](https://github.com/doczjs/docz/compare/v2.3.1...v2.3.2-alpha.0) (2020-04-07)\n\n\n### Bug Fixes\n\n* **docz-core:** use user-provided 404 page when it exists ([05417d3](https://github.com/doczjs/docz/commit/05417d3))\n\n\n\n\n\n# [2.3.0](https://github.com/doczjs/docz/compare/v2.3.0-alpha.14...v2.3.0) (2020-04-02)\n\n**Note:** Version bump only for package docz-core\n\n\n\n\n\n# [2.3.0-alpha.14](https://github.com/doczjs/docz/compare/v2.3.0-alpha.13...v2.3.0-alpha.14) (2020-03-31)\n\n\n### Bug Fixes\n\n* **docz-core:** always use custom prop filter if it's provided… ([#1415](https://github.com/doczjs/docz/issues/1415)) ([53063ff](https://github.com/doczjs/docz/commit/53063ff))\n\n\n\n\n\n# [2.3.0-alpha.12](https://github.com/doczjs/docz/compare/v2.3.0-alpha.11...v2.3.0-alpha.12) (2020-02-12)\n\n\n### Bug Fixes\n\n* **docz-core:** pass down host when running serve ([#1384](https://github.com/doczjs/docz/issues/1384)) ([80a0e1e](https://github.com/doczjs/docz/commit/80a0e1e))\n\n\n\n\n\n# [2.3.0-alpha.11](https://github.com/doczjs/docz/compare/v2.3.0-alpha.10...v2.3.0-alpha.11) (2020-02-07)\n\n\n### Bug Fixes\n\n* **docz-core:** be explicit about cli args ([6f5b4ee](https://github.com/doczjs/docz/commit/6f5b4ee))\n\n\n### Features\n\n* **docz-core:** pass down cli args to Gatsby + fix open flag ([385b006](https://github.com/doczjs/docz/commit/385b006))\n\n\n\n\n\n# [2.3.0-alpha.10](https://github.com/doczjs/docz/compare/v2.3.0-alpha.9...v2.3.0-alpha.10) (2020-02-06)\n\n\n### Bug Fixes\n\n* **docz-core:** parse port when running serve ([29d0edd](https://github.com/doczjs/docz/commit/29d0edd))\n\n\n\n\n\n# [2.3.0-alpha.8](https://github.com/doczjs/docz/compare/v2.3.0-alpha.7...v2.3.0-alpha.8) (2020-02-06)\n\n**Note:** Version bump only for package docz-core\n\n\n\n\n\n# [2.3.0-alpha.7](https://github.com/doczjs/docz/compare/v2.3.0-alpha.6...v2.3.0-alpha.7) (2020-02-04)\n\n\n### Features\n\n* add the ability to hide a document from the menu ([#1354](https://github.com/doczjs/docz/issues/1354)) ([95b0d7f](https://github.com/doczjs/docz/commit/95b0d7f))\n\n\n\n\n\n# [2.3.0-alpha.6](https://github.com/doczjs/docz/compare/v2.3.0-alpha.5...v2.3.0-alpha.6) (2020-01-02)\n\n\n### Bug Fixes\n\n* **docz-core:** prevent falsy error code on cli ([#1332](https://github.com/doczjs/docz/issues/1332)) ([1437b59](https://github.com/doczjs/docz/commit/1437b59))\n* **docz-core:** revert ts auto-detect ([f0ce584](https://github.com/doczjs/docz/commit/f0ce584))\n\n\n\n\n\n# [2.3.0-alpha.5](https://github.com/doczjs/docz/compare/v2.3.0-alpha.4...v2.3.0-alpha.5) (2019-12-17)\n\n\n### Features\n\n* **docz-core:** introduce gatsbyRoot to use for fs sourcing ([8e89d64](https://github.com/doczjs/docz/commit/8e89d64))\n\n\n\n\n\n# [2.3.0-alpha.2](https://github.com/doczjs/docz/compare/v2.3.0-alpha.1...v2.3.0-alpha.2) (2019-12-14)\n\n\n### Bug Fixes\n\n* **docz-core:** forward cli status code properly ([#1319](https://github.com/doczjs/docz/issues/1319)) ([99ebf82](https://github.com/doczjs/docz/commit/99ebf82))\n\n\n### Features\n\n* **docz-core:** allow custom pattern for globbing components with docgenConfig.searchPatterns ([#1316](https://github.com/doczjs/docz/issues/1316)) ([29e0165](https://github.com/doczjs/docz/commit/29e0165))\n\n\n\n\n\n# [2.3.0-alpha.1](https://github.com/doczjs/docz/compare/v2.3.0-alpha.0...v2.3.0-alpha.1) (2019-12-13)\n\n\n### Bug Fixes\n\n* **docz-core:** properly support node_modules for multiple file patterns ([#1315](https://github.com/doczjs/docz/issues/1315)) ([4d9f9b3](https://github.com/doczjs/docz/commit/4d9f9b3))\n* **docz-core:** use docz-utils for get and mergeWith ([f222083](https://github.com/doczjs/docz/commit/f222083))\n\n\n\n\n\n# [2.3.0-alpha.0](https://github.com/doczjs/docz/compare/v2.2.1-alpha.1...v2.3.0-alpha.0) (2019-12-12)\n\n\n### Features\n\n* **docz-core:** detect typescript without config ([bbaecb2](https://github.com/doczjs/docz/commit/bbaecb2))\n\n\n\n\n\n## [2.2.1-alpha.1](https://github.com/doczjs/docz/compare/v2.2.1-alpha.0...v2.2.1-alpha.1) (2019-12-12)\n\n\n### Bug Fixes\n\n* **docz-core:** add native styled-components support ([b072f78](https://github.com/doczjs/docz/commit/b072f78))\n\n\n\n\n\n## [2.2.1-alpha.0](https://github.com/doczjs/docz/compare/v2.2.0...v2.2.1-alpha.0) (2019-12-11)\n\n**Note:** Version bump only for package docz-core\n\n\n\n\n\n# [2.2.0](https://github.com/doczjs/docz/compare/v2.2.0-alpha.8...v2.2.0) (2019-12-11)\n\n**Note:** Version bump only for package docz-core\n\n\n\n\n\n# [2.2.0-alpha.3](https://github.com/doczjs/docz/compare/v2.2.0-alpha.2...v2.2.0-alpha.3) (2019-11-29)\n\n\n### Bug Fixes\n\n* **docz-core:** re-sync .docz on build ([dfd4262](https://github.com/doczjs/docz/commit/dfd4262))\n\n\n\n\n\n# [2.2.0-alpha.2](https://github.com/doczjs/docz/compare/v2.2.0-alpha.1...v2.2.0-alpha.2) (2019-11-29)\n\n\n### Bug Fixes\n\n* **docz-core:** log errors that happen in gatsby-config ([fe1e2da](https://github.com/doczjs/docz/commit/fe1e2da))\n\n\n### Features\n\n* **docz-core:** copy .env ([51f7027](https://github.com/doczjs/docz/commit/51f7027))\n\n\n\n\n\n# [2.2.0-alpha.1](https://github.com/doczjs/docz/compare/v2.2.0-alpha.0...v2.2.0-alpha.1) (2019-11-28)\n\n\n### Features\n\n* **docz-core:** add all gatsby node apis to generated gatsby-node ([918b44c](https://github.com/doczjs/docz/commit/918b44c)), closes [#1285](https://github.com/doczjs/docz/issues/1285)\n\n\n\n\n\n# [2.2.0-alpha.0](https://github.com/doczjs/docz/compare/v2.1.1...v2.2.0-alpha.0) (2019-11-28)\n\n\n### Features\n\n* **docz-core:** recommend commands on typo ([#1282](https://github.com/doczjs/docz/issues/1282)) ([0f8430d](https://github.com/doczjs/docz/commit/0f8430d))\n\n\n\n\n\n## [2.1.1](https://github.com/doczjs/docz/compare/v2.1.0...v2.1.1) (2019-11-27)\n\n\n### Bug Fixes\n\n* **docz-core:** prepend dot to default mdx extensions ([18f78d6](https://github.com/doczjs/docz/commit/18f78d6))\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n\n### Features\n\n* **docz-core:** add mdxExtensions to config ([77b84e8](https://github.com/doczjs/docz/commit/77b84e8))\n\n\n\n\n\n# [2.0.0-rc.34](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.34) (2019-09-04)\n\n\n### Bug Fixes\n\n* **docz-core:** make onCreateWebpackConfig extendable ([8968a6c](https://github.com/pedronauck/docz/commit/8968a6c))\n* **docz-core:** run init on build if docz is not initialized ([26aa7f6](https://github.com/pedronauck/docz/commit/26aa7f6))\n* **docz-core:** set yarn production to false to download all deps ([2b4cc6b](https://github.com/pedronauck/docz/commit/2b4cc6b))\n* **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n* change themeDir occurences to themesDir ([c841f01](https://github.com/pedronauck/docz/commit/c841f01))\n\n\n### Features\n\n* **docz-core:** add docz init command ([43cdeca](https://github.com/pedronauck/docz/commit/43cdeca))\n* **docz-core:** remove installation step in .docz 🎉 ([4d01ead](https://github.com/pedronauck/docz/commit/4d01ead))\n* add normalize for trailing slashes ([4b0a710](https://github.com/pedronauck/docz/commit/4b0a710))\n* adds theme path overrrite option ([bb62c6b](https://github.com/pedronauck/docz/commit/bb62c6b))\n* rewrite dest path for themeDir override ([7418e55](https://github.com/pedronauck/docz/commit/7418e55))\n\n\n\n\n\n# [2.0.0-rc.33](https://github.com/pedronauck/docz/compare/v2.0.0-rc.32...v2.0.0-rc.33) (2019-09-04)\n\n\n### Features\n\n* **docz-core:** remove installation step in .docz 🎉 ([6790179](https://github.com/pedronauck/docz/commit/6790179))\n\n\n\n\n\n# [2.0.0-rc.32](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.32) (2019-09-04)\n\n### Bug Fixes\n\n- **docz-core:** make onCreateWebpackConfig extendable ([8968a6c](https://github.com/pedronauck/docz/commit/8968a6c))\n- **docz-core:** run init on build if docz is not initialized ([26aa7f6](https://github.com/pedronauck/docz/commit/26aa7f6))\n- **docz-core:** set yarn production to false to download all deps ([2b4cc6b](https://github.com/pedronauck/docz/commit/2b4cc6b))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n\n### Features\n\n- **docz-core:** add docz init command ([43cdeca](https://github.com/pedronauck/docz/commit/43cdeca))\n\n# [2.0.0-rc.31](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.31) (2019-09-03)\n\n### Bug Fixes\n\n- **docz-core:** make onCreateWebpackConfig extendable ([8968a6c](https://github.com/pedronauck/docz/commit/8968a6c))\n- **docz-core:** run init on build if docz is not initialized ([fe984fd](https://github.com/pedronauck/docz/commit/fe984fd))\n- **docz-core:** set yarn production to false to download all deps ([1258553](https://github.com/pedronauck/docz/commit/1258553))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n\n### Features\n\n- **docz-core:** add docz init command ([2cd87ee](https://github.com/pedronauck/docz/commit/2cd87ee))\n\n# [2.0.0-rc.30](https://github.com/pedronauck/docz/compare/v2.0.0-rc.29...v2.0.0-rc.30) (2019-09-03)\n\n### Bug Fixes\n\n- **docz-core:** set yarn production to false to download all deps ([c9db7f1](https://github.com/pedronauck/docz/commit/c9db7f1))\n\n# [2.0.0-rc.29](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.29) (2019-09-03)\n\n### Bug Fixes\n\n- **docz-core:** make onCreateWebpackConfig extendable ([d2aff82](https://github.com/pedronauck/docz/commit/d2aff82))\n- **docz-core:** run init on build if docz is not initialized ([23bc575](https://github.com/pedronauck/docz/commit/23bc575))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n\n### Features\n\n- **docz-core:** add docz init command ([6aaa3e4](https://github.com/pedronauck/docz/commit/6aaa3e4))\n\n# [2.0.0-rc.28](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.28) (2019-09-03)\n\n### Bug Fixes\n\n- **docz-core:** make onCreateWebpackConfig extendable ([d2aff82](https://github.com/pedronauck/docz/commit/d2aff82))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n\n### Bug Fixes\n\n- **docz-core:** make onCreateWebpackConfig extendable ([d2aff82](https://github.com/pedronauck/docz/commit/d2aff82))\n- **docz-core:** run init on build if docz is not initialized ([23bc575](https://github.com/pedronauck/docz/commit/23bc575))\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n\n### Features\n\n- **docz-core:** add docz init command ([6aaa3e4](https://github.com/pedronauck/docz/commit/6aaa3e4))\n\n# [2.0.0-rc.27](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.27) (2019-09-02)\n\n### Bug Fixes\n\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n\n# [2.0.0-rc.6](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.6) (2019-08-29)\n\n**Note:** Version bump only for package docz-core\n\n# [2.0.0-rc.2](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2019-08-28)\n\n### Bug Fixes\n\n- **docz-core:** extend base config instead of overwriting user config ([#1028](https://github.com/pedronauck/docz/issues/1028)) ([7b46c2b](https://github.com/pedronauck/docz/commit/7b46c2b))\n- **docz-core:** wait for app to be ready before opening the browser ([c5cd14d](https://github.com/pedronauck/docz/commit/c5cd14d))\n\n### Features\n\n- **docz-core:** setup jest and add first test ([bf02ac1](https://github.com/pedronauck/docz/commit/bf02ac1))\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n### Bug Fixes\n\n- bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n- resizable props import ([2926896](https://github.com/pedronauck/docz/commit/2926896))\n- **docz-core:** create deps algorithm ([a4b8eb9](https://github.com/pedronauck/docz/commit/a4b8eb9))\n- eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n- on create webpack plugin hook ([56e974a](https://github.com/pedronauck/docz/commit/56e974a))\n- packages rollup config ([534d7bf](https://github.com/pedronauck/docz/commit/534d7bf))\n- some typescript adjustments ([4ba6eaf](https://github.com/pedronauck/docz/commit/4ba6eaf))\n- **docz-core:** some adjustments ([86f95b5](https://github.com/pedronauck/docz/commit/86f95b5))\n- **docz-core:** vendor react-docgen-external-proptypes-handler ([#866](https://github.com/pedronauck/docz/issues/866)) ([efb89ee](https://github.com/pedronauck/docz/commit/efb89ee)), closes [#727](https://github.com/pedronauck/docz/issues/727)\n\n### Features\n\n- open browser integration ([132c472](https://github.com/pedronauck/docz/commit/132c472))\n- **docz-core:** add initial gatsby bundler algorithm ([9249e34](https://github.com/pedronauck/docz/commit/9249e34))\n- **docz-core:** ensure files before running machine ([1876540](https://github.com/pedronauck/docz/commit/1876540))\n- **docz-core:** watch custom theme files ([5ee7abe](https://github.com/pedronauck/docz/commit/5ee7abe))\n- **docz-core:** watch gatsby config files ([1539378](https://github.com/pedronauck/docz/commit/1539378))\n- a lot of improvements ([64f75da](https://github.com/pedronauck/docz/commit/64f75da))\n- adapt core plugins to gatsby hooks ([4caa47a](https://github.com/pedronauck/docz/commit/4caa47a))\n- **gatsby-theme-docz:** add new Props component ([8eb780d](https://github.com/pedronauck/docz/commit/8eb780d))\n- add new theme sidebar ([a01d100](https://github.com/pedronauck/docz/commit/a01d100))\n- add typescript support (need fix) ([13947f9](https://github.com/pedronauck/docz/commit/13947f9))\n- docz running using gatsby under the hood ([10ffd48](https://github.com/pedronauck/docz/commit/10ffd48))\n- dynamic src and root path ([c071556](https://github.com/pedronauck/docz/commit/c071556))\n- **docz-core:** add build and serve command with gatsby ([e85c82b](https://github.com/pedronauck/docz/commit/e85c82b))\n- **docz-core:** add doczrc config watcher on dev ([5aa0455](https://github.com/pedronauck/docz/commit/5aa0455))\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n### Features\n\n- **docz-core:** add config docgen ts resolver ([#848](https://github.com/pedronauck/docz/issues/848)) ([256b600](https://github.com/pedronauck/docz/commit/256b600))\n- **docz-core:** add config not use specifiers ([#849](https://github.com/pedronauck/docz/issues/849)) ([d8595a9](https://github.com/pedronauck/docz/commit/d8595a9))\n- **docz-core:** add serve command ([#855](https://github.com/pedronauck/docz/issues/855)) ([73311bd](https://github.com/pedronauck/docz/commit/73311bd))\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n### Bug Fixes\n\n- correct props loading ([#836](https://github.com/pedronauck/docz/issues/836)) ([ed85f14](https://github.com/pedronauck/docz/commit/ed85f14))\n- **docz-core:** prevent watch in production ([d673262](https://github.com/pedronauck/docz/commit/d673262))\n\n### Features\n\n- **docz-core:** extended path configuration for docgen ([#846](https://github.com/pedronauck/docz/issues/846)) ([aa96739](https://github.com/pedronauck/docz/commit/aa96739))\n- **docz-core:** use react-dev-utils create compiler ([4d062de](https://github.com/pedronauck/docz/commit/4d062de))\n\n## [1.0.4](https://github.com/pedronauck/docz/compare/v1.0.3...v1.0.4) (2019-04-18)\n\n**Note:** Version bump only for package docz-core\n\n## [1.0.2](https://github.com/pedronauck/docz/compare/v1.0.1...v1.0.2) (2019-04-15)\n\n### Bug Fixes\n\n- pin typescript version ([8ae97d3](https://github.com/pedronauck/docz/commit/8ae97d3))\n\n## [1.0.1](https://github.com/pedronauck/docz/compare/v1.0.0...v1.0.1) (2019-04-14)\n\n**Note:** Version bump only for package docz-core\n\n# [1.0.0](https://github.com/pedronauck/docz/compare/v1.0.0-rc.8...v1.0.0) (2019-04-11)\n\n### Bug Fixes\n\n- **docz-core:** typescript doesn't work with several exports ([#771](https://github.com/pedronauck/docz/issues/771)) ([c96878d](https://github.com/pedronauck/docz/commit/c96878d))\n\n### Features\n\n- **docz-core:** auto open browser when start dev mode ([#774](https://github.com/pedronauck/docz/issues/774)) ([c0e6c13](https://github.com/pedronauck/docz/commit/c0e6c13))\n\n# [1.0.0-rc.4](https://github.com/pedronauck/docz/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2019-03-29)\n\n### Bug Fixes\n\n- **docz-core:** add src as prefix on ignore ([2bae93b](https://github.com/pedronauck/docz/commit/2bae93b))\n- **docz-core:** remove DataServer from production build ([b8770ec](https://github.com/pedronauck/docz/commit/b8770ec))\n- get component filename relative (fix [#706](https://github.com/pedronauck/docz/issues/706)) ([84b23ea](https://github.com/pedronauck/docz/commit/84b23ea))\n- remove data server from build ([8715129](https://github.com/pedronauck/docz/commit/8715129))\n- **docz-core:** base prop for router ([9ca39d7](https://github.com/pedronauck/docz/commit/9ca39d7))\n- **docz-core:** entries not initialized on build ([#725](https://github.com/pedronauck/docz/issues/725)) ([3e99db0](https://github.com/pedronauck/docz/commit/3e99db0))\n- **docz-core:** resolve symlinks right for the react-docgen ([#699](https://github.com/pedronauck/docz/issues/699)) ([783a836](https://github.com/pedronauck/docz/commit/783a836))\n- **docz-theme-default:** apply ignore in props parsing ([#723](https://github.com/pedronauck/docz/issues/723)) ([6dd068c](https://github.com/pedronauck/docz/commit/6dd068c))\n\n# [1.0.0-rc.3](https://github.com/pedronauck/docz/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2019-03-21)\n\n### Bug Fixes\n\n- **gatsby-theme-docz:** menu field on entry source node ([05457f2](https://github.com/pedronauck/docz/commit/05457f2))\n\n# [1.0.0-beta.0](https://github.com/pedronauck/docz/compare/v1.0.0-alpha.1...v1.0.0-beta.0) (2019-03-19)\n\n**Note:** Version bump only for package docz-core\n\n# [1.0.0-alpha.0](https://github.com/pedronauck/docz/compare/v0.13.5...v1.0.0-alpha.0) (2019-03-19)\n\n### Bug Fixes\n\n- **docz-core:** config passed on argv ([12f6385](https://github.com/pedronauck/docz/commit/12f6385))\n- **docz-core:** hot loader and mdx plugins ([0531d65](https://github.com/pedronauck/docz/commit/0531d65))\n- **docz-core:** initialize config state on data server start ([#678](https://github.com/pedronauck/docz/issues/678)) ([8c740b8](https://github.com/pedronauck/docz/commit/8c740b8))\n- **docz-core:** remove dev things from prod build ([3f5b5d7](https://github.com/pedronauck/docz/commit/3f5b5d7))\n- **docz-core:** write first imports ([b856168](https://github.com/pedronauck/docz/commit/b856168))\n- immutable merge with lodash ([2fe94d4](https://github.com/pedronauck/docz/commit/2fe94d4))\n- some general adjustments ([0c61f64](https://github.com/pedronauck/docz/commit/0c61f64))\n- **docz-core:** remove order from Entry class ([e12c37d](https://github.com/pedronauck/docz/commit/e12c37d))\n- define right internal dependencies version ([30a91b4](https://github.com/pedronauck/docz/commit/30a91b4))\n- use lodash merge instead of deepmerge ([18ac37b](https://github.com/pedronauck/docz/commit/18ac37b))\n- **docz-core:** add spaces when write db.json ([3a84af3](https://github.com/pedronauck/docz/commit/3a84af3))\n- **docz-core:** add typescript as dependency ([9f314cd](https://github.com/pedronauck/docz/commit/9f314cd))\n- **docz-core:** apply mdast plugins to entries parse too ([c2554b8](https://github.com/pedronauck/docz/commit/c2554b8))\n- **docz-core:** docgen if file has not component definition ([b0fb846](https://github.com/pedronauck/docz/commit/b0fb846))\n- **docz-core:** exclude node modules from source map loader ([1c7c9f7](https://github.com/pedronauck/docz/commit/1c7c9f7))\n- **docz-core:** mdx loader options ([9114f9b](https://github.com/pedronauck/docz/commit/9114f9b))\n- **docz-core:** props state parser ([87767e8](https://github.com/pedronauck/docz/commit/87767e8))\n- **docz-core:** react docgen typescript performance ([2967e7c](https://github.com/pedronauck/docz/commit/2967e7c))\n- **docz-core:** return http server on bundler.start() ([cdba3bf](https://github.com/pedronauck/docz/commit/cdba3bf))\n- **docz-core:** run right hook name ([f500971](https://github.com/pedronauck/docz/commit/f500971))\n- **gatsby-theme-docz:** use createPages instead of createPagesStatefully ([37b73c6](https://github.com/pedronauck/docz/commit/37b73c6))\n- **load-cfg:** use babel register in order to require using es6 ([7ad3b64](https://github.com/pedronauck/docz/commit/7ad3b64))\n- a lot of bug fixes ([c10a8bd](https://github.com/pedronauck/docz/commit/c10a8bd))\n- use custom rollup config to build instead of libundler ([ee42a5a](https://github.com/pedronauck/docz/commit/ee42a5a))\n\n### Features\n\n- **docz-core:** remove ordering deprecated field ([39660bb](https://github.com/pedronauck/docz/commit/39660bb))\n- **gatsby-theme-docz:** add custom theme support ([fdfddcb](https://github.com/pedronauck/docz/commit/fdfddcb))\n- add initial gatsby integration ([#630](https://github.com/pedronauck/docz/issues/630)) ([70d40cc](https://github.com/pedronauck/docz/commit/70d40cc)), closes [#609](https://github.com/pedronauck/docz/issues/609)\n- add playground component ([cde6511](https://github.com/pedronauck/docz/commit/cde6511))\n- docgen refactoring ([#545](https://github.com/pedronauck/docz/issues/545)) ([85499a8](https://github.com/pedronauck/docz/commit/85499a8))\n- split router logic from theme ([a9c26e6](https://github.com/pedronauck/docz/commit/a9c26e6))\n- use @reach/router instead of react-router ([81a4a82](https://github.com/pedronauck/docz/commit/81a4a82))\n- **docz-core:** support for configuring the separator during slugifying ([10bb134](https://github.com/pedronauck/docz/commit/10bb134))\n\n## [0.13.6](https://github.com/pedronauck/docz/compare/v0.13.5...v0.13.6) (2018-12-26)\n\n### Bug Fixes\n\n- **docz-core:** default value for arguments ([5644343](https://github.com/pedronauck/docz/commit/5644343))\n- **docz-core:** happypack plugin name ([cbf7692](https://github.com/pedronauck/docz/commit/cbf7692))\n\n## [0.13.5](https://github.com/pedronauck/docz/compare/v0.13.4...v0.13.5) (2018-12-19)\n\n### Bug Fixes\n\n- **docz-core:** add react docgen loader inside happypack ([4433561](https://github.com/pedronauck/docz/commit/4433561))\n- **docz-core:** close data server when need ([6a2b96a](https://github.com/pedronauck/docz/commit/6a2b96a))\n- **docz-core:** public folder in dev mode ([abb3626](https://github.com/pedronauck/docz/commit/abb3626))\n- **docz-core:** webpack dev server log level ([1d72539](https://github.com/pedronauck/docz/commit/1d72539))\n\n## [0.13.4](https://github.com/pedronauck/docz/compare/v0.13.3...v0.13.4) (2018-12-17)\n\n**Note:** Version bump only for package docz-core\n\n## [0.13.3](https://github.com/pedronauck/docz/compare/v0.13.2...v0.13.3) (2018-12-17)\n\n### Bug Fixes\n\n- **docz-core:** react hot loader config for hooks ([444cac2](https://github.com/pedronauck/docz/commit/444cac2))\n\n### Features\n\n- **docz-core:** add sourcemap config argument ([3baad4a](https://github.com/pedronauck/docz/commit/3baad4a))\n\n## [0.13.2](https://github.com/pedronauck/docz/compare/v0.13.1...v0.13.2) (2018-12-17)\n\n### Bug Fixes\n\n- **docz-core:** ensure dir for promise logger ([6240f21](https://github.com/pedronauck/docz/commit/6240f21))\n\n## [0.13.1](https://github.com/pedronauck/docz/compare/v0.13.0...v0.13.1) (2018-12-17)\n\n### Bug Fixes\n\n- **docz-core:** typescript loader config ([01f568e](https://github.com/pedronauck/docz/commit/01f568e))\n\n# [0.13.0](https://github.com/pedronauck/docz/compare/v0.12.17...v0.13.0) (2018-12-17)\n\n### Bug Fixes\n\n- **docz-core:** add setMaxListener for chokidar watchers ([6053c16](https://github.com/pedronauck/docz/commit/6053c16))\n- **docz-core:** log level based on debug argument ([507e149](https://github.com/pedronauck/docz/commit/507e149))\n- **docz-core:** node path resolve modules merge ([27102fd](https://github.com/pedronauck/docz/commit/27102fd))\n- **docz-core:** turn off htmlMinifier when loading from templates ([#518](https://github.com/pedronauck/docz/issues/518)) ([9cb0e1d](https://github.com/pedronauck/docz/commit/9cb0e1d))\n- **docz-core:** use webpack-dev-server instead of webpack-serve ([4157e05](https://github.com/pedronauck/docz/commit/4157e05))\n\n### Features\n\n- **docz-core:** add onCreateWebpackChain hook ([70bb242](https://github.com/pedronauck/docz/commit/70bb242))\n- **docz-core:** add promise logger using progress-estimator ([2797608](https://github.com/pedronauck/docz/commit/2797608))\n- **docz-core:** use NODE_PATH to resolve modules ([#516](https://github.com/pedronauck/docz/issues/516)) ([cc86f93](https://github.com/pedronauck/docz/commit/cc86f93))\n\n## [0.12.16](https://github.com/pedronauck/docz/compare/v0.12.15...v0.12.16) (2018-12-13)\n\n### Bug Fixes\n\n- **docz-core:** correct koa mounting path on windows systems ([#491](https://github.com/pedronauck/docz/issues/491)) ([6addd32](https://github.com/pedronauck/docz/commit/6addd32))\n\n## [0.12.15](https://github.com/pedronauck/docz/compare/v0.12.14...v0.12.15) (2018-12-04)\n\n### Bug Fixes\n\n- **docz-core:** add setMaxListener in the top of script ([2eef307](https://github.com/pedronauck/docz/commit/2eef307))\n- **docz-core:** update react-hot-loader to support hooks ([4394a5b](https://github.com/pedronauck/docz/commit/4394a5b))\n\n### Features\n\n- add native support for react-native ([f998874](https://github.com/pedronauck/docz/commit/f998874))\n\n## [0.12.14](https://github.com/pedronauck/docz/compare/v0.12.13...v0.12.14) (2018-12-04)\n\n### Bug Fixes\n\n- **docz-core:** set max listener ([898010b](https://github.com/pedronauck/docz/commit/898010b))\n- **docz-core:** watcher close ([caa8151](https://github.com/pedronauck/docz/commit/caa8151))\n\n## [0.12.13](https://github.com/pedronauck/docz/compare/v0.12.12...v0.12.13) (2018-11-23)\n\n**Note:** Version bump only for package docz-core\n\n## [0.12.12](https://github.com/pedronauck/docz/compare/v0.12.11...v0.12.12) (2018-11-16)\n\n**Note:** Version bump only for package docz-core\n\n## [0.12.11](https://github.com/pedronauck/docz/compare/v0.12.10...v0.12.11) (2018-11-15)\n\n### Bug Fixes\n\n- **docz-core:** add happypack again :cry: ([f0e219e](https://github.com/pedronauck/docz/commit/f0e219e))\n- **docz-core:** create app files before start server ([43bc3fd](https://github.com/pedronauck/docz/commit/43bc3fd))\n\n## [0.12.10](https://github.com/pedronauck/docz/compare/v0.12.9...v0.12.10) (2018-11-15)\n\n### Bug Fixes\n\n- **docz-core:** add cache just for non-debug ([cede436](https://github.com/pedronauck/docz/commit/cede436))\n- **docz-core:** add default favicon ([a0ed2ab](https://github.com/pedronauck/docz/commit/a0ed2ab))\n- **docz-core:** add ignore md files by args ([d8c8045](https://github.com/pedronauck/docz/commit/d8c8045))\n- **docz-core:** kill server on signals ([be0855f](https://github.com/pedronauck/docz/commit/be0855f))\n- **docz-core:** use assets from public folder ([210c3a1](https://github.com/pedronauck/docz/commit/210c3a1))\n\n### Features\n\n- **docz-core:** add detect-one-changed in development ([#433](https://github.com/pedronauck/docz/issues/433)) ([0585b97](https://github.com/pedronauck/docz/commit/0585b97))\n- **docz-core:** add two new plugin hooks ([#431](https://github.com/pedronauck/docz/issues/431)) ([f4a122f](https://github.com/pedronauck/docz/commit/f4a122f))\n\n## [0.12.9](https://github.com/pedronauck/docz/compare/v0.12.8...v0.12.9) (2018-11-01)\n\n**Note:** Version bump only for package docz-core\n\n## [0.12.8](https://github.com/pedronauck/docz/compare/v0.12.7...v0.12.8) (2018-10-31)\n\n### Bug Fixes\n\n- **docz-core:** add support to react hooks ([f26a990](https://github.com/pedronauck/docz/commit/f26a990))\n\n## [0.12.7](https://github.com/pedronauck/docz/compare/v0.12.6...v0.12.7) (2018-10-30)\n\n### Bug Fixes\n\n- **docz-core:** webpack chain minimizer config ([ab13208](https://github.com/pedronauck/docz/commit/ab13208))\n\n## [0.12.6](https://github.com/pedronauck/docz/compare/v0.12.5...v0.12.6) (2018-10-30)\n\n### Features\n\n- add support to disable codesandbox ([be94b0e](https://github.com/pedronauck/docz/commit/be94b0e))\n\n<a name=\"0.12.5\"></a>\n\n## [0.12.5](https://github.com/pedronauck/docz/compare/v0.12.4...v0.12.5) (2018-09-30)\n\n### Bug Fixes\n\n- **docz-core:** close dataserver connection on build ([0f6bd7b](https://github.com/pedronauck/docz/commit/0f6bd7b))\n\n<a name=\"0.11.2\"></a>\n\n## [0.11.2](https://github.com/pedronauck/docz/compare/v0.11.1...v0.11.2) (2018-09-11)\n\n### Bug Fixes\n\n- **docz-core:** add watcher outside of update method scope ([18c744d](https://github.com/pedronauck/docz/commit/18c744d))\n- **docz-core:** prevent entries block when parse mdx crash ([07ae769](https://github.com/pedronauck/docz/commit/07ae769))\n- **docz-core:** remove https option and fix message ([#321](https://github.com/pedronauck/docz/issues/321)) ([ea88841](https://github.com/pedronauck/docz/commit/ea88841))\n- heading hash link with hash router config ([7d7f557](https://github.com/pedronauck/docz/commit/7d7f557))\n\n### Features\n\n- add native config for doczrc ([2580712](https://github.com/pedronauck/docz/commit/2580712))\n\n<a name=\"0.11.1\"></a>\n\n## [0.11.1](https://github.com/pedronauck/docz/compare/v0.11.0...v0.11.1) (2018-09-07)\n\n### Bug Fixes\n\n- **docz-core:** basename configuration ([5fad743](https://github.com/pedronauck/docz/commit/5fad743))\n- **docz-core:** chokidar performance improvements ([0c344d8](https://github.com/pedronauck/docz/commit/0c344d8))\n- **docz-core:** literal value of headings for menus ([85e4083](https://github.com/pedronauck/docz/commit/85e4083))\n- **docz-core:** open js and ts loader scope of files ([03c01b7](https://github.com/pedronauck/docz/commit/03c01b7))\n\n### Features\n\n- **docz-core:** add config as parameter for onPrebuild and onPostBuild ([98692bb](https://github.com/pedronauck/docz/commit/98692bb))\n\n<a name=\"0.11.0\"></a>\n\n# [0.11.0](https://github.com/pedronauck/docz/compare/v0.10.3...v0.11.0) (2018-09-02)\n\n### Bug Fixes\n\n- base url and hash router making weird url ([f483638](https://github.com/pedronauck/docz/commit/f483638))\n- **docz-core:** dispose hmr on imports ([ba51086](https://github.com/pedronauck/docz/commit/ba51086))\n- **docz-core:** join head tags ([#255](https://github.com/pedronauck/docz/issues/255)) ([065e8b3](https://github.com/pedronauck/docz/commit/065e8b3))\n- **docz-core:** update react-docgen-typescript-loader to fix props table ([34b2fdf](https://github.com/pedronauck/docz/commit/34b2fdf))\n\n### Features\n\n- **babel-preset-docz:** add new babel preset ([5efb568](https://github.com/pedronauck/docz/commit/5efb568))\n\n<a name=\"0.10.3\"></a>\n\n## [0.10.3](https://github.com/pedronauck/docz/compare/v0.9.6...v0.10.3) (2018-08-16)\n\n### Bug Fixes\n\n- **docz-core:** correct data server websocket port ([47fe714](https://github.com/pedronauck/docz/commit/47fe714))\n- **docz-core:** try catch on get repo info ([2016736](https://github.com/pedronauck/docz/commit/2016736))\n\n### Features\n\n- **docz-core:** add editBranch option to mount repo link ([c619d9c](https://github.com/pedronauck/docz/commit/c619d9c))\n\n<a name=\"0.10.2\"></a>\n\n## [0.10.2](https://github.com/pedronauck/docz/compare/v0.10.1...v0.10.2) (2018-08-13)\n\n### Bug Fixes\n\n- prevent codemirror bug on build ([3d0894e](https://github.com/pedronauck/docz/commit/3d0894e))\n- **docz-core:** remove data server cache :confused: ([9683280](https://github.com/pedronauck/docz/commit/9683280))\n- **docz-core:** try catch on get repo info ([bdfbf0b](https://github.com/pedronauck/docz/commit/bdfbf0b))\n\n<a name=\"0.10.1\"></a>\n\n## [0.10.1](https://github.com/pedronauck/docz/compare/v0.10.0...v0.10.1) (2018-08-13)\n\n### Bug Fixes\n\n- **docz-core:** prevent crash when not have cache ([cd3609a](https://github.com/pedronauck/docz/commit/cd3609a))\n\n<a name=\"0.10.0\"></a>\n\n# [0.10.0](https://github.com/pedronauck/docz/compare/v0.9.6...v0.10.0) (2018-08-13)\n\n### Bug Fixes\n\n- **docz-core:** prevent crash on delete entry ([28e1728](https://github.com/pedronauck/docz/commit/28e1728))\n- **docz-core:** prevent delete entire app folder on build ([e345896](https://github.com/pedronauck/docz/commit/e345896))\n\n### Features\n\n- **docz-core:** add cache system for entries ([b90e598](https://github.com/pedronauck/docz/commit/b90e598))\n- **docz-core:** add htmlContext and mini-html-webpack-plugin ([4b6ec0f](https://github.com/pedronauck/docz/commit/4b6ec0f))\n- **docz-core:** resolve markdown files by default ([#210](https://github.com/pedronauck/docz/issues/210)) ([e0a95b3](https://github.com/pedronauck/docz/commit/e0a95b3))\n- add github repository link ([78a19f6](https://github.com/pedronauck/docz/commit/78a19f6))\n\n<a name=\"0.9.6\"></a>\n\n## [0.9.6](https://github.com/pedronauck/docz/compare/v0.9.5...v0.9.6) (2018-08-06)\n\n### Bug Fixes\n\n- **docz-core:** remove [@babel](https://github.com/babel)/runtime alias ([0dbd8f0](https://github.com/pedronauck/docz/commit/0dbd8f0))\n\n<a name=\"0.9.4\"></a>\n\n## [0.9.4](https://github.com/pedronauck/docz/compare/v0.9.4-beta.1...v0.9.4) (2018-08-04)\n\n### Bug Fixes\n\n- **docz-core:** use of src config in edit button link ([#186](https://github.com/pedronauck/docz/issues/186)) ([553f90c](https://github.com/pedronauck/docz/commit/553f90c))\n- remove external deps ([470bdd3](https://github.com/pedronauck/docz/commit/470bdd3))\n\n<a name=\"0.9.3\"></a>\n\n## [0.9.3](https://github.com/pedronauck/docz/compare/v0.9.2...v0.9.3) (2018-08-03)\n\n### Bug Fixes\n\n- **docz-core:** use of src config in edit button link ([#186](https://github.com/pedronauck/docz/issues/186)) ([553f90c](https://github.com/pedronauck/docz/commit/553f90c))\n\n<a name=\"0.9.2\"></a>\n\n## [0.9.2](https://github.com/pedronauck/docz/compare/v0.9.1...v0.9.2) (2018-08-02)\n\n### Bug Fixes\n\n- **docz-core:** add isProd to remove hot client overlay on build ([83f2e36](https://github.com/pedronauck/docz/commit/83f2e36))\n\n<a name=\"0.9.1\"></a>\n\n## [0.9.1](https://github.com/pedronauck/docz/compare/v0.9.0...v0.9.1) (2018-08-02)\n\n### Bug Fixes\n\n- **docz:** finish process after build ([58bebb6](https://github.com/pedronauck/docz/commit/58bebb6))\n\n<a name=\"0.9.0\"></a>\n\n# [0.9.0](https://github.com/pedronauck/docz/compare/v0.9.0-beta.1...v0.9.0) (2018-08-02)\n\n### Bug Fixes\n\n- **docz:** using context for imports to prevent disposed hmr ([b37284c](https://github.com/pedronauck/docz/commit/b37284c))\n- **docz-plugin-babel6:** change babel syntax dynamic import when needed ([8cb278a](https://github.com/pedronauck/docz/commit/8cb278a))\n\n<a name=\"0.9.0-beta.1\"></a>\n\n# [0.9.0-beta.1](https://github.com/pedronauck/docz/compare/v0.9.0-beta.0...v0.9.0-beta.1) (2018-08-01)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.9.0-beta.0\"></a>\n\n# [0.9.0-beta.0](https://github.com/pedronauck/docz/compare/v0.8.0...v0.9.0-beta.0) (2018-08-01)\n\n### Bug Fixes\n\n- **docz-core:** remove babel plugin/presets when needed ([011baad](https://github.com/pedronauck/docz/commit/011baad))\n\n### Features\n\n- **docz-core:** add webpack-serve-overlay as error overlay ([263badf](https://github.com/pedronauck/docz/commit/263badf))\n- **docz-core:** support env files to set configuration ([#171](https://github.com/pedronauck/docz/issues/171)) ([259b72d](https://github.com/pedronauck/docz/commit/259b72d)), closes [#140](https://github.com/pedronauck/docz/issues/140)\n- **docz-theme-default:** add edit button for document ([#180](https://github.com/pedronauck/docz/issues/180)) ([e125a4f](https://github.com/pedronauck/docz/commit/e125a4f))\n\n<a name=\"0.8.0\"></a>\n\n# [0.8.0](https://github.com/pedronauck/docz/compare/v0.7.1...v0.8.0) (2018-07-28)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.7.0\"></a>\n\n# [0.7.0](https://github.com/pedronauck/docz/compare/v0.6.2...v0.7.0) (2018-07-23)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.6.2\"></a>\n\n## [0.6.2](https://github.com/pedronauck/docz/compare/v0.6.1...v0.6.2) (2018-07-20)\n\n### Bug Fixes\n\n- **docz-core:** set env vars for commands ([29f0098](https://github.com/pedronauck/docz/commit/29f0098))\n\n<a name=\"0.6.0\"></a>\n\n# [0.6.0](https://github.com/pedronauck/docz/compare/v0.5.9...v0.6.0) (2018-07-19)\n\n### Bug Fixes\n\n- **docz-core:** add error when dest is working directory ([b1c87b5](https://github.com/pedronauck/docz/commit/b1c87b5))\n- **docz-core:** process.env vars for scripts ([f6b6260](https://github.com/pedronauck/docz/commit/f6b6260))\n- **docz-core:** serve static files from public ([c866856](https://github.com/pedronauck/docz/commit/c866856))\n\n### Features\n\n- **docz-core:** add onCreateApp plugin method ([13c07e7](https://github.com/pedronauck/docz/commit/13c07e7))\n\n<a name=\"0.5.9\"></a>\n\n## [0.5.9](https://github.com/pedronauck/docz/compare/v0.5.8...v0.5.9) (2018-07-16)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.5.7\"></a>\n\n## [0.5.7](https://github.com/pedronauck/docz/compare/v0.5.6...v0.5.7) (2018-07-11)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.5.6\"></a>\n\n## [0.5.6](https://github.com/pedronauck/docz/compare/v0.5.5...v0.5.6) (2018-07-11)\n\n### Features\n\n- **docz-core:** add webpack-serve-waitpage ([83c493b](https://github.com/pedronauck/docz/commit/83c493b))\n\n<a name=\"0.5.5\"></a>\n\n## [0.5.5](https://github.com/pedronauck/docz/compare/v0.5.4...v0.5.5) (2018-07-07)\n\n### Bug Fixes\n\n- **docz-core:** add ordering to initial config data object ([2926ade](https://github.com/pedronauck/docz/commit/2926ade))\n\n<a name=\"0.5.4\"></a>\n\n## [0.5.4](https://github.com/pedronauck/docz/compare/v0.5.3...v0.5.4) (2018-07-07)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.5.2\"></a>\n\n## [0.5.2](https://github.com/pedronauck/docz/compare/v0.5.1...v0.5.2) (2018-07-05)\n\n### Bug Fixes\n\n- **docz-core:** remove unnescessary Entry.check ([1871db8](https://github.com/pedronauck/docz/commit/1871db8))\n\n<a name=\"0.5.1\"></a>\n\n## [0.5.1](https://github.com/pedronauck/docz/compare/v0.3.4...v0.5.1) (2018-07-03)\n\n### Bug Fixes\n\n- **docz-core:** add a fallback name on Entry ([ec38139](https://github.com/pedronauck/docz/commit/ec38139))\n- **docz-core:** app running port message ([4aec595](https://github.com/pedronauck/docz/commit/4aec595))\n- **docz-core:** check name on package json ([6cdbebc](https://github.com/pedronauck/docz/commit/6cdbebc))\n\n### Features\n\n- **docz-core:** add ordering property for config ([efd215e](https://github.com/pedronauck/docz/commit/efd215e))\n- **docz-core:** read name from package.json to populate initial title ([1eeb049](https://github.com/pedronauck/docz/commit/1eeb049))\n\n<a name=\"0.5.0\"></a>\n\n# [0.5.0](https://github.com/pedronauck/docz/compare/v0.3.4...v0.5.0) (2018-07-03)\n\n### Bug Fixes\n\n- **docz-core:** add a fallback name on Entry ([ec38139](https://github.com/pedronauck/docz/commit/ec38139))\n- **docz-core:** app running port message ([1b94114](https://github.com/pedronauck/docz/commit/1b94114))\n\n### Features\n\n- **docz-core:** add ordering property for config ([a6c307d](https://github.com/pedronauck/docz/commit/a6c307d))\n- **docz-core:** read name from package.json to populate initial title ([4f10a6d](https://github.com/pedronauck/docz/commit/4f10a6d))\n\n<a name=\"0.4.0\"></a>\n\n# [0.4.0](https://github.com/pedronauck/docz/compare/v0.3.4...v0.4.0) (2018-06-30)\n\n### Bug Fixes\n\n- **docz-core:** add a fallback name on Entry ([ec38139](https://github.com/pedronauck/docz/commit/ec38139))\n\n<a name=\"0.3.4\"></a>\n\n## [0.3.4](https://github.com/pedronauck/docz/compare/v0.3.3...v0.3.4) (2018-06-26)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.3.3\"></a>\n\n## [0.3.3](https://github.com/pedronauck/docz/compare/v0.3.2...v0.3.3) (2018-06-26)\n\n### Bug Fixes\n\n- **docz-core:** copy templates files for dist ([#88](https://github.com/pedronauck/docz/issues/88)) ([5e4b98d](https://github.com/pedronauck/docz/commit/5e4b98d))\n\n<a name=\"0.3.2\"></a>\n\n## [0.3.2](https://github.com/pedronauck/docz/compare/v0.3.1...v0.3.2) (2018-06-25)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.3.1\"></a>\n\n## [0.3.1](https://github.com/pedronauck/docz/compare/v0.2.11...v0.3.1) (2018-06-25)\n\n### Bug Fixes\n\n- use docz-theme-default as docz-core dependency ([1a2fb67](https://github.com/pedronauck/docz/commit/1a2fb67))\n\n<a name=\"0.2.11\"></a>\n\n## [0.2.11](https://github.com/pedronauck/docz/compare/v0.2.10...v0.2.11) (2018-06-22)\n\n### Bug Fixes\n\n- **docz-core:** node env for production ([615aa1f](https://github.com/pedronauck/docz/commit/615aa1f))\n\n<a name=\"0.2.10\"></a>\n\n## [0.2.10](https://github.com/pedronauck/docz/compare/v0.2.9...v0.2.10) (2018-06-21)\n\n### Features\n\n- **docz-plugin-css:** add initial version ([#78](https://github.com/pedronauck/docz/issues/78)) ([299372e](https://github.com/pedronauck/docz/commit/299372e))\n\n<a name=\"0.2.9\"></a>\n\n## [0.2.9](https://github.com/pedronauck/docz/compare/v0.2.8...v0.2.9) (2018-06-21)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.2.8\"></a>\n\n## [0.2.8](https://github.com/pedronauck/docz/compare/v0.2.7...v0.2.8) (2018-06-21)\n\n### Bug Fixes\n\n- **docz-core:** typescript resolve extensions ([689b057](https://github.com/pedronauck/docz/commit/689b057))\n\n<a name=\"0.2.7\"></a>\n\n## [0.2.7](https://github.com/pedronauck/docz/compare/v0.2.6...v0.2.7) (2018-06-20)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.2.6\"></a>\n\n## [0.2.6](https://github.com/pedronauck/docz/compare/v0.2.5...v0.2.6) (2018-06-17)\n\n### Bug Fixes\n\n- **docz-core:** change filepath entry for windows ([#31](https://github.com/pedronauck/docz/issues/31)) ([14bf0e2](https://github.com/pedronauck/docz/commit/14bf0e2))\n\n<a name=\"0.2.4\"></a>\n\n## [0.2.4](https://github.com/pedronauck/docz/compare/v0.2.3...v0.2.4) (2018-06-13)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.2.3\"></a>\n\n## [0.2.3](https://github.com/pedronauck/docz/compare/v0.2.2...v0.2.3) (2018-06-13)\n\n### Bug Fixes\n\n- **docz-core:** change config hosts to support windows os ([9e3c4f6](https://github.com/pedronauck/docz/commit/9e3c4f6))\n\n<a name=\"0.2.2\"></a>\n\n## [0.2.2](https://github.com/pedronauck/docz/compare/v0.2.1...v0.2.2) (2018-06-12)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.2.0\"></a>\n\n# [0.2.0](https://github.com/pedronauck/docz/compare/v0.2.0-beta.2...v0.2.0) (2018-06-11)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.2.0-beta.2\"></a>\n\n# [0.2.0-beta.2](https://github.com/doczjs/docz/compare/v0.2.0-beta.1...v0.2.0-beta.2) (2018-06-10)\n\n### Bug Fixes\n\n- **docz-core:** autolink headings ([0b8369d](https://github.com/doczjs/docz/commit/0b8369d))\n\n<a name=\"0.2.0-beta.1\"></a>\n\n# [0.2.0-beta.1](https://github.com/doczjs/docz/compare/v0.2.0-beta.0...v0.2.0-beta.1) (2018-06-10)\n\n### Features\n\n- **docz-core:** add headings property for entries and autolink on headings ([7711c3c](https://github.com/doczjs/docz/commit/7711c3c))\n\n<a name=\"0.2.0-beta.0\"></a>\n\n# [0.2.0-beta.0](https://github.com/doczjs/docz/compare/v0.1.2-beta.6...v0.2.0-beta.0) (2018-06-10)\n\n### Features\n\n- **docz-core:** add indexHtml property on project configuration ([6bb5167](https://github.com/doczjs/docz/commit/6bb5167))\n\n<a name=\"0.1.2-beta.5\"></a>\n\n## [0.1.2-beta.5](https://github.com/doczjs/docz/compare/v0.1.2-beta.4...v0.1.2-beta.5) (2018-06-09)\n\n### Bug Fixes\n\n- **docz-core:** build when base prop ([6001171](https://github.com/doczjs/docz/commit/6001171))\n\n<a name=\"0.1.2-beta.1\"></a>\n\n## [0.1.2-beta.1](https://github.com/doczjs/docz/compare/v0.1.2-beta.0...v0.1.2-beta.1) (2018-06-09)\n\n### Features\n\n- **docz-core:** add base config argument ([20f29c2](https://github.com/doczjs/docz/commit/20f29c2))\n- **docz-core:** add dest config property ([d6c5506](https://github.com/doczjs/docz/commit/d6c5506))\n- **docz-core:** add modifyBundlerConfig configuration property ([ec04bee](https://github.com/doczjs/docz/commit/ec04bee))\n- **docz-core:** use html template as component ([b7a2dc0](https://github.com/doczjs/docz/commit/b7a2dc0))\n\n<a name=\"0.1.2-beta.0\"></a>\n\n## [0.1.2-beta.0](https://github.com/doczjs/docz/compare/v0.1.1...v0.1.2-beta.0) (2018-06-02)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.1.1-beta.5\"></a>\n\n## [0.1.1-beta.5](https://github.com/doczjs/docz/compare/v0.1.1-beta.4...v0.1.1-beta.5) (2018-06-01)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.1.1-beta.4\"></a>\n\n## [0.1.1-beta.4](https://github.com/doczjs/docz/compare/v0.1.1-beta.3...v0.1.1-beta.4) (2018-05-29)\n\n### Bug Fixes\n\n- **docz-core:** module rule test for typescript ([bdeffc1](https://github.com/doczjs/docz/commit/bdeffc1))\n\n<a name=\"0.1.1-beta.3\"></a>\n\n## [0.1.1-beta.3](https://github.com/doczjs/docz/compare/v0.1.1-beta.2...v0.1.1-beta.3) (2018-05-29)\n\n**Note:** Version bump only for package docz-core\n\n<a name=\"0.1.0\"></a>\n\n# 0.1.0 (2018-05-29)\n\n### Bug Fixes\n\n- **docz-core:** async plugin ([ddfbcf1](https://github.com/doczjs/docz/commit/ddfbcf1))\n- **docz-core:** check if found name exist when parse entry ([f75881e](https://github.com/doczjs/docz/commit/f75881e))\n- **docz-core:** config watch for directory operations ([43fa7ab](https://github.com/doczjs/docz/commit/43fa7ab))\n- **docz-core:** create plugin to fix paragraph parse on mdx ([42b4f05](https://github.com/doczjs/docz/commit/42b4f05))\n- **docz-core:** data server class ([12c0558](https://github.com/doczjs/docz/commit/12c0558))\n- **docz-core:** don't exit when catch prettier ([5423d96](https://github.com/doczjs/docz/commit/5423d96))\n- **docz-core:** entries rewrite ([986ba65](https://github.com/doczjs/docz/commit/986ba65))\n- **docz-core:** entries updates ([7147ac1](https://github.com/doczjs/docz/commit/7147ac1))\n- **docz-core:** throw error when parse ast ([05138bf](https://github.com/doczjs/docz/commit/05138bf))\n\n### Features\n\n- **docz-core:** add build command ([ef7abd2](https://github.com/doczjs/docz/commit/ef7abd2))\n- **docz-core:** add chokidar to watch new entries ([2f073d5](https://github.com/doczjs/docz/commit/2f073d5))\n- **docz-core:** add entry settings field ([2ec5d66](https://github.com/doczjs/docz/commit/2ec5d66))\n- **docz-core:** add playground code parse section ([6bbf158](https://github.com/doczjs/docz/commit/6bbf158))\n- **docz-core:** add setConfig method for Plugin ([9ba6507](https://github.com/doczjs/docz/commit/9ba6507))\n- **docz-core:** add support for custom head or scripts ([69f4d56](https://github.com/doczjs/docz/commit/69f4d56))\n- **docz-core:** add support for parse sections via ast ([6db0cd8](https://github.com/doczjs/docz/commit/6db0cd8))\n- **docz-core:** add title and description on settings ([ad9ee58](https://github.com/doczjs/docz/commit/ad9ee58))\n- **docz-core:** add typescript support ([17dae8b](https://github.com/doczjs/docz/commit/17dae8b))\n- **docz-core:** improve plugin and add support to modify babel ([cf3ec4e](https://github.com/doczjs/docz/commit/cf3ec4e))\n- add component props parse feature ([987627d](https://github.com/doczjs/docz/commit/987627d))\n- **docz-core:** pass theme config via websockets for dev ([5222de7](https://github.com/doczjs/docz/commit/5222de7))\n- **docz-core:** use websockets instead of generate json to process entries ([e0773a0](https://github.com/doczjs/docz/commit/e0773a0))\n- **docz-theme-default:** add logo option ([435da9b](https://github.com/doczjs/docz/commit/435da9b))\n- add support for highlight code sections ([19bf7ea](https://github.com/doczjs/docz/commit/19bf7ea))\n- improve docz theme to use theme config ([9207ed2](https://github.com/doczjs/docz/commit/9207ed2))\n- refac to use mdx ([04b59e5](https://github.com/doczjs/docz/commit/04b59e5))\n"
  },
  {
    "path": "core/docz-core/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) 2018 Pedro Nauck\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": "core/docz-core/README.md",
    "content": "## docz-core\n\nAll CLI commands are built here and imported from `docz` package using `./bin` script.\n\nCode in this package does not run on the browser, it runs on node.\n\nUnless you're looking to contribute to docz, you probably don't care about this package and are looking for [the docz package documentation](https://github.com/doczjs/docz)."
  },
  {
    "path": "core/docz-core/__fixtures__/Alert/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "core/docz-core/__fixtures__/Alert/Alert.tsx",
    "content": "import React, { FC } from 'react'\nimport styled from '@emotion/styled'\n\nexport type Kind = 'info' | 'positive' | 'negative' | 'warning'\nexport type KindMap = Record<Kind, string>\n\nconst kinds: KindMap = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport interface AlertProps {\n  /**\n   * Set this to change alert kind\n   * @default info\n   */\n  kind: 'info' | 'positive' | 'negative' | 'warning'\n}\n\nconst AlertStyled = styled('div')<AlertProps>`\n  padding: 15px 20px;\n  background: white;\n  border-radius: 3px;\n  color: white;\n  background: ${({ kind = 'info' }) => kinds[kind]};\n`\n\nexport const Alert: FC<AlertProps> = ({ kind, ...props }) => (\n  <AlertStyled {...props} kind={kind} />\n)\n"
  },
  {
    "path": "core/docz-core/__fixtures__/Label.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst Label = ({ text, ...props }) => (\n  <div className=\"label\" {...props}>\n    {text}\n  </div>\n)\n\nLabel.propTypes = {\n  /** A nice string */\n  text: t.string,\n}\n\nexport default Label\n"
  },
  {
    "path": "core/docz-core/__fixtures__/Label.tsx",
    "content": "import React, { FC } from 'react'\n\nexport interface LabelProps {\n  /**\n   * Set this to do the thing\n   * @default info\n   */\n  text: string\n}\n\nconst Label: FC<LabelProps> = ({ text, ...props }) => (\n  <div className=\"label\" {...props}>\n    {text}\n  </div>\n)\n\nexport default Label\n"
  },
  {
    "path": "core/docz-core/__tests__/config.test.ts",
    "content": "import * as path from 'path'\nimport { setArgs } from '../src/config/argv'\nimport { getBaseConfig } from '../src/config/docz'\nimport { getThemesDir } from '../src/config/paths'\nimport yargs from 'yargs'\n\ndescribe('config.argv & config.docz', () => {\n  test('works', () => {\n    const { argv } = setArgs(yargs)\n    // expect(argv).toMatchInlineSnapshot(`undefined`)\n    //@ts-ignore\n    getBaseConfig(argv, {})\n    // expect(c)\n  })\n})\n\ndescribe('getThemeDir', () => {\n  test('returns src/ for default config', () => {\n    const { argv } = setArgs(yargs)\n    //@ts-ignore\n    const config = getBaseConfig(argv, {})\n\n    expect(getThemesDir(config)).toBe(path.join(config.root, '/src'))\n  })\n\n  test('returns correct path for custom themesDir entry', () => {\n    const { argv } = setArgs(yargs)\n    //@ts-ignore\n    const config = getBaseConfig(argv, { themesDir: 'theme' })\n\n    expect(getThemesDir(config)).toBe(path.join(config.root, '/theme'))\n  })\n\n  test('custom themesDir entries with trailing slashes are handled correctly', () => {\n    const { argv } = setArgs(yargs)\n    //@ts-ignore\n    const config = getBaseConfig(argv, { themesDir: 'theme/' })\n\n    expect(getThemesDir(config)).toBe(path.join(config.root, '/theme'))\n  })\n})\n"
  },
  {
    "path": "core/docz-core/__tests__/entries.test.ts",
    "content": "import { Entries } from '../src/lib/Entries'\nimport { getTestConfig } from '../src/test-utils'\n\ndescribe('Entries', () => {\n  test('get entries', async () => {\n    const config = getTestConfig()\n    const entries = new Entries(config)\n    expect(entries).toBeTruthy()\n  })\n})\n"
  },
  {
    "path": "core/docz-core/__tests__/props.test.ts",
    "content": "import * as fs from 'fs-extra'\nimport { getPattern, initial } from '../src/states/props'\nimport { readCacheFile } from '../src/utils/docgen/typescript'\nimport { getTestConfig, mockedParams } from '../src/test-utils'\n\ndescribe('props', () => {\n  beforeEach(() => {\n    if (fs.existsSync('./.docz/.cache/propsParser.json')) {\n      fs.unlinkSync('./.docz/.cache/propsParser.json')\n    }\n  })\n\n  describe('typescript', () => {\n    test('should set props from typescript files', async () => {\n      const config = getTestConfig()\n      const pattern = getPattern(config)\n      const data = initial(config, pattern)\n      const params = mockedParams()\n      await data(params)\n      expect(params.getState().props.length).toBeGreaterThan(0)\n    })\n\n    test('should set correct key on parsed typescript files', async () => {\n      const config = getTestConfig()\n      const pattern = getPattern(config)\n      const data = initial(config, pattern)\n      const params = mockedParams()\n      await data(params)\n      const expectedFirstPropName = '__fixtures__/Label.tsx'\n      const firstProp = params.getState().props[0]\n      expect(firstProp.key).toEqual(expectedFirstPropName)\n      expect(firstProp.value).toBeTruthy()\n    })\n  })\n\n  describe('javascript', () => {\n    test('should set correct key on parsed javascript files', async () => {\n      const config = getTestConfig({ typescript: undefined })\n      const pattern = getPattern(config)\n      const data = initial(config, pattern)\n      const params = mockedParams()\n      await data(params)\n      const expectedFirstPropName = '__fixtures__/Label.jsx'\n      const firstProp = params.getState().props[0]\n      expect(firstProp.key).toEqual(expectedFirstPropName)\n      expect(firstProp.value).toBeTruthy()\n    })\n\n    test('should set props from javascript files', async () => {\n      const config = getTestConfig({ typescript: undefined })\n      const pattern = getPattern(config)\n      const data = initial(config, pattern)\n      const params = mockedParams()\n      await data(params)\n      expect(params.getState().props.length).toBeGreaterThan(0)\n    })\n\n    test('should have props on javascript files', async () => {\n      const config = getTestConfig({ typescript: undefined })\n      const pattern = getPattern(config)\n      const data = initial(config, pattern)\n      const params = mockedParams()\n      await data(params)\n      const firstProp = params.getState().props[0]\n      expect(firstProp.value[0].props).toBeTruthy()\n    })\n  })\n\n  describe('cache', () => {\n    test('should have empty cache on start', async () => {\n      const cache = readCacheFile()\n      expect(cache).toBeNull()\n    })\n\n    test('should set cache on loading props', async () => {\n      const cache = readCacheFile()\n      expect(cache).toBeNull()\n      const config = getTestConfig()\n      const pattern = getPattern(config)\n      const data = initial(config, pattern)\n      const params = mockedParams()\n      await data(params)\n      expect(readCacheFile()).not.toBeNull()\n    })\n  })\n})\n"
  },
  {
    "path": "core/docz-core/__tests__/states.test.ts",
    "content": "import * as states from '../src/states/index'\nimport { createConfigStateInput } from '../src/test-utils/data-bank'\nimport { getBaseConfig } from '../src/config/docz'\nimport * as paths from '../src/config/paths'\nimport { Entries } from '../src/lib/Entries'\nimport { setArgs } from '../src/config/argv'\n\ndescribe('states', () => {\n  test('exports', () => {\n    expect(states).toBeDefined()\n    expect(typeof states.config).toEqual('function')\n    expect(typeof states.entries).toEqual('function')\n    expect(typeof states.props).toEqual('function')\n  })\n})\n\ndescribe('states.config', () => {\n  test('config returns valid state', () => {\n    const state = states.config({})\n    expect(typeof state.close).toEqual('function')\n    expect(typeof state.start).toEqual('function')\n    expect(state.id).toEqual('config')\n    state.close()\n  })\n  test('config state writes config to state when started', async () => {\n    const config = createConfigStateInput()\n    const setState = jest.fn()\n    const getState = jest.fn()\n    const state = states.config(config)\n    await state.start({ getState, setState })\n    delete config.paths\n    delete config.src\n    expect(setState).toBeCalledWith('config', expect.objectContaining(config))\n    state.close()\n  })\n})\n\ndescribe('states.entries', () => {\n  test('entries returns start-able state', async () => {\n    const yargs = {\n      argv: {},\n      option: jest.fn().mockImplementation((key, value) => {\n        yargs.argv[value.alias ? value.alias : key] = value.default\n        return yargs\n      }),\n    }\n    const { argv } = setArgs(yargs)\n    //@ts-ignore\n    const config = { ...getBaseConfig(argv), paths }\n    const entries = new Entries(config)\n    const state = states.entries(entries, config)\n    const setState = jest.fn()\n    const getState = jest.fn()\n    await state.start({ getState, setState })\n    expect(getState).toBeCalledWith()\n    // expect(setState).toBeCalledWith('entries', [])\n    state.close()\n  })\n})\n"
  },
  {
    "path": "core/docz-core/bin/index.js",
    "content": "require('../dist/').cli()\n"
  },
  {
    "path": "core/docz-core/nodemon.json",
    "content": "{\n  \"ignore\": [\"dist/\"],\n  \"//verbose\": true,\n  \"exec\": \"yarn build && node bin/index.js init\",\n  \"ext\": \"js,ts,json\"\n}\n"
  },
  {
    "path": "core/docz-core/package.json",
    "content": "{\n  \"name\": \"docz-core\",\n  \"version\": \"2.4.0\",\n  \"description\": \"All docz core logic of bundle and parsing is included on this package\",\n  \"license\": \"MIT\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.esm.js\",\n  \"typings\": \"dist/index.d.ts\",\n  \"files\": [\n    \"dist/\",\n    \"package.json\",\n    \"README.md\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"core/docz-core\"\n  },\n  \"scripts\": {\n    \"build\": \"yarn cross-env NODE_ENV=production rollup -c\",\n    \"dev\": \"yarn cross-env NODE_ENV=development yarn build -w\",\n    \"fix\": \"yarn lint --fix\",\n    \"lint\": \"yarn eslint . --ext mdx,ts,tsx\",\n    \"precommit\": \"lint-staged\",\n    \"prepare\": \"yarn build\",\n    \"test\": \"yarn jest\"\n  },\n  \"peerDependencies\": {\n    \"typescript\": \"^3.5.0 || ^4.0.0\"\n  },\n  \"dependencies\": {\n    \"@sindresorhus/slugify\": \"^0.9.1\",\n    \"chalk\": \"^2.4.2\",\n    \"chokidar\": \"^3.0.2\",\n    \"cross-spawn\": \"^7.0.2\",\n    \"detect-port\": \"^1.3.0\",\n    \"docz-utils\": \"^2.4.0\",\n    \"env-dot-prop\": \"^2.0.1\",\n    \"fast-deep-equal\": \"^2.0.1\",\n    \"fast-glob\": \"^3.0.4\",\n    \"find-up\": \"^4.1.0\",\n    \"fs-extra\": \"^8.1.0\",\n    \"gatsby-plugin-eslint\": \"^2.0.5\",\n    \"gatsby-plugin-typescript\": \"^2.1.6\",\n    \"get-pkg-repo\": \"4.1.1\",\n    \"humanize-string\": \"^2.1.0\",\n    \"load-cfg\": \"^2.4.0\",\n    \"lodash\": \"^4.17.14\",\n    \"minimatch\": \"^3.0.4\",\n    \"open\": \"^7.0.3\",\n    \"ora\": \"^3.4.0\",\n    \"react-docgen\": \"^4.1.1\",\n    \"react-docgen-actual-name-handler\": \"^2.4.0\",\n    \"react-docgen-external-proptypes-handler\": \"^1.0.3\",\n    \"react-docgen-typescript\": \"^2.1.0\",\n    \"recast\": \"^0.18.1\",\n    \"resolve\": \"^1.11.1\",\n    \"shelljs\": \"^0.8.3\",\n    \"signale\": \"^1.4.0\",\n    \"titleize\": \"^2.1.0\",\n    \"tslib\": \"^1.11.1\",\n    \"wait-on\": \"^3.3.0\",\n    \"xstate\": \"^4.6.7\",\n    \"yargs\": \"^13.3.0\"\n  }\n}\n"
  },
  {
    "path": "core/docz-core/rollup.config.js",
    "content": "import { config, copy } from 'docz-rollup'\n\nexport default config({\n  input: './src/index.ts',\n  plugins: [copy('templates', 'dist/templates')],\n})\n"
  },
  {
    "path": "core/docz-core/src/bundler/build.ts",
    "content": "import * as fs from 'fs-extra'\nimport * as path from 'path'\nimport sh from 'shelljs'\n\nimport * as paths from '../config/paths'\nimport { BuildFn } from '../lib/Bundler'\nimport { ensureFiles } from './machine/actions'\nimport { spawnSync } from '../utils/spawn'\n\nexport const build: BuildFn = async (config, dist) => {\n  const publicDir = path.join(paths.docz, 'public')\n  const cliArgs = ['run', 'build']\n\n  if (typeof config.base === 'string' && config.base.length) {\n    cliArgs.push('--')\n    // Append gatsby option `--prefix-paths`to CLI args which will prepend pathPrefix from gatsby-config to urls\n    // https://www.gatsbyjs.org/docs/path-prefix/\n    cliArgs.push('--prefix-paths')\n  }\n  ensureFiles({ args: config })\n  sh.cd(paths.docz)\n  spawnSync('npm', cliArgs)\n  await fs.copy(publicDir, dist)\n}\n"
  },
  {
    "path": "core/docz-core/src/bundler/index.ts",
    "content": "import { Bundler } from '../lib/Bundler'\nimport { Config as Args } from '../config/argv'\n\nimport { server } from './server'\nimport { build } from './build'\n\nexport const bundler = (args: Args) => {\n  return new Bundler({ args, build, server: server(args) })\n}\n"
  },
  {
    "path": "core/docz-core/src/bundler/machine/actions.ts",
    "content": "import * as path from 'path'\nimport * as fs from 'fs-extra'\nimport { assign, Event } from 'xstate'\nimport { assoc } from 'lodash/fp'\nimport glob from 'fast-glob'\nimport log from 'signale'\nimport sh from 'shelljs'\n\nimport * as paths from '../../config/paths'\nimport { ServerMachineCtx } from './context'\nimport { copyDoczRc } from './services/create-resources'\n\nconst ensureFile = (filename: string, toDelete?: string) => {\n  const ghost = path.resolve(paths.docz, toDelete || filename)\n  const original = path.resolve(paths.root, filename)\n  if (fs.pathExistsSync(ghost) && !fs.pathExistsSync(original)) {\n    fs.removeSync(ghost)\n  }\n}\n\nexport const ensureFiles = ({ args }: ServerMachineCtx) => {\n  // themesDir defaults to \"src\" to behave like a normal gatsby site\n  const appPath = path.join(paths.root, args.themesDir)\n  const themeNames = glob.sync('gatsby-theme-**', {\n    cwd: appPath,\n    onlyDirectories: true,\n  })\n  themeNames.forEach(themeName => {\n    fs.copySync(\n      path.join(appPath, themeName),\n      path.join(paths.docz, 'src', themeName)\n    )\n  })\n  const userPagesPath = path.join(appPath, 'pages')\n  const doczPagesPath = path.join(paths.docz, 'src', 'pages')\n  // Copy 404 and other possible Gatsby pages\n  if (fs.existsSync(userPagesPath)) {\n    fs.copySync(userPagesPath, doczPagesPath)\n  }\n\n  copyDoczRc(args.config)\n  ensureFile('gatsby-browser.js')\n  ensureFile('gatsby-ssr.js')\n  ensureFile('gatsby-node.js')\n  ensureFile('gatsby-config.js', 'gatsby-config.custom.js')\n\n  const publicPath = path.join(paths.docz, '..', args.public)\n  if (fs.existsSync(publicPath)) {\n    const destinationPath = path.join(paths.docz, 'static', args.public)\n    try {\n      fs.copySync(publicPath, destinationPath)\n    } catch (err) {\n      console.log(\n        `Failed to copy static assets from ${publicPath} to ${destinationPath} : ${err.message}`\n      )\n    }\n  }\n}\n\nexport const getIsFirstInstall = () => {\n  return !sh.test('-e', path.join(paths.docz, 'package.json'))\n}\nexport const getIsDoczRepo = () => {\n  return sh.test('-e', path.join(paths.root, '../../core'))\n}\n\nexport const assignFirstInstall = assign((ctx: ServerMachineCtx) => {\n  const firstInstall = getIsFirstInstall()\n  return assoc('firstInstall', firstInstall, ctx)\n})\n\nexport const checkIsDoczRepo = assign((ctx: ServerMachineCtx) => {\n  const isDoczRepo = getIsDoczRepo()\n  return assoc('isDoczRepo', isDoczRepo, ctx)\n})\n\nexport const logError = (ctx: ServerMachineCtx, ev: Event<any>) => {\n  log.fatal(ev.data)\n  sh.exit(0)\n}\n"
  },
  {
    "path": "core/docz-core/src/bundler/machine/context.ts",
    "content": "import { Config } from '../../config/argv'\n\nexport interface ServerMachineCtx {\n  args: Config\n  doczrcFilepath?: string\n  firstInstall?: boolean\n  isDoczRepo?: boolean\n}\n"
  },
  {
    "path": "core/docz-core/src/bundler/machine/index.ts",
    "content": "import { Machine } from 'xstate'\n\nimport { ServerMachineCtx } from './context'\nimport * as services from './services'\nimport * as actions from './actions'\n\nconst asyncState = (src: string, onDoneTarget?: string) => ({\n  initial: 'exec',\n  states: {\n    exec: {\n      invoke: {\n        src,\n        onDone: 'success',\n        onError: 'failure',\n      },\n    },\n    success: {\n      type: 'final',\n    },\n    failure: {\n      actions: ['logError'],\n      type: 'final',\n    },\n  },\n  onDone: {\n    target: onDoneTarget || 'exit',\n  },\n})\n\nconst machine = Machine<ServerMachineCtx>({\n  id: 'devServer',\n  type: 'parallel',\n  states: {\n    watch: {\n      onEntry: 'ensureFiles',\n      invoke: {\n        src: 'watchFiles',\n      },\n    },\n    server: {\n      initial: 'idle',\n      states: {\n        idle: {\n          on: {\n            START_MACHINE: {\n              actions: ['assignFirstInstall', 'checkIsDoczRepo'],\n              target: 'ensuringDirs',\n            },\n          },\n        },\n        ensuringDirs: asyncState('ensureDirs', 'creatingResources'),\n        creatingResources: asyncState('createResources', 'executingCommand'),\n        executingCommand: asyncState('execDevCommand'),\n        exit: {\n          type: 'final',\n        },\n      },\n    },\n  },\n})\n\nexport const devServerMachine = machine.withConfig({\n  services,\n  actions,\n} as any)\n"
  },
  {
    "path": "core/docz-core/src/bundler/machine/services/create-resources.ts",
    "content": "import * as path from 'path'\nimport * as fs from 'fs-extra'\nimport { omit } from 'lodash/fp'\n\nimport * as paths from '../../../config/paths'\nimport { ServerMachineCtx } from '../context'\nimport { outputFileFromTemplate } from '../../../utils/template'\n\nexport const copyDoczRc = (configPath?: string) => {\n  const sourceDoczRc = configPath\n    ? path.join(paths.root, configPath)\n    : path.join(paths.root, 'doczrc.js')\n\n  const hasDoczRc = fs.existsSync(sourceDoczRc)\n  if (!hasDoczRc) return\n\n  const destinationDoczRc = path.join(paths.docz, 'doczrc.js')\n  try {\n    fs.copySync(sourceDoczRc, destinationDoczRc)\n  } catch (err) {}\n}\n\nconst copyAndModifyPkgJson = async (ctx: ServerMachineCtx) => {\n  const movePath = path.join(paths.docz, 'package.json')\n  // const pkg = await fs.readJSON(filepath, { throws: false })\n  const newPkg = {\n    name: 'docz-app',\n    license: 'MIT',\n    dependencies: {\n      gatsby: 'just-to-fool-cli-never-installed',\n    },\n    scripts: {\n      dev: 'gatsby develop',\n      build: 'gatsby build',\n      serve: 'gatsby serve',\n    },\n    ...(ctx.isDoczRepo && {\n      private: true,\n      workspaces: ['../../../core/**', '../../../other-packages/**'],\n    }),\n  }\n  await fs.outputJSON(movePath, newPkg, { spaces: 2 })\n}\n\nconst writeEslintRc = async () => {\n  const possibleFilenames = [\n    '.eslintrc.js',\n    '.eslintrc.yaml',\n    '.eslintrc.yml',\n    '.eslintrc.json',\n    '.eslintrc',\n  ]\n  for (const filename of possibleFilenames) {\n    const filepath = path.join(paths.root, filename)\n    const dest = path.join(paths.docz, filename)\n    if (fs.pathExistsSync(filepath)) {\n      await fs.copy(filepath, dest)\n      return\n    }\n  }\n}\n\nconst copyDotEnv = () => {\n  const filename = '.env'\n  const filepath = path.join(paths.root, filename)\n  const dest = path.join(paths.docz, filename)\n\n  if (fs.pathExistsSync(filepath)) {\n    fs.copySync(filepath, dest)\n  }\n}\n\nconst copyEslintIgnore = async () => {\n  const filename = '.eslintignore'\n  const filepath = path.join(paths.root, filename)\n  const dest = path.join(paths.docz, filename)\n\n  if (fs.pathExistsSync(filepath)) {\n    await fs.copy(filepath, dest)\n  }\n}\n\nexport const writeDefaultNotFound = async () => {\n  const outputPath = path.join(paths.docz, 'src/pages/404.js')\n  // If it exists then it would have been created in ensureFiles while copying the theme\n  if (fs.existsSync(outputPath)) return\n  await outputFileFromTemplate('404.tpl.js', outputPath, {})\n}\n\nconst writeGatsbyConfig = async ({ args, isDoczRepo }: ServerMachineCtx) => {\n  const outputPath = path.join(paths.docz, 'gatsby-config.js')\n  const config = omit(['plugins'], args)\n  const newConfig = {\n    ...config,\n    root: paths.docz,\n  }\n\n  await outputFileFromTemplate('gatsby-config.tpl.js', outputPath, {\n    isDoczRepo,\n    config: newConfig,\n    opts: JSON.stringify(newConfig),\n  })\n}\n\nconst writeGatsbyConfigNode = async () => {\n  const outputPath = path.join(paths.docz, 'gatsby-node.js')\n  await outputFileFromTemplate('gatsby-node.tpl.js', outputPath)\n}\n\nconst copyGatsbyConfigFile = async (from: string, to: string) => {\n  const filepath = path.join(paths.root, from)\n  const dest = path.join(paths.docz, to)\n  if (fs.pathExistsSync(filepath)) {\n    await fs.copy(filepath, dest)\n  }\n}\n\nconst writeGatsbyConfigCustom = async () =>\n  copyGatsbyConfigFile('gatsby-config.js', 'gatsby-config.custom.js')\n\nconst writeGatsbyNodeCustom = async () =>\n  copyGatsbyConfigFile('gatsby-node.js', 'gatsby-node.custom.js')\n\nconst writeGatsbySSR = async () =>\n  copyGatsbyConfigFile('gatsby-ssr.js', 'gatsby-ssr.js')\n\nconst writeGatsbyBrowser = async () =>\n  copyGatsbyConfigFile('gatsby-browser.js', 'gatsby-browser.js')\n\nexport const createResources = async (ctx: ServerMachineCtx) => {\n  try {\n    copyDoczRc(ctx.args.config)\n    copyDotEnv()\n    await copyAndModifyPkgJson(ctx)\n    await writeEslintRc()\n    await copyEslintIgnore()\n    await writeDefaultNotFound()\n    await writeGatsbyConfig(ctx)\n    await writeGatsbyConfigNode()\n    await writeGatsbyConfigCustom()\n    await writeGatsbyNodeCustom()\n    await writeGatsbyBrowser()\n    await writeGatsbySSR()\n  } catch (err) {\n    console.error(err)\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/bundler/machine/services/ensure-dirs.ts",
    "content": "import * as path from 'path'\nimport * as fs from 'fs-extra'\nimport * as paths from '../../../config/paths'\n\nexport const ensureDirs = async () => {\n  await fs.ensureDir(paths.docz)\n  return await fs.ensureDir(path.join(paths.docz, 'src/pages'))\n}\n"
  },
  {
    "path": "core/docz-core/src/bundler/machine/services/exec-dev-command.ts",
    "content": "import spawn from 'cross-spawn'\nimport waitOn from 'wait-on'\nimport get from 'lodash/get'\nimport path from 'path'\nimport findUp from 'find-up'\n\nimport { ServerMachineCtx } from '../context'\nimport { openBrowser } from '../../../utils/open-browser'\nimport * as paths from '../../../config/paths'\n\nexport const findRootPath = async () => {\n  let repoRootPath = path.join(paths.docz, '../')\n  try {\n    const foundRootPath = await findUp(\n      async directory => {\n        const hasGatsby = await findUp.exists(\n          path.join(directory, 'node_modules', 'gatsby')\n        )\n        return hasGatsby ? directory : ''\n      },\n      { type: 'directory' }\n    )\n    if (typeof foundRootPath === 'string') {\n      repoRootPath = foundRootPath\n    }\n  } catch (err) {\n    console.log(\n      `Failed to find root folder ${err.message} \\n Assuming it is ${repoRootPath}`\n    )\n  }\n  return repoRootPath\n}\n\nexport const execDevCommand = async ({ args }: ServerMachineCtx) => {\n  // For monorepos that install dependencies higher in the fs tree\n  const repoRootPath = get(args, 'repoRootPath', await findRootPath())\n  const gatsbyPath = path.join(repoRootPath, 'node_modules/.bin/gatsby')\n  // const cliArgs = process.argv.slice(3)\n\n  // Has --https flag to enable https in dev mode\n  const useHttps = args.https\n  const caFile = args.caFile\n  const keyFile = args.keyFile\n  const certFile = args.certFile\n  const caFileOption = caFile ? ['--ca-file', caFile] : []\n  const keyFileOption = keyFile ? ['--key-file', keyFile] : []\n  const certFileOption = certFile ? ['--cert-file', certFile] : []\n\n  spawn(\n    gatsbyPath,\n    [\n      'develop',\n      '--host',\n      `${args.host}`,\n      '--port',\n      `${args.port}`,\n      useHttps ? '--https' : '',\n      ...caFileOption,\n      ...keyFileOption,\n      ...certFileOption,\n    ].filter(Boolean),\n    {\n      stdio: 'inherit',\n      cwd: paths.docz,\n    }\n  )\n  const protocol = useHttps ? 'https' : 'http'\n  const url = `${protocol}://${args.host}:${args.port}`\n  console.log()\n  console.log('Building app')\n  await waitOn({\n    resources: [url],\n    timeout: 30000,\n  })\n  console.log()\n  console.log('App ready on ' + url)\n  if (args.open !== null && Boolean(args.open) === false) {\n    return\n  }\n  openBrowser(url)\n}\n"
  },
  {
    "path": "core/docz-core/src/bundler/machine/services/index.ts",
    "content": "export { createResources } from './create-resources'\nexport { ensureDirs } from './ensure-dirs'\nexport { execDevCommand } from './exec-dev-command'\nexport { installDeps } from './install-deps'\nexport { watchFiles } from './watch-files'\n"
  },
  {
    "path": "core/docz-core/src/bundler/machine/services/install-deps.ts",
    "content": "export const installDeps = async () => {\n  // No need to install dependencies\n  return\n}\n"
  },
  {
    "path": "core/docz-core/src/bundler/machine/services/watch-files.ts",
    "content": "import * as path from 'path'\nimport * as fs from 'fs-extra'\n\nimport { Config } from '../../../config/argv'\nimport * as paths from '../../../config/paths'\nimport { createWatcher } from '../../../states/config'\nimport { ServerMachineCtx as Context } from '../context'\n\n/**\n * Maps a given relative 'filepath' from 'themesDir/...' to 'src/...'\n */\nconst replaceThemesDir = (filepath: string, args: Config) => {\n  // Make the path to a given relative`filepath` relative to themesDir:\n  const rawFilePath = path.relative(\n    paths.getThemesDir(args),\n    path.resolve(paths.root, filepath)\n  )\n  // => e.g. '/gatsby-theme-docz/**/index.tsx'\n\n  // Prefix with 'src':\n  return path.join('src', rawFilePath)\n  // => 'src/gatsby-theme-docz/**/index.tsx'\n}\n\nconst watchGatsbyThemeFiles = (args: Config) => {\n  const watcher = createWatcher(\n    path.join(args.themesDir, 'gatsby-theme-**/**/*'),\n    args\n  )\n  const copy = (filepath: string) => {\n    const src = path.resolve(paths.root, filepath)\n    const dest = path.resolve(paths.docz, replaceThemesDir(filepath, args))\n    fs.copySync(src, dest)\n  }\n  const remove = (filepath: string) => {\n    fs.removeSync(path.resolve(paths.docz, filepath))\n  }\n\n  watcher\n    .on('add', copy)\n    .on('addDir', copy)\n    .on('change', copy)\n    .on('unlink', remove)\n    .on('unlinkDir', remove)\n\n  return () => watcher.close()\n}\n\nconst createWatch = (args: Config) => (\n  glob: any,\n  src: string,\n  custom?: boolean\n) => {\n  const watcher = createWatcher(glob, args)\n  const srcPath = path.join(paths.root, src)\n  const destPath = path.join(\n    paths.docz,\n    custom ? src.replace('.js', '.custom.js') : src\n  )\n\n  const copyFile = () => fs.copySync(srcPath, destPath)\n  const deleteFile = () => fs.removeSync(destPath)\n\n  watcher\n    .on('add', copyFile)\n    .on('change', copyFile)\n    .on('unlink', deleteFile)\n\n  return () => watcher.close()\n}\n\nconst watchDoczRc = (args: Context['args']) => {\n  const watcher = createWatcher(\n    path.join(paths.root, args.config ? args.config : 'doczrc.js'),\n    args\n  )\n\n  const copy = (filepath: string) => {\n    const src = path.resolve(paths.root, filepath)\n    const dest = path.resolve(paths.docz, 'doczrc.js')\n    fs.copySync(src, dest)\n  }\n\n  const remove = () => {\n    fs.removeSync(path.resolve(paths.docz, 'doczrc.js'))\n  }\n\n  watcher\n    .on('add', copy)\n    .on('change', copy)\n    .on('unlink', remove)\n  return () => watcher.close()\n}\n\nexport const watchFiles = ({ args }: Context) => () => {\n  const watch = createWatch(args)\n  const doczrc = watchDoczRc(args)\n  const gatsbyBrowser = watch(paths.gatsbyBrowser, 'gatsby-browser.js')\n  const gatsbyNode = watch(paths.gatsbyNode, 'gatsby-node.js')\n  const gatsbySSR = watch(paths.gatsbySSR, 'gatsby-ssr.js')\n  const gatsbyConfig = watch(paths.gatsbyConfig, 'gatsby-config.js', true)\n  const themeFilesWatcher = watchGatsbyThemeFiles(args)\n\n  return () => {\n    doczrc()\n    gatsbyConfig()\n    gatsbyBrowser()\n    gatsbyNode()\n    gatsbySSR()\n    themeFilesWatcher()\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/bundler/server.ts",
    "content": "import { interpret } from 'xstate'\nimport { finds } from 'load-cfg'\nimport findUp from 'find-up'\n\nimport { devServerMachine } from './machine'\nimport { Config as Args } from '../config/argv'\n\nexport const server = (args: Args) => async () => {\n  const doczrcFilepath = await findUp(finds('docz'))\n  const machine = devServerMachine.withContext({ args, doczrcFilepath })\n  const service = interpret(machine).onTransition(state => {\n    if (args.debug) {\n      console.log(state.value)\n    }\n  })\n\n  return {\n    start: async () => {\n      service.start()\n      service.send('START_MACHINE')\n      process.on('exit', () => {\n        service.stop()\n      })\n    },\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/cli.ts",
    "content": "import * as yargs from 'yargs'\n\nimport { setArgs } from './config/argv'\nimport { setEnv } from './config/env'\nimport * as commands from './commands'\n\nexport const cli = () => {\n  return yargs\n    .command('init', 'initialize docz in your app', setArgs, async args => {\n      setEnv('development')\n      await commands.init(args)\n    })\n    .command('dev', 'initialize docz dev server', setArgs, async args => {\n      setEnv('development')\n      await commands.dev(args)\n    })\n    .command('build', 'build dir as static site', setArgs, async args => {\n      setEnv('production')\n      await commands.build(args)\n      process.exit()\n    })\n    .command('serve', 'serve dir as static site', setArgs, async args => {\n      setEnv('production')\n      await commands.serve(args)\n      process.exit()\n    })\n    .demandCommand()\n    .recommendCommands()\n    .help()\n    .wrap(72)\n    .epilog('for more information visit https://github.com/doczjs/docz')\n    .showHelpOnFail(false, 'whoops, something went wrong! run with --help').argv\n}\n"
  },
  {
    "path": "core/docz-core/src/commands/build.ts",
    "content": "import { Arguments } from 'yargs'\nimport * as logger from 'signale'\n\nimport { parseConfig } from '../config/docz'\nimport { bundler as gatsby } from '../bundler'\nimport { init } from './init'\nimport { copyDoczRc } from '../bundler/machine/services/create-resources'\n\nexport const build = async (args: Arguments<any>) => {\n  copyDoczRc(args.config)\n  const config = await parseConfig(args)\n  const bundler = gatsby(config)\n\n  try {\n    await init(args)\n  } catch (err) {\n    logger.error(`Failed to initialize docz : ${err.message}`)\n  }\n\n  try {\n    await bundler.build()\n  } catch (err) {\n    logger.error(err)\n    process.exit(1)\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/commands/dev.ts",
    "content": "process.setMaxListeners(Infinity)\n\nimport { Arguments } from 'yargs'\nimport logger from 'signale'\n\nimport { parseConfig } from '../config/docz'\nimport { bundler as gatsby } from '../bundler'\nimport { copyDoczRc } from '../bundler/machine/services/create-resources'\n\nexport const dev = async (args: Arguments<any>) => {\n  copyDoczRc(args.config)\n  const config = await parseConfig(args)\n  const bundler = gatsby(config)\n  const app = await bundler.createApp()\n\n  try {\n    await app.start()\n  } catch (err) {\n    logger.fatal('Failed to process data server')\n    logger.error(err)\n    process.exit(1)\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/commands/index.ts",
    "content": "export { dev } from './dev'\nexport { build } from './build'\nexport { serve } from './serve'\nexport { init } from './init'\n"
  },
  {
    "path": "core/docz-core/src/commands/init.ts",
    "content": "process.setMaxListeners(Infinity)\n\nimport { Arguments } from 'yargs'\nimport path from 'path'\n\nimport { parseConfig } from '../config/docz'\nimport { getIsFirstInstall, getIsDoczRepo } from '../bundler/machine/actions'\nimport { ensureDirs, createResources } from '../bundler/machine/services'\nimport { copyDoczRc } from '../bundler/machine/services/create-resources'\nimport * as paths from '../config/paths'\n\nexport const init = async (args: Arguments<any>) => {\n  copyDoczRc(args.config)\n  const doczrcFilepath = path.join(paths.docz, 'doczrc.js')\n  const config = await parseConfig(args)\n  const isFirstInstall = getIsFirstInstall()\n  const isDoczRepo = getIsDoczRepo()\n  await ensureDirs()\n  const serverMachineContext = {\n    args: config,\n    isDoczRepo,\n    firstInstall: isFirstInstall,\n    doczrcFilepath,\n  }\n  await createResources(serverMachineContext)\n}\n"
  },
  {
    "path": "core/docz-core/src/commands/serve.ts",
    "content": "import sh from 'shelljs'\nimport { Arguments } from 'yargs'\n\nimport * as paths from '../config/paths'\nimport { spawnSync } from '../utils/spawn'\nimport { parseConfig } from '../config/docz'\n\nexport const serve = async (args: Arguments<any>) => {\n  const config = await parseConfig(args)\n  const cliArgs = ['run', 'serve']\n\n  if (config.port) {\n    cliArgs.push('--')\n    // Append gatsby option `port` to CLI args\n    // https://www.gatsbyjs.org/docs/cheat-sheet/#cheat_sheet-text\n    cliArgs.push('--port')\n    cliArgs.push(String(config.port))\n  }\n\n  if (config.host) {\n    // Append gatsby option `host` to CLI args\n    // https://www.gatsbyjs.org/docs/cheat-sheet/#cheat_sheet-text\n    cliArgs.push('--host')\n    cliArgs.push(String(config.host))\n  }\n\n  sh.cd(paths.docz)\n  spawnSync('npm', cliArgs)\n}\n"
  },
  {
    "path": "core/docz-core/src/config/argv.ts",
    "content": "import * as fs from 'fs-extra'\nimport { Argv as Yargs } from 'yargs'\nimport * as envDotProp from 'env-dot-prop'\nimport humanize from 'humanize-string'\nimport titleize from 'titleize'\nimport { get } from 'lodash/fp'\n\nimport { Plugin } from '../lib/Plugin'\nimport * as paths from '../config/paths'\nimport { doczRcBaseConfig } from './docz'\n\nconst getEnv = (val: string | string[], defaultValue: any = null): any =>\n  envDotProp.get(val, defaultValue, { parse: true })\n\nconst getInitialTitle = (pkg: any): string => {\n  const name = get('name', pkg) || 'MyDoc'\n  return titleize(humanize(name.replace(/^@.*\\//, '')))\n}\n\nconst getInitialDescription = (pkg: any): string =>\n  get('description', pkg) || 'My awesome app using docz'\n\nexport type Env = 'production' | 'development'\nexport type ThemeConfig = Record<string, any>\n\nexport interface DocgenConfig {\n  handlers?: any[]\n  resolver?: (ast: any, recast: any) => any\n  propFilter?: (prop: any) => boolean\n  searchPath: string\n  searchPatterns: string[]\n}\n\nexport interface Menu {\n  name: string\n  route?: string\n  href?: string\n  menu?: Menu[]\n}\n\nexport interface Argv {\n  /* io args */\n  root: string\n  base: string\n  src: string\n  gatsbyRoot: string | string[]\n  files: string | string[]\n  ignore: any[]\n  watchIgnore: string\n  public: string\n  dest: string\n  editBranch: string\n  config: string\n  /* bundler args */\n  debug: boolean\n  typescript: boolean\n  propsParser: boolean\n  host: string\n  port: number\n  native: boolean\n  notUseSpecifiers: boolean\n  open: null | boolean\n  /* template args */\n  title: string\n  description: string\n  /** slugify separator */\n  separator: string\n  https: boolean\n  certFile: string\n  keyFile: string\n  caFile: string\n}\n\nexport interface Config extends Argv {\n  docgenConfig: DocgenConfig\n  hastPlugins: any[]\n  mdPlugins: any[]\n  menu: Menu[]\n  paths: paths.Paths\n  plugins: Plugin[]\n  themeConfig: ThemeConfig\n  themesDir: string\n  mdxExtensions: string[]\n  filterComponents: (files: string[]) => string[]\n}\n\nexport const setArgs = (yargs: Yargs) => {\n  const pkg = fs.readJsonSync(paths.appPackageJson, { throws: false })\n\n  return yargs\n    .option('root', {\n      type: 'string',\n      default: getEnv('docz.root', paths.root),\n    })\n    .option('base', {\n      type: 'string',\n      default: getEnv('docz.base', '/'),\n    })\n    .option('source', {\n      alias: 'src',\n      type: 'string',\n      default: getEnv('docz.source', doczRcBaseConfig.src),\n    })\n    .option('gatsbyRoot', {\n      type: 'string',\n      default: getEnv('docz.gatsbyRoot', doczRcBaseConfig.gatsbyRoot),\n    })\n    .option('files', {\n      type: 'string',\n      default: getEnv('docz.files', '**/*.{md,markdown,mdx}'),\n    })\n    .option('ignore', {\n      type: 'array',\n      default: getEnv('docz.ignore', []),\n    })\n    .option('public', {\n      type: 'string',\n      default: getEnv('docz.public', '/public'),\n    })\n    .option('dest', {\n      alias: 'd',\n      type: 'string',\n      default: getEnv('docz.dest', '.docz/dist'),\n    })\n    .option('editBranch', {\n      alias: 'eb',\n      type: 'string',\n      default: getEnv('docz.edit.branch', 'master'),\n    })\n    .option('config', {\n      type: 'string',\n      default: getEnv('docz.config', ''),\n    })\n    .option('title', {\n      type: 'string',\n      default: getEnv('docz.title', getInitialTitle(pkg)),\n    })\n    .option('description', {\n      type: 'string',\n      default: getEnv('docz.description', getInitialDescription(pkg)),\n    })\n    .option('typescript', {\n      alias: 'ts',\n      type: 'boolean',\n      default: getEnv('docz.typescript', false),\n    })\n    .option('propsParser', {\n      type: 'boolean',\n      default: getEnv('docz.props.parser', true),\n    })\n    .option('debug', {\n      type: 'boolean',\n      default: getEnv('docz.debug', false),\n    })\n    .option('host', {\n      type: 'string',\n      default: getEnv('docz.host', 'localhost'),\n    })\n    .option('port', {\n      alias: 'p',\n      type: 'number',\n      default: getEnv('docz.port', 3000),\n    })\n    .option('native', {\n      type: 'boolean',\n      default: getEnv('docz.native', false),\n    })\n    .option('separator', {\n      type: 'string',\n      default: getEnv('docz.separator', '-'),\n    })\n    .option('openBrowser', {\n      alias: ['o', 'open'],\n      describe: 'auto open browser in dev mode',\n      type: 'boolean',\n      default: null,\n    })\n}\n"
  },
  {
    "path": "core/docz-core/src/config/docz.ts",
    "content": "import * as path from 'path'\nimport { Arguments } from 'yargs'\nimport { omit, merge } from 'lodash/fp'\nimport { load, loadFrom } from 'load-cfg'\nimport detectPort from 'detect-port'\n\nimport * as paths from '../config/paths'\nimport { Config, Argv } from '../config/argv'\nimport { Plugin } from '../lib/Plugin'\n\nconst toOmit = ['_', '$0', 'version', 'help']\nexport const doczRcBaseConfig = {\n  themeConfig: {},\n  src: './',\n  gatsbyRoot: null,\n  themesDir: 'src',\n  mdxExtensions: ['.md', '.mdx'],\n  docgenConfig: {},\n  menu: [],\n  plugins: [],\n  mdPlugins: [],\n  hastPlugins: [],\n  ignore: [\n    /readme.md/i,\n    /changelog.md/i,\n    /code_of_conduct.md/i,\n    /contributing.md/i,\n    /license.md/i,\n  ],\n  filterComponents: (files: string[]) =>\n    files.filter(filepath => {\n      const isTestFile = /\\.(test|spec)\\.(js|jsx|ts|tsx)$/.test(filepath)\n      if (isTestFile) {\n        return false\n      }\n      const startsWithCapitalLetter = /\\/([A-Z]\\w*)\\.(js|jsx|ts|tsx)$/.test(\n        filepath\n      )\n      const isCalledIndex = /\\/index\\.(js|jsx|ts|tsx)$/.test(filepath)\n      const hasJsxOrTsxExtension = /.(jsx|tsx)$/.test(filepath)\n      return startsWithCapitalLetter || isCalledIndex || hasJsxOrTsxExtension\n    }),\n}\n\nexport const getBaseConfig = (\n  argv: Arguments<Argv>,\n  custom?: Partial<Config>\n): Config => {\n  const initial = omit<Arguments<Argv>, any>(toOmit, argv)\n  const base = { ...doczRcBaseConfig, ...initial, paths }\n  return merge(base, custom) as Config\n}\n\nexport const parseConfig = async (\n  argv: Arguments<Argv>,\n  custom?: Partial<Config>\n): Promise<Config> => {\n  const port = await detectPort(argv.port)\n  const defaultConfig = getBaseConfig(argv, { port, ...custom })\n\n  const config = argv.config\n    ? loadFrom<Config>(path.join(paths.docz, 'doczrc.js'), defaultConfig)\n    : load<Config>('docz', defaultConfig)\n\n  const reduceAsync = Plugin.reduceFromPluginsAsync<Config>(config.plugins)\n  return reduceAsync('setConfig', config)\n}\n"
  },
  {
    "path": "core/docz-core/src/config/env.ts",
    "content": "import * as path from 'path'\nimport * as envDotProp from 'env-dot-prop'\n\nimport { root, resolveApp } from './paths'\n\nconst populateNodePath = () => {\n  // We support resolving modules according to `NODE_PATH`.\n  // It works similar to `NODE_PATH` in Node itself:\n  // https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders\n  // Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.\n  // Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.\n  // https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421\n  // We also resolve them to make sure all tools using them work consistently.\n  envDotProp.set(\n    'node.path',\n    envDotProp\n      .get('node.path', '')\n      .split(path.delimiter)\n      .filter((folder: any) => folder && !path.isAbsolute(folder))\n      .map((folder: any) => path.resolve(root, folder))\n      .join(path.delimiter)\n  )\n}\n\nconst configDotEnv = () => {\n  const NODE_ENV = envDotProp.get('node.env')\n  const dotenv = resolveApp('.env')\n\n  const dotenvFiles = [\n    `${dotenv}.${NODE_ENV}.local`,\n    `${dotenv}.${NODE_ENV}`,\n    // Don't include `.env.local` for `test` environment\n    // since normally you expect tests to produce the same\n    // results for everyone\n    NODE_ENV !== 'test' && `${dotenv}.local`,\n    dotenv,\n  ]\n\n  // Load environment variables from .env* files. Suppress warnings using silent\n  // if this file is missing. dotenv will never modify any environment variables\n  // that have already been set.  Variable expansion is supported in .env files.\n  // https://github.com/motdotla/dotenv\n  dotenvFiles.filter(Boolean).forEach(dotenvFile => {\n    require('dotenv').config({\n      path: dotenvFile,\n    })\n  })\n}\n\nexport const setEnv = (env: string) => {\n  envDotProp.set('babel.env', env)\n  envDotProp.set('node.env', env)\n\n  configDotEnv()\n  populateNodePath()\n}\n\nexport interface RT {\n  [key: string]: any\n}\n\nexport const getClientEnvironment = (publicUrl: string) => {\n  const APP_TEST = /^(REACT_APP_)|(ANGULAR_APP_)|(VUE_APP_)|(DOCZ_)/i\n  const raw: RT = Object.keys(process.env)\n    .filter(key => APP_TEST.test(key))\n    .reduce(\n      (env: RT, key) => {\n        env[key] = process.env[key]\n        return env\n      },\n      {\n        // Useful for determining whether we’re running in production mode. Most\n        // importantly, it switches React into the correct mode.\n        NODE_ENV: envDotProp.get('node.env') || 'development',\n        // Useful for resolving the correct path to static assets in `public`. For\n        // example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />. This should\n        // only be used as an escape hatch. Normally you would put images into the `src`\n        // and `import` them in code to get their\n        PUBLIC_URL: publicUrl,\n      }\n    )\n  const stringified = {\n    'process.env': Object.keys(raw).reduce((env: RT, key) => {\n      env[key] = JSON.stringify(raw[key])\n      return env\n    }, {}),\n  }\n\n  return { raw, stringified }\n}\n"
  },
  {
    "path": "core/docz-core/src/config/paths.ts",
    "content": "import * as fs from 'fs'\nimport * as path from 'path'\nimport * as resolve from 'resolve'\n\nimport { Config } from './argv'\n\nexport const ensureSlash = (filepath: any, needsSlash: boolean) => {\n  const hasSlash = filepath.endsWith('/')\n\n  if (hasSlash && !needsSlash) {\n    return filepath.substr(filepath, filepath.length - 1)\n  } else if (!hasSlash && needsSlash) {\n    return `${filepath}/`\n  } else {\n    return filepath\n  }\n}\n\nexport const root = fs.realpathSync(process.cwd())\nconst IS_DOCZ_PROJECT = path.parse(root).base === '.docz'\n\nexport const resolveApp = (to: string) =>\n  path.resolve(root, IS_DOCZ_PROJECT ? '../' : './', to)\n\nexport const checkIsDoczProject = (config: Config) => {\n  return path.parse(config.root || root).base === '.docz'\n}\n\nexport const getRootDir = (config: Config) => {\n  const isDoczProject = checkIsDoczProject(config)\n  return isDoczProject ? path.resolve(root, '../') : root\n}\n\nexport const getThemesDir = (config: Config) => {\n  // resolve normalizes the new path and removes trailing slashes\n  return path.resolve(path.join(getRootDir(config), config.themesDir))\n}\n\nexport interface Paths {\n  root: string\n  templates: string\n  servedPath: (base: string) => string\n\n  docz: string\n  app: string\n  cache: string\n  appPackageJson: string\n  gatsbyConfig: string\n  gatsbyBrowser: string\n  gatsbyNode: string\n  gatsbySSR: string\n\n  checkIsDoczProject: (config: any) => boolean\n  getRootDir: (config: any) => string\n  getThemesDir: (config: any) => string\n  getDist: (dest: string) => string\n  distPublic: (dest: string) => string\n\n  importsJs: string\n  rootJs: string\n  indexJs: string\n  indexHtml: string\n  db: string\n}\n\nexport const templates = path.join(resolve.sync('docz-core'), '../templates')\n\nexport const servedPath = (base: string) => ensureSlash(base, true)\n\nexport const docz = resolveApp('.docz')\nexport const cache = path.resolve(docz, '.cache/')\nexport const app = path.resolve(docz, 'app/')\nexport const appPackageJson = resolveApp('package.json')\nexport const appTsConfig = resolveApp('tsconfig.json')\nexport const gatsbyConfig = resolveApp('gatsby-config.js')\nexport const gatsbyBrowser = resolveApp('gatsby-browser.js')\nexport const gatsbyNode = resolveApp('gatsby-node.js')\nexport const gatsbySSR = resolveApp('gatsby-ssr.js')\n\nexport const getDist = (dest: string) => path.join(root, dest)\nexport const distPublic = (dest: string) => path.join(dest, 'public/')\n\nexport const importsJs = path.resolve(app, 'imports.js')\nexport const rootJs = path.resolve(app, 'root.jsx')\nexport const indexJs = path.resolve(app, 'index.jsx')\nexport const indexHtml = path.resolve(app, 'index.html')\nexport const db = path.resolve(app, 'db.json')\n"
  },
  {
    "path": "core/docz-core/src/index.ts",
    "content": "/** cli exports */\nexport { cli } from './cli'\n\n/** config exports */\nexport { parseConfig, getBaseConfig } from './config/docz'\nexport { Config, setArgs } from './config/argv'\n\n/** states */\nimport * as states from './states'\nexport { states }\n\n/** lib exports */\nexport { Plugin, createPlugin } from './lib/Plugin'\nexport { DataServer } from './lib/DataServer'\nexport { Entries } from './lib/Entries'\nexport { Entry } from './lib/Entry'\n"
  },
  {
    "path": "core/docz-core/src/lib/Bundler.ts",
    "content": "import * as path from 'path'\nimport logger from 'signale'\n\nimport { Config as Args } from '../config/argv'\nimport * as paths from '../config/paths'\n\nexport interface BundlerServer {\n  start(): void\n}\n\nexport type BuildFn = (config: Args, dist: string) => void\nexport type ServerFn = () => BundlerServer | Promise<BundlerServer>\n\nexport interface BundlerConstructor {\n  args: Args\n  server: ServerFn\n  build: BuildFn\n}\n\nexport interface ConfigObj {\n  [key: string]: any\n}\n\nexport class Bundler {\n  private readonly args: Args\n  private server: ServerFn\n  private builder: BuildFn\n\n  constructor(params: BundlerConstructor) {\n    const { args, server, build } = params\n\n    this.args = args\n    this.server = server\n    this.builder = build\n  }\n\n  public async createApp(): Promise<BundlerServer> {\n    return this.server()\n  }\n\n  public async build(): Promise<void> {\n    const dist = paths.getDist(this.args.dest)\n    const root = paths.getRootDir(this.args)\n\n    if (root === path.resolve(dist)) {\n      logger.fatal(\n        new Error(\n          'Unexpected option: \"dest\" cannot be set to the current working directory.'\n        )\n      )\n      process.exit(1)\n    }\n\n    await this.builder(this.args, dist)\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/lib/DataServer.ts",
    "content": "import * as fs from 'fs-extra'\nimport { get, isFunction } from 'lodash/fp'\n\nimport * as paths from '../config/paths'\n\nexport interface Params {\n  getState: () => Record<string, any>\n  setState: (key: string, val: any) => void\n}\n\nexport interface State {\n  id: string\n  start: (params: Params) => Promise<void>\n  close: () => void\n}\n\nexport interface Action {\n  type: string\n  payload: any\n}\n\nexport type Listener = (action: Action) => void\n\nexport class DataServer {\n  private states: Set<State>\n  private state: Map<string, any>\n  private listeners: Set<Listener>\n\n  constructor() {\n    this.states = new Set()\n    this.state = new Map()\n    this.listeners = new Set<Listener>()\n  }\n\n  public register(states: State[]): DataServer {\n    for (const state of states) this.states.add(state)\n    return this\n  }\n\n  public async start(): Promise<void> {\n    const setState = (key: string, val: any) => this.setState(key, val)\n    const getState = () => this.getState()\n\n    await Promise.all(\n      Array.from(this.states).map(async state => {\n        if (!isFunction(state.start)) return\n        return state.start({\n          setState,\n          getState,\n        })\n      })\n    )\n  }\n\n  public close(): void {\n    for (const state of this.states) {\n      if (isFunction(state.close)) {\n        state.close()\n      }\n    }\n  }\n\n  public onStateChange(listener: Listener): () => void {\n    this.listeners.add(listener)\n    return () => this.listeners.clear()\n  }\n\n  public getState(): Map<string, any> {\n    return this.mapToObject(this.state)\n  }\n\n  private setState(key: string, val: any): void {\n    const prev = get(key, this.getState())\n    const next = typeof val === 'function' ? val(prev) : val\n\n    this.state.set(key, next)\n    this.writeDbFile()\n    this.listeners.forEach(listener => {\n      listener({ type: `state.${key}`, payload: next })\n    })\n  }\n\n  private async writeDbFile(): Promise<void> {\n    fs.outputJSONSync(paths.db, this.mapToObject(this.state), { spaces: 2 })\n  }\n\n  private mapToObject<T>(map: Map<string, any>): T {\n    return Array.from(map.entries()).reduce(\n      (obj, [key, val]) => ({ ...obj, [key]: val }),\n      {} as T\n    )\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/lib/Entries.ts",
    "content": "import * as path from 'path'\nimport * as logger from 'signale'\nimport { parseMdx } from 'docz-utils/lib/mdast'\nimport { isRegExp, isString } from 'lodash/fp'\nimport minimatch from 'minimatch'\nimport glob from 'fast-glob'\n\nimport { Entry, EntryObj } from './Entry'\nimport { Plugin } from './Plugin'\nimport { Config } from '../config/argv'\nimport { getRepoEditUrl } from '../utils/repo-info'\n\nconst mapToObj = (map: Map<any, any>) =>\n  Array.from(map.entries()).reduce(\n    (obj, [key, value]) => ({ ...obj, [`${key}`]: value }),\n    {}\n  )\n\nexport const matchFilesWithSrc = (config: Config) => (files: string[]) => {\n  const { paths, src } = config\n  const rootDir = paths.getRootDir(config)\n  const srcDir = path.resolve(rootDir, src)\n  const prefix = path.relative(rootDir, srcDir)\n  return files.map(file =>\n    file.startsWith(prefix) ? file : path.join(prefix, file)\n  )\n}\n\nexport const getFilesToMatch = (config: Config) => {\n  const { files: pattern } = config\n  const arr = Array.isArray(pattern) ? pattern : [pattern]\n  const toMatch = matchFilesWithSrc(config)\n  return toMatch(arr)\n}\n\nexport type EntryMap = Record<string, EntryObj>\n\nexport class Entries {\n  public all: Map<string, EntryObj>\n  public get: () => Promise<EntryMap>\n  public repoEditUrl: string | null\n\n  constructor(config: Config) {\n    this.repoEditUrl = getRepoEditUrl(config)\n    this.all = new Map()\n    this.get = async () => this.getMap(config)\n  }\n\n  private async getMap(config: Config): Promise<EntryMap> {\n    const { paths, ignore, plugins, mdPlugins, src } = config\n    const fileMatchingPatterns = getFilesToMatch(config)\n    const srcHasNodeModules = src.indexOf('node_modules') !== -1\n    // Hack around fast-glob not returning the whole set when many patterns are provided in the array\n    let initialFiles: string[] = []\n    for (let filePattern of fileMatchingPatterns) {\n      const filePatternHasNodeModules =\n        filePattern.indexOf('node_modules') !== -1\n      const shouldIncludeNodeModules =\n        srcHasNodeModules || filePatternHasNodeModules\n      const globIgnore = shouldIncludeNodeModules ? [] : ['**/node_modules/**']\n\n      const filesFromPattern = await glob([filePattern], {\n        cwd: paths.getRootDir(config),\n        ignore: globIgnore,\n        onlyFiles: true,\n        unique: true,\n        baseNameMatch: false,\n        caseSensitiveMatch: false,\n      })\n      initialFiles = [...initialFiles, ...filesFromPattern]\n    }\n    const files = initialFiles.filter((value: string) => {\n      return !ignore.some(pattern => {\n        if (isString(pattern)) return minimatch(value, pattern)\n        if (isRegExp(pattern)) return pattern.test(value)\n        return false\n      })\n    })\n\n    const rootDir = paths.getRootDir(config)\n    const createEntry = async (file: string) => {\n      try {\n        const fullpath = path.resolve(rootDir, file)\n        const ast = await parseMdx(fullpath, mdPlugins)\n        const entry = new Entry(ast, file, config)\n\n        if (this.repoEditUrl) entry.setLink(this.repoEditUrl)\n\n        // reduce modify entry plugin\n        const reduce = Plugin.reduceFromPlugins<Entry>(plugins)\n        const modifiedEntry = reduce('modifyEntry', entry, config)\n\n        const { settings, ...rest } = modifiedEntry\n\n        return {\n          ...settings,\n          ...rest,\n        }\n      } catch (err) {\n        logger.error(err)\n        return null\n      }\n    }\n\n    const reduce = Plugin.reduceFromPlugins<string[]>(plugins)\n    const modifiedFiles = reduce('modifyFiles', files, config)\n\n    const map = new Map()\n    const entries = await Promise.all(\n      modifiedFiles.map(createEntry).filter(Boolean)\n    )\n\n    for (const entry of entries) {\n      if (entry) {\n        map.set(entry.filepath, entry)\n      }\n    }\n\n    this.all = map\n    return mapToObj(map)\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/lib/Entry.ts",
    "content": "import * as path from 'path'\nimport * as crypto from 'crypto'\nimport slugify from '@sindresorhus/slugify'\nimport humanize from 'humanize-string'\nimport { get } from 'lodash/fp'\n\nimport {\n  getParsedData,\n  headingsFromAst,\n  Heading,\n  ParsedData,\n} from 'docz-utils/lib/mdast'\n\nimport * as paths from '../config/paths'\nimport { Config } from '../config/argv'\n\nconst createId = (file: string) =>\n  crypto\n    .createHash('md5')\n    .update(file)\n    .digest('hex')\n\nexport interface EntryObj {\n  id: string\n  filepath: string\n  fullpath: string\n  link: string | null\n  slug: string\n  name: string\n  route: string\n  menu: string | null\n  headings: Heading[]\n  [key: string]: any\n}\n\nexport class Entry {\n  public link: string | null\n  public readonly filepath: string\n  public readonly fullpath: string\n  public readonly headings: Heading[]\n  public readonly id: string\n  public readonly hidden: boolean\n  public readonly menu: string | null\n  public readonly name: string\n  public readonly route: string\n  public readonly settings: {\n    [key: string]: any\n  }\n  public readonly slug: string\n\n  constructor(ast: any, file: string, config: Config) {\n    const filepath = this.getFilepath(config, file)\n    const parsed = getParsedData(ast)\n    const name = this.getName(filepath, parsed)\n    const root = paths.getRootDir(config)\n\n    this.id = createId(file)\n    this.filepath = filepath\n    this.fullpath = path.resolve(root, file)\n    this.link = ''\n    this.hidden = parsed.hidden || false\n    this.slug = this.slugify(filepath, config.separator)\n    this.route = this.getRoute(parsed)\n    this.name = name\n    this.menu = parsed.menu || ''\n    this.headings = headingsFromAst(ast)\n    this.settings = parsed\n  }\n\n  public setLink(url: string): void {\n    this.link = url.replace('{{filepath}}', this.filepath)\n  }\n\n  private getFilepath(config: Config, file: string): string {\n    const root = paths.getRootDir(config)\n    const fullpath = path.resolve(root, config.src, file)\n    const filepath = path.relative(root, fullpath)\n\n    if (process.platform === 'win32') {\n      return filepath.split('\\\\').join('/')\n    }\n\n    return filepath\n  }\n\n  private getName(filepath: string, parsed: ParsedData): string {\n    const filename = humanize(path.parse(filepath).name)\n    return parsed && parsed.name ? parsed.name : filename\n  }\n\n  private slugify(filepath: string, separator: string): string {\n    const ext = path.extname(filepath)\n    const fileWithoutExt = filepath.replace(ext, '')\n\n    return slugify(fileWithoutExt, { separator })\n  }\n\n  private getRoute(parsed: any): string {\n    const parsedRoute = get('route', parsed)\n    return parsedRoute || `/${this.slug}`\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/lib/Plugin.ts",
    "content": "import { get, isFunction } from 'lodash/fp'\n\nimport { pReduce } from '../utils/p-reduce'\nimport { Config } from '../config/argv'\nimport { Entry } from './Entry'\n\nexport type SetConfig = (config: Config) => Config | Promise<Config>\nexport type OnCreateBabelConfig = (params: any, dev: boolean) => void\n\nexport type OnCreateWebpackConfig<C = any> = (\n  config: C,\n  dev: boolean,\n  args: Config\n) => C\n\nexport type ModifyFiles = (files: string[], args: Config) => string[]\nexport type ModifyEntry = (entry: Entry, args: Config) => Entry\nexport type OnCreateDevServer = <A>(app: A) => void\nexport type OnPreBuild = (args: Config) => void\nexport type OnPostBuild = (args: Config) => void\nexport type OnPreRender = () => void\nexport type OnPostRender = () => void\n\nexport interface PluginFactory {\n  setConfig?: SetConfig\n  onCreateBabelConfig?: OnCreateBabelConfig\n  onCreateDevServer?: OnCreateDevServer\n  onCreateWebpackConfig?: OnCreateWebpackConfig\n  modifyFiles?: ModifyFiles\n  modifyEntry?: ModifyEntry\n  onPreBuild?: OnPreBuild\n  onPostBuild?: OnPostBuild\n}\n\nexport class Plugin<C = any> implements PluginFactory {\n  public static runPluginsMethod(\n    plugins: Plugin[] | undefined\n  ): (method: keyof Plugin, ...args: any[]) => void {\n    return (method, ...args) => {\n      if (plugins && plugins.length > 0) {\n        for (const plugin of plugins) {\n          const fn = get<Plugin, any>(method, plugin)\n          if (isFunction(fn)) {\n            fn(...args)\n          }\n        }\n      }\n    }\n  }\n\n  public static propsOfPlugins(\n    plugins: Plugin[]\n  ): (prop: keyof Plugin) => any[] {\n    return prop =>\n      plugins && plugins.length > 0\n        ? plugins.map(p => get(prop, p)).filter(Boolean)\n        : []\n  }\n\n  public static reduceFromPlugins<C>(\n    plugins: Plugin[] | undefined\n  ): (method: keyof Plugin, initial: C, ...args: any[]) => C {\n    return (method, initial, ...args) => {\n      return [...(plugins || [])].reduce((obj: any, plugin) => {\n        const fn = get<Plugin, any>(method, plugin)\n        return fn && isFunction(fn) ? fn(obj, ...args) : obj\n      }, initial)\n    }\n  }\n\n  public static reduceFromPluginsAsync<C>(\n    plugins: Plugin[] | undefined\n  ): (method: keyof Plugin, initial: C, ...args: any[]) => Promise<C> {\n    return (method, initial, ...args) => {\n      return pReduce(\n        [...(plugins || [])],\n        (obj: any, plugin: any) => {\n          const fn = get(method, plugin)\n          return Promise.resolve(fn && isFunction(fn) ? fn(obj, ...args) : obj)\n        },\n        initial\n      )\n    }\n  }\n\n  public readonly setConfig?: SetConfig\n  public readonly onCreateWebpackConfig?: OnCreateWebpackConfig<C>\n  public readonly onCreateBabelConfig?: OnCreateBabelConfig\n  public readonly modifyFiles?: ModifyFiles\n  public readonly modifyEntry?: ModifyEntry\n  public readonly onCreateDevServer?: OnCreateDevServer\n  public readonly onPreBuild?: OnPreBuild\n  public readonly onPostBuild?: OnPostBuild\n\n  constructor(p: PluginFactory) {\n    this.setConfig = p.setConfig\n    this.onCreateWebpackConfig = p.onCreateWebpackConfig\n    this.onCreateBabelConfig = p.onCreateBabelConfig\n    this.modifyFiles = p.modifyFiles\n    this.modifyEntry = p.modifyEntry\n    this.onCreateDevServer = p.onCreateDevServer\n    this.onPreBuild = p.onPreBuild\n    this.onPostBuild = p.onPostBuild\n  }\n}\n\nexport function createPlugin<C = any>(factory: PluginFactory): Plugin<C> {\n  return new Plugin(factory)\n}\n"
  },
  {
    "path": "core/docz-core/src/states/config.ts",
    "content": "import * as path from 'path'\nimport * as fs from 'fs-extra'\nimport { load, loadFrom, finds } from 'load-cfg'\nimport chokidar from 'chokidar'\nimport get from 'lodash/get'\n\nimport * as paths from '../config/paths'\nimport { Params, State } from '../lib/DataServer'\nimport { Config, Menu, ThemeConfig } from '../config/argv'\nimport { getRepoUrl } from '../utils/repo-info'\n\ninterface Payload {\n  title: string\n  description: string\n  menu: Menu[]\n  version: string | null\n  repository: string | null\n  native: boolean\n  themeConfig: ThemeConfig\n  separator: string\n}\n\nconst getInitialConfig = (config: Config): Payload => {\n  const pkg = fs.readJsonSync(paths.appPackageJson, { throws: false })\n  const repoUrl = getRepoUrl()\n\n  return {\n    title: config.title,\n    description: config.description,\n    menu: config.menu,\n    version: get(pkg, 'version'),\n    repository: repoUrl,\n    native: config.native,\n    themeConfig: config.themeConfig,\n    separator: config.separator,\n  }\n}\n\nconst update = async (params: Params, initial: Payload, { config }: Config) => {\n  const pathToConfig = path.join(paths.docz, 'doczrc.js')\n  const next = config\n    ? loadFrom(pathToConfig, initial, true, true)\n    : load('docz', initial, true, true)\n\n  params.setState('config', next)\n}\n\nexport const WATCH_IGNORE = /(((^|[\\/\\\\])\\.((?!docz)(.+)))|(node_modules))/\n\nexport const createWatcher = (glob: any, config: Config) => {\n  const ignored = config.watchIgnore || WATCH_IGNORE\n  const watcher = chokidar.watch(glob, {\n    ignored,\n    cwd: paths.root,\n    persistent: true,\n  })\n\n  watcher.setMaxListeners(Infinity)\n  return watcher\n}\n\nexport const state = (config: Config, dev?: boolean): State => {\n  const glob = config.config || finds('docz')\n  const initial = getInitialConfig(config)\n  const watcher = createWatcher(glob, config)\n\n  return {\n    id: 'config',\n    start: async params => {\n      const fn = async () => update(params, initial, config)\n      await update(params, initial, config)\n\n      if (dev) {\n        watcher.on('add', fn)\n        watcher.on('change', fn)\n        watcher.on('unlink', fn)\n      }\n    },\n    close: () => {\n      watcher.close()\n    },\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/states/entries.ts",
    "content": "import chokidar from 'chokidar'\nimport equal from 'fast-deep-equal'\nimport { get } from 'lodash/fp'\n\nimport { WATCH_IGNORE } from './config'\nimport { Params, State } from '../lib/DataServer'\nimport { Entries, getFilesToMatch } from '../lib/Entries'\nimport { Config } from '../config/argv'\nimport * as paths from '../config/paths'\n\nconst mapToArray = (map: any = []) =>\n  Object.entries(map)\n    .map(entry => entry && { key: entry[0], value: entry[1] })\n    .filter(Boolean)\n\nconst updateEntries = (entries: Entries) => async (p: Params) => {\n  const prev = get('entries', p.getState())\n  const map = await entries.get()\n\n  if (map && !equal(prev, map)) {\n    p.setState('entries', mapToArray(map))\n  }\n}\n\nexport const state = (\n  entries: Entries,\n  config: Config,\n  dev?: boolean\n): State => {\n  const ignored = config.watchIgnore || WATCH_IGNORE\n  const watcher = chokidar.watch(getFilesToMatch(config), {\n    ignored,\n    persistent: true,\n    cwd: paths.getRootDir(config),\n  })\n\n  watcher.setMaxListeners(Infinity)\n\n  return {\n    id: 'entries',\n    start: async params => {\n      const update = updateEntries(entries)\n      await update(params)\n\n      if (dev) {\n        watcher.on('add', async () => update(params))\n        watcher.on('change', async () => update(params))\n        watcher.on('unlink', async () => update(params))\n        watcher.on('raw', async (event: string, path: string, details: any) => {\n          if (details.event === 'moved' && details.type === 'directory') {\n            await update(params)\n          }\n        })\n      }\n    },\n    close: () => {\n      watcher.close()\n    },\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/states/index.ts",
    "content": "export { state as entries } from './entries'\nexport { state as config } from './config'\nexport { state as props } from './props'\n"
  },
  {
    "path": "core/docz-core/src/states/props.ts",
    "content": "import * as path from 'path'\nimport chokidar from 'chokidar'\nimport fastglob from 'fast-glob'\nimport { State, Params } from '../lib/DataServer'\nimport { get, propEq } from 'lodash/fp'\n\nimport * as paths from '../config/paths'\nimport { Config } from '../config/argv'\nimport { docgen, unixPath } from '../utils/docgen'\nimport { WATCH_IGNORE } from './config'\n\nexport const getPattern = (config: Config) => {\n  const {\n    ignore,\n    src: source,\n    typescript: ts,\n    docgenConfig: docgenConfig,\n  } = config\n\n  if (docgenConfig.searchPatterns) {\n    return docgenConfig.searchPatterns\n  }\n\n  const searchPath = docgenConfig.searchPath ? docgenConfig.searchPath : source\n  const root = paths.getRootDir(config)\n  const srcDir = path.resolve(root, searchPath)\n  const src = path.relative(root, srcDir)\n  const filesPattern = path.join(\n    src,\n    ts ? '**/*.{ts,tsx,js,jsx,mjs}' : '**/*.{js,jsx,mjs}'\n  )\n\n  return ignore\n    .map(entry => typeof entry === 'string' && `!**/${entry}`)\n    .filter(Boolean)\n    .concat([\n      unixPath(filesPattern),\n      '!**/node_modules',\n      '!**/doczrc.js',\n    ]) as string[]\n}\n\nconst removeFilepath = (items: any[], filepath: string) =>\n  items.filter((item: any) => item.key !== filepath)\n\nexport const initial = (config: Config, pattern: string[]) => async (\n  p: Params\n) => {\n  const { filterComponents } = config\n  const cwd = paths.getRootDir(config)\n  const files = await fastglob(pattern, { cwd, caseSensitiveMatch: false })\n  const filtered = filterComponents ? filterComponents(files) : files\n  const metadata = await docgen(filtered, config)\n  p.setState('props', metadata)\n}\n\nconst change = (p: Params, config: Config) => async (filepath: string) => {\n  const prev = get('props', p.getState())\n  const metadata = await docgen([filepath], config)\n  const filtered = metadata.filter(propEq('key', filepath))\n  const next = removeFilepath(prev, filepath).concat(filtered)\n  p.setState('props', next)\n}\n\nconst remove = (p: Params) => async (filepath: string) => {\n  const prev = get('props', p.getState())\n  const next = removeFilepath(prev, filepath)\n  p.setState('props', next)\n}\n\nexport const state = (config: Config, dev?: boolean): State => {\n  const pattern = getPattern(config)\n  const ignored = config.watchIgnore || WATCH_IGNORE\n  const cwd = paths.getRootDir(config)\n  const watcher = chokidar.watch(pattern, {\n    cwd,\n    ignored,\n    persistent: true,\n  })\n\n  watcher.setMaxListeners(Infinity)\n\n  return {\n    id: 'props',\n    start: async params => {\n      const addInitial = initial(config, pattern)\n      await addInitial(params)\n\n      if (dev) {\n        watcher.on('change', change(params, config))\n        watcher.on('unlink', remove(params))\n      }\n    },\n    close: () => {\n      watcher.close()\n    },\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/test-utils/data-bank.ts",
    "content": "import { Config } from '../config/argv'\nimport * as paths from '../config/paths'\n// let a: Config\nexport const createConfigStateInput = () => {\n  return ({\n    title: 'test-tile',\n    description: 'test-desc',\n    menu: [{ name: 'menu-name' }],\n    paths,\n    native: undefined,\n    themeConfig: undefined,\n    separator: undefined,\n    src: 'src/',\n  } as unknown) as Config\n}\n"
  },
  {
    "path": "core/docz-core/src/test-utils/index.ts",
    "content": "import * as paths from '../config/paths'\nimport yargs from 'yargs'\nimport { setArgs, Config } from '../config/argv'\nimport { Params } from '../lib/DataServer'\nimport { getBaseConfig } from '../config/docz'\n\nexport const mockedParams = (): Params => {\n  let data: any = {}\n  return {\n    getState: () => data,\n    setState: (key: string, value: string) => (data[key] = value),\n  }\n}\n\nexport const mockedArgv = () => {\n  const yargsArgs: any = {\n    argv: {},\n    //@ts-ignore\n    option: jest.fn().mockImplementation((key, value) => {\n      yargs.argv[value.alias ? value.alias : key] = value.default\n      return yargs\n    }),\n  }\n  const { argv } = setArgs(yargsArgs)\n  return argv\n}\n\nexport const getTestConfig = (overrides?: Partial<Config>): Config => {\n  const argv = mockedArgv()\n  return {\n    //@ts-ignore\n    ...getBaseConfig(argv),\n    paths,\n    typescript: true,\n    src: './__fixtures__',\n    ...overrides,\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/types.d.ts",
    "content": "declare module '@sindresorhus/slugify'\ndeclare module 'art-template'\ndeclare module 'detect-port'\ndeclare module 'env-dot-prop'\ndeclare module 'get-pkg-repo'\ndeclare module 'humanize-string'\ndeclare module 'react-dev-utils/getCacheIdentifier'\ndeclare module 'react-docgen-external-proptypes-handler'\ndeclare module 'react-docgen'\ndeclare module 'titleize'\n"
  },
  {
    "path": "core/docz-core/src/utils/docgen/docz-docgen-resolver.ts",
    "content": "// Based on https://github.com/reactjs/react-docgen/issues/256#issuecomment-417352843\n\nconst { default: resolveHOC } = require('react-docgen/dist/utils/resolveHOC')\nconst {\n  default: resolveToModule,\n} = require('react-docgen/dist/utils/resolveToModule')\nconst { utils, resolver: reactDocgenResolver } = require('react-docgen')\n\ntype Todo = any\n\nexport const createStyledComponentResolvers = () => {\n  const moduleName = 'styled-components'\n  const isStyledExpression = (tagPath: Todo, t: Todo) =>\n    (t.CallExpression.check(tagPath.node) &&\n      tagPath.get('callee').node.name === 'styled') ||\n    (t.MemberExpression.check(tagPath.node) &&\n      tagPath.get('object').node.name === 'styled')\n\n  function isStyledComponent(def: Todo, t: Todo) {\n    if (\n      !t.TaggedTemplateExpression.check(def.node) ||\n      !isStyledExpression(def.get('tag'), t)\n    ) {\n      return false\n    }\n    const module = resolveToModule(def.get('tag'))\n    return !!module && module === moduleName\n  }\n\n  const exportTagged = (path: Todo, t: Todo) => {\n    const definitions: Todo[] = utils.resolveExportDeclaration(path, t)\n    const components: Todo[] = []\n    definitions.filter(Boolean).forEach(def => {\n      let comp = def\n      if (isStyledComponent(comp, t)) {\n        components.push(comp)\n      } else {\n        comp = utils.resolveToValue(resolveHOC(comp))\n\n        if (isStyledComponent(comp, t)) components.push(comp)\n      }\n    })\n    return components\n  }\n\n  function findExportedStyledComponent(ast: Todo, recast: Todo) {\n    const components: Todo[] = []\n    const t = recast.types.namedTypes\n\n    const visitor = (path: Todo) => {\n      components.push(...exportTagged(path, t))\n      return false\n    }\n\n    recast.visit(ast, {\n      visitFunctionDeclaration: false,\n      visitFunctionExpression: false,\n      visitClassDeclaration: false,\n      visitClassExpression: false,\n      visitIfStatement: false,\n      visitWithStatement: false,\n      visitSwitchStatement: false,\n      visitCatchCause: false,\n      visitWhileStatement: false,\n      visitDoWhileStatement: false,\n      visitForStatement: false,\n      visitForInStatement: false,\n\n      visitExportDefaultDeclaration: visitor,\n    })\n\n    return components\n  }\n\n  function findAllExportedStyledComponents(ast: Todo, recast: Todo) {\n    const components: Todo[] = []\n    const t = recast.types.namedTypes\n\n    const visitor = (path: Todo) => {\n      components.push(...exportTagged(path, t))\n      return false\n    }\n\n    recast.visit(ast, {\n      visitFunctionDeclaration: false,\n      visitFunctionExpression: false,\n      visitClassDeclaration: false,\n      visitClassExpression: false,\n      visitIfStatement: false,\n      visitWithStatement: false,\n      visitSwitchStatement: false,\n      visitCatchCause: false,\n      visitWhileStatement: false,\n      visitDoWhileStatement: false,\n      visitForStatement: false,\n      visitForInStatement: false,\n\n      visitExportDeclaration: visitor,\n      visitExportNamedDeclaration: visitor,\n      visitExportDefaultDeclaration: visitor,\n    })\n    return components\n  }\n\n  function findAllStyledComponents(ast: Todo, recast: Todo) {\n    const components: Todo[] = []\n    const t = recast.types.namedTypes\n\n    recast.visit(ast, {\n      visitFunctionDeclaration: false,\n      visitFunctionExpression: false,\n      visitClassDeclaration: false,\n      visitClassExpression: false,\n      visitIfStatement: false,\n      visitWithStatement: false,\n      visitSwitchStatement: false,\n      visitCatchCause: false,\n      visitWhileStatement: false,\n      visitDoWhileStatement: false,\n      visitForStatement: false,\n      visitForInStatement: false,\n\n      visitTaggedTemplateExpression(path: Todo) {\n        let comp = path\n        if (isStyledComponent(path, t)) {\n          components.push(path)\n        } else {\n          comp = utils.resolveToValue(resolveHOC(path))\n\n          if (isStyledComponent(comp, t)) components.push(comp)\n        }\n        return false\n      },\n    })\n    return components\n  }\n\n  return {\n    findAllStyledComponents,\n    findAllExportedStyledComponents,\n    findExportedStyledComponent,\n  }\n}\nexport const resolver = (ast: Todo, recast: Todo) => [\n  ...reactDocgenResolver.findAllExportedComponentDefinitions(ast, recast),\n  ...createStyledComponentResolvers().findAllExportedStyledComponents(\n    ast,\n    recast\n  ),\n]\n"
  },
  {
    "path": "core/docz-core/src/utils/docgen/externalProptypesHandler.ts",
    "content": "// vendored from react-docgen-external-proptypes-handler\n// which is not well maintained\n// https://github.com/doczjs/docz/issues/727\n\nconst path = require('path')\nconst fs = require('fs')\nconst recast = require('recast')\n\n/**\n * Re-using few private methods of react-docgen to avoid code duplication\n */\nconst isRequiredPropType = require('react-docgen/dist/utils/isRequiredPropType')\n  .default\nconst setPropDescription = require('react-docgen/dist/utils/setPropDescription')\n  .default\nlet babylon: any\ntry {\n  const buildParser = require('react-docgen/dist/babelParser').default\n  babylon = buildParser()\n} catch (e) {\n  /** DOCZ: special error message as people often encounter errors here because they misconfigure or lack a babel plugin */\n  console.error('Error while initializing babel in docz: ', e)\n  /** DOCZ: disabling this require because it no longer exists */\n  throw new Error(e)\n  // babylon = require('react-docgen/dist/babylon').default\n}\n\nconst utils = require('react-docgen').utils\nconst types = recast.types.namedTypes\nconst HOP = Object.prototype.hasOwnProperty\nconst createObject = Object.create\n\nfunction isPropTypesExpression(path: string) {\n  const moduleName = utils.resolveToModule(path)\n\n  if (moduleName) {\n    return (\n      utils.isReactModuleName(moduleName) || moduleName === 'ReactPropTypes'\n    )\n  }\n\n  return false\n}\n\n/**\n * Amends the documentation object with propTypes information.\n * @method amendPropTypes\n * @param  {Object} documentation  documentation object\n * @param  {Object} path  node path reference of propTypes property\n */\nfunction amendPropTypes(documentation: any, path: any) {\n  if (!types.ObjectExpression.check(path.node)) {\n    return\n  }\n\n  path.get('properties').each((propertyPath: any) => {\n    let propDescriptor, valuePath, type, resolvedValuePath\n\n    const nodeType = propertyPath.node.type\n\n    if (nodeType === types.Property.name) {\n      propDescriptor = documentation.getPropDescriptor(\n        utils.getPropertyName(propertyPath)\n      )\n      valuePath = propertyPath.get('value')\n      type = isPropTypesExpression(valuePath)\n        ? utils.getPropType(valuePath)\n        : {\n            name: 'custom',\n            raw: utils.printValue(valuePath),\n          }\n      if (type) {\n        propDescriptor.type = type\n        propDescriptor.required =\n          type.name !== 'custom' && isRequiredPropType(valuePath)\n      }\n    } else if (nodeType === types.SpreadProperty.name) {\n      resolvedValuePath = utils.resolveToValue(propertyPath.get('argument'))\n      // normal object literal\n      if (resolvedValuePath.node.type === types.ObjectExpression.name) {\n        amendPropTypes(documentation, resolvedValuePath)\n      }\n    }\n\n    if (types.Property.check(propertyPath.node)) {\n      setPropDescription(documentation, propertyPath)\n    }\n  })\n}\n\n/**\n * Accepts absolute path of a source file and returns the file source as string.\n * @method getSrc\n * @param  {String} filePath  File path of the component\n * @return {String} Source code of the given file if file exist else returns empty\n */\nfunction getSrc(filePath: string) {\n  let src\n\n  if (fs.existsSync(filePath)) {\n    src = fs.readFileSync(filePath, 'utf-8')\n  }\n\n  return src\n}\n\nfunction getAST(src: string) {\n  return recast.parse(src, {\n    source: 'module',\n    esprima: babylon,\n  })\n}\n\n/**\n * Resolves propTypes source file path relative to current component,\n * which resolves only file extension of type .js or .jsx\n *\n * @method resolveFilePath\n * @param  {String} componentPath  Relative file path of the component\n * @param  {String} importedFilePath Relative file path of a dependent component\n * @return {String} Resolved file path if file exist else null\n */\nfunction resolveFilePath(componentPath: string, importedFilePath: string) {\n  const regEx = /\\.(js|jsx)$/\n  let srcPath = path.resolve(path.dirname(componentPath), importedFilePath)\n\n  if (regEx.exec(srcPath)) {\n    return srcPath\n  } else {\n    srcPath += fs.existsSync(`${srcPath}.js`) ? '.js' : '.jsx'\n    return srcPath\n  }\n}\n\n/**\n * Method which returns actual values from the AST node of type specifiers.\n *\n * @method getSpecifiersOfNode\n */\nfunction getSpecifiersOfNode(specifiers: any) {\n  const specifier: string[] = []\n\n  specifiers.forEach((node: any) => {\n    specifier.push(node.local.name)\n  })\n\n  return specifier\n}\n\n/**\n * Filters the list of identifier node values or node paths from a given AST.\n *\n * @method getIdentifiers\n * @param  {Object} ast Root AST node of a component\n * @return {Object} Which holds identifier relative file path as `key` and identifier name as `value`\n */\nfunction getIdentifiers(ast: any) {\n  const identifiers = createObject(null)\n\n  recast.visit(ast, {\n    visitVariableDeclarator(path: any) {\n      const node = path.node\n      const nodeType = node.init.type\n\n      if (nodeType === types.Identifier.name) {\n        if (identifiers[node.init.name]) {\n          identifiers[node.init.name].push(node.init.name)\n        } else {\n          identifiers[node.init.name] = [node.init.name]\n        }\n      } else if (nodeType === types.Literal.name) {\n        if (identifiers[node.id.name]) {\n          identifiers[node.id.name].push(node.init.value)\n        } else {\n          identifiers[node.id.name] = [node.init.value]\n        }\n      } else if (nodeType === types.ArrayExpression.name) {\n        if (identifiers[node.id.name]) {\n          identifiers[node.id.name].push(node.init.elements)\n        } else {\n          identifiers[node.id.name] = node.init.elements\n        }\n      } else if (nodeType === types.ObjectExpression.name) {\n        if (identifiers[node.id.name]) {\n          identifiers[node.id.name].push({\n            path,\n            value: node.init.properties,\n          })\n        } else {\n          identifiers[node.id.name] = {\n            path,\n            value: node.init.properties,\n          }\n        }\n      }\n\n      this.traverse(path)\n    },\n  })\n\n  return identifiers\n}\n\n/**\n * Traverse through given AST and filters named and default export declarations.\n *\n * @method getExports\n * @param  {Object} ast Root AST node of a component\n * @return {Array} which holds list of named identifiers\n */\nfunction getExports(ast: any) {\n  const exports: any = []\n\n  recast.visit(ast, {\n    visitExportNamedDeclaration(path: any) {\n      const node = path.node\n      const specifiers = getSpecifiersOfNode(node.specifiers)\n      const declarations = Object.keys(getIdentifiers(ast))\n\n      exports.push(...new Set(specifiers.concat(declarations)))\n      this.traverse(path)\n    },\n    visitExportDefaultDeclaration(path: any) {\n      const node = path.node\n\n      if (node.declaration.type === types.Identifier.name) {\n        exports.push(node.declaration.name)\n      }\n      /* Commenting it for now, this might needed for further enhancements.\n      else if (nodeType === types.Literal.name) {\n        varDeclarators.push(node.init.value);\n      } else if (nodeType === types.ArrayExpression.name) {\n        computedPropNodes[node.id.name] = node.init.elements;\n      }*/\n      this.traverse(path)\n    },\n  })\n\n  return exports\n}\n\n/**\n * Method to list all specifiers of es6 `import` of a given file(AST)\n *\n * @method getImports\n * @param  {Object} ast Root AST node of a component\n * @return {Object/Boolean} if Object: Holds import module name or file path as `key`\n *                          and identifier as `value`, else return false\n */\nfunction getImports(ast: any) {\n  const specifiers = createObject(null)\n\n  recast.visit(ast, {\n    visitImportDeclaration: (path: any) => {\n      const name = path.node.source.value\n      const specifier = getSpecifiersOfNode(path.node.specifiers)\n\n      if (!specifiers[name]) {\n        specifiers[name] = specifier\n      } else {\n        specifiers[name].push(...specifier)\n      }\n\n      return false\n    },\n  })\n\n  return specifiers\n}\n\n/**\n * Method to resolve all dependent values(computed values, which are from external files).\n *\n * @method resolveImportedDependencies\n * @param  {Object} ast Root AST node of the component\n * @param  {Object} srcFilePath Absolute path of a dependent file\n * @return {Object} Holds export identifier as `key` and respective AST node path as value\n */\nfunction resolveImportedDependencies(ast: any, srcFilePath: any) {\n  const filteredItems = createObject(null)\n  const importSpecifiers = getImports(ast)\n\n  let identifiers, resolvedNodes\n\n  if (importSpecifiers && Object.keys(importSpecifiers).length) {\n    resolvedNodes = resolveDependencies(importSpecifiers, srcFilePath)\n  }\n\n  const exportSpecifiers = getExports(ast)\n\n  if (exportSpecifiers && exportSpecifiers.length) {\n    identifiers = getIdentifiers(ast)\n  }\n\n  if (resolvedNodes) {\n    Object.assign(identifiers, ...resolvedNodes)\n  }\n\n  for (const identifier in identifiers) {\n    if (\n      HOP.call(identifiers, identifier) &&\n      exportSpecifiers.indexOf(identifier) > -1\n    ) {\n      filteredItems[identifier] = identifiers[identifier]\n    }\n  }\n\n  return filteredItems\n}\n\n/**\n * Method to resolve all the external dependencies of the component propTypes\n *\n * @method resolveDependencies\n * @param  {Array} filePaths List of files to resolve\n * @param  {String} componentPath Absolute path of the component in case `propTypes` are declared in a component file or\n *                  absolute path to the file where `propTypes` is declared.\n */\nfunction resolveDependencies(filePaths: string[], componentPath: string) {\n  const importedNodes = []\n\n  for (const importedFilePath in filePaths) {\n    if (HOP.call(filePaths, importedFilePath)) {\n      const srcPath = resolveFilePath(componentPath, importedFilePath)\n\n      if (!srcPath) {\n        return\n      }\n\n      const src = getSrc(srcPath)\n\n      if (src) {\n        const ast = getAST(src)\n        importedNodes.push(resolveImportedDependencies(ast, srcPath))\n      }\n    }\n  }\n\n  return importedNodes\n}\n\n/**\n * Method to filter computed props(which are declared out side of the component and used in propTypes object).\n *\n * @method filterSpecifiers\n * @param  {Object} specifiers  List which holds all the values of external dependencies\n * @return {Object} computedPropNames  List which holds all the computed values from `propTypes` property\n */\nfunction filterSpecifiers(specifiers: any, computedPropNames: any) {\n  const filteredSpecifiers = createObject(null)\n\n  for (const cp in computedPropNames) {\n    if (HOP.call(computedPropNames, cp)) {\n      for (const sp in specifiers) {\n        if (HOP.call(specifiers, sp) && specifiers[sp].indexOf(cp) > -1) {\n          if (filteredSpecifiers[sp]) {\n            filteredSpecifiers[sp].push(cp)\n          } else {\n            filteredSpecifiers[sp] = [cp]\n          }\n        }\n      }\n    }\n  }\n\n  return filteredSpecifiers\n}\n\n/**\n * Method to parse and get computed nodes from a document object\n *\n * @method getComputedPropValuesFromDoc\n * @param  {Object} doc  react-docgen document object\n * @return {Object/Boolean} Object with computed property identifer as `key` and AST node path as `value`,\n *                          If document object have any computed properties else return false.\n */\n\nfunction getComputedPropValuesFromDoc(doc: any) {\n  let flag\n  const computedProps = createObject(null)\n  const props = doc.toObject().props\n\n  flag = false\n\n  if (props) {\n    for (const prop in props) {\n      if (HOP.call(props, prop)) {\n        const o = props[prop]\n        if (o.type && o.type.name === 'enum' && o.type.computed) {\n          flag = true\n          computedProps[o.type.value] = o\n        }\n      }\n    }\n    return flag ? computedProps : false\n  } else {\n    return false\n  }\n}\n\n/**\n * Method to update the document object computed values with actual values to generate doc for external dependent values.\n *\n * @method amendDocs\n * @param  {Object} doc  react-docgen document object\n * @param  {Object} path  AST node path of component `propTypes`\n * @param  {Object} props  list of actual values of computed properties\n */\nfunction amendDocs(doc: any, path: any, props: any) {\n  const propsToPatch = path.get('properties')\n\n  function getComputedPropVal(name: string) {\n    for (let i = 0; i < props.length; i++) {\n      if (props[i][name]) {\n        return props[i][name]\n      }\n    }\n  }\n\n  propsToPatch.each((propertyPath: string) => {\n    const propDescriptor = doc.getPropDescriptor(\n      utils.getPropertyName(propertyPath)\n    )\n\n    if (propDescriptor.type.name === 'enum' && propDescriptor.type.computed) {\n      const oldVal = propDescriptor.type.value\n      const newVal = getComputedPropVal(propDescriptor.type.value) || oldVal\n      propDescriptor.type.value = newVal\n      propDescriptor.type.computed = false\n    }\n  })\n}\n\n/**\n * Initializer of react-docgen custom handler.\n *\n * @method externalProptypesHandler\n * @param  {String} componentPath  Absolute path of the react component\n */\nfunction externalProptypesHandler(componentPath: string) {\n  return (doc: any, path: any) => {\n    const root = path.scope.getGlobalScope().node\n    let propTypesPath, propTypesFilePath, propTypesAST\n\n    propTypesPath = utils.getMemberValuePath(path, 'propTypes')\n    propTypesAST = root\n    propTypesFilePath = componentPath\n\n    if (!propTypesPath) {\n      return\n    }\n\n    const propsNameIdentifier = propTypesPath.node.name\n    propTypesPath = utils.resolveToValue(propTypesPath)\n\n    if (!propTypesPath) {\n      return\n    }\n\n    if (!types.ObjectExpression.check(propTypesPath.node)) {\n      //First resolve dependencies against component path\n      propTypesFilePath = resolveFilePath(\n        componentPath,\n        propTypesPath.node.source.value\n      )\n      const propTypesSrc = getSrc(propTypesFilePath)\n      propTypesAST = getAST(propTypesSrc)\n      const importedPropTypes = getIdentifiers(propTypesAST)[\n        propsNameIdentifier\n      ]\n\n      if (!importedPropTypes) {\n        return\n      }\n\n      propTypesPath = utils.resolveToValue(importedPropTypes.path)\n\n      //updating doc object with external props\n      amendPropTypes(doc, propTypesPath)\n    }\n\n    const computedPropNames = getComputedPropValuesFromDoc(doc)\n\n    if (!computedPropNames) {\n      return\n    }\n\n    const importSpecifiers = getImports(propTypesAST)\n\n    if (!importSpecifiers) {\n      return\n    }\n\n    const filteredProps = filterSpecifiers(importSpecifiers, computedPropNames)\n\n    if (!Object.keys(filteredProps).length) {\n      return\n    }\n\n    const resolvedImports = resolveDependencies(\n      filteredProps,\n      propTypesFilePath\n    )\n\n    if (resolvedImports && !resolvedImports.length) {\n      return\n    }\n\n    amendDocs(doc, propTypesPath, resolvedImports)\n  }\n}\n\nexport default externalProptypesHandler\n"
  },
  {
    "path": "core/docz-core/src/utils/docgen/index.ts",
    "content": "import findUp from 'find-up'\n\nimport * as paths from '../../config/paths'\nimport { Config } from '../../config/argv'\nimport { jsParser } from './javascript'\nimport { tsParser } from './typescript'\nimport { normalize } from 'path'\n\nexport const unixPath = (src: string): string => {\n  return normalize(src).replace(/\\\\/g, '/')\n}\n\nexport const docgen = async (files: string[], config: Config) => {\n  const cwd = paths.getRootDir(config)\n  const tsconfig = await findUp('tsconfig.json', { cwd })\n  const tsFiles = files.filter(file => file.match(/\\.(tsx|ts)$/))\n  const jsFiles = files.filter(file => file.match(/\\.(js|jsx|mjs)$/))\n\n  return config.typescript\n    ? tsParser(tsFiles, config, tsconfig).concat(jsParser(jsFiles, config))\n    : jsParser(jsFiles, config)\n}\n"
  },
  {
    "path": "core/docz-core/src/utils/docgen/javascript.ts",
    "content": "import * as fs from 'fs-extra'\nimport * as path from 'path'\nimport logger from 'signale'\nimport actualNameHandler from 'react-docgen-actual-name-handler'\nimport * as reactDocgen from 'react-docgen'\n\nimport { Config } from '../../config/argv'\nimport { getRootDir } from '../../config/paths'\nimport { unixPath } from '.'\nimport { resolver as doczResolver } from './docz-docgen-resolver'\nimport externalProptypesHandler from './externalProptypesHandler'\n\nconst throwError = (err: any) => {\n  logger.fatal(`Error parsing static types`)\n  logger.error(err)\n}\n\nexport const jsParser = (files: string[], config: Config) => {\n  const resolver = config.docgenConfig.resolver || doczResolver\n\n  const root = getRootDir(config)\n  const parseFilepathProps = (filepath: string) => {\n    const fullpath = path.resolve(root, filepath)\n    const handlers = reactDocgen.defaultHandlers.concat([\n      externalProptypesHandler(filepath),\n      actualNameHandler,\n    ])\n\n    try {\n      const code = fs.readFileSync(fullpath, { encoding: 'utf-8' })\n      const props = reactDocgen.parse(code, resolver, handlers)\n      return { key: unixPath(filepath), value: props }\n    } catch (err) {\n      if (config.debug) throwError(err)\n      return null\n    }\n  }\n\n  return files.map(parseFilepathProps).filter(Boolean)\n}\n"
  },
  {
    "path": "core/docz-core/src/utils/docgen/typescript.ts",
    "content": "import * as fs from 'fs-extra'\nimport * as path from 'path'\nimport * as crypto from 'crypto'\nimport * as _ from 'lodash/fp'\nimport * as logger from 'signale'\nimport * as reactDocgenTs from 'react-docgen-typescript'\nimport ts from 'typescript'\n\nimport { Config } from '../../config/argv'\nimport * as paths from '../../config/paths'\nimport { unixPath } from '.'\n\nexport interface TSFile {\n  text?: string\n  version: number\n}\n\ninterface PropItem {\n  key: string\n  value: any[]\n}\n\nconst digest = (str: string) =>\n  crypto\n    .createHash('md5')\n    .update(str)\n    .digest('hex')\n\nconst cacheFilepath = path.join(paths.cache, 'propsParser.json')\nexport const readCacheFile = () =>\n  fs.readJSONSync(cacheFilepath, { throws: false })\n\nfunction checkFilesOnCache(files: string[], config: Config): string[] {\n  const cache = readCacheFile()\n  const root = paths.getRootDir(config)\n  if (_.isEmpty(cache)) return files\n  return files.filter(filepath => {\n    const normalized = path.normalize(filepath)\n    const fullpath = path.resolve(root, normalized)\n    const hash = digest(fs.readFileSync(fullpath, 'utf-8'))\n    const found = _.get(normalized, cache)\n    return found && hash !== found.hash\n  })\n}\n\nfunction writePropsOnCache(items: PropItem[], config: Config): void {\n  const cache = readCacheFile()\n  const root = paths.getRootDir(config)\n  const newCache = items.reduce((obj, { key: filepath, value }) => {\n    const fullpath = path.resolve(root, path.normalize(filepath))\n    const hash = digest(fs.readFileSync(fullpath, 'utf-8'))\n    return { ...obj, [unixPath(filepath)]: { hash, props: value } }\n  }, {})\n\n  fs.outputJSONSync(cacheFilepath, { ...cache, ...newCache })\n}\n\nfunction getPropsOnCache(): any {\n  const cache = readCacheFile()\n  if (_.isEmpty(cache)) {\n    logger.warn('No cache was found with your props definitions')\n    logger.warn(\"We'll parse your components to get props from them\")\n    logger.warn('Depending on your components, this could take while...')\n    return []\n  }\n\n  return Object.entries(cache).map(([key, value]) => ({\n    key: unixPath(key),\n    value: _.get('props', value),\n  }))\n}\n\nconst mergeWithCache = (cache: any[], props: any[]) => {\n  const keys = props.map(_.prop('key'))\n  return cache.filter(item => !_.contains(item.key, keys)).concat(props)\n}\n\nconst removeFromCache = (filepath: string) => {\n  const cache = readCacheFile()\n  fs.outputJSONSync(cacheFilepath, _.omit(filepath, cache))\n}\n\nconst getInitialFilesMap = (): Map<string, TSFile> => {\n  const cache = readCacheFile()\n  if (_.isEmpty(cache)) return new Map<string, TSFile>()\n  const map = new Map()\n  _.entries(cache).forEach(([filepath]: any) => {\n    const exist = fs.pathExistsSync(filepath)\n    if (!exist) {\n      removeFromCache(filepath)\n    } else {\n      map.set(filepath, {\n        text: fs.readFileSync(filepath, 'utf-8'),\n        version: 0,\n      })\n    }\n  })\n  return map\n}\n\nlet languageService: ts.LanguageService | null = null\nconst filesMap = getInitialFilesMap()\n\nfunction getTSConfigFile(tsconfigPath: string): ts.ParsedCommandLine {\n  const basePath = path.dirname(tsconfigPath)\n  const configFile = ts.readConfigFile(tsconfigPath, ts.sys.readFile)\n  return ts.parseJsonConfigFileContent(\n    configFile!.config,\n    ts.sys,\n    basePath,\n    {},\n    tsconfigPath\n  )\n}\n\nfunction loadFiles(filesToLoad: string[], config: Config): void {\n  const root = paths.getRootDir(config)\n  filesToLoad.forEach(filepath => {\n    const normalized = path.normalize(filepath)\n    const fullpath = path.resolve(root, normalized)\n    const found = filesMap.get(normalized)\n    filesMap.set(normalized, {\n      text: fs.readFileSync(fullpath, 'utf-8'),\n      version: found ? found.version + 1 : 0,\n    })\n  })\n}\n\nfunction createServiceHost(\n  compilerOptions: ts.CompilerOptions,\n  files: Map<string, TSFile>,\n  config: Config\n): ts.LanguageServiceHost {\n  const root = paths.getRootDir(config)\n  return {\n    getScriptFileNames: () => {\n      return [...files.keys()]\n    },\n    getScriptVersion: fileName => {\n      const file = files.get(fileName)\n      return (file && file.version.toString()) || ''\n    },\n    getScriptSnapshot: fileName => {\n      const fullpath = path.resolve(root, fileName)\n      if (!fs.existsSync(fullpath)) {\n        return undefined\n      }\n\n      let file = files.get(fileName)\n      if (file === undefined) {\n        const text = fs.readFileSync(fullpath).toString()\n\n        file = { version: 0, text }\n        files.set(fileName, file)\n      }\n\n      return ts.ScriptSnapshot.fromString(file!.text!)\n    },\n    getCurrentDirectory: () => root,\n    getCompilationSettings: () => compilerOptions,\n    getDefaultLibFileName: options => ts.getDefaultLibFilePath(options),\n    fileExists: ts.sys.fileExists,\n    readFile: ts.sys.readFile,\n    readDirectory: ts.sys.readDirectory,\n  }\n}\n\nconst defaultPropFilter = (prop: any): boolean => {\n  return prop.parent == null || !prop.parent.fileName.includes('node_modules')\n}\n\nconst parseFiles = (files: string[], config: Config, tsconfig: string) => {\n  const opts = {\n    propFilter(prop: any): boolean {\n      const customPropFilter = config.docgenConfig.propFilter\n      const propFilter =\n        customPropFilter && _.isFunction(customPropFilter)\n          ? customPropFilter\n          : defaultPropFilter\n\n      return Boolean(propFilter(prop))\n    },\n    componentNameResolver(exp: ts.Symbol, source: ts.SourceFile): any {\n      const componentNameResolver = config.docgenConfig.resolver\n      const val =\n        componentNameResolver &&\n        _.isFunction(componentNameResolver) &&\n        componentNameResolver(exp, source)\n      return val\n    },\n  }\n\n  loadFiles(files, config)\n  const parser = reactDocgenTs.withCustomConfig(tsconfig, opts)\n  const compilerOptions = _.get('options', getTSConfigFile(tsconfig))\n\n  const programProvider = () => {\n    if (languageService) return languageService.getProgram()!\n    const servicesHost = createServiceHost(compilerOptions, filesMap, config)\n    const documentRegistry = ts.createDocumentRegistry()\n    languageService = ts.createLanguageService(servicesHost, documentRegistry)\n    return languageService.getProgram()!\n  }\n\n  return files.map(filepath => ({\n    key: unixPath(filepath),\n    value: parser.parseWithProgramProvider(filepath, programProvider),\n  }))\n}\n\nexport const tsParser = (\n  files: string[],\n  config: Config,\n  tsconfig?: string\n) => {\n  if (!tsconfig) return []\n  const filesToLoad = checkFilesOnCache(files, config)\n  const propsOnCache = getPropsOnCache()\n  if (!filesToLoad.length) return propsOnCache\n\n  const next = parseFiles(filesToLoad, config, tsconfig)\n  writePropsOnCache(next, config)\n  return mergeWithCache(propsOnCache, next)\n}\n"
  },
  {
    "path": "core/docz-core/src/utils/open-browser.ts",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict'\n\nvar chalk = require('chalk')\nvar execSync = require('child_process').execSync\nvar spawn = require('cross-spawn')\nvar open = require('open')\n\n// https://github.com/sindresorhus/open#app\nvar OSX_CHROME = 'google chrome'\n\nconst Actions = Object.freeze({\n  NONE: 0,\n  BROWSER: 1,\n  SCRIPT: 2,\n})\n\nfunction getBrowserEnv() {\n  // Attempt to honor this environment variable.\n  // It is specific to the operating system.\n  // See https://github.com/sindresorhus/open#app for documentation.\n  const value = process.env.BROWSER\n  let action\n  if (!value) {\n    // Default.\n    action = Actions.BROWSER\n  } else if (value.toLowerCase().endsWith('.js')) {\n    action = Actions.SCRIPT\n  } else if (value.toLowerCase() === 'none') {\n    action = Actions.NONE\n  } else {\n    action = Actions.BROWSER\n  }\n  return { action, value }\n}\n\nfunction executeNodeScript(scriptPath: any, url: any) {\n  const extraArgs = process.argv.slice(2)\n  const child = spawn('node', [scriptPath, ...extraArgs, url], {\n    stdio: 'inherit',\n  })\n  child.on('close', (code: any) => {\n    if (code !== 0) {\n      console.log()\n      console.log(\n        chalk.red(\n          'The script specified as BROWSER environment variable failed.'\n        )\n      )\n      console.log(chalk.cyan(scriptPath) + ' exited with code ' + code + '.')\n      console.log()\n      return\n    }\n  })\n  return true\n}\n\nfunction startBrowserProcess(browser: any, url: any) {\n  // If we're on OS X, the user hasn't specifically\n  // requested a different browser, we can try opening\n  // Chrome with AppleScript. This lets us reuse an\n  // existing tab when possible instead of creating a new one.\n  const shouldTryOpenChromeWithAppleScript =\n    process.platform === 'darwin' &&\n    (typeof browser !== 'string' || browser === OSX_CHROME)\n\n  if (shouldTryOpenChromeWithAppleScript) {\n    try {\n      // Try our best to reuse existing tab\n      // on OS X Google Chrome with AppleScript\n      execSync('ps cax | grep \"Google Chrome\"')\n      execSync('osascript openChrome.applescript \"' + encodeURI(url) + '\"', {\n        cwd: __dirname,\n        stdio: 'ignore',\n      })\n      return true\n    } catch (err) {\n      // Ignore errors.\n    }\n  }\n\n  // Another special case: on OS X, check if BROWSER has been set to \"open\".\n  // In this case, instead of passing `open` to `open` (which won't work),\n  // just ignore it (thus ensuring the intended behavior, i.e. opening the system browser):\n  // https://github.com/facebook/create-react-app/pull/1690#issuecomment-283518768\n  if (process.platform === 'darwin' && browser === 'open') {\n    browser = undefined\n  }\n\n  // Fallback to opn\n  // (It will always open new tab)\n  try {\n    var options = { app: browser, wait: false }\n    open(url, options).catch(() => {}) // Prevent `unhandledRejection` error.\n    return true\n  } catch (err) {\n    return false\n  }\n}\n\n/**\n * Reads the BROWSER environment variable and decides what to do with it. Returns\n * true if it opened a browser or ran a node.js script, otherwise false.\n */\nexport function openBrowser(url: any) {\n  const { action, value } = getBrowserEnv()\n  switch (action) {\n    case Actions.NONE:\n      // Special case: BROWSER=\"none\" will prevent opening completely.\n      return false\n    case Actions.SCRIPT:\n      return executeNodeScript(value, url)\n    case Actions.BROWSER:\n      return startBrowserProcess(value, url)\n    default:\n      throw new Error('Not implemented.')\n  }\n}\n\n// module.exports = openBrowser\n"
  },
  {
    "path": "core/docz-core/src/utils/openChrome.applescript",
    "content": "property targetTab: null\nproperty targetTabIndex: -1\nproperty targetWindow: null\n\non run argv\n  set theURL to item 1 of argv\n\n  tell application \"Chrome\"\n\n    if (count every window) = 0 then\n      make new window\n    end if\n\n    -- 1: Looking for tab running debugger\n    -- then, Reload debugging tab if found\n    -- then return\n    set found to my lookupTabWithUrl(theURL)\n    if found then\n      set targetWindow's active tab index to targetTabIndex\n      tell targetTab to reload\n      tell targetWindow to activate\n      set index of targetWindow to 1\n      return\n    end if\n\n    -- 2: Looking for Empty tab\n    -- In case debugging tab was not found\n    -- We try to find an empty tab instead\n    set found to my lookupTabWithUrl(\"chrome://newtab/\")\n    if found then\n      set targetWindow's active tab index to targetTabIndex\n      set URL of targetTab to theURL\n      tell targetWindow to activate\n      return\n    end if\n\n    -- 3: Create new tab\n    -- both debugging and empty tab were not found\n    -- make a new tab with url\n    tell window 1\n      activate\n      make new tab with properties {URL:theURL}\n    end tell\n  end tell\nend run\n\n-- Function:\n-- Lookup tab with given url\n-- if found, store tab, index, and window in properties\n-- (properties were declared on top of file)\non lookupTabWithUrl(lookupUrl)\n  tell application \"Chrome\"\n    -- Find a tab with the given url\n    set found to false\n    set theTabIndex to -1\n    repeat with theWindow in every window\n      set theTabIndex to 0\n      repeat with theTab in every tab of theWindow\n        set theTabIndex to theTabIndex + 1\n        if (theTab's URL as string) contains lookupUrl then\n          -- assign tab, tab index, and window to properties\n          set targetTab to theTab\n          set targetTabIndex to theTabIndex\n          set targetWindow to theWindow\n          set found to true\n          exit repeat\n        end if\n      end repeat\n\n      if found then\n        exit repeat\n      end if\n    end repeat\n  end tell\n  return found\nend lookupTabWithUrl\n"
  },
  {
    "path": "core/docz-core/src/utils/p-reduce.ts",
    "content": "export const pReduce = (iterable: any, reducer: any, initialValue: any): any =>\n  new Promise((resolve, reject) => {\n    const iterator = iterable[Symbol.iterator]()\n    let index = 0\n\n    const next = async (total: any) => {\n      const element = iterator.next()\n\n      if (element.done) {\n        resolve(total)\n        return\n      }\n\n      try {\n        const value = await Promise.all([total, element.value])\n        next(reducer(value[0], value[1], index++))\n      } catch (error) {\n        reject(error)\n      }\n    }\n\n    next(initialValue)\n  })\n"
  },
  {
    "path": "core/docz-core/src/utils/repo-info.ts",
    "content": "import * as path from 'path'\nimport * as fs from 'fs-extra'\nimport getPkgRepo from 'get-pkg-repo'\nimport findup from 'find-up'\n\nimport * as paths from '../config/paths'\nimport { Config } from '../config/argv'\n\n// TODO: type repo object returned from get-pkg-repo\nexport const parseRepo = (): any => {\n  try {\n    const pkg = fs.readJsonSync(paths.appPackageJson)\n    return getPkgRepo(pkg)\n  } catch (err) {\n    return null\n  }\n}\n\nexport const getRepoUrl = () => {\n  const repo = parseRepo()\n\n  return (\n    repo &&\n    ((repo.browsetemplate &&\n      repo.browsetemplate\n        .replace('{domain}', repo.domain)\n        .replace('{user}', repo.user)\n        .replace('{project}', repo.project)\n        .replace('{/tree/committish}', '')) ||\n      (repo.browse && repo.browse()))\n  )\n}\n\nconst getBitBucketPath = (branch: string, relative: string) => {\n  const querystring = `?mode=edit&spa=0&at=${branch}&fileviewer=file-view-default`\n  const filepath = path.join(`/src/${branch}`, relative, `{{filepath}}`)\n  return `${filepath}${querystring}`\n}\n\nconst getTree = (repo: any, branch: string, relative: string) => {\n  const defaultPath = path.join(`/edit/${branch}`, relative, `{{filepath}}`)\n  const bitBucketPath = getBitBucketPath(branch, relative)\n\n  if (repo && repo.type === 'bitbucket') return bitBucketPath\n  return defaultPath\n}\n\nexport const getRepoEditUrl = (config: Config): string | null => {\n  try {\n    const repo = parseRepo()\n    const gitDir = findup.sync('.git', { type: 'directory' })\n    if (!gitDir) return null\n\n    const project = path.parse(gitDir).dir\n    const root = path.join(paths.getRootDir(config), config.src)\n    const relative = path.relative(project, root)\n    const tree = getTree(repo, config.editBranch, relative)\n\n    return (\n      repo &&\n      repo.browsetemplate &&\n      repo.browsetemplate\n        .replace('{domain}', repo.domain)\n        .replace('{user}', repo.user)\n        .replace('{project}', repo.project)\n        .replace('{/tree/committish}', tree)\n    )\n  } catch (err) {\n    console.log(err)\n    return null\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/utils/spawn.ts",
    "content": "import crossSpawn from 'cross-spawn'\n\nexport const spawnSync = (command: string, args?: readonly string[]) => {\n  const { status } = crossSpawn.sync(command, args, {\n    stdio: 'inherit',\n  })\n\n  if (status !== 0) {\n    process.exitCode = status || 1\n  }\n}\n"
  },
  {
    "path": "core/docz-core/src/utils/template.ts",
    "content": "import * as path from 'path'\nimport * as fs from 'fs-extra'\nimport { compiled } from 'docz-utils/lib/fs'\nimport { format } from 'docz-utils/lib/format'\n\nimport * as paths from '../config/paths'\n\nexport const fromTemplates = (file: string) => {\n  return path.join(paths.templates, file)\n}\n\nexport const outputFileFromTemplate = async (\n  templatePath: string,\n  outputPath: string,\n  templateProps?: Record<string, any>,\n  compileProps?: Record<string, any>\n) => {\n  const filepath = fromTemplates(templatePath)\n  const template = await compiled(filepath, compileProps || { minimize: false })\n  const file = template(templateProps || {})\n  const raw = await format(file)\n  await fs.outputFile(outputPath, raw)\n}\n"
  },
  {
    "path": "core/docz-core/templates/404.tpl.js",
    "content": "import React from 'react'\n\nconst NotFound = () => {\n  const style = {\n    display: 'flex',\n    alignItems: 'center',\n    justifyContent: 'center',\n    height: '100vh',\n    width: '100vw',\n    fontSize: 32,\n  }\n\n  return <div style={style}>Not Found</div>\n}\n\nexport default NotFound\n"
  },
  {
    "path": "core/docz-core/templates/gatsby-config.tpl.js",
    "content": "const { mergeWith } = require('docz-utils')\nconst fs = require('fs-extra')\n\nlet custom = {}\nconst hasGatsbyConfig = fs.existsSync('./gatsby-config.custom.js')\n\nif (hasGatsbyConfig) {\n  try {\n    custom = require('./gatsby-config.custom')\n  } catch (err) {\n    console.error(\n      `Failed to load your gatsby-config.js file : `,\n      JSON.stringify(err)\n    )\n  }\n}\n\nconst config = {\n  <% if (config.base) {%>\n  pathPrefix: \"<%- config.base %>\",\n  <%}%>\n  siteMetadata: {\n    title: \"<%- config.title %>\",\n    description: \"<%- config.description %>\"\n  },\n  plugins: [\n    <% if (config.typescript) {%>\n    {\n      resolve: 'gatsby-plugin-typescript',\n      options: {\n        isTSX: true,\n        allExtensions: true\n      }\n    },<%}%>\n    {\n      resolve: 'gatsby-theme-docz',\n      options: <%- opts %>\n    },<% if (isDoczRepo) {%>\n    {\n      resolve: 'gatsby-plugin-eslint',\n      options: {\n        test: /\\.js$|\\.jsx$/,\n        exclude: /.*/,\n        stages: ['develop'],\n        options: {\n          emitWarning: false,\n          failOnError: false,\n        },\n      },\n    },\n    {\n      resolve: 'gatsby-plugin-compile-es6-packages',\n      options: {\n        modules: ['docz', 'gatsby-theme-docz'],\n      },\n    },<%}%>\n  ],\n}\n\nconst merge = mergeWith((objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue)\n  }\n})\n\nmodule.exports = merge(config, custom)\n"
  },
  {
    "path": "core/docz-core/templates/gatsby-node.tpl.js",
    "content": "const { get } = require('docz-utils')\n\nconst NO_OP = () => {}\n\nconst DEFAULT_RESOLVABLE_EXTENSIONS = () => [`.js`, `.jsx`]\n\nlet gatsbyNodeCustom = {}\ntry {\n  gatsbyNodeCustom = require('./gatsby-node.custom')\n} catch (err) {}\n\n// https://www.gatsbyjs.org/docs/node-apis/\n\nexports.createPages = args => {\n  const createPages = get(gatsbyNodeCustom, 'createPages', NO_OP)\n  return createPages(args)\n}\n\nexports.createPagesStatefully = args => {\n  const createPagesStatefully = get(\n    gatsbyNodeCustom,\n    'createPagesStatefully',\n    NO_OP\n  )\n  return createPagesStatefully(args)\n}\n\nexports.createResolvers = args => {\n  const createResolvers = get(gatsbyNodeCustom, 'createResolvers', NO_OP)\n  return createResolvers(args)\n}\n\nexports.createSchemaCustomization = args => {\n  const createSchemaCustomization = get(\n    gatsbyNodeCustom,\n    'createSchemaCustomization',\n    NO_OP\n  )\n  return createSchemaCustomization(args)\n}\n\nexports.generateSideEffects = args => {\n  const generateSideEffects = get(\n    gatsbyNodeCustom,\n    'generateSideEffects',\n    NO_OP\n  )\n  return generateSideEffects(args)\n}\n\nexports.onCreateBabelConfig = args => {\n  const onCreateBabelConfig = get(\n    gatsbyNodeCustom,\n    'onCreateBabelConfig',\n    NO_OP\n  )\n  return onCreateBabelConfig(args)\n}\n\nexports.onCreateDevServer = args => {\n  const onCreateDevServer = get(gatsbyNodeCustom, 'onCreateDevServer', NO_OP)\n  return onCreateDevServer(args)\n}\n\nexports.onCreateNode = args => {\n  const onCreateNode = get(gatsbyNodeCustom, 'onCreateNode', NO_OP)\n  return onCreateNode(args)\n}\n\nexports.onCreatePage = args => {\n  const onCreatePage = get(gatsbyNodeCustom, 'onCreatePage', NO_OP)\n  return onCreatePage(args)\n}\n\nexports.onCreateWebpackConfig = args => {\n  const onCreateWebpackConfig = get(\n    gatsbyNodeCustom,\n    'onCreateWebpackConfig',\n    NO_OP\n  )\n  return onCreateWebpackConfig(args)\n}\n\nexports.onPostBootstrap = args => {\n  const onPostBootstrap = get(gatsbyNodeCustom, 'onPostBootstrap', NO_OP)\n  return onPostBootstrap(args)\n}\n\nexports.onPostBuild = args => {\n  const onPostBuild = get(gatsbyNodeCustom, 'onPostBuild', NO_OP)\n  return onPostBuild(args)\n}\n\nexports.onPreBootstrap = args => {\n  const onPreBootstrap = get(gatsbyNodeCustom, 'onPreBootstrap', NO_OP)\n  return onPreBootstrap(args)\n}\n\nexports.onPreBuild = args => {\n  const onPreBuild = get(gatsbyNodeCustom, 'onPreBuild', NO_OP)\n  return onPreBuild(args)\n}\n\nexports.onPreExtractQueries = args => {\n  const onPreExtractQueries = get(\n    gatsbyNodeCustom,\n    'onPreExtractQueries',\n    NO_OP\n  )\n  return onPreExtractQueries(args)\n}\n\nexports.onPreInit = args => {\n  const onPreInit = get(gatsbyNodeCustom, 'onPreInit', NO_OP)\n  return onPreInit(args)\n}\n\nexports.preprocessSource = args => {\n  const preprocessSource = get(gatsbyNodeCustom, 'preprocessSource', NO_OP)\n  return preprocessSource(args)\n}\n\nexports.resolvableExtensions = args => {\n  const resolvableExtensions = get(\n    gatsbyNodeCustom,\n    'resolvableExtensions',\n    DEFAULT_RESOLVABLE_EXTENSIONS\n  )\n  return resolvableExtensions(args)\n}\n\nexports.setFieldsOnGraphQLNodeType = args => {\n  const setFieldsOnGraphQLNodeType = get(\n    gatsbyNodeCustom,\n    'setFieldsOnGraphQLNodeType',\n    () => ({})\n  )\n  return setFieldsOnGraphQLNodeType(args)\n}\n\nexports.sourceNodes = args => {\n  const sourceNodes = get(gatsbyNodeCustom, 'sourceNodes', NO_OP)\n  return sourceNodes(args)\n}\n"
  },
  {
    "path": "core/docz-core/templates/imports.tpl.js",
    "content": "export const imports = {\n  <% entries.forEach(function(entry) { %>'<%- entry.filepath %>': () =>\n    import(/* webpackPrefetch: true, webpackChunkName: \"<%- entry.slug %>\" */ '<%- entry.filepath %>'),<% }) %>\n}\n"
  },
  {
    "path": "core/docz-core/templates/index.tpl.html",
    "content": "<!DOCTYPE html>\n<html lang=\"{{ lang }}\">\n  <head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"description\" content=\"{{ description }}\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n    <title>{{ title }}</title>\n    {{ head }}\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    {{ footer }}\n  </body>\n</html>\n"
  },
  {
    "path": "core/docz-core/templates/index.tpl.js",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom'\nimport Root from './root'\n\nconst _onPreRenders = [<% if (onPreRenders) {%><%- onPreRenders %><%}%>]\nconst _onPostRenders = [<% if (onPostRenders) {%><%- onPostRenders %><%}%>]\n\nconst onPreRender = () => _onPreRenders.forEach(f => f && f())\nconst onPostRender = () => _onPostRenders.forEach(f => f && f())\n\nconst root = document.querySelector('#root')\nconst render = (Component = Root) => {\n  onPreRender()\n  ReactDOM.render(<Component />, root, onPostRender)\n}\n\nrender(Root)\n"
  },
  {
    "path": "core/docz-core/templates/root.tpl.js",
    "content": "import React from 'react'\nimport { Link, Router, Routes<% if (!isProd) {%>, useDataServer<%}%> } from 'docz'\n<% if (!isProd) {%>import { hot } from 'react-hot-loader'<%}%>\nimport Theme from '<%- theme %>'\n\nimport { imports } from './imports'\nimport database from './db.json'\n<% if (wrapper) {%>import Wrapper from '<%- wrapper %>'<%}%>\n\nconst Root = () => {\n  <% if (!isProd && websocketUrl) {%>useDataServer('<%- websocketUrl %>')<%}%>\n  return (\n    <Theme\n      <% if (wrapper) {%>wrapper={Wrapper}<%}%>\n      linkComponent={Link}\n      db={database}\n      >\n        <Routes imports={imports} />\n    </Theme>\n  )\n}\n\n<% if (!isProd) {%>export default hot(module)(Root)<%}%>\n<% if (isProd) {%>export default Root<%}%>\n"
  },
  {
    "path": "core/docz-core/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"module\": \"esnext\",\n    \"outDir\": \"dist\",\n    \"rootDir\": \"src\",\n    \"declaration\": true,\n    \"types\": [\"node\"],\n    \"typeRoots\": [\"../../node_modules/@types\", \"node_modules/@types\"]\n  },\n  \"include\": [\"src/**/*\", \"src/types.d.ts\"],\n  \"exclude\": [\"node_modules/**\"]\n}\n"
  },
  {
    "path": "core/docz-rollup/.eslintrc.js",
    "content": "module.exports = {\n  extends: 'docz-js',\n}\n"
  },
  {
    "path": "core/docz-rollup/.lintstagedrc",
    "content": "{\n  \"*.js\": [\"yarn fix\", \"git add\"]\n}\n"
  },
  {
    "path": "core/docz-rollup/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **dev-env/basic:** building and running development ([#1646](https://github.com/doczjs/docz/issues/1646)) ([7baaaf2](https://github.com/doczjs/docz/commit/7baaaf2))\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **dev-env/basic:** building and running development ([#1646](https://github.com/doczjs/docz/issues/1646)) ([7baaaf2](https://github.com/doczjs/docz/commit/7baaaf2))\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n**Note:** Version bump only for package docz-rollup\n\n\n\n\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n\n### Bug Fixes\n\n* bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n* eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n\n\n### Features\n\n* **gatsby-theme-docz:** add new Props component ([8eb780d](https://github.com/pedronauck/docz/commit/8eb780d))\n* add typescript support (need fix) ([13947f9](https://github.com/pedronauck/docz/commit/13947f9))\n* docz running using gatsby under the hood ([10ffd48](https://github.com/pedronauck/docz/commit/10ffd48))\n\n\n\n\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n**Note:** Version bump only for package docz-rollup\n\n\n\n\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n**Note:** Version bump only for package docz-rollup\n\n\n\n\n\n## [1.0.4](https://github.com/pedronauck/docz/compare/v1.0.3...v1.0.4) (2019-04-18)\n\n\n### Bug Fixes\n\n* **docz-rollup:** fixed rollup configs to be Windows tolerant ([#812](https://github.com/pedronauck/docz/issues/812)) ([10f6bfd](https://github.com/pedronauck/docz/commit/10f6bfd))\n\n\n\n\n\n## [1.0.2](https://github.com/pedronauck/docz/compare/v1.0.1...v1.0.2) (2019-04-15)\n\n**Note:** Version bump only for package docz-rollup\n\n\n\n\n\n# [1.0.0](https://github.com/pedronauck/docz/compare/v1.0.0-rc.8...v1.0.0) (2019-04-11)\n\n**Note:** Version bump only for package docz-rollup\n\n\n\n\n\n# [1.0.0-rc.4](https://github.com/pedronauck/docz/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2019-03-29)\n\n**Note:** Version bump only for package docz-rollup\n\n\n\n\n\n# [1.0.0-alpha.0](https://github.com/pedronauck/docz/compare/v0.13.5...v1.0.0-alpha.0) (2019-03-19)\n\n\n### Bug Fixes\n\n* use custom rollup config to build instead of libundler ([ee42a5a](https://github.com/pedronauck/docz/commit/ee42a5a))\n\n\n### Features\n\n* **docz-theme-default:** use styled-components instead of emotion ([19047fd](https://github.com/pedronauck/docz/commit/19047fd))\n* add initial gatsby integration ([#630](https://github.com/pedronauck/docz/issues/630)) ([70d40cc](https://github.com/pedronauck/docz/commit/70d40cc)), closes [#609](https://github.com/pedronauck/docz/issues/609)\n"
  },
  {
    "path": "core/docz-rollup/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) 2018 Pedro Nauck\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": "core/docz-rollup/README.md",
    "content": "## docz-rollup\n\nThis is an internal docz package containing a [rollup](https://github.com/rollup/rollup) config used by docz to build its packages.\n\nUnless you're looking to contribute to docz, you probably don't care about this package and are looking for [the docz package documentation](https://github.com/doczjs/docz).\n"
  },
  {
    "path": "core/docz-rollup/package.json",
    "content": "{\n  \"name\": \"docz-rollup\",\n  \"version\": \"2.4.0\",\n  \"license\": \"MIT\",\n  \"main\": \"src/index.js\",\n  \"files\": [\n    \"src/\",\n    \"package.json\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"core/docz-rollup\"\n  },\n  \"scripts\": {\n    \"fix\": \"yarn lint --fix\",\n    \"lint\": \"eslint . --ext .js\",\n    \"precommit\": \"lint-staged\"\n  },\n  \"peerDependencies\": {\n    \"typescript\": \"^3.5.0 || ^4.0.0\"\n  },\n  \"dependencies\": {\n    \"chalk\": \"^2.4.2\",\n    \"figures\": \"3.0.0\",\n    \"filesize\": \"^4.1.2\",\n    \"fs-extra\": \"^8.1.0\",\n    \"gzip-size\": \"^5.1.1\",\n    \"lodash\": \"^4.17.14\",\n    \"log-update\": \"^3.2.0\",\n    \"rollup\": \"^1.17.0\",\n    \"rollup-plugin-alias\": \"^1.5.2\",\n    \"rollup-plugin-babel\": \"^4.3.3\",\n    \"rollup-plugin-commonjs\": \"^10.0.1\",\n    \"rollup-plugin-json\": \"^4.0.0\",\n    \"rollup-plugin-node-resolve\": \"^5.2.0\",\n    \"rollup-plugin-peer-deps-external\": \"^2.2.0\",\n    \"rollup-plugin-postcss\": \"^2.0.3\",\n    \"rollup-plugin-progress\": \"^1.1.2\",\n    \"rollup-plugin-typescript2\": \"^0.22.0\"\n  }\n}\n"
  },
  {
    "path": "core/docz-rollup/src/index.js",
    "content": "const { omit } = require('lodash/fp')\nconst autoprefixer = require('autoprefixer')\nconst typescript = require('rollup-plugin-typescript2')\nconst babel = require('rollup-plugin-babel')\nconst json = require('rollup-plugin-json')\nconst commonjs = require('rollup-plugin-commonjs')\nconst nodeResolve = require('rollup-plugin-node-resolve')\nconst alias = require('rollup-plugin-alias')\nconst postcss = require('rollup-plugin-postcss')\nconst progress = require('rollup-plugin-progress')\n\nconst clean = require('./plugins/clean')\nconst size = require('./plugins/size')\nconst copy = require('./plugins/copy')\nconst isDevMode = ['--watch', '-w'].some(devFlag =>\n  process.argv.includes(devFlag)\n)\nconst EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx', '.es6', '.es', '.mjs']\nconst omitOpts = omit([\n  'alias',\n  'external',\n  'output',\n  'plugins',\n  'runtimeHelpers',\n  'filename',\n])\n\nconst defaultExternal = id =>\n  !id.startsWith('\\0') &&\n  !id.startsWith('~') &&\n  !id.startsWith('.') &&\n  !id.startsWith(process.platform === 'win32' ? process.cwd() : '/')\n\nconst createOutput = (dir = 'dist', defaultOpts) => {\n  const opts = omitOpts(defaultOpts)\n  const {\n    alias: moduleAlias,\n    external,\n    output,\n    plugins = [],\n    runtimeHelpers,\n    filename,\n  } = defaultOpts\n\n  const defaultPlugins = [\n    !isDevMode && clean(dir),\n    postcss({\n      plugins: [autoprefixer()],\n      inject: false,\n    }),\n    Object.keys(moduleAlias || {}).length > 0 &&\n      alias({\n        ...moduleAlias,\n        resolve: EXTENSIONS,\n      }),\n    nodeResolve({\n      mainFields: ['module', 'main'],\n      browser: true,\n    }),\n    commonjs({\n      include: /\\/node_modules\\//,\n    }),\n    json(),\n    typescript({\n      typescript: require('typescript'),\n      rollupCommonJSResolveHack: true,\n    }),\n    babel({\n      runtimeHelpers,\n      extensions: EXTENSIONS,\n      exclude: 'node_modules/**',\n    }),\n    size(dir),\n    progress({\n      clearLine: false,\n    }),\n  ]\n\n  const outputs = [\n    {\n      dir,\n      format: 'cjs',\n      chunkFileNames: filename ? `${filename}.js` : `[name].js`,\n      entryFileNames: filename ? `${filename}.js` : `[name].js`,\n      ...output,\n    },\n    {\n      dir,\n      format: 'esm',\n      chunkFileNames: filename ? `${filename}.esm.js` : `[name].esm.js`,\n      entryFileNames: filename ? `${filename}.esm.js` : `[name].esm.js`,\n      ...output,\n    },\n  ]\n\n  return {\n    ...opts,\n    external: external || defaultExternal,\n    plugins: defaultPlugins.filter(Boolean).concat(plugins),\n    output: outputs,\n  }\n}\n\nexports.copy = copy\nexports.config = opts => {\n  const inputs = Array.isArray(opts) ? opts : [opts]\n  return inputs.map(({ dest: dir, ...opts }) => createOutput(dir, opts))\n}\n"
  },
  {
    "path": "core/docz-rollup/src/plugins/clean.js",
    "content": "const path = require('path')\nconst fs = require('fs-extra')\n\nmodule.exports = dest => ({\n  name: 'clean',\n  buildStart() {\n    const cwd = process.cwd()\n    const destDir = path.join(cwd, dest)\n    fs.removeSync(destDir)\n  },\n})\n"
  },
  {
    "path": "core/docz-rollup/src/plugins/copy.js",
    "content": "const path = require('path')\nconst fs = require('fs-extra')\n\nmodule.exports = (source, dest) => ({\n  name: 'copy',\n  generateBundle(opts, bundle, isWrite) {\n    if (!isWrite) return\n    const cwd = process.cwd()\n    const destDir = path.join(cwd, dest)\n    const sourceDir = path.join(cwd, source)\n\n    fs.ensureDirSync(destDir)\n    fs.copySync(sourceDir, destDir)\n  },\n})\n"
  },
  {
    "path": "core/docz-rollup/src/plugins/size.js",
    "content": "const os = require('os')\nconst fs = require('fs-extra')\nconst path = require('path')\nconst chalk = require('chalk')\nconst figures = require('figures')\nconst filesize = require('filesize')\nconst gzip = require('gzip-size')\nconst logUpdate = require('log-update')\n\nconst label = `${chalk.cyan.bold(figures.arrowRight)}`\nconst placeholder = text => chalk.gray(`${text}:`)\nconst getFilesize = file => filesize(fs.statSync(file).size)\nconst getGzipSize = file => filesize(gzip.sync(fs.readFileSync(file, 'utf-8')))\n\nmodule.exports = dest => ({\n  name: 'size',\n  generateBundle(opts, bundle, isWrite) {\n    if (!isWrite) return\n\n    const keys = Object.keys(bundle)\n    const builds = keys.map(key => bundle[key])\n\n    builds.forEach((build, i) => {\n      const filename = keys[i]\n      const filepath = path.join(os.tmpdir(), filename)\n      fs.outputFileSync(filepath, build.code)\n\n      const size = `${placeholder('size')} ${getFilesize(filepath)}`\n      const gzip = ` | ${placeholder('gzip')} ${getGzipSize(filepath)}`\n      const sizes = chalk.gray.dim(`(${size}${gzip})`)\n      const originalPath = path.join(dest, filename)\n      const msg = `${label} ${chalk.cyan(originalPath)} ${sizes}`\n\n      logUpdate(msg)\n      logUpdate.done()\n      fs.removeSync(filepath)\n    })\n  },\n})\n"
  },
  {
    "path": "core/docz-utils/.babelrc",
    "content": "{\n  \"plugins\": [\"lodash\"],\n  \"presets\": [\n    \"@babel/preset-typescript\",\n    [\n      \"@babel/preset-env\",\n      {\n        \"targets\": {\n          \"node\": \"current\"\n        }\n      }\n    ]\n  ]\n}\n"
  },
  {
    "path": "core/docz-utils/.eslintignore",
    "content": "lib\n"
  },
  {
    "path": "core/docz-utils/.eslintrc.js",
    "content": "module.exports = {\n  extends: 'docz-ts',\n}\n"
  },
  {
    "path": "core/docz-utils/.lintstagedrc",
    "content": "{\n  \"*.{ts,tsx}\": [\"yarn fix\", \"git add\"]\n}\n"
  },
  {
    "path": "core/docz-utils/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n* **docz-utils:** fix closing tag detection in `removeTags` ([#1696](https://github.com/doczjs/docz/issues/1696)) ([bfcd923](https://github.com/doczjs/docz/commit/bfcd923))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.3.0](https://github.com/doczjs/docz/compare/v2.3.0-alpha.14...v2.3.0) (2020-04-02)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n# [2.3.0-alpha.2](https://github.com/doczjs/docz/compare/v2.3.0-alpha.1...v2.3.0-alpha.2) (2019-12-14)\n\n\n### Features\n\n* **docz-utils:** add exports parser to add to Playground scope ([9c564d0](https://github.com/doczjs/docz/commit/9c564d0)), closes [#1247](https://github.com/doczjs/docz/issues/1247)\n\n\n\n\n\n# [2.3.0-alpha.1](https://github.com/doczjs/docz/compare/v2.3.0-alpha.0...v2.3.0-alpha.1) (2019-12-13)\n\n\n### Features\n\n* **docz-utils:** export mergeWith and get from lodash@4 ([53fbde0](https://github.com/doczjs/docz/commit/53fbde0)), closes [#1313](https://github.com/doczjs/docz/issues/1313)\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n\n### Bug Fixes\n\n* bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n* eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n* packages rollup config ([534d7bf](https://github.com/pedronauck/docz/commit/534d7bf))\n\n\n### Features\n\n* a lot of improvements ([64f75da](https://github.com/pedronauck/docz/commit/64f75da))\n* add new theme sidebar ([a01d100](https://github.com/pedronauck/docz/commit/a01d100))\n* docz running using gatsby under the hood ([10ffd48](https://github.com/pedronauck/docz/commit/10ffd48))\n\n\n\n\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n## [1.0.4](https://github.com/pedronauck/docz/compare/v1.0.3...v1.0.4) (2019-04-18)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n## [1.0.2](https://github.com/pedronauck/docz/compare/v1.0.1...v1.0.2) (2019-04-15)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n## [1.0.1](https://github.com/pedronauck/docz/compare/v1.0.0...v1.0.1) (2019-04-14)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n# [1.0.0](https://github.com/pedronauck/docz/compare/v1.0.0-rc.8...v1.0.0) (2019-04-11)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n# [1.0.0-rc.4](https://github.com/pedronauck/docz/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2019-03-29)\n\n\n### Bug Fixes\n\n* remove modularized lodash packages ([d81c568](https://github.com/pedronauck/docz/commit/d81c568))\n\n\n\n\n\n# [1.0.0-beta.0](https://github.com/pedronauck/docz/compare/v1.0.0-alpha.1...v1.0.0-beta.0) (2019-03-19)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n# [1.0.0-alpha.0](https://github.com/pedronauck/docz/compare/v0.13.5...v1.0.0-alpha.0) (2019-03-19)\n\n\n### Bug Fixes\n\n* **docz-utils:** add docz imports on react live scope ([01004ed](https://github.com/pedronauck/docz/commit/01004ed))\n* some general adjustments ([0c61f64](https://github.com/pedronauck/docz/commit/0c61f64))\n* use lodash merge instead of deepmerge ([18ac37b](https://github.com/pedronauck/docz/commit/18ac37b))\n* **docz-core:** apply mdast plugins to entries parse too ([c2554b8](https://github.com/pedronauck/docz/commit/c2554b8))\n* **docz-utils:** extract headings from ast ([9f8565b](https://github.com/pedronauck/docz/commit/9f8565b))\n* **docz-utils:** parser config for prettier ([54ad0fa](https://github.com/pedronauck/docz/commit/54ad0fa))\n* trim whitespaces before and after class ([a184913](https://github.com/pedronauck/docz/commit/a184913))\n* use custom rollup config to build instead of libundler ([ee42a5a](https://github.com/pedronauck/docz/commit/ee42a5a))\n\n\n### Features\n\n* add initial gatsby integration ([#630](https://github.com/pedronauck/docz/issues/630)) ([70d40cc](https://github.com/pedronauck/docz/commit/70d40cc)), closes [#609](https://github.com/pedronauck/docz/issues/609)\n* docgen refactoring ([#545](https://github.com/pedronauck/docz/issues/545)) ([85499a8](https://github.com/pedronauck/docz/commit/85499a8))\n\n\n\n\n\n## [0.13.6](https://github.com/pedronauck/docz/compare/v0.13.5...v0.13.6) (2018-12-26)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n## [0.13.5](https://github.com/pedronauck/docz/compare/v0.13.4...v0.13.5) (2018-12-19)\n\n\n### Bug Fixes\n\n* **docz-core:** escape template string in playground ([#529](https://github.com/pedronauck/docz/issues/529)) ([5ab2349](https://github.com/pedronauck/docz/commit/5ab2349))\n* **docz-utils:** add missing dependency for codesandbox ([3a51066](https://github.com/pedronauck/docz/commit/3a51066))\n* **docz-utils:** escape code for playground ([3fc4187](https://github.com/pedronauck/docz/commit/3fc4187))\n\n\n\n\n\n## [0.13.3](https://github.com/pedronauck/docz/compare/v0.13.2...v0.13.3) (2018-12-17)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n# [0.13.0](https://github.com/pedronauck/docz/compare/v0.12.17...v0.13.0) (2018-12-17)\n\n\n### Bug Fixes\n\n* **docz-core:** use webpack-dev-server instead of webpack-serve ([4157e05](https://github.com/pedronauck/docz/commit/4157e05))\n\n\n\n\n\n## [0.12.16](https://github.com/pedronauck/docz/compare/v0.12.15...v0.12.16) (2018-12-13)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n## [0.12.15](https://github.com/pedronauck/docz/compare/v0.12.14...v0.12.15) (2018-12-04)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n## [0.12.14](https://github.com/pedronauck/docz/compare/v0.12.13...v0.12.14) (2018-12-04)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n## [0.12.13](https://github.com/pedronauck/docz/compare/v0.12.12...v0.12.13) (2018-11-23)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n## [0.12.12](https://github.com/pedronauck/docz/compare/v0.12.11...v0.12.12) (2018-11-16)\n\n\n### Bug Fixes\n\n* **docz-utils:** add .scss to codesandbox assemble files ([59e8fa8](https://github.com/pedronauck/docz/commit/59e8fa8))\n\n\n\n\n\n## [0.12.10](https://github.com/pedronauck/docz/compare/v0.12.9...v0.12.10) (2018-11-15)\n\n\n### Bug Fixes\n\n* **docz-utils:** resolve codesandbox code ([33dc6e5](https://github.com/pedronauck/docz/commit/33dc6e5))\n\n\n\n\n\n## [0.12.9](https://github.com/pedronauck/docz/compare/v0.12.8...v0.12.9) (2018-11-01)\n\n\n### Bug Fixes\n\n* **docz-theme-default:** use class inside playground ([cecbea1](https://github.com/pedronauck/docz/commit/cecbea1))\n\n\n\n\n\n## [0.12.8](https://github.com/pedronauck/docz/compare/v0.12.7...v0.12.8) (2018-10-31)\n\n**Note:** Version bump only for package docz-utils\n\n\n\n\n\n## [0.12.6](https://github.com/pedronauck/docz/compare/v0.12.5...v0.12.6) (2018-10-30)\n\n**Note:** Version bump only for package docz-utils\n"
  },
  {
    "path": "core/docz-utils/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) 2018 Pedro Nauck\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": "core/docz-utils/README.md",
    "content": "## docz-utils\n\nThis is an internal docz package containing utility functions used by multiple docz packages.\n\nUnless you're looking to contribute to docz, you probably don't care about this package and are looking for [the docz package documentation](https://github.com/doczjs/docz).\n"
  },
  {
    "path": "core/docz-utils/__tests__/jsx.test.ts",
    "content": "import { removeTags } from '../src/jsx'\n\ndescribe('removeTags', () => {\n  test('removes outer JSX tag', () => {\n    expect(\n      removeTags(`\n      <Playground>\n        <div>Some text</div>\n        <p>Other text</p>\n      </Playground>\n    `)\n    ).toMatchInlineSnapshot(`\n      \"\n              <div>Some text</div>\n              <p>Other text</p>\n            \"\n    `)\n  })\n\n  test('works when the closing tag is repeated in a comment', () => {\n    expect(\n      removeTags(`\n      <Playground>\n        {/* </Playground> */}\n        <div>Some text</div>\n      </Playground>\n    `)\n    ).toMatchInlineSnapshot(`\n      \"\n              {/* </Playground> */}\n              <div>Some text</div>\n            \"\n    `)\n  })\n})\n"
  },
  {
    "path": "core/docz-utils/package.json",
    "content": "{\n  \"name\": \"docz-utils\",\n  \"version\": \"2.4.0\",\n  \"description\": \"Some methods used and utilities used on docz\",\n  \"license\": \"MIT\",\n  \"main\": \"lib/index.js\",\n  \"module\": \"lib/index.esm.js\",\n  \"typings\": \"lib/index.d.ts\",\n  \"files\": [\n    \"lib/\",\n    \"package.json\",\n    \"README.md\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"core/docz-utils\"\n  },\n  \"scripts\": {\n    \"dev\": \"cross-env NODE_ENV=development yarn build -w\",\n    \"build\": \"trash lib && cross-env NODE_ENV=production rollup -c\",\n    \"fix\": \"yarn lint --fix\",\n    \"lint\": \"eslint . --ext mdx,ts,tsx\",\n    \"precommit\": \"lint-staged\",\n    \"test\": \"yarn jest\"\n  },\n  \"dependencies\": {\n    \"@babel/generator\": \"^7.16.8\",\n    \"@babel/parser\": \"^7.16.12\",\n    \"@babel/traverse\": \"^7.16.10\",\n    \"art-template\": \"^4.13.2\",\n    \"fs-extra\": \"^8.1.0\",\n    \"humanize-string\": \"^2.1.0\",\n    \"js-string-escape\": \"^1.0.1\",\n    \"jsx-ast-utils\": \"^2.2.1\",\n    \"lodash\": \"^4.17.14\",\n    \"prettier\": \"^1.18.2\",\n    \"remark-frontmatter\": \"^1.3.2\",\n    \"remark-parse\": \"^6.0.2\",\n    \"remark-parse-yaml\": \"^0.0.2\",\n    \"remark-slug\": \"^5.1.2\",\n    \"signale\": \"^1.4.0\",\n    \"strip-indent\": \"^3.0.0\",\n    \"to-vfile\": \"^6.0.0\",\n    \"unescape-js\": \"^1.1.1\",\n    \"unified\": \"^8.3.2\",\n    \"unist-util-find\": \"^1.0.1\",\n    \"unist-util-is\": \"^3.0.0\",\n    \"unist-util-visit\": \"^1.4.1\"\n  }\n}\n"
  },
  {
    "path": "core/docz-utils/rollup.config.js",
    "content": "import { config } from 'docz-rollup'\n\nexport default config({\n  input: [\n    './src/ast.ts',\n    './src/format.ts',\n    './src/fs.ts',\n    './src/index.ts',\n    './src/imports.ts',\n    './src/jsx.ts',\n    './src/mdast.ts',\n    './src/exports.ts',\n  ],\n  output: {\n    dir: 'lib',\n  },\n})\n"
  },
  {
    "path": "core/docz-utils/src/ast.ts",
    "content": "import * as parser from '@babel/parser'\nimport traverse from '@babel/traverse'\n\ntype Condition = (path: any) => boolean\ntype Predicate<Value> = (path: any) => Value\n\nexport const valueFromTraverse = <Value = any>(\n  condition: Condition,\n  predicate: Predicate<Value> = p => p\n) => (code: string): Value | '' => {\n  let value: Value | '' = ''\n  const ast = parser.parse(code, { plugins: ['jsx'] })\n\n  traverse(ast, {\n    enter(path: any): void {\n      if (condition(path)) {\n        value = predicate(path)\n        path.stop()\n        return\n      }\n    },\n  })\n\n  return value\n}\n\nexport const codeFromNode = (condition: Condition) => (code: string) =>\n  valueFromTraverse(condition, p => code.slice(p.node.start, p.node.end))(code)\n"
  },
  {
    "path": "core/docz-utils/src/exports.ts",
    "content": "import * as parser from '@babel/parser'\nimport traverse from '@babel/traverse'\nimport get from 'lodash/get'\n\nconst fromDeclarations = (declarations: any = []) =>\n  Array.isArray(declarations) && declarations.length > 0\n    ? declarations.map(declaration => get(declaration, 'id.name'))\n    : []\n\nconst traverseOnExports = (fn: (path: any) => any[]) => (node: any) => {\n  try {\n    const ast = parser.parse(node.value, {\n      sourceType: 'module',\n    })\n    let populated: any[] = []\n    traverse(ast, {\n      enter(path: any): void {\n        if (path.isExportDeclaration()) {\n          populated = populated.concat(fn(path))\n          return\n        }\n      },\n    })\n    return populated\n  } catch (err) {\n    return []\n  }\n}\n\nexport const getExportsVariables = traverseOnExports(path => {\n  const type = get(path, 'node.declaration.type')\n  switch (type) {\n    case 'VariableDeclaration':\n      return fromDeclarations(get(path, 'node.declaration.declarations', []))\n    case 'FunctionDeclaration':\n      const declaration = get(path, 'node.declaration', false)\n      return fromDeclarations(declaration ? [declaration] : [])\n    case 'Identifier':\n      return get(path, 'node.declaration.name')\n    default:\n      console.error(`Unexpected export type ${type} in docz-utils/exports`)\n  }\n})\n"
  },
  {
    "path": "core/docz-utils/src/format.ts",
    "content": "import * as prettier from 'prettier'\nimport logger from 'signale'\n\nexport const formatter = (code: string) =>\n  prettier.format(code, {\n    parser: 'babel',\n    semi: false,\n    singleQuote: true,\n    trailingComma: 'all',\n  } as any)\n\nexport const format = (code: string): Promise<string> =>\n  new Promise(resolve => {\n    try {\n      const result = formatter(code)\n\n      resolve(result)\n    } catch (err) {\n      logger.fatal(err)\n      resolve(code)\n    }\n  })\n"
  },
  {
    "path": "core/docz-utils/src/fs.ts",
    "content": "import * as path from 'path'\nimport * as fs from 'fs-extra'\nimport { compile } from 'art-template'\n\nimport { format } from './format'\n\nexport const touch = (file: string, raw: string) =>\n  new Promise(async (resolve, reject) => {\n    const content = /jsx?$/.test(path.extname(file)) ? await format(raw) : raw\n    const stream = fs.createWriteStream(file)\n\n    stream.write(content, 'utf-8')\n    stream.on('finish', () => resolve())\n    stream.on('error', err => reject(err))\n    stream.end()\n  })\n\nexport const compiled = (file: string, opts: Record<string, any> = {}) => {\n  const raw = fs.readFileSync(file, { encoding: 'utf-8' })\n  return compile(raw, opts)\n}\n"
  },
  {
    "path": "core/docz-utils/src/imports.ts",
    "content": "import * as parser from '@babel/parser'\nimport * as generator from '@babel/generator'\nimport traverse from '@babel/traverse'\nimport get from 'lodash/get'\n\nconst fromSpecifiers = (specifiers: any = []) =>\n  Array.isArray(specifiers) && specifiers.length > 0\n    ? specifiers.map(specifier => get(specifier, 'local.name'))\n    : []\n\nconst traverseOnImports = (fn: (path: any) => any[]) => (node: any) => {\n  try {\n    const ast = parser.parse(node.value, { sourceType: 'module' })\n    let populated: any[] = []\n\n    traverse(ast, {\n      enter(path: any): void {\n        if (path.isImportDeclaration()) {\n          populated = populated.concat(fn(path))\n          return\n        }\n      },\n    })\n\n    return populated\n  } catch (err) {\n    return []\n  }\n}\n\nexport const getFullImports = traverseOnImports((path: any) => [\n  get(generator.default(path.node), 'code'),\n])\n\nexport const getImportsVariables = traverseOnImports((path: any) =>\n  fromSpecifiers(path.node.specifiers)\n)\n"
  },
  {
    "path": "core/docz-utils/src/index.ts",
    "content": "export * from './ast'\nexport * from './fs'\nexport * from './imports'\nexport * from './exports'\nexport * from './jsx'\nexport * from './mdast'\nexport { format } from './format'\nexport { mergeWith } from 'lodash/fp'\nexport { get } from 'lodash'\n"
  },
  {
    "path": "core/docz-utils/src/jsx.ts",
    "content": "import * as jsxUtils from 'jsx-ast-utils'\nimport strip from 'strip-indent'\nimport escapeJS from 'js-string-escape'\n\nimport { valueFromTraverse } from './ast'\n\nexport const propFromElement = (prop: string) =>\n  valueFromTraverse(\n    p => p.isJSXOpeningElement(),\n    p => jsxUtils.getPropValue(jsxUtils.getProp(p.node.attributes, prop))\n  )\n\nconst getTagContentsRange = valueFromTraverse<[number, number] | null>(\n  p => p.isJSXElement(),\n  ({ node }) => {\n    if (!node.closingElement) {\n      // if the JSX element doesn't have a closingElement, it's because it's self-closed\n      // and thus does not have any content: <Playground />\n      return null\n    }\n    return [node.openingElement.end, node.closingElement.start]\n  }\n)\n\nexport const removeTags = (code: string) => {\n  const [start, end] = getTagContentsRange(code) || [0, 0]\n  return code.slice(start, end)\n}\n\nexport const sanitizeCode = (code: string) => {\n  const trimmed = strip(code).trim()\n  const newCode =\n    trimmed.startsWith('{') && trimmed.endsWith('}')\n      ? trimmed.substr(1, trimmed.length - 2).trim()\n      : trimmed\n\n  return escapeJS(strip(newCode))\n}\n\nexport const componentName = (value: any) => {\n  const match = value.match(/^\\<\\\\?(\\w+)/)\n  return match && match[1]\n}\n"
  },
  {
    "path": "core/docz-utils/src/mdast.ts",
    "content": "import vfile from 'to-vfile'\nimport unified from 'unified'\nimport remark from 'remark-parse'\nimport matter from 'remark-frontmatter'\nimport slug from 'remark-slug'\nimport parseFrontmatter from 'remark-parse-yaml'\nimport find from 'unist-util-find'\nimport visit from 'unist-util-visit'\nimport humanize from 'humanize-string'\nimport flatten from 'lodash/flatten'\nimport get from 'lodash/get'\n\nexport const parseMdx = (file: string, plugins: any[]): Promise<string> => {\n  const raw = vfile.readSync(file, 'utf-8')\n  const parser = unified()\n    .use(remark, { type: 'yaml', marker: '-' })\n    .use(matter)\n    .use(parseFrontmatter)\n    .use(slug)\n\n  for (const plugin of plugins) {\n    const [item, opts = {}] = Array.isArray(plugin) ? plugin : [plugin]\n    parser.use(item, opts)\n  }\n\n  return parser.run(parser.parse(raw))\n}\n\nconst getChildValue = (children: any) =>\n  children.map((child: any) =>\n    child.children ? getChildValue(child.children) : child.value\n  )\n\nconst valueFromHeading = (node: any) => {\n  const children = get(node, 'children')\n  const slug = get(node, 'data.id')\n\n  if (Array.isArray(children)) {\n    return flatten(getChildValue(children))\n      .filter(Boolean)\n      .join(' ')\n  }\n\n  return humanize(slug)\n}\n\nfunction extractAst<T>(\n  callback: (node: any) => T,\n  type: string\n): (ast: any) => T[] {\n  return ast => {\n    const results: T[] = []\n\n    visit(ast, type, (node: any) => {\n      results.push(callback(node))\n    })\n\n    return results\n  }\n}\n\nexport interface Heading {\n  depth: number\n  slug: string\n  value: string\n}\n\nexport const headingsFromAst = extractAst<Heading>(\n  (node: any) => ({\n    slug: get(node, 'data.id'),\n    depth: get(node, 'depth'),\n    value: valueFromHeading(node),\n  }),\n  'heading'\n)\n\nexport interface ParsedData {\n  [key: string]: any\n}\n\nexport const getParsedData = (ast: any): ParsedData => {\n  const node = find(ast, { type: 'yaml' })\n  return get(node, `data.parsedValue`) || {}\n}\n"
  },
  {
    "path": "core/docz-utils/src/types.d.ts",
    "content": "declare module 'to-vfile'\ndeclare module 'unified'\ndeclare module 'remark-parse'\ndeclare module 'remark-frontmatter'\ndeclare module 'remark-slug'\ndeclare module 'remark-parse-yaml'\ndeclare module 'humanize-string'\ndeclare module 'signale'\ndeclare module '@babel/parser'\ndeclare module '@babel/traverse'\ndeclare module '@babel/generator'\ndeclare module 'jsx-ast-utils'\ndeclare module 'strip-indent'\ndeclare module 'unist-util-visit'\ndeclare module 'unist-util-find'\ndeclare module 'unescape-js'\ndeclare module 'js-string-escape'\n"
  },
  {
    "path": "core/docz-utils/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"module\": \"esnext\",\n    \"outDir\": \"lib\",\n    \"rootDir\": \"src\",\n    \"declaration\": true,\n    \"types\": [\"node\"],\n    \"typeRoots\": [\"../../node_modules/@types\", \"node_modules/@types\"]\n  },\n  \"include\": [\"src/**/*\", \"src/types.d.ts\"],\n  \"exclude\": [\"node_modules/**\"]\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/.eslintrc.js",
    "content": "module.exports = {\n  extends: 'docz-js',\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/.gitignore",
    "content": "# gatsby files\n.cache/\npublic\n"
  },
  {
    "path": "core/gatsby-theme-docz/.lintstagedrc",
    "content": "{\n  \"*.{js,jsx}\": [\"git add\"]\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n* **gatsby-theme-docz:** wrong imports ([ed169cf](https://github.com/doczjs/docz/commit/ed169cf))\n\n\n### Features\n\n* **gatsby-theme-docz:** configure SEO information from md/mdx files ([#1477](https://github.com/doczjs/docz/issues/1477)) ([24bb600](https://github.com/doczjs/docz/commit/24bb600))\n* **gatsby-theme-docz:** no reload on relative links ([#1482](https://github.com/doczjs/docz/issues/1482)) ([ff7211c](https://github.com/doczjs/docz/commit/ff7211c))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n* **gatsby-theme-docz:** wrong imports ([ed169cf](https://github.com/doczjs/docz/commit/ed169cf))\n\n\n### Features\n\n* **gatsby-theme-docz:** configure SEO information from md/mdx files ([#1477](https://github.com/doczjs/docz/issues/1477)) ([24bb600](https://github.com/doczjs/docz/commit/24bb600))\n* **gatsby-theme-docz:** no reload on relative links ([#1482](https://github.com/doczjs/docz/issues/1482)) ([ff7211c](https://github.com/doczjs/docz/commit/ff7211c))\n\n\n\n\n\n## [2.3.1](https://github.com/doczjs/docz/compare/v2.3.1-alpha.0...v2.3.1) (2020-04-05)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n\n\n\n\n## [2.3.1-alpha.0](https://github.com/doczjs/docz/compare/v2.3.0...v2.3.1-alpha.0) (2020-04-05)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix theme components customization bug ([a9384b0](https://github.com/doczjs/docz/commit/a9384b0))\n\n\n\n\n\n# [2.3.0](https://github.com/doczjs/docz/compare/v2.3.0-alpha.14...v2.3.0) (2020-04-02)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n\n\n\n\n# [2.3.0-alpha.14](https://github.com/doczjs/docz/compare/v2.3.0-alpha.13...v2.3.0-alpha.14) (2020-03-31)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** add pre-wrap to error ([#1406](https://github.com/doczjs/docz/issues/1406)) ([ca6b02d](https://github.com/doczjs/docz/commit/ca6b02d))\n* **gatsby-theme-docz:** content overflowing issue ([#1437](https://github.com/doczjs/docz/issues/1437)) ([56f4cb8](https://github.com/doczjs/docz/commit/56f4cb8))\n\n\n### Features\n\n* **gatsby-theme-docz:** include MDX transclusion support ([#1436](https://github.com/doczjs/docz/issues/1436)) ([435001a](https://github.com/doczjs/docz/commit/435001a))\n\n\n\n\n\n# [2.3.0-alpha.13](https://github.com/doczjs/docz/compare/v2.3.0-alpha.12...v2.3.0-alpha.13) (2020-02-13)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** flex component aligmItems -> alignItems ([#1391](https://github.com/doczjs/docz/issues/1391)) ([b80524f](https://github.com/doczjs/docz/commit/b80524f))\n\n\n\n\n\n# [2.3.0-alpha.12](https://github.com/doczjs/docz/compare/v2.3.0-alpha.11...v2.3.0-alpha.12) (2020-02-12)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** use sx instead of style prop in Playgro… ([#1389](https://github.com/doczjs/docz/issues/1389)) ([98f3311](https://github.com/doczjs/docz/commit/98f3311))\n\n\n\n\n\n# [2.3.0-alpha.11](https://github.com/doczjs/docz/compare/v2.3.0-alpha.10...v2.3.0-alpha.11) (2020-02-07)\n\n\n### Features\n\n* **gatsby-theme-docz:** create MainContainer component ([#1381](https://github.com/doczjs/docz/issues/1381)) ([e8d1c04](https://github.com/doczjs/docz/commit/e8d1c04))\n\n\n\n\n\n# [2.3.0-alpha.8](https://github.com/doczjs/docz/compare/v2.3.0-alpha.7...v2.3.0-alpha.8) (2020-02-06)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n\n\n\n\n# [2.3.0-alpha.7](https://github.com/doczjs/docz/compare/v2.3.0-alpha.6...v2.3.0-alpha.7) (2020-02-04)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix playground react-resize-detector usage ([#1350](https://github.com/doczjs/docz/issues/1350)) ([f0baf67](https://github.com/doczjs/docz/commit/f0baf67))\n* **gatsby-theme-docz:** removed unused gatsby-plugin-manifest ([#1368](https://github.com/doczjs/docz/issues/1368)) ([44edc68](https://github.com/doczjs/docz/commit/44edc68))\n\n\n### Features\n\n* add the ability to hide a document from the menu ([#1354](https://github.com/doczjs/docz/issues/1354)) ([95b0d7f](https://github.com/doczjs/docz/commit/95b0d7f))\n\n\n\n\n\n# [2.3.0-alpha.5](https://github.com/doczjs/docz/compare/v2.3.0-alpha.4...v2.3.0-alpha.5) (2019-12-17)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** src -> gatsbyRoot for file system source ([71dd572](https://github.com/doczjs/docz/commit/71dd572))\n\n\n\n\n\n# [2.3.0-alpha.4](https://github.com/doczjs/docz/compare/v2.3.0-alpha.3...v2.3.0-alpha.4) (2019-12-16)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** make Props isToggle work again ([#1326](https://github.com/doczjs/docz/issues/1326)) ([4921ef5](https://github.com/doczjs/docz/commit/4921ef5))\n* update dev-env dependencies ([e1b185f](https://github.com/doczjs/docz/commit/e1b185f))\n\n\n\n\n\n# [2.3.0-alpha.3](https://github.com/doczjs/docz/compare/v2.3.0-alpha.2...v2.3.0-alpha.3) (2019-12-16)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix preview padding ([ebebd1c](https://github.com/doczjs/docz/commit/ebebd1c)), closes [#1325](https://github.com/doczjs/docz/issues/1325)\n\n\n\n\n\n# [2.3.0-alpha.2](https://github.com/doczjs/docz/compare/v2.3.0-alpha.1...v2.3.0-alpha.2) (2019-12-14)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n\n\n\n\n# [2.3.0-alpha.1](https://github.com/doczjs/docz/compare/v2.3.0-alpha.0...v2.3.0-alpha.1) (2019-12-13)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n\n\n\n\n## [2.2.1-alpha.0](https://github.com/doczjs/docz/compare/v2.2.0...v2.2.1-alpha.0) (2019-12-11)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix mdx components theming from config ([3a9bdb7](https://github.com/doczjs/docz/commit/3a9bdb7)), closes [#1309](https://github.com/doczjs/docz/issues/1309)\n\n\n\n\n\n# [2.2.0](https://github.com/doczjs/docz/compare/v2.2.0-alpha.8...v2.2.0) (2019-12-11)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n\n\n\n\n# [2.2.0-alpha.8](https://github.com/doczjs/docz/compare/v2.2.0-alpha.7...v2.2.0-alpha.8) (2019-12-06)\n\n\n### Features\n\n* **gatsby-theme-docz:** add optional iframe for preview and ed… ([#1305](https://github.com/doczjs/docz/issues/1305)) ([9c5082e](https://github.com/doczjs/docz/commit/9c5082e)), closes [#1306](https://github.com/doczjs/docz/issues/1306)\n\n\n\n\n\n# [2.2.0-alpha.7](https://github.com/doczjs/docz/compare/v2.2.0-alpha.6...v2.2.0-alpha.7) (2019-12-03)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix infinite renders in playground on hot reload ([3451fd1](https://github.com/doczjs/docz/commit/3451fd1)), closes [#1299](https://github.com/doczjs/docz/issues/1299)\n\n\n\n\n\n# [2.2.0-alpha.6](https://github.com/doczjs/docz/compare/v2.2.0-alpha.5...v2.2.0-alpha.6) (2019-12-03)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix horizontal code overflow ([a0b7823](https://github.com/doczjs/docz/commit/a0b7823))\n\n\n\n\n\n# [2.2.0-alpha.5](https://github.com/doczjs/docz/compare/v2.2.0-alpha.4...v2.2.0-alpha.5) (2019-12-01)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** fix tsx parsing in code blocks ([b321ff8](https://github.com/doczjs/docz/commit/b321ff8))\n\n\n\n\n\n# [2.2.0-alpha.4](https://github.com/doczjs/docz/compare/v2.2.0-alpha.3...v2.2.0-alpha.4) (2019-11-30)\n\n\n### Features\n\n* **gatsby-theme-docz:** add showMarkdownEditButton flag ([8fd04e8](https://github.com/doczjs/docz/commit/8fd04e8)), closes [#1291](https://github.com/doczjs/docz/issues/1291)\n\n\n\n\n\n# [2.2.0-alpha.1](https://github.com/doczjs/docz/compare/v2.2.0-alpha.0...v2.2.0-alpha.1) (2019-11-28)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** remove typo from the theme styles ([a25da88](https://github.com/doczjs/docz/commit/a25da88))\n\n\n\n\n\n# [2.2.0-alpha.0](https://github.com/doczjs/docz/compare/v2.1.1...v2.2.0-alpha.0) (2019-11-28)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** set gatsby root from doczrc src ([e6b1521](https://github.com/doczjs/docz/commit/e6b1521))\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n\n### Bug Fixes\n\n* **gatsby-theme-docz:** allow empty ts prop defaultValue ([2512aa1](https://github.com/doczjs/docz/commit/2512aa1))\n* **gatsby-theme-docz:** fix min-height ([34fc31f](https://github.com/doczjs/docz/commit/34fc31f))\n\n\n### Features\n\n* **gatsby-theme-docz:** use mdxExtensions from config ([7d405c5](https://github.com/doczjs/docz/commit/7d405c5))\n\n\n\n\n\n\n\n### Bug Fixes\n\n\n\n\n\n### Bug Fixes\n\n* **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n* **gatsby-theme-docz:** expose gatsby actions to plugin ([019eb9b](https://github.com/pedronauck/docz/commit/019eb9b))\n* **gatsby-theme-docz:** fix style differences between dev and build ([9cb5237](https://github.com/pedronauck/docz/commit/9cb5237))\n* **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n\n\n\n\n# [2.0.0-rc.33](https://github.com/pedronauck/docz/compare/v2.0.0-rc.32...v2.0.0-rc.33) (2019-09-04)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n\n\n\n\n# [2.0.0-rc.32](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.32) (2019-09-04)\n\n### Bug Fixes\n\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n- **gatsby-theme-docz:** expose gatsby actions to plugin ([66546a4](https://github.com/pedronauck/docz/commit/66546a4))\n- **gatsby-theme-docz:** fix style differences between dev and build ([9cb5237](https://github.com/pedronauck/docz/commit/9cb5237))\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n# [2.0.0-rc.31](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.31) (2019-09-03)\n\n### Bug Fixes\n\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n- **gatsby-theme-docz:** fix style differences between dev and build ([9cb5237](https://github.com/pedronauck/docz/commit/9cb5237))\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n<<<<<<< HEAD\n\n# [2.0.0-rc.28](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.28) (2019-09-02)\n\n### Bug Fixes\n\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n- **gatsby-theme-docz:** fix style differences between dev and build ([9cb5237](https://github.com/pedronauck/docz/commit/9cb5237))\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n=======\n\n# [2.0.0-rc.29](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.29) (2019-09-03)\n\n### Bug Fixes\n\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n- **gatsby-theme-docz:** fix style differences between dev and build ([9cb5237](https://github.com/pedronauck/docz/commit/9cb5237))\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n# [2.0.0-rc.28](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.28) (2019-09-03)\n\n> > > > > > > v2.0.0-rc.29\n\n### Bug Fixes\n\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n- **gatsby-theme-docz:** fix style differences between dev and build ([9cb5237](https://github.com/pedronauck/docz/commit/9cb5237))\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n# [2.0.0-rc.27](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.27) (2019-09-02)\n\n### Bug Fixes\n\n- **docz-core:** use react from parent directory ([#1053](https://github.com/pedronauck/docz/issues/1053)) ([b55b786](https://github.com/pedronauck/docz/commit/b55b786))\n- **gatsby-theme-docz:** fix style differences between dev and build ([45b7767](https://github.com/pedronauck/docz/commit/45b7767))\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([4214180](https://github.com/pedronauck/docz/commit/4214180))\n\n# [2.0.0-rc.9](https://github.com/pedronauck/docz/compare/v2.0.0-rc.7...v2.0.0-rc.9) (2019-08-30)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n# [2.0.0-rc.6](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.6) (2019-08-29)\n\n### Bug Fixes\n\n- **gatsby-theme-docz:** replace iframe in playground with div [#984](https://github.com/pedronauck/docz/issues/984) [#1035](https://github.com/pedronauck/docz/issues/1035) ([cf9ea90](https://github.com/pedronauck/docz/commit/cf9ea90))\n\n# [2.0.0-rc.2](https://github.com/pedronauck/docz/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2019-08-28)\n\n### Bug Fixes\n\n- **gatsby-theme-docz:** add missing source sans pro font ([#991](https://github.com/pedronauck/docz/issues/991)) ([51240df](https://github.com/pedronauck/docz/commit/51240df))\n- **gatsby-theme-docz:** replace fragment tag to the short syntax ([#992](https://github.com/pedronauck/docz/issues/992)) ([044f351](https://github.com/pedronauck/docz/commit/044f351))\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n### Bug Fixes\n\n- bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n- resizable props import ([2926896](https://github.com/pedronauck/docz/commit/2926896))\n- **gatsby-theme-docz:** resizable import ([3916265](https://github.com/pedronauck/docz/commit/3916265))\n- on create webpack plugin hook ([56e974a](https://github.com/pedronauck/docz/commit/56e974a))\n- remove react & react-dom from dependencies [#924](https://github.com/pedronauck/docz/issues/924) ([faf4288](https://github.com/pedronauck/docz/commit/faf4288))\n- some typescript adjustments ([4ba6eaf](https://github.com/pedronauck/docz/commit/4ba6eaf))\n- **gatsby-theme-docz:** prisms theme by themeConfig ([c0b5c34](https://github.com/pedronauck/docz/commit/c0b5c34))\n- eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n- **gatsby-theme-docz:** entry not in context ([e582221](https://github.com/pedronauck/docz/commit/e582221))\n\n### Features\n\n- **gatsby-theme-docz:** add blockquote styles ([b9f11a1](https://github.com/pedronauck/docz/commit/b9f11a1))\n- **gatsby-theme-docz:** add custom logo support ([dec4b2b](https://github.com/pedronauck/docz/commit/dec4b2b))\n- **gatsby-theme-docz:** add iframe and re-resizable on playground ([6922717](https://github.com/pedronauck/docz/commit/6922717))\n- **gatsby-theme-docz:** add new Pre component ([a6be6a1](https://github.com/pedronauck/docz/commit/a6be6a1))\n- **gatsby-theme-docz:** add new Props component ([8eb780d](https://github.com/pedronauck/docz/commit/8eb780d))\n- **gatsby-theme-docz:** add showLiveError on Playground ([e593897](https://github.com/pedronauck/docz/commit/e593897))\n- **gatsby-theme-docz:** add some improvements ([03d9fec](https://github.com/pedronauck/docz/commit/03d9fec))\n- **gatsby-theme-docz:** improve code highlight ([d265444](https://github.com/pedronauck/docz/commit/d265444))\n- **gatsby-theme-docz:** improve documentation ([80b35f8](https://github.com/pedronauck/docz/commit/80b35f8))\n- a lot of improvements ([64f75da](https://github.com/pedronauck/docz/commit/64f75da))\n- adapt core plugins to gatsby hooks ([4caa47a](https://github.com/pedronauck/docz/commit/4caa47a))\n- add main package improvements ([8c8005d](https://github.com/pedronauck/docz/commit/8c8005d))\n- add markdown parsing on props description ([1087539](https://github.com/pedronauck/docz/commit/1087539))\n- add new Playground component ([7bf03b2](https://github.com/pedronauck/docz/commit/7bf03b2))\n- add new theme sidebar ([a01d100](https://github.com/pedronauck/docz/commit/a01d100))\n- add typescript support (need fix) ([13947f9](https://github.com/pedronauck/docz/commit/13947f9))\n- docz running using gatsby under the hood ([10ffd48](https://github.com/pedronauck/docz/commit/10ffd48))\n- dynamic src and root path ([c071556](https://github.com/pedronauck/docz/commit/c071556))\n- some playground improvements ([afa00df](https://github.com/pedronauck/docz/commit/afa00df))\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n### Bug Fixes\n\n- **docz-core:** prevent watch in production ([d673262](https://github.com/pedronauck/docz/commit/d673262))\n\n## [1.0.4](https://github.com/pedronauck/docz/compare/v1.0.3...v1.0.4) (2019-04-18)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n## [1.0.3](https://github.com/pedronauck/docz/compare/v1.0.2...v1.0.3) (2019-04-15)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n## [1.0.2](https://github.com/pedronauck/docz/compare/v1.0.1...v1.0.2) (2019-04-15)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n## [1.0.1](https://github.com/pedronauck/docz/compare/v1.0.0...v1.0.1) (2019-04-14)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n# [1.0.0](https://github.com/pedronauck/docz/compare/v1.0.0-rc.8...v1.0.0) (2019-04-11)\n\n### Bug Fixes\n\n- **docz:** crash using suspense ([315f7ad](https://github.com/pedronauck/docz/commit/315f7ad))\n\n# [1.0.0-rc.4](https://github.com/pedronauck/docz/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2019-03-29)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n# [1.0.0-rc.3](https://github.com/pedronauck/docz/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2019-03-21)\n\n### Bug Fixes\n\n- **gatsby-theme-docz:** menu field on entry source node ([05457f2](https://github.com/pedronauck/docz/commit/05457f2))\n\n# [1.0.0-beta.0](https://github.com/pedronauck/docz/compare/v1.0.0-alpha.1...v1.0.0-beta.0) (2019-03-19)\n\n**Note:** Version bump only for package gatsby-theme-docz\n\n# [1.0.0-alpha.1](https://github.com/pedronauck/docz/compare/v1.0.0-alpha.0...v1.0.0-alpha.1) (2019-03-19)\n\n### Bug Fixes\n\n- bump internal versions ([1658aaf](https://github.com/pedronauck/docz/commit/1658aaf))\n\n# [1.0.0-alpha.0](https://github.com/pedronauck/docz/compare/v0.13.5...v1.0.0-alpha.0) (2019-03-19)\n\n### Bug Fixes\n\n- **gatsby-theme-docz:** add null fields for entries ([b0409a8](https://github.com/pedronauck/docz/commit/b0409a8))\n- **gatsby-theme-docz:** add specific nodes for entries ([26f7f90](https://github.com/pedronauck/docz/commit/26f7f90))\n- **gatsby-theme-docz:** add ssr support for styled-components ([b490010](https://github.com/pedronauck/docz/commit/b490010))\n- **gatsby-theme-docz:** check data before access ([8f8ed12](https://github.com/pedronauck/docz/commit/8f8ed12))\n- **gatsby-theme-docz:** check entries before find on it ([8565128](https://github.com/pedronauck/docz/commit/8565128))\n- **gatsby-theme-docz:** create pages hook ([2f5765e](https://github.com/pedronauck/docz/commit/2f5765e))\n- **gatsby-theme-docz:** hot reload ([bf4e440](https://github.com/pedronauck/docz/commit/bf4e440))\n- **gatsby-theme-docz:** readme typo ([9e3314a](https://github.com/pedronauck/docz/commit/9e3314a))\n- **gatsby-theme-docz:** throws false for json stringify ([289ca75](https://github.com/pedronauck/docz/commit/289ca75))\n- define right internal dependencies version ([30a91b4](https://github.com/pedronauck/docz/commit/30a91b4))\n- gatsby theme fixes ([dcc5f19](https://github.com/pedronauck/docz/commit/dcc5f19))\n- **gatsby-theme-docz:** use options from gatsby-config ([#665](https://github.com/pedronauck/docz/issues/665)) ([c694bdf](https://github.com/pedronauck/docz/commit/c694bdf))\n- some general adjustments ([0c61f64](https://github.com/pedronauck/docz/commit/0c61f64))\n- **gatsby-theme-docz:** use createPages instead of createPagesStatefully ([37b73c6](https://github.com/pedronauck/docz/commit/37b73c6))\n\n### Features\n\n- **gatsby-theme-docz:** add custom theme support ([fdfddcb](https://github.com/pedronauck/docz/commit/fdfddcb))\n- **gatsby-theme-docz:** add wrapper support ([a99d62f](https://github.com/pedronauck/docz/commit/a99d62f))\n- add initial gatsby integration ([#630](https://github.com/pedronauck/docz/issues/630)) ([70d40cc](https://github.com/pedronauck/docz/commit/70d40cc)), closes [#609](https://github.com/pedronauck/docz/issues/609)\n- add playground component ([cde6511](https://github.com/pedronauck/docz/commit/cde6511))\n"
  },
  {
    "path": "core/gatsby-theme-docz/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) 2018 Pedro Nauck\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": "core/gatsby-theme-docz/README.md",
    "content": "# gatsby-theme-docz\n\n![](https://cdn-std.dprcdn.net/files/acc_649651/opUCiu)\n\nThe official Gatsby theme for Docz.\n\n## Installation\n\n```sh\nyarn add gatsby gatsby-theme-docz react react-dom\n```\n\n## Usage\n\n```js\n// gatsby-config.js\nmodule.exports = {\n  plugins: ['gatsby-theme-docz'],\n}\n```\n\n### Configuration\n\nSet your config by using `doczrc.js` file ([see all available](https://www.docz.site/docs/project-configuration)) or if you want to set some defaults for your theme, use `options` on plugin definition:\n\n```js\n// gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-theme-docz',\n      options: {\n        /* your custom options */\n      },\n    },\n  ],\n}\n```\n\n### Dark Mode\n\nTo set the dark version as default, just set your `doczrc.js` like that:\n\n```js\n// doczrc.js\nexport default {\n  themeConfig: {\n    mode: 'dark',\n  },\n}\n```\n\n### Customizing components\n\nComponents shadowing is one of the best things included in the new Gatsby theme feature, with it is possible to replace theme files just by creating your own file following a file naming convention.\n\nExample: If you're using our `gatsby-theme-docz` which has a `Header` component located at `src/components/Header/index.js` you can override the component by creating `src/gatsby-theme-docz/components/Header/index.js`. Cool right?\n\n### Adding your logo\n\nSo, now that you know about how component shadowing works on Gatsby themes, if you don't want to override the entire `<Header>` component but just change your logo inside it, your can shadow the `<Logo>` component used in the header just by creating your own at `src/gatsby-theme-docz/components/Logo/index.js`\n\n```js\n// src/gatsby-theme-docz/components/Logo/index.js\nimport React from 'react'\nimport logo from './logo.svg'\n\nexport const Logo = () => <img src={logo} alt=\"That's my logo\" />\n```\n\nEasy, right?\n\n### Creating your own Docz theme\n\nOne of the coolest thing of Docz is that you can create your own theme if you want from scratch and use all benefits of it. The oldest way to acomplish that is by using the `theme` property inside the `doczrc.js` file. Now, if you want to create your own theme, just create a file located at `src/gatsby-theme-docz/index.js`\n\n```js\nimport React from 'react'\nimport { theme, useConfig, ComponentsProvider } from 'docz'\nimport { ThemeProvider } from '@emotion/react'\nimport baseComponents from 'gatsby-theme-docz/src/components'\n\nimport { Menu } from './MyBeautifulMenu'\n\nconst componentsMap = {\n  ...baseComponents,\n  /* your custom components */,\n}\n\nconst Theme = ({ children }) => {\n  const config = useConfig()\n  return (\n    <ThemeProvider theme={config}>\n      <Menu />\n      <ComponentsProvider components={baseComponents}>\n        {children}\n      </ComponentsProvider>\n    </ThemeProvider>\n  )\n}\n\nconst themeConfig = {\n  colors: {\n    primary: 'tomato',\n    secondary: 'khaki',\n    gray: 'lightslategray',\n  },\n}\n\nexport default theme(themeConfig)(Theme)\n```\n\n### Wrapping the entire app\n\nSometime you need to wrap your entire application in order to add some `Provider` or just to load some script. You can do this easily inside our theme by creating a file located at `src/gatsby-theme-docz/wrapper.js`\n\n```js\n// src/gatsby-theme-docz/index.js\nimport React from 'react'\n\nexport default ({ children }) => (\n  <div>\n    <h1>My custom wrapper</h1>\n    {children}\n  </div>\n)\n```\n\n## Theme UI integrated\n\nAs default theme system we are using the [Theme-UI](https://theme-ui.com/), it's a library for build consistent, themeable React apps based on constraint-based design principles.\n\nYou can modify our based theme creating your own style, combining these modifications with the component shadowing and creating a totally different documentation.\n\nCheck our [base theme object](https://github.com/pedronauck/docz/blob/feat/gatsby/core/gatsby-theme-docz/src/theme/index.js) to see the properties.\n\nTo create your own theme definition use the `doczrc.js` and set your properties in the `themeConfig` like that:\n\n```js\n// doczrc.js\nexport default {\n  themeConfig: {\n    colors: {\n      header: {\n        bg: 'tomato',\n      },\n    },\n  },\n}\n```\n\nOr, to create your own theme it's easy, just create this file in the root of your project: `src/gatsby-theme-docz/theme/index.js`.\n\n```js\nimport baseTheme from 'gatsby-theme-docz/src/theme'\nimport { merge } from 'lodash/fp'\n\nexport default merge(baseTheme, {\n  colors: {\n    header: {\n      bg: 'tomato',\n    },\n  },\n})\n```\n\n### Changing code highlight\n\nBoth code highlights shortcodes and the `<Playground>` component are using [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer) to highlight the code. If you want to modify and use another PrismJS theme, you can do that just passing a `prismTheme` property for your theme.\n\n```js\n// doczrc.js\nimport myCustomPrismTheme from './my-prism-theme'\n\nexport default {\n  themeConfig: {\n    prismTheme: myCustomPrismTheme,\n  },\n}\n```\n\nOr you want to have different themes for `light` and `dark` color mode, you can change the `prism` default property like that:\n\n```js\n// doczrc.js\nimport customLightTheme from './my-light-theme'\nimport customDarkTheme from './my-dark-theme'\n\nexport default {\n  themeConfig: {\n    prism: {\n      light: customLightTheme,\n      dark: customDarkTheme,\n    },\n  },\n}\n```\n\n### Adding component shortcodes\n\nYou can add shortcodes to your docs site which can be used throughout\nyour docs pages by extending the components passed to MDXProvider. You\ncan do this by using component shadowing and creating the following file\nin the root of your project: `src/gatsby-theme-docz/components/index.js`.\n\n#### Example `components.js`\n\n```js\nimport baseComponents from 'gatsby-theme-documentation/src/components'\nimport MyCustomH1 from '../components/my-custom-h1'\n\nexport default {\n  ...baseComponents,\n  h1: MyCustomH1,\n}\n```\n\n## Getting data\n\nUsing our Gatsby Theme you can enjoy all our hooks to get data for your pages and also get data from Gatsby. So, you can create isolated pages on Gatsby using gatsby pages and get data from Docz or maybe pass data for your Docz documents using source from gatsby.\n\nImagine, that you have your home page inside `/pages` and you want to show all documents parsed from Docz. You can easy get this by doing:\n\n```js\nimport React from 'react'\nimport { useDocs } from 'docz'\n\nconst Home = () => {\n  const docs = useDocs()\n  return <div>{/* my coolest home */}</div>\n}\n\nexport default Home\n```\n\nOr you can have a mdx document inside Docz that has data from Gatsby too:\n\n```markdown\n---\nname: MyDoc\n---\n\nimport { MyComponentWithSomeData } from './my-component-with-data'\n\n<MyComponentWithSomeData />\n```\n\nCool right?\n"
  },
  {
    "path": "core/gatsby-theme-docz/gatsby-browser.js",
    "content": "import './src/index.css'\n"
  },
  {
    "path": "core/gatsby-theme-docz/gatsby-config.js",
    "content": "const path = require('path')\nconst { getDoczConfig } = require('./lib/utils/parseConfig')\n\nconst getRemarkPlugins = () => {\n  let plugins = []\n\n  try {\n    plugins = [\n      [require('remark-frontmatter'), { type: 'yaml', marker: '-' }],\n      require('remark-docz'),\n    ]\n  } catch (err) {\n    plugins = []\n  }\n\n  return plugins\n}\n\nconst getRehypePlugins = () => {\n  let plugins = []\n\n  try {\n    plugins = [require('rehype-docz'), require('rehype-slug')]\n  } catch (err) {\n    plugins = []\n  }\n\n  return plugins\n}\n\nconst getGatsbyRemarkPlugins = () => {\n  return []\n}\n\nmodule.exports = opts => {\n  const config = getDoczConfig(opts)\n  const mdPlugins = getRemarkPlugins()\n  const hastPlugins = getRehypePlugins()\n  const gatsbyRemarkPlugins = getGatsbyRemarkPlugins()\n\n  return {\n    plugins: [\n      {\n        resolve: `gatsby-source-filesystem`,\n        options: {\n          ignore: [\n            `${config.paths.docz}/**/*`,\n            `${config.paths.root}/.git/**/*`,\n            // gatsby cache\n            `${config.paths.root}/.cache/**/*`,\n            // static assets with gatsby site setup\n            `${config.paths.root}/public/**/*`,\n            // ignore node_modules unless user explicitly asks for them to be included\n            config.src.indexOf('node_modules') === -1\n              ? `${config.paths.root}/node_modules/**/*`\n              : `${config.paths.root}/node_modules/.cache/**/*`,\n          ],\n          path: path.resolve(\n            config.paths.root,\n            config.gatsbyRoot !== null ? config.gatsbyRoot : config.src\n          ),\n        },\n      },\n      {\n        resolve: 'gatsby-plugin-mdx',\n        options: {\n          extensions: config.mdxExtensions,\n          remarkPlugins:\n            config && config.mdPlugins\n              ? config.mdPlugins.concat(mdPlugins)\n              : mdPlugins,\n          rehypePlugins:\n            config && config.hastPlugins\n              ? config.hastPlugins.concat(hastPlugins)\n              : hastPlugins,\n          gatsbyRemarkPlugins:\n            config && config.gatsbyRemarkPlugins\n              ? config.gatsbyRemarkPlugins.concat(gatsbyRemarkPlugins)\n              : gatsbyRemarkPlugins,\n          defaultLayouts: {\n            default: path.join(__dirname, 'src/base/Layout.js'),\n          },\n        },\n      },\n      {\n        resolve: 'gatsby-plugin-catch-links',\n      },\n      {\n        resolve: 'gatsby-plugin-react-helmet-async',\n      },\n      {\n        resolve: 'gatsby-plugin-root-import',\n      },\n      {\n        resolve: 'gatsby-plugin-emotion',\n      },\n      {\n        resolve: 'gatsby-plugin-alias-imports',\n        options: {\n          alias: {\n            '~components': path.resolve(__dirname, 'src/components'),\n            '~styles': path.resolve(__dirname, 'src/styles'),\n            '~theme': path.resolve(__dirname, 'src/theme'),\n            '~utils': path.resolve(__dirname, 'src/utils'),\n          },\n        },\n      },\n      {\n        resolve: 'gatsby-plugin-compile-es6-packages',\n        options: {\n          modules: ['docz', 'docz-core', 'gatsby-theme-docz'],\n        },\n      },\n    ],\n  }\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/gatsby-node.js",
    "content": "exports.createPagesStatefully = require('./lib/createPagesStatefully')\nexports.onCreateBabelConfig = require('./lib/onCreateBabelConfig')\nexports.onCreateDevServer = require('./lib/onCreateDevServer')\nexports.onCreateWebpackConfig = require('./lib/onCreateWebpackConfig')\nexports.onPreBuild = require('./lib/sourceNodes')\nexports.onPostBuild = require('./lib/sourceNodes')\nexports.sourceNodes = require('./lib/sourceNodes')\n"
  },
  {
    "path": "core/gatsby-theme-docz/gatsby-ssr.js",
    "content": "import './src/index.css'\n"
  },
  {
    "path": "core/gatsby-theme-docz/index.js",
    "content": "// noop\n"
  },
  {
    "path": "core/gatsby-theme-docz/lib/createPagesStatefully.js",
    "content": "const { get } = require('lodash/fp')\nconst { parseConfig } = require('docz-core')\n\nconst ENTRIES_QUERY = `\n  {\n    allDoczEntries{\n      edges{\n        node{\n          id\n          filepath\n          fullpath\n          route\n          slug\n          name\n          menu\n          headings {\n            slug\n            depth\n            value\n          }\n        }\n      }\n    }\n  }\n`\n\nmodule.exports = async ({ graphql, actions }, opts = {}) => {\n  return graphql(ENTRIES_QUERY).then(async ({ data, errors }) => {\n    const hasErrors = errors && errors.length > 0\n    const entries = get('allDoczEntries.edges', data)\n    if (!entries || entries.length === 0 || hasErrors) return\n    const defaultEntry = entries.find(({ node: entry }) => entry.route === '/')\n    if (defaultEntry === undefined) {\n      const config = await parseConfig(opts)\n      // Create a default entry unless specifically denied by config\n      const shouldNotCreateRootRoute = Boolean(config.noRootRoute)\n      if (shouldNotCreateRootRoute === false) {\n        // Set the first found entry as the default entry\n        const createdDefaultEntry = {\n          node: {\n            ...entries[0].node,\n            route: '/',\n          },\n        }\n        entries.unshift(createdDefaultEntry)\n      }\n    }\n    entries.forEach(({ node: entry }) => {\n      if (!entry) return\n      actions.createPage({\n        component: entry.fullpath,\n        path: entry.route,\n        context: {\n          entry,\n        },\n      })\n    })\n  })\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/lib/onCreateBabelConfig.js",
    "content": "const { Plugin, parseConfig } = require('docz-core')\n\nmodule.exports = async (params, opts = {}) => {\n  const config = await parseConfig(opts)\n  const run = Plugin.runPluginsMethod(config.plugins)\n\n  const { paths } = config\n  const { actions, stage } = params\n\n  actions.setBabelPlugin({\n    name: 'babel-plugin-export-metadata',\n    options: {\n      root: paths.getRootDir(config),\n    },\n  })\n\n  run('onCreateBabelConfig', params, stage === 'develop')\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/lib/onCreateDevServer.js",
    "content": "const { Plugin, parseConfig } = require('docz-core')\n\nmodule.exports = async (params, opts = {}) => {\n  const config = await parseConfig(opts)\n  const run = Plugin.runPluginsMethod(config.plugins)\n  const { stage } = params\n\n  run('onCreateDevServer', params, stage === 'develop')\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/lib/onCreateWebpackConfig.js",
    "content": "const { Plugin, parseConfig } = require('docz-core')\n\nmodule.exports = async (params, opts) => {\n  const { stage, actions, getConfig } = params\n  const args = await parseConfig(opts)\n  const run = Plugin.runPluginsMethod(args.plugins)\n  const config = getConfig()\n\n  if (args.typescript) {\n    actions.setWebpackConfig({\n      resolve: {\n        extensions: config.resolve.extensions.concat(['.ts', '.tsx']),\n      },\n    })\n  }\n\n  run('onCreateWebpackConfig', params, stage === 'develop', args, config)\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/lib/onPostBuild.js",
    "content": "const { Plugin, parseConfig } = require('docz-core')\n\nmodule.exports = async (params, opts = {}) => {\n  const config = await parseConfig(opts)\n  Plugin.runPluginsMethod(config.plugins)('onPreBuild')\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/lib/onPreBuild.js",
    "content": "const { Plugin, parseConfig } = require('docz-core')\n\nmodule.exports = async (params, opts = {}) => {\n  const config = await parseConfig(opts)\n  Plugin.runPluginsMethod(config.plugins)('onPreBuild')\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/lib/sourceNodes.js",
    "content": "const crypto = require('crypto')\nconst fs = require('fs-extra')\nconst { Entries, DataServer, states } = require('docz-core')\nconst { parseConfig } = require('./utils/parseConfig')\n\nconst NODE_ENV = process.env.GATSBY_ACTIVE_ENV || process.env.NODE_ENV\nconst IS_DEV = NODE_ENV === 'development'\n\nconst digest = str =>\n  crypto\n    .createHash('md5')\n    .update(str)\n    .digest('hex')\n\nmodule.exports = async ({ actions, createNodeId }, opts) => {\n  const { createNode } = actions\n  const config = await parseConfig(opts)\n  const entries = new Entries(config)\n  const dataServer = new DataServer()\n\n  if (config.propsParser) dataServer.register([states.props(config, IS_DEV)])\n  dataServer.register([\n    states.config(config, IS_DEV),\n    states.entries(entries, config, IS_DEV),\n  ])\n\n  try {\n    await dataServer.start()\n  } catch (err) {\n    console.error('Failed to process data server')\n    console.error(err)\n    dataServer.close()\n    process.exit(1)\n  }\n\n  const createDbNode = async () => {\n    const db = await fs.readJSON(config.paths.db, { throws: false })\n    const contentDigest = digest(JSON.stringify(db || {}))\n\n    createNode({\n      id: createNodeId('docz-db'),\n      db: JSON.stringify(db || {}),\n      children: [],\n      internal: {\n        contentDigest,\n        type: 'DoczDb',\n      },\n    })\n  }\n\n  const createEntriesNodes = async () => {\n    const map = await entries.get()\n    const values = Object.entries(map)\n    const contentDigest = digest(JSON.stringify(values))\n\n    values.forEach(([, entry]) => {\n      if (!entry) return null\n      createNode({\n        ...entry,\n        children: [],\n        internal: {\n          contentDigest,\n          type: `DoczEntries`,\n        },\n      })\n    })\n  }\n\n  const createNodes = async () => {\n    await createDbNode()\n    await createEntriesNodes()\n  }\n\n  await createNodes()\n  dataServer.onStateChange(createNodes)\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/lib/utils/parseConfig.js",
    "content": "const { setArgs, parseConfig, getBaseConfig } = require('docz-core')\nconst yargs = require('yargs')\n\nconst getDoczConfig = opts => {\n  const { argv } = setArgs(yargs)\n  return getBaseConfig(argv, opts)\n}\n\nexports.parseConfig = async opts => parseConfig(getDoczConfig(opts))\nexports.getDoczConfig = getDoczConfig\n"
  },
  {
    "path": "core/gatsby-theme-docz/package.json",
    "content": "{\n  \"name\": \"gatsby-theme-docz\",\n  \"version\": \"2.4.0\",\n  \"description\": \"Gatsby theme created to use Docz\",\n  \"license\": \"MIT\",\n  \"author\": \"Pedro Nauck (pedronauck@gmail.com)\",\n  \"keywords\": [\n    \"gatsby\",\n    \"gatsby-theme\",\n    \"docz\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"core/gatsby-theme-docz\"\n  },\n  \"scripts\": {\n    \"dev\": \"echo noop\",\n    \"fix\": \"yarn lint --fix\",\n    \"lint\": \"eslint . --ext .js\",\n    \"precommit\": \"lint-staged\"\n  },\n  \"dependencies\": {\n    \"@emotion/react\": \"^11.1.1\",\n    \"@emotion/styled\": \"^11.0.0\",\n    \"@loadable/component\": \"^5.10.2\",\n    \"@mdx-js/mdx\": \"^1.1.0\",\n    \"@mdx-js/react\": \"^1.0.27\",\n    \"@theme-ui/typography\": \"^0.2.5\",\n    \"babel-plugin-export-metadata\": \"^2.4.0\",\n    \"copy-text-to-clipboard\": \"^2.1.0\",\n    \"fs-extra\": \"^8.1.0\",\n    \"gatsby\": \"^2.13.27\",\n    \"gatsby-plugin-alias-imports\": \"^1.0.5\",\n    \"gatsby-plugin-catch-links\": \"^2.3.0\",\n    \"gatsby-plugin-compile-es6-packages\": \"^2.0.0\",\n    \"gatsby-plugin-emotion\": \"^4.1.2\",\n    \"gatsby-plugin-mdx\": \"^1.0.13\",\n    \"gatsby-plugin-react-helmet-async\": \"^1.0.5\",\n    \"gatsby-plugin-root-import\": \"^2.0.5\",\n    \"gatsby-source-filesystem\": \"^2.1.35\",\n    \"lodash\": \"^4.17.14\",\n    \"mdx-utils\": \"^0.2.0\",\n    \"prism-react-renderer\": \"^1.0.2\",\n    \"prop-types\": \"^15.7.2\",\n    \"re-resizable\": \"^6.1.0\",\n    \"react-feather\": \"^2.0.3\",\n    \"react-frame-component\": \"^4.1.1\",\n    \"react-helmet-async\": \"^1.0.4\",\n    \"react-live\": \"^2.2.1\",\n    \"react-resize-detector\": \"^4.2.1\",\n    \"rehype-docz\": \"^2.4.0\",\n    \"rehype-slug\": \"^2.0.3\",\n    \"remark-docz\": \"^2.4.0\",\n    \"remark-frontmatter\": \"^1.3.2\",\n    \"theme-ui\": \"^0.2.38\",\n    \"to-style\": \"^1.3.3\",\n    \"typography-theme-moraga\": \"^0.16.19\",\n    \"yargs\": \"^13.3.0\"\n  },\n  \"peerDependencies\": {\n    \"docz\": \">=2.0.0\",\n    \"react\": \"^16.8.0 || ^17.0.2\",\n    \"react-dom\": \"^16.8.0 || ^17.0.2\"\n  },\n  \"gitHead\": \"74932cd67112bacd1e29780a202d466acdd79535\"\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/base/Layout.js",
    "content": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport { useComponents } from 'docz'\nimport { propEq, get } from 'lodash/fp'\nimport { MDXProvider } from '@mdx-js/react'\n\nimport { useDbQuery } from '../hooks/useDbQuery'\nimport Wrapper from '../wrapper'\nimport Theme from '../index'\nimport SEO from './Seo'\n\nconst Route = ({ children, entry, isTransclusion, ...defaultProps }) => {\n  const components = useComponents()\n  const NotFound = components.notFound\n  const Layout = components.layout\n  const props = { ...defaultProps, doc: entry }\n  if (!entry && !isTransclusion) return <NotFound />\n  return isTransclusion ? (\n    children\n  ) : (\n    <MDXProvider components={components}>\n      <Wrapper>\n        <Layout {...props}>{children}</Layout>\n      </Wrapper>\n    </MDXProvider>\n  )\n}\n\nconst findEntry = (db, ctx) => {\n  const isIndex = ctx && ctx.frontmatter && ctx.frontmatter.route === '/'\n  const eqIndex = propEq('value.route', '/')\n  if (ctx && !ctx.entry && isIndex) return db.entries.find(eqIndex)\n  const filepath = get('entry.filepath', ctx)\n  return db.entries.find(propEq('value.filepath', filepath))\n}\n\nconst includesTransclusion = (db, props) => {\n  const { entries } = db\n  const filepath = get('_frontmatter.__filemeta.filename', props)\n  return (\n    !props.pageContext &&\n    entries.includes(entries.find(propEq('value.filepath', filepath)))\n  )\n}\n\nconst Layout = ({ children, ...defaultProps }) => {\n  const { pageContext: ctx } = defaultProps\n  const db = useDbQuery()\n  const entry = findEntry(db, ctx)\n  const isTransclusion = includesTransclusion(db, defaultProps)\n  return (\n    <>\n      {entry && <SEO title={entry.value.name} {...entry.value} />}\n      <Theme db={db} currentEntry={entry}>\n        <Route {...defaultProps} entry={entry} isTransclusion={isTransclusion}>\n          {children}\n        </Route>\n      </Theme>\n    </>\n  )\n}\n\nLayout.propTypes = {\n  color: PropTypes.string,\n  children: PropTypes.node.isRequired,\n}\n\nexport default Layout\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/base/Seo.js",
    "content": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport { Helmet } from 'react-helmet-async'\n\nimport { useDbQuery } from '../hooks/useDbQuery'\n\nconst SEO = ({ description, lang, meta, keywords, title: initialTitle }) => {\n  const db = useDbQuery()\n  const title = initialTitle || db.config.title\n  const metaDescription = description || db.config.description\n\n  return (\n    <Helmet\n      title={title}\n      titleTemplate={`%s | ${db.config.title}`}\n      htmlAttributes={{ lang }}\n      meta={[\n        {\n          name: `description`,\n          content: metaDescription,\n        },\n        {\n          property: `og:title`,\n          content: title,\n        },\n        {\n          property: `og:description`,\n          content: metaDescription,\n        },\n        {\n          property: `og:type`,\n          content: `website`,\n        },\n        {\n          name: `twitter:card`,\n          content: `summary`,\n        },\n        {\n          name: `twitter:title`,\n          content: title,\n        },\n        {\n          name: `twitter:description`,\n          content: metaDescription,\n        },\n      ]\n        .concat(\n          keywords.length > 0\n            ? {\n                name: `keywords`,\n                content: keywords.join(`, `),\n              }\n            : []\n        )\n        .concat(meta)}\n    />\n  )\n}\n\nSEO.defaultProps = {\n  lang: `en`,\n  meta: [],\n  keywords: [],\n}\n\nSEO.propTypes = {\n  description: PropTypes.string,\n  lang: PropTypes.string,\n  meta: PropTypes.array,\n  keywords: PropTypes.arrayOf(PropTypes.string),\n  title: PropTypes.string.isRequired,\n}\n\nexport default SEO\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Code/index.js",
    "content": "/** @jsx jsx */\n/* eslint react/jsx-key: 0 */\nimport Highlight, { defaultProps } from 'prism-react-renderer'\nimport { jsx, Styled } from 'theme-ui'\n\nimport { usePrismTheme } from '~utils/theme'\n\nexport const Code = ({ children, className: outerClassName }) => {\n  const [language] = outerClassName\n    ? outerClassName.replace(/language-/, '').split(' ')\n    : ['text']\n  const theme = usePrismTheme()\n\n  return (\n    <Highlight\n      {...defaultProps}\n      code={children.trim()}\n      language={language}\n      theme={theme}\n    >\n      {({ className, style, tokens, getLineProps, getTokenProps }) => (\n        <Styled.pre\n          className={`${outerClassName || ''} ${className}`}\n          style={{ ...style, overflowX: 'auto' }}\n          data-testid=\"code\"\n        >\n          {tokens.map((line, i) => (\n            <div {...getLineProps({ line, key: i })}>\n              {line.map((token, key) => (\n                <span\n                  {...getTokenProps({ token, key })}\n                  sx={{ display: 'inline-block' }}\n                />\n              ))}\n            </div>\n          ))}\n        </Styled.pre>\n      )}\n    </Highlight>\n  )\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Code/styles.js",
    "content": "export const editor = {\n  borderRadius: 'radius',\n  border: t => `1px solid ${t.colors.border}`,\n  fontFamily: 'monospace',\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Header/index.js",
    "content": "/** @jsx jsx */\nimport { jsx, Box, Flex, useColorMode } from 'theme-ui'\nimport { useConfig, useCurrentDoc } from 'docz'\n\nimport * as styles from './styles'\nimport { Edit, Menu, Sun, Github } from '../Icons'\nimport { Logo } from '../Logo'\n\nexport const Header = props => {\n  const { onOpen } = props\n  const {\n    repository,\n    themeConfig: { showDarkModeSwitch, showMarkdownEditButton },\n  } = useConfig()\n  const { edit = true, ...doc } = useCurrentDoc()\n  const [colorMode, setColorMode] = useColorMode()\n\n  const toggleColorMode = () => {\n    setColorMode(colorMode === 'light' ? 'dark' : 'light')\n  }\n\n  return (\n    <div sx={styles.wrapper} data-testid=\"header\">\n      <Box sx={styles.menuIcon}>\n        <button sx={styles.menuButton} onClick={onOpen}>\n          <Menu size={25} />\n        </button>\n      </Box>\n      <div sx={styles.innerContainer}>\n        <Logo />\n        <Flex>\n          {repository && (\n            <Box sx={{ mr: 2 }}>\n              <a\n                href={repository}\n                sx={styles.headerButton}\n                target=\"_blank\"\n                rel=\"noopener noreferrer\"\n              >\n                <Github size={15} />\n              </a>\n            </Box>\n          )}\n          {showDarkModeSwitch && (\n            <button\n              sx={styles.headerButton}\n              onClick={toggleColorMode}\n              aria-label={`Switch to ${colorMode} mode`}\n            >\n              <Sun size={15} />\n            </button>\n          )}\n        </Flex>\n        {showMarkdownEditButton && edit && doc.link && (\n          <a\n            sx={styles.editButton}\n            href={doc.link}\n            target=\"_blank\"\n            rel=\"noopener noreferrer\"\n          >\n            <Edit width={14} />\n            <Box sx={{ pl: 2 }}>Edit page</Box>\n          </a>\n        )}\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Header/styles.js",
    "content": "import * as mixins from '~utils/mixins'\nimport { media } from '~theme/breakpoints'\n\nexport const wrapper = {\n  bg: 'header.bg',\n  position: 'relative',\n  zIndex: 1,\n  borderBottom: t => `1px solid ${t.colors.border}`,\n}\n\nexport const innerContainer = {\n  ...mixins.centerAlign,\n  px: 4,\n  position: 'relative',\n  justifyContent: 'space-between',\n  height: 80,\n}\n\nexport const menuIcon = {\n  display: 'none',\n  position: 'absolute',\n  top: 'calc(100% + 15px)',\n  left: 30,\n  [media.tablet]: {\n    display: 'block',\n  },\n}\n\nexport const menuButton = {\n  ...mixins.ghostButton,\n  color: 'header.text',\n  opacity: 0.5,\n  cursor: 'pointer',\n}\n\nexport const headerButton = {\n  ...mixins.centerAlign,\n  outline: 'none',\n  p: '12px',\n  border: 'none',\n  borderRadius: 9999,\n  bg: 'header.button.bg',\n  color: 'header.button.color',\n  fontSize: 0,\n  fontWeight: 600,\n  cursor: 'pointer',\n}\n\nexport const editButton = {\n  ...mixins.centerAlign,\n  position: 'absolute',\n  bottom: -40,\n  right: 30,\n  bg: 'transparent',\n  color: 'muted',\n  fontSize: 1,\n  textDecoration: 'none',\n  borderRadius: 'radius',\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Headings/index.js",
    "content": "/** @jsx jsx */\nimport { jsx } from 'theme-ui'\n\nconst heading = Tag => {\n  const Component = props => {\n    return !!props.id ? (\n      <Tag {...props}>\n        <a\n          href={`#${props.id}`}\n          sx={{\n            color: 'inherit',\n            textDecoration: 'none',\n            ':hover': {\n              textDecoration: 'underline',\n            },\n          }}\n        >\n          {props.children}\n        </a>\n      </Tag>\n    ) : (\n      <Tag {...props} />\n    )\n  }\n\n  Component.displayName = Tag\n  return Component\n}\n\nexport const h2 = heading('h2')\nexport const h3 = heading('h3')\nexport const h4 = heading('h4')\nexport const h5 = heading('h5')\nexport const h6 = heading('h6')\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Icons/index.js",
    "content": "export { default as ChevronDown } from 'react-feather/dist/icons/chevron-down'\nexport { default as ChevronUp } from 'react-feather/dist/icons/chevron-up'\nexport { default as Clipboard } from 'react-feather/dist/icons/clipboard'\nexport { default as Code } from 'react-feather/dist/icons/code'\nexport { default as Edit } from 'react-feather/dist/icons/edit-2'\nexport { default as Github } from 'react-feather/dist/icons/github'\nexport { default as Menu } from 'react-feather/dist/icons/menu'\nexport { default as Search } from 'react-feather/dist/icons/search'\nexport { default as Sun } from 'react-feather/dist/icons/sun'\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Layout/index.js",
    "content": "/** @jsx jsx */\nimport { useRef, useState } from 'react'\nimport { jsx, Layout as BaseLayout, Main } from 'theme-ui'\nimport { Global } from '@emotion/react'\n\nimport global from '~theme/global'\nimport { Header } from '../Header'\nimport { Sidebar } from '../Sidebar'\nimport { MainContainer } from '../MainContainer'\nimport * as styles from './styles'\n\nexport const Layout = ({ children }) => {\n  const [open, setOpen] = useState(false)\n  const nav = useRef()\n\n  return (\n    <BaseLayout sx={{ '& > div': { flex: '1 1 auto' } }} data-testid=\"layout\">\n      <Global styles={global} />\n      <Main sx={styles.main}>\n        <Header onOpen={() => setOpen(s => !s)} />\n        <div sx={styles.wrapper}>\n          <Sidebar\n            ref={nav}\n            open={open}\n            onFocus={() => setOpen(true)}\n            onBlur={() => setOpen(false)}\n            onClick={() => setOpen(false)}\n          />\n          <MainContainer data-testid=\"main-container\">{children}</MainContainer>\n        </div>\n      </Main>\n    </BaseLayout>\n  )\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Layout/styles.js",
    "content": "import { media } from '~theme/breakpoints'\n\nexport const main = {\n  display: 'flex',\n  flexDirection: 'column',\n  minHeight: '100vh',\n}\n\nexport const wrapper = {\n  py: 0,\n  flex: 1,\n  display: 'grid',\n  gridTemplateColumns: '250px minmax(0, 1fr)',\n  minHeight: '100vh',\n  [media.tablet]: {\n    display: 'block',\n  },\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Logo/index.js",
    "content": "/** @jsx jsx */\nimport { jsx, Flex } from 'theme-ui'\nimport { Link, useConfig } from 'docz'\n\nimport * as styles from './styles'\n\nexport const Logo = () => {\n  const config = useConfig()\n  return (\n    <Flex alignItems=\"center\" sx={styles.logo} data-testid=\"logo\">\n      <Link to=\"/\" sx={styles.link}>\n        {config.title}\n      </Link>\n    </Flex>\n  )\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Logo/styles.js",
    "content": "export const logo = {\n  letterSpacing: '-0.02em',\n  fontWeight: 600,\n  fontSize: 4,\n}\n\nexport const link = {\n  fontWeight: 600,\n  color: 'header.text',\n  textDecoration: 'none',\n  ':hover': {\n    color: 'primary',\n  },\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/MainContainer/index.js",
    "content": "/** @jsx jsx */\nimport { jsx, Container } from 'theme-ui'\n\nimport * as styles from './styles'\n\nexport const MainContainer = ({ children, ...rest }) => {\n  return (\n    <Container sx={styles.container} {...rest}>\n      {children}\n    </Container>\n  )\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/MainContainer/styles.js",
    "content": "import { media } from '~theme/breakpoints'\n\nexport const container = {\n  backgroundColor: 'background',\n  position: 'relative',\n  maxWidth: 960,\n  py: 5,\n  px: 4,\n  variant: 'styles.Container',\n  [media.tablet]: {\n    py: 4,\n    px: 4,\n    pt: 5,\n  },\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/NavGroup/index.js",
    "content": "/** @jsx jsx */\nimport { jsx } from 'theme-ui'\nimport { useEffect, useState, useRef } from 'react'\nimport { useCurrentDoc } from 'docz'\n\nimport * as styles from './styles'\nimport { NavLink } from '../NavLink'\nimport { ChevronDown } from '../Icons'\n\nexport const NavGroup = ({ item, sidebarRef }) => {\n  const currentDoc = useCurrentDoc()\n  const currentDocRef = useRef()\n  const { name, menu } = item\n  const [subheadingsVisible, setShowsubheadings] = useState(\n    currentDoc.menu === name\n  )\n  const toggleSubheadings = () => setShowsubheadings(!subheadingsVisible)\n  useEffect(() => {\n    if (sidebarRef.current && currentDocRef.current) {\n      sidebarRef.current.scrollTo(0, currentDocRef.current.offsetTop)\n    }\n  }, [])\n  return (\n    <div sx={styles.wrapper} data-testid=\"nav-group\">\n      <div sx={styles.title} onClick={toggleSubheadings}>\n        {item.name}\n        <ChevronDown sx={styles.chevron({ active: subheadingsVisible })} />\n      </div>\n      <div sx={styles.sublinkWrapper} data-testid=\"nav-group-links\">\n        {menu &&\n          subheadingsVisible &&\n          menu.map(menu => {\n            if (currentDoc.route === menu.route) {\n              return (\n                <NavLink key={menu.id} item={menu} ref={currentDocRef}>\n                  {menu.name}\n                </NavLink>\n              )\n            }\n            return (\n              <NavLink key={menu.id} item={menu}>\n                {menu.name}\n              </NavLink>\n            )\n          })}\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/NavGroup/styles.js",
    "content": "export const wrapper = {\n  my: 3,\n}\n\nexport const sublinkWrapper = {\n  ml: 2,\n}\n\nexport const title = {\n  mb: 1,\n  fontSize: 2,\n  fontWeight: 500,\n  color: 'sidebar.navGroup',\n  cursor: 'pointer',\n  display: 'flex',\n  justifyContent: 'space-between',\n  alignItems: 'center',\n}\n\nexport const chevron = ({ active }) => ({\n  ml: 1,\n  flexShrink: 0,\n  alignSelf: 'baseline',\n  transform: `rotateX(${active ? 180 : 0}deg)`,\n  transformOrigin: 'center',\n  transition: 'transform .3s ease-in-out',\n})\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/NavLink/index.js",
    "content": "/** @jsx jsx */\nimport { Fragment, forwardRef } from 'react'\nimport { jsx } from 'theme-ui'\nimport { Link } from 'gatsby'\nimport { useDocs, useCurrentDoc } from 'docz'\nimport { get } from 'lodash/fp'\n\nimport * as styles from './styles'\n\nconst getHeadings = (route, docs) => {\n  const doc = docs.find(doc => doc.route === route)\n  const headings = get('headings', doc)\n  return headings ? headings.filter(heading => heading.depth === 2) : []\n}\n\nconst getCurrentHash = () => {\n  if (typeof window === 'undefined') {\n    return ''\n  }\n  return window.location ? decodeURI(window.location.hash) : ''\n}\n\nexport const NavLink = forwardRef(function NavLink({ item, ...props }, ref) {\n  const docs = useDocs()\n  const current = useCurrentDoc()\n\n  if (item.hidden) {\n    return null\n  }\n\n  const to = item.route\n  const headings = docs && getHeadings(to, docs)\n  const isCurrent = item.route === current.route\n  const showHeadings = isCurrent && headings && headings.length > 0\n  const currentHash = getCurrentHash()\n  return (\n    <Fragment>\n      <Link\n        {...props}\n        to={to}\n        sx={styles.link}\n        activeClassName=\"active\"\n        ref={ref}\n      />\n      {showHeadings &&\n        headings.map(heading => (\n          <Link\n            key={heading.slug}\n            to={`${to}#${heading.slug}`}\n            sx={styles.smallLink}\n            className={currentHash === `#${heading.slug}` ? 'active' : ''}\n          >\n            {heading.value}\n          </Link>\n        ))}\n    </Fragment>\n  )\n})\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/NavLink/styles.js",
    "content": "export const link = {\n  my: 2,\n  display: 'block',\n  color: 'sidebar.navGroup',\n  textDecoration: 'none',\n  fontSize: 2,\n  '&.active': {\n    color: 'sidebar.navLinkActive',\n  },\n}\n\nexport const smallLink = {\n  ...link,\n  ml: 3,\n  fontSize: 1,\n  position: 'relative',\n  color: 'sidebar.tocLink',\n  '&.active': {\n    color: 'sidebar.tocLinkActive',\n  },\n  '&.active::before': {\n    content: '\"\"',\n    position: 'absolute',\n    display: 'block',\n    top: '2px',\n    left: -2,\n    height: '1rem',\n    backgroundColor: 'primary',\n    transition: 'width 200ms ease 0s',\n    width: '2px',\n    borderRadius: 1,\n  },\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/NavSearch/index.js",
    "content": "/** @jsx jsx */\nimport { jsx } from 'theme-ui'\n\nimport * as styles from './styles'\nimport { Search } from '../Icons'\n\nexport const NavSearch = props => {\n  return (\n    <div sx={styles.wrapper} data-testid=\"nav-search\">\n      <Search size={20} sx={styles.icon} />\n      <input {...props} sx={styles.input} />\n    </div>\n  )\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/NavSearch/styles.js",
    "content": "export const wrapper = {\n  mb: 3,\n  display: 'inline-flex',\n  alignItems: 'center',\n}\n\nexport const input = {\n  outline: 'none',\n  background: 'none',\n  border: 'none',\n  color: 'text',\n  fontSize: 1,\n}\n\nexport const icon = {\n  color: 'border',\n  mr: 2,\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Playground/Wrapper.js",
    "content": "/** @jsx jsx */\nimport { useState } from 'react'\nimport { jsx } from 'theme-ui'\nimport { useConfig } from 'docz'\nimport Iframe from 'react-frame-component'\nimport ReactResizeDetector from 'react-resize-detector'\n\nimport * as styles from './styles'\n\nconst CLEAR_PADDING = `<style> body { padding: 0; margin: 0; }  </style>`\nconst INITIAL_IFRAME_CONTENT = `<!DOCTYPE html><html><head> ${CLEAR_PADDING} </head><body><div></div></body></html>`\n\nconst IframeWrapper = ({ children, style }) => {\n  const [containerHeight, setHeight] = useState()\n  return (\n    <Iframe\n      initialContent={INITIAL_IFRAME_CONTENT}\n      sx={{\n        ...styles.wrapper(),\n        style,\n        height: containerHeight,\n      }}\n    >\n      {children}\n      <ReactResizeDetector\n        handleHeight\n        onResize={({ height }) => {\n          setHeight(height)\n        }}\n      />\n    </Iframe>\n  )\n}\n\nconst NormalWrapper = ({ children, style }) => {\n  return (\n    <div\n      sx={{\n        ...styles.wrapper(),\n        ...style,\n      }}\n    >\n      {children}\n    </div>\n  )\n}\n\nexport const Wrapper = ({ children, content, useScoping, showingCode }) => {\n  const {\n    themeConfig: { useScopingInPlayground },\n  } = useConfig()\n\n  const Element =\n    useScoping || useScopingInPlayground ? IframeWrapper : NormalWrapper\n\n  return (\n    <Element style={styles.wrapperBorder(content, showingCode)}>\n      {children}\n    </Element>\n  )\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Playground/index.js",
    "content": "/** @jsx jsx */\nimport { jsx } from 'theme-ui'\nimport { useState } from 'react'\nimport { useConfig } from 'docz'\nimport { LiveProvider, LiveError, LivePreview, LiveEditor } from 'react-live'\nimport { Resizable } from 're-resizable'\nimport copy from 'copy-text-to-clipboard'\n\nimport { Wrapper } from './Wrapper'\nimport { usePrismTheme } from '~utils/theme'\nimport * as styles from './styles'\nimport * as Icons from '../Icons'\n\nconst getResizableProps = (width, setWidth) => ({\n  minWidth: 260,\n  maxWidth: '100%',\n  size: {\n    width: width,\n    height: 'auto',\n  },\n  style: {\n    margin: 0,\n    marginRight: 'auto',\n  },\n  enable: {\n    top: false,\n    right: true,\n    bottom: false,\n    left: false,\n    topRight: false,\n    bottomRight: false,\n    bottomLeft: false,\n    topLeft: false,\n  },\n  onResizeStop: (e, direction, ref) => {\n    setWidth(ref.style.width)\n  },\n})\n\nconst transformCode = code => {\n  if (code.startsWith('()') || code.startsWith('class')) return code\n  return `<React.Fragment>${code}</React.Fragment>`\n}\n\nexport const Playground = ({ code, scope, language, useScoping = false }) => {\n  const {\n    themeConfig: { showPlaygroundEditor, showLiveError, showLivePreview },\n  } = useConfig()\n\n  // Makes sure scope is only given on mount to avoid infinite re-render on hot reloads\n  const [scopeOnMount] = useState(scope)\n  const theme = usePrismTheme()\n  const [showingCode, setShowingCode] = useState(showPlaygroundEditor)\n  const [width, setWidth] = useState('100%')\n  const resizableProps = getResizableProps(width, setWidth)\n\n  const copyCode = () => copy(code)\n  const toggleCode = () => setShowingCode(s => !s)\n\n  return (\n    <Resizable {...resizableProps} data-testid=\"playground\">\n      <LiveProvider\n        code={code}\n        scope={scopeOnMount}\n        transformCode={transformCode}\n        language={language}\n        theme={theme}\n      >\n        <div sx={styles.previewWrapper}>\n          <Wrapper\n            content=\"preview\"\n            useScoping={useScoping}\n            showingCode={showingCode}\n          >\n            {showLivePreview && (\n              <LivePreview sx={styles.preview} data-testid=\"live-preview\" />\n            )}\n          </Wrapper>\n          <div sx={styles.buttons}>\n            <button sx={styles.button} onClick={copyCode}>\n              <Icons.Clipboard size={12} />\n            </button>\n            <button sx={styles.button} onClick={toggleCode}>\n              <Icons.Code size={12} />\n            </button>\n          </div>\n        </div>\n        {showingCode && (\n          <Wrapper\n            content=\"editor\"\n            useScoping={useScoping}\n            showingCode={showingCode}\n          >\n            <div sx={styles.editor(theme)}>\n              <LiveEditor data-testid=\"live-editor\" />\n            </div>\n          </Wrapper>\n        )}\n        {showLiveError && (\n          <LiveError sx={styles.error} data-testid=\"live-error\" />\n        )}\n      </LiveProvider>\n    </Resizable>\n  )\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Playground/styles.js",
    "content": "import * as mixins from '~utils/mixins'\n\nexport const editor = theme => ({\n  p: 2,\n  background: theme.plain.backgroundColor,\n  borderTop: 0,\n  fontFamily: 'monospace',\n  fontSize: 18,\n  '* > textarea:focus': {\n    outline: 'none',\n  },\n  borderRadius: 'inherit',\n})\n\nexport const error = {\n  m: 0,\n  py: 2,\n  px: 3,\n  bg: '#FF4757',\n  fontSize: 1,\n  color: 'white',\n  whiteSpace: 'pre-wrap',\n}\n\nexport const previewWrapper = {\n  position: 'relative',\n}\n\nexport const wrapper = () => ({\n  height: 'auto',\n  display: 'block',\n  minHeight: '100%',\n  width: 'calc(100% - 2px)',\n  bg: 'playground.bg',\n})\n\nexport const wrapperBorder = (content, showingCode) => {\n  let borderRadius = 4\n  if (showingCode) {\n    borderRadius = content === 'preview' ? '4px 4px 0 0' : '0 0 4px 4px'\n  }\n\n  return {\n    border: t => `1px solid ${t.colors.playground.border}`,\n    borderTop: content === 'editor' ? 0 : undefined,\n    borderRadius,\n  }\n}\n\nexport const preview = {\n  margin: 0,\n  padding: '20px',\n}\n\nexport const buttons = {\n  zIndex: 9,\n  display: 'flex',\n  position: 'absolute',\n  bottom: -20,\n  right: 4,\n}\n\nexport const button = {\n  ...mixins.ghostButton,\n  display: 'flex',\n  alignItems: 'center',\n  py: 1,\n  p: 2,\n  bg: 'border',\n  color: 'muted',\n  borderRadius: '0 0 3px 3px',\n  '& ~ &': {\n    ml: 1,\n  },\n}\n\nexport const link = {\n  py: 0,\n  ml: 1,\n  height: 22,\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Pre/index.js",
    "content": "/** @jsx jsx */\nimport { jsx } from 'theme-ui'\n\nexport const Pre = ({ children }) => <div>{children}</div>\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Pre/styles.js",
    "content": "export const wrapper = {\n  position: 'relative',\n  my: 4,\n}\n\nexport const language = {\n  py: 1,\n  px: 2,\n  position: 'absolute',\n  bottom: 0,\n  right: 0,\n  fontSize: 1,\n  color: 'muted',\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Props/index.js",
    "content": "/** @jsx jsx */\nimport { useState } from 'react'\nimport { jsx } from 'theme-ui'\n\nimport { ChevronDown, ChevronUp } from '../Icons'\nimport * as styles from './styles'\n\nexport const getDefaultValue = ({ defaultValue, type, flowType }) => {\n  const propType = flowType ? flowType : type\n  if (!defaultValue || !defaultValue.value) return null\n  if (defaultValue.value === \"''\") {\n    return '[Empty string]'\n  }\n  if (propType && propType.name === 'string') {\n    return defaultValue.value.replace(/\\'/g, '\"')\n  }\n  if (typeof defaultValue.value === 'object' && defaultValue.value.toString) {\n    return defaultValue.value.toString()\n  }\n  return defaultValue.value\n}\n\nexport const Prop = ({ propName, prop, getPropType, isToggle }) => {\n  const [showing, setShowing] = useState(isToggle || false)\n  if (!prop.type && !prop.flowType) return null\n\n  const toggle = () => setShowing(s => !s)\n  return (\n    <div sx={styles.line} data-testid=\"prop\">\n      <div sx={styles.content}>\n        <div sx={styles.propName} data-testid=\"prop-name\">\n          {propName}\n        </div>\n        <div sx={styles.propType} data-testid=\"prop-type\">\n          {getPropType(prop)}\n        </div>\n        {prop.defaultValue && (\n          <div sx={styles.defaultValue} data-testid=\"prop-default-value\">\n            <em>{getDefaultValue(prop)}</em>\n          </div>\n        )}\n        <div sx={styles.right}>\n          {prop.required && (\n            <div sx={styles.propRequired} data-testid=\"prop-required\">\n              <strong>required</strong>\n            </div>\n          )}\n          {prop.description && (\n            <button\n              sx={styles.openDescBtn}\n              onClick={toggle}\n              data-testid=\"prop-toggle-description\"\n            >\n              {showing ? <ChevronUp size={20} /> : <ChevronDown size={20} />}\n            </button>\n          )}\n        </div>\n      </div>\n      {showing && prop.description && (\n        <div sx={styles.description} data-testid=\"prop-description\">\n          {prop.description}\n        </div>\n      )}\n    </div>\n  )\n}\n\nexport const Props = ({ props, getPropType, isToggle }) => {\n  const entries = Object.entries(props)\n\n  return (\n    <div sx={styles.container} data-testid=\"props\">\n      {entries.map(([key, prop]) => (\n        <Prop\n          key={key}\n          propName={key}\n          prop={prop}\n          getPropType={getPropType}\n          isToggle={isToggle}\n        />\n      ))}\n    </div>\n  )\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Props/styles.js",
    "content": "import { breakpoints } from '~theme/breakpoints'\nimport * as mixins from '~utils/mixins'\n\nexport const container = {\n  mt: 3,\n  mb: 4,\n  border: t => `1px solid ${t.colors.border}`,\n  borderRadius: 'radius',\n  overflow: 'hidden',\n  bg: 'props.bg',\n  color: 'props.text',\n  fontSize: 3,\n}\n\nexport const content = {\n  position: 'relative',\n  display: 'flex',\n  flexDirection: 'column',\n  [`@media (min-width: ${breakpoints.tablet}px)`]: {\n    flexWrap: 'nowrap',\n    flexDirection: 'row',\n  },\n}\n\nexport const line = {\n  pt: 2,\n  '& + &': {\n    borderTop: t => `1px solid ${t.colors.border}`,\n  },\n}\n\nconst column = {\n  minWidth: 0,\n  pb: 2,\n  px: 3,\n  '& ~ &': {\n    bg: 'red',\n  },\n}\n\nexport const propName = {\n  ...column,\n  color: 'props.highlight',\n}\n\nexport const propType = {\n  ...column,\n  color: 'props.text',\n}\n\nexport const defaultValue = {\n  ...column,\n  color: 'props.defaultValue',\n}\n\nexport const right = {\n  display: 'flex',\n  alignItems: 'center',\n  justifyContent: 'flex-end',\n  px: 3,\n  flex: 1,\n  [`@media (max-width: ${breakpoints.tablet}px)`]: {\n    position: 'absolute',\n    top: 0,\n    right: 0,\n  },\n}\n\nexport const propRequired = {\n  color: 'props.text',\n  fontSize: 1,\n  opacity: 0.5,\n}\n\nexport const openDescBtn = {\n  ...mixins.ghostButton,\n  mt: 0,\n  ml: 3,\n  color: 'props.defaultValue',\n}\n\nexport const description = {\n  fontSize: 2,\n  m: 0,\n  py: 2,\n  px: 3,\n  borderTop: t => `1px solid ${t.colors.border}`,\n  color: 'props.descriptionText',\n  bg: 'props.descriptionBg',\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Sidebar/index.js",
    "content": "/** @jsx jsx */\nimport { Fragment, forwardRef, useState, useRef, useEffect } from 'react'\nimport { Global } from '@emotion/react'\nimport { jsx, Box } from 'theme-ui'\nimport { useMenus, useCurrentDoc } from 'docz'\n\nimport * as styles from './styles'\nimport { NavSearch } from '../NavSearch'\nimport { NavLink } from '../NavLink'\nimport { NavGroup } from '../NavGroup'\n\nexport const Sidebar = forwardRef(function Sidebar(props, ref) {\n  const [query, setQuery] = useState('')\n  const menus = useMenus({ query })\n  const currentDoc = useCurrentDoc()\n  const currentDocRef = useRef()\n  const handleChange = ev => {\n    setQuery(ev.target.value)\n  }\n  useEffect(() => {\n    if (ref.current && currentDocRef.current) {\n      ref.current.scrollTo(0, currentDocRef.current.offsetTop)\n    }\n  }, [])\n  return (\n    <Fragment>\n      <Box onClick={props.onClick} sx={styles.overlay(props)}>\n        {props.open && <Global styles={styles.global} />}\n      </Box>\n      <Box ref={ref} sx={styles.wrapper(props)} data-testid=\"sidebar\">\n        <NavSearch\n          placeholder=\"Type to search...\"\n          value={query}\n          onChange={handleChange}\n        />\n        {menus &&\n          menus.map(menu => {\n            if (!menu.route)\n              return <NavGroup key={menu.id} item={menu} sidebarRef={ref} />\n            if (menu.route === currentDoc.route) {\n              return (\n                <NavLink key={menu.id} item={menu} ref={currentDocRef}>\n                  {menu.name}\n                </NavLink>\n              )\n            }\n            return (\n              <NavLink key={menu.id} item={menu}>\n                {menu.name}\n              </NavLink>\n            )\n          })}\n      </Box>\n    </Fragment>\n  )\n})\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/Sidebar/styles.js",
    "content": "import { media } from '~theme/breakpoints'\n\nexport const global = {\n  body: {\n    overflow: 'hidden',\n  },\n}\n\nconst HEADER_HEIGHT = 81\n\nexport const overlay = ({ open }) => ({\n  zIndex: 999,\n  position: 'fixed',\n  top: HEADER_HEIGHT,\n  right: 0,\n  bottom: 0,\n  left: 0,\n  background: 'rgba(0,0,0,0.6)',\n  transition: 'all .2s ease-out',\n  visibility: open ? 'visible' : 'hidden',\n  opacity: open ? 1 : 0,\n})\n\nexport const wrapper = ({ open }) => ({\n  py: 4,\n  px: 4,\n  flexDirection: 'column',\n  position: 'sticky',\n  top: 0,\n  zIndex: 1,\n  minWidth: 0,\n  maxHeight: '100vh',\n  borderRight: t => `1px solid ${t.colors.border}`,\n  overflow: 'auto',\n  WebkitOverflowScrolling: 'touch',\n  bg: 'sidebar.bg',\n\n  [media.tablet]: {\n    zIndex: 9999,\n    display: 'block',\n    position: 'fixed',\n    top: HEADER_HEIGHT,\n    left: 0,\n    bottom: 0,\n    width: 256,\n    px: 4,\n    bg: 'background',\n    transition: 'transform .2s ease-out',\n    transform: open ? 'translateX(0)' : 'translateX(-100%)',\n  },\n})\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/components/index.js",
    "content": "import * as headings from './Headings'\n\nimport { Code } from './Code'\nimport { Layout } from './Layout'\nimport { Playground } from './Playground'\nimport { Pre } from './Pre'\nimport { Props } from './Props'\n\nexport default {\n  ...headings,\n  code: Code,\n  playground: Playground,\n  pre: Pre,\n  layout: Layout,\n  props: Props,\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/hooks/useDbQuery.js",
    "content": "import { useStaticQuery, graphql } from 'gatsby'\n\nexport const useDbQuery = () => {\n  try {\n    const data = useStaticQuery(graphql`\n      query {\n        doczDb {\n          id\n          db\n        }\n      }\n    `)\n\n    return JSON.parse(data.doczDb.db)\n  } catch (err) {\n    console.error(err)\n    console.error('Error when parsing docz database')\n    return {}\n  }\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/index.css",
    "content": "@import url('https://fonts.googleapis.com/css?family=Inconsolata&display=swap');\n@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap');\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/index.js",
    "content": "/** @jsx jsx */\nimport { jsx } from 'theme-ui'\nimport { theme, useConfig, ComponentsProvider } from 'docz'\nimport { Styled, ThemeProvider } from 'theme-ui'\n\nimport defaultTheme from '~theme'\nimport components from '~components'\n\nconst Theme = ({ children }) => {\n  const config = useConfig()\n  return (\n    <ThemeProvider theme={config.themeConfig}>\n      <ComponentsProvider components={components}>\n        <Styled.root>{children}</Styled.root>\n      </ComponentsProvider>\n    </ThemeProvider>\n  )\n}\n\nexport default theme(defaultTheme)(Theme)\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/theme/breakpoints.js",
    "content": "const em = px => `${px / 16}em`\nconst mountMedia = val => `@media screen and (max-width: ${em(val)})`\n\nexport const breakpoints = {\n  mobile: 630,\n  tablet: 920,\n  desktop: 1120,\n}\n\nexport const media = {\n  mobile: mountMedia(breakpoints.mobile),\n  tablet: mountMedia(breakpoints.tablet),\n  desktop: mountMedia(breakpoints.desktop),\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/theme/colors.js",
    "content": "export const white = '#FFFFFF'\nexport const grayUltraLight = '#FCFBFA'\nexport const grayExtraLight = '#F5F6F7'\nexport const grayLight = '#CED4DE'\nexport const gray = '#67788a'\nexport const grayDark = '#2D3747'\nexport const grayExtraDark = '#1D2330'\nexport const dark = '#13161F'\nexport const blueLight = '#e9f2fa'\nexport const blue = '#0B5FFF'\nexport const skyBlue = '#1FB6FF'\nexport const negative = '#EB4D4B'\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/theme/global.js",
    "content": "export default {\n  body: {\n    margin: 0,\n    padding: 0,\n  },\n  '.icon-link': {\n    display: 'none',\n  },\n  '.with-overlay': {\n    overflow: 'hidden',\n  },\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/theme/index.js",
    "content": "import moraga from 'typography-theme-moraga'\nimport { toTheme } from '@theme-ui/typography'\nimport { merge } from 'lodash/fp'\n\nimport * as modes from './modes'\nimport prism from './prism'\nimport styles from './styles'\n\nmoraga.headerWeight = 700\nconst typography = toTheme(moraga)\n\nexport default merge(typography, {\n  initialColorMode: 'light',\n  // Show errors above playground editor\n  showLiveError: true,\n  // Show preview of the code inside playground\n  showLivePreview: true,\n  // Show editor when a playground is rendered\n  showPlaygroundEditor: true,\n  // Show dark/light mode switch toggle in header\n  showDarkModeSwitch: true,\n  // Display edit this page button on every page\n  showMarkdownEditButton: true,\n  // Wrap the playground editor and preview in iframes to avoid style/script collisions\n  useScopingInPlayground: false,\n  colors: {\n    ...modes.light,\n    modes: {\n      dark: modes.dark,\n    },\n  },\n  fonts: {\n    monospace: 'Inconsolata',\n  },\n  fontSizes: [12, 14, 16, 20, 24, 32, 48, 64],\n  fontWeights: {\n    body: 400,\n    heading: 700,\n    bold: 700,\n  },\n  lineHeights: {\n    body: 1.5,\n    heading: 1.125,\n  },\n  letterSpacings: {\n    body: 'normal',\n    caps: '0.2em',\n  },\n  space: [0, 4, 8, 16, 32, 48, 64, 80, 100],\n  radii: {\n    square: 0,\n    radius: 4,\n    rounded: 10,\n  },\n  styles,\n  prism,\n})\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/theme/modes.js",
    "content": "import * as colors from './colors'\nimport prismDark from './prism/dark'\nimport prismLight from './prism/light'\n\nexport const light = {\n  ...colors,\n  primary: colors.blue,\n  text: colors.grayDark,\n  muted: colors.gray,\n  link: colors.blue,\n  background: colors.white,\n  border: colors.grayLight,\n  sidebar: {\n    bg: colors.white,\n    navGroup: colors.grayDark,\n    navLink: colors.grayDark,\n    navLinkActive: colors.blue,\n    tocLink: colors.gray,\n    tocLinkActive: colors.grayExtraDark,\n  },\n  header: {\n    bg: colors.grayExtraLight,\n    text: colors.grayDark,\n    border: colors.grayLight,\n    button: {\n      bg: colors.blue,\n      color: colors.white,\n    },\n  },\n  props: {\n    bg: colors.grayUltraLight,\n    text: colors.grayDark,\n    highlight: colors.blue,\n    defaultValue: colors.gray,\n    descriptionText: colors.grayDark,\n    descriptionBg: colors.white,\n  },\n  playground: {\n    bg: colors.white,\n    border: colors.grayLight,\n  },\n  blockquote: {\n    bg: colors.grayExtraLight,\n    border: colors.grayLight,\n    color: colors.gray,\n  },\n  prism: {\n    ...prismLight,\n  },\n}\n\nexport const dark = {\n  ...colors,\n  primary: colors.skyBlue,\n  text: colors.grayExtraLight,\n  muted: colors.gray,\n  link: colors.skyBlue,\n  background: colors.grayExtraDark,\n  border: colors.grayDark,\n  sidebar: {\n    bg: colors.grayExtraDark,\n    navGroup: colors.gray,\n    navLink: colors.grayLight,\n    navLinkActive: colors.skyBlue,\n    tocLink: colors.gray,\n    tocLinkActive: colors.grayLight,\n  },\n  header: {\n    bg: colors.dark,\n    text: colors.grayLight,\n    border: colors.grayDark,\n    button: {\n      bg: colors.skyBlue,\n      color: colors.white,\n    },\n  },\n  props: {\n    bg: colors.dark,\n    text: colors.gray,\n    highlight: colors.skyBlue,\n    defaultValue: colors.grayDark,\n    descriptionText: colors.gray,\n    descriptionBg: colors.grayExtraDark,\n  },\n  playground: {\n    bg: colors.dark,\n    border: colors.grayDark,\n  },\n  blockquote: {\n    bg: colors.grayDark,\n    border: colors.gray,\n    color: colors.gray,\n  },\n  prism: {\n    ...prismDark,\n  },\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/theme/prism/dark.js",
    "content": "export default {\n  plain: {\n    fontFamily: 'Inconsolata',\n    color: '#d6deeb',\n    backgroundColor: '#13161F',\n  },\n  styles: [\n    {\n      types: ['changed'],\n      style: {\n        color: 'rgb(162, 191, 252)',\n        fontStyle: 'italic',\n      },\n    },\n    {\n      types: ['deleted'],\n      style: {\n        color: 'rgba(239, 83, 80, 0.56)',\n        fontStyle: 'italic',\n      },\n    },\n    {\n      types: ['inserted', 'attr-name'],\n      style: {\n        color: 'rgb(173, 219, 103)',\n        fontStyle: 'italic',\n      },\n    },\n    {\n      types: ['comment'],\n      style: {\n        color: 'rgb(99, 119, 119)',\n        fontStyle: 'italic',\n      },\n    },\n    {\n      types: ['string', 'url'],\n      style: {\n        color: 'rgb(173, 219, 103)',\n      },\n    },\n    {\n      types: ['variable'],\n      style: {\n        color: 'rgb(214, 222, 235)',\n      },\n    },\n    {\n      types: ['number'],\n      style: {\n        color: 'rgb(247, 140, 108)',\n      },\n    },\n    {\n      types: ['builtin', 'char', 'constant', 'function'],\n      style: {\n        color: 'rgb(130, 170, 255)',\n      },\n    },\n    {\n      // This was manually added after the auto-generation\n      // so that punctuations are not italicised\n      types: ['punctuation'],\n      style: {\n        color: 'rgb(199, 146, 234)',\n      },\n    },\n    {\n      types: ['selector', 'doctype'],\n      style: {\n        color: 'rgb(199, 146, 234)',\n        fontStyle: 'italic',\n      },\n    },\n    {\n      types: ['class-name'],\n      style: {\n        color: 'rgb(255, 203, 139)',\n      },\n    },\n    {\n      types: ['tag', 'operator', 'keyword'],\n      style: {\n        color: 'rgb(127, 219, 202)',\n      },\n    },\n    {\n      types: ['boolean'],\n      style: {\n        color: 'rgb(255, 88, 116)',\n      },\n    },\n    {\n      types: ['property'],\n      style: {\n        color: 'rgb(128, 203, 196)',\n      },\n    },\n    {\n      types: ['namespace'],\n      style: {\n        color: 'rgb(178, 204, 214)',\n      },\n    },\n  ],\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/theme/prism/index.js",
    "content": "import dark from './dark'\nimport light from './light'\n\nexport default {\n  dark,\n  light,\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/theme/prism/light.js",
    "content": "export default {\n  plain: {\n    fontFamily: 'Inconsolata',\n    color: '#393A34',\n    backgroundColor: '#f6f8fa',\n  },\n  styles: [\n    {\n      types: ['comment', 'prolog', 'doctype', 'cdata'],\n      style: {\n        color: '#999988',\n        fontStyle: 'italic',\n      },\n    },\n    {\n      types: ['namespace'],\n      style: {\n        opacity: 0.7,\n      },\n    },\n    {\n      types: ['string', 'attr-value'],\n      style: {\n        color: '#e3116c',\n      },\n    },\n    {\n      types: ['punctuation', 'operator'],\n      style: {\n        color: '#393A34',\n      },\n    },\n    {\n      types: [\n        'entity',\n        'url',\n        'symbol',\n        'number',\n        'boolean',\n        'variable',\n        'constant',\n        'property',\n        'regex',\n        'inserted',\n      ],\n      style: {\n        color: '#36acaa',\n      },\n    },\n    {\n      types: ['atrule', 'keyword', 'attr-name', 'selector'],\n      style: {\n        color: '#00a4db',\n      },\n    },\n    {\n      types: ['function', 'deleted', 'tag'],\n      style: {\n        color: '#d73a49',\n      },\n    },\n    {\n      types: ['function-variable'],\n      style: {\n        color: '#6f42c1',\n      },\n    },\n    {\n      types: ['tag', 'selector', 'keyword'],\n      style: {\n        color: '#00009f',\n      },\n    },\n  ],\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/theme/styles.js",
    "content": "const styles = {\n  Container: {\n    p: 4,\n    maxWidth: 1280,\n  },\n  root: {\n    fontSize: 3,\n    color: 'text',\n    bg: 'background',\n  },\n  a: {\n    color: 'primary',\n    textDecoration: 'none',\n    '&:hover': {\n      color: 'secondary',\n      textDecoration: 'underline',\n    },\n  },\n  h1: {\n    fontSize: 6,\n  },\n  h2: {\n    fontSize: 5,\n  },\n  h3: {\n    fontSize: 4,\n  },\n  h4: {\n    fontSize: 3,\n  },\n  h5: {\n    fontSize: 2,\n  },\n  h6: {\n    fontSize: 1,\n  },\n  li: {\n    marginBottom: 1,\n  },\n  blockquote: {\n    my: 4,\n    mx: 0,\n    py: 3,\n    px: 4,\n    bg: 'blockquote.bg',\n    borderLeft: t => `5px solid ${t.colors.blockquote.border}`,\n    color: 'blockquote.color',\n    fontStyle: 'italic',\n    '> p': {\n      m: 0,\n    },\n  },\n  code: {\n    fontFamily: 'monospace',\n  },\n  inlineCode: {\n    fontFamily: 'monospace',\n  },\n  pre: {\n    my: 4,\n    p: 3,\n    variant: 'prism',\n    textAlign: 'left',\n    fontFamily: 'monospace',\n    borderRadius: 'radius',\n  },\n  table: {\n    width: '100%',\n    my: 4,\n    borderCollapse: 'separate',\n    borderSpacing: 0,\n    [['th', 'td']]: {\n      textAlign: 'left',\n      py: '4px',\n      pr: '4px',\n      pl: 0,\n      borderColor: 'muted',\n      borderBottomStyle: 'solid',\n    },\n  },\n  th: {\n    verticalAlign: 'bottom',\n    borderBottomWidth: '2px',\n  },\n  td: {\n    verticalAlign: 'top',\n    borderBottomWidth: '1px',\n  },\n  hr: {\n    border: 0,\n    borderBottom: t => `1px solid ${t.colors.border}`,\n  },\n}\n\nexport default styles\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/utils/mixins.js",
    "content": "export const centerAlign = {\n  display: 'flex',\n  alignItems: 'center',\n  justifyContent: 'center',\n}\n\nexport const ghostButton = {\n  p: 0,\n  outline: 'none',\n  background: 'transparent',\n  border: 'none',\n  ':hover': {\n    cursor: 'pointer',\n  },\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/utils/theme.js",
    "content": "import { useThemeUI } from 'theme-ui'\nimport { get, pipe, defaultTo } from 'lodash/fp'\n\nexport const themeProp = str => props => {\n  return get(`theme.${str}`, props)\n}\n\nexport const usePrismTheme = () => {\n  const { theme, colorMode } = useThemeUI()\n  const getTheme = pipe(\n    get('prismTheme'),\n    defaultTo(get(`prism.${colorMode}`, theme))\n  )\n  return getTheme(theme)\n}\n"
  },
  {
    "path": "core/gatsby-theme-docz/src/wrapper.js",
    "content": "import React from 'react'\n\nconst Wrapper = ({ children }) => <>{children}</>\nexport default Wrapper\n"
  },
  {
    "path": "core/rehype-docz/.eslintignore",
    "content": "dist\n"
  },
  {
    "path": "core/rehype-docz/.eslintrc.js",
    "content": "module.exports = {\n  extends: 'docz-ts',\n}\n"
  },
  {
    "path": "core/rehype-docz/.lintstagedrc",
    "content": "{\n  \"*.{ts,tsx}\": [\"yarn fix\", \"git add\"]\n}\n"
  },
  {
    "path": "core/rehype-docz/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.3.0](https://github.com/doczjs/docz/compare/v2.3.0-alpha.14...v2.3.0) (2020-04-02)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n# [2.3.0-alpha.2](https://github.com/doczjs/docz/compare/v2.3.0-alpha.1...v2.3.0-alpha.2) (2019-12-14)\n\n\n### Features\n\n* **rehype-docz:** add mdx exports to Playground scope ([d902e2a](https://github.com/doczjs/docz/commit/d902e2a)), closes [#1247](https://github.com/doczjs/docz/issues/1247)\n\n\n\n\n\n# [2.3.0-alpha.1](https://github.com/doczjs/docz/compare/v2.3.0-alpha.0...v2.3.0-alpha.1) (2019-12-13)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n\n### Bug Fixes\n\n* bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n* eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n* packages rollup config ([534d7bf](https://github.com/pedronauck/docz/commit/534d7bf))\n\n\n### Features\n\n* a lot of improvements ([64f75da](https://github.com/pedronauck/docz/commit/64f75da))\n* add new Playground component ([7bf03b2](https://github.com/pedronauck/docz/commit/7bf03b2))\n* some playground improvements ([afa00df](https://github.com/pedronauck/docz/commit/afa00df))\n\n\n\n\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n## [1.0.4](https://github.com/pedronauck/docz/compare/v1.0.3...v1.0.4) (2019-04-18)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n## [1.0.2](https://github.com/pedronauck/docz/compare/v1.0.1...v1.0.2) (2019-04-15)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n## [1.0.1](https://github.com/pedronauck/docz/compare/v1.0.0...v1.0.1) (2019-04-14)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n# [1.0.0](https://github.com/pedronauck/docz/compare/v1.0.0-rc.8...v1.0.0) (2019-04-11)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n# [1.0.0-rc.4](https://github.com/pedronauck/docz/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2019-03-29)\n\n\n### Bug Fixes\n\n* remove modularized lodash packages ([d81c568](https://github.com/pedronauck/docz/commit/d81c568))\n\n\n\n\n\n# [1.0.0-beta.0](https://github.com/pedronauck/docz/compare/v1.0.0-alpha.1...v1.0.0-beta.0) (2019-03-19)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n# [1.0.0-alpha.0](https://github.com/pedronauck/docz/compare/v0.13.5...v1.0.0-alpha.0) (2019-03-19)\n\n\n### Bug Fixes\n\n* **rehype-docz:** update tests ([548f940](https://github.com/pedronauck/docz/commit/548f940))\n* use custom rollup config to build instead of libundler ([ee42a5a](https://github.com/pedronauck/docz/commit/ee42a5a))\n\n\n### Features\n\n* add initial gatsby integration ([#630](https://github.com/pedronauck/docz/issues/630)) ([70d40cc](https://github.com/pedronauck/docz/commit/70d40cc)), closes [#609](https://github.com/pedronauck/docz/issues/609)\n\n\n\n\n\n## [0.13.6](https://github.com/pedronauck/docz/compare/v0.13.5...v0.13.6) (2018-12-26)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n## [0.13.5](https://github.com/pedronauck/docz/compare/v0.13.4...v0.13.5) (2018-12-19)\n\n\n### Bug Fixes\n\n* **docz-utils:** escape code for playground ([3fc4187](https://github.com/pedronauck/docz/commit/3fc4187))\n\n\n\n\n\n## [0.13.3](https://github.com/pedronauck/docz/compare/v0.13.2...v0.13.3) (2018-12-17)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n# [0.13.0](https://github.com/pedronauck/docz/compare/v0.12.17...v0.13.0) (2018-12-17)\n\n\n### Bug Fixes\n\n* **docz-core:** use webpack-dev-server instead of webpack-serve ([4157e05](https://github.com/pedronauck/docz/commit/4157e05))\n\n\n\n\n\n## [0.12.16](https://github.com/pedronauck/docz/compare/v0.12.15...v0.12.16) (2018-12-13)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n## [0.12.15](https://github.com/pedronauck/docz/compare/v0.12.14...v0.12.15) (2018-12-04)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n## [0.12.14](https://github.com/pedronauck/docz/compare/v0.12.13...v0.12.14) (2018-12-04)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n## [0.12.13](https://github.com/pedronauck/docz/compare/v0.12.12...v0.12.13) (2018-11-23)\n\n\n### Bug Fixes\n\n* **rehype-docz:** scope for playground ([677a785](https://github.com/pedronauck/docz/commit/677a785))\n\n\n\n\n\n## [0.12.12](https://github.com/pedronauck/docz/compare/v0.12.11...v0.12.12) (2018-11-16)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n## [0.12.10](https://github.com/pedronauck/docz/compare/v0.12.9...v0.12.10) (2018-11-15)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n## [0.12.9](https://github.com/pedronauck/docz/compare/v0.12.8...v0.12.9) (2018-11-01)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n## [0.12.8](https://github.com/pedronauck/docz/compare/v0.12.7...v0.12.8) (2018-10-31)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n## [0.12.6](https://github.com/pedronauck/docz/compare/v0.12.5...v0.12.6) (2018-10-30)\n\n\n### Features\n\n* add support to disable codesandbox ([be94b0e](https://github.com/pedronauck/docz/commit/be94b0e))\n\n\n\n\n\n<a name=\"0.11.0\"></a>\n# [0.11.0](https://github.com/pedronauck/docz/compare/v0.10.3...v0.11.0) (2018-09-02)\n\n**Note:** Version bump only for package rehype-docz\n\n\n\n\n\n<a name=\"0.10.3\"></a>\n## [0.10.3](https://github.com/pedronauck/docz/compare/v0.9.6...v0.10.3) (2018-08-16)\n\n\n**Note:** Version bump only for package rehype-docz\n\n<a name=\"0.10.0\"></a>\n# [0.10.0](https://github.com/pedronauck/docz/compare/v0.9.6...v0.10.0) (2018-08-13)\n\n\n### Bug Fixes\n\n* **rehype-docz:** add props on playground scope ([ee4b6c0](https://github.com/pedronauck/docz/commit/ee4b6c0))\n* **rehype-docz:** allow ticks and backticks inside playground ([#203](https://github.com/pedronauck/docz/issues/203)) ([fa4ff40](https://github.com/pedronauck/docz/commit/fa4ff40))\n\n\n### Features\n\n* allow edit code inside playground ([#205](https://github.com/pedronauck/docz/issues/205)) ([4f948f7](https://github.com/pedronauck/docz/commit/4f948f7))\n\n\n\n\n<a name=\"0.9.4\"></a>\n## [0.9.4](https://github.com/pedronauck/docz/compare/v0.9.4-beta.1...v0.9.4) (2018-08-04)\n\n\n\n\n**Note:** Version bump only for package rehype-docz\n\n<a name=\"0.9.4-beta.1\"></a>\n## [0.9.4-beta.1](https://github.com/pedronauck/docz/compare/v0.9.4-beta.0...v0.9.4-beta.1) (2018-08-04)\n\n\n\n\n**Note:** Version bump only for package rehype-docz\n\n<a name=\"0.9.0\"></a>\n# [0.9.0](https://github.com/pedronauck/docz/compare/v0.9.0-beta.1...v0.9.0) (2018-08-02)\n\n\n\n\n**Note:** Version bump only for package rehype-docz\n\n<a name=\"0.9.0-beta.0\"></a>\n# [0.9.0-beta.0](https://github.com/pedronauck/docz/compare/v0.8.0...v0.9.0-beta.0) (2018-08-01)\n\n\n\n\n**Note:** Version bump only for package rehype-docz\n\n<a name=\"0.8.0\"></a>\n# [0.8.0](https://github.com/pedronauck/docz/compare/v0.7.1...v0.8.0) (2018-07-28)\n\n\n\n\n**Note:** Version bump only for package rehype-docz\n\n<a name=\"0.7.0\"></a>\n# [0.7.0](https://github.com/pedronauck/docz/compare/v0.6.2...v0.7.0) (2018-07-23)\n\n\n### Features\n\n* **docz:** add rawCode for Playground ([70d4735](https://github.com/pedronauck/docz/commit/70d4735))\n* **docz-theme-default:** add resize bar for fullscreen playground ([392009f](https://github.com/pedronauck/docz/commit/392009f))\n"
  },
  {
    "path": "core/rehype-docz/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) 2018 Pedro Nauck\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": "core/rehype-docz/README.md",
    "content": "## rehype-docz\n\nThis is an internal docz package containing the [rehype](https://github.com/rehypejs/rehype) plugin used by docz.\n\nUnless you're looking to contribute to docz, you probably don't care about this package and are looking for [the docz package documentation](https://github.com/doczjs/docz).\n"
  },
  {
    "path": "core/rehype-docz/jest.config.js",
    "content": "module.exports = {\n  preset: 'ts-jest',\n  testEnvironment: 'node',\n  testMatch: ['**/?(*.)+(spec|test).ts?(x)'],\n}\n"
  },
  {
    "path": "core/rehype-docz/package.json",
    "content": "{\n  \"name\": \"rehype-docz\",\n  \"version\": \"2.4.0\",\n  \"description\": \"Rehype plugin used by docz\",\n  \"license\": \"MIT\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.esm.js\",\n  \"typings\": \"dist/index.d.ts\",\n  \"files\": [\n    \"dist/\",\n    \"package.json\",\n    \"README.md\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"core/rehype-docz\"\n  },\n  \"scripts\": {\n    \"dev\": \"cross-env NODE_ENV=development yarn build -w\",\n    \"build\": \"cross-env NODE_ENV=production rollup -c\",\n    \"fix\": \"yarn lint --fix\",\n    \"lint\": \"eslint . --ext mdx,ts,tsx\",\n    \"precommit\": \"lint-staged\",\n    \"test\": \"jest\"\n  },\n  \"dependencies\": {\n    \"brace\": \"^0.11.1\",\n    \"docz-utils\": \"^2.4.0\",\n    \"hast-util-to-string\": \"^1.0.2\",\n    \"jsx-ast-utils\": \"^2.2.1\",\n    \"lodash\": \"^4.17.14\",\n    \"react-ace\": \"^7.0.2\",\n    \"unist-util-is\": \"^3.0.0\"\n  }\n}\n"
  },
  {
    "path": "core/rehype-docz/rollup.config.js",
    "content": "import { config } from 'docz-rollup'\n\nexport default config({\n  input: './src/index.ts',\n})\n"
  },
  {
    "path": "core/rehype-docz/src/__snapshots__/index.test.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`adding custom props on <Playground> 1`] = `\n\"/* @jsx mdx */\nimport { Playground } from 'docz'\n\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n  console.warn(\\\\\"Component \\\\\" + name + \\\\\" was not imported, exported, or provided by MDXProvider as global scope\\\\\")\n  return <div {...props}/>\n};\n\nconst layoutProps = {\n  \n};\nconst MDXLayout = \\\\\"wrapper\\\\\"\nexport default function MDXContent({\n  components,\n  ...props\n}) {\n  return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\\\\\"MDXLayout\\\\\">\n\n    <Playground __position={0} __code={'() => {\\\\\\\\n  const foo = \\\\\\\\'foo\\\\\\\\'\\\\\\\\n  return <div>{foo}</div>\\\\\\\\n}'} __scope={{\n      props,\n      Playground\n    }} mdxType=\\\\\"Playground\\\\\">\n  {() => {\n        const foo = 'foo';\n        return <div>{foo}</div>;\n      }}\n    </Playground>\n    </MDXLayout>;\n}\n\n;\nMDXContent.isMDXComponent = true;\"\n`;\n\nexports[`adding custom props on <Playground> 2`] = `\n\"/* @jsx mdx */\nimport { Playground } from 'docz'\n\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n  console.warn(\\\\\"Component \\\\\" + name + \\\\\" was not imported, exported, or provided by MDXProvider as global scope\\\\\")\n  return <div {...props}/>\n};\n\nconst layoutProps = {\n  \n};\nconst MDXLayout = \\\\\"wrapper\\\\\"\nexport default function MDXContent({\n  components,\n  ...props\n}) {\n  return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\\\\\"MDXLayout\\\\\">\n\n    <Playground __position={0} __code={'() => {\\\\\\\\n  const foo = \\\\\\\\'foo\\\\\\\\'\\\\\\\\n  return <div>{foo}</div>\\\\\\\\n}'} __scope={{\n      props,\n      Playground\n    }} mdxType=\\\\\"Playground\\\\\">\n  {() => {\n        const foo = 'foo';\n        return <div>{foo}</div>;\n      }}\n    </Playground>\n    </MDXLayout>;\n}\n\n;\nMDXContent.isMDXComponent = true;\"\n`;\n"
  },
  {
    "path": "core/rehype-docz/src/index.test.ts",
    "content": "import mdx from '@mdx-js/mdx'\nimport remarkDocz from 'remark-docz'\nimport plugin from './'\n\nconst content = `\nimport { Playground } from 'docz'\n\n<Playground>\n  {() => {\n    const foo = 'foo'\n\n    return (\n      <div>{foo}</div>\n    )\n  }}\n</Playground>\n`\n\ntest('adding custom props on <Playground>', async () => {\n  const result = await mdx(content, {\n    remarkPlugins: [remarkDocz],\n    rehypePlugins: [[plugin, { root: __dirname }]],\n  })\n\n  expect(result).toMatch('__position={0}')\n  expect(result).toMatchSnapshot()\n  expect(result).toMatchSnapshot()\n})\n"
  },
  {
    "path": "core/rehype-docz/src/index.ts",
    "content": "import flatten from 'lodash/flatten'\nimport nodeToString from 'hast-util-to-string'\nimport { format } from 'docz-utils/lib/format'\nimport { componentName, sanitizeCode, removeTags } from 'docz-utils/lib/jsx'\nimport { getImportsVariables } from 'docz-utils/lib/imports'\nimport { getExportsVariables } from 'docz-utils/lib/exports'\n\nconst isPlayground = (name: string) => {\n  return name === 'Playground'\n}\n\nconst addComponentsProps = (scopes: string[]) => async (\n  node: any,\n  idx: number\n) => {\n  const name = componentName(node.value)\n  const tagOpen = new RegExp(`^\\\\<${name}`)\n\n  if (isPlayground(name)) {\n    const formatted = await format(nodeToString(node))\n    const code = formatted.slice(1, Infinity)\n    const scope = `{props,${scopes.join(',')}}`\n    const child = sanitizeCode(removeTags(code))\n\n    node.value = node.value.replace(\n      tagOpen,\n      `<${name} __position={${idx}} __code={'${child}'} __scope={${scope}}`\n    )\n  }\n}\n\nexport interface PluginOpts {\n  root: string\n}\n\nexport default () => (tree: any) => {\n  const importNodes = tree.children.filter((n: any) => n.type === 'import')\n  const exportNodes = tree.children.filter((n: any) => n.type === 'export')\n  const importedScopes = flatten<string>(importNodes.map(getImportsVariables))\n  const exportedScopes = flatten<string>(exportNodes.map(getExportsVariables))\n  // filter added to avoid throwing if an unexpected type is exported\n  const scopes: string[] = [...importedScopes, ...exportedScopes].filter(\n    Boolean\n  )\n  const nodes = tree.children\n    .filter((node: any) => node.type === 'jsx')\n    .map(addComponentsProps(scopes))\n\n  return Promise.all(nodes).then(() => tree)\n}\n"
  },
  {
    "path": "core/rehype-docz/src/types.d.ts",
    "content": "declare module 'hast-util-to-string'\ndeclare module '@mdx-js/mdx'\n"
  },
  {
    "path": "core/rehype-docz/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"module\": \"esnext\",\n    \"outDir\": \"dist\",\n    \"rootDir\": \"src\",\n    \"declaration\": true,\n    \"types\": [\"node\", \"jest\"],\n    \"typeRoots\": [\"../../node_modules/@types\", \"node_modules/@types\"]\n  },\n  \"include\": [\"src/**/*\", \"src/types.d.ts\"],\n  \"exclude\": [\"node_modules/**\"]\n}\n"
  },
  {
    "path": "core/remark-docz/.eslintignore",
    "content": "dist\n"
  },
  {
    "path": "core/remark-docz/.eslintrc.js",
    "content": "module.exports = {\n  extends: 'docz-ts',\n}\n"
  },
  {
    "path": "core/remark-docz/.lintstagedrc",
    "content": "{\n  \"*.{ts,tsx}\": [\"yarn fix\", \"git add\"]\n}\n"
  },
  {
    "path": "core/remark-docz/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n**Note:** Version bump only for package remark-docz\n\n\n\n\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n\n### Bug Fixes\n\n* bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n* **remark-docz:** fix alias in the src of a mdx's image [#897](https://github.com/pedronauck/docz/issues/897) ([058732d](https://github.com/pedronauck/docz/commit/058732d))\n* eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n* packages rollup config ([534d7bf](https://github.com/pedronauck/docz/commit/534d7bf))\n\n\n\n\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n\n### Features\n\n* resolve markdown images ([#851](https://github.com/pedronauck/docz/issues/851)) ([0fb41c8](https://github.com/pedronauck/docz/commit/0fb41c8))\n\n\n\n\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n**Note:** Version bump only for package remark-docz\n\n\n\n\n\n## [1.0.4](https://github.com/pedronauck/docz/compare/v1.0.3...v1.0.4) (2019-04-18)\n\n**Note:** Version bump only for package remark-docz\n\n\n\n\n\n## [1.0.2](https://github.com/pedronauck/docz/compare/v1.0.1...v1.0.2) (2019-04-15)\n\n**Note:** Version bump only for package remark-docz\n\n\n\n\n\n## [1.0.1](https://github.com/pedronauck/docz/compare/v1.0.0...v1.0.1) (2019-04-14)\n\n**Note:** Version bump only for package remark-docz\n\n\n\n\n\n# [1.0.0](https://github.com/pedronauck/docz/compare/v1.0.0-rc.8...v1.0.0) (2019-04-11)\n\n**Note:** Version bump only for package remark-docz\n\n\n\n\n\n# [1.0.0-alpha.0](https://github.com/pedronauck/docz/compare/v0.13.5...v1.0.0-alpha.0) (2019-03-19)\n\n\n### Bug Fixes\n\n* **remark-docz:** visit correct nodes ([d5e243d](https://github.com/pedronauck/docz/commit/d5e243d))\n* use custom rollup config to build instead of libundler ([ee42a5a](https://github.com/pedronauck/docz/commit/ee42a5a))\n\n\n### Features\n\n* add initial gatsby integration ([#630](https://github.com/pedronauck/docz/issues/630)) ([70d40cc](https://github.com/pedronauck/docz/commit/70d40cc)), closes [#609](https://github.com/pedronauck/docz/issues/609)\n\n\n\n\n\n## [0.13.3](https://github.com/pedronauck/docz/compare/v0.13.2...v0.13.3) (2018-12-17)\n\n**Note:** Version bump only for package remark-docz\n\n\n\n\n\n# [0.13.0](https://github.com/pedronauck/docz/compare/v0.12.17...v0.13.0) (2018-12-17)\n\n\n### Bug Fixes\n\n* **docz-core:** use webpack-dev-server instead of webpack-serve ([4157e05](https://github.com/pedronauck/docz/commit/4157e05))\n\n\n\n\n\n## [0.12.15](https://github.com/pedronauck/docz/compare/v0.12.14...v0.12.15) (2018-12-04)\n\n**Note:** Version bump only for package remark-docz\n\n\n\n\n\n## [0.12.14](https://github.com/pedronauck/docz/compare/v0.12.13...v0.12.14) (2018-12-04)\n\n\n### Bug Fixes\n\n* some typings warnings ([4afb87b](https://github.com/pedronauck/docz/commit/4afb87b))\n\n\n\n\n\n<a name=\"0.11.0\"></a>\n# [0.11.0](https://github.com/pedronauck/docz/compare/v0.10.3...v0.11.0) (2018-09-02)\n\n**Note:** Version bump only for package remark-docz\n\n\n\n\n\n<a name=\"0.9.4\"></a>\n## [0.9.4](https://github.com/pedronauck/docz/compare/v0.9.4-beta.1...v0.9.4) (2018-08-04)\n\n\n\n\n**Note:** Version bump only for package remark-docz\n\n<a name=\"0.9.4-beta.1\"></a>\n## [0.9.4-beta.1](https://github.com/pedronauck/docz/compare/v0.9.4-beta.0...v0.9.4-beta.1) (2018-08-04)\n\n\n\n\n**Note:** Version bump only for package remark-docz\n\n<a name=\"0.9.0\"></a>\n# [0.9.0](https://github.com/pedronauck/docz/compare/v0.9.0-beta.1...v0.9.0) (2018-08-02)\n\n\n\n\n**Note:** Version bump only for package remark-docz\n\n<a name=\"0.9.0-beta.0\"></a>\n# [0.9.0-beta.0](https://github.com/pedronauck/docz/compare/v0.8.0...v0.9.0-beta.0) (2018-08-01)\n\n\n\n\n**Note:** Version bump only for package remark-docz\n\n<a name=\"0.7.0\"></a>\n# [0.7.0](https://github.com/pedronauck/docz/compare/v0.6.2...v0.7.0) (2018-07-23)\n\n\n\n\n**Note:** Version bump only for package remark-docz\n"
  },
  {
    "path": "core/remark-docz/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) 2018 Pedro Nauck\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": "core/remark-docz/README.md",
    "content": "## remark-docz\n\nThis is an internal docz package containing the [remark](https://github.com/remarkjs/remark) plugin used by docz.\n\nUnless you're looking to contribute to docz, you probably don't care about this package and are looking for [the docz package documentation](https://github.com/doczjs/docz).\n"
  },
  {
    "path": "core/remark-docz/jest.config.js",
    "content": "module.exports = {\n  preset: 'ts-jest',\n  testEnvironment: 'node',\n  testMatch: ['**/?(*.)+(spec|test).ts?(x)'],\n}\n"
  },
  {
    "path": "core/remark-docz/package.json",
    "content": "{\n  \"name\": \"remark-docz\",\n  \"version\": \"2.4.0\",\n  \"description\": \"Remark plugin used by docz\",\n  \"license\": \"MIT\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.esm.js\",\n  \"typings\": \"dist/index.d.ts\",\n  \"files\": [\n    \"dist/\",\n    \"package.json\",\n    \"README.md\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"core/remark-docz\"\n  },\n  \"scripts\": {\n    \"dev\": \"cross-env NODE_ENV=development yarn build -w\",\n    \"build\": \"cross-env NODE_ENV=production rollup -c\",\n    \"fix\": \"yarn lint --fix\",\n    \"lint\": \"eslint . --ext mdx,ts,tsx\",\n    \"precommit\": \"lint-staged\",\n    \"test\": \"jest\"\n  },\n  \"dependencies\": {\n    \"@babel/generator\": \"^7.5.5\",\n    \"@babel/types\": \"^7.5.5\",\n    \"unist-util-remove\": \"^1.0.3\",\n    \"unist-util-visit\": \"^1.4.1\"\n  }\n}\n"
  },
  {
    "path": "core/remark-docz/rollup.config.js",
    "content": "import { config } from 'docz-rollup'\n\nexport default config({\n  input: './src/index.ts',\n})\n"
  },
  {
    "path": "core/remark-docz/src/__snapshots__/index.test.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`rendering children as function 1`] = `\n\"/* @jsx mdx */\nimport { Playground } from 'docz'\n\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n  console.warn(\\\\\"Component \\\\\" + name + \\\\\" was not imported, exported, or provided by MDXProvider as global scope\\\\\")\n  return <div {...props}/>\n};\n\nconst layoutProps = {\n  \n};\nconst MDXLayout = \\\\\"wrapper\\\\\"\nexport default function MDXContent({\n  components,\n  ...props\n}) {\n  return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\\\\\"MDXLayout\\\\\">\n\n    <Playground mdxType=\\\\\"Playground\\\\\">\n  {() => {\n        const foo = 'foo';\n        return <div>{foo}</div>;\n      }}\n    </Playground>\n    </MDXLayout>;\n}\n\n;\nMDXContent.isMDXComponent = true;\"\n`;\n"
  },
  {
    "path": "core/remark-docz/src/index.test.ts",
    "content": "import mdx from '@mdx-js/mdx'\nimport plugin from './'\n\nconst content = `\nimport { Playground } from 'docz'\n\n<Playground>\n  {() => {\n    const foo = 'foo'\n\n    return (\n      <div>{foo}</div>\n    )\n  }}\n</Playground>\n`\n\ntest('rendering children as function', async () => {\n  const result = await mdx(content, { remarkPlugins: [plugin] })\n  expect(result).toMatchSnapshot()\n})\n"
  },
  {
    "path": "core/remark-docz/src/index.ts",
    "content": "import * as url from 'url'\n\nimport generate from '@babel/generator'\nimport t from '@babel/types'\nimport visit from 'unist-util-visit'\nimport remove from 'unist-util-remove'\n\n// TODO: create types\n\n// match component name by regexp\nconst componentName = (value: any) => {\n  const match = value.match(/^\\<\\\\?(\\w+)/)\n  return match && match[1]\n}\n\n// iterate in a reverse way to merge values then delete the unused node\nconst valuesFromNodes = (tree: any) => (first: number, last: number) => {\n  const values = []\n\n  if (first !== last) {\n    for (let i = last; i >= first; i--) {\n      const found = tree.children[i]\n\n      if (found.children && found.children.length > 0) {\n        values.push(...found.children.map((child: any) => child.value))\n      }\n\n      if (found.value && found.value.length > 0) {\n        values.push(found.value)\n      }\n\n      if (i !== first) remove(tree, found)\n    }\n  }\n\n  return values\n}\n\nconst mergeNodeWithoutCloseTag = (tree: any, node: any, idx: any) => {\n  if (!node.value || typeof node.value !== 'string') return\n\n  // parse component name and create two regexp to check open and close tag\n  const component = componentName(node.value)\n  const tagOpen = new RegExp(`^\\\\<${component}`)\n  const tagClose = new RegExp(`\\\\<\\\\/${component}\\\\>$`)\n\n  const hasOpenTag = (val: any) => tagOpen.test(val)\n  const hasCloseTag = (val: any) => tagClose.test(val)\n  const hasJustCloseTag = (val: any) =>\n    val && !hasOpenTag(val) && hasCloseTag(val)\n\n  // return default value is has open and close tag\n  if (!component || (hasOpenTag(node.value) && hasCloseTag(node.value))) {\n    return\n  }\n\n  // when some node has just the open tag\n  // find node index with equivalent close tag\n  const tagCloseIdx = tree.children.findIndex(({ value, children }: any) => {\n    if (children) return children.some((c: any) => hasJustCloseTag(c.value))\n    return hasJustCloseTag(value)\n  })\n\n  if (tagCloseIdx > -1 && tagCloseIdx !== idx) {\n    // merge all values from node open tag until node with the close tag\n    const mergeUntilCloseTag = valuesFromNodes(tree)\n    const values = mergeUntilCloseTag(idx, tagCloseIdx)\n    node.value = values.reverse().join('\\n')\n  }\n}\n\nconst createImgSrc = (src: string) => {\n  const parsed = url.parse(src)\n\n  if (parsed.protocol) {\n    return t.stringLiteral(src)\n  }\n\n  let { pathname } = parsed as { pathname: string }\n  if (!/^(?:\\.[./]+|@)/.test(pathname)) {\n    pathname = `./${pathname}`\n  }\n  return t.jsxExpressionContainer(\n    t.callExpression(t.identifier('require'), [t.stringLiteral(pathname)])\n  )\n}\n\nconst imageToJsx = (node: any): string =>\n  generate(\n    t.jsxOpeningElement(\n      t.jsxIdentifier('img'),\n      [\n        t.jsxAttribute(t.jsxIdentifier('alt'), t.stringLiteral(node.alt)),\n        t.jsxAttribute(t.jsxIdentifier('src'), createImgSrc(node.url)),\n      ],\n      true\n    )\n  ).code\n\n// turns `html` nodes into `jsx` nodes\nexport default () => (tree: any) => {\n  visit(tree, 'image', (node: any): void => {\n    // check if a node has just open tag\n    node.type = 'jsx'\n    node.value = imageToJsx(node)\n  })\n  visit(tree, 'jsx', (node: any, idx: any): void => {\n    // check if a node has just open tag\n    mergeNodeWithoutCloseTag(tree, node, idx)\n  })\n}\n"
  },
  {
    "path": "core/remark-docz/src/types.d.ts",
    "content": "declare module 'unist-util-visit'\ndeclare module 'unist-util-remove'\ndeclare module '@mdx-js/mdx'\n"
  },
  {
    "path": "core/remark-docz/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"module\": \"esnext\",\n    \"outDir\": \"dist\",\n    \"rootDir\": \"src\",\n    \"declaration\": true,\n    \"types\": [\"node\", \"jest\"],\n    \"typeRoots\": [\"../../node_modules/@types\", \"node_modules/@types\"]\n  },\n  \"include\": [\"src/**/*\", \"src/types.d.ts\"],\n  \"exclude\": [\"node_modules/**\"]\n}\n"
  },
  {
    "path": "dev-env/basic/.eslintrc",
    "content": "// Empty file to disable gatsby linting accordingly to https://www.gatsbyjs.com/docs/how-to/custom-configuration/eslint/#disabling-eslint.\n// Since the monorepo is already in charge of linting."
  },
  {
    "path": "dev-env/basic/.gitignore",
    "content": ".docz\nnode_modules\nsrc/last-change-timestamp.js"
  },
  {
    "path": "dev-env/basic/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **dev-env/basic:** building and running development ([#1646](https://github.com/doczjs/docz/issues/1646)) ([7baaaf2](https://github.com/doczjs/docz/commit/7baaaf2))\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n"
  },
  {
    "path": "dev-env/basic/README.md",
    "content": "# Docz development environment\n\nRuns a simple docz app that watches and reloads when any core package is changed\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```"
  },
  {
    "path": "dev-env/basic/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "dev-env/basic/package.json",
    "content": "{\n  \"name\": \"dev-env-basic\",\n  \"private\": true,\n  \"version\": \"2.4.0\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"2.3.3-alpha.0\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  }\n}\n"
  },
  {
    "path": "dev-env/basic/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nexport const Alert = props => <AlertStyled {...props} />\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "dev-env/basic/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "dev-env/basic/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/.eslintrc",
    "content": "{\n  \"extends\": [\"docz-js\"],\n  \"overrides\": [\n    {\n      \"files\": \"*.{ts,tsx}\",\n      \"extends\": [\"docz-ts\"]\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/basic/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/basic/README.md",
    "content": "# Basic Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-basic\n# or\nyarn create docz-app docz-app-basic\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/basic\nmv basic docz-basic-example\ncd docz-basic-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/basic/package.json",
    "content": "{\n  \"name\": \"docz-example-basic\",\n  \"version\": \"2.0.0\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"examples/basic\"\n  },\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.11.0\",\n    \"react-dom\": \"^16.11.0\"\n  }\n}\n"
  },
  {
    "path": "examples/basic/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  /**\n   * The kind prop is used to set the alert's background color\n   */\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/basic/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/basic/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/create-react-app/.gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pnp\n.pnp.js\n\n# testing\n/coverage\n\n# production\n/build\n\n# misc\n.DS_Store\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n.docz\n"
  },
  {
    "path": "examples/create-react-app/README.md",
    "content": "# create-react-app docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-cra --example create-react-app\n# or\nyarn create docz-app docz-app-cra --example create-react-app\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/create-react-app\nmv create-react-app docz-cra-example\ncd docz-cra-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run docz\n\n```sh\nyarn docz # npm run dev\n```\n\n## Build docz website\n\n```sh\nyarn docz:build # npm run dev\n```\n\n## Serve docz website\n\n```sh\nyarn docz:serve\n```\n\nThis project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm start`\n\nRuns the app in the development mode.<br />\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nThe page will reload if you make edits.<br />\nYou will also see any lint errors in the console.\n\n### `npm test`\n\nLaunches the test runner in the interactive watch mode.<br />\nSee the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.\n\n### `npm run build`\n\nBuilds the app for production to the `build` folder.<br />\nIt correctly bundles React in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.<br />\nYour app is ready to be deployed!\n\nSee the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.\n\n### `npm run eject`\n\n**Note: this is a one-way operation. Once you `eject`, you can’t go back!**\n\nIf you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.\n\nInstead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.\n\nYou don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.\n\n## Learn More\n\nYou can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).\n\nTo learn React, check out the [React documentation](https://reactjs.org/).\n\n### Code Splitting\n\nThis section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting\n\n### Analyzing the Bundle Size\n\nThis section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size\n\n### Making a Progressive Web App\n\nThis section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app\n\n### Advanced Configuration\n\nThis section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration\n\n### Deployment\n\nThis section has moved here: https://facebook.github.io/create-react-app/docs/deployment\n\n### `npm run build` fails to minify\n\nThis section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify\n"
  },
  {
    "path": "examples/create-react-app/package.json",
    "content": "{\n  \"name\": \"docz-example-create-react-app\",\n  \"version\": \"2.0.0-rc.43\",\n  \"private\": true,\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"react\": \"^16.11.0\",\n    \"react-dom\": \"^16.11.0\",\n    \"react-scripts\": \"^3.2.0\"\n  },\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"docz:build\": \"docz build\",\n    \"docz:serve\": \"docz serve\",\n    \"start\": \"react-scripts start\",\n    \"build\": \"react-scripts build\",\n    \"test\": \"react-scripts test\",\n    \"eject\": \"react-scripts eject\"\n  },\n  \"browserslist\": {\n    \"production\": [\n      \">0.2%\",\n      \"not dead\",\n      \"not op_mini all\"\n    ],\n    \"development\": [\n      \"last 1 chrome version\",\n      \"last 1 firefox version\",\n      \"last 1 safari version\"\n    ]\n  }\n}\n"
  },
  {
    "path": "examples/create-react-app/public/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <link rel=\"shortcut icon\" href=\"%PUBLIC_URL%/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <meta\n      name=\"description\"\n      content=\"Web site created using create-react-app\"\n    />\n    <link rel=\"apple-touch-icon\" href=\"logo192.png\" />\n    <!--\n      manifest.json provides metadata used when your web app is installed on a\n      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/\n    -->\n    <link rel=\"manifest\" href=\"%PUBLIC_URL%/manifest.json\" />\n    <!--\n      Notice the use of %PUBLIC_URL% in the tags above.\n      It will be replaced with the URL of the `public` folder during the build.\n      Only files inside the `public` folder can be referenced from the HTML.\n\n      Unlike \"/favicon.ico\" or \"favicon.ico\", \"%PUBLIC_URL%/favicon.ico\" will\n      work correctly both with client-side routing and a non-root public URL.\n      Learn how to configure a non-root public URL by running `npm run build`.\n    -->\n    <title>React App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n    <!--\n      This HTML file is a template.\n      If you open it directly in the browser, you will see an empty page.\n\n      You can add webfonts, meta tags, or analytics to this file.\n      The build step will place the bundled scripts into the <body> tag.\n\n      To begin the development, run `npm start` or `yarn start`.\n      To create a production bundle, use `npm run build` or `yarn build`.\n    -->\n  </body>\n</html>\n"
  },
  {
    "path": "examples/create-react-app/public/manifest.json",
    "content": "{\n  \"short_name\": \"React App\",\n  \"name\": \"Create React App Sample\",\n  \"icons\": [\n    {\n      \"src\": \"favicon.ico\",\n      \"sizes\": \"64x64 32x32 24x24 16x16\",\n      \"type\": \"image/x-icon\"\n    },\n    {\n      \"src\": \"logo192.png\",\n      \"type\": \"image/png\",\n      \"sizes\": \"192x192\"\n    },\n    {\n      \"src\": \"logo512.png\",\n      \"type\": \"image/png\",\n      \"sizes\": \"512x512\"\n    }\t    \n  ],\n  \"start_url\": \".\",\n  \"display\": \"standalone\",\n  \"theme_color\": \"#000000\",\n  \"background_color\": \"#ffffff\"\n}\n"
  },
  {
    "path": "examples/create-react-app/public/robots.txt",
    "content": "# https://www.robotstxt.org/robotstxt.html\nUser-agent: *\n"
  },
  {
    "path": "examples/create-react-app/src/App.css",
    "content": ".App {\n  text-align: center;\n}\n\n.App-logo {\n  animation: App-logo-spin infinite 20s linear;\n  height: 40vmin;\n  pointer-events: none;\n}\n\n.App-header {\n  background-color: #282c34;\n  min-height: 100vh;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  font-size: calc(10px + 2vmin);\n  color: white;\n}\n\n.App-link {\n  color: #61dafb;\n}\n\n@keyframes App-logo-spin {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n"
  },
  {
    "path": "examples/create-react-app/src/App.js",
    "content": "import React from 'react'\nimport logo from './logo.svg'\nimport './App.css'\n\nfunction App() {\n  return (\n    <div className=\"App\">\n      <header className=\"App-header\">\n        <img src={logo} className=\"App-logo\" alt=\"logo\" />\n        <p>\n          Edit <code>src/App.js</code> and save to reload.\n        </p>\n        <a\n          className=\"App-link\"\n          href=\"https://reactjs.org\"\n          target=\"_blank\"\n          rel=\"noopener noreferrer\"\n        >\n          Learn React\n        </a>\n      </header>\n    </div>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/create-react-app/src/App.test.js",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom'\nimport App from './App'\n\nit('renders without crashing', () => {\n  const div = document.createElement('div')\n  ReactDOM.render(<App />, div)\n  ReactDOM.unmountComponentAtNode(div)\n})\n"
  },
  {
    "path": "examples/create-react-app/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  /**\n   * The kind prop is used to set the alert's background color\n   */\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/create-react-app/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/create-react-app/src/index.css",
    "content": "body {\n  margin: 0;\n  font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\",\n    \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\",\n    sans-serif;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n  font-family: source-code-pro, Menlo, Monaco, Consolas, \"Courier New\",\n    monospace;\n}\n"
  },
  {
    "path": "examples/create-react-app/src/index.js",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom'\nimport './index.css'\nimport App from './App'\nimport * as serviceWorker from './serviceWorker'\n\nReactDOM.render(<App />, document.getElementById('root'))\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister()\n"
  },
  {
    "path": "examples/create-react-app/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/create-react-app/src/serviceWorker.js",
    "content": "// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n  window.location.hostname === 'localhost' ||\n    // [::1] is the IPv6 localhost address.\n    window.location.hostname === '[::1]' ||\n    // 127.0.0.1/8 is considered localhost for IPv4.\n    window.location.hostname.match(\n      /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n    )\n)\n\nexport function register(config) {\n  if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n    // The URL constructor is available in all browsers that support SW.\n    const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href)\n    if (publicUrl.origin !== window.location.origin) {\n      // Our service worker won't work if PUBLIC_URL is on a different origin\n      // from what our page is served on. This might happen if a CDN is used to\n      // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n      return\n    }\n\n    window.addEventListener('load', () => {\n      const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`\n\n      if (isLocalhost) {\n        // This is running on localhost. Let's check if a service worker still exists or not.\n        checkValidServiceWorker(swUrl, config)\n\n        // Add some additional logging to localhost, pointing developers to the\n        // service worker/PWA documentation.\n        navigator.serviceWorker.ready.then(() => {\n          console.log(\n            'This web app is being served cache-first by a service ' +\n              'worker. To learn more, visit https://bit.ly/CRA-PWA'\n          )\n        })\n      } else {\n        // Is not localhost. Just register service worker\n        registerValidSW(swUrl, config)\n      }\n    })\n  }\n}\n\nfunction registerValidSW(swUrl, config) {\n  navigator.serviceWorker\n    .register(swUrl)\n    .then(registration => {\n      registration.onupdatefound = () => {\n        const installingWorker = registration.installing\n        if (installingWorker == null) {\n          return\n        }\n        installingWorker.onstatechange = () => {\n          if (installingWorker.state === 'installed') {\n            if (navigator.serviceWorker.controller) {\n              // At this point, the updated precached content has been fetched,\n              // but the previous service worker will still serve the older\n              // content until all client tabs are closed.\n              console.log(\n                'New content is available and will be used when all ' +\n                  'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n              )\n\n              // Execute callback\n              if (config && config.onUpdate) {\n                config.onUpdate(registration)\n              }\n            } else {\n              // At this point, everything has been precached.\n              // It's the perfect time to display a\n              // \"Content is cached for offline use.\" message.\n              console.log('Content is cached for offline use.')\n\n              // Execute callback\n              if (config && config.onSuccess) {\n                config.onSuccess(registration)\n              }\n            }\n          }\n        }\n      }\n    })\n    .catch(error => {\n      console.error('Error during service worker registration:', error)\n    })\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n  // Check if the service worker can be found. If it can't reload the page.\n  fetch(swUrl)\n    .then(response => {\n      // Ensure service worker exists, and that we really are getting a JS file.\n      const contentType = response.headers.get('content-type')\n      if (\n        response.status === 404 ||\n        (contentType != null && contentType.indexOf('javascript') === -1)\n      ) {\n        // No service worker found. Probably a different app. Reload the page.\n        navigator.serviceWorker.ready.then(registration => {\n          registration.unregister().then(() => {\n            window.location.reload()\n          })\n        })\n      } else {\n        // Service worker found. Proceed as normal.\n        registerValidSW(swUrl, config)\n      }\n    })\n    .catch(() => {\n      console.log(\n        'No internet connection found. App is running in offline mode.'\n      )\n    })\n}\n\nexport function unregister() {\n  if ('serviceWorker' in navigator) {\n    navigator.serviceWorker.ready.then(registration => {\n      registration.unregister()\n    })\n  }\n}\n"
  },
  {
    "path": "examples/create-react-app-ts/.gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pnp\n.pnp.js\n\n# testing\n/coverage\n\n# production\n/build\n\n# misc\n.DS_Store\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n.docz\n"
  },
  {
    "path": "examples/create-react-app-ts/README.md",
    "content": "# create-react-app with Docz and TypeScript example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-cra --example create-react-app-ts\n# or\nyarn create docz-app docz-app-cra --example create-react-app-ts\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/cra\nmv cra docz-cra-example\ncd docz-cra-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run docz\n\n```sh\nyarn docz # npm run dev\n```\n\n## Build docz website\n\n```sh\nyarn docz:build # npm run dev\n```\n\n## Serve docz website\n\n```sh\nyarn docz:serve\n```\n\nThis project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `yarn start`\n\nRuns the app in the development mode.<br />\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nThe page will reload if you make edits.<br />\nYou will also see any lint errors in the console.\n\n### `yarn test`\n\nLaunches the test runner in the interactive watch mode.<br />\nSee the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.\n\n### `yarn build`\n\nBuilds the app for production to the `build` folder.<br />\nIt correctly bundles React in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.<br />\nYour app is ready to be deployed!\n\nSee the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.\n\n### `yarn eject`\n\n**Note: this is a one-way operation. Once you `eject`, you can’t go back!**\n\nIf you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.\n\nInstead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.\n\nYou don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.\n\n## Learn More\n\nYou can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).\n\nTo learn React, check out the [React documentation](https://reactjs.org/).\n"
  },
  {
    "path": "examples/create-react-app-ts/doczrc.js",
    "content": "export default {\n  typescript: true,\n}\n"
  },
  {
    "path": "examples/create-react-app-ts/package.json",
    "content": "{\n  \"name\": \"create-react-app-ts\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"dependencies\": {\n    \"@testing-library/jest-dom\": \"^4.2.4\",\n    \"@testing-library/react\": \"^9.3.2\",\n    \"@testing-library/user-event\": \"^7.1.2\",\n    \"@types/jest\": \"^24.0.0\",\n    \"@types/node\": \"^12.0.0\",\n    \"@types/react\": \"^16.9.0\",\n    \"@types/react-dom\": \"^16.9.0\",\n    \"docz\": \"^2.2.0\",\n    \"react\": \"^16.12.0\",\n    \"react-dom\": \"^16.12.0\",\n    \"react-scripts\": \"3.3.1\",\n    \"typescript\": \"~3.7.2\"\n  },\n  \"scripts\": {\n    \"docz\": \"docz dev --port 1337\",\n    \"docz:build\": \"docz build\",\n    \"docz:serve\": \"docz serve\",\n    \"start\": \"react-scripts start\",\n    \"build\": \"react-scripts build\",\n    \"test\": \"react-scripts test\",\n    \"eject\": \"react-scripts eject\"\n  },\n  \"eslintConfig\": {\n    \"extends\": \"react-app\"\n  },\n  \"browserslist\": {\n    \"production\": [\n      \">0.2%\",\n      \"not dead\",\n      \"not op_mini all\"\n    ],\n    \"development\": [\n      \"last 1 chrome version\",\n      \"last 1 firefox version\",\n      \"last 1 safari version\"\n    ]\n  }\n}\n"
  },
  {
    "path": "examples/create-react-app-ts/public/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <link rel=\"icon\" href=\"%PUBLIC_URL%/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <meta\n      name=\"description\"\n      content=\"Web site created using create-react-app\"\n    />\n    <link rel=\"apple-touch-icon\" href=\"%PUBLIC_URL%/logo192.png\" />\n    <!--\n      manifest.json provides metadata used when your web app is installed on a\n      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/\n    -->\n    <link rel=\"manifest\" href=\"%PUBLIC_URL%/manifest.json\" />\n    <!--\n      Notice the use of %PUBLIC_URL% in the tags above.\n      It will be replaced with the URL of the `public` folder during the build.\n      Only files inside the `public` folder can be referenced from the HTML.\n\n      Unlike \"/favicon.ico\" or \"favicon.ico\", \"%PUBLIC_URL%/favicon.ico\" will\n      work correctly both with client-side routing and a non-root public URL.\n      Learn how to configure a non-root public URL by running `npm run build`.\n    -->\n    <title>React App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n    <!--\n      This HTML file is a template.\n      If you open it directly in the browser, you will see an empty page.\n\n      You can add webfonts, meta tags, or analytics to this file.\n      The build step will place the bundled scripts into the <body> tag.\n\n      To begin the development, run `npm start` or `yarn start`.\n      To create a production bundle, use `npm run build` or `yarn build`.\n    -->\n  </body>\n</html>\n"
  },
  {
    "path": "examples/create-react-app-ts/public/manifest.json",
    "content": "{\n  \"short_name\": \"React App\",\n  \"name\": \"Create React App Sample\",\n  \"icons\": [\n    {\n      \"src\": \"favicon.ico\",\n      \"sizes\": \"64x64 32x32 24x24 16x16\",\n      \"type\": \"image/x-icon\"\n    },\n    {\n      \"src\": \"logo192.png\",\n      \"type\": \"image/png\",\n      \"sizes\": \"192x192\"\n    },\n    {\n      \"src\": \"logo512.png\",\n      \"type\": \"image/png\",\n      \"sizes\": \"512x512\"\n    }\n  ],\n  \"start_url\": \".\",\n  \"display\": \"standalone\",\n  \"theme_color\": \"#000000\",\n  \"background_color\": \"#ffffff\"\n}\n"
  },
  {
    "path": "examples/create-react-app-ts/public/robots.txt",
    "content": "# https://www.robotstxt.org/robotstxt.html\nUser-agent: *\n"
  },
  {
    "path": "examples/create-react-app-ts/src/App.css",
    "content": ".App {\n  text-align: center;\n}\n\n.App-logo {\n  height: 40vmin;\n  pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n  .App-logo {\n    animation: App-logo-spin infinite 20s linear;\n  }\n}\n\n.App-header {\n  background-color: #282c34;\n  min-height: 100vh;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  font-size: calc(10px + 2vmin);\n  color: white;\n}\n\n.App-link {\n  color: #61dafb;\n}\n\n@keyframes App-logo-spin {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n"
  },
  {
    "path": "examples/create-react-app-ts/src/App.test.tsx",
    "content": "import React from 'react';\nimport { render } from '@testing-library/react';\nimport App from './App';\n\ntest('renders learn react link', () => {\n  const { getByText } = render(<App />);\n  const linkElement = getByText(/learn react/i);\n  expect(linkElement).toBeInTheDocument();\n});\n"
  },
  {
    "path": "examples/create-react-app-ts/src/App.tsx",
    "content": "import React from 'react';\nimport logo from './logo.svg';\nimport './App.css';\n\nconst App = () => {\n  return (\n    <div className=\"App\">\n      <header className=\"App-header\">\n        <img src={logo} className=\"App-logo\" alt=\"logo\" />\n        <p>\n          Edit <code>src/App.tsx</code> and save to reload.\n        </p>\n        <a\n          className=\"App-link\"\n          href=\"https://reactjs.org\"\n          target=\"_blank\"\n          rel=\"noopener noreferrer\"\n        >\n          Learn React\n        </a>\n      </header>\n    </div>\n  );\n}\n\nexport default App;\n"
  },
  {
    "path": "examples/create-react-app-ts/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  /**\n   * The kind prop is used to set the alert's background color\n   */\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/create-react-app-ts/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/create-react-app-ts/src/index.css",
    "content": "body {\n  margin: 0;\n  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n    sans-serif;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n    monospace;\n}\n"
  },
  {
    "path": "examples/create-react-app-ts/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/create-react-app-ts/src/index.tsx",
    "content": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(<App />, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"
  },
  {
    "path": "examples/create-react-app-ts/src/react-app-env.d.ts",
    "content": "/// <reference types=\"react-scripts\" />\n"
  },
  {
    "path": "examples/create-react-app-ts/src/serviceWorker.ts",
    "content": "// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n  window.location.hostname === 'localhost' ||\n    // [::1] is the IPv6 localhost address.\n    window.location.hostname === '[::1]' ||\n    // 127.0.0.0/8 are considered localhost for IPv4.\n    window.location.hostname.match(\n      /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n    )\n);\n\ntype Config = {\n  onSuccess?: (registration: ServiceWorkerRegistration) => void;\n  onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n  if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n    // The URL constructor is available in all browsers that support SW.\n    const publicUrl = new URL(\n      process.env.PUBLIC_URL,\n      window.location.href\n    );\n    if (publicUrl.origin !== window.location.origin) {\n      // Our service worker won't work if PUBLIC_URL is on a different origin\n      // from what our page is served on. This might happen if a CDN is used to\n      // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n      return;\n    }\n\n    window.addEventListener('load', () => {\n      const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n      if (isLocalhost) {\n        // This is running on localhost. Let's check if a service worker still exists or not.\n        checkValidServiceWorker(swUrl, config);\n\n        // Add some additional logging to localhost, pointing developers to the\n        // service worker/PWA documentation.\n        navigator.serviceWorker.ready.then(() => {\n          console.log(\n            'This web app is being served cache-first by a service ' +\n              'worker. To learn more, visit https://bit.ly/CRA-PWA'\n          );\n        });\n      } else {\n        // Is not localhost. Just register service worker\n        registerValidSW(swUrl, config);\n      }\n    });\n  }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n  navigator.serviceWorker\n    .register(swUrl)\n    .then(registration => {\n      registration.onupdatefound = () => {\n        const installingWorker = registration.installing;\n        if (installingWorker == null) {\n          return;\n        }\n        installingWorker.onstatechange = () => {\n          if (installingWorker.state === 'installed') {\n            if (navigator.serviceWorker.controller) {\n              // At this point, the updated precached content has been fetched,\n              // but the previous service worker will still serve the older\n              // content until all client tabs are closed.\n              console.log(\n                'New content is available and will be used when all ' +\n                  'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n              );\n\n              // Execute callback\n              if (config && config.onUpdate) {\n                config.onUpdate(registration);\n              }\n            } else {\n              // At this point, everything has been precached.\n              // It's the perfect time to display a\n              // \"Content is cached for offline use.\" message.\n              console.log('Content is cached for offline use.');\n\n              // Execute callback\n              if (config && config.onSuccess) {\n                config.onSuccess(registration);\n              }\n            }\n          }\n        };\n      };\n    })\n    .catch(error => {\n      console.error('Error during service worker registration:', error);\n    });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n  // Check if the service worker can be found. If it can't reload the page.\n  fetch(swUrl, {\n    headers: { 'Service-Worker': 'script' }\n  })\n    .then(response => {\n      // Ensure service worker exists, and that we really are getting a JS file.\n      const contentType = response.headers.get('content-type');\n      if (\n        response.status === 404 ||\n        (contentType != null && contentType.indexOf('javascript') === -1)\n      ) {\n        // No service worker found. Probably a different app. Reload the page.\n        navigator.serviceWorker.ready.then(registration => {\n          registration.unregister().then(() => {\n            window.location.reload();\n          });\n        });\n      } else {\n        // Service worker found. Proceed as normal.\n        registerValidSW(swUrl, config);\n      }\n    })\n    .catch(() => {\n      console.log(\n        'No internet connection found. App is running in offline mode.'\n      );\n    });\n}\n\nexport function unregister() {\n  if ('serviceWorker' in navigator) {\n    navigator.serviceWorker.ready.then(registration => {\n      registration.unregister();\n    });\n  }\n}\n"
  },
  {
    "path": "examples/create-react-app-ts/src/setupTests.ts",
    "content": "// jest-dom adds custom jest matchers for asserting on DOM nodes.\n// allows you to do things like:\n// expect(element).toHaveTextContent(/react/i)\n// learn more: https://github.com/testing-library/jest-dom\nimport '@testing-library/jest-dom/extend-expect';\n"
  },
  {
    "path": "examples/create-react-app-ts/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"es5\",\n    \"lib\": [\n      \"dom\",\n      \"dom.iterable\",\n      \"esnext\"\n    ],\n    \"allowJs\": true,\n    \"skipLibCheck\": true,\n    \"esModuleInterop\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"strict\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"module\": \"esnext\",\n    \"moduleResolution\": \"node\",\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react\"\n  },\n  \"include\": [\n    \"src\"\n  ]\n}\n"
  },
  {
    "path": "examples/custom-base-path/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/custom-base-path/README.md",
    "content": "# Custom base path docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-custom-base-path --example custom-base-path\n# or\nyarn create docz-app docz-app-custom-base-path -- example custom-base-path\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/custom-base-path\nmv basic docz-custom-base-path-example\ncd docz-custom-base-path-example\n```\n\n## Notes\n\n`base` is added to doczrc and mapped to gatsby's `prefixPaths`\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/custom-base-path/doczrc.js",
    "content": "export default {\n  base: '/base-path/',\n}\n"
  },
  {
    "path": "examples/custom-base-path/package.json",
    "content": "{\n  \"name\": \"docz-example-basic\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  }\n}\n"
  },
  {
    "path": "examples/custom-base-path/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nexport const Alert = props => <AlertStyled {...props} />\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/custom-base-path/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/custom-base-path/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/custom-config-location/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/custom-config-location/README.md",
    "content": "# Docz with custom config location example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app --example custom-config-location\n# or\nyarn create docz-app docz-app --example custom-config-location\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/custom-config-location\nmv custom-config-location docz-custom-config-location-example\ncd docz-custom-config-location-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn docz dev --config src/doczrc.js # or yarn dev\n```\n\n## Build\n\n```sh\nyarn docz build --config src/doczrc.js # or yarn build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/custom-config-location/package.json",
    "content": "{\n  \"name\": \"docz-example-custom-config-location\",\n  \"private\": true,\n  \"version\": \"2.0.0\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"dev\": \"docz dev --config src/doczrc.js\",\n    \"build\": \"docz build --config src/doczrc.js\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  }\n}\n"
  },
  {
    "path": "examples/custom-config-location/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nexport const Alert = props => <AlertStyled {...props} />\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/custom-config-location/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/custom-config-location/src/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'ComponentsA', 'ABD'],\n  title: 'My Documentation Title',\n}\n"
  },
  {
    "path": "examples/custom-config-location/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/flow/.babelrc",
    "content": "{\n  \"presets\": [\"@babel/preset-flow\"]\n}\n"
  },
  {
    "path": "examples/flow/.flowconfig",
    "content": "[ignore]\n<PROJECT_ROOT>/node_modules/**\n[libs]\n./flow-typed\n"
  },
  {
    "path": "examples/flow/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/flow/README.md",
    "content": "# Flow Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-flow --example flow\n# or\nyarn create docz-app docz-app-flow --example flow\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/flow\nmv flow docz-flow-example\ncd docz-flow-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/flow/gatsby-node.js",
    "content": "exports.onCreateBabelConfig = ({ actions }) => {\n  actions.setBabelPreset({\n    name: `@babel/preset-flow`,\n  })\n}\n"
  },
  {
    "path": "examples/flow/package.json",
    "content": "{\n  \"name\": \"docz-example-flow\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \".babelrc\",\n    \".flowconfig\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\"\n  },\n  \"dependencies\": {\n    \"@emotion/react\": \"^11.1.1\",\n    \"@emotion/styled\": \"^11.0.0\",\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-flow\": \"^7.0.0\",\n    \"flow-bin\": \"^0.102.0\",\n    \"flow-typed\": \"^2.6.0\"\n  }\n}\n"
  },
  {
    "path": "examples/flow/src/components/Alert.jsx",
    "content": "// @flow\n\nimport React from 'react'\nimport styled from '@emotion/styled'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\ntype Kind = 'info' | 'positive' | 'negative' | 'warning'\n\ntype AlertProps = {\n  /**\n   * Set this to change alert kind\n   */\n  kind: Kind,\n}\n\nconst AlertStyled = styled('div')`\n  padding: 15px 20px;\n  background: white;\n  border-radius: 3px;\n  color: white;\n  background: ${({ kind = 'info' }) => kinds[kind]};\n`\n\nexport const Alert = ({ kind = 'info', ...props }: AlertProps) => (\n  <AlertStyled {...props} kind={kind} />\n)\n"
  },
  {
    "path": "examples/flow/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from \"docz\";\nimport { Alert } from \"./Alert\";\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/flow/src/components/Button.jsx",
    "content": "// @flow\nimport React from 'react'\nimport styled from '@emotion/styled'\n\nconst scales = {\n  small: `\n    padding: 5px 10px;\n    font-size: 14px;\n  `,\n  normal: `\n    padding: 10px 20px;\n    font-size: 16px;\n  `,\n  big: `\n    padding: 20px 30px;\n    font-size: 18px;\n  `,\n}\n\nconst kind = outline => (bg, color) => {\n  const boxShadowColor = outline ? bg : 'transparent'\n  const backgroundColor = outline ? 'transparent' : bg\n\n  return `\n    background: ${backgroundColor};\n    box-shadow: inset 0 0 0 1px ${boxShadowColor};\n    color: ${outline ? bg : color};\n    transition: all .3s;\n\n    &:hover {\n      box-shadow: inset 0 0 0 1000px ${boxShadowColor};\n      color: ${color};\n    }\n  `\n}\n\nconst kinds = outline => {\n  const get = kind(outline)\n\n  return {\n    primary: get('#1FB6FF', 'white'),\n    secondary: get('#5352ED', 'white'),\n    cancel: get('#FF4949', 'white'),\n    dark: get('#273444', 'white'),\n    gray: get('#8492A6', 'white'),\n  }\n}\n\nconst getScale = ({ scale = 'normal' }) => scales[scale]\nconst getKind = ({ kind = 'primary', outline = false }) => kinds(outline)[kind]\n\nconst ButtonStyled = styled('button')`\n  ${getKind};\n  ${getScale};\n  cursor: pointer;\n  margin: 3px 5px;\n  border: none;\n  border-radius: 3px;\n`\n\ntype ButtonProps = {\n  scale: 'small' | 'normal' | 'big',\n  kind: 'primary' | 'secondary' | 'cancel' | 'dark' | 'gray',\n  outline: boolean,\n  children: Node,\n}\n\nexport const Button = ({\n  scale = 'normal',\n  kind = 'primary',\n  outline = false,\n  children,\n}: ButtonProps) => (\n  <ButtonStyled scale={scale} kind={kind} outline={outline}>\n    {children}\n  </ButtonStyled>\n)\n"
  },
  {
    "path": "examples/flow/src/components/Button.mdx",
    "content": "---\nname: Button\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Button } from './Button'\n\n# Button\n\nButtons make common actions more obvious and help users more easily perform them. Buttons use labels and sometimes icons to communicate the action that will occur when the user touches them.\n\n### Best practices\n\n- Group buttons logically into sets based on usage and importance.\n- Ensure that button actions are clear and consistent.\n- The main action of a group set can be a primary button.\n- Select a single button variation and do not mix them.\n\n## Properties\n\n<Props of={Button} />\n\n## Basic usage\n\n<Playground>\n  <Button>Click me</Button>\n</Playground>\n\n## With different sizes\n\n<Playground>\n  <Button scale=\"small\">Click me</Button>\n  <Button scale=\"normal\">Click me</Button>\n  <Button scale=\"big\">Click me</Button>\n</Playground>\n\n## With different colors\n\n<Playground>\n  <Button kind=\"primary\">Click me</Button>\n  <Button kind=\"secondary\">Click me</Button>\n  <Button kind=\"cancel\">Click me</Button>\n  <Button kind=\"dark\">Click me</Button>\n  <Button kind=\"gray\">Click me</Button>\n</Playground>\n\n## Outlined\n\n<Playground>\n  <Button kind=\"primary\" outline>Click me</Button>\n  <Button kind=\"secondary\" outline>Click me</Button>\n  <Button kind=\"cancel\" outline>Click me</Button>\n  <Button kind=\"dark\" outline>Click me</Button>\n  <Button kind=\"gray\" outline>Click me</Button>\n</Playground>\n"
  },
  {
    "path": "examples/flow/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/gatsby/.gitignore",
    "content": ".docz/\n\n# gatsby files\n.cache/\npublic\n\n# dependencies\nnode_modules\n"
  },
  {
    "path": "examples/gatsby/README.md",
    "content": "# Docz Gatsby Example\n\nThis example shows you how you can use docz as a [Gatsby Theme](https://www.gatsbyjs.org/blog/2018-11-11-introducing-gatsby-themes/) inside your project.\n\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-gatsby --example gatsby\n# or\nyarn create docz-app docz-app-gatsby --example gatsby\n```\n\n## Download\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/gatsby\nmv gatsby docz-gatsby-example\ncd docz-gatsby-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Start developing\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/gatsby/doczrc.js",
    "content": "export default {\n  menu: ['Home', 'Components'],\n}\n"
  },
  {
    "path": "examples/gatsby/gatsby-config.js",
    "content": "module.exports = {\n  plugins: [\n    'gatsby-theme-docz',\n    `gatsby-transformer-sharp`,\n    // this (optional) plugin enables Progressive Web App + Offline functionality\n    // To learn more, visit: https://gatsby.dev/offline\n    // `gatsby-plugin-offline`,\n  ],\n}\n"
  },
  {
    "path": "examples/gatsby/package.json",
    "content": "{\n  \"name\": \"docz-example-gatsby\",\n  \"private\": true,\n  \"description\": \"Example of how to integrate docz with gatsby as a theme\",\n  \"version\": \"2.0.0-rc.41\",\n  \"keywords\": [\n    \"gatsby\",\n    \"docz\"\n  ],\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/pedronauck/docz/issues\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/pedronauck/docz.git\"\n  },\n  \"scripts\": {\n    \"dev\": \"gatsby develop\",\n    \"build\": \"gatsby build\",\n    \"serve\": \"gatsby serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"^2.0.0-rc.76\",\n    \"gatsby\": \"^2.13.73\",\n    \"gatsby-plugin-offline\": \"^2.2.7\",\n    \"gatsby-plugin-sharp\": \"^2.2.18\",\n    \"gatsby-theme-docz\": \"latest\",\n    \"gatsby-transformer-sharp\": \"^2.2.7\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.9.0\",\n    \"react-dom\": \"^16.9.0\",\n    \"react-helmet-async\": \"^1.0.4\"\n  }\n}\n"
  },
  {
    "path": "examples/gatsby/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport styled from '@emotion/styled'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = styled.div`\n  padding: 15px 20px;\n  background: white;\n  border-radius: 3px;\n  color: white;\n  background: ${({ kind = 'info' }) => kinds[kind]};\n`\n\nexport const Alert = props => <AlertStyled {...props} />\n\nAlert.propTypes = {\n  /** `info`, `positive`, `negative`, or `warning` */\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/gatsby/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some messages</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/gatsby/src/components/Button.jsx",
    "content": "import React from 'react'\nimport styled from '@emotion/styled'\nimport t from 'prop-types'\n\nconst scales = {\n  small: `\n    padding: 5px 10px;\n    font-size: 14px;\n  `,\n  normal: `\n    padding: 10px 20px;\n    font-size: 16px;\n  `,\n  big: `\n    padding: 20px 30px;\n    font-size: 18px;\n  `,\n}\n\nconst kind = outline => (bg, color) => {\n  const boxShadowColor = outline ? bg : 'transparent'\n  const backgroundColor = outline ? 'transparent' : bg\n\n  return `\n    background: ${backgroundColor};\n    box-shadow: inset 0 0 0 1px ${boxShadowColor};\n    color: ${outline ? bg : color};\n    transition: all .3s;\n\n    &:hover {\n      box-shadow: inset 0 0 0 1000px ${boxShadowColor};\n      color: ${color};\n    }\n  `\n}\n\nconst kinds = outline => {\n  const get = kind(outline)\n\n  return {\n    primary: get('#1FB6FF', 'white'),\n    secondary: get('#5352ED', 'white'),\n    cancel: get('#FF4949', 'white'),\n    dark: get('#273444', 'white'),\n    gray: get('#8492A6', 'white'),\n  }\n}\n\nconst getScale = ({ scale = 'normal' }) => scales[scale]\nconst getKind = ({ kind = 'primary', outline = false }) => kinds(outline)[kind]\n\nconst ButtonStyled = styled.button`\n  ${getKind};\n  ${getScale};\n  cursor: pointer;\n  margin: 3px 5px;\n  border: none;\n  border-radius: 3px;\n`\n\nexport const Button = ({ children, ...props }) => (\n  <ButtonStyled {...props}>{children}</ButtonStyled>\n)\n\nButton.propTypes = {\n  scales: t.oneOf(['small', 'normal', 'big']),\n  kind: t.oneOf(['primary', 'secondary', 'cancel', 'dark', 'gray']),\n  outline: t.bool,\n}\n\nButton.defaultProps = {\n  scales: 'normal',\n  kind: 'primary',\n  outline: false,\n}\n"
  },
  {
    "path": "examples/gatsby/src/components/Button.mdx",
    "content": "---\nname: Button\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Button } from './Button'\n\n# Button\n\nButton make common actions more obvious and help users more easily perform them. Buttons use labels and sometimes icons to communicate the action that will occur when the user touches them.\n\n### Best practices\n\n- Group buttons logically into sets based on usage and importance.\n- Ensure that button actions are clear and consistent.\n- The main action of a group set can be a primary button.\n- Select a single button variation and do not mix them.\n\n## Properties\n\n<Props of={Button} />\n\n## Basic usage\n\n<Playground>\n  <Button>Click me</Button>\n</Playground>\n\n## With different sizes\n\n<Playground>\n  <Button scale=\"small\">Click me</Button>\n  <Button scale=\"normal\">Click me</Button>\n  <Button scale=\"big\">Click me</Button>\n</Playground>\n\n## With different colors\n\n<Playground>\n  <Button kind=\"primary\">Click me</Button>\n  <Button kind=\"secondary\">Click me</Button>\n  <Button kind=\"cancel\">Click me</Button>\n  <Button kind=\"dark\">Click me</Button>\n  <Button kind=\"gray\">Click me</Button>\n</Playground>\n\n## Outlined\n\n<Playground>\n  <Button kind=\"primary\" outline>Click me</Button>\n  <Button kind=\"secondary\" outline>Click me</Button>\n  <Button kind=\"cancel\" outline>Click me</Button>\n  <Button kind=\"dark\" outline>Click me</Button>\n  <Button kind=\"gray\" outline>Click me</Button>\n</Playground>\n\n"
  },
  {
    "path": "examples/gatsby/src/pages/404.js",
    "content": "import React from 'react'\n\nconst NotFoundPage = () => (\n  <>\n    <h1>NOT FOUND</h1>\n    <p>You just hit a route that doesn&#39;t exist... the sadness.</p>\n  </>\n)\n\nexport default NotFoundPage\n"
  },
  {
    "path": "examples/gatsby/src/pages/index.mdx",
    "content": "---\nname: Home\nroute: /\n---\n\n# Home\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/images/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/images/README.md",
    "content": "# Docz with images example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-images --example images\n# or\nyarn create docz-app docz-app-images --example images\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/images\nmv images docz-images-example\ncd docz-images-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/images/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/images/package.json",
    "content": "{\n  \"private\": true,\n  \"name\": \"docz-example-images\",\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\"\n  },\n  \"dependencies\": {\n    \"@emotion/react\": \"^11.1.1\",\n    \"@emotion/styled\": \"^11.0.0\",\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  }\n}\n"
  },
  {
    "path": "examples/images/src/index.jsx",
    "content": "import React from 'react'\n\nexport default function Image() {\n  return <img src=\"/public/tux.png\" />\n}\n"
  },
  {
    "path": "examples/images/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Tux\n\nTux is a penguin character and the official brand character of the Linux kernel.[1] Originally created as an entry to a Linux logo competition, Tux is the most commonly used icon for Linux, although different Linux distributions depict Tux in various styles. The character is used in many other Linux programs and as a general symbol of Linux.\n\nAn image of Tux can be resolved directly in markdown\n\n![Tux](../public/tux.png)\n\nIt can also be resolved using explicit relative paths\n\n![Tux](../public/tux.png)\n\nImages may also link to external URLs. For example, the following image is downloaded from Wikipedia\n\n![Tux original](https://upload.wikimedia.org/wikipedia/commons/a/af/Tux.png)\n\nTo link to your images from your components add a `public` directory and store in it your images.\n\nThen, in your code, link to your image (tux.png) by pointing to `/public`, for example : \n\n```jsx\n  <img src=\"/public/tux.png\" />\n```\n\nYou can also customise the public folder to be anything you want by changing the `public` field in your `doczrc.js` file.\n\nimport Image from './index.jsx'\n\n<Image />\n\n"
  },
  {
    "path": "examples/less/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/less/README.md",
    "content": "# less Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-less --example less\n# or\nyarn create docz-app docz-app-less --example less\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/less\nmv less docz-less-example\ncd docz-less-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n"
  },
  {
    "path": "examples/less/doczrc.js",
    "content": "export default {\n  title: 'Docz Less',\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/less/gatsby-config.js",
    "content": "module.exports = {\n  plugins: ['gatsby-plugin-less'],\n}\n"
  },
  {
    "path": "examples/less/package.json",
    "content": "{\n  \"private\": true,\n  \"name\": \"docz-example-less\",\n  \"version\": \"2.0.0-rc.52\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"gatsby-plugin-less\": \"3.0.9\",\n    \"less\": \"3.10.3\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  }\n}\n"
  },
  {
    "path": "examples/less/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nimport './Alert.less'\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div className=\"Alert\" {...rest}>\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/less/src/components/Alert.less",
    "content": ".Alert {\n  padding: 1rem;\n  margin: 1rem;\n  border-radius: 0.25rem;\n}\n"
  },
  {
    "path": "examples/less/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/less/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/logo-in-sidebar/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/logo-in-sidebar/README.md",
    "content": "# Logo In Sidebar Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-logo-in-sidebar --example logo-in-sidebar\n# or\nyarn create docz-app docz-app-logo-in-sidebar --example logo-in-sidebar\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/logo-in-sidebar\nmv logo-in-sidebar docz-logo-in-sidebar-example\ncd docz-logo-in-sidebar-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/logo-in-sidebar/package.json",
    "content": "{\n  \"name\": \"docz-example-logo-in-sidebar\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"next\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  }\n}\n"
  },
  {
    "path": "examples/logo-in-sidebar/src/components/Alert.jsx",
    "content": "import React from \"react\";\nimport t from \"prop-types\";\n\nconst kinds = {\n  info: \"#5352ED\",\n  positive: \"#2ED573\",\n  negative: \"#FF4757\",\n  warning: \"#FFA502\"\n};\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      borderRadius: 3,\n      color: \"white\",\n      background: kinds[kind] || \"white\"\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n);\n\nAlert.propTypes = {\n  /**\n   * The kind prop is used to set the alert's background color\n   */\n  kind: t.oneOf([\"info\", \"positive\", \"negative\", \"warning\"])\n};\n\nAlert.defaultProps = {\n  kind: \"info\"\n};\n"
  },
  {
    "path": "examples/logo-in-sidebar/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/logo-in-sidebar/src/gatsby-theme-docz/components/Header/index.js",
    "content": "export const Header = () => {\n  return null;\n};\n"
  },
  {
    "path": "examples/logo-in-sidebar/src/gatsby-theme-docz/components/Sidebar/index.js",
    "content": "/** @jsx jsx */\nimport { Fragment, forwardRef, useState, useRef, useEffect } from 'react'\nimport { Global } from \"@emotion/react\";\nimport { jsx, Box } from \"theme-ui\";\nimport { useMenus, useCurrentDoc } from \"docz\";\n\nimport * as styles from 'gatsby-theme-docz/src/components/Sidebar/styles'\nimport { NavSearch } from 'gatsby-theme-docz/src/components/NavSearch'\nimport { NavLink } from 'gatsby-theme-docz/src/components/NavLink'\nimport { NavGroup } from 'gatsby-theme-docz/src/components/NavGroup'\n\nexport const Sidebar = forwardRef(function Sidebar(props, ref) {\n  const [query, setQuery] = useState('')\n  const menus = useMenus({ query })\n  const currentDoc = useCurrentDoc()\n  const currentDocRef = useRef()\n  const handleChange = ev => {\n    setQuery(ev.target.value)\n  }\n  useEffect(() => {\n    if (ref.current && currentDocRef.current) {\n      ref.current.scrollTo(0, currentDocRef.current.offsetTop)\n    }\n  }, [])\n  return (\n    <Fragment>\n      <Box onClick={props.onClick} sx={styles.overlay(props)}>\n        {props.open && <Global styles={styles.global} />}\n      </Box>\n      <Box ref={ref} sx={styles.wrapper(props)} data-testid=\"sidebar\">\n        <img src=\"https://placekitten.com/200/100\" />\n\n        <NavSearch\n          placeholder=\"Type to search...\"\n          value={query}\n          onChange={handleChange}\n        />\n        {menus &&\n          menus.map(menu => {\n            if (!menu.route)\n              return <NavGroup key={menu.id} item={menu} sidebarRef={ref} />\n            if (menu.route === currentDoc.route) {\n              return (\n                <NavLink key={menu.id} item={menu} ref={currentDocRef}>\n                  {menu.name}\n                </NavLink>\n              )\n            }\n            return (\n              <NavLink key={menu.id} item={menu}>\n                {menu.name}\n              </NavLink>\n            )\n          })}\n      </Box>\n    </Fragment>\n  )\n})\n"
  },
  {
    "path": "examples/logo-in-sidebar/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/material-ui/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/material-ui/README.md",
    "content": "# Docz example with material-ui\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-basic --example material-ui\n# or\nyarn create docz-app docz-app-basic --example material-ui\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/material-ui\nmv material-ui docz-material-ui-example\ncd docz-material-ui-example\n```\n\n## Setup\n\nIn package.json :\n\n```diff\n- \"//postinstall\": \"patch-package\"\n+ \"postinstall\": \"patch-package\"\n```\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/material-ui/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/material-ui/home.mdx",
    "content": "---\nname: Hello world\nroute: /\n---\n\n# Hello world\n\nHello, I'm a mdx file!\n\nimport Button from \"@material-ui/core/Button\";\nimport {Playground} from 'docz'\n\n### Material UI Button\n\n<Playground>\n  <Button variant=\"contained\" color=\"primary\">\n    Hello World\n  </Button>\n</Playground>"
  },
  {
    "path": "examples/material-ui/package.json",
    "content": "{\n  \"name\": \"docz-example-material-ui\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"@material-ui/core\": \"^4.4.0\",\n    \"docz\": \"latest\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  }\n}\n"
  },
  {
    "path": "examples/monorepo/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/monorepo/README.md",
    "content": "# Docz Gatsby Mono Repo Example\n\nThis example shows you how you can use docz at the root of your monorepo.\n\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-monorepo --example monorepo\n# or\nyarn create docz-app docz-app-monorepo --example monorepo\n```\n\n## Download\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/monorepo\nmv monorepo docz-monorepo-example\ncd docz-monorepo-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Start developing\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n"
  },
  {
    "path": "examples/monorepo/lerna.json",
    "content": "{\n  \"lerna\": \"3.16.4\",\n  \"packages\": [\"packages/*\"],\n  \"version\": \"1.0.0\"\n}\n"
  },
  {
    "path": "examples/monorepo/package.json",
    "content": "{\n  \"private\": true,\n  \"workspaces\": [\n    \"packages/*\"\n  ],\n  \"name\": \"docz-gatsby-monorepo\",\n  \"version\": \"2.0.0-rc.41\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"build\": \"yarn docz build\",\n    \"dev\": \"yarn docz dev\",\n    \"serve\": \"yarn docz serve\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"devDependencies\": {\n    \"lerna\": \"^3.16.4\"\n  },\n  \"dependencies\": {\n    \"docz\": \"2.0.0-rc.52\",\n    \"react\": \"^16.10.1\",\n    \"react-dom\": \"^16.10.1\"\n  }\n}\n"
  },
  {
    "path": "examples/monorepo/packages/basic/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/monorepo/packages/basic/README.md",
    "content": "# Basic Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-basic\n# or\nyarn create docz-app docz-app-basic\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/basic\nmv basic docz-basic-example\ncd docz-basic-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/monorepo/packages/basic/package.json",
    "content": "{\n  \"name\": \"docz-example-basic\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\",\n    \"universal-console\": \"^0.1.3\"\n  }\n}\n"
  },
  {
    "path": "examples/monorepo/packages/basic/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nexport const Alert = props => <AlertStyled {...props} />\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/monorepo/packages/basic/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/monorepo/packages/basic/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/monorepo-package/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/monorepo-package/README.md",
    "content": "# Docz Gatsby Mono Repo Example\n\nThis example shows you how you can use docz inside individual packages in a monorepo.\n\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-monorepo --example monorepo-package\n# or\nyarn create docz-app docz-app-monorepo --example monorepo-package\n```\n\n## Download\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/monorepo-package\nmv monorepo-package docz-monorepo-example\ncd docz-monorepo-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Start developing\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n"
  },
  {
    "path": "examples/monorepo-package/lerna.json",
    "content": "{\n  \"lerna\": \"3.16.4\",\n  \"packages\": [\"packages/*\"],\n  \"version\": \"1.0.0\"\n}\n"
  },
  {
    "path": "examples/monorepo-package/package.json",
    "content": "{\n  \"private\": true,\n  \"workspaces\": [\n    \"packages/*\"\n  ],\n  \"name\": \"docz-gatsby-monorepo\",\n  \"version\": \"2.0.0-rc.41\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"build\": \"cd packages/basic && yarn build\",\n    \"dev\": \"cd packages/basic && yarn dev\",\n    \"serve\": \"cd packages/basic && yarn serve\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"devDependencies\": {\n    \"lerna\": \"^3.16.4\"\n  },\n  \"dependencies\": {}\n}\n"
  },
  {
    "path": "examples/monorepo-package/packages/basic/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/monorepo-package/packages/basic/README.md",
    "content": "# Basic Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-basic\n# or\nyarn create docz-app docz-app-basic\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/basic\nmv basic docz-basic-example\ncd docz-basic-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/monorepo-package/packages/basic/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/monorepo-package/packages/basic/package.json",
    "content": "{\n  \"name\": \"docz-example-basic\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\",\n    \"universal-console\": \"^0.1.3\"\n  }\n}\n"
  },
  {
    "path": "examples/monorepo-package/packages/basic/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nexport const Alert = props => <AlertStyled {...props} />\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/monorepo-package/packages/basic/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/monorepo-package/packages/basic/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/monorepo-separate-docs/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/monorepo-separate-docs/README.md",
    "content": "# Docz Monorepo with Separate Docs Package Example\n\nThis example shows how to use docz in a monorepo package to document other peer packages.\n\nThe `Alert` component in `packages/alert` is documented by the `packages/docs` `docz` package.\n\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-monorepo-separate-docs --example monorepo-separate-docs\n# or\nyarn create docz-app docz-app-monorepo-separate-docs --example monorepo-separate-docs\n```\n\n## Download\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/monorepo-separate-docs\nmv monorepo-separate-docs docz-monorepo-separate-docs-example\ncd docz-monorepo-separate-docs-example\n```\n\n## Notes\n\nIn `docs/doczrc.js` :\n\n- `docgenConfig.searchPath` is set to `packages/`\n- The `filterComponents` function passed to docz allows the index.js file to be processed in `packages/alert/index.js`\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Start developing\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/monorepo-separate-docs/lerna.json",
    "content": "{\n  \"lerna\": \"3.16.4\",\n  \"packages\": [\"packages/*\"],\n  \"version\": \"1.0.0\"\n}\n"
  },
  {
    "path": "examples/monorepo-separate-docs/package.json",
    "content": "{\n  \"private\": true,\n  \"workspaces\": {\n    \"packages\": [\n      \"packages/*\"\n    ]\n  },\n  \"name\": \"docz-gatsby-monorepo-separate-docs-package\",\n  \"version\": \"2.0.0-rc.58\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"build\": \"cd packages/docs && yarn run build\",\n    \"dev\": \"cd packages/docs && yarn run dev\",\n    \"serve\": \"cd packages/docs && yarn run serve\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"devDependencies\": {\n    \"lerna\": \"^3.16.4\"\n  },\n  \"dependencies\": {}\n}\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/alert/README.md",
    "content": "# Alert component\n\nUsage is documented in `packages/docs`.\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Develop\n\n```sh\nyarn dev # npm run dev\n```"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/alert/example/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n    <title>Playground</title>\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n    <script src=\"./index.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/alert/example/index.js",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom'\nimport Alert from '../index'\n\nconst App = () => <Alert>Hello</Alert>\n\nReactDOM.render(<App />, document.getElementById('root'))\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/alert/index.js",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nconst Alert = props => <AlertStyled {...props} />\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n\nexport default Alert\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/alert/package.json",
    "content": "{\n  \"name\": \"alert\",\n  \"version\": \"1.0.0\",\n  \"main\": \"index.js\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"dev\": \"parcel example/index.html\",\n    \"start\": \"npm run dev\"\n  },\n  \"dependencies\": {\n    \"react\": \"^16.10.2\",\n    \"react-dom\": \"^16.10.2\"\n  },\n  \"devDependencies\": {\n    \"parcel\": \"^1.12.4\"\n  }\n}\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/alert-ts/.gitignore",
    "content": ".rts2_cache_*"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/alert-ts/README.md",
    "content": "# Alert TypeScript Component\n\nUsage is documented in `packages/docs`.\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Develop\n\n```sh\nyarn dev # npm run dev\n```"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/alert-ts/example/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n    <title>Playground</title>\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n    <script src=\"./index.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/alert-ts/example/index.js",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom'\nimport Alert from '../'\n\nconst App = () => <Alert>Hello</Alert>\n\nReactDOM.render(<App />, document.getElementById('root'))\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/alert-ts/package.json",
    "content": "{\n  \"name\": \"alert-ts\",\n  \"version\": \"1.0.0\",\n  \"source\": \"src/index.tsx\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.mjs\",\n  \"unpkg\": \"dist/index.umd.js\",\n  \"scripts\": {\n    \"build\": \"microbundle\",\n    \"dev\": \"yarn microbundle && concurrently \\\"yarn microbundle watch\\\" \\\"yarn parcel example/index.html --open\\\"\"\n  },\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"react\": \"^16.10.2\",\n    \"react-dom\": \"^16.10.2\"\n  },\n  \"files\": [\n    \"dist/*\"\n  ],\n  \"devDependencies\": {\n    \"concurrently\": \"^5.0.0\",\n    \"microbundle\": \"^0.11.0\",\n    \"parcel\": \"^1.12.4\"\n  }\n}\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/alert-ts/src/index.tsx",
    "content": "import React, { FC } from 'react'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\ntype Kind = keyof typeof kinds\n\ninterface Props {\n  kind: Kind\n}\n\nconst AlertStyled: FC<Props> = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind] || 'black',\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nconst Alert: FC<Props> = props => <AlertStyled {...props} />\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n\nexport default Alert\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/alert-ts/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"es5\",\n    \"module\": \"esnext\",\n    \"lib\": [\"dom\", \"esnext\"],\n    \"importHelpers\": true,\n    \"declaration\": true,\n    \"sourceMap\": true,\n    \"rootDir\": \"./\",\n    \"strict\": true,\n    \"noImplicitAny\": true,\n    \"strictNullChecks\": true,\n    \"strictFunctionTypes\": true,\n    \"strictPropertyInitialization\": true,\n    \"noImplicitThis\": true,\n    \"alwaysStrict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"moduleResolution\": \"node\",\n    \"baseUrl\": \"./\",\n    \"paths\": {\n      \"*\": [\"src/*\", \"node_modules/*\"]\n    },\n    \"jsx\": \"react\",\n    \"esModuleInterop\": true\n  }\n}\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/docs/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/docs/README.md",
    "content": "# Monorepo Docs\n\nThis package uses `mdx` and `docz` to document the other packages in the monorepo. \n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/docs/doczrc.js",
    "content": "export default {\n  typescript: true,\n  docgenConfig: {\n    searchPath: '../',\n  },\n  filterComponents: files => {\n    return files.filter(\n      filepath =>\n        /\\/[A-Z]\\w*\\.(js|jsx|ts|tsx)$/.test(filepath) ||\n        filepath.includes('/alert/index.js') ||\n        filepath.includes('/alert-ts/src/index.tsx')\n    )\n  },\n}\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/docs/package.json",
    "content": "{\n  \"name\": \"docz-example-basic\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"alert\": \"1.0.0\",\n    \"alert-ts\": \"1.0.0\",\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\",\n    \"universal-console\": \"^0.1.3\"\n  }\n}\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/docs/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport Alert from 'alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/docs/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\nimport Alert from 'alert'\n\nimport { Props } from 'docz'\n\n## Alert\n\n<Alert>Hello</Alert>\n\n<Props of={Alert} />\n\nimport AlertTS from 'alert-ts/src/'\n\n## Alert TypeScript\n\n<AlertTS>Hello</AlertTS>\n\n<Props of={AlertTS} />\n"
  },
  {
    "path": "examples/monorepo-separate-docs/packages/docs/tsconfig.json",
    "content": "{\n  \"include\": [\"../alert-ts/src/\"],\n  \"compilerOptions\": {\n    \"target\": \"es5\",\n    \"module\": \"esnext\",\n    \"lib\": [\"dom\", \"esnext\"],\n    \"importHelpers\": true,\n    \"declaration\": true,\n    \"sourceMap\": true,\n    \"strict\": true,\n    \"noImplicitAny\": true,\n    \"strictNullChecks\": true,\n    \"strictFunctionTypes\": true,\n    \"strictPropertyInitialization\": true,\n    \"noImplicitThis\": true,\n    \"alwaysStrict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"moduleResolution\": \"node\",\n    \"jsx\": \"react\",\n    \"esModuleInterop\": true\n  }\n}\n"
  },
  {
    "path": "examples/now/.gitignore",
    "content": "public\nnode_modules\n.docz"
  },
  {
    "path": "examples/now/README.md",
    "content": "# Docz Now Deployment example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-now --example now\n# or\nyarn create docz-app docz-app-now --example now\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/now\nmv now docz-example-now\ndocz-example-now\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n\n## Deploy\n\n```sh\nyarn deploy\n```\n\nNote that by default `docz` generates the output site in `.docz/public` to change that add a `dest` field to your `doczrc.js` with the path you want to generate the code in.\n"
  },
  {
    "path": "examples/now/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/now/now.json",
    "content": "{\n  \"builds\": [{ \"src\": \".docz/public/**\", \"use\": \"@now/static\" }],\n  \"routes\": [{ \"src\": \"/(.*)\", \"dest\": \".docz/public/$1\" }]\n}\n"
  },
  {
    "path": "examples/now/package.json",
    "content": "{\n  \"private\": true,\n  \"name\": \"docz-example-now\",\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"//\": \"temporary hack below fixed with next docz version. Used for running docz on CI\",\n    \"dev:once\": \"npx kill-port 3000 && (npm run dev &) && npx wait-on http-get://localhost:3000 && npx kill-port 3000\",\n    \"build\": \"npm run dev:once && docz build\",\n    \"deploy\": \"npm run build && now\"\n  },\n  \"dependencies\": {\n    \"@emotion/react\": \"^11.1.1\",\n    \"@emotion/styled\": \"^11.0.0\",\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  },\n  \"devDependencies\": {\n    \"now\": \"^16.1.2\"\n  }\n}\n"
  },
  {
    "path": "examples/now/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport styled from '@emotion/styled'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = styled('div')`\n  padding: 15px 20px;\n  background: white;\n  border-radius: 3px;\n  color: white;\n  background: ${({ kind = 'info' }) => kinds[kind]};\n`\n\nexport const Alert = props => <AlertStyled {...props} />\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/now/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/now/src/components/Button.jsx",
    "content": "import React from 'react'\nimport styled from '@emotion/styled'\nimport t from 'prop-types'\n\nconst scales = {\n  small: `\n    padding: 5px 10px;\n    font-size: 14px;\n  `,\n  normal: `\n    padding: 10px 20px;\n    font-size: 16px;\n  `,\n  big: `\n    padding: 20px 30px;\n    font-size: 18px;\n  `,\n}\n\nconst kind = outline => (bg, color) => {\n  const boxShadowColor = outline ? bg : 'transparent'\n  const backgroundColor = outline ? 'transparent' : bg\n\n  return `\n    background: ${backgroundColor};\n    box-shadow: inset 0 0 0 1px ${boxShadowColor};\n    color: ${outline ? bg : color};\n    transition: all .3s;\n\n    &:hover {\n      box-shadow: inset 0 0 0 1000px ${boxShadowColor};\n      color: ${color};\n    }\n  `\n}\n\nconst kinds = outline => {\n  const get = kind(outline)\n\n  return {\n    primary: get('#1FB6FF', 'white'),\n    secondary: get('#5352ED', 'white'),\n    cancel: get('#FF4949', 'white'),\n    dark: get('#273444', 'white'),\n    gray: get('#8492A6', 'white'),\n  }\n}\n\nconst getScale = ({ scale = 'normal' }) => scales[scale]\nconst getKind = ({ kind = 'primary', outline = false }) => kinds(outline)[kind]\n\nconst ButtonStyled = styled('button')`\n  ${getKind};\n  ${getScale};\n  cursor: pointer;\n  margin: 3px 5px;\n  border: none;\n  border-radius: 3px;\n`\n\nexport const Button = ({ children, ...props }) => (\n  <ButtonStyled {...props}>{children}</ButtonStyled>\n)\n\nButton.propTypes = {\n  /**\n   * This is a pretty good description for this prop\n   * Button type. Learn more about `type` attribute [at MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type)\n   */\n  type: t.oneOf(['button', 'submit', 'reset']),\n  /**\n   * This is a __pretty good__ description for this prop\n   */\n  scales: t.oneOf(['small', 'normal', 'big']),\n  kind: t.oneOf(['primary', 'secondary', 'cancel', 'dark', 'gray']),\n  outline: t.bool.isRequired,\n}\n\nButton.defaultProps = {\n  scales: 'normal',\n  kind: 'primary',\n  outline: false,\n}\n"
  },
  {
    "path": "examples/now/src/components/Button.mdx",
    "content": "---\nname: Button\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Button } from './Button'\n\n# Button\n\nButtons make common actions more obvious and help users more easily perform them. Buttons use labels and sometimes icons to communicate the action that will occur when the user touches them.\n\n### Best practices\n\n- Group buttons logically into sets based on usage and importance.\n- Ensure that button actions are clear and consistent.\n- The main action of a group set can be a primary button.\n- Select a single button variation and do not mix them.\n\n## Properties\n\n<Props of={Button} />\n\n## Basic usage\n\n<Playground>\n  <Button>Click me</Button>\n</Playground>\n\n## With different sizes\n\n<Playground>\n  <Button scale=\"small\">Click me</Button>\n  <Button scale=\"normal\">Click me</Button>\n  <Button scale=\"big\">Click me</Button>\n</Playground>\n\n## With different colors\n\n<Playground>\n  <Button kind=\"primary\">Click me</Button>\n  <Button kind=\"secondary\">Click me</Button>\n  <Button kind=\"cancel\">Click me</Button>\n  <Button kind=\"dark\">Click me</Button>\n  <Button kind=\"gray\">Click me</Button>\n</Playground>\n\n## Outlined\n\n<Playground>\n  <Button kind=\"primary\" outline>Click me</Button>\n  <Button kind=\"secondary\" outline>Click me</Button>\n  <Button kind=\"cancel\" outline>Click me</Button>\n  <Button kind=\"dark\" outline>Click me</Button>\n  <Button kind=\"gray\" outline>Click me</Button>\n</Playground>\n\n"
  },
  {
    "path": "examples/now/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/react-native/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/react-native/README.md",
    "content": "## Docz React Native\n\nUse your React Native components inside docz\n\n> We will use [react-native-web](https://github.com/necolas/react-native-web) to make this integration possible.\n> So you might face some issues if you use other react-native modules. \n> Usually, many react-native modules have a web alternative, make sure to alias them too.\n\n## Installation\n\nThese packages are required to use React Native with docz:\n\n```bash\n$ yarn add react-native-web react-art\n```\n\nThen alias `react-native` to `react-native-web`\n\n```js\n// gatsby-node.js\nexports.onCreateWebpackConfig = args => {\n  args.actions.setWebpackConfig({\n    resolve: {\n      alias: {\n        'react-native': 'react-native-web',\n      },\n    },\n  })\n}\n```\n\n"
  },
  {
    "path": "examples/react-native/doczrc.js",
    "content": "export default {\n  title: 'React Native',\n}\n"
  },
  {
    "path": "examples/react-native/gatsby-node.js",
    "content": "exports.onCreateWebpackConfig = args => {\n  args.actions.setWebpackConfig({\n    resolve: {\n      alias: {\n        'react-native': 'react-native-web',\n      },\n    },\n  })\n}\n"
  },
  {
    "path": "examples/react-native/package.json",
    "content": "{\n  \"private\": true,\n  \"name\": \"docz-example-react-native\",\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-art\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\",\n    \"react-native-web\": \"^0.11.7\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.5.5\"\n  }\n}\n"
  },
  {
    "path": "examples/react-native/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\nimport { View, Text } from 'react-native'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = ({ children, kind, ...rest }) => (\n  <View\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    <Text style={{ color: 'white' }}>{children}</Text>\n  </View>\n)\n\nexport const Alert = props => <AlertStyled {...props} />\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/react-native/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>"
  },
  {
    "path": "examples/react-native/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\norder: 1\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/react-router/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/react-router/README.md",
    "content": "# Basic Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-react-router --example react-router\n# or\nyarn create docz-app docz-app-react-router --example react-router\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/react-router\nmv react-router docz-react-router-example\ncd docz-react-router-example\n```\n\n## Description\n\nA simple docz demo with react router. Note the file in `src/gatsby-theme-docz/wrapper.js`. It wraps the page with a Router to allow the usage of things like `Route` and `Link`\n\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/react-router/package.json",
    "content": "{\n  \"name\": \"docz-example-react-router\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\",\n    \"react-router-dom\": \"^5.0.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react-router/src/components/Alert.jsx",
    "content": "import React from \"react\";\nimport t from \"prop-types\";\nimport { Link } from \"react-router-dom\";\n\nconst kinds = {\n  info: \"#5352ED\",\n  positive: \"#2ED573\",\n  negative: \"#FF4757\",\n  warning: \"#FFA502\"\n};\n\nconst AlertStyledWithLink = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: \"white\",\n      borderRadius: 3,\n      color: \"white\",\n      background: kinds[kind]\n    }}\n    {...rest}\n  >\n    <Link to=\"/\">{children}</Link>\n  </div>\n);\n\nexport const Alert = props => <AlertStyledWithLink {...props} />;\n\nAlert.propTypes = {\n  kind: t.oneOf([\"info\", \"positive\", \"negative\", \"warning\"])\n};\n\nAlert.defaultProps = {\n  kind: \"info\"\n};\n"
  },
  {
    "path": "examples/react-router/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/react-router/src/gatsby-theme-docz/wrapper.js",
    "content": "import React from 'react'\nimport { MemoryRouter } from 'react-router-dom'\n\n// eslint-disable-next-line react/display-name\nexport default ({ children }) => {\n  return <MemoryRouter>{children}</MemoryRouter>\n}\n"
  },
  {
    "path": "examples/react-router/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/sass/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/sass/README.md",
    "content": "# Sass Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-sass --example sass\n# or\nyarn create docz-app docz-app-sass --example sass\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/sass\nmv sass docz-sass-example\ncd docz-sass-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n"
  },
  {
    "path": "examples/sass/doczrc.js",
    "content": "export default {\n  title: 'Docz Sass',\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/sass/gatsby-config.js",
    "content": "module.exports = {\n  plugins: ['gatsby-plugin-sass'],\n}\n"
  },
  {
    "path": "examples/sass/package.json",
    "content": "{\n  \"private\": true,\n  \"name\": \"docz-example-sass\",\n  \"version\": \"2.0.0-rc.52\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"gatsby-plugin-sass\": \"2.1.17\",\n    \"node-sass\": \"4.12.0\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  }\n}\n"
  },
  {
    "path": "examples/sass/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nimport './Alert.scss'\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div className=\"Alert\" {...rest}>\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/sass/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/sass/src/components/Alert.scss",
    "content": ".Alert {\n  padding: 1rem;\n  margin: 1rem;\n  border-radius: 0.25rem;\n}\n"
  },
  {
    "path": "examples/sass/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/shadowed-playground/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/shadowed-playground/README.md",
    "content": "# Shadowed Playground Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-shadowed-playground\n# or\nyarn create docz-app docz-app-shadowed-playground\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/shadowed-playground\nmv shadowed-playground docz-shadowed-playground-example\ncd docz-shadowed-playground-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/shadowed-playground/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/shadowed-playground/package.json",
    "content": "{\n  \"name\": \"docz-example-shadowed-playground\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.11.0\",\n    \"react-dom\": \"^16.11.0\"\n  }\n}\n"
  },
  {
    "path": "examples/shadowed-playground/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  /**\n   * The kind prop is used to set the alert's background color\n   */\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/shadowed-playground/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/shadowed-playground/src/gatsby-theme-docz/components/Playground/index.js",
    "content": "import React from 'react'\nimport { Playground as OriginalPlayground } from 'gatsby-theme-docz/src/components/Playground/index'\n\nexport const Playground = props => {\n  return (\n    <div style={{ background: 'rebeccapurple', padding: 12 }}>\n      <OriginalPlayground {...props} />\n    </div>\n  )\n}\n"
  },
  {
    "path": "examples/shadowed-playground/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/styled-components/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/styled-components/README.md",
    "content": "# Docz Styled Components Example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-styled-docz --example styled-components\n# or\nyarn create docz-app docz-app-styled-docz --example styled-components\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/styled-components\nmv styled-components docz-example-styled-docz\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n\n## Deploy\n\n```sh\nyarn deploy\n```\n\nNote that by default `docz` generates the output site in `.docz/public` to change that add a `dest` field to your `doczrc.js` with the path you want to generate the code in.\n"
  },
  {
    "path": "examples/styled-components/package.json",
    "content": "{\n  \"private\": true,\n  \"name\": \"docz-example-styled-components\",\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\"\n  },\n  \"dependencies\": {\n    \"docz\": \"next\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\",\n    \"styled-components\": \"^4.3.2\"\n  }\n}\n"
  },
  {
    "path": "examples/styled-components/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport styled from 'styled-components'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport const Alert = styled('div')`\n  padding: 15px 20px;\n  background: white;\n  border-radius: 3px;\n  color: white;\n  background: ${({ kind = 'info' }) => kinds[kind]};\n`\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/styled-components/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/styled-components/src/components/Button.jsx",
    "content": "import React from 'react'\nimport styled from 'styled-components'\nimport t from 'prop-types'\n\nconst scales = {\n  small: `\n    padding: 5px 10px;\n    font-size: 14px;\n  `,\n  normal: `\n    padding: 10px 20px;\n    font-size: 16px;\n  `,\n  big: `\n    padding: 20px 30px;\n    font-size: 18px;\n  `,\n}\n\nconst kind = outline => (bg, color) => {\n  const boxShadowColor = outline ? bg : 'transparent'\n  const backgroundColor = outline ? 'transparent' : bg\n\n  return `\n    background: ${backgroundColor};\n    box-shadow: inset 0 0 0 1px ${boxShadowColor};\n    color: ${outline ? bg : color};\n    transition: all .3s;\n\n    &:hover {\n      box-shadow: inset 0 0 0 1000px ${boxShadowColor};\n      color: ${color};\n    }\n  `\n}\n\nconst kinds = outline => {\n  const get = kind(outline)\n\n  return {\n    primary: get('#1FB6FF', 'white'),\n    secondary: get('#5352ED', 'white'),\n    cancel: get('#FF4949', 'white'),\n    dark: get('#273444', 'white'),\n    gray: get('#8492A6', 'white'),\n  }\n}\n\nconst getScale = ({ scale = 'normal' }) => scales[scale]\nconst getKind = ({ kind = 'primary', outline = false }) => kinds(outline)[kind]\n\nexport const Button = styled('button')`\n  ${getKind};\n  ${getScale};\n  cursor: pointer;\n  margin: 3px 5px;\n  border: none;\n  border-radius: 3px;\n`\n\nButton.propTypes = {\n  scales: t.oneOf(['small', 'normal', 'big']),\n  kind: t.oneOf(['primary', 'secondary', 'cancel', 'dark', 'gray']),\n  outline: t.bool,\n}\n\nButton.defaultProps = {\n  scales: 'normal',\n  kind: 'primary',\n  outline: false,\n}\n"
  },
  {
    "path": "examples/styled-components/src/components/Button.mdx",
    "content": "---\nname: Button\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Button } from './Button'\n\n# Button\n\nButtons make common actions more obvious and help users more easily perform them. Buttons use labels and sometimes icons to communicate the action that will occur when the user touches them.\n\n### Best practices\n\n- Group buttons logically into sets based on usage and importance.\n- Ensure that button actions are clear and consistent.\n- The main action of a group set can be a primary button.\n- Select a single button variation and do not mix them.\n\n## Properties\n\n<Props of={Button} />\n\n## Basic usage\n\n<Playground>\n  <Button>Click me</Button>\n</Playground>\n\n## With different sizes\n\n<Playground>\n  <Button scale=\"small\">Click me</Button>\n  <Button scale=\"normal\">Click me</Button>\n  <Button scale=\"big\">Click me</Button>\n</Playground>\n\n## With different colors\n\n<Playground>\n  <Button kind=\"primary\">Click me</Button>\n  <Button kind=\"secondary\">Click me</Button>\n  <Button kind=\"cancel\">Click me</Button>\n  <Button kind=\"dark\">Click me</Button>\n  <Button kind=\"gray\">Click me</Button>\n</Playground>\n\n## Outlined\n\n<Playground>\n  <Button kind=\"primary\" outline>Click me</Button>\n  <Button kind=\"secondary\" outline>Click me</Button>\n  <Button kind=\"cancel\" outline>Click me</Button>\n  <Button kind=\"dark\" outline>Click me</Button>\n  <Button kind=\"gray\" outline>Click me</Button>\n</Playground>\n\n"
  },
  {
    "path": "examples/styled-components/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/stylus/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/stylus/README.md",
    "content": "# stylus Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-stylus --example stylus\n# or\nyarn create docz-app docz-app-stylus --example stylus\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/stylus\nmv stylus docz-stylus-example\ncd docz-stylus-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n"
  },
  {
    "path": "examples/stylus/doczrc.js",
    "content": "export default {\n  title: 'Docz Stylus',\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/stylus/gatsby-config.js",
    "content": "module.exports = {\n  plugins: ['gatsby-plugin-stylus'],\n}\n"
  },
  {
    "path": "examples/stylus/package.json",
    "content": "{\n  \"private\": true,\n  \"name\": \"docz-example-stylus\",\n  \"version\": \"2.0.0-rc.52\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"gatsby-plugin-stylus\": \"2.1.11\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  }\n}\n"
  },
  {
    "path": "examples/stylus/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nimport './Alert.styl'\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  // space used after alert in order to have kind remain as a separate name\n  <div className={'Alert ' + kind} {...rest}>\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/stylus/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/stylus/src/components/Alert.styl",
    "content": ".Alert {\n  padding: .5rem\n  margin: 1rem\n  border-radius: 0.25rem\n  background-color: white\n  &.info {\n    color: white\n    background-color: #5352ED\n    }\n  &.positive {\n    background-color: #2ED573\n    }\n  &.negative {\n    background-color: #FF4757\n    }\n  &.warning {\n    background-color: #FFA502\n    }\n}"
  },
  {
    "path": "examples/stylus/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/typescript/README.md",
    "content": "# Typescript Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-typescript --example typescript\n# or\nyarn create docz-app docz-app-typescript --example typescript\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/typescript\nmv typescript docz-typescript-example\ncd docz-typescript-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n"
  },
  {
    "path": "examples/typescript/doczrc.js",
    "content": "export default {\n  typescript: true,\n}\n"
  },
  {
    "path": "examples/typescript/package.json",
    "content": "{\n  \"private\": true,\n  \"name\": \"docz-example-typescript\",\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"tsconfig.json\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\"\n  },\n  \"dependencies\": {\n    \"@emotion/react\": \"^11.1.1\",\n    \"@emotion/styled\": \"^11.0.0\",\n    \"docz\": \"latest\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^16.8.23\",\n    \"@types/react-dom\": \"^16.8.4\"\n  }\n}\n"
  },
  {
    "path": "examples/typescript/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert.tsx'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/typescript/src/components/Alert.tsx",
    "content": "import React, { FC } from 'react'\n\nexport type Kind = 'info' | 'positive' | 'negative' | 'warning'\nexport type KindMap = Record<Kind, string>\n\nconst kinds: KindMap = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport interface AlertProps {\n  /**\n   * Set this to change alert kind\n   * @default info\n   */\n  kind: 'info' | 'positive' | 'negative' | 'warning'\n}\n\nexport const Alert: FC<AlertProps> = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: kinds[kind] || 'white',\n      borderRadius: 3,\n      color: 'white',\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n"
  },
  {
    "path": "examples/typescript/src/components/Button.mdx",
    "content": "---\nname: Button\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Button } from './Button.tsx'\n\n# Button\n\nButtons make common actions more obvious and help users more easily perform them. Buttons use labels and sometimes icons to communicate the action that will occur when the user touches them.\n\n### Best practices\n\n- Group buttons logically into sets based on usage and importance.\n- Ensure that button actions are clear and consistent.\n- The main action of a group set can be a primary button.\n- Select a single button variation and do not mix them.\n\n## Properties\n\n<Props of={Button} />\n\n## Basic usage\n\n<Playground>\n  <Button>Click me</Button>\n</Playground>\n\n## With different sizes\n\n<Playground>\n  <Button scale=\"small\">Click me</Button>\n  <Button scale=\"normal\">Click me</Button>\n  <Button scale=\"big\">Click me</Button>\n</Playground>\n\n## With different colors\n\n<Playground>\n  <Button kind=\"primary\">Click me</Button>\n  <Button kind=\"secondary\">Click me</Button>\n  <Button kind=\"cancel\">Click me</Button>\n  <Button kind=\"dark\">Click me</Button>\n  <Button kind=\"gray\">Click me</Button>\n</Playground>\n\n## Outlined\n\n<Playground>\n  <Button kind=\"primary\" outline>Click me</Button>\n  <Button kind=\"secondary\" outline>Click me</Button>\n  <Button kind=\"cancel\" outline>Click me</Button>\n  <Button kind=\"dark\" outline>Click me</Button>\n  <Button kind=\"gray\" outline>Click me</Button>\n</Playground>\n\n"
  },
  {
    "path": "examples/typescript/src/components/Button.tsx",
    "content": "import React, { FC } from 'react'\nimport styled from '@emotion/styled'\n\nconst scales = {\n  small: `\n    padding: 5px 10px;\n    font-size: 14px;\n  `,\n  normal: `\n    padding: 10px 20px;\n    font-size: 16px;\n  `,\n  big: `\n    padding: 20px 30px;\n    font-size: 18px;\n  `,\n}\n\nconst kind = (outline: boolean) => (bg: string, color: string) => {\n  const boxShadowColor = outline ? bg : 'transparent'\n  const backgroundColor = outline ? 'transparent' : bg\n\n  return `\n    background: ${backgroundColor};\n    box-shadow: inset 0 0 0 1px ${boxShadowColor};\n    color: ${outline ? bg : color};\n    transition: all .3s;\n\n    &:hover {\n      box-shadow: inset 0 0 0 1000px ${boxShadowColor};\n      color: ${color};\n    }\n  `\n}\n\ntype Kind = 'primary' | 'secondary' | 'cancel' | 'dark' | 'gray'\ntype Kinds = Record<Kind, string>\n\nconst kinds = (outline: boolean): Kinds => {\n  const get = kind(outline)\n\n  return {\n    primary: get('#1FB6FF', 'white'),\n    secondary: get('#5352ED', 'white'),\n    cancel: get('#FF4949', 'white'),\n    dark: get('#273444', 'white'),\n    gray: get('#8492A6', 'white'),\n  }\n}\n\nexport interface ButtonProps {\n  scale: 'small' | 'normal' | 'big';\n  kind: 'primary' | 'secondary' | 'cancel' | 'dark' | 'gray';\n  outline: boolean;\n}\n\nconst getScale = ({ scale = 'normal' }: ButtonProps) => scales[scale]\nconst getKind = ({ kind = 'primary', outline = false }: ButtonProps) =>\n  kinds(outline)[kind]\n\nconst ButtonStyled = styled('button')<ButtonProps>`\n  ${getKind};\n  ${getScale};\n  cursor: pointer;\n  margin: 3px 5px;\n  border: none;\n  border-radius: 3px;\n`\n\nexport const Button: FC<ButtonProps> = ({ children, ...props }) => (\n  <ButtonStyled {...props}>{children}</ButtonStyled>\n)\n"
  },
  {
    "path": "examples/typescript/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/typescript/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"es2015\",\n    \"moduleResolution\": \"node\",\n    \"strict\": true,\n    \"resolveJsonModule\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": false,\n    \"noEmit\": true,\n    \"jsx\": \"react\"\n  }\n}\n"
  },
  {
    "path": "examples/webpack-alias/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/webpack-alias/README.md",
    "content": "# Docz example with webpack aliases\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-webpack-alias --example webpack-alias\n# or\nyarn create docz-app docz-app-webpack-alias --example webpack-alias\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/webpack-alias\nmv webpack-alias docz-webpack-alias-example\ncd docz-webpack-alias-example\n```\n\n## Notes\n\nTo configure the webpack config we add a `gatsby-node.js` file and export `onCreateWebpackConfig`. More info here : https://www.gatsbyjs.org/docs/add-custom-webpack-config/\n\nFor this example, files inside `./src/` can be accessed with an absolute path. For example instead of doing `import A from './src/components/Alert` you can do `import A from 'components/Alert'`.\n\nAnother alias is set in place to map files in `./src/components/` to `@`. For example instead of doing `import A from './src/components/Alert` you can do `import A from '@/Alert'`.\n\n```js\n// gatsby-node.js\nconst path = require('path')\n\nexports.onCreateWebpackConfig = args => {\n  args.actions.setWebpackConfig({\n    resolve: {\n      // Note the '..' in the path because the docz gatsby project lives in the `.docz` directory\n      modules: [path.resolve(__dirname, '../src'), 'node_modules'],\n      alias: {\n        '@': path.resolve(__dirname, '../src/components/'),\n      },\n    },\n  })\n}\n\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/webpack-alias/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/webpack-alias/gatsby-node.js",
    "content": "const path = require('path')\n\nexports.onCreateWebpackConfig = args => {\n  args.actions.setWebpackConfig({\n    resolve: {\n      modules: [path.resolve(__dirname, '../src'), 'node_modules'],\n      alias: {\n        '@': path.resolve(__dirname, '../src/components/'),\n      },\n    },\n  })\n}\n"
  },
  {
    "path": "examples/webpack-alias/package.json",
    "content": "{\n  \"name\": \"docz-example-basic\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  }\n}\n"
  },
  {
    "path": "examples/webpack-alias/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nexport const Alert = props => <AlertStyled {...props} />\nexport default Alert\nAlert.propTypes = {\n  /**\n   * Used to set the color of the alert\n   */\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/webpack-alias/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\n// import Alert from 'components/Alert'\nimport Alert from '@/Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/webpack-alias/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/with-algolia-search/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/with-algolia-search/README.md",
    "content": "# Docz with Algolia Search example\n\n- [Using `create-docz-app`](#using-create-docz-app)\n- [Download manually](#download-manually)\n- [Setup](#setup)\n  - [Add your Algolia Credentials](#add-your-algolia-credentials)\n- [Send Data Parsed from your MDX Files to Algolia](#send-data-parsed-from-your-mdx-files-to-algolia)\n- [Run](#run)\n- [Build](#build)\n- [Serve built app](#serve-built-app)\n- [Credits](#credits)\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-with-algolia-search --example with-algolia-search\n# or\nyarn create docz-app docz-app-with-algolia-search --example with-algolia-search\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/with-algolia-search\nmv with-algolia-search docz-with-algolia-search-example\ncd docz-with-algolia-search-example\n```\n\n## Setup\n\n### Add your Algolia Credentials\n\nStart by adding your Algolia credentials to a .env file, which you shouldn't commit.\nIf you track this in your file, and especially if the site is open source, you will leak your admin API key. This would mean anyone is able to change anything on your Algolia index.\n\nRename .env.example to .env and fill in the values with your algolia keys that you can find here : https://www.algolia.com/api-keys\n\n```sh\n# //  .env.example\n# rename this file to .env and supply the values listed below\n# warning: variables prexifed with GATSBY_ will be made available to client-side code\n# be careful not to expose sensitive data (in this case your Algolia admin key ALGOLIA_ADMIN_KEY)\n\nGATSBY_ALGOLIA_INDEX_NAME=insertValue\nGATSBY_ALGOLIA_APP_ID=insertValue\nGATSBY_ALGOLIA_SEARCH_KEY=insertValue\nALGOLIA_ADMIN_KEY=insertValue\n```\n\n```sh\nyarn # npm i\n```\n\n## Send Data Parsed from your MDX Files to Algolia\n\nData is sent to Algolia only when you build your site.\n\nRun the build command\n\n```sh\nyarn build\n```\n\nNow, if you open your algolia dashboard you should see a new index with the name you provided for `ALGOLIA_INDEX_NAME` in your .env file\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n\n## Credits\n\nThe excellent tutorial on integrating Algolia with Gatsby : https://www.gatsbyjs.org/docs/adding-search-with-algolia/ was a huge help in preparing this example. The UI components are heavily inspired by the ones provided there. If you want to learn more about integrating Algolia make sure to read it !\n"
  },
  {
    "path": "examples/with-algolia-search/gatsby-config.js",
    "content": "require('dotenv').config()\nconst get = require('lodash/get')\nconst merge = require('lodash/merge')\n\nconst query = `\n{\n  allMdx {\n    edges {\n      node {\n        excerpt(pruneLength: 5000)\n      }\n    }\n  }\n  allDoczEntries {\n    edges {\n      node {\n        objectID: id\n        filepath\n        route\n        name\n      }\n    }\n  }\n}\n`\n\n// List of attributes to snippet, with an optional maximum number of words to snippet.\nconst settings = { attributesToSnippet: [`excerpt:20`] }\nconst queries = [\n  {\n    query: query,\n    transformer: gqlResponse => {\n      const allMdx = get(gqlResponse, 'data.allMdx.edges', []).map(\n        ({ node }) => node\n      )\n      const allDoczEntries = get(\n        gqlResponse,\n        'data.allDoczEntries.edges',\n        []\n      ).map(({ node }) => node)\n      const records = merge(allMdx, allDoczEntries)\n      return records\n    },\n    settings,\n  },\n]\n\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-plugin-algolia`,\n      options: {\n        appId: process.env.GATSBY_ALGOLIA_APP_ID,\n        apiKey: process.env.ALGOLIA_ADMIN_KEY,\n        indexName: process.env.GATSBY_ALGOLIA_INDEX_NAME,\n        queries,\n        chunkSize: 10000, // default: 1000\n      },\n    },\n  ],\n}\n"
  },
  {
    "path": "examples/with-algolia-search/package.json",
    "content": "{\n  \"name\": \"docz-with-algolia-example\",\n  \"private\": true,\n  \"version\": \"2.0.0\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"algoliasearch\": \"^3.35.1\",\n    \"docz\": \"latest\",\n    \"dotenv\": \"^8.2.0\",\n    \"gatsby-plugin-algolia\": \"^0.5.0\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.11.0\",\n    \"react-dom\": \"^16.11.0\",\n    \"react-instantsearch-dom\": \"^6.0.0\",\n    \"styled-components\": \"^4.4.1\",\n    \"styled-icons\": \"^9.0.1\"\n  }\n}\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/customizing/add-favicon-and-metadata.mdx",
    "content": "---\nname: Add Favicon and Metadata\nroute: /docs/add-favicon-and-metadata\nparent: Documentation\nmenu: Customizing\n---\n\n# Add favicon and metadata\n\nAdding metadata to your site is done by configuring Gatsby in combination with [`react-helmet-async`](https://github.com/staylor/react-helmet-async) [**source @ gatsby**](https://www.gatsbyjs.org/docs/add-page-metadata/).\n\n> Please note that we're referencing `react-helmet-async`, and not `react-helmet`. This is because of [this issue](https://github.com/nfl/react-helmet/issues/426). `react-helmet-async` is an API-compatible fork, so you shouldn't need to do anything except importing from a different package.\n\n\n### Shadowing the Wrapper-component\n\nThe metadata is set up in a file called `wrapper.js` which lives in docz theme package: `gatsby-theme-docz`. To override it we need to [Shadow the component](https://www.gatsbyjs.org/blog/2019-04-29-component-shadowing/), which means that we need to create a copy of the file with the \"same\" file path and name in our own `src`-directory.\n\n1. Create a file called `wrapper.js` in `src/gatsby-theme-docz`. Then path is important.\n2. Paste the following content and edit it to your liking\n```js\nimport React from 'react'\nimport { Helmet } from 'react-helmet-async'\n\nconst Wrapper = ({ children }) => <>\n\t<Helmet>\n\t\t<meta charSet=\"utf-8\" />\n\t\t<title>My Shadow!</title>\n\t\t<link rel=\"icon\"\n      \t\ttype=\"image/png\"\n\t\t      href=\"http://example.com/myicon.png\"\n\t\t/>\n\t</Helmet>\n\t{children}\n</>\nexport default Wrapper\n```\n\nIf you rebuild your site now it should use this component as a wrapper instead of the themes component.\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/customizing/component-shadowing.mdx",
    "content": "---\nname: Component Shadowing\nroute: /docs/component-shadowing\nparent: Documentation\nmenu: Customizing\n---\n\n# Component Shadowing\n\nAll components that comes with the standard theme `gatsby-theme-docz` can be [**shadowed**](https://www.gatsbyjs.org/blog/2019-04-29-component-shadowing/). This means that you can supply your own component that will shadow/override the themes component. This is done by placing a component with the same name as the themes component in the \"same filepath\" as the original component.\n\nFor example if you want to shadow the `Logo`-component you would have to have the following structure in your folder:\n\n```\nyour-site\n└── src\n    └── gatsby-theme-docz\n        └── components\n            └── Logo\n                  └──index.js\n```\n\nIf it has the matching folder structure and name the theme component will be shadowed and you can freely edit.\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/customizing/creating-your-themes.mdx",
    "content": "---\nname: Creating your themes\nroute: /docs/creating-your-themes\nparent: Documentation\nmenu: Customizing\n---\n\n# Creating your themes\n\nOne of the main features of Docz is that it allows you to create your own theme from scratch and just use the data parsed from Docz.\nWe provide a bunch of components that can help you create your own theme with little effort.\n\nLet's assume we have the following project structure :\n\n```\npages/\n  hello-world.mdx\nsrc/\n  gatsby-theme-docz/\n    index.js\n  ui/\n    Page.js\ndoczrc.js\npackage.json\n```\n\n\nThe previous way of customizing docz in v0 and v1 was to use the `theme` property inside the `doczrc.js` file. \n\nWith v2, we leverage GatsbyJS theme shadowing to override any and all files of the theme.\n\nFor example, to create a new theme wrapper and override some styles, we create a file located at `src/gatsby-theme-docz/index.js` that shadows [gatsby-theme-docz/src/index.js](https://github.com/doczjs/docz/blob/master/core/gatsby-theme-docz/src/index.js) \nand provide a new theme container implementation as shown below.\n\n\n## Creating your theme component\n\nCreate your theme component that takes in `children` as props and export it as default while using the [`theme()`](/docs/components-api) high order component as an enhancer.\n\n```js\n// src/gatsby-theme-docz/index.js\nimport React from 'react'\nimport { theme } from 'docz'\n\nconst Theme = ({ children }) => <div>{children}</div>\n\nexport default theme()(Theme)\n```\n\n> It's required to \"pass down\" the `children` property inside your theme component in order to render Docz routes properly.\n\nIf you create something like the above example you won't have anything too useful to show.\nTo customize your documentation make sure to check the [gatsby-docz-theme](https://github.com/doczjs/docz/tree/master/core/gatsby-theme-docz/src) source code\nto decide which modules you want to override.\n\n## Default theme configuration\n\nEach theme has its own default `themeConfig` object that allows you to override any part of the default theme found [here](https://github.com/doczjs/docz/blob/master/core/gatsby-theme-docz/src/theme/index.js).\n\nThe `themeConfig` allows you to customize fonts, colors, spaces, styles properties and other project global variables.\n\n```js\n// src/gatsby-theme-docz/index.js\nimport React from 'react'\nimport { theme } from 'docz'\n\nconst Theme = ({ children }) => <div>{children}</div>\n\nconst themeConfig = {\n  colors: {\n    primary: 'tomato',\n    secondary: 'khaki',\n    gray: 'lightslategray',\n  },\n}\n\nexport default theme(themeConfig)(Theme)\n```\n\nBy default, Docz will use [this object](https://github.com/doczjs/docz/blob/master/core/gatsby-theme-docz/src/theme/index.js) as the default configuration and merge it with the `themeConfig` setting in the project configuration.\n\nYou can then use the `useConfig` hook to do a lot of things, like use css-in-js theming or retrieve props from your `themeConfig` in a deep rendered component.\n\n```js\n// src/gatsby-theme-docz/index.js\nimport React from 'react'\nimport { theme, useConfig } from 'docz'\nimport { ThemeProvider } from 'theme-ui'\n\nconst Theme = () => {\n  const config = useConfig()\n  return (\n    <ThemeProvider theme={config}>\n      <div>My theme</div>\n    </ThemeProvider>\n  )\n}\n\nconst themeConfig = {\n  colors: {\n    primary: 'tomato',\n    secondary: 'khaki',\n    gray: 'lightslategray',\n  },\n}\n\nexport default theme(themeConfig)(Theme)\n```\n\n## Providing Components\n\nAs explained in the components API section, the `<ComponentsProvider>` is the component responsible for providing components to MDX and Docz to render your markdown files with. \n\nWith these components passed to the provider, you can change how your mdx file will be rendered and alter default behaviors and styles.\n\n```js\n// src/gatsby-theme-docz/index.js\nimport React from 'react'\nimport { theme, useConfig, ComponentsProvider } from 'docz'\nimport { ThemeProvider } from 'theme-ui'\n\nimport * as components from './ui'\n\nconst map = {\n  page: components.Page,\n  notFound: components.NotFound,\n  render: components.Render,\n  h1: components.H1,\n  h2: components.H2,\n  h3: components.H3,\n  h4: components.H4,\n  h5: components.H5,\n  h6: components.H6,\n  ul: components.List,\n  loading: components.Loading,\n  table: components.Table,\n  pre: components.Pre,\n  inlineCode: components.Code,\n}\n\nconst Theme = ({ children }) => {\n  const config = useConfig()\n  return (\n    <ThemeProvider theme={config}>\n      <ComponentsProvider components={map}>\n        {children}\n      </ComponentsProvider>\n    </ThemeProvider>\n  )\n}\n\nconst themeConfig = {\n  colors: {\n    primary: 'tomato',\n    secondary: 'khaki',\n    gray: 'lightslategray',\n  },\n}\n\nexport default theme(themeConfig)(Theme)\n```\n\nThis is powerful because it pushes you to think about your site as a set of base components \nand to create a default style for each one that will be used in all your documents while keeping your code DRY.\n\n## Getting data from documents\n\nBy now you should have a working site. But with the code above you will only see a single page without any link or information about the rest of your documents.\n\nHaving a way to navigate your documentation is essential in your documentation site.\n\nLet's create a `Menu` component by using the `useMenus` hook and the `<Link>` component.\n\nThe hook will give you information about all the menus' information parsed by Docz \nand the component will provide a way to navigate between them.\n\nAn example `Menu` component is shown below : \n\n```js\n// src/Menu.js\nimport React from 'react'\nimport { useMenus, Link } from 'docz'\n\nexport const Menu = () => {\n  const menus = useMenus()\n  return (\n    <ul>\n      {menus.map(menu => (\n        <li key={menu.id}>\n          <Link to={menu.route}>{menu.name}</Link>\n        </li>\n      ))}\n    </ul>\n  )\n}\n```\n\nThis will create a fully functional navigation menu to your documentation and you can then use the `<Menu />` component inside your theme:\n\n```js\n// src/gatsby-theme-docz/index.js\nimport React from 'react'\nimport { theme, useConfig, ComponentsProvider } from 'docz'\nimport { ThemeProvider } from 'theme-ui'\n\nimport { Menu } from './Menu'\nimport * as components from './my-components'\n\nconst map = {\n  page: components.Page,\n  notFound: components.NotFound,\n  render: components.Render,\n  h1: components.H1,\n  h2: components.H2,\n  h3: components.H3,\n  h4: components.H4,\n  h5: components.H5,\n  h6: components.H6,\n  ul: components.List,\n  loading: components.Loading,\n  table: components.Table,\n  pre: components.Pre,\n  inlineCode: components.Code,\n}\n\nconst Theme = ({ children }) => {\n  const config = useConfig()\n  return (\n    <ThemeProvider theme={config}>\n      <Menu />\n      <ComponentsProvider components={map}>\n        {children}\n      </ComponentsProvider>\n    </ThemeProvider>\n  )\n}\n\nconst themeConfig = {\n  colors: {\n    primary: 'tomato',\n    secondary: 'khaki',\n    gray: 'lightslategray',\n  },\n}\n\nexport default theme(themeConfig)(Theme)\n```\nYou can also use this component to create other things like a search component, link to custom pages or whatever else you would like.\n\n## Using documents settings\n\nAnother interesting thing that you can do when you're creating your own theme is to use the `componentMap`'s `<Page>` component to customize the document preview depending on each document's settings. \n\nEach document can have its own settings defined in the header of the `.mdx` file. \n\nThe `Page` component receives a prop called `doc` that contains the settings data. You can use this data to build your own variations of the rendered pages.\n\nFor example, suppose that you'd like to add a hero image to some documents and leave others unchanged. \n\nYou could do that by providing a `hero` property to your document, and then if that property is defined you would render a hero, else you would show the document as is.\n\nYour markdown would look something like this : \n\n```markdown\n<!-- \nhello-world.mdx\n-->\n---\nname: Hello world\nhero: /my/hero/img.png\n---\n\n# Hello world\n\nThis is a page!\n```\n\nAnd your `Page` component would look like the following : \n\n```js\n// src/ui/Page.js\nimport React from 'react'\n\nimport MyCoolHero from './MyCoolHero'\n\nexport const Page = ({ doc, children }) => (\n  <div>\n    {doc.hero && <MyCoolHero img={doc.hero} />}\n    {children}\n  </div>\n)\n```\n\nArmed with this knowledge, you can create many variations of your documents based on the data provided in your MDX.\n\n## Examples\n\nTo see an example of a theme, you can check the [source code](https://github.com/doczjs/docz/tree/master/core/gatsby-theme-docz/src) of `gatsby-theme-docz`.\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/customizing/customizing-webpack-config.mdx",
    "content": "---\nname: Customizing Webpack Config\nroute: /docs/customizing-webpack-config\nparent: Documentation\nmenu: Customizing\n---\n\n# Customizing docz's Webpack Configuration\n\nLet's assume we want to configure an alias so that instead of importing files from `../../components/Alert` we import from `@/components/Alert`.\n\nAnd another alias to allow us to replace relative paths like `import A from './src/components/Alert` with an absolute path `import A from 'components/Alert'`\n\nTo configure the webpack config we add a `gatsby-node.js` file at the root of the project and export `onCreateWebpackConfig` like we would normally do in a Gatsby app.\n\nYou can read more about configuring webpack with Gatsby [here](https://www.gatsbyjs.org/docs/add-custom-webpack-config/), see a small example below and a full working example [here](https://github.com/doczjs/docz/tree/master/examples/webpack-alias) : \n\n\n```js\n// gatsby-node.js\nconst path = require('path')\nexports.onCreateWebpackConfig = args => {\n  args.actions.setWebpackConfig({\n    resolve: {\n      // ⚠ Note the '..' in the path because the docz gatsby project lives in the `.docz` directory\n      modules: [path.resolve(__dirname, '../src'), 'node_modules'],\n      alias: {\n        '@': path.resolve(__dirname, '../src/components/'),\n      },\n    },\n  })\n}\n```"
  },
  {
    "path": "examples/with-algolia-search/src/docs/customizing/gatsby-theme.mdx",
    "content": "---\nname: Gatsby Theme\nroute: /docs/gatsby-theme\nparent: Documentation\nmenu: Customizing\n---\n\n# Gatsby Theme\n\nIf you want to use Docz in a Gatsby application, you can use `gatsby-theme-docz`.\n\nGatsby themes is one of the coolest features of all time in Gatsby. With the introduction of theming in Gatsby, it's easier than ever to get started building a Gatsby site. Shared functionality, data sourcing, and design can all be prepackaged as a Gatsby Theme that's an NPM install away.\n\nOur theme has all components and algorithms used to render your documentation website, with it we can explore a lot of Gatsby features and put all this things together in order\nto create a really useful documentation website.\nWith `gatsby-theme-docz` you can get the full power of docz in your existing Gatsby app.\n\nIf you're not sure what a Gatsby theme is, please read [the official docs](https://www.gatsbyjs.org/docs/themes/introduction/)\n\n## How to use\n\nFirst, install some packages:\n\n```\nyarn add gatsby gatsby-theme-docz@next docz@next react react-dom\n```\n\nThen set the `gatsby-theme-docz` in the `plugins` option inside your `gatsby-config.js`\n\n```js\n// gatsby-config.js\nmodule.exports = {\n  plugins: ['gatsby-theme-docz'],\n}\n```\n\nThen, add some `.mdx` in your project:\n\n```markdown\n---\nname: Hello world\nroute: /\n---\n\n# Hello world\n\nHello, I'm a mdx file!\n```\n\nNow just run gatsby in development mode:\n\n```bash\n$ yarn gatsby develop\n```\n\nIf everything works, you should see something like this:\n\n![Theme preview](https://cdn-std.dprcdn.net/files/acc_649651/Y825GV)\n\n## Configuration\n\nSet your config by using `doczrc.js` file ([see all available](https://www.docz.site/docs/project-configuration)) or if you want to\nset some defaults for your theme, use `options` in the plugin definition:\n\n```js\n// gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-theme-docz',\n      options: {\n        /* your custom options */\n      },\n    },\n  ],\n}\n```\n\n> We highly recommend that you set your configuration using `doczrc.js` because of live reload that will change in real time your project settings, if you set your configs using the theme definition you will need to reset your dev server in order to see your changes.\n\n## Dark Mode\n\nTo set the dark version as default, just set your `doczrc.js` like that:\n\n```js\n// doczrc.js\nexport default {\n  themeConfig: {\n    mode: 'dark',\n  },\n}\n```\n\n## Customizing components\n\nComponents shadowing is one of the best things included in the new Gatsby theme feature, with it, it is possible to replace theme files just by creating your own file following a file naming convention.\n\nExample: If you're using our `gatsby-theme-docz` which has a `Header` component located at `src/components/Header/index.js` you can override the component by creating `src/gatsby-theme-docz/components/Header/index.js`. Cool right?\n\n## Adding your logo\n\nSo, now that you know about how component shadowing works on Gatsby themes, if you don't want to override the entire `<Header>` component but just change your logo inside it, your can shadow the `<Logo>` component used in the header just by creating your own at `src/gatsby-theme-docz/components/Logo/index.js`\n\n```js\n// src/gatsby-theme-docz/components/Logo/index.js\nimport React from 'react'\nimport logo from './logo.svg'\n\nexport const Logo = () => <img src={logo} alt=\"That's my logo\" />\n```\n\nEasy, right?\n\n## Creating your own Docz theme\n\nOne of the coolest thing of Docz is that you can create your own theme if you want from scratch and keep all docz's benefits.\n\nPreviously, this was accomplished by using the `theme` property inside the `doczrc.js` file.\n\nStarting from v2, if you want to create your own theme, just create a file located at `src/gatsby-theme-docz/index.js`\n\n```js\nimport React from 'react'\nimport { theme, useConfig, ComponentsProvider } from 'docz'\nimport { ThemeProvider } from 'theme-ui'\nimport baseComponents from 'gatsby-theme-docz/src/components'\n\nimport { Menu } from './MyBeautifulMenu'\n\nconst componentsMap = {\n  ...baseComponents,\n  /* your custom components */,\n}\n\nconst Theme = ({ children }) => {\n  const config = useConfig()\n  return (\n    <ThemeProvider theme={config}>\n      <Menu />\n      <ComponentsProvider components={componentsMap}>\n        {children}\n      </ComponentsProvider>\n    </ThemeProvider>\n  )\n}\n\nconst themeConfig = {\n  colors: {\n    primary: 'tomato',\n    secondary: 'khaki',\n    gray: 'lightslategray',\n  },\n}\n\nexport default theme(themeConfig)(Theme)\n```\n\nMore info about [here](/docs/creating-your-themes)\n\n## Wrapping the entire app\n\nSometime you need to wrap your entire application in order to add some `Provider` or just to load some script. You can do this easily inside our theme by creating a file located at `src/gatsby-theme-docz/wrapper.js`\n\n```js\n// src/gatsby-theme-docz/index.js\nimport React from 'react'\n\nexport default ({ children }) => (\n  <div>\n    <h1>My custom wrapper</h1>\n    {children}\n  </div>\n)\n```\n\n## Theme UI integrated\n\nDocz's code uses [Theme-UI](https://theme-ui.com/) as the default theme system.\n\n[Theme-UI](https://theme-ui.com/) is a library for building consistent, themeable React apps based on constraint-based design principles.\n\nYou can modify the default theme and create your own style by combining these modifications with component shadowing.\n\nCheck our [base theme object](https://github.com/pedronauck/docz/blob/feat/gatsby/core/gatsby-theme-docz/src/theme/index.js) to see the properties.\n\nTo create your own theme definition use the `doczrc.js` and set your properties in the `themeConfig` like that:\n\n```js\n// doczrc.js\nexport default {\n  themeConfig: {\n    colors: {\n      header: {\n        bg: 'tomato',\n      },\n    },\n  },\n}\n```\n\nOr, to create your own theme, just create this file in the root of your project: `src/gatsby-theme-docz/theme/index.js`.\n\n```js\nimport baseTheme from 'gatsby-theme-docz/src/theme'\nimport { merge } from 'lodash/fp'\n\nexport default merge(baseTheme, {\n  colors: {\n    header: {\n      bg: 'tomato',\n    },\n  },\n})\n```\n\n## Changing code highlight\n\nBoth code highlights shortcodes and the `<Playground>` component use [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer) to highlight the code.\nIf you want to modify and use another PrismJS theme, you can do that just passing a `prismTheme` property for your theme.\n\n```js\n// doczrc.js\nimport myCustomPrismTheme from './my-prism-theme'\n\nexport default {\n  themeConfig: {\n    prismTheme: myCustomPrismTheme,\n  },\n}\n```\n\nOr you want to have different themes for `light` and `dark` color mode, you can change the `prism` default property like that:\n\n```js\n// doczrc.js\nimport customLightTheme from './my-light-theme'\nimport customDarkTheme from './my-dark-theme'\n\nexport default {\n  themeConfig: {\n    prism: {\n      light: customLightTheme,\n      dark: customDarkTheme,\n    },\n  },\n}\n```\n\n## Adding component shortcodes\n\nYou can add shortcodes to your docs site which can be used throughout\nyour docs pages by extending the components passed to MDXProvider. You\ncan do this by using component shadowing and creating the following file\nin the root of your project: `src/gatsby-theme-docz/components/index.js`.\n\n### Example `components.js`\n\n```js\nimport baseComponents from 'gatsby-theme-documentation/src/components'\nimport MyCustomH1 from '../components/my-custom-h1'\n\nexport default {\n  ...baseComponents,\n  h1: MyCustomH1,\n}\n```\n\n## Getting data\n\nUsing our Gatsby Theme you can use all Gatsby hooks to get data for your pages and from Gatsby.\nSo, you can create isolated pages on Gatsby using gatsby pages and get data from Docz or maybe pass data\nfor your Docz documents using source from gatsby.\n\nImagine, that you have your home page inside `/pages` and you want to show all documents parsed from Docz. You can get this by doing:\n\n```js\nimport React from 'react'\nimport { useDocs } from 'docz'\n\nconst Home = () => {\n  const docs = useDocs()\n  return <div>{/* my coolest home */}</div>\n}\n\nexport default Home\n```\n\nOr you can have a mdx document inside Docz that has data from Gatsby too:\n\n```markdown\n---\nname: MyDoc\n---\n\nimport { MyComponentWithSomeData } from './my-component-with-data'\n\n<MyComponentWithSomeData />\n```\n\nCool right?\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/customizing/powered-by-gatsby.mdx",
    "content": "---\nname: Powered by Gatsby\nroute: /docs/powered-by-gatsby\nparent: Documentation\nmenu: Customizing\n---\n\n# Powered by Gatsby\n\n[Gatsby](https://gatsbyjs.org) is a blazing fast modern site generator for React and one of the greatest modern tools\nof the new frontend era. It has a huge ecosystem and community around it and a very talented team behind it.\n\nStarting from v2, docz's core is entirely built around Gatsby, this is the biggest change\nin the project since its creation and one of the best things that we could make for the tool.\n\nUsing Gatsby as bundler behind the scenes gives you a lot of benefits like :\n\n* Stay focused on creating features instead of worrying about bundler management\n* Static and optimized builds by default\n* Fast dev-experience and better workflow\n* Huge ecosystem of tools, plugins and community\n* Better and easy way to customize things inside Docz\n\n## Gatsby API and Hooks\n\nGatsby has an extensive [API for developers](https://www.gatsbyjs.org/docs/api-reference/) and a lot of hooks and lifecycle methods that you can use in order to customize your build process.\n\nYou can hook into it in a lot of ways and all of these hooks and properties are available when you use docz.\n\n> Check [the Gatsby API reference](https://www.gatsbyjs.org/docs/api-reference/) here.\n\nIf you want to use any of those Gatsby configurations file inside your Docz project,\ncreate it in the root and docz will do the rest.\n\nIf you want to make some changes to your webpack configuration, you can use\nthe `onCreateWebpackConfig` hook by exporting a function from the `gatsby-node.js` file.\n\nFor example to create aliases or change how your modules are resolved, you can do something like the below example :\n\n```js\n// gatsby-node.js\nconst path = require('path')\n\nexports.onCreateWebpackConfig = args => {\n  args.actions.setWebpackConfig({\n    resolve: {\n      modules: [path.resolve(__dirname, '../src'), 'node_modules'],\n      alias: {\n        '@': path.resolve(__dirname, '../src/components/'),\n      },\n    },\n  })\n}\n```\n\n> ⚠ Note the '..' in the path because the docz gatsby project lives in the `.docz` directory\n\nOr if you want to change your Babel configuration you can use the `onCreateBabelConfig` hook for this:\n\n```js\n// gatsby-node.js\nexports.onCreateBabelConfig = ({ actions }) => {\n  actions.setBabelPlugin({\n    name:  `@emotion/babel-plugin`,\n    options: {\n      sourceMap: true,\n    },\n  })\n}\n```\n\nYou can use these hooks and actions to modify or get information about your bundler process.\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/general/built-in-components.mdx",
    "content": "---\nname: Built-in components\nroute: /docs/built-in-components\nparent: Documentation\nmenu: General\n---\n\n# Built-in components\n\nDocz has built-in components that help you document your code. \n\nUsing the power of components and their parsed ASTs ([Abstract Syntax Trees](https://en.wikipedia.org/wiki/Abstract_syntax_tree)) \nwe can do a lot of things, like render your components, create tables with content describing them, generate documentation from your code, define custom getters by traversing your files and many other things.\nThe sky is the limit here!\n\n## Playground Component\n\nWith the `<Playground>` component, you can render your component inside a live-editable playground and directly see the output of the code used:\n\n```markdown\n---\nname: Button\nroute: /\n---\n\nimport { Playground } from 'docz'\nimport { Button } from './Button'\n\n# Button\n\n## Basic usage\n\n<Playground>\n  <Button>Click me</Button>\n  <Button kind=\"secondary\">Click me</Button>\n</Playground>\n```\n\n![Page showing two buttons and their code inside an editable playground](https://cdn-std.dprcdn.net/files/acc_649651/hrRpoR)\n\nAs you can see, `<Playground>` renders your components, and right below them displays an editable version of the code used.\nThis can be very useful to test and develop your components in a good environment while also documenting them. \n\nNote that you can edit the code below the components from your browser and see the changes you make be reflected live above it!\n\n## Component Props\n\nOne of the most important things when documenting a component is to know which props it expects.\n\nHowever, keeping a good properties documentation for your component can be difficult and error-prone, because you need to write\nthe props specification and maintain the original props definition separately. This makes it hard to keep them both in sync !\n\nDocz offers a solution to this problem called the `<Props>` component. It's a component that automatically gets the\nprops definitions of your component and displays them in a neat table along with their default value and an optional description.\n\nIn addition to supporting parsing `prop-types` in JS code, it works nicely with Flow and Typescript.\n\n```markdown\n---\nname: Button\nroute: /\n---\n\nimport { Playground, Props } from 'docz'\nimport { Button } from './'\n\n# Button\n\n<Props of={Button} />\n\n## Basic usage\n\n<Playground>\n  <Button>Click me</Button>\n  <Button kind=\"secondary\">Click me</Button>\n</Playground>\n```\n\nThe Button component must have some annotation describing its props. \n\nFor non flow or typescript users this can be achieved with [`prop-types`](https://www.npmjs.com/package/prop-types)\n\n```jsx\nimport React from 'react'\nimport t from 'prop-types'\n\nconst Button = ({ children, kind }) => {\n  // We use the kind prop to determine the button's class\n  return <button className={kind}>{children}</button>\n}\n\nButton.propTypes = {\n  /**\n   * This is a pretty good description for this prop.\n   */\n  kind: t.oneOf(['primary', 'secondary', 'cancel', 'dark', 'gray']),\n}\nButton.defaultProps = {\n  kind: 'primary',\n}\nexport Button\n```\n\nIf you have used `prop-types` like described above, you should see a list of properties in a nicely formatted table:\n\n![Table describing Button's props ](https://cdn-std.dprcdn.net/files/acc_649651/KEm5mH)\n\nThe same can be achieved in typescript by adding comments to the props interface of your component:\n\n```jsx\nimport React from 'react'\n\ninterface ButtonProps {\n  /**\n   * This is a pretty good description for this prop.\n   */\n  kind: 'primary' | 'secondary' | 'cancel' | 'dark' | 'gray'\n}\n```\n\nYou can read a more in-depth guide about our built-in components in [**Components API**](/docs/components-api). \n\nAnd if you prefer to dive deeper into MDX document settings you can head over to [**Document Settings**](/docs/document-settings)\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/general/deploying-your-docs.mdx",
    "content": "---\nname: Deploying your docs\nroute: /docs/deploying-your-docs\nparent: Documentation\nmenu: General\n---\n\n# Building your site\n\nNow that you know about writing your docs, let's talk about how you can build and deploy your documentation.\nThe first thing that you need to do is run the build script created in your `package.json`:\n\n```bash\n$ yarn docz:build\n```\n\nIf everything goes well, this command will generate all static files for you in the `.docz/dist` folder and you will see something like this in your terminal:\n\n![Preview](https://cdn-std.dprcdn.net/files/acc_649651/qIFhkT)\n\nWith your static files in hand, you can deploy your documentation wherever you want just like you do with any static site.\n\n## Changing build folder\n\nYou can change the build destination folder by changing the `dest` prop on your project configuration:\n\n```js\n// doczrc.js\nexport default {\n  dest: '/my-dist-folder',\n}\n```\n\n## Changing base folder\n\nIf you are using something like [GitHub Pages](https://pages.github.com/) chances are that you are not deploying your site directly under the root of your user. For example if you have a `docz`-repository on your GitHub the URL for deploying that repository will be `https://your-username.github.io/docz`. You can specify in which subdirectory your files will be deployed with the `base`-property of `doczrc.js`.\n\n```js\n// doczrc.js\nexport default {\n  base: '/docz',\n}\n```\n\n## Using Netlify\n\nIf you understand nothing about deploys, we highly recommend that you use the service we're using to host this website that you're seeing, called [Netlify](http://netlify.com/). Netlify is a really fantastic and easy tool that allows you to deploy your application in an automatic way by running the deploy on every push from a branch in seconds.\n\nFirst, after login or create a new account on Netlify, just create a _New site from git_:\n\n![Preview](https://cdn-std.dprcdn.net/files/acc_649651/YTCDFn)\n\nConnect your Git service and pick some repository:\n\n![Preview](https://cdn-std.dprcdn.net/files/acc_649651/cc2g4u)\n\nAfter that, just fill settings like below, passing your build command and the destination folder:\n\n![Preview](https://cdn-std.dprcdn.net/files/acc_649651/3uvA9J)\n\nFinally, add a file `netlify.toml` to your project's root folder with the following contents:\n\n```toml\n# COMMENT: This a rule for Single Page Applications as Docz site is one\n[[redirects]]\n  from = \"/*\"\n  to = \"/\"\n  status = 200\n```\n\nThat's all. Now you have your documentation hosted on a domain with a quick and easy deploy process configured.\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/general/document-settings.mdx",
    "content": "---\nname: Document settings\nroute: /docs/document-settings\nparent: Documentation\nmenu: General\n---\n\n# Document settings\n\nDocument settings provide a way to enrich documents with metadata used to generate your documentation site.\n\nThey are defined at the top of the `.mdx` file, use YAML and can be used to customize your pages by passing this data to your theme.\n\nEvery document has **three** main properties that can be overriden :\n\n```markdown\n---\nname: My Document\nroute: /custom-route\nmenu: Documents\n---\n```\n\n- `name` The name of your document, used as the title of the page\n- `route *(optional)*` The route or path to your document's generated page. e.g. /docs/my-component\n\n> If you don't pass any here, docz will create a slug using the filepath of your file as route. e.g. /src-components-my-components/\n\n- `menu  *(optional)*` The menu within which your document is contained. It allows you to group documents into a single menu by changing this prop.\n\n## Custom properties\n\nThe built in properties are for docz but docz is extensible and you can create your own themes which could need different properties.\n\nCustom properties can be set in the document settings and they will automatically be parsed.\n\nFor example you could define a property called `fullpage` to define whether your document is a page with `100%` width or not:\n\n```\n---\nname: My Document\nfullpage: true\n---\n```\n\nYou could then use this property when overriding or creating a theme as shown in [**Creating your themes: Using documents settings**](/docz/creating-your-themes#using-documents-settings)\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/general/getting-started.mdx",
    "content": "---\nname: Getting started\nroute: /\nparent: Documentation\nmenu: General\n---\n\n# Getting Started\n\n## Start a New Project\n\nUse create-docz-app to quickly get started :\n\n```sh\nnpx create-docz-app my-docz-app\n# or\nyarn create docz-app my-docz-app --example typescript\n```\n\nMake sure to check out [docz's `examples` directory](https://github.com/doczjs/docz/tree/master/examples) for the full list of supported examples.\n\n## Add Docz to an Existing Project\n\n> Make sure you have `react` and `react-dom` with versions `>= 16.8.0` installed as dependencies.\n\nStart by adding **Docz** as a dependency :\n\n```sh\nyarn add docz@next # react react-dom\n```\n\nor\n\n```sh\nnpm add docz@next # react react-dom\n```\n\nAfter installing Docz in your project, you may find it convenient to add three scripts to your `package.json` to run, build and serve your Docz website.\n\nNote that this is an **optional step** :\n\n```json\n{\n  \"name\": \"next-gen-documentation\",\n  \"scripts\": {\n    \"docz:dev\": \"docz dev\",\n    \"docz:build\": \"docz build\",\n    \"docz:serve\": \"docz build && docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"react\": \"16.8.0\",\n    \"react-dom\": \"16.8.0\"\n  }\n}\n```\n\nYou can now spin up your dev server by running:\n\n```bash\nyarn docz:dev # or yarn docz dev\n```\n\nor\n\n```bash\nnpm run docz:dev\n```\n\n## Develop\n\nWith your dev server up, you can start writing your documentation.\n\nDocz uses the [**MDX**](https://mdxjs.com/) format that allows you to seamlessly write JSX inside your markdown files.\n\n> Note that you **don't need to follow any file architecture or convention**.\n> You can just create your `.mdx` files and put them **anywhere in your project**.\n\nWith that in mind, let's create our first `.mdx` and give it a name and a route:\n\n```markdown\n---\nname: Hello world\nroute: /\n---\n\n# Hello world\n\nHello, I'm a mdx file!\n```\n\nWith your first `.mdx` document created, you can open your browser and visit `localhost:3000` to see something like this:\n\n![Preview](https://cdn-std.dprcdn.net/files/acc_649651/Y825GV)\n\nWe cover more of what you can do with _MDX_ in the [**Writing MDX**](/docs/writing-mdx) page.\n\n## Build\n\n`yarn docz build` will generate a static site for your site in `.docz/dist/`.\n\nYou can try it out with `yarn docz serve` or by serving the generated site with your favorite static file server (e.g. `npx serve .docz/dist`).\n\nYou can have `yarn docz build` emit to a different directory by providing a path to the `dest` field in your doczrc.js or from the command line : `yarn docz build --dest docs-site-directory`.\n\n## Deploy\n\nThe output of docz consists of static assets only. This allows you to deploy your generated `docz` site with any static site hosting provider you'd like.\n\nStart by building your site with `yarn docz build`, if you haven't provided a `dest` flag to your config then you will find your generated files in `.docz/dist` that you can copy to your server to deploy your site.\n\n## Examples\n\nYou can check the complete list of docz examples [here](https://github.com/doczjs/docz/tree/master/examples).\n\n## Migration Guide\n\nThis documentation is about **Docz v2**.\n\nIf you need to migrate your Docz project, please read the [**Migration Guide**](/docs/migration-guide).\n\nIf you are looking for documentation for v1 you can find it [**here**](https://docz-v1.surge.sh/).\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/general/introduction.mdx",
    "content": "---\nname: Introduction\nroute: /docs/introduction\nparent: Documentation\nmenu: General\n---\n\n# Introduction\n\nDocumenting code is one of the most important and time-heavy processes when developing software.\n\nA lot of time is spent on building and maintaining custom documentation sites.\n\n**Docz** was created to solve this problem.\n\nDocz enables you to quickly create live-reloading, seo-friendly, production-ready documentation sites with MDX and customize the look, feel and behavior when required by leveraging GatsbyJS and Gatsby theme shadowing.\n\n## Principles\n\nWe started by looking over the options available when you want to create your design system or document your project. We borrowed the best ideas from each and came up with the following guiding principles :\n\n- **Zero config and easy to learn.** Avoid unnecessary build steps with confusing setups.\n- **Blazing fast.** Built with performance in mind from the start.\n- **Easy to customize.** Create something that will be easy to use and customize.\n- **MDX based.** Use the best standard for writing documentation.\n\nNow that you know the core principles of Docz. Let's [get started](/docs/getting-started)!\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/general/usage-in-monorepo.mdx",
    "content": "---\nname: Usage in monorepo\nroute: /docs/usage-in-monorepo\nparent: Documentation\nmenu: General\n---\n\n# Implementing in monorepo\n\nWhen installing Docz in a monorepo environment you might need some extra steps to get everything working correctly.\n\nLet's say we have a lerna monorepo with workspaces defined as: `packages/**/*`, in a folder structure it would look like this:\n\n```\npackages/\n├─ components/\n└─ portal/\n   └─ package.json\n```\n\nDocz and `@foo/component` would be a dependency in `portal/package.json`. As Docz copies over this `package.json` to `portal/.docz/package.json`\nyou might run into `error There are more than one workspace with name \"@foo/portal\"`. In order to fix this add\na couple lines to your `portal/package.json`:\n\n```\n// portal.package.json\n{\n  \"private\": true,\n  \"workspaces\": [\n    // needed to resolve @foo/components in portal/package.json\n    \"../../packages/**/*\",\n    // needed to resolve @foo/components in portal/.docz/package.json\n    \"../../../packages/**/*\"\n  ]\n}\n```\n\nYou might need to tweak these paths to match your monorepo structure.\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/general/usage-with-css-preprocessors.mdx",
    "content": "---\nname: Usage with CSS Preprocessors\nroute: /docs/usage-with-css-preprocessors\nparent: Documentation\nmenu: General\n---\n\n# Using docz with CSS Preprocessors\n\nMost configuration is from version 2 handled by Gatsby, and CSS preprocessing is no exception. Gatsby uses a range of [**Plugins**](https://www.gatsbyjs.org/plugins/) to handle things like `sass`, `less` and `postcss`. Gatsby supports CSS Modules out of the box.\n\nThese plugins are added by adding a `gatsby-config.js` in your project root or modifying an existing one. For example if you want to add support for `sass` you would do the following:\n\n1. Install [`node-sass`](https://github.com/sass/node-sass) and [`gatsby-plugin-sass`](https://www.gatsbyjs.org/packages/gatsby-plugin-sass/)\n```bash\n# npm\nnpm install --save node-sass gatsby-plugin-sass\n\n# yarn\nyarn add node-sass gatsby-plugin-sass\n```\n\n2. Add the plugin to your `gatsby-config.js`\n```js\n//gatsby-config.js\nmodule.exports = {\n  plugins: ['gatsby-plugin-sass']\n}\n```\nYou should now be able to use `sass` in your components!\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/general/usage-with-typescript.mdx",
    "content": "---\nname: Usage with TypeScript\nroute: /docs/usage-with-typescript\nparent: Documentation\nmenu: General\n---\n\n# Using docz with Typescript\n\nTo use docz with TypeScript codebase you need to add `typescript: true` to your `doczrc.js`, the rest will be setup by _docz_.\n\n```js\nexport default {\n  typescript: true,\n}\n```\n\n# Documenting Props in TypeScript\n\nAs mentioned in [**Built-in components**](/docs/built-in-components) the `<Props/>`-component is used to automatically document your components props assuming you have the correct comments on your components like below.\n\n```js\ninterface ButtonProps {\n  /**\n   * A description of the prop that you seem fit :)\n   */\n  kind: 'primary' | 'secondary' | 'cancel' | 'dark' | 'gray';\n}\n```\n\nThe typescript parser can be a bit fussy sometimes (and we are working on it) so if your typescript-files are not being found you may have to write out the full path with the file ending. If this doesn't do the trick you can try checking if using `default` exports or `named` exports are the problem.\n\n```js\nimport { Props } from 'docz'\nimport Button from './Button.tsx'\n\n// Button Props\n\n;<Props of={Button} />\n```\n\n# Advanced configuration\n\nIf you have particular needs or need to control exactly which files are being picked up or if you want to tap into the parser that creates the documentation there are two properties on the `doczrc.js` that you can use: `filterComponents` and `docgenConfig` (some use cases explained [here](https://github.com/doczjs/docz/issues/827))\n\n```js\nexport default {\n  filterComponents: files =>\n    //This overrides the default filtering of components\n    files.filter(filepath => /[\\w-]+.(?:j|t)sx?$/.test(filepath)),\n}\n```\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/general/writing-mdx.mdx",
    "content": "---\nname: Writing MDX\nroute: /docs/writing-mdx\nparent: Documentation\nmenu: General\n---\n\n# Writing MDX\n\nMDX is an authorable format that lets you seamlessly use JSX in your Markdown documents. You can import components, like interactive charts\nand embed them within your content. This makes writing long-form content with components a blast.\n\nMore details about MDX in the [Official website.](https://mdxjs.com/)\n\n## Working with components\n\nFor now, you only need to know that with MDX you can use your components inside markdown.\nBut how? Let's take a look at how we can improve our `.mdx` file created previously by importing and using a component inside it. \n\nThe example below assumes we have an exported component named `Button` in a file named `Button.jsx`/`Button.tsx` located in the same folder as the `.mdx` file we are editing.\n\n```mdx\n---\nname: Hello world\n---\n\nimport { Button } from './Button'\n\n# Hello world\n\nHello, I'm still a mdx file, but now I have a button component !\n\n<Button onClick={() => { alert(\"You clicked me\"); }}>Click me</Button>\n```\n\nAnd, if you do have a `Button` component to import, you'll see something like this:\n\n![Documentation site showing a rendered button along with Markdown](https://cdn-std.dprcdn.net/files/acc_649651/Fgbg4F)\n\nWith MDX you can mix _React Components_ or _html-elements_ with regular markdown allowing you to either document your own components _or_ create helper components that make documentation easier. \n\n**Docz** comes with some helper components that will help you document your components faster, these are covered in [**Built-in components**](/docs/built-in-components).\n\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/references/components-api.mdx",
    "content": "---\nname: Components & Hooks API\nroute: /docs/components-api\nparent: Documentation\nmenu: References\n---\n\n# Components & Hooks API\n\n> ### Note\n>\n> By default, these components and hooks only work inside a Docz theme, because they rely on a lot of data fetched by docz at build-time.\n\n---\n\n## `<ComponentsProvider>`\n\nUse this provider to pass your components to MDX and they will be used when converting your markdown to html.\n\n```js\nimport React from 'react'\nimport { ComponentsProvider, theme } from 'docz'\n\nimport MyCoolSidebar from './my-cool-sidebar'\nimport * as components from './my-component-list'\n\nconst map = {\n  page: components.Page,\n  h1: components.H1,\n  h2: components.H2,\n  pre: components.Pre,\n}\n\nconst Theme = theme(({ children }) => (\n  <div>\n    <MyCoolSidebar />\n    <ComponentsProvider components={map}>\n      {children}\n    </ComponentsProvider>\n  </div>\n))\n```\n\n### Properties\n\n- **components:** `ComponentsMap`<br />\n  This map is responsible to render components inside your compiled `.mdx`\n\n### Type Definitions\n\n```ts\ninterface ComponentsMap {\n  loading?: CT\n  layout?: CT<LayoutProps>\n  notFound?: CT<RouteComponentProps<any>>\n  playground?: PlaygroundComponent\n  h1?: CT<any> | string\n  h2?: CT<any> | string\n  h3?: CT<any> | string\n  h4?: CT<any> | string\n  h5?: CT<any> | string\n  h6?: CT<any> | string\n  span?: CT<any> | string\n  a?: CT<any> | string\n  ul?: CT<any> | string\n  table?: CT<any> | string\n  pre?: CT<any> | string\n  code?: CT<any> | string\n  inlineCode?: CT<any> | string\n  [key: string]: any\n}\n\ninterface ComponentsProviderProps = {\n  components: ComponentsMap\n}\n\nexport const ComponentsProvider: React.FC<ComponentsProviderProps>\n```\n\n---\n\n## `<Playground>`\n\nUsed to render your component inside a playground and show an editable version of your code inside it.\n\n### Properties\n\n`none`\n\n### Type Definitions\n\n```ts\ninterface PlaygroundProps {\n  children: React.ReactNode | () => React.ReactNode | React.ReactNode[]\n}\n```\n\n---\n\n## `<Props>`\n\nComponent that takes a component and generates a table of properties based on your properties definitions.\n\n```markdown\n---\nname: MyComponent\n---\n\nimport { Props } from 'docz'\nimport MyComponent from './MyComponent'\n\n<Props of={MyComponent} />\n```\n\n### Descriptions\n\nYou can add descriptions for your props by adding a comment on the line above the prop.\n\n> Note: Description comments must be in the format `/** Description */`.\n\n```js\nMyComponent.propTypes = {\n  /** The description for myProp */\n  myProp: PropTypes.string,\n}\n```\n\n### Properties\n\n- **of:** `React.ComponentType<any>`\n\n---\n\n## `useComponents`\n\nHook responsible for accessing the components map passed as a prop to the `<ComponentsProvider>` of your theme.\n\n```js\nimport { useComponents } from 'docz'\n\nconst App = () => {\n  const components = useComponents()\n  return /* ... */\n}\n```\n\n### Params\n\n`none`\n\n### Return\n\n- components: `ComponentsMap`\n\n---\n\n## `useDocs`\n\nUse this hook to get the list of all parsed documents. It can be useful when you want to create something like a menu or a list.\n\n```js\nimport { useDocs, Link } from 'docz'\n\nconst App = () => {\n  const docs = useDocs()\n  return (\n    <MyMenu>\n      {docs.map(doc => (\n        <Link key={doc.id} to={doc.route}>\n          {doc.name}\n        </Link>\n      ))}\n    </MyMenu>\n  )\n}\n```\n\n### Params\n\n`none`\n\n### Return\n\n- docs: `Docs[]`<br />\n  All documents parsed by docz\n\n### Typings Definitions\n\n```ts\ninterface Docs {\n  id: string\n  filepath: string\n  link: string | null\n  slug: string\n  name: string\n  route: string\n  menu: string | null\n  headings: Heading[]\n  [key: string]: any\n}\n\nexport function useDocs(): Docs[]\n```\n\n---\n\n## `useMenus`\n\nThis hook will return the menu built by Docz using your documents.\nUse this to quickly get your menus or use `useDocs` if you want the documents ordered in the order of your project configuration.\n\n```js\nimport { useMenus } from 'docz'\n\nconst App = () => {\n  const menus = useMenus()\n  return /* ... */\n}\n```\n\n### Params\n\n- **options**: `Object`\n  - `query: String` Use `query` to filter menu results. The query is matched against the menu headers, not page content.\n\n### Return\n\n- **menus:** `MenuItem[]`\n\n### Type Definitions\n\n```ts\nexport interface MenuItem {\n  id: string\n  name: string\n  route?: string\n  href?: string\n  menu?: MenuItem[]\n  order?: number\n  parent?: string\n}\n\nexport function useMenus(opts: UseMenuOpts): MenuItem[]\n```\n\n---\n\n## `useConfig`\n\nRetrieve the project config object passed on your project configuration.\nBy default, Docz merges your `themeConfig` object with the default theme config of each theme.\n\n```js\nimport React from 'react'\nimport { useConfig } from 'docz'\n\nconst MyDeepComponentInsideMyTheme = () => {\n  const config = useConfig()\n  return /* ... */\n}\n```\n\n### Properties\n\n`none`\n\n### Return\n\n- **config:** `Config`\n\n### Type Definitions\n\n```ts\nexport type ThemeConfig = Record<string, any>\nexport interface Config {\n  title: string\n  description: string\n  themeConfig: ThemeConfig\n  menu: MenuItem[]\n  version: string | null\n  repository: string | null\n  native: boolean\n  separator: string\n  codeSandbox: boolean\n  linkComponent?: React.ComponentType<any>\n}\n\nexport function useConfig(): Config\n```\n\n---\n\n## `theme()`\n\nIf you want to create your custom theme you need to use the `theme()` function.\nIt's a Higher Order Component that receives a `config` property as the first parameter\nand returns a function that receives your theme component as a parameter:\n\n```js\nimport React from 'react'\nimport { theme, DocPreview } from 'docz'\n\nconst Theme = () => (\n  <div>\n    <MyCoolestSidebar />\n    <DocPreview />\n  </div>\n)\n\nconst themeConfig = {\n  /* ... */\n}\n\nexport default theme(themeConfig)(Theme)\n```\n\n### Type Definitions\n\n```ts\nimport { ComponentType, ReactNode } from 'react'\n\ninterface ThemeConfig {\n  [key: string]: any\n}\n\nfunction theme(config: ThemeConfig): (Component: ComponentType) => ReactNode\n```\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/references/creating-plugins.mdx",
    "content": "---\nname: Creating Plugins\nroute: /docs/creating-plugins\nparent: Documentation\nmenu: References\n---\n\n# Creating Plugins\n\nPlugins give you the ability to modify Docz processes, default configurations and create hooks for build and render. This is a perfect place to integrate Docz with other tools.\n\nTo create a plugin you just need to use the `createPlugin` method from [docz-core](https://github.com/pedronauck/docz/tree/master/packages/docz-core)\n\n```js\nimport { createPlugin } from 'docz-core'\n\nconst myPlugin = () => createPlugin({\n  setConfig: (config) => /* ... */,\n  onCreateBabelConfig: (args) => /* ... */,\n  onCreateDevServer: (args) => /* ... */,\n  onCreateWebpackConfig: (args) => /* ... */,\n  modifyFiles: (files, args) => /* ... */,\n  modifyEntry: (args) => /* ... */,\n  onPreBuild: () => /* ... */,\n  onPostBuild: () => /* ... */,\n})\n```\n\n## `setConfig`\n\nUse to modify or create custom project configurations.\n\n#### Params\n\n- **config:** Default [configuration object](http://localhost:3000/docs/project-configuration)\n\n#### Return\n\n- `Config`\n\n---\n\n## `onCreateWebpackConfig`\n\nLet plugins extend/mutate the site’s webpack configuration.\n\nSee also the documentation for [setWebpackConfig]().\n\n#### Params\n\n`stage {string}`\nThe current build stage. One of ‘develop’, ‘develop-html’, ‘build-javascript’, or ‘build-html’\n\n`getConfig {function}`\nReturns the current webpack config\n\n`rules {object}`\nA set of preconfigured webpack config rules\n\n`loaders {object}`\nA set of preconfigured webpack config loaders\n\n`plugins {object}`\nA set of preconfigured webpack config plugins\n\n`actions {object}`\n\n#### Example\n\n```js\nexports.onCreateWebpackConfig = ({\n  stage, getConfig, rules, loaders, actions\n}) => {\n  actions.setWebpackConfig({\n    module: {\n      rules: [\n        {\n          test: 'my-css',\n          use: [loaders.style(), loaders.css()]\n        },\n      ],\n    },\n  });\n}\n```\n\n---\n\n## `onCreateBabelConfig`\n\nUse to modify babelrc configuration\n\n#### Params\n\n`stage {string}`\nThe current build stage. One of ‘develop’, ‘develop-html’, ‘build-javascript’, or ‘build-html’\n\n`getConfig {function}`\nReturns the current webpack config\n\n`rules {object}`\nA set of preconfigured webpack config rules\n\n`loaders {object}`\nA set of preconfigured webpack config loaders\n\n`plugins {object}`\nA set of preconfigured webpack config plugins\n\n`actions {object}`\n\n#### Example\n\n```js\nexports.onCreateBabelConfig = ({\n  stage, getConfig, rules, loaders, actions\n}) => {\n  actions.setBabelPlugin({\n    name:  `@emotion/babel-plugin`,\n    options: {\n      sourceMap: true,\n    },\n  })\n}\n```\n\n---\n\n## `modifyFiles`\n\nUse to modify mdx files before parsing\n\n#### Params\n\n- **files:** Files parsed by Docz\n- **args:** The Docz config object merged with argv\n\n#### Return\n\n- `string[]`\n\n#### Types definitions\n\n```ts\nexport type ModifyFiles = (files: string[], args: Config) => string[]\n```\n\n---\n\n## `modifyEntry`\n\nUse to modify files entry after created\n\n#### Params\n\n- **entry:** files entry by Docz\n- **args:** The Docz config object merged with argv\n\n#### Return\n\n- `Entry`\n\n#### Types definitions\n\n```ts\nexport type ModifyEntry = (entry: Entry, args: Config) => Entry\n```\n\n---\n\n## `onCreateDevServer`\n\nRun when gatsby develop server is started, its useful to add proxy and middleware to the dev server app\n\n#### Params\n\n- `app {Express}`\nThe Express app used to run the dev server\n\n#### Example\n\n```js\nexports.onCreateDevServer = ({ app }) => {\n  app.get('/hello', function (req, res) {\n    res.send('hello world')\n  })\n}\n```\n\n---\n\n## `onPreBuild`\n\nMethod triggered before the build process\n\n#### Params\n\n- **config:** Default bundler configuration object\n\n#### Return\n\n- `void`\n\n#### Type definitions\n\n```ts\ntype OnPreBuild<C = any> = (config: C) => void\n```\n\n---\n\n## `onPostBuild`\n\nMethod triggered after the build process\n\n#### Params\n\n- **config:** Default bundler configuration object\n\n#### Return\n\n- `void`\n\n#### Type definitions\n\n```ts\ntype onPostBuild<C = any> = (config: C) => void\n```\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/references/mdx-plugins.mdx",
    "content": "---\nname: MDX Plugins\nroute: /docs/mdx-plugins\nparent: Documentation\nmenu: References\n---\n\n# Using MDX Plugins\n\nSince MDX uses the [remark](https://github.com/remarkjs/remark)/[rehype](https://github.com/rehypejs/rehype) ecosystems, you can use plugins to modify your documents' AST on different stages of the process in order to make your documentation better.\n\nSet `mdPlugins` for remark plugins and `hastPlugins` for rehype plugins inside your configuration file.\n\n```js\nimport images from 'remark-images'\nimport emoji from 'remark-emoji'\n\nexport default {\n  mdPlugins: [images, emoji],\n}\n```\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/references/migration-guide.mdx",
    "content": "---\nname: Migration Guide\nroute: /docs/migration-guide\nparent: Documentation\nmenu: References\n---\n\n# Migration Guide\n\nThe [v2 release](https://github.com/pedronauck/docz/pull/950) is our biggest release in terms of changes to our core scripts. Our bundler system was entirely modified in order to use Gatsby as default bundler and you will need to update your code if you’re coming from a previous version. \n\nIt’s not a big deal, but you will need to follow this guide in order to get Docz running properly on your project after the upgrade.\n\n## Gatsby as default bundler\n\nThe biggest change in the new v2 is that our core is now entirely built using Gatsby behind the scenes. This is a huge win for Docz, since now we can focus on building new features instead of handling a lot of bundlers issues (our biggest bottleneck) and leverage the entire Gatsby ecosystem.\n\nSo, in order to refactor our core, we need to change a lot of things and remove others that no longer make sense. The most expressive changes here is about the configuration for `doczrc.js` and the plugin system.\n\n### List of removed properties from `doczrc.js`\n* **`websocketHost`** ▶︎ _no longer need_\n* **`websocketPort`** ︎︎︎▶︎ _no longer need_\n* **`wrapper`** ▶︎ _removed_\n* **`theme`** ▶︎ _removed_\n* **`indexHtml`** ▶︎ _removed_\n* **`codeSandbox`** ▶︎ _removed_\n* **`onCreateWebpackChain`** ▶︎ _removed_\n* **`modifyBundlerConfig`** ▶︎ use Gatsby [`onCreateWebpackConfig`](https://www.gatsbyjs.org/docs/node-apis/#onCreateWebpackConfig) hook\n* **`modifyBabelRc`** ▶︎ use Gatsby [`onCreateBabelConfig`](https://www.gatsbyjs.org/docs/node-apis/#onCreateBabelConfig) hook\n\n## New hooks for plugins\nThe `createPlugin` method also changed in order to fit with Gatsby now.\n\n### List of removed/changed properties from `createPlugin()`\n\n* **`modifyBundlerConfig`** ▶︎ `onCreateWebpackConfig`\n* **`modifyBabelRc`** ▶︎ `onCreateBabelConfig`\n* **`onCreateApp`** ▶︎ `onCreateDevServer`\n* **`onPreCreateApp`** ▶︎ _removed_\n* **`onServerListening`** ▶︎ _removed_\n* **`onPreRender`** ▶︎ _removed_\n* **`onPostRender`** ▶︎ _removed_\n\n> All methods that changed now are using the same API as Gatsby hooks.\n> You can have more details about then [here](https://www.gatsbyjs.org/docs/node-apis).\n\n## `docz-theme-default` removed\n\nMake sure to remove `docz-theme-default` from your dependencies when migrating : \n\n```sh\nyarn remove docz-theme-default # npm uninstall docz-theme-default\n```\n\nThe main reason that made us change our core to use Gatsby is that they have added a feature called themes. \n\nIn the last major version we launched our own Gatsby theme `gatsby-theme-docz` and this was a huge step forward because we can now use Docz inside a Gatsby project and bring a lot of new possibilities when creating documentation.\n\nOne of the best benefits of Gatsby themes is a feature called Component Shadowing, that’s the ability to replace theme files just by creating your own file following a file naming convention. This is awesome and is something that people very often ask, for example: “I want just to change the head in the Docz theme”.\n\nIn order to get Docz running with component shadowing we removed `docz-theme-default` and now you don’t need to install it anymore. You can just add `docz` to your project.\n\nCheck [here](https://github.com/doczjs/docz/tree/master/core/gatsby-theme-docz#customizing-components) for more information about customizing the Gatsby theme.\n\n### Code highlight with PrismJS\n\nIn the last version of Docz we used Codemirror to highlight code inside `<Playground>` and code blocks. Starting from v2 docz uses [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer) together with Theme UI.\n\nCheck [here](https://github.com/FormidableLabs/prism-react-renderer) for more information.\n\n### New `themeConfig` properties\n\nAnother great thing launched in the newest version is the integration with [Theme UI](https://theme-ui.com). Theme UI is a library for building consistent, themeable React apps based on constraint-based design principles. \n\nSo, in order to integrate it with our new theme, a lot of changes have been made inside the `themeConfig` object.\n\n\n## `theme` property removed\n\nThe property used to define your Docz theme inside the `doczrc.js` was removed. But you can still create and use your own theme from scratch if you want.\n\nIf you want to use your own theme, just create a file called `src/gatsby-theme-docz/index.js` in order to use component shadowing and replace it with your new theme.\n\n```js\n// src/gatsby-theme-docz/index.js\nimport React from 'react'\nimport Theme from './my-custom-theme'\n\nexport default (props) => <Theme {...props} />\n```\n\nCheck [here](https://www.docz.site/docs/creating-themes) for more information about how to create themes.\n\n## `wrapper` property removed\nThe same thing happened here for the oldest `wrapper` property. Now you can wrap your entire application by just creating a file called `src/gatsby-theme-docz/wrapper.js`\n\n```js\n// src/gatsby-theme-docz/index.js\nimport React from 'react'\n\nexport default ({ children }) => (\n  <div>\n    <h1>My custom wrapper</h1>\n    {children}\n  </div>\n)\n```\n\n## CSS preprocessors managed by gatsby\n\nCSS preprocessors and modules were handled by [`docz-plugin-css`](https://github.com/doczjs/docz-plugin-css) which hooked into the bundler config to add different loader support via webpack.\n\nWith the change to gatsby, css preprocessors like `sass` can be handled by gatsby via [Plugins](https://www.gatsbyjs.org/plugins/)\n\nThese plugins are added by adding a `gatsby-config.js` in your project root or modifying an existing one. For example if you want to add support for `sass` you would do the following:\n\n1. Install [`node-sass`](https://github.com/sass/node-sass) and [`gatsby-plugin-sass`](https://www.gatsbyjs.org/packages/gatsby-plugin-sass/)\n```bash\n# npm\nnpm install --save node-sass gatsby-plugin-sass\n\n# yarn\nyarn add node-sass gatsby-plugin-sass\n```\n\n2. Add the plugin to your `gatsby-config.js`\n```js\n//gatsby-config.js\nmodule.exports = {\n  plugins: ['gatsby-plugin-sass']\n}\n```\n\n## Examples \n\nMake sure to check out [docz's `examples` directory](https://github.com/doczjs/docz/tree/master/examples) for the full list of supported examples.\n"
  },
  {
    "path": "examples/with-algolia-search/src/docs/references/project-configuration.mdx",
    "content": "---\nname: Project Configuration\nroute: /docs/project-configuration\nparent: Documentation\nmenu: References\n---\n\n# Project Configuration\n\nThe project configuration is used when you need to define some specific customizations on your project. Like use plugins, chose themes, set project title, and other things.\n\nTo customize your project configuration you can use `doczrc.js` following this reference.\n\n## Env file\n\nYou can also create a `.env` file or use an existing `.env` file. You can then define customizations via `DOCZ_<config-variable>`.\n\n## CLI arguments\n\nYou can also pass customizations as arguments to the `docz dev` command: `docz dev --typescript --port=4838`\n\n<!-- > ### Tips and tricks\n>\n> You can create a `doczrc.json` file too if you want, but we recommend that you use a `js` file because just with javascript you can set plugins in your configuration since plugins are functions! -->\n\n## Basic config\n\n### base\n\n- Type: `string`\n- Default: `process.env.DOCZ_BASE || '/'`\n\nThe base URL of the site will be deployed at. You will need to set this if you plan to deploy your site under a subpath, for example, GitHub pages. If you plan to deploy your site to https://foo.github.io/bar/, the base should be set to `/bar/`.\n\n> It should always start and end with a slash.\n\nThe base is automatically prepended to all URLs that start with `/` in other options, so you only need to specify it once.\n\n### src\n\n- Type: `string`\n- Default: `process.env.DOCZ_SOURCE || './'`\n\nDefine the source folder of **your components**. Only the files in this folder will be parsed. Every file out of this folder will not be found.\n\n> ### Tips and tricks\n>\n> If you want to boost performance, you can limit the amount of files parsed by passing your source folder here!\n\n### files\n\n- Type: `string` or `Array<string>`\n- Default: `process.env.DOCZ_FILES || '**/*.{md,markdown,mdx}'`\n\nGlob pattern used to find your files.\nBy default, Docz finds all files inside the source folder that have a `.mdx` extension.\n\n[As of v0.10](https://github.com/pedronauck/docz/releases/tag/v0.10.0), you can customize it to resolve other filetypes:\n\n```js\n// doczrc.js\nexport default {\n  files: '**/*.{md,markdown,mdx}'\n  // or files: ['**/*.{md,markdown,mdx}']\n}\n```\n\nYou can be more specific if you want and change this glob to find other rules.\n\n> It is important to keep the `.mdx` extension in this string if you specify it\n\n### ignore\n\n- Type: `string[]`\n- Default: `['readme.md', 'changelog.md', 'code_of_conduct.md', 'contributing.md', 'license.md'],`\n\nOption used to ignore files to be parsed by docz.\n\n### dest\n\n- Type: `string`\n- Default: `process.env.DOCZ_DEST || '.docz/dist'`\n\nSpecify the output directory for `docz build`\n\n### title\n\n- Type: `string`\n- Default: `process.env.DOCZ_TITLE || name as defined in package.json`\n\nThe title for your site. This will be the prefix for all page titles and displayed in the sidebar in the default theme.\n\n### description\n\n- Type: `string`\n- Default: `process.env.DOCZ_DESCRIPTION || description as defined in package.json`\n\nThe description for the site. It will be rendered as a `<meta>` tag in the page HTML.\n\n### typescript\n\n- Type: `boolean`\n- Default: `process.env.DOCZ_TYPESCRIPT || false`\n\nThis option is used if you need to import Typescript components inside your `.mdx` files.\n\n### propsParser\n\n- Type: `boolean`\n- Default: `process.env.DOCZ_PROPS_PARSER || true`\n\nTo be able to use the `<Props />` component and parse properties of your components, we need to run a lot of processes that have some costs on the build process. If you need to disable this process to improve performance, you can set this property to `false`.\n\n### config\n\n- Type: `String`\n- Default: `'docz.json | .doczrc | doczrc.json |doczrc.js | docz.config.js | docz.config.json'`\n\nUse this option to change the filepath of Docz config file.\n\n### public\n\n- Type: `string`\n- Default: `/public`\n\nOption used to set a public folder of your project\n\n```js\nexport default {\n  public: '/public'\n}\n```\n\nThen you can get assets from your folder:\n\n```\n// my-file.mdx\n# Hello\n\n![placeholder image](/public/some-image.png)\n```\n\n### debug\n\n- Type: `boolean`\n- Default: `process.env.DEBUG || false`\n\nUse this setting to debug your application and remove all progress bar from bundler.\n\n### editBranch\n\n- Type: `string`\n- Default: `master`\n\nBranch used to edit your document when clicking on Github button.\n\n### host\n\n- Type: `string`\n- Default: `process.env.DOCZ_HOST || '127.0.0.1'`\n\nSpecify the host to use for the dev server.\n\n### port\n\n- Type: `number`\n- Alias: `p`\n- Default: `process.env.DOCZ_PORT || 3000`\n\nSpecify the port to use for the dev server.\n\n## Theming\n\n### theme\n\n> This property was removed in the v2\n>\n> Get more information about how to use it [here](https://www.docz.site/docs/migration-guide#theme-property-removed)\n\n### wrapper\n\n> This property was removed in the v2.\n>\n> Get more information about how to use it [here](https://www.docz.site/docs/migration-guide#wrapper-property-removed)\n\n### themeConfig\n\n- Type: `Object`\n- Default: `{}`\n\nThis is the config that you can use to customize your theme. By default, each theme has its own `themeConfig` that you can modify, so this object may vary according to each theme.\n\nYou can see the theme config of default theme [here](https://github.com/doczjs/docz/blob/master/core/gatsby-theme-docz/src/theme/index.js)\n\n## Build pipeline\n\n### menu\n\n- Type: `Array[]`\n- Default: `null`\n\nUse this option to specify the order of your documents in the menu. You can pass a simple string or\nif you want to order a nested menu you can pass an object with the name of your document and the `menu` order of it.\n\n```js\nexport default {\n  menu: [\n    'Getting Started',\n    { name: 'Components', menu: ['Alert', 'Button'] }\n  ]\n}\n```\n\n### plugins\n\n- Type: `Array`\n- Default: `[]`\n\nSpecify an array of plugins that you want to use.\n\n### mdPlugins\n\n- Type: `Array`\n- Default: `[]`\n\nArray of [remark plugins](https://github.com/remarkjs/remark/blob/master/doc/plugins.md) to manipulate the MDXAST\n\n### hastPlugins\n\n- Type: `Array`\n- Default: `[]`\n\nArray of [rehype plugins](https://github.com/rehypejs/rehype/blob/master/doc/plugins.md) to manipulate the MDXHAST\n\n### onCreateWebpackChain\n\n> This property was removed in v2. Use Gatsby hooks instead.\n>\n> More info about it [here](https://www.docz.site/docs/powered-by-gatsby)\n\n### modifyBundlerConfig\n\n> This property was removed in v2. Use Gatsby hooks instead.\n>\n> More info about it [here](https://www.docz.site/docs/powered-by-gatsby)\n\n### modifyBabelRc\n\n> This property was removed in v2. Use Gatsby hooks instead.\n>\n> More info about it [here](https://www.docz.site/docs/powered-by-gatsby)\n"
  },
  {
    "path": "examples/with-algolia-search/src/gatsby-theme-docz/components/Header/Search/Input.js",
    "content": "import React from 'react'\nimport { connectSearchBox } from 'react-instantsearch-dom'\nimport { SearchIcon, Form, Input } from './primitives'\nimport { Search } from 'gatsby-theme-docz/src/components/Icons'\nimport * as styles from 'gatsby-theme-docz/src/components/NavSearch/styles'\n\nexport default connectSearchBox(({ refine, ...rest }) => (\n  <Form>\n    <Input\n      type=\"text\"\n      placeholder=\"Search\"\n      aria-label=\"Search\"\n      onChange={e => refine(e.target.value)}\n      {...rest}\n    />\n    {/* <Search size={20} sx={styles.icon} /> */}\n    <SearchIcon />\n  </Form>\n))\n"
  },
  {
    "path": "examples/with-algolia-search/src/gatsby-theme-docz/components/Header/Search/hitComps.js",
    "content": "import React from 'react'\nimport { Highlight, Snippet } from 'react-instantsearch-dom'\nimport { Link } from 'gatsby'\n\nexport const PageHit = clickHandler => ({ hit }) => (\n  <div>\n    <Link\n      to={hit.route}\n      onClick={clickHandler}\n      style={{ textDecoration: 'none', color: 'inherit' }}\n    >\n      <h4>\n        <Highlight attribute=\"name\" hit={hit} tagName=\"mark\" />{' '}\n      </h4>\n      <Snippet attribute=\"excerpt\" hit={hit} tagName=\"mark\" />\n    </Link>\n  </div>\n)\n"
  },
  {
    "path": "examples/with-algolia-search/src/gatsby-theme-docz/components/Header/Search/index.js",
    "content": "import React, { useState, useEffect, createRef } from 'react'\nimport {\n  InstantSearch,\n  Index,\n  Hits,\n  connectStateResults,\n} from 'react-instantsearch-dom'\nimport algoliasearch from 'algoliasearch/lite'\nimport * as styles from 'gatsby-theme-docz/src/components/NavSearch/styles'\nimport { Root, HitsWrapper, PoweredBy } from './primitives'\nimport Input from './Input'\nimport * as hitComps from './hitComps'\n\nconst Results = connectStateResults(\n  ({ searchState: state, searchResults: res, children }) =>\n    res && res.nbHits > 0 ? children : `No results for '${state.query}'`\n)\n\nconst Stats = connectStateResults(\n  ({ searchResults: res }) =>\n    res && res.nbHits > 0 && `${res.nbHits} result${res.nbHits > 1 ? `s` : ``}`\n)\n\nconst useClickOutside = (ref, handler, events) => {\n  if (!events) events = [`mousedown`, `touchstart`]\n  const detectClickOutside = event =>\n    !ref.current.contains(event.target) && handler()\n  useEffect(() => {\n    for (const event of events)\n      document.addEventListener(event, detectClickOutside)\n    return () => {\n      for (const event of events)\n        document.removeEventListener(event, detectClickOutside)\n    }\n  })\n}\nconst indices = [\n  {\n    name: process.env.GATSBY_ALGOLIA_INDEX_NAME,\n    title: `docz algolia example`,\n    hitComp: `PageHit`,\n  },\n]\nexport const NavSearch = ({ collapse, hitsAsGrid }) => {\n  const ref = createRef()\n  const [query, setQuery] = useState(``)\n  const [focus, setFocus] = useState(false)\n  const searchClient = algoliasearch(\n    process.env.GATSBY_ALGOLIA_APP_ID,\n    process.env.GATSBY_ALGOLIA_SEARCH_KEY\n  )\n  useClickOutside(ref, () => setFocus(false))\n  return (\n    <InstantSearch\n      searchClient={searchClient}\n      indexName={indices[0].name}\n      onSearchStateChange={({ query }) => setQuery(query)}\n    >\n      <div style={styles.wrapper} ref={ref}>\n        <Input onFocus={() => setFocus(true)} {...{ collapse, focus }} />\n        <HitsWrapper show={query.length > 0 && focus} asGrid={hitsAsGrid}>\n          {indices.map(({ name, title, hitComp }) => (\n            <Index key={name} indexName={name}>\n              <header>\n                <h3>{title}</h3>\n                <Stats />\n              </header>\n              <Results>\n                <Hits hitComponent={hitComps[hitComp](() => setFocus(false))} />\n              </Results>\n            </Index>\n          ))}\n          <PoweredBy />\n        </HitsWrapper>\n      </div>\n    </InstantSearch>\n  )\n}\nexport default NavSearch\n"
  },
  {
    "path": "examples/with-algolia-search/src/gatsby-theme-docz/components/Header/Search/primitives.js",
    "content": "import React from 'react'\nimport styled, { css } from 'styled-components'\nimport { Search } from 'gatsby-theme-docz/src/components/Icons'\nimport { Algolia } from 'styled-icons/fa-brands/Algolia'\n\nexport const Root = styled.div`\n  position: relative;\n  display: grid;\n  grid-gap: 1em;\n`\n\nexport const SearchIcon = styled(Search)`\n  width: 1em;\n  pointer-events: none;\n  color: #2d3747;\n`\n\nconst focus = css`\n  background: white;\n  color: ${props => props.theme.darkBlue};\n  cursor: text;\n  width: 5em;\n  + ${SearchIcon} {\n    color: ${props => props.theme.darkBlue};\n    margin: 0.3em;\n  }\n`\n\nconst collapse = css`\n  width: 0;\n  cursor: pointer;\n  color: ${props => props.theme.lightBlue};\n  + ${SearchIcon} {\n    color: white;\n  }\n  ${props => props.focus && focus}\n  margin-left: ${props => (props.focus ? `-1.6em` : `-1em`)};\n  padding-left: ${props => (props.focus ? `1.6em` : `1em`)};\n  ::placeholder {\n    color: ${props => props.theme.gray};\n  }\n`\n\nconst expand = css`\n  background: ${props => props.theme.veryLightGray};\n  width: 20em;\n  margin-left: -1.6em;\n  padding-left: 1.6em;\n  + ${SearchIcon} {\n    margin: 0.3em;\n  }\n`\n\nexport const Input = styled.input`\n  outline: none;\n  border: none;\n  font-size: 1em;\n  background: transparent;\n  transition: ${props => props.theme.shortTrans};\n  border-radius: ${props => props.theme.smallBorderRadius};\n  ${props => (props.collapse ? collapse : expand)};\n`\n\nexport const Form = styled.form`\n  display: flex;\n  flex-direction: row-reverse;\n  align-items: center;\n`\n\nexport const HitsWrapper = styled.div`\n  display: ${props => (props.show ? `grid` : `none`)};\n  max-height: 80vh;\n  overflow: scroll;\n  z-index: 2;\n  -webkit-overflow-scrolling: touch;\n  position: absolute;\n  top: calc(100% + 0.5em);\n  width: 80vw;\n  max-width: 20em;\n  box-shadow: 0 0 5px 0;\n  padding: 0.7em 1em 0.4em;\n  background: white;\n  border-radius: ${props => props.theme.smallBorderRadius};\n  > * + * {\n    padding-top: 1em !important;\n    border-top: 2px solid ${props => props.theme.darkGray};\n  }\n  li + li {\n    margin-top: 0.7em;\n    padding-top: 0.7em;\n    border-top: 1px solid ${props => props.theme.lightGray};\n  }\n  * {\n    margin-top: 0;\n    padding: 0;\n  }\n  ul {\n    list-style: none;\n  }\n  mark {\n    color: ${props => props.theme.lightBlue};\n    background: ${props => props.theme.darkBlue};\n  }\n  header {\n    display: flex;\n    justify-content: space-between;\n    margin-bottom: 0.3em;\n    h3 {\n      color: white;\n      background: ${props => props.theme.gray};\n      padding: 0.1em 0.4em;\n      border-radius: ${props => props.theme.smallBorderRadius};\n    }\n  }\n  h3 {\n    margin: 0 0 0.5em;\n  }\n  h4 {\n    margin-bottom: 0.3em;\n  }\n`\n\nconst PoweredBySpan = styled.span`\n  font-size: 0.6em;\n  text-align: end;\n  padding: 0;\n`\n\nexport const PoweredBy = () => (\n  <PoweredBySpan>\n    Powered by{` `}\n    <a href=\"https://algolia.com\">\n      <Algolia size=\"1em\" /> Algolia\n    </a>\n  </PoweredBySpan>\n)\n"
  },
  {
    "path": "examples/with-algolia-search/src/gatsby-theme-docz/components/Header/index.js",
    "content": "/** @jsx jsx */\nimport { jsx, Box, Flex, useColorMode } from 'theme-ui'\nimport { useConfig, useCurrentDoc } from 'docz'\n\nimport * as styles from 'gatsby-theme-docz/src/components/Header/styles'\nimport { Edit, Menu, Sun, Github } from 'gatsby-theme-docz/src/components/Icons'\nimport { Logo } from 'gatsby-theme-docz/src/components/Logo'\nimport Search from './Search/'\n\nexport const Header = props => {\n  const { onOpen } = props\n  const {\n    repository,\n    themeConfig: { showDarkModeSwitch, showMarkdownEditButton },\n  } = useConfig()\n  const { edit = true, ...doc } = useCurrentDoc()\n  const [colorMode, setColorMode] = useColorMode()\n\n  const toggleColorMode = () => {\n    setColorMode(colorMode === 'light' ? 'dark' : 'light')\n  }\n\n  return (\n    <div sx={styles.wrapper} data-testid=\"header\">\n      <Box sx={styles.menuIcon}>\n        <button sx={styles.menuButton} onClick={onOpen}>\n          <Menu size={25} />\n        </button>\n      </Box>\n      <div sx={styles.innerContainer}>\n        <Logo />\n\n        <Flex>\n          {repository && (\n            <Box sx={{ mr: 2 }}>\n              <a\n                href={repository}\n                sx={styles.headerButton}\n                target=\"_blank\"\n                rel=\"noopener noreferrer\"\n              >\n                <Github size={15} />\n              </a>\n            </Box>\n          )}\n          <Search />\n          {showDarkModeSwitch && (\n            <button sx={styles.headerButton} onClick={toggleColorMode}>\n              <Sun size={15} />\n            </button>\n          )}\n        </Flex>\n        {showMarkdownEditButton && edit && doc.link && (\n          <a\n            sx={styles.editButton}\n            href={doc.link}\n            target=\"_blank\"\n            rel=\"noopener noreferrer\"\n          >\n            <Edit width={14} />\n            <Box sx={{ pl: 2 }}>Edit page</Box>\n          </a>\n        )}\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "examples/with-algolia-search/src/gatsby-theme-docz/wrapper.js",
    "content": "import React from 'react'\nimport { Helmet } from 'react-helmet-async'\n\nconst Wrapper = ({ children, doc }) => {\n  return (\n    <>\n      <Helmet>\n        <meta charSet=\"utf-8\" />\n        <title>{doc.value.name}</title>\n        <link rel=\"icon\" type=\"image/png\" href=\"/public/favicon.png\" />\n      </Helmet>\n      {children}\n    </>\n  )\n}\n\nexport default Wrapper\n"
  },
  {
    "path": "examples/with-custom-404-page/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/with-custom-404-page/README.md",
    "content": "# Docz with custom 404 page example\n\nTo add a custom 404 pages, add a `404.js` file in `src/pages/404.js`.\n\nYou can use a different directory instead of `src` by pointing the themesDir config to another folder.\n\nIn development mode Gatsby shows you a custom 404 to help you debug. To preview your own build the app, serve it and visit a URL that doesn't exist.\n\n```sh\nnpm run docz build && npm run docz serve\n# then visit http://localhost:3000/i-do-not-exist\n```\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app --example with-custom-404-page docz-app-basic\n# or\nyarn create docz-app docz-app-basic --example with-custom-404-page\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/with-custom-404-page\nmv with-custom-404-page docz-with-custom-404-page-example\ncd docz-with-custom-404-page-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/with-custom-404-page/package.json",
    "content": "{\n  \"name\": \"with-custom-404-page\",\n  \"version\": \"2.0.0\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"^2.3.2-alpha.0\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.11.0\",\n    \"react-dom\": \"^16.11.0\"\n  }\n}\n"
  },
  {
    "path": "examples/with-custom-404-page/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  /**\n   * The kind prop is used to set the alert's background color\n   */\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/with-custom-404-page/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/with-custom-404-page/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/with-custom-404-page/src/pages/404.js",
    "content": "import React from 'react'\n\nconst NotFoundPage = () => (\n  <div>\n    <h1>Oups 🙈</h1>\n    <p>You just hit a route that doesn‘t exist... 👀</p>\n    <button href=\"/\">Back to home</button>\n  </div>\n)\n\nexport default NotFoundPage\n"
  },
  {
    "path": "examples/with-custom-docz-theme/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/with-custom-docz-theme/README.md",
    "content": "# Using and Creating a Custom Docz Theme example\n\n## Creating a docz theme\n\nFor this example we want to write a theme that wraps every page with a div that has padding and a pink background-color. You can make a theme that does as much or as little as you wish.\n\nWe start by creating the directory `gatsby-theme-docz-pink`.\n\nInside we're going to shadow gatsby-theme-docz. To do that we create a folder : `src/gatsby-theme-docz`, the component in particular we want to shadow is located in src/gatsby-theme-docz/wrapper.js.\n\n```jsx\nimport React from 'react'\nimport OriginalWrapper from 'gatsby-theme-docz/src/wrapper'\n\nconst Wrapper = ({ children, doc }) => {\n  return (\n    <div style={{ background: 'pink', padding: 30 }}>\n      <OriginalWrapper>{children}</OriginalWrapper>\n    </div>\n  )\n}\n\nexport default Wrapper\n```\n\nThe component doesn't do much, it imports the original wrapper and wraps it in a styled div.\n\nNext, we add a `package.json` to `gatsby-theme-docz-pink` :\n\n```json\n{\n  \"name\": \"gatsby-theme-docz-pink\",\n  \"version\": \"1.0.0\",\n  \"main\": \"index.js\",\n  \"license\": \"MIT\"\n}\n```\n\nAnd since we're saying that main is `index.js` we create an empty file called index.js at the root of the package in order for the bundler to know the package exists\n\n```js\n// noop\n```\n\nAnd that's it our theme is ready to be distributed and consumed.\n\nYou can publish it to npm or host it in a git repo and install it with your favorite package manager\n\n## Consuming a docz theme\n\nIf the theme is published to npm we start by adding the theme as a project dependency\n\n```\n  yarn add gatsby-theme-docz-pink\n```\n\n> In this example we'll copy `gatsby-theme-docz-pink` to `node_modules/gatsby-theme-docz-pink` : `cp -r gatsby-theme-docz-pink/ node_modules/gatsby-theme-docz-pink`\n\nThen create a gatsby-config.js file at the root of your project and in it we declare that we want to use `gatsby-theme-docz-pink` and we tell webpack to compile it because it uses JSX which is not valid JS :\n\n```js\n// gatsby-config.js\n\nmodule.exports = {\n  plugins: [\n    'gatsby-theme-docz-pink',\n    {\n      resolve: 'gatsby-plugin-compile-es6-packages',\n      options: {\n        modules: ['gatsby-theme-docz-pink'],\n      },\n    },\n  ],\n}\n```\n\nIf you run `yarn docz dev` you should see the theme take effect.\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-with-custom-docz-theme\n# or\nyarn create docz-app docz-app-with-custom-docz-theme\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/with-custom-docz-theme\nmv with-custom-docz-theme docz-with-custom-docz-theme-example\ncd docz-with-custom-docz-theme-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/with-custom-docz-theme/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/with-custom-docz-theme/gatsby-config.js",
    "content": "module.exports = {\n  plugins: [\n    'gatsby-theme-docz-pink',\n    {\n      resolve: 'gatsby-plugin-compile-es6-packages',\n      options: {\n        modules: ['gatsby-theme-docz-pink'],\n      },\n    },\n  ],\n}\n"
  },
  {
    "path": "examples/with-custom-docz-theme/gatsby-theme-docz-pink/index.js",
    "content": "// noop\n"
  },
  {
    "path": "examples/with-custom-docz-theme/gatsby-theme-docz-pink/package.json",
    "content": "{\n  \"name\": \"gatsby-theme-docz-title\",\n  \"version\": \"1.0.0\",\n  \"main\": \"index.js\",\n  \"license\": \"MIT\"\n}\n"
  },
  {
    "path": "examples/with-custom-docz-theme/gatsby-theme-docz-pink/src/gatsby-theme-docz/wrapper.js",
    "content": "import React from 'react'\nimport OriginalWrapper from 'gatsby-theme-docz/src/wrapper'\n\nconst Wrapper = ({ children, doc }) => {\n  return (\n    <div style={{ background: 'pink', padding: 30 }}>\n      <OriginalWrapper>{children}</OriginalWrapper>\n    </div>\n  )\n}\n\nexport default Wrapper\n"
  },
  {
    "path": "examples/with-custom-docz-theme/package.json",
    "content": "{\n  \"name\": \"docz-example-with-custom-docz-theme\",\n  \"private\": true,\n  \"version\": \"2.0.0\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"install:theme\": \"cp -r gatsby-theme-docz-pink/ node_modules/gatsby-theme-docz-pink\",\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.11.0\",\n    \"react-dom\": \"^16.11.0\"\n  }\n}\n"
  },
  {
    "path": "examples/with-custom-docz-theme/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  /**\n   * The kind prop is used to set the alert's background color\n   */\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/with-custom-docz-theme/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/with-custom-docz-theme/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/with-custom-links/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/with-custom-links/README.md",
    "content": "# Docz with Custom Links Example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-with-custom-links --example with-custom-links\n# or\nyarn create docz-app docz-app-with-custom-links --example with-custom-links\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/with-custom-links\nmv with-custom-links docz-with-custom-links-example\ncd docz-with-custom-links-example\n```\n\n## Notes\n\nA new component `a` was added and passed to the MDXProvider by shadowing `gatsby-theme-docz/components/index.js` and adding a custom implementation.\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/with-custom-links/package.json",
    "content": "{\n  \"name\": \"docz-example-basic\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.11.0\",\n    \"react-dom\": \"^16.11.0\"\n  }\n}\n"
  },
  {
    "path": "examples/with-custom-links/src/gatsby-theme-docz/components/index.js",
    "content": "import React from 'react'\nimport * as headings from 'gatsby-theme-docz/src/components/Headings'\nimport { Code } from 'gatsby-theme-docz/src/components/Code'\nimport { Layout } from 'gatsby-theme-docz/src/components/Layout'\nimport { Playground } from 'gatsby-theme-docz/src/components/Playground'\nimport { Pre } from 'gatsby-theme-docz/src/components/Pre'\nimport { Props } from 'gatsby-theme-docz/src/components/Props'\n\nconst a = props =>\n  props.href.startsWith('http://') || props.href.startsWith('https://') ? (\n    <a {...props} target=\"_blank\" rel=\"noreferrer nofollow\">\n      {props.children}\n    </a>\n  ) : (\n    <a {...props}>{props.children}</a>\n  )\n\nexport default {\n  ...headings,\n  code: Code,\n  a,\n  playground: Playground,\n  pre: Pre,\n  layout: Layout,\n  props: Props,\n}\n"
  },
  {
    "path": "examples/with-custom-links/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\nimport { Playground } from 'docz'\nimport { useState } from 'react'\n\n# Getting Started\n\n[Link that opens in new tab](https://duckduckgo.com)\n\n<Playground>\n  {() => {\n    const [toggle, setToggle] = useState(true)\n    return (\n      <button\n        onClick={() => {\n          setToggle(a => !a)\n        }}\n      >\n        {toggle ? 'Hello' : 'Good bye'}\n      </button>\n    )\n  }}\n</Playground>\n"
  },
  {
    "path": "examples/with-decorators/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/with-decorators/README.md",
    "content": "# Docz with Decorators Example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-with-decorators --example with-decorators\n# or\nyarn create docz-app docz-app-with-decorators --example with-decorators\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/with-decorators\nmv with-decorators docz-with-decorators-example\ncd docz-with-decorators-example\n```\n\n## Notes\n\nTo add decorator support, we create a `gatsby-node.js` in the root directory and inside configure babel to understand decorators :\n\n```js\nexports.onCreateBabelConfig = ({ actions }) => {\n  actions.setBabelPlugin({\n    name: `@babel/plugin-proposal-decorators`,\n    options: { legacy: true },\n  })\n}\n```\n\nAnd add `@babel/plugin-proposal-decorators` as a dev dependency\n\n```sh\nyarn add -D @babel/plugin-proposal-decorators\n```\n\nAnd last we set \"compilerOptions.experimentalDecorators\" to true in jsconfig.json\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/with-decorators/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/with-decorators/gatsby-node.js",
    "content": "exports.onCreateBabelConfig = ({ actions }) => {\n  actions.setBabelPlugin({\n    name: `@babel/plugin-proposal-decorators`,\n    options: { legacy: true },\n  })\n}\n"
  },
  {
    "path": "examples/with-decorators/jsconfig.json",
    "content": "{\n  \"compilerOptions\": { \"experimentalDecorators\": true }\n}\n"
  },
  {
    "path": "examples/with-decorators/package.json",
    "content": "{\n  \"name\": \"docz-example-with-decorators\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.11.0\",\n    \"react-dom\": \"^16.11.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/plugin-proposal-decorators\": \"^7.7.4\"\n  }\n}\n"
  },
  {
    "path": "examples/with-decorators/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  /**\n   * The kind prop is used to set the alert's background color\n   */\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/with-decorators/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/with-decorators/src/index.js",
    "content": "@annotation\nclass MyClass {}\n\nfunction annotation(target) {\n  target.annotated = \"yes it's annotated\"\n}\n\nexport default MyClass\n"
  },
  {
    "path": "examples/with-decorators/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\nimport MyClass from './index.js'\n\n<h3> MyClass.annotated : {MyClass.annotated} </h3>\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/with-env-variables/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/with-env-variables/README.md",
    "content": "# Docz With Env Variables Example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-with-env-variables\n# or\nyarn create docz-app docz-app-with-env-variables\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/with-env-variables\nmv with-env-variables docz-with-env-variables-example\ncd docz-with-env-variables-example\n```\n\n## Notes\n\nEnvironment variables are defined in `gatsby-node.js` by changing the webpack config (process.env.FOO, process.env.PROD) or in .env.* and then imported using `dotenv` in `gatsby-config.js` (process.env.GATSBY_API_URL).\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/with-env-variables/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/with-env-variables/gatsby-config.js",
    "content": "require('dotenv').config({\n  path: `.env.development`,\n})\n"
  },
  {
    "path": "examples/with-env-variables/gatsby-node.js",
    "content": "exports.onCreateWebpackConfig = ({ plugins, actions }) => {\n  const { setWebpackConfig } = actions\n\n  setWebpackConfig({\n    plugins: [\n      plugins.define({\n        'process.env.FOO': JSON.stringify('BAR'),\n        'process.env.PROD': JSON.stringify(true),\n      }),\n    ],\n  })\n}\n"
  },
  {
    "path": "examples/with-env-variables/package.json",
    "content": "{\n  \"name\": \"docz-example-basic\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.11.0\",\n    \"react-dom\": \"^16.11.0\"\n  }\n}\n"
  },
  {
    "path": "examples/with-env-variables/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    <h3>{process.env.PROD ? 'PROD' : 'NOT PROD'}</h3>\n    <h4>{process.env.FOO}</h4>\n    <h4>{process.env.GATSBY_API_URL}</h4>\n\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  /**\n   * The kind prop is used to set the alert's background color\n   */\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/with-env-variables/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/with-env-variables/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/with-favicon-and-metadata/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/with-favicon-and-metadata/README.md",
    "content": "# With Favicon & Metadata Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-with-favicon-and-metadata --example with-favicon-and-metadata\n# or\nyarn create docz-app docz-app-with-favicon-and-metadata --example with-favicon-and-metadata\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/with-favicon-and-metadata\nmv with-favicon-and-metadata docz-with-favicon-and-metadata-example\ncd docz-with-favicon-and-metadata-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/with-favicon-and-metadata/package.json",
    "content": "{\n  \"name\": \"docz-example-with-favicon-and-metadata\",\n  \"private\": true,\n  \"version\": \"2.0.0\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"next\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  }\n}\n"
  },
  {
    "path": "examples/with-favicon-and-metadata/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nexport const Alert = props => <AlertStyled {...props} />\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/with-favicon-and-metadata/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/with-favicon-and-metadata/src/gatsby-theme-docz/wrapper.js",
    "content": "import React from 'react'\nimport { Helmet } from 'react-helmet-async'\n\nconst Wrapper = ({ children, doc }) => {\n  return (\n    <>\n      <Helmet>\n        <meta charSet=\"utf-8\" />\n        <title>{doc.value.name}</title>\n        <link\n          rel=\"icon\"\n          type=\"image/png\"\n          href=\"https://placekitten.com/50/50\"\n        />\n      </Helmet>\n      {children}\n    </>\n  )\n}\n\nexport default Wrapper\n"
  },
  {
    "path": "examples/with-favicon-and-metadata/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/with-gatsby-remark-vscode/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/with-gatsby-remark-vscode/README.md",
    "content": "# Gatsby Remark VSCode with Docz\n\n[What is gatsby-remark-vscode ?](https://github.com/andrewbranch/gatsby-remark-vscode)\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-with-gatsby-remark-vscode\n# or\nyarn create docz-app docz-app-with-gatsby-remark-vscode\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/with-gatsby-remark-vscode\nmv with-gatsby-remark-vscode docz-with-gatsby-remark-vscode-example\ncd docz-with-gatsby-remark-vscode-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n\n## Tutorial\n\nThere are two kinds of code blocks in docz.\n\nThe first is embedded in the markdown ( \\`\\`\\`js \\`\\`\\` ) and the other used with the Playground component (\n\n```jsx\n<Playground>\n  {/* this code is editable by the user */}\n  <SomeComponent />\n</Playground>\n```\n\n).\n\nFor the one in the playground you won't be able to use gatsby-remark-vscode plugin because it's editable and rendered on the client.\n\nFor the second you should be able to add gatsby-remark-vscode :\n\n1. Install gatsby-remark-vscode : `yarn add gatsby-remark-vscode`\n2. In your `doczrc.js` file add :\n\n```js\ngatsbyRemarkPlugins: [\n  {\n    resolve: 'gatsby-remark-vscode',\n    // OPTIONAL\n    options: {},\n  },\n]\n```\n\n3. By now your site should be broken, you still need to tell docz not to try to render code blocks with prism (to leave it to gatsby-remark-vscode). To do that you will need to remove the pre and code components passed down to the MDXProvider by creating a file `src/gatsby-theme-docz/components/index.js` (original can be found [here](https://github.com/doczjs/docz/blob/master/core/gatsby-theme-docz/src/components/index.js)) and add to it :\n\n```js\nimport * as headings from 'gatsby-theme-docz/src/components/Headings'\nimport { Layout } from 'gatsby-theme-docz/src/components/Layout'\nimport { Playground } from 'gatsby-theme-docz/src/components/Playground'\nimport { Props } from 'gatsby-theme-docz/src/components/Props'\n\nexport default {\n  ...headings,\n  playground: Playground,\n  layout: Layout,\n  props: Props,\n}\n```\n\nThen run yarn docz dev and you should see your code block rendered using `gatsby-remark-vscode` 🎉 .\n"
  },
  {
    "path": "examples/with-gatsby-remark-vscode/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'Components'],\n  gatsbyRemarkPlugins: [\n    {\n      resolve: 'gatsby-remark-vscode',\n      // OPTIONAL\n      options: {},\n    },\n  ],\n}\n"
  },
  {
    "path": "examples/with-gatsby-remark-vscode/package.json",
    "content": "{\n  \"name\": \"docz-example-gatsby-remark-vscode\",\n  \"private\": true,\n  \"version\": \"2.0.0\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"gatsby-remark-vscode\": \"^1.4.0\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.11.0\",\n    \"react-dom\": \"^16.11.0\"\n  }\n}\n"
  },
  {
    "path": "examples/with-gatsby-remark-vscode/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  /**\n   * The kind prop is used to set the alert's background color\n   */\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/with-gatsby-remark-vscode/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# JS \n\n```js\nconst a = \"abc\";\nconst b = \"bca\";\nconsole.log(`${a}-${b}`)\n```\n\n# JSX\n\n```jsx\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n```\n\n# Alert\n\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/with-gatsby-remark-vscode/src/gatsby-theme-docz/components/index.js",
    "content": "import * as headings from 'gatsby-theme-docz/src/components/Headings'\nimport { Layout } from 'gatsby-theme-docz/src/components/Layout'\nimport { Playground } from 'gatsby-theme-docz/src/components/Playground'\nimport { Props } from 'gatsby-theme-docz/src/components/Props'\n\nexport default {\n  ...headings,\n  playground: Playground,\n  layout: Layout,\n  props: Props,\n}\n"
  },
  {
    "path": "examples/with-gatsby-remark-vscode/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './components/Alert'\n\n## JS\n\n```js\nconst a = \"abc\";\nconst b = \"bca\";\nconsole.log(`${a}-${b}`)\n```\n\n## JSX\n\n```jsx\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n```\n\n## TypeScript\n\n```ts\nimport React, { FC } from 'react'\n\nexport type Kind = 'info' | 'positive' | 'negative' | 'warning'\nexport type KindMap = Record<Kind, string>\n\nconst kinds: KindMap = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport interface AlertProps {\n  /**\n   * Set this to change alert kind\n   * @default info\n   */\n  kind: 'info' | 'positive' | 'negative' | 'warning'\n}\n\nexport const Alert: FC<AlertProps> = ({ kind, ...props }) => (\n  <div className=\"alert\"></div>\n)\n\n```\n\n### Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n### Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/with-styled-components-and-scoping/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/with-styled-components-and-scoping/README.md",
    "content": "# Docz Styled Components Example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-styled-docz --example with-styled-components-and-scoping\n# or\nyarn create docz-app docz-app-styled-docz --example with-styled-components-and-scoping\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/with-styled-components-and-scoping\nmv with-styled-components-and-scoping docz-example-styled-docz\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n\n## Deploy\n\n```sh\nyarn deploy\n```\n\nNote that by default `docz` generates the output site in `.docz/public` to change that add a `dest` field to your `doczrc.js` with the path you want to generate the code in.\n"
  },
  {
    "path": "examples/with-styled-components-and-scoping/doczrc.js",
    "content": "export default {\n  themeConfig: {\n    useScopingInPlayground: true,\n  },\n}\n"
  },
  {
    "path": "examples/with-styled-components-and-scoping/package.json",
    "content": "{\n  \"private\": true,\n  \"name\": \"docz-example-styled-components-with-scoping\",\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\",\n    \"react-frame-component\": \"^4.1.1\",\n    \"styled-components\": \"^4.3.2\"\n  }\n}\n"
  },
  {
    "path": "examples/with-styled-components-and-scoping/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport styled from 'styled-components'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = styled('div')`\n  padding: 15px 20px;\n  background: white;\n  border-radius: 3px;\n  color: white;\n  background: ${({ kind = 'info' }) => kinds[kind]};\n`\n\nexport const Alert = props => <AlertStyled {...props} />\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/with-styled-components-and-scoping/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/with-styled-components-and-scoping/src/components/Button.jsx",
    "content": "import React from 'react'\nimport styled from 'styled-components'\nimport t from 'prop-types'\n\nconst scales = {\n  small: `\n    padding: 5px 10px;\n    font-size: 14px;\n  `,\n  normal: `\n    padding: 10px 20px;\n    font-size: 16px;\n  `,\n  big: `\n    padding: 20px 30px;\n    font-size: 18px;\n  `,\n}\n\nconst kind = outline => (bg, color) => {\n  const boxShadowColor = outline ? bg : 'transparent'\n  const backgroundColor = outline ? 'transparent' : bg\n\n  return `\n    background: ${backgroundColor};\n    box-shadow: inset 0 0 0 1px ${boxShadowColor};\n    color: ${outline ? bg : color};\n    transition: all .3s;\n\n    &:hover {\n      box-shadow: inset 0 0 0 1000px ${boxShadowColor};\n      color: ${color};\n    }\n  `\n}\n\nconst kinds = outline => {\n  const get = kind(outline)\n\n  return {\n    primary: get('#1FB6FF', 'white'),\n    secondary: get('#5352ED', 'white'),\n    cancel: get('#FF4949', 'white'),\n    dark: get('#273444', 'white'),\n    gray: get('#8492A6', 'white'),\n  }\n}\n\nconst getScale = ({ scale = 'normal' }) => scales[scale]\nconst getKind = ({ kind = 'primary', outline = false }) => kinds(outline)[kind]\n\nconst ButtonStyled = styled('button')`\n  ${getKind};\n  ${getScale};\n  cursor: pointer;\n  margin: 3px 5px;\n  border: none;\n  border-radius: 3px;\n`\n\nexport const Button = ({ children, ...props }) => (\n  <ButtonStyled {...props}>{children}</ButtonStyled>\n)\n\nButton.propTypes = {\n  scales: t.oneOf(['small', 'normal', 'big']),\n  kind: t.oneOf(['primary', 'secondary', 'cancel', 'dark', 'gray']),\n  outline: t.bool,\n}\n\nButton.defaultProps = {\n  scales: 'normal',\n  kind: 'primary',\n  outline: false,\n}\n"
  },
  {
    "path": "examples/with-styled-components-and-scoping/src/components/Button.mdx",
    "content": "---\nname: Button\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Button } from './Button'\n\n# Button\n\nButtons make common actions more obvious and help users more easily perform them. Buttons use labels and sometimes icons to communicate the action that will occur when the user touches them.\n\n### Best practices\n\n- Group buttons logically into sets based on usage and importance.\n- Ensure that button actions are clear and consistent.\n- The main action of a group set can be a primary button.\n- Select a single button variation and do not mix them.\n\n## Properties\n\n<Props of={Button} />\n\n## Basic usage\n\n<Playground>\n  <Button>Click me</Button>\n</Playground>\n\n## With different sizes\n\n<Playground>\n  <Button scale=\"small\">Click me</Button>\n  <Button scale=\"normal\">Click me</Button>\n  <Button scale=\"big\">Click me</Button>\n</Playground>\n\n## With different colors\n\n<Playground>\n  <Button kind=\"primary\">Click me</Button>\n  <Button kind=\"secondary\">Click me</Button>\n  <Button kind=\"cancel\">Click me</Button>\n  <Button kind=\"dark\">Click me</Button>\n  <Button kind=\"gray\">Click me</Button>\n</Playground>\n\n## Outlined\n\n<Playground>\n  <Button kind=\"primary\" outline>Click me</Button>\n  <Button kind=\"secondary\" outline>Click me</Button>\n  <Button kind=\"cancel\" outline>Click me</Button>\n  <Button kind=\"dark\" outline>Click me</Button>\n  <Button kind=\"gray\" outline>Click me</Button>\n</Playground>\n\n"
  },
  {
    "path": "examples/with-styled-components-and-scoping/src/gatsby-theme-docz/components/Playground/IframeWrapper.js",
    "content": "/** @jsx jsx */\nimport { Fragment } from 'react'\nimport { jsx } from 'theme-ui'\nimport Iframe, { FrameContextConsumer } from 'react-frame-component'\n\nimport { StyleSheetManager } from 'styled-components'\n\nimport * as styles from 'gatsby-theme-docz/src/components/Playground/styles'\n\nconst CLEAR_PADDING = `<style> body { padding: 0; margin: 0; }  </style>`\nconst INITIAL_IFRAME_CONTENT = `<!DOCTYPE html><html><head> ${CLEAR_PADDING} </head><body><div></div></body></html>`\n\nexport const IframeWrapper = ({ children, height, style = {} }) => {\n  return (\n    <Iframe\n      initialContent={INITIAL_IFRAME_CONTENT}\n      sx={{\n        ...styles.previewInner(),\n        height,\n        ...style,\n      }}\n    >\n      <FrameContextConsumer>\n        {frameContext => (\n          <StyleSheetManager target={frameContext.document.head}>\n            <Fragment>{children}</Fragment>\n          </StyleSheetManager>\n        )}\n      </FrameContextConsumer>\n    </Iframe>\n  )\n}\n"
  },
  {
    "path": "examples/with-styled-components-and-scoping/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/with-themes-dir/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/with-themes-dir/README.md",
    "content": "# With themesDir Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-with-themes-dir\n# or\nyarn create docz-app docz-app-with-themes-dir\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/with-themes-dir\nmv with-themes-dir docz-with-themes-dir-example\ncd docz-with-themes-dir-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/with-themes-dir/doczrc.js",
    "content": "export default {\n  themesDir: 'theme',\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/with-themes-dir/package.json",
    "content": "{\n  \"name\": \"docz-example-with-themes-dir\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"theme/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.8.6\",\n    \"react-dom\": \"^16.8.6\"\n  }\n}\n"
  },
  {
    "path": "examples/with-themes-dir/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nconst AlertStyled = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nexport const Alert = props => <AlertStyled {...props} />\n\nAlert.propTypes = {\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/with-themes-dir/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/with-themes-dir/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/with-themes-dir/theme/gatsby-theme-docz/components/Logo/index.js",
    "content": "/** @jsx jsx */\nimport { jsx, Flex } from 'theme-ui'\nimport { Link, useConfig } from 'docz'\n\nimport * as styles from './styles'\n\nexport const Logo = () => {\n  const config = useConfig()\n  return (\n    <Flex aligmItems=\"center\" sx={styles.logo} data-testid=\"logo\">\n      <Link to=\"/\" sx={styles.link}>\n        {config.title.toUpperCase()}\n      </Link>\n    </Flex>\n  )\n}\n"
  },
  {
    "path": "examples/with-themes-dir/theme/gatsby-theme-docz/components/Logo/styles.js",
    "content": "export const logo = {\n  letterSpacing: '-0.02em',\n  fontWeight: 600,\n  fontSize: 4,\n}\n\nexport const link = {\n  fontWeight: 600,\n  color: 'header.text',\n  textDecoration: 'none',\n  ':hover': {\n    color: 'primary',\n  },\n}\n"
  },
  {
    "path": "examples/with-typescript-decorators/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/with-typescript-decorators/README.md",
    "content": "# Docz with Decorators and TypeScript Example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-with-typescript-decorators --example with-typescript-decorators\n# or\nyarn create docz-app docz-app-with-typescript-decorators --example with-typescript-decorators\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/with-typescript-decorators\nmv with-typescript-decorators docz-with-typescript-decorators-example\ncd docz-with-typescript-decorators-example\n```\n\n## Notes\n\nTo add decorator support, we create a `gatsby-node.js` in the root directory and inside configure babel to understand decorators :\n\n```js\nexports.onCreateBabelConfig = ({ actions }) => {\n  actions.setBabelPlugin({\n    name: `@babel/plugin-proposal-decorators`,\n    options: { legacy: true },\n  })\n}\n```\n\nAnd add `@babel/plugin-proposal-decorators` as a dev dependency\n\n```sh\nyarn add -D @babel/plugin-proposal-decorators\n```\n\nAnd last we set \"compilerOptions.experimentalDecorators\" to true in tsconfig.json\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/with-typescript-decorators/doczrc.js",
    "content": "export default {\n  typescript: true,\n}\n"
  },
  {
    "path": "examples/with-typescript-decorators/gatsby-node.js",
    "content": "exports.onCreateBabelConfig = ({ actions }) => {\n  actions.setBabelPlugin({\n    name: `@babel/plugin-proposal-decorators`,\n    options: { legacy: true },\n  })\n}\n"
  },
  {
    "path": "examples/with-typescript-decorators/package.json",
    "content": "{\n  \"name\": \"docz-example-with-decorators\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.11.0\",\n    \"react-dom\": \"^16.11.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/plugin-proposal-decorators\": \"^7.7.4\",\n    \"typescript\": \"^3.7.2\"\n  }\n}\n"
  },
  {
    "path": "examples/with-typescript-decorators/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Alert } from './Alert.tsx'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/with-typescript-decorators/src/components/Alert.tsx",
    "content": "import React, { FC } from 'react'\n\nexport type Kind = 'info' | 'positive' | 'negative' | 'warning'\nexport type KindMap = Record<Kind, string>\n\nconst kinds: KindMap = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport interface AlertProps {\n  /**\n   * Set this to change alert kind\n   * @default info\n   */\n  kind: 'info' | 'positive' | 'negative' | 'warning'\n}\n\nexport const Alert: FC<AlertProps> = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: kinds[kind] || 'white',\n      borderRadius: 3,\n      color: 'white',\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n"
  },
  {
    "path": "examples/with-typescript-decorators/src/components/Button.mdx",
    "content": "---\nname: Button\nmenu: Components\n---\n\nimport { Playground, Props } from 'docz'\nimport { Button } from './Button.tsx'\n\n# Button\n\nButtons make common actions more obvious and help users more easily perform them. Buttons use labels and sometimes icons to communicate the action that will occur when the user touches them.\n\n### Best practices\n\n- Group buttons logically into sets based on usage and importance.\n- Ensure that button actions are clear and consistent.\n- The main action of a group set can be a primary button.\n- Select a single button variation and do not mix them.\n\n## Properties\n\n<Props of={Button} />\n\n## Basic usage\n\n<Playground>\n  <Button>Click me</Button>\n</Playground>\n\n## With different sizes\n\n<Playground>\n  <Button scale=\"small\">Click me</Button>\n  <Button scale=\"normal\">Click me</Button>\n  <Button scale=\"big\">Click me</Button>\n</Playground>\n\n## With different colors\n\n<Playground>\n  <Button kind=\"primary\">Click me</Button>\n  <Button kind=\"secondary\">Click me</Button>\n  <Button kind=\"cancel\">Click me</Button>\n  <Button kind=\"dark\">Click me</Button>\n  <Button kind=\"gray\">Click me</Button>\n</Playground>\n\n## Outlined\n\n<Playground>\n  <Button kind=\"primary\" outline>Click me</Button>\n  <Button kind=\"secondary\" outline>Click me</Button>\n  <Button kind=\"cancel\" outline>Click me</Button>\n  <Button kind=\"dark\" outline>Click me</Button>\n  <Button kind=\"gray\" outline>Click me</Button>\n</Playground>\n\n"
  },
  {
    "path": "examples/with-typescript-decorators/src/components/Button.tsx",
    "content": "import React, { FC } from 'react'\nimport styled from '@emotion/styled'\n\nconst scales = {\n  small: `\n    padding: 5px 10px;\n    font-size: 14px;\n  `,\n  normal: `\n    padding: 10px 20px;\n    font-size: 16px;\n  `,\n  big: `\n    padding: 20px 30px;\n    font-size: 18px;\n  `,\n}\n\nconst kind = (outline: boolean) => (bg: string, color: string) => {\n  const boxShadowColor = outline ? bg : 'transparent'\n  const backgroundColor = outline ? 'transparent' : bg\n\n  return `\n    background: ${backgroundColor};\n    box-shadow: inset 0 0 0 1px ${boxShadowColor};\n    color: ${outline ? bg : color};\n    transition: all .3s;\n\n    &:hover {\n      box-shadow: inset 0 0 0 1000px ${boxShadowColor};\n      color: ${color};\n    }\n  `\n}\n\ntype Kind = 'primary' | 'secondary' | 'cancel' | 'dark' | 'gray'\ntype Kinds = Record<Kind, string>\n\nconst kinds = (outline: boolean): Kinds => {\n  const get = kind(outline)\n\n  return {\n    primary: get('#1FB6FF', 'white'),\n    secondary: get('#5352ED', 'white'),\n    cancel: get('#FF4949', 'white'),\n    dark: get('#273444', 'white'),\n    gray: get('#8492A6', 'white'),\n  }\n}\n\nexport interface ButtonProps {\n  scale: 'small' | 'normal' | 'big'\n  kind: 'primary' | 'secondary' | 'cancel' | 'dark' | 'gray'\n  outline: boolean\n}\n\nconst getScale = ({ scale = 'normal' }: ButtonProps) => scales[scale]\nconst getKind = ({ kind = 'primary', outline = false }: ButtonProps) =>\n  kinds(outline)[kind]\n\nconst ButtonStyled = styled('button')<ButtonProps>`\n  ${getKind};\n  ${getScale};\n  cursor: pointer;\n  margin: 3px 5px;\n  border: none;\n  border-radius: 3px;\n`\n\nexport const Button: FC<ButtonProps> = ({ children, ...props }) => (\n  <ButtonStyled {...props}>{children}</ButtonStyled>\n)\n"
  },
  {
    "path": "examples/with-typescript-decorators/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\nimport MyClass from './index'\n\n<h3> MyClass.annotated : {MyClass.annotated} </h3>\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "examples/with-typescript-decorators/src/index.ts",
    "content": "@annotation\nclass MyClass {\n  static annotated?: string\n}\n\nfunction annotation(target: typeof MyClass) {\n  target.annotated = \"yes it's annotated\"\n}\n\nexport default MyClass\n"
  },
  {
    "path": "examples/with-typescript-decorators/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"experimentalDecorators\": true,\n    \"target\": \"es2015\",\n    \"moduleResolution\": \"node\",\n    \"strict\": true,\n    \"resolveJsonModule\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": false,\n    \"noEmit\": true,\n    \"jsx\": \"react\"\n  }\n}\n"
  },
  {
    "path": "examples/wrapped-playground/.gitignore",
    "content": ".docz\nnode_modules"
  },
  {
    "path": "examples/wrapped-playground/README.md",
    "content": "# Wrapped Playground Docz example\n\n## Using `create-docz-app`\n\n```sh\nnpx create-docz-app docz-app-wrapped-playground\n# or\nyarn create docz-app docz-app-wrapped-playground\n```\n\n## Download manually\n\n```sh\ncurl https://codeload.github.com/doczjs/docz/tar.gz/main | tar -xz --strip=2 docz-main/examples/wrapped-playground\nmv wrapped-playground docz-wrapped-playground-example\ncd docz-wrapped-playground-example\n```\n\n## Setup\n\n```sh\nyarn # npm i\n```\n\n## Run\n\n```sh\nyarn dev # npm run dev\n```\n\n## Build\n\n```sh\nyarn build # npm run build\n```\n\n## Serve built app\n\n```sh\nyarn serve # npm run serve\n```\n"
  },
  {
    "path": "examples/wrapped-playground/doczrc.js",
    "content": "export default {\n  menu: ['Getting Started', 'Components'],\n}\n"
  },
  {
    "path": "examples/wrapped-playground/package.json",
    "content": "{\n  \"name\": \"docz-example-wrapped-playground\",\n  \"private\": true,\n  \"version\": \"2.0.0-rc.41\",\n  \"license\": \"MIT\",\n  \"files\": [\n    \"src/\",\n    \"doczrc.js\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"dev\": \"docz dev\",\n    \"build\": \"docz build\",\n    \"serve\": \"docz serve\"\n  },\n  \"dependencies\": {\n    \"docz\": \"latest\",\n    \"prop-types\": \"^15.7.2\",\n    \"react\": \"^16.11.0\",\n    \"react-dom\": \"^16.11.0\"\n  }\n}\n"
  },
  {
    "path": "examples/wrapped-playground/src/Playground.jsx",
    "content": "import React from 'react'\nimport { Playground } from 'docz'\n\nexport default props => {\n  return (\n    <div style={{ background: 'rebeccapurple', padding: 12 }}>\n      <Playground {...props} />\n    </div>\n  )\n}\n"
  },
  {
    "path": "examples/wrapped-playground/src/components/Alert.jsx",
    "content": "import React from 'react'\nimport t from 'prop-types'\n\nconst kinds = {\n  info: '#5352ED',\n  positive: '#2ED573',\n  negative: '#FF4757',\n  warning: '#FFA502',\n}\n\nexport const Alert = ({ children, kind, ...rest }) => (\n  <div\n    style={{\n      padding: 20,\n      background: 'white',\n      borderRadius: 3,\n      color: 'white',\n      background: kinds[kind],\n    }}\n    {...rest}\n  >\n    {children}\n  </div>\n)\n\nAlert.propTypes = {\n  /**\n   * The kind prop is used to set the alert's background color\n   */\n  kind: t.oneOf(['info', 'positive', 'negative', 'warning']),\n}\n\nAlert.defaultProps = {\n  kind: 'info',\n}\n"
  },
  {
    "path": "examples/wrapped-playground/src/components/Alert.mdx",
    "content": "---\nname: Alert\nmenu: Components\n---\n\nimport { Props } from 'docz'\nimport Playground from '../Playground'\nimport { Alert } from './Alert'\n\n# Alert\n\n## Properties\n\n<Props of={Alert} />\n\n## Basic usage\n\n<Playground>\n  <Alert>Some message</Alert>\n</Playground>\n\n## Using different kinds\n\n<Playground>\n  <Alert kind=\"info\">Some message</Alert>\n  <Alert kind=\"positive\">Some message</Alert>\n  <Alert kind=\"negative\">Some message</Alert>\n  <Alert kind=\"warning\">Some message</Alert>\n</Playground>\n"
  },
  {
    "path": "examples/wrapped-playground/src/index.mdx",
    "content": "---\nname: Getting Started\nroute: /\n---\n\n# Getting Started\n\nDesign systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.\n\nRegardless of the technologies and tools behind them, a successful design system follows these guiding principles:\n\n- **It’s consistent**. The way components are built and managed follows a predictable pattern.\n- **It’s self-contained**. Your design system is treated as a standalone dependency.\n- **It’s reusable**. You’ve built components so they can be reused in many contexts.\n- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.\n- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.\n\n## Consistency\n\nYour first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.\n"
  },
  {
    "path": "lerna.json",
    "content": "{\n  \"lerna\": \"3.1.3\",\n  \"packages\": [\n    \"core/**/*\",\n    \"other-packages/**/*\"\n  ],\n  \"version\": \"2.4.0\",\n  \"npmClient\": \"yarn\",\n  \"useWorkspaces\": true\n}\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/.eslintrc.js",
    "content": "module.exports = {\n  extends: 'docz-js',\n}\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/.lintstagedrc",
    "content": "{\n  \"*.js\": [\"yarn fix\", \"git add\"]\n}\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **babel-plugin-export-metadata:** fix `hasOwnProperty` method call ([#1581](https://github.com/doczjs/docz/issues/1581)) ([9067ffb](https://github.com/doczjs/docz/commit/9067ffb))\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **babel-plugin-export-metadata:** fix `hasOwnProperty` method call ([#1581](https://github.com/doczjs/docz/issues/1581)) ([9067ffb](https://github.com/doczjs/docz/commit/9067ffb))\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.3.0](https://github.com/doczjs/docz/compare/v2.3.0-alpha.14...v2.3.0) (2020-04-02)\n\n**Note:** Version bump only for package babel-plugin-export-metadata\n\n\n\n\n\n# [2.3.0-alpha.14](https://github.com/doczjs/docz/compare/v2.3.0-alpha.13...v2.3.0-alpha.14) (2020-03-31)\n\n\n### Bug Fixes\n\n* **babel-plugin-export-metadata:** add case for export default… ([#1417](https://github.com/doczjs/docz/issues/1417)) ([31ebd08](https://github.com/doczjs/docz/commit/31ebd08))\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n**Note:** Version bump only for package babel-plugin-export-metadata\n\n\n\n\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n\n### Bug Fixes\n\n* bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n* **babel-plugin-export-metadata:** fix root relative path ([eccbac4](https://github.com/pedronauck/docz/commit/eccbac4))\n* **babel-plugin-export-metadata:** transform to Unix slash ([#825](https://github.com/pedronauck/docz/issues/825)) ([#829](https://github.com/pedronauck/docz/issues/829)) ([f823cc6](https://github.com/pedronauck/docz/commit/f823cc6))\n* eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n* **babel-plugin-export-metadata:** disable enumerable for __filemeta ([38d10fc](https://github.com/pedronauck/docz/commit/38d10fc))\n\n\n### Features\n\n* dynamic src and root path ([c071556](https://github.com/pedronauck/docz/commit/c071556))\n\n\n\n\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n\n### Features\n\n* **docz-core:** add config not use specifiers ([#849](https://github.com/pedronauck/docz/issues/849)) ([d8595a9](https://github.com/pedronauck/docz/commit/d8595a9))\n\n\n\n\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n**Note:** Version bump only for package babel-plugin-export-metadata\n\n\n\n\n\n## [1.0.4](https://github.com/pedronauck/docz/compare/v1.0.3...v1.0.4) (2019-04-18)\n\n\n### Bug Fixes\n\n* **babel-plugin-export-metadata:** avoid adding __filemeta to non-extensible objects ([#798](https://github.com/pedronauck/docz/issues/798)) ([794ebc4](https://github.com/pedronauck/docz/commit/794ebc4))\n* **babel-plugin-export-metadata:** re-export causes meta error ([#805](https://github.com/pedronauck/docz/issues/805)) ([9401676](https://github.com/pedronauck/docz/commit/9401676))\n\n\n\n\n\n## [1.0.2](https://github.com/pedronauck/docz/compare/v1.0.1...v1.0.2) (2019-04-15)\n\n**Note:** Version bump only for package babel-plugin-export-metadata\n\n\n\n\n\n## [1.0.1](https://github.com/pedronauck/docz/compare/v1.0.0...v1.0.1) (2019-04-14)\n\n\n### Bug Fixes\n\n* **babel-plugin-export-metadata:** fix re-export default ([#790](https://github.com/pedronauck/docz/issues/790)) ([#791](https://github.com/pedronauck/docz/issues/791)) ([89b3928](https://github.com/pedronauck/docz/commit/89b3928))\n\n\n\n\n\n# [1.0.0](https://github.com/pedronauck/docz/compare/v1.0.0-rc.8...v1.0.0) (2019-04-11)\n\n\n### Bug Fixes\n\n* **babel-plugin-export-metadata:** remove cache folders from parse ([2978a26](https://github.com/pedronauck/docz/commit/2978a26))\n\n\n\n\n\n# [1.0.0-rc.4](https://github.com/pedronauck/docz/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2019-03-29)\n\n\n### Bug Fixes\n\n* get component filename relative (fix [#706](https://github.com/pedronauck/docz/issues/706)) ([84b23ea](https://github.com/pedronauck/docz/commit/84b23ea))\n\n\n\n\n\n# [1.0.0-beta.0](https://github.com/pedronauck/docz/compare/v1.0.0-alpha.1...v1.0.0-beta.0) (2019-03-19)\n\n**Note:** Version bump only for package babel-plugin-export-metadata\n\n\n\n\n\n# [1.0.0-alpha.0](https://github.com/pedronauck/docz/compare/v0.13.5...v1.0.0-alpha.0) (2019-03-19)\n\n\n### Bug Fixes\n\n* **babel-plugin-export-metadata:** update snapshot test ([6ca7b87](https://github.com/pedronauck/docz/commit/6ca7b87))\n* prop types parser ([a3cc319](https://github.com/pedronauck/docz/commit/a3cc319))\n* **babel-plugin-export-metadata:** just define pro non-primitive types ([ed78a13](https://github.com/pedronauck/docz/commit/ed78a13))\n* **babel-plugin-export-metadata:** prettier fix script ([3a34b72](https://github.com/pedronauck/docz/commit/3a34b72))\n* use custom rollup config to build instead of libundler ([ee42a5a](https://github.com/pedronauck/docz/commit/ee42a5a))\n\n\n### Features\n\n* add initial gatsby integration ([#630](https://github.com/pedronauck/docz/issues/630)) ([70d40cc](https://github.com/pedronauck/docz/commit/70d40cc)), closes [#609](https://github.com/pedronauck/docz/issues/609)\n* docgen refactoring ([#545](https://github.com/pedronauck/docz/issues/545)) ([85499a8](https://github.com/pedronauck/docz/commit/85499a8))\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/README.md",
    "content": "## babel-plugin-export-metadata\n\nThis is an internal docz babel plugin used to add file metadata for function declarations.\n\nUnless you're looking to contribute to docz, you probably don't care about this package and are looking for [the docz package documentation](https://github.com/doczjs/docz).\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/jest.config.js",
    "content": "module.exports = {\n  testEnvironment: 'node',\n}\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/package.json",
    "content": "{\n  \"name\": \"babel-plugin-export-metadata\",\n  \"version\": \"2.4.0\",\n  \"description\": \"Add file metadata for function declarations\",\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Marcelo Piva\",\n    \"email\": \"m.pivaa@gmail.com\"\n  },\n  \"contributors\": [\n    {\n      \"name\": \"Pedro Nauck\",\n      \"email\": \"pedronauck@gmail.com\"\n    }\n  ],\n  \"main\": \"src/index.js\",\n  \"files\": [\n    \"src/\",\n    \"package.json\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"other-packages/babel-plugin-export-metadata\"\n  },\n  \"scripts\": {\n    \"fix\": \"yarn lint --fix\",\n    \"lint\": \"eslint . --ext .js\",\n    \"precommit\": \"lint-staged\",\n    \"test\": \"jest\"\n  },\n  \"dependencies\": {\n    \"@babel/cli\": \"^7.5.5\",\n    \"@babel/core\": \"^7.5.5\",\n    \"@babel/preset-env\": \"^7.5.5\",\n    \"@babel/template\": \"^7.4.4\",\n    \"babel-core\": \"7.0.0-bridge.0\",\n    \"lodash\": \"^4.17.14\"\n  }\n}\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/src/index.js",
    "content": "const path = require('path')\nconst { default: template } = require('@babel/template')\nconst { get } = require('lodash')\n\nconst buildFileMeta = template(`\n  if (\n    typeof ID !== 'undefined' &&\n    ID &&\n    ID === Object(ID) &&\n    Object.isExtensible(ID) &&\n    !Object.prototype.hasOwnProperty.call(ID, '__filemeta')\n  ) {\n    Object.defineProperty(ID, '__filemeta', {\n      configurable: true,\n      value: {\n        name: NAME,\n        filename: FILENAME\n      }\n    });\n  }\n`)\n\nconst replaceExportDefault = template(`\n  import NAME from 'SOURCE'\n  export default NAME\n`)\n\nconst replaceExportDefaultCall = template(`\n  const NAME = DECLARATION\n  export default NAME\n`)\n\nconst getFilename = state => {\n  const rootDir = get(state, 'opts.root', process.cwd())\n  const filename = get(state, 'file.opts.filename')\n  let filepath = filename && path.relative(rootDir, filename)\n  if (process.platform === 'win32') filepath = filepath.split('\\\\').join('/')\n  return filepath\n}\n\nconst findPathToInsert = path =>\n  path.parent.type === 'Program' && path.insertAfter\n    ? path\n    : findPathToInsert(path.parentPath)\n\nconst addFileMetaProperties = (t, path, filename, name) => {\n  if (!filename || !name) {\n    return\n  }\n\n  const pathToInsert = findPathToInsert(path)\n  const newNode = buildFileMeta({\n    ID: t.identifier(name),\n    NAME: t.stringLiteral(name),\n    FILENAME: t.stringLiteral(filename),\n  })\n\n  pathToInsert.insertAfter(newNode)\n}\n\nconst renameDefaultAddFileMetaProperties = (t, path, filename, name) => {\n  if (!filename || !name) {\n    return\n  }\n\n  const sourceValue = get(path, 'node.source.value')\n  const localeName = get(path, 'node.specifiers[0].local.name')\n  const pathToInsert = findPathToInsert(path)\n\n  const fallbackName =\n    localeName === 'default' ? '__DOCZ_DUMMY_EXPORT_DEFAULT' : localeName\n\n  // replace\n  const nameExport = replaceExportDefault({\n    NAME: fallbackName,\n    SOURCE: sourceValue,\n  })\n\n  pathToInsert.replaceWithMultiple(nameExport)\n}\n\nconst replaceDefaultCallAddFileMetaProperties = (t, path, filename) => {\n  if (!filename) {\n    return\n  }\n\n  const declaration = get(path, 'node.declaration')\n  const pathToInsert = findPathToInsert(path)\n\n  const fallbackName = '__DOCZ_DUMMY_EXPORT_DEFAULT'\n\n  // replace\n  const nameExport = replaceExportDefaultCall({\n    NAME: fallbackName,\n    DECLARATION: declaration,\n  })\n\n  const [declPath] = pathToInsert.replaceWithMultiple(nameExport)\n  path.scope.registerDeclaration(declPath)\n}\n\nconst insertNodeExport = t => (path, state) => {\n  const filename = getFilename(state)\n  if (/(\\.cache|\\.docz).+/.test(filename)) return\n\n  const name = get(path, 'node.declaration.id.name')\n  const declarations = get(path, 'node.declaration.declarations')\n  const specifiers = get(path, 'node.specifiers')\n\n  if (name) {\n    addFileMetaProperties(t, path, filename, name)\n  } else if (declarations) {\n    for (declaration of declarations) {\n      const declarationName = get(declaration, 'id.name')\n      addFileMetaProperties(t, path, filename, declarationName)\n    }\n  } else if (specifiers && !state.opts.notUseSpecifiers) {\n    for (specifier of specifiers) {\n      const localName = get(specifier, 'local.name')\n      const exportedName = get(specifier, 'exported.name')\n      const source = get(path, 'node.source')\n      if (source && exportedName === 'default') {\n        // case for: export default from './a.js'. `default` is a keyword, rename it\n        renameDefaultAddFileMetaProperties(t, path, filename, 'default')\n      } else {\n        // if there is `path.source`, the specifier is imported from another module. Then use its exportedName\n        const specifierName = source ? exportedName : localName\n        addFileMetaProperties(t, path, filename, specifierName)\n      }\n    }\n  }\n}\n\nconst insertNodeExportDefault = t => (path, state) => {\n  const filename = getFilename(state)\n  if (/(\\.cache|\\.docz).+/.test(filename)) return\n\n  const declaration = get(path, 'node.declaration', {})\n\n  if (/Function|Class|Identifier/.test(declaration.type)) {\n    const name = declaration.name || get(declaration, 'id.name')\n    addFileMetaProperties(t, path, filename, name)\n    return\n  }\n\n  switch (declaration.type) {\n    case 'ObjectExpression': {\n      const { properties } = declaration\n      for (property of properties) {\n        const name = get(property, 'key.name')\n        addFileMetaProperties(t, path, filename, name)\n      }\n      break\n    }\n\n    case 'ArrayExpression': {\n      const { elements } = declaration\n      for (element of elements) {\n        const name = element.name\n        addFileMetaProperties(t, path, filename, name)\n      }\n      break\n    }\n\n    case 'CallExpression': {\n      // case for: export default React.memo(Component).\n      replaceDefaultCallAddFileMetaProperties(t, path, filename)\n      break\n    }\n  }\n}\n\nmodule.exports = function({ types: t }) {\n  const insertExport = insertNodeExport(t)\n  const insertExportDefault = insertNodeExportDefault(t)\n\n  return {\n    visitor: {\n      ExportNamedDeclaration: insertExport,\n      ExportDefaultDeclaration: insertExportDefault,\n    },\n  }\n}\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/__snapshots__/index.test.js.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`export-metadata export default works with Array expression 1`] = `\n\"/* ExportDefaultDeclaration with Array expression */\nlet foo5 = 5;\n\nlet bar5 = () => {};\n\nexport default [foo5, bar5];\n\nif (typeof bar5 !== 'undefined' && bar5 && bar5 === Object(bar5) && Object.isExtensible(bar5) && !Object.prototype.hasOwnProperty.call(bar5, '__filemeta')) {\n  Object.defineProperty(bar5, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"bar5\\\\\",\n      filename: \\\\\"tests/fixtures/export-default/with-arr-expression.js\\\\\"\n    }\n  });\n}\n\nif (typeof foo5 !== 'undefined' && foo5 && foo5 === Object(foo5) && Object.isExtensible(foo5) && !Object.prototype.hasOwnProperty.call(foo5, '__filemeta')) {\n  Object.defineProperty(foo5, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"foo5\\\\\",\n      filename: \\\\\"tests/fixtures/export-default/with-arr-expression.js\\\\\"\n    }\n  });\n}\"\n`;\n\nexports[`export-metadata export default works with Call expression 1`] = `\n\"/* ExportDefaultDeclaration with Call expression */\nconst foo = v => v;\n\nconst __DOCZ_DUMMY_EXPORT_DEFAULT = foo(5);\n\nexport default __DOCZ_DUMMY_EXPORT_DEFAULT;\n\nif (typeof __DOCZ_DUMMY_EXPORT_DEFAULT !== 'undefined' && __DOCZ_DUMMY_EXPORT_DEFAULT && __DOCZ_DUMMY_EXPORT_DEFAULT === Object(__DOCZ_DUMMY_EXPORT_DEFAULT) && Object.isExtensible(__DOCZ_DUMMY_EXPORT_DEFAULT) && !Object.prototype.hasOwnProperty.call(__DOCZ_DUMMY_EXPORT_DEFAULT, '__filemeta')) {\n  Object.defineProperty(__DOCZ_DUMMY_EXPORT_DEFAULT, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"__DOCZ_DUMMY_EXPORT_DEFAULT\\\\\",\n      filename: \\\\\"tests/fixtures/export-default/with-identifier.js\\\\\"\n    }\n  });\n}\"\n`;\n\nexports[`export-metadata export default works with Class declaration 1`] = `\n\"/* ExportDefaultDeclaration with Class declaration */\nexport default class Bar6 {}\n\nif (typeof Bar6 !== 'undefined' && Bar6 && Bar6 === Object(Bar6) && Object.isExtensible(Bar6) && !Object.prototype.hasOwnProperty.call(Bar6, '__filemeta')) {\n  Object.defineProperty(Bar6, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"Bar6\\\\\",\n      filename: \\\\\"tests/fixtures/export-default/with-class-declaration.js\\\\\"\n    }\n  });\n}\"\n`;\n\nexports[`export-metadata export default works with Function declaration 1`] = `\n\"/* ExportDefaultDeclaration with Function declaration */\nexport default function foo6() {}\n\nif (typeof foo6 !== 'undefined' && foo6 && foo6 === Object(foo6) && Object.isExtensible(foo6) && !Object.prototype.hasOwnProperty.call(foo6, '__filemeta')) {\n  Object.defineProperty(foo6, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"foo6\\\\\",\n      filename: \\\\\"tests/fixtures/export-default/with-func-declaration.js\\\\\"\n    }\n  });\n}\"\n`;\n\nexports[`export-metadata export default works with Identifier 1`] = `\n\"/* ExportDefaultDeclaration with Identifier */\nlet foo3 = 5;\nexport default foo3;\n\nif (typeof foo3 !== 'undefined' && foo3 && foo3 === Object(foo3) && Object.isExtensible(foo3) && !Object.prototype.hasOwnProperty.call(foo3, '__filemeta')) {\n  Object.defineProperty(foo3, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"foo3\\\\\",\n      filename: \\\\\"tests/fixtures/export-default/with-identifier.js\\\\\"\n    }\n  });\n}\"\n`;\n\nexports[`export-metadata export default works with Object expression 1`] = `\n\"/* ExportDefaultDeclaration with Object expression */\nexport default {\n  foo4: 5,\n  bar4: () => {}\n};\n\nif (typeof bar4 !== 'undefined' && bar4 && bar4 === Object(bar4) && Object.isExtensible(bar4) && !Object.prototype.hasOwnProperty.call(bar4, '__filemeta')) {\n  Object.defineProperty(bar4, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"bar4\\\\\",\n      filename: \\\\\"tests/fixtures/export-default/with-obj-expression.js\\\\\"\n    }\n  });\n}\n\nif (typeof foo4 !== 'undefined' && foo4 && foo4 === Object(foo4) && Object.isExtensible(foo4) && !Object.prototype.hasOwnProperty.call(foo4, '__filemeta')) {\n  Object.defineProperty(foo4, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"foo4\\\\\",\n      filename: \\\\\"tests/fixtures/export-default/with-obj-expression.js\\\\\"\n    }\n  });\n}\"\n`;\n\nexports[`export-metadata export named works 1`] = `\n\"/* ExportNamedDeclaration with Specifiers */\nlet foo = 5;\n\nlet bar = () => {};\n\nlet baz = 'baz';\nexport { foo as default, bar as foobar, baz };\n/* ExportNamedDeclaration with Variable declarations */\n\nif (typeof baz !== 'undefined' && baz && baz === Object(baz) && Object.isExtensible(baz) && !Object.prototype.hasOwnProperty.call(baz, '__filemeta')) {\n  Object.defineProperty(baz, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"baz\\\\\",\n      filename: \\\\\"tests/fixtures/export-named/index.js\\\\\"\n    }\n  });\n}\n\nif (typeof bar !== 'undefined' && bar && bar === Object(bar) && Object.isExtensible(bar) && !Object.prototype.hasOwnProperty.call(bar, '__filemeta')) {\n  Object.defineProperty(bar, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"bar\\\\\",\n      filename: \\\\\"tests/fixtures/export-named/index.js\\\\\"\n    }\n  });\n}\n\nif (typeof foo !== 'undefined' && foo && foo === Object(foo) && Object.isExtensible(foo) && !Object.prototype.hasOwnProperty.call(foo, '__filemeta')) {\n  Object.defineProperty(foo, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"foo\\\\\",\n      filename: \\\\\"tests/fixtures/export-named/index.js\\\\\"\n    }\n  });\n}\n\nexport let foo1 = 5,\n    bar1 = () => {};\n/* ExportNamedDeclaration with Function and Class declarations */\n\nif (typeof bar1 !== 'undefined' && bar1 && bar1 === Object(bar1) && Object.isExtensible(bar1) && !Object.prototype.hasOwnProperty.call(bar1, '__filemeta')) {\n  Object.defineProperty(bar1, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"bar1\\\\\",\n      filename: \\\\\"tests/fixtures/export-named/index.js\\\\\"\n    }\n  });\n}\n\nif (typeof foo1 !== 'undefined' && foo1 && foo1 === Object(foo1) && Object.isExtensible(foo1) && !Object.prototype.hasOwnProperty.call(foo1, '__filemeta')) {\n  Object.defineProperty(foo1, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"foo1\\\\\",\n      filename: \\\\\"tests/fixtures/export-named/index.js\\\\\"\n    }\n  });\n}\n\nexport function foo2() {}\n\nif (typeof foo2 !== 'undefined' && foo2 && foo2 === Object(foo2) && Object.isExtensible(foo2) && !Object.prototype.hasOwnProperty.call(foo2, '__filemeta')) {\n  Object.defineProperty(foo2, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"foo2\\\\\",\n      filename: \\\\\"tests/fixtures/export-named/index.js\\\\\"\n    }\n  });\n}\n\nexport class Bar2 {}\n\nif (typeof Bar2 !== 'undefined' && Bar2 && Bar2 === Object(Bar2) && Object.isExtensible(Bar2) && !Object.prototype.hasOwnProperty.call(Bar2, '__filemeta')) {\n  Object.defineProperty(Bar2, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"Bar2\\\\\",\n      filename: \\\\\"tests/fixtures/export-named/index.js\\\\\"\n    }\n  });\n}\"\n`;\n\nexports[`export-metadata re-export re export default 1`] = `\n\"/* Re-export  */\nimport __DOCZ_DUMMY_EXPORT_DEFAULT from \\\\\"../assets/a\\\\\";\nexport default __DOCZ_DUMMY_EXPORT_DEFAULT;\n\nif (typeof __DOCZ_DUMMY_EXPORT_DEFAULT !== 'undefined' && __DOCZ_DUMMY_EXPORT_DEFAULT && __DOCZ_DUMMY_EXPORT_DEFAULT === Object(__DOCZ_DUMMY_EXPORT_DEFAULT) && Object.isExtensible(__DOCZ_DUMMY_EXPORT_DEFAULT) && !Object.prototype.hasOwnProperty.call(__DOCZ_DUMMY_EXPORT_DEFAULT, '__filemeta')) {\n  Object.defineProperty(__DOCZ_DUMMY_EXPORT_DEFAULT, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"__DOCZ_DUMMY_EXPORT_DEFAULT\\\\\",\n      filename: \\\\\"tests/fixtures/re-export/re-export-default.js\\\\\"\n    }\n  });\n}\"\n`;\n\nexports[`export-metadata re-export re export default to name 1`] = `\n\"/* Re-export  */\nexport { default as aDefault } from '../assets/a';\n\nif (typeof aDefault !== 'undefined' && aDefault && aDefault === Object(aDefault) && Object.isExtensible(aDefault) && !Object.prototype.hasOwnProperty.call(aDefault, '__filemeta')) {\n  Object.defineProperty(aDefault, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"aDefault\\\\\",\n      filename: \\\\\"tests/fixtures/re-export/re-export-rename1.js\\\\\"\n    }\n  });\n}\"\n`;\n\nexports[`export-metadata re-export re export name 1`] = `\n\"/* Re-export  */\nexport { a } from '../assets/a';\n\nif (typeof a !== 'undefined' && a && a === Object(a) && Object.isExtensible(a) && !Object.prototype.hasOwnProperty.call(a, '__filemeta')) {\n  Object.defineProperty(a, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"a\\\\\",\n      filename: \\\\\"tests/fixtures/re-export/re-export.js\\\\\"\n    }\n  });\n}\"\n`;\n\nexports[`export-metadata re-export re export name to default 1`] = `\n\"/* Re-export  */\nimport a from \\\\\"../assets/a\\\\\";\nexport default a;\n\nif (typeof a !== 'undefined' && a && a === Object(a) && Object.isExtensible(a) && !Object.prototype.hasOwnProperty.call(a, '__filemeta')) {\n  Object.defineProperty(a, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"a\\\\\",\n      filename: \\\\\"tests/fixtures/re-export/re-export-rename2.js\\\\\"\n    }\n  });\n}\"\n`;\n\nexports[`export-metadata re-export re export name to name 1`] = `\n\"/* Re-export  */\nexport { a as aa } from '../assets/a';\n\nif (typeof aa !== 'undefined' && aa && aa === Object(aa) && Object.isExtensible(aa) && !Object.prototype.hasOwnProperty.call(aa, '__filemeta')) {\n  Object.defineProperty(aa, '__filemeta', {\n    configurable: true,\n    value: {\n      name: \\\\\"aa\\\\\",\n      filename: \\\\\"tests/fixtures/re-export/re-export-rename3.js\\\\\"\n    }\n  });\n}\"\n`;\n\nexports[`export-metadata re-export re-export default 1`] = `\"\"`;\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/assets/a.js",
    "content": "const a = 1\nconst ____a = 2\nexport { a }\nexport default ____a\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/export-default/with-arr-expression.js",
    "content": "/* ExportDefaultDeclaration with Array expression */\nlet foo5 = 5\nlet bar5 = () => {}\nexport default [foo5, bar5]\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/export-default/with-call-expression.js",
    "content": "/* ExportDefaultDeclaration with Call expression */\nconst foo = v => v\nexport default foo(5)\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/export-default/with-class-declaration.js",
    "content": "/* ExportDefaultDeclaration with Class declaration */\nexport default class Bar6 {}\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/export-default/with-func-declaration.js",
    "content": "/* ExportDefaultDeclaration with Function declaration */\nexport default function foo6() {}\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/export-default/with-identifier.js",
    "content": "/* ExportDefaultDeclaration with Identifier */\nlet foo3 = 5\nexport default foo3\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/export-default/with-obj-expression.js",
    "content": "/* ExportDefaultDeclaration with Object expression */\nexport default { foo4: 5, bar4: () => {} }\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/export-named/index.js",
    "content": "/* ExportNamedDeclaration with Specifiers */\nlet foo = 5\nlet bar = () => {}\nlet baz = 'baz'\nexport { foo as default, bar as foobar, baz }\n\n/* ExportNamedDeclaration with Variable declarations */\nexport let foo1 = 5,\n  bar1 = () => {}\n\n/* ExportNamedDeclaration with Function and Class declarations */\nexport function foo2() {}\nexport class Bar2 {}\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/re-export/re-export-default.js",
    "content": "/* Re-export  */\nexport { default } from '../assets/a'\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/re-export/re-export-multi.js",
    "content": "/* Re-export  */\nimport aDefault, { a } from '../assets/a'\nexport { a }\nexport default aDefault\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/re-export/re-export-rename1.js",
    "content": "/* Re-export  */\nexport { default as aDefault } from '../assets/a'\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/re-export/re-export-rename2.js",
    "content": "/* Re-export  */\nexport { a as default } from '../assets/a'\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/re-export/re-export-rename3.js",
    "content": "/* Re-export  */\nexport { a as aa } from '../assets/a'\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/fixtures/re-export/re-export.js",
    "content": "/* Re-export  */\nexport { a } from '../assets/a'\n"
  },
  {
    "path": "other-packages/babel-plugin-export-metadata/tests/index.test.js",
    "content": "const { transformSync } = require('@babel/core')\nconst fs = require('fs')\nconst path = require('path')\nconst plugin = require('../src')\n\nconst exportNamedFixture = path.resolve(\n  './tests/fixtures/export-named/index.js'\n)\n\nconst exportDefaultFixtures = {\n  withArrExpression: path.resolve(\n    './tests/fixtures/export-default/with-arr-expression.js'\n  ),\n  withClassDeclaration: path.resolve(\n    './tests/fixtures/export-default/with-class-declaration.js'\n  ),\n  withFuncDeclaration: path.resolve(\n    './tests/fixtures/export-default/with-func-declaration.js'\n  ),\n  withIdentifier: path.resolve(\n    './tests/fixtures/export-default/with-identifier.js'\n  ),\n  withObjExpression: path.resolve(\n    './tests/fixtures/export-default/with-obj-expression.js'\n  ),\n  withCallExpression: path.resolve(\n    './tests/fixtures/export-default/with-call-expression.js'\n  ),\n}\n\nconst reExportsFixtures = {\n  reExportName: path.resolve(\n    path.resolve('./tests/fixtures/re-export/re-export.js')\n  ),\n  reExportDefault: path.resolve(\n    path.resolve('./tests/fixtures/re-export/re-export-default.js')\n  ),\n  reExportDefaultToName: path.resolve(\n    path.resolve('./tests/fixtures/re-export/re-export-rename1.js')\n  ),\n  reExportNameToDefault: path.resolve(\n    path.resolve('./tests/fixtures/re-export/re-export-rename2.js')\n  ),\n  reExportNameToName: path.resolve(\n    path.resolve('./tests/fixtures/re-export/re-export-rename3.js')\n  ),\n}\n\nconst getCodeFromFilePath = paths =>\n  Object.keys(paths).reduce(\n    (acc, key) => ({\n      ...acc,\n      [key]: fs.readFileSync(paths[key]).toString(),\n    }),\n    {}\n  )\n\nconst exportDefaultCode = getCodeFromFilePath(exportDefaultFixtures)\nconst exportNamedCode = fs.readFileSync(exportNamedFixture).toString()\nconst reExportCode = getCodeFromFilePath(reExportsFixtures)\n\ndescribe('export-metadata', () => {\n  describe('re-export', () => {\n    it('re-export default', () => {\n      const result = transformSync(exportDefaultFixtures.reExportName, {\n        plugins: [plugin],\n        filename: exportNamedFixture.reExportName,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n  })\n\n  describe('export default', () => {\n    it('works with Array expression', () => {\n      const result = transformSync(exportDefaultCode.withArrExpression, {\n        plugins: [plugin],\n        filename: exportDefaultFixtures.withArrExpression,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n\n    it('works with Object expression', () => {\n      const result = transformSync(exportDefaultCode.withObjExpression, {\n        plugins: [plugin],\n        filename: exportDefaultFixtures.withObjExpression,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n\n    it('works with Class declaration', () => {\n      const result = transformSync(exportDefaultCode.withClassDeclaration, {\n        plugins: [plugin],\n        filename: exportDefaultFixtures.withClassDeclaration,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n\n    it('works with Function declaration', () => {\n      const result = transformSync(exportDefaultCode.withFuncDeclaration, {\n        plugins: [plugin],\n        filename: exportDefaultFixtures.withFuncDeclaration,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n\n    it('works with Identifier', () => {\n      const result = transformSync(exportDefaultCode.withIdentifier, {\n        plugins: [plugin],\n        filename: exportDefaultFixtures.withIdentifier,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n\n    it('works with Call expression', () => {\n      const result = transformSync(exportDefaultCode.withCallExpression, {\n        plugins: [plugin],\n        filename: exportDefaultFixtures.withIdentifier,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n  })\n\n  describe('export named', () => {\n    it('works', () => {\n      const result = transformSync(exportNamedCode, {\n        plugins: [plugin],\n        filename: exportNamedFixture,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n  })\n\n  describe('re-export', () => {\n    it('re export name', () => {\n      const result = transformSync(reExportCode.reExportName, {\n        plugins: [plugin],\n        filename: reExportsFixtures.reExportName,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n\n    it('re export default', () => {\n      const result = transformSync(reExportCode.reExportDefault, {\n        plugins: [plugin],\n        filename: reExportsFixtures.reExportDefault,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n\n    it('re export name to default', () => {\n      const result = transformSync(reExportCode.reExportNameToDefault, {\n        plugins: [plugin],\n        filename: reExportsFixtures.reExportNameToDefault,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n\n    it('re export default to name', () => {\n      const result = transformSync(reExportCode.reExportDefaultToName, {\n        plugins: [plugin],\n        filename: reExportsFixtures.reExportDefaultToName,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n\n    it('re export name to name', () => {\n      const result = transformSync(reExportCode.reExportNameToName, {\n        plugins: [plugin],\n        filename: reExportsFixtures.reExportNameToName,\n      })\n\n      expect(result.code).toMatchSnapshot()\n    })\n  })\n})\n"
  },
  {
    "path": "other-packages/e2e-tests/.testcaferc.json",
    "content": "{\n  \"clientScripts\": [\n    \"../../node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js\"\n  ]\n}\n"
  },
  {
    "path": "other-packages/e2e-tests/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.2.0](https://github.com/doczjs/docz/compare/v2.2.0-alpha.8...v2.2.0) (2019-12-11)\n\n**Note:** Version bump only for package e2e-tests\n"
  },
  {
    "path": "other-packages/e2e-tests/__tests__/test.ts",
    "content": "import { Selector } from 'testcafe'\n\nconst getByTestId = async (testId: string) => {\n  return await Selector(`[data-testid=${testId}]`)\n}\n\nfixture`Renders a valid app`.page`http://localhost:3000/`\n\ntest('Renders the right layout and nav', async t => {\n  const layout = await getByTestId('layout')\n  await t.expect(layout.exists).eql(true)\n  const header = await getByTestId('header')\n  await t.expect(header.exists).eql(true)\n  const sidebar = await getByTestId('sidebar')\n  await t.expect(sidebar.exists).eql(true)\n  const logo = await getByTestId('logo')\n  await t.expect(logo.exists).eql(true)\n  const navGroup = await getByTestId('nav-group')\n  await t.expect(navGroup.exists).eql(true)\n\n  await t.navigateTo('/src-components-alert')\n\n  const playground = await getByTestId('playground')\n  await t.expect(playground.count).eql(2)\n\n  const livePreview = await getByTestId('live-preview')\n  await t.expect(livePreview.count).eql(2)\n\n  const liveEditor = await getByTestId('live-editor')\n  await t.expect(liveEditor.count).eql(2)\n})\n\ntest('Render props', async t => {\n  await t.navigateTo('/src-components-alert')\n  const prop = await getByTestId('prop')\n  await t.expect(prop.exists).eql(true)\n  await t.expect(prop.count).eql(1)\n})\n"
  },
  {
    "path": "other-packages/e2e-tests/helpers.js",
    "content": "const fs = require('fs-extra')\nconst path = require('path')\n\nconst updatePackageJson = async (pathToSource, reducer = v => v) => {\n  console.log(`Modifying package.json in ${pathToSource}`)\n  const pathToPackageJson = path.join(`${pathToSource}`, 'package.json')\n  await fs.copyFile(\n    pathToPackageJson,\n    path.join(`${pathToSource}`, 'package.backup.json')\n  )\n  const packageJson = await fs.readJson(pathToPackageJson)\n  const newPackageJson = reducer(packageJson)\n  await fs.writeJson(pathToPackageJson, newPackageJson, { spaces: 2 })\n}\n\nconst revertPackageJson = async pathToSource => {\n  const pathToPackageJson = path.join(`${pathToSource}`, 'package.json')\n  const pathToBackup = path.join(`${pathToSource}`, 'package.backup.json')\n  await fs.move(pathToBackup, pathToPackageJson, { overwrite: true })\n}\n\nmodule.exports = { updatePackageJson, revertPackageJson }\n"
  },
  {
    "path": "other-packages/e2e-tests/index.js",
    "content": "const execa = require('execa')\nconst path = require('path')\nconst waitOn = require('wait-on')\nconst kill = require('kill-port')\nconst fs = require('fs-extra')\nconst tmp = require('tmp')\nconst set = require('lodash/set')\nconst get = require('lodash/get')\nconst { updatePackageJson, revertPackageJson } = require('./helpers')\n\nconst VERDACCIO_PORT = 4873\nconst LOCAL_REGISTRY = `http://localhost:${VERDACCIO_PORT}`\nconst REMOTE_REGISTRY = `https://registry.npmjs.org/`\n\nconst tmpPath = tmp.dirSync({ unsafeCleanup: true, mode: 0o100777 }).name\nconst rootPath = path.join(__dirname, '../../')\nconst e2eTestsPath = __dirname\n\nconst paths = {\n  doczCore: path.join(rootPath, 'core/docz-core'),\n  docz: path.join(rootPath, 'core/docz'),\n  doczGatsbyTheme: path.join(rootPath, 'core/gatsby-theme-docz'),\n  // doczUtils: '../../core/docz-utils',\n  // rehypeDocz: '../../core/rehype-docz',\n  // remarkDocz: '../../core/remark-docz',\n}\n\nconst examples = {\n  basic: {\n    path: path.join(rootPath, 'examples/basic'),\n    tmp: path.join(tmpPath, 'examples/basic'),\n  },\n  gatsby: {\n    path: path.join(rootPath, 'examples/gatsby'),\n    tmp: path.join(tmpPath, 'examples/gatsby'),\n  },\n  'monorepo-package': {\n    path: path.join(rootPath, 'examples/monorepo-package'),\n    tmp: path.join(tmpPath, 'examples/monorepo-package'),\n    tmpDoczPackageJson: path.join(\n      tmpPath,\n      'examples/monorepo-package/packages/basic'\n    ),\n  },\n  typescript: {\n    path: path.join(rootPath, 'examples/typescript'),\n    tmp: path.join(tmpPath, 'examples/typescript'),\n  },\n  'custom-config-location': {\n    path: path.join(rootPath, 'examples/custom-config-location'),\n    tmp: path.join(tmpPath, 'examples/custom-config-location'),\n  },\n}\n\nconst startLocalRegistry = async () => {\n  console.log('Running npx verdaccio')\n  runCommand(`npx verdaccio ${e2eTestsPath}/verdaccio.yaml`)\n  console.log('Waiting for Verdaccio to boot')\n  await waitOn({ resources: [LOCAL_REGISTRY] })\n  await runCommand(`npm set registry ${LOCAL_REGISTRY}`)\n  await runCommand(`yarn config set registry ${LOCAL_REGISTRY}`)\n}\n\nconst stopLocalRegistry = async () => {\n  await runCommand(`npm set registry ${REMOTE_REGISTRY}`)\n  await runCommand(`yarn config set registry ${REMOTE_REGISTRY}`)\n}\n\nconst runCommand = (\n  command,\n  { cwd = rootPath, stdio = 'inherit', detached = false } = {\n    cwd: rootPath,\n    stdio: 'inherit',\n    detached: false,\n  }\n) => {\n  const [binary, ...rest] = command.split(' ')\n  return execa(binary, rest, { cwd, stdio, detached })\n}\n\nconst installNodeModules = async (packagePath, cacheKey = '') => {\n  const cachePath = path.join(rootPath, `.e2e-tests-cache`, cacheKey)\n  const freshModulesPath = path.join(packagePath, 'node_modules')\n  const hasCache = await fs.pathExists(cachePath)\n  if (hasCache) {\n    console.log(\n      `Using node_modules cache in ${cachePath} for node_modules of ${cacheKey}`,\n      {\n        cachePath,\n        freshModulesPath,\n      }\n    )\n    await fs.remove(freshModulesPath)\n    await fs.copy(cachePath, freshModulesPath)\n  } else {\n    console.log(\n      `Couldnt find node_modules cache at ${cachePath} for node_modules of  ${cacheKey}`\n    )\n    await runCommand(`yarn install`, { cwd: packagePath })\n    await fs.copy(freshModulesPath, cachePath)\n  }\n}\n\nconst setupLocalRegistry = async () => {\n  await startLocalRegistry()\n  await updatePackageJson(paths.doczGatsbyTheme, packageJson => {\n    set(packageJson, 'version', `0.0.${Date.now()}`)\n    return packageJson\n  })\n  await updatePackageJson(paths.docz, packageJson => {\n    set(packageJson, 'version', `0.0.${Date.now()}`)\n    return setDoczVersionToCI(packageJson)\n  })\n  await updatePackageJson(paths.doczCore, packageJson => {\n    set(packageJson, 'version', `0.0.${Date.now()}`)\n    return packageJson\n  })\n  // Generate the right .npmrc file in the folders to be published\n  await runCommand(\n    `npx npm-auth-to-token@1.0.0 -u user -p password -e user@example.com -r ${LOCAL_REGISTRY}`,\n    { cwd: paths.doczGatsbyTheme }\n  )\n  await runCommand(\n    `npx npm-auth-to-token@1.0.0 -u user -p password -e user@example.com -r ${LOCAL_REGISTRY}`,\n    { cwd: paths.docz }\n  )\n  await runCommand(\n    `npx npm-auth-to-token@1.0.0 -u user -p password -e user@example.com -r ${LOCAL_REGISTRY}`,\n    { cwd: paths.doczCore }\n  )\n  await runCommand(`npm publish --tag ci`, { cwd: paths.doczGatsbyTheme })\n  console.log('Published gatsby')\n  await runCommand(`npm publish --tag ci`, { cwd: paths.docz })\n  console.log('Published docz')\n  await runCommand(`npm publish --tag ci`, { cwd: paths.doczCore })\n  console.log('Published core')\n}\n\nconst setDoczVersionToCI = packageJson => {\n  if (get(packageJson, 'dependencies.gatsby-theme-docz', false)) {\n    set(packageJson, 'dependencies.gatsby-theme-docz', 'ci')\n  }\n  if (get(packageJson, 'dependencies.docz', false)) {\n    set(packageJson, 'dependencies.docz', 'ci')\n  }\n  if (get(packageJson, 'dependencies.docz-core', false)) {\n    set(packageJson, 'dependencies.docz-core', 'ci')\n  }\n  return packageJson\n}\n\nconst runTests = async () => {\n  console.log(`Preparing tmp examples dir.`)\n  let PORT = 3000\n  for (let exampleName in examples) {\n    console.log(`🕕 Running ${exampleName} test`)\n    const example = examples[exampleName]\n    await fs.ensureDir(`${tmpPath}/examples/${exampleName}`)\n\n    console.log()\n    console.log(`Copying ${exampleName} example to a temporary directory.`)\n    console.log(`Source : ${example.path}`)\n    console.log(`Destination : ${example.tmp}`)\n    console.log()\n\n    await fs.copy(example.path, example.tmp)\n\n    console.log(`Copied ${exampleName} example to a temporary directory.`)\n    console.log(`Modifying package.json in ${example.tmp}`)\n\n    await updatePackageJson(example.tmp, pack => {\n      return setDoczVersionToCI(pack)\n    })\n    if ('tmpDoczPackageJson' in example) {\n      await updatePackageJson(example.tmpDoczPackageJson, pack => {\n        return setDoczVersionToCI(pack)\n      })\n    }\n    console.log({ example })\n\n    console.log(`Installing modules in tmp directory`)\n    await installNodeModules(example.tmp, exampleName)\n\n    // await runCommand(`yarn build`, example.tmp)\n    const command = runCommand(`yarn dev --port ${PORT}`, { cwd: example.tmp })\n\n    await waitOn({ resources: [`http://localhost:${PORT}`] })\n    console.log('Ready. Starting e2e tests')\n\n    await runCommand('yarn run testcafe:ci', { cwd: e2eTestsPath })\n    command.kill('SIGTERM', {\n      forceKillAfterTimeout: 2000,\n    })\n    await kill(3000, 'tcp')\n    console.log(`✅ Ran ${exampleName} test successfully`)\n  }\n  await fs.remove(tmpPath)\n  console.log('done')\n  return\n}\n\nconst cleanup = async () => {\n  console.log('Cleaning up')\n  await stopLocalRegistry()\n  await revertPackageJson(paths.doczGatsbyTheme)\n  await revertPackageJson(paths.docz)\n  await revertPackageJson(paths.doczCore)\n}\n\n;(async () => {\n  await setupLocalRegistry()\n  await runTests()\n  await cleanup()\n  console.log('Exiting process')\n  process.exit(0)\n})()\n"
  },
  {
    "path": "other-packages/e2e-tests/package.json",
    "content": "{\n  \"name\": \"e2e-tests\",\n  \"version\": \"2.2.0\",\n  \"private\": true,\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test:ci\": \"node index.js\",\n    \"testcafe:ci\": \"testcafe \\\"chrome:headless\\\" __tests__/*\",\n    \"testcafe:dev\": \"testcafe chrome __tests__/* --live\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"docz\": \"^1.2.0\",\n    \"execa\": \"^2.0.4\",\n    \"fs-extra\": \"^8.1.0\",\n    \"lodash\": \"^4.17.15\",\n    \"tmp\": \"^0.1.0\"\n  },\n  \"devDependencies\": {\n    \"@testing-library/testcafe\": \"^2.1.1\",\n    \"kill-port\": \"^1.5.1\",\n    \"testcafe\": \"^1.4.1\",\n    \"wait-on\": \"^3.3.0\"\n  }\n}\n"
  },
  {
    "path": "other-packages/e2e-tests/testing-library.js",
    "content": "const test = (name, fn) => {\n  console.log('>', name)\n  fn()\n}\n\nconst assert = (condition, description) => {\n  if (condition) {\n    console.log('✔️', description)\n  } else {\n    console.assert(condition, description)\n  }\n}\n"
  },
  {
    "path": "other-packages/e2e-tests/verdaccio.yaml",
    "content": "#\n# This is based on verdaccio's default config file. It allows all users\n# to do anything, so don't use it on production systems.\n#\n# Look here for more config file examples:\n# https://github.com/verdaccio/verdaccio/tree/master/conf\n#\n\n# path to a directory with all packages\nstorage: ./storage\n\nauth:\n  htpasswd:\n    file: ./htpasswd\n    # Maximum amount of users allowed to register, defaults to \"+inf\".\n    # You can set this to -1 to disable registration.\n    #max_users: 1000\n\n# a list of other known repositories we can talk to\nuplinks:\n  npmjs:\n    url: https://registry.npmjs.org/\n    max_fails: 40\n    maxage: 30m\n    timeout: 60s\n    agent_options:\n      keepAlive: true\n      maxSockets: 40\n      maxFreeSockets: 10\n\npackages:\n  '@*/*':\n    # scoped packages\n    access: $all\n    publish: $all\n    proxy: npmjs\n\n  '**':\n    # allow all users (including non-authenticated users) to read and\n    # publish all packages\n    #\n    # you can specify usernames/groupnames (depending on your auth plugin)\n    # and three keywords: \"$all\", \"$anonymous\", \"$authenticated\"\n    access: $all\n\n    # allow all known users to publish packages\n    # (anyone can register by default, remember?)\n    publish: $all\n\n    # if package is not available locally, proxy requests to 'npmjs' registry\n    proxy: npmjs\n\n# log settings\nlogs:\n  - { type: stdout, format: pretty, level: warn }\n  #- {type: file, path: verdaccio.log, level: info}\n\n# See https://github.com/verdaccio/verdaccio/issues/301\nserver:\n  keepAliveTimeout: 0\n"
  },
  {
    "path": "other-packages/eslint-config-docz-js/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n* add functions never to eslint rule ([#1487](https://github.com/doczjs/docz/issues/1487)) ([becd589](https://github.com/doczjs/docz/commit/becd589))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n* add functions never to eslint rule ([#1487](https://github.com/doczjs/docz/issues/1487)) ([becd589](https://github.com/doczjs/docz/commit/becd589))\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n**Note:** Version bump only for package eslint-config-docz-js\n\n\n\n\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n\n### Bug Fixes\n\n* bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n* eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n* no-undef eslint rule ([125c5cf](https://github.com/pedronauck/docz/commit/125c5cf))\n\n\n\n\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n**Note:** Version bump only for package eslint-config-docz\n\n\n\n\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n**Note:** Version bump only for package eslint-config-docz\n"
  },
  {
    "path": "other-packages/eslint-config-docz-js/README.md",
    "content": "## eslint-config-docz-js\n\nThis is an internal docz eslint config used in docz JS modules.\n\nUnless you're looking to contribute to docz, you probably don't care about this package and are looking for [the docz package documentation](https://github.com/doczjs/docz).\n"
  },
  {
    "path": "other-packages/eslint-config-docz-js/index.js",
    "content": "module.exports = {\n  extends: [\n    'plugin:react/recommended',\n    'plugin:mdx/recommended',\n    'plugin:prettier/recommended',\n  ],\n  rules: {\n    'no-unused-vars': [\n      'error',\n      {\n        vars: 'all',\n        args: 'after-used',\n        ignoreRestSiblings: false,\n        argsIgnorePattern: '^_',\n      },\n    ],\n    'comma-dangle': ['error', 'always-multiline', { functions: 'never' }],\n    'no-mixed-operators': 'error',\n    'no-console': 'off',\n    'react/prop-types': 'off',\n  },\n  parserOptions: {\n    ecmaVersion: 2018,\n    sourceType: 'module',\n    ecmaFeatures: {\n      jsx: true,\n    },\n  },\n  settings: {\n    react: {\n      version: 'detect',\n    },\n  },\n}\n"
  },
  {
    "path": "other-packages/eslint-config-docz-js/package.json",
    "content": "{\n  \"name\": \"eslint-config-docz-js\",\n  \"version\": \"2.4.0\",\n  \"description\": \"Eslint config of Docz for Javascript\",\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Pedro Nauck\",\n    \"email\": \"pedronauck@gmail.com\"\n  },\n  \"main\": \"index.js\",\n  \"files\": [\n    \"index.js\",\n    \"package.json\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"other-packages/eslint-config-docz-js\"\n  },\n  \"scripts\": {\n    \"fix\": \"run-s fix:*\",\n    \"fix:prettier\": \"prettier \\\"**/*.js\\\" --write\"\n  },\n  \"dependencies\": {\n    \"babel-eslint\": \"^10.0.2\",\n    \"eslint\": \"^6.5.1\",\n    \"eslint-config-prettier\": \"^5.0.0\",\n    \"eslint-plugin-mdx\": \"^1.6.1\",\n    \"eslint-plugin-prettier\": \"^3.1.0\",\n    \"eslint-plugin-react\": \"^7.13.0\"\n  }\n}\n"
  },
  {
    "path": "other-packages/eslint-config-docz-ts/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n* add functions never to eslint rule ([#1487](https://github.com/doczjs/docz/issues/1487)) ([becd589](https://github.com/doczjs/docz/commit/becd589))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n* add functions never to eslint rule ([#1487](https://github.com/doczjs/docz/issues/1487)) ([becd589](https://github.com/doczjs/docz/commit/becd589))\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n**Note:** Version bump only for package eslint-config-docz-ts\n\n\n\n\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n\n### Bug Fixes\n\n* bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n* eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n* no-undef eslint rule ([125c5cf](https://github.com/pedronauck/docz/commit/125c5cf))\n\n\n\n\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n**Note:** Version bump only for package eslint-config-docz\n\n\n\n\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n**Note:** Version bump only for package eslint-config-docz\n"
  },
  {
    "path": "other-packages/eslint-config-docz-ts/README.md",
    "content": "## eslint-config-docz-ts\n\nThis is an internal docz eslint config used in docz TS modules.\n\nUnless you're looking to contribute to docz, you probably don't care about this package and are looking for [the docz package documentation](https://github.com/doczjs/docz).\n"
  },
  {
    "path": "other-packages/eslint-config-docz-ts/index.js",
    "content": "module.exports = {\n  extends: [\n    'plugin:react/recommended',\n    'plugin:prettier/recommended',\n    'plugin:@typescript-eslint/recommended',\n    'plugin:mdx/recommended',\n    'prettier/@typescript-eslint',\n  ],\n  rules: {\n    'comma-dangle': ['error', 'always-multiline', { functions: 'never' }],\n    'no-mixed-operators': 'error',\n    'no-console': 'off',\n    'react/prop-types': 'off',\n    '@typescript-eslint/no-unused-vars': [\n      'error',\n      {\n        vars: 'all',\n        args: 'after-used',\n        ignoreRestSiblings: false,\n        argsIgnorePattern: '^_',\n      },\n    ],\n    '@typescript-eslint/indent': 'off',\n    '@typescript-eslint/no-explicit-any': 'off',\n    '@typescript-eslint/no-non-null-assertion': 'off',\n    '@typescript-eslint/explicit-function-return-type': 'off',\n    '@typescript-eslint/explicit-member-accessibility': 'off',\n    '@typescript-eslint/no-var-requires': 'off',\n    '@typescript-eslint/no-use-before-define': 'off',\n    '@typescript-eslint/no-object-literal-type-assertion': 'off',\n    '@typescript-eslint/no-parameter-properties': 'off',\n  },\n  parserOptions: {\n    ecmaVersion: 2018,\n    sourceType: 'module',\n    ecmaFeatures: {\n      jsx: true,\n    },\n  },\n  settings: {\n    react: {\n      version: 'detect',\n    },\n  },\n}\n"
  },
  {
    "path": "other-packages/eslint-config-docz-ts/package.json",
    "content": "{\n  \"name\": \"eslint-config-docz-ts\",\n  \"version\": \"2.4.0\",\n  \"description\": \"Eslint config of Docz for Typescript\",\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Pedro Nauck\",\n    \"email\": \"pedronauck@gmail.com\"\n  },\n  \"main\": \"index.js\",\n  \"files\": [\n    \"index.js\",\n    \"package.json\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"other-packages/eslint-config-docz-ts\"\n  },\n  \"scripts\": {\n    \"fix\": \"run-s fix:*\",\n    \"fix:prettier\": \"prettier \\\"**/*.js\\\" --write\"\n  },\n  \"dependencies\": {\n    \"@typescript-eslint/eslint-plugin\": \"^1.12.0\",\n    \"@typescript-eslint/parser\": \"^1.12.0\",\n    \"eslint\": \"^6.5.1\",\n    \"eslint-config-prettier\": \"^5.0.0\",\n    \"eslint-plugin-mdx\": \"^1.6.1\",\n    \"eslint-plugin-prettier\": \"^3.1.0\",\n    \"eslint-plugin-react\": \"^7.13.0\"\n  }\n}\n"
  },
  {
    "path": "other-packages/load-cfg/.eslintignore",
    "content": "dist\n"
  },
  {
    "path": "other-packages/load-cfg/.eslintrc.js",
    "content": "module.exports = {\n  extends: 'docz-ts',\n}\n"
  },
  {
    "path": "other-packages/load-cfg/.lintstagedrc",
    "content": "{\n  \"*.{ts,tsx}\": [\"yarn fix\", \"git add\"]\n}\n"
  },
  {
    "path": "other-packages/load-cfg/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n\n### Bug Fixes\n\n* bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n* eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n* packages rollup config ([534d7bf](https://github.com/pedronauck/docz/commit/534d7bf))\n\n\n### Features\n\n* docz running using gatsby under the hood ([10ffd48](https://github.com/pedronauck/docz/commit/10ffd48))\n\n\n\n\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n## [1.0.4](https://github.com/pedronauck/docz/compare/v1.0.3...v1.0.4) (2019-04-18)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n## [1.0.2](https://github.com/pedronauck/docz/compare/v1.0.1...v1.0.2) (2019-04-15)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n## [1.0.1](https://github.com/pedronauck/docz/compare/v1.0.0...v1.0.1) (2019-04-14)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n# [1.0.0](https://github.com/pedronauck/docz/compare/v1.0.0-rc.8...v1.0.0) (2019-04-11)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n# [1.0.0-rc.4](https://github.com/pedronauck/docz/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2019-03-29)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n# [1.0.0-beta.0](https://github.com/pedronauck/docz/compare/v1.0.0-alpha.1...v1.0.0-beta.0) (2019-03-19)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n# [1.0.0-alpha.0](https://github.com/pedronauck/docz/compare/v0.13.5...v1.0.0-alpha.0) (2019-03-19)\n\n\n### Bug Fixes\n\n* immutable merge with lodash ([2fe94d4](https://github.com/pedronauck/docz/commit/2fe94d4))\n* **load-cfg:** merge default config on load ([d3b4bc6](https://github.com/pedronauck/docz/commit/d3b4bc6))\n* use lodash merge instead of deepmerge ([18ac37b](https://github.com/pedronauck/docz/commit/18ac37b))\n* **load-cfg:** use babel register in order to require using es6 ([7ad3b64](https://github.com/pedronauck/docz/commit/7ad3b64))\n* use custom rollup config to build instead of libundler ([ee42a5a](https://github.com/pedronauck/docz/commit/ee42a5a))\n\n\n### Features\n\n* add initial gatsby integration ([#630](https://github.com/pedronauck/docz/issues/630)) ([70d40cc](https://github.com/pedronauck/docz/commit/70d40cc)), closes [#609](https://github.com/pedronauck/docz/issues/609)\n\n\n\n\n\n## [0.13.3](https://github.com/pedronauck/docz/compare/v0.13.2...v0.13.3) (2018-12-17)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n# [0.13.0](https://github.com/pedronauck/docz/compare/v0.12.17...v0.13.0) (2018-12-17)\n\n\n### Bug Fixes\n\n* **docz-core:** use webpack-dev-server instead of webpack-serve ([4157e05](https://github.com/pedronauck/docz/commit/4157e05))\n\n\n\n\n\n## [0.12.16](https://github.com/pedronauck/docz/compare/v0.12.15...v0.12.16) (2018-12-13)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n## [0.12.15](https://github.com/pedronauck/docz/compare/v0.12.14...v0.12.15) (2018-12-04)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n## [0.12.14](https://github.com/pedronauck/docz/compare/v0.12.13...v0.12.14) (2018-12-04)\n\n\n### Bug Fixes\n\n* some typings warnings ([4afb87b](https://github.com/pedronauck/docz/commit/4afb87b))\n\n\n\n\n\n## [0.12.13](https://github.com/pedronauck/docz/compare/v0.12.12...v0.12.13) (2018-11-23)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n## [0.12.10](https://github.com/pedronauck/docz/compare/v0.12.9...v0.12.10) (2018-11-15)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n## [0.12.6](https://github.com/pedronauck/docz/compare/v0.12.5...v0.12.6) (2018-10-30)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n<a name=\"0.11.1\"></a>\n## [0.11.1](https://github.com/pedronauck/docz/compare/v0.11.0...v0.11.1) (2018-09-07)\n\n**Note:** Version bump only for package load-cfg\n\n\n\n\n\n<a name=\"0.11.0\"></a>\n# [0.11.0](https://github.com/pedronauck/docz/compare/v0.10.3...v0.11.0) (2018-09-02)\n\n\n### Bug Fixes\n\n* **load-cfg:** use fs-extra to read json sync instead of JSON.parse ([04d1e1a](https://github.com/pedronauck/docz/commit/04d1e1a))\n\n\n\n\n\n<a name=\"0.10.3\"></a>\n## [0.10.3](https://github.com/pedronauck/docz/compare/v0.9.6...v0.10.3) (2018-08-16)\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.10.0\"></a>\n# [0.10.0](https://github.com/pedronauck/docz/compare/v0.9.6...v0.10.0) (2018-08-13)\n\n\n### Features\n\n* **docz-core:** add htmlContext and mini-html-webpack-plugin ([4b6ec0f](https://github.com/pedronauck/docz/commit/4b6ec0f))\n\n\n\n\n<a name=\"0.9.4\"></a>\n## [0.9.4](https://github.com/pedronauck/docz/compare/v0.9.4-beta.1...v0.9.4) (2018-08-04)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.9.4-beta.1\"></a>\n## [0.9.4-beta.1](https://github.com/pedronauck/docz/compare/v0.9.4-beta.0...v0.9.4-beta.1) (2018-08-04)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.9.0\"></a>\n# [0.9.0](https://github.com/pedronauck/docz/compare/v0.9.0-beta.1...v0.9.0) (2018-08-02)\n\n\n### Bug Fixes\n\n* **docz:** using context for imports to prevent disposed hmr ([b37284c](https://github.com/pedronauck/docz/commit/b37284c))\n\n\n\n\n<a name=\"0.9.0-beta.0\"></a>\n# [0.9.0-beta.0](https://github.com/pedronauck/docz/compare/v0.8.0...v0.9.0-beta.0) (2018-08-01)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.7.0\"></a>\n# [0.7.0](https://github.com/pedronauck/docz/compare/v0.6.2...v0.7.0) (2018-07-23)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.6.0\"></a>\n# [0.6.0](https://github.com/pedronauck/docz/compare/v0.5.9...v0.6.0) (2018-07-19)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.5.9\"></a>\n## [0.5.9](https://github.com/pedronauck/docz/compare/v0.5.8...v0.5.9) (2018-07-16)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.5.6\"></a>\n## [0.5.6](https://github.com/pedronauck/docz/compare/v0.5.5...v0.5.6) (2018-07-11)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.5.4\"></a>\n## [0.5.4](https://github.com/pedronauck/docz/compare/v0.5.3...v0.5.4) (2018-07-07)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.5.1\"></a>\n## [0.5.1](https://github.com/pedronauck/docz/compare/v0.3.4...v0.5.1) (2018-07-03)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.5.0\"></a>\n# [0.5.0](https://github.com/pedronauck/docz/compare/v0.3.4...v0.5.0) (2018-07-03)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.3.4\"></a>\n## [0.3.4](https://github.com/pedronauck/docz/compare/v0.3.3...v0.3.4) (2018-06-26)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.3.3\"></a>\n## [0.3.3](https://github.com/pedronauck/docz/compare/v0.3.2...v0.3.3) (2018-06-26)\n\n\n### Bug Fixes\n\n* **docz-core:** copy templates files for dist ([#88](https://github.com/pedronauck/docz/issues/88)) ([5e4b98d](https://github.com/pedronauck/docz/commit/5e4b98d))\n\n\n\n\n<a name=\"0.2.8\"></a>\n## [0.2.8](https://github.com/pedronauck/docz/compare/v0.2.7...v0.2.8) (2018-06-21)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.2.0\"></a>\n# [0.2.0](https://github.com/pedronauck/docz/compare/v0.2.0-beta.2...v0.2.0) (2018-06-11)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.1.2-beta.1\"></a>\n## [0.1.2-beta.1](https://github.com/doczjs/docz/compare/v0.1.2-beta.0...v0.1.2-beta.1) (2018-06-09)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.1.2-beta.0\"></a>\n## [0.1.2-beta.0](https://github.com/doczjs/docz/compare/v0.1.1...v0.1.2-beta.0) (2018-06-02)\n\n\n\n\n**Note:** Version bump only for package load-cfg\n\n<a name=\"0.1.1-beta.5\"></a>\n## [0.1.1-beta.5](https://github.com/doczjs/docz/compare/v0.1.1-beta.4...v0.1.1-beta.5) (2018-06-01)\n\n\n### Bug Fixes\n\n* **load-cfg:** add namedExports options ([d36194d](https://github.com/doczjs/docz/commit/d36194d))\n\n\n### Features\n\n* **load-cfg:** add esm module loader ([12a7610](https://github.com/doczjs/docz/commit/12a7610))\n\n\n\n\n<a name=\"0.1.0\"></a>\n# 0.1.0 (2018-05-29)\n\n\n### Features\n\n* **docz-core:** add support for load custom themes ([ade98ce](https://github.com/doczjs/docz/commit/ade98ce))\n* **load-cfg:** add script as package ([11e409c](https://github.com/doczjs/docz/commit/11e409c))\n* **load-cfg:** set cache to require file ([c49fc64](https://github.com/doczjs/docz/commit/c49fc64))\n"
  },
  {
    "path": "other-packages/load-cfg/README.md",
    "content": "## load-cfg\n\nThis is an internal docz package used to load the docz config from a project into memory.\n\nUnless you're looking to contribute to docz, you probably don't care about this package and are looking for [the docz package documentation](https://github.com/doczjs/docz).\n"
  },
  {
    "path": "other-packages/load-cfg/package.json",
    "content": "{\n  \"name\": \"load-cfg\",\n  \"version\": \"2.4.0\",\n  \"description\": \"Method that can load project configurations based\",\n  \"license\": \"MIT\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.esm.js\",\n  \"typings\": \"dist/index.d.ts\",\n  \"files\": [\n    \"dist/\",\n    \"package.json\",\n    \"README.md\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"other-packages/load-cfg\"\n  },\n  \"scripts\": {\n    \"dev\": \"cross-env NODE_ENV=development yarn build -w\",\n    \"build\": \"cross-env NODE_ENV=production rollup -c\",\n    \"fix\": \"yarn lint --fix\",\n    \"lint\": \"eslint . --ext mdx,ts,tsx\",\n    \"precommit\": \"lint-staged\"\n  },\n  \"dependencies\": {\n    \"@babel/core\": \"^7.5.5\",\n    \"@babel/preset-env\": \"^7.5.5\",\n    \"@babel/register\": \"^7.5.5\",\n    \"find-up\": \"^4.1.0\",\n    \"fs-extra\": \"^8.1.0\",\n    \"lodash\": \"^4.17.14\"\n  }\n}\n"
  },
  {
    "path": "other-packages/load-cfg/rollup.config.js",
    "content": "import { config } from 'docz-rollup'\n\nexport default config({\n  input: './src/index.ts',\n})\n"
  },
  {
    "path": "other-packages/load-cfg/src/index.ts",
    "content": "import * as fs from 'fs-extra'\nimport * as path from 'path'\nimport * as findup from 'find-up'\nimport { merge } from 'lodash/fp'\n\nexport const loadFile = (filepath: string, noCache?: boolean) => {\n  require('@babel/register')({\n    cache: !noCache,\n    presets: [['@babel/preset-env', { modules: 'commonjs' }]],\n  })\n\n  let file\n\n  if (noCache && filepath) {\n    delete require.cache[path.resolve(filepath)]\n  }\n\n  try {\n    const isJS = path.extname(filepath) === '.js'\n\n    if (isJS) {\n      const required = require(filepath)\n      file = required.default || required\n    } else {\n      file = fs.readJsonSync(filepath, { encoding: 'utf-8' })\n    }\n  } catch (err) {\n    console.warn('There was an error loading your config:\\n')\n    console.warn(err)\n  }\n\n  return file\n}\n\nexport const finds = (name: string): string[] => [\n  `${name}.json`,\n  `.${name}rc`,\n  `${name}rc.js`,\n  `${name}rc.json`,\n  `${name}.config.js`,\n  `${name}.config.json`,\n]\n\nexport function load<C = any>(\n  name: string,\n  defaultConfig: C,\n  noCache?: boolean,\n  deep?: boolean\n): C {\n  const filepath = findup.sync(finds(name))\n  const file = filepath ? loadFile(filepath, noCache) : {}\n  return defaultConfig\n    ? deep\n      ? merge(defaultConfig, file)\n      : { ...defaultConfig, ...file }\n    : file\n}\n\nexport function loadFrom<C = any>(\n  filePath: string,\n  defaultConfig: C,\n  noCache?: boolean,\n  deep?: boolean\n): C {\n  const file = loadFile(filePath, noCache)\n  return defaultConfig\n    ? deep\n      ? merge(defaultConfig, file)\n      : { ...defaultConfig, ...file }\n    : file\n}\n"
  },
  {
    "path": "other-packages/load-cfg/src/types.d.ts",
    "content": "declare module 'esm'\n"
  },
  {
    "path": "other-packages/load-cfg/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"module\": \"esnext\",\n    \"outDir\": \"dist\",\n    \"rootDir\": \"src\",\n    \"declaration\": true,\n    \"types\": [\"node\"],\n    \"typeRoots\": [\"../../node_modules/@types\", \"node_modules/@types\"]\n  },\n  \"include\": [\"src/**/*\", \"src/types.d.ts\"],\n  \"exclude\": [\"node_modules/**\"]\n}\n"
  },
  {
    "path": "other-packages/react-docgen-actual-name-handler/.eslintignore",
    "content": "dist\n"
  },
  {
    "path": "other-packages/react-docgen-actual-name-handler/.eslintrc.js",
    "content": "module.exports = {\n  extends: 'docz-ts',\n}\n"
  },
  {
    "path": "other-packages/react-docgen-actual-name-handler/.lintstagedrc",
    "content": "{\n  \"*.{ts,tsx}\": [\"yarn fix\", \"git add\"]\n}\n"
  },
  {
    "path": "other-packages/react-docgen-actual-name-handler/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n# [2.4.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.4.0) (2022-02-11)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.3.3-alpha.0](https://github.com/doczjs/docz/compare/v2.3.2-alpha.0...v2.3.3-alpha.0) (2021-09-10)\n\n\n### Bug Fixes\n\n* **docz:** dependency issues ([#1647](https://github.com/doczjs/docz/issues/1647)) ([5bdca48](https://github.com/doczjs/docz/commit/5bdca48))\n\n\n\n\n\n# [2.1.0](https://github.com/doczjs/docz/compare/v2.0.0-rc.77...v2.1.0) (2019-11-27)\n\n**Note:** Version bump only for package react-docgen-actual-name-handler\n\n\n\n\n\n# [2.0.0-rc.1](https://github.com/pedronauck/docz/compare/v1.2.0...v2.0.0-rc.1) (2019-07-18)\n\n\n### Bug Fixes\n\n* bump version ([a346b59](https://github.com/pedronauck/docz/commit/a346b59))\n* eslint configs ([280981f](https://github.com/pedronauck/docz/commit/280981f))\n* packages rollup config ([534d7bf](https://github.com/pedronauck/docz/commit/534d7bf))\n\n\n\n\n\n# [1.2.0](https://github.com/pedronauck/docz/compare/v1.1.0...v1.2.0) (2019-05-08)\n\n**Note:** Version bump only for package react-docgen-actual-name-handler\n\n\n\n\n\n# [1.1.0](https://github.com/pedronauck/docz/compare/v1.0.4...v1.1.0) (2019-05-01)\n\n**Note:** Version bump only for package react-docgen-actual-name-handler\n\n\n\n\n\n## [1.0.4](https://github.com/pedronauck/docz/compare/v1.0.3...v1.0.4) (2019-04-18)\n\n**Note:** Version bump only for package react-docgen-actual-name-handler\n\n\n\n\n\n## [1.0.2](https://github.com/pedronauck/docz/compare/v1.0.1...v1.0.2) (2019-04-15)\n\n**Note:** Version bump only for package react-docgen-actual-name-handler\n\n\n\n\n\n## [1.0.1](https://github.com/pedronauck/docz/compare/v1.0.0...v1.0.1) (2019-04-14)\n\n**Note:** Version bump only for package react-docgen-actual-name-handler\n\n\n\n\n\n# [1.0.0](https://github.com/pedronauck/docz/compare/v1.0.0-rc.8...v1.0.0) (2019-04-11)\n\n**Note:** Version bump only for package react-docgen-actual-name-handler\n\n\n\n\n\n# [1.0.0-rc.4](https://github.com/pedronauck/docz/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2019-03-29)\n\n**Note:** Version bump only for package react-docgen-actual-name-handler\n\n\n\n\n\n# [1.0.0-alpha.0](https://github.com/pedronauck/docz/compare/v0.13.5...v1.0.0-alpha.0) (2019-03-19)\n\n\n### Bug Fixes\n\n* use custom rollup config to build instead of libundler ([ee42a5a](https://github.com/pedronauck/docz/commit/ee42a5a))\n\n\n### Features\n\n* add initial gatsby integration ([#630](https://github.com/pedronauck/docz/issues/630)) ([70d40cc](https://github.com/pedronauck/docz/commit/70d40cc)), closes [#609](https://github.com/pedronauck/docz/issues/609)\n* docgen refactoring ([#545](https://github.com/pedronauck/docz/issues/545)) ([85499a8](https://github.com/pedronauck/docz/commit/85499a8))\n"
  },
  {
    "path": "other-packages/react-docgen-actual-name-handler/README.md",
    "content": "## react-docgen-actual-name-handler\n\nThis is an internal docz [react-docgen](https://github.com/reactjs/react-docgen) [handler](https://github.com/reactjs/react-docgen#handlers) used to set `actualName` on React components.\n\nUnless you're looking to contribute to docz, you probably don't care about this package and are looking for [the docz package documentation](https://github.com/doczjs/docz).\n"
  },
  {
    "path": "other-packages/react-docgen-actual-name-handler/package.json",
    "content": "{\n  \"name\": \"react-docgen-actual-name-handler\",\n  \"version\": \"2.4.0\",\n  \"license\": \"MIT\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.esm.js\",\n  \"typings\": \"dist/index.d.ts\",\n  \"files\": [\n    \"dist/\",\n    \"package.json\",\n    \"README.md\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\",\n    \"directory\": \"other-packages/react-docgen-actual-name-handler\"\n  },\n  \"scripts\": {\n    \"dev\": \"cross-env NODE_ENV=development yarn build -w\",\n    \"build\": \"cross-env NODE_ENV=production rollup -c\",\n    \"fix\": \"yarn lint --fix\",\n    \"lint\": \"eslint . --ext mdx,ts,tsx\",\n    \"precommit\": \"lint-staged\"\n  },\n  \"dependencies\": {\n    \"react-docgen\": \"^4.1.1\",\n    \"recast\": \"^0.18.1\"\n  }\n}\n"
  },
  {
    "path": "other-packages/react-docgen-actual-name-handler/rollup.config.js",
    "content": "import { config } from 'docz-rollup'\n\nexport default config({\n  input: './src/index.ts',\n})\n"
  },
  {
    "path": "other-packages/react-docgen-actual-name-handler/src/index.ts",
    "content": "import { utils } from 'react-docgen'\nimport * as recast from 'recast'\n\nconst { getNameOrValue, resolveFunctionDefinitionToReturnValue } = utils\nconst {\n  types: { namedTypes: types },\n} = recast\n\nexport default function actualNameHandler(documentation: any, path: any): any {\n  // Function and class declarations need special treatment. The name of the\n  // function / class is the displayName\n  if (\n    types.ClassDeclaration.check(path.node) ||\n    types.FunctionDeclaration.check(path.node)\n  ) {\n    documentation.set('actualName', getNameOrValue(path.get('id')))\n  } else if (\n    types.ArrowFunctionExpression.check(path.node) ||\n    types.FunctionExpression.check(path.node)\n  ) {\n    if (types.VariableDeclarator.check(path.parentPath.node)) {\n      documentation.set('actualName', getNameOrValue(path.parentPath.get('id')))\n    } else if (types.AssignmentExpression.check(path.parentPath.node)) {\n      documentation.set(\n        'actualName',\n        getNameOrValue(path.parentPath.get('left'))\n      )\n    }\n  } else if (\n    // React.createClass() or createReactClass()\n    types.CallExpression.check(path.parentPath.node) &&\n    types.VariableDeclarator.check(path.parentPath.parentPath.parentPath.node)\n  ) {\n    documentation.set(\n      'actualName',\n      getNameOrValue(path.parentPath.parentPath.parentPath.get('id'))\n    )\n  } else {\n    // Could not find an actual name\n    documentation.set('actualName', '')\n  }\n  return\n\n  // If display name is defined as a getter we get a function expression as\n  // value. In that case we try to determine the value from the return\n  // statement.\n  let displayNamePath\n  if (types.FunctionExpression.check(displayNamePath.node)) {\n    displayNamePath = resolveFunctionDefinitionToReturnValue(displayNamePath)\n  }\n  if (!displayNamePath || !types.Literal.check(displayNamePath.node)) return\n  documentation.set('actualName', displayNamePath.node.value)\n}\n"
  },
  {
    "path": "other-packages/react-docgen-actual-name-handler/src/types.d.ts",
    "content": "declare module 'recast'\ndeclare module 'react-docgen'\n"
  },
  {
    "path": "other-packages/react-docgen-actual-name-handler/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"module\": \"esnext\",\n    \"outDir\": \"dist\",\n    \"rootDir\": \"src\",\n    \"declaration\": true,\n    \"types\": [\"node\"],\n    \"typeRoots\": [\"../../node_modules/@types\", \"node_modules/@types\"]\n  },\n  \"include\": [\"src/**/*\", \"src/types.d.ts\"],\n  \"exclude\": [\"node_modules/**\"]\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"private\": true,\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Pedro Nauck\",\n    \"email\": \"pedronauck@gmail.com\",\n    \"url\": \"https://github.com/pedronauck\"\n  },\n  \"homepage\": \"https://docz.site\",\n  \"bugs\": {\n    \"url\": \"https://github.com/doczjs/docz/issues\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/doczjs/docz.git\"\n  },\n  \"scripts\": {\n    \"clean\": \"lerna clean\",\n    \"bs\": \"lerna bootstrap\",\n    \"dev\": \"yarn packages:build && lerna run dev --parallel --scope={dev-env-*,docz,docz-core,gatsby-theme-docz,rehype-docz,remark-docz}\",\n    \"examples:lint\": \"eslint examples --ext js,mdx,ts,tsx\",\n    \"packages\": \"run-s packages:*\",\n    \"packages:fix\": \"lerna run --parallel fix && echo\",\n    \"packages:lint\": \"lerna run --parallel lint\",\n    \"packages:build\": \"lerna run build --ignore={docz-example-*,dev-env-*}\",\n    \"packages:test\": \"lerna run test --stream --ignore={docz-example-*,dev-env-*}\",\n    \"prerelease\": \"yarn run packages\",\n    \"release\": \"lerna publish --conventional-commits\",\n    \"release:next\": \"yarn run packages && lerna publish --conventional-commits --conventional-prerelease --dist-tag=next --exact\",\n    \"promote:next\": \"lerna publish --conventional-commits --conventional-graduate\",\n    \"release:beta\": \"yarn release --dist-tag=beta --preid=beta\",\n    \"release:canary\": \"yarn release --force-publish=\\\"*\\\" --canary --exact --npm-client npm\",\n    \"precommit\": \"lint-staged\",\n    \"commit\": \"git-cz\",\n    \"contributors:add\": \"all-contributors add\",\n    \"contributors:generate\": \"all-contributors generate\"\n  },\n  \"lint-staged\": {\n    \"*.{js,jsx,ts,tsx,md,mdx}\": [\n      \"yarn packages\",\n      \"git add\"\n    ]\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.5.5\",\n    \"@babel/plugin-syntax-dynamic-import\": \"^7.2.0\",\n    \"@babel/preset-typescript\": \"^7.3.3\",\n    \"@commitlint/cli\": \"^8.2.0\",\n    \"@commitlint/config-conventional\": \"^8.2.0\",\n    \"@commitlint/config-lerna-scopes\": \"^8.2.0\",\n    \"@mdx-js/mdx\": \"^1.1.0\",\n    \"@types/cross-spawn\": \"^6.0.0\",\n    \"@types/find-up\": \"^4.0.0\",\n    \"@types/fs-extra\": \"^8.0.0\",\n    \"@types/jest\": \"^24.0.15\",\n    \"@types/lodash\": \"^4.14.136\",\n    \"@types/node\": \"^12.6.8\",\n    \"@types/pascal-case\": \"^1.1.2\",\n    \"@types/prettier\": \"^1.16.4\",\n    \"@types/reach__router\": \"^1.2.4\",\n    \"@types/react-dom\": \"^16.8.4\",\n    \"@types/react\": \"^16.8.23\",\n    \"@types/resolve\": \"^0.0.8\",\n    \"@types/shelljs\": \"^0.8.5\",\n    \"@types/signale\": \"^1.2.1\",\n    \"@types/wait-on\": \"^3.2.0\",\n    \"all-contributors-cli\": \"^6.8.0\",\n    \"babel-eslint\": \"^10.0.3\",\n    \"babel-jest\": \"^24.8.0\",\n    \"babel-plugin-lodash\": \"^3.3.4\",\n    \"babel-preset-react-app\": \"^9.1.2\",\n    \"commitizen\": \"^3.1.2\",\n    \"cross-env\": \"^5.2.1\",\n    \"docz-rollup\": \"^2.1.0\",\n    \"eslint-config-docz-js\": \"^2.1.0\",\n    \"eslint-config-docz-ts\": \"^2.1.0\",\n    \"eslint-plugin-react\": \"^7.16.0\",\n    \"eslint\": \"^6.5.1\",\n    \"husky\": \"^3.0.0\",\n    \"jest\": \"^24.9.0\",\n    \"lerna\": \"^3.15.0\",\n    \"lint-staged\": \"^9.2.0\",\n    \"npm-run-all\": \"^4.1.5\",\n    \"prettier\": \"^1.18.2\",\n    \"remark-docz\": \"^2.1.0\",\n    \"rollup\": \"^1.17.0\",\n    \"trash-cli\": \"^3.0.0\",\n    \"trash\": \"^6.0.0\",\n    \"ts-jest\": \"^24.0.2\",\n    \"typescript\": \"^3.5.3\"\n  },\n  \"workspaces\": {\n    \"packages\": [\n      \"core/*\",\n      \"other-packages/*\",\n      \"dev-env/*\"\n    ],\n    \"nohoist\": [\n      \"examples/*\"\n    ]\n  }\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"target\": \"es2017\",\n    \"module\": \"es2015\",\n    \"moduleResolution\": \"node\",\n    \"inlineSourceMap\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"esModuleInterop\": true,\n    \"jsx\": \"react\",\n    \"strict\": true,\n    \"noImplicitAny\": true,\n    \"strictNullChecks\": true,\n    \"strictFunctionTypes\": true,\n    \"strictPropertyInitialization\": true,\n    \"noImplicitThis\": true,\n    \"alwaysStrict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": false,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"traceResolution\": false,\n    \"listEmittedFiles\": false,\n    \"listFiles\": false,\n    \"pretty\": true,\n    \"lib\": [\"es2017\", \"dom\"]\n  }\n}\n"
  }
]