mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
feat(v2): composition syntax highlighting & live code editors (#1555)
* feat(v2): composition syntax highlighting & react-live playground * mobile friendly tweak * refactor styling * revert docs
This commit is contained in:
parent
246c1814c0
commit
305a4f0a29
21 changed files with 287 additions and 84 deletions
|
@ -2,9 +2,6 @@
|
|||
|
||||
Docusaurus webpack loader of [MDX](https://github.com/mdx-js/mdx)
|
||||
|
||||
The extra idea here is to simplify things by adding prismjs syntax highlighting by default through https://github.com/mapbox/rehype-prism and add the prism css theme import directly (only add the CSS import if target is 'web').
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
|
@ -18,10 +15,6 @@ yarn add @docusaurus/mdx-loader
|
|||
module: {
|
||||
rules: [
|
||||
// ...
|
||||
{
|
||||
test: /\.css$/,
|
||||
// Make sure your webpack loader can import css files too
|
||||
},
|
||||
{
|
||||
test: /\.mdx?$/,
|
||||
use: [
|
||||
|
@ -40,13 +33,6 @@ module: {
|
|||
|
||||
## Options
|
||||
|
||||
### `prismTheme`
|
||||
- Default: `prism-themes/themes/prism-atom-dark.css`;
|
||||
|
||||
This is the PrismJS theme CSS that will be imported. The supported themes are :
|
||||
- prismjs/themes/XXXXXX.css (See https://github.com/PrismJS/prism/tree/master/themes)
|
||||
- prism-themes/themes/XXXXXX.css (See https://github.com/PrismJS/prism-themes/tree/master/themes)
|
||||
|
||||
### `rehypePlugins`
|
||||
Array of rehype plugins to manipulate the MDXHAST
|
||||
|
||||
|
|
|
@ -10,15 +10,12 @@
|
|||
"dependencies": {
|
||||
"@babel/parser": "^7.4.3",
|
||||
"@babel/traverse": "^7.4.3",
|
||||
"@mapbox/rehype-prism": "^0.3.1",
|
||||
"@mdx-js/mdx": "^1.0.18",
|
||||
"@mdx-js/react": "^1.0.16",
|
||||
"@mdx-js/mdx": "^1.0.20",
|
||||
"@mdx-js/react": "^1.0.20",
|
||||
"github-slugger": "^1.2.1",
|
||||
"gray-matter": "^4.0.2",
|
||||
"loader-utils": "^1.2.3",
|
||||
"mdast-util-to-string": "^1.0.5",
|
||||
"prism-themes": "^1.1.0",
|
||||
"prismjs": "^1.16.0",
|
||||
"remark-emoji": "^2.0.2",
|
||||
"remark-slug": "^5.1.1",
|
||||
"stringify-object": "^3.3.0",
|
||||
|
|
|
@ -7,18 +7,16 @@
|
|||
|
||||
const {getOptions} = require('loader-utils');
|
||||
const mdx = require('@mdx-js/mdx');
|
||||
const rehypePrism = require('@mapbox/rehype-prism');
|
||||
const emoji = require('remark-emoji');
|
||||
const slug = require('remark-slug');
|
||||
const matter = require('gray-matter');
|
||||
const stringifyObject = require('stringify-object');
|
||||
const linkHeadings = require('./linkHeadings');
|
||||
const rightToc = require('./rightToc');
|
||||
const linkHeadings = require('./rehype/linkHeadings');
|
||||
const rightToc = require('./remark/rightToc');
|
||||
|
||||
const DEFAULT_OPTIONS = {
|
||||
rehypePlugins: [[rehypePrism, {ignoreMissing: true}], linkHeadings],
|
||||
rehypePlugins: [linkHeadings],
|
||||
remarkPlugins: [emoji, slug, rightToc],
|
||||
prismTheme: 'prism-themes/themes/prism-atom-dark.css',
|
||||
};
|
||||
|
||||
module.exports = async function(fileString) {
|
||||
|
@ -36,7 +34,6 @@ module.exports = async function(fileString) {
|
|||
...DEFAULT_OPTIONS.rehypePlugins,
|
||||
...(reqOptions.rehypePlugins || []),
|
||||
],
|
||||
prismTheme: reqOptions.prismTheme || DEFAULT_OPTIONS.prismTheme,
|
||||
filepath: this.resourcePath,
|
||||
};
|
||||
let result;
|
||||
|
@ -47,16 +44,10 @@ module.exports = async function(fileString) {
|
|||
return callback(err);
|
||||
}
|
||||
|
||||
let importStr = '';
|
||||
// If webpack target is web, we can import the css
|
||||
if (this.target === 'web') {
|
||||
importStr = `import '${options.prismTheme}';`;
|
||||
}
|
||||
|
||||
const code = `
|
||||
import React from 'react';
|
||||
import { mdx } from '@mdx-js/react';
|
||||
${importStr}
|
||||
|
||||
export const frontMatter = ${stringifyObject(data)};
|
||||
${result}
|
||||
`;
|
||||
|
|
|
@ -31,7 +31,6 @@ const DEFAULT_OPTIONS = {
|
|||
blogTagsPostsComponent: '@theme/BlogTagsPostsPage',
|
||||
remarkPlugins: [],
|
||||
rehypePlugins: [],
|
||||
prismTheme: '',
|
||||
};
|
||||
|
||||
module.exports = function(context, opts) {
|
||||
|
@ -344,7 +343,7 @@ module.exports = function(context, opts) {
|
|||
},
|
||||
|
||||
configureWebpack(config, isServer, {getBabelLoader, getCacheLoader}) {
|
||||
const {rehypePlugins, remarkPlugins, prismTheme} = options;
|
||||
const {rehypePlugins, remarkPlugins} = options;
|
||||
return {
|
||||
module: {
|
||||
rules: [
|
||||
|
@ -359,7 +358,6 @@ module.exports = function(context, opts) {
|
|||
options: {
|
||||
remarkPlugins,
|
||||
rehypePlugins,
|
||||
prismTheme,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -25,7 +25,6 @@ const DEFAULT_OPTIONS = {
|
|||
docItemComponent: '@theme/DocItem',
|
||||
remarkPlugins: [],
|
||||
rehypePlugins: [],
|
||||
prismTheme: '',
|
||||
};
|
||||
|
||||
module.exports = function(context, opts) {
|
||||
|
@ -161,7 +160,7 @@ module.exports = function(context, opts) {
|
|||
},
|
||||
|
||||
configureWebpack(config, isServer, {getBabelLoader, getCacheLoader}) {
|
||||
const {rehypePlugins, remarkPlugins, prismTheme} = options;
|
||||
const {rehypePlugins, remarkPlugins} = options;
|
||||
return {
|
||||
module: {
|
||||
rules: [
|
||||
|
@ -176,7 +175,6 @@ module.exports = function(context, opts) {
|
|||
options: {
|
||||
remarkPlugins,
|
||||
rehypePlugins,
|
||||
prismTheme,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -8,8 +8,12 @@
|
|||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@mdx-js/mdx": "^1.0.20",
|
||||
"@mdx-js/react": "^1.0.20",
|
||||
"classnames": "^2.2.6",
|
||||
"docsearch.js": "^2.5.2",
|
||||
"prism-react-renderer": "^0.1.6",
|
||||
"react-live": "^2.1.2",
|
||||
"infima": "0.2.0-alpha.1",
|
||||
"react-toggle": "^4.0.2"
|
||||
},
|
||||
|
|
|
@ -6,11 +6,13 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import {MDXProvider} from '@mdx-js/react';
|
||||
import Head from '@docusaurus/Head';
|
||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||
import withBaseUrl from '@docusaurus/withBaseUrl';
|
||||
import Navbar from '@theme/Navbar';
|
||||
import Footer from '@theme/Footer';
|
||||
import MDXComponents from '@theme/MDXComponents';
|
||||
|
||||
import './styles.css';
|
||||
|
||||
|
@ -30,7 +32,7 @@ function Layout(props) {
|
|||
)}
|
||||
</Head>
|
||||
<Navbar />
|
||||
{children}
|
||||
<MDXProvider components={MDXComponents}>{children}</MDXProvider>
|
||||
{!noFooter && <Footer />}
|
||||
</React.Fragment>
|
||||
);
|
||||
|
|
26
packages/docusaurus-theme-classic/src/theme/MDXComponents.js
Normal file
26
packages/docusaurus-theme-classic/src/theme/MDXComponents.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import React from 'react';
|
||||
import Link from '@docusaurus/Link';
|
||||
import CodeBlock from './components/CodeBlock';
|
||||
|
||||
export default {
|
||||
code: CodeBlock,
|
||||
a: Link,
|
||||
pre: props => (
|
||||
<pre
|
||||
className="pre"
|
||||
style={{
|
||||
backgroundColor: 'transparent',
|
||||
fontFamily: 'inherit',
|
||||
padding: 0,
|
||||
boxSizing: 'border-box',
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
),
|
||||
};
|
|
@ -0,0 +1,54 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import Highlight, {defaultProps} from 'prism-react-renderer';
|
||||
import nightOwlTheme from 'prism-react-renderer/themes/nightOwl';
|
||||
|
||||
import Playground from '@theme/components/Playground';
|
||||
|
||||
export default ({children, className: languageClassName, live, ...props}) => {
|
||||
if (live) {
|
||||
return (
|
||||
<Playground
|
||||
scope={{...React}}
|
||||
code={children}
|
||||
theme={nightOwlTheme}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const language =
|
||||
languageClassName && languageClassName.replace(/language-/, '');
|
||||
return (
|
||||
<Highlight
|
||||
{...defaultProps}
|
||||
theme={nightOwlTheme}
|
||||
code={children}
|
||||
language={language}>
|
||||
{({className, style, tokens, getLineProps, getTokenProps}) => (
|
||||
<pre
|
||||
className={className}
|
||||
style={{
|
||||
...style,
|
||||
overflow: 'hidden',
|
||||
overflowWrap: 'break-word',
|
||||
whiteSpace: 'pre-wrap',
|
||||
fontSize: 'inherit',
|
||||
}}>
|
||||
{tokens.map((line, i) => (
|
||||
<div key={i} {...getLineProps({line, key: i})}>
|
||||
{line.map((token, key) => (
|
||||
<span key={key} {...getTokenProps({token, key})} />
|
||||
))}
|
||||
</div>
|
||||
))}
|
||||
</pre>
|
||||
)}
|
||||
</Highlight>
|
||||
);
|
||||
};
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import {LiveProvider, LiveEditor, LiveError, LivePreview} from 'react-live';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function Playground({children, theme, transformCode, ...props}) {
|
||||
return (
|
||||
<LiveProvider
|
||||
code={children}
|
||||
transformCode={transformCode || (code => `${code};`)}
|
||||
theme={theme}
|
||||
{...props}>
|
||||
<div className={styles.editorHeaderContainer}>
|
||||
<div className={styles.headerTitle}>LIVE EDITOR</div>
|
||||
</div>
|
||||
<LiveEditor className={styles.editorContainer} />
|
||||
<div className={styles.previewHeaderContainer}>
|
||||
<div className={styles.headerTitle}>PREVIEW</div>
|
||||
</div>
|
||||
<div className={styles.previewContainer}>
|
||||
<LivePreview />
|
||||
<LiveError />
|
||||
</div>
|
||||
</LiveProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default Playground;
|
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
.headerTitle {
|
||||
text-transform: uppercase;
|
||||
color: #e1e6ef;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.editorHeaderContainer {
|
||||
padding: 4px 8px;
|
||||
background: #1a2d3c;
|
||||
}
|
||||
|
||||
.editorContainer {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.previewHeaderContainer {
|
||||
padding: 0 8px;
|
||||
background: #1a2d3c;
|
||||
height: 35px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.previewContainer {
|
||||
position: relative;
|
||||
padding: 16px;
|
||||
border: 0.5px solid #011627;
|
||||
}
|
|
@ -9,7 +9,7 @@ Next, let's touch on the powerful feature in Docusaurus - documentation.
|
|||
|
||||
Create a new file within the `docs` directory called `hello.md` with the following contents:
|
||||
|
||||
```md
|
||||
```markdown
|
||||
---
|
||||
title: Hello
|
||||
---
|
||||
|
@ -43,7 +43,7 @@ Start the development server again and go to http://localhost:3000/docs/hello, y
|
|||
|
||||
Edit `docs/hello.md` and append the following:
|
||||
|
||||
```mdx
|
||||
```jsx
|
||||
import Trend from 'react-trend';
|
||||
|
||||
_Here's a bar chart!_
|
||||
|
|
160
yarn.lock
160
yarn.lock
|
@ -1685,19 +1685,10 @@
|
|||
npmlog "^4.1.2"
|
||||
write-file-atomic "^2.3.0"
|
||||
|
||||
"@mapbox/rehype-prism@^0.3.1":
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@mapbox/rehype-prism/-/rehype-prism-0.3.1.tgz#538e38737df0d0d1462beabf9ceae88fce4035a5"
|
||||
integrity sha512-3LVcYjRoyn13yRyAxGdHEOA9k2litvxJU60IbaOlPWStUiNA2GspgwiDSVHzhF+nLOu8Wed6SWFFLh18U/KEQw==
|
||||
dependencies:
|
||||
hast-util-to-string "^1.0.0"
|
||||
refractor "^2.3.0"
|
||||
unist-util-visit "^1.1.3"
|
||||
|
||||
"@mdx-js/mdx@^1.0.18":
|
||||
version "1.0.19"
|
||||
resolved "https://registry.yarnpkg.com/@mdx-js/mdx/-/mdx-1.0.19.tgz#ee5323fb2f00f8910b64d58126f54c08d61b3e73"
|
||||
integrity sha512-li3zrfEY7htShibDeyVE9GRi7o6vA1QnBg9f07anNNa0689GPxOF9eIRqkj5k3ecDnilHURPyw74k1430hRTVw==
|
||||
"@mdx-js/mdx@^1.0.20":
|
||||
version "1.0.20"
|
||||
resolved "https://registry.yarnpkg.com/@mdx-js/mdx/-/mdx-1.0.20.tgz#422e15bfa5ca6459402783fb57e8b5d5d37a719f"
|
||||
integrity sha512-TSiHGyYBOwqKgDane9N/dB3VvpsmU7zZunJAUBL4QEcWcpd5wOzSb9vPoWGiOMmIdgFArm24QkTPFUVOgvKHAQ==
|
||||
dependencies:
|
||||
"@babel/helper-plugin-utils" "^7.0.0"
|
||||
"@babel/plugin-syntax-jsx" "^7.2.0"
|
||||
|
@ -1707,7 +1698,7 @@
|
|||
hast-util-raw "^5.0.0"
|
||||
lodash.uniq "^4.5.0"
|
||||
mdast-util-to-hast "^4.0.0"
|
||||
remark-mdx "^1.0.18"
|
||||
remark-mdx "^1.0.20"
|
||||
remark-parse "^6.0.0"
|
||||
remark-squeeze-paragraphs "^3.0.1"
|
||||
to-style "^1.3.3"
|
||||
|
@ -1715,10 +1706,10 @@
|
|||
unist-builder "^1.0.1"
|
||||
unist-util-visit "^1.3.0"
|
||||
|
||||
"@mdx-js/react@^1.0.16":
|
||||
version "1.0.16"
|
||||
resolved "https://registry.yarnpkg.com/@mdx-js/react/-/react-1.0.16.tgz#414c3fce49493a4c60e5590cfc0a2a07efc19f38"
|
||||
integrity sha512-HJJO8LYogt9UT4TP3+TVeokMj0lgwCONKlcOfr7VMb38Z6DDE3Ydvi+M3iScUea2DfifS4kGztgJ7zH6HXynTw==
|
||||
"@mdx-js/react@^1.0.20":
|
||||
version "1.0.20"
|
||||
resolved "https://registry.yarnpkg.com/@mdx-js/react/-/react-1.0.20.tgz#6af2191dee50ad659c328628f0e4dba86763ca42"
|
||||
integrity sha512-gU/sGs2Yo0fuztSJeUqzHutQWPBXEO4vywyFT+pHPFW+BRAcwuaf3ub03HogJasMnE0S2kYt6ValwCGxViHIEA==
|
||||
|
||||
"@mrmlnc/readdir-enhanced@^2.2.1":
|
||||
version "2.2.1"
|
||||
|
@ -3272,6 +3263,18 @@ btoa-lite@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337"
|
||||
integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc=
|
||||
|
||||
buble@0.19.6:
|
||||
version "0.19.6"
|
||||
resolved "https://registry.yarnpkg.com/buble/-/buble-0.19.6.tgz#915909b6bd5b11ee03b1c885ec914a8b974d34d3"
|
||||
integrity sha512-9kViM6nJA1Q548Jrd06x0geh+BG2ru2+RMDkIHHgJY/8AcyCs34lTHwra9BX7YdPrZXd5aarkpr/SY8bmPgPdg==
|
||||
dependencies:
|
||||
chalk "^2.4.1"
|
||||
magic-string "^0.25.1"
|
||||
minimist "^1.2.0"
|
||||
os-homedir "^1.0.1"
|
||||
regexpu-core "^4.2.0"
|
||||
vlq "^1.0.0"
|
||||
|
||||
buffer-alloc-unsafe@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0"
|
||||
|
@ -3993,6 +3996,16 @@ component-emitter@^1.2.1:
|
|||
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
|
||||
integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==
|
||||
|
||||
component-props@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/component-props/-/component-props-1.1.1.tgz#f9b7df9b9927b6e6d97c9bd272aa867670f34944"
|
||||
integrity sha1-+bffm5kntubZfJvScqqGdnDzSUQ=
|
||||
|
||||
component-xor@0.0.4:
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/component-xor/-/component-xor-0.0.4.tgz#c55d83ccc1b94cd5089a4e93fa7891c7263e59aa"
|
||||
integrity sha1-xV2DzMG5TNUImk6T+niRxyY+Wao=
|
||||
|
||||
compressible@~2.0.16:
|
||||
version "2.0.17"
|
||||
resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.17.tgz#6e8c108a16ad58384a977f3a482ca20bff2f38c1"
|
||||
|
@ -4267,6 +4280,11 @@ core-js@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
|
||||
integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=
|
||||
|
||||
core-js@^2.4.1:
|
||||
version "2.6.9"
|
||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2"
|
||||
integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==
|
||||
|
||||
core-js@^2.6.5:
|
||||
version "2.6.8"
|
||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.8.tgz#dc3a1e633a04267944e0cb850d3880f340248139"
|
||||
|
@ -4323,6 +4341,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
|
|||
safe-buffer "^5.0.1"
|
||||
sha.js "^2.4.8"
|
||||
|
||||
create-react-context@0.2.2:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca"
|
||||
integrity sha512-KkpaLARMhsTsgp0d2NA/R94F/eDLbhXERdIq3LvX2biCAXcDvHYoOqHfWCHf1+OLj+HKBotLG3KqaOOf+C1C+A==
|
||||
dependencies:
|
||||
fbjs "^0.8.0"
|
||||
gud "^1.0.0"
|
||||
|
||||
create-react-context@^0.2.2:
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.3.tgz#9ec140a6914a22ef04b8b09b7771de89567cb6f3"
|
||||
|
@ -4973,6 +4999,14 @@ dom-converter@^0.2:
|
|||
dependencies:
|
||||
utila "~0.4"
|
||||
|
||||
dom-iterator@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/dom-iterator/-/dom-iterator-1.0.0.tgz#9c09899846ec41c2d257adc4d6015e4759ef05ad"
|
||||
integrity sha512-7dsMOQI07EMU98gQM8NSB3GsAiIeBYIPKpnxR3c9xOvdvBjChAcOM0iJ222I3p5xyiZO9e5oggkNaCusuTdYig==
|
||||
dependencies:
|
||||
component-props "1.1.1"
|
||||
component-xor "0.0.4"
|
||||
|
||||
dom-serializer@0, dom-serializer@~0.1.0, dom-serializer@~0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0"
|
||||
|
@ -6880,11 +6914,6 @@ hast-util-to-parse5@^5.0.0:
|
|||
xtend "^4.0.1"
|
||||
zwitch "^1.0.0"
|
||||
|
||||
hast-util-to-string@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/hast-util-to-string/-/hast-util-to-string-1.0.1.tgz#b28055cdca012d3c8fd048757c8483d0de0d002c"
|
||||
integrity sha512-EC6awGe0ZMUNYmS2hMVaKZxvjVtQA4RhXjtgE20AxGG49MM7OUUfaHc6VcVYv2YwzNlrZQGe5teimCxW1Rk+fA==
|
||||
|
||||
hastscript@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-5.0.0.tgz#fee10382c1bc4ba3f1be311521d368c047d2c43a"
|
||||
|
@ -9088,6 +9117,13 @@ macos-release@^2.2.0:
|
|||
resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.2.0.tgz#ab58d55dd4714f0a05ad4b0e90f4370fef5cdea8"
|
||||
integrity sha512-iV2IDxZaX8dIcM7fG6cI46uNmHUxHE4yN+Z8tKHAW1TBPMZDIKHf/3L+YnOuj/FK9il14UaVdHmiQ1tsi90ltA==
|
||||
|
||||
magic-string@^0.25.1:
|
||||
version "0.25.2"
|
||||
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.2.tgz#139c3a729515ec55e96e69e82a11fe890a293ad9"
|
||||
integrity sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==
|
||||
dependencies:
|
||||
sourcemap-codec "^1.4.4"
|
||||
|
||||
make-dir@^1.0.0, make-dir@^1.2.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
|
||||
|
@ -10195,7 +10231,7 @@ os-filter-obj@^2.0.0:
|
|||
dependencies:
|
||||
arch "^2.1.0"
|
||||
|
||||
os-homedir@^1.0.0:
|
||||
os-homedir@^1.0.0, os-homedir@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
|
||||
integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
|
||||
|
@ -10447,7 +10483,7 @@ parse-asn1@^5.0.0:
|
|||
pbkdf2 "^3.0.3"
|
||||
safe-buffer "^5.1.1"
|
||||
|
||||
parse-entities@^1.0.2, parse-entities@^1.1.0, parse-entities@^1.1.2:
|
||||
parse-entities@^1.0.2, parse-entities@^1.1.0:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.2.2.tgz#c31bf0f653b6661354f8973559cb86dd1d5edf50"
|
||||
integrity sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==
|
||||
|
@ -11073,12 +11109,12 @@ pretty-time@^1.1.0:
|
|||
resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.1.0.tgz#ffb7429afabb8535c346a34e41873adf3d74dd0e"
|
||||
integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==
|
||||
|
||||
prism-themes@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/prism-themes/-/prism-themes-1.1.0.tgz#9f4fadf0c9c7ee415773717ea69c2aaa25aedbfd"
|
||||
integrity sha512-xBkflbKbstGGasW3P68KQzAuObLQeH//I5mn37jKVHVDrRLp4Xct/n8F/tV5h+CKIMa3nDAZ2q0bt8ItSiS72A==
|
||||
prism-react-renderer@^0.1.0, prism-react-renderer@^0.1.6:
|
||||
version "0.1.6"
|
||||
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-0.1.6.tgz#c9216baa234fab1c234209fcdaf0cd23a01c50a9"
|
||||
integrity sha512-uZJn5wrygCH0ZMue+2JRd0qJharrmpxa6/uK7deKgvCtJFFE+VsyvJ49LS8/ATt0mlAJS6vFQTDvhXBEXsda+A==
|
||||
|
||||
prismjs@^1.15.0, prismjs@^1.16.0, prismjs@~1.16.0:
|
||||
prismjs@^1.15.0:
|
||||
version "1.16.0"
|
||||
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.16.0.tgz#406eb2c8aacb0f5f0f1167930cb83835d10a4308"
|
||||
integrity sha512-OA4MKxjFZHSvZcisLGe14THYsug/nF6O1f0pAJc0KN0wTyAcLqmsbE+lTGKSpyh+9pEW57+k6pg2AfYR+coyHA==
|
||||
|
@ -11154,7 +11190,7 @@ prop-types-exact@^1.2.0:
|
|||
object.assign "^4.1.0"
|
||||
reflect.ownkeys "^0.2.0"
|
||||
|
||||
prop-types@^15.5.0, prop-types@^15.5.4, prop-types@^15.6.2, prop-types@^15.7.2:
|
||||
prop-types@^15.5.0, prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2:
|
||||
version "15.7.2"
|
||||
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
|
||||
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
|
||||
|
@ -11491,6 +11527,20 @@ react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is
|
|||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16"
|
||||
integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==
|
||||
|
||||
react-live@^2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/react-live/-/react-live-2.1.2.tgz#f81a2926d9531563b04a62afe4feee09d78c058c"
|
||||
integrity sha512-RAyu0FaFPnSqC3mG3ira0qmAGfPmGKEmGcAkXHwUNTFgbhVa38gbUSz8K1kvLSZ4yi19EbtVEa7LWQwxO5mEsA==
|
||||
dependencies:
|
||||
buble "0.19.6"
|
||||
core-js "^2.4.1"
|
||||
create-react-context "0.2.2"
|
||||
dom-iterator "^1.0.0"
|
||||
prism-react-renderer "^0.1.0"
|
||||
prop-types "^15.5.8"
|
||||
react-simple-code-editor "^0.9.0"
|
||||
unescape "^0.2.0"
|
||||
|
||||
react-loadable-ssr-addon@^0.1.8:
|
||||
version "0.1.9"
|
||||
resolved "https://registry.yarnpkg.com/react-loadable-ssr-addon/-/react-loadable-ssr-addon-0.1.9.tgz#c134275fd36637a554f6438a0b78e0d1f70a8260"
|
||||
|
@ -11547,6 +11597,11 @@ react-side-effect@^1.1.0:
|
|||
exenv "^1.2.1"
|
||||
shallowequal "^1.0.1"
|
||||
|
||||
react-simple-code-editor@^0.9.0:
|
||||
version "0.9.10"
|
||||
resolved "https://registry.yarnpkg.com/react-simple-code-editor/-/react-simple-code-editor-0.9.10.tgz#1ab5ea7215687ed918c6d0dae90736cf01890905"
|
||||
integrity sha512-80LJwRQS7Wi9Ugh/e6FRHWdcg4oQOpMBDFxyDpORILffrHdV3EIQ1IeX5x7488r05iFgLbVDV4nQ1LRKjgCm0g==
|
||||
|
||||
react-test-renderer@^16.0.0-0:
|
||||
version "16.8.6"
|
||||
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.8.6.tgz#188d8029b8c39c786f998aa3efd3ffe7642d5ba1"
|
||||
|
@ -11799,15 +11854,6 @@ reflect.ownkeys@^0.2.0:
|
|||
resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460"
|
||||
integrity sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=
|
||||
|
||||
refractor@^2.3.0:
|
||||
version "2.9.0"
|
||||
resolved "https://registry.yarnpkg.com/refractor/-/refractor-2.9.0.tgz#0a381aadb51513e4e6ec1ed410b5104dd65e2489"
|
||||
integrity sha512-lCnCYvXpqd8hC7ksuvo516rz5q4NwzBbq0X5qjH5pxRfcQKiQxKZ8JctrSQmrR/7pcV2TRrs9TT+Whmq/wtluQ==
|
||||
dependencies:
|
||||
hastscript "^5.0.0"
|
||||
parse-entities "^1.1.2"
|
||||
prismjs "~1.16.0"
|
||||
|
||||
regenerate-unicode-properties@^8.0.2:
|
||||
version "8.1.0"
|
||||
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz#ef51e0f0ea4ad424b77bf7cb41f3e015c70a3f0e"
|
||||
|
@ -11850,7 +11896,7 @@ regexpp@^1.0.1:
|
|||
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab"
|
||||
integrity sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==
|
||||
|
||||
regexpu-core@^4.5.4:
|
||||
regexpu-core@^4.2.0, regexpu-core@^4.5.4:
|
||||
version "4.5.4"
|
||||
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.5.4.tgz#080d9d02289aa87fe1667a4f5136bc98a6aebaae"
|
||||
integrity sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==
|
||||
|
@ -11887,7 +11933,7 @@ remark-emoji@^2.0.2:
|
|||
node-emoji "^1.8.1"
|
||||
unist-util-visit "^1.4.0"
|
||||
|
||||
remark-mdx@^1.0.14, remark-mdx@^1.0.18:
|
||||
remark-mdx@^1.0.14:
|
||||
version "1.0.18"
|
||||
resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-1.0.18.tgz#a686bcb1166ae673bc77d9e459dbd576443bf854"
|
||||
integrity sha512-PLsY2LNXuJ8YHaxjuOpRk+hDviB7jBFwLmLN4m4P5/Ev+NlmG8uXisAkP4P4Al47CPmJyKHQRJMjA8mWu4exVw==
|
||||
|
@ -11900,6 +11946,19 @@ remark-mdx@^1.0.14, remark-mdx@^1.0.18:
|
|||
remark-parse "^6.0.0"
|
||||
unified "^7.0.0"
|
||||
|
||||
remark-mdx@^1.0.20:
|
||||
version "1.0.20"
|
||||
resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-1.0.20.tgz#580e57c035bd1658beeacffc30f81ca56e8447e4"
|
||||
integrity sha512-yUDI87lzeYsTL3LyArD2DWxzYMxdJuJuvVAjteWcJQvY6ZgYNcVPnVzDXiD80SRQOf3/tXW5P2E/EsnBlNW8lw==
|
||||
dependencies:
|
||||
"@babel/core" "^7.2.2"
|
||||
"@babel/helper-plugin-utils" "^7.0.0"
|
||||
"@babel/plugin-proposal-object-rest-spread" "^7.3.2"
|
||||
"@babel/plugin-syntax-jsx" "^7.2.0"
|
||||
is-alphabetical "^1.0.2"
|
||||
remark-parse "^6.0.0"
|
||||
unified "^7.0.0"
|
||||
|
||||
remark-parse@^6.0.0:
|
||||
version "6.0.3"
|
||||
resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-6.0.3.tgz#c99131052809da482108413f87b0ee7f52180a3a"
|
||||
|
@ -12733,6 +12792,11 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
|
|||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
||||
|
||||
sourcemap-codec@^1.4.4:
|
||||
version "1.4.4"
|
||||
resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz#c63ea927c029dd6bd9a2b7fa03b3fec02ad56e9f"
|
||||
integrity sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==
|
||||
|
||||
space-separated-tokens@^1.0.0:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.4.tgz#27910835ae00d0adfcdbd0ad7e611fb9544351fa"
|
||||
|
@ -13687,6 +13751,11 @@ underscore@~1.7.0:
|
|||
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.7.0.tgz#6bbaf0877500d36be34ecaa584e0db9fef035209"
|
||||
integrity sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=
|
||||
|
||||
unescape@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/unescape/-/unescape-0.2.0.tgz#b78b9b60c86f1629df181bf53eee3bc8d6367ddf"
|
||||
integrity sha1-t4ubYMhvFinfGBv1Pu47yNY2fd8=
|
||||
|
||||
unherit@^1.0.4:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.2.tgz#14f1f397253ee4ec95cec167762e77df83678449"
|
||||
|
@ -13814,7 +13883,7 @@ unist-util-visit-parents@^2.0.0:
|
|||
dependencies:
|
||||
unist-util-is "^2.1.2"
|
||||
|
||||
unist-util-visit@^1.0.0, unist-util-visit@^1.1.0, unist-util-visit@^1.1.3, unist-util-visit@^1.3.0, unist-util-visit@^1.4.0:
|
||||
unist-util-visit@^1.0.0, unist-util-visit@^1.1.0, unist-util-visit@^1.3.0, unist-util-visit@^1.4.0:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.4.1.tgz#4724aaa8486e6ee6e26d7ff3c8685960d560b1e3"
|
||||
integrity sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==
|
||||
|
@ -14038,6 +14107,11 @@ vfile@^3.0.0:
|
|||
unist-util-stringify-position "^1.0.0"
|
||||
vfile-message "^1.0.0"
|
||||
|
||||
vlq@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.0.tgz#8101be90843422954c2b13eb27f2f3122bdcc806"
|
||||
integrity sha512-o3WmXySo+oI5thgqr7Qy8uBkT/v9Zr+sRyrh1lr8aWPUkgDWdWt4Nae2WKBrLsocgE8BuWWD0jLc+VW8LeU+2g==
|
||||
|
||||
vm-browserify@0.0.4:
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue