Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add npm org scope to WordPress dependencies #2172

Merged
merged 2 commits into from
Aug 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions blocks/alignment-toolbar/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* WordPress dependencies
*/
import { __ } from 'i18n';
import { Toolbar } from 'components';
import { __ } from '@wordpress/i18n';
import { Toolbar } from '@wordpress/components';

const ALIGNMENT_CONTROLS = [
{
Expand Down
2 changes: 1 addition & 1 deletion blocks/api/categories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { __ } from 'i18n';
import { __ } from '@wordpress/i18n';

/**
* Block categories.
Expand Down
8 changes: 7 additions & 1 deletion blocks/api/paste.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@
*/
import { find, get, flowRight as compose } from 'lodash';

/**
* WordPress dependencies
*/
import { nodetypes } from '@wordpress/utils';

/**
* Internal dependencies
*/
import { createBlock } from './factory';
import { getBlockTypes, getUnknownTypeHandler } from './registration';
import { parseBlockAttributes } from './parser';
import { ELEMENT_NODE, TEXT_NODE } from 'utils/nodetypes';
import convertTables from './paste/convert-tables';
import stripAttributes from './paste/strip-attributes';
import removeSpans from './paste/remove-spans';

const { ELEMENT_NODE, TEXT_NODE } = nodetypes;

/**
* Normalises array nodes of any node type to an array of block level nodes.
* @param {Array} nodes Array of Nodes.
Expand Down
7 changes: 6 additions & 1 deletion blocks/api/paste/remove-spans.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { ELEMENT_NODE } from 'utils/nodetypes';
/**
* WordPress dependencies
*/
import { nodetypes } from '@wordpress/utils';

const { ELEMENT_NODE } = nodetypes;

/**
*
Expand Down
2 changes: 1 addition & 1 deletion blocks/api/query.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { createElement } from 'element';
import { createElement } from '@wordpress/element';

/**
* External dependencies
Expand Down
2 changes: 1 addition & 1 deletion blocks/api/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { Component, createElement, renderToString, cloneElement, Children } from 'element';
import { Component, createElement, renderToString, cloneElement, Children } from '@wordpress/element';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion blocks/api/test/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { parse } from 'hpq';
/**
* WordPress dependencies
*/
import { renderToString } from 'element';
import { renderToString } from '@wordpress/element';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion blocks/api/test/serializer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { createElement, Component } from 'element';
import { createElement, Component } from '@wordpress/element';

/**
* Internal dependencies
Expand Down
4 changes: 2 additions & 2 deletions blocks/block-alignment-toolbar/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* WordPress dependencies
*/
import { __ } from 'i18n';
import { Toolbar } from 'components';
import { __ } from '@wordpress/i18n';
import { Toolbar } from '@wordpress/components';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion blocks/block-controls/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Fill } from 'react-slot-fill';
/**
* WordPress dependencies
*/
import { Toolbar } from 'components';
import { Toolbar } from '@wordpress/components';

export default function BlockControls( { controls, children } ) {
return (
Expand Down
4 changes: 2 additions & 2 deletions blocks/block-icon/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* WordPress dependencies
*/
import Dashicon from 'components/dashicon';
import { createElement, Component } from 'element';
import { Dashicon } from '@wordpress/components';
import { createElement, Component } from '@wordpress/element';

export default function BlockIcon( { icon } ) {
if ( 'string' === typeof icon ) {
Expand Down
2 changes: 1 addition & 1 deletion blocks/block-icon/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { shallow } from 'enzyme';
/**
* WordPress dependencies
*/
import { Component } from 'element';
import { Component } from '@wordpress/element';

/**
* Internal dependencies
Expand Down
10 changes: 6 additions & 4 deletions blocks/editable/format-toolbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ import { isUndefined } from 'lodash';
/**
* WordPress dependencies
*/
import { __ } from 'i18n';
import { Component } from 'element';
import { IconButton, Toolbar } from 'components';
import { ESCAPE } from 'utils/keycodes';
import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { IconButton, Toolbar } from '@wordpress/components';
import { keycodes } from '@wordpress/utils';

/**
* Internal dependencies
*/
import './style.scss';
import UrlInput from '../../url-input';

const { ESCAPE } = keycodes;

const FORMATTING_CONTROLS = [
{
icon: 'editor-bold',
Expand Down
8 changes: 5 additions & 3 deletions blocks/editable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ import 'element-closest';
/**
* WordPress dependencies
*/
import { createElement, Component, renderToString } from 'element';
import { parse, pasteHandler } from '../api';
import { BACKSPACE, DELETE, ENTER } from 'utils/keycodes';
import { createElement, Component, renderToString } from '@wordpress/element';
import { keycodes } from '@wordpress/utils';

/**
* Internal dependencies
*/
import './style.scss';
import { parse, pasteHandler } from '../api';
import FormatToolbar from './format-toolbar';
import TinyMCE from './tinymce';
import patterns from './patterns';

const { BACKSPACE, DELETE, ENTER } = keycodes;

function createTinyMCEElement( type, props, ...children ) {
if ( props[ 'data-mce-bogus' ] === 'all' ) {
return null;
Expand Down
4 changes: 3 additions & 1 deletion blocks/editable/patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { endsWith, find, get, escapeRegExp, partition, drop } from 'lodash';
/**
* WordPress dependencies
*/
import { ESCAPE, ENTER, SPACE, BACKSPACE } from 'utils/keycodes';
import { keycodes } from '@wordpress/utils';

/**
* Internal dependencies
Expand All @@ -19,6 +19,8 @@ import { getBlockTypes } from '../api/registration';
*/
const { setTimeout } = window;

const { ESCAPE, ENTER, SPACE, BACKSPACE } = keycodes;

export default function( editor ) {
const getContent = this.getContent.bind( this );
const { onReplace } = this.props;
Expand Down
2 changes: 1 addition & 1 deletion blocks/editable/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { pick, noop } from 'lodash';
/**
* WordPress dependencies
*/
import { Component } from 'element';
import { Component } from '@wordpress/element';

/**
* The Editable Provider allows a rendering context to define global behaviors
Expand Down
2 changes: 1 addition & 1 deletion blocks/editable/tinymce.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { Component, Children, createElement } from 'element';
import { Component, Children, createElement } from '@wordpress/element';

export default class TinyMCE extends Component {
componentDidMount() {
Expand Down
2 changes: 1 addition & 1 deletion blocks/inspector-controls/checkbox-control/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { withInstanceId } from 'components';
import { withInstanceId } from '@wordpress/components';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion blocks/inspector-controls/radio-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { isEmpty } from 'lodash';
/**
* WordPress dependencies
*/
import { withInstanceId } from 'components';
import { withInstanceId } from '@wordpress/components';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion blocks/inspector-controls/range-control/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { withInstanceId } from 'components';
import { withInstanceId } from '@wordpress/components';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion blocks/inspector-controls/select-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { isEmpty } from 'lodash';
/**
* WordPress dependencies
*/
import { withInstanceId } from 'components';
import { withInstanceId } from '@wordpress/components';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion blocks/inspector-controls/text-control/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { withInstanceId } from 'components';
import { withInstanceId } from '@wordpress/components';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion blocks/inspector-controls/textarea-control/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { withInstanceId } from 'components';
import { withInstanceId } from '@wordpress/components';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion blocks/inspector-controls/toggle-control/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { withInstanceId, FormToggle } from 'components';
import { withInstanceId, FormToggle } from '@wordpress/components';

/**
* Internal dependencies
Expand Down
4 changes: 2 additions & 2 deletions blocks/library/button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { CirclePicker } from 'react-color';
/**
* WordPress dependencies
*/
import { __ } from 'i18n';
import { IconButton } from 'components';
import { __ } from '@wordpress/i18n';
import { IconButton } from '@wordpress/components';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion blocks/library/code/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import TextareaAutosize from 'react-autosize-textarea';
/**
* WordPress dependencies
*/
import { __ } from 'i18n';
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
Expand Down
4 changes: 2 additions & 2 deletions blocks/library/cover-image/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* WordPress dependencies
*/
import { Placeholder, Toolbar, Dashicon } from 'components';
import { __ } from 'i18n';
import { Placeholder, Toolbar, Dashicon } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import classnames from 'classnames';

/**
Expand Down
4 changes: 2 additions & 2 deletions blocks/library/cover-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { CirclePicker } from 'react-color';
/**
* WordPress dependencies
*/
import { __ } from 'i18n';
import { concatChildren } from 'element';
import { __ } from '@wordpress/i18n';
import { concatChildren } from '@wordpress/element';

/**
* Internal dependencies
Expand Down
10 changes: 6 additions & 4 deletions blocks/library/embed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import { includes } from 'lodash';
/**
* WordPress dependencies
*/
import { __, sprintf } from 'i18n';
import { Component } from 'element';
import { Button, Placeholder, Spinner, SandBox } from 'components';
import { addQueryArgs } from 'editor/utils/url';
import { __, sprintf } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { Button, Placeholder, Spinner, SandBox } from '@wordpress/components';
// TODO: This is a circular dependency between editor and blocks. This must be
// updated, eventually to depend on published `@wordpress/url`
import { addQueryArgs } from '../../../editor/utils/url';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion blocks/library/freeform/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { __ } from 'i18n';
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
Expand Down
4 changes: 2 additions & 2 deletions blocks/library/freeform/old-editor.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* WordPress dependencies
*/
import { Component } from 'element';
import { __ } from 'i18n';
import { Component } from '@wordpress/element';
import { __ } from '@wordpress/i18n';

export default class OldEditor extends Component {
constructor( props ) {
Expand Down
4 changes: 2 additions & 2 deletions blocks/library/gallery/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* WordPress dependencies
*/
import { __ } from 'i18n';
import { Toolbar, Placeholder } from 'components';
import { __ } from '@wordpress/i18n';
import { Toolbar, Placeholder } from '@wordpress/components';
import { pick } from 'lodash';

/**
Expand Down
6 changes: 3 additions & 3 deletions blocks/library/heading/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { isObject } from 'lodash';
/**
* WordPress dependencies
*/
import { __, sprintf } from 'i18n';
import { concatChildren } from 'element';
import { Toolbar } from 'components';
import { __, sprintf } from '@wordpress/i18n';
import { concatChildren } from '@wordpress/element';
import { Toolbar } from '@wordpress/components';

/**
* Internal dependencies
Expand Down
4 changes: 2 additions & 2 deletions blocks/library/html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import TextareaAutosize from 'react-autosize-textarea';
/**
* WordPress dependencies
*/
import { __ } from 'i18n';
import { Component } from 'element';
import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';

/**
* Internal dependencies
Expand Down
Loading