From f5852b98d160d42d81423252f9538ff4aaa1525b Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Mon, 18 Feb 2019 12:44:10 +1100 Subject: [PATCH 01/43] Bump plugin version to 5.1.0-rc.1 --- gutenberg.php | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index 990395c0b9c6b..f1364f2860b64 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -3,7 +3,7 @@ * Plugin Name: Gutenberg * Plugin URI: https://github.com/WordPress/gutenberg * Description: Printing since 1440. This is the development plugin for the new block editor in core. - * Version: 5.0.0 + * Version: 5.1.0-rc.1 * Author: Gutenberg Team * * @package gutenberg diff --git a/package-lock.json b/package-lock.json index 581be0214a14f..e7c688511be70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "5.0.0", + "version": "5.1.0-rc.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 758213c258bea..a467efd345915 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "5.0.0", + "version": "5.1.0-rc.1", "private": true, "description": "A new WordPress editor experience", "repository": "git+https://github.com/WordPress/gutenberg.git", From 81e13d63c0887abccdc563c0e6c42f4e10611e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20Van=C2=A0Durpe?= Date: Wed, 20 Feb 2019 03:35:56 +0100 Subject: [PATCH 02/43] RichText: only ignore input types that insert HTML (#13914) * RichText: only ignore input types that insert HTML * Mark RichTextInputEvent as unstable * Use Set --- packages/editor/src/components/index.js | 2 +- .../editor/src/components/rich-text/index.js | 21 ++++++++++++++++--- .../src/components/rich-text/input-event.js | 2 +- packages/format-library/src/bold/index.js | 4 ++-- packages/format-library/src/italic/index.js | 4 ++-- .../format-library/src/underline/index.js | 4 ++-- 6 files changed, 26 insertions(+), 11 deletions(-) diff --git a/packages/editor/src/components/index.js b/packages/editor/src/components/index.js index 40ce2cc74d559..94cadfc7ddc24 100644 --- a/packages/editor/src/components/index.js +++ b/packages/editor/src/components/index.js @@ -23,7 +23,7 @@ export { RichTextShortcut, RichTextToolbarButton, RichTextInserterItem, - RichTextInputEvent, + UnstableRichTextInputEvent, } from './rich-text'; export { default as ServerSideRender } from './server-side-render'; export { default as MediaPlaceholder } from './media-placeholder'; diff --git a/packages/editor/src/components/rich-text/index.js b/packages/editor/src/components/rich-text/index.js index 8029dfa0a640d..1d6c353448d9e 100644 --- a/packages/editor/src/components/rich-text/index.js +++ b/packages/editor/src/components/rich-text/index.js @@ -69,6 +69,21 @@ import { RemoveBrowserShortcuts } from './remove-browser-shortcuts'; const { getSelection } = window; +/** + * All inserting input types that would insert HTML into the DOM. + * + * @see https://www.w3.org/TR/input-events-2/#interface-InputEvent-Attributes + * + * @type {Set} + */ +const INSERTION_INPUT_TYPES_TO_IGNORE = new Set( [ + 'insertParagraph', + 'insertOrderedList', + 'insertUnorderedList', + 'insertHorizontalRule', + 'insertLink', +] ); + export class RichText extends Component { constructor( { value, onReplace, multiline } ) { super( ...arguments ); @@ -354,12 +369,12 @@ export class RichText extends Component { if ( event ) { const { inputType } = event.nativeEvent; - // The browser formatted something or tried to insert a list. + // The browser formatted something or tried to insert HTML. // Overwrite it. It will be handled later by the format library if // needed. if ( inputType.indexOf( 'format' ) === 0 || - ( inputType.indexOf( 'insert' ) === 0 && inputType !== 'insertText' ) + INSERTION_INPUT_TYPES_TO_IGNORE.has( inputType ) ) { this.applyRecord( this.getRecord() ); return; @@ -1150,4 +1165,4 @@ export default RichTextContainer; export { RichTextShortcut } from './shortcut'; export { RichTextToolbarButton } from './toolbar-button'; export { RichTextInserterItem } from './inserter-list-item'; -export { RichTextInputEvent } from './input-event'; +export { UnstableRichTextInputEvent } from './input-event'; diff --git a/packages/editor/src/components/rich-text/input-event.js b/packages/editor/src/components/rich-text/input-event.js index 3f7e19d45b75d..e77a57cb898e7 100644 --- a/packages/editor/src/components/rich-text/input-event.js +++ b/packages/editor/src/components/rich-text/input-event.js @@ -3,7 +3,7 @@ */ import { Component } from '@wordpress/element'; -export class RichTextInputEvent extends Component { +export class UnstableRichTextInputEvent extends Component { constructor() { super( ...arguments ); diff --git a/packages/format-library/src/bold/index.js b/packages/format-library/src/bold/index.js index 910c59a2085e2..15c64261fbfde 100644 --- a/packages/format-library/src/bold/index.js +++ b/packages/format-library/src/bold/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { Fragment } from '@wordpress/element'; import { toggleFormat } from '@wordpress/rich-text'; -import { RichTextToolbarButton, RichTextShortcut, RichTextInputEvent } from '@wordpress/editor'; +import { RichTextToolbarButton, RichTextShortcut, UnstableRichTextInputEvent } from '@wordpress/editor'; const name = 'core/bold'; @@ -32,7 +32,7 @@ export const bold = { shortcutType="primary" shortcutCharacter="b" /> - diff --git a/packages/format-library/src/italic/index.js b/packages/format-library/src/italic/index.js index 30bf72acd5778..1acadaf6f4826 100644 --- a/packages/format-library/src/italic/index.js +++ b/packages/format-library/src/italic/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { Fragment } from '@wordpress/element'; import { toggleFormat } from '@wordpress/rich-text'; -import { RichTextToolbarButton, RichTextShortcut, RichTextInputEvent } from '@wordpress/editor'; +import { RichTextToolbarButton, RichTextShortcut, UnstableRichTextInputEvent } from '@wordpress/editor'; const name = 'core/italic'; @@ -32,7 +32,7 @@ export const italic = { shortcutType="primary" shortcutCharacter="i" /> - diff --git a/packages/format-library/src/underline/index.js b/packages/format-library/src/underline/index.js index bab50a0452eb4..0777e83e1f717 100644 --- a/packages/format-library/src/underline/index.js +++ b/packages/format-library/src/underline/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { Fragment } from '@wordpress/element'; import { toggleFormat } from '@wordpress/rich-text'; -import { RichTextShortcut, RichTextInputEvent } from '@wordpress/editor'; +import { RichTextShortcut, UnstableRichTextInputEvent } from '@wordpress/editor'; const name = 'core/underline'; @@ -34,7 +34,7 @@ export const underline = { character="u" onUse={ onToggle } /> - From bfe46d67e7870342db2b42393be23736ca75af75 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Wed, 20 Feb 2019 13:40:49 +1100 Subject: [PATCH 03/43] Bump plugin version to 5.1.0 --- gutenberg.php | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index f1364f2860b64..2276a2ec5c9d4 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -3,7 +3,7 @@ * Plugin Name: Gutenberg * Plugin URI: https://github.com/WordPress/gutenberg * Description: Printing since 1440. This is the development plugin for the new block editor in core. - * Version: 5.1.0-rc.1 + * Version: 5.1.0 * Author: Gutenberg Team * * @package gutenberg diff --git a/package-lock.json b/package-lock.json index e7c688511be70..ef2926149e59e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "5.1.0-rc.1", + "version": "5.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a467efd345915..774fabf910487 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "5.1.0-rc.1", + "version": "5.1.0", "private": true, "description": "A new WordPress editor experience", "repository": "git+https://github.com/WordPress/gutenberg.git", From 2240dcf897c0e3ff0ddc3c02107418f1dfa90e39 Mon Sep 17 00:00:00 2001 From: Stefanos Togoulidis Date: Wed, 20 Feb 2019 17:43:33 +0200 Subject: [PATCH 04/43] Deprecate RichTextInputEvent on mobile too (#13975) --- packages/editor/src/components/index.native.js | 2 +- packages/editor/src/components/rich-text/index.native.js | 2 +- packages/editor/src/components/rich-text/input-event.native.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/editor/src/components/index.native.js b/packages/editor/src/components/index.native.js index cd974fd2dfea1..d7d35e3873e2a 100644 --- a/packages/editor/src/components/index.native.js +++ b/packages/editor/src/components/index.native.js @@ -5,7 +5,7 @@ export { default as RichText, RichTextShortcut, RichTextToolbarButton, - RichTextInputEvent, + UnstableRichTextInputEvent, } from './rich-text'; export { default as MediaPlaceholder } from './media-placeholder'; export { default as BlockFormatControls } from './block-format-controls'; diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index e7deab608e266..27a392d93763e 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -568,4 +568,4 @@ RichTextContainer.Content.defaultProps = { export default RichTextContainer; export { RichTextShortcut } from './shortcut'; export { RichTextToolbarButton } from './toolbar-button'; -export { RichTextInputEvent } from './input-event'; +export { UnstableRichTextInputEvent } from './input-event'; diff --git a/packages/editor/src/components/rich-text/input-event.native.js b/packages/editor/src/components/rich-text/input-event.native.js index 71f2ce4797e24..b8f0fad0a969c 100644 --- a/packages/editor/src/components/rich-text/input-event.native.js +++ b/packages/editor/src/components/rich-text/input-event.native.js @@ -3,7 +3,7 @@ */ import { Component } from '@wordpress/element'; -export class RichTextInputEvent extends Component { +export class UnstableRichTextInputEvent extends Component { render() { return null; } From ece3cafc325def377dc6e05a6fd70b9ae06c2d5c Mon Sep 17 00:00:00 2001 From: Danilo Ercoli Date: Wed, 20 Feb 2019 18:16:03 +0100 Subject: [PATCH 05/43] The undelying RichText component implementation has changed the parameters returned onChange, and we forgot to update the PostTitle component (#13967) --- packages/editor/src/components/post-title/index.native.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/components/post-title/index.native.js b/packages/editor/src/components/post-title/index.native.js index 8c79b43414a1a..fb24b423ec966 100644 --- a/packages/editor/src/components/post-title/index.native.js +++ b/packages/editor/src/components/post-title/index.native.js @@ -56,8 +56,8 @@ class PostTitle extends Component { } ] } fontSize={ 24 } fontWeight={ 'bold' } - onChange={ ( event ) => { - this.props.onUpdate( event.content ); + onChange={ ( value ) => { + this.props.onUpdate( value ); } } onContentSizeChange={ ( event ) => { this.setState( { aztecHeight: event.aztecHeight } ); From d2e2a18b6d5451af89dfc691241a555075821383 Mon Sep 17 00:00:00 2001 From: Marko Savic Date: Wed, 20 Feb 2019 17:21:26 -0500 Subject: [PATCH 06/43] Fixes wrong state comparison (#13987) Upload media progress bar is missing while media is uploading new --- packages/block-library/src/image/edit.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/image/edit.native.js b/packages/block-library/src/image/edit.native.js index 73b3eba1ab5fa..eabcdc9941a26 100644 --- a/packages/block-library/src/image/edit.native.js +++ b/packages/block-library/src/image/edit.native.js @@ -124,7 +124,7 @@ class ImageEdit extends React.Component { updateMediaProgress( payload ) { const { setAttributes } = this.props; this.setState( { progress: payload.progress, isUploadInProgress: true, isUploadFailed: false } ); - if ( payload.mediaUrl !== undefined ) { + if ( payload.mediaUrl ) { setAttributes( { url: payload.mediaUrl } ); } } From 811fbe02ca71e63246732e21f4c1636081d3c625 Mon Sep 17 00:00:00 2001 From: Pinar Olguc Date: Thu, 21 Feb 2019 17:15:52 +0300 Subject: [PATCH 07/43] Re-add rootTagsToEliminate prop (#14006) --- packages/editor/src/components/post-title/index.native.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/editor/src/components/post-title/index.native.js b/packages/editor/src/components/post-title/index.native.js index fb24b423ec966..ff626aada2764 100644 --- a/packages/editor/src/components/post-title/index.native.js +++ b/packages/editor/src/components/post-title/index.native.js @@ -48,6 +48,7 @@ class PostTitle extends Component { return ( Date: Thu, 21 Feb 2019 19:01:45 +0300 Subject: [PATCH 08/43] [Mobile]Update PostTitle to apply borders when it is focused (#13970) * Trigger onFocusStatusChange from PostTitle * Fix lint issue * Update post title shadow mechanism Also open inner ref so that focus state can be updated when focus is made programmatically * Update props * Update onRef as ref * Update title padding&margin --- .../src/components/post-title/index.native.js | 72 +++++++++++++------ .../components/post-title/style.native.scss | 6 ++ 2 files changed, 55 insertions(+), 23 deletions(-) create mode 100644 packages/editor/src/components/post-title/style.native.scss diff --git a/packages/editor/src/components/post-title/index.native.js b/packages/editor/src/components/post-title/index.native.js index ff626aada2764..c41a1263b6a5a 100644 --- a/packages/editor/src/components/post-title/index.native.js +++ b/packages/editor/src/components/post-title/index.native.js @@ -8,9 +8,15 @@ import { withDispatch } from '@wordpress/data'; import { withFocusOutside } from '@wordpress/components'; import { withInstanceId, compose } from '@wordpress/compose'; +import { View } from 'react-native'; + +import styles from './style.scss'; + const minHeight = 30; class PostTitle extends Component { + titleViewRef: Object; + constructor() { super( ...arguments ); @@ -23,10 +29,23 @@ class PostTitle extends Component { }; } + componentDidMount() { + if ( this.props.ref ) { + this.props.ref( this ); + } + } + handleFocusOutside() { this.onUnselect(); } + focus() { + if ( this.titleViewRef ) { + this.titleViewRef.focus(); + this.setState( { isSelected: true } ); + } + } + onSelect() { this.setState( { isSelected: true } ); this.props.clearSelectedBlock(); @@ -41,34 +60,41 @@ class PostTitle extends Component { placeholder, style, title, + focusedBorderColor, + borderStyle, } = this.props; const decodedPlaceholder = decodeEntities( placeholder ); + const borderColor = this.state.isSelected ? focusedBorderColor : 'transparent'; return ( - { - this.props.onUpdate( value ); - } } - onContentSizeChange={ ( event ) => { - this.setState( { aztecHeight: event.aztecHeight } ); - } } - placeholder={ decodedPlaceholder } - value={ title } - onSplit={ this.props.onEnterPress } - setRef={ this.props.setRef } - > - + + { + this.props.onUpdate( value ); + } } + onContentSizeChange={ ( event ) => { + this.setState( { aztecHeight: event.aztecHeight } ); + } } + placeholder={ decodedPlaceholder } + value={ title } + onSplit={ this.props.onEnterPress } + setRef={ ( ref ) => { + this.titleViewRef = ref; + } } + > + + ); } } diff --git a/packages/editor/src/components/post-title/style.native.scss b/packages/editor/src/components/post-title/style.native.scss new file mode 100644 index 0000000000000..51879fd555c6b --- /dev/null +++ b/packages/editor/src/components/post-title/style.native.scss @@ -0,0 +1,6 @@ + +.titleContainer { + padding-left: 16; + padding-right: 16; + margin-top: 24; +} From 7c32d3aa8b38e20acd4a17814128e62bf900a331 Mon Sep 17 00:00:00 2001 From: etoledom Date: Thu, 21 Feb 2019 18:06:23 +0100 Subject: [PATCH 09/43] Mobile: Rename ref to innerRef on PostTitle (#14024) --- .../src/components/post-title/index.native.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/editor/src/components/post-title/index.native.js b/packages/editor/src/components/post-title/index.native.js index c41a1263b6a5a..0215a0de1a192 100644 --- a/packages/editor/src/components/post-title/index.native.js +++ b/packages/editor/src/components/post-title/index.native.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { View } from 'react-native'; + /** * WordPress dependencies */ @@ -8,8 +13,9 @@ import { withDispatch } from '@wordpress/data'; import { withFocusOutside } from '@wordpress/components'; import { withInstanceId, compose } from '@wordpress/compose'; -import { View } from 'react-native'; - +/** + * Internal dependencies + */ import styles from './style.scss'; const minHeight = 30; @@ -30,8 +36,8 @@ class PostTitle extends Component { } componentDidMount() { - if ( this.props.ref ) { - this.props.ref( this ); + if ( this.props.innerRef ) { + this.props.innerRef( this ); } } From 258a10b51dcee9348e3389398012a29d2c800c06 Mon Sep 17 00:00:00 2001 From: Diego Rey Mendez Date: Fri, 22 Feb 2019 00:58:47 -0300 Subject: [PATCH 10/43] Fixes a red screen in mobile. (#14011) --- packages/editor/src/components/rich-text/index.native.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index 27a392d93763e..f7b6e92c49412 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -289,9 +289,7 @@ export class RichText extends Component { }, } ); this.lastContent = this.valueToFormat( linkedRecord ); - this.props.onChange( { - content: this.lastContent, - } ); + this.props.onChange( this.lastContent ); // Allows us to ask for this information when we get a report. window.console.log( 'Created link:\n\n', trimmedText ); @@ -324,9 +322,7 @@ export class RichText extends Component { const newContent = this.valueToFormat( insertedContent ); this.lastEventCount = undefined; this.lastContent = newContent; - this.props.onChange( { - content: this.lastContent, - } ); + this.props.onChange( this.lastContent ); } else if ( onSplit ) { if ( ! pastedContent.length ) { return; From 36b74476c50a1f043730ddc99971d49e1e7aef63 Mon Sep 17 00:00:00 2001 From: Marko Savic Date: Fri, 22 Feb 2019 03:41:43 -0500 Subject: [PATCH 11/43] Change background color on image placeholder block (#14033) * Changed upload media icon color * Changed media placeholder background color --- packages/components/src/primitives/svg/style.native.scss | 5 +++++ .../editor/src/components/media-placeholder/index.native.js | 2 +- .../src/components/media-placeholder/styles.native.scss | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/components/src/primitives/svg/style.native.scss b/packages/components/src/primitives/svg/style.native.scss index a6017e488b922..a76d5384f4af5 100644 --- a/packages/components/src/primitives/svg/style.native.scss +++ b/packages/components/src/primitives/svg/style.native.scss @@ -12,3 +12,8 @@ color: #87a6bc; fill: currentColor; } + +.dashicons-format-image { + color: #2e4453; + fill: currentColor; +} diff --git a/packages/editor/src/components/media-placeholder/index.native.js b/packages/editor/src/components/media-placeholder/index.native.js index 1bd983c37699a..2249d761108e6 100644 --- a/packages/editor/src/components/media-placeholder/index.native.js +++ b/packages/editor/src/components/media-placeholder/index.native.js @@ -18,7 +18,7 @@ function MediaPlaceholder( props ) { return ( - + { __( 'Image' ) } diff --git a/packages/editor/src/components/media-placeholder/styles.native.scss b/packages/editor/src/components/media-placeholder/styles.native.scss index 964bb4371310d..d3001491eb73a 100644 --- a/packages/editor/src/components/media-placeholder/styles.native.scss +++ b/packages/editor/src/components/media-placeholder/styles.native.scss @@ -4,7 +4,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: #f2f2f2; + background-color: #e9eff3; padding-left: 12; padding-right: 12; padding-top: 12; From 1171ec5852c02df584ce0cd0d6c25e459bc86767 Mon Sep 17 00:00:00 2001 From: Tugdual de Kerviler Date: Fri, 22 Feb 2019 10:21:42 +0100 Subject: [PATCH 12/43] Fix post title native syntax (#14041) * Fix unexpected token in native code * Dummy commit to trigger Travis * Include the rnmobile release branch to Travis builds --- .travis.yml | 1 + packages/editor/src/components/post-title/index.native.js | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8a464d766d973..f1401c9b2fc84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ cache: branches: only: - master + - rnmobile/release-v1.0 before_install: - nvm install diff --git a/packages/editor/src/components/post-title/index.native.js b/packages/editor/src/components/post-title/index.native.js index 0215a0de1a192..8204220b3be6d 100644 --- a/packages/editor/src/components/post-title/index.native.js +++ b/packages/editor/src/components/post-title/index.native.js @@ -21,13 +21,12 @@ import styles from './style.scss'; const minHeight = 30; class PostTitle extends Component { - titleViewRef: Object; - constructor() { super( ...arguments ); this.onSelect = this.onSelect.bind( this ); this.onUnselect = this.onUnselect.bind( this ); + this.titleViewRef = null; this.state = { isSelected: false, From d5de5f5b2ed364bed0ca6677288d7322d32810cc Mon Sep 17 00:00:00 2001 From: etoledom Date: Fri, 22 Feb 2019 10:52:48 +0100 Subject: [PATCH 13/43] Mobile: Links UI using BottomSheet component (#13972) * Mobile: Replaced Links UI with bottom-sheet component * Mobile links UI: Removed commented code. * Mobile: Fix lint issues * Mobile Links UI: Remove autofocus on Android. This hides an issue where the modal sometimes will be under the keyboard on Android. --- .../mobile/bottom-sheet/cell.native.js | 13 +- .../mobile/bottom-sheet/styles.native.scss | 1 + .../format-library/src/link/button.native.js | 24 ---- .../format-library/src/link/index.native.js | 20 ++- .../format-library/src/link/modal.native.js | 127 ++++++++---------- .../format-library/src/link/modal.native.scss | 81 +---------- 6 files changed, 79 insertions(+), 187 deletions(-) delete mode 100644 packages/format-library/src/link/button.native.js diff --git a/packages/editor/src/components/mobile/bottom-sheet/cell.native.js b/packages/editor/src/components/mobile/bottom-sheet/cell.native.js index 6ac26d2d00ff8..9acc94bbfb3bb 100644 --- a/packages/editor/src/components/mobile/bottom-sheet/cell.native.js +++ b/packages/editor/src/components/mobile/bottom-sheet/cell.native.js @@ -16,10 +16,10 @@ import styles from './styles.scss'; import platformStyles from './cellStyles.scss'; export default class Cell extends Component { - constructor() { + constructor( props ) { super( ...arguments ); this.state = { - isEditingValue: false, + isEditingValue: props.autoFocus || false, }; } @@ -53,7 +53,7 @@ export default class Cell extends Component { const onCellPress = () => { if ( isValueEditable ) { - this.setState( { isEditingValue: true } ); + startEditing(); } else if ( onPress !== undefined ) { onPress(); } @@ -63,6 +63,12 @@ export default class Cell extends Component { this.setState( { isEditingValue: false } ); }; + const startEditing = () => { + if ( this.state.isEditingValue === false ) { + this.setState( { isEditingValue: true } ); + } + }; + const separatorStyle = () => { const leftMarginStyle = { ...styles.cellSeparator, ...platformStyles.separatorMarginLeft }; switch ( separatorType ) { @@ -97,6 +103,7 @@ export default class Cell extends Component { onChangeText={ onChangeValue } editable={ isValueEditable } pointerEvents={ this.state.isEditingValue ? 'auto' : 'none' } + onFocus={ startEditing } onBlur={ finishEditing } { ...valueProps } /> diff --git a/packages/editor/src/components/mobile/bottom-sheet/styles.native.scss b/packages/editor/src/components/mobile/bottom-sheet/styles.native.scss index 198d526092a85..53764ee4fe38f 100644 --- a/packages/editor/src/components/mobile/bottom-sheet/styles.native.scss +++ b/packages/editor/src/components/mobile/bottom-sheet/styles.native.scss @@ -31,6 +31,7 @@ border-top-left-radius: 8px; width: 100%; max-width: 512; + padding-bottom: 0; } .content { diff --git a/packages/format-library/src/link/button.native.js b/packages/format-library/src/link/button.native.js deleted file mode 100644 index fa8fd004c5a37..0000000000000 --- a/packages/format-library/src/link/button.native.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * External dependencies - */ -import { TouchableOpacity, View } from 'react-native'; - -export default function Button( props ) { - const { - children, - onClick, - disabled, - } = props; - - return ( - - - { children } - - - ); -} diff --git a/packages/format-library/src/link/index.native.js b/packages/format-library/src/link/index.native.js index 4a2def1614323..4ea3ee0e30934 100644 --- a/packages/format-library/src/link/index.native.js +++ b/packages/format-library/src/link/index.native.js @@ -107,17 +107,15 @@ export const link = { return ( - { this.state.addingLink && - - } + - - - - - - { __( 'Link Settings' ) } - - - - - - - { __( 'URL' ) } - - - - - - - { __( 'Link Text' ) } - - - - - - - { __( 'Open in a new window' ) } - - - - - - - + { /* eslint-disable jsx-a11y/no-autofocus */ + + /* eslint-enable jsx-a11y/no-autofocus */ } + + + + + + ); } } diff --git a/packages/format-library/src/link/modal.native.scss b/packages/format-library/src/link/modal.native.scss index 72f6a647b2396..e6a590eab85f7 100644 --- a/packages/format-library/src/link/modal.native.scss +++ b/packages/format-library/src/link/modal.native.scss @@ -1,80 +1,3 @@ - -.bottomModal { - justify-content: flex-end; - margin: 0; +.clearLinkButton { + color: $alert-red; } - -.dragIndicator { - background-color: $light-gray-400; - height: 4px; - width: 10%; - top: -12px; - margin: auto; - border-radius: 2px; -} - -.separator { - background-color: $light-gray-400; - height: 1px; - width: 95%; - margin: auto; -} - -.content { - background-color: $white; - padding: 18px 10px 5px 10px; - justify-content: center; - border-top-right-radius: 8px; - border-top-left-radius: 8px; -} - -.head { - flex-direction: row; - width: 100%; - margin-bottom: 5px; - justify-content: space-between; - align-items: center; - align-content: center; -} - -.title { - color: $dark-gray-600; - font-size: 18px; - font-weight: 600; - flex: 1; - text-align: center; -} - -.buttonText { - font-size: 18px; - padding: 5px; -} - -.inlineInput { - flex-direction: row; - width: 100%; - justify-content: space-between; - align-items: center; - margin: 5px 0; -} - -.inlineInputLabel { - padding: 10px 10px; - color: $dark-gray-600; - font-size: 14px; - font-weight: bold; -} - -.inlineInputValue { - flex-grow: 1; - font-size: 14px; - text-align: right; - align-items: stretch; - align-self: flex-end; - padding: 10px; -} - -.inlineInputValueSwitch { - padding: 5px; -} - From 85550bb47873a1548cbdc67f618a8b724b1c6a89 Mon Sep 17 00:00:00 2001 From: Diego Rey Mendez Date: Fri, 22 Feb 2019 07:07:23 -0300 Subject: [PATCH 14/43] Fixes pasting links. (#14038) --- packages/editor/src/components/rich-text/index.native.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index f7b6e92c49412..bf5265ecf84cd 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -289,6 +289,7 @@ export class RichText extends Component { }, } ); this.lastContent = this.valueToFormat( linkedRecord ); + this.lastEventCount = undefined; this.props.onChange( this.lastContent ); // Allows us to ask for this information when we get a report. From e485688f1c78333890cb90333a1e0a17d7920d8c Mon Sep 17 00:00:00 2001 From: Pinar Olguc Date: Fri, 22 Feb 2019 14:06:06 +0300 Subject: [PATCH 15/43] Update post title vertical paddings (#14040) --- packages/editor/src/components/post-title/style.native.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/editor/src/components/post-title/style.native.scss b/packages/editor/src/components/post-title/style.native.scss index 51879fd555c6b..a6a55118c0df7 100644 --- a/packages/editor/src/components/post-title/style.native.scss +++ b/packages/editor/src/components/post-title/style.native.scss @@ -2,5 +2,7 @@ .titleContainer { padding-left: 16; padding-right: 16; + padding-top: 12; + padding-bottom: 12; margin-top: 24; } From 331b68de09ac39d6e8edf6c0821cbadad11fb986 Mon Sep 17 00:00:00 2001 From: Matthew Kevins Date: Fri, 22 Feb 2019 22:10:38 +1000 Subject: [PATCH 16/43] Add try/catch fallback to plain text for pasteHandler (#14044) --- .../src/components/rich-text/index.native.js | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index bf5265ecf84cd..1e3de4f168086 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -42,6 +42,27 @@ const unescapeSpaces = ( text ) => { return text.replace( / | /gi, ' ' ); }; +/** + * Calls {@link pasteHandler} with a fallback to plain text when HTML processing + * results in errors + * + * @param {Object} [options] The options to pass to {@link pasteHandler} + * + * @return {Array|string} A list of blocks or a string, depending on + * `handlerMode`. + */ +const saferPasteHandler = ( options ) => { + try { + return pasteHandler( options ); + } catch ( error ) { + window.console.log( 'Pasting HTML failed:', error ); + window.console.log( 'HTML:', options.HTML ); + window.console.log( 'Falling back to plain text.' ); + // fallback to plain text + return pasteHandler( { ...options, HTML: '' } ); + } +}; + const gutenbergFormatNamesToAztec = { 'core/bold': 'bold', 'core/italic': 'italic', @@ -309,7 +330,7 @@ export class RichText extends Component { mode = 'AUTO'; } - const pastedContent = pasteHandler( { + const pastedContent = saferPasteHandler( { HTML: pastedHtml, plainText: pastedText, mode, From 0cbf01c3c63fc9e92f486da5645616bc11716d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Est=C3=AAv=C3=A3o?= Date: Fri, 22 Feb 2019 12:26:32 +0000 Subject: [PATCH 17/43] Fix link interface. (#14052) --- packages/format-library/src/link/modal.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/format-library/src/link/modal.native.js b/packages/format-library/src/link/modal.native.js index 0b0accadc9ea5..765cbb5b455d3 100644 --- a/packages/format-library/src/link/modal.native.js +++ b/packages/format-library/src/link/modal.native.js @@ -84,7 +84,7 @@ class ModalLinkUI extends Component { const placeholderFormats = ( value.formatPlaceholder && value.formatPlaceholder.formats ) || []; if ( isCollapsed( value ) && ! isActive ) { // insert link - const toInsert = applyFormat( create( { text: linkText } ), [ ...placeholderFormats, format ], 0, text.length ); + const toInsert = applyFormat( create( { text: linkText } ), [ ...placeholderFormats, format ], 0, linkText.length ); onChange( insert( value, toInsert ) ); } else if ( text !== getTextContent( slice( value ) ) ) { // edit text in selected link const toInsert = applyFormat( create( { text } ), [ ...placeholderFormats, format ], 0, text.length ); From db68e6cb05a33c130b5a5cd1563e8ea42b1f5fe3 Mon Sep 17 00:00:00 2001 From: Pinar Olguc Date: Fri, 22 Feb 2019 19:22:44 +0300 Subject: [PATCH 18/43] [Mobile]Fix title padding on Android (#14057) * Remove title vertical paddings for Android * Revert "Remove title vertical paddings for Android" This reverts commit 09f0d3592f77509e6a19e7712bba725a6118ab0f. * Import padding variables --- packages/editor/src/components/post-title/style.native.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/components/post-title/style.native.scss b/packages/editor/src/components/post-title/style.native.scss index a6a55118c0df7..b5d36037d9659 100644 --- a/packages/editor/src/components/post-title/style.native.scss +++ b/packages/editor/src/components/post-title/style.native.scss @@ -1,8 +1,10 @@ +@import "variables.scss"; + .titleContainer { padding-left: 16; padding-right: 16; - padding-top: 12; - padding-bottom: 12; + padding-top: $title-block-padding-top; + padding-bottom: $title-block-padding-bottom; margin-top: 24; } From 0718f7e651ea2326b41db2ac4cf39b8d9d69ea50 Mon Sep 17 00:00:00 2001 From: Marko Savic Date: Fri, 22 Feb 2019 11:44:32 -0500 Subject: [PATCH 19/43] Revert wrong format image color (#14058) --- packages/components/src/primitives/svg/style.native.scss | 5 ----- .../editor/src/components/media-placeholder/index.native.js | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/components/src/primitives/svg/style.native.scss b/packages/components/src/primitives/svg/style.native.scss index a76d5384f4af5..a6017e488b922 100644 --- a/packages/components/src/primitives/svg/style.native.scss +++ b/packages/components/src/primitives/svg/style.native.scss @@ -12,8 +12,3 @@ color: #87a6bc; fill: currentColor; } - -.dashicons-format-image { - color: #2e4453; - fill: currentColor; -} diff --git a/packages/editor/src/components/media-placeholder/index.native.js b/packages/editor/src/components/media-placeholder/index.native.js index 2249d761108e6..1bd983c37699a 100644 --- a/packages/editor/src/components/media-placeholder/index.native.js +++ b/packages/editor/src/components/media-placeholder/index.native.js @@ -18,7 +18,7 @@ function MediaPlaceholder( props ) { return ( - + { __( 'Image' ) } From 987a5a4ec8369ec9b7111349851c19f3ecb95c22 Mon Sep 17 00:00:00 2001 From: Stefanos Togoulidis Date: Fri, 22 Feb 2019 20:00:26 +0200 Subject: [PATCH 20/43] Stop building the mobile release branch on Travis (#14060) --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f1401c9b2fc84..8a464d766d973 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,6 @@ cache: branches: only: - master - - rnmobile/release-v1.0 before_install: - nvm install From 926ed3fd20b355fd3a74528400a9e0e7b190d415 Mon Sep 17 00:00:00 2001 From: Stefanos Togoulidis Date: Sun, 24 Feb 2019 22:04:21 +0200 Subject: [PATCH 21/43] [Native mobile] Bring release v1.0.1 back to "mobile develop" (#14075) * Don't allow placeholder to moves once we tap on it (#14066) * Use platform based SCSS vars for block minHeight (#14070) --- packages/block-library/src/heading/edit.native.js | 7 ++++--- packages/block-library/src/heading/style.native.scss | 5 +++++ packages/block-library/src/image/edit.native.js | 11 +++-------- .../block-library/src/paragraph/style.native.scss | 4 +++- .../editor/src/components/post-title/index.native.js | 4 ++-- .../src/components/post-title/style.native.scss | 4 ++++ 6 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 packages/block-library/src/heading/style.native.scss diff --git a/packages/block-library/src/heading/edit.native.js b/packages/block-library/src/heading/edit.native.js index d28021a0bbd99..dab8589b9c923 100644 --- a/packages/block-library/src/heading/edit.native.js +++ b/packages/block-library/src/heading/edit.native.js @@ -19,9 +19,7 @@ import { createBlock } from '@wordpress/blocks'; /** * Internal dependencies */ -import './editor.scss'; - -const minHeight = 24; +import styles from './style.scss'; class HeadingEdit extends Component { constructor( props ) { @@ -47,6 +45,9 @@ class HeadingEdit extends Component { } = attributes; const tagName = 'h' + level; + + const minHeight = styles.blockText.minHeight; + return ( diff --git a/packages/block-library/src/heading/style.native.scss b/packages/block-library/src/heading/style.native.scss new file mode 100644 index 0000000000000..d5018ce8e30b8 --- /dev/null +++ b/packages/block-library/src/heading/style.native.scss @@ -0,0 +1,5 @@ +@import "variables.scss"; + +.blockText { + min-height: $min-height-heading; +} diff --git a/packages/block-library/src/image/edit.native.js b/packages/block-library/src/image/edit.native.js index eabcdc9941a26..64a7c6a73eb45 100644 --- a/packages/block-library/src/image/edit.native.js +++ b/packages/block-library/src/image/edit.native.js @@ -340,14 +340,6 @@ class ImageEdit extends React.Component { imageHeightWithinContainer, } = sizes; - if ( imageWidthWithinContainer === undefined ) { - return ( - - - - ); - } - let finalHeight = imageHeightWithinContainer; if ( height > 0 && height < imageHeightWithinContainer ) { finalHeight = height; @@ -362,6 +354,9 @@ class ImageEdit extends React.Component { { getInspectorControls() } { getMediaOptions() } + { ! imageWidthWithinContainer && + + } Date: Mon, 4 Mar 2019 15:44:09 +0000 Subject: [PATCH 22/43] Rnmobile/refactor rich text sizing code (#14164) * Make richText height changes contained to the rich text block. * Remove commented out code. * Remove aztec height from state. * Allow minHeight to be optional. * Remove minHeight from postTitle. * Remove minHeight on heading block. --- .../block-library/src/heading/edit.native.js | 23 ++----------------- .../src/paragraph/edit.native.js | 15 +----------- .../src/components/post-title/index.native.js | 10 +------- .../src/components/rich-text/index.native.js | 14 +++++++---- 4 files changed, 14 insertions(+), 48 deletions(-) diff --git a/packages/block-library/src/heading/edit.native.js b/packages/block-library/src/heading/edit.native.js index dab8589b9c923..ba07909d3a6df 100644 --- a/packages/block-library/src/heading/edit.native.js +++ b/packages/block-library/src/heading/edit.native.js @@ -16,26 +16,14 @@ import { Component } from '@wordpress/element'; import { RichText, BlockControls } from '@wordpress/editor'; import { createBlock } from '@wordpress/blocks'; -/** - * Internal dependencies - */ -import styles from './style.scss'; - class HeadingEdit extends Component { - constructor( props ) { - super( props ); - - this.state = { - aztecHeight: 0, - }; - } - render() { const { attributes, setAttributes, mergeBlocks, insertBlocksAfter, + style, } = this.props; const { @@ -46,8 +34,6 @@ class HeadingEdit extends Component { const tagName = 'h' + level; - const minHeight = styles.blockText.minHeight; - return ( @@ -57,12 +43,10 @@ class HeadingEdit extends Component { tagName={ tagName } value={ content } isSelected={ this.props.isSelected } + style={ style } onFocus={ this.props.onFocus } // always assign onFocus as a props onBlur={ this.props.onBlur } // always assign onBlur as a props onCaretVerticalPositionChange={ this.props.onCaretVerticalPositionChange } - style={ { - minHeight: Math.max( minHeight, this.state.aztecHeight ), - } } onChange={ ( value ) => setAttributes( { content: value } ) } onMerge={ mergeBlocks } onSplit={ @@ -76,9 +60,6 @@ class HeadingEdit extends Component { } : undefined } - onContentSizeChange={ ( event ) => { - this.setState( { aztecHeight: event.aztecHeight } ); - } } placeholder={ placeholder || __( 'Write heading…' ) } /> diff --git a/packages/block-library/src/paragraph/edit.native.js b/packages/block-library/src/paragraph/edit.native.js index 4b303d489557d..a9a3e306ab578 100644 --- a/packages/block-library/src/paragraph/edit.native.js +++ b/packages/block-library/src/paragraph/edit.native.js @@ -14,7 +14,6 @@ import { RichText } from '@wordpress/editor'; /** * Internal dependencies */ -import styles from './style.scss'; const name = 'core/paragraph'; @@ -23,10 +22,6 @@ class ParagraphEdit extends Component { super( props ); this.splitBlock = this.splitBlock.bind( this ); this.onReplace = this.onReplace.bind( this ); - - this.state = { - aztecHeight: 0, - }; } /** @@ -99,8 +94,6 @@ class ParagraphEdit extends Component { content, } = attributes; - const minHeight = styles.blockText.minHeight; - return ( { setAttributes( { content: nextContent, @@ -122,9 +112,6 @@ class ParagraphEdit extends Component { onSplit={ this.splitBlock } onMerge={ mergeBlocks } onReplace={ this.onReplace } - onContentSizeChange={ ( event ) => { - this.setState( { aztecHeight: event.aztecHeight } ); - } } placeholder={ placeholder || __( 'Start writing…' ) } /> diff --git a/packages/editor/src/components/post-title/index.native.js b/packages/editor/src/components/post-title/index.native.js index 4874628b42284..23378470adc0e 100644 --- a/packages/editor/src/components/post-title/index.native.js +++ b/packages/editor/src/components/post-title/index.native.js @@ -28,7 +28,6 @@ class PostTitle extends Component { this.state = { isSelected: false, - aztecHeight: 0, }; } @@ -70,8 +69,6 @@ class PostTitle extends Component { const decodedPlaceholder = decodeEntities( placeholder ); const borderColor = this.state.isSelected ? focusedBorderColor : 'transparent'; - const minHeight = styles.blockText.minHeight; - return ( { this.props.onUpdate( value ); } } - onContentSizeChange={ ( event ) => { - this.setState( { aztecHeight: event.aztecHeight } ); - } } placeholder={ decodedPlaceholder } value={ title } onSplit={ this.props.onEnterPress } diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index 1e3de4f168086..a13f66e85e4bf 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -86,6 +86,7 @@ export class RichText extends Component { start: 0, end: 0, formatPlaceholder: null, + height: 0, }; } @@ -236,9 +237,7 @@ export class RichText extends Component { onContentSizeChange( contentSize ) { const contentHeight = contentSize.height; - this.props.onContentSizeChange( { - aztecHeight: contentHeight, - } ); + this.setState( { height: contentHeight } ); } // eslint-disable-next-line no-unused-vars @@ -501,6 +500,10 @@ export class RichText extends Component { html = ''; this.lastEventCount = undefined; // force a refresh on the native side } + let minHeight = 0; + if ( style && style.minHeight ) { + minHeight = style.minHeight; + } return ( @@ -517,6 +520,10 @@ export class RichText extends Component { this.props.setRef( ref ); } } } + style={ { + ...style, + minHeight: Math.max( minHeight, this.state.height ), + } } text={ { text: html, eventCount: this.lastEventCount } } placeholder={ this.props.placeholder } placeholderTextColor={ this.props.placeholderTextColor || styles[ 'editor-rich-text' ].textDecorationColor } @@ -534,7 +541,6 @@ export class RichText extends Component { blockType={ { tag: tagName } } color={ 'black' } maxImagesWidth={ 200 } - style={ style } fontFamily={ this.props.fontFamily || styles[ 'editor-rich-text' ].fontFamily } fontSize={ this.props.fontSize } fontWeight={ this.props.fontWeight } From 3f702dde620378938893f75471f1813262888a61 Mon Sep 17 00:00:00 2001 From: Diego Rey Mendez Date: Tue, 5 Mar 2019 08:52:41 -0800 Subject: [PATCH 23/43] Mobile: Fix pasting in header (#14118) * Fixes pasting in heading blocks. * Fixed an issue with a missing constant. * Removes some code that was added back as part of a merge conflict. * Re-adds some code removed by mistake. --- .../block-library/src/heading/edit.native.js | 69 ++++++++++++++++--- .../src/components/rich-text/index.native.js | 9 ++- 2 files changed, 66 insertions(+), 12 deletions(-) diff --git a/packages/block-library/src/heading/edit.native.js b/packages/block-library/src/heading/edit.native.js index ba07909d3a6df..d21613cabe098 100644 --- a/packages/block-library/src/heading/edit.native.js +++ b/packages/block-library/src/heading/edit.native.js @@ -16,7 +16,64 @@ import { Component } from '@wordpress/element'; import { RichText, BlockControls } from '@wordpress/editor'; import { createBlock } from '@wordpress/blocks'; +const name = 'core/heading'; + +/** + * Internal dependencies + */ +import styles from './style.scss'; + class HeadingEdit extends Component { + constructor( props ) { + super( props ); + + this.splitBlock = this.splitBlock.bind( this ); + } + + + /** + * Split handler for RichText value, namely when content is pasted or the + * user presses the Enter key. + * + * @param {?Array} before Optional before value, to be used as content + * in place of what exists currently for the + * block. If undefined, the block is deleted. + * @param {?Array} after Optional after value, to be appended in a new + * paragraph block to the set of blocks passed + * as spread. + * @param {...WPBlock} blocks Optional blocks inserted between the before + * and after value blocks. + */ + splitBlock( before, after, ...blocks ) { + const { + attributes, + insertBlocksAfter, + setAttributes, + onReplace, + } = this.props; + + if ( after !== null ) { + // Append "After" content as a new paragraph block to the end of + // any other blocks being inserted after the current paragraph. + const newBlock = createBlock( name, { content: after } ); + blocks.push( newBlock ); + } + + if ( blocks.length && insertBlocksAfter ) { + insertBlocksAfter( blocks ); + } + + const { content } = attributes; + if ( before === null ) { + onReplace( [] ); + } else if ( content !== before ) { + // Only update content if it has in-fact changed. In case that user + // has created a new paragraph at end of an existing one, the value + // of before will be strictly equal to the current content. + setAttributes( { content: before } ); + } + } + render() { const { attributes, @@ -49,17 +106,7 @@ class HeadingEdit extends Component { onCaretVerticalPositionChange={ this.props.onCaretVerticalPositionChange } onChange={ ( value ) => setAttributes( { content: value } ) } onMerge={ mergeBlocks } - onSplit={ - insertBlocksAfter ? - ( before, after, ...blocks ) => { - setAttributes( { content: before } ); - insertBlocksAfter( [ - ...blocks, - createBlock( 'core/paragraph', { content: after } ), - ] ); - } : - undefined - } + onSplit={ this.splitBlock } placeholder={ placeholder || __( 'Write heading…' ) } /> diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index a13f66e85e4bf..5c707388ee432 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -97,9 +97,16 @@ export class RichText extends Component { */ getRecord() { const { formatPlaceholder, start, end } = this.state; + + var value = this.props.value === undefined ? null : this.props.value; + // Since we get the text selection from Aztec we need to be in sync with the HTML `value` // Removing leading white spaces using `trim()` should make sure this is the case. - const { formats, text } = this.formatToValue( this.props.value === undefined ? undefined : this.props.value.trimLeft() ); + if (typeof value === 'string' || value instanceof String) { + value = value.trimLeft(); + } + + const { formats, text } = this.formatToValue( value ); return { formats, formatPlaceholder, text, start, end }; } From 2a4190391649c908c662b2ad310a32a607f9710d Mon Sep 17 00:00:00 2001 From: etoledom Date: Tue, 5 Mar 2019 20:11:23 +0100 Subject: [PATCH 24/43] Mobile: Fix links ui on landscape iOS v2 (#14240) * RNMobile: Adding original versin of keyboard-avoiding-view (to be modified) * Modified keyboard-avoiding-view to work well with bottom-sheets. --- .../mobile/bottom-sheet/index.native.js | 3 +- .../keyboard-avoiding-view.native.js | 114 ++++++++++++++++++ 2 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 packages/editor/src/components/mobile/bottom-sheet/keyboard-avoiding-view.native.js diff --git a/packages/editor/src/components/mobile/bottom-sheet/index.native.js b/packages/editor/src/components/mobile/bottom-sheet/index.native.js index 313ad950c7b55..6ec1ab2632781 100644 --- a/packages/editor/src/components/mobile/bottom-sheet/index.native.js +++ b/packages/editor/src/components/mobile/bottom-sheet/index.native.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { Text, View, KeyboardAvoidingView, Platform, PanResponder, Dimensions } from 'react-native'; +import { Text, View, Platform, PanResponder, Dimensions } from 'react-native'; import Modal from 'react-native-modal'; import SafeArea from 'react-native-safe-area'; @@ -17,6 +17,7 @@ import styles from './styles.scss'; import Button from './button'; import Cell from './cell'; import PickerCell from './picker-cell'; +import KeyboardAvoidingView from './keyboard-avoiding-view'; class BottomSheet extends Component { constructor() { diff --git a/packages/editor/src/components/mobile/bottom-sheet/keyboard-avoiding-view.native.js b/packages/editor/src/components/mobile/bottom-sheet/keyboard-avoiding-view.native.js new file mode 100644 index 0000000000000..0a4166f5985bd --- /dev/null +++ b/packages/editor/src/components/mobile/bottom-sheet/keyboard-avoiding-view.native.js @@ -0,0 +1,114 @@ + +/** + * External dependencies + */ +import React from 'react'; +import { + Keyboard, + LayoutAnimation, + Platform, + StyleSheet, + View, + Dimensions, +} from 'react-native'; + +/** + * This is a simplified version of Facebook's KeyboardAvoidingView. + * It's meant to work specifically with BottomSheets. + * This fixes an issue in the bottom padding calculation, when the + * BottomSheet was presented on Landscape, with the keyboard already present, + * and a TextField on Autofocus (situation present on Links UI) + */ +class KeyboardAvoidingView extends React.Component { + static defaultProps = { + enabled: true, + keyboardVerticalOffset: 0, + }; + + _subscriptions = []; + + state = { + bottom: 0, + }; + + _relativeKeyboardHeight( keyboardFrame ) { + if ( ! keyboardFrame ) { + return 0; + } + + const windowHeight = Dimensions.get( 'window' ).height; + const keyboardY = keyboardFrame.screenY - this.props.keyboardVerticalOffset; + + const final = Math.max( windowHeight - keyboardY, 0 ); + return final; + } + + /** + * @param {Object} event Keyboard event. + */ + _onKeyboardChange = ( event ) => { + if ( event === null ) { + this.setState( { bottom: 0 } ); + return; + } + + const { duration, easing, endCoordinates } = event; + const height = this._relativeKeyboardHeight( endCoordinates ); + + if ( this.state.bottom === height ) { + return; + } + + if ( duration && easing ) { + LayoutAnimation.configureNext( { + duration, + update: { + duration, + type: LayoutAnimation.Types[ easing ] || 'keyboard', + }, + } ); + } + this.setState( { bottom: height } ); + }; + + componentDidMount() { + if ( Platform.OS === 'ios' ) { + this._subscriptions = [ + Keyboard.addListener( 'keyboardWillChangeFrame', this._onKeyboardChange ), + ]; + } + } + + componentWillUnmount() { + this._subscriptions.forEach( ( subscription ) => { + subscription.remove(); + } ); + } + + render() { + const { + children, + enabled, + keyboardVerticalOffset, // eslint-disable-line no-unused-vars + style, + ...props + } = this.props; + + let finalStyle = style; + if ( Platform.OS === 'ios' ) { + const bottomHeight = enabled ? this.state.bottom : 0; + finalStyle = StyleSheet.compose( style, { paddingBottom: bottomHeight } ); + } + + return ( + + { children } + + ); + } +} + +export default KeyboardAvoidingView; From eb59a11d73cc127c656e00d8f2c7a8d43b02b891 Mon Sep 17 00:00:00 2001 From: etoledom Date: Thu, 7 Mar 2019 08:12:17 +0100 Subject: [PATCH 25/43] Mobile: Avoid adding empty link to text. (#14270) * Mobile Links UI: Avoid creating link with empty url field * Mobile Links UI: Using URL Keyboard type for url field * Fix lint issues --- packages/block-library/src/heading/edit.native.js | 7 ------- .../editor/src/components/rich-text/index.native.js | 4 ++-- packages/format-library/src/link/modal.native.js | 13 +++++++++++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/block-library/src/heading/edit.native.js b/packages/block-library/src/heading/edit.native.js index d21613cabe098..ac751101fb144 100644 --- a/packages/block-library/src/heading/edit.native.js +++ b/packages/block-library/src/heading/edit.native.js @@ -18,11 +18,6 @@ import { createBlock } from '@wordpress/blocks'; const name = 'core/heading'; -/** - * Internal dependencies - */ -import styles from './style.scss'; - class HeadingEdit extends Component { constructor( props ) { super( props ); @@ -30,7 +25,6 @@ class HeadingEdit extends Component { this.splitBlock = this.splitBlock.bind( this ); } - /** * Split handler for RichText value, namely when content is pasted or the * user presses the Enter key. @@ -79,7 +73,6 @@ class HeadingEdit extends Component { attributes, setAttributes, mergeBlocks, - insertBlocksAfter, style, } = this.props; diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index 5c707388ee432..b291d211e4652 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -98,11 +98,11 @@ export class RichText extends Component { getRecord() { const { formatPlaceholder, start, end } = this.state; - var value = this.props.value === undefined ? null : this.props.value; + let value = this.props.value === undefined ? null : this.props.value; // Since we get the text selection from Aztec we need to be in sync with the HTML `value` // Removing leading white spaces using `trim()` should make sure this is the case. - if (typeof value === 'string' || value instanceof String) { + if ( typeof value === 'string' || value instanceof String ) { value = value.trimLeft(); } diff --git a/packages/format-library/src/link/modal.native.js b/packages/format-library/src/link/modal.native.js index 765cbb5b455d3..e9395085d07dd 100644 --- a/packages/format-library/src/link/modal.native.js +++ b/packages/format-library/src/link/modal.native.js @@ -39,6 +39,7 @@ class ModalLinkUI extends Component { this.onChangeText = this.onChangeText.bind( this ); this.onChangeOpensInNewWindow = this.onChangeOpensInNewWindow.bind( this ); this.removeLink = this.removeLink.bind( this ); + this.onDismiss = this.onDismiss.bind( this ); this.state = { inputValue: '', @@ -109,13 +110,21 @@ class ModalLinkUI extends Component { this.props.onClose(); } + onDismiss() { + if ( this.state.inputValue === '' ) { + this.removeLink(); + } else { + this.submitLink(); + } + } + render() { const { isVisible } = this.props; return ( { /* eslint-disable jsx-a11y/no-autofocus */ @@ -126,7 +135,7 @@ class ModalLinkUI extends Component { placeholder={ __( 'Add URL' ) } autoCapitalize="none" autoCorrect={ false } - textContentType="URL" + keyboardType="url" onChangeValue={ this.onChangeInputValue } autoFocus={ Platform.OS === 'ios' } /> From 60fbafb6f4cdc3ad31e7b87ac5d79c35e322f544 Mon Sep 17 00:00:00 2001 From: Marko Savic Date: Fri, 8 Mar 2019 04:53:15 -0500 Subject: [PATCH 26/43] Avoid to reset html to empty string if block is heading and platform is android (#14301) * Avoid to reset html to empty string if block is heading on android platform * Send empty tag flag from heading block to RichText --- packages/block-library/src/heading/edit.native.js | 6 +++++- .../src/components/rich-text/index.native.js | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/heading/edit.native.js b/packages/block-library/src/heading/edit.native.js index ac751101fb144..2c16443fccbda 100644 --- a/packages/block-library/src/heading/edit.native.js +++ b/packages/block-library/src/heading/edit.native.js @@ -6,7 +6,7 @@ import HeadingToolbar from './heading-toolbar'; /** * External dependencies */ -import { View } from 'react-native'; +import { View, Platform } from 'react-native'; /** * WordPress dependencies @@ -23,6 +23,7 @@ class HeadingEdit extends Component { super( props ); this.splitBlock = this.splitBlock.bind( this ); + this.isAndroid = Platform.OS === 'android'; } /** @@ -101,6 +102,9 @@ class HeadingEdit extends Component { onMerge={ mergeBlocks } onSplit={ this.splitBlock } placeholder={ placeholder || __( 'Write heading…' ) } + // Fix for heading issue on Android https://github.com/wordpress-mobile/gutenberg-mobile/issues/627 + // Intentionally introduces missing pleceholder issue on Android https://github.com/wordpress-mobile/gutenberg-mobile/issues/707 + sendEmptyTag={ this.isAndroid } /> ); diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index b291d211e4652..5cf1bb3fd2eb0 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -496,6 +496,7 @@ export class RichText extends Component { style, formattingControls, isSelected, + sendEmptyTag, } = this.props; const record = this.getRecord(); @@ -503,8 +504,20 @@ export class RichText extends Component { const value = this.valueToFormat( record ); let html = `<${ tagName }>${ value }`; // We need to check if the value is undefined or empty, and then assign it properly otherwise the placeholder is not visible + if ( value === undefined || value === '' ) { - html = ''; + // PR for placeholder fix https://github.com/WordPress/gutenberg/pull/13699/ + // has introduced heading issue on Android https://github.com/wordpress-mobile/gutenberg-mobile/issues/627 + // ( If a new heading block is created on Android device + // it will be without default formatting (

currently ) ) . + // Fix for heading issue is to skip reset of html variable if tag is heading and platform is Android. + // This fix will intentionally introduce original issue with placeholder (on Android) + // which has lower priority then heading issue . + // New issue is raised : https://github.com/wordpress-mobile/gutenberg-mobile/issues/707 + if ( ! sendEmptyTag ) { + html = ''; + } + this.lastEventCount = undefined; // force a refresh on the native side } let minHeight = 0; From 8f82fd30315a7bec4054fbd2de7e6fdd29b459c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Est=C3=AAv=C3=A3o?= Date: Fri, 8 Mar 2019 17:05:47 +0000 Subject: [PATCH 27/43] Set minHeight based on fontSize or style. (#14344) * Set minHeight based on fontSize or style. * Only use the styles to set the min-height. --- packages/editor/src/components/rich-text/index.native.js | 2 +- packages/editor/src/components/rich-text/style.native.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index 5cf1bb3fd2eb0..92c6e9135b7ea 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -520,7 +520,7 @@ export class RichText extends Component { this.lastEventCount = undefined; // force a refresh on the native side } - let minHeight = 0; + let minHeight = styles[ 'editor-rich-text' ].minHeight; if ( style && style.minHeight ) { minHeight = style.minHeight; } diff --git a/packages/editor/src/components/rich-text/style.native.scss b/packages/editor/src/components/rich-text/style.native.scss index b1207a4338aa4..b4d626a388bd2 100644 --- a/packages/editor/src/components/rich-text/style.native.scss +++ b/packages/editor/src/components/rich-text/style.native.scss @@ -4,4 +4,5 @@ .editor-rich-text { font-family: $default-regular-font; text-decoration-color: $gray; + min-height: $min-height-paragraph; } From ea8d9d79c74074c7b6667d82cbaac3ff3c919773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Est=C3=AAv=C3=A3o?= Date: Tue, 12 Mar 2019 09:40:54 +0000 Subject: [PATCH 28/43] Remove unused styles classes. (#14338) --- packages/block-library/src/heading/style.native.scss | 5 ----- packages/block-library/src/paragraph/style.native.scss | 5 ----- packages/editor/src/components/post-title/style.native.scss | 4 ---- 3 files changed, 14 deletions(-) delete mode 100644 packages/block-library/src/heading/style.native.scss delete mode 100644 packages/block-library/src/paragraph/style.native.scss diff --git a/packages/block-library/src/heading/style.native.scss b/packages/block-library/src/heading/style.native.scss deleted file mode 100644 index d5018ce8e30b8..0000000000000 --- a/packages/block-library/src/heading/style.native.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "variables.scss"; - -.blockText { - min-height: $min-height-heading; -} diff --git a/packages/block-library/src/paragraph/style.native.scss b/packages/block-library/src/paragraph/style.native.scss deleted file mode 100644 index 574c3f1d05934..0000000000000 --- a/packages/block-library/src/paragraph/style.native.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "variables.scss"; - -.blockText { - min-height: $min-height-paragraph; -} diff --git a/packages/editor/src/components/post-title/style.native.scss b/packages/editor/src/components/post-title/style.native.scss index fa5ea8e7da087..b5d36037d9659 100644 --- a/packages/editor/src/components/post-title/style.native.scss +++ b/packages/editor/src/components/post-title/style.native.scss @@ -1,10 +1,6 @@ @import "variables.scss"; -.blockText { - min-height: $min-height-title; -} - .titleContainer { padding-left: 16; padding-right: 16; From 38377fead541dd887ff68c37040845d06de8c955 Mon Sep 17 00:00:00 2001 From: Pinar Olguc Date: Tue, 12 Mar 2019 18:16:52 +0300 Subject: [PATCH 29/43] [Mobile]Fix placeholder position of block appender (#14386) * Fix placeholder position of block appender * Remove unused import * Change import position * Remove unused import in css file * Remove extra container view * Update travis.yml from master branch to fix CI issues --- .../default-block-appender/index.native.js | 18 +++++++----------- .../default-block-appender/style.native.scss | 16 ---------------- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/packages/editor/src/components/default-block-appender/index.native.js b/packages/editor/src/components/default-block-appender/index.native.js index 8255afc3cd8fc..3b1ec90789885 100644 --- a/packages/editor/src/components/default-block-appender/index.native.js +++ b/packages/editor/src/components/default-block-appender/index.native.js @@ -1,12 +1,13 @@ /** * External dependencies */ -import { TextInput, TouchableWithoutFeedback, View } from 'react-native'; +import { TouchableWithoutFeedback, View } from 'react-native'; /** * WordPress dependencies */ import { __ } from '@wordpress/i18n'; +import { RichText } from '@wordpress/editor'; import { compose } from '@wordpress/compose'; import { decodeEntities } from '@wordpress/html-entities'; import { withSelect, withDispatch } from '@wordpress/data'; @@ -21,6 +22,7 @@ export function DefaultBlockAppender( { isVisible, onAppend, placeholder, + containerStyle, } ) { if ( isLocked || ! isVisible ) { return null; @@ -32,16 +34,10 @@ export function DefaultBlockAppender( { - - - - + + ); diff --git a/packages/editor/src/components/default-block-appender/style.native.scss b/packages/editor/src/components/default-block-appender/style.native.scss index fd3cd2f9afefb..d2b8753111990 100644 --- a/packages/editor/src/components/default-block-appender/style.native.scss +++ b/packages/editor/src/components/default-block-appender/style.native.scss @@ -1,21 +1,5 @@ // @format -@import "variables.scss"; -@import "colors.scss"; - .blockHolder { flex: 1 1 auto; } - -.blockContainer { - background-color: $white; - padding-top: 0; - padding-left: 16px; - padding-right: 16px; -} - -.textView { - color: $gray; - font-size: 16px; - font-family: $default-regular-font; -} From de77ad841fb1097777970b59965c390f0a686581 Mon Sep 17 00:00:00 2001 From: Pinar Olguc Date: Wed, 13 Mar 2019 09:29:30 +0300 Subject: [PATCH 30/43] [Mobile]Update caret position on insert link (#14317) * Update selection on text change if needed * Update caret position when editing the link * Revert putting the caret at end when we transform the selected text into link --- .../editor/src/components/rich-text/index.native.js | 10 +++++++++- packages/format-library/src/link/modal.native.js | 9 ++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index 92c6e9135b7ea..6cf30cb1dc3a9 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -198,6 +198,12 @@ export class RichText extends Component { } ); if ( newContent && newContent !== this.props.value ) { this.props.onChange( newContent ); + if ( record.needsSelectionUpdate && record.start && record.end ) { + this.setState( { start: record.start, end: record.end } ); + } + this.setState( { + needsSelectionUpdate: record.needsSelectionUpdate, + } ); } else { // make sure the component rerenders without refreshing the text on gutenberg // (this can trigger other events that might update the active formats on aztec) @@ -525,6 +531,8 @@ export class RichText extends Component { minHeight = style.minHeight; } + const selection = this.state.needsSelectionUpdate ? { start: this.state.start, end: this.state.end } : null; + return ( { isSelected && ( @@ -544,7 +552,7 @@ export class RichText extends Component { ...style, minHeight: Math.max( minHeight, this.state.height ), } } - text={ { text: html, eventCount: this.lastEventCount } } + text={ { text: html, eventCount: this.lastEventCount, selection } } placeholder={ this.props.placeholder } placeholderTextColor={ this.props.placeholderTextColor || styles[ 'editor-rich-text' ].textDecorationColor } onChange={ this.onChange } diff --git a/packages/format-library/src/link/modal.native.js b/packages/format-library/src/link/modal.native.js index e9395085d07dd..f828c9adc58d3 100644 --- a/packages/format-library/src/link/modal.native.js +++ b/packages/format-library/src/link/modal.native.js @@ -86,12 +86,15 @@ class ModalLinkUI extends Component { if ( isCollapsed( value ) && ! isActive ) { // insert link const toInsert = applyFormat( create( { text: linkText } ), [ ...placeholderFormats, format ], 0, linkText.length ); - onChange( insert( value, toInsert ) ); + const newAttributes = insert( value, toInsert ); + onChange( { ...newAttributes, needsSelectionUpdate: true } ); } else if ( text !== getTextContent( slice( value ) ) ) { // edit text in selected link const toInsert = applyFormat( create( { text } ), [ ...placeholderFormats, format ], 0, text.length ); - onChange( insert( value, toInsert, value.start, value.end ) ); + const newAttributes = insert( value, toInsert, value.start, value.end ); + onChange( { ...newAttributes, needsSelectionUpdate: true } ); } else { // transform selected text into link - onChange( applyFormat( value, [ ...placeholderFormats, format ] ) ); + const newAttributes = applyFormat( value, [ ...placeholderFormats, format ] ); + onChange( { ...newAttributes, needsSelectionUpdate: true } ); } if ( ! isValidHref( url ) ) { From a981491e4e65c99302649a4e1aff7c3822850a22 Mon Sep 17 00:00:00 2001 From: Tugdual de Kerviler Date: Thu, 14 Mar 2019 15:25:21 +0100 Subject: [PATCH 31/43] Get the last master changes into the mobile develop branch (#14375) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add ESNext syntax to meta block tutorial (#13954) * Add ESNext syntax to meta block tutorial * Applied WordPress code styles to the examples * Apply suggestions from code review Co-Authored-By: mkaz * Editor: RichText: Check for presence of inputType (#13986) * Bump plugin version to 5.1.1 (#13990) * Added a snippet for observing the browser when running e2e tests (#13993) * Added a snippet for observing the browser when running e2e tests * Extract reusable part of Webpack config and put in @wordpress/scripts (#13814) * New build-config package with webpack config. Pull the Gutenberg webpack config into a package so it can be re-used for block/extension development. * Require new build-config package. * Dynamically handle WP externals with a function. Use code from WP Calypso for handling WP externals so we don't have to have the actual list of packages accessible in our webpack configuration. * Use webpack config from build-config package. * Require build-config package. * Adjust file refs for WP packages. * Move main gutenberg entry definition and webpack copy plugin out of build-config. * Add react-dev-utils for formatting webpack compiler messages. * Implement build script using webpack config from build-config. * Adjust output path so build goes to working directory. * Update package name to webpack-config * Apply more tweaks to the way webpack config package is structured * Update the way externals are handled * Add default values for entry and output * Move shared webpack config under @wordpress/scripts package * Improve the way how loaders are handled * Replace GUTENBERG with WP in webpack config env variables Co-Authored-By: gziolo * Bring back feature flag to webpack config accidentally removed during merge * Add missing dev dependencies for the packages used in webpack config * Fix the list of excluded folders for babel-loader * Use globals instead of imports in tutorials (#13995) * Use globals instead of imports * Update docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md Co-Authored-By: nosolosw * Update docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md Co-Authored-By: nosolosw * URL input popover visual cleanup (#13973) * Use chevron instead of ellipsis in url input field options. * Mimic toolbar icon styles for the icons in the URL popover. * Add a left divider before the URL settings toggle * Even up the spacing in the settings panel. * Add periods to code comments. * Update snapshot * Reinstate "underline" in default formats list (#14008) * Upgrade React to 16.8.2: Welcome React Hooks (#13992) * Upgrade React to 16.8.2 * Update package-lock.json file * Expose React Hooks * Revert "Upgrade React to 16.8.2: Welcome React Hooks (#13992)" (#14017) This reverts commit 6f88bec8fbf15291e3e00872a5df59e310494f5b. * Cleanup URL Popover stylesheet. (#14015) As noted in #13973, this stylesheet uses a relatively non-standard SCSS method of nesting some classnames. For instance: `.editor-url-popover { &__settings-toggle { ... } }`. ... instead of: `.editor-url-popover__settings-toggle { ... }` This is different from the conventions used elsewhere in Gutenberg, and is a bit more difficult to follow for that reason. This commit un-nests those styles, and should have no effect on the compiled CSS. * Add a generic block editor module (#13088) * RichText: warn when using inline container (#13921) * RichText: warn when using inline container * Add env check * Update documentation * Try updating the WP database (#14048) * Merge native mobile release v1.0 to master (#14061) * Bump plugin version to 5.1.0-rc.1 * RichText: only ignore input types that insert HTML (#13914) * RichText: only ignore input types that insert HTML * Mark RichTextInputEvent as unstable * Use Set * Bump plugin version to 5.1.0 * Deprecate RichTextInputEvent on mobile too (#13975) * The undelying RichText component implementation has changed the parameters returned onChange, and we forgot to update the PostTitle component (#13967) * Fixes wrong state comparison (#13987) Upload media progress bar is missing while media is uploading new * Re-add rootTagsToEliminate prop (#14006) * [Mobile]Update PostTitle to apply borders when it is focused (#13970) * Trigger onFocusStatusChange from PostTitle * Fix lint issue * Update post title shadow mechanism Also open inner ref so that focus state can be updated when focus is made programmatically * Update props * Update onRef as ref * Update title padding&margin * Mobile: Rename ref to innerRef on PostTitle (#14024) * Fixes a red screen in mobile. (#14011) * Change background color on image placeholder block (#14033) * Changed upload media icon color * Changed media placeholder background color * Fix post title native syntax (#14041) * Fix unexpected token in native code * Dummy commit to trigger Travis * Include the rnmobile release branch to Travis builds * Mobile: Links UI using BottomSheet component (#13972) * Mobile: Replaced Links UI with bottom-sheet component * Mobile links UI: Removed commented code. * Mobile: Fix lint issues * Mobile Links UI: Remove autofocus on Android. This hides an issue where the modal sometimes will be under the keyboard on Android. * Fixes pasting links. (#14038) * Update post title vertical paddings (#14040) * Add try/catch fallback to plain text for pasteHandler (#14044) * Fix link interface. (#14052) * [Mobile]Fix title padding on Android (#14057) * Remove title vertical paddings for Android * Revert "Remove title vertical paddings for Android" This reverts commit 09f0d3592f77509e6a19e7712bba725a6118ab0f. * Import padding variables * Revert wrong format image color (#14058) * Stop building the mobile release branch on Travis (#14060) * Avoid mutating imported default config in webpack config (#14039) * Make Babel import JSX pragma plugin aware of `wp.element.createElement` (#13809) * Test: Add test which verifies wheter JSX pragma detects WP global * Update packages/babel-plugin-import-jsx-pragma/test/index.js Co-Authored-By: gziolo * Skip import when the scope variable is already defined * Add failing tests for inner scope variable defined verification * Add import statement when there is any undefined scope variable * Docs: Add details about changes introduced to Babel plugin * Upgrade Jest to version 24 (breaking changes) (#13922) * Upgrade Jest to version 24 (breaking changes) * Update changelog files to list all dependencies upgraded * Downgrade puppeteer to the previous version 1.6.1 * Try to fix failing e2e tests setup * Added clarification in the changelog * Testing: Remove expect-puppeteer import reference * Address issues raised during code review * Codeowners changes for @chrisvanpatten (#14062) * Codeowners changes for @chrisvanpatten * Remove obsolete ghost placeholder for no longer onowned styles * Add repository.directory fields (fixes #13946) (#14059) * Improve default Babel preset to include JSX pragma (#13540) * Include custome JSX pragma support in Babel preset * Stop using Babel tranpiliation for two packages babel-plugin-import-jsx-pragma and postcss-themes * Add engines field to node based packages * Use the block editor store instead of the editor one (#13105) * Docs: release.md: miscellaneous fixes (#14083) * Docs: release.md: misc. fixes * Disable block navigation and document outline items in text mode (#14081) * Use aria-disabled instead of disabled. * Fix unrecognized prop warning. * Disable Document Outline items in text mode. * Improve buttons alignment. * Pass isTextModeEnabled as prop from parent. * Fix selector in document outline. (#14094) * Fix selector in document outline. * Import getBlocks from its new location. * Plugin: Require includes for deprecated `use_block_editor_for_` functions (#14096) * Plugin: Fix 5.1.0 deprecated functions to correct plugin version * Plugin: Require includes for deprecated `use_block_editor_for_` functions * Plugin: Update server blocks script to use core equivalent function (#14097) `gutenberg_prepare_blocks_for_js` was deprecated in Gutenberg 5.0 * Correct visual error in the quote block icon (#14091) Fixes #13659. The current quote block icon appears to have some over-simplified edges. This replaces it with a crisper version. * Try: Add a subtle animation to the is-active indicator for sidebar tabs (#13956) * Add subtle animation to the is-active indicator for sidebar tabs * Re-instate the empty border, to prevent browser defaults from kicking in. * Remove extra 1px of empty space * Focus state cleanup for tab buttons Allow them to inherit the box shadow (used for the active tab) Use the usual standard dotted outline instead of a solid one. * Add a pseudoclass to ensure the active border appears in Windows High Contrast Mode. * Fix typo. This should match the value from `/packages/edit-post/src/components/sidebar/settings-header/style.scss` * Plugin: Remove vendor script registration (#13573) * chore: Fix: FormToggle docs documents props the component does not uses (#14099) * Babel Plugin Import JSX Pragma: Remove import visitor (#14106) Props to @aduth for coding this optimization. * Add: Block specific toolbar button sample to the format api tutorial (#14113) ## Description This PR updates the format API tutorial (toolbar button section) to include a sample of a button that only renders on a certain block. Answers a question posted on https://github.com/WordPress/gutenberg/issues/14104. Closes: https://github.com/WordPress/gutenberg/issues/14104 ## How has this been tested? I pasted the sample code on the browser console and verified it works as expected. * Use the editor settings to pass a mediaUpload handler (#14115) * Use the editor settings to pass a mediaUpload handler * Update media block snapshots * Block Editor: Consider RECEIVE_BLOCKS as non-persistent change (#14108) * Block Editor: Consider RECEIVE_BLOCKS as non-persistent change * Block Editor: Compare last action in reducer enhancer only if non-ignored * Plugin: Remove PHP functions slated for removal in 5.2 (#14090) * Plugin: Remove PHP functions slated for removal in 5.2 * Documentation: Update FAQ to avoid reference to deprecated function * Paste: ignore Google Docs UID tag (#14138) * Fix typos in copy-guide.md, readme.md and scripts.md. (#14089) * Separate the block editor shortcuts from the post editor shortcuts (#14116) * Fix: FocalPointPicker renders unlabelled input fields (#14152) * Testing: Remove unnecessary Enzyme React 16 workarounds (#14156) * Testing: Bump `enzyme-adapter-react-16` to 1.10.0 * Testing: Avoid unforwarded Button mock No longer necessary with native support for forwardRef in Enzyme * Testing: Un-skip BlockControls snapshot test * Plugin: Preserve inline scripts in Gutenberg override (#13581) * Plugin: Preserve inline scripts in Gutenberg override * Plugin: Restore storageKey assignment for persistence migration * Refactor to remove usage of post related effects in packages/editor. (#13716) This pull is the first step in moving away from the lingering usage of effects in various data stores among packages. This pull specifically deals with post related effects in the @wordpress/editor package (`core/editor` store). * Add array-callback-return rule; Fix current code breaking the rule. (#14154) ## Description Adds a rule to make sure Array functions that iterate on the array and should return something contain the return statement, otherwise, a forEach should probably be used instead. A case like this was fixed at https://github.com/WordPress/gutenberg/pull/13953. In PR https://github.com/WordPress/gutenberg/pull/13953 @aduth suggested the implementation of a lint rule to catch these cases. While trying to implement the rule and researching the best ways to do it, I noticed a rule like that already existed in the community and this PR is enabling it. We are also changing the code to respect the new rule no observable changes should be expected. ## How has this been tested? Observe the tests pass. Do some smoke testing, adding blocks, uploading files, and verify everything still works as before. * Update text displayed when an embed can't be previewed (#13715) * Update text displayed when an embed can't be previewed * Add translator note for update to embedded content np preview message * Fix: Image that is uploaded to an existing gallery does not appear in the edit gallery view (#12435) * RichText: fix wordwise selection on Windows (#14184) * RichText: fix wordwise selection on Windows * Fix crtl ctrl typo. * Add docs * Chore: Update: Code Quality: Remove some editor store references from block-editor (#14161) We missed to update the editor references from selectPreviousBlock, and selectNextBlock. ## Tests I added multiple blocks, I verified that when I remove a block the previous block still gets selected. * Framework: Update package-lock.json for new Enzyme adapter (#14192) * Notices: Remove inaccurate createNotice sole argument feature (#14177) * New package to auto-generate public API documentation (#13329) * Update nosolosw notifs (#14196) * Make IconButton able to be referenced. (#14163) * Make IconButton able to get referenced. * Components: Forward IconButton ref as stateless function * Components: Restore IconButton aria-pressed prop pass-through * Paste: preserve empty table cells (#14137) * Update Codeowners, add mkaz to docgen (#14198) * Plugin: Remove wp-editor-font stylesheet override (#14176) * Bring i18n functionality up to date (#12559) * Plugin: Add Text Domain to plugin headers * Bring i18n functionality up to date * Plugin: Set Gutenberg script translations as default domain Filter loading behavior to load from plugin translation files * Testing: Update gutenberg_override_script per localization changes * Plugin: Provide second argument for set script translations Technically optional, only after WP5.1+, which is newer than the current minimum version supported by Gutenberg * Fix: deleting the last block triggers a focus loss. (#14189) ## Description This PR fixes a problem: if the post contains one block and it is removed the focus is lost. This is a regression that happened when removeBlocks action was refactored to be a generator. We had an effect that inserts the default block during remove blocks action when certain conditions are met, this effect stopped working. This PR removes the effect and makes sure everything is handled by the removeBlocks action creator. End to end test available at https://github.com/WordPress/gutenberg/pull/14191. ## How has this been tested? I created a new post. I wrote something in a paragraph I removed the paragraph using the remove button in the side menu and I verified the default block was added. * Clarify the block editor settings from the post editor settings (#14082) * Add repository.directory linting rule (fixes #13947) (#14200) * Add repository.directory rule to npm-package-json-lint-config (fix #13947) * Fix lock file (props @aduth) * Fix rule, update changelogs * Add PR reference * Add directory field to packages/docgen * Apply changes suggested by @ntwb * Update CHANGELOG.md * Plugin: Remove deprecated `_wpLoadGutenbergEditor`, `gutenberg` theme supports (#14144) * Plugin: Remove deprecated `gutenberg` theme supports * Plugin: Remove deprecated `_wpLoadGutenbergEditor` * Bump plugin version to 5.2.0-rc.1 (#14210) * Packages: Add missing expect-pupeteer dependency to e2e-tests package (#14212) * Lowercase Block Editor to block editor as per the core spelling Best Practices (#14205) ## Description I've updated all references to Block Editor to be lowercase as they aren't proper nouns. This conforms to the core spelling Best Practices; “block editor” or “block-based editor” | “Block Editor” or “Gutenberg” | When referring to the new editor. Reference - https://make.wordpress.org/core/handbook/best-practices/spelling/ Also ties back to the original discussion around the capitalization convention here; https://github.com/WordPress/gutenberg/pull/12856 Previously opened #14203 to handle the Classic Editor changes. ## How has this been tested? Only tested that it didn't break anything. ## Types of changes Mostly comment changes, there was one string change and a couple translator comment changes. ## Checklist: - [x] My code is tested. - [x] My code follows the WordPress code style. - [x] My code follows the accessibility standards. - [x] My code has proper inline documentation. - [x] I've included developer documentation if appropriate. * Babel Preset Default: Avoid disabling regenerator option (#14130) * Babel Preset Default: Remove redundant (defaulted) corejs option * Scripts: Assign Babel runtime regenerator as externals in Webpack config * Babel Preset Default: Avoid disabling regenerator option * Testing: Await E2E promise interactions (#14219) * Testing: Await E2E promise interactions * Testing: Disable animations on every admin screen * Testing: Refactor reusable block management to compare before/after entry count * Lowercase classic editor when not in reference to the plugin. (#14203) * Lowercase classic editor when not in reference to the plugin. * Reverted heading to use capitalized as the heading choice throughout uses full capitalization style on headings so went back to make consistent as @torres126 recommended. Also updated the snap file to resolve the Travis CI error. * Missed saving README.md where the revert on headding capitalization was in my editor. * Fix: Calendar block: Always show current month for non post types on the editor (#13873) * Fix allowed_block_types regression (#14229) * Fix: Latest posts: Title is clickable across the full width of the row (#14109) ## Description The title in latest posts block was clickable across the full width of the row, making it easy to click on the title by mistake. This problem only affects the editor on the front end things worked as expected. ## How has this been tested? I added the latest posts block. I verified that the title is only clickable if the mouse is above the title and not above any part of its row. ## Screenshots Before: ![feb-25-2019 21-49-15](https://user-images.githubusercontent.com/11271197/53371643-b3e3f380-3948-11e9-95f5-a8f235fabab2.gif) After: ![feb-25-2019 21-53-30](https://user-images.githubusercontent.com/11271197/53371657-c2320f80-3948-11e9-8dfd-ab7ae4640955.gif) * Blocks: Regenerate RSS, Search block fixtures (#14122) * Component: date-time: Remove comparison to now when testing getMomentDate (#14230) * RichText: Fix undo after pattern (#13917) * Fix undo after pattern * Update e2e test * RichText: don't use DOM to add line padding (#13850) * RichText: don't use DOM to add line padding * Clean up * Keep track of user inserted line breaks * Mark isEditableTree param unstable * Use a central script instead of one per package to generate docs (#14216) * Update: Use escape key press instead of mouse movement to show block toolbar (#14247) This PR updates our end to end tests to use escape key press instead of mouse movement to show the block toolbar. The PR follows a suggestion by @aduth in https://github.com/WordPress/gutenberg/pull/14191#discussion_r261715507 ## How has this been tested? We only need to make sure end 2 end tests pass * Switch the Travis badge from travis-ci.org to travis-ci.com. (#14250) * Update the npm packages release process (#14136) * Update plugin version to 5.2 (#14255) * chore(release): publish - @wordpress/a11y@2.1.0 - @wordpress/annotations@1.1.0 - @wordpress/api-fetch@3.0.0 - @wordpress/autop@2.1.0 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0 - @wordpress/babel-plugin-makepot@3.0.0 - @wordpress/babel-preset-default@4.0.0 - @wordpress/blob@2.2.0 - @wordpress/block-editor@1.0.0 - @wordpress/block-library@2.3.0 - @wordpress/block-serialization-default-parser@3.0.0 - @wordpress/block-serialization-spec-parser@3.0.0 - @wordpress/blocks@6.1.0 - @wordpress/browserslist-config@2.3.0 - @wordpress/components@7.1.0 - @wordpress/compose@3.1.0 - @wordpress/core-data@2.1.0 - @wordpress/custom-templated-path-webpack-plugin@1.2.0 - @wordpress/data@4.3.0 - @wordpress/date@3.1.0 - @wordpress/deprecated@2.1.0 - @wordpress/docgen@1.0.0 - @wordpress/dom-ready@2.1.0 - @wordpress/dom@2.1.0 - @wordpress/e2e-test-utils@1.0.0 - @wordpress/e2e-tests@1.0.0 - @wordpress/edit-post@3.2.0 - @wordpress/edit-widgets@0.1.0 - @wordpress/editor@9.1.0 - @wordpress/element@2.2.0 - @wordpress/escape-html@1.1.0 - @wordpress/eslint-plugin@2.0.0 - @wordpress/format-library@1.3.0 - @wordpress/hooks@2.1.0 - @wordpress/html-entities@2.1.0 - @wordpress/i18n@3.2.0 - @wordpress/is-shallow-equal@1.2.0 - @wordpress/jest-console@3.0.0 - @wordpress/jest-preset-default@4.0.0 - @wordpress/jest-puppeteer-axe@1.0.0 - @wordpress/keycodes@2.1.0 - @wordpress/library-export-default-webpack-plugin@1.1.0 - @wordpress/list-reusable-blocks@1.2.0 - @wordpress/notices@1.2.0 - @wordpress/npm-package-json-lint-config@1.2.0 - @wordpress/nux@3.1.0 - @wordpress/plugins@2.1.0 - @wordpress/postcss-themes@2.0.0 - @wordpress/priority-queue@1.0.0 - @wordpress/redux-routine@3.1.0 - @wordpress/rich-text@3.1.0 - @wordpress/scripts@3.0.0 - @wordpress/shortcode@2.1.0 - @wordpress/token-list@1.2.0 - @wordpress/url@2.4.0 - @wordpress/viewport@2.2.0 - @wordpress/wordcount@2.1.0 * Update the package changelogs after the npm release * Add clickBlockToolbarButton end to end test util (#14254) This PR adds an end 2 end test util that allows clicking in a block toolbar button and refactors existing code to use it. ## How has this been tested? We only need to verify that the end 2 end tests pass. * element: set up autogenerated API docs (#14269) * Testing: Trash existing posts as admin user (#14244) * escape-html: set up autogenerated API docs (#14268) * html-entities: set up auto-generated API docs (#14267) * keycodes: set up auto-generated API docs (#14265) * Use currentColor for fill of placeholder icon—ensures icon contrasts with background color of block (#14257) * a11y: set up auto-generated API docs (#14288) * blob: set up auto-generated API docs (#14286) * block-library: set up auto-generated API docs (#14282) * compose: set up auto-generated API docs (#14278) * dom: set up auto-generated API docs (#14273) * i18n: set up auto-generated API docs (#14266) * Clarify that we should rebase the branch when preparing the npm release branches (#14260) * autop: set up auto-generated API docs (#14287) * dom-ready: set up autogenerated API docs (#14272) * block-editor: set up auto-generated API docs (#14285) * Adding an e2e test verifying simple keyboard navigation through blocks (#13455) * Adding an e2e test verifying simple keyboard navigation through blocks (Issue #12392) using bug resolved in #11773 as the basis for the steps * Moving `navigateToContentEditorTop`, `tabThroughParagraphBlock`, `tabThroughBlockMoverControl` and `tabThroughBlockToolbar` to the parent scope. Using pressKeyWithModifier within navigateToContentEditorTop. * Add nested blocks inside cover block (#13822) * rich-text: set up autogenerated API docs (#14220) * Add link to WordPress Support documentation (#14316) * Remove users documentation (#14318) * Fix the double dash issue (#14321) The double dash was being converted to a single dash (–) * docgen: Generate package docs in parallel (#14295) * Add new actions for invalidating resolution caches (#14225) * add new actions for invalidating resolution caches * use path array for omit * clarify logic * CC-BY-3.0 is not GPLv2 compatible. (#14329) * blocks: set up auto-generated API docs (#14279) * deprecated: set up auto-generated API docs (#14275) * priority-queue: set-up auto-generated API docs (#14262) * shortcode: set up autogenerated API docs (#14218) * viewport: set up autogenerated API docs in README (#14214) * url: set up autogenerated API docs (#14217) * redux-routine: set up autogenerated API docs (#14228) * date: set up auto-generated API docs (#14276) * block-serialization-default-parser: set up auto-generated API docs (#14280) * RichText: collapse toolbar (#14233) * RichText: collapse toolbar * Move inline image * Add balanced margin * Add tooltip * Update e2e test * Update e2e test * Remove RichTextInserterItem * Ensure there are fills before rendering * Make toggle button bigger * Use clickBlockToolbarButton * Fix e2e test * RichText: fix br padding in multiline and nesting (#14315) * RichText: fix br padding in multiline and nesting * Add e2e test * Docs: Release: Suggest lighter SVN checkout (#14259) * plugins: set up auto-generated API docs (#14263) * Move the block components to the block editor module (#14112) * wordcount: set up autogenerated API docs (#14213) * Update packages used by eslint plugin to remove warnings (#14077) * Update packages used by eslint plugin to remove warnings * Manually modify package-lock.json Props @gziolo. * Specify React version in eslint-plugin-react settings * Fix react/jsx-no-target lint errors * Try Legacy widget block (#13511) ## Description Implements: https://github.com/WordPress/gutenberg/issues/4770 This PR is a **proof of concept** of a legacy widget block. A block that allows existing WordPress widgets to be added as Gutenberg blocks. The design is similar to the one proposed by @melchoyce in https://github.com/WordPress/gutenberg/issues/4770#issuecomment-383995334 (option 1). Although it seems option two was preferred, it would require to expose each widget as a block similar to what embeds do, and it would increase the technical complexity and make testing/debugging harder, so I preferred to use option 1 for now. I will gladly iterate on the UX after this proof of concept gets more stable. ## Some technical details The available widgets are preloaded to Gutenberg similar to what happens with page templates. ### REST-API user story I want to able to pass a widget identifier to an endpoint, pass the existing widget attributes and the changes the user is making if any, and receive from the rest API, the sanitized new widget attributes ready to save and an HTML form that allows the user to edit the widget in the new state. ### REST-API endpoint A very simple REST-API endpoint was implemented. The endpoint receives the previous instance of a widget (previous attributes) the changed instance of a widget (changed attributes if any) and returns the new instance of the widget and the HTML form that allows editing this widget. There are two ajax-admin endpoints save-widget and update-widget. It looks like each one has specificities that make using it here complex. The ajax admin code would probably require some changes to be used here. Our use case is straightforward from the backend perspective as the widget does not need to be saved anywhere, and the widget is not associated with any widget area. The most straightforward approach seemed to be using a very simple endpoint. If I missed something and adapting existing endpoints is simpler feel free to comment, and I will have a look. ### Block Architecture The edit component of the block handles the start placeholder that allows selecting a widget, and the tab mechanism that allows switching between edit and preview. The preview is done using the ServerSideRender component. The edit is done using two components: **WidgetEditHandler:** Is responsible for server communication using the endpoint we created, and for keeping the required local state for the edition. Renders an update button, when pressed we retrieve from the dom the changed fields (using a method provided by WidgetEditDomManager) issues a request to the server and updates the legacy widget instance attribute with the server answer. **WidgetEditDomManager:** Component responsible for rendering the starting dom for a widget. After the first render React never rerenders the component again, the content rendered by this component is then managed by the scripts the widgets may implement. When a new instance of the form HTML is received we manually update the dom changing .widget-content (like the customizer and the widget screen) do. This component provides a method that returns an object with the widget changed attributes. When this component is mounted it triggers a widget-added event when a new update happens and the dom is changed by the component widget-update jQuery event is triggered. On front end widget are rendered with a simple call to [the_widget](https://codex.wordpress.org/Function_Reference/the_widget). ## Screenshots ![jan-25-2019 19-37-44](https://user-images.githubusercontent.com/11271197/51768637-c3b5b100-20d8-11e9-941f-00adb4c7b0a1.gif) ![jan-25-2019 18-58-49](https://user-images.githubusercontent.com/11271197/51768645-cb755580-20d8-11e9-89e7-1aa9ba7256c3.gif) ## Known problems - The block is not aware of any change inside the widget until the update button is pressed. This replicates the save button on the widgets screen. But it is annoying if we change something on the widget and go to the widget preview right away our changes are not reflected in the preview. Having an explicit update, makes testing and debugging easier, we may than explore other approaches e.g.: also save when preview happens, save on blur events, etc. - The text widget that contains TinyMCE crashes and fails to init. It calls wp.editor.initialize to reference TinyMCE and on Gutenberg, wp.editor is our editor module. This problem may have happened with meta boxes if it was solved probably the same approach may be applied. - The widget design may be affected by CSS that exists in Gutenberg, so the design of the widgets does not look the same. Ideally, Gutenberg CSS would not affect the widgets but as they are on the same page that's not the case. - Some third-party widgets using don't initialize correctly. That happens because the dom of the editor is not equal to the dom of the customizer and/or the widget screen. Some JS widgets use click events on the widgets screen to initialize while on Gutenberg these events don't happen, some check if they are on the customizer page (body contains customizer classes) before handling widget-updated events. Normally adapting a widget that does not initialize correctly is a matter of changing a very simple condition on the plugin. * Update changelog for esling-plugin (#14339) * Add ability to transform [video] shortcodes to video block (#14042) * CSS to remove the clipping of the toolbar in RTL languages (#14088) * added the more tag via the old editor's image (#14173) * Seimplify hierarchical term selector strings. (#13938) * Add: End to end test to make sure when all blocks get removed the default block appender gets inserter and selected (#14191) * Fix the Deprecated Blocks link (#14355) The *Deprecated Blocks link* was pointing to the wrong URL. * Added testcases for isKeyboardEvent in keycodes module (#14073) * Added testcases for isKeyboardEvent in keycodes module * Fixed assertion checks and updated attachEventListeners function * Added testcases for isKeyboardEvent in keycodes module * Fixed assertion checks and updated attachEventListeners function * Fix: Quote to heading transform (#14348) * Latest Comments block: use align supports flag + code cleanup (#11411) * ToggleControl allows setting custom classes (#13804) * ToggleControl allows setting custom classes Related Issue: #11349 This pull request fixes the "ToggleControl does not allow setting custom classes" problem. This lets the user to add a custom classname on the element, just like in TextControl. * Update README of toggle-control Add property className and its description * Update packages/components/src/toggle-control/README.md Formatted style of README Co-Authored-By: AmartyaU <44530193+AmartyaU@users.noreply.github.com> * Edited text of button to be actionable (#14347) * Block library: Remove all test snapshots for blocks (#14349) * Fix: Inserter impossible to collapse panels while searching. (#13884) * Make taxonomies test relieable. (#14340) * edit-post: set up autogenerated API docs (#14271) * Plugin: Remove postinstall step (#14353) * Plugin: Remove postinstall step * Framework: Run build for JS unit tests Assumed previously relied on postinstall * Add check to the merge function in headings and paragraph blocks (#13981) If trying to merge a blank heading or paragraph, if this check isn't performed, the result is the string 'Null' appearing in the text. * Update internationalization process with complete updated example. (#13909) * Update internationalization process with complete updated example. * Minor edits * Update i18n package documentation Updates with links to expanded section in Gutenberg Handbook Fixes instructions to use wp-cli which is the recommended tool for creating pot files, and po2json to convert the format. * Apply suggestions from code review Co-Authored-By: mkaz * Remove duplicate documentation, just link to Handbook * Batch of changes from reviews props @swisspiddy * :shakes-fist-at-whitespace: * Updates to include full .pot and .po files per @nosolosw review * Add JSON translation example * Fix syntax to make gutenberg build in this branch * E2E Test Utils: Add missing babel/runtime dependency (#14374) * Build: Only prompt clean if unclean (#14352) * Remove unused mobile stylesheets * Port editor refactoring for mobile * fix names (#14382) * Add withRegistry HigherOrderComponent (#14370) * Fix block validation error message (#13499) * Rename variable to make code more clear * Fix display of expected and actual block HTML The variable were in the wrong order, making the message confusing. It would show the actual HTML as the expected HTML and visa versa. * Change wording to be more clear Expected & Actual were confusing words to use in this content. This change makes the message actually reflect what the values are. * Regenerate docs * Fix: Global inserter does not validates block insert restrictions (#14020) * Teach build and start commands to use Webpack default if none is provided (#13877) * Use a default webpack config if none is provided * Extract webpack utils from build command * Update start command * Add docs * Add Webpack documentation * Add example of how to overwrite the default plugins * Do not export hasWebpackConfig as it is not used anywhere else. * Always pass webpack CLI args to command * Update README * Remove section on extending the default webpack config file * Simplify array passing Co-Authored-By: nosolosw * Simplify pushing to array Co-Authored-By: nosolosw * Fix externals docs * Use webpack instead of Webpack * Add Changelog entry * RichText: Fix prepareEditableTree (#14284) * Fix use of __experimentalCreatePrepareEditableTree without __experimentalCreateOnChangeEditableValue * Add unit tests * Add module entry point to notices package.json file (#14388) * Plugin: Remove PHP functions slated for 5.3 removal (#14380) * Make @wordpress/edit-post compatible with native * Unify styles for UnsupportedBlock after sass build default imports is fixed on native * Remove scss variables and colors import after fixing sass build in gb-mobile * RichText: change value to have separate keys for line and object formats (#13948) * Add objects and lineFormats * Update RichText * Fix image toolbar * Update format placeholder * lineFormat => lines * concatPair => mergePair * Update selectedFormat checks * Add some extra info to create docs * Move create docs inline * Merge lines and objects * Fix typos * Add getActiveObject unit tests * Update docs * Rebase * Adjust unstableToDom arguments * Remove normaliseFormats from list functions * Update native files * Update native file * Remove code formatting for mobile * RichText: try alternative list shortcuts (to tab) (#14343) * RichText: try alternative list shortcuts * Try tooltips * Change tooltips to use text * Add inline comments * Add e2e test * Rebase * Remove unused styles classes. (#14338) * [Mobile]Fix placeholder position of block appender (#14386) * Fix placeholder position of block appender * Remove unused import * Change import position * Remove unused import in css file * Remove extra container view * Update travis.yml from master branch to fix CI issues * [Mobile]Update caret position on insert link (#14317) * Update selection on text change if needed * Update caret position when editing the link * Revert putting the caret at end when we transform the selected text into link * Fix source map paths published to npm (#14409) * Components: update Button readme to add design guidelines (#14194) These changes add design documentation. Co-Authored-By: kjellr * Remove export from syntax still a proposal * Update README.md --- .github/CODEOWNERS | 21 +- .gitignore | 2 - .travis.yml | 2 + README.md | 2 +- assets/stylesheets/_mixins.scss | 4 +- assets/stylesheets/_z-index.scss | 1 + babel.config.js | 22 - bin/build-plugin-zip.sh | 31 +- bin/get-server-blocks.php | 10 +- bin/install-wordpress.sh | 2 + bin/packages/build.js | 2 +- bin/packages/get-babel-config.js | 13 +- bin/packages/get-packages.js | 38 +- bin/update-readmes.js | 71 + docs/contributors/copy-guide.md | 2 +- docs/contributors/readme.md | 2 +- docs/contributors/release.md | 78 +- docs/contributors/scripts.md | 4 +- docs/contributors/testing-overview.md | 6 + docs/designers-developers/designers/README.md | 2 +- .../backward-compatibility/deprecations.md | 6 + .../backward-compatibility/meta-box.md | 2 +- .../developers/block-api/block-edit-save.md | 2 +- .../developers/data/README.md | 3 +- .../developers/data/data-core-block-editor.md | 1050 ++++ .../developers/data/data-core-editor.md | 1101 +--- .../filters/autocomplete-filters.md | 2 +- .../developers/filters/editor-filters.md | 2 +- .../developers/internationalization.md | 245 +- .../developers/packages.md | 6 +- .../tutorials/format-api/2-toolbar-button.md | 51 + .../javascript/extending-the-block-editor.md | 2 +- .../tutorials/javascript/js-build-setup.md | 2 +- .../javascript/loading-javascript.md | 4 +- .../developers/tutorials/javascript/readme.md | 4 +- .../metabox/meta-block-2-register-meta.md | 2 +- .../tutorials/metabox/meta-block-3-add.md | 78 +- .../developers/tutorials/metabox/readme.md | 2 +- .../developers/tutorials/notices/README.md | 22 +- docs/designers-developers/faq.md | 5 +- docs/manifest.json | 20 +- docs/readme.md | 4 +- docs/tool/config.js | 7 +- docs/tool/manifest.js | 2 +- docs/users/readme.md | 0 gutenberg.php | 131 +- languages/README.md | 10 - lib/blocks.php | 142 - ...lass-wp-rest-widget-updater-controller.php | 186 + lib/client-assets.php | 643 +-- lib/compat.php | 93 - lib/i18n.php | 11 +- lib/load.php | 26 +- lib/meta-box-partial-page.php | 118 - lib/packages-dependencies.php | 26 + lib/plugin-compat.php | 33 - lib/register.php | 209 - lib/rest-api.php | 118 +- package-lock.json | 4518 ++++++++--------- package.json | 24 +- packages/a11y/README.md | 45 +- packages/a11y/package.json | 5 +- packages/a11y/src/index.js | 14 +- packages/annotations/package.json | 5 +- packages/api-fetch/CHANGELOG.md | 2 +- packages/api-fetch/package.json | 5 +- packages/autop/CHANGELOG.md | 2 +- packages/autop/README.md | 58 +- packages/autop/package.json | 5 +- packages/autop/src/index.js | 14 + .../CHANGELOG.md | 10 + .../babel-plugin-import-jsx-pragma/README.md | 2 +- .../{src => }/index.js | 36 +- .../package.json | 17 +- .../test/index.js | 42 +- packages/babel-plugin-makepot/CHANGELOG.md | 2 +- packages/babel-plugin-makepot/package.json | 8 +- packages/babel-preset-default/CHANGELOG.md | 13 +- packages/babel-preset-default/index.js | 10 +- packages/babel-preset-default/package.json | 12 +- .../test/__snapshots__/index.js.snap | 9 +- packages/babel-preset-default/test/index.js | 2 +- packages/blob/README.md | 61 + packages/blob/package.json | 5 +- packages/block-editor/.npmrc | 1 + packages/block-editor/CHANGELOG.md | 5 + packages/block-editor/README.md | 486 ++ packages/block-editor/package.json | 56 + .../src/components/alignment-toolbar/index.js | 4 +- .../test/__snapshots__/index.js.snap | 0 .../alignment-toolbar/test/index.js | 0 .../src/components/autocomplete/README.md | 0 .../src/components/autocomplete/index.js | 0 .../src/components/autocomplete/test/index.js | 0 .../src/components/block-actions/index.js | 10 +- .../block-alignment-toolbar/index.js | 7 +- .../test/__snapshots__/index.js.snap | 0 .../block-alignment-toolbar/test/index.js | 0 .../src/components/block-compare/README.md | 0 .../components/block-compare/block-view.js | 0 .../src/components/block-compare/index.js | 0 .../src/components/block-compare/style.scss | 0 .../test/__snapshots__/block-view.js.snap | 0 .../block-compare/test/block-view.js | 0 .../src/components/block-controls/index.js | 0 .../test/__snapshots__/index.js.snap | 45 + .../components/block-controls/test/index.js | 17 +- .../src/components/block-draggable/index.js | 2 +- .../src/components/block-drop-zone/README.md | 0 .../src/components/block-drop-zone/index.js | 4 +- .../src/components/block-drop-zone/style.scss | 0 .../src/components/block-edit/context.js | 0 .../src/components/block-edit/edit.js | 0 .../src/components/block-edit/edit.native.js | 0 .../src/components/block-edit/index.js | 0 .../src/components/block-edit/test/edit.js | 7 +- .../block-editor-keyboard-shortcuts/index.js | 158 + .../components/block-format-controls/index.js | 0 .../src/components/block-icon/index.js | 0 .../src/components/block-icon/style.scss | 0 .../src/components/block-icon/test/index.js | 0 .../src/components/block-inspector/index.js | 2 +- .../src/components/block-inspector/style.scss | 0 .../components/block-list-appender/index.js | 2 +- .../components/block-list-appender/style.scss | 0 .../block-list/block-contextual-toolbar.js | 0 .../block-list/block-crash-boundary.js | 0 .../block-list/block-crash-warning.js | 0 .../src/components/block-list/block-html.js | 4 +- .../block-list/block-invalid-warning.js | 4 +- .../block-list/block-mobile-toolbar.js | 0 .../src/components/block-list/block.js | 26 +- .../src/components/block-list/breadcrumb.js | 2 +- .../src/components/block-list/hover-area.js | 2 +- .../src/components/block-list/index.js | 4 +- .../components/block-list/insertion-point.js | 2 +- .../components/block-list/multi-controls.js | 2 +- .../src/components/block-list/style.scss | 0 .../components/block-list/test/block-html.js | 0 .../src/components/block-mover/drag-handle.js | 0 .../src/components/block-mover/icons.js | 0 .../src/components/block-mover/index.js | 4 +- .../block-mover/mover-description.js | 0 .../src/components/block-mover/style.scss | 6 +- .../src/components/block-mover/test/index.js | 4 +- .../block-mover/test/mover-description.js | 0 .../components/block-navigation/dropdown.js | 13 +- .../src/components/block-navigation/index.js | 7 +- .../components/block-navigation/style.scss | 0 .../src/components/block-preview/index.js | 0 .../src/components/block-preview/style.scss | 0 .../block-selection-clearer/index.js | 4 +- .../block-convert-button.js | 0 .../block-html-convert-button.js | 4 +- .../block-settings-menu/block-mode-toggle.js | 4 +- .../block-settings-menu-first-item.js | 0 .../block-settings-menu-plugins-extension.js | 0 .../block-unknown-convert-button.js | 4 +- .../components/block-settings-menu/index.js | 4 +- .../reusable-block-convert-button.js | 2 + .../reusable-block-delete-button.js | 9 +- .../components/block-settings-menu/style.scss | 0 .../reusable-block-delete-button.js.snap | 0 .../test/block-mode-toggle.js | 0 .../test/reusable-block-convert-button.js | 0 .../test/reusable-block-delete-button.js | 0 .../src/components/block-styles/index.js | 4 +- .../src/components/block-styles/style.scss | 0 .../src/components/block-styles/test/index.js | 0 .../src/components/block-switcher/index.js | 4 +- .../block-switcher/multi-blocks-switcher.js | 2 +- .../src/components/block-switcher/style.scss | 0 .../test/__snapshots__/index.js.snap | 4 +- .../multi-blocks-switcher.js.snap | 0 .../components/block-switcher/test/index.js | 4 +- .../test/multi-blocks-switcher.js | 0 .../src/components/block-title/README.md | 0 .../src/components/block-title/index.js | 2 +- .../src/components/block-title/test/index.js | 0 .../src/components/block-toolbar/index.js | 2 +- .../src/components/block-toolbar/style.scss | 0 .../src/components/block-types-list/index.js | 0 .../components/block-types-list/style.scss | 0 .../src/components/color-palette/control.js | 0 .../src/components/color-palette/control.scss | 0 .../src/components/color-palette/index.js | 0 .../test/__snapshots__/control.js.snap | 0 .../components/color-palette/test/control.js | 0 .../color-palette/with-color-context.js | 2 +- .../src/components/colors/index.js | 0 .../test/__snapshots__/with-colors.js.snap | 0 .../src/components/colors/test/with-colors.js | 0 .../src/components/colors/utils.js | 0 .../src/components/colors/with-colors.js | 2 +- .../src/components/contrast-checker/index.js | 0 .../components/contrast-checker/style.scss | 0 .../test/__snapshots__/index.js.snap | 0 .../components/contrast-checker/test/index.js | 0 .../src/components/copy-handler/index.js | 4 +- .../default-block-appender/index.js | 6 +- .../default-block-appender/index.native.js | 6 +- .../default-block-appender/style.native.scss | 0 .../default-block-appender/style.scss | 0 .../test/__snapshots__/index.js.snap | 7 +- .../default-block-appender/test/index.js | 0 .../components/font-sizes/font-size-picker.js | 2 +- .../src/components/font-sizes/index.js | 0 .../src/components/font-sizes/index.native.js | 0 .../src/components/font-sizes/style.scss | 0 .../src/components/font-sizes/utils.js | 0 .../components/font-sizes/with-font-sizes.js | 2 +- .../components/ignore-nested-events/index.js | 0 .../ignore-nested-events/test/index.js | 0 packages/block-editor/src/components/index.js | 57 + .../src/components/index.native.js | 22 + .../src/components/inner-blocks/README.md | 2 +- .../src/components/inner-blocks/index.js | 4 +- .../src/components/inner-blocks/style.scss | 0 .../test/__snapshots__/index.js.snap | 0 .../src/components/inner-blocks/test/index.js | 0 .../components/inserter-list-item/index.js | 0 .../components/inserter-list-item/style.scss | 0 .../inserter-with-shortcuts/index.js | 6 +- .../inserter-with-shortcuts/style.scss | 0 .../src/components/inserter/child-blocks.js | 2 +- .../src/components/inserter/index.js | 7 +- .../src/components/inserter/menu.js | 120 +- .../src/components/inserter/style.scss | 0 .../src/components/inserter/test/menu.js | 0 .../inspector-advanced-controls/index.js | 0 .../components/inspector-controls/README.md | 0 .../components/inspector-controls/index.js | 0 .../components/media-placeholder/README.md | 0 .../src/components/media-placeholder/index.js | 38 +- .../media-placeholder/index.native.js | 0 .../components/media-placeholder/style.scss | 0 .../media-placeholder/styles.native.scss | 0 .../media-placeholder/test/index.js | 0 .../src/components/media-upload/README.md | 2 +- .../src/components/media-upload/check.js | 0 .../src/components/media-upload/index.js | 0 .../multi-select-scroll-into-view/index.js | 2 +- .../multi-selection-inspector/index.js | 2 +- .../multi-selection-inspector/style.scss | 0 .../src/components/navigable-toolbar/index.js | 0 .../src/components/observe-typing/README.md | 0 .../src/components/observe-typing/index.js | 4 +- .../components/panel-color-settings/index.js | 0 .../panel-color-settings/style.scss | 0 .../test/__snapshots__/index.js.snap | 0 .../panel-color-settings/test/index.js | 0 .../src/components/plain-text/README.md | 0 .../src/components/plain-text/index.js | 0 .../src/components/plain-text/index.native.js | 0 .../components/plain-text/style.native.scss | 2 - .../src/components/plain-text/style.scss | 0 .../preserve-scroll-in-reorder/index.js | 4 +- .../src/components/provider/index.js | 130 + .../src/components/provider/index.native.js | 150 + .../src/components/rich-text/README.md | 2 +- .../src/components/rich-text/aria.js | 0 .../src/components/rich-text/editable.js | 0 .../src/components/rich-text/format-edit.js | 13 +- .../rich-text/format-toolbar/index.js | 36 + .../rich-text/format-toolbar/index.native.js | 0 .../rich-text/format-toolbar/style.scss | 4 + .../src/components/rich-text/index.js | 169 +- .../src/components/rich-text/index.native.js | 17 +- .../src/components/rich-text/input-event.js | 0 .../rich-text/input-event.native.js | 0 .../src/components/rich-text/list-edit.js | 4 +- .../src/components/rich-text/patterns.js | 5 +- .../rich-text/remove-browser-shortcuts.js | 0 .../src/components/rich-text/shortcut.js | 0 .../components/rich-text/shortcut.native.js | 0 .../components/rich-text/style.native.scss | 2 - .../src/components/rich-text/style.scss | 0 .../src/components/rich-text/test/index.js | 0 .../components/rich-text/toolbar-button.js | 0 .../skip-to-selected-block/index.js | 2 +- .../skip-to-selected-block/style.scss | 0 .../src/components/url-input/README.md | 0 .../src/components/url-input/button.js | 0 .../src/components/url-input/index.js | 0 .../src/components/url-input/index.native.js | 0 .../src/components/url-input/style.scss | 0 .../src/components/url-input/test/button.js | 6 +- .../src/components/url-popover/README.md | 2 +- .../src/components/url-popover/index.js | 2 +- .../src/components/url-popover/style.scss | 59 + .../test/__snapshots__/index.js.snap | 8 +- .../src/components/url-popover/test/index.js | 0 .../src/components/warning/index.js | 0 .../src/components/warning/style.scss | 0 .../warning/test/__snapshots__/index.js.snap | 0 .../src/components/warning/test/index.js | 0 .../src/components/writing-flow/index.js | 4 +- .../src/components/writing-flow/style.scss | 0 .../src/components/writing-flow/test/index.js | 0 .../src/hooks/align.js | 4 +- .../src/hooks/anchor.js | 0 .../src/hooks/custom-class-name.js | 0 .../src/hooks/custom-class-name.native.js | 0 .../src/hooks/generated-class-name.js | 0 packages/block-editor/src/hooks/index.js | 7 + .../block-editor/src/hooks/index.native.js | 5 + .../src/hooks/test/align.js | 0 .../src/hooks/test/anchor.js | 0 .../src/hooks/test/custom-class-name.js | 0 .../src/hooks/test/generated-class-name.js | 0 packages/block-editor/src/index.js | 18 + packages/block-editor/src/store/actions.js | 555 ++ .../src/store/array.js | 0 packages/block-editor/src/store/controls.js | 30 + packages/block-editor/src/store/defaults.js | 140 + packages/block-editor/src/store/effects.js | 147 + packages/block-editor/src/store/index.js | 29 + .../block-editor/src/store/middlewares.js | 45 + packages/block-editor/src/store/reducer.js | 933 ++++ packages/block-editor/src/store/selectors.js | 1395 +++++ .../block-editor/src/store/test/actions.js | 349 ++ .../src/store/test/array.js | 0 .../block-editor/src/store/test/effects.js | 280 + .../block-editor/src/store/test/reducer.js | 1801 +++++++ .../block-editor/src/store/test/selectors.js | 2321 +++++++++ packages/block-editor/src/style.scss | 33 + .../{editor => block-editor}/src/utils/dom.js | 0 .../src/utils/test/dom.js | 0 packages/block-library/CHANGELOG.md | 2 +- packages/block-library/README.md | 15 +- packages/block-library/package.json | 7 +- packages/block-library/src/archives/edit.js | 8 +- packages/block-library/src/audio/edit.js | 4 +- packages/block-library/src/audio/index.js | 2 +- .../audio/test/__snapshots__/index.js.snap | 85 - .../block-library/src/audio/test/index.js | 13 - packages/block-library/src/block/edit.js | 11 +- packages/block-library/src/button/edit.js | 2 +- packages/block-library/src/button/index.js | 2 +- .../button/test/__snapshots__/index.js.snap | 42 - .../block-library/src/button/test/index.js | 13 - packages/block-library/src/calendar/edit.js | 11 +- packages/block-library/src/calendar/index.php | 22 +- packages/block-library/src/categories/edit.js | 4 +- .../block-library/src/classic/editor.scss | 13 +- .../classic/test/__snapshots__/index.js.snap | 15 - .../block-library/src/classic/test/index.js | 13 - packages/block-library/src/code/edit.js | 2 +- .../block-library/src/code/edit.native.js | 2 +- .../src/code/test/__snapshots__/index.js.snap | 14 - packages/block-library/src/code/test/index.js | 13 - .../block-library/src/code/theme.native.scss | 2 - packages/block-library/src/columns/column.js | 2 +- packages/block-library/src/columns/index.js | 2 +- packages/block-library/src/cover/edit.js | 367 ++ packages/block-library/src/cover/editor.scss | 22 +- packages/block-library/src/cover/index.js | 387 +- packages/block-library/src/cover/style.scss | 17 + .../cover/test/__snapshots__/index.js.snap | 75 - .../block-library/src/cover/test/index.js | 13 - packages/block-library/src/editor.scss | 1 + .../block-library/src/embed/embed-controls.js | 2 +- .../src/embed/embed-placeholder.js | 2 +- .../block-library/src/embed/embed-preview.js | 9 +- packages/block-library/src/embed/settings.js | 2 +- packages/block-library/src/file/edit.js | 4 +- packages/block-library/src/file/index.js | 4 +- packages/block-library/src/file/inspector.js | 2 +- packages/block-library/src/gallery/edit.js | 4 +- .../src/gallery/gallery-image.js | 2 +- packages/block-library/src/gallery/index.js | 3 +- .../gallery/test/__snapshots__/index.js.snap | 78 - .../block-library/src/gallery/test/index.js | 13 - packages/block-library/src/heading/edit.js | 7 +- .../block-library/src/heading/edit.native.js | 2 +- packages/block-library/src/heading/index.js | 4 +- .../heading/test/__snapshots__/index.js.snap | 34 - .../block-library/src/heading/test/index.js | 11 +- packages/block-library/src/html/edit.js | 7 +- .../src/html/test/__snapshots__/index.js.snap | 14 - packages/block-library/src/html/test/index.js | 13 - packages/block-library/src/image/edit.js | 8 +- .../block-library/src/image/edit.native.js | 2 + packages/block-library/src/image/index.js | 2 +- .../src/image/styles.native.scss | 2 - packages/block-library/src/index.js | 14 + .../block-library/src/latest-comments/edit.js | 22 +- .../src/latest-comments/index.js | 13 +- .../src/latest-comments/index.php | 8 +- .../block-library/src/latest-posts/edit.js | 4 +- .../src/latest-posts/editor.scss | 3 + .../src/legacy-widget/WidgetEditDomManager.js | 143 + .../src/legacy-widget/WidgetEditHandler.js | 122 + .../block-library/src/legacy-widget/edit.js | 195 + .../src/legacy-widget/editor.scss | 25 + .../block-library/src/legacy-widget/index.js | 33 + .../block-library/src/legacy-widget/index.php | 78 + packages/block-library/src/list/index.js | 2 +- .../src/list/test/__snapshots__/index.js.snap | 38 - packages/block-library/src/list/test/index.js | 13 - packages/block-library/src/media-text/edit.js | 2 +- .../block-library/src/media-text/index.js | 2 +- .../src/media-text/media-container.js | 2 +- packages/block-library/src/missing/index.js | 4 +- packages/block-library/src/more/edit.js | 2 +- .../block-library/src/more/edit.native.js | 2 +- .../src/more/test/__snapshots__/index.js.snap | 13 - packages/block-library/src/more/test/index.js | 13 - .../src/nextpage/editor.native.scss | 2 - .../nextpage/test/__snapshots__/index.js.snap | 11 - .../block-library/src/nextpage/test/index.js | 13 - packages/block-library/src/paragraph/edit.js | 6 +- .../src/paragraph/edit.native.js | 2 +- packages/block-library/src/paragraph/index.js | 4 +- .../test/__snapshots__/index.js.snap | 38 - .../block-library/src/paragraph/test/index.js | 13 - .../block-library/src/preformatted/index.js | 2 +- .../test/__snapshots__/index.js.snap | 34 - .../src/preformatted/test/index.js | 13 - packages/block-library/src/pullquote/edit.js | 2 +- packages/block-library/src/pullquote/index.js | 4 +- .../test/__snapshots__/index.js.snap | 44 - .../block-library/src/pullquote/test/index.js | 13 - packages/block-library/src/quote/index.js | 36 +- .../quote/test/__snapshots__/index.js.snap | 42 - .../block-library/src/quote/test/index.js | 13 - packages/block-library/src/rss/edit.js | 2 +- packages/block-library/src/search/edit.js | 2 +- .../test/__snapshots__/index.js.snap | 7 - .../block-library/src/separator/test/index.js | 13 - packages/block-library/src/shortcode/index.js | 2 +- .../test/__snapshots__/index.js.snap | 33 - .../block-library/src/shortcode/test/index.js | 13 - packages/block-library/src/spacer/index.js | 2 +- packages/block-library/src/subhead/index.js | 2 +- packages/block-library/src/table/edit.js | 2 +- packages/block-library/src/table/index.js | 8 +- .../table/test/__snapshots__/index.js.snap | 54 - .../block-library/src/table/test/index.js | 13 - packages/block-library/src/tag-cloud/edit.js | 2 +- packages/block-library/src/template/index.js | 2 +- .../block-library/src/test/helpers/index.js | 32 - .../block-library/src/text-columns/index.js | 2 +- .../test/__snapshots__/index.js.snap | 76 - .../src/text-columns/test/index.js | 16 - packages/block-library/src/verse/index.js | 2 +- .../verse/test/__snapshots__/index.js.snap | 34 - .../block-library/src/verse/test/index.js | 13 - packages/block-library/src/video/edit.js | 4 +- packages/block-library/src/video/index.js | 38 +- .../video/test/__snapshots__/index.js.snap | 85 - .../block-library/src/video/test/index.js | 13 - .../README.md | 45 +- .../package.json | 5 +- .../src/index.js | 77 + .../test/index.js | 3 +- .../CHANGELOG.md | 10 +- .../block-serialization-spec-parser/index.js | 2 - .../package.json | 11 +- .../test/index.js | 3 +- packages/blocks/CHANGELOG.md | 2 +- packages/blocks/README.md | 751 ++- packages/blocks/package.json | 5 +- .../raw-handling/google-docs-uid-remover.js | 12 + .../src/api/raw-handling/paste-handler.js | 4 +- packages/blocks/src/api/raw-handling/utils.js | 10 +- packages/blocks/src/api/validation.js | 20 +- packages/browserslist-config/package.json | 5 +- packages/components/CHANGELOG.md | 2 +- packages/components/package.json | 5 +- packages/components/src/button/README.md | 123 +- .../components/src/button/__mocks__/index.js | 17 - .../test/__snapshots__/index.js.snap | 8 +- .../src/color-palette/test/index.js | 2 - .../components/src/date-time/test/date.js | 2 - .../components/src/dropdown-menu/index.js | 2 + .../components/src/external-link/index.js | 2 +- .../src/focal-point-picker/index.js | 4 +- .../src/form-file-upload/test/index.js | 2 +- packages/components/src/form-toggle/README.md | 14 - packages/components/src/icon-button/index.js | 94 +- .../components/src/icon-button/test/index.js | 31 +- .../test/__snapshots__/index.js.snap | 16 +- .../components/src/menu-item/test/index.js | 2 - .../notice/test/__snapshots__/index.js.snap | 2 +- packages/components/src/panel/test/body.js | 2 - .../components/src/placeholder/style.scss | 1 + .../components/src/slot-fill/test/index.js | 4 +- .../components/src/toggle-control/README.md | 7 + .../components/src/toggle-control/index.js | 5 +- packages/compose/README.md | 128 +- packages/compose/package.json | 5 +- packages/core-data/package.json | 5 +- .../package.json | 8 +- packages/data/CHANGELOG.md | 4 +- packages/data/package.json | 5 +- .../src/components/with-registry/index.js | 33 + packages/data/src/index.js | 1 + .../data/src/plugins/persistence/index.js | 33 +- packages/data/src/store/actions.js | 36 + packages/data/src/store/reducer.js | 42 +- packages/data/src/store/test/reducer.js | 49 + packages/date/README.md | 106 + packages/date/package.json | 5 +- packages/deprecated/README.md | 56 +- packages/deprecated/package.json | 5 +- packages/deprecated/src/index.js | 14 + packages/docgen/.npmrc | 1 + packages/docgen/CHANGELOG.md | 3 + packages/docgen/README.md | 250 + packages/docgen/bin/cli.js | 44 + packages/docgen/coverage.md | 83 + packages/docgen/package.json | 34 + packages/docgen/src/engine.js | 56 + packages/docgen/src/get-dependency-path.js | 3 + packages/docgen/src/get-export-entries.js | 97 + .../src/get-intermediate-representation.js | 152 + packages/docgen/src/get-jsdoc-from-token.js | 37 + packages/docgen/src/get-leading-comments.js | 20 + packages/docgen/src/get-type-as-string.js | 44 + packages/docgen/src/index.js | 128 + packages/docgen/src/markdown/embed.js | 51 + packages/docgen/src/markdown/formatter.js | 128 + packages/docgen/src/markdown/index.js | 44 + packages/docgen/src/test/engine.js | 11 + .../fixtures/default-class-anonymous/code.js | 4 + .../default-class-anonymous/exports.json | 82 + .../test/fixtures/default-class-named/code.js | 4 + .../fixtures/default-class-named/exports.json | 101 + .../default-function-anonymous/code.js | 4 + .../default-function-anonymous/exports.json | 85 + .../fixtures/default-function-named/ast.json | 148 + .../fixtures/default-function-named/code.js | 4 + .../default-function-named/exports.json | 104 + .../fixtures/default-function-named/ir.json | 7 + .../test/fixtures/default-identifier/ast.json | 165 + .../test/fixtures/default-identifier/code.js | 6 + .../fixtures/default-identifier/exports.json | 39 + .../fixtures/default-import-default/ast.json | 143 + .../fixtures/default-import-default/code.js | 6 + .../default-import-default/exports.json | 39 + .../default-import-default/module-code.js | 6 + .../default-import-default/module-ir.json | 7 + .../fixtures/default-import-named/ast.json | 163 + .../fixtures/default-import-named/code.js | 6 + .../default-import-named/exports.json | 39 + .../default-import-named/module-code.js | 6 + .../default-import-named/module-ir.json | 1 + .../fixtures/default-named-export/ast.json | 189 + .../fixtures/default-named-export/code.js | 6 + .../default-named-export/exports.json | 147 + .../default-undocumented-nocomments/code.js | 3 + .../exports.json | 39 + .../default-undocumented-oneliner/code.js | 2 + .../exports.json | 85 + .../test/fixtures/default-variable/code.js | 4 + .../fixtures/default-variable/exports.json | 62 + .../docgen/src/test/fixtures/markdown/code.js | 24 + .../docgen/src/test/fixtures/markdown/docs.md | 41 + .../src/test/fixtures/named-class/code.js | 4 + .../test/fixtures/named-class/exports.json | 103 + .../fixtures/named-default-exported/code.js | 1 + .../named-default-exported/exports.json | 102 + .../named-default-exported/module-code.js | 4 + .../named-default-exported/module-ir.json | 5 + .../src/test/fixtures/named-default/code.js | 1 + .../test/fixtures/named-default/exports.json | 102 + .../fixtures/named-default/module-code.js | 4 + .../fixtures/named-default/module-ir.json | 5 + .../src/test/fixtures/named-function/code.js | 4 + .../test/fixtures/named-function/exports.json | 106 + .../src/test/fixtures/named-function/ir.json | 7 + .../named-identifier-destructuring/ast.json | 381 ++ .../named-identifier-destructuring/code.js | 6 + .../exports.json | 82 + .../test/fixtures/named-identifier/ast.json | 211 + .../test/fixtures/named-identifier/code.js | 6 + .../fixtures/named-identifier/exports.json | 82 + .../named-identifiers-and-inline/ast.json | 561 ++ .../named-identifiers-and-inline/code.js | 17 + .../named-identifiers-and-inline/exports.json | 290 ++ .../test/fixtures/named-identifiers/ast.json | 599 +++ .../test/fixtures/named-identifiers/code.js | 16 + .../fixtures/named-identifiers/exports.json | 200 + .../test/fixtures/named-identifiers/ir.json | 1 + .../test/fixtures/named-import-named/code.js | 5 + .../fixtures/named-import-named/exports.json | 220 + .../fixtures/named-import-namespace/ast.json | 186 + .../fixtures/named-import-namespace/code.js | 6 + .../named-import-namespace/exports.json | 82 + .../named-import-namespace/module-code.js | 1 + .../module-exports.json | 102 + .../named-import-namespace/module-ir.json | 1 + .../src/test/fixtures/named-variable/code.js | 5 + .../test/fixtures/named-variable/exports.json | 125 + .../src/test/fixtures/named-variables/code.js | 6 + .../fixtures/named-variables/exports.json | 185 + .../test/fixtures/namespace-commented/code.js | 4 + .../fixtures/namespace-commented/exports.json | 62 + .../namespace-commented/module-ir.json | 22 + .../fixtures/namespace-commented/module.js | 19 + .../src/test/fixtures/namespace/code.js | 1 + .../src/test/fixtures/namespace/exports.json | 40 + .../test/fixtures/namespace/module-ir.json | 22 + .../src/test/fixtures/namespace/module.js | 19 + .../src/test/fixtures/tags-function/code.js | 24 + .../test/fixtures/tags-function/exports.json | 269 + .../src/test/fixtures/tags-variable/code.js | 7 + .../test/fixtures/tags-variable/exports.json | 125 + .../docgen/src/test/formatter-markdown.js | 34 + .../docgen/src/test/get-export-entries.js | 352 ++ .../test/get-intermediate-representation.js | 454 ++ .../docgen/src/test/get-jsdoc-from-token.js | 78 + .../docgen/src/test/get-type-as-string.js | 108 + packages/dom-ready/README.md | 27 +- packages/dom-ready/package.json | 5 +- packages/dom-ready/src/index.js | 9 + packages/dom/CHANGELOG.md | 2 +- packages/dom/README.md | 258 + packages/dom/package.json | 5 +- packages/dom/src/index.js | 4 + packages/e2e-test-utils/CHANGELOG.md | 2 +- packages/e2e-test-utils/README.md | 165 +- packages/e2e-test-utils/package.json | 11 +- .../src/click-block-toolbar-button.js | 15 + packages/e2e-test-utils/src/index.js | 2 + .../e2e-test-utils/src/is-in-default-block.js | 22 + packages/e2e-tests/CHANGELOG.md | 2 +- .../e2e-tests/config/setup-test-framework.js | 7 +- .../fixtures/blocks/core__cover.html | 17 +- .../fixtures/blocks/core__cover.json | 21 +- .../fixtures/blocks/core__cover.parsed.json | 22 +- .../blocks/core__cover.serialized.html | 6 +- .../blocks/core__cover__video-overlay.html | 22 +- .../blocks/core__cover__video-overlay.json | 21 +- .../core__cover__video-overlay.parsed.json | 22 +- ...core__cover__video-overlay.serialized.html | 6 +- .../fixtures/blocks/core__cover__video.html | 21 +- .../fixtures/blocks/core__cover__video.json | 21 +- .../blocks/core__cover__video.parsed.json | 22 +- .../blocks/core__cover__video.serialized.html | 6 +- .../fixtures/blocks/core__legacy-widget.html | 1 + .../fixtures/blocks/core__legacy-widget.json | 10 + .../blocks/core__legacy-widget.parsed.json | 18 + .../core__legacy-widget.serialized.html | 1 + .../e2e-tests/fixtures/blocks/core__rss.html | 2 +- .../e2e-tests/fixtures/blocks/core__rss.json | 11 +- .../fixtures/blocks/core__rss.parsed.json | 4 +- .../fixtures/blocks/core__rss.serialized.html | 2 +- .../fixtures/blocks/core__search.json | 6 +- .../blocks/core__search__custom-text.html | 2 +- .../blocks/core__search__custom-text.json | 6 +- .../core__search__custom-text.parsed.json | 4 +- .../core__search__custom-text.serialized.html | 2 +- .../core__tag-cloud__showTagCounts.html | 2 +- ...__tag-cloud__showTagCounts.serialized.html | 2 +- packages/e2e-tests/jest.config.js | 9 +- packages/e2e-tests/package.json | 12 +- packages/e2e-tests/plugins/allowed-blocks.php | 24 + .../e2e-tests/plugins/disable-animations.php | 2 +- .../__snapshots__/block-deletion.test.js.snap | 4 +- .../compatibility-classic-editor.test.js.snap | 2 +- .../__snapshots__/writing-flow.test.js.snap | 10 +- .../specs/adding-inline-tokens.test.js | 6 +- .../e2e-tests/specs/block-deletion.test.js | 24 +- .../specs/block-hierarchy-navigation.test.js | 8 +- .../blocks/__snapshots__/list.test.js.snap | 44 +- .../blocks/__snapshots__/quote.test.js.snap | 108 +- packages/e2e-tests/specs/blocks/list.test.js | 62 +- .../specs/blocks/preformatted.test.js | 3 + packages/e2e-tests/specs/blocks/quote.test.js | 35 +- .../e2e-tests/specs/change-detection.test.js | 4 +- .../compatibility-classic-editor.test.js | 2 +- packages/e2e-tests/specs/demo.test.js | 2 +- .../e2e-tests/specs/invalid-block.test.js | 5 +- .../specs/keyboard-navigable-blocks.test.js | 167 + packages/e2e-tests/specs/links.test.js | 18 +- .../specs/manage-reusable-blocks.test.js | 18 +- .../__snapshots__/format-api.test.js.snap | 2 +- .../specs/plugins/allowed-blocks.test.js | 36 + .../specs/plugins/container-blocks.test.js | 1 + .../specs/plugins/format-api.test.js | 14 +- .../e2e-tests/specs/reusable-blocks.test.js | 19 +- .../e2e-tests/specs/splitting-merging.test.js | 12 +- .../e2e-tests/specs/style-variation.test.js | 14 +- packages/e2e-tests/specs/taxonomies.test.js | 22 +- packages/e2e-tests/specs/writing-flow.test.js | 8 + packages/edit-post/README.md | 483 +- packages/edit-post/package.json | 7 +- .../plugin-block-settings-menu-group.js | 2 +- .../plugin-block-settings-menu-item.js | 53 + .../components/header/header-toolbar/index.js | 14 +- .../edit-post/src/components/header/index.js | 2 +- .../test/__snapshots__/index.js.snap | 8 +- .../components/header/more-menu/test/index.js | 2 - .../header/plugin-more-menu-item/index.js | 54 + .../plugin-sidebar-more-menu-item/index.js | 45 + .../components/keyboard-shortcuts/index.js | 2 +- .../edit-post/src/components/layout/index.js | 2 +- .../src/components/options-modal/index.js | 8 +- .../options-modal/meta-boxes-section.js | 1 + .../plugin-post-publish-panel/index.js | 47 + .../plugin-post-publish-panel/test/index.js | 2 - .../sidebar/plugin-post-status-info/index.js | 42 + .../sidebar/plugin-pre-publish-panel/index.js | 47 + .../plugin-pre-publish-panel/test/index.js | 2 - .../sidebar/plugin-sidebar/index.js | 71 +- .../sidebar/settings-header/index.js | 2 +- .../sidebar/settings-header/style.scss | 19 +- .../sidebar/settings-sidebar/index.js | 2 +- .../src/components/sidebar/style.scss | 18 +- .../src/components/visual-editor/index.js | 10 +- packages/edit-post/src/editor.js | 93 +- .../hooks/components/media-upload/index.js | 70 +- .../src/hooks/validate-multiple-use/index.js | 6 +- packages/edit-post/src/index.js | 1 + packages/edit-post/src/index.native.js | 32 + .../edit-post/src/prevent-event-discovery.js | 2 +- packages/edit-post/src/store/effects.js | 4 +- packages/edit-post/src/store/index.native.js | 25 + packages/edit-widgets/CHANGELOG.md | 2 +- packages/edit-widgets/package.json | 5 +- packages/editor/CHANGELOG.md | 3 +- packages/editor/package.json | 12 +- .../src/components/autocompleters/block.js | 12 +- .../src/components/autosave-monitor/index.js | 3 +- .../test/__snapshots__/index.js.snap | 32 - packages/editor/src/components/deprecated.js | 119 + .../src/components/deprecated.native.js | 47 + .../src/components/document-outline/check.js | 2 +- .../src/components/document-outline/index.js | 9 +- .../src/components/document-outline/item.js | 12 +- .../components/document-outline/style.scss | 10 + .../components/document-outline/test/index.js | 4 +- .../src/components/error-boundary/index.js | 6 +- .../save-shortcut.js | 4 +- .../visual-editor-shortcuts.js | 150 +- packages/editor/src/components/index.js | 57 +- .../editor/src/components/index.native.js | 27 +- .../components/inserter/inline-elements.js | 35 - .../keyboard-avoiding-view.native.js | 28 +- .../mobile/unsupported-block/edit.js | 24 + .../mobile/unsupported-block/index.js | 43 + .../mobile/unsupported-block/style.scss | 18 + .../components/page-attributes/test/check.js | 6 +- .../components/post-featured-image/index.js | 3 +- .../src/components/post-locked-modal/index.js | 4 +- .../test/__snapshots__/index.js.snap | 8 +- .../post-preview-button/test/index.js | 2 - .../post-publish-button/test/index.js | 4 +- .../test/__snapshots__/index.js.snap | 10 +- .../hierarchical-term-selector.js | 22 +- .../src/components/post-text-editor/index.js | 6 +- .../editor/src/components/post-title/index.js | 9 +- .../src/components/post-title/index.native.js | 9 +- .../components/post-title/style.native.scss | 2 - .../editor/src/components/provider/index.js | 151 +- .../rich-text/format-toolbar/index.js | 20 - .../rich-text/inserter-list-item.js | 38 - .../src/components/table-of-contents/index.js | 6 +- .../src/components/table-of-contents/panel.js | 6 +- .../template-validation-notice/index.js | 4 +- .../src/components/url-popover/style.scss | 27 - packages/editor/src/hooks/index.js | 4 - packages/editor/src/hooks/index.native.js | 5 - packages/editor/src/index.js | 1 + packages/editor/src/store/actions.js | 895 ++-- packages/editor/src/store/constants.js | 12 + packages/editor/src/store/controls.js | 107 +- packages/editor/src/store/defaults.js | 142 +- packages/editor/src/store/effects.js | 179 +- packages/editor/src/store/effects/posts.js | 319 -- .../src/store/effects/reusable-blocks.js | 41 +- .../src/store/effects/test/reusable-blocks.js | 157 +- packages/editor/src/store/index.js | 8 +- packages/editor/src/store/reducer.js | 639 +-- packages/editor/src/store/selectors.js | 1860 ++----- packages/editor/src/store/test/actions.js | 1043 ++-- packages/editor/src/store/test/effects.js | 501 +- packages/editor/src/store/test/reducer.js | 2143 +------- packages/editor/src/store/test/selectors.js | 3452 ++----------- .../editor/src/store/utils/notice-builder.js | 123 + .../src/store/utils/test/notice-builder.js | 182 + packages/editor/src/style.scss | 33 - .../editor/src/utils/media-upload/index.js | 5 +- packages/element/README.md | 259 +- packages/element/package.json | 5 +- packages/element/src/react.js | 6 + packages/escape-html/README.md | 114 + packages/escape-html/package.json | 5 +- packages/eslint-plugin/CHANGELOG.md | 10 +- packages/eslint-plugin/configs/custom.js | 5 + packages/eslint-plugin/configs/es5.js | 1 + packages/eslint-plugin/package.json | 9 +- packages/format-library/package.json | 6 +- packages/format-library/src/bold/index.js | 2 +- packages/format-library/src/code/index.js | 25 +- .../format-library/src/default-formats.js | 2 + .../src/default-formats.native.js | 2 - packages/format-library/src/image/index.js | 25 +- packages/format-library/src/italic/index.js | 2 +- packages/format-library/src/link/index.js | 2 +- .../format-library/src/link/index.native.js | 2 +- packages/format-library/src/link/inline.js | 2 +- .../format-library/src/strikethrough/index.js | 3 +- .../format-library/src/underline/index.js | 2 +- packages/hooks/package.json | 5 +- packages/html-entities/README.md | 28 + packages/html-entities/package.json | 5 +- packages/html-entities/src/index.js | 13 + packages/i18n/README.md | 133 +- packages/i18n/package.json | 5 +- packages/i18n/src/index.js | 2 +- packages/is-shallow-equal/CHANGELOG.md | 2 +- packages/is-shallow-equal/package.json | 5 +- packages/jest-console/CHANGELOG.md | 8 +- packages/jest-console/README.md | 12 +- packages/jest-console/package.json | 12 +- packages/jest-preset-default/CHANGELOG.md | 12 + packages/jest-preset-default/README.md | 16 +- packages/jest-preset-default/jest-preset.json | 9 +- packages/jest-preset-default/package.json | 18 +- .../scripts/setup-test-framework.js | 3 - packages/jest-puppeteer-axe/CHANGELOG.md | 2 +- packages/jest-puppeteer-axe/README.md | 12 +- packages/jest-puppeteer-axe/package.json | 12 +- packages/keycodes/README.md | 169 + packages/keycodes/package.json | 5 +- packages/keycodes/src/index.js | 62 +- packages/keycodes/src/test/index.js | 244 + .../package.json | 8 +- packages/list-reusable-blocks/package.json | 5 +- packages/notices/CHANGELOG.md | 1 - packages/notices/package.json | 6 +- .../npm-package-json-lint-config/CHANGELOG.md | 8 +- .../npm-package-json-lint-config/index.js | 1 + .../npm-package-json-lint-config/package.json | 10 +- packages/nux/package.json | 5 +- .../dot-tip/test/__snapshots__/index.js.snap | 6 +- .../nux/src/components/dot-tip/test/index.js | 6 +- packages/plugins/README.md | 158 +- packages/plugins/package.json | 5 +- packages/plugins/src/api/index.js | 88 +- .../src/components/plugin-area/index.js | 29 + packages/postcss-themes/CHANGELOG.md | 5 + packages/postcss-themes/{src => }/index.js | 3 + packages/postcss-themes/package.json | 14 +- packages/postcss-themes/test/index.js | 2 +- packages/priority-queue/CHANGELOG.md | 2 +- packages/priority-queue/README.md | 24 +- packages/priority-queue/package.json | 5 +- packages/priority-queue/src/index.js | 22 + packages/redux-routine/CHANGELOG.md | 2 +- packages/redux-routine/README.md | 30 +- packages/redux-routine/package.json | 5 +- packages/rich-text/CHANGELOG.md | 2 +- packages/rich-text/README.md | 417 +- packages/rich-text/package.json | 5 +- packages/rich-text/src/apply-format.js | 26 +- packages/rich-text/src/apply-format.native.js | 14 +- packages/rich-text/src/change-list-type.js | 25 +- packages/rich-text/src/char-at.js | 2 +- packages/rich-text/src/concat.js | 23 +- packages/rich-text/src/create.js | 193 +- packages/rich-text/src/get-active-format.js | 2 +- packages/rich-text/src/get-active-object.js | 20 + .../rich-text/src/get-last-child-index.js | 6 +- .../rich-text/src/get-parent-line-index.js | 6 +- packages/rich-text/src/get-selection-end.js | 2 +- packages/rich-text/src/get-selection-start.js | 2 +- packages/rich-text/src/indent-list-items.js | 31 +- packages/rich-text/src/index.js | 1 + packages/rich-text/src/insert-line-break.js | 24 +- .../rich-text/src/insert-line-separator.js | 15 +- packages/rich-text/src/insert-object.js | 10 +- packages/rich-text/src/insert.js | 17 +- packages/rich-text/src/is-collapsed.js | 4 +- packages/rich-text/src/join.js | 9 +- packages/rich-text/src/normalise-formats.js | 8 +- .../rich-text/src/normalise-formats.native.js | 36 - packages/rich-text/src/outdent-list-items.js | 19 +- .../rich-text/src/register-format-type.js | 24 +- packages/rich-text/src/remove-format.js | 46 +- .../rich-text/src/remove-format.native.js | 9 +- packages/rich-text/src/remove.js | 6 +- packages/rich-text/src/replace.js | 8 +- packages/rich-text/src/slice.js | 17 +- packages/rich-text/src/special-characters.js | 3 + packages/rich-text/src/split.js | 13 +- .../src/test/__snapshots__/to-dom.js.snap | 48 +- packages/rich-text/src/test/apply-format.js | 2 +- .../rich-text/src/test/change-list-type.js | 24 +- packages/rich-text/src/test/concat.js | 3 + packages/rich-text/src/test/create.js | 1 + .../rich-text/src/test/get-active-object.js | 41 + .../src/test/get-last-child-index.js | 12 +- .../src/test/get-parent-line-index.js | 8 +- packages/rich-text/src/test/helpers/index.js | 107 +- .../rich-text/src/test/indent-list-items.js | 74 +- .../src/test/insert-line-separator.js | 20 +- packages/rich-text/src/test/insert-object.js | 7 +- packages/rich-text/src/test/insert.js | 6 + packages/rich-text/src/test/join.js | 6 +- .../rich-text/src/test/outdent-list-items.js | 64 +- packages/rich-text/src/test/replace.js | 7 + packages/rich-text/src/test/slice.js | 4 + packages/rich-text/src/test/split.js | 22 + packages/rich-text/src/test/to-dom.js | 2 - packages/rich-text/src/test/to-html-string.js | 5 + packages/rich-text/src/to-dom.js | 50 +- packages/rich-text/src/to-html-string.js | 11 +- packages/rich-text/src/to-tree.js | 80 +- packages/rich-text/src/toggle-format.js | 9 +- .../rich-text/src/unregister-format-type.js | 4 +- packages/scripts/CHANGELOG.md | 11 +- packages/scripts/README.md | 42 +- packages/scripts/config/jest-e2e.config.js | 2 +- packages/scripts/config/jest-unit.config.js | 2 +- packages/scripts/config/webpack.config.js | 117 + packages/scripts/package.json | 17 +- packages/scripts/scripts/build.js | 33 +- packages/scripts/scripts/check-licenses.js | 3 +- packages/scripts/scripts/start.js | 28 +- packages/scripts/utils/config.js | 18 +- packages/scripts/utils/index.js | 6 + packages/scripts/utils/string.js | 20 + packages/scripts/utils/test/string.js | 23 + packages/shortcode/README.md | 147 + packages/shortcode/package.json | 5 +- packages/token-list/package.json | 5 +- packages/url/README.md | 332 +- packages/url/package.json | 5 +- packages/url/src/index.js | 100 + packages/viewport/README.md | 72 +- packages/viewport/package.json | 5 +- packages/viewport/src/if-viewport-matches.js | 12 +- packages/viewport/src/with-viewport-match.js | 14 +- packages/wordcount/README.md | 33 +- packages/wordcount/package.json | 5 +- packages/wordcount/src/index.js | 6 + phpcs.xml.dist | 1 - phpunit/class-admin-test.php | 69 - phpunit/class-blocks-api-test.php | 95 - phpunit/class-i18n-functions-test.php | 32 - phpunit/class-override-script-test.php | 83 + post-content.php | 6 +- test/integration/blocks-raw-handling.spec.js | 20 + test/integration/fixtures/markdown-in.txt | 4 + test/integration/fixtures/markdown-out.html | 4 + .../full-content/server-registered.json | 2 +- webpack.config.js | 96 +- 951 files changed, 34464 insertions(+), 18730 deletions(-) create mode 100755 bin/update-readmes.js create mode 100644 docs/designers-developers/developers/data/data-core-block-editor.md delete mode 100644 docs/users/readme.md delete mode 100644 languages/README.md delete mode 100644 lib/blocks.php create mode 100644 lib/class-wp-rest-widget-updater-controller.php delete mode 100644 lib/compat.php delete mode 100644 lib/meta-box-partial-page.php delete mode 100644 lib/plugin-compat.php delete mode 100644 lib/register.php rename packages/babel-plugin-import-jsx-pragma/{src => }/index.js (66%) create mode 100644 packages/block-editor/.npmrc create mode 100644 packages/block-editor/CHANGELOG.md create mode 100644 packages/block-editor/README.md create mode 100644 packages/block-editor/package.json rename packages/{editor => block-editor}/src/components/alignment-toolbar/index.js (93%) rename packages/{editor => block-editor}/src/components/alignment-toolbar/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/alignment-toolbar/test/index.js (100%) rename packages/{editor => block-editor}/src/components/autocomplete/README.md (100%) rename packages/{editor => block-editor}/src/components/autocomplete/index.js (100%) rename packages/{editor => block-editor}/src/components/autocomplete/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-actions/index.js (90%) rename packages/{editor => block-editor}/src/components/block-alignment-toolbar/index.js (90%) rename packages/{editor => block-editor}/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/block-alignment-toolbar/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-compare/README.md (100%) rename packages/{editor => block-editor}/src/components/block-compare/block-view.js (100%) rename packages/{editor => block-editor}/src/components/block-compare/index.js (100%) rename packages/{editor => block-editor}/src/components/block-compare/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-compare/test/__snapshots__/block-view.js.snap (100%) rename packages/{editor => block-editor}/src/components/block-compare/test/block-view.js (100%) rename packages/{editor => block-editor}/src/components/block-controls/index.js (100%) create mode 100644 packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap rename packages/{editor => block-editor}/src/components/block-controls/test/index.js (54%) rename packages/{editor => block-editor}/src/components/block-draggable/index.js (91%) rename packages/{editor => block-editor}/src/components/block-drop-zone/README.md (100%) rename packages/{editor => block-editor}/src/components/block-drop-zone/index.js (98%) rename packages/{editor => block-editor}/src/components/block-drop-zone/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-edit/context.js (100%) rename packages/{editor => block-editor}/src/components/block-edit/edit.js (100%) rename packages/{editor => block-editor}/src/components/block-edit/edit.native.js (100%) rename packages/{editor => block-editor}/src/components/block-edit/index.js (100%) rename packages/{editor => block-editor}/src/components/block-edit/test/edit.js (86%) create mode 100644 packages/block-editor/src/components/block-editor-keyboard-shortcuts/index.js rename packages/{editor => block-editor}/src/components/block-format-controls/index.js (100%) rename packages/{editor => block-editor}/src/components/block-icon/index.js (100%) rename packages/{editor => block-editor}/src/components/block-icon/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-icon/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-inspector/index.js (98%) rename packages/{editor => block-editor}/src/components/block-inspector/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-list-appender/index.js (97%) rename packages/{editor => block-editor}/src/components/block-list-appender/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-list/block-contextual-toolbar.js (100%) rename packages/{editor => block-editor}/src/components/block-list/block-crash-boundary.js (100%) rename packages/{editor => block-editor}/src/components/block-list/block-crash-warning.js (100%) rename packages/{editor => block-editor}/src/components/block-list/block-html.js (92%) rename packages/{editor => block-editor}/src/components/block-list/block-invalid-warning.js (96%) rename packages/{editor => block-editor}/src/components/block-list/block-mobile-toolbar.js (100%) rename packages/{editor => block-editor}/src/components/block-list/block.js (97%) rename packages/{editor => block-editor}/src/components/block-list/breadcrumb.js (96%) rename packages/{editor => block-editor}/src/components/block-list/hover-area.js (96%) rename packages/{editor => block-editor}/src/components/block-list/index.js (99%) rename packages/{editor => block-editor}/src/components/block-list/insertion-point.js (98%) rename packages/{editor => block-editor}/src/components/block-list/multi-controls.js (96%) rename packages/{editor => block-editor}/src/components/block-list/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-list/test/block-html.js (100%) rename packages/{editor => block-editor}/src/components/block-mover/drag-handle.js (100%) rename packages/{editor => block-editor}/src/components/block-mover/icons.js (100%) rename packages/{editor => block-editor}/src/components/block-mover/index.js (97%) rename packages/{editor => block-editor}/src/components/block-mover/mover-description.js (100%) rename packages/{editor => block-editor}/src/components/block-mover/style.scss (95%) rename packages/{editor => block-editor}/src/components/block-mover/test/index.js (97%) rename packages/{editor => block-editor}/src/components/block-mover/test/mover-description.js (100%) rename packages/{editor => block-editor}/src/components/block-navigation/dropdown.js (77%) rename packages/{editor => block-editor}/src/components/block-navigation/index.js (94%) rename packages/{editor => block-editor}/src/components/block-navigation/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-preview/index.js (100%) rename packages/{editor => block-editor}/src/components/block-preview/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-selection-clearer/index.js (95%) rename packages/{editor => block-editor}/src/components/block-settings-menu/block-convert-button.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/block-html-convert-button.js (82%) rename packages/{editor => block-editor}/src/components/block-settings-menu/block-mode-toggle.js (89%) rename packages/{editor => block-editor}/src/components/block-settings-menu/block-settings-menu-first-item.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/block-settings-menu-plugins-extension.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/block-unknown-convert-button.js (83%) rename packages/{editor => block-editor}/src/components/block-settings-menu/index.js (97%) rename packages/{editor => block-editor}/src/components/block-settings-menu/reusable-block-convert-button.js (98%) rename packages/{editor => block-editor}/src/components/block-settings-menu/reusable-block-delete-button.js (90%) rename packages/{editor => block-editor}/src/components/block-settings-menu/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/test/__snapshots__/reusable-block-delete-button.js.snap (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/test/block-mode-toggle.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/test/reusable-block-convert-button.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/test/reusable-block-delete-button.js (100%) rename packages/{editor => block-editor}/src/components/block-styles/index.js (96%) rename packages/{editor => block-editor}/src/components/block-styles/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-styles/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-switcher/index.js (98%) rename packages/{editor => block-editor}/src/components/block-switcher/multi-blocks-switcher.js (85%) rename packages/{editor => block-editor}/src/components/block-switcher/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-switcher/test/__snapshots__/index.js.snap (94%) rename packages/{editor => block-editor}/src/components/block-switcher/test/__snapshots__/multi-blocks-switcher.js.snap (100%) rename packages/{editor => block-editor}/src/components/block-switcher/test/index.js (97%) rename packages/{editor => block-editor}/src/components/block-switcher/test/multi-blocks-switcher.js (100%) rename packages/{editor => block-editor}/src/components/block-title/README.md (100%) rename packages/{editor => block-editor}/src/components/block-title/index.js (93%) rename packages/{editor => block-editor}/src/components/block-title/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-toolbar/index.js (97%) rename packages/{editor => block-editor}/src/components/block-toolbar/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-types-list/index.js (100%) rename packages/{editor => block-editor}/src/components/block-types-list/style.scss (100%) rename packages/{editor => block-editor}/src/components/color-palette/control.js (100%) rename packages/{editor => block-editor}/src/components/color-palette/control.scss (100%) rename packages/{editor => block-editor}/src/components/color-palette/index.js (100%) rename packages/{editor => block-editor}/src/components/color-palette/test/__snapshots__/control.js.snap (100%) rename packages/{editor => block-editor}/src/components/color-palette/test/control.js (100%) rename packages/{editor => block-editor}/src/components/color-palette/with-color-context.js (91%) rename packages/{editor => block-editor}/src/components/colors/index.js (100%) rename packages/{editor => block-editor}/src/components/colors/test/__snapshots__/with-colors.js.snap (100%) rename packages/{editor => block-editor}/src/components/colors/test/with-colors.js (100%) rename packages/{editor => block-editor}/src/components/colors/utils.js (100%) rename packages/{editor => block-editor}/src/components/colors/with-colors.js (99%) rename packages/{editor => block-editor}/src/components/contrast-checker/index.js (100%) rename packages/{editor => block-editor}/src/components/contrast-checker/style.scss (100%) rename packages/{editor => block-editor}/src/components/contrast-checker/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/contrast-checker/test/index.js (100%) rename packages/{editor => block-editor}/src/components/copy-handler/index.js (95%) rename packages/{editor => block-editor}/src/components/default-block-appender/index.js (93%) rename packages/{editor => block-editor}/src/components/default-block-appender/index.native.js (89%) rename packages/{editor => block-editor}/src/components/default-block-appender/style.native.scss (100%) rename packages/{editor => block-editor}/src/components/default-block-appender/style.scss (100%) rename packages/{editor => block-editor}/src/components/default-block-appender/test/__snapshots__/index.js.snap (93%) rename packages/{editor => block-editor}/src/components/default-block-appender/test/index.js (100%) rename packages/{editor => block-editor}/src/components/font-sizes/font-size-picker.js (86%) rename packages/{editor => block-editor}/src/components/font-sizes/index.js (100%) rename packages/{editor => block-editor}/src/components/font-sizes/index.native.js (100%) rename packages/{editor => block-editor}/src/components/font-sizes/style.scss (100%) rename packages/{editor => block-editor}/src/components/font-sizes/utils.js (100%) rename packages/{editor => block-editor}/src/components/font-sizes/with-font-sizes.js (98%) rename packages/{editor => block-editor}/src/components/ignore-nested-events/index.js (100%) rename packages/{editor => block-editor}/src/components/ignore-nested-events/test/index.js (100%) create mode 100644 packages/block-editor/src/components/index.js create mode 100644 packages/block-editor/src/components/index.native.js rename packages/{editor => block-editor}/src/components/inner-blocks/README.md (98%) rename packages/{editor => block-editor}/src/components/inner-blocks/index.js (98%) rename packages/{editor => block-editor}/src/components/inner-blocks/style.scss (100%) rename packages/{editor => block-editor}/src/components/inner-blocks/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/inner-blocks/test/index.js (100%) rename packages/{editor => block-editor}/src/components/inserter-list-item/index.js (100%) rename packages/{editor => block-editor}/src/components/inserter-list-item/style.scss (100%) rename packages/{editor => block-editor}/src/components/inserter-with-shortcuts/index.js (87%) rename packages/{editor => block-editor}/src/components/inserter-with-shortcuts/style.scss (100%) rename packages/{editor => block-editor}/src/components/inserter/child-blocks.js (96%) rename packages/{editor => block-editor}/src/components/inserter/index.js (94%) rename packages/{editor => block-editor}/src/components/inserter/menu.js (83%) rename packages/{editor => block-editor}/src/components/inserter/style.scss (100%) rename packages/{editor => block-editor}/src/components/inserter/test/menu.js (100%) rename packages/{editor => block-editor}/src/components/inspector-advanced-controls/index.js (100%) rename packages/{editor => block-editor}/src/components/inspector-controls/README.md (100%) rename packages/{editor => block-editor}/src/components/inspector-controls/index.js (100%) rename packages/{editor => block-editor}/src/components/media-placeholder/README.md (100%) rename packages/{editor => block-editor}/src/components/media-placeholder/index.js (90%) rename packages/{editor => block-editor}/src/components/media-placeholder/index.native.js (100%) rename packages/{editor => block-editor}/src/components/media-placeholder/style.scss (100%) rename packages/{editor => block-editor}/src/components/media-placeholder/styles.native.scss (100%) rename packages/{editor => block-editor}/src/components/media-placeholder/test/index.js (100%) rename packages/{editor => block-editor}/src/components/media-upload/README.md (97%) rename packages/{editor => block-editor}/src/components/media-upload/check.js (100%) rename packages/{editor => block-editor}/src/components/media-upload/index.js (100%) rename packages/{editor => block-editor}/src/components/multi-select-scroll-into-view/index.js (94%) rename packages/{editor => block-editor}/src/components/multi-selection-inspector/index.js (95%) rename packages/{editor => block-editor}/src/components/multi-selection-inspector/style.scss (100%) rename packages/{editor => block-editor}/src/components/navigable-toolbar/index.js (100%) rename packages/{editor => block-editor}/src/components/observe-typing/README.md (100%) rename packages/{editor => block-editor}/src/components/observe-typing/index.js (97%) rename packages/{editor => block-editor}/src/components/panel-color-settings/index.js (100%) rename packages/{editor => block-editor}/src/components/panel-color-settings/style.scss (100%) rename packages/{editor => block-editor}/src/components/panel-color-settings/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/panel-color-settings/test/index.js (100%) rename packages/{editor => block-editor}/src/components/plain-text/README.md (100%) rename packages/{editor => block-editor}/src/components/plain-text/index.js (100%) rename packages/{editor => block-editor}/src/components/plain-text/index.native.js (100%) rename packages/{editor => block-editor}/src/components/plain-text/style.native.scss (82%) rename packages/{editor => block-editor}/src/components/plain-text/style.scss (100%) rename packages/{editor => block-editor}/src/components/preserve-scroll-in-reorder/index.js (93%) create mode 100644 packages/block-editor/src/components/provider/index.js create mode 100644 packages/block-editor/src/components/provider/index.native.js rename packages/{editor => block-editor}/src/components/rich-text/README.md (97%) rename packages/{editor => block-editor}/src/components/rich-text/aria.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/editable.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/format-edit.js (65%) create mode 100644 packages/block-editor/src/components/rich-text/format-toolbar/index.js rename packages/{editor => block-editor}/src/components/rich-text/format-toolbar/index.native.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/format-toolbar/style.scss (56%) rename packages/{editor => block-editor}/src/components/rich-text/index.js (88%) rename packages/{editor => block-editor}/src/components/rich-text/index.native.js (98%) rename packages/{editor => block-editor}/src/components/rich-text/input-event.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/input-event.native.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/list-edit.js (96%) rename packages/{editor => block-editor}/src/components/rich-text/patterns.js (93%) rename packages/{editor => block-editor}/src/components/rich-text/remove-browser-shortcuts.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/shortcut.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/shortcut.native.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/style.native.scss (72%) rename packages/{editor => block-editor}/src/components/rich-text/style.scss (100%) rename packages/{editor => block-editor}/src/components/rich-text/test/index.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/toolbar-button.js (100%) rename packages/{editor => block-editor}/src/components/skip-to-selected-block/index.js (90%) rename packages/{editor => block-editor}/src/components/skip-to-selected-block/style.scss (100%) rename packages/{editor => block-editor}/src/components/url-input/README.md (100%) rename packages/{editor => block-editor}/src/components/url-input/button.js (100%) rename packages/{editor => block-editor}/src/components/url-input/index.js (100%) rename packages/{editor => block-editor}/src/components/url-input/index.native.js (100%) rename packages/{editor => block-editor}/src/components/url-input/style.scss (100%) rename packages/{editor => block-editor}/src/components/url-input/test/button.js (90%) rename packages/{editor => block-editor}/src/components/url-popover/README.md (98%) rename packages/{editor => block-editor}/src/components/url-popover/index.js (98%) create mode 100644 packages/block-editor/src/components/url-popover/style.scss rename packages/{editor => block-editor}/src/components/url-popover/test/__snapshots__/index.js.snap (92%) rename packages/{editor => block-editor}/src/components/url-popover/test/index.js (100%) rename packages/{editor => block-editor}/src/components/warning/index.js (100%) rename packages/{editor => block-editor}/src/components/warning/style.scss (100%) rename packages/{editor => block-editor}/src/components/warning/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/warning/test/index.js (100%) rename packages/{editor => block-editor}/src/components/writing-flow/index.js (99%) rename packages/{editor => block-editor}/src/components/writing-flow/style.scss (100%) rename packages/{editor => block-editor}/src/components/writing-flow/test/index.js (100%) rename packages/{editor => block-editor}/src/hooks/align.js (98%) rename packages/{editor => block-editor}/src/hooks/anchor.js (100%) rename packages/{editor => block-editor}/src/hooks/custom-class-name.js (100%) rename packages/{editor => block-editor}/src/hooks/custom-class-name.native.js (100%) rename packages/{editor => block-editor}/src/hooks/generated-class-name.js (100%) create mode 100644 packages/block-editor/src/hooks/index.js create mode 100644 packages/block-editor/src/hooks/index.native.js rename packages/{editor => block-editor}/src/hooks/test/align.js (100%) rename packages/{editor => block-editor}/src/hooks/test/anchor.js (100%) rename packages/{editor => block-editor}/src/hooks/test/custom-class-name.js (100%) rename packages/{editor => block-editor}/src/hooks/test/generated-class-name.js (100%) create mode 100644 packages/block-editor/src/index.js create mode 100644 packages/block-editor/src/store/actions.js rename packages/{editor => block-editor}/src/store/array.js (100%) create mode 100644 packages/block-editor/src/store/controls.js create mode 100644 packages/block-editor/src/store/defaults.js create mode 100644 packages/block-editor/src/store/effects.js create mode 100644 packages/block-editor/src/store/index.js create mode 100644 packages/block-editor/src/store/middlewares.js create mode 100644 packages/block-editor/src/store/reducer.js create mode 100644 packages/block-editor/src/store/selectors.js create mode 100644 packages/block-editor/src/store/test/actions.js rename packages/{editor => block-editor}/src/store/test/array.js (100%) create mode 100644 packages/block-editor/src/store/test/effects.js create mode 100644 packages/block-editor/src/store/test/reducer.js create mode 100644 packages/block-editor/src/store/test/selectors.js create mode 100644 packages/block-editor/src/style.scss rename packages/{editor => block-editor}/src/utils/dom.js (100%) rename packages/{editor => block-editor}/src/utils/test/dom.js (100%) delete mode 100644 packages/block-library/src/audio/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/audio/test/index.js delete mode 100644 packages/block-library/src/button/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/button/test/index.js delete mode 100644 packages/block-library/src/classic/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/classic/test/index.js delete mode 100644 packages/block-library/src/code/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/code/test/index.js create mode 100644 packages/block-library/src/cover/edit.js delete mode 100644 packages/block-library/src/cover/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/cover/test/index.js delete mode 100644 packages/block-library/src/gallery/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/gallery/test/index.js delete mode 100644 packages/block-library/src/heading/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/html/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/html/test/index.js create mode 100644 packages/block-library/src/legacy-widget/WidgetEditDomManager.js create mode 100644 packages/block-library/src/legacy-widget/WidgetEditHandler.js create mode 100644 packages/block-library/src/legacy-widget/edit.js create mode 100644 packages/block-library/src/legacy-widget/editor.scss create mode 100644 packages/block-library/src/legacy-widget/index.js create mode 100644 packages/block-library/src/legacy-widget/index.php delete mode 100644 packages/block-library/src/list/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/list/test/index.js delete mode 100644 packages/block-library/src/more/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/more/test/index.js delete mode 100644 packages/block-library/src/nextpage/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/nextpage/test/index.js delete mode 100644 packages/block-library/src/paragraph/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/paragraph/test/index.js delete mode 100644 packages/block-library/src/preformatted/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/preformatted/test/index.js delete mode 100644 packages/block-library/src/pullquote/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/pullquote/test/index.js delete mode 100644 packages/block-library/src/quote/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/quote/test/index.js delete mode 100644 packages/block-library/src/separator/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/separator/test/index.js delete mode 100644 packages/block-library/src/shortcode/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/shortcode/test/index.js delete mode 100644 packages/block-library/src/table/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/table/test/index.js delete mode 100644 packages/block-library/src/test/helpers/index.js delete mode 100644 packages/block-library/src/text-columns/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/text-columns/test/index.js delete mode 100644 packages/block-library/src/verse/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/verse/test/index.js delete mode 100644 packages/block-library/src/video/test/__snapshots__/index.js.snap delete mode 100644 packages/block-library/src/video/test/index.js delete mode 100644 packages/block-serialization-spec-parser/index.js create mode 100644 packages/blocks/src/api/raw-handling/google-docs-uid-remover.js delete mode 100644 packages/components/src/button/__mocks__/index.js create mode 100644 packages/data/src/components/with-registry/index.js create mode 100644 packages/docgen/.npmrc create mode 100644 packages/docgen/CHANGELOG.md create mode 100644 packages/docgen/README.md create mode 100755 packages/docgen/bin/cli.js create mode 100644 packages/docgen/coverage.md create mode 100644 packages/docgen/package.json create mode 100644 packages/docgen/src/engine.js create mode 100644 packages/docgen/src/get-dependency-path.js create mode 100644 packages/docgen/src/get-export-entries.js create mode 100644 packages/docgen/src/get-intermediate-representation.js create mode 100644 packages/docgen/src/get-jsdoc-from-token.js create mode 100644 packages/docgen/src/get-leading-comments.js create mode 100644 packages/docgen/src/get-type-as-string.js create mode 100644 packages/docgen/src/index.js create mode 100644 packages/docgen/src/markdown/embed.js create mode 100644 packages/docgen/src/markdown/formatter.js create mode 100644 packages/docgen/src/markdown/index.js create mode 100644 packages/docgen/src/test/engine.js create mode 100644 packages/docgen/src/test/fixtures/default-class-anonymous/code.js create mode 100644 packages/docgen/src/test/fixtures/default-class-anonymous/exports.json create mode 100644 packages/docgen/src/test/fixtures/default-class-named/code.js create mode 100644 packages/docgen/src/test/fixtures/default-class-named/exports.json create mode 100644 packages/docgen/src/test/fixtures/default-function-anonymous/code.js create mode 100644 packages/docgen/src/test/fixtures/default-function-anonymous/exports.json create mode 100644 packages/docgen/src/test/fixtures/default-function-named/ast.json create mode 100644 packages/docgen/src/test/fixtures/default-function-named/code.js create mode 100644 packages/docgen/src/test/fixtures/default-function-named/exports.json create mode 100644 packages/docgen/src/test/fixtures/default-function-named/ir.json create mode 100644 packages/docgen/src/test/fixtures/default-identifier/ast.json create mode 100644 packages/docgen/src/test/fixtures/default-identifier/code.js create mode 100644 packages/docgen/src/test/fixtures/default-identifier/exports.json create mode 100644 packages/docgen/src/test/fixtures/default-import-default/ast.json create mode 100644 packages/docgen/src/test/fixtures/default-import-default/code.js create mode 100644 packages/docgen/src/test/fixtures/default-import-default/exports.json create mode 100644 packages/docgen/src/test/fixtures/default-import-default/module-code.js create mode 100644 packages/docgen/src/test/fixtures/default-import-default/module-ir.json create mode 100644 packages/docgen/src/test/fixtures/default-import-named/ast.json create mode 100644 packages/docgen/src/test/fixtures/default-import-named/code.js create mode 100644 packages/docgen/src/test/fixtures/default-import-named/exports.json create mode 100644 packages/docgen/src/test/fixtures/default-import-named/module-code.js create mode 100644 packages/docgen/src/test/fixtures/default-import-named/module-ir.json create mode 100644 packages/docgen/src/test/fixtures/default-named-export/ast.json create mode 100644 packages/docgen/src/test/fixtures/default-named-export/code.js create mode 100644 packages/docgen/src/test/fixtures/default-named-export/exports.json create mode 100644 packages/docgen/src/test/fixtures/default-undocumented-nocomments/code.js create mode 100644 packages/docgen/src/test/fixtures/default-undocumented-nocomments/exports.json create mode 100644 packages/docgen/src/test/fixtures/default-undocumented-oneliner/code.js create mode 100644 packages/docgen/src/test/fixtures/default-undocumented-oneliner/exports.json create mode 100644 packages/docgen/src/test/fixtures/default-variable/code.js create mode 100644 packages/docgen/src/test/fixtures/default-variable/exports.json create mode 100644 packages/docgen/src/test/fixtures/markdown/code.js create mode 100644 packages/docgen/src/test/fixtures/markdown/docs.md create mode 100644 packages/docgen/src/test/fixtures/named-class/code.js create mode 100644 packages/docgen/src/test/fixtures/named-class/exports.json create mode 100644 packages/docgen/src/test/fixtures/named-default-exported/code.js create mode 100644 packages/docgen/src/test/fixtures/named-default-exported/exports.json create mode 100644 packages/docgen/src/test/fixtures/named-default-exported/module-code.js create mode 100644 packages/docgen/src/test/fixtures/named-default-exported/module-ir.json create mode 100644 packages/docgen/src/test/fixtures/named-default/code.js create mode 100644 packages/docgen/src/test/fixtures/named-default/exports.json create mode 100644 packages/docgen/src/test/fixtures/named-default/module-code.js create mode 100644 packages/docgen/src/test/fixtures/named-default/module-ir.json create mode 100644 packages/docgen/src/test/fixtures/named-function/code.js create mode 100644 packages/docgen/src/test/fixtures/named-function/exports.json create mode 100644 packages/docgen/src/test/fixtures/named-function/ir.json create mode 100644 packages/docgen/src/test/fixtures/named-identifier-destructuring/ast.json create mode 100644 packages/docgen/src/test/fixtures/named-identifier-destructuring/code.js create mode 100644 packages/docgen/src/test/fixtures/named-identifier-destructuring/exports.json create mode 100644 packages/docgen/src/test/fixtures/named-identifier/ast.json create mode 100644 packages/docgen/src/test/fixtures/named-identifier/code.js create mode 100644 packages/docgen/src/test/fixtures/named-identifier/exports.json create mode 100644 packages/docgen/src/test/fixtures/named-identifiers-and-inline/ast.json create mode 100644 packages/docgen/src/test/fixtures/named-identifiers-and-inline/code.js create mode 100644 packages/docgen/src/test/fixtures/named-identifiers-and-inline/exports.json create mode 100644 packages/docgen/src/test/fixtures/named-identifiers/ast.json create mode 100644 packages/docgen/src/test/fixtures/named-identifiers/code.js create mode 100644 packages/docgen/src/test/fixtures/named-identifiers/exports.json create mode 100644 packages/docgen/src/test/fixtures/named-identifiers/ir.json create mode 100644 packages/docgen/src/test/fixtures/named-import-named/code.js create mode 100644 packages/docgen/src/test/fixtures/named-import-named/exports.json create mode 100644 packages/docgen/src/test/fixtures/named-import-namespace/ast.json create mode 100644 packages/docgen/src/test/fixtures/named-import-namespace/code.js create mode 100644 packages/docgen/src/test/fixtures/named-import-namespace/exports.json create mode 100644 packages/docgen/src/test/fixtures/named-import-namespace/module-code.js create mode 100644 packages/docgen/src/test/fixtures/named-import-namespace/module-exports.json create mode 100644 packages/docgen/src/test/fixtures/named-import-namespace/module-ir.json create mode 100644 packages/docgen/src/test/fixtures/named-variable/code.js create mode 100644 packages/docgen/src/test/fixtures/named-variable/exports.json create mode 100644 packages/docgen/src/test/fixtures/named-variables/code.js create mode 100644 packages/docgen/src/test/fixtures/named-variables/exports.json create mode 100644 packages/docgen/src/test/fixtures/namespace-commented/code.js create mode 100644 packages/docgen/src/test/fixtures/namespace-commented/exports.json create mode 100644 packages/docgen/src/test/fixtures/namespace-commented/module-ir.json create mode 100644 packages/docgen/src/test/fixtures/namespace-commented/module.js create mode 100644 packages/docgen/src/test/fixtures/namespace/code.js create mode 100644 packages/docgen/src/test/fixtures/namespace/exports.json create mode 100644 packages/docgen/src/test/fixtures/namespace/module-ir.json create mode 100644 packages/docgen/src/test/fixtures/namespace/module.js create mode 100644 packages/docgen/src/test/fixtures/tags-function/code.js create mode 100644 packages/docgen/src/test/fixtures/tags-function/exports.json create mode 100644 packages/docgen/src/test/fixtures/tags-variable/code.js create mode 100644 packages/docgen/src/test/fixtures/tags-variable/exports.json create mode 100644 packages/docgen/src/test/formatter-markdown.js create mode 100644 packages/docgen/src/test/get-export-entries.js create mode 100644 packages/docgen/src/test/get-intermediate-representation.js create mode 100644 packages/docgen/src/test/get-jsdoc-from-token.js create mode 100644 packages/docgen/src/test/get-type-as-string.js create mode 100644 packages/e2e-test-utils/src/click-block-toolbar-button.js create mode 100644 packages/e2e-test-utils/src/is-in-default-block.js create mode 100644 packages/e2e-tests/fixtures/blocks/core__legacy-widget.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__legacy-widget.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__legacy-widget.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__legacy-widget.serialized.html create mode 100644 packages/e2e-tests/plugins/allowed-blocks.php create mode 100644 packages/e2e-tests/specs/keyboard-navigable-blocks.test.js create mode 100644 packages/e2e-tests/specs/plugins/allowed-blocks.test.js create mode 100644 packages/edit-post/src/index.native.js create mode 100644 packages/edit-post/src/store/index.native.js delete mode 100644 packages/editor/src/components/block-controls/test/__snapshots__/index.js.snap create mode 100644 packages/editor/src/components/deprecated.js create mode 100644 packages/editor/src/components/deprecated.native.js delete mode 100644 packages/editor/src/components/inserter/inline-elements.js create mode 100644 packages/editor/src/components/mobile/unsupported-block/edit.js create mode 100644 packages/editor/src/components/mobile/unsupported-block/index.js create mode 100644 packages/editor/src/components/mobile/unsupported-block/style.scss delete mode 100644 packages/editor/src/components/rich-text/format-toolbar/index.js delete mode 100644 packages/editor/src/components/rich-text/inserter-list-item.js delete mode 100644 packages/editor/src/components/url-popover/style.scss delete mode 100644 packages/editor/src/store/effects/posts.js create mode 100644 packages/editor/src/store/utils/notice-builder.js create mode 100644 packages/editor/src/store/utils/test/notice-builder.js create mode 100644 packages/postcss-themes/CHANGELOG.md rename packages/postcss-themes/{src => }/index.js (98%) create mode 100644 packages/rich-text/src/get-active-object.js delete mode 100644 packages/rich-text/src/normalise-formats.native.js create mode 100644 packages/rich-text/src/test/get-active-object.js create mode 100644 packages/scripts/config/webpack.config.js create mode 100644 packages/scripts/utils/string.js create mode 100644 packages/scripts/utils/test/string.js delete mode 100644 phpunit/class-admin-test.php delete mode 100644 phpunit/class-blocks-api-test.php delete mode 100644 phpunit/class-i18n-functions-test.php create mode 100644 phpunit/class-override-script-test.php diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dcd01eefb79cc..5a0454ca08e56 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -23,11 +23,12 @@ # Tooling /bin @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra -/packages/babel-plugin-import-jsx-pragma @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra +/packages/babel-plugin-import-jsx-pragma @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @nosolosw /packages/babel-plugin-makepot @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra -/packages/babel-preset-default @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra +/packages/babel-preset-default @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @nosolosw /packages/browserslist-config @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra /packages/custom-templated-path-webpack-plugin @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra +/packages/docgen @nosolosw @mkaz /packages/e2e-test-utils @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra /packages/e2e-tests @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @talldan /packages/eslint-plugin @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @nosolosw @@ -40,12 +41,12 @@ /packages/scripts @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @nosolosw @mkaz # UI Components -/packages/components @youknowriad @gziolo @aduth @chrisvanpatten @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks -/packages/compose @youknowriad @gziolo @aduth @chrisvanpatten @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks -/packages/element @youknowriad @gziolo @aduth @chrisvanpatten @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks -/packages/notices @youknowriad @gziolo @aduth @chrisvanpatten @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks -/packages/nux @youknowriad @gziolo @aduth @chrisvanpatten @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks -/packages/viewport @youknowriad @gziolo @aduth @chrisvanpatten @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks +/packages/components @youknowriad @gziolo @aduth @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks @chrisvanpatten +/packages/compose @youknowriad @gziolo @aduth @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks +/packages/element @youknowriad @gziolo @aduth @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks +/packages/notices @youknowriad @gziolo @aduth @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks +/packages/nux @youknowriad @gziolo @aduth @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks +/packages/viewport @youknowriad @gziolo @aduth @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks # Utilities /packages/a11y @youknowriad @gziolo @aduth @@ -79,8 +80,8 @@ # Documentation /docs @youknowriad @gziolo @chrisvanpatten @mkaz @ajitbohra @nosolosw @notnownikki -# Styles (Unowned) -*.scss @ghost +# Styles +*.scss @chrisvanpatten # Native (Unowned) *.native.js @ghost diff --git a/.gitignore b/.gitignore index 5ba04948b2faf..2fb814f9616e0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,6 @@ build-module build-style node_modules gutenberg.zip -languages/gutenberg.pot -/languages/gutenberg-translations.php # Directories/files that may appear in your environment .DS_Store diff --git a/.travis.yml b/.travis.yml index 8a464d766d973..7b87e251a2525 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,8 +34,10 @@ jobs: install: - npm ci script: + - npm run build - npm run lint - npm run check-local-changes + - npm run check-licenses - npm run test-unit -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache" - name: PHP unit tests (Docker) diff --git a/README.md b/README.md index 4878bf03990a2..861c13ff675a0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Gutenberg -[![Build Status](https://img.shields.io/travis/WordPress/gutenberg/master.svg)](https://travis-ci.org/WordPress/gutenberg) +[![Build Status](https://img.shields.io/travis/com/WordPress/gutenberg/master.svg)](https://travis-ci.com/WordPress/gutenberg) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/) ![Screenshot of the Gutenberg Editor, editing a post in WordPress](https://cldup.com/H0oKBfpidk.png) diff --git a/assets/stylesheets/_mixins.scss b/assets/stylesheets/_mixins.scss index fa79974e2a112..31134cd44d09b 100644 --- a/assets/stylesheets/_mixins.scss +++ b/assets/stylesheets/_mixins.scss @@ -195,8 +195,8 @@ @mixin square-style__focus() { color: $dark-gray-900; - outline: 1px solid $dark-gray-300; - box-shadow: none; + outline-offset: -1px; + outline: 1px dotted $dark-gray-500; } // Menu items. diff --git a/assets/stylesheets/_z-index.scss b/assets/stylesheets/_z-index.scss index 8efd108ba73d0..87bc9ea5575de 100644 --- a/assets/stylesheets/_z-index.scss +++ b/assets/stylesheets/_z-index.scss @@ -28,6 +28,7 @@ $z-layers: ( ".edit-post-header": 30, ".block-library-button__inline-link .editor-url-input__suggestions": 6, // URL suggestions for button block above sibling inserter ".block-library-image__resize-handlers": 1, // Resize handlers above sibling inserter + ".wp-block-cover__inner-container": 1, // InnerBlocks area inside cover image block ".wp-block-cover.has-background-dim::before": 1, // Overlay area inside block cover need to be higher than the video background. ".wp-block-cover__video-background": 0, // Video background inside cover block. diff --git a/babel.config.js b/babel.config.js index 6a903eff6c1d9..b56ad5b149478 100644 --- a/babel.config.js +++ b/babel.config.js @@ -3,27 +3,5 @@ module.exports = function( api ) { return { presets: [ '@wordpress/babel-preset-default' ], - plugins: [ - [ - '@wordpress/babel-plugin-import-jsx-pragma', - { - scopeVariable: 'createElement', - source: '@wordpress/element', - isDefault: false, - }, - ], - ], - env: { - production: { - plugins: [ - [ - '@wordpress/babel-plugin-makepot', - { - output: 'languages/gutenberg.pot', - }, - ], - ], - }, - }, }; }; diff --git a/bin/build-plugin-zip.sh b/bin/build-plugin-zip.sh index a95f2ef74b23d..6c6d9d10512ee 100755 --- a/bin/build-plugin-zip.sh +++ b/bin/build-plugin-zip.sh @@ -47,18 +47,21 @@ fi # Do a dry run of the repository reset. Prompting the user for a list of all # files that will be removed should prevent them from losing important files! status "Resetting the repository to pristine condition. ✨" -git clean -xdf --dry-run -warning "🚨 About to delete everything above! Is this okay? 🚨" -echo -n "[y]es/[N]o: " -read answer -if [ "$answer" != "${answer#[Yy]}" ]; then - # Remove ignored files to reset repository to pristine condition. Previous - # test ensures that changed files abort the plugin build. - status "Cleaning working directory... 🛀" - git clean -xdf -else - error "Fair enough; aborting. Tidy up your repo and try again. 🙂" - exit 1 +to_clean=$(git clean -xdf --dry-run) +if [ ! -z "$to_clean" ]; then + echo $to_clean + warning "🚨 About to delete everything above! Is this okay? 🚨" + echo -n "[y]es/[N]o: " + read answer + if [ "$answer" != "${answer#[Yy]}" ]; then + # Remove ignored files to reset repository to pristine condition. Previous + # test ensures that changed files abort the plugin build. + status "Cleaning working directory... 🛀" + git clean -xdf + else + error "Fair enough; aborting. Tidy up your repo and try again. 🙂" + exit 1 + fi fi # Download all vendor scripts @@ -97,8 +100,6 @@ status "Installing dependencies... 📦" npm install status "Generating build... 👷‍♀️" npm run build -status "Generating PHP file for wordpress.org to parse translations... 👷‍♂️" -npx pot-to-php ./languages/gutenberg.pot ./languages/gutenberg-translations.php gutenberg # Temporarily modify `gutenberg.php` with production constants defined. Use a # temp file because `bin/generate-gutenberg-php.php` reads from `gutenberg.php` @@ -118,8 +119,6 @@ zip -r gutenberg.zip \ post-content.php \ $vendor_scripts \ $build_files \ - languages/gutenberg.pot \ - languages/gutenberg-translations.php \ README.md # Reset `gutenberg.php`. diff --git a/bin/get-server-blocks.php b/bin/get-server-blocks.php index 851dbccfab6e6..164fafd467db9 100755 --- a/bin/get-server-blocks.php +++ b/bin/get-server-blocks.php @@ -24,10 +24,10 @@ require_once ABSPATH . WPINC . '/functions.php'; wp_load_translations_early(); wp_set_lang_dir(); -require_once dirname( dirname( __FILE__ ) ) . '/lib/blocks.php'; -require_once dirname( dirname( __FILE__ ) ) . '/lib/class-wp-block-type-registry.php'; -require_once dirname( dirname( __FILE__ ) ) . '/lib/class-wp-block-type.php'; -require_once dirname( dirname( __FILE__ ) ) . '/lib/client-assets.php'; +require_once ABSPATH . WPINC . '/blocks.php'; +require_once ABSPATH . WPINC . '/class-wp-block-type-registry.php'; +require_once ABSPATH . WPINC . '/class-wp-block-type.php'; +require_once ABSPATH . '/wp-admin/includes/post.php'; // Register server-side code for individual blocks. foreach ( glob( dirname( dirname( __FILE__ ) ) . '/packages/block-library/src/*/index.php' ) as $block_logic ) { @@ -36,4 +36,4 @@ do_action( 'init' ); -echo json_encode( gutenberg_prepare_blocks_for_js() ); +echo json_encode( get_block_editor_server_block_settings() ); diff --git a/bin/install-wordpress.sh b/bin/install-wordpress.sh index a5ba87ec4f4d5..92cee6f514e90 100755 --- a/bin/install-wordpress.sh +++ b/bin/install-wordpress.sh @@ -78,6 +78,8 @@ if [ "$WP_VERSION" == "latest" ]; then # Check for WordPress updates, to make sure we're running the very latest version. echo -e $(status_message "Updating WordPress to the latest version...") docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm -u 33 $CLI core update --quiet + echo -e $(status_message "Updating The WordPress Database...") + docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm -u 33 $CLI core update-db --quiet fi # If the 'wordpress' volume wasn't during the down/up earlier, but the post port has changed, we need to update it. diff --git a/bin/packages/build.js b/bin/packages/build.js index 02009c1e4a4d3..8a13f8f10b048 100755 --- a/bin/packages/build.js +++ b/bin/packages/build.js @@ -166,7 +166,7 @@ function buildJsFileFor( file, silent, environment ) { const destPath = getBuildPath( file, buildDir ); const babelOptions = getBabelConfig( environment ); babelOptions.sourceMaps = true; - babelOptions.sourceFileName = file; + babelOptions.sourceFileName = file.replace( PACKAGES_DIR, '@wordpress' ); mkdirp.sync( path.dirname( destPath ) ); const transformed = babel.transformFileSync( file, babelOptions ); diff --git a/bin/packages/get-babel-config.js b/bin/packages/get-babel-config.js index e79bc306d07c4..b2646da46955c 100644 --- a/bin/packages/get-babel-config.js +++ b/bin/packages/get-babel-config.js @@ -10,14 +10,7 @@ const babel = require( '@babel/core' ); const { options: babelDefaultConfig } = babel.loadPartialConfig( { configFile: '@wordpress/babel-preset-default', } ); -const plugins = babelDefaultConfig.plugins; -if ( ! process.env.SKIP_JSX_PRAGMA_TRANSFORM ) { - plugins.push( [ '@wordpress/babel-plugin-import-jsx-pragma', { - scopeVariable: 'createElement', - source: '@wordpress/element', - isDefault: false, - } ] ); -} +const { plugins, presets } = babelDefaultConfig; const overrideOptions = ( target, targetName, options ) => { if ( get( target, [ 'file', 'request' ] ) === targetName ) { @@ -37,7 +30,7 @@ const babelConfigs = { { plugins, presets: map( - babelDefaultConfig.presets, + presets, ( preset ) => overrideOptions( preset, '@babel/preset-env', { modules: 'commonjs', } ) @@ -55,7 +48,7 @@ const babelConfigs = { } ) ), presets: map( - babelDefaultConfig.presets, + presets, ( preset ) => overrideOptions( preset, '@babel/preset-env', { modules: false, } ) diff --git a/bin/packages/get-packages.js b/bin/packages/get-packages.js index 30093a22abba6..ed271db0434f2 100644 --- a/bin/packages/get-packages.js +++ b/bin/packages/get-packages.js @@ -3,7 +3,7 @@ */ const fs = require( 'fs' ); const path = require( 'path' ); -const { overEvery, compact, includes, negate } = require( 'lodash' ); +const { overEvery } = require( 'lodash' ); /** * Absolute path to packages directory. @@ -12,36 +12,6 @@ const { overEvery, compact, includes, negate } = require( 'lodash' ); */ const PACKAGES_DIR = path.resolve( __dirname, '../../packages' ); -const { - /** - * Comma-separated string of packages to include in build. - * - * @type {string} - */ - INCLUDE_PACKAGES, - - /** - * Comma-separated string of packages to exclude from build. - * - * @type {string} - */ - EXCLUDE_PACKAGES, -} = process.env; - -/** - * Given a comma-separated string, returns a filter function which returns true - * if the item is contained within as a comma-separated entry. - * - * @param {Function} filterFn Filter function to call with item to test. - * @param {string} list Comma-separated list of items. - * - * @return {Function} Filter function. - */ -const createCommaSeparatedFilter = ( filterFn, list ) => { - const listItems = list.split( ',' ); - return ( item ) => filterFn( listItems, item ); -}; - /** * Returns true if the given base file name for a file within the packages * directory is itself a directory. @@ -62,11 +32,7 @@ function isDirectory( file ) { * * @return {boolean} Whether to include file in build. */ -const filterPackages = overEvery( compact( [ - isDirectory, - INCLUDE_PACKAGES && createCommaSeparatedFilter( includes, INCLUDE_PACKAGES ), - EXCLUDE_PACKAGES && createCommaSeparatedFilter( negate( includes ), EXCLUDE_PACKAGES ), -] ) ); +const filterPackages = overEvery( isDirectory ); /** * Returns the absolute path of all WordPress packages diff --git a/bin/update-readmes.js b/bin/update-readmes.js new file mode 100755 index 0000000000000..b649ef5f99603 --- /dev/null +++ b/bin/update-readmes.js @@ -0,0 +1,71 @@ +#!/usr/bin/env node + +const path = require( 'path' ); +const { promisify } = require( 'util' ); +const spawn = promisify( require( 'child_process' ).spawn ); + +const packages = [ + 'a11y', + 'autop', + 'blob', + 'block-editor', + 'block-library', + 'block-serialization-default-parser', + 'blocks', + 'compose', + //'data', + 'date', + 'deprecated', + 'dom', + 'dom-ready', + 'e2e-test-utils', + 'edit-post', + 'element', + 'escape-html', + 'html-entities', + 'i18n', + 'keycodes', + 'plugins', + 'priority-queue', + 'redux-routine', + 'rich-text', + 'shortcode', + 'url', + 'viewport', + 'wordcount', +]; + +const getArgsForPackage = ( packageName ) => { + switch ( packageName ) { + case 'rich-text': + return [ + `packages/${ packageName }/src/index.js`, + `--output packages/${ packageName }/README.md`, + '--to-token', + '--ignore "unstable|experimental|^apply$|^changeListType$|^charAt$|^getSelectionStart$|^getSelectionEnd$|^indentListItems$|^insertLineBreak$|^insertLineSeparator$|^isEmptyLine$|^LINE_SEPARATOR$|^outdentListItems$"', + ]; + default: + return [ + `packages/${ packageName }/src/index.js`, + `--output packages/${ packageName }/README.md`, + '--to-token', + '--ignore "unstable|experimental"', + ]; + } +}; + +Promise.all( packages.map( async ( packageName ) => { + const args = getArgsForPackage( packageName ); + const pathToDocGen = path.join( __dirname, '..', 'node_modules', '.bin', 'docgen' ); + const { status, stderr } = await spawn( + pathToDocGen, + args, + { shell: true }, + ); + if ( status !== 0 ) { + throw stderr.toString(); + } +} ) ).catch( ( error ) => { + process.stderr.write( `${ error }\n` ); + process.exit( 1 ); +} ); diff --git a/docs/contributors/copy-guide.md b/docs/contributors/copy-guide.md index e5505e30f3acb..a3178b69109b3 100644 --- a/docs/contributors/copy-guide.md +++ b/docs/contributors/copy-guide.md @@ -75,7 +75,7 @@ Here, every line has different phrasing (some start with a verb, some with a nou Reading this list takes more work because the reader has to parse each bullet anew. They can’t assume each bullet will contain similar information. -Note: this doesn't mean every bullet has to be super short and start with an action verb! “Predicable” doesn’t have to mean “simple.” It just means that each bullet should have the same sentence structure. This list would also be fine: +Note: this doesn't mean every bullet has to be super short and start with an action verb! “Predictable” doesn’t have to mean “simple.” It just means that each bullet should have the same sentence structure. This list would also be fine: > What can you do with this block? Lots of things! > * Try adding a quote. Sometimes someone else said things best! diff --git a/docs/contributors/readme.md b/docs/contributors/readme.md index e3979c229e25c..685af4590b473 100644 --- a/docs/contributors/readme.md +++ b/docs/contributors/readme.md @@ -6,7 +6,7 @@ The following guidelines are in place to create consistency across the project a ## Philosophy -* [Architecturial and UX Principles of Gutenberg](/docs/contributors/principles.md) +* [Architectural and UX Principles of Gutenberg](/docs/contributors/principles.md) ## Sections diff --git a/docs/contributors/release.md b/docs/contributors/release.md index b59a5472167f3..cee20e5cc0219 100644 --- a/docs/contributors/release.md +++ b/docs/contributors/release.md @@ -2,7 +2,7 @@ This Repository is used to perform several types of releases. This document serves as a checklist for each one of these. It is helpful if you'd like to understand the different workflows. -To release Gutenberg, you need commit access to the [WordPress.org plugin repository]. 🙂 +To release Gutenberg, you need commit access to the [WordPress.org plugin repository][plugin repository]. 🙂 ## Plugin Releases @@ -87,7 +87,7 @@ If a bug is found in a release candidate and a fix is committed to `master`, we 5. Tag the RC version. `git tag vx.x.0-rc.2` from the release branch. 6. Push the tag `git push --tags`. 7. Merge the version bump pull request and avoid removing the release branch. -8. Follow the steps in [build the plugin](#build-the-plugin) and [publish the release on GitHub](#publish-the-release-on-github). +8. Follow the steps in [build the plugin](#build-the-plugin) and [publish the release on GitHub](#publish-the-release-on-github). You can copy the existing changelog from the previous release candidate. Let other contributors know that a new release candidate has been released in the [`#core-editor` channel](https://wordpress.slack.com/messages/C02QB2JS7) and the call for testing post. @@ -144,11 +144,11 @@ Creating a release involves: You'll need to use Subversion to publish the plugin to WordPress.org. -1. Do an SVN checkout of `https://wordpress.org/plugins/gutenberg/`: - * If this is your first checkout, run: `svn checkout https://plugins.svn.wordpress.org/gutenberg` +1. Do an SVN checkout of `https://wordpress.org/plugins/gutenberg/trunk`: + * If this is your first checkout, run: `svn checkout https://plugins.svn.wordpress.org/gutenberg/trunk` * If you already have a copy, run: `svn up` -2. Delete the contents of `trunk` except for the `readme.txt` and `changelog.txt` files (these files don’t exist in the `git` repo, only in Subversion). -3. Extract the contents of the zip file to `trunk`. +2. Delete the contents except for the `readme.txt` and `changelog.txt` files (these files don’t exist in the `git` repo, only in Subversion). +3. Extract the contents of the zip file. 4. Edit `readme.txt`, replacing the changelog for the previous version with the current release's changelog. 5. Add the changelog for the current release to `changelog.txt`. 6. Add new files/remove deleted files from the repository: @@ -158,17 +158,16 @@ svn st | grep '^\?' | awk '{print $2}' | xargs svn add # Delete old files: svn st | grep '^!' | awk '{print $2}' | xargs svn rm ``` -7. Commit the new version to `trunk`: +7. Commit the new version: ```bash -# Replace vX.X.X with your version: -svn ci -m "Committing Gutenberg version vX.X.X" +# Replace X.X.X with your version: +svn ci -m "Committing Gutenberg version X.X.X" ``` -8. Tag the new version. Make sure you're in the root directory of `gutenberg`, then run: +8. Tag the new version: ```bash -svn cp trunk tags/X.X.X -svn ci -m "Tagging Gutenberg version X.X.X" +svn cp https://plugins.svn.wordpress.org/gutenberg/trunk https://plugins.svn.wordpress.org/gutenberg/tags/X.X.X -m "Tagging Gutenberg version X.X.X" ``` -9. Edit `trunk/readme.txt` to point to the new tag. The **Stable version** header in `readme.txt` should be updated to match the new release version number. After updating and committing that, the new version should be released: +9. Edit `readme.txt` to point to the new tag. The **Stable version** header in `readme.txt` should be updated to match the new release version number. After updating and committing that, the new version should be released: ```bash svn ci -m "Releasing Gutenberg version X.X.X" ``` @@ -186,28 +185,59 @@ If you don't have access to [make.wordpress.org/core](https://make.wordpress.org ## Packages Releases and WordPress Core Updates -WordPress Core Updates are based on the `g-minor` branch. Releasing packages in order to update WordPress Core involves updating the `g-minor` branch (the workflow depends on whether it's a minor or major WordPress release) and run the package release process. +The Gutenberg repository mirrors the [WordPress SVN repository](https://make.wordpress.org/core/handbook/about/release-cycle/) in terms of branching for each SVN branch, a corresponding Gutenberg `wp/*` branch is created: -### Major WordPress Releases + - The `wp/trunk` branch contains all the packages that are published and used in the `trunk` branch of WordPress. + - A Gutenberg branch targetting a specific WordPress major release (including its further minor increments) is created (example `wp/5.2`) based on the `wp/trunk` Gutenberg branch when the WordPress `trunk` branch is marked as "feature-freezed". (This usually happens when the first `beta` of the next WordPress major version is released). -For major WordPress releases, the last Gutenberg plugin release is merged into `g-minor`. This involves the following steps: +### Synchronizing WordPress Trunk + +For each Gutenberg plugin release, WordPress trunk should be synchronized with this release. This involves the following steps: + +**Note:** The WordPress `trunk` branch can be closed or in "feature-freeze" mode. Usually, this happens between the first `beta` and the first `RC` of the WordPress release cycle. During this period, the Gutenberg plugin releases should not be synchronized with WordPress Core. + +1. Ensure the WordPress `trunk` branch is open for enhancements. +2. Check out the last published Gutenberg release branch `git checkout release/x.x` +3. Create a Pull Request from this branch targetting `wp/trunk`. +4. Merge the Pull Request using the "Rebase and Merge" button to keep the history of the commits. + +Now, the branch is ready to be used to publish the npm packages. + +1. Check out the `wp/trunk` branch. +2. Run the [package release process] but when asked for the version numbers to choose for each package, (assuming the package versions are written using this format `major.minor.patch`) make sure to bump at least the `minor` version number. For example, if the CHANGELOG of the package to be released indicates that the next unreleased version is `5.6.1`, choose `5.7.0` as a version. +3. Update the `CHANGELOG.md` files of the published packages with the new released versions and commit to the `wp/trunk` branch. +4. Cherry-pick the "Publish" (created by Lerna) and the CHANGELOG update commits into the `master` branch of Gutenberg. + +Now, the npm packages should be ready and a patch can be created and commited into WordPress `trunk`. -1. Checkout the last published Gutenberg's release branch `git checkout release/x.x` -2. Create a Pull Request from this branch into `g-minor`. -3. Merge the branch. ### Minor WordPress Releases -For minor releases, the critical fixes targetted for this WordPress Minor release should be cherry-picked into the `g-minor` branch one by one in their chronological order. +The following workflow is needed when bug fixes or security releases need to be backported into WordPress Core. This can happen in a few use-cases: + + - During the `beta` and the `RC` period of the WordPress release cycle. + - For WordPress minor releases and WordPress security releases (example `5.1.1`). + +1. Cherry-pick +2. Check out the last published Gutenberg release branch `git checkout release/x.x` +3. Create a Pull Request from this branch targetting the WordPress related major branch (Example `wp/5.2`). +4. Merge the Pull Request using the "Rebase and Merge" button to keep the history of the commits. + +Now, the branch is ready to be used to publish the npm packages. + +1. Check out the WordPress branch used before (Example `wp/5.2`). +2. Run the [package release process] but when asked for the version numbers to choose for each package, (assuming the package versions are written using this format `major.minor.patch`) make sure to bump only the `patch` version number. For example, if the last published package version for this WordPress branch was `5.6.0`, choose `5.6.1` as a version. + +**Note:** For WordPress `5.0` and WordPress `5.1`, a different release process was used. This means that when choosing npm package versions targetting these two releases, you won't be able to use the next `patch` version number as it may have been already used. You should use the "metadata" modifier for these. For example, if the last published package version for this WordPress branch was `5.6.1`, choose `5.6.1+patch.1` as a version. -### Releasing the WordPress packages +3. Update the `CHANGELOG.md` files of the published packages with the new released versions and commit to the corresponding branch (Example `wp/5.2`). +4. Cherry-pick the CHANGELOG update commits into the `master` branch of Gutenberg. -1. Checkout the `g-minor` branch. -2. Run [the package release process](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md#releasing-packages) -3. Update the `CHANGELOG` files of the published packages with the new released versions and commit to the `g-minor` branch. +Now, the npm packages should be ready and a patch can be created and commited into the corresponding WordPress SVN branch. --------- Ta-da! 🎉 [plugin repository]: https://plugins.trac.wordpress.org/browser/gutenberg/ +[package release process]: https://github.com/WordPress/gutenberg/blob/master/packages/README.md#releasing-packages diff --git a/docs/contributors/scripts.md b/docs/contributors/scripts.md index 5d5c1f672a4b2..4928ec91bde64 100644 --- a/docs/contributors/scripts.md +++ b/docs/contributors/scripts.md @@ -30,7 +30,7 @@ The editor includes a number of packages to enable various pieces of functionali | [I18N](/packages/i18n/README.md) | wp-i18n | Internationalization utilities for client-side localization | | [Is Shallow Equal](/packages/is-shallow-equal/README.md) | wp-is-shallow-equal | A function for performing a shallow comparison between two objects or arrays | | [Keycodes](/packages/keycodes/README.md) | wp-keycodes | Keycodes utilities for WordPress, used to check the key pressed in events like `onKeyDown` | -| [List Reusable Bocks](/packages/list-reusable-blocks/README.md) | wp-list-reusable-blocks | Package used to add import/export links to the listing page of the reusable blocks | +| [List Reusable Blocks](/packages/list-reusable-blocks/README.md) | wp-list-reusable-blocks | Package used to add import/export links to the listing page of the reusable blocks | | [NUX](/packages/nux/README.md) | wp-nux | Components, and wp.data methods useful for onboarding a new user to the WordPress admin interface | | [Plugins](/packages/plugins/README.md) | wp-plugins | Plugins module for WordPress | | [Redux Routine](/packages/redux-routine/README.md) | wp-redux-routine | Redux middleware for generator coroutines | @@ -55,7 +55,7 @@ The editor also uses some popular third-party packages and scripts. Plugin devel ## Polyfill Scripts The editor also provides polyfills for certain features that may not be available in all modern browsers. -It is recommened to use the main `wp-polyfill` script handle which takes care of loading all the below mentioned polyfills. +It is recommended to use the main `wp-polyfill` script handle which takes care of loading all the below mentioned polyfills. | Script Name | Handle | Description | |-------------|--------|-------------| diff --git a/docs/contributors/testing-overview.md b/docs/contributors/testing-overview.md index 7d0d01921a6a5..6992bd664c3ec 100644 --- a/docs/contributors/testing-overview.md +++ b/docs/contributors/testing-overview.md @@ -356,6 +356,12 @@ or interactively npm run test-e2e:watch ``` +Sometimes it's useful to observe the browser while running tests. To do so you can use these environment variables: + +```bash +PUPPETEER_HEADLESS=false PUPPETEER_SLOWMO=80 npm run test-e2e:watch +``` + If you're using a different setup, you can provide the base URL, username and password like this: ```bash diff --git a/docs/designers-developers/designers/README.md b/docs/designers-developers/designers/README.md index 362cf794885f2..a630847b37661 100644 --- a/docs/designers-developers/designers/README.md +++ b/docs/designers-developers/designers/README.md @@ -1,3 +1,3 @@ # Designer Documentation -For those designing blocks and other Block Editor integrations, this documentation will provide resources for creating beautiful and intuitive layouts. +For those designing blocks and other block editor integrations, this documentation will provide resources for creating beautiful and intuitive layouts. diff --git a/docs/designers-developers/developers/backward-compatibility/deprecations.md b/docs/designers-developers/developers/backward-compatibility/deprecations.md index 966b33d77cafe..8e8f8ee2d3c37 100644 --- a/docs/designers-developers/developers/backward-compatibility/deprecations.md +++ b/docs/designers-developers/developers/backward-compatibility/deprecations.md @@ -2,6 +2,12 @@ The Gutenberg project's deprecation policy is intended to support backward compatibility for releases, when possible. The current deprecations are listed below and are grouped by _the version at which they will be removed completely_. If your plugin depends on these behaviors, you must update to the recommended alternative before the noted version. +## 5.4.0 + +- The PHP function `gutenberg_load_plugin_textdomain` has been removed. +- The PHP function `gutenberg_get_jed_locale_data` has been removed. +- The PHP function `gutenberg_load_locale_data` has been removed. + ## 5.3.0 - The PHP function `gutenberg_redirect_to_classic_editor_when_saving_posts` has been removed. diff --git a/docs/designers-developers/developers/backward-compatibility/meta-box.md b/docs/designers-developers/developers/backward-compatibility/meta-box.md index affb67fa65a10..e7350dadba7fb 100644 --- a/docs/designers-developers/developers/backward-compatibility/meta-box.md +++ b/docs/designers-developers/developers/backward-compatibility/meta-box.md @@ -30,7 +30,7 @@ add_meta_box( 'my-meta-box', 'My Meta Box', 'my_meta_box_callback', ); ``` -When Gutenberg is used, this meta box will no longer be displayed in the meta box area, as it now only exists for backward compatibility purposes. It will continue to display correctly in the Classic editor. +When Gutenberg is used, this meta box will no longer be displayed in the meta box area, as it now only exists for backward compatibility purposes. It will continue to display correctly in the classic editor. ### Meta Box Data Collection diff --git a/docs/designers-developers/developers/block-api/block-edit-save.md b/docs/designers-developers/developers/block-api/block-edit-save.md index 79a3206326031..c5e35eddb10a7 100644 --- a/docs/designers-developers/developers/block-api/block-edit-save.md +++ b/docs/designers-developers/developers/block-api/block-edit-save.md @@ -406,4 +406,4 @@ When a block is detected as invalid, a warning will be logged into your browser' **I've changed my block's `save` behavior and old content now includes invalid blocks. How can I fix this?** -Refer to the guide on [Deprecated Blocks](/docs/designers-developers/developers/block-api/block-deprecations.md) to learn more about how to accommodate legacy content in intentional markup changes. +Refer to the guide on [Deprecated Blocks](/docs/designers-developers/developers/block-api/block-deprecation.md) to learn more about how to accommodate legacy content in intentional markup changes. diff --git a/docs/designers-developers/developers/data/README.md b/docs/designers-developers/developers/data/README.md index 7ba7f9264e8bc..7408d171144cf 100644 --- a/docs/designers-developers/developers/data/README.md +++ b/docs/designers-developers/developers/data/README.md @@ -3,7 +3,8 @@ - [**core**: WordPress Core Data](/docs/designers-developers/developers/data/data-core.md) - [**core/annotations**: Annotations](/docs/designers-developers/developers/data/data-core-annotations.md) - [**core/blocks**: Block Types Data](/docs/designers-developers/developers/data/data-core-blocks.md) - - [**core/editor**: The Editor’s Data](/docs/designers-developers/developers/data/data-core-editor.md) + - [**core/block-editor**: The Block Editor’s Data](/docs/designers-developers/developers/data/data-core-block-editor.md) + - [**core/editor**: The Post Editor’s Data](/docs/designers-developers/developers/data/data-core-editor.md) - [**core/edit-post**: The Editor’s UI Data](/docs/designers-developers/developers/data/data-core-edit-post.md) - [**core/notices**: Notices Data](/docs/designers-developers/developers/data/data-core-notices.md) - [**core/nux**: The NUX (New User Experience) Data](/docs/designers-developers/developers/data/data-core-nux.md) diff --git a/docs/designers-developers/developers/data/data-core-block-editor.md b/docs/designers-developers/developers/data/data-core-block-editor.md new file mode 100644 index 0000000000000..03929e3671685 --- /dev/null +++ b/docs/designers-developers/developers/data/data-core-block-editor.md @@ -0,0 +1,1050 @@ +# **core/block-editor**: The Block Editor’s Data + +## Selectors + +### getBlockDependantsCacheBust + +Returns a new reference when the inner blocks of a given block client ID +change. This is used exclusively as a memoized selector dependant, relying +on this selector's shared return value and recursively those of its inner +blocks defined as dependencies. This abuses mechanics of the selector +memoization to return from the original selector function only when +dependants change. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + +### getBlockName + +Returns a block's name given its client ID, or null if no block exists with +the client ID. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + +*Returns* + +Block name. + +### isBlockValid + +Returns whether a block is valid or not. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + +*Returns* + +Is Valid. + +### getBlockAttributes + +Returns a block's attributes given its client ID, or null if no block exists with +the client ID. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + +*Returns* + +Block attributes. + +### getBlock + +Returns a block given its client ID. This is a parsed copy of the block, +containing its `blockName`, `clientId`, and current `attributes` state. This +is not the block's registration settings, which must be retrieved from the +blocks module registration store. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + +*Returns* + +Parsed block object. + +### getBlocks + +Returns all block objects for the current post being edited as an array in +the order they appear in the post. + +Note: It's important to memoize this selector to avoid return a new instance +on each call + +*Parameters* + + * state: Editor state. + * rootClientId: Optional root client ID of block list. + +*Returns* + +Post blocks. + +### getClientIdsOfDescendants + +Returns an array containing the clientIds of all descendants +of the blocks given. + +*Parameters* + + * state: Global application state. + * clientIds: Array of blocks to inspect. + +*Returns* + +ids of descendants. + +### getClientIdsWithDescendants + +Returns an array containing the clientIds of the top-level blocks +and their descendants of any depth (for nested blocks). + +*Parameters* + + * state: Global application state. + +*Returns* + +ids of top-level and descendant blocks. + +### getGlobalBlockCount + +Returns the total number of blocks, or the total number of blocks with a specific name in a post. +The number returned includes nested blocks. + +*Parameters* + + * state: Global application state. + * blockName: Optional block name, if specified only blocks of that type will be counted. + +*Returns* + +Number of blocks in the post, or number of blocks with name equal to blockName. + +### getBlocksByClientId + +Given an array of block client IDs, returns the corresponding array of block +objects. + +*Parameters* + + * state: Editor state. + * clientIds: Client IDs for which blocks are to be returned. + +*Returns* + +Block objects. + +### getBlockCount + +Returns the number of blocks currently present in the post. + +*Parameters* + + * state: Editor state. + * rootClientId: Optional root client ID of block list. + +*Returns* + +Number of blocks in the post. + +### getBlockSelectionStart + +Returns the current block selection start. This value may be null, and it +may represent either a singular block selection or multi-selection start. +A selection is singular if its start and end match. + +*Parameters* + + * state: Global application state. + +*Returns* + +Client ID of block selection start. + +### getBlockSelectionEnd + +Returns the current block selection end. This value may be null, and it +may represent either a singular block selection or multi-selection end. +A selection is singular if its start and end match. + +*Parameters* + + * state: Global application state. + +*Returns* + +Client ID of block selection end. + +### getSelectedBlockCount + +Returns the number of blocks currently selected in the post. + +*Parameters* + + * state: Global application state. + +*Returns* + +Number of blocks selected in the post. + +### hasSelectedBlock + +Returns true if there is a single selected block, or false otherwise. + +*Parameters* + + * state: Editor state. + +*Returns* + +Whether a single block is selected. + +### getSelectedBlockClientId + +Returns the currently selected block client ID, or null if there is no +selected block. + +*Parameters* + + * state: Editor state. + +*Returns* + +Selected block client ID. + +### getSelectedBlock + +Returns the currently selected block, or null if there is no selected block. + +*Parameters* + + * state: Global application state. + +*Returns* + +Selected block. + +### getBlockRootClientId + +Given a block client ID, returns the root block from which the block is +nested, an empty string for top-level blocks, or null if the block does not +exist. + +*Parameters* + + * state: Editor state. + * clientId: Block from which to find root client ID. + +*Returns* + +Root client ID, if exists + +### getBlockHierarchyRootClientId + +Given a block client ID, returns the root of the hierarchy from which the block is nested, return the block itself for root level blocks. + +*Parameters* + + * state: Editor state. + * clientId: Block from which to find root client ID. + +*Returns* + +Root client ID + +### getAdjacentBlockClientId + +Returns the client ID of the block adjacent one at the given reference +startClientId and modifier directionality. Defaults start startClientId to +the selected block, and direction as next block. Returns null if there is no +adjacent block. + +*Parameters* + + * state: Editor state. + * startClientId: Optional client ID of block from which to + search. + * modifier: Directionality multiplier (1 next, -1 + previous). + +*Returns* + +Return the client ID of the block, or null if none exists. + +### getPreviousBlockClientId + +Returns the previous block's client ID from the given reference start ID. +Defaults start to the selected block. Returns null if there is no previous +block. + +*Parameters* + + * state: Editor state. + * startClientId: Optional client ID of block from which to + search. + +*Returns* + +Adjacent block's client ID, or null if none exists. + +### getNextBlockClientId + +Returns the next block's client ID from the given reference start ID. +Defaults start to the selected block. Returns null if there is no next +block. + +*Parameters* + + * state: Editor state. + * startClientId: Optional client ID of block from which to + search. + +*Returns* + +Adjacent block's client ID, or null if none exists. + +### getSelectedBlocksInitialCaretPosition + +Returns the initial caret position for the selected block. +This position is to used to position the caret properly when the selected block changes. + +*Parameters* + + * state: Global application state. + +*Returns* + +Selected block. + +### getMultiSelectedBlockClientIds + +Returns the current multi-selection set of block client IDs, or an empty +array if there is no multi-selection. + +*Parameters* + + * state: Editor state. + +*Returns* + +Multi-selected block client IDs. + +### getMultiSelectedBlocks + +Returns the current multi-selection set of blocks, or an empty array if +there is no multi-selection. + +*Parameters* + + * state: Editor state. + +*Returns* + +Multi-selected block objects. + +### getFirstMultiSelectedBlockClientId + +Returns the client ID of the first block in the multi-selection set, or null +if there is no multi-selection. + +*Parameters* + + * state: Editor state. + +*Returns* + +First block client ID in the multi-selection set. + +### getLastMultiSelectedBlockClientId + +Returns the client ID of the last block in the multi-selection set, or null +if there is no multi-selection. + +*Parameters* + + * state: Editor state. + +*Returns* + +Last block client ID in the multi-selection set. + +### isFirstMultiSelectedBlock + +Returns true if a multi-selection exists, and the block corresponding to the +specified client ID is the first block of the multi-selection set, or false +otherwise. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + +*Returns* + +Whether block is first in multi-selection. + +### isBlockMultiSelected + +Returns true if the client ID occurs within the block multi-selection, or +false otherwise. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + +*Returns* + +Whether block is in multi-selection set. + +### isAncestorMultiSelected + +Returns true if an ancestor of the block is multi-selected, or false +otherwise. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + +*Returns* + +Whether an ancestor of the block is in multi-selection + set. + +### getMultiSelectedBlocksStartClientId + +Returns the client ID of the block which begins the multi-selection set, or +null if there is no multi-selection. + +This is not necessarily the first client ID in the selection. + +*Parameters* + + * state: Editor state. + +*Returns* + +Client ID of block beginning multi-selection. + +### getMultiSelectedBlocksEndClientId + +Returns the client ID of the block which ends the multi-selection set, or +null if there is no multi-selection. + +This is not necessarily the last client ID in the selection. + +*Parameters* + + * state: Editor state. + +*Returns* + +Client ID of block ending multi-selection. + +### getBlockOrder + +Returns an array containing all block client IDs in the editor in the order +they appear. Optionally accepts a root client ID of the block list for which +the order should be returned, defaulting to the top-level block order. + +*Parameters* + + * state: Editor state. + * rootClientId: Optional root client ID of block list. + +*Returns* + +Ordered client IDs of editor blocks. + +### getBlockIndex + +Returns the index at which the block corresponding to the specified client +ID occurs within the block order, or `-1` if the block does not exist. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + * rootClientId: Optional root client ID of block list. + +*Returns* + +Index at which block exists in order. + +### isBlockSelected + +Returns true if the block corresponding to the specified client ID is +currently selected and no multi-selection exists, or false otherwise. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + +*Returns* + +Whether block is selected and multi-selection exists. + +### hasSelectedInnerBlock + +Returns true if one of the block's inner blocks is selected. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + * deep: Perform a deep check. + +*Returns* + +Whether the block as an inner block selected + +### isBlockWithinSelection + +Returns true if the block corresponding to the specified client ID is +currently selected but isn't the last of the selected blocks. Here "last" +refers to the block sequence in the document, _not_ the sequence of +multi-selection, which is why `state.blockSelection.end` isn't used. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + +*Returns* + +Whether block is selected and not the last in the + selection. + +### hasMultiSelection + +Returns true if a multi-selection has been made, or false otherwise. + +*Parameters* + + * state: Editor state. + +*Returns* + +Whether multi-selection has been made. + +### isMultiSelecting + +Whether in the process of multi-selecting or not. This flag is only true +while the multi-selection is being selected (by mouse move), and is false +once the multi-selection has been settled. + +*Parameters* + + * state: Global application state. + +*Returns* + +True if multi-selecting, false if not. + +### isSelectionEnabled + +Selector that returns if multi-selection is enabled or not. + +*Parameters* + + * state: Global application state. + +*Returns* + +True if it should be possible to multi-select blocks, false if multi-selection is disabled. + +### getBlockMode + +Returns the block's editing mode, defaulting to "visual" if not explicitly +assigned. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + +*Returns* + +Block editing mode. + +### isTyping + +Returns true if the user is typing, or false otherwise. + +*Parameters* + + * state: Global application state. + +*Returns* + +Whether user is typing. + +### isCaretWithinFormattedText + +Returns true if the caret is within formatted text, or false otherwise. + +*Parameters* + + * state: Global application state. + +*Returns* + +Whether the caret is within formatted text. + +### getBlockInsertionPoint + +Returns the insertion point, the index at which the new inserted block would +be placed. Defaults to the last index. + +*Parameters* + + * state: Editor state. + +*Returns* + +Insertion point object with `rootClientId`, `index`. + +### isBlockInsertionPointVisible + +Returns true if we should show the block insertion point. + +*Parameters* + + * state: Global application state. + +*Returns* + +Whether the insertion point is visible or not. + +### isValidTemplate + +Returns whether the blocks matches the template or not. + +*Parameters* + + * state: null + +*Returns* + +Whether the template is valid or not. + +### getTemplate + +Returns the defined block template + +*Parameters* + + * state: null + +*Returns* + +Block Template + +### getTemplateLock + +Returns the defined block template lock. Optionally accepts a root block +client ID as context, otherwise defaulting to the global context. + +*Parameters* + + * state: Editor state. + * rootClientId: Optional block root client ID. + +*Returns* + +Block Template Lock + +### canInsertBlockType + +Determines if the given block type is allowed to be inserted into the block list. + +*Parameters* + + * state: Editor state. + * blockName: The name of the block type, e.g.' core/paragraph'. + * rootClientId: Optional root client ID of block list. + +*Returns* + +Whether the given block type is allowed to be inserted. + +### getInserterItems + +Determines the items that appear in the inserter. Includes both static +items (e.g. a regular block type) and dynamic items (e.g. a reusable block). + +Each item object contains what's necessary to display a button in the +inserter and handle its selection. + +The 'utility' property indicates how useful we think an item will be to the +user. There are 4 levels of utility: + +1. Blocks that are contextually useful (utility = 3) +2. Blocks that have been previously inserted (utility = 2) +3. Blocks that are in the common category (utility = 1) +4. All other blocks (utility = 0) + +The 'frecency' property is a heuristic (https://en.wikipedia.org/wiki/Frecency) +that combines block usage frequenty and recency. + +Items are returned ordered descendingly by their 'utility' and 'frecency'. + +*Parameters* + + * state: Editor state. + * rootClientId: Optional root client ID of block list. + +*Returns* + +Items that appear in inserter. + +### hasInserterItems + +Determines whether there are items to show in the inserter. + +*Parameters* + + * state: Editor state. + * rootClientId: Optional root client ID of block list. + +*Returns* + +Items that appear in inserter. + +### getBlockListSettings + +Returns the Block List settings of a block, if any exist. + +*Parameters* + + * state: Editor state. + * clientId: Block client ID. + +*Returns* + +Block settings of the block if set. + +### getSettings + +Returns the editor settings. + +*Parameters* + + * state: Editor state. + +*Returns* + +The editor settings object. + +### isLastBlockChangePersistent + +Returns true if the most recent block change is be considered persistent, or +false otherwise. A persistent change is one committed by BlockEditorProvider +via its `onChange` callback, in addition to `onInput`. + +*Parameters* + + * state: Block editor state. + +*Returns* + +Whether the most recent block change was persistent. + +## Actions + +### resetBlocks + +Returns an action object used in signalling that blocks state should be +reset to the specified array of blocks, taking precedence over any other +content reflected as an edit in state. + +*Parameters* + + * blocks: Array of blocks. + +### receiveBlocks + +Returns an action object used in signalling that blocks have been received. +Unlike resetBlocks, these should be appended to the existing known set, not +replacing. + +*Parameters* + + * blocks: Array of block objects. + +### updateBlockAttributes + +Returns an action object used in signalling that the block attributes with +the specified client ID has been updated. + +*Parameters* + + * clientId: Block client ID. + * attributes: Block attributes to be merged. + +### updateBlock + +Returns an action object used in signalling that the block with the +specified client ID has been updated. + +*Parameters* + + * clientId: Block client ID. + * updates: Block attributes to be merged. + +### selectBlock + +Returns an action object used in signalling that the block with the +specified client ID has been selected, optionally accepting a position +value reflecting its selection directionality. An initialPosition of -1 +reflects a reverse selection. + +*Parameters* + + * clientId: Block client ID. + * initialPosition: Optional initial position. Pass as -1 to + reflect reverse selection. + +### selectPreviousBlock + +Yields action objects used in signalling that the block preceding the given +clientId should be selected. + +*Parameters* + + * clientId: Block client ID. + +### selectNextBlock + +Yields action objects used in signalling that the block following the given +clientId should be selected. + +*Parameters* + + * clientId: Block client ID. + +### startMultiSelect + +Returns an action object used in signalling that a block multi-selection has started. + +### stopMultiSelect + +Returns an action object used in signalling that block multi-selection stopped. + +### multiSelect + +Returns an action object used in signalling that block multi-selection changed. + +*Parameters* + + * start: First block of the multi selection. + * end: Last block of the multiselection. + +### clearSelectedBlock + +Returns an action object used in signalling that the block selection is cleared. + +### toggleSelection + +Returns an action object that enables or disables block selection. + +*Parameters* + + * boolean: [isSelectionEnabled=true] Whether block selection should + be enabled. + +### replaceBlocks + +Returns an action object signalling that a blocks should be replaced with +one or more replacement blocks. + +*Parameters* + + * clientIds: Block client ID(s) to replace. + * blocks: Replacement block(s). + +### replaceBlock + +Returns an action object signalling that a single block should be replaced +with one or more replacement blocks. + +*Parameters* + + * clientId: Block client ID to replace. + * block: Replacement block(s). + +### moveBlockToPosition + +Returns an action object signalling that an indexed block should be moved +to a new index. + +*Parameters* + + * clientId: The client ID of the block. + * fromRootClientId: Root client ID source. + * toRootClientId: Root client ID destination. + * index: The index to move the block into. + +### insertBlock + +Returns an action object used in signalling that a single block should be +inserted, optionally at a specific index respective a root block list. + +*Parameters* + + * block: Block object to insert. + * index: Index at which block should be inserted. + * rootClientId: Optional root client ID of block list on which to insert. + * updateSelection: If true block selection will be updated. If false, block selection will not change. Defaults to true. + +### insertBlocks + +Returns an action object used in signalling that an array of blocks should +be inserted, optionally at a specific index respective a root block list. + +*Parameters* + + * blocks: Block objects to insert. + * index: Index at which block should be inserted. + * rootClientId: Optional root client ID of block list on which to insert. + * updateSelection: If true block selection will be updated. If false, block selection will not change. Defaults to true. + +### showInsertionPoint + +Returns an action object used in signalling that the insertion point should +be shown. + +*Parameters* + + * rootClientId: Optional root client ID of block list on + which to insert. + * index: Index at which block should be inserted. + +### hideInsertionPoint + +Returns an action object hiding the insertion point. + +### setTemplateValidity + +Returns an action object resetting the template validity. + +*Parameters* + + * isValid: template validity flag. + +### synchronizeTemplate + +Returns an action object synchronize the template with the list of blocks + +### mergeBlocks + +Returns an action object used in signalling that two blocks should be merged + +*Parameters* + + * firstBlockClientId: Client ID of the first block to merge. + * secondBlockClientId: Client ID of the second block to merge. + +### removeBlocks + +Yields action objects used in signalling that the blocks corresponding to +the set of specified client IDs are to be removed. + +*Parameters* + + * clientIds: Client IDs of blocks to remove. + * selectPrevious: True if the previous block should be + selected when a block is removed. + +### removeBlock + +Returns an action object used in signalling that the block with the +specified client ID is to be removed. + +*Parameters* + + * clientId: Client ID of block to remove. + * selectPrevious: True if the previous block should be + selected when a block is removed. + +### toggleBlockMode + +Returns an action object used to toggle the block editing mode between +visual and HTML modes. + +*Parameters* + + * clientId: Block client ID. + +### startTyping + +Returns an action object used in signalling that the user has begun to type. + +### stopTyping + +Returns an action object used in signalling that the user has stopped typing. + +### enterFormattedText + +Returns an action object used in signalling that the caret has entered formatted text. + +### exitFormattedText + +Returns an action object used in signalling that the user caret has exited formatted text. + +### insertDefaultBlock + +Returns an action object used in signalling that a new block of the default +type should be added to the block list. + +*Parameters* + + * attributes: Optional attributes of the block to assign. + * rootClientId: Optional root client ID of block list on which + to append. + * index: Optional index where to insert the default block + +### updateBlockListSettings + +Returns an action object that changes the nested settings of a given block. + +*Parameters* + + * clientId: Client ID of the block whose nested setting are + being received. + * settings: Object with the new settings for the nested block. + +### updateSettings + +Returns an action object used in signalling that the block editor settings have been updated. + +*Parameters* + + * settings: Updated settings + +### __unstableSaveReusableBlock + +Returns an action object used in signalling that a temporary reusable blocks have been saved +in order to switch its temporary id with the real id. + +*Parameters* + + * id: Reusable block's id. + * updatedId: Updated block's id. + +### __unstableMarkLastChangeAsPersistent + +Returns an action object used in signalling that the last block change should be marked explicitely as persistent. \ No newline at end of file diff --git a/docs/designers-developers/developers/data/data-core-editor.md b/docs/designers-developers/developers/data/data-core-editor.md index 96e65b41659de..cd251dc92d678 100644 --- a/docs/designers-developers/developers/data/data-core-editor.md +++ b/docs/designers-developers/developers/data/data-core-editor.md @@ -1,4 +1,4 @@ -# **core/editor**: The Editor’s Data +# **core/editor**: The Post Editor’s Data ## Selectors @@ -365,676 +365,6 @@ and modified date are the same. Whether the edited post has a floating date value. -### getBlockDependantsCacheBust - -Returns a new reference when the inner blocks of a given block client ID -change. This is used exclusively as a memoized selector dependant, relying -on this selector's shared return value and recursively those of its inner -blocks defined as dependencies. This abuses mechanics of the selector -memoization to return from the original selector function only when -dependants change. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - -*Returns* - -A value whose reference will change only when inner blocks of - the given block client ID change. - -### getBlockName - -Returns a block's name given its client ID, or null if no block exists with -the client ID. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - -*Returns* - -Block name. - -### isBlockValid - -Returns whether a block is valid or not. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - -*Returns* - -Is Valid. - -### getBlockAttributes - -Returns a block's attributes given its client ID, or null if no block exists with -the client ID. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - -*Returns* - -Block attributes. - -### getBlock - -Returns a block given its client ID. This is a parsed copy of the block, -containing its `blockName`, `clientId`, and current `attributes` state. This -is not the block's registration settings, which must be retrieved from the -blocks module registration store. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - -*Returns* - -Parsed block object. - -### getBlocks - -Returns all block objects for the current post being edited as an array in -the order they appear in the post. - -Note: It's important to memoize this selector to avoid return a new instance -on each call - -*Parameters* - - * state: Editor state. - * rootClientId: Optional root client ID of block list. - -*Returns* - -Post blocks. - -### getClientIdsOfDescendants - -Returns an array containing the clientIds of all descendants -of the blocks given. - -*Parameters* - - * state: Global application state. - * clientIds: Array of blocks to inspect. - -*Returns* - -ids of descendants. - -### getClientIdsWithDescendants - -Returns an array containing the clientIds of the top-level blocks -and their descendants of any depth (for nested blocks). - -*Parameters* - - * state: Global application state. - -*Returns* - -ids of top-level and descendant blocks. - -### getGlobalBlockCount - -Returns the total number of blocks, or the total number of blocks with a specific name in a post. -The number returned includes nested blocks. - -*Parameters* - - * state: Global application state. - * blockName: Optional block name, if specified only blocks of that type will be counted. - -*Returns* - -Number of blocks in the post, or number of blocks with name equal to blockName. - -### getBlocksByClientId - -Given an array of block client IDs, returns the corresponding array of block -objects. - -*Parameters* - - * state: Editor state. - * clientIds: Client IDs for which blocks are to be returned. - -*Returns* - -Block objects. - -### getBlockCount - -Returns the number of blocks currently present in the post. - -*Parameters* - - * state: Editor state. - * rootClientId: Optional root client ID of block list. - -*Returns* - -Number of blocks in the post. - -### getBlockSelectionStart - -Returns the current block selection start. This value may be null, and it -may represent either a singular block selection or multi-selection start. -A selection is singular if its start and end match. - -*Parameters* - - * state: Global application state. - -*Returns* - -Client ID of block selection start. - -### getBlockSelectionEnd - -Returns the current block selection end. This value may be null, and it -may represent either a singular block selection or multi-selection end. -A selection is singular if its start and end match. - -*Parameters* - - * state: Global application state. - -*Returns* - -Client ID of block selection end. - -### getSelectedBlockCount - -Returns the number of blocks currently selected in the post. - -*Parameters* - - * state: Global application state. - -*Returns* - -Number of blocks selected in the post. - -### hasSelectedBlock - -Returns true if there is a single selected block, or false otherwise. - -*Parameters* - - * state: Editor state. - -*Returns* - -Whether a single block is selected. - -### getSelectedBlockClientId - -Returns the currently selected block client ID, or null if there is no -selected block. - -*Parameters* - - * state: Editor state. - -*Returns* - -Selected block client ID. - -### getSelectedBlock - -Returns the currently selected block, or null if there is no selected block. - -*Parameters* - - * state: Global application state. - -*Returns* - -Selected block. - -### getBlockRootClientId - -Given a block client ID, returns the root block from which the block is -nested, an empty string for top-level blocks, or null if the block does not -exist. - -*Parameters* - - * state: Editor state. - * clientId: Block from which to find root client ID. - -*Returns* - -Root client ID, if exists - -### getBlockHierarchyRootClientId - -Given a block client ID, returns the root of the hierarchy from which the block is nested, return the block itself for root level blocks. - -*Parameters* - - * state: Editor state. - * clientId: Block from which to find root client ID. - -*Returns* - -Root client ID - -### getAdjacentBlockClientId - -Returns the client ID of the block adjacent one at the given reference -startClientId and modifier directionality. Defaults start startClientId to -the selected block, and direction as next block. Returns null if there is no -adjacent block. - -*Parameters* - - * state: Editor state. - * startClientId: Optional client ID of block from which to - search. - * modifier: Directionality multiplier (1 next, -1 - previous). - -*Returns* - -Return the client ID of the block, or null if none exists. - -### getPreviousBlockClientId - -Returns the previous block's client ID from the given reference start ID. -Defaults start to the selected block. Returns null if there is no previous -block. - -*Parameters* - - * state: Editor state. - * startClientId: Optional client ID of block from which to - search. - -*Returns* - -Adjacent block's client ID, or null if none exists. - -### getNextBlockClientId - -Returns the next block's client ID from the given reference start ID. -Defaults start to the selected block. Returns null if there is no next -block. - -*Parameters* - - * state: Editor state. - * startClientId: Optional client ID of block from which to - search. - -*Returns* - -Adjacent block's client ID, or null if none exists. - -### getSelectedBlocksInitialCaretPosition - -Returns the initial caret position for the selected block. -This position is to used to position the caret properly when the selected block changes. - -*Parameters* - - * state: Global application state. - -*Returns* - -Selected block. - -### getMultiSelectedBlockClientIds - -Returns the current multi-selection set of block client IDs, or an empty -array if there is no multi-selection. - -*Parameters* - - * state: Editor state. - -*Returns* - -Multi-selected block client IDs. - -### getMultiSelectedBlocks - -Returns the current multi-selection set of blocks, or an empty array if -there is no multi-selection. - -*Parameters* - - * state: Editor state. - -*Returns* - -Multi-selected block objects. - -### getFirstMultiSelectedBlockClientId - -Returns the client ID of the first block in the multi-selection set, or null -if there is no multi-selection. - -*Parameters* - - * state: Editor state. - -*Returns* - -First block client ID in the multi-selection set. - -### getLastMultiSelectedBlockClientId - -Returns the client ID of the last block in the multi-selection set, or null -if there is no multi-selection. - -*Parameters* - - * state: Editor state. - -*Returns* - -Last block client ID in the multi-selection set. - -### isFirstMultiSelectedBlock - -Returns true if a multi-selection exists, and the block corresponding to the -specified client ID is the first block of the multi-selection set, or false -otherwise. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - -*Returns* - -Whether block is first in multi-selection. - -### isBlockMultiSelected - -Returns true if the client ID occurs within the block multi-selection, or -false otherwise. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - -*Returns* - -Whether block is in multi-selection set. - -### isAncestorMultiSelected - -Returns true if an ancestor of the block is multi-selected, or false -otherwise. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - -*Returns* - -Whether an ancestor of the block is in multi-selection - set. - -### getMultiSelectedBlocksStartClientId - -Returns the client ID of the block which begins the multi-selection set, or -null if there is no multi-selection. - -This is not necessarily the first client ID in the selection. - -*Parameters* - - * state: Editor state. - -*Returns* - -Client ID of block beginning multi-selection. - -### getMultiSelectedBlocksEndClientId - -Returns the client ID of the block which ends the multi-selection set, or -null if there is no multi-selection. - -This is not necessarily the last client ID in the selection. - -*Parameters* - - * state: Editor state. - -*Returns* - -Client ID of block ending multi-selection. - -### getBlockOrder - -Returns an array containing all block client IDs in the editor in the order -they appear. Optionally accepts a root client ID of the block list for which -the order should be returned, defaulting to the top-level block order. - -*Parameters* - - * state: Editor state. - * rootClientId: Optional root client ID of block list. - -*Returns* - -Ordered client IDs of editor blocks. - -### getBlockIndex - -Returns the index at which the block corresponding to the specified client -ID occurs within the block order, or `-1` if the block does not exist. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - * rootClientId: Optional root client ID of block list. - -*Returns* - -Index at which block exists in order. - -### isBlockSelected - -Returns true if the block corresponding to the specified client ID is -currently selected and no multi-selection exists, or false otherwise. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - -*Returns* - -Whether block is selected and multi-selection exists. - -### hasSelectedInnerBlock - -Returns true if one of the block's inner blocks is selected. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - * deep: Perform a deep check. - -*Returns* - -Whether the block as an inner block selected - -### isBlockWithinSelection - -Returns true if the block corresponding to the specified client ID is -currently selected but isn't the last of the selected blocks. Here "last" -refers to the block sequence in the document, _not_ the sequence of -multi-selection, which is why `state.blockSelection.end` isn't used. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - -*Returns* - -Whether block is selected and not the last in the - selection. - -### hasMultiSelection - -Returns true if a multi-selection has been made, or false otherwise. - -*Parameters* - - * state: Editor state. - -*Returns* - -Whether multi-selection has been made. - -### isMultiSelecting - -Whether in the process of multi-selecting or not. This flag is only true -while the multi-selection is being selected (by mouse move), and is false -once the multi-selection has been settled. - -*Parameters* - - * state: Global application state. - -*Returns* - -True if multi-selecting, false if not. - -### isSelectionEnabled - -Selector that returns if multi-selection is enabled or not. - -*Parameters* - - * state: Global application state. - -*Returns* - -True if it should be possible to multi-select blocks, false if multi-selection is disabled. - -### getBlockMode - -Returns the block's editing mode, defaulting to "visual" if not explicitly -assigned. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - -*Returns* - -Block editing mode. - -### isTyping - -Returns true if the user is typing, or false otherwise. - -*Parameters* - - * state: Global application state. - -*Returns* - -Whether user is typing. - -### isCaretWithinFormattedText - -Returns true if the caret is within formatted text, or false otherwise. - -*Parameters* - - * state: Global application state. - -*Returns* - -Whether the caret is within formatted text. - -### getBlockInsertionPoint - -Returns the insertion point, the index at which the new inserted block would -be placed. Defaults to the last index. - -*Parameters* - - * state: Editor state. - -*Returns* - -Insertion point object with `rootClientId`, `index`. - -### isBlockInsertionPointVisible - -Returns true if we should show the block insertion point. - -*Parameters* - - * state: Global application state. - -*Returns* - -Whether the insertion point is visible or not. - -### isValidTemplate - -Returns whether the blocks matches the template or not. - -*Parameters* - - * state: null - -*Returns* - -Whether the template is valid or not. - -### getTemplate - -Returns the defined block template - -*Parameters* - - * state: null - -*Returns* - -Block Template - -### getTemplateLock - -Returns the defined block template lock. Optionally accepts a root block -client ID as context, otherwise defaulting to the global context. - -*Parameters* - - * state: Editor state. - * rootClientId: Optional block root client ID. - -*Returns* - -Block Template Lock - ### isSavingPost Returns true if the post is currently being saved, or false otherwise. @@ -1149,63 +479,6 @@ before falling back to serialization of block state. Post content. -### canInsertBlockType - -Determines if the given block type is allowed to be inserted into the block list. - -*Parameters* - - * state: Editor state. - * blockName: The name of the block type, e.g.' core/paragraph'. - * rootClientId: Optional root client ID of block list. - -*Returns* - -Whether the given block type is allowed to be inserted. - -### getInserterItems - -Determines the items that appear in the inserter. Includes both static -items (e.g. a regular block type) and dynamic items (e.g. a reusable block). - -Each item object contains what's necessary to display a button in the -inserter and handle its selection. - -The 'utility' property indicates how useful we think an item will be to the -user. There are 4 levels of utility: - -1. Blocks that are contextually useful (utility = 3) -2. Blocks that have been previously inserted (utility = 2) -3. Blocks that are in the common category (utility = 1) -4. All other blocks (utility = 0) - -The 'frecency' property is a heuristic (https://en.wikipedia.org/wiki/Frecency) -that combines block usage frequenty and recency. - -Items are returned ordered descendingly by their 'utility' and 'frecency'. - -*Parameters* - - * state: Editor state. - * rootClientId: Optional root client ID of block list. - -*Returns* - -Items that appear in inserter. - -### hasInserterItems - -Determines whether there are items to show in the inserter. - -*Parameters* - - * state: Editor state. - * rootClientId: Optional root client ID of block list. - -*Returns* - -Items that appear in inserter. - ### __experimentalGetReusableBlock Returns the reusable block with the given ID. @@ -1336,44 +609,6 @@ before state satisfies the given predicate function. Whether predicate matches for some history. -### getBlockListSettings - -Returns the Block List settings of a block, if any exist. - -*Parameters* - - * state: Editor state. - * clientId: Block client ID. - -*Returns* - -Block settings of the block if set. - -### getEditorSettings - -Returns the editor settings. - -*Parameters* - - * state: Editor state. - -*Returns* - -The editor settings object. - -### getTokenSettings - -Returns the token settings. - -*Parameters* - - * state: Editor state. - * name: Token name. - -*Returns* - -Token settings object, or the named token settings object if set. - ### isPostLocked Returns whether the post is locked. @@ -1459,247 +694,165 @@ or skipped when the user clicks the "publish" button. Whether the pre-publish panel should be shown or not. -## Actions - -### setupEditor - -Returns an action object used in signalling that editor has initialized with -the specified post object and editor settings. - -*Parameters* - - * post: Post object. - * edits: Initial edited attributes object. - -### resetPost - -Returns an action object used in signalling that the latest version of the -post has been received, either by initialization or save. - -*Parameters* - - * post: Post object. - -### resetAutosave - -Returns an action object used in signalling that the latest autosave of the -post has been received, by initialization or autosave. - -*Parameters* - - * post: Autosave post object. - -### updatePost - -Returns an action object used in signalling that a patch of updates for the -latest version of the post have been received. - -*Parameters* - - * edits: Updated post fields. - -### setupEditorState - -Returns an action object used to setup the editor state when first opening an editor. - -*Parameters* +### getEditorBlocks - * post: Post object. - * blocks: Array of blocks. - -### resetBlocks - -Returns an action object used in signalling that blocks state should be -reset to the specified array of blocks, taking precedence over any other -content reflected as an edit in state. +Return the current block list. *Parameters* - * blocks: Array of blocks. - -### receiveBlocks - -Returns an action object used in signalling that blocks have been received. -Unlike resetBlocks, these should be appended to the existing known set, not -replacing. + * state: null -*Parameters* +*Returns* - * blocks: Array of block objects. +Block list. -### updateBlockAttributes +### __unstableIsEditorReady -Returns an action object used in signalling that the block attributes with -the specified client ID has been updated. +Is the editor ready *Parameters* - * clientId: Block client ID. - * attributes: Block attributes to be merged. - -### updateBlock - -Returns an action object used in signalling that the block with the -specified client ID has been updated. + * state: null -*Parameters* +*Returns* - * clientId: Block client ID. - * updates: Block attributes to be merged. +is Ready. -### selectBlock +### getEditorSettings -Returns an action object used in signalling that the block with the -specified client ID has been selected, optionally accepting a position -value reflecting its selection directionality. An initialPosition of -1 -reflects a reverse selection. +Returns the post editor settings. *Parameters* - * clientId: Block client ID. - * initialPosition: Optional initial position. Pass as -1 to - reflect reverse selection. - -### selectPreviousBlock + * state: Editor state. -Yields action objects used in signalling that the block preceding the given -clientId should be selected. +*Returns* -*Parameters* +The editor settings object. - * clientId: Block client ID. +## Actions -### selectNextBlock +### setupEditor -Yields action objects used in signalling that the block following the given -clientId should be selected. +Returns an action object used in signalling that editor has initialized with +the specified post object and editor settings. *Parameters* - * clientId: Block client ID. + * post: Post object. + * edits: Initial edited attributes object. + * template: Block Template. -### toggleSelection +### resetPost -Returns an action object that enables or disables block selection. +Returns an action object used in signalling that the latest version of the +post has been received, either by initialization or save. *Parameters* - * boolean: [isSelectionEnabled=true] Whether block selection should - be enabled. + * post: Post object. -### replaceBlocks +### resetAutosave -Returns an action object signalling that a blocks should be replaced with -one or more replacement blocks. +Returns an action object used in signalling that the latest autosave of the +post has been received, by initialization or autosave. *Parameters* - * clientIds: Block client ID(s) to replace. - * blocks: Replacement block(s). + * post: Autosave post object. -### replaceBlock +### __experimentalRequestPostUpdateStart -Returns an action object signalling that a single block should be replaced -with one or more replacement blocks. +Optimistic action for dispatching that a post update request has started. *Parameters* - * clientId: Block client ID to replace. - * block: Replacement block(s). + * options: null -### moveBlockToPosition +### __experimentalRequestPostUpdateSuccess -Returns an action object signalling that an indexed block should be moved -to a new index. +Optimistic action for indicating that the request post update has completed +successfully. *Parameters* - * clientId: The client ID of the block. - * fromRootClientId: Root client ID source. - * toRootClientId: Root client ID destination. - * index: The index to move the block into. + * data: The data for the action. + * data.previousPost: The previous post prior to update. + * data.post: The new post after update + * data.isRevision: Whether the post is a revision or not. + * data.options: Options passed through from the original + action dispatch. + * data.postType: The post type object. -### insertBlock +### __experimentalRequestPostUpdateFailure -Returns an action object used in signalling that a single block should be -inserted, optionally at a specific index respective a root block list. +Optimistic action for indicating that the request post update has completed +with a failure. *Parameters* - * block: Block object to insert. - * index: Index at which block should be inserted. - * rootClientId: Optional root client ID of block list on which to insert. - * updateSelection: If true block selection will be updated. If false, block selection will not change. Defaults to true. + * data: The data for the action + * data.post: The post that failed updating. + * data.edits: The fields that were being updated. + * data.error: The error from the failed call. + * data.options: Options passed through from the original + action dispatch. -### insertBlocks +### updatePost -Returns an action object used in signalling that an array of blocks should -be inserted, optionally at a specific index respective a root block list. +Returns an action object used in signalling that a patch of updates for the +latest version of the post have been received. *Parameters* - * blocks: Block objects to insert. - * index: Index at which block should be inserted. - * rootClientId: Optional root client ID of block list on which to insert. - * updateSelection: If true block selection will be updated. If false, block selection will not change. Defaults to true. + * edits: Updated post fields. -### showInsertionPoint +### setupEditorState -Returns an action object used in signalling that the insertion point should -be shown. +Returns an action object used to setup the editor state when first opening +an editor. *Parameters* - * rootClientId: Optional root client ID of block list on - which to insert. - * index: Index at which block should be inserted. - -### hideInsertionPoint - -Returns an action object hiding the insertion point. + * post: Post object. -### setTemplateValidity +### editPost -Returns an action object resetting the template validity. +Returns an action object used in signalling that attributes of the post have +been edited. *Parameters* - * isValid: template validity flag. - -### synchronizeTemplate - -Returns an action object synchronize the template with the list of blocks + * edits: Post attributes to edit. -### editPost +### __experimentalOptimisticUpdatePost -Returns an action object used in signalling that attributes of the post have -been edited. +Returns action object produced by the updatePost creator augmented by +an optimist option that signals optimistically applying updates. *Parameters* - * edits: Post attributes to edit. + * edits: Updated post fields. ### savePost -Returns an action object to save the post. +Action generator for saving the current post in the editor. *Parameters* - * options: Options for the save. - * options.isAutosave: Perform an autosave if true. + * options: null -### mergeBlocks +### refreshPost -Returns an action object used in signalling that two blocks should be merged +Action generator for handling refreshing the current post. -*Parameters* +### trashPost - * firstBlockClientId: Client ID of the first block to merge. - * secondBlockClientId: Client ID of the second block to merge. +Action generator for trashing the current post in the editor. ### autosave -Returns an action object used in signalling that the post should autosave. +Action generator used in signalling that the post should autosave. *Parameters* @@ -1719,53 +872,6 @@ Returns an action object used in signalling that undo history should pop. Returns an action object used in signalling that undo history record should be created. -### removeBlocks - -Yields action objects used in signalling that the blocks corresponding to -the set of specified client IDs are to be removed. - -*Parameters* - - * clientIds: Client IDs of blocks to remove. - * selectPrevious: True if the previous block should be - selected when a block is removed. - -### removeBlock - -Returns an action object used in signalling that the block with the -specified client ID is to be removed. - -*Parameters* - - * clientId: Client ID of block to remove. - * selectPrevious: True if the previous block should be - selected when a block is removed. - -### toggleBlockMode - -Returns an action object used to toggle the block editing mode between -visual and HTML modes. - -*Parameters* - - * clientId: Block client ID. - -### startTyping - -Returns an action object used in signalling that the user has begun to type. - -### stopTyping - -Returns an action object used in signalling that the user has stopped typing. - -### enterFormattedText - -Returns an action object used in signalling that the caret has entered formatted text. - -### exitFormattedText - -Returns an action object used in signalling that the user caret has exited formatted text. - ### updatePostLock Returns an action object used to lock the editor. @@ -1824,7 +930,8 @@ to be updated. ### __experimentalConvertBlockToStatic -Returns an action object used to convert a reusable block into a static block. +Returns an action object used to convert a reusable block into a static +block. *Parameters* @@ -1832,62 +939,52 @@ Returns an action object used to convert a reusable block into a static block. ### __experimentalConvertBlockToReusable -Returns an action object used to convert a static block into a reusable block. +Returns an action object used to convert a static block into a reusable +block. *Parameters* * clientIds: The client IDs of the block to detach. -### insertDefaultBlock +### enablePublishSidebar -Returns an action object used in signalling that a new block of the default -type should be added to the block list. +Returns an action object used in signalling that the user has enabled the +publish sidebar. -*Parameters* +### disablePublishSidebar - * attributes: Optional attributes of the block to assign. - * rootClientId: Optional root client ID of block list on which - to append. - * index: Optional index where to insert the default block +Returns an action object used in signalling that the user has disabled the +publish sidebar. -### updateBlockListSettings +### lockPostSaving -Returns an action object that changes the nested settings of a given block. +Returns an action object used to signal that post saving is locked. *Parameters* - * clientId: Client ID of the block whose nested setting are - being received. - * settings: Object with the new settings for the nested block. + * lockName: The lock name. -### updateEditorSettings +### unlockPostSaving -Returns an action object used in signalling that the editor settings have been updated. +Returns an action object used to signal that post saving is unlocked. *Parameters* - * settings: Updated settings - -### enablePublishSidebar - -Returns an action object used in signalling that the user has enabled the publish sidebar. - -### disablePublishSidebar - -Returns an action object used in signalling that the user has disabled the publish sidebar. + * lockName: The lock name. -### lockPostSaving +### resetEditorBlocks -Returns an action object used to signal that post saving is locked. +Returns an action object used to signal that the blocks have been updated. *Parameters* - * lockName: The lock name. + * blocks: Block Array. + * options: Optional options. -### unlockPostSaving +### updateEditorSettings -Returns an action object used to signal that post saving is unlocked. +Returns an action object used in signalling that the post editor settings have been updated. *Parameters* - * lockName: The lock name. \ No newline at end of file + * settings: Updated settings \ No newline at end of file diff --git a/docs/designers-developers/developers/filters/autocomplete-filters.md b/docs/designers-developers/developers/filters/autocomplete-filters.md index 4086139c60a19..1707080e867e8 100644 --- a/docs/designers-developers/developers/filters/autocomplete-filters.md +++ b/docs/designers-developers/developers/filters/autocomplete-filters.md @@ -2,7 +2,7 @@ The `editor.Autocomplete.completers` filter is for extending and overriding the list of autocompleters used by blocks. -The `Autocomplete` component found in `@wordpress/editor` applies this filter. The `@wordpress/components` package provides the foundational `Autocomplete` component that does not apply such a filter, but blocks should generally use the component provided by `@wordpress/editor`. +The `Autocomplete` component found in `@wordpress/block-editor` applies this filter. The `@wordpress/components` package provides the foundational `Autocomplete` component that does not apply such a filter, but blocks should generally use the component provided by `@wordpress/block-editor`. ### Example diff --git a/docs/designers-developers/developers/filters/editor-filters.md b/docs/designers-developers/developers/filters/editor-filters.md index 2ddb34f39f957..9421d7cd68801 100644 --- a/docs/designers-developers/developers/filters/editor-filters.md +++ b/docs/designers-developers/developers/filters/editor-filters.md @@ -4,7 +4,7 @@ To modify the behavior of the editor experience, the following Filters are expos ### `editor.PostFeaturedImage.imageSize` -Used to modify the image size displayed in the Post Featured Image component. It defaults to `'post-thumbnail'`, and will fail back to the `full` image size when the specified image size doesn't exist in the media object. It's modeled after the `admin_post_thumbnail_size` filter in the Classic Editor. +Used to modify the image size displayed in the Post Featured Image component. It defaults to `'post-thumbnail'`, and will fail back to the `full` image size when the specified image size doesn't exist in the media object. It's modeled after the `admin_post_thumbnail_size` filter in the classic editor. _Example:_ diff --git a/docs/designers-developers/developers/internationalization.md b/docs/designers-developers/developers/internationalization.md index e8e02de2192e9..2ae1b8f8777f3 100644 --- a/docs/designers-developers/developers/internationalization.md +++ b/docs/designers-developers/developers/internationalization.md @@ -1,47 +1,232 @@ # Internationalization -This document aims to give an overview of the possibilities for both internationalization and localization when developing with WordPress. +## What is Internationalization? -## PHP +Internationalization is the process to provide multiple language support to software, in this case WordPress. Internationalization is often abbreviated as **i18n**, where 18 stands for the number of letters between the first _i_ and the last _n_. -For years, WordPress has been providing the necessary tools and functions to internationalize plugins and themes. This includes helper functions like `__()` and similar. +Providing i18n support to your plugin and theme allows it to reach the largest possible audience, even without requiring you to provide the additional language translations. When you upload your software to WordPress.org, all JS and PHP files will automatically be parsed. Any detected translation strings are added to [translate.wordpress.org](https://translate.wordpress.org/) to allow the community to translate, ensuring WordPress plugins and themes are available in as many languages as possible. -### Common Methods +For PHP, WordPress has a long established process, see [How to Internationalize Your Plugin](https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/). The release of WordPress 5.0 brings a similar process for translation to JavaScript code. -- `__( 'Hello World', 'my-text-domain' )`: Translate a certain string. -- `_x( 'Block', 'noun', 'my-text-domain' )`: Translate a certain string with some additional context. -- `_e( 'Hello World', 'my-text-domain' )`: Translate and print a certain string. -- `esc_html__( 'Hello World', 'my-text-domain' )`: Translate a certain string and escape it for safe use in HTML output. -- `esc_html_e( 'Hello World', 'my-text-domain' )`: Translate a certain string, escape it for safe use in HTML output, and print it. -- `_n( '%s Comment', '%s Comments', $number, 'my-text-domain' )`: Translate and retrieve the singular or plural form based on the supplied number. - Usually used in combination with `sprintf()` and `number_format_i18n()`. +## How to use i18n in JavaScript -## JavaScript +WordPress 5.0 introduced the wp-i18n JavaScript package that provides the functions needed to add translatable strings as you would in PHP. -Historically, `wp_localize_script()` has been used to put server-side PHP data into a properly-escaped native JavaScript object. +First, add **wp-i18n** as a dependency when registering your script: -The new editor introduces a new approach to translating strings for the editor through a new package called `@wordpress/i18n`. +```php + 'myguten-script', + ) ); +} +add_action( 'init', 'myguten_block_init' ); +``` -Depending on your developer workflow, you might want to use WP-CLI's `wp i18n make-pot` command or a build tool for Babel called `@wordpress/babel-plugin-makepot` to create the necessary translation file. The latter approach integrates with Babel to extract the I18N methods. +In your code, you can include the i18n functions. The most common function is **__** (a double underscore) which provides translation of a simple string. Here is a basic static block example, this is in a file called `block.js`: -### Common Methods in wp.i18n (May Look Similar) +```js +const { __ } = wp.i18n; +const el = wp.element.createElement; +const { registerBlockType } = wp.blocks; -- `setLocaleData( data: Object, domain: string )`: Creates a new I18N instance providing translation data for a domain. -- `__( 'Hello World', 'my-text-domain' )`: Translate a certain string. -- `_n( '%s Comment', '%s Comments', numberOfComments, 'my-text-domain' )`: Translate and retrieve the singular or plural form based on the supplied number. -- `_x( 'Default', 'block style', 'my-text-domain' )`: Translate a certain string with some additional context. -- `sprintf()`: JavaScript port of the PHP function with the same name. +registerBlockType( 'myguten/simple', { + title: __('Simple Block', 'myguten'), + category: 'widgets', -### Loading Translations + edit: () => { + return el( + 'p', + { style: { color:'red'}, }, + __('Hello World', 'myguten') + ); + }, -WordPress 5.0 introduces a new function called `wp_set_script_translations( 'my-script-handle', 'my-text-domain' )` to load translation files for a given script handle. + save: () => { + return el( + 'p', + { style: { color:'red'}, }, + __('Hello World', 'myguten') + ); + } +}); +``` + +In the above example, the function will use the first argument for the string to be translated. The second argument is the text domain which must match the text domain slug specified by your plugin. + +Common functions available, these mirror their PHP counterparts are: + +- `__( 'Hello World', 'my-text-domain' )` - Translate a certain string. +- `_n( '%s Comment', '%s Comments', numberOfComments, 'my-text-domain' )` - Translate and retrieve the singular or plural form based on the supplied number. +- `_x( 'Default', 'block style', 'my-text-domain' )` - Translate a certain string with some additional context. + +**Note:** Every string displayed to the user should be wrapped in an i18n function. + +After all strings in your code is wrapped, the final step is to tell WordPress your JavaScript contains translations, using the [wp_set_script_translations()](https://developer.wordpress.org/reference/functions/wp_set_script_translations/) function. + +```php +\n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"POT-Creation-Date: 2019-03-08T11:26:56-08:00\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"X-Generator: WP-CLI 2.1.0\n" +"X-Domain: myguten\n" + +#. Plugin Name of the plugin +msgid "Scratch Plugin" +msgstr "" + +#: block.js:6 +msgid "Simple Block" +msgstr "" + +#: block.js:13 +#: block.js:21 +msgid "Hello World" +msgstr "" +``` + +Here, `msgid` is the string to be translated, and `msgstr` is the actual translation. In the POT file, `msgstr` will always be empty. + +This POT file can then be used as the template for new translations. You should **copy the file** using the language code you are going to translate, this example will use the Esperanto (eo) language: + +``` +cp myguten.pot myguten-eo.po +``` + +For this simple example, you can simply edit the `.po` file in your editor and add the translation to all the `msgstr` sets. For a larger, more complex set of translation, the [GlotPress](https://glotpress.blog/) and [Poedit](https://poedit.net/) tools exist to help. + +You need also to add the `Language: eo` parameter. Here is full `myguten-eo.po` translated file + +``` +# Copyright (C) 2019 +# This file is distributed under the same license as the Scratch Plugin plugin. +msgid "" +msgstr "" +"Project-Id-Version: Scratch Plugin\n" +"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/scratch\n" +"Last-Translator: Marcus Kazmierczak \n" +"Language-Team: Esperanto \n" +"Language: eo\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"POT-Creation-Date: 2019-02-18T07:20:46-08:00\n" +"PO-Revision-Date: 2019-02-18 08:16-0800\n" +"X-Generator: Poedit 2.2.1\n" +"X-Domain: myguten\n" -You can learn more about it in [the JavaScript I18N dev note](https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wordpress/). +#. Plugin Name of the plugin +msgid "Scratch Plugin" +msgstr "Scratch kromprogrameto" + +#: block.js:6 +msgid "Simple Block" +msgstr "Simpla bloko" + +#: block.js:13 block.js:21 +msgid "Hello World" +msgstr "Saltuon mundo" +``` + +The last step to create the translation file is to convert the `myguten-eo.po` to the JSON format needed. For this, you can use the [po2json utility](https://github.com/mikeedwards/po2json) which you install using npm. It might be easiest to install globally using: `npm install -g po2json`. Once installed, use the following command to convert to JED format: + +``` +po2json myguten-eo.po myguten-eo.json -f jed +``` + +This will generate the JSON file `myguten-eo.json` which looks like: + +```json +{ + "domain": "messages", + "locale_data": { + "messages": { + "": { + "domain": "messages", + "lang": "eo" + }, + "Scratch Plugin": [ + "Scratch kromprogrameto" + ], + "Simple Block": [ + "Simpla bloko" + ], + "Hello World": [ + "Saltuon mundo" + ] + } + } +} +``` + + +### Load Translation File + +The final part is to tell WordPress where it can look to find the translation file. The `wp_set_script_translations` function accepts an optional third argument that is the path it will first check for translations. For example: + +```php + General and change your site language to Esperanto. + +With the language set, create a new post, add the block, and you will see the translations used. -## More Resources - -- [WP-CLI I18N command to generate translation catalogues](https://github.com/wp-cli/i18n-command) -- [Plugin Developer Handbook](https://developer.wordpress.org/plugins/internationalization/) -- [Theme Developer Handbook](https://developer.wordpress.org/themes/internationalization/) diff --git a/docs/designers-developers/developers/packages.md b/docs/designers-developers/developers/packages.md index e2d5a97a48211..b5ef06c18782a 100644 --- a/docs/designers-developers/developers/packages.md +++ b/docs/designers-developers/developers/packages.md @@ -26,15 +26,15 @@ const { PlainText } = wp.editor; All the packages are also available on [npm](https://www.npmjs.com/org/wordpress) if you want to bundle them in your code. -Using the same `PlainText` example, you would install the editor module with npm: +Using the same `PlainText` example, you would install the block editor module with npm: ```bash -npm install @wordpress/editor --save +npm install @wordpress/block-editor --save ``` Once installed, you can access the component in your code using: ```js -import { PlainText } from '@wordpress/editor'; +import { PlainText } from '@wordpress/block-editor'; ``` diff --git a/docs/designers-developers/developers/tutorials/format-api/2-toolbar-button.md b/docs/designers-developers/developers/tutorials/format-api/2-toolbar-button.md index 8aea061c5ef16..c6e72011f1782 100644 --- a/docs/designers-developers/developers/tutorials/format-api/2-toolbar-button.md +++ b/docs/designers-developers/developers/tutorials/format-api/2-toolbar-button.md @@ -35,3 +35,54 @@ Let's check that everything is working as expected. Reload the post/page and sel ![Toolbar with custom button](https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/assets/toolbar-with-custom-button.png) You may also want to check that upon clicking the button the `toggle format` message is shown in your browser's console. + +## Show the button only for specific blocks + +By default, the button is rendered on every rich text toolbar (image captions, buttons, paragraphs, etc). +It is possible to render the button only on blocks of a certain type by using `wp.data.withSelect` together with `wp.compose.ifCondition`. +The following sample code renders the previously shown button only on paragraph blocks: + +```js +( function( wp ) { + var withSelect = wp.data.withSelect; + var ifCondition = wp.compose.ifCondition; + var compose = wp.compose.compose; + var MyCustomButton = function( props ) { + return wp.element.createElement( + wp.editor.RichTextToolbarButton, { + icon: 'editor-code', + title: 'Sample output', + onClick: function() { + console.log( 'toggle format' ); + }, + } + ); + } + var ConditionalButton = compose( + withSelect( function( select ) { + return { + selectedBlock: select( 'core/editor' ).getSelectedBlock() + } + } ), + ifCondition( function( props ) { + return ( + props.selectedBlock && + props.selectedBlock.name === 'core/paragraph' + ); + } ) + )( MyCustomButton ); + + wp.richText.registerFormatType( + 'my-custom-format/sample-output', { + title: 'Sample output', + tagName: 'samp', + className: null, + edit: ConditionalButton, + } + ); +} )( window.wp ); +``` + +Don't forget adding `wp-compose` and `wp-data` to the dependencies array in the PHP script. + +More advanced conditions can be used, e.g., only render the button depending on specific attributes of the block. diff --git a/docs/designers-developers/developers/tutorials/javascript/extending-the-block-editor.md b/docs/designers-developers/developers/tutorials/javascript/extending-the-block-editor.md index 8d175ef3e6d9b..024b1f50e9367 100644 --- a/docs/designers-developers/developers/tutorials/javascript/extending-the-block-editor.md +++ b/docs/designers-developers/developers/tutorials/javascript/extending-the-block-editor.md @@ -32,7 +32,7 @@ The last argument in the `wp_enqueue_script()` function is an array of dependenc See [Packages](/docs/designers-developers/developers/packages.md) for list of available packages and what objects they export. -After you have updated both JavaScript and PHP files, go to the Block Editor and create a new post. +After you have updated both JavaScript and PHP files, go to the block editor and create a new post. Add a quote block, and in the right sidebar under Styles, you will see your new Fancy Quote style listed. Click the Fancy Quote to select and apply that style to your quote block. diff --git a/docs/designers-developers/developers/tutorials/javascript/js-build-setup.md b/docs/designers-developers/developers/tutorials/javascript/js-build-setup.md index 4be9fcc1efbd1..067e99e5790f2 100644 --- a/docs/designers-developers/developers/tutorials/javascript/js-build-setup.md +++ b/docs/designers-developers/developers/tutorials/javascript/js-build-setup.md @@ -127,7 +127,7 @@ module.exports = { Next, you need to install babel, the webpack loader, and the JSX plugin using: -> npm install --save-dev --save-exact babel-loader @babel/core @babel/plugin-transform-react-jsx +`npm install --save-dev --save-exact babel-loader @babel/core @babel/plugin-transform-react-jsx` You configure babel by creating a `.babelrc` file: diff --git a/docs/designers-developers/developers/tutorials/javascript/loading-javascript.md b/docs/designers-developers/developers/tutorials/javascript/loading-javascript.md index 813b8fa3e2bdb..c3805f26845cc 100644 --- a/docs/designers-developers/developers/tutorials/javascript/loading-javascript.md +++ b/docs/designers-developers/developers/tutorials/javascript/loading-javascript.md @@ -30,7 +30,7 @@ If your code is registered and enqueued correctly, you should see a message in y ![Console Log Message Success](https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/assets/js-tutorial-console-log-success.png) -**Note for Theme Developers:** The above method of enqueing is used for plugins. If you are extending the Block Editor for your theme there is a minor difference, you will use the `get_template_directory_uri()` function instead of `plugins_url()`. So for a theme, the enqueue example is: +**Note for Theme Developers:** The above method of enqueing is used for plugins. If you are extending the block editor for your theme there is a minor difference, you will use the `get_template_directory_uri()` function instead of `plugins_url()`. So for a theme, the enqueue example is: ```php function myguten_enqueue() { @@ -46,4 +46,4 @@ add_action( 'enqueue_block_editor_assets', 'myguten_enqueue' ); At this point, you have a plugin in the directory `wp-content/plugins/myguten-plugin` with two files: the PHP server-side code in `myguten-plugin.php`, and the JavaScript which runs in the browser in `myguten.js`. -This puts all the initial pieces in place for you to start extending the Block Editor. +This puts all the initial pieces in place for you to start extending the block editor. diff --git a/docs/designers-developers/developers/tutorials/javascript/readme.md b/docs/designers-developers/developers/tutorials/javascript/readme.md index 55628c1cd398e..f425f2726df67 100644 --- a/docs/designers-developers/developers/tutorials/javascript/readme.md +++ b/docs/designers-developers/developers/tutorials/javascript/readme.md @@ -1,12 +1,12 @@ # Getting Started with JavaScript -The purpose of this tutorial is to step through getting started with JavaScript and WordPress, specifically around the new Block Editor. The Gutenberg Handbook documentation contains information on the APIs available for working with the block editor. The goal of this tutorial is get you comfortable on how to use the API reference and snippets of code found within. +The purpose of this tutorial is to step through getting started with JavaScript and WordPress, specifically around the new block editor. The Gutenberg Handbook documentation contains information on the APIs available for working with the block editor. The goal of this tutorial is get you comfortable on how to use the API reference and snippets of code found within. ### What is JavaScript JavaScript is a programming language which is loaded and executed in your web browser; compared to PHP which is run by a web server with the results sent to the browser, typically as HTML. -The Block Editor introduced in WordPress 5.0 is written entirely in JavaScript, with the code run in the browser, and not on the server, this allows for a richer and more dynamic user experience. It also requires to learn how to use JavaScript to extend and enhance the Block Editor. +The block editor introduced in WordPress 5.0 is written entirely in JavaScript, with the code run in the browser, and not on the server, this allows for a richer and more dynamic user experience. It also requires to learn how to use JavaScript to extend and enhance the block editor. ### Table of Contents diff --git a/docs/designers-developers/developers/tutorials/metabox/meta-block-2-register-meta.md b/docs/designers-developers/developers/tutorials/metabox/meta-block-2-register-meta.md index e58889c7599df..795bd722ece29 100644 --- a/docs/designers-developers/developers/tutorials/metabox/meta-block-2-register-meta.md +++ b/docs/designers-developers/developers/tutorials/metabox/meta-block-2-register-meta.md @@ -2,7 +2,7 @@ A post meta field is a WordPress object used to store extra data about a post. You need to first register a new meta field prior to use. See Managing [Post Metadata](https://developer.wordpress.org/plugins/metadata/managing-post-metadata/) to learn more about post meta. -When registering the field, note the `show_in_rest` parameter. This ensures the data will be included in the REST API, which the Block Editor uses to load and save meta data. See the [`register_meta`](https://developer.wordpress.org/reference/functions/register_meta/) function definition for extra information. +When registering the field, note the `show_in_rest` parameter. This ensures the data will be included in the REST API, which the block editor uses to load and save meta data. See the [`register_meta`](https://developer.wordpress.org/reference/functions/register_meta/) function definition for extra information. To register the field, create a PHP plugin file called `myguten-meta-block.php` including: diff --git a/docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md b/docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md index 0ad9966b91a12..0a173a539a82b 100644 --- a/docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md +++ b/docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md @@ -6,30 +6,32 @@ For this block, you will use the TextControl component, which is similar to an H Attributes are the information displayed in blocks. As shown in the block tutorial, the source of attributes come from the text or HTML a user writes in the editor. For your meta block, the attribute will come from the post meta field. -By specifying the source of the attributes as `meta`, the Block Editor automatically handles the loading and storing of the data; no REST API or data functions are needed. +By specifying the source of the attributes as `meta`, the block editor automatically handles the loading and storing of the data; no REST API or data functions are needed. Add this code to your JavaScript file (this tutorial will call the file `myguten.js`): +{% codetabs %} +{% ES5 %} ```js ( function( wp ) { var el = wp.element.createElement; var registerBlockType = wp.blocks.registerBlockType; - var TextField = wp.components.TextControl; + var TextControl = wp.components.TextControl; - registerBlockType("myguten/meta-block", { - title: "Meta Block", - icon: "smiley", - category: "common", + registerBlockType( 'myguten/meta-block', { + title: 'Meta Block', + icon: 'smiley', + category: 'common', attributes: { blockValue: { - type: "string", - source: "meta", - meta: "myguten_meta_block_field" + type: 'string', + source: 'meta', + meta: 'myguten_meta_block_field' } }, - edit: function(props) { + edit: function( props ) { var className = props.className; var setAttributes = props.setAttributes; @@ -37,11 +39,11 @@ Add this code to your JavaScript file (this tutorial will call the file `myguten setAttributes({ blockValue }); } - return el( - "div", + return el( + 'div', { className: className }, - el( TextField, { - label: "Meta Block Field", + el( TextControl, { + label: 'Meta Block Field', value: props.attributes.blockValue, onChange: updateBlockValue } ) @@ -53,9 +55,53 @@ Add this code to your JavaScript file (this tutorial will call the file `myguten save: function() { return null; } - }); -})( window.wp ); + } ); +} )( window.wp ); ``` +{% ESNext %} +```jsx + +const { registerBlockType } = wp.blocks; +const { TextControl } = wp.components; + +registerBlockType( 'myguten/meta-block', { + title: 'Meta Block', + icon: 'smiley', + category: 'common', + + attributes: { + blockValue: { + type: 'string', + source: 'meta', + meta: 'myguten_meta_block_field', + }, + }, + + edit( { className, setAttributes, attributes } ) { + + function updateBlockValue( blockValue ) { + setAttributes( { blockValue } ); + } + + return ( +
+ +
+ ); + }, + + // No information saved to the block + // Data is saved to post meta via attributes + save() { + return null; + } +} ); +``` +{% end %} **Important:** Before you test, you need to enqueue your JavaScript file and its dependencies. Note the WordPress packages used above are `wp.element`, `wp.blocks`, and `wp.components`. Each of these need to be included in the array of dependencies. Update the `myguten-meta-block.php` file adding the enqueue function: diff --git a/docs/designers-developers/developers/tutorials/metabox/readme.md b/docs/designers-developers/developers/tutorials/metabox/readme.md index aa13df05ff580..a1e29fb2beeff 100644 --- a/docs/designers-developers/developers/tutorials/metabox/readme.md +++ b/docs/designers-developers/developers/tutorials/metabox/readme.md @@ -4,7 +4,7 @@ Prior to the block editor, custom meta boxes were used to extend the editor. Wit The new block editor does support most existing meta boxes, see [this backward compatibility article](/docs/designers-developers/developers/backward-compatibility/meta-box.md) for more support details . -Here are two mini-tutorials for creating similar functionality to meta boxes in the Block Editor. +Here are two mini-tutorials for creating similar functionality to meta boxes in the block editor. ## Use Blocks to Store Meta diff --git a/docs/designers-developers/developers/tutorials/notices/README.md b/docs/designers-developers/developers/tutorials/notices/README.md index 63296f41dfb4d..56950343a13ce 100644 --- a/docs/designers-developers/developers/tutorials/notices/README.md +++ b/docs/designers-developers/developers/tutorials/notices/README.md @@ -2,13 +2,13 @@ Notices are informational UI displayed near the top of admin pages. WordPress core, themes, and plugins all use notices to indicate the result of an action, or to draw the user's attention to necessary information. -In the Classic Editor, notices hooked onto the `admin_notices` action can render whatever HTML they'd like. In the Block Editor, notices are restricted to a more formal API. +In the classic editor, notices hooked onto the `admin_notices` action can render whatever HTML they'd like. In the block editor, notices are restricted to a more formal API. ## Notices in the Classic Editor -In the Classic Editor, here's an example of the "Post draft updated" notice: +In the classic editor, here's an example of the "Post draft updated" notice: -![Post draft updated in the Classic Editor](https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/notices/classic-editor-notice.png) +![Post draft updated in the classic editor](https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/notices/classic-editor-notice.png) Producing an equivalent "Post draft updated" notice would require code like this: @@ -33,13 +33,13 @@ function myguten_admin_notice() { add_action( 'admin_notices', 'myguten_admin_notice' ); ``` -Importantly, the `admin_notices` hook allows a developer to render whatever HTML they'd like. One advantage is that the developer has a great amount of flexibility. The key disadvantage is that arbitrary HTML makes future iterations on notices more difficult, if not possible, because the iterations need to accommodate for arbitrary HTML. This is why the Block Editor has a formal API. +Importantly, the `admin_notices` hook allows a developer to render whatever HTML they'd like. One advantage is that the developer has a great amount of flexibility. The key disadvantage is that arbitrary HTML makes future iterations on notices more difficult, if not possible, because the iterations need to accommodate for arbitrary HTML. This is why the block editor has a formal API. ## Notices in the Block Editor -In the Block Editor, here's an example of the "Post published" notice: +In the block editor, here's an example of the "Post published" notice: -![Post published in the Block Editor](https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/notices/block-editor-notice.png) +![Post published in the block editor](https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/notices/block-editor-notice.png) Producing an equivalent "Post published" notice would require code like this: @@ -67,14 +67,14 @@ You'll want to use this _Notices Data API_ when producing a notice from within t To better understand the specific code example above: * `wp` is WordPress global window variable. -* `wp.data` is an object provided by the Block Editor for accessing the Block Editor data store. -* `wp.data.dispatch('core/notices')` accesses functionality registered to the Block Editor data store by the Notices package. -* `createNotice()` is a function offered by the Notices package to register a new notice. The Block Editor reads from the notice data store in order to know which notices to display. +* `wp.data` is an object provided by the block editor for accessing the block editor data store. +* `wp.data.dispatch('core/notices')` accesses functionality registered to the block editor data store by the Notices package. +* `createNotice()` is a function offered by the Notices package to register a new notice. The block editor reads from the notice data store in order to know which notices to display. -Check out the [_Loading JavaScript_](/docs/designers-developers/developers/tutorials/javascript/loading-javascript.md) tutorial for a primer on how to load your custom JavaScript into the Block Editor. +Check out the [_Loading JavaScript_](/docs/designers-developers/developers/tutorials/javascript/loading-javascript.md) tutorial for a primer on how to load your custom JavaScript into the block editor. ## Learn More -The Block Editor offers a complete API for generating notices. The official documentation is a great place to review what's possible. +The block editor offers a complete API for generating notices. The official documentation is a great place to review what's possible. For a full list of the available actions and selectors, refer to the [Notices Data Handbook](/docs/designers-developers/developers/data/data-core-notices.md) page. diff --git a/docs/designers-developers/faq.md b/docs/designers-developers/faq.md index 4fcccc36723bf..4917ac8f82e3c 100644 --- a/docs/designers-developers/faq.md +++ b/docs/designers-developers/faq.md @@ -322,7 +322,7 @@ We realize it's a big change. We also think there will be many new opportunities There is a “Classic” block, which is virtually the same as the current editor, except in block form. -There is also the [Classic Editor Plugin](https://wordpress.org/plugins/classic-editor/) which restores the previous editor, see the plugin for more information. The WordPress Core team has committed to supporting the Classic Editor Plugin [until December 2021](https://make.wordpress.org/core/2018/11/07/classic-editor-plugin-support-window/). +There is also the [Classic Editor plugin](https://wordpress.org/plugins/classic-editor/) which restores the previous editor, see the plugin for more information. The WordPress Core team has committed to supporting the Classic Editor plugin [until December 2021](https://make.wordpress.org/core/2018/11/07/classic-editor-plugin-support-window/). ## How will custom TinyMCE buttons work in Gutenberg? @@ -365,8 +365,7 @@ var blocks = wp.blocks.parse( postContent ); In PHP: ```php -$blocks = gutenberg_parse_blocks( $post_content ); // plugin -$blocks = parse_blocks( $post_content ); // WordPress 5.0 +$blocks = parse_blocks( $post_content ); ``` ## Why should I start using this once released? diff --git a/docs/manifest.json b/docs/manifest.json index 026790426f1ec..fbaa1039cf678 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -557,6 +557,12 @@ "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/packages/blob/README.md", "parent": "packages" }, + { + "title": "@wordpress/block-editor", + "slug": "packages-block-editor", + "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/packages/block-editor/README.md", + "parent": "packages" + }, { "title": "@wordpress/block-library", "slug": "packages-block-library", @@ -629,6 +635,12 @@ "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/packages/deprecated/README.md", "parent": "packages" }, + { + "title": "@wordpress/docgen", + "slug": "packages-docgen", + "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/packages/docgen/README.md", + "parent": "packages" + }, { "title": "@wordpress/dom-ready", "slug": "packages-dom-ready", @@ -1248,7 +1260,13 @@ "parent": "data" }, { - "title": "The Editor’s Data", + "title": "The Block Editor’s Data", + "slug": "data-core-block-editor", + "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/data/data-core-block-editor.md", + "parent": "data" + }, + { + "title": "The Post Editor’s Data", "slug": "data-core-editor", "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/data/data-core-editor.md", "parent": "data" diff --git a/docs/readme.md b/docs/readme.md index a95a1b0ea5abf..20f6d15625388 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -10,7 +10,9 @@ Start with [the Designer & Developer Handbook](/docs/designers-developers/readme ## User Handbook -Discover the new features Gutenberg offers, learn how your site will be affected by the new editor and how to keep using the old interface, and tips for creating beautiful posts and pages. +Discover the new features WordPress offers, learn how your site will be affected by the new editor and how to keep using the old interface, and tips for creating beautiful posts and pages. + +See [the WordPress Editor](https://wordpress.org/support/article/wordpress-editor/) support documentation. ## Contributor Handbook diff --git a/docs/tool/config.js b/docs/tool/config.js index 87900c4c624fa..6dd2341e3d3c8 100644 --- a/docs/tool/config.js +++ b/docs/tool/config.js @@ -25,8 +25,13 @@ module.exports = { selectors: [ path.resolve( root, 'packages/blocks/src/store/selectors.js' ) ], actions: [ path.resolve( root, 'packages/blocks/src/store/actions.js' ) ], }, + 'core/block-editor': { + title: 'The Block Editor’s Data', + selectors: [ path.resolve( root, 'packages/block-editor/src/store/selectors.js' ) ], + actions: [ path.resolve( root, 'packages/block-editor/src/store/actions.js' ) ], + }, 'core/editor': { - title: 'The Editor’s Data', + title: 'The Post Editor’s Data', selectors: [ path.resolve( root, 'packages/editor/src/store/selectors.js' ) ], actions: [ path.resolve( root, 'packages/editor/src/store/actions.js' ) ], }, diff --git a/docs/tool/manifest.js b/docs/tool/manifest.js index 56f7a2c8772c4..f21130e448e11 100644 --- a/docs/tool/manifest.js +++ b/docs/tool/manifest.js @@ -70,7 +70,7 @@ function getRootManifest( tocFileName ) { function generateRootManifestFromTOCItems( items, parent = null ) { let pageItems = []; - items.map( ( obj ) => { + items.forEach( ( obj ) => { const fileName = Object.keys( obj )[ 0 ]; const children = obj[ fileName ]; diff --git a/docs/users/readme.md b/docs/users/readme.md deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/gutenberg.php b/gutenberg.php index 3ade4ca6d01b0..cbb0375d2a760 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -3,8 +3,9 @@ * Plugin Name: Gutenberg * Plugin URI: https://github.com/WordPress/gutenberg * Description: Printing since 1440. This is the development plugin for the new block editor in core. - * Version: 5.1.0 + * Version: 5.2.0 * Author: Gutenberg Team + * Text Domain: gutenberg * * @package gutenberg */ @@ -33,7 +34,7 @@ function the_gutenberg_project() { Classic Editor plugin.', 'gutenberg' ), + __( 'The block editor requires JavaScript. Please try the Classic Editor plugin.', 'gutenberg' ), __( 'https://wordpress.org/plugins/classic-editor/', 'gutenberg' ) ); ?> @@ -45,6 +46,21 @@ function the_gutenberg_project() { + /' - ); - - return $dynamic_block_pattern; - } -} - -/** - * Renders a single block into a HTML string. - * - * @since 1.9.0 - * @since 4.4.0 renders full nested tree of blocks before reassembling into HTML string - * @global WP_Post $post The post to edit. - * @deprecated 5.0.0 render_block() - * - * @param array $block A single parsed block object. - * @return string String of rendered HTML. - */ -function gutenberg_render_block( $block ) { - _deprecated_function( __FUNCTION__, '5.0.0', 'render_block()' ); - - return render_block( $block ); -} - -if ( ! function_exists( 'strip_dynamic_blocks' ) ) { - /** - * Remove all dynamic blocks from the given content. - * - * @since 3.6.0 - * @deprecated 5.0.0 - * - * @param string $content Content of the current post. - * @return string - */ - function strip_dynamic_blocks( $content ) { - _deprecated_function( __FUNCTION__, '5.0.0' ); - - return preg_replace( get_dynamic_blocks_regex(), '', $content ); - } -} - -if ( ! function_exists( 'strip_dynamic_blocks_add_filter' ) ) { - /** - * Adds the content filter to strip dynamic blocks from excerpts. - * - * It's a bit hacky for now, but once this gets merged into core the function - * can just be called in `wp_trim_excerpt()`. - * - * @since 3.6.0 - * @deprecated 5.0.0 - * - * @param string $text Excerpt. - * @return string - */ - function strip_dynamic_blocks_add_filter( $text ) { - _deprecated_function( __FUNCTION__, '5.0.0' ); - - add_filter( 'the_content', 'strip_dynamic_blocks', 6 ); - - return $text; - } -} - -if ( ! function_exists( 'strip_dynamic_blocks_remove_filter' ) ) { - /** - * Removes the content filter to strip dynamic blocks from excerpts. - * - * It's a bit hacky for now, but once this gets merged into core the function - * can just be called in `wp_trim_excerpt()`. - * - * @since 3.6.0 - * @deprecated 5.0.0 - * - * @param string $text Excerpt. - * @return string - */ - function strip_dynamic_blocks_remove_filter( $text ) { - _deprecated_function( __FUNCTION__, '5.0.0' ); - - remove_filter( 'the_content', 'strip_dynamic_blocks', 6 ); - - return $text; - } -} diff --git a/lib/class-wp-rest-widget-updater-controller.php b/lib/class-wp-rest-widget-updater-controller.php new file mode 100644 index 0000000000000..23c46887ba573 --- /dev/null +++ b/lib/class-wp-rest-widget-updater-controller.php @@ -0,0 +1,186 @@ +namespace = 'wp/v2'; + $this->rest_base = 'widgets'; + } + + /** + * Registers the necessary REST API route. + * + * @access public + */ + public function register_routes() { + register_rest_route( + $this->namespace, + // Regex representing a PHP class extracted from http://php.net/manual/en/language.oop5.basic.php. + '/' . $this->rest_base . '/(?P[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)/', + array( + 'args' => array( + 'identifier' => array( + 'description' => __( 'Class name of the widget.', 'gutenberg' ), + 'type' => 'string', + ), + ), + array( + 'methods' => WP_REST_Server::EDITABLE, + 'permission_callback' => array( $this, 'compute_new_widget_permissions_check' ), + 'callback' => array( $this, 'compute_new_widget' ), + ), + ) + ); + } + + /** + * Checks if the user has permissions to make the request. + * + * @since 5.2.0 + * @access public + * + * @return true|WP_Error True if the request has read access, WP_Error object otherwise. + */ + public function compute_new_widget_permissions_check() { + // Verify if the current user has edit_theme_options capability. + // This capability is required to access the widgets screen. + if ( ! current_user_can( 'edit_theme_options' ) ) { + return new WP_Error( + 'widgets_cannot_access', + __( 'Sorry, you are not allowed to access widgets on this site.', 'gutenberg' ), + array( + 'status' => rest_authorization_required_code(), + ) + ); + } + return true; + } + + /** + * Returns the new widget instance and the form that represents it. + * + * @since 5.2.0 + * @access public + * + * @param WP_REST_Request $request Full details about the request. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. + */ + public function compute_new_widget( $request ) { + $url_params = $request->get_url_params(); + + $widget = $request->get_param( 'identifier' ); + + global $wp_widget_factory; + + if ( + null === $widget || + ! isset( $wp_widget_factory->widgets[ $widget ] ) || + ! ( $wp_widget_factory->widgets[ $widget ] instanceof WP_Widget ) + ) { + return new WP_Error( + 'widget_invalid', + __( 'Invalid widget.', 'gutenberg' ), + array( + 'status' => 404, + ) + ); + } + + $widget_obj = $wp_widget_factory->widgets[ $widget ]; + + $instance = $request->get_param( 'instance' ); + if ( null === $instance ) { + $instance = array(); + } + $id_to_use = $request->get_param( 'id_to_use' ); + if ( null === $id_to_use ) { + $id_to_use = -1; + } + + $widget_obj->_set( $id_to_use ); + ob_start(); + + $instance_changes = $request->get_param( 'instance_changes' ); + if ( null !== $instance_changes ) { + $old_instance = $instance; + $instance = $widget_obj->update( $instance_changes, $old_instance ); + /** + * Filters a widget's settings before saving. + * + * Returning false will effectively short-circuit the widget's ability + * to update settings. The old setting will be returned. + * + * @since 5.2.0 + * + * @param array $instance The current widget instance's settings. + * @param array $instance_changes Array of new widget settings. + * @param array $old_instance Array of old widget settings. + * @param WP_Widget $widget_ob The widget instance. + */ + $instance = apply_filters( 'widget_update_callback', $instance, $instance_changes, $old_instance, $widget_obj ); + if ( false === $instance ) { + $instance = $old_instance; + } + } + + $instance = apply_filters( 'widget_form_callback', $instance, $widget_obj ); + + $return = null; + if ( false !== $instance ) { + $return = $widget_obj->form( $instance ); + + /** + * Fires at the end of the widget control form. + * + * Use this hook to add extra fields to the widget form. The hook + * is only fired if the value passed to the 'widget_form_callback' + * hook is not false. + * + * Note: If the widget has no form, the text echoed from the default + * form method can be hidden using CSS. + * + * @since 5.2.0 + * + * @param WP_Widget $widget_obj The widget instance (passed by reference). + * @param null $return Return null if new fields are added. + * @param array $instance An array of the widget's settings. + */ + do_action_ref_array( 'in_widget_form', array( &$widget_obj, &$return, $instance ) ); + } + + $id_base = $widget_obj->id_base; + $id = $widget_obj->id; + $form = ob_get_clean(); + + return rest_ensure_response( + array( + 'instance' => $instance, + 'form' => $form, + 'id_base' => $id_base, + 'id' => $id, + ) + ); + } +} +/** + * End: Include for phase 2 + */ diff --git a/lib/client-assets.php b/lib/client-assets.php index b34e428425e80..801aefe8c9177 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -34,38 +34,11 @@ function gutenberg_url( $path ) { return plugins_url( $path, dirname( __FILE__ ) ); } -/** - * Returns contents of an inline script used in appending polyfill scripts for - * browsers which fail the provided tests. The provided array is a mapping from - * a condition to verify feature support to its polyfill script handle. - * - * @param array $tests Features to detect. - * @return string Conditional polyfill inline script. - */ -function gutenberg_get_script_polyfill( $tests ) { - _deprecated_function( __FUNCTION__, '5.0.0', 'wp_get_script_polyfill' ); - - global $wp_scripts; - return wp_get_script_polyfill( $wp_scripts, $tests ); -} - -if ( ! function_exists( 'register_tinymce_scripts' ) ) { - /** - * Registers the main TinyMCE scripts. - * - * @deprecated 5.0.0 wp_register_tinymce_scripts - */ - function register_tinymce_scripts() { - _deprecated_function( __FUNCTION__, '5.0.0', 'wp_register_tinymce_scripts' ); - - global $wp_scripts; - return wp_register_tinymce_scripts( $wp_scripts ); - } -} - /** * Registers a script according to `wp_register_script`. Honors this request by - * deregistering any script by the same handler before registration. + * reassigning internal dependency properties of any script handle already + * registered by that name. It does not deregister the original script, to + * avoid losing inline scripts which may have been attached. * * @since 4.1.0 * @@ -80,10 +53,101 @@ function register_tinymce_scripts() { * Default 'false'. */ function gutenberg_override_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) { - wp_deregister_script( $handle ); - wp_register_script( $handle, $src, $deps, $ver, $in_footer ); + global $wp_scripts; + + $script = $wp_scripts->query( $handle, 'registered' ); + if ( $script ) { + /* + * In many ways, this is a reimplementation of `wp_register_script` but + * bypassing consideration of whether a script by the given handle had + * already been registered. + */ + + // See: `_WP_Dependency::__construct` . + $script->src = $src; + $script->deps = $deps; + $script->ver = $ver; + + /* + * The script's `group` designation is an indication of whether it is + * to be printed in the header or footer. The behavior here defers to + * the arguments as passed. Specifically, group data is not assigned + * for a script unless it is designated to be printed in the footer. + */ + + // See: `wp_register_script` . + unset( $script->extra['group'] ); + if ( $in_footer ) { + $script->add_data( 'group', 1 ); + } + } else { + wp_register_script( $handle, $src, $deps, $ver, $in_footer ); + } + + /* + * `WP_Dependencies::set_translations` will fall over on itself if setting + * translations on the `wp-i18n` handle, since it internally adds `wp-i18n` + * as a dependency of itself, exhausting memory. The same applies for the + * polyfill script, which is a dependency _of_ `wp-i18n`. + * + * See: https://core.trac.wordpress.org/ticket/46089 + */ + if ( 'wp-i18n' !== $handle && 'wp-polyfill' !== $handle ) { + wp_set_script_translations( $handle, 'default' ); + } } +/** + * Filters the default translation file load behavior to load the Gutenberg + * plugin translation file, if available. + * + * @param string|false $file Path to the translation file to load. False if + * there isn't one. + * @param string $handle Name of the script to register a translation + * domain to. + * + * @return string|false Filtered path to the Gutenberg translation file, if + * available. + */ +function gutenberg_override_translation_file( $file, $handle ) { + if ( ! $file ) { + return $file; + } + + // Only override script handles generated from the Gutenberg plugin. + $packages_dependencies = include dirname( __FILE__ ) . '/packages-dependencies.php'; + if ( ! isset( $packages_dependencies[ $handle ] ) ) { + return $file; + } + + /* + * The default file will be in the plugins language directory, omitting the + * domain since Gutenberg assigns the script translations as the default. + * + * Example: /www/wp-content/languages/plugins/de_DE-07d88e6a803e01276b9bfcc1203e862e.json + * + * The logic of `load_script_textdomain` is such that it will assume to + * search in the plugins language directory, since the assigned source of + * the overridden Gutenberg script originates in the plugins directory. + * + * The plugin translation files each begin with the slug of the plugin, so + * it's a simple matter of prepending the Gutenberg plugin slug. + */ + $path_parts = pathinfo( $file ); + $plugin_translation_file = ( + $path_parts['dirname'] . + '/gutenberg-' . + $path_parts['basename'] + ); + + if ( ! is_readable( $plugin_translation_file ) ) { + return $file; + } + + return $plugin_translation_file; +} +add_filter( 'load_script_translation_file', 'gutenberg_override_translation_file', 10, 2 ); + /** * Registers a style according to `wp_register_style`. Honors this request by * deregistering any style by the same handler before registration. @@ -139,24 +203,17 @@ function gutenberg_register_scripts_and_styles() { global $wp_scripts; gutenberg_register_vendor_scripts(); - - wp_add_inline_script( - 'wp-polyfill', - wp_get_script_polyfill( - $wp_scripts, - array( - '\'fetch\' in window' => 'wp-polyfill-fetch', - 'document.contains' => 'wp-polyfill-node-contains', - 'window.FormData && window.FormData.prototype.keys' => 'wp-polyfill-formdata', - 'Element.prototype.matches && Element.prototype.closest' => 'wp-polyfill-element-closest', - ), - 'after' - ) - ); - gutenberg_register_packages_scripts(); - // Inline scripts. + // Add nonce middleware which accounts for the absence of the heartbeat + // listener. This relies on API Fetch implementation running middlewares in + // order of last added, and that the original nonce middleware would defer + // to an X-WP-Nonce header already being present. This inline script should + // be removed once the following Core ticket is resolved in assigning the + // nonce received from heartbeat to the created middleware. + // + // See: https://core.trac.wordpress.org/ticket/46107 . + // See: https://github.com/WordPress/gutenberg/pull/13451 . global $wp_scripts; if ( isset( $wp_scripts->registered['wp-api-fetch'] ) ) { $wp_scripts->registered['wp-api-fetch']->deps[] = 'wp-hooks'; @@ -179,21 +236,16 @@ function gutenberg_register_scripts_and_styles() { ' }', ' }', ' )', - '} )()', + '} )();', ) ), ( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'wp_rest' ) ), 'after' ); - wp_add_inline_script( - 'wp-api-fetch', - sprintf( - 'wp.apiFetch.use( wp.apiFetch.createRootURLMiddleware( "%s" ) );', - esc_url_raw( get_rest_url() ) - ), - 'after' - ); + + // TEMPORARY: Core does not (yet) provide persistence migration from the + // introduction of the block editor. wp_add_inline_script( 'wp-data', implode( @@ -202,216 +254,28 @@ function gutenberg_register_scripts_and_styles() { '( function() {', ' var userId = ' . get_current_user_ID() . ';', ' var storageKey = "WP_DATA_USER_" + userId;', - ' wp.data', - ' .use( wp.data.plugins.persistence, { storageKey: storageKey } )', - ' .use( wp.data.plugins.controls );', + ' wp.data.plugins.persistence.__unstableMigrate( { storageKey: storageKey } );', '} )()', ) ) ); - global $wp_locale; - wp_add_inline_script( - 'wp-date', - sprintf( - 'wp.date.setSettings( %s );', - wp_json_encode( - array( - 'l10n' => array( - 'locale' => get_user_locale(), - 'months' => array_values( $wp_locale->month ), - 'monthsShort' => array_values( $wp_locale->month_abbrev ), - 'weekdays' => array_values( $wp_locale->weekday ), - 'weekdaysShort' => array_values( $wp_locale->weekday_abbrev ), - 'meridiem' => (object) $wp_locale->meridiem, - 'relative' => array( - /* translators: %s: duration */ - 'future' => __( '%s from now', 'default' ), - /* translators: %s: duration */ - 'past' => __( '%s ago', 'default' ), - ), - ), - 'formats' => array( - 'time' => get_option( 'time_format', __( 'g:i a', 'default' ) ), - 'date' => get_option( 'date_format', __( 'F j, Y', 'default' ) ), - 'datetime' => __( 'F j, Y g:i a', 'default' ), - 'datetimeAbbreviated' => __( 'M j, Y g:i a', 'default' ), - ), - 'timezone' => array( - 'offset' => get_option( 'gmt_offset', 0 ), - 'string' => get_option( 'timezone_string', 'UTC' ), - ), - ) - ) - ), - 'after' - ); - wp_add_inline_script( - 'moment', - sprintf( - "moment.locale( '%s', %s );", - get_user_locale(), - wp_json_encode( - array( - 'months' => array_values( $wp_locale->month ), - 'monthsShort' => array_values( $wp_locale->month_abbrev ), - 'weekdays' => array_values( $wp_locale->weekday ), - 'weekdaysShort' => array_values( $wp_locale->weekday_abbrev ), - 'week' => array( - 'dow' => (int) get_option( 'start_of_week', 0 ), - ), - 'longDateFormat' => array( - 'LT' => get_option( 'time_format', __( 'g:i a', 'default' ) ), - 'LTS' => null, - 'L' => null, - 'LL' => get_option( 'date_format', __( 'F j, Y', 'default' ) ), - 'LLL' => __( 'F j, Y g:i a', 'default' ), - 'LLLL' => null, - ), - ) - ) - ), - 'after' - ); - // Loading the old editor and its config to ensure the classic block works as expected. - wp_add_inline_script( - 'editor', - 'window.wp.oldEditor = window.wp.editor;', - 'after' - ); - - $tinymce_plugins = array( - 'charmap', - 'colorpicker', - 'hr', - 'lists', - 'media', - 'paste', - 'tabfocus', - 'textcolor', - 'fullscreen', - 'wordpress', - 'wpautoresize', - 'wpeditimage', - 'wpemoji', - 'wpgallery', - 'wplink', - 'wpdialogs', - 'wptextpattern', - 'wpview', - ); - $tinymce_plugins = apply_filters( 'tiny_mce_plugins', $tinymce_plugins, 'classic-block' ); - $tinymce_plugins = array_unique( $tinymce_plugins ); - - $toolbar1 = array( - 'formatselect', - 'bold', - 'italic', - 'bullist', - 'numlist', - 'blockquote', - 'alignleft', - 'aligncenter', - 'alignright', - 'link', - 'unlink', - 'wp_more', - 'spellchecker', - 'wp_add_media', - 'kitchensink', - ); - $toolbar1 = apply_filters( 'mce_buttons', $toolbar1, 'classic-block' ); - - $toolbar2 = array( - 'strikethrough', - 'hr', - 'forecolor', - 'pastetext', - 'removeformat', - 'charmap', - 'outdent', - 'indent', - 'undo', - 'redo', - 'wp_help', - ); - $toolbar2 = apply_filters( 'mce_buttons_2', $toolbar2, 'classic-block' ); - - $toolbar3 = apply_filters( 'mce_buttons_3', array(), 'classic-block' ); - $toolbar4 = apply_filters( 'mce_buttons_4', array(), 'classic-block' ); - - $external_plugins = apply_filters( 'mce_external_plugins', array(), 'classic-block' ); - - $tinymce_settings = array( - 'plugins' => implode( ',', $tinymce_plugins ), - 'toolbar1' => implode( ',', $toolbar1 ), - 'toolbar2' => implode( ',', $toolbar2 ), - 'toolbar3' => implode( ',', $toolbar3 ), - 'toolbar4' => implode( ',', $toolbar4 ), - 'external_plugins' => wp_json_encode( $external_plugins ), - 'classic_block_editor' => true, - ); - $tinymce_settings = apply_filters( 'tiny_mce_before_init', $tinymce_settings, 'classic-block' ); - - // Do "by hand" translation from PHP array to js object. - // Prevents breakage in some custom settings. - $init_obj = ''; - foreach ( $tinymce_settings as $key => $value ) { - if ( is_bool( $value ) ) { - $val = $value ? 'true' : 'false'; - $init_obj .= $key . ':' . $val . ','; - continue; - } elseif ( ! empty( $value ) && is_string( $value ) && ( - ( '{' == $value{0} && '}' == $value{strlen( $value ) - 1} ) || - ( '[' == $value{0} && ']' == $value{strlen( $value ) - 1} ) || - preg_match( '/^\(?function ?\(/', $value ) ) ) { - - $init_obj .= $key . ':' . $value . ','; - continue; - } - $init_obj .= $key . ':"' . $value . '",'; - } - - $init_obj = '{' . trim( $init_obj, ' ,' ) . '}'; - - $script = 'window.wpEditorL10n = { - tinymce: { - baseURL: ' . wp_json_encode( includes_url( 'js/tinymce' ) ) . ', - suffix: ' . ( SCRIPT_DEBUG ? '""' : '".min"' ) . ', - settings: ' . $init_obj . ', - } - }'; - - wp_add_inline_script( 'wp-block-library', $script, 'before' ); // Editor Styles. // This empty stylesheet is defined to ensure backward compatibility. gutenberg_override_style( 'wp-blocks', false ); - $fonts_url = ''; - - /* - * Translators: Use this to specify the proper Google Font name and variants - * to load that is supported by your language. Do not translate. - * Set to 'off' to disable loading. - */ - $font_family = _x( 'Noto Serif:400,400i,700,700i', 'Google Font Name and Variants', 'gutenberg' ); - if ( 'off' !== $font_family ) { - $query_args = array( - 'family' => urlencode( $font_family ), - ); - $fonts_url = esc_url_raw( add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ) ); - } gutenberg_override_style( - 'wp-editor-font', - $fonts_url, - array(), - null + 'wp-block-editor', + gutenberg_url( 'build/block-editor/style.css' ), + array( 'wp-components', 'wp-editor-font' ), + filemtime( gutenberg_dir_path() . 'build/editor/style.css' ) ); + wp_style_add_data( 'wp-block-editor', 'rtl', 'replace' ); gutenberg_override_style( 'wp-editor', gutenberg_url( 'build/editor/style.css' ), - array( 'wp-components', 'wp-editor-font', 'wp-nux' ), + array( 'wp-components', 'wp-block-editor', 'wp-nux' ), filemtime( gutenberg_dir_path() . 'build/editor/style.css' ) ); wp_style_add_data( 'wp-editor', 'rtl', 'replace' ); @@ -419,7 +283,7 @@ function gutenberg_register_scripts_and_styles() { gutenberg_override_style( 'wp-edit-post', gutenberg_url( 'build/edit-post/style.css' ), - array( 'wp-components', 'wp-editor', 'wp-edit-blocks', 'wp-block-library', 'wp-nux' ), + array( 'wp-components', 'wp-block-editor', 'wp-editor', 'wp-edit-blocks', 'wp-block-library', 'wp-nux' ), filemtime( gutenberg_dir_path() . 'build/edit-post/style.css' ) ); wp_style_add_data( 'wp-edit-post', 'rtl', 'replace' ); @@ -443,7 +307,7 @@ function gutenberg_register_scripts_and_styles() { gutenberg_override_style( 'wp-format-library', gutenberg_url( 'build/format-library/style.css' ), - array(), + array( 'wp-block-editor', 'wp-components' ), filemtime( gutenberg_dir_path() . 'build/format-library/style.css' ) ); wp_style_add_data( 'wp-format-library', 'rtl', 'replace' ); @@ -506,23 +370,6 @@ function gutenberg_register_scripts_and_styles() { add_action( 'wp_enqueue_scripts', 'gutenberg_register_scripts_and_styles', 5 ); add_action( 'admin_enqueue_scripts', 'gutenberg_register_scripts_and_styles', 5 ); -/** - * Append result of internal request to REST API for purpose of preloading - * data to be attached to the page. Expected to be called in the context of - * `array_reduce`. - * - * @deprecated 5.0.0 rest_preload_api_request - * - * @param array $memo Reduce accumulator. - * @param string $path REST API path to preload. - * @return array Modified reduce accumulator. - */ -function gutenberg_preload_api_request( $memo, $path ) { - _deprecated_function( __FUNCTION__, '5.0.0', 'rest_preload_api_request' ); - - return rest_preload_api_request( $memo, $path ); -} - /** * Registers vendor JavaScript files to be used as dependencies of the editor * and plugins. @@ -533,52 +380,10 @@ function gutenberg_preload_api_request( $memo, $path ) { * @since 0.1.0 */ function gutenberg_register_vendor_scripts() { - $suffix = SCRIPT_DEBUG ? '' : '.min'; - - // Vendor Scripts. - $react_suffix = ( SCRIPT_DEBUG ? '.development' : '.production' ) . $suffix; - - gutenberg_register_vendor_script( - 'react', - 'https://unpkg.com/react@16.6.3/umd/react' . $react_suffix . '.js', - array( 'wp-polyfill' ) - ); - gutenberg_register_vendor_script( - 'react-dom', - 'https://unpkg.com/react-dom@16.6.3/umd/react-dom' . $react_suffix . '.js', - array( 'react' ) - ); - $moment_script = SCRIPT_DEBUG ? 'moment.js' : 'min/moment.min.js'; - gutenberg_register_vendor_script( - 'moment', - 'https://unpkg.com/moment@2.22.1/' . $moment_script, - array() - ); - gutenberg_register_vendor_script( - 'lodash', - 'https://unpkg.com/lodash@4.17.11/lodash' . $suffix . '.js' - ); - wp_add_inline_script( 'lodash', 'window.lodash = _.noConflict();' ); - gutenberg_register_vendor_script( - 'wp-polyfill-fetch', - 'https://unpkg.com/whatwg-fetch@3.0.0/dist/fetch.umd.js' - ); - gutenberg_register_vendor_script( - 'wp-polyfill-formdata', - 'https://unpkg.com/formdata-polyfill@3.0.9/formdata.min.js' - ); - gutenberg_register_vendor_script( - 'wp-polyfill-node-contains', - 'https://unpkg.com/polyfill-library@3.26.0-0/polyfills/Node/prototype/contains/polyfill.js' - ); - gutenberg_register_vendor_script( - 'wp-polyfill-element-closest', - 'https://unpkg.com/element-closest@2.0.2/element-closest.js' - ); - gutenberg_register_vendor_script( - 'wp-polyfill', - 'https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.0.0/polyfill' . $suffix . '.js' - ); + /* + * This function is kept as an empty stub, in case Gutenberg should need to + * explicitly provide a version newer than that provided by core. + */ } /** @@ -680,51 +485,6 @@ function gutenberg_register_vendor_script( $handle, $src, $deps = array() ) { ); } -/** - * Prepares server-registered blocks for JavaScript, returning an associative - * array of registered block data keyed by block name. Data includes properties - * of a block relevant for client registration. - * - * @deprecated 5.0.0 get_block_editor_server_block_settings - * - * @return array An associative array of registered block data. - */ -function gutenberg_prepare_blocks_for_js() { - _deprecated_function( __FUNCTION__, '5.0.0', 'get_block_editor_server_block_settings' ); - - return get_block_editor_server_block_settings(); -} - -/** - * Handles the enqueueing of block scripts and styles that are common to both - * the editor and the front-end. - * - * Note: This function must remain *before* - * `gutenberg_editor_scripts_and_styles` so that editor-specific stylesheets - * are loaded last. - * - * @since 0.4.0 - * @deprecated 5.0.0 wp_common_block_scripts_and_styles - */ -function gutenberg_common_scripts_and_styles() { - _deprecated_function( __FUNCTION__, '5.0.0', 'wp_common_block_scripts_and_styles' ); - - wp_common_block_scripts_and_styles(); -} - -/** - * Enqueues registered block scripts and styles, depending on current rendered - * context (only enqueuing editor scripts while in context of the editor). - * - * @since 2.0.0 - * @deprecated 5.0.0 wp_enqueue_registered_block_scripts_and_styles - */ -function gutenberg_enqueue_registered_block_scripts_and_styles() { - _deprecated_function( __FUNCTION__, '5.0.0', 'wp_enqueue_registered_block_scripts_and_styles' ); - - wp_enqueue_registered_block_scripts_and_styles(); -} - /** * Assigns a default editor template with a default block by post format, if * not otherwise assigned for a new post of type "post". @@ -794,31 +554,13 @@ function gutenberg_get_autosave_newer_than_post_save( $post ) { return false; } -/** - * Returns all the block categories. - * - * @since 2.2.0 - * @deprecated 5.0.0 get_block_categories - * - * @param WP_Post $post Post object. - * @return Object[] Block categories. - */ -function gutenberg_get_block_categories( $post ) { - _deprecated_function( __FUNCTION__, '5.0.0', 'get_block_categories' ); - - return get_block_categories( $post ); -} - /** * Loads Gutenberg Locale Data. + * + * @deprecated 5.2.0 */ function gutenberg_load_locale_data() { - // Prepare Jed locale data. - $locale_data = gutenberg_get_jed_locale_data( 'gutenberg' ); - wp_add_inline_script( - 'wp-i18n', - 'wp.i18n.setLocaleData( ' . json_encode( $locale_data ) . ' );' - ); + _deprecated_function( __FUNCTION__, '5.2.0' ); } /** @@ -1006,8 +748,6 @@ function gutenberg_editor_scripts_and_styles( $hook ) { $initial_edits = null; } - gutenberg_load_locale_data(); - // Preload server-registered block schemas. wp_add_inline_script( 'wp-blocks', @@ -1028,15 +768,9 @@ function gutenberg_editor_scripts_and_styles( $hook ) { wp_localize_script( 'wp-editor', '_wpMetaBoxUrl', $meta_box_url ); // Initialize the editor. - $gutenberg_theme_support = get_theme_support( 'gutenberg' ); - $align_wide = get_theme_support( 'align-wide' ); - $color_palette = current( (array) get_theme_support( 'editor-color-palette' ) ); - $font_sizes = current( (array) get_theme_support( 'editor-font-sizes' ) ); - - if ( ! empty( $gutenberg_theme_support ) ) { - wp_enqueue_script( 'wp-deprecated' ); - wp_add_inline_script( 'wp-deprecated', 'wp.deprecated( "`gutenberg` theme support", { plugin: "Gutenberg", version: "5.2", alternative: "`align-wide` theme support" } );' ); - } + $align_wide = get_theme_support( 'align-wide' ); + $color_palette = current( (array) get_theme_support( 'editor-color-palette' ) ); + $font_sizes = current( (array) get_theme_support( 'editor-font-sizes' ) ); /** * Filters the allowed block types for the editor, defaulting to true (all @@ -1146,26 +880,75 @@ function gutenberg_editor_scripts_and_styles( $hook ) { ); } + /** + * Start: Include for phase 2 + */ + + /** + * Todo: The hardcoded array should be replaced with a mechanisms that allows core blocks + * and third party blocks to specify they already have equivalent blocks, and maybe even allow them + * to have a migration function. + */ + $core_widgets = array( 'WP_Widget_Pages', 'WP_Widget_Calendar', 'WP_Widget_Archives', 'WP_Widget_Media_Audio', 'WP_Widget_Media_Image', 'WP_Widget_Media_Gallery', 'WP_Widget_Media_Video', 'WP_Widget_Meta', 'WP_Widget_Search', 'WP_Widget_Text', 'WP_Widget_Categories', 'WP_Widget_Recent_Posts', 'WP_Widget_Recent_Comments', 'WP_Widget_RSS', 'WP_Widget_Tag_Cloud', 'WP_Nav_Menu_Widget', 'WP_Widget_Custom_HTML' ); + + $has_permissions_to_manage_widgets = current_user_can( 'edit_theme_options' ); + $available_legacy_widgets = array(); + global $wp_widget_factory, $wp_registered_widgets; + foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) { + if ( ! in_array( $class, $core_widgets ) ) { + $available_legacy_widgets[ $class ] = array( + 'name' => html_entity_decode( $widget_obj->name ), + 'description' => html_entity_decode( $widget_obj->widget_options['description'] ), + 'isCallbackWidget' => false, + ); + } + } + foreach ( $wp_registered_widgets as $widget_id => $widget_obj ) { + if ( + is_array( $widget_obj['callback'] ) && + isset( $widget_obj['callback'][0] ) && + ( $widget_obj['callback'][0] instanceof WP_Widget ) + ) { + continue; + } + $available_legacy_widgets[ $widget_id ] = array( + 'name' => html_entity_decode( $widget_obj['name'] ), + 'description' => null, + 'isCallbackWidget' => true, + ); + } + /** + * End: Include for phase 2 + */ + $editor_settings = array( - 'alignWide' => $align_wide || ! empty( $gutenberg_theme_support[0]['wide-images'] ), // Backcompat. Use `align-wide` outside of `gutenberg` array. - 'availableTemplates' => $available_templates, - 'allowedBlockTypes' => $allowed_block_types, - 'disableCustomColors' => get_theme_support( 'disable-custom-colors' ), - 'disableCustomFontSizes' => get_theme_support( 'disable-custom-font-sizes' ), - 'disablePostFormats' => ! current_theme_supports( 'post-formats' ), - 'titlePlaceholder' => apply_filters( 'enter_title_here', __( 'Add title', 'gutenberg' ), $post ), - 'bodyPlaceholder' => apply_filters( 'write_your_story', __( 'Start writing or type / to choose a block', 'gutenberg' ), $post ), - 'isRTL' => is_rtl(), - 'autosaveInterval' => 10, - 'maxUploadFileSize' => $max_upload_size, - 'allowedMimeTypes' => get_allowed_mime_types(), - 'styles' => $styles, - 'imageSizes' => gutenberg_get_available_image_sizes(), - 'richEditingEnabled' => user_can_richedit(), + 'alignWide' => $align_wide, + 'availableTemplates' => $available_templates, + /** + * Start: Include for phase 2 + */ + 'hasPermissionsToManageWidgets' => $has_permissions_to_manage_widgets, + 'availableLegacyWidgets' => $available_legacy_widgets, + /** + * End: Include for phase 2 + */ + 'allowedBlockTypes' => $allowed_block_types, + 'disableCustomColors' => get_theme_support( 'disable-custom-colors' ), + 'disableCustomFontSizes' => get_theme_support( 'disable-custom-font-sizes' ), + 'disablePostFormats' => ! current_theme_supports( 'post-formats' ), + 'titlePlaceholder' => apply_filters( 'enter_title_here', __( 'Add title', 'gutenberg' ), $post ), + 'bodyPlaceholder' => apply_filters( 'write_your_story', __( 'Start writing or type / to choose a block', 'gutenberg' ), $post ), + 'isRTL' => is_rtl(), + 'autosaveInterval' => 10, + 'maxUploadFileSize' => $max_upload_size, + 'allowedMimeTypes' => get_allowed_mime_types(), + 'styles' => $styles, + 'imageSizes' => gutenberg_get_available_image_sizes(), + 'richEditingEnabled' => user_can_richedit(), // Ideally, we'd remove this and rely on a REST API endpoint. - 'postLock' => $lock_details, - 'postLockUtils' => array( + 'postLock' => $lock_details, + 'postLockUtils' => array( 'nonce' => wp_create_nonce( 'lock-post_' . $post->ID ), 'unlockNonce' => wp_create_nonce( 'update-post_' . $post->ID ), 'ajaxUrl' => admin_url( 'admin-ajax.php' ), @@ -1173,7 +956,7 @@ function gutenberg_editor_scripts_and_styles( $hook ) { // Whether or not to load the 'postcustom' meta box is stored as a user meta // field so that we're not always loading its assets. - 'enableCustomFields' => (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ), + 'enableCustomFields' => (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ), ); $post_autosave = gutenberg_get_autosave_newer_than_post_save( $post ); @@ -1220,28 +1003,12 @@ function gutenberg_editor_scripts_and_styles( $hook ) { $editor_settings = apply_filters( 'block_editor_settings', $editor_settings, $post ); $init_script = << $post->ID, ) ); + wp_tinymce_inline_scripts(); wp_enqueue_editor(); /** @@ -1281,12 +1049,3 @@ function gutenberg_editor_scripts_and_styles( $hook ) { */ do_action( 'enqueue_block_editor_assets' ); } - -/** - * Enqueue the reusable blocks listing page's script - * - * @deprecated 5.0.0 - */ -function gutenberg_load_list_reusable_blocks() { - _deprecated_function( __FUNCTION__, '5.0.0' ); -} diff --git a/lib/compat.php b/lib/compat.php deleted file mode 100644 index dc090cfe047de..0000000000000 --- a/lib/compat.php +++ /dev/null @@ -1,93 +0,0 @@ - array(), 'wp-block-serialization-spec-parser' => array(), + 'wp-block-editor' => array( + 'lodash', + 'wp-a11y', + 'wp-blob', + 'wp-blocks', + 'wp-compose', + 'wp-components', + 'wp-core-data', + 'wp-data', + 'wp-dom', + 'wp-element', + 'wp-hooks', + 'wp-html-entities', + 'wp-i18n', + 'wp-is-shallow-equal', + 'wp-keycodes', + 'wp-rich-text', + 'wp-token-list', + 'wp-url', + 'wp-viewport', + 'wp-wordcount', + ), 'wp-blocks' => array( 'lodash', 'wp-autop', @@ -112,6 +135,7 @@ 'media-views', 'wp-a11y', 'wp-api-fetch', + 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', @@ -138,6 +162,7 @@ 'wp-a11y', 'wp-api-fetch', 'wp-blob', + 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', @@ -168,6 +193,7 @@ ), 'wp-escape-html' => array(), 'wp-format-library' => array( + 'wp-block-editor', 'wp-components', 'wp-editor', 'wp-element', diff --git a/lib/plugin-compat.php b/lib/plugin-compat.php deleted file mode 100644 index 74f6dbb2cb0c8..0000000000000 --- a/lib/plugin-compat.php +++ /dev/null @@ -1,33 +0,0 @@ - tags. This adds a filter prior to saving the post via - * REST API to disable markdown support. Disables markdown support provided by - * plugins Jetpack, JP-Markdown, and WP Editor.MD - * - * @since 1.3.0 - * @deprecated 5.0.0 - * - * @param array $post Post object which contains content to check for block. - * @return array $post Post object. - */ -function gutenberg_remove_wpcom_markdown_support( $post ) { - _deprecated_function( __FUNCTION__, '5.0.0' ); - - return $post; -} diff --git a/lib/register.php b/lib/register.php deleted file mode 100644 index 16d5aa85b623e..0000000000000 --- a/lib/register.php +++ /dev/null @@ -1,209 +0,0 @@ -register_routes(); } - +add_action( 'rest_api_init', 'gutenberg_register_rest_widget_updater_routes' ); /** - * Include target schema attributes to links, based on whether the user can. - * - * @see https://core.trac.wordpress.org/ticket/45014 - * @deprecated 5.0.0 - * - * @param WP_REST_Response $response WP REST API response of a post. - * @return WP_REST_Response Response containing the new links. - */ -function gutenberg_add_target_schema_to_links( $response ) { - _deprecated_function( __FUNCTION__, '5.0.0' ); - - return $response; -} - -/** - * Whenever a post type is registered, ensure we're hooked into it's WP REST API response. - * - * @deprecated 5.0.0 - * - * @param string $post_type The newly registered post type. - * @return string That same post type. + * End: Include for phase 2 */ -function gutenberg_register_post_prepare_functions( $post_type ) { - _deprecated_function( __FUNCTION__, '5.0.0' ); - - return $post_type; -} - -/** - * Silence PHP Warnings and Errors in JSON requests - * - * @see https://core.trac.wordpress.org/ticket/44534 - * @deprecated 5.0.0 - */ -function gutenberg_silence_rest_errors() { - _deprecated_function( __FUNCTION__, '5.0.0' ); -} - -/** - * Include additional labels for registered post types - * - * @see https://core.trac.wordpress.org/ticket/45101 - * @deprecated 5.0.0 - * - * @param array $args Arguments supplied to register_post_type(). - * @return array Arguments supplied to register_post_type() - */ -function gutenberg_filter_post_type_labels( $args ) { - _deprecated_function( __FUNCTION__, '5.0.0' ); - - return $args; -} diff --git a/package-lock.json b/package-lock.json index 55d51e8dce8bb..d01d93ab49028 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "5.1.0", + "version": "5.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2496,10 +2496,7 @@ }, "@wordpress/babel-plugin-import-jsx-pragma": { "version": "file:packages/babel-plugin-import-jsx-pragma", - "dev": true, - "requires": { - "@babel/runtime": "^7.3.1" - } + "dev": true }, "@wordpress/babel-plugin-makepot": { "version": "file:packages/babel-plugin-makepot", @@ -2521,8 +2518,8 @@ "@babel/plugin-transform-runtime": "^7.2.0", "@babel/preset-env": "^7.3.1", "@babel/runtime": "^7.3.1", - "@wordpress/browserslist-config": "file:packages/browserslist-config", - "babel-core": "^7.0.0-bridge.0" + "@wordpress/babel-plugin-import-jsx-pragma": "file:packages/babel-plugin-import-jsx-pragma", + "@wordpress/browserslist-config": "file:packages/browserslist-config" } }, "@wordpress/blob": { @@ -2531,12 +2528,45 @@ "@babel/runtime": "^7.3.1" } }, + "@wordpress/block-editor": { + "version": "file:packages/block-editor", + "requires": { + "@babel/runtime": "^7.0.0", + "@wordpress/a11y": "file:packages/a11y", + "@wordpress/blob": "file:packages/blob", + "@wordpress/blocks": "file:packages/blocks", + "@wordpress/components": "file:packages/components", + "@wordpress/compose": "file:packages/compose", + "@wordpress/core-data": "file:packages/core-data", + "@wordpress/data": "file:packages/data", + "@wordpress/dom": "file:packages/dom", + "@wordpress/element": "file:packages/element", + "@wordpress/hooks": "file:packages/hooks", + "@wordpress/html-entities": "file:packages/html-entities", + "@wordpress/i18n": "file:packages/i18n", + "@wordpress/is-shallow-equal": "file:packages/is-shallow-equal", + "@wordpress/keycodes": "file:packages/keycodes", + "@wordpress/rich-text": "file:packages/rich-text", + "@wordpress/token-list": "file:packages/token-list", + "@wordpress/url": "file:packages/url", + "@wordpress/viewport": "file:packages/viewport", + "@wordpress/wordcount": "file:packages/wordcount", + "classnames": "^2.2.5", + "dom-scroll-into-view": "^1.2.1", + "lodash": "^4.17.10", + "redux-multi": "^0.1.12", + "refx": "^3.0.0", + "rememo": "^3.0.0", + "tinycolor2": "^1.4.1" + } + }, "@wordpress/block-library": { "version": "file:packages/block-library", "requires": { "@babel/runtime": "^7.3.1", "@wordpress/autop": "file:packages/autop", "@wordpress/blob": "file:packages/blob", + "@wordpress/block-editor": "file:packages/block-editor", "@wordpress/blocks": "file:packages/blocks", "@wordpress/components": "file:packages/components", "@wordpress/compose": "file:packages/compose", @@ -2550,6 +2580,7 @@ "@wordpress/keycodes": "file:packages/keycodes", "@wordpress/viewport": "file:packages/viewport", "classnames": "^2.2.5", + "fast-average-color": "4.3.0", "lodash": "^4.17.11", "memize": "^1.0.5", "url": "^0.11.0" @@ -2562,7 +2593,10 @@ } }, "@wordpress/block-serialization-spec-parser": { - "version": "file:packages/block-serialization-spec-parser" + "version": "file:packages/block-serialization-spec-parser", + "requires": { + "pegjs": "^0.10.0" + } }, "@wordpress/blocks": { "version": "file:packages/blocks", @@ -2685,6 +2719,17 @@ "@wordpress/hooks": "file:packages/hooks" } }, + "@wordpress/docgen": { + "version": "file:packages/docgen", + "dev": true, + "requires": { + "mdast-util-inject": "1.1.0", + "optionator": "0.8.2", + "remark": "10.0.1", + "remark-parse": "6.0.3", + "unified": "7.1.0" + } + }, "@wordpress/dom": { "version": "file:packages/dom", "requires": { @@ -2702,6 +2747,7 @@ "version": "file:packages/e2e-test-utils", "dev": true, "requires": { + "@babel/runtime": "^7.3.1", "@wordpress/keycodes": "file:packages/keycodes", "@wordpress/url": "file:packages/url", "lodash": "^4.17.11", @@ -2715,7 +2761,7 @@ "@wordpress/e2e-test-utils": "file:packages/e2e-test-utils", "@wordpress/jest-console": "file:packages/jest-console", "@wordpress/scripts": "file:packages/scripts", - "expect-puppeteer": "^3.2.0", + "expect-puppeteer": "^4.0.0", "lodash": "^4.17.11" } }, @@ -2725,6 +2771,7 @@ "@babel/runtime": "^7.3.1", "@wordpress/a11y": "file:packages/a11y", "@wordpress/api-fetch": "file:packages/api-fetch", + "@wordpress/block-editor": "file:packages/block-editor", "@wordpress/block-library": "file:packages/block-library", "@wordpress/blocks": "file:packages/blocks", "@wordpress/components": "file:packages/components", @@ -2757,9 +2804,9 @@ "version": "file:packages/editor", "requires": { "@babel/runtime": "^7.3.1", - "@wordpress/a11y": "file:packages/a11y", "@wordpress/api-fetch": "file:packages/api-fetch", "@wordpress/blob": "file:packages/blob", + "@wordpress/block-editor": "file:packages/block-editor", "@wordpress/blocks": "file:packages/blocks", "@wordpress/components": "file:packages/components", "@wordpress/compose": "file:packages/compose", @@ -2767,21 +2814,17 @@ "@wordpress/data": "file:packages/data", "@wordpress/date": "file:packages/date", "@wordpress/deprecated": "file:packages/deprecated", - "@wordpress/dom": "file:packages/dom", "@wordpress/element": "file:packages/element", "@wordpress/hooks": "file:packages/hooks", "@wordpress/html-entities": "file:packages/html-entities", "@wordpress/i18n": "file:packages/i18n", - "@wordpress/is-shallow-equal": "file:packages/is-shallow-equal", "@wordpress/keycodes": "file:packages/keycodes", "@wordpress/notices": "file:packages/notices", "@wordpress/nux": "file:packages/nux", - "@wordpress/token-list": "file:packages/token-list", "@wordpress/url": "file:packages/url", "@wordpress/viewport": "file:packages/viewport", "@wordpress/wordcount": "file:packages/wordcount", "classnames": "^2.2.5", - "dom-scroll-into-view": "^1.2.1", "inherits": "^2.0.3", "lodash": "^4.17.11", "memize": "^1.0.5", @@ -2790,7 +2833,6 @@ "redux-optimist": "^1.0.0", "refx": "^3.0.0", "rememo": "^3.0.0", - "tinycolor2": "^1.4.1", "traverse": "^0.6.6" } }, @@ -2815,8 +2857,8 @@ "dev": true, "requires": { "babel-eslint": "^8.0.3", - "eslint-plugin-jsx-a11y": "6.0.2", - "eslint-plugin-react": "7.7.0", + "eslint-plugin-jsx-a11y": "^6.2.1", + "eslint-plugin-react": "^7.12.4", "requireindex": "^1.2.0" } }, @@ -2824,6 +2866,7 @@ "version": "file:packages/format-library", "requires": { "@babel/runtime": "^7.3.1", + "@wordpress/block-editor": "file:packages/block-editor", "@wordpress/components": "file:packages/components", "@wordpress/editor": "file:packages/editor", "@wordpress/element": "file:packages/element", @@ -2867,7 +2910,7 @@ "dev": true, "requires": { "@babel/runtime": "^7.3.1", - "jest-matcher-utils": "^23.6.0", + "jest-matcher-utils": "^24.0.0", "lodash": "^4.17.11" } }, @@ -2876,17 +2919,17 @@ "dev": true, "requires": { "@wordpress/jest-console": "file:packages/jest-console", - "babel-jest": "^23.6.0", - "enzyme": "^3.7.0", - "enzyme-adapter-react-16": "^1.6.0", - "jest-enzyme": "^6.0.2" + "babel-jest": "^24.1.0", + "enzyme": "^3.9.0", + "enzyme-adapter-react-16": "^1.10.0", + "enzyme-to-json": "^3.3.5" } }, "@wordpress/jest-puppeteer-axe": { "version": "file:packages/jest-puppeteer-axe", "dev": true, "requires": { - "axe-puppeteer": "^0.1.0" + "axe-puppeteer": "^1.0.0" } }, "@wordpress/keycodes": { @@ -2958,7 +3001,6 @@ "version": "file:packages/postcss-themes", "dev": true, "requires": { - "@babel/runtime": "^7.3.1", "autoprefixer": "^9.4.5", "postcss": "^7.0.13", "postcss-color-function": "^4.0.1" @@ -2997,20 +3039,24 @@ "@wordpress/eslint-plugin": "file:packages/eslint-plugin", "@wordpress/jest-preset-default": "file:packages/jest-preset-default", "@wordpress/npm-package-json-lint-config": "file:packages/npm-package-json-lint-config", + "babel-loader": "^8.0.5", "chalk": "^2.4.1", "check-node-version": "^3.1.1", "cross-spawn": "^5.1.0", "eslint": "^5.12.1", - "jest": "^23.6.0", - "jest-puppeteer": "3.2.1", - "npm-package-json-lint": "^3.3.1", + "jest": "^24.1.0", + "jest-puppeteer": "^4.0.0", + "npm-package-json-lint": "^3.6.0", "puppeteer": "1.6.1", "read-pkg-up": "^1.0.1", "resolve-bin": "^0.4.0", + "source-map-loader": "^0.2.4", "stylelint": "^9.10.1", "stylelint-config-wordpress": "^13.1.0", "webpack": "4.8.3", - "webpack-cli": "^3.1.2" + "webpack-bundle-analyzer": "^3.0.3", + "webpack-cli": "^3.1.2", + "webpack-livereload-plugin": "^2.2.0" } }, "@wordpress/shortcode": { @@ -3237,12 +3283,12 @@ } }, "append-transform": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", - "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", "dev": true, "requires": { - "default-require-extensions": "^1.0.0" + "default-require-extensions": "^2.0.0" } }, "aproba": { @@ -3278,6 +3324,16 @@ } } }, + "aria-query": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", + "integrity": "sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=", + "dev": true, + "requires": { + "ast-types-flow": "0.0.7", + "commander": "^2.11.0" + } + }, "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -3308,6 +3364,12 @@ "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", "dev": true }, + "array-filter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", + "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=", + "dev": true + }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -3551,79 +3613,23 @@ "dev": true }, "axe-puppeteer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/axe-puppeteer/-/axe-puppeteer-0.1.0.tgz", - "integrity": "sha512-9pWYjivWC2lSvTCCUCgTc/62S8UKKkPFb0gYg0zYVcTsyRcIab1o0YoQYYLsI00QVES29x2VrBoid0ROPKk/RQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/axe-puppeteer/-/axe-puppeteer-1.0.0.tgz", + "integrity": "sha512-hTF3u4mtatgTN7fsLVyVgbRdNc15ngjDcTEuqhn9A7ugqLhLCryJWp9fzqZkNlrW8awPcxugyTwLPR7mRdPZmA==", "dev": true, "requires": { "axe-core": "^3.1.2" } }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "axobject-query": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.0.2.tgz", + "integrity": "sha512-MCeek8ZH7hKyO1rWUbKNQBbl4l2eY0ntk7OGi+q0RlafrCnfPxC06WZA+uebCfmYp4mNU9jRBP1AhGyf8+W3ww==", "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } + "ast-types-flow": "0.0.7" } }, - "babel-core": { - "version": "7.0.0-bridge.0", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-7.0.0-bridge.0.tgz", - "integrity": "sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==", - "dev": true - }, "babel-eslint": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-8.0.3.tgz", @@ -3727,71 +3733,54 @@ } } }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - } - } - }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, "babel-jest": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.6.0.tgz", - "integrity": "sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew==", - "dev": true, - "requires": { - "babel-plugin-istanbul": "^4.1.6", - "babel-preset-jest": "^23.2.0" - } - }, - "babel-loader": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.5.tgz", - "integrity": "sha512-NTnHnVRd2JnRqPC0vW+iOQWU5pchDbYXsG2E6DMXEpMfUcQKclF9gmf3G3ZMhzG7IG9ji4coL0cm+FxeWxDpnw==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.1.0.tgz", + "integrity": "sha512-MLcagnVrO9ybQGLEfZUqnOzv36iQzU7Bj4elm39vCukumLVSfoX+tRy3/jW7lUKc7XdpRmB/jech6L/UCsSZjw==", "dev": true, "requires": { - "find-cache-dir": "^2.0.0", - "loader-utils": "^1.0.2", - "mkdirp": "^0.5.1", - "util.promisify": "^1.0.0" + "babel-plugin-istanbul": "^5.1.0", + "babel-preset-jest": "^24.1.0", + "chalk": "^2.4.2", + "slash": "^2.0.0" }, "dependencies": { - "find-cache-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz", - "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", + "babel-plugin-istanbul": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.1.tgz", + "integrity": "sha512-RNNVv2lsHAXJQsEJ5jonQwrJVWK8AcZpG1oxhnjCUaAjL7xahYLANhPUZbzEQHjKy1NMYUwn+0NPKQc8iSY4xQ==", "dev": true, "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^3.0.0" + "find-up": "^3.0.0", + "istanbul-lib-instrument": "^3.0.0", + "test-exclude": "^5.0.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.1.0.tgz", + "integrity": "sha512-gljYrZz8w1b6fJzKcsfKsipSru2DU2DmQ39aB6nV3xQ0DDv3zpIzKGortA5gknrhNnPN8DweaEgrnZdmbGmhnw==", + "dev": true + }, + "babel-preset-jest": { + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.1.0.tgz", + "integrity": "sha512-FfNLDxFWsNX9lUmtwY7NheGlANnagvxq8LZdl5PKnVG3umP+S/g0XbVBfwtA4Ai3Ri/IMkWabBz3Tyk9wdspcw==", + "dev": true, + "requires": { + "@babel/plugin-syntax-object-rest-spread": "^7.0.0", + "babel-plugin-jest-hoist": "^24.1.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "find-up": { @@ -3803,6 +3792,33 @@ "locate-path": "^3.0.0" } }, + "istanbul-lib-instrument": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz", + "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==", + "dev": true, + "requires": { + "@babel/generator": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/template": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "istanbul-lib-coverage": "^2.0.3", + "semver": "^5.5.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -3837,204 +3853,146 @@ "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", "dev": true }, - "pkg-dir": { + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "pify": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "requires": { - "find-up": "^3.0.0" + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "test-exclude": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.1.0.tgz", + "integrity": "sha512-gwf0S2fFsANC55fSeSqpb8BYk6w3FDvwZxfNjeF6FRgvFa43r+7wRiA/Q0IxoRU37wB/LE8IQ4221BsNucTaCA==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^1.0.1" } } } }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-istanbul": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz", - "integrity": "sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ==", + "babel-loader": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.5.tgz", + "integrity": "sha512-NTnHnVRd2JnRqPC0vW+iOQWU5pchDbYXsG2E6DMXEpMfUcQKclF9gmf3G3ZMhzG7IG9ji4coL0cm+FxeWxDpnw==", "dev": true, "requires": { - "babel-plugin-syntax-object-rest-spread": "^6.13.0", - "find-up": "^2.1.0", - "istanbul-lib-instrument": "^1.10.1", - "test-exclude": "^4.2.1" - } - }, - "babel-plugin-jest-hoist": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz", - "integrity": "sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc=", - "dev": true - }, - "babel-plugin-syntax-object-rest-spread": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", - "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", - "dev": true - }, - "babel-preset-jest": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz", - "integrity": "sha1-jsegOhOPABoaj7HoETZSvxpV2kY=", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "^23.2.0", - "babel-plugin-syntax-object-rest-spread": "^6.13.0" - } - }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", + "find-cache-dir": "^2.0.0", + "loader-utils": "^1.0.2", "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" + "util.promisify": "^1.0.0" }, "dependencies": { - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" + "find-cache-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz", + "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^3.0.0" } }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { - "ms": "2.0.0" + "locate-path": "^3.0.0" } - } - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - } - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { - "ms": "2.0.0" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" } }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - } - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - }, - "dependencies": { - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "p-limit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } } } }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, "bail": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.3.tgz", @@ -4603,9 +4561,9 @@ "dev": true }, "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", "dev": true }, "camelcase": { @@ -5412,12 +5370,6 @@ "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", "dev": true }, - "circular-json-es6": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/circular-json-es6/-/circular-json-es6-2.0.2.tgz", - "integrity": "sha512-ODYONMMNb3p658Zv+Pp+/XPa5s6q7afhz3Tzyvo+VRh9WIrJ64J76ZC4GQxnlye/NesTn09jvOiuE8+xxfpwhQ==", - "dev": true - }, "clap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", @@ -5811,6 +5763,12 @@ } } }, + "compare-versions": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.4.0.tgz", + "integrity": "sha512-tK69D7oNXXqUW3ZNo/z7NXTEz22TCF0pTE+YF9cxvaAM9XnkLo1fV621xCLrRR6aevJlKxExkss0vWqUCUpqdg==", + "dev": true + }, "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", @@ -6996,15 +6954,6 @@ "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", "dev": true }, - "deep-equal-ident": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal-ident/-/deep-equal-ident-1.1.1.tgz", - "integrity": "sha1-BvS4nlNxDNbOpKd4HHqVZkLejck=", - "dev": true, - "requires": { - "lodash.isequal": "^3.0" - } - }, "deep-freeze": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz", @@ -7023,12 +6972,20 @@ "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==" }, "default-require-extensions": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", - "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", "dev": true, "requires": { - "strip-bom": "^2.0.0" + "strip-bom": "^3.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } } }, "defaults": { @@ -7135,15 +7092,6 @@ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", "dev": true }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, "detect-newline": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", @@ -7165,6 +7113,12 @@ "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" }, + "diff-sequences": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.0.0.tgz", + "integrity": "sha512-46OkIuVGBBnrC0soO/4LHu5LHGHx0uhP65OVz8XOrAJpqiCB2aVIuESvjI1F9oqebuvY8lekS1pt6TN7vt7qsw==", + "dev": true + }, "diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", @@ -7346,9 +7300,9 @@ } }, "emoji-regex": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-6.5.1.tgz", - "integrity": "sha512-PAHp6TxrCy7MGMFidro8uikr+zlJJKJ/Q6mm2ExZ7HwkyR9lSVFfE3kt36qcwa24BQL7y0G9axycGjK1A/0uNQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, "emojis-list": { @@ -7398,18 +7352,20 @@ "dev": true }, "enzyme": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.7.0.tgz", - "integrity": "sha512-QLWx+krGK6iDNyR1KlH5YPZqxZCQaVF6ike1eDJAOg0HvSkSCVImPsdWaNw6v+VrnK92Kg8jIOYhuOSS9sBpyg==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.9.0.tgz", + "integrity": "sha512-JqxI2BRFHbmiP7/UFqvsjxTirWoM1HfeaJrmVSZ9a1EADKkZgdPcAuISPMpoUiHlac9J4dYt81MC5BBIrbJGMg==", "dev": true, "requires": { "array.prototype.flat": "^1.2.1", "cheerio": "^1.0.0-rc.2", "function.prototype.name": "^1.1.0", "has": "^1.0.3", + "html-element-map": "^1.0.0", "is-boolean-object": "^1.0.0", "is-callable": "^1.1.4", "is-number-object": "^1.0.3", + "is-regex": "^1.0.4", "is-string": "^1.0.4", "is-subset": "^0.1.1", "lodash.escape": "^4.0.1", @@ -7422,76 +7378,104 @@ "raf": "^3.4.0", "rst-selector-parser": "^2.2.3", "string.prototype.trim": "^1.1.2" - }, - "dependencies": { - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - } } }, "enzyme-adapter-react-16": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.6.0.tgz", - "integrity": "sha512-ay9eGFpChyUDnjTFMMJHzrb681LF3hPWJLEA7RoLFG9jSWAdAm2V50pGmFV9dYGJgh5HfdiqM+MNvle41Yf/PA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.10.0.tgz", + "integrity": "sha512-0QqwEZcBv1xEEla+a3H7FMci+y4ybLia9cZzsdIrId7qcig4MK0kqqf6iiCILH1lsKS6c6AVqL3wGPhCevv5aQ==", "dev": true, "requires": { - "enzyme-adapter-utils": "^1.8.0", - "function.prototype.name": "^1.1.0", + "enzyme-adapter-utils": "^1.10.0", "object.assign": "^4.1.0", - "object.values": "^1.0.4", + "object.values": "^1.1.0", "prop-types": "^15.6.2", - "react-is": "^16.5.2", + "react-is": "^16.7.0", "react-test-renderer": "^16.0.0-0" }, "dependencies": { + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "object.values": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", + "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, "prop-types": { - "version": "15.6.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", - "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", "dev": true, "requires": { - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" } }, "react-is": { - "version": "16.6.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.6.0.tgz", - "integrity": "sha512-q8U7k0Fi7oxF1HvQgyBjPwDXeMplEsArnKt2iYhuIF86+GBbgLHdAmokL3XUFjTd7Q363OSNG55FOGUdONVn1g==", + "version": "16.8.3", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.3.tgz", + "integrity": "sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA==", "dev": true } } }, "enzyme-adapter-utils": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.8.1.tgz", - "integrity": "sha512-s3QB3xQAowaDS2sHhmEqrT13GJC4+n5bG015ZkLv60n9k5vhxxHTQRIneZmQ4hmdCZEBrvUJ89PG6fRI5OEeuQ==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.10.0.tgz", + "integrity": "sha512-VnIXJDYVTzKGbdW+lgK8MQmYHJquTQZiGzu/AseCZ7eHtOMAj4Rtvk8ZRopodkfPves0EXaHkXBDkVhPa3t0jA==", "dev": true, "requires": { "function.prototype.name": "^1.1.0", "object.assign": "^4.1.0", - "prop-types": "^15.6.2" + "object.fromentries": "^2.0.0", + "prop-types": "^15.6.2", + "semver": "^5.6.0" }, "dependencies": { "prop-types": { - "version": "15.6.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", - "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", "dev": true, "requires": { - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" } + }, + "react-is": { + "version": "16.8.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.2.tgz", + "integrity": "sha512-D+NxhSR2HUCjYky1q1DwpNUD44cDpUXzSmmFyC3ug1bClcU/iDNy0YNn1iwme28fn+NFhpA13IndOd42CrFb+Q==", + "dev": true + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true } } }, "enzyme-to-json": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/enzyme-to-json/-/enzyme-to-json-3.3.4.tgz", - "integrity": "sha1-Z8YEDpMRgvGDQYry659DIyWKp38=", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/enzyme-to-json/-/enzyme-to-json-3.3.5.tgz", + "integrity": "sha512-DmH1wJ68HyPqKSYXdQqB33ZotwfUhwQZW3IGXaNXgR69Iodaoj8TF/D9RjLdz4pEhGq2Tx2zwNUIjBuqoZeTgA==", "dev": true, "requires": { "lodash": "^4.17.4" @@ -7758,67 +7742,66 @@ "dev": true }, "eslint-plugin-jsx-a11y": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.0.2.tgz", - "integrity": "sha1-ZZJ3p1iwNsMFp+ShMFfDAc075z8=", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.1.tgz", + "integrity": "sha512-cjN2ObWrRz0TTw7vEcGQrx+YltMvZoOEx4hWU8eEERDnBIU00OTq7Vr+jA7DFKxiwLNv4tTh5Pq2GUNEa8b6+w==", "dev": true, "requires": { - "aria-query": "^0.7.0", + "aria-query": "^3.0.0", "array-includes": "^3.0.3", - "ast-types-flow": "0.0.7", - "axobject-query": "^0.1.0", - "damerau-levenshtein": "^1.0.0", - "emoji-regex": "^6.1.0", - "jsx-ast-utils": "^1.4.0" - }, - "dependencies": { - "aria-query": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-0.7.1.tgz", - "integrity": "sha1-Jsu1r/ZBRLCoJb4YRuCxbPoAsR4=", - "dev": true, - "requires": { - "ast-types-flow": "0.0.7", - "commander": "^2.11.0" - } - }, - "axobject-query": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-0.1.0.tgz", - "integrity": "sha1-YvWdvFnJ+SQnWco0mWDnov48NsA=", - "dev": true, - "requires": { - "ast-types-flow": "0.0.7" - } - }, - "jsx-ast-utils": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz", - "integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=", - "dev": true - } + "ast-types-flow": "^0.0.7", + "axobject-query": "^2.0.2", + "damerau-levenshtein": "^1.0.4", + "emoji-regex": "^7.0.2", + "has": "^1.0.3", + "jsx-ast-utils": "^2.0.1" } }, "eslint-plugin-react": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz", - "integrity": "sha512-KC7Snr4YsWZD5flu6A5c0AcIZidzW3Exbqp7OT67OaD2AppJtlBr/GuPrW/vaQM/yfZotEvKAdrxrO+v8vwYJA==", + "version": "7.12.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.12.4.tgz", + "integrity": "sha512-1puHJkXJY+oS1t467MjbqjvX53uQ05HXwjqDgdbGBqf5j9eeydI54G3KwiJmWciQ0HTBacIKw2jgwSBSH3yfgQ==", "dev": true, "requires": { - "doctrine": "^2.0.2", - "has": "^1.0.1", + "array-includes": "^3.0.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", "jsx-ast-utils": "^2.0.1", - "prop-types": "^15.6.0" + "object.fromentries": "^2.0.0", + "prop-types": "^15.6.2", + "resolve": "^1.9.0" }, "dependencies": { + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, "prop-types": { - "version": "15.6.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", - "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", "dev": true, "requires": { - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "react-is": { + "version": "16.8.3", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.3.tgz", + "integrity": "sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA==", + "dev": true + }, + "resolve": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" } } } @@ -7897,32 +7880,6 @@ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", "dev": true }, - "event-stream": { - "version": "3.3.4", - "resolved": "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", - "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", - "dev": true, - "requires": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" - }, - "dependencies": { - "split": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", - "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", - "dev": true, - "requires": { - "through": "2" - } - } - } - }, "events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", @@ -8021,185 +7978,44 @@ } } }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "expect": { + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-24.1.0.tgz", + "integrity": "sha512-lVcAPhaYkQcIyMS+F8RVwzbm1jro20IG8OkvxQ6f1JfqhVZyyudCwYogQ7wnktlf14iF3ii7ArIUO/mqvrW9Gw==", "dev": true, "requires": { - "fill-range": "^2.1.0" + "ansi-styles": "^3.2.0", + "jest-get-type": "^24.0.0", + "jest-matcher-utils": "^24.0.0", + "jest-message-util": "^24.0.0", + "jest-regex-util": "^24.0.0" }, "dependencies": { - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "jest-message-util": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.0.0.tgz", + "integrity": "sha512-J9ROJIwz/IeC+eV1XSwnRK4oAwPuhmxEyYx1+K5UI+pIYwFZDSrfZaiWTdq0d2xYFw4Xiu+0KQWsdsQpgJMf3Q==", "dev": true, "requires": { - "isarray": "1.0.0" + "@babel/code-frame": "^7.0.0", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "expect": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-23.6.0.tgz", - "integrity": "sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "jest-diff": "^23.6.0", - "jest-get-type": "^22.1.0", - "jest-matcher-utils": "^23.6.0", - "jest-message-util": "^23.4.0", - "jest-regex-util": "^23.3.0" - }, - "dependencies": { - "arr-diff": { + "slash": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "jest-matcher-utils": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz", - "integrity": "sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "jest-get-type": "^22.1.0", - "pretty-format": "^23.6.0" - } - }, - "jest-message-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz", - "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0-beta.35", - "chalk": "^2.0.1", - "micromatch": "^2.3.11", - "slash": "^1.0.0", - "stack-utils": "^1.0.1" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "pretty-format": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz", - "integrity": "sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0", - "ansi-styles": "^3.2.0" - } } } }, "expect-puppeteer": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/expect-puppeteer/-/expect-puppeteer-3.5.1.tgz", - "integrity": "sha512-SB5JeJCXWSRcUK39fBJlCA6qnVt3BG1/M9vYZ+XYq8gY9jab9Jm4BztsrAwDTWca1L+O/7dRYrG2BPziRtjh+Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/expect-puppeteer/-/expect-puppeteer-4.0.0.tgz", + "integrity": "sha512-K7D6WRUWR0CtQLqf9ZMBQNkpbhQzxWkKEt9/PnVl+aWMF0xcdV7JW9AClxNprzXkrUq/ILws3H2u6dWcEEjRSQ==", "dev": true }, "express": { @@ -8406,6 +8222,11 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", "dev": true }, + "fast-average-color": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/fast-average-color/-/fast-average-color-4.3.0.tgz", + "integrity": "sha512-k8FXd6+JeXoItmdNqB3hMwFgArryjdYBLuzEM8fRY/oztd/051yhSHU6GUrMOfIQU9dDHyFDcIAkGrQKlYtpDA==" + }, "fast-deep-equal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", @@ -8549,12 +8370,6 @@ "object-assign": "^4.0.1" } }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, "fileset": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", @@ -8858,12 +8673,6 @@ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", "dev": true }, - "from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", - "dev": true - }, "from2": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", @@ -9949,25 +9758,6 @@ "path-is-absolute": "^1.0.0" } }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, "glob-to-regexp": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", @@ -10237,16 +10027,6 @@ "minimalistic-crypto-utils": "^1.0.1" } }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - } - }, "homedir-polyfill": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", @@ -10291,6 +10071,15 @@ "integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=", "dev": true }, + "html-element-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.0.0.tgz", + "integrity": "sha512-/SP6aOiM5Ai9zALvCxDubIeez0LvG3qP7R9GcRDnJEP/HBmv0A8A9K0o8+HFudcFt46+i921ANjzKsjPjb7Enw==", + "dev": true, + "requires": { + "array-filter": "^1.0.0" + } + }, "html-encoding-sniffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", @@ -10789,12 +10578,6 @@ "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", "dev": true }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, "is-equal-shallow": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", @@ -10810,12 +10593,6 @@ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", "dev": true }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, "is-finite": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", @@ -10831,20 +10608,11 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "is-generator-fn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz", - "integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.0.0.tgz", + "integrity": "sha512-elzyIdM7iKoFHzcrndIqjYomImhxrFRnGP3galODoII4TB9gI7mZ+FnlLQmmjf27SxHS2gKEeyhX5/+YRS6H9g==", "dev": true }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, "is-hexadecimal": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.2.tgz", @@ -10907,12 +10675,6 @@ "isobject": "^3.0.1" } }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, "is-primitive": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", @@ -11067,815 +10829,1119 @@ "dev": true }, "istanbul-api": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.7.tgz", - "integrity": "sha512-4/ApBnMVeEPG3EkSzcw25wDe4N66wxwn+KKn6b47vyek8Xb3NBAcg4xfuQbS7BqcZuTX4wxfD5lVagdggR3gyA==", - "dev": true, - "requires": { - "async": "^2.1.4", - "fileset": "^2.0.2", - "istanbul-lib-coverage": "^1.2.1", - "istanbul-lib-hook": "^1.2.2", - "istanbul-lib-instrument": "^1.10.2", - "istanbul-lib-report": "^1.1.5", - "istanbul-lib-source-maps": "^1.2.6", - "istanbul-reports": "^1.5.1", - "js-yaml": "^3.7.0", - "mkdirp": "^0.5.1", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.1.tgz", + "integrity": "sha512-kVmYrehiwyeBAk/wE71tW6emzLiHGjYIiDrc8sfyty4F8M02/lrgXSm+R1kXysmF20zArvmZXjlE/mg24TVPJw==", + "dev": true, + "requires": { + "async": "^2.6.1", + "compare-versions": "^3.2.1", + "fileset": "^2.0.3", + "istanbul-lib-coverage": "^2.0.3", + "istanbul-lib-hook": "^2.0.3", + "istanbul-lib-instrument": "^3.1.0", + "istanbul-lib-report": "^2.0.4", + "istanbul-lib-source-maps": "^3.0.2", + "istanbul-reports": "^2.1.1", + "js-yaml": "^3.12.0", + "make-dir": "^1.3.0", + "minimatch": "^3.0.4", "once": "^1.4.0" }, "dependencies": { - "istanbul-lib-coverage": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", - "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", - "dev": true - }, "istanbul-lib-instrument": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", - "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz", + "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==", "dev": true, "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.1", - "semver": "^5.3.0" + "@babel/generator": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/template": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "istanbul-lib-coverage": "^2.0.3", + "semver": "^5.5.0" } } } }, "istanbul-lib-coverage": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", - "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==", "dev": true }, "istanbul-lib-hook": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz", - "integrity": "sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw==", - "dev": true, - "requires": { - "append-transform": "^0.4.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", - "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.3.tgz", + "integrity": "sha512-CLmEqwEhuCYtGcpNVJjLV1DQyVnIqavMLFHV/DP+np/g3qvdxu3gsPqYoJMXm15sN84xOlckFB3VNvRbf5yEgA==", "dev": true, "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.1", - "semver": "^5.3.0" - }, - "dependencies": { - "istanbul-lib-coverage": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", - "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", - "dev": true - } + "append-transform": "^1.0.0" } }, "istanbul-lib-report": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz", - "integrity": "sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.4.tgz", + "integrity": "sha512-sOiLZLAWpA0+3b5w5/dq0cjm2rrNdAfHWaGhmn7XEFW6X++IV9Ohn+pnELAl9K3rfpaeBfbmH9JU5sejacdLeA==", "dev": true, "requires": { - "istanbul-lib-coverage": "^1.2.1", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" + "istanbul-lib-coverage": "^2.0.3", + "make-dir": "^1.3.0", + "supports-color": "^6.0.0" }, "dependencies": { - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", - "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", - "dev": true - }, "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", "dev": true, "requires": { - "has-flag": "^1.0.0" + "has-flag": "^3.0.0" } } } }, "istanbul-lib-source-maps": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz", - "integrity": "sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.2.tgz", + "integrity": "sha512-JX4v0CiKTGp9fZPmoxpu9YEkPbEqCqBbO3403VabKjH+NRXo72HafD5UgnjTEqHL2SAjaZK1XDuDOkn6I5QVfQ==", "dev": true, "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.1", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.3", + "make-dir": "^1.3.0", + "rimraf": "^2.6.2", + "source-map": "^0.6.1" }, "dependencies": { - "istanbul-lib-coverage": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", - "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, "istanbul-reports": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.5.1.tgz", - "integrity": "sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.1.tgz", + "integrity": "sha512-FzNahnidyEPBCI0HcufJoSEoKykesRlFcSzQqjH9x0+LC8tnnE/p/90PBLu8iZTxr8yYZNyTtiAujUqyN+CIxw==", "dev": true, "requires": { - "handlebars": "^4.0.3" + "handlebars": "^4.1.0" } }, "jest": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-23.6.0.tgz", - "integrity": "sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-24.1.0.tgz", + "integrity": "sha512-+q91L65kypqklvlRFfXfdzUKyngQLOcwGhXQaLmVHv+d09LkNXuBuGxlofTFW42XMzu3giIcChchTsCNUjQ78A==", "dev": true, "requires": { - "import-local": "^1.0.0", - "jest-cli": "^23.6.0" + "import-local": "^2.0.0", + "jest-cli": "^24.1.0" }, "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "callsites": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", + "dev": true + }, + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", + "dev": true + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "locate-path": "^3.0.0" } }, - "jest-cli": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-23.6.0.tgz", - "integrity": "sha512-hgeD1zRUp1E1zsiyOXjEn4LzRLWdJBV//ukAHGlx6s5mfCNJTbhbHjgxnDUXA8fsKWN/HqFFF6X5XcCwC/IvYQ==", + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "import-local": "^1.0.0", - "is-ci": "^1.0.10", - "istanbul-api": "^1.3.1", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-instrument": "^1.10.1", - "istanbul-lib-source-maps": "^1.2.4", - "jest-changed-files": "^23.4.2", - "jest-config": "^23.6.0", - "jest-environment-jsdom": "^23.4.0", - "jest-get-type": "^22.1.0", - "jest-haste-map": "^23.6.0", - "jest-message-util": "^23.4.0", - "jest-regex-util": "^23.3.0", - "jest-resolve-dependencies": "^23.6.0", - "jest-runner": "^23.6.0", - "jest-runtime": "^23.6.0", - "jest-snapshot": "^23.6.0", - "jest-util": "^23.4.0", - "jest-validate": "^23.6.0", - "jest-watcher": "^23.4.0", - "jest-worker": "^23.2.0", - "micromatch": "^2.3.11", - "node-notifier": "^5.2.1", - "prompts": "^0.1.9", - "realpath-native": "^1.0.0", - "rimraf": "^2.5.4", - "slash": "^1.0.0", - "string-length": "^2.0.0", - "strip-ansi": "^4.0.0", + "pump": "^3.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz", + "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==", + "dev": true, + "requires": { + "@babel/generator": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/template": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "istanbul-lib-coverage": "^2.0.3", + "semver": "^5.5.0" + } + }, + "jest-cli": { + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.1.0.tgz", + "integrity": "sha512-U/iyWPwOI0T1CIxVLtk/2uviOTJ/OiSWJSe8qt6X1VkbbgP+nrtLJlmT9lPBe4lK78VNFJtrJ7pttcNv/s7yCw==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.1", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.1.15", + "import-local": "^2.0.0", + "is-ci": "^2.0.0", + "istanbul-api": "^2.0.8", + "istanbul-lib-coverage": "^2.0.2", + "istanbul-lib-instrument": "^3.0.1", + "istanbul-lib-source-maps": "^3.0.1", + "jest-changed-files": "^24.0.0", + "jest-config": "^24.1.0", + "jest-environment-jsdom": "^24.0.0", + "jest-get-type": "^24.0.0", + "jest-haste-map": "^24.0.0", + "jest-message-util": "^24.0.0", + "jest-regex-util": "^24.0.0", + "jest-resolve-dependencies": "^24.1.0", + "jest-runner": "^24.1.0", + "jest-runtime": "^24.1.0", + "jest-snapshot": "^24.1.0", + "jest-util": "^24.0.0", + "jest-validate": "^24.0.0", + "jest-watcher": "^24.0.0", + "jest-worker": "^24.0.0", + "micromatch": "^3.1.10", + "node-notifier": "^5.2.1", + "p-each-series": "^1.0.0", + "pirates": "^4.0.0", + "prompts": "^2.0.1", + "realpath-native": "^1.0.0", + "rimraf": "^2.5.4", + "slash": "^2.0.0", + "string-length": "^2.0.0", + "strip-ansi": "^5.0.0", "which": "^1.2.12", - "yargs": "^11.0.0" + "yargs": "^12.0.2" } }, - "jest-environment-jsdom": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz", - "integrity": "sha1-BWp5UrP+pROsYqFAosNox52eYCM=", + "jest-environment-jsdom": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.0.0.tgz", + "integrity": "sha512-1YNp7xtxajTRaxbylDc2pWvFnfDTH5BJJGyVzyGAKNt/lEULohwEV9zFqTgG4bXRcq7xzdd+sGFws+LxThXXOw==", + "dev": true, + "requires": { + "jest-mock": "^24.0.0", + "jest-util": "^24.0.0", + "jsdom": "^11.5.1" + } + }, + "jest-message-util": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.0.0.tgz", + "integrity": "sha512-J9ROJIwz/IeC+eV1XSwnRK4oAwPuhmxEyYx1+K5UI+pIYwFZDSrfZaiWTdq0d2xYFw4Xiu+0KQWsdsQpgJMf3Q==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" + } + }, + "jest-mock": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.0.0.tgz", + "integrity": "sha512-sQp0Hu5fcf5NZEh1U9eIW2qD0BwJZjb63Yqd98PQJFvf/zzUTBoUAwv/Dc/HFeNHIw1f3hl/48vNn+j3STaI7A==", + "dev": true + }, + "jest-util": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.0.0.tgz", + "integrity": "sha512-QxsALc4wguYS7cfjdQSOr5HTkmjzkHgmZvIDkcmPfl1ib8PNV8QUWLwbKefCudWS0PRKioV+VbQ0oCUPC691fQ==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "chalk": "^2.0.1", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", + "jest-message-util": "^24.0.0", + "mkdirp": "^0.5.1", + "slash": "^2.0.0", + "source-map": "^0.6.0" + } + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "mem": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.1.0.tgz", + "integrity": "sha512-I5u6Q1x7wxO0kdOpYBB28xueHADYps5uty/zg936CiG8NTe5sJL8EjrCuLneuDW3PlMdZBGDIn8BirEVdovZvg==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "p-is-promise": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", + "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", + "dev": true + }, + "p-limit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "strip-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", + "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", + "dev": true, + "requires": { + "ansi-regex": "^4.0.0" + } + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "jest-changed-files": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.0.0.tgz", + "integrity": "sha512-nnuU510R9U+UX0WNb5XFEcsrMqriSiRLeO9KWDFgPrpToaQm60prfQYpxsXigdClpvNot5bekDY440x9dNGnsQ==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "throat": "^4.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "jest-config": { + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.1.0.tgz", + "integrity": "sha512-FbbRzRqtFC6eGjG5VwsbW4E5dW3zqJKLWYiZWhB0/4E5fgsMw8GODLbGSrY5t17kKOtCWb/Z7nsIThRoDpuVyg==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "babel-jest": "^24.1.0", + "chalk": "^2.0.1", + "glob": "^7.1.1", + "jest-environment-jsdom": "^24.0.0", + "jest-environment-node": "^24.0.0", + "jest-get-type": "^24.0.0", + "jest-jasmine2": "^24.1.0", + "jest-regex-util": "^24.0.0", + "jest-resolve": "^24.1.0", + "jest-util": "^24.0.0", + "jest-validate": "^24.0.0", + "micromatch": "^3.1.10", + "pretty-format": "^24.0.0", + "realpath-native": "^1.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true + }, + "pretty-format": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.0.0.tgz", + "integrity": "sha512-LszZaKG665djUcqg5ZQq+XzezHLKrxsA86ZABTozp+oNhkdqa+tG2dX4qa6ERl5c/sRDrAa3lHmwnvKoP+OG/g==", + "dev": true, + "requires": { + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0" + } + } + } + }, + "jest-dev-server": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jest-dev-server/-/jest-dev-server-4.0.0.tgz", + "integrity": "sha512-tq3fHPM8BDbu/71yIxgGgZW62s1Em6rLNDce0/ff/4No093OyjUEPM8yIUaoBt4pxwwRGkaS1EZB5PzCmRLGkg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "cwd": "^0.10.0", + "find-process": "^1.2.1", + "inquirer": "^6.2.2", + "spawnd": "^4.0.0", + "tree-kill": "^1.2.1", + "wait-port": "^0.2.2" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "inquirer": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.2.tgz", + "integrity": "sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.11", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.0.0", + "through": "^2.3.6" + } + }, + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "strip-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", + "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", + "dev": true, + "requires": { + "ansi-regex": "^4.0.0" + } + }, + "tree-kill": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.1.tgz", + "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", + "dev": true + } + } + }, + "jest-diff": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.0.0.tgz", + "integrity": "sha512-XY5wMpRaTsuMoU+1/B2zQSKQ9RdE9gsLkGydx3nvApeyPijLA8GtEvIcPwISRCer+VDf9W1mStTYYq6fPt8ryA==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "diff-sequences": "^24.0.0", + "jest-get-type": "^24.0.0", + "pretty-format": "^24.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true + }, + "pretty-format": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.0.0.tgz", + "integrity": "sha512-LszZaKG665djUcqg5ZQq+XzezHLKrxsA86ZABTozp+oNhkdqa+tG2dX4qa6ERl5c/sRDrAa3lHmwnvKoP+OG/g==", + "dev": true, + "requires": { + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0" + } + } + } + }, + "jest-docblock": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.0.0.tgz", + "integrity": "sha512-KfAKZ4SN7CFOZpWg4i7g7MSlY0M+mq7K0aMqENaG2vHuhC9fc3vkpU/iNN9sOus7v3h3Y48uEjqz3+Gdn2iptA==", + "dev": true, + "requires": { + "detect-newline": "^2.1.0" + } + }, + "jest-each": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.0.0.tgz", + "integrity": "sha512-gFcbY4Cu55yxExXMkjrnLXov3bWO3dbPAW7HXb31h/DNWdNc/6X8MtxGff8nh3/MjkF9DpVqnj0KsPKuPK0cpA==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^24.0.0", + "jest-util": "^24.0.0", + "pretty-format": "^24.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true + }, + "callsites": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", + "dev": true + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "requires": { - "jest-mock": "^23.2.0", - "jest-util": "^23.4.0", - "jsdom": "^11.5.1" + "ci-info": "^2.0.0" } }, "jest-message-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz", - "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.0.0.tgz", + "integrity": "sha512-J9ROJIwz/IeC+eV1XSwnRK4oAwPuhmxEyYx1+K5UI+pIYwFZDSrfZaiWTdq0d2xYFw4Xiu+0KQWsdsQpgJMf3Q==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0-beta.35", + "@babel/code-frame": "^7.0.0", "chalk": "^2.0.1", - "micromatch": "^2.3.11", - "slash": "^1.0.0", + "micromatch": "^3.1.10", + "slash": "^2.0.0", "stack-utils": "^1.0.1" } }, - "jest-mock": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-23.2.0.tgz", - "integrity": "sha1-rRxg8p6HGdR8JuETgJi20YsmETQ=", - "dev": true - }, "jest-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-23.4.0.tgz", - "integrity": "sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.0.0.tgz", + "integrity": "sha512-QxsALc4wguYS7cfjdQSOr5HTkmjzkHgmZvIDkcmPfl1ib8PNV8QUWLwbKefCudWS0PRKioV+VbQ0oCUPC691fQ==", "dev": true, "requires": { - "callsites": "^2.0.0", + "callsites": "^3.0.0", "chalk": "^2.0.1", - "graceful-fs": "^4.1.11", - "is-ci": "^1.0.10", - "jest-message-util": "^23.4.0", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", + "jest-message-util": "^24.0.0", "mkdirp": "^0.5.1", - "slash": "^1.0.0", + "slash": "^2.0.0", "source-map": "^0.6.0" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "pretty-format": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.0.0.tgz", + "integrity": "sha512-LszZaKG665djUcqg5ZQq+XzezHLKrxsA86ZABTozp+oNhkdqa+tG2dX4qa6ERl5c/sRDrAa3lHmwnvKoP+OG/g==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0" } }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true - }, - "yargs": { - "version": "11.1.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", - "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - } - }, - "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } } } }, - "jest-changed-files": { - "version": "23.4.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-23.4.2.tgz", - "integrity": "sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA==", + "jest-environment-jsdom": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.0.0.tgz", + "integrity": "sha512-1YNp7xtxajTRaxbylDc2pWvFnfDTH5BJJGyVzyGAKNt/lEULohwEV9zFqTgG4bXRcq7xzdd+sGFws+LxThXXOw==", "dev": true, "requires": { - "throat": "^4.0.0" + "jest-mock": "^24.0.0", + "jest-util": "^24.0.0", + "jsdom": "^11.5.1" } }, - "jest-config": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-23.6.0.tgz", - "integrity": "sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ==", + "jest-environment-node": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.0.0.tgz", + "integrity": "sha512-62fOFcaEdU0VLaq8JL90TqwI7hLn0cOKOl8vY2n477vRkCJRojiRRtJVRzzCcgFvs6gqU97DNqX5R0BrBP6Rxg==", "dev": true, "requires": { - "babel-core": "^6.0.0", - "babel-jest": "^23.6.0", - "chalk": "^2.0.1", - "glob": "^7.1.1", - "jest-environment-jsdom": "^23.4.0", - "jest-environment-node": "^23.4.0", - "jest-get-type": "^22.1.0", - "jest-jasmine2": "^23.6.0", - "jest-regex-util": "^23.3.0", - "jest-resolve": "^23.6.0", - "jest-util": "^23.4.0", - "jest-validate": "^23.6.0", - "micromatch": "^2.3.11", - "pretty-format": "^23.6.0" + "jest-mock": "^24.0.0", + "jest-util": "^24.0.0" }, "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - } - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } + "callsites": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", + "dev": true }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true }, - "jest-environment-jsdom": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz", - "integrity": "sha1-BWp5UrP+pROsYqFAosNox52eYCM=", + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "requires": { - "jest-mock": "^23.2.0", - "jest-util": "^23.4.0", - "jsdom": "^11.5.1" + "ci-info": "^2.0.0" } }, "jest-message-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz", - "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.0.0.tgz", + "integrity": "sha512-J9ROJIwz/IeC+eV1XSwnRK4oAwPuhmxEyYx1+K5UI+pIYwFZDSrfZaiWTdq0d2xYFw4Xiu+0KQWsdsQpgJMf3Q==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0-beta.35", + "@babel/code-frame": "^7.0.0", "chalk": "^2.0.1", - "micromatch": "^2.3.11", - "slash": "^1.0.0", + "micromatch": "^3.1.10", + "slash": "^2.0.0", "stack-utils": "^1.0.1" } }, "jest-mock": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-23.2.0.tgz", - "integrity": "sha1-rRxg8p6HGdR8JuETgJi20YsmETQ=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.0.0.tgz", + "integrity": "sha512-sQp0Hu5fcf5NZEh1U9eIW2qD0BwJZjb63Yqd98PQJFvf/zzUTBoUAwv/Dc/HFeNHIw1f3hl/48vNn+j3STaI7A==", "dev": true }, "jest-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-23.4.0.tgz", - "integrity": "sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.0.0.tgz", + "integrity": "sha512-QxsALc4wguYS7cfjdQSOr5HTkmjzkHgmZvIDkcmPfl1ib8PNV8QUWLwbKefCudWS0PRKioV+VbQ0oCUPC691fQ==", "dev": true, "requires": { - "callsites": "^2.0.0", + "callsites": "^3.0.0", "chalk": "^2.0.1", - "graceful-fs": "^4.1.11", - "is-ci": "^1.0.10", - "jest-message-util": "^23.4.0", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", + "jest-message-util": "^24.0.0", "mkdirp": "^0.5.1", - "slash": "^1.0.0", + "slash": "^2.0.0", "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "jest-environment-puppeteer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jest-environment-puppeteer/-/jest-environment-puppeteer-4.0.0.tgz", + "integrity": "sha512-IdbfZW1TjT1lmdPlvlHi4S+CAHuGk63fzGUpQAUeadm77saSJISDMuYS5b7kZ6lXZtc4myu53TkMWDYhh60XOA==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "cwd": "^0.10.0", + "jest-dev-server": "^4.0.0", + "merge-deep": "^3.0.2" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } } } }, - "jest-dev-server": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/jest-dev-server/-/jest-dev-server-3.6.0.tgz", - "integrity": "sha512-UbDPDBjpD3t9hjZ6z4j1NW8+jYE1rP5jJ6qVLbWsnpPgfJDBziOhhUSspSvyCG3DW+txK8/Xtw1lwwiEponWpg==", + "jest-get-type": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.0.0.tgz", + "integrity": "sha512-z6/Eyf6s9ZDGz7eOvl+fzpuJmN9i0KyTt1no37/dHu8galssxz5ZEgnc1KaV8R31q1khxyhB4ui/X5ZjjPk77w==", + "dev": true + }, + "jest-haste-map": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.0.0.tgz", + "integrity": "sha512-CcViJyUo41IQqttLxXVdI41YErkzBKbE6cS6dRAploCeutePYfUimWd3C9rQEWhX0YBOQzvNsC0O9nYxK2nnxQ==", "dev": true, "requires": { - "chalk": "^2.4.1", - "cwd": "^0.10.0", - "find-process": "^1.2.1", - "inquirer": "^6.2.0", - "spawnd": "^3.5.2", - "terminate": "^2.1.2", - "wait-port": "^0.2.2" + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.1.15", + "invariant": "^2.2.4", + "jest-serializer": "^24.0.0", + "jest-util": "^24.0.0", + "jest-worker": "^24.0.0", + "micromatch": "^3.1.10", + "sane": "^3.0.0" }, "dependencies": { - "ansi-regex": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", - "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "callsites": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", "dev": true }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, - "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "ci-info": "^2.0.0" } }, - "inquirer": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.1.tgz", - "integrity": "sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==", + "jest-message-util": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.0.0.tgz", + "integrity": "sha512-J9ROJIwz/IeC+eV1XSwnRK4oAwPuhmxEyYx1+K5UI+pIYwFZDSrfZaiWTdq0d2xYFw4Xiu+0KQWsdsQpgJMf3Q==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.0", - "figures": "^2.0.0", - "lodash": "^4.17.10", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.1.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.0.0", - "through": "^2.3.6" + "@babel/code-frame": "^7.0.0", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" } }, - "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "jest-util": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.0.0.tgz", + "integrity": "sha512-QxsALc4wguYS7cfjdQSOr5HTkmjzkHgmZvIDkcmPfl1ib8PNV8QUWLwbKefCudWS0PRKioV+VbQ0oCUPC691fQ==", "dev": true, "requires": { - "tslib": "^1.9.0" + "callsites": "^3.0.0", + "chalk": "^2.0.1", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", + "jest-message-util": "^24.0.0", + "mkdirp": "^0.5.1", + "slash": "^2.0.0", + "source-map": "^0.6.0" } }, - "strip-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", - "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", - "dev": true, - "requires": { - "ansi-regex": "^4.0.0" - } - } - } - }, - "jest-diff": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-23.6.0.tgz", - "integrity": "sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "diff": "^3.2.0", - "jest-get-type": "^22.1.0", - "pretty-format": "^23.6.0" - } - }, - "jest-docblock": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-23.2.0.tgz", - "integrity": "sha1-8IXh8YVI2Z/dabICB+b9VdkTg6c=", - "dev": true, - "requires": { - "detect-newline": "^2.1.0" + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, - "jest-each": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-23.6.0.tgz", - "integrity": "sha512-x7V6M/WGJo6/kLoissORuvLIeAoyo2YqLOoCDkohgJ4XOXSqOtyvr8FbInlAWS77ojBsZrafbozWoKVRdtxFCg==", + "jest-jasmine2": { + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.1.0.tgz", + "integrity": "sha512-H+o76SdSNyCh9fM5K8upK45YTo/DiFx5w2YAzblQebSQmukDcoVBVeXynyr7DDnxh+0NTHYRCLwJVf3tC518wg==", "dev": true, "requires": { + "@babel/traverse": "^7.1.0", "chalk": "^2.0.1", - "pretty-format": "^23.6.0" - } - }, - "jest-environment-enzyme": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/jest-environment-enzyme/-/jest-environment-enzyme-6.1.2.tgz", - "integrity": "sha512-WHeBKgBYOdryuOTEoK55lJwjg7Raery1OgXHLwukI3mSYgOkm2UrCDDT+vneqVgy7F8KuRHyStfD+TC/m2b7Kg==", - "dev": true, - "requires": { - "jest-environment-jsdom": "^22.4.1" - } - }, - "jest-environment-jsdom": { - "version": "22.4.3", - "resolved": "http://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-22.4.3.tgz", - "integrity": "sha512-FviwfR+VyT3Datf13+ULjIMO5CSeajlayhhYQwpzgunswoaLIPutdbrnfUHEMyJCwvqQFaVtTmn9+Y8WCt6n1w==", - "dev": true, - "requires": { - "jest-mock": "^22.4.3", - "jest-util": "^22.4.3", - "jsdom": "^11.5.1" - } - }, - "jest-environment-node": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-23.4.0.tgz", - "integrity": "sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA=", - "dev": true, - "requires": { - "jest-mock": "^23.2.0", - "jest-util": "^23.4.0" + "co": "^4.6.0", + "expect": "^24.1.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^24.0.0", + "jest-matcher-utils": "^24.0.0", + "jest-message-util": "^24.0.0", + "jest-snapshot": "^24.1.0", + "jest-util": "^24.0.0", + "pretty-format": "^24.0.0", + "throat": "^4.0.0" }, "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "callsites": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", "dev": true }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "ci-info": "^2.0.0" } }, "jest-message-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz", - "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.0.0.tgz", + "integrity": "sha512-J9ROJIwz/IeC+eV1XSwnRK4oAwPuhmxEyYx1+K5UI+pIYwFZDSrfZaiWTdq0d2xYFw4Xiu+0KQWsdsQpgJMf3Q==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0-beta.35", + "@babel/code-frame": "^7.0.0", "chalk": "^2.0.1", - "micromatch": "^2.3.11", - "slash": "^1.0.0", + "micromatch": "^3.1.10", + "slash": "^2.0.0", "stack-utils": "^1.0.1" } }, - "jest-mock": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-23.2.0.tgz", - "integrity": "sha1-rRxg8p6HGdR8JuETgJi20YsmETQ=", - "dev": true - }, "jest-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-23.4.0.tgz", - "integrity": "sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.0.0.tgz", + "integrity": "sha512-QxsALc4wguYS7cfjdQSOr5HTkmjzkHgmZvIDkcmPfl1ib8PNV8QUWLwbKefCudWS0PRKioV+VbQ0oCUPC691fQ==", "dev": true, "requires": { - "callsites": "^2.0.0", + "callsites": "^3.0.0", "chalk": "^2.0.1", - "graceful-fs": "^4.1.11", - "is-ci": "^1.0.10", - "jest-message-util": "^23.4.0", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", + "jest-message-util": "^24.0.0", "mkdirp": "^0.5.1", - "slash": "^1.0.0", + "slash": "^2.0.0", "source-map": "^0.6.0" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "pretty-format": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.0.0.tgz", + "integrity": "sha512-LszZaKG665djUcqg5ZQq+XzezHLKrxsA86ZABTozp+oNhkdqa+tG2dX4qa6ERl5c/sRDrAa3lHmwnvKoP+OG/g==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0" } }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true }, "source-map": { "version": "0.6.1", @@ -11885,739 +11951,555 @@ } } }, - "jest-environment-puppeteer": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/jest-environment-puppeteer/-/jest-environment-puppeteer-3.6.0.tgz", - "integrity": "sha512-3ULqgH6f+HRu53wxP0NDFb8uZFxn2+97tK4eZicktgst/zWpSJucEpbsVVNWk4cIHrPo79rYoUfomxnui/ndAg==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "cwd": "^0.10.0", - "jest-dev-server": "^3.6.0", - "merge-deep": "^3.0.2" - } - }, - "jest-enzyme": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/jest-enzyme/-/jest-enzyme-6.1.2.tgz", - "integrity": "sha512-+ds7r2ru3QkNJxelQ2tnC6d33pjUSsZHPD3v4TlnHlNMuGX3UKdxm5C46yZBvJICYBvIF+RFKBhLMM4evNM95Q==", + "jest-leak-detector": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.0.0.tgz", + "integrity": "sha512-ZYHJYFeibxfsDSKowjDP332pStuiFT2xfc5R67Rjm/l+HFJWJgNIOCOlQGeXLCtyUn3A23+VVDdiCcnB6dTTrg==", "dev": true, "requires": { - "enzyme-matchers": "^6.1.2", - "enzyme-to-json": "^3.3.0", - "jest-environment-enzyme": "^6.1.2" + "pretty-format": "^24.0.0" }, "dependencies": { - "enzyme-matchers": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/enzyme-matchers/-/enzyme-matchers-6.1.2.tgz", - "integrity": "sha512-cP9p+HMOZ1ZXQ+k2H4dCkxmTZzIvpEy5zv0ZjgoBl6D0U43v+bJGH5IeWHdIovCzgJ0dVcMCKJ6lNu83lYUCAA==", + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true + }, + "pretty-format": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.0.0.tgz", + "integrity": "sha512-LszZaKG665djUcqg5ZQq+XzezHLKrxsA86ZABTozp+oNhkdqa+tG2dX4qa6ERl5c/sRDrAa3lHmwnvKoP+OG/g==", "dev": true, "requires": { - "circular-json-es6": "^2.0.1", - "deep-equal-ident": "^1.1.1" + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0" } } } }, - "jest-get-type": { - "version": "22.4.3", - "resolved": "http://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", - "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==", - "dev": true - }, - "jest-haste-map": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-23.6.0.tgz", - "integrity": "sha512-uyNhMyl6dr6HaXGHp8VF7cK6KpC6G9z9LiMNsst+rJIZ8l7wY0tk8qwjPmEghczojZ2/ZhtEdIabZ0OQRJSGGg==", + "jest-matcher-utils": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.0.0.tgz", + "integrity": "sha512-LQTDmO+aWRz1Tf9HJg+HlPHhDh1E1c65kVwRFo5mwCVp5aQDzlkz4+vCvXhOKFjitV2f0kMdHxnODrXVoi+rlA==", "dev": true, "requires": { - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.1.11", - "invariant": "^2.2.4", - "jest-docblock": "^23.2.0", - "jest-serializer": "^23.0.1", - "jest-worker": "^23.2.0", - "micromatch": "^2.3.11", - "sane": "^2.0.0" + "chalk": "^2.0.1", + "jest-diff": "^24.0.0", + "jest-get-type": "^24.0.0", + "pretty-format": "^24.0.0" }, "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", "dev": true }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "pretty-format": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.0.0.tgz", + "integrity": "sha512-LszZaKG665djUcqg5ZQq+XzezHLKrxsA86ZABTozp+oNhkdqa+tG2dX4qa6ERl5c/sRDrAa3lHmwnvKoP+OG/g==", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0" } } } }, - "jest-jasmine2": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz", - "integrity": "sha512-pe2Ytgs1nyCs8IvsEJRiRTPC0eVYd8L/dXJGU08GFuBwZ4sYH/lmFDdOL3ZmvJR8QKqV9MFuwlsAi/EWkFUbsQ==", + "jest-message-util": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.0.0.tgz", + "integrity": "sha512-J9ROJIwz/IeC+eV1XSwnRK4oAwPuhmxEyYx1+K5UI+pIYwFZDSrfZaiWTdq0d2xYFw4Xiu+0KQWsdsQpgJMf3Q==", "dev": true, "requires": { - "babel-traverse": "^6.0.0", + "@babel/code-frame": "^7.0.0", "chalk": "^2.0.1", - "co": "^4.6.0", - "expect": "^23.6.0", - "is-generator-fn": "^1.0.0", - "jest-diff": "^23.6.0", - "jest-each": "^23.6.0", - "jest-matcher-utils": "^23.6.0", - "jest-message-util": "^23.4.0", - "jest-snapshot": "^23.6.0", - "jest-util": "^23.4.0", - "pretty-format": "^23.6.0" + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" }, "dependencies": { - "arr-diff": { + "slash": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + } + } + }, + "jest-mock": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.0.0.tgz", + "integrity": "sha512-sQp0Hu5fcf5NZEh1U9eIW2qD0BwJZjb63Yqd98PQJFvf/zzUTBoUAwv/Dc/HFeNHIw1f3hl/48vNn+j3STaI7A==", + "dev": true + }, + "jest-puppeteer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jest-puppeteer/-/jest-puppeteer-4.0.0.tgz", + "integrity": "sha512-B/5BlePsYmxTVmWD0E3zEuYfrTPk66EZskRlZhdDuXLoUAWPRu2+J/egnXh5GO+pUqkELffn5gfPulpn21rY7A==", + "dev": true, + "requires": { + "expect-puppeteer": "^4.0.0", + "jest-environment-puppeteer": "^4.0.0" + } + }, + "jest-regex-util": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.0.0.tgz", + "integrity": "sha512-Jv/uOTCuC+PY7WpJl2mpoI+WbY2ut73qwwO9ByJJNwOCwr1qWhEW2Lyi2S9ZewUdJqeVpEBisdEVZSI+Zxo58Q==", + "dev": true + }, + "jest-resolve": { + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.1.0.tgz", + "integrity": "sha512-TPiAIVp3TG6zAxH28u/6eogbwrvZjBMWroSLBDkwkHKrqxB/RIdwkWDye4uqPlZIXWIaHtifY3L0/eO5Z0f2wg==", + "dev": true, + "requires": { + "browser-resolve": "^1.11.3", + "chalk": "^2.0.1", + "realpath-native": "^1.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.1.0.tgz", + "integrity": "sha512-2VwPsjd3kRPu7qe2cpytAgowCObk5AKeizfXuuiwgm1a9sijJDZe8Kh1sFj6FKvSaNEfCPlBVkZEJa2482m/Uw==", + "dev": true, + "requires": { + "jest-regex-util": "^24.0.0", + "jest-snapshot": "^24.1.0" + } + }, + "jest-runner": { + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.1.0.tgz", + "integrity": "sha512-CDGOkT3AIFl16BLL/OdbtYgYvbAprwJ+ExKuLZmGSCSldwsuU2dEGauqkpvd9nphVdAnJUcP12e/EIlnTX0QXg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "exit": "^0.1.2", + "graceful-fs": "^4.1.15", + "jest-config": "^24.1.0", + "jest-docblock": "^24.0.0", + "jest-haste-map": "^24.0.0", + "jest-jasmine2": "^24.1.0", + "jest-leak-detector": "^24.0.0", + "jest-message-util": "^24.0.0", + "jest-runtime": "^24.1.0", + "jest-util": "^24.0.0", + "jest-worker": "^24.0.0", + "source-map-support": "^0.5.6", + "throat": "^4.0.0" + }, + "dependencies": { + "callsites": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", "dev": true }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "ci-info": "^2.0.0" } }, "jest-message-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz", - "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.0.0.tgz", + "integrity": "sha512-J9ROJIwz/IeC+eV1XSwnRK4oAwPuhmxEyYx1+K5UI+pIYwFZDSrfZaiWTdq0d2xYFw4Xiu+0KQWsdsQpgJMf3Q==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0-beta.35", + "@babel/code-frame": "^7.0.0", "chalk": "^2.0.1", - "micromatch": "^2.3.11", - "slash": "^1.0.0", + "micromatch": "^3.1.10", + "slash": "^2.0.0", "stack-utils": "^1.0.1" } }, "jest-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-23.4.0.tgz", - "integrity": "sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.0.0.tgz", + "integrity": "sha512-QxsALc4wguYS7cfjdQSOr5HTkmjzkHgmZvIDkcmPfl1ib8PNV8QUWLwbKefCudWS0PRKioV+VbQ0oCUPC691fQ==", "dev": true, "requires": { - "callsites": "^2.0.0", + "callsites": "^3.0.0", "chalk": "^2.0.1", - "graceful-fs": "^4.1.11", - "is-ci": "^1.0.10", - "jest-message-util": "^23.4.0", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", + "jest-message-util": "^24.0.0", "mkdirp": "^0.5.1", - "slash": "^1.0.0", + "slash": "^2.0.0", "source-map": "^0.6.0" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "jest-leak-detector": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz", - "integrity": "sha512-f/8zA04rsl1Nzj10HIyEsXvYlMpMPcy0QkQilVZDFOaPbv2ur71X5u2+C4ZQJGyV/xvVXtCCZ3wQ99IgQxftCg==", - "dev": true, - "requires": { - "pretty-format": "^23.6.0" - } - }, - "jest-matcher-utils": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz", - "integrity": "sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "jest-get-type": "^22.1.0", - "pretty-format": "^23.6.0" + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, - "jest-message-util": { - "version": "22.4.3", - "resolved": "http://registry.npmjs.org/jest-message-util/-/jest-message-util-22.4.3.tgz", - "integrity": "sha512-iAMeKxhB3Se5xkSjU0NndLLCHtP4n+GtCqV0bISKA5dmOXQfEbdEmYiu2qpnWBDCQdEafNDDU6Q+l6oBMd/+BA==", + "jest-runtime": { + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.1.0.tgz", + "integrity": "sha512-59/BY6OCuTXxGeDhEMU7+N33dpMQyXq7MLK07cNSIY/QYt2QZgJ7Tjx+rykBI0skAoigFl0A5tmT8UdwX92YuQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0-beta.35", + "@babel/core": "^7.1.0", + "babel-plugin-istanbul": "^5.1.0", "chalk": "^2.0.1", - "micromatch": "^2.3.11", - "slash": "^1.0.0", - "stack-utils": "^1.0.1" + "convert-source-map": "^1.4.0", + "exit": "^0.1.2", + "fast-json-stable-stringify": "^2.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", + "jest-config": "^24.1.0", + "jest-haste-map": "^24.0.0", + "jest-message-util": "^24.0.0", + "jest-regex-util": "^24.0.0", + "jest-resolve": "^24.1.0", + "jest-snapshot": "^24.1.0", + "jest-util": "^24.0.0", + "jest-validate": "^24.0.0", + "micromatch": "^3.1.10", + "realpath-native": "^1.0.0", + "slash": "^2.0.0", + "strip-bom": "^3.0.0", + "write-file-atomic": "2.4.1", + "yargs": "^12.0.2" }, "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "babel-plugin-istanbul": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.1.tgz", + "integrity": "sha512-RNNVv2lsHAXJQsEJ5jonQwrJVWK8AcZpG1oxhnjCUaAjL7xahYLANhPUZbzEQHjKy1NMYUwn+0NPKQc8iSY4xQ==", "dev": true, "requires": { - "arr-flatten": "^1.0.1" + "find-up": "^3.0.0", + "istanbul-lib-instrument": "^3.0.0", + "test-exclude": "^5.0.0" } }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "callsites": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", "dev": true }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", + "dev": true }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "locate-path": "^3.0.0" } }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "pump": "^3.0.0" } - } - } - }, - "jest-mock": { - "version": "22.4.3", - "resolved": "http://registry.npmjs.org/jest-mock/-/jest-mock-22.4.3.tgz", - "integrity": "sha512-+4R6mH5M1G4NK16CKg9N1DtCaFmuxhcIqF4lQK/Q1CIotqMs/XBemfpDPeVZBFow6iyUNu6EBT9ugdNOTT5o5Q==", - "dev": true - }, - "jest-puppeteer": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jest-puppeteer/-/jest-puppeteer-3.2.1.tgz", - "integrity": "sha1-cvasvoLy/eFnjwaTEGWD7ec0560=", - "dev": true, - "requires": { - "expect-puppeteer": "^3.2.0", - "jest-environment-puppeteer": "^3.2.1" - } - }, - "jest-regex-util": { - "version": "23.3.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-23.3.0.tgz", - "integrity": "sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U=", - "dev": true - }, - "jest-resolve": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-23.6.0.tgz", - "integrity": "sha512-XyoRxNtO7YGpQDmtQCmZjum1MljDqUCob7XlZ6jy9gsMugHdN2hY4+Acz9Qvjz2mSsOnPSH7skBmDYCHXVZqkA==", - "dev": true, - "requires": { - "browser-resolve": "^1.11.3", - "chalk": "^2.0.1", - "realpath-native": "^1.0.0" - } - }, - "jest-resolve-dependencies": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz", - "integrity": "sha512-EkQWkFWjGKwRtRyIwRwI6rtPAEyPWlUC2MpzHissYnzJeHcyCn1Hc8j7Nn1xUVrS5C6W5+ZL37XTem4D4pLZdA==", - "dev": true, - "requires": { - "jest-regex-util": "^23.3.0", - "jest-snapshot": "^23.6.0" - } - }, - "jest-runner": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-23.6.0.tgz", - "integrity": "sha512-kw0+uj710dzSJKU6ygri851CObtCD9cN8aNkg8jWJf4ewFyEa6kwmiH/r/M1Ec5IL/6VFa0wnAk6w+gzUtjJzA==", - "dev": true, - "requires": { - "exit": "^0.1.2", - "graceful-fs": "^4.1.11", - "jest-config": "^23.6.0", - "jest-docblock": "^23.2.0", - "jest-haste-map": "^23.6.0", - "jest-jasmine2": "^23.6.0", - "jest-leak-detector": "^23.6.0", - "jest-message-util": "^23.4.0", - "jest-runtime": "^23.6.0", - "jest-util": "^23.4.0", - "jest-worker": "^23.2.0", - "source-map-support": "^0.5.6", - "throat": "^4.0.0" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "requires": { - "arr-flatten": "^1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", "dev": true }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "ci-info": "^2.0.0" } }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "istanbul-lib-instrument": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz", + "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "@babel/generator": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/template": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "istanbul-lib-coverage": "^2.0.3", + "semver": "^5.5.0" } }, "jest-message-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz", - "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.0.0.tgz", + "integrity": "sha512-J9ROJIwz/IeC+eV1XSwnRK4oAwPuhmxEyYx1+K5UI+pIYwFZDSrfZaiWTdq0d2xYFw4Xiu+0KQWsdsQpgJMf3Q==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0-beta.35", + "@babel/code-frame": "^7.0.0", "chalk": "^2.0.1", - "micromatch": "^2.3.11", - "slash": "^1.0.0", + "micromatch": "^3.1.10", + "slash": "^2.0.0", "stack-utils": "^1.0.1" } }, "jest-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-23.4.0.tgz", - "integrity": "sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.0.0.tgz", + "integrity": "sha512-QxsALc4wguYS7cfjdQSOr5HTkmjzkHgmZvIDkcmPfl1ib8PNV8QUWLwbKefCudWS0PRKioV+VbQ0oCUPC691fQ==", "dev": true, "requires": { - "callsites": "^2.0.0", + "callsites": "^3.0.0", "chalk": "^2.0.1", - "graceful-fs": "^4.1.11", - "is-ci": "^1.0.10", - "jest-message-util": "^23.4.0", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", + "jest-message-util": "^24.0.0", "mkdirp": "^0.5.1", - "slash": "^1.0.0", + "slash": "^2.0.0", "source-map": "^0.6.0" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "invert-kv": "^2.0.0" } }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" } - } - } - }, - "jest-runtime": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-23.6.0.tgz", - "integrity": "sha512-ycnLTNPT2Gv+TRhnAYAQ0B3SryEXhhRj1kA6hBPSeZaNQkJ7GbZsxOLUkwg6YmvWGdX3BB3PYKFLDQCAE1zNOw==", - "dev": true, - "requires": { - "babel-core": "^6.0.0", - "babel-plugin-istanbul": "^4.1.6", - "chalk": "^2.0.1", - "convert-source-map": "^1.4.0", - "exit": "^0.1.2", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.1.11", - "jest-config": "^23.6.0", - "jest-haste-map": "^23.6.0", - "jest-message-util": "^23.4.0", - "jest-regex-util": "^23.3.0", - "jest-resolve": "^23.6.0", - "jest-snapshot": "^23.6.0", - "jest-util": "^23.4.0", - "jest-validate": "^23.6.0", - "micromatch": "^2.3.11", - "realpath-native": "^1.0.0", - "slash": "^1.0.0", - "strip-bom": "3.0.0", - "write-file-atomic": "^2.1.0", - "yargs": "^11.0.0" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + }, + "mem": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.1.0.tgz", + "integrity": "sha512-I5u6Q1x7wxO0kdOpYBB28xueHADYps5uty/zg936CiG8NTe5sJL8EjrCuLneuDW3PlMdZBGDIn8BirEVdovZvg==", "dev": true, "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^2.0.0" } }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" } }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "p-is-promise": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", + "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", + "dev": true + }, + "p-limit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", "dev": true, "requires": { - "ms": "2.0.0" + "p-try": "^2.0.0" } }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "p-limit": "^2.0.0" } }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, - "jest-message-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz", - "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=", + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0-beta.35", - "chalk": "^2.0.1", - "micromatch": "^2.3.11", - "slash": "^1.0.0", - "stack-utils": "^1.0.1" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "jest-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-23.4.0.tgz", - "integrity": "sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE=", + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "requires": { - "callsites": "^2.0.0", - "chalk": "^2.0.1", - "graceful-fs": "^4.1.11", - "is-ci": "^1.0.10", - "jest-message-util": "^23.4.0", - "mkdirp": "^0.5.1", - "slash": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" } }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true }, "strip-bom": { "version": "3.0.0", @@ -12625,165 +12507,165 @@ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, + "test-exclude": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.1.0.tgz", + "integrity": "sha512-gwf0S2fFsANC55fSeSqpb8BYk6w3FDvwZxfNjeF6FRgvFa43r+7wRiA/Q0IxoRU37wB/LE8IQ4221BsNucTaCA==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^1.0.1" + } + }, + "write-file-atomic": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.1.tgz", + "integrity": "sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, "yargs": { - "version": "11.1.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", - "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", "dev": true, "requires": { "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", + "os-locale": "^3.0.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", "string-width": "^2.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" } }, "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } }, "jest-serializer": { - "version": "23.0.1", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-23.0.1.tgz", - "integrity": "sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.0.0.tgz", + "integrity": "sha512-9FKxQyrFgHtx3ozU+1a8v938ILBE7S8Ko3uiAVjT8Yfi2o91j/fj81jacCQZ/Ihjiff/VsUCXVgQ+iF1XdImOw==", "dev": true }, "jest-snapshot": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-23.6.0.tgz", - "integrity": "sha512-tM7/Bprftun6Cvj2Awh/ikS7zV3pVwjRYU2qNYS51VZHgaAMBs5l4o/69AiDHhQrj5+LA2Lq4VIvK7zYk/bswg==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.1.0.tgz", + "integrity": "sha512-th6TDfFqEmXvuViacU1ikD7xFb7lQsPn2rJl7OEmnfIVpnrx3QNY2t3PE88meeg0u/mQ0nkyvmC05PBqO4USFA==", "dev": true, "requires": { - "babel-types": "^6.0.0", + "@babel/types": "^7.0.0", "chalk": "^2.0.1", - "jest-diff": "^23.6.0", - "jest-matcher-utils": "^23.6.0", - "jest-message-util": "^23.4.0", - "jest-resolve": "^23.6.0", + "jest-diff": "^24.0.0", + "jest-matcher-utils": "^24.0.0", + "jest-message-util": "^24.0.0", + "jest-resolve": "^24.1.0", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "pretty-format": "^23.6.0", + "pretty-format": "^24.0.0", "semver": "^5.5.0" }, "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", "dev": true }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, "jest-message-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz", - "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.0.0.tgz", + "integrity": "sha512-J9ROJIwz/IeC+eV1XSwnRK4oAwPuhmxEyYx1+K5UI+pIYwFZDSrfZaiWTdq0d2xYFw4Xiu+0KQWsdsQpgJMf3Q==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0-beta.35", + "@babel/code-frame": "^7.0.0", "chalk": "^2.0.1", - "micromatch": "^2.3.11", - "slash": "^1.0.0", + "micromatch": "^3.1.10", + "slash": "^2.0.0", "stack-utils": "^1.0.1" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "pretty-format": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.0.0.tgz", + "integrity": "sha512-LszZaKG665djUcqg5ZQq+XzezHLKrxsA86ZABTozp+oNhkdqa+tG2dX4qa6ERl5c/sRDrAa3lHmwnvKoP+OG/g==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0" } }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true } } }, "jest-util": { - "version": "22.4.3", - "resolved": "http://registry.npmjs.org/jest-util/-/jest-util-22.4.3.tgz", - "integrity": "sha512-rfDfG8wyC5pDPNdcnAlZgwKnzHvZDu8Td2NJI/jAGKEGxJPYiE4F0ss/gSAkG4778Y23Hvbz+0GMrDJTeo7RjQ==", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.0.0.tgz", + "integrity": "sha512-QxsALc4wguYS7cfjdQSOr5HTkmjzkHgmZvIDkcmPfl1ib8PNV8QUWLwbKefCudWS0PRKioV+VbQ0oCUPC691fQ==", "dev": true, "requires": { - "callsites": "^2.0.0", + "callsites": "^3.0.0", "chalk": "^2.0.1", - "graceful-fs": "^4.1.11", - "is-ci": "^1.0.10", - "jest-message-util": "^22.4.3", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", + "jest-message-util": "^24.0.0", "mkdirp": "^0.5.1", + "slash": "^2.0.0", "source-map": "^0.6.0" }, "dependencies": { + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -12793,35 +12675,143 @@ } }, "jest-validate": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-23.6.0.tgz", - "integrity": "sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A==", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.0.0.tgz", + "integrity": "sha512-vMrKrTOP4BBFIeOWsjpsDgVXATxCspC9S1gqvbJ3Tnn/b9ACsJmteYeVx9830UMV28Cob1RX55x96Qq3Tfad4g==", "dev": true, "requires": { + "camelcase": "^5.0.0", "chalk": "^2.0.1", - "jest-get-type": "^22.1.0", + "jest-get-type": "^24.0.0", "leven": "^2.1.0", - "pretty-format": "^23.6.0" + "pretty-format": "^24.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true + }, + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", + "dev": true + }, + "pretty-format": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.0.0.tgz", + "integrity": "sha512-LszZaKG665djUcqg5ZQq+XzezHLKrxsA86ZABTozp+oNhkdqa+tG2dX4qa6ERl5c/sRDrAa3lHmwnvKoP+OG/g==", + "dev": true, + "requires": { + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0" + } + } } }, "jest-watcher": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-23.4.0.tgz", - "integrity": "sha1-0uKM50+NrWxq/JIrksq+9u0FyRw=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.0.0.tgz", + "integrity": "sha512-GxkW2QrZ4YxmW1GUWER05McjVDunBlKMFfExu+VsGmXJmpej1saTEKvONdx5RJBlVdpPI5x6E3+EDQSIGgl53g==", "dev": true, "requires": { "ansi-escapes": "^3.0.0", "chalk": "^2.0.1", + "jest-util": "^24.0.0", "string-length": "^2.0.0" + }, + "dependencies": { + "callsites": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", + "dev": true + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "jest-message-util": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.0.0.tgz", + "integrity": "sha512-J9ROJIwz/IeC+eV1XSwnRK4oAwPuhmxEyYx1+K5UI+pIYwFZDSrfZaiWTdq0d2xYFw4Xiu+0KQWsdsQpgJMf3Q==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" + } + }, + "jest-util": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.0.0.tgz", + "integrity": "sha512-QxsALc4wguYS7cfjdQSOr5HTkmjzkHgmZvIDkcmPfl1ib8PNV8QUWLwbKefCudWS0PRKioV+VbQ0oCUPC691fQ==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "chalk": "^2.0.1", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", + "jest-message-util": "^24.0.0", + "mkdirp": "^0.5.1", + "slash": "^2.0.0", + "source-map": "^0.6.0" + } + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "jest-worker": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-23.2.0.tgz", - "integrity": "sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.0.0.tgz", + "integrity": "sha512-s64/OThpfQvoCeHG963MiEZOAAxu8kHsaL/rCMF7lpdzo7vgF0CtPml9hfguOMgykgH/eOm4jFP4ibfHLruytg==", "dev": true, "requires": { - "merge-stream": "^1.0.1" + "merge-stream": "^1.0.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "js-base64": { @@ -13023,9 +13013,9 @@ "dev": true }, "kleur": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-2.0.2.tgz", - "integrity": "sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.2.tgz", + "integrity": "sha512-3h7B2WRT5LNXOtQiAaWonilegHcPSf9nLVXlSTci8lu1dZUuui61+EsPEZqSVxY7rXYmB2DVKMQILxaO5WL61Q==", "dev": true }, "lazy-cache": { @@ -13292,6 +13282,24 @@ "symbol-observable": "^1.1.0" } }, + "jest-get-type": { + "version": "22.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", + "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==", + "dev": true + }, + "jest-validate": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-23.6.0.tgz", + "integrity": "sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^22.1.0", + "leven": "^2.1.0", + "pretty-format": "^23.6.0" + } + }, "listr": { "version": "0.14.3", "resolved": "https://registry.npmjs.org/listr/-/listr-0.14.3.tgz", @@ -13497,29 +13505,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, - "lodash._baseisequal": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/lodash._baseisequal/-/lodash._baseisequal-3.0.7.tgz", - "integrity": "sha1-2AJfdjOdKTQnZ9zIh85cuVpbUfE=", - "dev": true, - "requires": { - "lodash.isarray": "^3.0.0", - "lodash.istypedarray": "^3.0.0", - "lodash.keys": "^3.0.0" - } - }, - "lodash._bindcallback": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", - "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, "lodash._reinterpolate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", @@ -13552,49 +13537,16 @@ }, "lodash.get": { "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, "lodash.isequal": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-3.0.4.tgz", - "integrity": "sha1-HDXrO27wzR/1F0Pj6jz3/f/ay2Q=", - "dev": true, - "requires": { - "lodash._baseisequal": "^3.0.0", - "lodash._bindcallback": "^3.0.0" - } - }, - "lodash.istypedarray": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz", - "integrity": "sha1-yaR3SYYHUB2OhJTSg7h8OSgc72I=", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", "dev": true }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -13902,12 +13854,6 @@ "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", "dev": true }, - "map-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", - "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", - "dev": true - }, "map-values": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-values/-/map-values-1.0.1.tgz", @@ -13941,12 +13887,6 @@ "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=", "dev": true }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", - "dev": true - }, "mathml-tag-names": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.0.tgz", @@ -13974,6 +13914,21 @@ "unist-util-visit": "^1.1.0" } }, + "mdast-util-inject": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-inject/-/mdast-util-inject-1.1.0.tgz", + "integrity": "sha1-2wa4tYW+lZotzS+H9HK6m3VvNnU=", + "dev": true, + "requires": { + "mdast-util-to-string": "^1.0.0" + } + }, + "mdast-util-to-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.0.5.tgz", + "integrity": "sha512-2qLt/DEOo5F6nc2VFScQiHPzQ0XXcabquRJxKMhKte8nt42o08HUxNDPk7tt0YPxnWjAT11I1SYi0X0iPnfI5A==", + "dev": true + }, "mdn-data": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz", @@ -14605,6 +14560,12 @@ } } }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true + }, "node-notifier": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.3.0.tgz", @@ -14987,29 +14948,30 @@ } }, "npm-package-json-lint": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-3.3.1.tgz", - "integrity": "sha512-Wz5byxFKbitRcQS66wCTqrje/uCLJPH+jsEvIV4H2G//E4iB/X0utVPLZzbs4hukoeKuLFadHbMcILa6Cr027w==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-3.6.0.tgz", + "integrity": "sha512-N1y3r0l0oN7mYnMfRzZvYF8+NvjIx+zkskRn3J7ofipJKGH4RDDKdEGP/mV1Crf5W8uUo3201VhJe04Q+v9erw==", "dev": true, "requires": { - "ajv": "^6.5.2", - "chalk": "^2.4.1", - "glob": "^7.1.2", + "ajv": "^6.9.2", + "chalk": "^2.4.2", + "glob": "^7.1.3", + "ignore": "^5.0.5", "is-path-inside": "^2.0.0", "is-plain-obj": "^1.1.0", "is-resolvable": "^1.1.0", "log-symbols": "^2.2.0", "meow": "^5.0.0", "plur": "^3.0.1", - "semver": "^5.5.0", + "semver": "^5.6.0", "strip-json-comments": "^2.0.1", - "validator": "^10.5.0" + "validator": "^10.11.0" }, "dependencies": { "ajv": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", - "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", + "version": "6.9.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.2.tgz", + "integrity": "sha512-4UFy0/LgDo7Oa/+wOAlj44tp9K78u38E5/359eSrqEp1Z5PdVfimCcs7SluXMP755RUQu6d2b4AvF0R1C9RZjg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -15018,17 +14980,54 @@ "uri-js": "^4.2.2" } }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, "fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "ignore": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.0.5.tgz", + "integrity": "sha512-kOC8IUb8HSDMVcYrDVezCxpJkzSQWTAzf3olpKM6o9rM5zpojx23O0Fl8Wr4+qJ6ZbPEHqf1fdwev/DS7v7pmA==", + "dev": true + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true } } }, @@ -15222,6 +15221,18 @@ "has": "^1.0.1" } }, + "object.fromentries": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.0.tgz", + "integrity": "sha512-9iLiI6H083uiqUuvzyY6qrlmc/Gz8hLQFOcb/Ri/0xXFkSNS3ctV+CbE6yM2+AnkYfOB3dGjdzC0wrMLIhQICA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.11.0", + "function-bind": "^1.1.1", + "has": "^1.0.1" + } + }, "object.getownpropertydescriptors": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", @@ -15232,16 +15243,6 @@ "es-abstract": "^1.5.1" } }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", @@ -15387,6 +15388,15 @@ "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", "dev": true }, + "p-each-series": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", + "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", + "dev": true, + "requires": { + "p-reduce": "^1.0.0" + } + }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -15711,18 +15721,6 @@ "integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A=", "dev": true }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - } - }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -15844,15 +15842,6 @@ } } }, - "pause-stream": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", - "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", - "dev": true, - "requires": { - "through": "~2.3" - } - }, "pbkdf2": { "version": "3.0.17", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", @@ -15869,8 +15858,7 @@ "pegjs": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz", - "integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0=", - "dev": true + "integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0=" }, "pend": { "version": "1.2.0", @@ -15911,6 +15899,15 @@ "pinkie": "^2.0.0" } }, + "pirates": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "dev": true, + "requires": { + "node-modules-regexp": "^1.0.0" + } + }, "pkg-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", @@ -15956,6 +15953,34 @@ "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", "dev": true }, + "portfinder": { + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz", + "integrity": "sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==", + "dev": true, + "requires": { + "async": "^1.5.2", + "debug": "^2.2.0", + "mkdirp": "0.5.x" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -17667,12 +17692,6 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, "pretty-format": { "version": "23.6.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz", @@ -17732,13 +17751,13 @@ } }, "prompts": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-0.1.14.tgz", - "integrity": "sha512-rxkyiE9YH6zAz/rZpywySLKkpaj0NMVyNw1qhsubdbjjSgcayjTShDreZGlFMcGSu5sab3bAKPfFk78PB90+8w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.0.3.tgz", + "integrity": "sha512-H8oWEoRZpybm6NV4to9/1limhttEo13xK62pNvn2JzY0MA03p7s0OjtmhXyon3uJmxiJJVSuUwEJFFssI3eBiQ==", "dev": true, "requires": { - "kleur": "^2.0.1", - "sisteransi": "^0.1.1" + "kleur": "^3.0.2", + "sisteransi": "^1.0.0" } }, "promzard": { @@ -17812,15 +17831,6 @@ "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", "dev": true }, - "ps-tree": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz", - "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==", - "dev": true, - "requires": { - "event-stream": "=3.3.4" - } - }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -17953,25 +17963,6 @@ "ret": "~0.1.10" } }, - "randomatic": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", - "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, "randombytes": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", @@ -18505,15 +18496,6 @@ "private": "^0.1.6" } }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -19140,14 +19122,15 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sane": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/sane/-/sane-2.5.2.tgz", - "integrity": "sha1-tNwYYcIbQn6SlQej51HiosuKs/o=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-3.1.0.tgz", + "integrity": "sha512-G5GClRRxT1cELXfdAq7UKtUsv8q/ZC5k8lQGmjEm4HcAl3HzBy68iglyNCmw4+0tiXPCBZntslHlRhbnsSws+Q==", "dev": true, "requires": { "anymatch": "^2.0.0", "capture-exit": "^1.2.0", "exec-sh": "^0.2.0", + "execa": "^1.0.0", "fb-watchman": "^2.0.0", "fsevents": "^1.2.3", "micromatch": "^3.1.4", @@ -19156,11 +19139,58 @@ "watch": "~0.18.0" }, "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } } } }, @@ -19582,9 +19612,9 @@ } }, "sisteransi": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-0.1.1.tgz", - "integrity": "sha512-PmGOd02bM9YO5ifxpw36nrNMBTptEtfRl4qUYl9SndkolplkrZZOW7PGHjrZL53QvMVj9nQ+TKqUnRsw4tJa4g==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.0.tgz", + "integrity": "sha512-N+z4pHB4AmUv0SjveWRd6q1Nj5w62m5jodv+GD8lvmbY/83T/rpbJGZOnK5T149OldDj4Db07BSv9xY4K6NTPQ==", "dev": true }, "slash": { @@ -19763,34 +19793,13 @@ "dev": true }, "source-map-loader": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.3.tgz", - "integrity": "sha512-MYbFX9DYxmTQFfy2v8FC1XZwpwHKYxg3SK8Wb7VPBKuhDjz8gi9re2819MsG4p49HDyiOSUKlmZ+nQBArW5CGw==", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.4.tgz", + "integrity": "sha512-OU6UJUty+i2JDpTItnizPrlpOIBLmQbWMuBg9q5bVtnHACqw1tn9nNwqJLbv0/00JjnJb/Ee5g5WS5vrRv7zIQ==", "dev": true, "requires": { "async": "^2.5.0", - "loader-utils": "~0.2.2", - "source-map": "~0.6.1" - }, - "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "loader-utils": "^1.1.0" } }, "source-map-resolve": { @@ -19807,12 +19816,21 @@ } }, "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", + "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", "dev": true, "requires": { - "source-map": "^0.5.6" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "source-map-url": { @@ -19828,15 +19846,23 @@ "dev": true }, "spawnd": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/spawnd/-/spawnd-3.5.2.tgz", - "integrity": "sha512-taf6nYLIl8b3b1RNt0YuxnIUUgHqfx+nix8Rdr2FkNG8259+Jt8YJahrPDShOPa9vCMnDPfPsefRAY/oJy+QBg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spawnd/-/spawnd-4.0.0.tgz", + "integrity": "sha512-ql3qhJnhAkvXpaqKBWOqou1rUTSQhFRaZkyOT+MTFB4xY3X+brgw6LTWV2wHuE9A6YPhrNe1cbg7S+jAYnbC0Q==", "dev": true, "requires": { "exit": "^0.1.2", "signal-exit": "^3.0.2", - "terminate": "^2.1.2", + "tree-kill": "^1.2.1", "wait-port": "^0.2.2" + }, + "dependencies": { + "tree-kill": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.1.tgz", + "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", + "dev": true + } } }, "spdx-correct": { @@ -20011,15 +20037,6 @@ "readable-stream": "^2.0.2" } }, - "stream-combiner": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", - "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", - "dev": true, - "requires": { - "duplexer": "~0.1.1" - } - }, "stream-each": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", @@ -20799,28 +20816,6 @@ } } }, - "terminate": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/terminate/-/terminate-2.1.2.tgz", - "integrity": "sha512-ltKc9MkgcRe7gzD7XSttHCF1feKM1pTkCdb58jFVWk1efPN9JIk/BHSlOaYF+hCcWoubeJQ8C8Phb0++fa6iNQ==", - "dev": true, - "requires": { - "ps-tree": "^1.1.1" - } - }, - "test-exclude": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.1.tgz", - "integrity": "sha512-qpqlP/8Zl+sosLxBcVKl9vYy26T9NPalxSzzCP/OY6K7j938ui2oKgo+kRZYfxAeIpLqpbVnsHq1tyV70E4lWQ==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "micromatch": "^3.1.8", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" - } - }, "text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", @@ -21548,9 +21543,9 @@ } }, "validator": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-10.5.0.tgz", - "integrity": "sha512-6OOi+eV2mOxCFLq0f2cJDrdB6lrtLXEUxabhNRGjgOLT/l3SSll9J49Cl+LIloUqkWWTPraK/mucEQ3dc2jStQ==", + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-10.11.0.tgz", + "integrity": "sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw==", "dev": true }, "vary": { @@ -21820,9 +21815,9 @@ } }, "webpack-bundle-analyzer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.0.2.tgz", - "integrity": "sha512-cZG4wSQtKrSpk5RJ33dxiaAyo8bP0V+JvycAyIDFEiDIhw4LHhhVKhn40YT1w6TR9E4scHA00LnIoBtTA13Mow==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.0.3.tgz", + "integrity": "sha512-naLWiRfmtH4UJgtUktRTLw6FdoZJ2RvCR9ePbwM9aRMsS/KjFerkPZG9epEvXRAw5d5oPdrs9+3p+afNjxW8Xw==", "dev": true, "requires": { "acorn": "^5.7.3", @@ -21846,9 +21841,9 @@ "dev": true }, "commander": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.18.0.tgz", - "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", "dev": true } } @@ -22052,11 +22047,12 @@ } }, "webpack-livereload-plugin": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/webpack-livereload-plugin/-/webpack-livereload-plugin-2.1.1.tgz", - "integrity": "sha512-W7Q55QbPvVJotpIZSjjwzmqQ22333ExYxWM3WFlHKkbPStQqVRSmJkjntUqXF9jtpdeXi8r8HLkA1RVnAP0SQA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/webpack-livereload-plugin/-/webpack-livereload-plugin-2.2.0.tgz", + "integrity": "sha512-sx9xA5mHoNOUgLQI0PmXT3KV9ecsVmUaTgr+fsoL69qAOHw/7VzkL1+ZMDQ8n0dPbWounswK6cBRSgMod7Nhgg==", "dev": true, "requires": { + "portfinder": "^1.0.17", "tiny-lr": "^1.1.1" } }, diff --git a/package.json b/package.json index 8dd9929cfa023..1f0e798ff37f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "5.1.0", + "version": "5.2.0", "private": true, "description": "A new WordPress editor experience", "repository": "git+https://github.com/WordPress/gutenberg.git", @@ -19,6 +19,7 @@ "@wordpress/api-fetch": "file:packages/api-fetch", "@wordpress/autop": "file:packages/autop", "@wordpress/blob": "file:packages/blob", + "@wordpress/block-editor": "file:packages/block-editor", "@wordpress/block-library": "file:packages/block-library", "@wordpress/block-serialization-default-parser": "file:packages/block-serialization-default-parser", "@wordpress/block-serialization-spec-parser": "file:packages/block-serialization-spec-parser", @@ -65,6 +66,7 @@ "@wordpress/babel-preset-default": "file:packages/babel-preset-default", "@wordpress/browserslist-config": "file:packages/browserslist-config", "@wordpress/custom-templated-path-webpack-plugin": "file:packages/custom-templated-path-webpack-plugin", + "@wordpress/docgen": "file:packages/docgen", "@wordpress/e2e-test-utils": "file:packages/e2e-test-utils", "@wordpress/e2e-tests": "file:packages/e2e-tests", "@wordpress/eslint-plugin": "file:packages/eslint-plugin", @@ -75,7 +77,6 @@ "@wordpress/npm-package-json-lint-config": "file:packages/npm-package-json-lint-config", "@wordpress/postcss-themes": "file:packages/postcss-themes", "@wordpress/scripts": "file:packages/scripts", - "babel-loader": "8.0.5", "benchmark": "2.1.4", "browserslist": "4.4.1", "chalk": "2.4.1", @@ -87,7 +88,7 @@ "deasync": "0.1.14", "deep-freeze": "0.0.1", "doctrine": "2.1.0", - "enzyme": "3.7.0", + "enzyme": "3.9.0", "eslint-plugin-jest": "21.5.0", "espree": "3.5.4", "fbjs": "0.8.17", @@ -104,6 +105,7 @@ "node-watch": "0.6.0", "pegjs": "0.10.0", "phpegjs": "1.0.0-beta7", + "postcss": "7.0.13", "react-dom": "16.6.3", "react-test-renderer": "16.6.3", "redux": "4.0.0", @@ -113,13 +115,10 @@ "shallow-equal": "1.0.0", "shallow-equals": "1.0.0", "shallowequal": "1.1.0", - "source-map-loader": "0.2.3", "sprintf-js": "1.1.1", "stylelint-config-wordpress": "13.1.0", "uuid": "3.3.2", "webpack": "4.8.3", - "webpack-bundle-analyzer": "3.0.2", - "webpack-livereload-plugin": "2.1.1", "webpack-rtl-plugin": "github:yoavf/webpack-rtl-plugin#develop" }, "npmPackageJsonLintConfig": { @@ -133,6 +132,7 @@ } ], "require-publishConfig": "error", + "require-repository-directory": "error", "valid-values-author": [ "error", [ @@ -152,8 +152,8 @@ "scripts": { "prebuild": "npm run check-engines", "clean:packages": "rimraf ./packages/*/build ./packages/*/build-module ./packages/*/build-style", - "prebuild:packages": "npm run clean:packages && lerna run build && cross-env INCLUDE_PACKAGES=babel-plugin-import-jsx-pragma,postcss-themes,jest-console SKIP_JSX_PRAGMA_TRANSFORM=1 node ./bin/packages/build.js", - "build:packages": "cross-env EXCLUDE_PACKAGES=babel-plugin-import-jsx-pragma,jest-console,postcss-themes node ./bin/packages/build.js", + "prebuild:packages": "npm run clean:packages && lerna run build", + "build:packages": "node ./bin/packages/build.js", "build": "npm run build:packages && wp-scripts build", "check-engines": "wp-scripts check-engines", "check-licenses": "concurrently \"wp-scripts check-licenses --prod --gpl2\" \"wp-scripts check-licenses --dev\"", @@ -162,7 +162,7 @@ "predev": "npm run check-engines", "dev": "npm run build:packages && concurrently \"wp-scripts start\" \"npm run dev:packages\"", "dev:packages": "node ./bin/packages/watch.js", - "docs:build": "node docs/tool", + "docs:build": "node ./docs/tool && node ./bin/update-readmes", "fixtures:clean": "rimraf \"packages/e2e-tests/fixtures/blocks/*.+(json|serialized.html)\"", "fixtures:server-registered": "docker-compose run -w /var/www/html/wp-content/plugins/gutenberg --rm wordpress ./bin/get-server-blocks.php > test/integration/full-content/server-registered.json", "fixtures:generate": "npm run fixtures:server-registered && cross-env GENERATE_MISSING_FIXTURES=y npm run test-unit", @@ -175,7 +175,6 @@ "lint-css": "wp-scripts lint-style '**/*.scss'", "lint-css:fix": "npm run lint-css -- --fix", "package-plugin": "./bin/build-plugin-zip.sh", - "postinstall": "npm run check-licenses && npm run build:packages", "pot-to-php": "./bin/pot-to-php.js", "precommit": "lint-staged", "publish:check": "npm run build:packages && lerna updated", @@ -203,7 +202,10 @@ "wp-scripts lint-js" ], "{docs/{toc.json,tool/*.js},packages/{*/README.md,*/src/{actions,selectors}.js,components/src/*/**/README.md}}": [ - "npm run docs:build" + "node ./docs/tool" + ], + "packages/**/*.js": [ + "node ./bin/update-readmes" ] } } diff --git a/packages/a11y/README.md b/packages/a11y/README.md index 37cd55e9c5d92..9ce27b254d5c9 100644 --- a/packages/a11y/README.md +++ b/packages/a11y/README.md @@ -12,15 +12,26 @@ npm install @wordpress/a11y --save _This package assumes that your code will run in an **ES2015+** environment. If you're using an environment that has limited or no support for ES2015+ such as lower versions of IE then using [core-js](https://github.com/zloirock/core-js) or [@babel/polyfill](https://babeljs.io/docs/en/next/babel-polyfill) will add support for these methods. Learn more about it in [Babel docs](https://babeljs.io/docs/en/next/caveats)._ -## speak +## API -Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions. This module is inspired by the `speak` function in wp-a11y.js + -### Usage +### setup -To make the `wp.a11y.speak` functionality more universally available, we've decided to create a dedicated JS module for it, called `speak`. Usage is very simple: +[src/index.js#L16-L26](src/index.js#L16-L26) -```JS +Create the live regions. + +### speak + +[src/index.js#L52-L66](src/index.js#L52-L66) + +Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions. +This module is inspired by the `speak` function in wp-a11y.js + +**Usage** + +```js import { speak } from '@wordpress/a11y'; // For polite messages that shouldn't interrupt what screen readers are currently announcing. @@ -30,26 +41,38 @@ speak( 'The message you want to send to the ARIA live region' ); speak( 'The message you want to send to the ARIA live region', 'assertive' ); ``` +**Parameters** + +- **message** `string`: The message to be announced by Assistive Technologies. +- **ariaLive** `string`: Optional. The politeness level for aria-live. Possible values: polite or assertive. Default polite. + + + + ### Background + For context I'll quote [this article on WordPress.org](https://make.wordpress.org/accessibility/2015/04/15/let-wordpress-speak-new-in-wordpress-4-2/) by [@joedolson](https://github.com/joedolson): > #### Why. +> > In modern web development, updating discrete regions of a screen with JavaScript is common. The use of AJAX responses in modern JavaScript-based User Interfaces allows web developers to create beautiful interfaces similar to Desktop applications that don’t require pages to reload or refresh. - +> > JavaScript can create great usability improvements for most users – but when content is updated dynamically, it has the potential to introduce accessibility issues. This is one of the steps you can take to handle that problem. - +> > #### What. +> > When a portion of a page is updated with JavaScript, the update is usually highlighted with animation and bright colors, and is easy to see. But if you don’t have the ability to see the screen, you don’t know this has happened, unless the updated region is marked as an ARIA-live region. - +> > If this isn’t marked, there’s no notification for screen readers. But it’s also possible that all the region content will be announced after an update, if the ARIA live region is too large. You want to provide users with just a simple, concise message. - +> > #### How. +> > That’s what `wp.a11y.speak()` is meant for. It’s a simple tool that creates and appends an ARIA live notifications area to the element where developers can dispatch text messages. Assistive technologies will automatically announce any text change in this area. This ARIA live region has an ARIA role of “status” so it has an implicit aria-live value of polite and an implicit aria-atomic value of true. - +> > This means assistive technologies will notify users of updates but generally do not interrupt the current task, and updates take low priority. If you’re creating an application with higher priority updates (such as a notification that their current session is about to expire, for example), then you’ll want to create your own method with an aria-live value of assertive. ## Browser support -See https://make.wordpress.org/design/handbook/design-guide/browser-support/ +See

Code is Poetry.

diff --git a/packages/a11y/package.json b/packages/a11y/package.json index 975ab31b994b3..bd564572960a6 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/a11y", - "version": "2.0.2", + "version": "2.1.0", "description": "Accessibility (a11y) utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", @@ -12,7 +12,8 @@ "homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/a11y/README.md", "repository": { "type": "git", - "url": "https://github.com/WordPress/gutenberg.git" + "url": "https://github.com/WordPress/gutenberg.git", + "directory": "packages/a11y" }, "bugs": { "url": "https://github.com/WordPress/gutenberg/issues" diff --git a/packages/a11y/src/index.js b/packages/a11y/src/index.js index e082e15ca6fb7..525ea63b87968 100644 --- a/packages/a11y/src/index.js +++ b/packages/a11y/src/index.js @@ -31,11 +31,23 @@ export const setup = function() { domReady( setup ); /** - * Update the ARIA live notification area text node. + * Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions. + * This module is inspired by the `speak` function in wp-a11y.js * * @param {string} message The message to be announced by Assistive Technologies. * @param {string} ariaLive Optional. The politeness level for aria-live. Possible values: * polite or assertive. Default polite. + * + * @example + * ```js + * import { speak } from '@wordpress/a11y'; + * + * // For polite messages that shouldn't interrupt what screen readers are currently announcing. + * speak( 'The message you want to send to the ARIA live region' ); + * + * // For assertive messages that should interrupt what screen readers are currently announcing. + * speak( 'The message you want to send to the ARIA live region', 'assertive' ); + * ``` */ export const speak = function( message, ariaLive ) { // Clear previous messages to allow repeated strings being read out. diff --git a/packages/annotations/package.json b/packages/annotations/package.json index ebbc0b39ca84f..34c055841844f 100644 --- a/packages/annotations/package.json +++ b/packages/annotations/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/annotations", - "version": "1.0.8", + "version": "1.1.0", "description": "Annotate content in the Gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", @@ -11,7 +11,8 @@ "homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/annotations/README.md", "repository": { "type": "git", - "url": "https://github.com/WordPress/gutenberg.git" + "url": "https://github.com/WordPress/gutenberg.git", + "directory": "packages/annotations" }, "bugs": { "url": "https://github.com/WordPress/gutenberg/issues" diff --git a/packages/api-fetch/CHANGELOG.md b/packages/api-fetch/CHANGELOG.md index 1727529b88366..dc7dcdeb3defe 100644 --- a/packages/api-fetch/CHANGELOG.md +++ b/packages/api-fetch/CHANGELOG.md @@ -1,4 +1,4 @@ -## 3.0.0 (Unreleased) +## 3.0.0 (2019-03-06) ### Breaking Changes diff --git a/packages/api-fetch/package.json b/packages/api-fetch/package.json index 8f9b6568013a7..67f99e6907d7a 100644 --- a/packages/api-fetch/package.json +++ b/packages/api-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/api-fetch", - "version": "2.2.8", + "version": "3.0.0", "description": "Utility to make WordPress REST API requests.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", @@ -12,7 +12,8 @@ "homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/api-fetch/README.md", "repository": { "type": "git", - "url": "https://github.com/WordPress/gutenberg.git" + "url": "https://github.com/WordPress/gutenberg.git", + "directory": "packages/api-fetch" }, "bugs": { "url": "https://github.com/WordPress/gutenberg/issues" diff --git a/packages/autop/CHANGELOG.md b/packages/autop/CHANGELOG.md index 184ca54078a38..53373272a2459 100644 --- a/packages/autop/CHANGELOG.md +++ b/packages/autop/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.0.1 (Unreleased) +## 2.1.0 (2019-03-06) ### Bug Fix diff --git a/packages/autop/README.md b/packages/autop/README.md index 4aecd9cafa3de..ffb9168b63f20 100644 --- a/packages/autop/README.md +++ b/packages/autop/README.md @@ -12,23 +12,61 @@ npm install @wordpress/autop --save _This package assumes that your code will run in an **ES2015+** environment. If you're using an environment that has limited or no support for ES2015+ such as lower versions of IE then using [core-js](https://github.com/zloirock/core-js) or [@babel/polyfill](https://babeljs.io/docs/en/next/babel-polyfill) will add support for these methods. Learn more about it in [Babel docs](https://babeljs.io/docs/en/next/caveats)._ -### Usage +### API -Import the desired function(s) from `@wordpress/autop`: + + +#### autop + +[src/index.js#L129-L285](src/index.js#L129-L285) + +Replaces double line-breaks with paragraph elements. + +A group of regex replaces used to identify text formatted with newlines and +replace double line-breaks with HTML paragraph tags. The remaining line- +breaks after conversion become `
` tags, unless br is set to 'false'. + +**Usage** ```js -import { autop, removep } from '@wordpress/autop'; +import { autop } from '@wordpress/autop'; +autop( 'my text' ); // "

my text

" +``` + +**Parameters** + +- **text** `string`: The text which has to be formatted. +- **br** `boolean`: Optional. If set, will convert all remaining line- breaks after paragraphing. Default true. + +**Returns** + +`string`: Text which has been converted into paragraph tags. -autop( 'my text' ); -// "

my text

" +#### removep -removep( '

my text

' ); -// "my text" +[src/index.js#L303-L426](src/index.js#L303-L426) + +Replaces `

` tags with two line breaks. "Opposite" of autop(). + +Replaces `

` tags with two line breaks except where the `

` has attributes. +Unifies whitespace. Indents `

  • `, `
    ` and `
    ` for better readability. + +**Usage** + +```js +import { removep } from '@wordpress/autop'; +removep( '

    my text

    ' ); // "my text" ``` -### API Usage +**Parameters** + +- **html** `string`: The content from the editor. + +**Returns** + +`string`: The content with stripped paragraph tags. + -* `autop( text: string ): string` -* `removep( text: string ): string` +

    Code is Poetry.

    diff --git a/packages/autop/package.json b/packages/autop/package.json index 9735d5475aac5..4f1441ff2024f 100644 --- a/packages/autop/package.json +++ b/packages/autop/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/autop", - "version": "2.0.2", + "version": "2.1.0", "description": "WordPress's automatic paragraph functions `autop` and `removep`.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", @@ -11,7 +11,8 @@ "homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/autop/README.md", "repository": { "type": "git", - "url": "https://github.com/WordPress/gutenberg.git" + "url": "https://github.com/WordPress/gutenberg.git", + "directory": "packages/autop" }, "bugs": { "url": "https://github.com/WordPress/gutenberg/issues" diff --git a/packages/autop/src/index.js b/packages/autop/src/index.js index 916f56a4be5f2..809a66b412d69 100644 --- a/packages/autop/src/index.js +++ b/packages/autop/src/index.js @@ -117,6 +117,13 @@ function replaceInHtmlTags( haystack, replacePairs ) { * @param {string} text The text which has to be formatted. * @param {boolean} br Optional. If set, will convert all remaining line- * breaks after paragraphing. Default true. + * + * @example + *```js + * import { autop } from '@wordpress/autop'; + * autop( 'my text' ); // "

    my text

    " + * ``` + * * @return {string} Text which has been converted into paragraph tags. */ export function autop( text, br = true ) { @@ -284,6 +291,13 @@ export function autop( text, br = true ) { * Unifies whitespace. Indents `
  • `, `
    ` and `
    ` for better readability. * * @param {string} html The content from the editor. + * + * @example + * ```js + * import { removep } from '@wordpress/autop'; + * removep( '

    my text

    ' ); // "my text" + * ``` + * * @return {string} The content with stripped paragraph tags. */ export function removep( html ) { diff --git a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md index 33b89b5ae57b0..69c48331c9b90 100644 --- a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md +++ b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md @@ -1,3 +1,13 @@ +## 2.0.0 (2019-03-06) + +### Breaking Change + +- Stop using Babel transpilation internally and set node 8 as a minimal version required ([#13540](https://github.com/WordPress/gutenberg/pull/13540)). + +### Enhancement + +- Plugin skips now adding import JSX pragma when the scope variable is defined for all JSX elements ([#13809](https://github.com/WordPress/gutenberg/pull/13809)). + ## 1.1.0 (2018-09-05) ### New Feature diff --git a/packages/babel-plugin-import-jsx-pragma/README.md b/packages/babel-plugin-import-jsx-pragma/README.md index fc32f27a90204..85d7e69655455 100644 --- a/packages/babel-plugin-import-jsx-pragma/README.md +++ b/packages/babel-plugin-import-jsx-pragma/README.md @@ -4,7 +4,7 @@ Babel transform plugin for automatically injecting an import to be used as the p [JSX](https://reactjs.org/docs/jsx-in-depth.html) is merely a syntactic sugar for a function call, typically to `React.createElement` when used with [React](https://reactjs.org/). As such, it requires that the function referenced by this transform be within the scope of the file where the JSX occurs. In a typical React project, this means React must be imported in any file where JSX exists. -**Babel Plugin Import JSX Pragma** automates this process by introducing the necessary import automatically wherever JSX exists, allowing you to use JSX in your code without thinking to ensure the transformed function is within scope. +**Babel Plugin Import JSX Pragma** automates this process by introducing the necessary import automatically wherever JSX exists, allowing you to use JSX in your code without thinking to ensure the transformed function is within scope. It respects existing import statements, as well as scope variable declarations. ## Installation diff --git a/packages/babel-plugin-import-jsx-pragma/src/index.js b/packages/babel-plugin-import-jsx-pragma/index.js similarity index 66% rename from packages/babel-plugin-import-jsx-pragma/src/index.js rename to packages/babel-plugin-import-jsx-pragma/index.js index 89963e67d27e8..7953640c484ab 100644 --- a/packages/babel-plugin-import-jsx-pragma/src/index.js +++ b/packages/babel-plugin-import-jsx-pragma/index.js @@ -26,15 +26,12 @@ const DEFAULT_OPTIONS = { * * @return {Object} Babel transform plugin. */ -export default function( babel ) { +module.exports = function( babel ) { const { types: t } = babel; function getOptions( state ) { if ( ! state._options ) { - state._options = { - ...DEFAULT_OPTIONS, - ...state.opts, - }; + state._options = Object.assign( {}, DEFAULT_OPTIONS, state.opts ); } return state._options; @@ -43,35 +40,16 @@ export default function( babel ) { return { visitor: { JSXElement( path, state ) { - state.hasJSX = true; - }, - ImportDeclaration( path, state ) { - if ( state.hasImportedScopeVariable ) { + if ( state.hasUndeclaredScopeVariable ) { return; } - const { scopeVariable, isDefault } = getOptions( state ); - - // Test that at least one import specifier exists matching the - // scope variable name. The module source is not verified since - // we must avoid introducing a conflicting import name, even if - // the scope variable is referenced from a different source. - state.hasImportedScopeVariable = path.node.specifiers.some( ( specifier ) => { - switch ( specifier.type ) { - case 'ImportSpecifier': - return ( - ! isDefault && - specifier.imported.name === scopeVariable - ); - - case 'ImportDefaultSpecifier': - return isDefault; - } - } ); + const { scopeVariable } = getOptions( state ); + state.hasUndeclaredScopeVariable = ! path.scope.hasBinding( scopeVariable ); }, Program: { exit( path, state ) { - if ( ! state.hasJSX || state.hasImportedScopeVariable ) { + if ( ! state.hasUndeclaredScopeVariable ) { return; } @@ -99,4 +77,4 @@ export default function( babel ) { }, }, }; -} +}; diff --git a/packages/babel-plugin-import-jsx-pragma/package.json b/packages/babel-plugin-import-jsx-pragma/package.json index 7dac8d0786bfb..5b0126c4903bf 100644 --- a/packages/babel-plugin-import-jsx-pragma/package.json +++ b/packages/babel-plugin-import-jsx-pragma/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-import-jsx-pragma", - "version": "1.1.3", + "version": "2.0.0", "description": "Babel transform plugin for automatically injecting an import to be used as the pragma for the React JSX Transform plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", @@ -14,20 +14,19 @@ "homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/babel-plugin-import-jsx-pragma/README.md", "repository": { "type": "git", - "url": "https://github.com/WordPress/gutenberg.git" + "url": "https://github.com/WordPress/gutenberg.git", + "directory": "packages/babel-plugin-import-jsx-pragma" }, "bugs": { "url": "https://github.com/WordPress/gutenberg/issues" }, + "engines": { + "node": ">=8" + }, "files": [ - "build", - "build-module" + "index.js" ], - "main": "build/index.js", - "module": "build-module/index.js", - "dependencies": { - "@babel/runtime": "^7.3.1" - }, + "main": "index.js", "peerDependencies": { "@babel/core": "^7.0.0" }, diff --git a/packages/babel-plugin-import-jsx-pragma/test/index.js b/packages/babel-plugin-import-jsx-pragma/test/index.js index 800b75e9727d6..a10207a5d5563 100644 --- a/packages/babel-plugin-import-jsx-pragma/test/index.js +++ b/packages/babel-plugin-import-jsx-pragma/test/index.js @@ -6,7 +6,7 @@ import { transformSync } from '@babel/core'; /** * Internal dependencies */ -import plugin from '../src'; +import plugin from '../'; describe( 'babel-plugin-import-jsx-pragma', () => { function getTransformedCode( source, options = {} ) { @@ -35,11 +35,18 @@ describe( 'babel-plugin-import-jsx-pragma', () => { expect( string ).toBe( original ); } ); + it( 'does nothing if the scope variable is already defined', () => { + const original = 'const React = require("react");\n\nlet foo = ;'; + const string = getTransformedCode( original ); + + expect( string ).toBe( original ); + } ); + it( 'adds import for scope variable', () => { const original = 'let foo = ;'; const string = getTransformedCode( original ); - expect( string ).toBe( 'import React from "react";\nlet foo = ;' ); + expect( string ).toBe( 'import React from "react";\n' + original ); } ); it( 'allows options customization', () => { @@ -50,6 +57,35 @@ describe( 'babel-plugin-import-jsx-pragma', () => { isDefault: false, } ); - expect( string ).toBe( 'import { createElement } from "@wordpress/element";\nlet foo = ;' ); + expect( string ).toBe( 'import { createElement } from "@wordpress/element";\n' + original ); + } ); + + it( 'adds import for scope variable even when defined inside the local scope', () => { + const original = 'let foo = ;\n\nfunction local() {\n const createElement = wp.element.createElement;\n}'; + const string = getTransformedCode( original, { + scopeVariable: 'createElement', + source: '@wordpress/element', + isDefault: false, + } ); + + expect( string ).toBe( 'import { createElement } from "@wordpress/element";\n' + original ); + } ); + + it( 'does nothing if the outer scope variable is already defined when using custom options', () => { + const original = 'const {\n createElement\n} = wp.element;\nlet foo = ;'; + const string = getTransformedCode( original, { + scopeVariable: 'createElement', + } ); + + expect( string ).toBe( original ); + } ); + + it( 'does nothing if the inner scope variable is already defined when using custom options', () => { + const original = '(function () {\n const {\n createElement\n } = wp.element;\n let foo = ;\n})();'; + const string = getTransformedCode( original, { + scopeVariable: 'createElement', + } ); + + expect( string ).toBe( original ); } ); } ); diff --git a/packages/babel-plugin-makepot/CHANGELOG.md b/packages/babel-plugin-makepot/CHANGELOG.md index e48eeff4bca3e..e6518a0d859e4 100644 --- a/packages/babel-plugin-makepot/CHANGELOG.md +++ b/packages/babel-plugin-makepot/CHANGELOG.md @@ -1,4 +1,4 @@ -## v2.1.1 (Unreleased) +## v2.2.0 (2019-03-06) ### Bug Fix diff --git a/packages/babel-plugin-makepot/package.json b/packages/babel-plugin-makepot/package.json index 1dfd50b4c9984..973c4162a48dc 100644 --- a/packages/babel-plugin-makepot/package.json +++ b/packages/babel-plugin-makepot/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-makepot", - "version": "2.1.3", + "version": "3.0.0", "description": "WordPress Babel internationalization (i18n) plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", @@ -13,11 +13,15 @@ "homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/babel-plugin-makepot/README.md", "repository": { "type": "git", - "url": "https://github.com/WordPress/gutenberg.git" + "url": "https://github.com/WordPress/gutenberg.git", + "directory": "packages/babel-plugin-makepot" }, "bugs": { "url": "https://github.com/WordPress/gutenberg/issues" }, + "engines": { + "node": ">=8" + }, "files": [ "build", "build-module" diff --git a/packages/babel-preset-default/CHANGELOG.md b/packages/babel-preset-default/CHANGELOG.md index dc58eaec5c971..7ff815a2a7db0 100644 --- a/packages/babel-preset-default/CHANGELOG.md +++ b/packages/babel-preset-default/CHANGELOG.md @@ -1,6 +1,17 @@ +## 4.0.0 (2019-03-06) + +### Breaking Change + +- Removed `babel-core` dependency acting as Babel 7 bridge ([#13922](https://github.com/WordPress/gutenberg/pull/13922). Ensure all references to `babel-core` are replaced with `@babel/core` . +- Preset updated to include `@wordpress/babel-plugin-import-jsx-pragma` plugin integration ([#13540](https://github.com/WordPress/gutenberg/pull/13540)). + +### Bug Fix + +- The runtime transform no longer disables [the `regenerator` option](https://babeljs.io/docs/en/babel-plugin-transform-runtime#regenerator). This should resolve issues where a file generated using the preset would assume the presence of a `regeneratorRuntime` object in the global scope. While this is not considered a breaking change, you may be mindful to consider that with transformed output now explicitly importing the runtime regenerator, bundle sizes may increase if you do not otherwise mitigate the additional import by either (a) overriding the option in your own Babel configuration extensions or (b) redefining the resolved value of `@babel/runtime/regenerator` using a feature like [Webpack's `externals` option](https://webpack.js.org/configuration/externals/). + ## 3.0.0 (2018-09-30) -## Breaking Change +### Breaking Change - The configured `@babel/preset-env` preset will no longer pass `useBuiltIns: 'usage'` as an option. It is therefore expected that a polyfill serve in its place, if necessary. diff --git a/packages/babel-preset-default/index.js b/packages/babel-preset-default/index.js index a2bfedebe1b37..8a893ee9c5ea7 100644 --- a/packages/babel-preset-default/index.js +++ b/packages/babel-preset-default/index.js @@ -15,14 +15,20 @@ module.exports = function( api ) { ].filter( Boolean ), plugins: [ '@babel/plugin-proposal-object-rest-spread', + [ + '@wordpress/babel-plugin-import-jsx-pragma', + { + scopeVariable: 'createElement', + source: '@wordpress/element', + isDefault: false, + }, + ], [ '@babel/plugin-transform-react-jsx', { pragma: 'createElement', } ], '@babel/plugin-proposal-async-generator-functions', ! isTestEnv && [ '@babel/plugin-transform-runtime', { - corejs: false, // We polyfill so we don't need core-js. helpers: true, - regenerator: false, // We polyfill so we don't need regenerator. useESModules: false, } ], ].filter( Boolean ), diff --git a/packages/babel-preset-default/package.json b/packages/babel-preset-default/package.json index ae77d77c8768b..e3096fa847d45 100644 --- a/packages/babel-preset-default/package.json +++ b/packages/babel-preset-default/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-preset-default", - "version": "3.0.2", + "version": "4.0.0", "description": "Default Babel preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", @@ -13,7 +13,8 @@ "homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/babel-preset-default/README.md", "repository": { "type": "git", - "url": "https://github.com/WordPress/gutenberg.git" + "url": "https://github.com/WordPress/gutenberg.git", + "directory": "packages/babel-preset-default" }, "bugs": { "url": "https://github.com/WordPress/gutenberg/issues" @@ -21,6 +22,9 @@ "engines": { "node": ">=8" }, + "files": [ + "index.js" + ], "main": "index.js", "dependencies": { "@babel/core": "^7.2.2", @@ -30,8 +34,8 @@ "@babel/plugin-transform-runtime": "^7.2.0", "@babel/preset-env": "^7.3.1", "@babel/runtime": "^7.3.1", - "@wordpress/browserslist-config": "file:../browserslist-config", - "babel-core": "^7.0.0-bridge.0" + "@wordpress/babel-plugin-import-jsx-pragma": "file:../babel-plugin-import-jsx-pragma", + "@wordpress/browserslist-config": "file:../browserslist-config" }, "peerDependencies": { "@babel/core": "^7.0.0" diff --git a/packages/babel-preset-default/test/__snapshots__/index.js.snap b/packages/babel-preset-default/test/__snapshots__/index.js.snap index 5cf000511103d..ed8a87a05dbfe 100644 --- a/packages/babel-preset-default/test/__snapshots__/index.js.snap +++ b/packages/babel-preset-default/test/__snapshots__/index.js.snap @@ -2,6 +2,7 @@ exports[`Babel preset default transpilation works properly 1`] = ` "import _asyncToGenerator from \\"@babel/runtime/helpers/asyncToGenerator\\"; +import _regeneratorRuntime from \\"@babel/runtime/regenerator\\"; import _awaitAsyncGenerator from \\"@babel/runtime/helpers/awaitAsyncGenerator\\"; import _wrapAsyncGenerator from \\"@babel/runtime/helpers/wrapAsyncGenerator\\"; describe('Babel preset default', function () { @@ -12,8 +13,8 @@ describe('Babel preset default', function () { function _foo() { _foo = _wrapAsyncGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee() { - return regeneratorRuntime.wrap(function _callee$(_context) { + _regeneratorRuntime.mark(function _callee() { + return _regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -38,9 +39,9 @@ describe('Babel preset default', function () { /*#__PURE__*/ _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2() { + _regeneratorRuntime.mark(function _callee2() { var generator; - return regeneratorRuntime.wrap(function _callee2$(_context2) { + return _regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: diff --git a/packages/babel-preset-default/test/index.js b/packages/babel-preset-default/test/index.js index 7465ce2f73512..0be3197b9541c 100644 --- a/packages/babel-preset-default/test/index.js +++ b/packages/babel-preset-default/test/index.js @@ -3,7 +3,7 @@ */ import path from 'path'; import { readFileSync } from 'fs'; -import { transform } from 'babel-core'; +import { transform } from '@babel/core'; /** * Internal dependencies diff --git a/packages/blob/README.md b/packages/blob/README.md index d8f1b1b359aa4..c0aed95f3b17b 100644 --- a/packages/blob/README.md +++ b/packages/blob/README.md @@ -10,4 +10,65 @@ Install the module npm install @wordpress/blob --save ``` +## API + + + +### createBlobURL + +[src/index.js#L15-L21](src/index.js#L15-L21) + +Create a blob URL from a file. + +**Parameters** + +- **file** `File`: The file to create a blob URL for. + +**Returns** + +`string`: The blob URL. + +### getBlobByURL + +[src/index.js#L32-L34](src/index.js#L32-L34) + +Retrieve a file based on a blob URL. The file must have been created by +`createBlobURL` and not removed by `revokeBlobURL`, otherwise it will return +`undefined`. + +**Parameters** + +- **url** `string`: The blob URL. + +**Returns** + +`?File`: The file for the blob URL. + +### isBlobURL + +[src/index.js#L56-L61](src/index.js#L56-L61) + +Check whether a url is a blob url. + +**Parameters** + +- **url** `string`: The URL. + +**Returns** + +`boolean`: Is the url a blob url? + +### revokeBlobURL + +[src/index.js#L41-L47](src/index.js#L41-L47) + +Remove the resource and file cache from memory. + +**Parameters** + +- **url** `string`: The blob URL. + + + +

    Code is Poetry.

    diff --git a/packages/blob/package.json b/packages/blob/package.json index f8c08ee648276..a4032f11d80d5 100644 --- a/packages/blob/package.json +++ b/packages/blob/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blob", - "version": "2.1.0", + "version": "2.2.0", "description": "Blob utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", @@ -11,7 +11,8 @@ "homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/blob/README.md", "repository": { "type": "git", - "url": "https://github.com/WordPress/gutenberg.git" + "url": "https://github.com/WordPress/gutenberg.git", + "directory": "packages/blob" }, "bugs": { "url": "https://github.com/WordPress/gutenberg/issues" diff --git a/packages/block-editor/.npmrc b/packages/block-editor/.npmrc new file mode 100644 index 0000000000000..43c97e719a5a8 --- /dev/null +++ b/packages/block-editor/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/packages/block-editor/CHANGELOG.md b/packages/block-editor/CHANGELOG.md new file mode 100644 index 0000000000000..5c4cae61450ac --- /dev/null +++ b/packages/block-editor/CHANGELOG.md @@ -0,0 +1,5 @@ +## 1.0.0 (2019-03-06) + +### New Features + +- Initial version. diff --git a/packages/block-editor/README.md b/packages/block-editor/README.md new file mode 100644 index 0000000000000..b626857134ee3 --- /dev/null +++ b/packages/block-editor/README.md @@ -0,0 +1,486 @@ +# Block Editor + +Generic block editor module. + +## Installation + +Install the module + +```bash +npm install @wordpress/block-editor --save +``` + +_This package assumes that your code will run in an **ES2015+** environment. If you're using an environment that has limited or no support for ES2015+ such as lower versions of IE then using [core-js](https://github.com/zloirock/core-js) or [@babel/polyfill](https://babeljs.io/docs/en/next/babel-polyfill) will add support for these methods. Learn more about it in [Babel docs](https://babeljs.io/docs/en/next/caveats)._ + +## API + + + +### AlignmentToolbar + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### Autocomplete + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockAlignmentToolbar + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockControls + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockEdit + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockEditorKeyboardShortcuts + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockEditorProvider + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockFormatControls + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockIcon + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockInspector + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockList + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockMover + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockNavigationDropdown + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockSelectionClearer + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockSettingsMenu + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockTitle + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### BlockToolbar + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### ColorPalette + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### ContrastChecker + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### CopyHandler + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### createCustomColorsHOC + +[src/index.js#L16-L16](src/index.js#L16-L16) + +A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic +for class generation color value, retrieval and color attribute setting. + +Use this higher-order component to work with a custom set of colors. + +**Usage** + +```jsx +const CUSTOM_COLORS = [ { name: 'Red', slug: 'red', color: '#ff0000' }, { name: 'Blue', slug: 'blue', color: '#0000ff' } ]; +const withCustomColors = createCustomColorsHOC( CUSTOM_COLORS ); +// ... +export default compose( + withCustomColors( 'backgroundColor', 'borderColor' ), + MyColorfulComponent, +); +``` + +**Parameters** + +- **colorsArray** `Array`: The array of color objects (name, slug, color, etc... ). + +**Returns** + +`Function`: Higher-order component. + +### DefaultBlockAppender + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### FontSizePicker + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### getColorClassName + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Returns a class based on the context a color is being used and its slug. + +**Parameters** + +- **colorContextName** `string`: Context/place where color is being used e.g: background, text etc... +- **colorSlug** `string`: Slug of the color. + +**Returns** + +`string`: String with the class corresponding to the color in the provided context. + +### getColorObjectByAttributeValues + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Provided an array of color objects as set by the theme or by the editor defaults, +and the values of the defined color or custom color returns a color object describing the color. + +**Parameters** + +- **colors** `Array`: Array of color objects as set by the theme or by the editor defaults. +- **definedColor** `?string`: A string containing the color slug. +- **customColor** `?string`: A string containing the customColor value. + +**Returns** + +`?string`: If definedColor is passed and the name is found in colors, the color object exactly as set by the theme or editor defaults is returned. Otherwise, an object that just sets the color is defined. + +### getColorObjectByColorValue + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Provided an array of color objects as set by the theme or by the editor defaults, and a color value returns the color object matching that value or undefined. + +**Parameters** + +- **colors** `Array`: Array of color objects as set by the theme or by the editor defaults. +- **colorValue** `?string`: A string containing the color value. + +**Returns** + +`?string`: Returns the color object included in the colors array whose color property equals colorValue. Returns undefined if no color object matches this requirement. + +### getFontSize + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values. + If namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned. + +**Parameters** + +- **fontSizes** `Array`: Array of font size objects containing at least the "name" and "size" values as properties. +- **fontSizeAttribute** `?string`: Content of the font size attribute (slug). +- **customFontSizeAttribute** `?number`: Contents of the custom font size attribute (value). + +**Returns** + +`?string`: If fontSizeAttribute is set and an equal slug is found in fontSizes it returns the font size object for that slug. Otherwise, an object with just the size value based on customFontSize is returned. + +### getFontSizeClass + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Returns a class based on fontSizeName. + +**Parameters** + +- **fontSizeSlug** `string`: Slug of the fontSize. + +**Returns** + +`string`: String with the class corresponding to the fontSize passed. The class is generated by appending 'has-' followed by fontSizeSlug in kebabCase and ending with '-font-size'. + +### InnerBlocks + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### Inserter + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### InspectorAdvancedControls + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### InspectorControls + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### MediaPlaceholder + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### MediaUpload + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### MediaUploadCheck + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### MultiBlocksSwitcher + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### MultiSelectScrollIntoView + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### NavigableToolbar + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### ObserveTyping + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### PanelColorSettings + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### PlainText + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### PreserveScrollInReorder + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### RichText + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### RichTextShortcut + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### RichTextToolbarButton + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### SETTINGS_DEFAULTS + +[src/index.js#L18-L18](src/index.js#L18-L18) + +The default editor settings + + alignWide boolean Enable/Disable Wide/Full Alignments + availableLegacyWidgets Array Array of objects representing the legacy widgets available. + colors Array Palette colors + disableCustomColors boolean Whether or not the custom colors are disabled + fontSizes Array Available font sizes + disableCustomFontSizes boolean Whether or not the custom font sizes are disabled + imageSizes Array Available image sizes + maxWidth number Max width to constraint resizing + allowedBlockTypes boolean|Array Allowed block types + hasFixedToolbar boolean Whether or not the editor toolbar is fixed + hasPermissionsToManageWidgets boolean Whether or not the user is able to manage widgets. + focusMode boolean Whether the focus mode is enabled or not + styles Array Editor Styles + isRTL boolean Whether the editor is in RTL mode + bodyPlaceholder string Empty post placeholder + titlePlaceholder string Empty title placeholder + +### SkipToSelectedBlock + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### UnstableRichTextInputEvent + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### URLInput + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### URLInputButton + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### URLPopover + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### Warning + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### withColorContext + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### withColors + +[src/index.js#L16-L16](src/index.js#L16-L16) + +A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting. + +For use with the default editor/theme color palette. + +**Usage** + +```jsx +export default compose( + withColors( 'backgroundColor', { textColor: 'color' } ), + MyColorfulComponent, +); +``` + +**Parameters** + +- **colorTypes** `...(object|string)`: The arguments can be strings or objects. If the argument is an object, it should contain the color attribute name as key and the color context as value. If the argument is a string the value should be the color attribute name, the color context is computed by applying a kebab case transform to the value. Color context represents the context/place where the color is going to be used. The class name of the color is generated using 'has' followed by the color name and ending with the color context all in kebab case e.g: has-green-background-color. + +**Returns** + +`Function`: Higher-order component. + +### withFontSizes + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Higher-order component, which handles font size logic for class generation, +font size value retrieval, and font size change handling. + +**Parameters** + +- **args** `...(object|string)`: The arguments should all be strings Each string contains the font size attribute name e.g: 'fontSize'. + +**Returns** + +`Function`: Higher-order component. + +### WritingFlow + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### \_BlockSettingsMenuFirstItem + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + +### \_BlockSettingsMenuPluginsExtension + +[src/index.js#L16-L16](src/index.js#L16-L16) + +Undocumented declaration. + + + + +

    Code is Poetry.

    diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json new file mode 100644 index 0000000000000..b6f19c50b0f15 --- /dev/null +++ b/packages/block-editor/package.json @@ -0,0 +1,56 @@ +{ + "name": "@wordpress/block-editor", + "version": "1.0.0", + "description": "Generic block editor.", + "author": "The WordPress Contributors", + "license": "GPL-2.0-or-later", + "keywords": [ + "wordpress", + "editor", + "blocks" + ], + "homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/block-editor/README.md", + "repository": { + "type": "git", + "url": "https://github.com/WordPress/gutenberg.git", + "directory": "packages/block-editor" + }, + "bugs": { + "url": "https://github.com/WordPress/gutenberg/issues" + }, + "main": "build/index.js", + "module": "build-module/index.js", + "react-native": "src/index", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@wordpress/a11y": "file:../a11y", + "@wordpress/blob": "file:../blob", + "@wordpress/blocks": "file:../blocks", + "@wordpress/components": "file:../components", + "@wordpress/compose": "file:../compose", + "@wordpress/core-data": "file:../core-data", + "@wordpress/data": "file:../data", + "@wordpress/dom": "file:../dom", + "@wordpress/element": "file:../element", + "@wordpress/hooks": "file:../hooks", + "@wordpress/html-entities": "file:../html-entities", + "@wordpress/i18n": "file:../i18n", + "@wordpress/is-shallow-equal": "file:../is-shallow-equal", + "@wordpress/keycodes": "file:../keycodes", + "@wordpress/rich-text": "file:../rich-text", + "@wordpress/token-list": "file:../token-list", + "@wordpress/url": "file:../url", + "@wordpress/viewport": "file:../viewport", + "@wordpress/wordcount": "file:../wordcount", + "classnames": "^2.2.5", + "dom-scroll-into-view": "^1.2.1", + "lodash": "^4.17.10", + "redux-multi": "^0.1.12", + "refx": "^3.0.0", + "rememo": "^3.0.0", + "tinycolor2": "^1.4.1" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/editor/src/components/alignment-toolbar/index.js b/packages/block-editor/src/components/alignment-toolbar/index.js similarity index 93% rename from packages/editor/src/components/alignment-toolbar/index.js rename to packages/block-editor/src/components/alignment-toolbar/index.js index e06ee34f4d7d6..1124f44f033e1 100644 --- a/packages/editor/src/components/alignment-toolbar/index.js +++ b/packages/block-editor/src/components/alignment-toolbar/index.js @@ -69,10 +69,10 @@ export default compose( } ), withViewportMatch( { isLargeViewport: 'medium' } ), withSelect( ( select, { clientId, isLargeViewport, isCollapsed } ) => { - const { getBlockRootClientId, getEditorSettings } = select( 'core/editor' ); + const { getBlockRootClientId, getSettings } = select( 'core/block-editor' ); return { isCollapsed: isCollapsed || ! isLargeViewport || ( - ! getEditorSettings().hasFixedToolbar && + ! getSettings().hasFixedToolbar && getBlockRootClientId( clientId ) ), }; diff --git a/packages/editor/src/components/alignment-toolbar/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/alignment-toolbar/test/__snapshots__/index.js.snap similarity index 100% rename from packages/editor/src/components/alignment-toolbar/test/__snapshots__/index.js.snap rename to packages/block-editor/src/components/alignment-toolbar/test/__snapshots__/index.js.snap diff --git a/packages/editor/src/components/alignment-toolbar/test/index.js b/packages/block-editor/src/components/alignment-toolbar/test/index.js similarity index 100% rename from packages/editor/src/components/alignment-toolbar/test/index.js rename to packages/block-editor/src/components/alignment-toolbar/test/index.js diff --git a/packages/editor/src/components/autocomplete/README.md b/packages/block-editor/src/components/autocomplete/README.md similarity index 100% rename from packages/editor/src/components/autocomplete/README.md rename to packages/block-editor/src/components/autocomplete/README.md diff --git a/packages/editor/src/components/autocomplete/index.js b/packages/block-editor/src/components/autocomplete/index.js similarity index 100% rename from packages/editor/src/components/autocomplete/index.js rename to packages/block-editor/src/components/autocomplete/index.js diff --git a/packages/editor/src/components/autocomplete/test/index.js b/packages/block-editor/src/components/autocomplete/test/index.js similarity index 100% rename from packages/editor/src/components/autocomplete/test/index.js rename to packages/block-editor/src/components/autocomplete/test/index.js diff --git a/packages/editor/src/components/block-actions/index.js b/packages/block-editor/src/components/block-actions/index.js similarity index 90% rename from packages/editor/src/components/block-actions/index.js rename to packages/block-editor/src/components/block-actions/index.js index b90325b0affd5..3b3f8032432e8 100644 --- a/packages/editor/src/components/block-actions/index.js +++ b/packages/block-editor/src/components/block-actions/index.js @@ -35,7 +35,7 @@ export default compose( [ getBlocksByClientId, getTemplateLock, getBlockRootClientId, - } = select( 'core/editor' ); + } = select( 'core/block-editor' ); const blocks = getBlocksByClientId( props.clientIds ); const canDuplicate = every( blocks, ( block ) => { @@ -65,7 +65,7 @@ export default compose( [ multiSelect, removeBlocks, insertDefaultBlock, - } = dispatch( 'core/editor' ); + } = dispatch( 'core/block-editor' ); return { onDuplicate() { @@ -73,7 +73,7 @@ export default compose( [ return; } - const { getBlockIndex } = select( 'core/editor' ); + const { getBlockIndex } = select( 'core/block-editor' ); const lastSelectedIndex = getBlockIndex( last( castArray( clientIds ) ), rootClientId ); const clonedBlocks = blocks.map( ( block ) => cloneBlock( block ) ); insertBlocks( @@ -95,14 +95,14 @@ export default compose( [ }, onInsertBefore() { if ( ! isLocked ) { - const { getBlockIndex } = select( 'core/editor' ); + const { getBlockIndex } = select( 'core/block-editor' ); const firstSelectedIndex = getBlockIndex( first( castArray( clientIds ) ), rootClientId ); insertDefaultBlock( {}, rootClientId, firstSelectedIndex ); } }, onInsertAfter() { if ( ! isLocked ) { - const { getBlockIndex } = select( 'core/editor' ); + const { getBlockIndex } = select( 'core/block-editor' ); const lastSelectedIndex = getBlockIndex( last( castArray( clientIds ) ), rootClientId ); insertDefaultBlock( {}, rootClientId, lastSelectedIndex + 1 ); } diff --git a/packages/editor/src/components/block-alignment-toolbar/index.js b/packages/block-editor/src/components/block-alignment-toolbar/index.js similarity index 90% rename from packages/editor/src/components/block-alignment-toolbar/index.js rename to packages/block-editor/src/components/block-alignment-toolbar/index.js index acfe1cb4ed344..adf02cd90b08b 100644 --- a/packages/editor/src/components/block-alignment-toolbar/index.js +++ b/packages/block-editor/src/components/block-alignment-toolbar/index.js @@ -75,11 +75,12 @@ export default compose( } ), withViewportMatch( { isLargeViewport: 'medium' } ), withSelect( ( select, { clientId, isLargeViewport, isCollapsed } ) => { - const { getBlockRootClientId, getEditorSettings } = select( 'core/editor' ); + const { getBlockRootClientId, getSettings } = select( 'core/block-editor' ); + const settings = getSettings(); return { - wideControlsEnabled: select( 'core/editor' ).getEditorSettings().alignWide, + wideControlsEnabled: settings.alignWide, isCollapsed: isCollapsed || ! isLargeViewport || ( - ! getEditorSettings().hasFixedToolbar && + ! settings.hasFixedToolbar && getBlockRootClientId( clientId ) ), }; diff --git a/packages/editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap similarity index 100% rename from packages/editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap rename to packages/block-editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap diff --git a/packages/editor/src/components/block-alignment-toolbar/test/index.js b/packages/block-editor/src/components/block-alignment-toolbar/test/index.js similarity index 100% rename from packages/editor/src/components/block-alignment-toolbar/test/index.js rename to packages/block-editor/src/components/block-alignment-toolbar/test/index.js diff --git a/packages/editor/src/components/block-compare/README.md b/packages/block-editor/src/components/block-compare/README.md similarity index 100% rename from packages/editor/src/components/block-compare/README.md rename to packages/block-editor/src/components/block-compare/README.md diff --git a/packages/editor/src/components/block-compare/block-view.js b/packages/block-editor/src/components/block-compare/block-view.js similarity index 100% rename from packages/editor/src/components/block-compare/block-view.js rename to packages/block-editor/src/components/block-compare/block-view.js diff --git a/packages/editor/src/components/block-compare/index.js b/packages/block-editor/src/components/block-compare/index.js similarity index 100% rename from packages/editor/src/components/block-compare/index.js rename to packages/block-editor/src/components/block-compare/index.js diff --git a/packages/editor/src/components/block-compare/style.scss b/packages/block-editor/src/components/block-compare/style.scss similarity index 100% rename from packages/editor/src/components/block-compare/style.scss rename to packages/block-editor/src/components/block-compare/style.scss diff --git a/packages/editor/src/components/block-compare/test/__snapshots__/block-view.js.snap b/packages/block-editor/src/components/block-compare/test/__snapshots__/block-view.js.snap similarity index 100% rename from packages/editor/src/components/block-compare/test/__snapshots__/block-view.js.snap rename to packages/block-editor/src/components/block-compare/test/__snapshots__/block-view.js.snap diff --git a/packages/editor/src/components/block-compare/test/block-view.js b/packages/block-editor/src/components/block-compare/test/block-view.js similarity index 100% rename from packages/editor/src/components/block-compare/test/block-view.js rename to packages/block-editor/src/components/block-compare/test/block-view.js diff --git a/packages/editor/src/components/block-controls/index.js b/packages/block-editor/src/components/block-controls/index.js similarity index 100% rename from packages/editor/src/components/block-controls/index.js rename to packages/block-editor/src/components/block-controls/index.js diff --git a/packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap new file mode 100644 index 0000000000000..681c33a42d997 --- /dev/null +++ b/packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap @@ -0,0 +1,45 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`BlockControls should render a dynamic toolbar of controls 1`] = ` + + + +

    + Child +

    +
    +
    +
    +`; diff --git a/packages/editor/src/components/block-controls/test/index.js b/packages/block-editor/src/components/block-controls/test/index.js similarity index 54% rename from packages/editor/src/components/block-controls/test/index.js rename to packages/block-editor/src/components/block-controls/test/index.js index 1eee2fbf5af2a..f970dc030cadb 100644 --- a/packages/editor/src/components/block-controls/test/index.js +++ b/packages/block-editor/src/components/block-controls/test/index.js @@ -6,7 +6,8 @@ import { shallow } from 'enzyme'; /** * Internal dependencies */ -import { BlockControls } from '../'; +import BlockControls from '../'; +import BlockEdit from '../../block-edit'; describe( 'BlockControls', () => { const controls = [ @@ -27,9 +28,15 @@ describe( 'BlockControls', () => { }, ]; - // Skipped temporarily until Enzyme publishes new version that works with React 16.3.0 APIs. - // eslint-disable-next-line jest/no-disabled-tests - test.skip( 'Should render a dynamic toolbar of controls', () => { - expect( shallow( Child

    } /> ) ).toMatchSnapshot(); + it( 'should render a dynamic toolbar of controls', () => { + const wrapper = shallow( + + +

    Child

    +
    +
    + ); + + expect( wrapper ).toMatchSnapshot(); } ); } ); diff --git a/packages/editor/src/components/block-draggable/index.js b/packages/block-editor/src/components/block-draggable/index.js similarity index 91% rename from packages/editor/src/components/block-draggable/index.js rename to packages/block-editor/src/components/block-draggable/index.js index 2f7c3436819a1..8818d58be9c2d 100644 --- a/packages/editor/src/components/block-draggable/index.js +++ b/packages/block-editor/src/components/block-draggable/index.js @@ -32,7 +32,7 @@ const BlockDraggable = ( { children, clientId, rootClientId, blockElementId, ind }; export default withSelect( ( select, { clientId } ) => { - const { getBlockIndex, getBlockRootClientId } = select( 'core/editor' ); + const { getBlockIndex, getBlockRootClientId } = select( 'core/block-editor' ); const rootClientId = getBlockRootClientId( clientId ); return { index: getBlockIndex( clientId, rootClientId ), diff --git a/packages/editor/src/components/block-drop-zone/README.md b/packages/block-editor/src/components/block-drop-zone/README.md similarity index 100% rename from packages/editor/src/components/block-drop-zone/README.md rename to packages/block-editor/src/components/block-drop-zone/README.md diff --git a/packages/editor/src/components/block-drop-zone/index.js b/packages/block-editor/src/components/block-drop-zone/index.js similarity index 98% rename from packages/editor/src/components/block-drop-zone/index.js rename to packages/block-editor/src/components/block-drop-zone/index.js index f1c95a53242a6..4434a6c338a97 100644 --- a/packages/editor/src/components/block-drop-zone/index.js +++ b/packages/block-editor/src/components/block-drop-zone/index.js @@ -138,7 +138,7 @@ export default compose( insertBlocks, updateBlockAttributes, moveBlockToPosition, - } = dispatch( 'core/editor' ); + } = dispatch( 'core/block-editor' ); return { insertBlocks( blocks, index ) { @@ -156,7 +156,7 @@ export default compose( }; } ), withSelect( ( select, { rootClientId } ) => { - const { getClientIdsOfDescendants, getTemplateLock, getBlockIndex } = select( 'core/editor' ); + const { getClientIdsOfDescendants, getTemplateLock, getBlockIndex } = select( 'core/block-editor' ); return { isLocked: !! getTemplateLock( rootClientId ), getClientIdsOfDescendants, diff --git a/packages/editor/src/components/block-drop-zone/style.scss b/packages/block-editor/src/components/block-drop-zone/style.scss similarity index 100% rename from packages/editor/src/components/block-drop-zone/style.scss rename to packages/block-editor/src/components/block-drop-zone/style.scss diff --git a/packages/editor/src/components/block-edit/context.js b/packages/block-editor/src/components/block-edit/context.js similarity index 100% rename from packages/editor/src/components/block-edit/context.js rename to packages/block-editor/src/components/block-edit/context.js diff --git a/packages/editor/src/components/block-edit/edit.js b/packages/block-editor/src/components/block-edit/edit.js similarity index 100% rename from packages/editor/src/components/block-edit/edit.js rename to packages/block-editor/src/components/block-edit/edit.js diff --git a/packages/editor/src/components/block-edit/edit.native.js b/packages/block-editor/src/components/block-edit/edit.native.js similarity index 100% rename from packages/editor/src/components/block-edit/edit.native.js rename to packages/block-editor/src/components/block-edit/edit.native.js diff --git a/packages/editor/src/components/block-edit/index.js b/packages/block-editor/src/components/block-edit/index.js similarity index 100% rename from packages/editor/src/components/block-edit/index.js rename to packages/block-editor/src/components/block-edit/index.js diff --git a/packages/editor/src/components/block-edit/test/edit.js b/packages/block-editor/src/components/block-edit/test/edit.js similarity index 86% rename from packages/editor/src/components/block-edit/test/edit.js rename to packages/block-editor/src/components/block-edit/test/edit.js index 0f795fdd72503..d09ce608cc14b 100644 --- a/packages/editor/src/components/block-edit/test/edit.js +++ b/packages/block-editor/src/components/block-edit/test/edit.js @@ -42,7 +42,7 @@ describe( 'Edit', () => { const wrapper = shallow( ); - expect( wrapper.find( edit ) ).toExist(); + expect( wrapper.exists( edit ) ).toBe( true ); } ); it( 'should use save implementation of block as fallback', () => { @@ -55,7 +55,7 @@ describe( 'Edit', () => { const wrapper = shallow( ); - expect( wrapper.find( save ) ).toExist(); + expect( wrapper.exists( save ) ).toBe( true ); } ); it( 'should combine the default class name with a custom one', () => { @@ -74,6 +74,7 @@ describe( 'Edit', () => { ); - expect( wrapper.find( edit ) ).toHaveClassName( 'wp-block-test-block my-class' ); + expect( wrapper.find( edit ).hasClass( 'wp-block-test-block' ) ).toBe( true ); + expect( wrapper.find( edit ).hasClass( 'my-class' ) ).toBe( true ); } ); } ); diff --git a/packages/block-editor/src/components/block-editor-keyboard-shortcuts/index.js b/packages/block-editor/src/components/block-editor-keyboard-shortcuts/index.js new file mode 100644 index 0000000000000..4e97184cd93f9 --- /dev/null +++ b/packages/block-editor/src/components/block-editor-keyboard-shortcuts/index.js @@ -0,0 +1,158 @@ +/** + * External dependencies + */ +import { first, last, some, flow } from 'lodash'; + +/** + * WordPress dependencies + */ +import { Component, Fragment } from '@wordpress/element'; +import { KeyboardShortcuts } from '@wordpress/components'; +import { withSelect, withDispatch } from '@wordpress/data'; +import { rawShortcut, displayShortcut } from '@wordpress/keycodes'; +import { compose } from '@wordpress/compose'; + +/** + * Internal dependencies + */ +import BlockActions from '../block-actions'; + +const preventDefault = ( event ) => { + event.preventDefault(); + return event; +}; + +export const shortcuts = { + duplicate: { + raw: rawShortcut.primaryShift( 'd' ), + display: displayShortcut.primaryShift( 'd' ), + }, + removeBlock: { + raw: rawShortcut.access( 'z' ), + display: displayShortcut.access( 'z' ), + }, + insertBefore: { + raw: rawShortcut.primaryAlt( 't' ), + display: displayShortcut.primaryAlt( 't' ), + }, + insertAfter: { + raw: rawShortcut.primaryAlt( 'y' ), + display: displayShortcut.primaryAlt( 'y' ), + }, +}; + +class BlockEditorKeyboardShortcuts extends Component { + constructor() { + super( ...arguments ); + + this.selectAll = this.selectAll.bind( this ); + this.deleteSelectedBlocks = this.deleteSelectedBlocks.bind( this ); + this.clearMultiSelection = this.clearMultiSelection.bind( this ); + } + + selectAll( event ) { + const { rootBlocksClientIds, onMultiSelect } = this.props; + event.preventDefault(); + onMultiSelect( first( rootBlocksClientIds ), last( rootBlocksClientIds ) ); + } + + deleteSelectedBlocks( event ) { + const { selectedBlockClientIds, hasMultiSelection, onRemove, isLocked } = this.props; + if ( hasMultiSelection ) { + event.preventDefault(); + if ( ! isLocked ) { + onRemove( selectedBlockClientIds ); + } + } + } + + /** + * Clears current multi-selection, if one exists. + */ + clearMultiSelection() { + const { hasMultiSelection, clearSelectedBlock } = this.props; + if ( hasMultiSelection ) { + clearSelectedBlock(); + window.getSelection().removeAllRanges(); + } + } + + render() { + const { selectedBlockClientIds } = this.props; + return ( + + + { selectedBlockClientIds.length > 0 && ( + + { ( { onDuplicate, onRemove, onInsertAfter, onInsertBefore } ) => ( + + ) } + + ) } + + ); + } +} + +export default compose( [ + withSelect( ( select ) => { + const { + getBlockOrder, + getMultiSelectedBlockClientIds, + hasMultiSelection, + getBlockRootClientId, + getTemplateLock, + getSelectedBlockClientId, + } = select( 'core/block-editor' ); + const selectedBlockClientId = getSelectedBlockClientId(); + const selectedBlockClientIds = selectedBlockClientId ? [ selectedBlockClientId ] : getMultiSelectedBlockClientIds(); + + return { + rootBlocksClientIds: getBlockOrder(), + hasMultiSelection: hasMultiSelection(), + isLocked: some( + selectedBlockClientIds, + ( clientId ) => !! getTemplateLock( getBlockRootClientId( clientId ) ) + ), + selectedBlockClientIds, + }; + } ), + withDispatch( ( dispatch ) => { + const { + clearSelectedBlock, + multiSelect, + removeBlocks, + } = dispatch( 'core/block-editor' ); + + return { + clearSelectedBlock, + onMultiSelect: multiSelect, + onRemove: removeBlocks, + }; + } ), +] )( BlockEditorKeyboardShortcuts ); diff --git a/packages/editor/src/components/block-format-controls/index.js b/packages/block-editor/src/components/block-format-controls/index.js similarity index 100% rename from packages/editor/src/components/block-format-controls/index.js rename to packages/block-editor/src/components/block-format-controls/index.js diff --git a/packages/editor/src/components/block-icon/index.js b/packages/block-editor/src/components/block-icon/index.js similarity index 100% rename from packages/editor/src/components/block-icon/index.js rename to packages/block-editor/src/components/block-icon/index.js diff --git a/packages/editor/src/components/block-icon/style.scss b/packages/block-editor/src/components/block-icon/style.scss similarity index 100% rename from packages/editor/src/components/block-icon/style.scss rename to packages/block-editor/src/components/block-icon/style.scss diff --git a/packages/editor/src/components/block-icon/test/index.js b/packages/block-editor/src/components/block-icon/test/index.js similarity index 100% rename from packages/editor/src/components/block-icon/test/index.js rename to packages/block-editor/src/components/block-icon/test/index.js diff --git a/packages/editor/src/components/block-inspector/index.js b/packages/block-editor/src/components/block-inspector/index.js similarity index 98% rename from packages/editor/src/components/block-inspector/index.js rename to packages/block-editor/src/components/block-inspector/index.js index ee2405a3bac14..f7cca99eb5af4 100644 --- a/packages/editor/src/components/block-inspector/index.js +++ b/packages/block-editor/src/components/block-inspector/index.js @@ -79,7 +79,7 @@ const BlockInspector = ( { selectedBlockClientId, selectedBlockName, blockType, export default withSelect( ( select ) => { - const { getSelectedBlockClientId, getSelectedBlockCount, getBlockName } = select( 'core/editor' ); + const { getSelectedBlockClientId, getSelectedBlockCount, getBlockName } = select( 'core/block-editor' ); const { getBlockStyles } = select( 'core/blocks' ); const selectedBlockClientId = getSelectedBlockClientId(); const selectedBlockName = selectedBlockClientId && getBlockName( selectedBlockClientId ); diff --git a/packages/editor/src/components/block-inspector/style.scss b/packages/block-editor/src/components/block-inspector/style.scss similarity index 100% rename from packages/editor/src/components/block-inspector/style.scss rename to packages/block-editor/src/components/block-inspector/style.scss diff --git a/packages/editor/src/components/block-list-appender/index.js b/packages/block-editor/src/components/block-list-appender/index.js similarity index 97% rename from packages/editor/src/components/block-list-appender/index.js rename to packages/block-editor/src/components/block-list-appender/index.js index 21ac587e42cd6..5af9c48a66f04 100644 --- a/packages/editor/src/components/block-list-appender/index.js +++ b/packages/block-editor/src/components/block-list-appender/index.js @@ -65,7 +65,7 @@ export default withSelect( ( select, { rootClientId } ) => { getBlockOrder, canInsertBlockType, getTemplateLock, - } = select( 'core/editor' ); + } = select( 'core/block-editor' ); return { isLocked: !! getTemplateLock( rootClientId ), diff --git a/packages/editor/src/components/block-list-appender/style.scss b/packages/block-editor/src/components/block-list-appender/style.scss similarity index 100% rename from packages/editor/src/components/block-list-appender/style.scss rename to packages/block-editor/src/components/block-list-appender/style.scss diff --git a/packages/editor/src/components/block-list/block-contextual-toolbar.js b/packages/block-editor/src/components/block-list/block-contextual-toolbar.js similarity index 100% rename from packages/editor/src/components/block-list/block-contextual-toolbar.js rename to packages/block-editor/src/components/block-list/block-contextual-toolbar.js diff --git a/packages/editor/src/components/block-list/block-crash-boundary.js b/packages/block-editor/src/components/block-list/block-crash-boundary.js similarity index 100% rename from packages/editor/src/components/block-list/block-crash-boundary.js rename to packages/block-editor/src/components/block-list/block-crash-boundary.js diff --git a/packages/editor/src/components/block-list/block-crash-warning.js b/packages/block-editor/src/components/block-list/block-crash-warning.js similarity index 100% rename from packages/editor/src/components/block-list/block-crash-warning.js rename to packages/block-editor/src/components/block-list/block-crash-warning.js diff --git a/packages/editor/src/components/block-list/block-html.js b/packages/block-editor/src/components/block-list/block-html.js similarity index 92% rename from packages/editor/src/components/block-list/block-html.js rename to packages/block-editor/src/components/block-list/block-html.js index fc7b3da86ef08..9ec13410b367a 100644 --- a/packages/editor/src/components/block-list/block-html.js +++ b/packages/block-editor/src/components/block-list/block-html.js @@ -67,11 +67,11 @@ export class BlockHTML extends Component { export default compose( [ withSelect( ( select, ownProps ) => ( { - block: select( 'core/editor' ).getBlock( ownProps.clientId ), + block: select( 'core/block-editor' ).getBlock( ownProps.clientId ), } ) ), withDispatch( ( dispatch ) => ( { onChange( clientId, attributes, originalContent, isValid ) { - dispatch( 'core/editor' ).updateBlock( clientId, { attributes, originalContent, isValid } ); + dispatch( 'core/block-editor' ).updateBlock( clientId, { attributes, originalContent, isValid } ); }, } ) ), ] )( BlockHTML ); diff --git a/packages/editor/src/components/block-list/block-invalid-warning.js b/packages/block-editor/src/components/block-list/block-invalid-warning.js similarity index 96% rename from packages/editor/src/components/block-list/block-invalid-warning.js rename to packages/block-editor/src/components/block-list/block-invalid-warning.js index 265e36c78a2e8..7d9efe1693523 100644 --- a/packages/editor/src/components/block-list/block-invalid-warning.js +++ b/packages/block-editor/src/components/block-list/block-invalid-warning.js @@ -101,10 +101,10 @@ const recoverBlock = ( { name, attributes, innerBlocks } ) => createBlock( name, export default compose( [ withSelect( ( select, { clientId } ) => ( { - block: select( 'core/editor' ).getBlock( clientId ), + block: select( 'core/block-editor' ).getBlock( clientId ), } ) ), withDispatch( ( dispatch, { block } ) => { - const { replaceBlock } = dispatch( 'core/editor' ); + const { replaceBlock } = dispatch( 'core/block-editor' ); return { convertToClassic() { diff --git a/packages/editor/src/components/block-list/block-mobile-toolbar.js b/packages/block-editor/src/components/block-list/block-mobile-toolbar.js similarity index 100% rename from packages/editor/src/components/block-list/block-mobile-toolbar.js rename to packages/block-editor/src/components/block-list/block-mobile-toolbar.js diff --git a/packages/editor/src/components/block-list/block.js b/packages/block-editor/src/components/block-list/block.js similarity index 97% rename from packages/editor/src/components/block-list/block.js rename to packages/block-editor/src/components/block-list/block.js index fc79575258011..2b828a34cdd93 100644 --- a/packages/editor/src/components/block-list/block.js +++ b/packages/block-editor/src/components/block-list/block.js @@ -633,14 +633,14 @@ const applyWithSelect = withSelect( getBlockMode, isSelectionEnabled, getSelectedBlocksInitialCaretPosition, - getEditorSettings, + getSettings, hasSelectedInnerBlock, getTemplateLock, __unstableGetBlockWithoutInnerBlocks, - } = select( 'core/editor' ); + } = select( 'core/block-editor' ); const block = __unstableGetBlockWithoutInnerBlocks( clientId ); const isSelected = isBlockSelected( clientId ); - const { hasFixedToolbar, focusMode } = getEditorSettings(); + const { hasFixedToolbar, focusMode } = getSettings(); const templateLock = getTemplateLock( rootClientId ); const isParentOfSelectedBlock = hasSelectedInnerBlock( clientId, true ); @@ -683,7 +683,6 @@ const applyWithSelect = withSelect( ); const applyWithDispatch = withDispatch( ( dispatch, ownProps, { select } ) => { - const { getBlockSelectionStart } = select( 'core/editor' ); const { updateBlockAttributes, selectBlock, @@ -693,9 +692,8 @@ const applyWithDispatch = withDispatch( ( dispatch, ownProps, { select } ) => { removeBlock, mergeBlocks, replaceBlocks, - editPost, toggleSelection, - } = dispatch( 'core/editor' ); + } = dispatch( 'core/block-editor' ); return { onChange( clientId, attributes ) { @@ -712,7 +710,7 @@ const applyWithDispatch = withDispatch( ( dispatch, ownProps, { select } ) => { const { clientId, rootClientId } = ownProps; const { getBlockIndex, - } = select( 'core/editor' ); + } = select( 'core/block-editor' ); const index = getBlockIndex( clientId, rootClientId ); insertDefaultBlock( {}, rootClientId, index + 1 ); }, @@ -720,7 +718,7 @@ const applyWithDispatch = withDispatch( ( dispatch, ownProps, { select } ) => { const { clientId, rootClientId } = ownProps; const { getBlockIndex, - } = select( 'core/editor' ); + } = select( 'core/block-editor' ); const index = getBlockIndex( clientId, rootClientId ); insertBlocks( blocks, index + 1, rootClientId ); }, @@ -732,7 +730,7 @@ const applyWithDispatch = withDispatch( ( dispatch, ownProps, { select } ) => { const { getPreviousBlockClientId, getNextBlockClientId, - } = select( 'core/editor' ); + } = select( 'core/block-editor' ); if ( forward ) { const nextBlockClientId = getNextBlockClientId( clientId ); @@ -749,14 +747,20 @@ const applyWithDispatch = withDispatch( ( dispatch, ownProps, { select } ) => { onReplace( blocks ) { replaceBlocks( [ ownProps.clientId ], blocks ); }, - onMetaChange( meta ) { - editPost( { meta } ); + onMetaChange( updatedMeta ) { + const { getSettings } = select( 'core/block-editor' ); + const onChangeMeta = getSettings().__experimentalMetaSource.onChange; + onChangeMeta( updatedMeta ); }, onShiftSelection() { if ( ! ownProps.isSelectionEnabled ) { return; } + const { + getBlockSelectionStart, + } = select( 'core/block-editor' ); + if ( getBlockSelectionStart() ) { multiSelect( getBlockSelectionStart(), ownProps.clientId ); } else { diff --git a/packages/editor/src/components/block-list/breadcrumb.js b/packages/block-editor/src/components/block-list/breadcrumb.js similarity index 96% rename from packages/editor/src/components/block-list/breadcrumb.js rename to packages/block-editor/src/components/block-list/breadcrumb.js index ca14b1d346c94..544ef992daf1f 100644 --- a/packages/editor/src/components/block-list/breadcrumb.js +++ b/packages/block-editor/src/components/block-list/breadcrumb.js @@ -68,7 +68,7 @@ export class BlockBreadcrumb extends Component { export default compose( [ withSelect( ( select, ownProps ) => { - const { getBlockRootClientId } = select( 'core/editor' ); + const { getBlockRootClientId } = select( 'core/block-editor' ); const { clientId } = ownProps; return { diff --git a/packages/editor/src/components/block-list/hover-area.js b/packages/block-editor/src/components/block-list/hover-area.js similarity index 96% rename from packages/editor/src/components/block-list/hover-area.js rename to packages/block-editor/src/components/block-list/hover-area.js index ff0a16144b4f0..a79b0bcd9b088 100644 --- a/packages/editor/src/components/block-list/hover-area.js +++ b/packages/block-editor/src/components/block-list/hover-area.js @@ -76,7 +76,7 @@ class HoverArea extends Component { export default withSelect( ( select ) => { return { - isRTL: select( 'core/editor' ).getEditorSettings().isRTL, + isRTL: select( 'core/block-editor' ).getSettings().isRTL, }; } )( HoverArea ); diff --git a/packages/editor/src/components/block-list/index.js b/packages/block-editor/src/components/block-list/index.js similarity index 99% rename from packages/editor/src/components/block-list/index.js rename to packages/block-editor/src/components/block-list/index.js index 6ab8cd3956239..cc998be715c68 100644 --- a/packages/editor/src/components/block-list/index.js +++ b/packages/block-editor/src/components/block-list/index.js @@ -243,7 +243,7 @@ export default compose( [ getSelectedBlockClientId, getMultiSelectedBlockClientIds, hasMultiSelection, - } = select( 'core/editor' ); + } = select( 'core/block-editor' ); const { rootClientId } = ownProps; return { @@ -262,7 +262,7 @@ export default compose( [ startMultiSelect, stopMultiSelect, multiSelect, - } = dispatch( 'core/editor' ); + } = dispatch( 'core/block-editor' ); return { onStartMultiSelect: startMultiSelect, diff --git a/packages/editor/src/components/block-list/insertion-point.js b/packages/block-editor/src/components/block-list/insertion-point.js similarity index 98% rename from packages/editor/src/components/block-list/insertion-point.js rename to packages/block-editor/src/components/block-list/insertion-point.js index f44f4b69d86e7..b0c7b5b270f16 100644 --- a/packages/editor/src/components/block-list/insertion-point.js +++ b/packages/block-editor/src/components/block-list/insertion-point.js @@ -85,7 +85,7 @@ export default withSelect( ( select, { clientId, rootClientId } ) => { getBlockIndex, getBlockInsertionPoint, isBlockInsertionPointVisible, - } = select( 'core/editor' ); + } = select( 'core/block-editor' ); const blockIndex = getBlockIndex( clientId, rootClientId ); const insertionPoint = getBlockInsertionPoint(); const showInsertionPoint = ( diff --git a/packages/editor/src/components/block-list/multi-controls.js b/packages/block-editor/src/components/block-list/multi-controls.js similarity index 96% rename from packages/editor/src/components/block-list/multi-controls.js rename to packages/block-editor/src/components/block-list/multi-controls.js index d00afc5a6af6d..5fb34625389ee 100644 --- a/packages/editor/src/components/block-list/multi-controls.js +++ b/packages/block-editor/src/components/block-list/multi-controls.js @@ -41,7 +41,7 @@ export default withSelect( ( select, { clientId } ) => { isMultiSelecting, getBlockIndex, getBlockCount, - } = select( 'core/editor' ); + } = select( 'core/block-editor' ); const clientIds = getMultiSelectedBlockClientIds(); const firstIndex = getBlockIndex( first( clientIds ), clientId ); const lastIndex = getBlockIndex( last( clientIds ), clientId ); diff --git a/packages/editor/src/components/block-list/style.scss b/packages/block-editor/src/components/block-list/style.scss similarity index 100% rename from packages/editor/src/components/block-list/style.scss rename to packages/block-editor/src/components/block-list/style.scss diff --git a/packages/editor/src/components/block-list/test/block-html.js b/packages/block-editor/src/components/block-list/test/block-html.js similarity index 100% rename from packages/editor/src/components/block-list/test/block-html.js rename to packages/block-editor/src/components/block-list/test/block-html.js diff --git a/packages/editor/src/components/block-mover/drag-handle.js b/packages/block-editor/src/components/block-mover/drag-handle.js similarity index 100% rename from packages/editor/src/components/block-mover/drag-handle.js rename to packages/block-editor/src/components/block-mover/drag-handle.js diff --git a/packages/editor/src/components/block-mover/icons.js b/packages/block-editor/src/components/block-mover/icons.js similarity index 100% rename from packages/editor/src/components/block-mover/icons.js rename to packages/block-editor/src/components/block-mover/icons.js diff --git a/packages/editor/src/components/block-mover/index.js b/packages/block-editor/src/components/block-mover/index.js similarity index 97% rename from packages/editor/src/components/block-mover/index.js rename to packages/block-editor/src/components/block-mover/index.js index 1996740feb40a..0ea8166cc279c 100644 --- a/packages/editor/src/components/block-mover/index.js +++ b/packages/block-editor/src/components/block-mover/index.js @@ -117,7 +117,7 @@ export class BlockMover extends Component { export default compose( withSelect( ( select, { clientIds } ) => { - const { getBlock, getBlockIndex, getTemplateLock, getBlockRootClientId } = select( 'core/editor' ); + const { getBlock, getBlockIndex, getTemplateLock, getBlockRootClientId } = select( 'core/block-editor' ); const firstClientId = first( castArray( clientIds ) ); const block = getBlock( firstClientId ); const rootClientId = getBlockRootClientId( first( castArray( clientIds ) ) ); @@ -130,7 +130,7 @@ export default compose( }; } ), withDispatch( ( dispatch, { clientIds, rootClientId } ) => { - const { moveBlocksDown, moveBlocksUp } = dispatch( 'core/editor' ); + const { moveBlocksDown, moveBlocksUp } = dispatch( 'core/block-editor' ); return { onMoveDown: partial( moveBlocksDown, clientIds, rootClientId ), onMoveUp: partial( moveBlocksUp, clientIds, rootClientId ), diff --git a/packages/editor/src/components/block-mover/mover-description.js b/packages/block-editor/src/components/block-mover/mover-description.js similarity index 100% rename from packages/editor/src/components/block-mover/mover-description.js rename to packages/block-editor/src/components/block-mover/mover-description.js diff --git a/packages/editor/src/components/block-mover/style.scss b/packages/block-editor/src/components/block-mover/style.scss similarity index 95% rename from packages/editor/src/components/block-mover/style.scss rename to packages/block-editor/src/components/block-mover/style.scss index 39a908806ad5b..be9ddeab9c1b1 100644 --- a/packages/editor/src/components/block-mover/style.scss +++ b/packages/block-editor/src/components/block-mover/style.scss @@ -43,7 +43,8 @@ } // Nested movers have a background, so don't invert the colors there. - .is-dark-theme .wp-block .wp-block & { + .is-dark-theme .wp-block .wp-block &, + .wp-block .is-dark-theme .wp-block & { color: $dark-opacity-300; } @@ -79,7 +80,8 @@ } // Nested movers have a background, so don't invert the colors there. - .is-dark-theme .wp-block .wp-block & { + .is-dark-theme .wp-block .wp-block &, + .wp-block .is-dark-theme .wp-block & { color: $dark-opacity-500; } } diff --git a/packages/editor/src/components/block-mover/test/index.js b/packages/block-editor/src/components/block-mover/test/index.js similarity index 97% rename from packages/editor/src/components/block-mover/test/index.js rename to packages/block-editor/src/components/block-mover/test/index.js index ea13280f4d311..ffb4ef6ab8198 100644 --- a/packages/editor/src/components/block-mover/test/index.js +++ b/packages/block-editor/src/components/block-mover/test/index.js @@ -37,9 +37,9 @@ describe( 'BlockMover', () => { const moveDown = blockMover.childAt( 2 ); const moveUpDesc = blockMover.childAt( 3 ); const moveDownDesc = blockMover.childAt( 4 ); - expect( moveUp.type().name ).toBe( 'IconButton' ); + expect( moveUp.name() ).toBe( 'ForwardRef(IconButton)' ); expect( drag.type().name ).toBe( 'IconDragHandle' ); - expect( moveDown.type().name ).toBe( 'IconButton' ); + expect( moveDown.name() ).toBe( 'ForwardRef(IconButton)' ); expect( moveUp.props() ).toMatchObject( { className: 'editor-block-mover__control', onClick: undefined, diff --git a/packages/editor/src/components/block-mover/test/mover-description.js b/packages/block-editor/src/components/block-mover/test/mover-description.js similarity index 100% rename from packages/editor/src/components/block-mover/test/mover-description.js rename to packages/block-editor/src/components/block-mover/test/mover-description.js diff --git a/packages/editor/src/components/block-navigation/dropdown.js b/packages/block-editor/src/components/block-navigation/dropdown.js similarity index 77% rename from packages/editor/src/components/block-navigation/dropdown.js rename to packages/block-editor/src/components/block-navigation/dropdown.js index bfcb5f3f0e2d3..35db5d9b2d1f2 100644 --- a/packages/editor/src/components/block-navigation/dropdown.js +++ b/packages/block-editor/src/components/block-navigation/dropdown.js @@ -18,12 +18,14 @@ const MenuIcon = ( ); -function BlockNavigationDropdown( { hasBlocks, isTextModeEnabled } ) { +function BlockNavigationDropdown( { hasBlocks, isDisabled } ) { + const isEnabled = hasBlocks && ! isDisabled; + return ( ( - { hasBlocks && ! isTextModeEnabled && ) } @@ -50,7 +52,6 @@ function BlockNavigationDropdown( { hasBlocks, isTextModeEnabled } ) { export default withSelect( ( select ) => { return { - hasBlocks: !! select( 'core/editor' ).getBlockCount(), - isTextModeEnabled: select( 'core/edit-post' ).getEditorMode() === 'text', + hasBlocks: !! select( 'core/block-editor' ).getBlockCount(), }; } )( BlockNavigationDropdown ); diff --git a/packages/editor/src/components/block-navigation/index.js b/packages/block-editor/src/components/block-navigation/index.js similarity index 94% rename from packages/editor/src/components/block-navigation/index.js rename to packages/block-editor/src/components/block-navigation/index.js index 98a55c38af7d7..be7206d6cac0e 100644 --- a/packages/editor/src/components/block-navigation/index.js +++ b/packages/block-editor/src/components/block-navigation/index.js @@ -40,10 +40,9 @@ function BlockNavigationList( {
    - -
    -
    - -
    - - -`; diff --git a/packages/block-library/src/audio/test/index.js b/packages/block-library/src/audio/test/index.js deleted file mode 100644 index a5611a3dd8ce6..0000000000000 --- a/packages/block-library/src/audio/test/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Internal dependencies - */ -import { name, settings } from '../'; -import { blockEditRender } from '../../test/helpers'; - -describe( 'core/audio', () => { - test( 'block edit matches snapshot', () => { - const wrapper = blockEditRender( name, settings ); - - expect( wrapper ).toMatchSnapshot(); - } ); -} ); diff --git a/packages/block-library/src/block/edit.js b/packages/block-library/src/block/edit.js index 62e4acf0640d1..722aad97c9bfc 100644 --- a/packages/block-library/src/block/edit.js +++ b/packages/block-library/src/block/edit.js @@ -10,7 +10,7 @@ import { Component, Fragment } from '@wordpress/element'; import { Placeholder, Spinner, Disabled } from '@wordpress/components'; import { withSelect, withDispatch } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; -import { BlockEdit } from '@wordpress/editor'; +import { BlockEdit } from '@wordpress/block-editor'; import { compose } from '@wordpress/compose'; /** @@ -150,10 +150,11 @@ export default compose( [ __experimentalGetReusableBlock: getReusableBlock, __experimentalIsFetchingReusableBlock: isFetchingReusableBlock, __experimentalIsSavingReusableBlock: isSavingReusableBlock, - getBlock, } = select( 'core/editor' ); const { canUser } = select( 'core' ); - + const { + getBlock, + } = select( 'core/block-editor' ); const { ref } = ownProps.attributes; const reusableBlock = getReusableBlock( ref ); @@ -168,10 +169,12 @@ export default compose( [ withDispatch( ( dispatch, ownProps ) => { const { __experimentalFetchReusableBlocks: fetchReusableBlocks, - updateBlockAttributes, __experimentalUpdateReusableBlockTitle: updateReusableBlockTitle, __experimentalSaveReusableBlock: saveReusableBlock, } = dispatch( 'core/editor' ); + const { + updateBlockAttributes, + } = dispatch( 'core/block-editor' ); const { ref } = ownProps.attributes; return { diff --git a/packages/block-library/src/button/edit.js b/packages/block-library/src/button/edit.js index 860d6a1fb64b6..1cf0c1e43d049 100644 --- a/packages/block-library/src/button/edit.js +++ b/packages/block-library/src/button/edit.js @@ -24,7 +24,7 @@ import { InspectorControls, withColors, PanelColorSettings, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; const { getComputedStyle } = window; diff --git a/packages/block-library/src/button/index.js b/packages/block-library/src/button/index.js index cbc60718bb716..d736c954b9982 100644 --- a/packages/block-library/src/button/index.js +++ b/packages/block-library/src/button/index.js @@ -12,7 +12,7 @@ import { __, _x } from '@wordpress/i18n'; import { RichText, getColorClassName, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; /** * Internal dependencies diff --git a/packages/block-library/src/button/test/__snapshots__/index.js.snap b/packages/block-library/src/button/test/__snapshots__/index.js.snap deleted file mode 100644 index fec3d15878b50..0000000000000 --- a/packages/block-library/src/button/test/__snapshots__/index.js.snap +++ /dev/null @@ -1,42 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`core/button block edit matches snapshot 1`] = ` -
    - -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    - -
    -`; diff --git a/packages/block-library/src/button/test/index.js b/packages/block-library/src/button/test/index.js deleted file mode 100644 index ed83ce055e6e2..0000000000000 --- a/packages/block-library/src/button/test/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Internal dependencies - */ -import { name, settings } from '../'; -import { blockEditRender } from '../../test/helpers'; - -describe( 'core/button', () => { - test( 'block edit matches snapshot', () => { - const wrapper = blockEditRender( name, settings ); - - expect( wrapper ).toMatchSnapshot(); - } ); -} ); diff --git a/packages/block-library/src/calendar/edit.js b/packages/block-library/src/calendar/edit.js index 67d89d99bd457..f884490ec38c8 100644 --- a/packages/block-library/src/calendar/edit.js +++ b/packages/block-library/src/calendar/edit.js @@ -61,7 +61,16 @@ class CalendarEdit extends Component { } export default withSelect( ( select ) => { + const { + getEditedPostAttribute, + } = select( 'core/editor' ); + const postType = getEditedPostAttribute( 'type' ); + // Dates are used to overwrite year and month used on the calendar. + // This overwrite should only happen for 'post' post types. + // For other post types the calendar always displays the current month. return { - date: select( 'core/editor' ).getEditedPostAttribute( 'date' ), + date: postType === 'post' ? + getEditedPostAttribute( 'date' ) : + undefined, }; } )( CalendarEdit ); diff --git a/packages/block-library/src/calendar/index.php b/packages/block-library/src/calendar/index.php index 9177997692f40..8e26626f5f861 100644 --- a/packages/block-library/src/calendar/index.php +++ b/packages/block-library/src/calendar/index.php @@ -13,18 +13,22 @@ * @return string Returns the block content. */ function render_block_core_calendar( $attributes ) { - global $monthnum, $year, $post; + global $monthnum, $year; + $previous_monthnum = $monthnum; $previous_year = $year; - if ( isset( $attributes['month'] ) ) { - // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited - $monthnum = $attributes['month']; - } - - if ( isset( $attributes['year'] ) ) { - // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited - $year = $attributes['year']; + if ( isset( $attributes['month'] ) && isset( $attributes['year'] ) ) { + $permalink_structure = get_option( 'permalink_structure' ); + if ( + strpos( $permalink_structure, '%monthnum%' ) !== false && + strpos( $permalink_structure, '%year%' ) !== false + ) { + // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited + $monthnum = $attributes['month']; + // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited + $year = $attributes['year']; + } } $custom_class_name = empty( $attributes['className'] ) ? '' : ' ' . $attributes['className']; diff --git a/packages/block-library/src/categories/edit.js b/packages/block-library/src/categories/edit.js index aee240e7384e6..faee47015394a 100644 --- a/packages/block-library/src/categories/edit.js +++ b/packages/block-library/src/categories/edit.js @@ -9,7 +9,7 @@ import { times, unescape } from 'lodash'; import { PanelBody, Placeholder, Spinner, ToggleControl } from '@wordpress/components'; import { compose, withInstanceId } from '@wordpress/compose'; import { withSelect } from '@wordpress/data'; -import { InspectorControls } from '@wordpress/editor'; +import { InspectorControls } from '@wordpress/block-editor'; import { Component, Fragment } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; @@ -86,7 +86,7 @@ class CategoriesEdit extends Component { return (
  • - { this.renderCategoryName( category ) } + { this.renderCategoryName( category ) } { showPostCounts && { ' ' }({ category.count }) diff --git a/packages/block-library/src/classic/editor.scss b/packages/block-library/src/classic/editor.scss index 1cda8777992fa..1fe580ef581c9 100644 --- a/packages/block-library/src/classic/editor.scss +++ b/packages/block-library/src/classic/editor.scss @@ -109,12 +109,15 @@ .wp-more-tag { width: 96%; - height: 0; + height: 20px; display: block; margin: 15px auto; outline: 0; cursor: default; - border: 2px dashed rgb(186, 186, 186); + background-image: url(/wp-includes/js/tinymce/skins/wordpress/images/more-2x.png); + background-size: 1900px 20px; + background-repeat: no-repeat; + background-position: center; } /** @@ -187,6 +190,12 @@ color: $dark-gray-800; } + // Prevent toolbar clipping on heading style in RTL languages + .mce-rtl .mce-flow-layout-item.mce-last { + margin-right: 0; + margin-left: 8px; + } + // Prevent i tags in buttons from picking up theme editor styles. .mce-btn i { font-style: normal; diff --git a/packages/block-library/src/classic/test/__snapshots__/index.js.snap b/packages/block-library/src/classic/test/__snapshots__/index.js.snap deleted file mode 100644 index 690b0d5e30fdd..0000000000000 --- a/packages/block-library/src/classic/test/__snapshots__/index.js.snap +++ /dev/null @@ -1,15 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`core/freeform block edit matches snapshot 1`] = ` -Array [ -
    , -
    , -] -`; diff --git a/packages/block-library/src/classic/test/index.js b/packages/block-library/src/classic/test/index.js deleted file mode 100644 index 824c835543e7b..0000000000000 --- a/packages/block-library/src/classic/test/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Internal dependencies - */ -import { name, settings } from '../'; -import { blockEditRender } from '../../test/helpers'; - -describe( 'core/freeform', () => { - test( 'block edit matches snapshot', () => { - const wrapper = blockEditRender( name, settings ); - - expect( wrapper ).toMatchSnapshot(); - } ); -} ); diff --git a/packages/block-library/src/code/edit.js b/packages/block-library/src/code/edit.js index b41ba7327f15d..5aa4b337bd3f1 100644 --- a/packages/block-library/src/code/edit.js +++ b/packages/block-library/src/code/edit.js @@ -6,7 +6,7 @@ import { __ } from '@wordpress/i18n'; /** * Internal dependencies */ -import { PlainText } from '@wordpress/editor'; +import { PlainText } from '@wordpress/block-editor'; export default function CodeEdit( { attributes, setAttributes, className } ) { return ( diff --git a/packages/block-library/src/code/edit.native.js b/packages/block-library/src/code/edit.native.js index c072c01df5004..264814f760dee 100644 --- a/packages/block-library/src/code/edit.native.js +++ b/packages/block-library/src/code/edit.native.js @@ -11,7 +11,7 @@ import { __ } from '@wordpress/i18n'; /** * Internal dependencies */ -import { PlainText } from '@wordpress/editor'; +import { PlainText } from '@wordpress/block-editor'; /** * Block code style diff --git a/packages/block-library/src/code/test/__snapshots__/index.js.snap b/packages/block-library/src/code/test/__snapshots__/index.js.snap deleted file mode 100644 index 4d44efaa90a74..0000000000000 --- a/packages/block-library/src/code/test/__snapshots__/index.js.snap +++ /dev/null @@ -1,14 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`core/code block edit matches snapshot 1`] = ` -
    -