diff --git a/.flowconfig b/.flowconfig index 62ea64451..88c4cfdef 100644 --- a/.flowconfig +++ b/.flowconfig @@ -9,10 +9,6 @@ .*/node_modules/polished/.* .*/node_modules/react-side-effect/.* .*/node_modules/fbjs/.* -.*/node_modules/slate-edit-code/example/.* -.*/node_modules/slate-edit-code/lib/.* -.*/node_modules/slate-edit-list/.* -.*/node_modules/slate-prism/.* .*/node_modules/config-chain/.* .*/server/scripts/.* *.test.js diff --git a/README.md b/README.md index e9d012a4d..2f5c80e82 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ Outline is composed of separate backend and frontend application which are both Outline's frontend is a React application compiled with [Webpack](https://webpack.js.org/). It uses [Mobx](https://mobx.js.org/) for state management and [Styled Components](https://www.styled-components.com/) for component styles. Unless global, state logic and styles are always co-located with React components together with their subcomponents to make the component tree easier to manage. -The editor itself is built ontop of [Slate](https://github.com/ianstormtaylor/slate) and hosted in a separate repository to encourage reuse: [rich-markdown-editor](https://github.com/outline/rich-markdown-editor) +The editor itself is built on [Prosemirror](https://github.com/prosemirror) and hosted in a separate repository to encourage reuse: [rich-markdown-editor](https://github.com/outline/rich-markdown-editor) - `app/` - Frontend React application - `app/scenes` - Full page views diff --git a/app/components/Editor/Editor.js b/app/components/Editor/Editor.js index c1f8532e3..61591f9a0 100644 --- a/app/components/Editor/Editor.js +++ b/app/components/Editor/Editor.js @@ -4,16 +4,16 @@ import { withRouter, type RouterHistory } from 'react-router-dom'; import { observable } from 'mobx'; import { observer } from 'mobx-react'; import { lighten } from 'polished'; -import styled, { withTheme, createGlobalStyle } from 'styled-components'; +import styled, { withTheme } from 'styled-components'; import RichMarkdownEditor from 'rich-markdown-editor'; -import Placeholder from 'rich-markdown-editor/lib/components/Placeholder'; import { uploadFile } from 'utils/uploadFile'; import isInternalUrl from 'utils/isInternalUrl'; import Tooltip from 'components/Tooltip'; import UiStore from 'stores/UiStore'; -import Embed from './Embed'; import embeds from '../../embeds'; +const EMPTY_ARRAY = []; + type Props = { id: string, defaultValue?: string, @@ -65,37 +65,17 @@ class Editor extends React.Component { this.props.ui.showToast(message); }; - getLinkComponent = node => { - if (this.props.disableEmbeds) return; - - const url = node.data.get('href'); - const keys = Object.keys(embeds); - - for (const key of keys) { - const component = embeds[key]; - - for (const host of component.ENABLED) { - const matches = url.match(host); - if (matches) return Embed; - } - } - }; - render() { return ( - - - - + ); } } @@ -108,17 +88,6 @@ const StyledEditor = styled(RichMarkdownEditor)` transition: ${props => props.theme.backgroundTransition}; } - p { - ${Placeholder} { - visibility: hidden; - } - } - p:nth-child(1):last-child { - ${Placeholder} { - visibility: visible; - } - } - p { a { color: ${props => props.theme.link}; @@ -131,157 +100,6 @@ const StyledEditor = styled(RichMarkdownEditor)` } } } - - h1:first-child, - h2:first-child, - h3:first-child, - h4:first-child, - h5:first-child, - h6:first-child { - margin-top: 0; - } -`; - -/* -Based on Prism template by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/prism/) -Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) -*/ -const PrismStyles = createGlobalStyle` - code[class*="language-"], - pre[class*="language-"] { - -webkit-font-smoothing: initial; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - font-size: 13px; - line-height: 1.375; - direction: ltr; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; - color: #24292e; - } - - /* Code blocks */ - pre[class*="language-"] { - padding: 1em; - margin: .5em 0; - overflow: auto; - } - - /* Inline code */ - :not(pre) > code[class*="language-"] { - padding: .1em; - border-radius: .3em; - } - - .token.comment, - .token.prolog, - .token.doctype, - .token.cdata { - color: #6a737d; - } - - .token.punctuation { - color: #5e6687; - } - - .token.namespace { - opacity: .7; - } - - .token.operator, - .token.boolean, - .token.number { - color: #d73a49; - } - - .token.property { - color: #c08b30; - } - - .token.tag { - color: #3d8fd1; - } - - .token.string { - color: #032f62; - } - - .token.selector { - color: #6679cc; - } - - .token.attr-name { - color: #c76b29; - } - - .token.entity, - .token.url, - .language-css .token.string, - .style .token.string { - color: #22a2c9; - } - - .token.attr-value, - .token.keyword, - .token.control, - .token.directive, - .token.unit { - color: #d73a49; - } - - .token.function { - color: #6f42c1; - } - - .token.statement, - .token.regex, - .token.atrule { - color: #22a2c9; - } - - .token.placeholder, - .token.variable { - color: #3d8fd1; - } - - .token.deleted { - text-decoration: line-through; - } - - .token.inserted { - border-bottom: 1px dotted #202746; - text-decoration: none; - } - - .token.italic { - font-style: italic; - } - - .token.important, - .token.bold { - font-weight: bold; - } - - .token.important { - color: #c94922; - } - - .token.entity { - cursor: help; - } - - pre > code.highlight { - outline: 0.4em solid #c94922; - outline-offset: .4em; - } `; const EditorTooltip = ({ children, ...props }) => ( diff --git a/app/components/Editor/Embed.js b/app/components/Editor/Embed.js index 7d7c24163..eee6e86f1 100644 --- a/app/components/Editor/Embed.js +++ b/app/components/Editor/Embed.js @@ -6,7 +6,7 @@ import embeds from '../../embeds'; export default class Embed extends React.Component<*> { get url(): string { - return this.props.node.data.get('href'); + return this.props.attrs.href; } getMatchResults(): ?{ component: *, matches: string[] } { @@ -26,16 +26,12 @@ export default class Embed extends React.Component<*> { const result = this.getMatchResults(); if (!result) return null; - const { attributes, isSelected, children } = this.props; + const { isSelected, children } = this.props; const { component, matches } = result; const EmbedComponent = component; return ( - + {children} diff --git a/app/components/Layout.js b/app/components/Layout.js index dbc8d1e8b..04915caf2 100644 --- a/app/components/Layout.js +++ b/app/components/Layout.js @@ -71,8 +71,9 @@ class Layout extends React.Component { window.document.body.style.background = this.props.theme.background; } - @keydown(['/', 't', 'meta+k']) + @keydown(['t', '/', 'meta+k']) goToSearch(ev) { + if (this.props.ui.editMode) return; ev.preventDefault(); ev.stopPropagation(); this.redirectTo = searchUrl(); @@ -80,6 +81,7 @@ class Layout extends React.Component { @keydown('d') goToDashboard() { + if (this.props.ui.editMode) return; this.redirectTo = homeUrl(); } diff --git a/app/components/Sidebar/components/Collections.js b/app/components/Sidebar/components/Collections.js index e6fa8abec..1811826fd 100644 --- a/app/components/Sidebar/components/Collections.js +++ b/app/components/Sidebar/components/Collections.js @@ -40,6 +40,8 @@ class Collections extends React.Component { @keydown('n') goToNewDocument() { + if (this.props.ui.editMode) return; + const { activeCollectionId } = this.props.ui; if (!activeCollectionId) return; diff --git a/app/embeds/Abstract.js b/app/embeds/Abstract.js index a6403b903..504c06c52 100644 --- a/app/embeds/Abstract.js +++ b/app/embeds/Abstract.js @@ -2,10 +2,12 @@ import * as React from 'react'; import Frame from './components/Frame'; -type Props = { - url: string, - matches: string[], -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Abstract extends React.Component { static ENABLED = [ @@ -14,7 +16,7 @@ export default class Abstract extends React.Component { ]; render() { - const { matches } = this.props; + const { matches } = this.props.attrs; const shareId = matches[1]; return ( diff --git a/app/embeds/Abstract.test.js b/app/embeds/Abstract.test.js index 85986f3e6..b07ad277c 100644 --- a/app/embeds/Abstract.test.js +++ b/app/embeds/Abstract.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Abstract } = embeds; +import Abstract from './Abstract'; describe('Abstract', () => { const match = Abstract.ENABLED[0]; diff --git a/app/embeds/Airtable.js b/app/embeds/Airtable.js index 7e0be8dd2..8ed59f805 100644 --- a/app/embeds/Airtable.js +++ b/app/embeds/Airtable.js @@ -4,16 +4,18 @@ import Frame from './components/Frame'; const URL_REGEX = new RegExp('https://airtable.com/(?:embed/)?(shr.*)$'); -type Props = { - url: string, - matches: string[], -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Airtable extends React.Component { static ENABLED = [URL_REGEX]; render() { - const { matches } = this.props; + const { matches } = this.props.attrs; const shareId = matches[1]; return ( diff --git a/app/embeds/Airtable.test.js b/app/embeds/Airtable.test.js index d18702ff4..6ce7ae588 100644 --- a/app/embeds/Airtable.test.js +++ b/app/embeds/Airtable.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Airtable } = embeds; +import Airtable from './Airtable'; describe('Airtable', () => { const match = Airtable.ENABLED[0]; diff --git a/app/embeds/Codepen.js b/app/embeds/Codepen.js index 0fc0acdff..57a6ea152 100644 --- a/app/embeds/Codepen.js +++ b/app/embeds/Codepen.js @@ -4,15 +4,18 @@ import Frame from './components/Frame'; const URL_REGEX = new RegExp('^https://codepen.io/(.*?)/(pen|embed)/(.*)$'); -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Codepen extends React.Component { static ENABLED = [URL_REGEX]; render() { - const normalizedUrl = this.props.url.replace(/\/pen\//, '/embed/'); + const normalizedUrl = this.props.attrs.href.replace(/\/pen\//, '/embed/'); return ; } diff --git a/app/embeds/Codepen.test.js b/app/embeds/Codepen.test.js index 24303d17b..e21b037e1 100644 --- a/app/embeds/Codepen.test.js +++ b/app/embeds/Codepen.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Codepen } = embeds; +import Codepen from './Codepen'; describe('Codepen', () => { const match = Codepen.ENABLED[0]; diff --git a/app/embeds/Figma.js b/app/embeds/Figma.js index 8e622ebe0..dc207e198 100644 --- a/app/embeds/Figma.js +++ b/app/embeds/Figma.js @@ -6,9 +6,12 @@ const URL_REGEX = new RegExp( 'https://([w.-]+.)?figma.com/(file|proto)/([0-9a-zA-Z]{22,128})(?:/.*)?$' ); -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Figma extends React.Component { static ENABLED = [URL_REGEX]; @@ -17,7 +20,7 @@ export default class Figma extends React.Component { return ( { const match = Figma.ENABLED[0]; diff --git a/app/embeds/Framer.js b/app/embeds/Framer.js index 47568c3dc..6bfee7174 100644 --- a/app/embeds/Framer.js +++ b/app/embeds/Framer.js @@ -4,14 +4,17 @@ import Frame from './components/Frame'; const URL_REGEX = new RegExp('^https://framer.cloud/(.*)$'); -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Framer extends React.Component { static ENABLED = [URL_REGEX]; render() { - return ; + return ; } } diff --git a/app/embeds/Framer.test.js b/app/embeds/Framer.test.js index 42cbf1d14..49ac832b0 100644 --- a/app/embeds/Framer.test.js +++ b/app/embeds/Framer.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Framer } = embeds; +import Framer from './Framer'; describe('Framer', () => { const match = Framer.ENABLED[0]; diff --git a/app/embeds/Gist.js b/app/embeds/Gist.js index 56b93fcb7..7992a46e2 100644 --- a/app/embeds/Gist.js +++ b/app/embeds/Gist.js @@ -5,9 +5,12 @@ const URL_REGEX = new RegExp( '^https://gist.github.com/([a-zd](?:[a-zd]|-(?=[a-zd])){0,38})/(.*)$' ); -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; class Gist extends React.Component { iframeNode: ?HTMLIFrameElement; @@ -19,7 +22,7 @@ class Gist extends React.Component { } get id() { - const gistUrl = new URL(this.props.url); + const gistUrl = new URL(this.props.attrs.href); return gistUrl.pathname.split('/')[2]; } diff --git a/app/embeds/Gist.test.js b/app/embeds/Gist.test.js index a36c042ce..7de1e7b04 100644 --- a/app/embeds/Gist.test.js +++ b/app/embeds/Gist.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Gist } = embeds; +import Gist from './Gist'; describe('Gist', () => { const match = Gist.ENABLED[0]; diff --git a/app/embeds/GoogleDocs.js b/app/embeds/GoogleDocs.js index 753dd6fc0..ccf0d9bfb 100644 --- a/app/embeds/GoogleDocs.js +++ b/app/embeds/GoogleDocs.js @@ -6,14 +6,19 @@ const URL_REGEX = new RegExp( '^https?://docs.google.com/document/d/(.*)/pub(.*)$' ); -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class GoogleDocs extends React.Component { static ENABLED = [URL_REGEX]; render() { - return ; + return ( + + ); } } diff --git a/app/embeds/GoogleDocs.test.js b/app/embeds/GoogleDocs.test.js index fb98df4e4..f7e97e985 100644 --- a/app/embeds/GoogleDocs.test.js +++ b/app/embeds/GoogleDocs.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { GoogleDocs } = embeds; +import GoogleDocs from './GoogleDocs'; describe('GoogleDocs', () => { const match = GoogleDocs.ENABLED[0]; diff --git a/app/embeds/GoogleSheets.js b/app/embeds/GoogleSheets.js index b8dd59de0..48a848d42 100644 --- a/app/embeds/GoogleSheets.js +++ b/app/embeds/GoogleSheets.js @@ -6,14 +6,19 @@ const URL_REGEX = new RegExp( '^https?://docs.google.com/spreadsheets/d/(.*)/pub(.*)$' ); -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class GoogleSlides extends React.Component { static ENABLED = [URL_REGEX]; render() { - return ; + return ( + + ); } } diff --git a/app/embeds/GoogleSheets.test.js b/app/embeds/GoogleSheets.test.js index 450ab83d9..6afdf7258 100644 --- a/app/embeds/GoogleSheets.test.js +++ b/app/embeds/GoogleSheets.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { GoogleSheets } = embeds; +import GoogleSheets from './GoogleSheets'; describe('GoogleSheets', () => { const match = GoogleSheets.ENABLED[0]; diff --git a/app/embeds/GoogleSlides.js b/app/embeds/GoogleSlides.js index a1f3a5222..ee0dd9196 100644 --- a/app/embeds/GoogleSlides.js +++ b/app/embeds/GoogleSlides.js @@ -6,9 +6,12 @@ const URL_REGEX = new RegExp( '^https?://docs.google.com/presentation/d/(.*)/pub(.*)$' ); -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class GoogleSlides extends React.Component { static ENABLED = [URL_REGEX]; @@ -16,7 +19,7 @@ export default class GoogleSlides extends React.Component { render() { return ( diff --git a/app/embeds/GoogleSlides.test.js b/app/embeds/GoogleSlides.test.js index 558d4a268..38de1637b 100644 --- a/app/embeds/GoogleSlides.test.js +++ b/app/embeds/GoogleSlides.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { GoogleSlides } = embeds; +import GoogleSlides from './GoogleSlides'; describe('GoogleSlides', () => { const match = GoogleSlides.ENABLED[0]; diff --git a/app/embeds/InVision.js b/app/embeds/InVision.js index dc3c492a1..e72092cd4 100644 --- a/app/embeds/InVision.js +++ b/app/embeds/InVision.js @@ -11,19 +11,22 @@ const IMAGE_REGEX = new RegExp( '^https://(opal.invisionapp.com/static-signed/live-embed/.*)$' ); -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class InVision extends React.Component { static ENABLED = [IFRAME_REGEX, IMAGE_REGEX]; render() { - if (IMAGE_REGEX.test(this.props.url)) { + if (IMAGE_REGEX.test(this.props.attrs.href)) { return ( { /> ); } - return ; + return ; } } diff --git a/app/embeds/InVision.test.js b/app/embeds/InVision.test.js index 745af652a..d1ea2d4ce 100644 --- a/app/embeds/InVision.test.js +++ b/app/embeds/InVision.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { InVision } = embeds; +import InVision from './InVision'; describe('InVision', () => { const match = InVision.ENABLED[0]; diff --git a/app/embeds/Loom.js b/app/embeds/Loom.js index bb2a98538..e46812583 100644 --- a/app/embeds/Loom.js +++ b/app/embeds/Loom.js @@ -4,15 +4,18 @@ import Frame from './components/Frame'; const URL_REGEX = /^https:\/\/(www\.)?(use)?loom.com\/(embed|share)\/(.*)$/; -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Loom extends React.Component { static ENABLED = [URL_REGEX]; render() { - const normalizedUrl = this.props.url.replace('share', 'embed'); + const normalizedUrl = this.props.attrs.href.replace('share', 'embed'); return ; } diff --git a/app/embeds/Loom.test.js b/app/embeds/Loom.test.js index 6a62a5dbf..6acf6c43a 100644 --- a/app/embeds/Loom.test.js +++ b/app/embeds/Loom.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Loom } = embeds; +import Loom from './Loom'; describe('Loom', () => { const match = Loom.ENABLED[0]; diff --git a/app/embeds/Lucidchart.js b/app/embeds/Lucidchart.js index b3c475566..e145eafb2 100644 --- a/app/embeds/Lucidchart.js +++ b/app/embeds/Lucidchart.js @@ -4,16 +4,18 @@ import Frame from './components/Frame'; const URL_REGEX = /^https?:\/\/(www\.)?lucidchart.com\/documents\/(embeddedchart|view)\/([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})(?:\/.*)?$/; -type Props = { - url: string, - matches: string[], -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Lucidchart extends React.Component { static ENABLED = [URL_REGEX]; render() { - const { matches } = this.props; + const { matches } = this.props.attrs; const chartId = matches[3]; return ( diff --git a/app/embeds/Lucidchart.test.js b/app/embeds/Lucidchart.test.js index 128a270f5..014c835ae 100644 --- a/app/embeds/Lucidchart.test.js +++ b/app/embeds/Lucidchart.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Lucidchart } = embeds; +import Lucidchart from './Lucidchart'; describe('Lucidchart', () => { const match = Lucidchart.ENABLED[0]; diff --git a/app/embeds/Marvel.js b/app/embeds/Marvel.js index 217ce9f73..b99178f61 100644 --- a/app/embeds/Marvel.js +++ b/app/embeds/Marvel.js @@ -4,14 +4,17 @@ import Frame from './components/Frame'; const URL_REGEX = new RegExp('^https://marvelapp.com/([A-Za-z0-9-]{6})/?$'); -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Marvel extends React.Component { static ENABLED = [URL_REGEX]; render() { - return ; + return ; } } diff --git a/app/embeds/Marvel.test.js b/app/embeds/Marvel.test.js index 9c0218bbb..4c4fa18e5 100644 --- a/app/embeds/Marvel.test.js +++ b/app/embeds/Marvel.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Marvel } = embeds; +import Marvel from './Marvel'; describe('Marvel', () => { const match = Marvel.ENABLED[0]; diff --git a/app/embeds/Mindmeister.js b/app/embeds/Mindmeister.js index 3e4e963f5..006ffefa6 100644 --- a/app/embeds/Mindmeister.js +++ b/app/embeds/Mindmeister.js @@ -6,16 +6,18 @@ const URL_REGEX = new RegExp( '^https://([w.-]+.)?(mindmeister.com|mm.tt)(/maps/public_map_shell)?/(\\d+)(\\?t=.*)?(/.*)?$' ); -type Props = { - url: string, - matches: string[], -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Mindmeister extends React.Component { static ENABLED = [URL_REGEX]; render() { - const chartId = this.props.matches[4] + this.props.matches[6]; + const chartId = this.props.attrs.matches[4] + this.props.attrs.matches[6]; return ( { const match = Mindmeister.ENABLED[0]; diff --git a/app/embeds/Miro.js b/app/embeds/Miro.js index 31b193426..4450366c5 100644 --- a/app/embeds/Miro.js +++ b/app/embeds/Miro.js @@ -4,16 +4,18 @@ import Frame from './components/Frame'; const URL_REGEX = /^https:\/\/(?:realtimeboard|miro).com\/app\/board\/(.*)$/; -type Props = { - url: string, - matches: string[], -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class RealtimeBoard extends React.Component { static ENABLED = [URL_REGEX]; render() { - const { matches } = this.props; + const { matches } = this.props.attrs; const boardId = matches[1]; return ( diff --git a/app/embeds/Miro.test.js b/app/embeds/Miro.test.js index 09d4e225c..090393b5a 100644 --- a/app/embeds/Miro.test.js +++ b/app/embeds/Miro.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Miro } = embeds; +import Miro from './Miro'; describe('Miro', () => { const match = Miro.ENABLED[0]; diff --git a/app/embeds/ModeAnalytics.js b/app/embeds/ModeAnalytics.js index 0d9cf87ff..e8ead6323 100644 --- a/app/embeds/ModeAnalytics.js +++ b/app/embeds/ModeAnalytics.js @@ -6,16 +6,19 @@ const URL_REGEX = new RegExp( '^https://([w.-]+.)?modeanalytics.com/(.*)/reports/(.*)$' ); -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class ModeAnalytics extends React.Component { static ENABLED = [URL_REGEX]; render() { // Allow users to paste embed or standard urls and handle them the same - const normalizedUrl = this.props.url.replace(/\/embed$/, ''); + const normalizedUrl = this.props.attrs.href.replace(/\/embed$/, ''); return ( diff --git a/app/embeds/ModeAnalytics.test.js b/app/embeds/ModeAnalytics.test.js index 8e1495770..cacab1fdc 100644 --- a/app/embeds/ModeAnalytics.test.js +++ b/app/embeds/ModeAnalytics.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { ModeAnalytics } = embeds; +import ModeAnalytics from './ModeAnalytics'; describe('ModeAnalytics', () => { const match = ModeAnalytics.ENABLED[0]; diff --git a/app/embeds/Numeracy.js b/app/embeds/Numeracy.js deleted file mode 100644 index d4ad735c9..000000000 --- a/app/embeds/Numeracy.js +++ /dev/null @@ -1,22 +0,0 @@ -// @flow -import * as React from 'react'; -import Frame from './components/Frame'; - -const URL_REGEX = new RegExp('https://([w.-]+.)?numeracy.co/(.*)/(.*)$'); - -type Props = { - url: string, -}; - -export default class Numeracy extends React.Component { - static ENABLED = [URL_REGEX]; - - render() { - // Allow users to paste embed or standard urls and handle them the same - const normalizedUrl = this.props.url.replace(/\.embed$/, ''); - - return ( - - ); - } -} diff --git a/app/embeds/Numeracy.test.js b/app/embeds/Numeracy.test.js deleted file mode 100644 index 56f0539f0..000000000 --- a/app/embeds/Numeracy.test.js +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Numeracy } = embeds; - -describe('Numeracy', () => { - const match = Numeracy.ENABLED[0]; - test('to be enabled on share link', () => { - expect('https://numeracy.co/outline/n8ZIVOC2OS'.match(match)).toBeTruthy(); - }); - - test('to be enabled on embed link', () => { - expect( - 'https://numeracy.co/outline/n8ZIVOC2OS.embed'.match(match) - ).toBeTruthy(); - }); - - test('to not be enabled elsewhere', () => { - expect('https://numeracy.co'.match(match)).toBe(null); - expect('https://numeracy.co/outline'.match(match)).toBe(null); - }); -}); diff --git a/app/embeds/Prezi.js b/app/embeds/Prezi.js index cfb4ba805..188304fa2 100644 --- a/app/embeds/Prezi.js +++ b/app/embeds/Prezi.js @@ -4,15 +4,18 @@ import Frame from './components/Frame'; const URL_REGEX = new RegExp('^https://prezi.com/view/(.*)$'); -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Prezi extends React.Component { static ENABLED = [URL_REGEX]; render() { - const url = this.props.url.replace(/\/embed$/, ''); + const url = this.props.attrs.href.replace(/\/embed$/, ''); return ; } diff --git a/app/embeds/Prezi.test.js b/app/embeds/Prezi.test.js index 7918e7853..7be358c27 100644 --- a/app/embeds/Prezi.test.js +++ b/app/embeds/Prezi.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Prezi } = embeds; +import Prezi from './Prezi'; describe('Prezi', () => { const match = Prezi.ENABLED[0]; diff --git a/app/embeds/Spotify.js b/app/embeds/Spotify.js index 00d0307ea..a96555657 100644 --- a/app/embeds/Spotify.js +++ b/app/embeds/Spotify.js @@ -4,16 +4,18 @@ import Frame from './components/Frame'; const URL_REGEX = new RegExp('https?://open.spotify.com/(.*)$'); -type Props = { - url: string, -}; - +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Spotify extends React.Component { static ENABLED = [URL_REGEX]; get pathname() { try { - const parsed = new URL(this.props.url); + const parsed = new URL(this.props.attrs.href); return parsed.pathname; } catch (err) { return ''; diff --git a/app/embeds/Spotify.test.js b/app/embeds/Spotify.test.js index 56f65d66b..a3dc39c2d 100644 --- a/app/embeds/Spotify.test.js +++ b/app/embeds/Spotify.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Spotify } = embeds; +import Spotify from './Spotify'; describe('Spotify', () => { const match = Spotify.ENABLED[0]; diff --git a/app/embeds/Trello.js b/app/embeds/Trello.js index 0c3bad69d..18511e6d2 100644 --- a/app/embeds/Trello.js +++ b/app/embeds/Trello.js @@ -2,18 +2,20 @@ import * as React from 'react'; import Frame from './components/Frame'; -const URL_REGEX = /^https:\/\/trello.com\/(c|b)\/(.*)$/; +const URL_REGEX = /^https:\/\/trello.com\/(c|b)\/([^/]*)(.*)?$/; -type Props = { - url: string, - matches: string[], -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Trello extends React.Component { static ENABLED = [URL_REGEX]; render() { - const { matches } = this.props; + const { matches } = this.props.attrs; const objectId = matches[2]; if (matches[1] === 'c') { diff --git a/app/embeds/Typeform.js b/app/embeds/Typeform.js index 92e6c79e7..ed6831ae4 100644 --- a/app/embeds/Typeform.js +++ b/app/embeds/Typeform.js @@ -6,14 +6,17 @@ const URL_REGEX = new RegExp( '^https://([A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?).typeform.com/to/(.*)$' ); -type Props = { - url: string, -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Typeform extends React.Component { static ENABLED = [URL_REGEX]; render() { - return ; + return ; } } diff --git a/app/embeds/Typeform.test.js b/app/embeds/Typeform.test.js index cb2196af4..441cad6b6 100644 --- a/app/embeds/Typeform.test.js +++ b/app/embeds/Typeform.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Typeform } = embeds; +import Typeform from './Typeform'; describe('Typeform', () => { const match = Typeform.ENABLED[0]; diff --git a/app/embeds/Vimeo.js b/app/embeds/Vimeo.js index d933e81e6..51177678d 100644 --- a/app/embeds/Vimeo.js +++ b/app/embeds/Vimeo.js @@ -4,16 +4,18 @@ import Frame from './components/Frame'; const URL_REGEX = /(http|https)?:\/\/(www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|)(\d+)(?:|\/\?)/; -type Props = { - url: string, - matches: string[], -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class Vimeo extends React.Component { static ENABLED = [URL_REGEX]; render() { - const { matches } = this.props; + const { matches } = this.props.attrs; const videoId = matches[4]; return ( diff --git a/app/embeds/Vimeo.test.js b/app/embeds/Vimeo.test.js index 08bf3fd20..610e9dc83 100644 --- a/app/embeds/Vimeo.test.js +++ b/app/embeds/Vimeo.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { Vimeo } = embeds; +import Vimeo from './Vimeo'; describe('Vimeo', () => { const match = Vimeo.ENABLED[0]; diff --git a/app/embeds/YouTube.js b/app/embeds/YouTube.js index 71e80c1a8..9c8e1c882 100644 --- a/app/embeds/YouTube.js +++ b/app/embeds/YouTube.js @@ -4,16 +4,18 @@ import Frame from './components/Frame'; const URL_REGEX = /(?:https?:\/\/)?(?:www\.)?youtu\.?be(?:\.com)?\/?.*(?:watch|embed)?(?:.*v=|v\/|\/)([a-zA-Z0-9_-]{11})$/i; -type Props = { - url: string, - matches: string[], -}; +type Props = {| + attrs: {| + href: string, + matches: string[], + |}, +|}; export default class YouTube extends React.Component { static ENABLED = [URL_REGEX]; render() { - const { matches } = this.props; + const { matches } = this.props.attrs; const videoId = matches[1]; return ( diff --git a/app/embeds/YouTube.test.js b/app/embeds/YouTube.test.js index 9fa3442e2..b4afd34e5 100644 --- a/app/embeds/YouTube.test.js +++ b/app/embeds/YouTube.test.js @@ -1,7 +1,5 @@ /* eslint-disable flowtype/require-valid-file-annotation */ -import embeds from '.'; - -const { YouTube } = embeds; +import YouTube from './YouTube'; describe('YouTube', () => { const match = YouTube.ENABLED[0]; diff --git a/app/embeds/components/Frame.js b/app/embeds/components/Frame.js index 26b579783..d60ed63f3 100644 --- a/app/embeds/components/Frame.js +++ b/app/embeds/components/Frame.js @@ -35,7 +35,7 @@ class Frame extends React.Component { const { border, width = '100%', - height = '400', + height = '400px', forwardedRef, ...rest } = this.props; diff --git a/app/embeds/index.js b/app/embeds/index.js index 5641c8572..343c011de 100644 --- a/app/embeds/index.js +++ b/app/embeds/index.js @@ -1,4 +1,6 @@ // @flow +import * as React from 'react'; +import styled from 'styled-components'; import Abstract from './Abstract'; import Airtable from './Airtable'; import Codepen from './Codepen'; @@ -15,7 +17,6 @@ import Marvel from './Marvel'; import Mindmeister from './Mindmeister'; import Miro from './Miro'; import ModeAnalytics from './ModeAnalytics'; -import Numeracy from './Numeracy'; import Prezi from './Prezi'; import Spotify from './Spotify'; import Trello from './Trello'; @@ -23,28 +24,176 @@ import Typeform from './Typeform'; import Vimeo from './Vimeo'; import YouTube from './YouTube'; -export default { - Abstract, - Airtable, - Codepen, - Figma, - Framer, - Gist, - GoogleDocs, - GoogleSheets, - GoogleSlides, - InVision, - Loom, - Lucidchart, - Marvel, - Mindmeister, - Miro, - ModeAnalytics, - Numeracy, - Prezi, - Spotify, - Trello, - Typeform, - Vimeo, - YouTube, -}; +function matcher(Component) { + return (url: string) => { + const regexes = Component.ENABLED; + for (const regex of regexes) { + const result = url.match(regex); + if (result) { + return result; + } + } + }; +} + +const Img = styled.img` + margin: 4px; + width: 18px; + height: 18px; +`; + +export default [ + { + title: 'Abstract', + keywords: 'design', + icon: () => , + component: Abstract, + matcher: matcher(Abstract), + }, + { + title: 'Airtable', + keywords: 'spreadsheet', + icon: () => , + component: Airtable, + matcher: matcher(Airtable), + }, + { + title: 'Codepen', + keywords: 'code editor', + icon: () => , + component: Codepen, + matcher: matcher(Codepen), + }, + { + title: 'Figma', + keywords: 'design svg vector', + icon: () => , + component: Figma, + matcher: matcher(Figma), + }, + { + title: 'Framer', + keywords: 'design prototyping', + icon: () => , + component: Framer, + matcher: matcher(Framer), + }, + { + title: 'GitHub Gist', + keywords: 'code', + icon: () => , + component: Gist, + matcher: matcher(Gist), + }, + { + title: 'Google Docs', + icon: () => , + component: GoogleDocs, + matcher: matcher(GoogleDocs), + }, + { + title: 'Google Sheets', + keywords: 'excel spreadsheet', + icon: () => , + component: GoogleSheets, + matcher: matcher(GoogleSheets), + }, + { + title: 'Google Slides', + keywords: 'presentation slideshow', + icon: () => , + component: GoogleSlides, + matcher: matcher(GoogleSlides), + }, + { + title: 'InVision', + keywords: 'design prototype', + icon: () => , + component: InVision, + matcher: matcher(InVision), + }, + { + title: 'Loom', + keywords: 'video screencast', + icon: () => , + component: Loom, + matcher: matcher(Loom), + }, + { + title: 'Lucidchart', + keywords: 'chart', + icon: () => , + component: Lucidchart, + matcher: matcher(Lucidchart), + }, + { + title: 'Marvel', + keywords: 'design prototype', + icon: () => , + component: Marvel, + matcher: matcher(Marvel), + }, + { + title: 'Mindmeister', + keywords: 'mindmap', + icon: () => , + component: Mindmeister, + matcher: matcher(Mindmeister), + }, + { + title: 'Miro', + keywords: 'whiteboard', + icon: () => , + component: Miro, + matcher: matcher(Miro), + }, + { + title: 'Mode', + keywords: 'analytics', + icon: () => , + component: ModeAnalytics, + matcher: matcher(ModeAnalytics), + }, + { + title: 'Prezi', + keywords: 'presentation', + icon: () => , + component: Prezi, + matcher: matcher(Prezi), + }, + { + title: 'Spotify', + keywords: 'music', + icon: () => , + component: Spotify, + matcher: matcher(Spotify), + }, + { + title: 'Trello', + keywords: 'kanban', + icon: () => , + component: Trello, + matcher: matcher(Trello), + }, + { + title: 'Typeform', + keywords: 'form survey', + icon: () => , + component: Typeform, + matcher: matcher(Typeform), + }, + { + title: 'Vimeo', + keywords: 'video', + icon: () => , + component: Vimeo, + matcher: matcher(Vimeo), + }, + { + title: 'YouTube', + keywords: 'google video', + icon: () => , + component: YouTube, + matcher: matcher(YouTube), + }, +]; diff --git a/app/models/Document.js b/app/models/Document.js index 762c1d088..96946c86d 100644 --- a/app/models/Document.js +++ b/app/models/Document.js @@ -3,7 +3,6 @@ import { action, set, observable, computed } from 'mobx'; import addDays from 'date-fns/add_days'; import invariant from 'invariant'; import { client } from 'utils/ApiClient'; -import getHeadingsForText from 'shared/utils/getHeadingsForText'; import parseTitle from 'shared/utils/parseTitle'; import unescape from 'shared/utils/unescape'; import BaseModel from 'models/BaseModel'; @@ -45,11 +44,6 @@ export default class Document extends BaseModel { return emoji; } - @computed - get headings() { - return getHeadingsForText(this.text); - } - @computed get isOnlyTitle(): boolean { return !this.text.trim(); diff --git a/app/models/Revision.js b/app/models/Revision.js index 2ed9ffa52..ce1571f9c 100644 --- a/app/models/Revision.js +++ b/app/models/Revision.js @@ -1,6 +1,4 @@ // @flow -import { computed } from 'mobx'; -import getHeadingsForText from 'shared/utils/getHeadingsForText'; import BaseModel from './BaseModel'; import User from './User'; @@ -11,11 +9,6 @@ class Revision extends BaseModel { text: string; createdAt: string; createdBy: User; - - @computed - get headings() { - return getHeadingsForText(this.text); - } } export default Revision; diff --git a/app/scenes/Document/components/Contents.js b/app/scenes/Document/components/Contents.js index 27d85b2ed..03de590b5 100644 --- a/app/scenes/Document/components/Contents.js +++ b/app/scenes/Document/components/Contents.js @@ -5,18 +5,14 @@ import breakpoint from 'styled-components-breakpoint'; import useWindowScrollPosition from '@rehooks/window-scroll-position'; import HelpText from 'components/HelpText'; import styled from 'styled-components'; -import Document from 'models/Document'; -import Revision from 'models/Revision'; const HEADING_OFFSET = 20; type Props = { - document: Revision | Document, + headings: { title: string, level: number, id: string }[], }; -export default function Contents({ document }: Props) { - const headings = document.headings; - +export default function Contents({ headings }: Props) { // $FlowFixMe const [activeSlug, setActiveSlug] = React.useState(); const position = useWindowScrollPosition({ throttle: 100 }); @@ -27,20 +23,20 @@ export default function Contents({ document }: Props) { for (let key = 0; key < headings.length; key++) { const heading = headings[key]; const element = window.document.getElementById( - decodeURIComponent(heading.slug) + decodeURIComponent(heading.id) ); if (element) { const bounding = element.getBoundingClientRect(); if (bounding.top > HEADING_OFFSET) { const last = headings[Math.max(0, key - 1)]; - setActiveSlug(last.slug); - break; + setActiveSlug(last.id); + return; } } } }, - [position] + [position, headings] ); // calculate the minimum heading level and adjust all the headings to make @@ -60,11 +56,11 @@ export default function Contents({ document }: Props) { {headings.map(heading => ( - {heading.title} + {heading.title} ))} diff --git a/app/scenes/Document/components/Document.js b/app/scenes/Document/components/Document.js index 2a6b79de4..a6a160740 100644 --- a/app/scenes/Document/components/Document.js +++ b/app/scenes/Document/components/Document.js @@ -5,7 +5,6 @@ import styled from 'styled-components'; import breakpoint from 'styled-components-breakpoint'; import { observable } from 'mobx'; import { observer, inject } from 'mobx-react'; -import { schema } from 'rich-markdown-editor'; import { Prompt, Route, withRouter } from 'react-router-dom'; import type { Location, RouterHistory } from 'react-router-dom'; import keydown from 'react-keydown'; @@ -65,6 +64,7 @@ type Props = { @observer class DocumentScene extends React.Component { + @observable editor: ?any; getEditorText: () => string = () => this.props.document.text; @observable editorComponent = EditorImport; @@ -88,6 +88,8 @@ class DocumentScene extends React.Component { @keydown('m') goToMove(ev) { + if (!this.props.readOnly) return; + ev.preventDefault(); const { document, abilities } = this.props; @@ -98,6 +100,8 @@ class DocumentScene extends React.Component { @keydown('e') goToEdit(ev) { + if (!this.props.readOnly) return; + ev.preventDefault(); const { document, abilities } = this.props; @@ -116,6 +120,8 @@ class DocumentScene extends React.Component { @keydown('h') goToHistory(ev) { + if (!this.props.readOnly) return; + ev.preventDefault(); const { document, revision } = this.props; @@ -356,9 +362,18 @@ class DocumentScene extends React.Component { )} {ui.tocVisible && - readOnly && } + readOnly && ( + + )} { + if (ref) { + this.editor = ref; + } + }} isDraft={document.isDraft} key={disableEmbeds ? 'embeds-disabled' : 'embeds-enabled'} title={revision ? revision.title : this.title} @@ -375,7 +390,6 @@ class DocumentScene extends React.Component { onCancel={this.goBack} readOnly={readOnly || document.isArchived} ui={this.props.ui} - schema={schema} /> {readOnly && diff --git a/app/scenes/Document/components/DocumentMeta.js b/app/scenes/Document/components/DocumentMeta.js new file mode 100644 index 000000000..cdbdf96de --- /dev/null +++ b/app/scenes/Document/components/DocumentMeta.js @@ -0,0 +1,35 @@ +// @flow +import * as React from 'react'; +import styled from 'styled-components'; +import { inject } from 'mobx-react'; +import ViewsStore from 'stores/ViewsStore'; +import Document from 'models/Document'; +import PublishingInfo from 'components/PublishingInfo'; + +type Props = {| + views: ViewsStore, + document: Document, + isDraft: boolean, +|}; + +function DocumentMeta({ views, isDraft, document }: Props) { + const totalViews = views.countForDocument(document.id); + + return ( + + {totalViews && !isDraft ? ( + +  · Viewed{' '} + {totalViews === 1 ? 'once' : `${totalViews} times`} + + ) : null} + + ); +} + +const Meta = styled(PublishingInfo)` + margin: -12px 0 2em 0; + font-size: 14px; +`; + +export default inject('views')(DocumentMeta); diff --git a/app/scenes/Document/components/Editor.js b/app/scenes/Document/components/Editor.js index b8817d754..86f323e53 100644 --- a/app/scenes/Document/components/Editor.js +++ b/app/scenes/Document/components/Editor.js @@ -2,25 +2,22 @@ import * as React from 'react'; import styled from 'styled-components'; import Textarea from 'react-autosize-textarea'; -import { inject, observer } from 'mobx-react'; +import { observer } from 'mobx-react'; import Editor from 'components/Editor'; -import PublishingInfo from 'components/PublishingInfo'; import ClickablePadding from 'components/ClickablePadding'; import Flex from 'shared/components/Flex'; import parseTitle from 'shared/utils/parseTitle'; -import ViewsStore from 'stores/ViewsStore'; import Document from 'models/Document'; -import plugins from './plugins'; +import DocumentMeta from './DocumentMeta'; -type Props = {| +type Props = { onChangeTitle: (event: SyntheticInputEvent<>) => void, title: string, defaultValue: string, document: Document, - views: ViewsStore, isDraft: boolean, readOnly?: boolean, -|}; +}; @observer class DocumentEditor extends React.Component { @@ -38,6 +35,14 @@ class DocumentEditor extends React.Component { } }; + getHeadings = () => { + if (this.editor) { + return this.editor.getHeadings(); + } + + return []; + }; + handleTitleKeyDown = (event: SyntheticKeyboardEvent<>) => { if (event.key === 'Enter' || event.key === 'Tab') { event.preventDefault(); @@ -46,15 +51,7 @@ class DocumentEditor extends React.Component { }; render() { - const { - views, - document, - title, - onChangeTitle, - isDraft, - readOnly, - } = this.props; - const totalViews = views.countForDocument(document.id); + const { document, title, onChangeTitle, isDraft, readOnly } = this.props; const { emoji } = parseTitle(title); const startsWithEmojiAndSpace = !!( emoji && title.match(new RegExp(`^${emoji}\\s`)) @@ -68,24 +65,16 @@ class DocumentEditor extends React.Component { onKeyDown={this.handleTitleKeyDown} placeholder="Start with a title…" value={!title && readOnly ? 'Untitled' : title} - offsetLeft={startsWithEmojiAndSpace} + style={startsWithEmojiAndSpace ? { marginLeft: '-1.2em' } : undefined} readOnly={readOnly} autoFocus={!title} - maxlength={100} + maxLength={100} /> - - {totalViews && !isDraft ? ( - -  · Viewed{' '} - {totalViews === 1 ? 'once' : `${totalViews} times`} - - ) : null} - + (this.editor = ref)} autoFocus={title && !this.props.defaultValue} placeholder="…the rest is up to you" - plugins={plugins} grow {...this.props} /> @@ -95,11 +84,6 @@ class DocumentEditor extends React.Component { } } -const Meta = styled(PublishingInfo)` - margin: -12px 0 2em 0; - font-size: 14px; -`; - const Title = styled(Textarea)` z-index: 1; line-height: 1.25; @@ -108,7 +92,6 @@ const Title = styled(Textarea)` text: ${props => props.theme.text}; background: ${props => props.theme.background}; transition: ${props => props.theme.backgroundTransition}; - margin-left: ${props => (props.offsetLeft ? '-1.2em' : 0)}; color: ${props => props.theme.text}; font-size: 2.25em; font-weight: 500; @@ -122,4 +105,4 @@ const Title = styled(Textarea)` } `; -export default inject('views')(DocumentEditor); +export default DocumentEditor; diff --git a/app/scenes/Document/components/plugins.js b/app/scenes/Document/components/plugins.js deleted file mode 100644 index 688a4dd90..000000000 --- a/app/scenes/Document/components/plugins.js +++ /dev/null @@ -1,15 +0,0 @@ -// @flow -import { Editor } from 'slate'; -import isModKey from 'rich-markdown-editor/lib/lib/isModKey'; - -export default [ - { - onKeyDown(ev: SyntheticKeyboardEvent<>, editor: Editor, next: Function) { - if (ev.key === 'p' && ev.shiftKey && isModKey(ev)) { - return editor.props.onPublish(ev); - } - - return next(); - }, - }, -]; diff --git a/app/scenes/KeyboardShortcuts.js b/app/scenes/KeyboardShortcuts.js index c6f13d5b0..2aff9ab1f 100644 --- a/app/scenes/KeyboardShortcuts.js +++ b/app/scenes/KeyboardShortcuts.js @@ -148,6 +148,8 @@ function KeyboardShortcuts() { {'`code`'} + ==highlight== + ); diff --git a/flow-typed/npm/rich-markdown-editor_vx.x.x.js b/flow-typed/npm/rich-markdown-editor_vx.x.x.js deleted file mode 100644 index 3665f5dad..000000000 --- a/flow-typed/npm/rich-markdown-editor_vx.x.x.js +++ /dev/null @@ -1,564 +0,0 @@ -// flow-typed signature: 0a20db42510ecb339c149ca69c52342b -// flow-typed version: <>/rich-markdown-editor_v^6.1.1/flow_v0.86.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'rich-markdown-editor' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'rich-markdown-editor' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'rich-markdown-editor/lib/animations' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/changes' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/BlockInsert' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/ClickablePadding' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Code' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Contents' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/CopyButton' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/CopyToClipboard' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Flex' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Heading' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/HorizontalRule' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/BackIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/BlockQuoteIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/BoldIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/BulletedListIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/CheckboxIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/CloseIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/CodeIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/CollapsedIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/CollectionIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/DocumentIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/EditIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/GoToIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/Heading1Icon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/Heading2Icon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/HomeIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/HorizontalRuleIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/Icon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/ImageIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/index' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/ItalicIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/LinkIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/MenuIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/MoreIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/NextIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/OpenIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/OrderedListIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/PlusIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/SearchIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/SettingsIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/StrikethroughIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/TableIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/TodoListIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Icon/TrashIcon' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Image' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/InlineCode' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Link' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/ListItem' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Paragraph' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Placeholder' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Text' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/TodoItem' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/TodoList' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Toolbar/BlockToolbar' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Toolbar/DocumentResult' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Toolbar/FormattingToolbar' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Toolbar/index' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Toolbar/LinkSearchResult' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Toolbar/LinkToolbar' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/components/Toolbar/ToolbarButton' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/constants' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/index' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/lib/getDataTransferFiles' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/lib/headingToSlug' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/lib/isModKey' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/marks' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/nodes' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/plugins' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/plugins/EditList' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/plugins/Ellipsis' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/plugins/KeyboardShortcuts' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/plugins/MarkdownPaste' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/plugins/MarkdownShortcuts' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/schema' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/serializer' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/theme' { - declare module.exports: any; -} - -declare module 'rich-markdown-editor/lib/types' { - declare module.exports: any; -} - -// Filename aliases -declare module 'rich-markdown-editor/lib/animations.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/animations'>; -} -declare module 'rich-markdown-editor/lib/changes.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/changes'>; -} -declare module 'rich-markdown-editor/lib/components/BlockInsert.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/BlockInsert'>; -} -declare module 'rich-markdown-editor/lib/components/ClickablePadding.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/ClickablePadding'>; -} -declare module 'rich-markdown-editor/lib/components/Code.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Code'>; -} -declare module 'rich-markdown-editor/lib/components/Contents.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Contents'>; -} -declare module 'rich-markdown-editor/lib/components/CopyButton.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/CopyButton'>; -} -declare module 'rich-markdown-editor/lib/components/CopyToClipboard.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/CopyToClipboard'>; -} -declare module 'rich-markdown-editor/lib/components/Flex.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Flex'>; -} -declare module 'rich-markdown-editor/lib/components/Heading.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Heading'>; -} -declare module 'rich-markdown-editor/lib/components/HorizontalRule.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/HorizontalRule'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/BackIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/BackIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/BlockQuoteIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/BlockQuoteIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/BoldIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/BoldIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/BulletedListIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/BulletedListIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/CheckboxIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/CheckboxIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/CloseIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/CloseIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/CodeIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/CodeIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/CollapsedIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/CollapsedIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/CollectionIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/CollectionIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/DocumentIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/DocumentIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/EditIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/EditIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/GoToIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/GoToIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/Heading1Icon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/Heading1Icon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/Heading2Icon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/Heading2Icon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/HomeIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/HomeIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/HorizontalRuleIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/HorizontalRuleIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/Icon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/Icon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/ImageIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/ImageIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/index.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/index'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/ItalicIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/ItalicIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/LinkIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/LinkIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/MenuIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/MenuIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/MoreIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/MoreIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/NextIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/NextIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/OpenIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/OpenIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/OrderedListIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/OrderedListIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/PlusIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/PlusIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/SearchIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/SearchIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/SettingsIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/SettingsIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/StrikethroughIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/StrikethroughIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/TableIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/TableIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/TodoListIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/TodoListIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Icon/TrashIcon.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Icon/TrashIcon'>; -} -declare module 'rich-markdown-editor/lib/components/Image.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Image'>; -} -declare module 'rich-markdown-editor/lib/components/InlineCode.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/InlineCode'>; -} -declare module 'rich-markdown-editor/lib/components/Link.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Link'>; -} -declare module 'rich-markdown-editor/lib/components/ListItem.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/ListItem'>; -} -declare module 'rich-markdown-editor/lib/components/Paragraph.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Paragraph'>; -} -declare module 'rich-markdown-editor/lib/components/Placeholder.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Placeholder'>; -} -declare module 'rich-markdown-editor/lib/components/Text.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Text'>; -} -declare module 'rich-markdown-editor/lib/components/TodoItem.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/TodoItem'>; -} -declare module 'rich-markdown-editor/lib/components/TodoList.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/TodoList'>; -} -declare module 'rich-markdown-editor/lib/components/Toolbar/BlockToolbar.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Toolbar/BlockToolbar'>; -} -declare module 'rich-markdown-editor/lib/components/Toolbar/DocumentResult.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Toolbar/DocumentResult'>; -} -declare module 'rich-markdown-editor/lib/components/Toolbar/FormattingToolbar.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Toolbar/FormattingToolbar'>; -} -declare module 'rich-markdown-editor/lib/components/Toolbar/index.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Toolbar/index'>; -} -declare module 'rich-markdown-editor/lib/components/Toolbar/LinkSearchResult.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Toolbar/LinkSearchResult'>; -} -declare module 'rich-markdown-editor/lib/components/Toolbar/LinkToolbar.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Toolbar/LinkToolbar'>; -} -declare module 'rich-markdown-editor/lib/components/Toolbar/ToolbarButton.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/components/Toolbar/ToolbarButton'>; -} -declare module 'rich-markdown-editor/lib/constants.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/constants'>; -} -declare module 'rich-markdown-editor/lib/index.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/index'>; -} -declare module 'rich-markdown-editor/lib/lib/getDataTransferFiles.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/lib/getDataTransferFiles'>; -} -declare module 'rich-markdown-editor/lib/lib/headingToSlug.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/lib/headingToSlug'>; -} -declare module 'rich-markdown-editor/lib/lib/isModKey.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/lib/isModKey'>; -} -declare module 'rich-markdown-editor/lib/marks.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/marks'>; -} -declare module 'rich-markdown-editor/lib/nodes.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/nodes'>; -} -declare module 'rich-markdown-editor/lib/plugins.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/plugins'>; -} -declare module 'rich-markdown-editor/lib/plugins/EditList.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/plugins/EditList'>; -} -declare module 'rich-markdown-editor/lib/plugins/Ellipsis.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/plugins/Ellipsis'>; -} -declare module 'rich-markdown-editor/lib/plugins/KeyboardShortcuts.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/plugins/KeyboardShortcuts'>; -} -declare module 'rich-markdown-editor/lib/plugins/MarkdownPaste.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/plugins/MarkdownPaste'>; -} -declare module 'rich-markdown-editor/lib/plugins/MarkdownShortcuts.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/plugins/MarkdownShortcuts'>; -} -declare module 'rich-markdown-editor/lib/schema.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/schema'>; -} -declare module 'rich-markdown-editor/lib/serializer.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/serializer'>; -} -declare module 'rich-markdown-editor/lib/theme.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/theme'>; -} -declare module 'rich-markdown-editor/lib/types.js' { - declare module.exports: $Exports<'rich-markdown-editor/lib/types'>; -} diff --git a/flow-typed/npm/slate-collapse-on-escape_vx.x.x.js b/flow-typed/npm/slate-collapse-on-escape_vx.x.x.js deleted file mode 100644 index a04cfb94e..000000000 --- a/flow-typed/npm/slate-collapse-on-escape_vx.x.x.js +++ /dev/null @@ -1,46 +0,0 @@ -// flow-typed signature: fb8acb4981f8f021dade0e38b6631063 -// flow-typed version: <>/slate-collapse-on-escape_v^0.6.0/flow_v0.71.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'slate-collapse-on-escape' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'slate-collapse-on-escape' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'slate-collapse-on-escape/dist/slate-collapse-on-escape' { - declare module.exports: any; -} - -declare module 'slate-collapse-on-escape/dist/slate-collapse-on-escape.min' { - declare module.exports: any; -} - -declare module 'slate-collapse-on-escape/lib/index' { - declare module.exports: any; -} - -// Filename aliases -declare module 'slate-collapse-on-escape/dist/slate-collapse-on-escape.js' { - declare module.exports: $Exports<'slate-collapse-on-escape/dist/slate-collapse-on-escape'>; -} -declare module 'slate-collapse-on-escape/dist/slate-collapse-on-escape.min.js' { - declare module.exports: $Exports<'slate-collapse-on-escape/dist/slate-collapse-on-escape.min'>; -} -declare module 'slate-collapse-on-escape/lib/index.js' { - declare module.exports: $Exports<'slate-collapse-on-escape/lib/index'>; -} diff --git a/flow-typed/npm/slate-edit-code_vx.x.x.js b/flow-typed/npm/slate-edit-code_vx.x.x.js deleted file mode 100644 index d6b2b5b27..000000000 --- a/flow-typed/npm/slate-edit-code_vx.x.x.js +++ /dev/null @@ -1,599 +0,0 @@ -// flow-typed signature: 10bebc2e6b3bb07eca5614fd2b7f6e87 -// flow-typed version: <>/slate-edit-code_v^0.14.0/flow_v0.71.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'slate-edit-code' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'slate-edit-code' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'slate-edit-code/dist/changes/dedentLines' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/changes/indentLines' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/changes/index' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/changes/toggleCodeBlock' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/changes/unwrapCodeBlock' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/changes/unwrapCodeBlockByKey' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/changes/wrapCodeBlock' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/changes/wrapCodeBlockByKey' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/core' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/deserializeCode' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/getCurrentCode' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/getCurrentIndent' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/getIndent' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/handlers/index' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/handlers/onBackspace' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/handlers/onEnter' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/handlers/onKeyDown' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/handlers/onModEnter' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/handlers/onPaste' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/handlers/onSelectAll' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/handlers/onShiftTab' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/handlers/onTab' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/index' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/isInCodeBlock' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/makeSchema' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/onBackspace' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/onEnter' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/onModEnter' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/onSelectAll' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/onShiftTab' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/onTab' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/options' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/transforms/dedentLines' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/transforms/indentLines' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/transforms/toggleCodeBlock' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/transforms/unwrapCodeBlock' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/transforms/unwrapCodeBlockByKey' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/transforms/wrapCodeBlock' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/transforms/wrapCodeBlockByKey' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/utils/deserializeCode' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/utils/getCurrentCode' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/utils/getCurrentIndent' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/utils/getIndent' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/utils/index' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/utils/isInCodeBlock' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/validation/index' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/validation/schema' { - declare module.exports: any; -} - -declare module 'slate-edit-code/dist/validation/validateNode' { - declare module.exports: any; -} - -declare module 'slate-edit-code/example/bundle' { - declare module.exports: any; -} - -declare module 'slate-edit-code/example/main' { - declare module.exports: any; -} - -declare module 'slate-edit-code/example/value' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/all' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/backspace-empty-code/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/backspace-start/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/enter-end-offset/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/enter-mid-offset/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/enter-start-offset/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/enter-with-indent/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/isincodeblock-true/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/on-exit-block/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/paste-middle/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/schema-multiline-text/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/schema-no-marks/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/schema-no-orphan-line/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/schema-only-text-2/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/schema-only-text/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/schema-single-text/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/select-all/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/shift-tab-middle-offset/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/shift-tab-multilines/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/simulate-key' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/tab-middle-offset/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/tab-multilines/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/tab-start-offset/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/togglecodeblock-code/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/togglecodeblock-normal/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/unwrapcodeblock-multi-lines/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/unwrapcodeblock-normal/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/unwrapcodeblock-selection/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/wrapcodeblock-normal/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/wrapcodeblock-selection/change' { - declare module.exports: any; -} - -declare module 'slate-edit-code/tests/wrapcodeblock-with-inline/change' { - declare module.exports: any; -} - -// Filename aliases -declare module 'slate-edit-code/dist/changes/dedentLines.js' { - declare module.exports: $Exports<'slate-edit-code/dist/changes/dedentLines'>; -} -declare module 'slate-edit-code/dist/changes/indentLines.js' { - declare module.exports: $Exports<'slate-edit-code/dist/changes/indentLines'>; -} -declare module 'slate-edit-code/dist/changes/index.js' { - declare module.exports: $Exports<'slate-edit-code/dist/changes/index'>; -} -declare module 'slate-edit-code/dist/changes/toggleCodeBlock.js' { - declare module.exports: $Exports<'slate-edit-code/dist/changes/toggleCodeBlock'>; -} -declare module 'slate-edit-code/dist/changes/unwrapCodeBlock.js' { - declare module.exports: $Exports<'slate-edit-code/dist/changes/unwrapCodeBlock'>; -} -declare module 'slate-edit-code/dist/changes/unwrapCodeBlockByKey.js' { - declare module.exports: $Exports<'slate-edit-code/dist/changes/unwrapCodeBlockByKey'>; -} -declare module 'slate-edit-code/dist/changes/wrapCodeBlock.js' { - declare module.exports: $Exports<'slate-edit-code/dist/changes/wrapCodeBlock'>; -} -declare module 'slate-edit-code/dist/changes/wrapCodeBlockByKey.js' { - declare module.exports: $Exports<'slate-edit-code/dist/changes/wrapCodeBlockByKey'>; -} -declare module 'slate-edit-code/dist/core.js' { - declare module.exports: $Exports<'slate-edit-code/dist/core'>; -} -declare module 'slate-edit-code/dist/deserializeCode.js' { - declare module.exports: $Exports<'slate-edit-code/dist/deserializeCode'>; -} -declare module 'slate-edit-code/dist/getCurrentCode.js' { - declare module.exports: $Exports<'slate-edit-code/dist/getCurrentCode'>; -} -declare module 'slate-edit-code/dist/getCurrentIndent.js' { - declare module.exports: $Exports<'slate-edit-code/dist/getCurrentIndent'>; -} -declare module 'slate-edit-code/dist/getIndent.js' { - declare module.exports: $Exports<'slate-edit-code/dist/getIndent'>; -} -declare module 'slate-edit-code/dist/handlers/index.js' { - declare module.exports: $Exports<'slate-edit-code/dist/handlers/index'>; -} -declare module 'slate-edit-code/dist/handlers/onBackspace.js' { - declare module.exports: $Exports<'slate-edit-code/dist/handlers/onBackspace'>; -} -declare module 'slate-edit-code/dist/handlers/onEnter.js' { - declare module.exports: $Exports<'slate-edit-code/dist/handlers/onEnter'>; -} -declare module 'slate-edit-code/dist/handlers/onKeyDown.js' { - declare module.exports: $Exports<'slate-edit-code/dist/handlers/onKeyDown'>; -} -declare module 'slate-edit-code/dist/handlers/onModEnter.js' { - declare module.exports: $Exports<'slate-edit-code/dist/handlers/onModEnter'>; -} -declare module 'slate-edit-code/dist/handlers/onPaste.js' { - declare module.exports: $Exports<'slate-edit-code/dist/handlers/onPaste'>; -} -declare module 'slate-edit-code/dist/handlers/onSelectAll.js' { - declare module.exports: $Exports<'slate-edit-code/dist/handlers/onSelectAll'>; -} -declare module 'slate-edit-code/dist/handlers/onShiftTab.js' { - declare module.exports: $Exports<'slate-edit-code/dist/handlers/onShiftTab'>; -} -declare module 'slate-edit-code/dist/handlers/onTab.js' { - declare module.exports: $Exports<'slate-edit-code/dist/handlers/onTab'>; -} -declare module 'slate-edit-code/dist/index.js' { - declare module.exports: $Exports<'slate-edit-code/dist/index'>; -} -declare module 'slate-edit-code/dist/isInCodeBlock.js' { - declare module.exports: $Exports<'slate-edit-code/dist/isInCodeBlock'>; -} -declare module 'slate-edit-code/dist/makeSchema.js' { - declare module.exports: $Exports<'slate-edit-code/dist/makeSchema'>; -} -declare module 'slate-edit-code/dist/onBackspace.js' { - declare module.exports: $Exports<'slate-edit-code/dist/onBackspace'>; -} -declare module 'slate-edit-code/dist/onEnter.js' { - declare module.exports: $Exports<'slate-edit-code/dist/onEnter'>; -} -declare module 'slate-edit-code/dist/onModEnter.js' { - declare module.exports: $Exports<'slate-edit-code/dist/onModEnter'>; -} -declare module 'slate-edit-code/dist/onSelectAll.js' { - declare module.exports: $Exports<'slate-edit-code/dist/onSelectAll'>; -} -declare module 'slate-edit-code/dist/onShiftTab.js' { - declare module.exports: $Exports<'slate-edit-code/dist/onShiftTab'>; -} -declare module 'slate-edit-code/dist/onTab.js' { - declare module.exports: $Exports<'slate-edit-code/dist/onTab'>; -} -declare module 'slate-edit-code/dist/options.js' { - declare module.exports: $Exports<'slate-edit-code/dist/options'>; -} -declare module 'slate-edit-code/dist/transforms/dedentLines.js' { - declare module.exports: $Exports<'slate-edit-code/dist/transforms/dedentLines'>; -} -declare module 'slate-edit-code/dist/transforms/indentLines.js' { - declare module.exports: $Exports<'slate-edit-code/dist/transforms/indentLines'>; -} -declare module 'slate-edit-code/dist/transforms/toggleCodeBlock.js' { - declare module.exports: $Exports<'slate-edit-code/dist/transforms/toggleCodeBlock'>; -} -declare module 'slate-edit-code/dist/transforms/unwrapCodeBlock.js' { - declare module.exports: $Exports<'slate-edit-code/dist/transforms/unwrapCodeBlock'>; -} -declare module 'slate-edit-code/dist/transforms/unwrapCodeBlockByKey.js' { - declare module.exports: $Exports<'slate-edit-code/dist/transforms/unwrapCodeBlockByKey'>; -} -declare module 'slate-edit-code/dist/transforms/wrapCodeBlock.js' { - declare module.exports: $Exports<'slate-edit-code/dist/transforms/wrapCodeBlock'>; -} -declare module 'slate-edit-code/dist/transforms/wrapCodeBlockByKey.js' { - declare module.exports: $Exports<'slate-edit-code/dist/transforms/wrapCodeBlockByKey'>; -} -declare module 'slate-edit-code/dist/utils/deserializeCode.js' { - declare module.exports: $Exports<'slate-edit-code/dist/utils/deserializeCode'>; -} -declare module 'slate-edit-code/dist/utils/getCurrentCode.js' { - declare module.exports: $Exports<'slate-edit-code/dist/utils/getCurrentCode'>; -} -declare module 'slate-edit-code/dist/utils/getCurrentIndent.js' { - declare module.exports: $Exports<'slate-edit-code/dist/utils/getCurrentIndent'>; -} -declare module 'slate-edit-code/dist/utils/getIndent.js' { - declare module.exports: $Exports<'slate-edit-code/dist/utils/getIndent'>; -} -declare module 'slate-edit-code/dist/utils/index.js' { - declare module.exports: $Exports<'slate-edit-code/dist/utils/index'>; -} -declare module 'slate-edit-code/dist/utils/isInCodeBlock.js' { - declare module.exports: $Exports<'slate-edit-code/dist/utils/isInCodeBlock'>; -} -declare module 'slate-edit-code/dist/validation/index.js' { - declare module.exports: $Exports<'slate-edit-code/dist/validation/index'>; -} -declare module 'slate-edit-code/dist/validation/schema.js' { - declare module.exports: $Exports<'slate-edit-code/dist/validation/schema'>; -} -declare module 'slate-edit-code/dist/validation/validateNode.js' { - declare module.exports: $Exports<'slate-edit-code/dist/validation/validateNode'>; -} -declare module 'slate-edit-code/example/bundle.js' { - declare module.exports: $Exports<'slate-edit-code/example/bundle'>; -} -declare module 'slate-edit-code/example/main.js' { - declare module.exports: $Exports<'slate-edit-code/example/main'>; -} -declare module 'slate-edit-code/example/value.js' { - declare module.exports: $Exports<'slate-edit-code/example/value'>; -} -declare module 'slate-edit-code/tests/all.js' { - declare module.exports: $Exports<'slate-edit-code/tests/all'>; -} -declare module 'slate-edit-code/tests/backspace-empty-code/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/backspace-empty-code/change'>; -} -declare module 'slate-edit-code/tests/backspace-start/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/backspace-start/change'>; -} -declare module 'slate-edit-code/tests/enter-end-offset/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/enter-end-offset/change'>; -} -declare module 'slate-edit-code/tests/enter-mid-offset/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/enter-mid-offset/change'>; -} -declare module 'slate-edit-code/tests/enter-start-offset/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/enter-start-offset/change'>; -} -declare module 'slate-edit-code/tests/enter-with-indent/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/enter-with-indent/change'>; -} -declare module 'slate-edit-code/tests/isincodeblock-true/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/isincodeblock-true/change'>; -} -declare module 'slate-edit-code/tests/on-exit-block/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/on-exit-block/change'>; -} -declare module 'slate-edit-code/tests/paste-middle/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/paste-middle/change'>; -} -declare module 'slate-edit-code/tests/schema-multiline-text/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/schema-multiline-text/change'>; -} -declare module 'slate-edit-code/tests/schema-no-marks/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/schema-no-marks/change'>; -} -declare module 'slate-edit-code/tests/schema-no-orphan-line/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/schema-no-orphan-line/change'>; -} -declare module 'slate-edit-code/tests/schema-only-text-2/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/schema-only-text-2/change'>; -} -declare module 'slate-edit-code/tests/schema-only-text/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/schema-only-text/change'>; -} -declare module 'slate-edit-code/tests/schema-single-text/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/schema-single-text/change'>; -} -declare module 'slate-edit-code/tests/select-all/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/select-all/change'>; -} -declare module 'slate-edit-code/tests/shift-tab-middle-offset/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/shift-tab-middle-offset/change'>; -} -declare module 'slate-edit-code/tests/shift-tab-multilines/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/shift-tab-multilines/change'>; -} -declare module 'slate-edit-code/tests/simulate-key.js' { - declare module.exports: $Exports<'slate-edit-code/tests/simulate-key'>; -} -declare module 'slate-edit-code/tests/tab-middle-offset/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/tab-middle-offset/change'>; -} -declare module 'slate-edit-code/tests/tab-multilines/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/tab-multilines/change'>; -} -declare module 'slate-edit-code/tests/tab-start-offset/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/tab-start-offset/change'>; -} -declare module 'slate-edit-code/tests/togglecodeblock-code/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/togglecodeblock-code/change'>; -} -declare module 'slate-edit-code/tests/togglecodeblock-normal/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/togglecodeblock-normal/change'>; -} -declare module 'slate-edit-code/tests/unwrapcodeblock-multi-lines/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/unwrapcodeblock-multi-lines/change'>; -} -declare module 'slate-edit-code/tests/unwrapcodeblock-normal/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/unwrapcodeblock-normal/change'>; -} -declare module 'slate-edit-code/tests/unwrapcodeblock-selection/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/unwrapcodeblock-selection/change'>; -} -declare module 'slate-edit-code/tests/wrapcodeblock-normal/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/wrapcodeblock-normal/change'>; -} -declare module 'slate-edit-code/tests/wrapcodeblock-selection/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/wrapcodeblock-selection/change'>; -} -declare module 'slate-edit-code/tests/wrapcodeblock-with-inline/change.js' { - declare module.exports: $Exports<'slate-edit-code/tests/wrapcodeblock-with-inline/change'>; -} diff --git a/flow-typed/npm/slate-edit-list_vx.x.x.js b/flow-typed/npm/slate-edit-list_vx.x.x.js deleted file mode 100644 index c948a365a..000000000 --- a/flow-typed/npm/slate-edit-list_vx.x.x.js +++ /dev/null @@ -1,515 +0,0 @@ -// flow-typed signature: bf6ce33431fda5bd9034a47299c20afd -// flow-typed version: <>/slate-edit-list_v^0.7.0/flow_v0.49.1 - -/** - * This is an autogenerated libdef stub for: - * - * 'slate-edit-list' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'slate-edit-list' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'slate-edit-list/dist/getCurrentItem' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/getCurrentList' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/getItemDepth' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/getItemsAtRange' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/getListForItem' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/getPreviousItem' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/index' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/isList' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/isSelectionInList' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/makeSchema' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/onBackspace' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/onEnter' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/onTab' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/options' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/transforms/decreaseItemDepth' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/transforms/increaseItemDepth' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/transforms/splitListItem' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/transforms/unwrapInList' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/transforms/unwrapList' { - declare module.exports: any; -} - -declare module 'slate-edit-list/dist/transforms/wrapInList' { - declare module.exports: any; -} - -declare module 'slate-edit-list/example/bundle' { - declare module.exports: any; -} - -declare module 'slate-edit-list/example/main' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/all' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/backspace-empty-between-inline/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/backspace-end-of-inline/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/backspace-start-of-inline/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/backspace-start-of-item/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/decrease-item-depth-basic/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/decrease-item-depth-long-sublist-with-data/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/decrease-item-depth-long-sublist/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/enter-empty-block-in-item/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/enter-empty-item/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/enter-middle-item/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/enter-nested-item/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/get-current-item/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/get-previous-item/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/increase-item-depth-basic-with-data/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/increase-item-depth-basic/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/increase-item-depth-complex/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/increase-item-depth-existing-sublist/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/increase-item-depth-fifth/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/schema-items-are-list-children/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/schema-items-contain-blocks-2/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/schema-items-contain-blocks/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/schema-lists-contain-items/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/schema-nested-lists/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/schema-ul-ul-li-li/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/shift-enter-middle-item/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/split-item-end/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/split-item-offset/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/split-item-start/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/split-item-sublist-deep/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/split-item-sublist/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/undo-decrease-item-depth-long-sublist/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/undo-increase-item-depth-complex/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/undo-split-item-sublist-deep/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/undo-unwrap-long-list/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/undo-wrap-in-list/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/unwrap-list-multiple-nested/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/unwrap-list-multiple/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/unwrap-list/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/unwrap-long-list/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/unwrap-nested-list/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/wrap-in-list-list-with-data/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/wrap-in-list-list/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/wrap-in-list-multiple-with-data/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/wrap-in-list-multiple/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/wrap-in-list-with-data/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/wrap-in-list/transform' { - declare module.exports: any; -} - -declare module 'slate-edit-list/tests/wrap-in-ol/transform' { - declare module.exports: any; -} - -// Filename aliases -declare module 'slate-edit-list/dist/getCurrentItem.js' { - declare module.exports: $Exports<'slate-edit-list/dist/getCurrentItem'>; -} -declare module 'slate-edit-list/dist/getCurrentList.js' { - declare module.exports: $Exports<'slate-edit-list/dist/getCurrentList'>; -} -declare module 'slate-edit-list/dist/getItemDepth.js' { - declare module.exports: $Exports<'slate-edit-list/dist/getItemDepth'>; -} -declare module 'slate-edit-list/dist/getItemsAtRange.js' { - declare module.exports: $Exports<'slate-edit-list/dist/getItemsAtRange'>; -} -declare module 'slate-edit-list/dist/getListForItem.js' { - declare module.exports: $Exports<'slate-edit-list/dist/getListForItem'>; -} -declare module 'slate-edit-list/dist/getPreviousItem.js' { - declare module.exports: $Exports<'slate-edit-list/dist/getPreviousItem'>; -} -declare module 'slate-edit-list/dist/index.js' { - declare module.exports: $Exports<'slate-edit-list/dist/index'>; -} -declare module 'slate-edit-list/dist/isList.js' { - declare module.exports: $Exports<'slate-edit-list/dist/isList'>; -} -declare module 'slate-edit-list/dist/isSelectionInList.js' { - declare module.exports: $Exports<'slate-edit-list/dist/isSelectionInList'>; -} -declare module 'slate-edit-list/dist/makeSchema.js' { - declare module.exports: $Exports<'slate-edit-list/dist/makeSchema'>; -} -declare module 'slate-edit-list/dist/onBackspace.js' { - declare module.exports: $Exports<'slate-edit-list/dist/onBackspace'>; -} -declare module 'slate-edit-list/dist/onEnter.js' { - declare module.exports: $Exports<'slate-edit-list/dist/onEnter'>; -} -declare module 'slate-edit-list/dist/onTab.js' { - declare module.exports: $Exports<'slate-edit-list/dist/onTab'>; -} -declare module 'slate-edit-list/dist/options.js' { - declare module.exports: $Exports<'slate-edit-list/dist/options'>; -} -declare module 'slate-edit-list/dist/transforms/decreaseItemDepth.js' { - declare module.exports: $Exports<'slate-edit-list/dist/transforms/decreaseItemDepth'>; -} -declare module 'slate-edit-list/dist/transforms/increaseItemDepth.js' { - declare module.exports: $Exports<'slate-edit-list/dist/transforms/increaseItemDepth'>; -} -declare module 'slate-edit-list/dist/transforms/splitListItem.js' { - declare module.exports: $Exports<'slate-edit-list/dist/transforms/splitListItem'>; -} -declare module 'slate-edit-list/dist/transforms/unwrapInList.js' { - declare module.exports: $Exports<'slate-edit-list/dist/transforms/unwrapInList'>; -} -declare module 'slate-edit-list/dist/transforms/unwrapList.js' { - declare module.exports: $Exports<'slate-edit-list/dist/transforms/unwrapList'>; -} -declare module 'slate-edit-list/dist/transforms/wrapInList.js' { - declare module.exports: $Exports<'slate-edit-list/dist/transforms/wrapInList'>; -} -declare module 'slate-edit-list/example/bundle.js' { - declare module.exports: $Exports<'slate-edit-list/example/bundle'>; -} -declare module 'slate-edit-list/example/main.js' { - declare module.exports: $Exports<'slate-edit-list/example/main'>; -} -declare module 'slate-edit-list/tests/all.js' { - declare module.exports: $Exports<'slate-edit-list/tests/all'>; -} -declare module 'slate-edit-list/tests/backspace-empty-between-inline/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/backspace-empty-between-inline/transform'>; -} -declare module 'slate-edit-list/tests/backspace-end-of-inline/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/backspace-end-of-inline/transform'>; -} -declare module 'slate-edit-list/tests/backspace-start-of-inline/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/backspace-start-of-inline/transform'>; -} -declare module 'slate-edit-list/tests/backspace-start-of-item/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/backspace-start-of-item/transform'>; -} -declare module 'slate-edit-list/tests/decrease-item-depth-basic/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/decrease-item-depth-basic/transform'>; -} -declare module 'slate-edit-list/tests/decrease-item-depth-long-sublist-with-data/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/decrease-item-depth-long-sublist-with-data/transform'>; -} -declare module 'slate-edit-list/tests/decrease-item-depth-long-sublist/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/decrease-item-depth-long-sublist/transform'>; -} -declare module 'slate-edit-list/tests/enter-empty-block-in-item/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/enter-empty-block-in-item/transform'>; -} -declare module 'slate-edit-list/tests/enter-empty-item/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/enter-empty-item/transform'>; -} -declare module 'slate-edit-list/tests/enter-middle-item/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/enter-middle-item/transform'>; -} -declare module 'slate-edit-list/tests/enter-nested-item/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/enter-nested-item/transform'>; -} -declare module 'slate-edit-list/tests/get-current-item/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/get-current-item/transform'>; -} -declare module 'slate-edit-list/tests/get-previous-item/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/get-previous-item/transform'>; -} -declare module 'slate-edit-list/tests/increase-item-depth-basic-with-data/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/increase-item-depth-basic-with-data/transform'>; -} -declare module 'slate-edit-list/tests/increase-item-depth-basic/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/increase-item-depth-basic/transform'>; -} -declare module 'slate-edit-list/tests/increase-item-depth-complex/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/increase-item-depth-complex/transform'>; -} -declare module 'slate-edit-list/tests/increase-item-depth-existing-sublist/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/increase-item-depth-existing-sublist/transform'>; -} -declare module 'slate-edit-list/tests/increase-item-depth-fifth/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/increase-item-depth-fifth/transform'>; -} -declare module 'slate-edit-list/tests/schema-items-are-list-children/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/schema-items-are-list-children/transform'>; -} -declare module 'slate-edit-list/tests/schema-items-contain-blocks-2/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/schema-items-contain-blocks-2/transform'>; -} -declare module 'slate-edit-list/tests/schema-items-contain-blocks/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/schema-items-contain-blocks/transform'>; -} -declare module 'slate-edit-list/tests/schema-lists-contain-items/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/schema-lists-contain-items/transform'>; -} -declare module 'slate-edit-list/tests/schema-nested-lists/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/schema-nested-lists/transform'>; -} -declare module 'slate-edit-list/tests/schema-ul-ul-li-li/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/schema-ul-ul-li-li/transform'>; -} -declare module 'slate-edit-list/tests/shift-enter-middle-item/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/shift-enter-middle-item/transform'>; -} -declare module 'slate-edit-list/tests/split-item-end/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/split-item-end/transform'>; -} -declare module 'slate-edit-list/tests/split-item-offset/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/split-item-offset/transform'>; -} -declare module 'slate-edit-list/tests/split-item-start/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/split-item-start/transform'>; -} -declare module 'slate-edit-list/tests/split-item-sublist-deep/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/split-item-sublist-deep/transform'>; -} -declare module 'slate-edit-list/tests/split-item-sublist/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/split-item-sublist/transform'>; -} -declare module 'slate-edit-list/tests/undo-decrease-item-depth-long-sublist/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/undo-decrease-item-depth-long-sublist/transform'>; -} -declare module 'slate-edit-list/tests/undo-increase-item-depth-complex/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/undo-increase-item-depth-complex/transform'>; -} -declare module 'slate-edit-list/tests/undo-split-item-sublist-deep/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/undo-split-item-sublist-deep/transform'>; -} -declare module 'slate-edit-list/tests/undo-unwrap-long-list/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/undo-unwrap-long-list/transform'>; -} -declare module 'slate-edit-list/tests/undo-wrap-in-list/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/undo-wrap-in-list/transform'>; -} -declare module 'slate-edit-list/tests/unwrap-list-multiple-nested/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/unwrap-list-multiple-nested/transform'>; -} -declare module 'slate-edit-list/tests/unwrap-list-multiple/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/unwrap-list-multiple/transform'>; -} -declare module 'slate-edit-list/tests/unwrap-list/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/unwrap-list/transform'>; -} -declare module 'slate-edit-list/tests/unwrap-long-list/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/unwrap-long-list/transform'>; -} -declare module 'slate-edit-list/tests/unwrap-nested-list/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/unwrap-nested-list/transform'>; -} -declare module 'slate-edit-list/tests/wrap-in-list-list-with-data/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/wrap-in-list-list-with-data/transform'>; -} -declare module 'slate-edit-list/tests/wrap-in-list-list/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/wrap-in-list-list/transform'>; -} -declare module 'slate-edit-list/tests/wrap-in-list-multiple-with-data/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/wrap-in-list-multiple-with-data/transform'>; -} -declare module 'slate-edit-list/tests/wrap-in-list-multiple/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/wrap-in-list-multiple/transform'>; -} -declare module 'slate-edit-list/tests/wrap-in-list-with-data/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/wrap-in-list-with-data/transform'>; -} -declare module 'slate-edit-list/tests/wrap-in-list/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/wrap-in-list/transform'>; -} -declare module 'slate-edit-list/tests/wrap-in-ol/transform.js' { - declare module.exports: $Exports<'slate-edit-list/tests/wrap-in-ol/transform'>; -} diff --git a/flow-typed/npm/slate-md-serializer_vx.x.x.js b/flow-typed/npm/slate-md-serializer_vx.x.x.js deleted file mode 100644 index df3bfe93c..000000000 --- a/flow-typed/npm/slate-md-serializer_vx.x.x.js +++ /dev/null @@ -1,46 +0,0 @@ -// flow-typed signature: e22a6c4c1a866149f81423ac17cc25b0 -// flow-typed version: <>/slate-md-serializer_v3.0.3/flow_v0.71.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'slate-md-serializer' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'slate-md-serializer' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'slate-md-serializer/lib/parser' { - declare module.exports: any; -} - -declare module 'slate-md-serializer/lib/renderer' { - declare module.exports: any; -} - -declare module 'slate-md-serializer/lib/urls' { - declare module.exports: any; -} - -// Filename aliases -declare module 'slate-md-serializer/lib/parser.js' { - declare module.exports: $Exports<'slate-md-serializer/lib/parser'>; -} -declare module 'slate-md-serializer/lib/renderer.js' { - declare module.exports: $Exports<'slate-md-serializer/lib/renderer'>; -} -declare module 'slate-md-serializer/lib/urls.js' { - declare module.exports: $Exports<'slate-md-serializer/lib/urls'>; -} diff --git a/flow-typed/npm/slate-paste-linkify_vx.x.x.js b/flow-typed/npm/slate-paste-linkify_vx.x.x.js deleted file mode 100644 index a3bcdb1cf..000000000 --- a/flow-typed/npm/slate-paste-linkify_vx.x.x.js +++ /dev/null @@ -1,46 +0,0 @@ -// flow-typed signature: b7fa5ed1be9584d1ddeb578c01f150fb -// flow-typed version: <>/slate-paste-linkify_v^0.5.0/flow_v0.71.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'slate-paste-linkify' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'slate-paste-linkify' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'slate-paste-linkify/dist/slate-paste-linkify' { - declare module.exports: any; -} - -declare module 'slate-paste-linkify/dist/slate-paste-linkify.min' { - declare module.exports: any; -} - -declare module 'slate-paste-linkify/lib/index' { - declare module.exports: any; -} - -// Filename aliases -declare module 'slate-paste-linkify/dist/slate-paste-linkify.js' { - declare module.exports: $Exports<'slate-paste-linkify/dist/slate-paste-linkify'>; -} -declare module 'slate-paste-linkify/dist/slate-paste-linkify.min.js' { - declare module.exports: $Exports<'slate-paste-linkify/dist/slate-paste-linkify.min'>; -} -declare module 'slate-paste-linkify/lib/index.js' { - declare module.exports: $Exports<'slate-paste-linkify/lib/index'>; -} diff --git a/flow-typed/npm/slate-plain-serializer_vx.x.x.js b/flow-typed/npm/slate-plain-serializer_vx.x.x.js deleted file mode 100644 index 8f2587247..000000000 --- a/flow-typed/npm/slate-plain-serializer_vx.x.x.js +++ /dev/null @@ -1,53 +0,0 @@ -// flow-typed signature: 53d8f4be85173c4fe3a45c9b015c1643 -// flow-typed version: <>/slate-plain-serializer_v0.5.4/flow_v0.71.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'slate-plain-serializer' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'slate-plain-serializer' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'slate-plain-serializer/dist/slate-plain-serializer' { - declare module.exports: any; -} - -declare module 'slate-plain-serializer/dist/slate-plain-serializer.min' { - declare module.exports: any; -} - -declare module 'slate-plain-serializer/lib/slate-plain-serializer.es' { - declare module.exports: any; -} - -declare module 'slate-plain-serializer/lib/slate-plain-serializer' { - declare module.exports: any; -} - -// Filename aliases -declare module 'slate-plain-serializer/dist/slate-plain-serializer.js' { - declare module.exports: $Exports<'slate-plain-serializer/dist/slate-plain-serializer'>; -} -declare module 'slate-plain-serializer/dist/slate-plain-serializer.min.js' { - declare module.exports: $Exports<'slate-plain-serializer/dist/slate-plain-serializer.min'>; -} -declare module 'slate-plain-serializer/lib/slate-plain-serializer.es.js' { - declare module.exports: $Exports<'slate-plain-serializer/lib/slate-plain-serializer.es'>; -} -declare module 'slate-plain-serializer/lib/slate-plain-serializer.js' { - declare module.exports: $Exports<'slate-plain-serializer/lib/slate-plain-serializer'>; -} diff --git a/flow-typed/npm/slate-prism_vx.x.x.js b/flow-typed/npm/slate-prism_vx.x.x.js deleted file mode 100644 index e3621e4ed..000000000 --- a/flow-typed/npm/slate-prism_vx.x.x.js +++ /dev/null @@ -1,88 +0,0 @@ -// flow-typed signature: 0c893165f0eaff8d04ce05629cdb5482 -// flow-typed version: <>/slate-prism_v^0.5.0/flow_v0.71.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'slate-prism' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'slate-prism' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'slate-prism/dist/index' { - declare module.exports: any; -} - -declare module 'slate-prism/dist/options' { - declare module.exports: any; -} - -declare module 'slate-prism/dist/TOKEN_MARK' { - declare module.exports: any; -} - -declare module 'slate-prism/example/bundle' { - declare module.exports: any; -} - -declare module 'slate-prism/example/main' { - declare module.exports: any; -} - -declare module 'slate-prism/example/value' { - declare module.exports: any; -} - -declare module 'slate-prism/lib/index' { - declare module.exports: any; -} - -declare module 'slate-prism/lib/options' { - declare module.exports: any; -} - -declare module 'slate-prism/lib/TOKEN_MARK' { - declare module.exports: any; -} - -// Filename aliases -declare module 'slate-prism/dist/index.js' { - declare module.exports: $Exports<'slate-prism/dist/index'>; -} -declare module 'slate-prism/dist/options.js' { - declare module.exports: $Exports<'slate-prism/dist/options'>; -} -declare module 'slate-prism/dist/TOKEN_MARK.js' { - declare module.exports: $Exports<'slate-prism/dist/TOKEN_MARK'>; -} -declare module 'slate-prism/example/bundle.js' { - declare module.exports: $Exports<'slate-prism/example/bundle'>; -} -declare module 'slate-prism/example/main.js' { - declare module.exports: $Exports<'slate-prism/example/main'>; -} -declare module 'slate-prism/example/value.js' { - declare module.exports: $Exports<'slate-prism/example/value'>; -} -declare module 'slate-prism/lib/index.js' { - declare module.exports: $Exports<'slate-prism/lib/index'>; -} -declare module 'slate-prism/lib/options.js' { - declare module.exports: $Exports<'slate-prism/lib/options'>; -} -declare module 'slate-prism/lib/TOKEN_MARK.js' { - declare module.exports: $Exports<'slate-prism/lib/TOKEN_MARK'>; -} diff --git a/flow-typed/npm/slate-react_vx.x.x.js b/flow-typed/npm/slate-react_vx.x.x.js deleted file mode 100644 index 56b5fbb50..000000000 --- a/flow-typed/npm/slate-react_vx.x.x.js +++ /dev/null @@ -1,53 +0,0 @@ -// flow-typed signature: de15916bf0f775d67e74afc87e297d01 -// flow-typed version: <>/slate-react_v^0.12.3/flow_v0.71.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'slate-react' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'slate-react' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'slate-react/dist/slate-react' { - declare module.exports: any; -} - -declare module 'slate-react/dist/slate-react.min' { - declare module.exports: any; -} - -declare module 'slate-react/lib/slate-react.es' { - declare module.exports: any; -} - -declare module 'slate-react/lib/slate-react' { - declare module.exports: any; -} - -// Filename aliases -declare module 'slate-react/dist/slate-react.js' { - declare module.exports: $Exports<'slate-react/dist/slate-react'>; -} -declare module 'slate-react/dist/slate-react.min.js' { - declare module.exports: $Exports<'slate-react/dist/slate-react.min'>; -} -declare module 'slate-react/lib/slate-react.es.js' { - declare module.exports: $Exports<'slate-react/lib/slate-react.es'>; -} -declare module 'slate-react/lib/slate-react.js' { - declare module.exports: $Exports<'slate-react/lib/slate-react'>; -} diff --git a/flow-typed/npm/slate-trailing-block_vx.x.x.js b/flow-typed/npm/slate-trailing-block_vx.x.x.js deleted file mode 100644 index d27cfef4e..000000000 --- a/flow-typed/npm/slate-trailing-block_vx.x.x.js +++ /dev/null @@ -1,74 +0,0 @@ -// flow-typed signature: 8f61874faf7ff2706ad3ad031096ae72 -// flow-typed version: <>/slate-trailing-block_v^0.5.0/flow_v0.71.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'slate-trailing-block' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'slate-trailing-block' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'slate-trailing-block/dist/focusAtEnd' { - declare module.exports: any; -} - -declare module 'slate-trailing-block/dist/index' { - declare module.exports: any; -} - -declare module 'slate-trailing-block/tests/all' { - declare module.exports: any; -} - -declare module 'slate-trailing-block/tests/ensure-trailing-multi/change' { - declare module.exports: any; -} - -declare module 'slate-trailing-block/tests/ensure-trailing-other/change' { - declare module.exports: any; -} - -declare module 'slate-trailing-block/tests/ensure-trailing/change' { - declare module.exports: any; -} - -declare module 'slate-trailing-block/tests/just-the-trailing-block/change' { - declare module.exports: any; -} - -// Filename aliases -declare module 'slate-trailing-block/dist/focusAtEnd.js' { - declare module.exports: $Exports<'slate-trailing-block/dist/focusAtEnd'>; -} -declare module 'slate-trailing-block/dist/index.js' { - declare module.exports: $Exports<'slate-trailing-block/dist/index'>; -} -declare module 'slate-trailing-block/tests/all.js' { - declare module.exports: $Exports<'slate-trailing-block/tests/all'>; -} -declare module 'slate-trailing-block/tests/ensure-trailing-multi/change.js' { - declare module.exports: $Exports<'slate-trailing-block/tests/ensure-trailing-multi/change'>; -} -declare module 'slate-trailing-block/tests/ensure-trailing-other/change.js' { - declare module.exports: $Exports<'slate-trailing-block/tests/ensure-trailing-other/change'>; -} -declare module 'slate-trailing-block/tests/ensure-trailing/change.js' { - declare module.exports: $Exports<'slate-trailing-block/tests/ensure-trailing/change'>; -} -declare module 'slate-trailing-block/tests/just-the-trailing-block/change.js' { - declare module.exports: $Exports<'slate-trailing-block/tests/just-the-trailing-block/change'>; -} diff --git a/flow-typed/npm/slate_vx.x.x.js b/flow-typed/npm/slate_vx.x.x.js deleted file mode 100644 index 67513df0b..000000000 --- a/flow-typed/npm/slate_vx.x.x.js +++ /dev/null @@ -1,53 +0,0 @@ -// flow-typed signature: 3342867a1417391927859a9c905d5366 -// flow-typed version: <>/slate_v^0.32.5/flow_v0.71.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'slate' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'slate' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'slate/dist/slate' { - declare module.exports: any; -} - -declare module 'slate/dist/slate.min' { - declare module.exports: any; -} - -declare module 'slate/lib/slate.es' { - declare module.exports: any; -} - -declare module 'slate/lib/slate' { - declare module.exports: any; -} - -// Filename aliases -declare module 'slate/dist/slate.js' { - declare module.exports: $Exports<'slate/dist/slate'>; -} -declare module 'slate/dist/slate.min.js' { - declare module.exports: $Exports<'slate/dist/slate.min'>; -} -declare module 'slate/lib/slate.es.js' { - declare module.exports: $Exports<'slate/lib/slate.es'>; -} -declare module 'slate/lib/slate.js' { - declare module.exports: $Exports<'slate/lib/slate'>; -} diff --git a/package.json b/package.json index 8d746b7ba..4d068f2dc 100644 --- a/package.json +++ b/package.json @@ -140,16 +140,18 @@ "react-portal": "^4.0.0", "react-router-dom": "^5.1.2", "react-waypoint": "^9.0.2", - "rich-markdown-editor": "^9.11.1", + "rich-markdown-editor": "^10.0.0", "sequelize": "^5.21.1", "sequelize-cli": "^5.5.0", "sequelize-encrypted": "^0.1.0", + "slate": "0.45.0", + "slate-md-serializer": "5.5.0", "slug": "^1.0.0", "socket.io": "^2.2.0", "socket.io-redis": "^5.2.0", "socketio-auth": "^0.1.1", "string-replace-to-array": "^1.0.3", - "styled-components": "^4.3.2", + "styled-components": "^5.0.0", "styled-components-breakpoint": "^2.1.1", "styled-components-grid": "^2.2.1", "styled-normalize": "^8.0.4", diff --git a/public/images/framer.png b/public/images/framer.png old mode 100755 new mode 100644 index 5a016aa54..0067eac99 Binary files a/public/images/framer.png and b/public/images/framer.png differ diff --git a/public/images/google-docs.png b/public/images/google-docs.png new file mode 100644 index 000000000..54f807f3e Binary files /dev/null and b/public/images/google-docs.png differ diff --git a/public/images/google-sheets.png b/public/images/google-sheets.png new file mode 100644 index 000000000..113194a76 Binary files /dev/null and b/public/images/google-sheets.png differ diff --git a/public/images/google-slides.png b/public/images/google-slides.png new file mode 100644 index 000000000..06269d26e Binary files /dev/null and b/public/images/google-slides.png differ diff --git a/public/images/loom.png b/public/images/loom.png old mode 100755 new mode 100644 index 9faf9ae52..e384951b1 Binary files a/public/images/loom.png and b/public/images/loom.png differ diff --git a/public/images/numeracy.png b/public/images/numeracy.png deleted file mode 100755 index fb45a8db6..000000000 Binary files a/public/images/numeracy.png and /dev/null differ diff --git a/public/images/screenshots/block-menu.png b/public/images/screenshots/block-menu.png new file mode 100644 index 000000000..ebba1c204 Binary files /dev/null and b/public/images/screenshots/block-menu.png differ diff --git a/public/images/screenshots/formatting-toolbar.png b/public/images/screenshots/formatting-toolbar.png new file mode 100644 index 000000000..d17e1c653 Binary files /dev/null and b/public/images/screenshots/formatting-toolbar.png differ diff --git a/public/images/spotify.png b/public/images/spotify.png new file mode 100644 index 000000000..50f516f97 Binary files /dev/null and b/public/images/spotify.png differ diff --git a/public/images/typeform.png b/public/images/typeform.png old mode 100755 new mode 100644 index ffac920c7..1d323716b Binary files a/public/images/typeform.png and b/public/images/typeform.png differ diff --git a/server/.jestconfig.json b/server/.jestconfig.json index 361760a23..a84e92771 100644 --- a/server/.jestconfig.json +++ b/server/.jestconfig.json @@ -2,7 +2,8 @@ "verbose": true, "rootDir": "..", "roots": [ - "/server" + "/server", + "/shared" ], "setupFiles": [ "/__mocks__/console.js", diff --git a/server/migrations/20200519032353-text-backup.js b/server/migrations/20200519032353-text-backup.js new file mode 100644 index 000000000..3f6fffae2 --- /dev/null +++ b/server/migrations/20200519032353-text-backup.js @@ -0,0 +1,19 @@ +'use strict'; + +module.exports = { + up: async (queryInterface, Sequelize) => { + await queryInterface.addColumn('documents', 'backup', { + type: Sequelize.TEXT, + allowNull: true, + }); + await queryInterface.addColumn('revisions', 'backup', { + type: Sequelize.SMALLINT, + allowNull: true, + }); + }, + + down: async (queryInterface, Sequelize) => { + await queryInterface.removeColumn('documents', 'backup'); + await queryInterface.removeColumn('revisions', 'backup'); + } +}; \ No newline at end of file diff --git a/server/models/Document.js b/server/models/Document.js index 819edd835..429395805 100644 --- a/server/models/Document.js +++ b/server/models/Document.js @@ -1,8 +1,7 @@ // @flow import { map, find, compact, uniq } from 'lodash'; -import randomstring from 'randomstring'; import MarkdownSerializer from 'slate-md-serializer'; -import Plain from 'slate-plain-serializer'; +import randomstring from 'randomstring'; import Sequelize, { type Transaction } from 'sequelize'; import removeMarkdown from '@tommoor/remove-markdown'; @@ -15,10 +14,10 @@ import slugify from '../utils/slugify'; import Revision from './Revision'; const Op = Sequelize.Op; -const Markdown = new MarkdownSerializer(); const URL_REGEX = /^[0-9a-zA-Z-_~]*-([a-zA-Z0-9]{10,15})$/; +const serializer = new MarkdownSerializer(); -export const DOCUMENT_VERSION = 1; +export const DOCUMENT_VERSION = 2; const createRevision = (doc, options = {}) => { // we don't create revisions for autosaves @@ -52,7 +51,9 @@ const createUrlId = doc => { }; const beforeCreate = async doc => { - doc.version = DOCUMENT_VERSION; + if (doc.version === undefined) { + doc.version = DOCUMENT_VERSION; + } return beforeSave(doc); }; @@ -99,6 +100,11 @@ const Document = sequelize.define( version: DataTypes.SMALLINT, editorVersion: DataTypes.STRING, text: DataTypes.TEXT, + + // backup contains a record of text at the moment it was converted to v2 + // this is a safety measure during deployment of new editor and will be + // dropped in a future update + backup: DataTypes.TEXT, isWelcome: { type: DataTypes.BOOLEAN, defaultValue: false }, revisionCount: { type: DataTypes.INTEGER, defaultValue: 0 }, archivedAt: DataTypes.DATE, @@ -453,11 +459,26 @@ Document.prototype.toMarkdown = function() { }; Document.prototype.migrateVersion = function() { - // migrate from document version 0 -> 1 means removing the title from the - // document text attribute. + let migrated = false; + + // migrate from document version 0 -> 1 if (!this.version) { + // removing the title from the document text attribute this.text = this.text.replace(/^#\s(.*)\n/, ''); this.version = 1; + migrated = true; + } + + // migrate from document version 1 -> 2 + if (this.version === 1) { + const nodes = serializer.deserialize(this.text); + this.backup = this.text; + this.text = serializer.serialize(nodes, { version: 2 }); + this.version = 2; + migrated = true; + } + + if (migrated) { return this.save({ silent: true, hooks: false }); } }; @@ -588,10 +609,17 @@ Document.prototype.getTimestamp = function() { }; Document.prototype.getSummary = function() { - const value = Markdown.deserialize(this.text); - const plain = Plain.serialize(value); + const plain = removeMarkdown(unescape(this.text), { + stripHTML: false, + }); const lines = compact(plain.split('\n')); - return lines.length >= 1 ? lines[1] : ''; + const notEmpty = lines.length >= 1; + + if (this.version) { + return notEmpty ? lines[0] : ''; + } + + return notEmpty ? lines[1] : ''; }; Document.prototype.toJSON = function() { diff --git a/server/models/Document.test.js b/server/models/Document.test.js index 1d52b74e1..b87c1ff65 100644 --- a/server/models/Document.test.js +++ b/server/models/Document.test.js @@ -6,6 +6,155 @@ import { buildDocument, buildCollection, buildTeam } from '../test/factories'; beforeEach(flushdb); beforeEach(jest.resetAllMocks); +describe('#getSummary', () => { + test('should strip markdown', async () => { + const document = await buildDocument({ + version: 1, + text: `*paragraph* + +paragraph 2`, + }); + + expect(document.getSummary()).toBe('paragraph'); + }); + + test('should strip title when no version', async () => { + const document = await buildDocument({ + version: null, + text: `# Heading + +*paragraph*`, + }); + + expect(document.getSummary()).toBe('paragraph'); + }); +}); + +describe('#migrateVersion', () => { + test('should maintain empty paragraph under headings', async () => { + const document = await buildDocument({ + version: 1, + text: `# Heading + +paragraph`, + }); + await document.migrateVersion(); + expect(document.text).toBe(`# Heading + +paragraph`); + }); + + test('should add breaks under headings with extra paragraphs', async () => { + const document = await buildDocument({ + version: 1, + text: `# Heading + + +paragraph`, + }); + await document.migrateVersion(); + expect(document.text).toBe(`# Heading + + +\\ +paragraph`); + }); + + test('should add breaks between paragraphs', async () => { + const document = await buildDocument({ + version: 1, + text: `paragraph + +paragraph`, + }); + await document.migrateVersion(); + expect(document.text).toBe(`paragraph + +\\ +paragraph`); + }); + + test('should add breaks for multiple empty paragraphs', async () => { + const document = await buildDocument({ + version: 1, + text: `paragraph + + +paragraph`, + }); + await document.migrateVersion(); + expect(document.text).toBe(`paragraph + +\\ +\\ +paragraph`); + }); + + test('should add breaks with non-latin characters', async () => { + const document = await buildDocument({ + version: 1, + text: `除。 + +通`, + }); + await document.migrateVersion(); + expect(document.text).toBe(`除。 + +\\ +通`); + }); + + test('should update task list formatting', async () => { + const document = await buildDocument({ + version: 1, + text: `[ ] list item +`, + }); + await document.migrateVersion(); + expect(document.text).toBe(`- [ ] list item +`); + }); + + test('should update task list with multiple items', async () => { + const document = await buildDocument({ + version: 1, + text: `[ ] list item +[ ] list item 2 +`, + }); + await document.migrateVersion(); + expect(document.text).toBe(`- [ ] list item +- [ ] list item 2 +`); + }); + + test('should update checked task list formatting', async () => { + const document = await buildDocument({ + version: 1, + text: `[x] list item +`, + }); + await document.migrateVersion(); + expect(document.text).toBe(`- [x] list item +`); + }); + + test('should update nested task list formatting', async () => { + const document = await buildDocument({ + version: 1, + text: `[x] list item + [ ] list item + [x] list item +`, + }); + await document.migrateVersion(); + expect(document.text).toBe(`- [x] list item + - [ ] list item + - [x] list item +`); + }); +}); + describe('#searchForTeam', () => { test('should return search results from public collections', async () => { const team = await buildTeam(); diff --git a/server/models/Revision.js b/server/models/Revision.js index f583db56a..75c458611 100644 --- a/server/models/Revision.js +++ b/server/models/Revision.js @@ -1,5 +1,8 @@ // @flow import { DataTypes, sequelize } from '../sequelize'; +import MarkdownSerializer from 'slate-md-serializer'; + +const serializer = new MarkdownSerializer(); const Revision = sequelize.define('revision', { id: { @@ -11,6 +14,11 @@ const Revision = sequelize.define('revision', { editorVersion: DataTypes.STRING, title: DataTypes.STRING, text: DataTypes.TEXT, + + // backup contains a record of text at the moment it was converted to v2 + // this is a safety measure during deployment of new editor and will be + // dropped in a future update + backup: DataTypes.TEXT, }); Revision.associate = models => { @@ -33,11 +41,26 @@ Revision.associate = models => { }; Revision.prototype.migrateVersion = function() { - // migrate from revision version 0 -> 1 means removing the title from the - // revision text attribute. + let migrated = false; + + // migrate from document version 0 -> 1 if (!this.version) { + // removing the title from the document text attribute this.text = this.text.replace(/^#\s(.*)\n/, ''); this.version = 1; + migrated = true; + } + + // migrate from document version 1 -> 2 + if (this.version === 1) { + const nodes = serializer.deserialize(this.text); + this.backup = this.text; + this.text = serializer.serialize(nodes, { version: 2 }); + this.version = 2; + migrated = true; + } + + if (migrated) { return this.save({ silent: true, hooks: false }); } }; diff --git a/server/models/Team.js b/server/models/Team.js index 5733fabe2..bdbed5376 100644 --- a/server/models/Team.js +++ b/server/models/Team.js @@ -153,6 +153,7 @@ Team.prototype.provisionFirstCollection = async function(userId) { 'utf8' ); const document = await Document.create({ + version: 1, isWelcome: true, parentDocumentId: null, collectionId: collection.id, diff --git a/server/onboarding/📝 Our Editor.md b/server/onboarding/📝 Our Editor.md index 542f73896..7fe98ff61 100644 --- a/server/onboarding/📝 Our Editor.md +++ b/server/onboarding/📝 Our Editor.md @@ -1,18 +1,20 @@ The heart of Outline is the document editor. We let you write in whichever way you prefer – be it Markdown, WYSIWYG, or taking advantage of the many keyboard shortcuts. -![The formatting toolbar](https://s3.amazonaws.com/dev.beautifulatlas.com/uploads/e2b85962-ca66-4e4c-90d3-b32d30f0610c/754830c0-2aca-467c-82de-2fd6e990b696/Group.png) - ## Markdown -If you’re comfortable writing markdown then all of the usual shortcuts are supported, for example type \*\*bold\*\* and hit `space` to instantly create bold text. If you forget some syntax or are after a refresher, simply type `?` to access the keyboard shortcut help. +If you’re comfortable writing markdown then all of the shortcuts you are used to are supported, for example type \*\*bold\*\* to instantly create bold text. If you forget some syntax or are after a quick refresher hit the keyboard icon in the bottom right hand corner for our guide. Learning some of the key Markdown shortcuts will make using Outline faster and more enjoyable! -*Tip:* You can even paste markdown from elsewhere directly into a document. +![The formatting toolbar](/images/screenshots/formatting-toolbar.png) -## Blocks +*Tip:* You can also paste markdown or html from elsewhere directly into a document. -The editor supports a variety of content blocks including images, tables, lists, quotes, and more. You can also drag and drop images to include them in your document or paste a link to embed content from one of the many supported [integrations](https://www.getoutline.com/integrations) +## Rich documents -*Tip:* Headings are collapsible, just click the arrow to the left of any heading to temporarily hide the content below. +The editor supports a variety of content blocks including images, tables, lists, quotes, videos, and more. Type "/" on an empty line or click on the "+" icon to trigger the block insert menu, you can keep typing to filter it down. + +You can also drag and drop images to include them in your document or paste a link to embed content from one of the many supported [integrations](https://www.getoutline.com/integrations) + +![The block menu](/images/screenshots/block-menu.png) ## References diff --git a/shared/styles/prism.css b/shared/styles/prism.css deleted file mode 100644 index 6a7ff2455..000000000 --- a/shared/styles/prism.css +++ /dev/null @@ -1,141 +0,0 @@ -/* - -Based on Prism template by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/prism/) -Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) - -*/ -code[class*="language-"], -pre[class*="language-"] { - -webkit-font-smoothing: initial; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - font-size: 13px; - line-height: 1.375; - direction: ltr; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; - color: #24292e; -} - -/* Code blocks */ -pre[class*="language-"] { - padding: 1em; - margin: .5em 0; - overflow: auto; -} - -/* Inline code */ -:not(pre) > code[class*="language-"] { - padding: .1em; - border-radius: .3em; -} - -.token.comment, -.token.prolog, -.token.doctype, -.token.cdata { - color: #6a737d; -} - -.token.punctuation { - color: #5e6687; -} - -.token.namespace { - opacity: .7; -} - -.token.operator, -.token.boolean, -.token.number { - color: #d73a49; -} - -.token.property { - color: #c08b30; -} - -.token.tag { - color: #3d8fd1; -} - -.token.string { - color: #032f62; -} - -.token.selector { - color: #6679cc; -} - -.token.attr-name { - color: #c76b29; -} - -.token.entity, -.token.url, -.language-css .token.string, -.style .token.string { - color: #22a2c9; -} - -.token.attr-value, -.token.keyword, -.token.control, -.token.directive, -.token.unit { - color: #d73a49; -} - -.token.function { - color: #6f42c1; -} - -.token.statement, -.token.regex, -.token.atrule { - color: #22a2c9; -} - -.token.placeholder, -.token.variable { - color: #3d8fd1; -} - -.token.deleted { - text-decoration: line-through; -} - -.token.inserted { - border-bottom: 1px dotted #202746; - text-decoration: none; -} - -.token.italic { - font-style: italic; -} - -.token.important, -.token.bold { - font-weight: bold; -} - -.token.important { - color: #c94922; -} - -.token.entity { - cursor: help; -} - -pre > code.highlight { - outline: 0.4em solid #c94922; - outline-offset: .4em; -} diff --git a/shared/styles/theme.js b/shared/styles/theme.js index 9d743bbf6..6e1b8c08d 100644 --- a/shared/styles/theme.js +++ b/shared/styles/theme.js @@ -46,6 +46,8 @@ export const base = { ...spacing, fontFamily: "-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen, Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif", + fontFamilyMono: + "'SFMono-Regular',Consolas,'Liberation Mono', Menlo, Courier,monospace", fontWeight: 400, backgroundTransition: 'background 100ms ease-in-out', zIndex: 100, @@ -53,6 +55,31 @@ export const base = { selected: colors.primary, buttonBackground: colors.primary, buttonText: colors.white, + textHighlight: '#B3E7FF', + + codeComment: '#6a737d', + codePunctuation: '#5e6687', + codeNumber: '#d73a49', + codeProperty: '#c08b30', + codeTag: '#3d8fd1', + codeString: '#032f62', + codeSelector: '#6679cc', + codeAttr: '#c76b29', + codeEntity: '#22a2c9', + codeKeyword: '#d73a49', + codeFunction: '#6f42c1', + codeStatement: '#22a2c9', + codePlaceholder: '#3d8fd1', + codeInserted: '#202746', + codeImportant: '#c94922', + + blockToolbarBackground: colors.white, + blockToolbarTrigger: colors.slate, + blockToolbarTriggerIcon: colors.white, + blockToolbarItem: colors.almostBlack, + blockToolbarText: colors.almostBlack, + blockToolbarHoverBackground: colors.slateLight, + blockToolbarDivider: colors.slateLight, breakpoints: { mobile: 0, // targeting all devices @@ -102,11 +129,6 @@ export const light = { tooltipBackground: colors.almostBlack, tooltipText: colors.white, - blockToolbarBackground: colors.smoke, - blockToolbarTrigger: colors.slate, - blockToolbarTriggerIcon: colors.white, - blockToolbarItem: colors.almostBlack, - quote: colors.slateLight, codeBackground: colors.smoke, codeBorder: colors.smokeDark, @@ -121,7 +143,7 @@ export const dark = { link: colors.almostWhite, text: colors.almostWhite, - textSecondary: lighten(0.2, colors.slate), + textSecondary: lighten(0.1, colors.slate), textTertiary: colors.slate, placeholder: darken(0.5, '#B1BECC'), @@ -154,14 +176,10 @@ export const dark = { tooltipBackground: colors.white, tooltipText: colors.lightBlack, - blockToolbarBackground: colors.white, - blockToolbarTrigger: colors.almostWhite, - blockToolbarTriggerIcon: colors.almostBlack, - blockToolbarItem: colors.lightBlack, - quote: colors.almostWhite, - codeBackground: colors.almostBlack, + codeBackground: colors.black, codeBorder: colors.black50, + codeString: '#3d8fd1', embedBorder: colors.black50, horizontalRule: darken(0.2, colors.slate), }; diff --git a/shared/utils/getHeadingsForText.js b/shared/utils/getHeadingsForText.js deleted file mode 100644 index 38b693e6d..000000000 --- a/shared/utils/getHeadingsForText.js +++ /dev/null @@ -1,28 +0,0 @@ -// @flow -import { filter } from 'lodash'; -import slugify from 'shared/utils/slugify'; -import unescape from 'shared/utils/unescape'; - -export default function getHeadingsForText( - text: string -): { level: number, title: string, slug: string }[] { - const regex = /^(#{1,6})\s(.*)$/gm; - - let match; - let output = []; - while ((match = regex.exec(text)) !== null) { - if (!match) continue; - - const level = match[1].length; - const title = unescape(match[2]); - - let slug = slugify(title); - const existing = filter(output, { slug }); - if (existing.length) { - slug = `${slug}-${existing.length}`; - } - output.push({ level, title, slug }); - } - - return output; -} diff --git a/shared/utils/getHeadingsForText.test.js b/shared/utils/getHeadingsForText.test.js deleted file mode 100644 index 9be599fbf..000000000 --- a/shared/utils/getHeadingsForText.test.js +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable flowtype/require-valid-file-annotation */ -import getHeadingsForText from './getHeadingsForText'; - -it('should return an array of document headings', () => { - const response = getHeadingsForText(` -# Header - -## Subheading -`); - - expect(response.length).toBe(2); - expect(response[0].level).toBe(1); - expect(response[0].title).toBe('Header'); - expect(response[1].level).toBe(2); - expect(response[1].title).toBe('Subheading'); -}); - -it('should unescape special characters', () => { - const response = getHeadingsForText(`# Header <\\>`); - - expect(response.length).toBe(1); - expect(response[0].title).toBe('Header <>'); -}); diff --git a/shared/utils/parseDocumentIds.js b/shared/utils/parseDocumentIds.js index 68c08decd..21b533c68 100644 --- a/shared/utils/parseDocumentIds.js +++ b/shared/utils/parseDocumentIds.js @@ -1,29 +1,39 @@ // @flow -import MarkdownSerializer from 'slate-md-serializer'; -const Markdown = new MarkdownSerializer(); +import { parser } from 'rich-markdown-editor'; export default function parseDocumentIds(text: string): string[] { - const value = Markdown.deserialize(text); + const value = parser.parse(text); let links = []; function findLinks(node) { - if (node.type === 'link') { - const href = node.data.get('href'); + // get text nodes + if (node.type.name === 'text') { + // get marks for text nodes + node.marks.forEach(mark => { + // any of the marks links? + if (mark.type.name === 'link') { + const { href } = mark.attrs; + // any of the links to other docs? + if (href.startsWith('/doc')) { + const tokens = href.replace(/\/$/, '').split('/'); + const lastToken = tokens[tokens.length - 1]; - if (href.startsWith('/doc')) { - const tokens = href.replace(/\/$/, '').split('/'); - const lastToken = tokens[tokens.length - 1]; - links.push(lastToken); - } + // don't return the same link more than once + if (!links.includes(lastToken)) { + links.push(lastToken); + } + } + } + }); } - if (!node.nodes) { + if (!node.content.size) { return; } - node.nodes.forEach(findLinks); + node.content.descendants(findLinks); } - findLinks(value.document); + findLinks(value); return links; } diff --git a/shared/utils/parseDocumentIds.test.js b/shared/utils/parseDocumentIds.test.js index 37c970ec5..7571e88c4 100644 --- a/shared/utils/parseDocumentIds.test.js +++ b/shared/utils/parseDocumentIds.test.js @@ -1,20 +1,38 @@ /* eslint-disable flowtype/require-valid-file-annotation */ import parseDocumentIds from './parseDocumentIds'; -it('should return an array of document ids', () => { +it('should not return non links', () => { expect(parseDocumentIds(`# Header`).length).toBe(0); - expect( - parseDocumentIds(`# Header +}); + +it('should return an array of document ids', () => { + const result = parseDocumentIds(`# Header - [title](/doc/test-456733) - `)[0] - ).toBe('test-456733'); + [internal](/doc/test-456733) + `); + + expect(result.length).toBe(1); + expect(result[0]).toBe('test-456733'); +}); + +it('should not return duplicate document ids', () => { + expect(parseDocumentIds(`# Header`).length).toBe(0); + + const result = parseDocumentIds(`# Header + + [internal](/doc/test-456733) + + [another link to the same doc](/doc/test-456733) + `); + + expect(result.length).toBe(1); + expect(result[0]).toBe('test-456733'); }); it('should not return non document links', () => { - expect(parseDocumentIds(`[title](http://www.google.com)`).length).toBe(0); + expect(parseDocumentIds(`[google](http://www.google.com)`).length).toBe(0); }); it('should not return non document relative links', () => { - expect(parseDocumentIds(`[title](/developers)`).length).toBe(0); + expect(parseDocumentIds(`[relative](/developers)`).length).toBe(0); }); diff --git a/yarn.lock b/yarn.lock index b92950b15..bcc7ba691 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,6 +9,16 @@ dependencies: "@babel/highlight" "^7.8.3" +"@babel/generator@^7.8.6": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.7.tgz#870b3cf7984f5297998152af625c4f3e341400f7" + integrity sha512-DQwjiKJqH4C3qGiyQCAExJHoZssn49JTMJgZ8SANGgVFdkupcUhLOdkAeoC6kmHZCPfoDG5M0b6cFlSN5wW7Ew== + dependencies: + "@babel/types" "^7.8.7" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + "@babel/generator@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.5.tgz#27f0917741acc41e6eaaced6d68f96c3fa9afaf9" @@ -26,6 +36,15 @@ dependencies: "@babel/types" "^7.8.3" +"@babel/helper-function-name@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" + integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== + dependencies: + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" + "@babel/helper-function-name@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz#2b53820d35275120e1874a82e5aabe1376920a5c" @@ -70,11 +89,16 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": +"@babel/parser@^7.0.0", "@babel/parser@^7.9.0": version "7.9.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== +"@babel/parser@^7.8.6": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.7.tgz#7b8facf95d25fef9534aad51c4ffecde1a61e26a" + integrity sha512-9JWls8WilDXFGxs0phaXAZgpxTZhSk/yOYH2hTHC0X1yC7Z78IJfvR1vJ+rmJKq3I35td2XzXzN6ZLYlna+r/A== + "@babel/polyfill@^7.0.0": version "7.8.7" resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.8.7.tgz#151ec24c7135481336168c3bd8b8bf0cf91c032f" @@ -122,7 +146,22 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.5": +"@babel/traverse@^7.4.5": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff" + integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.6" + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/types" "^7.8.6" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" integrity sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg== @@ -131,15 +170,19 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@domoinc/slate-edit-table@^0.22.2": - version "0.22.2" - resolved "https://registry.yarnpkg.com/@domoinc/slate-edit-table/-/slate-edit-table-0.22.2.tgz#67450c1915eeae37d2a4055755c9a12f70f3306c" - integrity sha512-qGjOq/+R8jaQFCpJ2WM/71r+5LIenXMImgMc0st6Isg8W4OGFomj5uMNDaKuznBgPfbtV8/zzvLwjuGba5faSA== +"@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.7.tgz#1fc9729e1acbb2337d5b6977a63979b4819f5d1d" + integrity sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" -"@emotion/is-prop-valid@^0.8.1": - version "0.8.8" - resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" - integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== +"@emotion/is-prop-valid@^0.8.3": + version "0.8.7" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.7.tgz#803449993f436f9a6c67752251ea3fc492a1044c" + integrity sha512-OPkKzUeiid0vEKjZqnGcy2mzxjIlCffin+L2C02pdz/bVlt5zZZE2VzO0D3XOPnH0NEeF21QNKSXiZphjr4xiQ== dependencies: "@emotion/memoize" "0.7.4" @@ -148,7 +191,12 @@ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== -"@emotion/unitless@^0.7.0": +"@emotion/stylis@^0.8.4": + version "0.8.5" + resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" + integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== + +"@emotion/unitless@^0.7.4": version "0.7.5" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== @@ -359,36 +407,11 @@ resolved "https://registry.yarnpkg.com/@tommoor/remove-markdown/-/remove-markdown-0.3.1.tgz#25e7b845d52fcfadf149a3a6a468a931fee7619b" integrity sha512-aM5TtBfBgcUm+B4WWelm2NBAFBk12oNUr67f5lJapSOTkPnwkuzCNwMlsBoDTsRknoZSsUIkcOJB473AnfyqHA== -"@tommoor/slate-edit-list@0.19.0-0": - version "0.19.0-0" - resolved "https://registry.yarnpkg.com/@tommoor/slate-edit-list/-/slate-edit-list-0.19.0-0.tgz#972a714e9ea4cdf47a530d5702a904f5547be2dd" - integrity sha512-jknTytLU2bicfxfSeYD7fN8BlBbn+hcyK7u1+IXafo4ObuND71dtZuwPm3oU3YAAiTWZe0VBQVzrCDoBZkxMaA== - "@types/node@*", "@types/node@>= 8": version "13.13.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.0.tgz#30d2d09f623fe32cde9cb582c7a6eda2788ce4a8" integrity sha512-WE4IOAC6r/yBZss1oQGM5zs2D7RuKR6Q+w+X2SouPofnWn+LbCqClRyhO3ZE7Ix8nmFgo/oVuuE01cJT2XB13A== -"@wikifactory/slate-edit-blockquote@^0.7.1": - version "0.7.1" - resolved "https://registry.yarnpkg.com/@wikifactory/slate-edit-blockquote/-/slate-edit-blockquote-0.7.1.tgz#dffb4a3a69dfe6dc35198465be92daa999533357" - integrity sha512-rbQtcj2iSeNVjQ7vNsYkDlQIZpcM08FGllab1mzy9xScwPsj60cd1wzD++6qDweG/aVfhu2NJJXlxfUAmzwdzQ== - -"@wikifactory/slate-edit-code@^0.16.0": - version "0.16.0" - resolved "https://registry.yarnpkg.com/@wikifactory/slate-edit-code/-/slate-edit-code-0.16.0.tgz#226cb4f064a97800fd6bc50b94d86bb913ad8799" - integrity sha512-9n38URxwTDutJ2rBLEXKiukXfafKLI5iAkIxsDlC2fjDS2cA6+QihrtYmnsW5JVSYadSfOlPhgHUGIhvD+Eufw== - dependencies: - detect-indent "^4.0.0" - detect-newline "^2.1.0" - ends-with "^0.2.0" - is-hotkey "^0.1.1" - -"@wikifactory/slate-trailing-block@^0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@wikifactory/slate-trailing-block/-/slate-trailing-block-0.6.0.tgz#7cfba15707f55ea41583e03e809c8f3cc9b8b77f" - integrity sha512-Uq+tRVdOTUIA7n7DIIHl7jj2CM0i64/BGGlEvQQ2CPeZEvdeC9zOqH4XD2getVlG+Zhbn2mxQ4B1S1MkEzjtNQ== - abab@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" @@ -1109,7 +1132,7 @@ babel-plugin-syntax-trailing-function-commas@^6.22.0: resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= -babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-to-generator@^6.24.1: +babel-plugin-transform-async-to-generator@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" integrity sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E= @@ -1391,13 +1414,6 @@ babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^ dependencies: regenerator-transform "^0.10.0" -babel-plugin-transform-runtime@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee" - integrity sha1-iEkNRGUC6puOfvsP4J7E2ZR5se4= - dependencies: - babel-runtime "^6.22.0" - babel-plugin-transform-strict-mode@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" @@ -1671,7 +1687,7 @@ boolbase@~1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= -boundless-arrow-key-navigation@^1.0.4, boundless-arrow-key-navigation@^1.1.0: +boundless-arrow-key-navigation@^1.0.4: version "1.1.0" resolved "https://registry.yarnpkg.com/boundless-arrow-key-navigation/-/boundless-arrow-key-navigation-1.1.0.tgz#9b7908a32e2e8f8c1c6af3af68586fdcfe5c40ff" integrity sha1-m3kIoy4uj4wcavOvaFhv3P5cQP8= @@ -2113,6 +2129,21 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +character-entities-legacy@^1.0.0: + version "1.1.4" + resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1" + integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA== + +character-entities@^1.0.0: + version "1.2.4" + resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b" + integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw== + +character-reference-invalid@^1.0.0: + version "1.1.4" + resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560" + integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== + chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -2357,6 +2388,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +comma-separated-tokens@^1.0.0: + version "1.0.8" + resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" + integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== + commander@2.17.x: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" @@ -2409,6 +2445,11 @@ compressible@^2.0.0: dependencies: mime-db ">= 1.43.0 < 2" +compute-scroll-into-view@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.13.tgz#be1b1663b0e3f56cd5f7713082549f562a3477e2" + integrity sha512-o+w9w7A98aAFi/GjK8cxSV+CdASuPa2rR5UWs3+yHkJzWqaKoBEufFNWYaXInCSmUfDCVhesG+v9MTWqOjsxFg== + computed-style@~0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/computed-style/-/computed-style-0.1.4.tgz#7f344fd8584b2e425bedca4a1afc0e300bb05d74" @@ -2673,14 +2714,14 @@ css-select@^1.1.0: domutils "1.5.1" nth-check "~1.0.1" -css-to-react-native@^2.2.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.3.2.tgz#e75e2f8f7aa385b4c3611c52b074b70a002f2e7d" - integrity sha512-VOFaeZA053BqvvvqIA8c9n0+9vFppVBAHCp6JgFTtTMU3Mzi+XnelJ9XC9ul3BqFzZyQ5N+H0SnwsWT2Ebchxw== +css-to-react-native@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756" + integrity sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ== dependencies: camelize "^1.0.0" css-color-keywords "^1.0.0" - postcss-value-parser "^3.3.0" + postcss-value-parser "^4.0.2" css-what@2.1: version "2.1.3" @@ -2729,11 +2770,6 @@ dasherize@2.0.0: resolved "https://registry.yarnpkg.com/dasherize/-/dasherize-2.0.0.tgz#6d809c9cd0cf7bb8952d80fc84fa13d47ddb1308" integrity sha1-bYCcnNDPe7iVLYD8hPoT1H3bEwg= -data-uri-regex@^0.1.2: - version "0.1.4" - resolved "https://registry.yarnpkg.com/data-uri-regex/-/data-uri-regex-0.1.4.tgz#1e1db6c8397eca8a48ecdb55ad1b927ec0bbac2e" - integrity sha1-Hh22yDl+yopI7NtVrRuSfsC7rC4= - data-urls@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" @@ -3166,11 +3202,6 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -ends-with@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/ends-with/-/ends-with-0.2.0.tgz#2f9da98d57a50cfda4571ce4339000500f4e6b8a" - integrity sha1-L52pjVelDP2kVxzkM5AAUA9Oa4o= - engine.io-client@~3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.4.1.tgz#922ddb47eecdcb541136a93aeead24718fd05461" @@ -3231,6 +3262,11 @@ entities@^2.0.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== +entities@~2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.2.tgz#ac74db0bba8d33808bbf36809c3a5c3683531436" + integrity sha512-dmD3AvJQBUjKpcNkoqr+x+IF0SdRtPz9Vk0uTy4yWqga9ibB6s4v++QFWNohjiUGoMlF552ZvNyXDxz5iW0qmw== + errno@^0.1.3, errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" @@ -3313,11 +3349,6 @@ es6-map@^0.1.3: es6-symbol "~3.1.1" event-emitter "~0.3.5" -es6-promise@^4.0.5: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - es6-promise@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.0.2.tgz#010d5858423a5f118979665f46486a95c6ee2bb6" @@ -3415,7 +3446,7 @@ eslint-module-utils@^2.4.1: debug "^2.6.9" pkg-dir "^2.0.0" -eslint-plugin-flowtype@^2.40.1, eslint-plugin-flowtype@^2.46.1: +eslint-plugin-flowtype@^2.40.1: version "2.50.3" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.3.tgz#61379d6dce1d010370acd6681740fd913d68175f" integrity sha512-X+AoKVOr7Re0ko/yEXyM5SSZ0tazc6ffdIOocp2fFUlWoDt7DV0Bz99mngOkAFLOAWjqRA5jPwqUCbrx13XoxQ== @@ -3455,7 +3486,7 @@ eslint-plugin-jsx-a11y@^6.1.2: has "^1.0.3" jsx-ast-utils "^2.2.1" -eslint-plugin-prettier@^2.4.0, eslint-plugin-prettier@^2.6.0: +eslint-plugin-prettier@^2.4.0: version "2.7.0" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.7.0.tgz#b4312dcf2c1d965379d7f9d5b5f8aaadc6a45904" integrity sha512-CStQYJgALoQBw3FsBzH0VOVDRnJ/ZimUlpLm226U8qgqYJfPOY/CPK6wyRInMxh73HSKg5wyRwdS4BVYYHwokA== @@ -4126,11 +4157,6 @@ get-caller-file@^2.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-document@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-document/-/get-document-1.0.0.tgz#4821bce66f1c24cb0331602be6cb6b12c4f01c4b" - integrity sha1-SCG85m8cJMsDMWAr5strEsTwHEs= - get-port@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" @@ -4153,13 +4179,6 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= -get-window@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/get-window/-/get-window-1.1.2.tgz#65fbaa999fb87f86ea5d30770f4097707044f47f" - integrity sha512-yjWpFcy9fjhLQHW1dPtg9ga4pmizLY8y4ZSHdGrAQ1NU277MRhnGnnLPxe19X8W5lWVsCZz++5xEuNozWMVmTw== - dependencies: - get-document "1" - getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -4212,11 +4231,6 @@ globals@^9.18.0: resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== -golery-slate-prism@0.6.0-golery.2: - version "0.6.0-golery.2" - resolved "https://registry.yarnpkg.com/golery-slate-prism/-/golery-slate-prism-0.6.0-golery.2.tgz#d56ae8f2dc8056c752da18cb06298dbf84a3d1b4" - integrity sha512-vYJ2gU4lq2vXjICh1NWmS8xJWbFtVmHq56ubitNz10ZGIJmOklT4/qEDAAnGsVgpCZ1RcNCSjsGSrrC3jv3zNw== - good-listener@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50" @@ -4467,6 +4481,21 @@ hashtag-regex@^2.0.0: resolved "https://registry.yarnpkg.com/hashtag-regex/-/hashtag-regex-2.1.0.tgz#9c82142e96a9ffa8421151763cb9fef30c75ba8b" integrity sha512-D89pGyCZOMtaXdEJ1he9/GmhZAUXlHPn+oN2oFmrNZFX9MlblUdqw7DmJ2IlWc1My+GP0BeCDlMwWW2zSVLVoA== +hast-util-parse-selector@^2.0.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.4.tgz#60c99d0b519e12ab4ed32e58f150ec3f61ed1974" + integrity sha512-gW3sxfynIvZApL4L07wryYF4+C9VvH3AUi7LAnVXV4MneGEgwOByXvFo18BgmTWnm7oHAe874jKbIB1YhHSIzA== + +hastscript@^5.0.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-5.1.2.tgz#bde2c2e56d04c62dd24e8c5df288d050a355fb8a" + integrity sha512-WlztFuK+Lrvi3EggsqOkQ52rKbxkXL3RwB6t5lwoa8QLMemoWfBuL43eDrwOamJyR7uKQKdmKYaBH1NZBiIRrQ== + dependencies: + comma-separated-tokens "^1.0.0" + hast-util-parse-selector "^2.0.0" + property-information "^5.0.0" + space-separated-tokens "^1.0.0" + he@1.2.x: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -4732,16 +4761,6 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -image-extensions@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/image-extensions/-/image-extensions-1.1.0.tgz#b8e6bf6039df0056e333502a00b6637a3105d894" - integrity sha1-uOa/YDnfAFbjM1AqALZjejEF2JQ= - -image-to-data-uri@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/image-to-data-uri/-/image-to-data-uri-1.1.0.tgz#23f9d7f17b6562ca6a8145e9779c9a166b829f6e" - integrity sha1-I/nX8XtlYspqgUXpd5yaFmuCn24= - immediate@~3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" @@ -4921,6 +4940,19 @@ is-accessor-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" +is-alphabetical@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d" + integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== + +is-alphanumerical@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf" + integrity sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A== + dependencies: + is-alphabetical "^1.0.0" + is-decimal "^1.0.0" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -4969,18 +5001,16 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-data-uri@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-data-uri/-/is-data-uri-0.1.0.tgz#46ee67b63c18c1ffa0bd4dfab2cd2c81c728237f" - integrity sha1-Ru5ntjwYwf+gvU36ss0sgccoI38= - dependencies: - data-uri-regex "^0.1.2" - is-date-object@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== +is-decimal@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5" + integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw== + is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" @@ -5057,27 +5087,10 @@ is-glob@^4.0.0: dependencies: is-extglob "^2.1.1" -is-hotkey@0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-hotkey/-/is-hotkey-0.1.4.tgz#c34d2c85d6ec8d09a871dcf71931c8067a824c7d" - integrity sha512-Py+aW4r5mBBY18TGzGz286/gKS+fCQ0Hee3qkaiSmEPiD0PqFpe0wuA3l7rTOUKyeXl8Mxf3XzJxIoTlSv+kxA== - -is-hotkey@^0.1.1: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-hotkey/-/is-hotkey-0.1.6.tgz#c214b1ccdcbda46fba4ba93d2de64915db737471" - integrity sha512-1+hMr0GLPM0M49UDRt9RgE8i+SM29UY4AGRP6sGz6fThOVXqSrEvTMakolhHMcVizJnPNAoMpEmE+Oi1k2NrZQ== - -is-image@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-image/-/is-image-1.0.1.tgz#6fd51a752a1a111506d060d952118b0b989b426e" - integrity sha1-b9UadSoaERUG0GDZUhGLC5ibQm4= - dependencies: - image-extensions "^1.0.1" - -is-in-browser@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-in-browser/-/is-in-browser-1.1.3.tgz#56ff4db683a078c6082eb95dad7dc62e1d04f835" - integrity sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU= +is-hexadecimal@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" + integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== is-installed-globally@^0.1.0: version "0.1.0" @@ -5196,26 +5209,11 @@ is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= -is-url@^1.2.2: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" - integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== - is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= -is-what@^3.3.1: - version "3.8.0" - resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.8.0.tgz#610bc46a524355f2424eb85eedc6ebbbf7e1ff8c" - integrity sha512-UKeBoQfV8bjlM4pmx1FLDHdxslW/1mTksEs8ReVsilPmUv5cORd4+2/wFcviI3cUjrLybxCjzc8DnodAzJ/Wrg== - -is-window@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-window/-/is-window-1.0.2.tgz#2c896ca53db97de45d3c33133a65d8c9f563480d" - integrity sha1-LIlspT25feRdPDMTOmXYyfVjSA0= - is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -5263,11 +5261,6 @@ isobject@^4.0.0: resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0" integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== -isomorphic-base64@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/isomorphic-base64/-/isomorphic-base64-1.0.2.tgz#f426aae82569ba8a4ec5ca73ad21a44ab1ee7803" - integrity sha1-9Caq6CVpuopOxcpzrSGkSrHueAM= - isomorphic-fetch@2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" @@ -6187,6 +6180,13 @@ line-height@^0.3.1: dependencies: computed-style "~0.1.3" +linkify-it@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.2.0.tgz#e3b54697e78bf915c70a38acd78fd09e0058b1cf" + integrity sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw== + dependencies: + uc.micro "^1.0.1" + listenercount@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/listenercount/-/listenercount-1.0.1.tgz#84c8a72ab59c4725321480c975e6508342e70937" @@ -6323,7 +6323,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -"lodash@>=3.5 <5", lodash@^4.0.1, lodash@^4.1.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.6.1: +"lodash@>=3.5 <5", lodash@^4.0.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.6.1: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -6420,6 +6420,22 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" +markdown-it-mark@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/markdown-it-mark/-/markdown-it-mark-3.0.0.tgz#27c3e39ef3cc310b2dde5375082c9fa912983cda" + integrity sha512-HqMWeKfMMOu4zBO0emmxsoMWmbf2cPKZY1wP6FsTbKmicFfp5y4L3KXAsNeO1rM6NTJVOrNlLKMPjWzriBGspw== + +markdown-it@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-10.0.0.tgz#abfc64f141b1722d663402044e43927f1f50a8dc" + integrity sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg== + dependencies: + argparse "^1.0.7" + entities "~2.0.0" + linkify-it "^2.0.0" + mdurl "^1.0.1" + uc.micro "^1.0.5" + material-colors@^1.2.1: version "1.2.6" resolved "https://registry.yarnpkg.com/material-colors/-/material-colors-1.2.6.tgz#6d1958871126992ceecc72f4bcc4d8f010865f46" @@ -6443,6 +6459,11 @@ md5@^2.2.1: crypt "~0.0.1" is-buffer "~1.1.1" +mdurl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -6464,16 +6485,6 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" -memoize-one@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-4.1.0.tgz#a2387c58c03fff27ca390c31b764a79addf3f906" - integrity sha512-2GApq0yI/b22J2j9rhbrAlsHb0Qcz+7yWxeLG8h+95sl1XPUgeLimQSOdur4Vw7cUhrBHwaUZxWFZueojqNRzA== - -memoize-one@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" - integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== - memoizee@^0.4.14: version "0.4.14" resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.14.tgz#07a00f204699f9a95c2d9e77218271c7cd610d57" @@ -6496,13 +6507,6 @@ memory-fs@^0.4.0, memory-fs@~0.4.1: errno "^0.1.3" readable-stream "^2.0.1" -merge-anything@^2.2.4: - version "2.4.4" - resolved "https://registry.yarnpkg.com/merge-anything/-/merge-anything-2.4.4.tgz#6226b2ac3d3d3fc5fb9e8d23aa400df25f98fdf0" - integrity sha512-l5XlriUDJKQT12bH+rVhAHjwIuXWdAIecGwsYjv2LJo+dA1AeRTmeQS+3QBpO6lEthBMDi2IUMpLC1yyRvGlwQ== - dependencies: - is-what "^3.3.1" - merge-stream@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" @@ -7096,6 +7100,11 @@ optionator@^0.8.1, optionator@^0.8.2: type-check "~0.3.2" word-wrap "~1.2.3" +orderedmap@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/orderedmap/-/orderedmap-1.1.1.tgz#c618e77611b3b21d0fe3edc92586265e0059c789" + integrity sha512-3Ux8um0zXbVacKUkcytc0u3HgC0b0bBLT+I60r2J/En72cI0nZffqrA7Xtf2Hqs27j1g82llR5Mhbd0Z1XW4AQ== + os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" @@ -7145,7 +7154,7 @@ osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -outline-icons@^1.10.0, outline-icons@^1.16.0: +outline-icons@^1.15.0, outline-icons@^1.16.0: version "1.16.0" resolved "https://registry.yarnpkg.com/outline-icons/-/outline-icons-1.16.0.tgz#0a71d2fe32170f0e00b8775681f0339f4fc8777a" integrity sha512-6bAk5rBGVtYiFP6AONx7NdmpFP+daKUJEev7PAjdfTVmE3bPXeSzzaGY51Y1XM8UdP5XqJICWncktRHeSfn1Pw== @@ -7310,6 +7319,18 @@ parse-asn1@^5.0.0: pbkdf2 "^3.0.3" safe-buffer "^5.1.1" +parse-entities@^1.1.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.2.2.tgz#c31bf0f653b6661354f8973559cb86dd1d5edf50" + integrity sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg== + dependencies: + character-entities "^1.0.0" + character-entities-legacy "^1.0.0" + character-reference-invalid "^1.0.0" + is-alphanumerical "^1.0.0" + is-decimal "^1.0.0" + is-hexadecimal "^1.0.0" + parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -7538,10 +7559,10 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -postcss-value-parser@^3.3.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" - integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== +postcss-value-parser@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d" + integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg== postgres-array@~1.0.0: version "1.0.3" @@ -7606,13 +7627,20 @@ pretty-format@^22.4.0, pretty-format@^22.4.3: ansi-regex "^3.0.0" ansi-styles "^3.2.0" -prismjs@^1.16.0: +prismjs@^1.19.0: version "1.20.0" resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.20.0.tgz#9b685fc480a3514ee7198eac6a3bf5024319ff03" integrity sha512-AEDjSrVNkynnw6A+B1DsFkd6AVdTnp+/WoUixFRULlCLZVRZlVQMVWio/16jv7G1FscUxQxOQhWwApgbnxr6kQ== optionalDependencies: clipboard "^2.0.0" +prismjs@~1.17.0: + version "1.17.1" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.17.1.tgz#e669fcbd4cdd873c35102881c33b14d0d68519be" + integrity sha512-PrEDJAFdUGbOP6xK/UsfkC5ghJsPJviKgnQOoxaDbBjwc8op68Quupwt1DeAFoG8GImPhiKXAvvsH7wDSLsu1Q== + optionalDependencies: + clipboard "^2.0.0" + private@^0.1.6, private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -7661,6 +7689,129 @@ prop-types@^15.0.0, prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, object-assign "^4.1.1" react-is "^16.8.1" +property-information@^5.0.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.5.0.tgz#4dc075d493061a82e2b7d096f406e076ed859943" + integrity sha512-RgEbCx2HLa1chNgvChcx+rrCWD0ctBmGSE0M7lVm1yyv4UbvbrWoXp/BkVLZefzjrRBGW8/Js6uh/BnlHXFyjA== + dependencies: + xtend "^4.0.0" + +prosemirror-commands@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/prosemirror-commands/-/prosemirror-commands-1.1.4.tgz#991563e67623acab4f8c510fad1570f8b4693780" + integrity sha512-kj4Qi+8h3EpJtZuuEDwZ9h2/QNGWDsIX/CzjmClxi9GhxWyBUMVUvIFk0mgdqHyX20lLeGmOpc0TLA5aPzgpWg== + dependencies: + prosemirror-model "^1.0.0" + prosemirror-state "^1.0.0" + prosemirror-transform "^1.0.0" + +prosemirror-dropcursor@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/prosemirror-dropcursor/-/prosemirror-dropcursor-1.3.2.tgz#28738c4ed7102e814d7a8a26d70018523fc7cd6d" + integrity sha512-4c94OUGyobGnwcQI70OXyMhE/9T4aTgjU+CHxkd5c7D+jH/J0mKM/lk+jneFVKt7+E4/M0D9HzRPifu8U28Thw== + dependencies: + prosemirror-state "^1.0.0" + prosemirror-transform "^1.1.0" + prosemirror-view "^1.1.0" + +prosemirror-gapcursor@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/prosemirror-gapcursor/-/prosemirror-gapcursor-1.1.5.tgz#0c37fd6cbb1d7c46358c2e7397f8da9a8b5c6246" + integrity sha512-SjbUZq5pgsBDuV3hu8GqgIpZR5eZvGLM+gPQTqjVVYSMUCfKW3EGXTEYaLHEl1bGduwqNC95O3bZflgtAb4L6w== + dependencies: + prosemirror-keymap "^1.0.0" + prosemirror-model "^1.0.0" + prosemirror-state "^1.0.0" + prosemirror-view "^1.0.0" + +prosemirror-history@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/prosemirror-history/-/prosemirror-history-1.1.3.tgz#4f76a1e71db4ef7cdf0e13dec6d8da2aeaecd489" + integrity sha512-zGDotijea+vnfnyyUGyiy1wfOQhf0B/b6zYcCouBV8yo6JmrE9X23M5q7Nf/nATywEZbgRLG70R4DmfSTC+gfg== + dependencies: + prosemirror-state "^1.2.2" + prosemirror-transform "^1.0.0" + rope-sequence "^1.3.0" + +prosemirror-inputrules@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prosemirror-inputrules/-/prosemirror-inputrules-1.1.2.tgz#487e46c763e1212a4577397aba7706139084f012" + integrity sha512-Ja5Z3BWestlHYGvtSGqyvxMeB8QEuBjlHM8YnKtLGUXMDp965qdDV4goV8lJb17kIWHk7e7JNj6Catuoa3302g== + dependencies: + prosemirror-state "^1.0.0" + prosemirror-transform "^1.0.0" + +prosemirror-keymap@^1.0.0, prosemirror-keymap@^1.1.2, prosemirror-keymap@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/prosemirror-keymap/-/prosemirror-keymap-1.1.4.tgz#8b481bf8389a5ac40d38dbd67ec3da2c7eac6a6d" + integrity sha512-Al8cVUOnDFL4gcI5IDlG6xbZ0aOD/i3B17VT+1JbHWDguCgt/lBHVTHUBcKvvbSg6+q/W4Nj1Fu6bwZSca3xjg== + dependencies: + prosemirror-state "^1.0.0" + w3c-keyname "^2.2.0" + +prosemirror-markdown@^1.4.4: + version "1.4.5" + resolved "https://registry.yarnpkg.com/prosemirror-markdown/-/prosemirror-markdown-1.4.5.tgz#85fafc2401ef7e8057561a41a1c022d6249edf70" + integrity sha512-ExW/M5ryQulHH8KpydBN0Smpe5Pe7sxZju36fStBRsGoqlOm9pAja56shu2saN0UvL6TwOdfKzz6InepE+thfQ== + dependencies: + markdown-it "^10.0.0" + prosemirror-model "^1.0.0" + +prosemirror-model@^1.0.0, prosemirror-model@^1.1.0, prosemirror-model@^1.8.1, prosemirror-model@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.9.1.tgz#8c08cf556f593c5f015548d2c1a6825661df087f" + integrity sha512-Qblh8pm1c7Ll64sYLauwwzjimo/tFg1zW3Q3IWhKRhvfOEgRKqa6dC5pRrAa+XHOIjBFEYrqbi52J5bqA2dV8Q== + dependencies: + orderedmap "^1.1.0" + +prosemirror-schema-list@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prosemirror-schema-list/-/prosemirror-schema-list-1.1.2.tgz#310809209094b03425da7f5c337105074913da6c" + integrity sha512-dgM9PwtM4twa5WsgSYMB+J8bwjnR43DAD3L9MsR9rKm/nZR5Y85xcjB7gusVMSsbQ2NomMZF03RE6No6mTnclQ== + dependencies: + prosemirror-model "^1.0.0" + prosemirror-transform "^1.0.0" + +prosemirror-state@^1.0.0, prosemirror-state@^1.2.2, prosemirror-state@^1.3.1, prosemirror-state@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/prosemirror-state/-/prosemirror-state-1.3.3.tgz#b2862866b14dec2b3ae1ab18229f2bd337651a2c" + integrity sha512-PLXh2VJsIgvlgSTH6I2Yg6vk1CzPDp21DFreVpQtDMY2S6WaMmrQgDTLRcsrD8X38v8Yc873H7+ogdGzyIPn+w== + dependencies: + prosemirror-model "^1.0.0" + prosemirror-transform "^1.0.0" + +prosemirror-tables@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/prosemirror-tables/-/prosemirror-tables-1.1.0.tgz#e7fc65e57a44759b0b999d8c71294f79e5a4d54b" + integrity sha512-E00+KSbDw65966GdiLBpqTNxIextw0RavlGmvdv/dyYbN9OTD0gzaoCU1S8MAbz4GLKmY9Y/g4nSiC1IL1ThQg== + dependencies: + prosemirror-keymap "^1.1.2" + prosemirror-model "^1.8.1" + prosemirror-state "^1.3.1" + prosemirror-transform "^1.2.1" + prosemirror-view "^1.13.3" + +prosemirror-transform@^1.0.0, prosemirror-transform@^1.1.0, prosemirror-transform@^1.2.1: + version "1.2.5" + resolved "https://registry.yarnpkg.com/prosemirror-transform/-/prosemirror-transform-1.2.5.tgz#7a3e2c61fcdbaf1d0844a2a3bc34fc3524e9809c" + integrity sha512-eqeIaxWtUfOnpA1ERrXCuSIMzqIJtL9Qrs5uJMCjY5RMSaH5o4pc390SAjn/IDPeIlw6auh0hCCXs3wRvGnQug== + dependencies: + prosemirror-model "^1.0.0" + +prosemirror-utils@^0.9.6: + version "0.9.6" + resolved "https://registry.yarnpkg.com/prosemirror-utils/-/prosemirror-utils-0.9.6.tgz#3d97bd85897e3b535555867dc95a51399116a973" + integrity sha512-UC+j9hQQ1POYfMc5p7UFxBTptRiGPR7Kkmbl3jVvU8VgQbkI89tR/GK+3QYC8n+VvBZrtAoCrJItNhWSxX3slA== + +prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3, prosemirror-view@^1.14.9: + version "1.14.9" + resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.14.9.tgz#9efb96f362caaa0c25f0676f226202f48b500fb4" + integrity sha512-b2aMFJR9mHyKc0Zvk3lNS7Fw12LqQXIiEJj1oAMjr/cEJpPIbGNpb2z7+c0fyGA/41F+fnEyKSZiTwpgno37iw== + dependencies: + prosemirror-model "^1.1.0" + prosemirror-state "^1.0.0" + prosemirror-transform "^1.1.0" + proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" @@ -7898,19 +8049,12 @@ react-helmet@^5.2.0: react-fast-compare "^2.0.2" react-side-effect "^1.1.0" -react-immutable-proptypes@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/react-immutable-proptypes/-/react-immutable-proptypes-2.2.0.tgz#cce96d68cc3c18e89617cbf3092d08e35126af4a" - integrity sha512-Vf4gBsePlwdGvSZoLSBfd4HAP93HDauMY4fDjXhreg/vg6F3Fj/MXDNyTbltPC/xZKmZc+cjLu3598DdYK6sgQ== - dependencies: - invariant "^2.2.2" - react-is@^16.6.0, react-is@^16.6.3, react-is@^16.7.0, react-is@^16.8.1: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-keydown@^1.7.3, react-keydown@^1.9.10: +react-keydown@^1.7.3: version "1.9.12" resolved "https://registry.yarnpkg.com/react-keydown/-/react-keydown-1.9.12.tgz#9e10157775c9e3f21e124987e14af45a2ed52384" integrity sha512-KnQdVCTlPeJJ5FcnaqT4LJFHFUWbr/P+KnUtKA3xOc2JuJy738LyNM8jdnkWNkexHWEXt/021ufR5l9e3fzUCQ== @@ -7937,7 +8081,7 @@ react-modal@^3.1.2: react-lifecycles-compat "^3.0.0" warning "^4.0.3" -react-portal@^4.0.0, react-portal@^4.1.4: +react-portal@^4.0.0, react-portal@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/react-portal/-/react-portal-4.2.1.tgz#12c1599238c06fb08a9800f3070bea2a3f78b1a6" integrity sha512-fE9kOBagwmTXZ3YGRYb4gcMy+kSA+yLO0xnPankjRlfBv4uCpFXqKPfkpsGQQR15wkZ9EssnvTOl1yMzbkxhPQ== @@ -8163,6 +8307,15 @@ referrer-policy@1.2.0: resolved "https://registry.yarnpkg.com/referrer-policy/-/referrer-policy-1.2.0.tgz#b99cfb8b57090dc454895ef897a4cc35ef67a98e" integrity sha512-LgQJIuS6nAy1Jd88DCQRemyE3mS+ispwlqMk3b0yjZ257fI1v9c+/p6SD5gP5FGyXUIgrNOAfmyioHwZtYv2VA== +refractor@^2.10.1: + version "2.10.1" + resolved "https://registry.yarnpkg.com/refractor/-/refractor-2.10.1.tgz#166c32f114ed16fd96190ad21d5193d3afc7d34e" + integrity sha512-Xh9o7hQiQlDbxo5/XkOX6H+x/q8rmlmZKr97Ie1Q8ZM32IRRd3B/UxuA/yXDW79DBSXGWxm2yRTbcTVmAciJRw== + dependencies: + hastscript "^5.0.0" + parse-entities "^1.1.2" + prismjs "~1.17.0" + regenerate@^1.2.1: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" @@ -8428,40 +8581,36 @@ retry-as-promised@^3.2.0: dependencies: any-promise "^1.3.0" -rich-markdown-editor@^9.11.1: - version "9.11.2" - resolved "https://registry.yarnpkg.com/rich-markdown-editor/-/rich-markdown-editor-9.11.2.tgz#12437f5594b492b2c64d6994554311ba0a45e77f" - integrity sha512-Pj/rBqHqB6tyqgzcdQ/KWFkEn5Yh6cOrjNoIGmmwXDVpsbYV/J9gcBiUfeA2oCAgjf8M1peSFgDPfwzl6SXP5g== +rich-markdown-editor@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/rich-markdown-editor/-/rich-markdown-editor-10.0.0.tgz#246330b3fcf4f8d8fc9d0bad65b5e7995155be58" + integrity sha512-xgq/KBeVt2xwizsKSx6Xr1max3mBuYaAWD/hUxBVhqZ0ei0fkZ+5jl+DLK5eE8LIej0s7IX7AoCTx4k1x5KJTw== dependencies: - "@domoinc/slate-edit-table" "^0.22.2" - "@tommoor/slate-edit-list" "0.19.0-0" - "@wikifactory/slate-edit-blockquote" "^0.7.1" - "@wikifactory/slate-edit-code" "^0.16.0" - "@wikifactory/slate-trailing-block" "^0.6.0" - babel-plugin-transform-async-to-generator "^6.24.1" - babel-plugin-transform-runtime "^6.23.0" - boundless-arrow-key-navigation "^1.1.0" copy-to-clipboard "^3.0.8" - eslint-plugin-flowtype "^2.46.1" - eslint-plugin-prettier "^2.6.0" - golery-slate-prism "0.6.0-golery.2" lodash "^4.17.11" - outline-icons "^1.10.0" - prismjs "^1.16.0" - react-autosize-textarea "^6.0.0" - react-keydown "^1.9.10" + markdown-it-mark "^3.0.0" + outline-icons "^1.15.0" + prismjs "^1.19.0" + prosemirror-commands "^1.1.4" + prosemirror-dropcursor "^1.3.2" + prosemirror-gapcursor "^1.1.5" + prosemirror-history "^1.1.3" + prosemirror-inputrules "^1.1.2" + prosemirror-keymap "^1.1.3" + prosemirror-markdown "^1.4.4" + prosemirror-model "^1.9.1" + prosemirror-schema-list "^1.1.2" + prosemirror-state "^1.3.3" + prosemirror-tables "^1.0.0" + prosemirror-utils "^0.9.6" + prosemirror-view "^1.14.9" react-medium-image-zoom "^3.0.16" - react-portal "^4.1.4" - slate "^0.45.0" - slate-collapse-on-escape "^0.8.1" - slate-drop-or-paste-images "^0.9.1" - slate-instant-replace "^0.1.14" - slate-md-serializer "5.4.4" - slate-paste-linkify "^0.7.0" - slate-react "^0.21.20" - slate-schema-violations "^0.1.39" - slugify "^1.3.4" - styled-components "^4.3.2" + react-portal "^4.2.1" + refractor "^2.10.1" + slugify "^1.4.0" + smooth-scroll-into-view-if-needed "^1.1.27" + styled-components "^5.0.0" + typescript "^3.7.5" right-align@^0.1.1: version "0.1.3" @@ -8513,6 +8662,11 @@ rollup@^0.41.4: dependencies: source-map-support "^0.4.0" +rope-sequence@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/rope-sequence/-/rope-sequence-1.3.2.tgz#a19e02d72991ca71feb6b5f8a91154e48e3c098b" + integrity sha512-ku6MFrwEVSVmXLvy3dYph3LAMNS0890K7fabn+0YIRQ2T96T9F4gkFf0vf0WW0JUraNWwGRtInEpH7yO4tbQZg== + rsvp@^3.3.3: version "3.6.2" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" @@ -8615,16 +8769,18 @@ schema-utils@^0.4.5: ajv "^6.1.0" ajv-keywords "^3.1.0" +scroll-into-view-if-needed@^2.2.24: + version "2.2.24" + resolved "https://registry.yarnpkg.com/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.24.tgz#12bca532990769bd509115a49edcfa755e92a0ea" + integrity sha512-vsC6SzyIZUyJG8o4nbUDCiIwsPdH6W/FVmjT2avR2hp/yzS53JjGmg/bKD20TkoNajbu5dAQN4xR7yes4qhwtQ== + dependencies: + compute-scroll-into-view "^1.0.13" + select@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= -selection-is-backward@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/selection-is-backward/-/selection-is-backward-1.0.0.tgz#97a54633188a511aba6419fc5c1fa91b467e6be1" - integrity sha1-l6VGMxiKURq6ZBn8XB+pG0Z+a+E= - semver-diff@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" @@ -8735,7 +8891,7 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" -shallowequal@^1.0.1: +shallowequal@^1.0.1, shallowequal@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== @@ -8794,117 +8950,17 @@ slash@^1.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= -slate-base64-serializer@^0.2.102: - version "0.2.112" - resolved "https://registry.yarnpkg.com/slate-base64-serializer/-/slate-base64-serializer-0.2.112.tgz#791d04a0ae7b9796844f068a904e185f2afc91f9" - integrity sha512-Vo94bkCq8cbFj7Lutdh2RaM9S4WlLxnnMqZPKGUyefklUN4q2EzM/WUH7s9CIlLUH1qRfC/b0V25VJZr5XXTzA== - dependencies: - isomorphic-base64 "^1.0.2" - -slate-collapse-on-escape@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/slate-collapse-on-escape/-/slate-collapse-on-escape-0.8.1.tgz#a264c6c407cdf4bbe5013aae6c6571d613b58713" - integrity sha512-DRFHZs5luXkBabHY6mkhI4XWTS5OkglFUP5WbapdSLY1yJiVTrpXhBkL32Zamy3eRP4DRzCaNTg3z9eiAO2eUA== - dependencies: - to-pascal-case "^1.0.0" - -slate-dev-environment@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/slate-dev-environment/-/slate-dev-environment-0.2.2.tgz#bd8946e1fe4cf5447060c84a362a1d026ed8b77f" - integrity sha512-JZ09llrRQu6JUsLJCUlGC0lB1r1qIAabAkSd454iyYBq6lDuY//Bypi3Jo8yzIfzZ4+mRLdQvl9e8MbeM9l48Q== - dependencies: - is-in-browser "^1.1.3" - -slate-dev-logger@^0.1.0: - version "0.1.43" - resolved "https://registry.yarnpkg.com/slate-dev-logger/-/slate-dev-logger-0.1.43.tgz#77f6ca7207fcbf453a5516f3aa8b19794d1d26dc" - integrity sha512-GkcPMGzmPVm85AL+jaKnzhIA0UH9ktQDEIDM+FuQtz+TAPcpPCQiRAaZ6I2p2uD0Hq9bImhKSCtHIa0qRxiVGw== - -slate-drop-or-paste-images@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/slate-drop-or-paste-images/-/slate-drop-or-paste-images-0.9.1.tgz#bc3b171ff63e85af91972d79f0751616a00e6ad4" - integrity sha512-HjfLjFWeemHQwq35HRU2k14cPT2LLqC/JrYATI5BHarLxEhdPE7gMBHjr10iE/3HZjMt+7DlWGu+QIhg96Ba/w== - dependencies: - es6-promise "^4.0.5" - image-to-data-uri "^1.0.0" - is-data-uri "^0.1.0" - is-image "^1.0.1" - is-url "^1.2.2" - slate-dev-logger "^0.1.0" - -slate-hotkeys@^0.2.9: - version "0.2.9" - resolved "https://registry.yarnpkg.com/slate-hotkeys/-/slate-hotkeys-0.2.9.tgz#0cc9eb750a49ab9ef11601305b7c82b5402348e3" - integrity sha512-y+C/s5vJEmBxo8fIqHmUcdViGwALL/A6Qow3sNG1OHYD5SI11tC2gfYtGbPh+2q0H7O4lufffCmFsP5bMaDHqA== - dependencies: - is-hotkey "0.1.4" - slate-dev-environment "^0.2.2" - -slate-instant-replace@^0.1.14: - version "0.1.15" - resolved "https://registry.yarnpkg.com/slate-instant-replace/-/slate-instant-replace-0.1.15.tgz#91c40c355e369780c4680c1abbe9b417b7787fe2" - integrity sha512-HK+AI4P4CPXTbMMRAd92+O5z61Ah5XcrOH5qU8NZXDGpw/GMrJFBD7+go5aowSdsqfZhnszUouAuCBmHzTrETg== - -slate-md-serializer@5.4.4: - version "5.4.4" - resolved "https://registry.yarnpkg.com/slate-md-serializer/-/slate-md-serializer-5.4.4.tgz#b0b55f7ab1dc9ed2159c6f97852594a81a5b76e9" - integrity sha512-9jPScUSaDVDZLGf6NaKlxgdZYXeqr3PvK2/ueUAdXJ/lkW98UGFUOZBh1GSjnX6xBJpdGnwXjKZ6SeW3s7tF/Q== +slate-md-serializer@5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/slate-md-serializer/-/slate-md-serializer-5.5.0.tgz#404fb37a49b636ab08622c06b2b24dabc1edb29e" + integrity sha512-uNTLrmT3xVmycJXMOIIFOvWHquph+k+6MhjraQzedyq6zoxkg/y/S6/MGJf82QVC9dZAddL9jBrDeXQ4CStvFw== dependencies: hashtag-regex "^2.0.0" -slate-paste-linkify@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/slate-paste-linkify/-/slate-paste-linkify-0.7.0.tgz#42adf3a3b40c88086c201666a5b203140da5a6ae" - integrity sha512-j7muQr9f7q1Frw7JMz/TKecpZzBm/E1cdx+skHt6uTu5kSqr2ta6ueyn7LfoCEMGNxj/mJDZHjB58YUlbnOLnQ== - dependencies: - is-url "^1.2.2" - -slate-plain-serializer@^0.7.1: - version "0.7.11" - resolved "https://registry.yarnpkg.com/slate-plain-serializer/-/slate-plain-serializer-0.7.11.tgz#74ff6eb949e9fbd92ad98ed833d74d5082f2688b" - integrity sha512-vzXQ68GiHHcTUcAB6ggf2qN/sX9BoLs77SMHacp5Gkg+oHAA/NxRzRH4efDAhpiJqfJZDrA3rQySK6+Y7KAuwg== - -slate-prop-types@^0.5.32: - version "0.5.42" - resolved "https://registry.yarnpkg.com/slate-prop-types/-/slate-prop-types-0.5.42.tgz#4ec444cc67ee1d338536ed3213dcbf9a7a0eaa25" - integrity sha512-3n3556FDs9/cyhRdDMryVB1PJvWeu+p3dx9TvHtONybud4tfulWk4r175JoVWcFZCUFGFQK7IbObUbz1MWNKCg== - -slate-react-placeholder@^0.1.20: - version "0.1.20" - resolved "https://registry.yarnpkg.com/slate-react-placeholder/-/slate-react-placeholder-0.1.20.tgz#1a504727257cd50d9a4da4eb1fe47bdf024eefbf" - integrity sha512-A4xq1kS3V3YetFbLE/1dv+/SDVjx9zsZZepJqjcmkGK+evHU2yNkWjZXCg8MLMRtZJpGtYT/BE3+kHbkgT5Q4A== - -slate-react@^0.21.20: - version "0.21.24" - resolved "https://registry.yarnpkg.com/slate-react/-/slate-react-0.21.24.tgz#58754895ea987695bab380718559f3d6a043e0b1" - integrity sha512-fY1xUPCpsbTPGtiU0hc85JEzR5cf66Bqh5DLlDIfld/DljCKJoIVYR+EkFW5NuvvZPHhRjz4Ywz6IA/Krcjtug== - dependencies: - debug "^3.1.0" - get-window "^1.1.1" - is-window "^1.0.2" - lodash "^4.1.1" - memoize-one "^4.0.0" - prop-types "^15.5.8" - react-immutable-proptypes "^2.1.0" - selection-is-backward "^1.0.0" - slate-base64-serializer "^0.2.102" - slate-dev-environment "^0.2.2" - slate-hotkeys "^0.2.9" - slate-plain-serializer "^0.7.1" - slate-prop-types "^0.5.32" - slate-react-placeholder "^0.1.20" - tiny-invariant "^1.0.1" - tiny-warning "^0.0.3" - -slate-schema-violations@^0.1.39: - version "0.1.39" - resolved "https://registry.yarnpkg.com/slate-schema-violations/-/slate-schema-violations-0.1.39.tgz#854ab5624136419cef4c803b1823acabe11f1c15" - integrity sha512-SNRoV9Ii5UqjNqAKcIw7aAOMwgI45zsn86ue2n8NVLNOCe3fUI35cjq6l3fdvmRYw4X/GcZqzhpQsizHD3ts6A== - -slate@^0.45.0: - version "0.45.1" - resolved "https://registry.yarnpkg.com/slate/-/slate-0.45.1.tgz#6c6bfc9d0d54844e6d2541bcd6a840ec47bb78a1" - integrity sha512-kEavVrC9lhIu6SX6Xy7GUpHsjfCcr+RQXKJ2X5v1NEdHsqIf0CCHChAarkEp65QK9qx7oRDti/KWOdnYMsXc7Q== +slate@0.45.0: + version "0.45.0" + resolved "https://registry.yarnpkg.com/slate/-/slate-0.45.0.tgz#2fec8151c2d311ff475cb1ff655c76827b2bf0e0" + integrity sha512-1bkfI0Ir5uPTCfHxYTPT/bwA9pkWPmeBk3P6xCB0bukjSnjBf5PryuCee5tDUeachOR8bdicc0DPWN7RPORvhg== dependencies: debug "^3.1.0" direction "^0.1.5" @@ -8931,11 +8987,18 @@ slug@^1.0.0: dependencies: unicode ">= 0.3.1" -slugify@^1.3.4: +slugify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/slugify/-/slugify-1.4.0.tgz#c9557c653c54b0c7f7a8e786ef3431add676d2cb" integrity sha512-FtLNsMGBSRB/0JOE2A0fxlqjI6fJsgHGS13iTuVT28kViI4JjUiNqp/vyis0ZXYcMnpR3fzGNkv+6vRlI2GwdQ== +smooth-scroll-into-view-if-needed@^1.1.27: + version "1.1.27" + resolved "https://registry.yarnpkg.com/smooth-scroll-into-view-if-needed/-/smooth-scroll-into-view-if-needed-1.1.27.tgz#88405e84448a9d3dd4e2c94f970e61d4d7187374" + integrity sha512-1BUbpRHzwro4MNhNpYCPA+d7G77G8k89UXPSx2A+UeJoAt3WiqrUHwT2oskXnir3p0wc4VTiRj41PQN9TEEIUw== + dependencies: + scroll-into-view-if-needed "^2.2.24" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -9124,6 +9187,11 @@ sourcemapped-stacktrace@^1.1.6: dependencies: source-map "0.5.6" +space-separated-tokens@^1.0.0: + version "1.1.5" + resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz#85f32c3d10d9682007e917414ddc5c26d1aa6899" + integrity sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA== + spdx-correct@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" @@ -9430,23 +9498,20 @@ styled-components-grid@^2.2.1: react-create-component-from-tag-prop "^1.4.0" styled-components-breakpoint "^2.0.2" -styled-components@^4.3.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-4.4.1.tgz#e0631e889f01db67df4de576fedaca463f05c2f2" - integrity sha512-RNqj14kYzw++6Sr38n7197xG33ipEOktGElty4I70IKzQF1jzaD1U4xQ+Ny/i03UUhHlC5NWEO+d8olRCDji6g== +styled-components@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.0.1.tgz#57782a6471031abefb2db5820a1876ae853bc619" + integrity sha512-E0xKTRIjTs4DyvC1MHu/EcCXIj6+ENCP8hP01koyoADF++WdBUOrSGwU1scJRw7/YaYOhDvvoad6VlMG+0j53A== dependencies: "@babel/helper-module-imports" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@emotion/is-prop-valid" "^0.8.1" - "@emotion/unitless" "^0.7.0" + "@babel/traverse" "^7.4.5" + "@emotion/is-prop-valid" "^0.8.3" + "@emotion/stylis" "^0.8.4" + "@emotion/unitless" "^0.7.4" babel-plugin-styled-components ">= 1" - css-to-react-native "^2.2.2" - memoize-one "^5.0.0" - merge-anything "^2.2.4" - prop-types "^15.5.4" - react-is "^16.6.0" - stylis "^3.5.0" - stylis-rule-sheet "^0.0.10" + css-to-react-native "^3.0.0" + hoist-non-react-statics "^3.0.0" + shallowequal "^1.1.0" supports-color "^5.5.0" styled-normalize@^8.0.4: @@ -9454,16 +9519,6 @@ styled-normalize@^8.0.4: resolved "https://registry.yarnpkg.com/styled-normalize/-/styled-normalize-8.0.7.tgz#e883bff6a0c59a65a39365a4eb9c6cf48372c61f" integrity sha512-qQV4O7B9g7ZUnStCwGde7Dc/mcFF/pz0Ha/LL7+j/r6uopf6kJCmmR7jCPQMCBrDkYiQ4xvw1hUoceVJkdaMuQ== -stylis-rule-sheet@^0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" - integrity sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw== - -stylis@^3.5.0: - version "3.5.4" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" - integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q== - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -9664,11 +9719,6 @@ to-fast-properties@^2.0.0: resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= -to-no-case@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/to-no-case/-/to-no-case-1.0.2.tgz#c722907164ef6b178132c8e69930212d1b4aa16a" - integrity sha1-xyKQcWTvaxeBMsjmmTAhLRtKoWo= - to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" @@ -9676,13 +9726,6 @@ to-object-path@^0.3.0: dependencies: kind-of "^3.0.2" -to-pascal-case@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/to-pascal-case/-/to-pascal-case-1.0.0.tgz#0bbdc8df448886ba01535e543327048d0aa1ce78" - integrity sha1-C73I30SIhroBU15UMycEjQqhzng= - dependencies: - to-space-case "^1.0.0" - to-regex-range@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" @@ -9701,13 +9744,6 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -to-space-case@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/to-space-case/-/to-space-case-1.0.0.tgz#b052daafb1b2b29dc770cea0163e5ec0ebc9fc17" - integrity sha1-sFLar7Gysp3HcM6gFj5ewOvJ/Bc= - dependencies: - to-no-case "^1.0.0" - toggle-selection@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" @@ -9832,6 +9868,16 @@ typescript@^3.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== +typescript@^3.7.5: + version "3.9.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.2.tgz#64e9c8e9be6ea583c54607677dd4680a1cf35db9" + integrity sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw== + +uc.micro@^1.0.1, uc.micro@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== + uglify-es@^3.3.4: version "3.3.9" resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" @@ -10210,6 +10256,11 @@ w3c-hr-time@^1.0.1: dependencies: browser-process-hrtime "^1.0.0" +w3c-keyname@^2.2.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/w3c-keyname/-/w3c-keyname-2.2.4.tgz#4ade6916f6290224cdbd1db8ac49eab03d0eef6b" + integrity sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw== + walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"