diff --git a/.eslintrc.js b/.eslintrc.js index 60f644278265f0..ce7425f4c8892a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -82,6 +82,10 @@ module.exports = { "selector": "ImportDeclaration[source.value=/^core-data$/]", "message": "Use @wordpress/core-data as import path instead." }, + { + "selector": "ImportDeclaration[source.value=/^core-blocks$/]", + "message": "Use @wordpress/core-blocks as import path instead." + }, { selector: 'CallExpression[callee.name="deprecated"] Property[key.name="version"][value.value=/' + majorMinorRegExp + '/]', message: 'Deprecated functions must be removed before releasing this version.', diff --git a/bin/build-plugin-zip.sh b/bin/build-plugin-zip.sh index 3c16af1c9da7ca..3009bff901c196 100755 --- a/bin/build-plugin-zip.sh +++ b/bin/build-plugin-zip.sh @@ -98,7 +98,7 @@ status "Creating archive..." zip -r gutenberg.zip \ gutenberg.php \ lib/*.php \ - blocks/library/*/*.php \ + core-blocks/*/*.php \ post-content.js \ $vendor_scripts \ $build_files \ diff --git a/bin/get-server-blocks.php b/bin/get-server-blocks.php index 0d3f068aa2d157..f573a40dfad066 100755 --- a/bin/get-server-blocks.php +++ b/bin/get-server-blocks.php @@ -30,7 +30,7 @@ require_once dirname( dirname( __FILE__ ) ) . '/lib/client-assets.php'; // Register server-side code for individual blocks. -foreach ( glob( dirname( dirname( __FILE__ ) ) . '/blocks/library/*/index.php' ) as $block_logic ) { +foreach ( glob( dirname( dirname( __FILE__ ) ) . '/core-blocks/*/index.php' ) as $block_logic ) { require_once $block_logic; } diff --git a/blocks/api/raw-handling/test/integration/index.js b/blocks/api/raw-handling/test/integration/index.js index bebb611c67508e..9fc1cc57266f06 100644 --- a/blocks/api/raw-handling/test/integration/index.js +++ b/blocks/api/raw-handling/test/integration/index.js @@ -8,7 +8,7 @@ import path from 'path'; /** * Internal dependencies */ -import { registerCoreBlocks } from '../../../../library'; +import { registerCoreBlocks } from '../../../../../core-blocks'; import rawHandler from '../../index'; import serialize from '../../../serializer'; diff --git a/blocks/hooks/default-autocompleters.js b/blocks/hooks/default-autocompleters.js index 00f4535903daea..1a37ce45a8f847 100644 --- a/blocks/hooks/default-autocompleters.js +++ b/blocks/hooks/default-autocompleters.js @@ -13,8 +13,7 @@ import { addFilter } from '@wordpress/hooks'; */ import { userAutocompleter } from '../autocompleters'; -// Exported for unit test. -export const defaultAutocompleters = [ userAutocompleter ]; +const defaultAutocompleters = [ userAutocompleter ]; function setDefaultCompleters( completers ) { if ( ! completers ) { diff --git a/blocks/hooks/test/default-autocompleters.js b/blocks/hooks/test/default-autocompleters.js index 38f102f4e617a9..8595f5e0a315d0 100644 --- a/blocks/hooks/test/default-autocompleters.js +++ b/blocks/hooks/test/default-autocompleters.js @@ -6,9 +6,12 @@ import { applyFilters } from '@wordpress/hooks'; /** * Internal dependencies */ -import { defaultAutocompleters } from '../default-autocompleters'; +import '../default-autocompleters'; +import { userAutocompleter } from '../../autocompleters'; describe( 'default-autocompleters', () => { + const defaultAutocompleters = [ userAutocompleter ]; + it( 'provides default completers if none are provided', () => { const result = applyFilters( 'blocks.Autocomplete.completers', null ); /* diff --git a/blocks/index.js b/blocks/index.js index e92c66d0a72816..bb306e2dfbe3e9 100644 --- a/blocks/index.js +++ b/blocks/index.js @@ -13,7 +13,9 @@ import './hooks'; // Blocks are inferred from the HTML source of a post through a parsing mechanism // and then stored as objects in state, from which it is then rendered for editing. export * from './api'; -export { registerCoreBlocks } from './library'; +export * from './autocompleters'; + +export { default as editorMediaUpload } from './editor-media-upload'; export { default as AlignmentToolbar } from './alignment-toolbar'; export { default as Autocomplete } from './autocomplete'; export { default as BlockAlignmentToolbar } from './block-alignment-toolbar'; @@ -22,6 +24,7 @@ export { default as BlockFormatControls } from './block-format-controls'; export { default as BlockEdit } from './block-edit'; export { default as BlockIcon } from './block-icon'; export { default as ColorPalette } from './color-palette'; +export { default as ContrastChecker } from './contrast-checker'; export { default as ImagePlaceholder } from './image-placeholder'; export { default as InnerBlocks } from './inner-blocks'; export { default as InspectorControls } from './inspector-controls'; diff --git a/blocks/inner-blocks/README.md b/blocks/inner-blocks/README.md index cd7c89047b6492..331fffa6a4b8d3 100644 --- a/blocks/inner-blocks/README.md +++ b/blocks/inner-blocks/README.md @@ -3,7 +3,7 @@ InnerBlocks InnerBlocks exports a pair of components which can be used in block implementations to enable nested block content. -Refer to the [implementation of the Columns block](https://github.com/WordPress/gutenberg/tree/master/blocks/library/columns) as an example resource. +Refer to the [implementation of the Columns block](https://github.com/WordPress/gutenberg/tree/master/core-blocks/columns) as an example resource. ## Usage diff --git a/blocks/library/audio/editor.scss b/core-blocks/audio/editor.scss similarity index 100% rename from blocks/library/audio/editor.scss rename to core-blocks/audio/editor.scss diff --git a/blocks/library/audio/index.js b/core-blocks/audio/index.js similarity index 95% rename from blocks/library/audio/index.js rename to core-blocks/audio/index.js index ea6af10a265560..6f0f47fe37110c 100644 --- a/blocks/library/audio/index.js +++ b/core-blocks/audio/index.js @@ -10,16 +10,18 @@ import { Toolbar, } from '@wordpress/components'; import { Component, Fragment } from '@wordpress/element'; +import { + editorMediaUpload, + MediaUpload, + RichText, + BlockControls, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './style.scss'; import './editor.scss'; -import editorMediaUpload from '../../editor-media-upload'; -import MediaUpload from '../../media-upload'; -import RichText from '../../rich-text'; -import BlockControls from '../../block-controls'; export const name = 'core/audio'; diff --git a/blocks/library/audio/style.scss b/core-blocks/audio/style.scss similarity index 100% rename from blocks/library/audio/style.scss rename to core-blocks/audio/style.scss diff --git a/blocks/library/audio/test/__snapshots__/index.js.snap b/core-blocks/audio/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/audio/test/__snapshots__/index.js.snap rename to core-blocks/audio/test/__snapshots__/index.js.snap diff --git a/blocks/library/audio/test/index.js b/core-blocks/audio/test/index.js similarity index 82% rename from blocks/library/audio/test/index.js rename to core-blocks/audio/test/index.js index 9ab9bd66b155c1..a5611a3dd8ce6a 100644 --- a/blocks/library/audio/test/index.js +++ b/core-blocks/audio/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/audio', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/block/edit-panel/index.js b/core-blocks/block/edit-panel/index.js similarity index 100% rename from blocks/library/block/edit-panel/index.js rename to core-blocks/block/edit-panel/index.js diff --git a/blocks/library/block/edit-panel/style.scss b/core-blocks/block/edit-panel/style.scss similarity index 100% rename from blocks/library/block/edit-panel/style.scss rename to core-blocks/block/edit-panel/style.scss diff --git a/blocks/library/block/index.js b/core-blocks/block/index.js similarity index 98% rename from blocks/library/block/index.js rename to core-blocks/block/index.js index 531f6fb5d3ef12..971ee4e3cd4d49 100644 --- a/blocks/library/block/index.js +++ b/core-blocks/block/index.js @@ -10,11 +10,11 @@ import { Component, Fragment, compose } from '@wordpress/element'; import { Placeholder, Spinner, Disabled } from '@wordpress/components'; import { withSelect, withDispatch } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; +import { BlockEdit } from '@wordpress/blocks'; /** * Internal dependencies */ -import BlockEdit from '../../block-edit'; import SharedBlockEditPanel from './edit-panel'; import SharedBlockIndicator from './indicator'; diff --git a/blocks/library/block/index.php b/core-blocks/block/index.php similarity index 100% rename from blocks/library/block/index.php rename to core-blocks/block/index.php diff --git a/blocks/library/block/indicator/index.js b/core-blocks/block/indicator/index.js similarity index 100% rename from blocks/library/block/indicator/index.js rename to core-blocks/block/indicator/index.js diff --git a/blocks/library/block/indicator/style.scss b/core-blocks/block/indicator/style.scss similarity index 100% rename from blocks/library/block/indicator/style.scss rename to core-blocks/block/indicator/style.scss diff --git a/blocks/library/button/editor.scss b/core-blocks/button/editor.scss similarity index 100% rename from blocks/library/button/editor.scss rename to core-blocks/button/editor.scss diff --git a/blocks/library/button/index.js b/core-blocks/button/index.js similarity index 93% rename from blocks/library/button/index.js rename to core-blocks/button/index.js index b31bec954e169c..f18432689dd3c3 100644 --- a/blocks/library/button/index.js +++ b/core-blocks/button/index.js @@ -11,19 +11,21 @@ import { ToggleControl, withFallbackStyles, } from '@wordpress/components'; +import { + UrlInput, + RichText, + BlockControls, + BlockAlignmentToolbar, + ColorPalette, + ContrastChecker, + InspectorControls, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; import './style.scss'; -import RichText from '../../rich-text'; -import UrlInput from '../../url-input'; -import BlockControls from '../../block-controls'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; -import ColorPalette from '../../color-palette'; -import ContrastChecker from '../../contrast-checker'; -import InspectorControls from '../../inspector-controls'; const { getComputedStyle } = window; diff --git a/blocks/library/button/style.scss b/core-blocks/button/style.scss similarity index 100% rename from blocks/library/button/style.scss rename to core-blocks/button/style.scss diff --git a/blocks/library/button/test/__snapshots__/index.js.snap b/core-blocks/button/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/button/test/__snapshots__/index.js.snap rename to core-blocks/button/test/__snapshots__/index.js.snap diff --git a/blocks/library/button/test/index.js b/core-blocks/button/test/index.js similarity index 82% rename from blocks/library/button/test/index.js rename to core-blocks/button/test/index.js index 2b78a36bf105b9..ed83ce055e6e2d 100644 --- a/blocks/library/button/test/index.js +++ b/core-blocks/button/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/button', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/categories/block.js b/core-blocks/categories/block.js similarity index 96% rename from blocks/library/categories/block.js rename to core-blocks/categories/block.js index d1b598acebbd33..21e940834bb148 100644 --- a/blocks/library/categories/block.js +++ b/core-blocks/categories/block.js @@ -6,15 +6,17 @@ import { PanelBody, Placeholder, Spinner, ToggleControl } from '@wordpress/compo import { withSelect } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; import { times, unescape } from 'lodash'; +import { + InspectorControls, + BlockControls, + BlockAlignmentToolbar, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; import './style.scss'; -import InspectorControls from '../../inspector-controls'; -import BlockControls from '../../block-controls'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; class CategoriesBlock extends Component { constructor() { diff --git a/blocks/library/categories/editor.scss b/core-blocks/categories/editor.scss similarity index 100% rename from blocks/library/categories/editor.scss rename to core-blocks/categories/editor.scss diff --git a/blocks/library/categories/index.js b/core-blocks/categories/index.js similarity index 100% rename from blocks/library/categories/index.js rename to core-blocks/categories/index.js diff --git a/blocks/library/categories/index.php b/core-blocks/categories/index.php similarity index 100% rename from blocks/library/categories/index.php rename to core-blocks/categories/index.php diff --git a/blocks/library/categories/style.scss b/core-blocks/categories/style.scss similarity index 100% rename from blocks/library/categories/style.scss rename to core-blocks/categories/style.scss diff --git a/blocks/library/code/editor.scss b/core-blocks/code/editor.scss similarity index 100% rename from blocks/library/code/editor.scss rename to core-blocks/code/editor.scss diff --git a/blocks/library/code/index.js b/core-blocks/code/index.js similarity index 93% rename from blocks/library/code/index.js rename to core-blocks/code/index.js index cf40be5028f014..7587d697e3fb67 100644 --- a/blocks/library/code/index.js +++ b/core-blocks/code/index.js @@ -2,13 +2,15 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; +import { + createBlock, + PlainText, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; -import PlainText from '../../plain-text'; -import { createBlock } from '../../api'; export const name = 'core/code'; diff --git a/blocks/library/code/test/__snapshots__/index.js.snap b/core-blocks/code/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/code/test/__snapshots__/index.js.snap rename to core-blocks/code/test/__snapshots__/index.js.snap diff --git a/blocks/library/code/test/index.js b/core-blocks/code/test/index.js similarity index 82% rename from blocks/library/code/test/index.js rename to core-blocks/code/test/index.js index 938b58f6871e6d..a34add8c0c53a5 100644 --- a/blocks/library/code/test/index.js +++ b/core-blocks/code/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/code', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/columns/editor.scss b/core-blocks/columns/editor.scss similarity index 100% rename from blocks/library/columns/editor.scss rename to core-blocks/columns/editor.scss diff --git a/blocks/library/columns/index.js b/core-blocks/columns/index.js similarity index 91% rename from blocks/library/columns/index.js rename to core-blocks/columns/index.js index e0432a551ed5a8..e37bc3f9c41278 100644 --- a/blocks/library/columns/index.js +++ b/core-blocks/columns/index.js @@ -11,16 +11,18 @@ import memoize from 'memize'; import { __, sprintf } from '@wordpress/i18n'; import { PanelBody, RangeControl } from '@wordpress/components'; import { Fragment } from '@wordpress/element'; +import { + BlockControls, + InspectorControls, + BlockAlignmentToolbar, + InnerBlocks, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './style.scss'; import './editor.scss'; -import InspectorControls from '../../inspector-controls'; -import BlockControls from '../../block-controls'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; -import InnerBlocks from '../../inner-blocks'; /** * Returns the layouts configuration for a given number of columns. diff --git a/blocks/library/columns/style.scss b/core-blocks/columns/style.scss similarity index 100% rename from blocks/library/columns/style.scss rename to core-blocks/columns/style.scss diff --git a/blocks/library/cover-image/editor.scss b/core-blocks/cover-image/editor.scss similarity index 100% rename from blocks/library/cover-image/editor.scss rename to core-blocks/cover-image/editor.scss diff --git a/blocks/library/cover-image/index.js b/core-blocks/cover-image/index.js similarity index 93% rename from blocks/library/cover-image/index.js rename to core-blocks/cover-image/index.js index 465828fb61c220..94b0ad2ed680d3 100644 --- a/blocks/library/cover-image/index.js +++ b/core-blocks/cover-image/index.js @@ -10,20 +10,22 @@ import { IconButton, PanelBody, RangeControl, ToggleControl, Toolbar } from '@wo import { Fragment } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import classnames from 'classnames'; +import { + createBlock, + BlockControls, + InspectorControls, + BlockAlignmentToolbar, + ImagePlaceholder, + MediaUpload, + AlignmentToolbar, + RichText, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; import './style.scss'; -import { createBlock } from '../../api'; -import RichText from '../../rich-text'; -import AlignmentToolbar from '../../alignment-toolbar'; -import MediaUpload from '../../media-upload'; -import ImagePlaceholder from '../../image-placeholder'; -import BlockControls from '../../block-controls'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; -import InspectorControls from '../../inspector-controls'; const validAlignments = [ 'left', 'center', 'right', 'wide', 'full' ]; diff --git a/blocks/library/cover-image/style.scss b/core-blocks/cover-image/style.scss similarity index 100% rename from blocks/library/cover-image/style.scss rename to core-blocks/cover-image/style.scss diff --git a/blocks/library/cover-image/test/__snapshots__/index.js.snap b/core-blocks/cover-image/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/cover-image/test/__snapshots__/index.js.snap rename to core-blocks/cover-image/test/__snapshots__/index.js.snap diff --git a/blocks/library/cover-image/test/index.js b/core-blocks/cover-image/test/index.js similarity index 82% rename from blocks/library/cover-image/test/index.js rename to core-blocks/cover-image/test/index.js index 90efbf7a169199..ceb0bc9d5123c3 100644 --- a/blocks/library/cover-image/test/index.js +++ b/core-blocks/cover-image/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/cover-image', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/embed/editor.scss b/core-blocks/embed/editor.scss similarity index 100% rename from blocks/library/embed/editor.scss rename to core-blocks/embed/editor.scss diff --git a/blocks/library/embed/index.js b/core-blocks/embed/index.js similarity index 98% rename from blocks/library/embed/index.js rename to core-blocks/embed/index.js index 92eeb427c0f0e5..d080cee3acbdae 100644 --- a/blocks/library/embed/index.js +++ b/core-blocks/embed/index.js @@ -12,16 +12,18 @@ import { __, sprintf } from '@wordpress/i18n'; import { Component, Fragment, renderToString } from '@wordpress/element'; import { Button, Placeholder, Spinner, SandBox } from '@wordpress/components'; import classnames from 'classnames'; +import { + createBlock, + BlockControls, + BlockAlignmentToolbar, + RichText, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './style.scss'; import './editor.scss'; -import { createBlock } from '../../api'; -import RichText from '../../rich-text'; -import BlockControls from '../../block-controls'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; // These embeds do not work in sandboxes const HOSTS_NO_PREVIEWS = [ 'facebook.com' ]; diff --git a/blocks/library/embed/style.scss b/core-blocks/embed/style.scss similarity index 100% rename from blocks/library/embed/style.scss rename to core-blocks/embed/style.scss diff --git a/blocks/library/embed/test/__snapshots__/index.js.snap b/core-blocks/embed/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/embed/test/__snapshots__/index.js.snap rename to core-blocks/embed/test/__snapshots__/index.js.snap diff --git a/blocks/library/table/test/index.js b/core-blocks/embed/test/index.js similarity index 82% rename from blocks/library/table/test/index.js rename to core-blocks/embed/test/index.js index f6249d84357c8e..0b8a1985b06aa4 100644 --- a/blocks/library/table/test/index.js +++ b/core-blocks/embed/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/embed', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/freeform/editor.scss b/core-blocks/freeform/editor.scss similarity index 100% rename from blocks/library/freeform/editor.scss rename to core-blocks/freeform/editor.scss diff --git a/blocks/library/freeform/index.js b/core-blocks/freeform/index.js similarity index 100% rename from blocks/library/freeform/index.js rename to core-blocks/freeform/index.js diff --git a/blocks/library/freeform/old-editor.js b/core-blocks/freeform/old-editor.js similarity index 100% rename from blocks/library/freeform/old-editor.js rename to core-blocks/freeform/old-editor.js diff --git a/blocks/library/freeform/test/__snapshots__/index.js.snap b/core-blocks/freeform/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/freeform/test/__snapshots__/index.js.snap rename to core-blocks/freeform/test/__snapshots__/index.js.snap diff --git a/blocks/library/freeform/test/index.js b/core-blocks/freeform/test/index.js similarity index 82% rename from blocks/library/freeform/test/index.js rename to core-blocks/freeform/test/index.js index aee9066d54cf56..824c835543e7bc 100644 --- a/blocks/library/freeform/test/index.js +++ b/core-blocks/freeform/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/freeform', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/gallery/block.js b/core-blocks/gallery/block.js similarity index 95% rename from blocks/library/gallery/block.js rename to core-blocks/gallery/block.js index 8a05ac784205f9..3a7b50319ecde5 100644 --- a/blocks/library/gallery/block.js +++ b/core-blocks/gallery/block.js @@ -18,16 +18,18 @@ import { ToggleControl, Toolbar, } from '@wordpress/components'; +import { + editorMediaUpload, + BlockControls, + BlockAlignmentToolbar, + MediaUpload, + ImagePlaceholder, + InspectorControls, +} from '@wordpress/blocks'; /** * Internal dependencies */ -import editorMediaUpload from '../../editor-media-upload'; -import MediaUpload from '../../media-upload'; -import ImagePlaceholder from '../../image-placeholder'; -import InspectorControls from '../../inspector-controls'; -import BlockControls from '../../block-controls'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; import GalleryImage from './gallery-image'; const MAX_COLUMNS = 8; diff --git a/blocks/library/gallery/editor.scss b/core-blocks/gallery/editor.scss similarity index 100% rename from blocks/library/gallery/editor.scss rename to core-blocks/gallery/editor.scss diff --git a/blocks/library/gallery/gallery-image.js b/core-blocks/gallery/gallery-image.js similarity index 98% rename from blocks/library/gallery/gallery-image.js rename to core-blocks/gallery/gallery-image.js index 9f4c06ea5874f2..f76f9dd458d990 100644 --- a/blocks/library/gallery/gallery-image.js +++ b/core-blocks/gallery/gallery-image.js @@ -11,11 +11,7 @@ import { IconButton, Spinner } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { keycodes } from '@wordpress/utils'; import { withSelect } from '@wordpress/data'; - -/** - * Internal dependencies - */ -import RichText from '../../rich-text'; +import { RichText } from '@wordpress/blocks'; /** * Module constants diff --git a/blocks/library/gallery/index.js b/core-blocks/gallery/index.js similarity index 98% rename from blocks/library/gallery/index.js rename to core-blocks/gallery/index.js index 22e8b09e806a57..ac16beebdf3c32 100644 --- a/blocks/library/gallery/index.js +++ b/core-blocks/gallery/index.js @@ -8,14 +8,16 @@ import { filter, every } from 'lodash'; */ import { __ } from '@wordpress/i18n'; import { mediaUpload } from '@wordpress/utils'; +import { + createBlock, + RichText, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; import './style.scss'; -import { createBlock } from '../../api'; -import RichText from '../../rich-text'; import { default as GalleryBlock, defaultColumnsNumber } from './block'; const blockAttributes = { diff --git a/blocks/library/gallery/style.scss b/core-blocks/gallery/style.scss similarity index 100% rename from blocks/library/gallery/style.scss rename to core-blocks/gallery/style.scss diff --git a/blocks/library/gallery/test/__snapshots__/index.js.snap b/core-blocks/gallery/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/gallery/test/__snapshots__/index.js.snap rename to core-blocks/gallery/test/__snapshots__/index.js.snap diff --git a/blocks/library/gallery/test/index.js b/core-blocks/gallery/test/index.js similarity index 82% rename from blocks/library/gallery/test/index.js rename to core-blocks/gallery/test/index.js index b64ac373dd8d5e..5731cc00ba4835 100644 --- a/blocks/library/gallery/test/index.js +++ b/core-blocks/gallery/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/gallery', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/heading/editor.scss b/core-blocks/heading/editor.scss similarity index 100% rename from blocks/library/heading/editor.scss rename to core-blocks/heading/editor.scss diff --git a/blocks/library/heading/index.js b/core-blocks/heading/index.js similarity index 94% rename from blocks/library/heading/index.js rename to core-blocks/heading/index.js index c3e7281726e6c6..2e9dc97e43099e 100644 --- a/blocks/library/heading/index.js +++ b/core-blocks/heading/index.js @@ -4,16 +4,18 @@ import { __, sprintf } from '@wordpress/i18n'; import { concatChildren, Fragment } from '@wordpress/element'; import { PanelBody, Toolbar } from '@wordpress/components'; +import { + createBlock, + RichText, + BlockControls, + InspectorControls, + AlignmentToolbar, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; -import { createBlock } from '../../api'; -import RichText from '../../rich-text'; -import BlockControls from '../../block-controls'; -import InspectorControls from '../../inspector-controls'; -import AlignmentToolbar from '../../alignment-toolbar'; export const name = 'core/heading'; diff --git a/blocks/library/heading/test/__snapshots__/index.js.snap b/core-blocks/heading/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/heading/test/__snapshots__/index.js.snap rename to core-blocks/heading/test/__snapshots__/index.js.snap diff --git a/blocks/library/heading/test/index.js b/core-blocks/heading/test/index.js similarity index 82% rename from blocks/library/heading/test/index.js rename to core-blocks/heading/test/index.js index c1cba07d763d8a..955a5d952ec712 100644 --- a/blocks/library/heading/test/index.js +++ b/core-blocks/heading/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/heading', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/html/editor.scss b/core-blocks/html/editor.scss similarity index 100% rename from blocks/library/html/editor.scss rename to core-blocks/html/editor.scss diff --git a/blocks/library/html/index.js b/core-blocks/html/index.js similarity index 97% rename from blocks/library/html/index.js rename to core-blocks/html/index.js index 012304493d8f15..3764afd736b9b7 100644 --- a/blocks/library/html/index.js +++ b/core-blocks/html/index.js @@ -4,12 +4,12 @@ import { RawHTML } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { withState, SandBox, CodeEditor } from '@wordpress/components'; +import { BlockControls } from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; -import BlockControls from '../../block-controls'; export const name = 'core/html'; diff --git a/blocks/library/html/test/__snapshots__/index.js.snap b/core-blocks/html/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/html/test/__snapshots__/index.js.snap rename to core-blocks/html/test/__snapshots__/index.js.snap diff --git a/blocks/library/html/test/index.js b/core-blocks/html/test/index.js similarity index 82% rename from blocks/library/html/test/index.js rename to core-blocks/html/test/index.js index dead9a7204616f..2da5c107bea5be 100644 --- a/blocks/library/html/test/index.js +++ b/core-blocks/html/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/html', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/image/block.js b/core-blocks/image/block.js similarity index 95% rename from blocks/library/image/block.js rename to core-blocks/image/block.js index ddabaa6dd1b5f3..22556c27535aea 100644 --- a/blocks/library/image/block.js +++ b/core-blocks/image/block.js @@ -28,20 +28,22 @@ import { Toolbar, } from '@wordpress/components'; import { withSelect } from '@wordpress/data'; +import { + editorMediaUpload, + RichText, + BlockControls, + InspectorControls, + ImagePlaceholder, + MediaUpload, + BlockAlignmentToolbar, + UrlInputButton, + withEditorSettings, +} from '@wordpress/blocks'; /** * Internal dependencies */ -import editorMediaUpload from '../../editor-media-upload'; -import RichText from '../../rich-text'; -import ImagePlaceholder from '../../image-placeholder'; -import MediaUpload from '../../media-upload'; -import InspectorControls from '../../inspector-controls'; -import BlockControls from '../../block-controls'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; -import UrlInputButton from '../../url-input/button'; import ImageSize from './image-size'; -import { withEditorSettings } from '../../editor-settings'; /** * Module constants diff --git a/blocks/library/image/editor.scss b/core-blocks/image/editor.scss similarity index 100% rename from blocks/library/image/editor.scss rename to core-blocks/image/editor.scss diff --git a/blocks/library/image/image-size.js b/core-blocks/image/image-size.js similarity index 100% rename from blocks/library/image/image-size.js rename to core-blocks/image/image-size.js diff --git a/blocks/library/image/index.js b/core-blocks/image/index.js similarity index 97% rename from blocks/library/image/index.js rename to core-blocks/image/index.js index c13a27916e081b..e689b31d1139a5 100644 --- a/blocks/library/image/index.js +++ b/core-blocks/image/index.js @@ -2,14 +2,18 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; +import { + createBlock, + getBlockAttributes, + getBlockType, + RichText, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './style.scss'; import './editor.scss'; -import { createBlock, getBlockAttributes, getBlockType } from '../../api'; -import RichText from '../../rich-text'; import ImageBlock from './block'; export const name = 'core/image'; diff --git a/blocks/library/image/style.scss b/core-blocks/image/style.scss similarity index 100% rename from blocks/library/image/style.scss rename to core-blocks/image/style.scss diff --git a/blocks/library/index.js b/core-blocks/index.js similarity index 84% rename from blocks/library/index.js rename to core-blocks/index.js index 777e9aa0325a0f..e9a1c5374675a0 100644 --- a/blocks/library/index.js +++ b/core-blocks/index.js @@ -1,11 +1,16 @@ /** - * Internal dependencies + * WordPress dependencies */ import { registerBlockType, setDefaultBlockName, setUnknownTypeHandlerName, -} from '../api'; +} from '@wordpress/blocks'; +import { deprecated } from '@wordpress/utils'; + +/** + * Internal dependencies + */ import * as paragraph from './paragraph'; import * as image from './image'; import * as heading from './heading'; @@ -78,3 +83,13 @@ export const registerCoreBlocks = () => { setDefaultBlockName( paragraph.name ); setUnknownTypeHandlerName( freeform.name ); }; + +// Backwards compatibility +wp.blocks.registerCoreBlocks = () => { + deprecated( 'wp.blocks.registerCoreBlocks', { + version: '3.0', + alternative: 'wp.coreBlocks.registerCoreBlocks', + plugin: 'Gutenberg', + } ); + registerCoreBlocks(); +}; diff --git a/blocks/library/latest-posts/block.js b/core-blocks/latest-posts/block.js similarity index 96% rename from blocks/library/latest-posts/block.js rename to core-blocks/latest-posts/block.js index ea1feba8164ae4..7b2819fef4b7bb 100644 --- a/blocks/library/latest-posts/block.js +++ b/core-blocks/latest-posts/block.js @@ -22,15 +22,17 @@ import { } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { decodeEntities } from '@wordpress/utils'; +import { + InspectorControls, + BlockAlignmentToolbar, + BlockControls, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; import './style.scss'; -import InspectorControls from '../../inspector-controls'; -import BlockControls from '../../block-controls'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; const MAX_POSTS_COLUMNS = 6; diff --git a/blocks/library/latest-posts/editor.scss b/core-blocks/latest-posts/editor.scss similarity index 100% rename from blocks/library/latest-posts/editor.scss rename to core-blocks/latest-posts/editor.scss diff --git a/blocks/library/latest-posts/index.js b/core-blocks/latest-posts/index.js similarity index 100% rename from blocks/library/latest-posts/index.js rename to core-blocks/latest-posts/index.js diff --git a/blocks/library/latest-posts/index.php b/core-blocks/latest-posts/index.php similarity index 100% rename from blocks/library/latest-posts/index.php rename to core-blocks/latest-posts/index.php diff --git a/blocks/library/latest-posts/style.scss b/core-blocks/latest-posts/style.scss similarity index 100% rename from blocks/library/latest-posts/style.scss rename to core-blocks/latest-posts/style.scss diff --git a/blocks/library/list/editor.scss b/core-blocks/list/editor.scss similarity index 100% rename from blocks/library/list/editor.scss rename to core-blocks/list/editor.scss diff --git a/blocks/library/list/index.js b/core-blocks/list/index.js similarity index 98% rename from blocks/library/list/index.js rename to core-blocks/list/index.js index 4e1ce6471f10c0..59a4d3a8115576 100644 --- a/blocks/library/list/index.js +++ b/core-blocks/list/index.js @@ -8,14 +8,16 @@ import { find, compact, get, isEmpty } from 'lodash'; */ import { Component, Fragment } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; +import { + createBlock, + BlockControls, + RichText, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; -import { createBlock } from '../../api'; -import RichText from '../../rich-text'; -import BlockControls from '../../block-controls'; export const name = 'core/list'; diff --git a/blocks/library/list/test/__snapshots__/index.js.snap b/core-blocks/list/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/list/test/__snapshots__/index.js.snap rename to core-blocks/list/test/__snapshots__/index.js.snap diff --git a/blocks/library/list/test/index.js b/core-blocks/list/test/index.js similarity index 82% rename from blocks/library/list/test/index.js rename to core-blocks/list/test/index.js index d138bfe821efd5..9ed0ec09a19b37 100644 --- a/blocks/library/list/test/index.js +++ b/core-blocks/list/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/list', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/more/editor.scss b/core-blocks/more/editor.scss similarity index 100% rename from blocks/library/more/editor.scss rename to core-blocks/more/editor.scss diff --git a/blocks/library/more/index.js b/core-blocks/more/index.js similarity index 96% rename from blocks/library/more/index.js rename to core-blocks/more/index.js index d35fc0faf0265c..20a8ee5175cd43 100644 --- a/blocks/library/more/index.js +++ b/core-blocks/more/index.js @@ -9,13 +9,15 @@ import { compact } from 'lodash'; import { __ } from '@wordpress/i18n'; import { PanelBody, ToggleControl } from '@wordpress/components'; import { Component, Fragment, RawHTML } from '@wordpress/element'; +import { + createBlock, + InspectorControls, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; -import { createBlock } from '../../api'; -import InspectorControls from '../../inspector-controls'; export const name = 'core/more'; diff --git a/blocks/library/more/test/__snapshots__/index.js.snap b/core-blocks/more/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/more/test/__snapshots__/index.js.snap rename to core-blocks/more/test/__snapshots__/index.js.snap diff --git a/blocks/library/more/test/index.js b/core-blocks/more/test/index.js similarity index 82% rename from blocks/library/more/test/index.js rename to core-blocks/more/test/index.js index c6d259bd293f9d..6c50a352c1033c 100644 --- a/blocks/library/more/test/index.js +++ b/core-blocks/more/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/more', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/nextpage/editor.scss b/core-blocks/nextpage/editor.scss similarity index 100% rename from blocks/library/nextpage/editor.scss rename to core-blocks/nextpage/editor.scss diff --git a/blocks/library/nextpage/index.js b/core-blocks/nextpage/index.js similarity index 95% rename from blocks/library/nextpage/index.js rename to core-blocks/nextpage/index.js index e67e276609f8a6..86420233d3014d 100644 --- a/blocks/library/nextpage/index.js +++ b/core-blocks/nextpage/index.js @@ -3,12 +3,12 @@ */ import { __ } from '@wordpress/i18n'; import { RawHTML } from '@wordpress/element'; +import { createBlock } from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; -import { createBlock } from '../../api'; export const name = 'core/nextpage'; diff --git a/blocks/library/nextpage/test/__snapshots__/index.js.snap b/core-blocks/nextpage/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/nextpage/test/__snapshots__/index.js.snap rename to core-blocks/nextpage/test/__snapshots__/index.js.snap diff --git a/blocks/library/nextpage/test/index.js b/core-blocks/nextpage/test/index.js similarity index 82% rename from blocks/library/nextpage/test/index.js rename to core-blocks/nextpage/test/index.js index 3658f45050fecf..8277f13d6a4f07 100644 --- a/blocks/library/nextpage/test/index.js +++ b/core-blocks/nextpage/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/nextpage', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/paragraph/editor.scss b/core-blocks/paragraph/editor.scss similarity index 100% rename from blocks/library/paragraph/editor.scss rename to core-blocks/paragraph/editor.scss diff --git a/blocks/library/paragraph/index.js b/core-blocks/paragraph/index.js similarity index 94% rename from blocks/library/paragraph/index.js rename to core-blocks/paragraph/index.js index 0c2bbed2092665..30f71c9f0765e5 100644 --- a/blocks/library/paragraph/index.js +++ b/core-blocks/paragraph/index.js @@ -23,22 +23,24 @@ import { ButtonGroup, withFallbackStyles, } from '@wordpress/components'; +import { + createBlock, + blockAutocompleter, + userAutocompleter, + AlignmentToolbar, + BlockAlignmentToolbar, + BlockControls, + ColorPalette, + ContrastChecker, + InspectorControls, + RichText, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; import './style.scss'; -import { createBlock } from '../../api'; -import { blockAutocompleter } from '../../autocompleters'; -import { defaultAutocompleters } from '../../hooks/default-autocompleters'; -import AlignmentToolbar from '../../alignment-toolbar'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; -import BlockControls from '../../block-controls'; -import RichText from '../../rich-text'; -import InspectorControls from '../../inspector-controls'; -import ColorPalette from '../../color-palette'; -import ContrastChecker from '../../contrast-checker'; const { getComputedStyle } = window; @@ -61,7 +63,7 @@ const FONT_SIZES = { larger: 48, }; -const autocompleters = [ blockAutocompleter, ...defaultAutocompleters ]; +const autocompleters = [ blockAutocompleter, userAutocompleter ]; class ParagraphBlock extends Component { constructor() { diff --git a/blocks/library/paragraph/style.scss b/core-blocks/paragraph/style.scss similarity index 100% rename from blocks/library/paragraph/style.scss rename to core-blocks/paragraph/style.scss diff --git a/blocks/library/paragraph/test/__snapshots__/index.js.snap b/core-blocks/paragraph/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/paragraph/test/__snapshots__/index.js.snap rename to core-blocks/paragraph/test/__snapshots__/index.js.snap diff --git a/blocks/library/paragraph/test/index.js b/core-blocks/paragraph/test/index.js similarity index 82% rename from blocks/library/paragraph/test/index.js rename to core-blocks/paragraph/test/index.js index 7eb0dcfab4c68a..fb7e03415a5363 100644 --- a/blocks/library/paragraph/test/index.js +++ b/core-blocks/paragraph/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/paragraph', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/preformatted/editor.scss b/core-blocks/preformatted/editor.scss similarity index 100% rename from blocks/library/preformatted/editor.scss rename to core-blocks/preformatted/editor.scss diff --git a/blocks/library/preformatted/index.js b/core-blocks/preformatted/index.js similarity index 94% rename from blocks/library/preformatted/index.js rename to core-blocks/preformatted/index.js index 902de2667032cc..82a594da4ab5a8 100644 --- a/blocks/library/preformatted/index.js +++ b/core-blocks/preformatted/index.js @@ -2,13 +2,15 @@ * WordPress */ import { __ } from '@wordpress/i18n'; +import { + createBlock, + RichText, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; -import { createBlock } from '../../api'; -import RichText from '../../rich-text'; export const name = 'core/preformatted'; diff --git a/blocks/library/preformatted/test/__snapshots__/index.js.snap b/core-blocks/preformatted/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/preformatted/test/__snapshots__/index.js.snap rename to core-blocks/preformatted/test/__snapshots__/index.js.snap diff --git a/blocks/library/preformatted/test/index.js b/core-blocks/preformatted/test/index.js similarity index 82% rename from blocks/library/preformatted/test/index.js rename to core-blocks/preformatted/test/index.js index f190d8b5d77f96..b658b059a067e2 100644 --- a/blocks/library/preformatted/test/index.js +++ b/core-blocks/preformatted/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/preformatted', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/pullquote/editor.scss b/core-blocks/pullquote/editor.scss similarity index 100% rename from blocks/library/pullquote/editor.scss rename to core-blocks/pullquote/editor.scss diff --git a/blocks/library/pullquote/index.js b/core-blocks/pullquote/index.js similarity index 94% rename from blocks/library/pullquote/index.js rename to core-blocks/pullquote/index.js index bc1a3bea674b9e..47d84e99fd089f 100644 --- a/blocks/library/pullquote/index.js +++ b/core-blocks/pullquote/index.js @@ -9,17 +9,19 @@ import { castArray } from 'lodash'; import { __ } from '@wordpress/i18n'; import { withState } from '@wordpress/components'; import { Fragment } from '@wordpress/element'; +import { + createBlock, + BlockControls, + BlockAlignmentToolbar, + RichText, + InnerBlocks, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; import './style.scss'; -import { createBlock } from '../../api'; -import RichText from '../../rich-text'; -import BlockControls from '../../block-controls'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; -import InnerBlocks from '../../inner-blocks'; const blockAttributes = { citation: { diff --git a/blocks/library/pullquote/style.scss b/core-blocks/pullquote/style.scss similarity index 100% rename from blocks/library/pullquote/style.scss rename to core-blocks/pullquote/style.scss diff --git a/blocks/library/pullquote/test/__snapshots__/index.js.snap b/core-blocks/pullquote/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/pullquote/test/__snapshots__/index.js.snap rename to core-blocks/pullquote/test/__snapshots__/index.js.snap diff --git a/blocks/library/pullquote/test/index.js b/core-blocks/pullquote/test/index.js similarity index 82% rename from blocks/library/pullquote/test/index.js rename to core-blocks/pullquote/test/index.js index 40a2e28606e339..24e135dd4c02cd 100644 --- a/blocks/library/pullquote/test/index.js +++ b/core-blocks/pullquote/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/pullquote', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/quote/editor.scss b/core-blocks/quote/editor.scss similarity index 100% rename from blocks/library/quote/editor.scss rename to core-blocks/quote/editor.scss diff --git a/blocks/library/quote/index.js b/core-blocks/quote/index.js similarity index 95% rename from blocks/library/quote/index.js rename to core-blocks/quote/index.js index 212ea11c1b56af..2e0f57984079d7 100644 --- a/blocks/library/quote/index.js +++ b/core-blocks/quote/index.js @@ -10,17 +10,20 @@ import { castArray } from 'lodash'; import { __, sprintf } from '@wordpress/i18n'; import { Toolbar, withState } from '@wordpress/components'; import { Fragment } from '@wordpress/element'; +import { + createBlock, + rawHandler, + BlockControls, + AlignmentToolbar, + RichText, + InnerBlocks, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './style.scss'; import './editor.scss'; -import { createBlock, rawHandler } from '../../api'; -import AlignmentToolbar from '../../alignment-toolbar'; -import BlockControls from '../../block-controls'; -import RichText from '../../rich-text'; -import InnerBlocks from '../../inner-blocks'; const blockAttributes = { citation: { diff --git a/blocks/library/quote/style.scss b/core-blocks/quote/style.scss similarity index 100% rename from blocks/library/quote/style.scss rename to core-blocks/quote/style.scss diff --git a/blocks/library/quote/test/__snapshots__/index.js.snap b/core-blocks/quote/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/quote/test/__snapshots__/index.js.snap rename to core-blocks/quote/test/__snapshots__/index.js.snap diff --git a/blocks/library/quote/test/index.js b/core-blocks/quote/test/index.js similarity index 82% rename from blocks/library/quote/test/index.js rename to core-blocks/quote/test/index.js index 08f4c5f65f86c0..08553f5d8fd090 100644 --- a/blocks/library/quote/test/index.js +++ b/core-blocks/quote/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/quote', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/separator/index.js b/core-blocks/separator/index.js similarity index 93% rename from blocks/library/separator/index.js rename to core-blocks/separator/index.js index b387cd4eec4d52..c0d4607d7f3859 100644 --- a/blocks/library/separator/index.js +++ b/core-blocks/separator/index.js @@ -2,12 +2,12 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; +import { createBlock } from '@wordpress/blocks'; /** * Internal dependencies */ import './style.scss'; -import { createBlock } from '../../api'; export const name = 'core/separator'; diff --git a/blocks/library/separator/style.scss b/core-blocks/separator/style.scss similarity index 100% rename from blocks/library/separator/style.scss rename to core-blocks/separator/style.scss diff --git a/blocks/library/separator/test/__snapshots__/index.js.snap b/core-blocks/separator/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/separator/test/__snapshots__/index.js.snap rename to core-blocks/separator/test/__snapshots__/index.js.snap diff --git a/blocks/library/separator/test/index.js b/core-blocks/separator/test/index.js similarity index 82% rename from blocks/library/separator/test/index.js rename to core-blocks/separator/test/index.js index ec79dc27e47ce9..8041257d0caa61 100644 --- a/blocks/library/separator/test/index.js +++ b/core-blocks/separator/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/separator', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/shortcode/editor.scss b/core-blocks/shortcode/editor.scss similarity index 100% rename from blocks/library/shortcode/editor.scss rename to core-blocks/shortcode/editor.scss diff --git a/blocks/library/shortcode/index.js b/core-blocks/shortcode/index.js similarity index 97% rename from blocks/library/shortcode/index.js rename to core-blocks/shortcode/index.js index 4f95bf4acc8bc8..a0fe03a30ddf0c 100644 --- a/blocks/library/shortcode/index.js +++ b/core-blocks/shortcode/index.js @@ -4,12 +4,12 @@ import { RawHTML } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { withInstanceId, Dashicon } from '@wordpress/components'; +import { PlainText } from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; -import PlainText from '../../plain-text'; export const name = 'core/shortcode'; diff --git a/blocks/library/shortcode/test/__snapshots__/index.js.snap b/core-blocks/shortcode/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/shortcode/test/__snapshots__/index.js.snap rename to core-blocks/shortcode/test/__snapshots__/index.js.snap diff --git a/blocks/library/shortcode/test/index.js b/core-blocks/shortcode/test/index.js similarity index 82% rename from blocks/library/shortcode/test/index.js rename to core-blocks/shortcode/test/index.js index 5892b6e57a1ad3..e0fe629323ba74 100644 --- a/blocks/library/shortcode/test/index.js +++ b/core-blocks/shortcode/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/shortcode', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/subhead/editor.scss b/core-blocks/subhead/editor.scss similarity index 100% rename from blocks/library/subhead/editor.scss rename to core-blocks/subhead/editor.scss diff --git a/blocks/library/subhead/index.js b/core-blocks/subhead/index.js similarity index 94% rename from blocks/library/subhead/index.js rename to core-blocks/subhead/index.js index da945322406887..12ca9a99d358c4 100644 --- a/blocks/library/subhead/index.js +++ b/core-blocks/subhead/index.js @@ -2,14 +2,16 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; +import { + createBlock, + RichText, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; import './style.scss'; -import { createBlock } from '../../api'; -import RichText from '../../rich-text'; export const name = 'core/subhead'; diff --git a/blocks/library/subhead/style.scss b/core-blocks/subhead/style.scss similarity index 100% rename from blocks/library/subhead/style.scss rename to core-blocks/subhead/style.scss diff --git a/blocks/library/table/editor.scss b/core-blocks/table/editor.scss similarity index 100% rename from blocks/library/table/editor.scss rename to core-blocks/table/editor.scss diff --git a/blocks/library/table/index.js b/core-blocks/table/index.js similarity index 92% rename from blocks/library/table/index.js rename to core-blocks/table/index.js index 2c9d557180aba5..42c24adc941c98 100644 --- a/blocks/library/table/index.js +++ b/core-blocks/table/index.js @@ -7,6 +7,11 @@ import { __ } from '@wordpress/i18n'; * WordPress dependencies */ import { Fragment } from '@wordpress/element'; +import { + BlockControls, + BlockAlignmentToolbar, + RichText, +} from '@wordpress/blocks'; /** * Internal dependencies @@ -14,9 +19,6 @@ import { Fragment } from '@wordpress/element'; import './editor.scss'; import './style.scss'; import TableBlock from './table-block'; -import BlockControls from '../../block-controls'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; -import RichText from '../../rich-text'; export const name = 'core/table'; diff --git a/blocks/library/table/style.scss b/core-blocks/table/style.scss similarity index 100% rename from blocks/library/table/style.scss rename to core-blocks/table/style.scss diff --git a/blocks/library/table/table-block.js b/core-blocks/table/table-block.js similarity index 95% rename from blocks/library/table/table-block.js rename to core-blocks/table/table-block.js index 2862a651234153..eb866e58f96dd8 100644 --- a/blocks/library/table/table-block.js +++ b/core-blocks/table/table-block.js @@ -4,12 +4,10 @@ import { Component, Fragment } from '@wordpress/element'; import { Toolbar, DropdownMenu } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; - -/** - * Internal dependencies - */ -import RichText from '../../rich-text'; -import BlockControls from '../../block-controls'; +import { + BlockControls, + RichText, +} from '@wordpress/blocks'; function isTableSelected( editor ) { return editor.dom.getParent( diff --git a/blocks/library/table/test/__snapshots__/index.js.snap b/core-blocks/table/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/table/test/__snapshots__/index.js.snap rename to core-blocks/table/test/__snapshots__/index.js.snap diff --git a/blocks/library/embed/test/index.js b/core-blocks/table/test/index.js similarity index 82% rename from blocks/library/embed/test/index.js rename to core-blocks/table/test/index.js index f6249d84357c8e..0b8a1985b06aa4 100644 --- a/blocks/library/embed/test/index.js +++ b/core-blocks/table/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/embed', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/test/fixtures/README.md b/core-blocks/test/fixtures/README.md similarity index 100% rename from blocks/test/fixtures/README.md rename to core-blocks/test/fixtures/README.md diff --git a/blocks/test/fixtures/core-embed__animoto.html b/core-blocks/test/fixtures/core-embed__animoto.html similarity index 100% rename from blocks/test/fixtures/core-embed__animoto.html rename to core-blocks/test/fixtures/core-embed__animoto.html diff --git a/blocks/test/fixtures/core-embed__animoto.json b/core-blocks/test/fixtures/core-embed__animoto.json similarity index 100% rename from blocks/test/fixtures/core-embed__animoto.json rename to core-blocks/test/fixtures/core-embed__animoto.json diff --git a/blocks/test/fixtures/core-embed__animoto.parsed.json b/core-blocks/test/fixtures/core-embed__animoto.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__animoto.parsed.json rename to core-blocks/test/fixtures/core-embed__animoto.parsed.json diff --git a/blocks/test/fixtures/core-embed__animoto.serialized.html b/core-blocks/test/fixtures/core-embed__animoto.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__animoto.serialized.html rename to core-blocks/test/fixtures/core-embed__animoto.serialized.html diff --git a/blocks/test/fixtures/core-embed__cloudup.html b/core-blocks/test/fixtures/core-embed__cloudup.html similarity index 100% rename from blocks/test/fixtures/core-embed__cloudup.html rename to core-blocks/test/fixtures/core-embed__cloudup.html diff --git a/blocks/test/fixtures/core-embed__cloudup.json b/core-blocks/test/fixtures/core-embed__cloudup.json similarity index 100% rename from blocks/test/fixtures/core-embed__cloudup.json rename to core-blocks/test/fixtures/core-embed__cloudup.json diff --git a/blocks/test/fixtures/core-embed__cloudup.parsed.json b/core-blocks/test/fixtures/core-embed__cloudup.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__cloudup.parsed.json rename to core-blocks/test/fixtures/core-embed__cloudup.parsed.json diff --git a/blocks/test/fixtures/core-embed__cloudup.serialized.html b/core-blocks/test/fixtures/core-embed__cloudup.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__cloudup.serialized.html rename to core-blocks/test/fixtures/core-embed__cloudup.serialized.html diff --git a/blocks/test/fixtures/core-embed__collegehumor.html b/core-blocks/test/fixtures/core-embed__collegehumor.html similarity index 100% rename from blocks/test/fixtures/core-embed__collegehumor.html rename to core-blocks/test/fixtures/core-embed__collegehumor.html diff --git a/blocks/test/fixtures/core-embed__collegehumor.json b/core-blocks/test/fixtures/core-embed__collegehumor.json similarity index 100% rename from blocks/test/fixtures/core-embed__collegehumor.json rename to core-blocks/test/fixtures/core-embed__collegehumor.json diff --git a/blocks/test/fixtures/core-embed__collegehumor.parsed.json b/core-blocks/test/fixtures/core-embed__collegehumor.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__collegehumor.parsed.json rename to core-blocks/test/fixtures/core-embed__collegehumor.parsed.json diff --git a/blocks/test/fixtures/core-embed__collegehumor.serialized.html b/core-blocks/test/fixtures/core-embed__collegehumor.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__collegehumor.serialized.html rename to core-blocks/test/fixtures/core-embed__collegehumor.serialized.html diff --git a/blocks/test/fixtures/core-embed__dailymotion.html b/core-blocks/test/fixtures/core-embed__dailymotion.html similarity index 100% rename from blocks/test/fixtures/core-embed__dailymotion.html rename to core-blocks/test/fixtures/core-embed__dailymotion.html diff --git a/blocks/test/fixtures/core-embed__dailymotion.json b/core-blocks/test/fixtures/core-embed__dailymotion.json similarity index 100% rename from blocks/test/fixtures/core-embed__dailymotion.json rename to core-blocks/test/fixtures/core-embed__dailymotion.json diff --git a/blocks/test/fixtures/core-embed__dailymotion.parsed.json b/core-blocks/test/fixtures/core-embed__dailymotion.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__dailymotion.parsed.json rename to core-blocks/test/fixtures/core-embed__dailymotion.parsed.json diff --git a/blocks/test/fixtures/core-embed__dailymotion.serialized.html b/core-blocks/test/fixtures/core-embed__dailymotion.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__dailymotion.serialized.html rename to core-blocks/test/fixtures/core-embed__dailymotion.serialized.html diff --git a/blocks/test/fixtures/core-embed__facebook.html b/core-blocks/test/fixtures/core-embed__facebook.html similarity index 100% rename from blocks/test/fixtures/core-embed__facebook.html rename to core-blocks/test/fixtures/core-embed__facebook.html diff --git a/blocks/test/fixtures/core-embed__facebook.json b/core-blocks/test/fixtures/core-embed__facebook.json similarity index 100% rename from blocks/test/fixtures/core-embed__facebook.json rename to core-blocks/test/fixtures/core-embed__facebook.json diff --git a/blocks/test/fixtures/core-embed__facebook.parsed.json b/core-blocks/test/fixtures/core-embed__facebook.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__facebook.parsed.json rename to core-blocks/test/fixtures/core-embed__facebook.parsed.json diff --git a/blocks/test/fixtures/core-embed__facebook.serialized.html b/core-blocks/test/fixtures/core-embed__facebook.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__facebook.serialized.html rename to core-blocks/test/fixtures/core-embed__facebook.serialized.html diff --git a/blocks/test/fixtures/core-embed__flickr.html b/core-blocks/test/fixtures/core-embed__flickr.html similarity index 100% rename from blocks/test/fixtures/core-embed__flickr.html rename to core-blocks/test/fixtures/core-embed__flickr.html diff --git a/blocks/test/fixtures/core-embed__flickr.json b/core-blocks/test/fixtures/core-embed__flickr.json similarity index 100% rename from blocks/test/fixtures/core-embed__flickr.json rename to core-blocks/test/fixtures/core-embed__flickr.json diff --git a/blocks/test/fixtures/core-embed__flickr.parsed.json b/core-blocks/test/fixtures/core-embed__flickr.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__flickr.parsed.json rename to core-blocks/test/fixtures/core-embed__flickr.parsed.json diff --git a/blocks/test/fixtures/core-embed__flickr.serialized.html b/core-blocks/test/fixtures/core-embed__flickr.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__flickr.serialized.html rename to core-blocks/test/fixtures/core-embed__flickr.serialized.html diff --git a/blocks/test/fixtures/core-embed__funnyordie.html b/core-blocks/test/fixtures/core-embed__funnyordie.html similarity index 100% rename from blocks/test/fixtures/core-embed__funnyordie.html rename to core-blocks/test/fixtures/core-embed__funnyordie.html diff --git a/blocks/test/fixtures/core-embed__funnyordie.json b/core-blocks/test/fixtures/core-embed__funnyordie.json similarity index 100% rename from blocks/test/fixtures/core-embed__funnyordie.json rename to core-blocks/test/fixtures/core-embed__funnyordie.json diff --git a/blocks/test/fixtures/core-embed__funnyordie.parsed.json b/core-blocks/test/fixtures/core-embed__funnyordie.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__funnyordie.parsed.json rename to core-blocks/test/fixtures/core-embed__funnyordie.parsed.json diff --git a/blocks/test/fixtures/core-embed__funnyordie.serialized.html b/core-blocks/test/fixtures/core-embed__funnyordie.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__funnyordie.serialized.html rename to core-blocks/test/fixtures/core-embed__funnyordie.serialized.html diff --git a/blocks/test/fixtures/core-embed__hulu.html b/core-blocks/test/fixtures/core-embed__hulu.html similarity index 100% rename from blocks/test/fixtures/core-embed__hulu.html rename to core-blocks/test/fixtures/core-embed__hulu.html diff --git a/blocks/test/fixtures/core-embed__hulu.json b/core-blocks/test/fixtures/core-embed__hulu.json similarity index 100% rename from blocks/test/fixtures/core-embed__hulu.json rename to core-blocks/test/fixtures/core-embed__hulu.json diff --git a/blocks/test/fixtures/core-embed__hulu.parsed.json b/core-blocks/test/fixtures/core-embed__hulu.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__hulu.parsed.json rename to core-blocks/test/fixtures/core-embed__hulu.parsed.json diff --git a/blocks/test/fixtures/core-embed__hulu.serialized.html b/core-blocks/test/fixtures/core-embed__hulu.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__hulu.serialized.html rename to core-blocks/test/fixtures/core-embed__hulu.serialized.html diff --git a/blocks/test/fixtures/core-embed__imgur.html b/core-blocks/test/fixtures/core-embed__imgur.html similarity index 100% rename from blocks/test/fixtures/core-embed__imgur.html rename to core-blocks/test/fixtures/core-embed__imgur.html diff --git a/blocks/test/fixtures/core-embed__imgur.json b/core-blocks/test/fixtures/core-embed__imgur.json similarity index 100% rename from blocks/test/fixtures/core-embed__imgur.json rename to core-blocks/test/fixtures/core-embed__imgur.json diff --git a/blocks/test/fixtures/core-embed__imgur.parsed.json b/core-blocks/test/fixtures/core-embed__imgur.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__imgur.parsed.json rename to core-blocks/test/fixtures/core-embed__imgur.parsed.json diff --git a/blocks/test/fixtures/core-embed__imgur.serialized.html b/core-blocks/test/fixtures/core-embed__imgur.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__imgur.serialized.html rename to core-blocks/test/fixtures/core-embed__imgur.serialized.html diff --git a/blocks/test/fixtures/core-embed__instagram.html b/core-blocks/test/fixtures/core-embed__instagram.html similarity index 100% rename from blocks/test/fixtures/core-embed__instagram.html rename to core-blocks/test/fixtures/core-embed__instagram.html diff --git a/blocks/test/fixtures/core-embed__instagram.json b/core-blocks/test/fixtures/core-embed__instagram.json similarity index 100% rename from blocks/test/fixtures/core-embed__instagram.json rename to core-blocks/test/fixtures/core-embed__instagram.json diff --git a/blocks/test/fixtures/core-embed__instagram.parsed.json b/core-blocks/test/fixtures/core-embed__instagram.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__instagram.parsed.json rename to core-blocks/test/fixtures/core-embed__instagram.parsed.json diff --git a/blocks/test/fixtures/core-embed__instagram.serialized.html b/core-blocks/test/fixtures/core-embed__instagram.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__instagram.serialized.html rename to core-blocks/test/fixtures/core-embed__instagram.serialized.html diff --git a/blocks/test/fixtures/core-embed__issuu.html b/core-blocks/test/fixtures/core-embed__issuu.html similarity index 100% rename from blocks/test/fixtures/core-embed__issuu.html rename to core-blocks/test/fixtures/core-embed__issuu.html diff --git a/blocks/test/fixtures/core-embed__issuu.json b/core-blocks/test/fixtures/core-embed__issuu.json similarity index 100% rename from blocks/test/fixtures/core-embed__issuu.json rename to core-blocks/test/fixtures/core-embed__issuu.json diff --git a/blocks/test/fixtures/core-embed__issuu.parsed.json b/core-blocks/test/fixtures/core-embed__issuu.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__issuu.parsed.json rename to core-blocks/test/fixtures/core-embed__issuu.parsed.json diff --git a/blocks/test/fixtures/core-embed__issuu.serialized.html b/core-blocks/test/fixtures/core-embed__issuu.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__issuu.serialized.html rename to core-blocks/test/fixtures/core-embed__issuu.serialized.html diff --git a/blocks/test/fixtures/core-embed__kickstarter.html b/core-blocks/test/fixtures/core-embed__kickstarter.html similarity index 100% rename from blocks/test/fixtures/core-embed__kickstarter.html rename to core-blocks/test/fixtures/core-embed__kickstarter.html diff --git a/blocks/test/fixtures/core-embed__kickstarter.json b/core-blocks/test/fixtures/core-embed__kickstarter.json similarity index 100% rename from blocks/test/fixtures/core-embed__kickstarter.json rename to core-blocks/test/fixtures/core-embed__kickstarter.json diff --git a/blocks/test/fixtures/core-embed__kickstarter.parsed.json b/core-blocks/test/fixtures/core-embed__kickstarter.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__kickstarter.parsed.json rename to core-blocks/test/fixtures/core-embed__kickstarter.parsed.json diff --git a/blocks/test/fixtures/core-embed__kickstarter.serialized.html b/core-blocks/test/fixtures/core-embed__kickstarter.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__kickstarter.serialized.html rename to core-blocks/test/fixtures/core-embed__kickstarter.serialized.html diff --git a/blocks/test/fixtures/core-embed__meetup-com.html b/core-blocks/test/fixtures/core-embed__meetup-com.html similarity index 100% rename from blocks/test/fixtures/core-embed__meetup-com.html rename to core-blocks/test/fixtures/core-embed__meetup-com.html diff --git a/blocks/test/fixtures/core-embed__meetup-com.json b/core-blocks/test/fixtures/core-embed__meetup-com.json similarity index 100% rename from blocks/test/fixtures/core-embed__meetup-com.json rename to core-blocks/test/fixtures/core-embed__meetup-com.json diff --git a/blocks/test/fixtures/core-embed__meetup-com.parsed.json b/core-blocks/test/fixtures/core-embed__meetup-com.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__meetup-com.parsed.json rename to core-blocks/test/fixtures/core-embed__meetup-com.parsed.json diff --git a/blocks/test/fixtures/core-embed__meetup-com.serialized.html b/core-blocks/test/fixtures/core-embed__meetup-com.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__meetup-com.serialized.html rename to core-blocks/test/fixtures/core-embed__meetup-com.serialized.html diff --git a/blocks/test/fixtures/core-embed__mixcloud.html b/core-blocks/test/fixtures/core-embed__mixcloud.html similarity index 100% rename from blocks/test/fixtures/core-embed__mixcloud.html rename to core-blocks/test/fixtures/core-embed__mixcloud.html diff --git a/blocks/test/fixtures/core-embed__mixcloud.json b/core-blocks/test/fixtures/core-embed__mixcloud.json similarity index 100% rename from blocks/test/fixtures/core-embed__mixcloud.json rename to core-blocks/test/fixtures/core-embed__mixcloud.json diff --git a/blocks/test/fixtures/core-embed__mixcloud.parsed.json b/core-blocks/test/fixtures/core-embed__mixcloud.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__mixcloud.parsed.json rename to core-blocks/test/fixtures/core-embed__mixcloud.parsed.json diff --git a/blocks/test/fixtures/core-embed__mixcloud.serialized.html b/core-blocks/test/fixtures/core-embed__mixcloud.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__mixcloud.serialized.html rename to core-blocks/test/fixtures/core-embed__mixcloud.serialized.html diff --git a/blocks/test/fixtures/core-embed__photobucket.html b/core-blocks/test/fixtures/core-embed__photobucket.html similarity index 100% rename from blocks/test/fixtures/core-embed__photobucket.html rename to core-blocks/test/fixtures/core-embed__photobucket.html diff --git a/blocks/test/fixtures/core-embed__photobucket.json b/core-blocks/test/fixtures/core-embed__photobucket.json similarity index 100% rename from blocks/test/fixtures/core-embed__photobucket.json rename to core-blocks/test/fixtures/core-embed__photobucket.json diff --git a/blocks/test/fixtures/core-embed__photobucket.parsed.json b/core-blocks/test/fixtures/core-embed__photobucket.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__photobucket.parsed.json rename to core-blocks/test/fixtures/core-embed__photobucket.parsed.json diff --git a/blocks/test/fixtures/core-embed__photobucket.serialized.html b/core-blocks/test/fixtures/core-embed__photobucket.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__photobucket.serialized.html rename to core-blocks/test/fixtures/core-embed__photobucket.serialized.html diff --git a/blocks/test/fixtures/core-embed__polldaddy.html b/core-blocks/test/fixtures/core-embed__polldaddy.html similarity index 100% rename from blocks/test/fixtures/core-embed__polldaddy.html rename to core-blocks/test/fixtures/core-embed__polldaddy.html diff --git a/blocks/test/fixtures/core-embed__polldaddy.json b/core-blocks/test/fixtures/core-embed__polldaddy.json similarity index 100% rename from blocks/test/fixtures/core-embed__polldaddy.json rename to core-blocks/test/fixtures/core-embed__polldaddy.json diff --git a/blocks/test/fixtures/core-embed__polldaddy.parsed.json b/core-blocks/test/fixtures/core-embed__polldaddy.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__polldaddy.parsed.json rename to core-blocks/test/fixtures/core-embed__polldaddy.parsed.json diff --git a/blocks/test/fixtures/core-embed__polldaddy.serialized.html b/core-blocks/test/fixtures/core-embed__polldaddy.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__polldaddy.serialized.html rename to core-blocks/test/fixtures/core-embed__polldaddy.serialized.html diff --git a/blocks/test/fixtures/core-embed__reddit.html b/core-blocks/test/fixtures/core-embed__reddit.html similarity index 100% rename from blocks/test/fixtures/core-embed__reddit.html rename to core-blocks/test/fixtures/core-embed__reddit.html diff --git a/blocks/test/fixtures/core-embed__reddit.json b/core-blocks/test/fixtures/core-embed__reddit.json similarity index 100% rename from blocks/test/fixtures/core-embed__reddit.json rename to core-blocks/test/fixtures/core-embed__reddit.json diff --git a/blocks/test/fixtures/core-embed__reddit.parsed.json b/core-blocks/test/fixtures/core-embed__reddit.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__reddit.parsed.json rename to core-blocks/test/fixtures/core-embed__reddit.parsed.json diff --git a/blocks/test/fixtures/core-embed__reddit.serialized.html b/core-blocks/test/fixtures/core-embed__reddit.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__reddit.serialized.html rename to core-blocks/test/fixtures/core-embed__reddit.serialized.html diff --git a/blocks/test/fixtures/core-embed__reverbnation.html b/core-blocks/test/fixtures/core-embed__reverbnation.html similarity index 100% rename from blocks/test/fixtures/core-embed__reverbnation.html rename to core-blocks/test/fixtures/core-embed__reverbnation.html diff --git a/blocks/test/fixtures/core-embed__reverbnation.json b/core-blocks/test/fixtures/core-embed__reverbnation.json similarity index 100% rename from blocks/test/fixtures/core-embed__reverbnation.json rename to core-blocks/test/fixtures/core-embed__reverbnation.json diff --git a/blocks/test/fixtures/core-embed__reverbnation.parsed.json b/core-blocks/test/fixtures/core-embed__reverbnation.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__reverbnation.parsed.json rename to core-blocks/test/fixtures/core-embed__reverbnation.parsed.json diff --git a/blocks/test/fixtures/core-embed__reverbnation.serialized.html b/core-blocks/test/fixtures/core-embed__reverbnation.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__reverbnation.serialized.html rename to core-blocks/test/fixtures/core-embed__reverbnation.serialized.html diff --git a/blocks/test/fixtures/core-embed__screencast.html b/core-blocks/test/fixtures/core-embed__screencast.html similarity index 100% rename from blocks/test/fixtures/core-embed__screencast.html rename to core-blocks/test/fixtures/core-embed__screencast.html diff --git a/blocks/test/fixtures/core-embed__screencast.json b/core-blocks/test/fixtures/core-embed__screencast.json similarity index 100% rename from blocks/test/fixtures/core-embed__screencast.json rename to core-blocks/test/fixtures/core-embed__screencast.json diff --git a/blocks/test/fixtures/core-embed__screencast.parsed.json b/core-blocks/test/fixtures/core-embed__screencast.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__screencast.parsed.json rename to core-blocks/test/fixtures/core-embed__screencast.parsed.json diff --git a/blocks/test/fixtures/core-embed__screencast.serialized.html b/core-blocks/test/fixtures/core-embed__screencast.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__screencast.serialized.html rename to core-blocks/test/fixtures/core-embed__screencast.serialized.html diff --git a/blocks/test/fixtures/core-embed__scribd.html b/core-blocks/test/fixtures/core-embed__scribd.html similarity index 100% rename from blocks/test/fixtures/core-embed__scribd.html rename to core-blocks/test/fixtures/core-embed__scribd.html diff --git a/blocks/test/fixtures/core-embed__scribd.json b/core-blocks/test/fixtures/core-embed__scribd.json similarity index 100% rename from blocks/test/fixtures/core-embed__scribd.json rename to core-blocks/test/fixtures/core-embed__scribd.json diff --git a/blocks/test/fixtures/core-embed__scribd.parsed.json b/core-blocks/test/fixtures/core-embed__scribd.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__scribd.parsed.json rename to core-blocks/test/fixtures/core-embed__scribd.parsed.json diff --git a/blocks/test/fixtures/core-embed__scribd.serialized.html b/core-blocks/test/fixtures/core-embed__scribd.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__scribd.serialized.html rename to core-blocks/test/fixtures/core-embed__scribd.serialized.html diff --git a/blocks/test/fixtures/core-embed__slideshare.html b/core-blocks/test/fixtures/core-embed__slideshare.html similarity index 100% rename from blocks/test/fixtures/core-embed__slideshare.html rename to core-blocks/test/fixtures/core-embed__slideshare.html diff --git a/blocks/test/fixtures/core-embed__slideshare.json b/core-blocks/test/fixtures/core-embed__slideshare.json similarity index 100% rename from blocks/test/fixtures/core-embed__slideshare.json rename to core-blocks/test/fixtures/core-embed__slideshare.json diff --git a/blocks/test/fixtures/core-embed__slideshare.parsed.json b/core-blocks/test/fixtures/core-embed__slideshare.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__slideshare.parsed.json rename to core-blocks/test/fixtures/core-embed__slideshare.parsed.json diff --git a/blocks/test/fixtures/core-embed__slideshare.serialized.html b/core-blocks/test/fixtures/core-embed__slideshare.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__slideshare.serialized.html rename to core-blocks/test/fixtures/core-embed__slideshare.serialized.html diff --git a/blocks/test/fixtures/core-embed__smugmug.html b/core-blocks/test/fixtures/core-embed__smugmug.html similarity index 100% rename from blocks/test/fixtures/core-embed__smugmug.html rename to core-blocks/test/fixtures/core-embed__smugmug.html diff --git a/blocks/test/fixtures/core-embed__smugmug.json b/core-blocks/test/fixtures/core-embed__smugmug.json similarity index 100% rename from blocks/test/fixtures/core-embed__smugmug.json rename to core-blocks/test/fixtures/core-embed__smugmug.json diff --git a/blocks/test/fixtures/core-embed__smugmug.parsed.json b/core-blocks/test/fixtures/core-embed__smugmug.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__smugmug.parsed.json rename to core-blocks/test/fixtures/core-embed__smugmug.parsed.json diff --git a/blocks/test/fixtures/core-embed__smugmug.serialized.html b/core-blocks/test/fixtures/core-embed__smugmug.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__smugmug.serialized.html rename to core-blocks/test/fixtures/core-embed__smugmug.serialized.html diff --git a/blocks/test/fixtures/core-embed__soundcloud.html b/core-blocks/test/fixtures/core-embed__soundcloud.html similarity index 100% rename from blocks/test/fixtures/core-embed__soundcloud.html rename to core-blocks/test/fixtures/core-embed__soundcloud.html diff --git a/blocks/test/fixtures/core-embed__soundcloud.json b/core-blocks/test/fixtures/core-embed__soundcloud.json similarity index 100% rename from blocks/test/fixtures/core-embed__soundcloud.json rename to core-blocks/test/fixtures/core-embed__soundcloud.json diff --git a/blocks/test/fixtures/core-embed__soundcloud.parsed.json b/core-blocks/test/fixtures/core-embed__soundcloud.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__soundcloud.parsed.json rename to core-blocks/test/fixtures/core-embed__soundcloud.parsed.json diff --git a/blocks/test/fixtures/core-embed__soundcloud.serialized.html b/core-blocks/test/fixtures/core-embed__soundcloud.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__soundcloud.serialized.html rename to core-blocks/test/fixtures/core-embed__soundcloud.serialized.html diff --git a/blocks/test/fixtures/core-embed__speaker.html b/core-blocks/test/fixtures/core-embed__speaker.html similarity index 100% rename from blocks/test/fixtures/core-embed__speaker.html rename to core-blocks/test/fixtures/core-embed__speaker.html diff --git a/blocks/test/fixtures/core-embed__speaker.json b/core-blocks/test/fixtures/core-embed__speaker.json similarity index 100% rename from blocks/test/fixtures/core-embed__speaker.json rename to core-blocks/test/fixtures/core-embed__speaker.json diff --git a/blocks/test/fixtures/core-embed__speaker.parsed.json b/core-blocks/test/fixtures/core-embed__speaker.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__speaker.parsed.json rename to core-blocks/test/fixtures/core-embed__speaker.parsed.json diff --git a/blocks/test/fixtures/core-embed__speaker.serialized.html b/core-blocks/test/fixtures/core-embed__speaker.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__speaker.serialized.html rename to core-blocks/test/fixtures/core-embed__speaker.serialized.html diff --git a/blocks/test/fixtures/core-embed__spotify.html b/core-blocks/test/fixtures/core-embed__spotify.html similarity index 100% rename from blocks/test/fixtures/core-embed__spotify.html rename to core-blocks/test/fixtures/core-embed__spotify.html diff --git a/blocks/test/fixtures/core-embed__spotify.json b/core-blocks/test/fixtures/core-embed__spotify.json similarity index 100% rename from blocks/test/fixtures/core-embed__spotify.json rename to core-blocks/test/fixtures/core-embed__spotify.json diff --git a/blocks/test/fixtures/core-embed__spotify.parsed.json b/core-blocks/test/fixtures/core-embed__spotify.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__spotify.parsed.json rename to core-blocks/test/fixtures/core-embed__spotify.parsed.json diff --git a/blocks/test/fixtures/core-embed__spotify.serialized.html b/core-blocks/test/fixtures/core-embed__spotify.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__spotify.serialized.html rename to core-blocks/test/fixtures/core-embed__spotify.serialized.html diff --git a/blocks/test/fixtures/core-embed__ted.html b/core-blocks/test/fixtures/core-embed__ted.html similarity index 100% rename from blocks/test/fixtures/core-embed__ted.html rename to core-blocks/test/fixtures/core-embed__ted.html diff --git a/blocks/test/fixtures/core-embed__ted.json b/core-blocks/test/fixtures/core-embed__ted.json similarity index 100% rename from blocks/test/fixtures/core-embed__ted.json rename to core-blocks/test/fixtures/core-embed__ted.json diff --git a/blocks/test/fixtures/core-embed__ted.parsed.json b/core-blocks/test/fixtures/core-embed__ted.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__ted.parsed.json rename to core-blocks/test/fixtures/core-embed__ted.parsed.json diff --git a/blocks/test/fixtures/core-embed__ted.serialized.html b/core-blocks/test/fixtures/core-embed__ted.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__ted.serialized.html rename to core-blocks/test/fixtures/core-embed__ted.serialized.html diff --git a/blocks/test/fixtures/core-embed__tumblr.html b/core-blocks/test/fixtures/core-embed__tumblr.html similarity index 100% rename from blocks/test/fixtures/core-embed__tumblr.html rename to core-blocks/test/fixtures/core-embed__tumblr.html diff --git a/blocks/test/fixtures/core-embed__tumblr.json b/core-blocks/test/fixtures/core-embed__tumblr.json similarity index 100% rename from blocks/test/fixtures/core-embed__tumblr.json rename to core-blocks/test/fixtures/core-embed__tumblr.json diff --git a/blocks/test/fixtures/core-embed__tumblr.parsed.json b/core-blocks/test/fixtures/core-embed__tumblr.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__tumblr.parsed.json rename to core-blocks/test/fixtures/core-embed__tumblr.parsed.json diff --git a/blocks/test/fixtures/core-embed__tumblr.serialized.html b/core-blocks/test/fixtures/core-embed__tumblr.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__tumblr.serialized.html rename to core-blocks/test/fixtures/core-embed__tumblr.serialized.html diff --git a/blocks/test/fixtures/core-embed__twitter.html b/core-blocks/test/fixtures/core-embed__twitter.html similarity index 100% rename from blocks/test/fixtures/core-embed__twitter.html rename to core-blocks/test/fixtures/core-embed__twitter.html diff --git a/blocks/test/fixtures/core-embed__twitter.json b/core-blocks/test/fixtures/core-embed__twitter.json similarity index 100% rename from blocks/test/fixtures/core-embed__twitter.json rename to core-blocks/test/fixtures/core-embed__twitter.json diff --git a/blocks/test/fixtures/core-embed__twitter.parsed.json b/core-blocks/test/fixtures/core-embed__twitter.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__twitter.parsed.json rename to core-blocks/test/fixtures/core-embed__twitter.parsed.json diff --git a/blocks/test/fixtures/core-embed__twitter.serialized.html b/core-blocks/test/fixtures/core-embed__twitter.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__twitter.serialized.html rename to core-blocks/test/fixtures/core-embed__twitter.serialized.html diff --git a/blocks/test/fixtures/core-embed__videopress.html b/core-blocks/test/fixtures/core-embed__videopress.html similarity index 100% rename from blocks/test/fixtures/core-embed__videopress.html rename to core-blocks/test/fixtures/core-embed__videopress.html diff --git a/blocks/test/fixtures/core-embed__videopress.json b/core-blocks/test/fixtures/core-embed__videopress.json similarity index 100% rename from blocks/test/fixtures/core-embed__videopress.json rename to core-blocks/test/fixtures/core-embed__videopress.json diff --git a/blocks/test/fixtures/core-embed__videopress.parsed.json b/core-blocks/test/fixtures/core-embed__videopress.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__videopress.parsed.json rename to core-blocks/test/fixtures/core-embed__videopress.parsed.json diff --git a/blocks/test/fixtures/core-embed__videopress.serialized.html b/core-blocks/test/fixtures/core-embed__videopress.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__videopress.serialized.html rename to core-blocks/test/fixtures/core-embed__videopress.serialized.html diff --git a/blocks/test/fixtures/core-embed__vimeo.html b/core-blocks/test/fixtures/core-embed__vimeo.html similarity index 100% rename from blocks/test/fixtures/core-embed__vimeo.html rename to core-blocks/test/fixtures/core-embed__vimeo.html diff --git a/blocks/test/fixtures/core-embed__vimeo.json b/core-blocks/test/fixtures/core-embed__vimeo.json similarity index 100% rename from blocks/test/fixtures/core-embed__vimeo.json rename to core-blocks/test/fixtures/core-embed__vimeo.json diff --git a/blocks/test/fixtures/core-embed__vimeo.parsed.json b/core-blocks/test/fixtures/core-embed__vimeo.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__vimeo.parsed.json rename to core-blocks/test/fixtures/core-embed__vimeo.parsed.json diff --git a/blocks/test/fixtures/core-embed__vimeo.serialized.html b/core-blocks/test/fixtures/core-embed__vimeo.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__vimeo.serialized.html rename to core-blocks/test/fixtures/core-embed__vimeo.serialized.html diff --git a/blocks/test/fixtures/core-embed__wordpress-tv.html b/core-blocks/test/fixtures/core-embed__wordpress-tv.html similarity index 100% rename from blocks/test/fixtures/core-embed__wordpress-tv.html rename to core-blocks/test/fixtures/core-embed__wordpress-tv.html diff --git a/blocks/test/fixtures/core-embed__wordpress-tv.json b/core-blocks/test/fixtures/core-embed__wordpress-tv.json similarity index 100% rename from blocks/test/fixtures/core-embed__wordpress-tv.json rename to core-blocks/test/fixtures/core-embed__wordpress-tv.json diff --git a/blocks/test/fixtures/core-embed__wordpress-tv.parsed.json b/core-blocks/test/fixtures/core-embed__wordpress-tv.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__wordpress-tv.parsed.json rename to core-blocks/test/fixtures/core-embed__wordpress-tv.parsed.json diff --git a/blocks/test/fixtures/core-embed__wordpress-tv.serialized.html b/core-blocks/test/fixtures/core-embed__wordpress-tv.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__wordpress-tv.serialized.html rename to core-blocks/test/fixtures/core-embed__wordpress-tv.serialized.html diff --git a/blocks/test/fixtures/core-embed__wordpress.html b/core-blocks/test/fixtures/core-embed__wordpress.html similarity index 100% rename from blocks/test/fixtures/core-embed__wordpress.html rename to core-blocks/test/fixtures/core-embed__wordpress.html diff --git a/blocks/test/fixtures/core-embed__wordpress.json b/core-blocks/test/fixtures/core-embed__wordpress.json similarity index 100% rename from blocks/test/fixtures/core-embed__wordpress.json rename to core-blocks/test/fixtures/core-embed__wordpress.json diff --git a/blocks/test/fixtures/core-embed__wordpress.parsed.json b/core-blocks/test/fixtures/core-embed__wordpress.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__wordpress.parsed.json rename to core-blocks/test/fixtures/core-embed__wordpress.parsed.json diff --git a/blocks/test/fixtures/core-embed__wordpress.serialized.html b/core-blocks/test/fixtures/core-embed__wordpress.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__wordpress.serialized.html rename to core-blocks/test/fixtures/core-embed__wordpress.serialized.html diff --git a/blocks/test/fixtures/core-embed__youtube.html b/core-blocks/test/fixtures/core-embed__youtube.html similarity index 100% rename from blocks/test/fixtures/core-embed__youtube.html rename to core-blocks/test/fixtures/core-embed__youtube.html diff --git a/blocks/test/fixtures/core-embed__youtube.json b/core-blocks/test/fixtures/core-embed__youtube.json similarity index 100% rename from blocks/test/fixtures/core-embed__youtube.json rename to core-blocks/test/fixtures/core-embed__youtube.json diff --git a/blocks/test/fixtures/core-embed__youtube.parsed.json b/core-blocks/test/fixtures/core-embed__youtube.parsed.json similarity index 100% rename from blocks/test/fixtures/core-embed__youtube.parsed.json rename to core-blocks/test/fixtures/core-embed__youtube.parsed.json diff --git a/blocks/test/fixtures/core-embed__youtube.serialized.html b/core-blocks/test/fixtures/core-embed__youtube.serialized.html similarity index 100% rename from blocks/test/fixtures/core-embed__youtube.serialized.html rename to core-blocks/test/fixtures/core-embed__youtube.serialized.html diff --git a/blocks/test/fixtures/core__4-invalid-starting-letter.html b/core-blocks/test/fixtures/core__4-invalid-starting-letter.html similarity index 100% rename from blocks/test/fixtures/core__4-invalid-starting-letter.html rename to core-blocks/test/fixtures/core__4-invalid-starting-letter.html diff --git a/blocks/test/fixtures/core__4-invalid-starting-letter.json b/core-blocks/test/fixtures/core__4-invalid-starting-letter.json similarity index 100% rename from blocks/test/fixtures/core__4-invalid-starting-letter.json rename to core-blocks/test/fixtures/core__4-invalid-starting-letter.json diff --git a/blocks/test/fixtures/core__4-invalid-starting-letter.parsed.json b/core-blocks/test/fixtures/core__4-invalid-starting-letter.parsed.json similarity index 100% rename from blocks/test/fixtures/core__4-invalid-starting-letter.parsed.json rename to core-blocks/test/fixtures/core__4-invalid-starting-letter.parsed.json diff --git a/blocks/test/fixtures/core__4-invalid-starting-letter.serialized.html b/core-blocks/test/fixtures/core__4-invalid-starting-letter.serialized.html similarity index 100% rename from blocks/test/fixtures/core__4-invalid-starting-letter.serialized.html rename to core-blocks/test/fixtures/core__4-invalid-starting-letter.serialized.html diff --git a/blocks/test/fixtures/core__audio.html b/core-blocks/test/fixtures/core__audio.html similarity index 100% rename from blocks/test/fixtures/core__audio.html rename to core-blocks/test/fixtures/core__audio.html diff --git a/blocks/test/fixtures/core__audio.json b/core-blocks/test/fixtures/core__audio.json similarity index 100% rename from blocks/test/fixtures/core__audio.json rename to core-blocks/test/fixtures/core__audio.json diff --git a/blocks/test/fixtures/core__audio.parsed.json b/core-blocks/test/fixtures/core__audio.parsed.json similarity index 100% rename from blocks/test/fixtures/core__audio.parsed.json rename to core-blocks/test/fixtures/core__audio.parsed.json diff --git a/blocks/test/fixtures/core__audio.serialized.html b/core-blocks/test/fixtures/core__audio.serialized.html similarity index 100% rename from blocks/test/fixtures/core__audio.serialized.html rename to core-blocks/test/fixtures/core__audio.serialized.html diff --git a/blocks/test/fixtures/core__block.html b/core-blocks/test/fixtures/core__block.html similarity index 100% rename from blocks/test/fixtures/core__block.html rename to core-blocks/test/fixtures/core__block.html diff --git a/blocks/test/fixtures/core__block.json b/core-blocks/test/fixtures/core__block.json similarity index 100% rename from blocks/test/fixtures/core__block.json rename to core-blocks/test/fixtures/core__block.json diff --git a/blocks/test/fixtures/core__block.parsed.json b/core-blocks/test/fixtures/core__block.parsed.json similarity index 100% rename from blocks/test/fixtures/core__block.parsed.json rename to core-blocks/test/fixtures/core__block.parsed.json diff --git a/blocks/test/fixtures/core__block.serialized.html b/core-blocks/test/fixtures/core__block.serialized.html similarity index 100% rename from blocks/test/fixtures/core__block.serialized.html rename to core-blocks/test/fixtures/core__block.serialized.html diff --git a/blocks/test/fixtures/core__button__center.html b/core-blocks/test/fixtures/core__button__center.html similarity index 100% rename from blocks/test/fixtures/core__button__center.html rename to core-blocks/test/fixtures/core__button__center.html diff --git a/blocks/test/fixtures/core__button__center.json b/core-blocks/test/fixtures/core__button__center.json similarity index 100% rename from blocks/test/fixtures/core__button__center.json rename to core-blocks/test/fixtures/core__button__center.json diff --git a/blocks/test/fixtures/core__button__center.parsed.json b/core-blocks/test/fixtures/core__button__center.parsed.json similarity index 100% rename from blocks/test/fixtures/core__button__center.parsed.json rename to core-blocks/test/fixtures/core__button__center.parsed.json diff --git a/blocks/test/fixtures/core__button__center.serialized.html b/core-blocks/test/fixtures/core__button__center.serialized.html similarity index 100% rename from blocks/test/fixtures/core__button__center.serialized.html rename to core-blocks/test/fixtures/core__button__center.serialized.html diff --git a/blocks/test/fixtures/core__categories.html b/core-blocks/test/fixtures/core__categories.html similarity index 100% rename from blocks/test/fixtures/core__categories.html rename to core-blocks/test/fixtures/core__categories.html diff --git a/blocks/test/fixtures/core__categories.json b/core-blocks/test/fixtures/core__categories.json similarity index 100% rename from blocks/test/fixtures/core__categories.json rename to core-blocks/test/fixtures/core__categories.json diff --git a/blocks/test/fixtures/core__categories.parsed.json b/core-blocks/test/fixtures/core__categories.parsed.json similarity index 100% rename from blocks/test/fixtures/core__categories.parsed.json rename to core-blocks/test/fixtures/core__categories.parsed.json diff --git a/blocks/test/fixtures/core__categories.serialized.html b/core-blocks/test/fixtures/core__categories.serialized.html similarity index 100% rename from blocks/test/fixtures/core__categories.serialized.html rename to core-blocks/test/fixtures/core__categories.serialized.html diff --git a/blocks/test/fixtures/core__code.html b/core-blocks/test/fixtures/core__code.html similarity index 100% rename from blocks/test/fixtures/core__code.html rename to core-blocks/test/fixtures/core__code.html diff --git a/blocks/test/fixtures/core__code.json b/core-blocks/test/fixtures/core__code.json similarity index 100% rename from blocks/test/fixtures/core__code.json rename to core-blocks/test/fixtures/core__code.json diff --git a/blocks/test/fixtures/core__code.parsed.json b/core-blocks/test/fixtures/core__code.parsed.json similarity index 100% rename from blocks/test/fixtures/core__code.parsed.json rename to core-blocks/test/fixtures/core__code.parsed.json diff --git a/blocks/test/fixtures/core__code.serialized.html b/core-blocks/test/fixtures/core__code.serialized.html similarity index 100% rename from blocks/test/fixtures/core__code.serialized.html rename to core-blocks/test/fixtures/core__code.serialized.html diff --git a/blocks/test/fixtures/core__columns.html b/core-blocks/test/fixtures/core__columns.html similarity index 100% rename from blocks/test/fixtures/core__columns.html rename to core-blocks/test/fixtures/core__columns.html diff --git a/blocks/test/fixtures/core__columns.json b/core-blocks/test/fixtures/core__columns.json similarity index 100% rename from blocks/test/fixtures/core__columns.json rename to core-blocks/test/fixtures/core__columns.json diff --git a/blocks/test/fixtures/core__columns.parsed.json b/core-blocks/test/fixtures/core__columns.parsed.json similarity index 100% rename from blocks/test/fixtures/core__columns.parsed.json rename to core-blocks/test/fixtures/core__columns.parsed.json diff --git a/blocks/test/fixtures/core__columns.serialized.html b/core-blocks/test/fixtures/core__columns.serialized.html similarity index 100% rename from blocks/test/fixtures/core__columns.serialized.html rename to core-blocks/test/fixtures/core__columns.serialized.html diff --git a/blocks/test/fixtures/core__cover-image.html b/core-blocks/test/fixtures/core__cover-image.html similarity index 100% rename from blocks/test/fixtures/core__cover-image.html rename to core-blocks/test/fixtures/core__cover-image.html diff --git a/blocks/test/fixtures/core__cover-image.json b/core-blocks/test/fixtures/core__cover-image.json similarity index 100% rename from blocks/test/fixtures/core__cover-image.json rename to core-blocks/test/fixtures/core__cover-image.json diff --git a/blocks/test/fixtures/core__cover-image.parsed.json b/core-blocks/test/fixtures/core__cover-image.parsed.json similarity index 100% rename from blocks/test/fixtures/core__cover-image.parsed.json rename to core-blocks/test/fixtures/core__cover-image.parsed.json diff --git a/blocks/test/fixtures/core__cover-image.serialized.html b/core-blocks/test/fixtures/core__cover-image.serialized.html similarity index 100% rename from blocks/test/fixtures/core__cover-image.serialized.html rename to core-blocks/test/fixtures/core__cover-image.serialized.html diff --git a/blocks/test/fixtures/core__embed.html b/core-blocks/test/fixtures/core__embed.html similarity index 100% rename from blocks/test/fixtures/core__embed.html rename to core-blocks/test/fixtures/core__embed.html diff --git a/blocks/test/fixtures/core__embed.json b/core-blocks/test/fixtures/core__embed.json similarity index 100% rename from blocks/test/fixtures/core__embed.json rename to core-blocks/test/fixtures/core__embed.json diff --git a/blocks/test/fixtures/core__embed.parsed.json b/core-blocks/test/fixtures/core__embed.parsed.json similarity index 100% rename from blocks/test/fixtures/core__embed.parsed.json rename to core-blocks/test/fixtures/core__embed.parsed.json diff --git a/blocks/test/fixtures/core__embed.serialized.html b/core-blocks/test/fixtures/core__embed.serialized.html similarity index 100% rename from blocks/test/fixtures/core__embed.serialized.html rename to core-blocks/test/fixtures/core__embed.serialized.html diff --git a/blocks/test/fixtures/core__freeform.html b/core-blocks/test/fixtures/core__freeform.html similarity index 100% rename from blocks/test/fixtures/core__freeform.html rename to core-blocks/test/fixtures/core__freeform.html diff --git a/blocks/test/fixtures/core__freeform.json b/core-blocks/test/fixtures/core__freeform.json similarity index 100% rename from blocks/test/fixtures/core__freeform.json rename to core-blocks/test/fixtures/core__freeform.json diff --git a/blocks/test/fixtures/core__freeform.parsed.json b/core-blocks/test/fixtures/core__freeform.parsed.json similarity index 100% rename from blocks/test/fixtures/core__freeform.parsed.json rename to core-blocks/test/fixtures/core__freeform.parsed.json diff --git a/blocks/test/fixtures/core__freeform.serialized.html b/core-blocks/test/fixtures/core__freeform.serialized.html similarity index 100% rename from blocks/test/fixtures/core__freeform.serialized.html rename to core-blocks/test/fixtures/core__freeform.serialized.html diff --git a/blocks/test/fixtures/core__freeform__undelimited.html b/core-blocks/test/fixtures/core__freeform__undelimited.html similarity index 100% rename from blocks/test/fixtures/core__freeform__undelimited.html rename to core-blocks/test/fixtures/core__freeform__undelimited.html diff --git a/blocks/test/fixtures/core__freeform__undelimited.json b/core-blocks/test/fixtures/core__freeform__undelimited.json similarity index 100% rename from blocks/test/fixtures/core__freeform__undelimited.json rename to core-blocks/test/fixtures/core__freeform__undelimited.json diff --git a/blocks/test/fixtures/core__freeform__undelimited.parsed.json b/core-blocks/test/fixtures/core__freeform__undelimited.parsed.json similarity index 100% rename from blocks/test/fixtures/core__freeform__undelimited.parsed.json rename to core-blocks/test/fixtures/core__freeform__undelimited.parsed.json diff --git a/blocks/test/fixtures/core__freeform__undelimited.serialized.html b/core-blocks/test/fixtures/core__freeform__undelimited.serialized.html similarity index 100% rename from blocks/test/fixtures/core__freeform__undelimited.serialized.html rename to core-blocks/test/fixtures/core__freeform__undelimited.serialized.html diff --git a/blocks/test/fixtures/core__gallery.html b/core-blocks/test/fixtures/core__gallery.html similarity index 100% rename from blocks/test/fixtures/core__gallery.html rename to core-blocks/test/fixtures/core__gallery.html diff --git a/blocks/test/fixtures/core__gallery.json b/core-blocks/test/fixtures/core__gallery.json similarity index 100% rename from blocks/test/fixtures/core__gallery.json rename to core-blocks/test/fixtures/core__gallery.json diff --git a/blocks/test/fixtures/core__gallery.parsed.json b/core-blocks/test/fixtures/core__gallery.parsed.json similarity index 100% rename from blocks/test/fixtures/core__gallery.parsed.json rename to core-blocks/test/fixtures/core__gallery.parsed.json diff --git a/blocks/test/fixtures/core__gallery.serialized.html b/core-blocks/test/fixtures/core__gallery.serialized.html similarity index 100% rename from blocks/test/fixtures/core__gallery.serialized.html rename to core-blocks/test/fixtures/core__gallery.serialized.html diff --git a/blocks/test/fixtures/core__gallery__columns.html b/core-blocks/test/fixtures/core__gallery__columns.html similarity index 100% rename from blocks/test/fixtures/core__gallery__columns.html rename to core-blocks/test/fixtures/core__gallery__columns.html diff --git a/blocks/test/fixtures/core__gallery__columns.json b/core-blocks/test/fixtures/core__gallery__columns.json similarity index 100% rename from blocks/test/fixtures/core__gallery__columns.json rename to core-blocks/test/fixtures/core__gallery__columns.json diff --git a/blocks/test/fixtures/core__gallery__columns.parsed.json b/core-blocks/test/fixtures/core__gallery__columns.parsed.json similarity index 100% rename from blocks/test/fixtures/core__gallery__columns.parsed.json rename to core-blocks/test/fixtures/core__gallery__columns.parsed.json diff --git a/blocks/test/fixtures/core__gallery__columns.serialized.html b/core-blocks/test/fixtures/core__gallery__columns.serialized.html similarity index 100% rename from blocks/test/fixtures/core__gallery__columns.serialized.html rename to core-blocks/test/fixtures/core__gallery__columns.serialized.html diff --git a/blocks/test/fixtures/core__heading__h2-em.html b/core-blocks/test/fixtures/core__heading__h2-em.html similarity index 100% rename from blocks/test/fixtures/core__heading__h2-em.html rename to core-blocks/test/fixtures/core__heading__h2-em.html diff --git a/blocks/test/fixtures/core__heading__h2-em.json b/core-blocks/test/fixtures/core__heading__h2-em.json similarity index 100% rename from blocks/test/fixtures/core__heading__h2-em.json rename to core-blocks/test/fixtures/core__heading__h2-em.json diff --git a/blocks/test/fixtures/core__heading__h2-em.parsed.json b/core-blocks/test/fixtures/core__heading__h2-em.parsed.json similarity index 100% rename from blocks/test/fixtures/core__heading__h2-em.parsed.json rename to core-blocks/test/fixtures/core__heading__h2-em.parsed.json diff --git a/blocks/test/fixtures/core__heading__h2-em.serialized.html b/core-blocks/test/fixtures/core__heading__h2-em.serialized.html similarity index 100% rename from blocks/test/fixtures/core__heading__h2-em.serialized.html rename to core-blocks/test/fixtures/core__heading__h2-em.serialized.html diff --git a/blocks/test/fixtures/core__heading__h2.html b/core-blocks/test/fixtures/core__heading__h2.html similarity index 100% rename from blocks/test/fixtures/core__heading__h2.html rename to core-blocks/test/fixtures/core__heading__h2.html diff --git a/blocks/test/fixtures/core__heading__h2.json b/core-blocks/test/fixtures/core__heading__h2.json similarity index 100% rename from blocks/test/fixtures/core__heading__h2.json rename to core-blocks/test/fixtures/core__heading__h2.json diff --git a/blocks/test/fixtures/core__heading__h2.parsed.json b/core-blocks/test/fixtures/core__heading__h2.parsed.json similarity index 100% rename from blocks/test/fixtures/core__heading__h2.parsed.json rename to core-blocks/test/fixtures/core__heading__h2.parsed.json diff --git a/blocks/test/fixtures/core__heading__h2.serialized.html b/core-blocks/test/fixtures/core__heading__h2.serialized.html similarity index 100% rename from blocks/test/fixtures/core__heading__h2.serialized.html rename to core-blocks/test/fixtures/core__heading__h2.serialized.html diff --git a/blocks/test/fixtures/core__html.html b/core-blocks/test/fixtures/core__html.html similarity index 100% rename from blocks/test/fixtures/core__html.html rename to core-blocks/test/fixtures/core__html.html diff --git a/blocks/test/fixtures/core__html.json b/core-blocks/test/fixtures/core__html.json similarity index 100% rename from blocks/test/fixtures/core__html.json rename to core-blocks/test/fixtures/core__html.json diff --git a/blocks/test/fixtures/core__html.parsed.json b/core-blocks/test/fixtures/core__html.parsed.json similarity index 100% rename from blocks/test/fixtures/core__html.parsed.json rename to core-blocks/test/fixtures/core__html.parsed.json diff --git a/blocks/test/fixtures/core__html.serialized.html b/core-blocks/test/fixtures/core__html.serialized.html similarity index 100% rename from blocks/test/fixtures/core__html.serialized.html rename to core-blocks/test/fixtures/core__html.serialized.html diff --git a/blocks/test/fixtures/core__image.html b/core-blocks/test/fixtures/core__image.html similarity index 100% rename from blocks/test/fixtures/core__image.html rename to core-blocks/test/fixtures/core__image.html diff --git a/blocks/test/fixtures/core__image.json b/core-blocks/test/fixtures/core__image.json similarity index 100% rename from blocks/test/fixtures/core__image.json rename to core-blocks/test/fixtures/core__image.json diff --git a/blocks/test/fixtures/core__image.parsed.json b/core-blocks/test/fixtures/core__image.parsed.json similarity index 100% rename from blocks/test/fixtures/core__image.parsed.json rename to core-blocks/test/fixtures/core__image.parsed.json diff --git a/blocks/test/fixtures/core__image.serialized.html b/core-blocks/test/fixtures/core__image.serialized.html similarity index 100% rename from blocks/test/fixtures/core__image.serialized.html rename to core-blocks/test/fixtures/core__image.serialized.html diff --git a/blocks/test/fixtures/core__image__center-caption.html b/core-blocks/test/fixtures/core__image__center-caption.html similarity index 100% rename from blocks/test/fixtures/core__image__center-caption.html rename to core-blocks/test/fixtures/core__image__center-caption.html diff --git a/blocks/test/fixtures/core__image__center-caption.json b/core-blocks/test/fixtures/core__image__center-caption.json similarity index 100% rename from blocks/test/fixtures/core__image__center-caption.json rename to core-blocks/test/fixtures/core__image__center-caption.json diff --git a/blocks/test/fixtures/core__image__center-caption.parsed.json b/core-blocks/test/fixtures/core__image__center-caption.parsed.json similarity index 100% rename from blocks/test/fixtures/core__image__center-caption.parsed.json rename to core-blocks/test/fixtures/core__image__center-caption.parsed.json diff --git a/blocks/test/fixtures/core__image__center-caption.serialized.html b/core-blocks/test/fixtures/core__image__center-caption.serialized.html similarity index 100% rename from blocks/test/fixtures/core__image__center-caption.serialized.html rename to core-blocks/test/fixtures/core__image__center-caption.serialized.html diff --git a/blocks/test/fixtures/core__invalid-Capitals.html b/core-blocks/test/fixtures/core__invalid-Capitals.html similarity index 100% rename from blocks/test/fixtures/core__invalid-Capitals.html rename to core-blocks/test/fixtures/core__invalid-Capitals.html diff --git a/blocks/test/fixtures/core__invalid-Capitals.json b/core-blocks/test/fixtures/core__invalid-Capitals.json similarity index 100% rename from blocks/test/fixtures/core__invalid-Capitals.json rename to core-blocks/test/fixtures/core__invalid-Capitals.json diff --git a/blocks/test/fixtures/core__invalid-Capitals.parsed.json b/core-blocks/test/fixtures/core__invalid-Capitals.parsed.json similarity index 100% rename from blocks/test/fixtures/core__invalid-Capitals.parsed.json rename to core-blocks/test/fixtures/core__invalid-Capitals.parsed.json diff --git a/blocks/test/fixtures/core__invalid-Capitals.serialized.html b/core-blocks/test/fixtures/core__invalid-Capitals.serialized.html similarity index 100% rename from blocks/test/fixtures/core__invalid-Capitals.serialized.html rename to core-blocks/test/fixtures/core__invalid-Capitals.serialized.html diff --git a/blocks/test/fixtures/core__invalid-special.html b/core-blocks/test/fixtures/core__invalid-special.html similarity index 100% rename from blocks/test/fixtures/core__invalid-special.html rename to core-blocks/test/fixtures/core__invalid-special.html diff --git a/blocks/test/fixtures/core__invalid-special.json b/core-blocks/test/fixtures/core__invalid-special.json similarity index 100% rename from blocks/test/fixtures/core__invalid-special.json rename to core-blocks/test/fixtures/core__invalid-special.json diff --git a/blocks/test/fixtures/core__invalid-special.parsed.json b/core-blocks/test/fixtures/core__invalid-special.parsed.json similarity index 100% rename from blocks/test/fixtures/core__invalid-special.parsed.json rename to core-blocks/test/fixtures/core__invalid-special.parsed.json diff --git a/blocks/test/fixtures/core__invalid-special.serialized.html b/core-blocks/test/fixtures/core__invalid-special.serialized.html similarity index 100% rename from blocks/test/fixtures/core__invalid-special.serialized.html rename to core-blocks/test/fixtures/core__invalid-special.serialized.html diff --git a/blocks/test/fixtures/core__latest-posts.html b/core-blocks/test/fixtures/core__latest-posts.html similarity index 100% rename from blocks/test/fixtures/core__latest-posts.html rename to core-blocks/test/fixtures/core__latest-posts.html diff --git a/blocks/test/fixtures/core__latest-posts.json b/core-blocks/test/fixtures/core__latest-posts.json similarity index 100% rename from blocks/test/fixtures/core__latest-posts.json rename to core-blocks/test/fixtures/core__latest-posts.json diff --git a/blocks/test/fixtures/core__latest-posts.parsed.json b/core-blocks/test/fixtures/core__latest-posts.parsed.json similarity index 100% rename from blocks/test/fixtures/core__latest-posts.parsed.json rename to core-blocks/test/fixtures/core__latest-posts.parsed.json diff --git a/blocks/test/fixtures/core__latest-posts.serialized.html b/core-blocks/test/fixtures/core__latest-posts.serialized.html similarity index 100% rename from blocks/test/fixtures/core__latest-posts.serialized.html rename to core-blocks/test/fixtures/core__latest-posts.serialized.html diff --git a/blocks/test/fixtures/core__latest-posts__displayPostDate.html b/core-blocks/test/fixtures/core__latest-posts__displayPostDate.html similarity index 100% rename from blocks/test/fixtures/core__latest-posts__displayPostDate.html rename to core-blocks/test/fixtures/core__latest-posts__displayPostDate.html diff --git a/blocks/test/fixtures/core__latest-posts__displayPostDate.json b/core-blocks/test/fixtures/core__latest-posts__displayPostDate.json similarity index 100% rename from blocks/test/fixtures/core__latest-posts__displayPostDate.json rename to core-blocks/test/fixtures/core__latest-posts__displayPostDate.json diff --git a/blocks/test/fixtures/core__latest-posts__displayPostDate.parsed.json b/core-blocks/test/fixtures/core__latest-posts__displayPostDate.parsed.json similarity index 100% rename from blocks/test/fixtures/core__latest-posts__displayPostDate.parsed.json rename to core-blocks/test/fixtures/core__latest-posts__displayPostDate.parsed.json diff --git a/blocks/test/fixtures/core__latest-posts__displayPostDate.serialized.html b/core-blocks/test/fixtures/core__latest-posts__displayPostDate.serialized.html similarity index 100% rename from blocks/test/fixtures/core__latest-posts__displayPostDate.serialized.html rename to core-blocks/test/fixtures/core__latest-posts__displayPostDate.serialized.html diff --git a/blocks/test/fixtures/core__list__ul.html b/core-blocks/test/fixtures/core__list__ul.html similarity index 100% rename from blocks/test/fixtures/core__list__ul.html rename to core-blocks/test/fixtures/core__list__ul.html diff --git a/blocks/test/fixtures/core__list__ul.json b/core-blocks/test/fixtures/core__list__ul.json similarity index 100% rename from blocks/test/fixtures/core__list__ul.json rename to core-blocks/test/fixtures/core__list__ul.json diff --git a/blocks/test/fixtures/core__list__ul.parsed.json b/core-blocks/test/fixtures/core__list__ul.parsed.json similarity index 100% rename from blocks/test/fixtures/core__list__ul.parsed.json rename to core-blocks/test/fixtures/core__list__ul.parsed.json diff --git a/blocks/test/fixtures/core__list__ul.serialized.html b/core-blocks/test/fixtures/core__list__ul.serialized.html similarity index 100% rename from blocks/test/fixtures/core__list__ul.serialized.html rename to core-blocks/test/fixtures/core__list__ul.serialized.html diff --git a/blocks/test/fixtures/core__more.html b/core-blocks/test/fixtures/core__more.html similarity index 100% rename from blocks/test/fixtures/core__more.html rename to core-blocks/test/fixtures/core__more.html diff --git a/blocks/test/fixtures/core__more.json b/core-blocks/test/fixtures/core__more.json similarity index 100% rename from blocks/test/fixtures/core__more.json rename to core-blocks/test/fixtures/core__more.json diff --git a/blocks/test/fixtures/core__more.parsed.json b/core-blocks/test/fixtures/core__more.parsed.json similarity index 100% rename from blocks/test/fixtures/core__more.parsed.json rename to core-blocks/test/fixtures/core__more.parsed.json diff --git a/blocks/test/fixtures/core__more.serialized.html b/core-blocks/test/fixtures/core__more.serialized.html similarity index 100% rename from blocks/test/fixtures/core__more.serialized.html rename to core-blocks/test/fixtures/core__more.serialized.html diff --git a/blocks/test/fixtures/core__more__custom-text-teaser.html b/core-blocks/test/fixtures/core__more__custom-text-teaser.html similarity index 100% rename from blocks/test/fixtures/core__more__custom-text-teaser.html rename to core-blocks/test/fixtures/core__more__custom-text-teaser.html diff --git a/blocks/test/fixtures/core__more__custom-text-teaser.json b/core-blocks/test/fixtures/core__more__custom-text-teaser.json similarity index 100% rename from blocks/test/fixtures/core__more__custom-text-teaser.json rename to core-blocks/test/fixtures/core__more__custom-text-teaser.json diff --git a/blocks/test/fixtures/core__more__custom-text-teaser.parsed.json b/core-blocks/test/fixtures/core__more__custom-text-teaser.parsed.json similarity index 100% rename from blocks/test/fixtures/core__more__custom-text-teaser.parsed.json rename to core-blocks/test/fixtures/core__more__custom-text-teaser.parsed.json diff --git a/blocks/test/fixtures/core__more__custom-text-teaser.serialized.html b/core-blocks/test/fixtures/core__more__custom-text-teaser.serialized.html similarity index 100% rename from blocks/test/fixtures/core__more__custom-text-teaser.serialized.html rename to core-blocks/test/fixtures/core__more__custom-text-teaser.serialized.html diff --git a/blocks/test/fixtures/core__nextpage.html b/core-blocks/test/fixtures/core__nextpage.html similarity index 100% rename from blocks/test/fixtures/core__nextpage.html rename to core-blocks/test/fixtures/core__nextpage.html diff --git a/blocks/test/fixtures/core__nextpage.json b/core-blocks/test/fixtures/core__nextpage.json similarity index 100% rename from blocks/test/fixtures/core__nextpage.json rename to core-blocks/test/fixtures/core__nextpage.json diff --git a/blocks/test/fixtures/core__nextpage.parsed.json b/core-blocks/test/fixtures/core__nextpage.parsed.json similarity index 100% rename from blocks/test/fixtures/core__nextpage.parsed.json rename to core-blocks/test/fixtures/core__nextpage.parsed.json diff --git a/blocks/test/fixtures/core__nextpage.serialized.html b/core-blocks/test/fixtures/core__nextpage.serialized.html similarity index 100% rename from blocks/test/fixtures/core__nextpage.serialized.html rename to core-blocks/test/fixtures/core__nextpage.serialized.html diff --git a/blocks/test/fixtures/core__paragraph__align-right.html b/core-blocks/test/fixtures/core__paragraph__align-right.html similarity index 100% rename from blocks/test/fixtures/core__paragraph__align-right.html rename to core-blocks/test/fixtures/core__paragraph__align-right.html diff --git a/blocks/test/fixtures/core__paragraph__align-right.json b/core-blocks/test/fixtures/core__paragraph__align-right.json similarity index 100% rename from blocks/test/fixtures/core__paragraph__align-right.json rename to core-blocks/test/fixtures/core__paragraph__align-right.json diff --git a/blocks/test/fixtures/core__paragraph__align-right.parsed.json b/core-blocks/test/fixtures/core__paragraph__align-right.parsed.json similarity index 100% rename from blocks/test/fixtures/core__paragraph__align-right.parsed.json rename to core-blocks/test/fixtures/core__paragraph__align-right.parsed.json diff --git a/blocks/test/fixtures/core__paragraph__align-right.serialized.html b/core-blocks/test/fixtures/core__paragraph__align-right.serialized.html similarity index 100% rename from blocks/test/fixtures/core__paragraph__align-right.serialized.html rename to core-blocks/test/fixtures/core__paragraph__align-right.serialized.html diff --git a/blocks/test/fixtures/core__paragraph__deprecated.html b/core-blocks/test/fixtures/core__paragraph__deprecated.html similarity index 100% rename from blocks/test/fixtures/core__paragraph__deprecated.html rename to core-blocks/test/fixtures/core__paragraph__deprecated.html diff --git a/blocks/test/fixtures/core__paragraph__deprecated.json b/core-blocks/test/fixtures/core__paragraph__deprecated.json similarity index 100% rename from blocks/test/fixtures/core__paragraph__deprecated.json rename to core-blocks/test/fixtures/core__paragraph__deprecated.json diff --git a/blocks/test/fixtures/core__paragraph__deprecated.parsed.json b/core-blocks/test/fixtures/core__paragraph__deprecated.parsed.json similarity index 100% rename from blocks/test/fixtures/core__paragraph__deprecated.parsed.json rename to core-blocks/test/fixtures/core__paragraph__deprecated.parsed.json diff --git a/blocks/test/fixtures/core__paragraph__deprecated.serialized.html b/core-blocks/test/fixtures/core__paragraph__deprecated.serialized.html similarity index 100% rename from blocks/test/fixtures/core__paragraph__deprecated.serialized.html rename to core-blocks/test/fixtures/core__paragraph__deprecated.serialized.html diff --git a/blocks/test/fixtures/core__preformatted.html b/core-blocks/test/fixtures/core__preformatted.html similarity index 100% rename from blocks/test/fixtures/core__preformatted.html rename to core-blocks/test/fixtures/core__preformatted.html diff --git a/blocks/test/fixtures/core__preformatted.json b/core-blocks/test/fixtures/core__preformatted.json similarity index 100% rename from blocks/test/fixtures/core__preformatted.json rename to core-blocks/test/fixtures/core__preformatted.json diff --git a/blocks/test/fixtures/core__preformatted.parsed.json b/core-blocks/test/fixtures/core__preformatted.parsed.json similarity index 100% rename from blocks/test/fixtures/core__preformatted.parsed.json rename to core-blocks/test/fixtures/core__preformatted.parsed.json diff --git a/blocks/test/fixtures/core__preformatted.serialized.html b/core-blocks/test/fixtures/core__preformatted.serialized.html similarity index 100% rename from blocks/test/fixtures/core__preformatted.serialized.html rename to core-blocks/test/fixtures/core__preformatted.serialized.html diff --git a/blocks/test/fixtures/core__pullquote.html b/core-blocks/test/fixtures/core__pullquote.html similarity index 100% rename from blocks/test/fixtures/core__pullquote.html rename to core-blocks/test/fixtures/core__pullquote.html diff --git a/blocks/test/fixtures/core__pullquote.json b/core-blocks/test/fixtures/core__pullquote.json similarity index 100% rename from blocks/test/fixtures/core__pullquote.json rename to core-blocks/test/fixtures/core__pullquote.json diff --git a/blocks/test/fixtures/core__pullquote.parsed.json b/core-blocks/test/fixtures/core__pullquote.parsed.json similarity index 100% rename from blocks/test/fixtures/core__pullquote.parsed.json rename to core-blocks/test/fixtures/core__pullquote.parsed.json diff --git a/blocks/test/fixtures/core__pullquote.serialized.html b/core-blocks/test/fixtures/core__pullquote.serialized.html similarity index 100% rename from blocks/test/fixtures/core__pullquote.serialized.html rename to core-blocks/test/fixtures/core__pullquote.serialized.html diff --git a/blocks/test/fixtures/core__pullquote__multi-paragraph.html b/core-blocks/test/fixtures/core__pullquote__multi-paragraph.html similarity index 100% rename from blocks/test/fixtures/core__pullquote__multi-paragraph.html rename to core-blocks/test/fixtures/core__pullquote__multi-paragraph.html diff --git a/blocks/test/fixtures/core__pullquote__multi-paragraph.json b/core-blocks/test/fixtures/core__pullquote__multi-paragraph.json similarity index 100% rename from blocks/test/fixtures/core__pullquote__multi-paragraph.json rename to core-blocks/test/fixtures/core__pullquote__multi-paragraph.json diff --git a/blocks/test/fixtures/core__pullquote__multi-paragraph.parsed.json b/core-blocks/test/fixtures/core__pullquote__multi-paragraph.parsed.json similarity index 100% rename from blocks/test/fixtures/core__pullquote__multi-paragraph.parsed.json rename to core-blocks/test/fixtures/core__pullquote__multi-paragraph.parsed.json diff --git a/blocks/test/fixtures/core__pullquote__multi-paragraph.serialized.html b/core-blocks/test/fixtures/core__pullquote__multi-paragraph.serialized.html similarity index 100% rename from blocks/test/fixtures/core__pullquote__multi-paragraph.serialized.html rename to core-blocks/test/fixtures/core__pullquote__multi-paragraph.serialized.html diff --git a/blocks/test/fixtures/core__quote__style-1.html b/core-blocks/test/fixtures/core__quote__style-1.html similarity index 100% rename from blocks/test/fixtures/core__quote__style-1.html rename to core-blocks/test/fixtures/core__quote__style-1.html diff --git a/blocks/test/fixtures/core__quote__style-1.json b/core-blocks/test/fixtures/core__quote__style-1.json similarity index 100% rename from blocks/test/fixtures/core__quote__style-1.json rename to core-blocks/test/fixtures/core__quote__style-1.json diff --git a/blocks/test/fixtures/core__quote__style-1.parsed.json b/core-blocks/test/fixtures/core__quote__style-1.parsed.json similarity index 100% rename from blocks/test/fixtures/core__quote__style-1.parsed.json rename to core-blocks/test/fixtures/core__quote__style-1.parsed.json diff --git a/blocks/test/fixtures/core__quote__style-1.serialized.html b/core-blocks/test/fixtures/core__quote__style-1.serialized.html similarity index 100% rename from blocks/test/fixtures/core__quote__style-1.serialized.html rename to core-blocks/test/fixtures/core__quote__style-1.serialized.html diff --git a/blocks/test/fixtures/core__quote__style-2.html b/core-blocks/test/fixtures/core__quote__style-2.html similarity index 100% rename from blocks/test/fixtures/core__quote__style-2.html rename to core-blocks/test/fixtures/core__quote__style-2.html diff --git a/blocks/test/fixtures/core__quote__style-2.json b/core-blocks/test/fixtures/core__quote__style-2.json similarity index 100% rename from blocks/test/fixtures/core__quote__style-2.json rename to core-blocks/test/fixtures/core__quote__style-2.json diff --git a/blocks/test/fixtures/core__quote__style-2.parsed.json b/core-blocks/test/fixtures/core__quote__style-2.parsed.json similarity index 100% rename from blocks/test/fixtures/core__quote__style-2.parsed.json rename to core-blocks/test/fixtures/core__quote__style-2.parsed.json diff --git a/blocks/test/fixtures/core__quote__style-2.serialized.html b/core-blocks/test/fixtures/core__quote__style-2.serialized.html similarity index 100% rename from blocks/test/fixtures/core__quote__style-2.serialized.html rename to core-blocks/test/fixtures/core__quote__style-2.serialized.html diff --git a/blocks/test/fixtures/core__separator.html b/core-blocks/test/fixtures/core__separator.html similarity index 100% rename from blocks/test/fixtures/core__separator.html rename to core-blocks/test/fixtures/core__separator.html diff --git a/blocks/test/fixtures/core__separator.json b/core-blocks/test/fixtures/core__separator.json similarity index 100% rename from blocks/test/fixtures/core__separator.json rename to core-blocks/test/fixtures/core__separator.json diff --git a/blocks/test/fixtures/core__separator.parsed.json b/core-blocks/test/fixtures/core__separator.parsed.json similarity index 100% rename from blocks/test/fixtures/core__separator.parsed.json rename to core-blocks/test/fixtures/core__separator.parsed.json diff --git a/blocks/test/fixtures/core__separator.serialized.html b/core-blocks/test/fixtures/core__separator.serialized.html similarity index 100% rename from blocks/test/fixtures/core__separator.serialized.html rename to core-blocks/test/fixtures/core__separator.serialized.html diff --git a/blocks/test/fixtures/core__shortcode.html b/core-blocks/test/fixtures/core__shortcode.html similarity index 100% rename from blocks/test/fixtures/core__shortcode.html rename to core-blocks/test/fixtures/core__shortcode.html diff --git a/blocks/test/fixtures/core__shortcode.json b/core-blocks/test/fixtures/core__shortcode.json similarity index 100% rename from blocks/test/fixtures/core__shortcode.json rename to core-blocks/test/fixtures/core__shortcode.json diff --git a/blocks/test/fixtures/core__shortcode.parsed.json b/core-blocks/test/fixtures/core__shortcode.parsed.json similarity index 100% rename from blocks/test/fixtures/core__shortcode.parsed.json rename to core-blocks/test/fixtures/core__shortcode.parsed.json diff --git a/blocks/test/fixtures/core__shortcode.serialized.html b/core-blocks/test/fixtures/core__shortcode.serialized.html similarity index 100% rename from blocks/test/fixtures/core__shortcode.serialized.html rename to core-blocks/test/fixtures/core__shortcode.serialized.html diff --git a/blocks/test/fixtures/core__subhead.html b/core-blocks/test/fixtures/core__subhead.html similarity index 100% rename from blocks/test/fixtures/core__subhead.html rename to core-blocks/test/fixtures/core__subhead.html diff --git a/blocks/test/fixtures/core__subhead.json b/core-blocks/test/fixtures/core__subhead.json similarity index 100% rename from blocks/test/fixtures/core__subhead.json rename to core-blocks/test/fixtures/core__subhead.json diff --git a/blocks/test/fixtures/core__subhead.parsed.json b/core-blocks/test/fixtures/core__subhead.parsed.json similarity index 100% rename from blocks/test/fixtures/core__subhead.parsed.json rename to core-blocks/test/fixtures/core__subhead.parsed.json diff --git a/blocks/test/fixtures/core__subhead.serialized.html b/core-blocks/test/fixtures/core__subhead.serialized.html similarity index 100% rename from blocks/test/fixtures/core__subhead.serialized.html rename to core-blocks/test/fixtures/core__subhead.serialized.html diff --git a/blocks/test/fixtures/core__table.html b/core-blocks/test/fixtures/core__table.html similarity index 100% rename from blocks/test/fixtures/core__table.html rename to core-blocks/test/fixtures/core__table.html diff --git a/blocks/test/fixtures/core__table.json b/core-blocks/test/fixtures/core__table.json similarity index 100% rename from blocks/test/fixtures/core__table.json rename to core-blocks/test/fixtures/core__table.json diff --git a/blocks/test/fixtures/core__table.parsed.json b/core-blocks/test/fixtures/core__table.parsed.json similarity index 100% rename from blocks/test/fixtures/core__table.parsed.json rename to core-blocks/test/fixtures/core__table.parsed.json diff --git a/blocks/test/fixtures/core__table.serialized.html b/core-blocks/test/fixtures/core__table.serialized.html similarity index 100% rename from blocks/test/fixtures/core__table.serialized.html rename to core-blocks/test/fixtures/core__table.serialized.html diff --git a/blocks/test/fixtures/core__text-columns.html b/core-blocks/test/fixtures/core__text-columns.html similarity index 100% rename from blocks/test/fixtures/core__text-columns.html rename to core-blocks/test/fixtures/core__text-columns.html diff --git a/blocks/test/fixtures/core__text-columns.json b/core-blocks/test/fixtures/core__text-columns.json similarity index 100% rename from blocks/test/fixtures/core__text-columns.json rename to core-blocks/test/fixtures/core__text-columns.json diff --git a/blocks/test/fixtures/core__text-columns.parsed.json b/core-blocks/test/fixtures/core__text-columns.parsed.json similarity index 100% rename from blocks/test/fixtures/core__text-columns.parsed.json rename to core-blocks/test/fixtures/core__text-columns.parsed.json diff --git a/blocks/test/fixtures/core__text-columns.serialized.html b/core-blocks/test/fixtures/core__text-columns.serialized.html similarity index 100% rename from blocks/test/fixtures/core__text-columns.serialized.html rename to core-blocks/test/fixtures/core__text-columns.serialized.html diff --git a/blocks/test/fixtures/core__text__converts-to-paragraph.html b/core-blocks/test/fixtures/core__text__converts-to-paragraph.html similarity index 100% rename from blocks/test/fixtures/core__text__converts-to-paragraph.html rename to core-blocks/test/fixtures/core__text__converts-to-paragraph.html diff --git a/blocks/test/fixtures/core__text__converts-to-paragraph.json b/core-blocks/test/fixtures/core__text__converts-to-paragraph.json similarity index 100% rename from blocks/test/fixtures/core__text__converts-to-paragraph.json rename to core-blocks/test/fixtures/core__text__converts-to-paragraph.json diff --git a/blocks/test/fixtures/core__text__converts-to-paragraph.parsed.json b/core-blocks/test/fixtures/core__text__converts-to-paragraph.parsed.json similarity index 100% rename from blocks/test/fixtures/core__text__converts-to-paragraph.parsed.json rename to core-blocks/test/fixtures/core__text__converts-to-paragraph.parsed.json diff --git a/blocks/test/fixtures/core__text__converts-to-paragraph.serialized.html b/core-blocks/test/fixtures/core__text__converts-to-paragraph.serialized.html similarity index 100% rename from blocks/test/fixtures/core__text__converts-to-paragraph.serialized.html rename to core-blocks/test/fixtures/core__text__converts-to-paragraph.serialized.html diff --git a/blocks/test/fixtures/core__verse.html b/core-blocks/test/fixtures/core__verse.html similarity index 100% rename from blocks/test/fixtures/core__verse.html rename to core-blocks/test/fixtures/core__verse.html diff --git a/blocks/test/fixtures/core__verse.json b/core-blocks/test/fixtures/core__verse.json similarity index 100% rename from blocks/test/fixtures/core__verse.json rename to core-blocks/test/fixtures/core__verse.json diff --git a/blocks/test/fixtures/core__verse.parsed.json b/core-blocks/test/fixtures/core__verse.parsed.json similarity index 100% rename from blocks/test/fixtures/core__verse.parsed.json rename to core-blocks/test/fixtures/core__verse.parsed.json diff --git a/blocks/test/fixtures/core__verse.serialized.html b/core-blocks/test/fixtures/core__verse.serialized.html similarity index 100% rename from blocks/test/fixtures/core__verse.serialized.html rename to core-blocks/test/fixtures/core__verse.serialized.html diff --git a/blocks/test/fixtures/core__video.html b/core-blocks/test/fixtures/core__video.html similarity index 100% rename from blocks/test/fixtures/core__video.html rename to core-blocks/test/fixtures/core__video.html diff --git a/blocks/test/fixtures/core__video.json b/core-blocks/test/fixtures/core__video.json similarity index 100% rename from blocks/test/fixtures/core__video.json rename to core-blocks/test/fixtures/core__video.json diff --git a/blocks/test/fixtures/core__video.parsed.json b/core-blocks/test/fixtures/core__video.parsed.json similarity index 100% rename from blocks/test/fixtures/core__video.parsed.json rename to core-blocks/test/fixtures/core__video.parsed.json diff --git a/blocks/test/fixtures/core__video.serialized.html b/core-blocks/test/fixtures/core__video.serialized.html similarity index 100% rename from blocks/test/fixtures/core__video.serialized.html rename to core-blocks/test/fixtures/core__video.serialized.html diff --git a/blocks/test/full-content.js b/core-blocks/test/full-content.js similarity index 96% rename from blocks/test/full-content.js rename to core-blocks/test/full-content.js index 4ebde728fd1241..ab0154941d923e 100644 --- a/blocks/test/full-content.js +++ b/core-blocks/test/full-content.js @@ -6,14 +6,16 @@ import path from 'path'; import { uniq, isObject, omit, startsWith, get } from 'lodash'; import { format } from 'util'; +/** + * WordPress dependencies + */ +import { getBlockTypes, parse, serialize } from '@wordpress/blocks'; + /** * Internal dependencies */ -import { registerCoreBlocks } from '../library'; -import parse from '../api/parser'; -import { parse as grammarParse } from '../api/post.pegjs'; -import serialize from '../api/serializer'; -import { getBlockTypes } from '../api/registration'; +import { registerCoreBlocks } from '../'; +import { parse as grammarParse } from '../../blocks/api/post.pegjs'; const fixturesDir = path.join( __dirname, 'fixtures' ); diff --git a/blocks/test/helpers/index.js b/core-blocks/test/helpers/index.js similarity index 78% rename from blocks/test/helpers/index.js rename to core-blocks/test/helpers/index.js index f46573240df852..6c46e31e213d58 100644 --- a/blocks/test/helpers/index.js +++ b/core-blocks/test/helpers/index.js @@ -5,14 +5,16 @@ import { render } from 'enzyme'; import { noop } from 'lodash'; /** - * Internal dependencies + * WordPress dependencies */ import { createBlock, getBlockType, registerBlockType, -} from '../..'; -import { BlockEdit } from '../../block-edit'; +} from '@wordpress/blocks'; + +// Hack to avoid the wrapping HoCs. +import { BlockEdit } from '../../../blocks/block-edit'; export const blockEditRender = ( name, settings ) => { if ( ! getBlockType( name ) ) { diff --git a/blocks/test/server-registered.json b/core-blocks/test/server-registered.json similarity index 100% rename from blocks/test/server-registered.json rename to core-blocks/test/server-registered.json diff --git a/blocks/library/text-columns/editor.scss b/core-blocks/text-columns/editor.scss similarity index 100% rename from blocks/library/text-columns/editor.scss rename to core-blocks/text-columns/editor.scss diff --git a/blocks/library/text-columns/index.js b/core-blocks/text-columns/index.js similarity index 93% rename from blocks/library/text-columns/index.js rename to core-blocks/text-columns/index.js index 95bf33280dc0c8..8b44f50f7f6f1f 100644 --- a/blocks/library/text-columns/index.js +++ b/core-blocks/text-columns/index.js @@ -9,16 +9,18 @@ import { times } from 'lodash'; import { __ } from '@wordpress/i18n'; import { PanelBody, RangeControl, withState } from '@wordpress/components'; import { Fragment } from '@wordpress/element'; +import { + BlockControls, + BlockAlignmentToolbar, + InspectorControls, + RichText, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './style.scss'; import './editor.scss'; -import BlockControls from '../../block-controls'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; -import RichText from '../../rich-text'; -import InspectorControls from '../../inspector-controls'; export const name = 'core/text-columns'; diff --git a/blocks/library/text-columns/style.scss b/core-blocks/text-columns/style.scss similarity index 100% rename from blocks/library/text-columns/style.scss rename to core-blocks/text-columns/style.scss diff --git a/blocks/library/text-columns/test/__snapshots__/index.js.snap b/core-blocks/text-columns/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/text-columns/test/__snapshots__/index.js.snap rename to core-blocks/text-columns/test/__snapshots__/index.js.snap diff --git a/blocks/library/text-columns/test/index.js b/core-blocks/text-columns/test/index.js similarity index 82% rename from blocks/library/text-columns/test/index.js rename to core-blocks/text-columns/test/index.js index 6a94d0a8487b5e..9c9dda8ee8ccea 100644 --- a/blocks/library/text-columns/test/index.js +++ b/core-blocks/text-columns/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/text-columns', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/verse/editor.scss b/core-blocks/verse/editor.scss similarity index 100% rename from blocks/library/verse/editor.scss rename to core-blocks/verse/editor.scss diff --git a/blocks/library/verse/index.js b/core-blocks/verse/index.js similarity index 94% rename from blocks/library/verse/index.js rename to core-blocks/verse/index.js index e0981152217a62..f520e72f126366 100644 --- a/blocks/library/verse/index.js +++ b/core-blocks/verse/index.js @@ -2,13 +2,15 @@ * WordPress */ import { __ } from '@wordpress/i18n'; +import { + createBlock, + RichText, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './editor.scss'; -import { createBlock } from '../../api'; -import RichText from '../../rich-text'; export const name = 'core/verse'; diff --git a/blocks/library/verse/test/__snapshots__/index.js.snap b/core-blocks/verse/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/verse/test/__snapshots__/index.js.snap rename to core-blocks/verse/test/__snapshots__/index.js.snap diff --git a/blocks/library/verse/test/index.js b/core-blocks/verse/test/index.js similarity index 82% rename from blocks/library/verse/test/index.js rename to core-blocks/verse/test/index.js index f5df7557f9ad52..e1150b440fdc44 100644 --- a/blocks/library/verse/test/index.js +++ b/core-blocks/verse/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/verse', () => { test( 'block edit matches snapshot', () => { diff --git a/blocks/library/video/editor.scss b/core-blocks/video/editor.scss similarity index 100% rename from blocks/library/video/editor.scss rename to core-blocks/video/editor.scss diff --git a/blocks/library/video/index.js b/core-blocks/video/index.js similarity index 95% rename from blocks/library/video/index.js rename to core-blocks/video/index.js index 0492d301762a86..ce88df821c5388 100644 --- a/blocks/library/video/index.js +++ b/core-blocks/video/index.js @@ -14,17 +14,19 @@ import { Toolbar, } from '@wordpress/components'; import { Component, Fragment } from '@wordpress/element'; +import { + editorMediaUpload, + BlockAlignmentToolbar, + BlockControls, + MediaUpload, + RichText, +} from '@wordpress/blocks'; /** * Internal dependencies */ import './style.scss'; import './editor.scss'; -import editorMediaUpload from '../../editor-media-upload'; -import MediaUpload from '../../media-upload'; -import RichText from '../../rich-text'; -import BlockControls from '../../block-controls'; -import BlockAlignmentToolbar from '../../block-alignment-toolbar'; export const name = 'core/video'; diff --git a/blocks/library/video/style.scss b/core-blocks/video/style.scss similarity index 100% rename from blocks/library/video/style.scss rename to core-blocks/video/style.scss diff --git a/blocks/library/video/test/__snapshots__/index.js.snap b/core-blocks/video/test/__snapshots__/index.js.snap similarity index 100% rename from blocks/library/video/test/__snapshots__/index.js.snap rename to core-blocks/video/test/__snapshots__/index.js.snap diff --git a/blocks/library/video/test/index.js b/core-blocks/video/test/index.js similarity index 82% rename from blocks/library/video/test/index.js rename to core-blocks/video/test/index.js index 2c21fb5fe7f0aa..a947f278a58826 100644 --- a/blocks/library/video/test/index.js +++ b/core-blocks/video/test/index.js @@ -2,7 +2,7 @@ * Internal dependencies */ import { name, settings } from '../'; -import { blockEditRender } from 'blocks/test/helpers'; +import { blockEditRender } from '../../test/helpers'; describe( 'core/video', () => { test( 'block edit matches snapshot', () => { diff --git a/docs/blocks/generate-blocks-with-wp-cli.md b/docs/blocks/generate-blocks-with-wp-cli.md index ae22e314cc1be3..ec74f38098e19f 100644 --- a/docs/blocks/generate-blocks-with-wp-cli.md +++ b/docs/blocks/generate-blocks-with-wp-cli.md @@ -5,11 +5,11 @@ It turns out that writing the simplest possible block which contains only static - [zgordon/gutenberg-course](https://github.com/zgordon/gutenberg-course) - a repository for Zac Gordon's Gutenberg Development Course - [ahmadawais/Gutenberg-Boilerplate](https://github.com/ahmadawais/Gutenberg-Boilerplate) - an inline documented starter WordPress plugin for the new Gutenberg editor -It might be also a good idea to browse the folder with [all core blocks](https://github.com/WordPress/gutenberg/tree/master/blocks/library) to see how they are implemented. +It might be also a good idea to browse the folder with [all core blocks](https://github.com/WordPress/gutenberg/tree/master/core-blocks) to see how they are implemented. ## WP-CLI -Another way of making developer's life easier is to use [WP-CLI](http://wp-cli.org/), which provides a command-line interface for many actions you might perform on the WordPress instance. One of the commands generates all the code required to register a Gutenberg block for a plugin or theme. +Another way of making developer's life easier is to use [WP-CLI](http://wp-cli.org/), which provides a command-line interface for many actions you might perform on the WordPress instance. One of the commands generates all the code required to register a Gutenberg block for a plugin or theme. ### Installing diff --git a/docs/reference/deprecated.md b/docs/reference/deprecated.md index 97b9d25eff1475..f270eb5ea7b4fa 100644 --- a/docs/reference/deprecated.md +++ b/docs/reference/deprecated.md @@ -1,5 +1,9 @@ Gutenberg's deprecation policy is intended to support backwards-compatibility for two minor 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. +## 3.0.0 + +- `wp.blocks.registerCoreBlocks` function removed. Please use `wp.coreBlocks.registerCoreBlocks` instead. + ## 2.8.0 - `Original autocompleter interface in wp.components.Autocomplete` updated. Please use `latest autocompleter interface` instead. See: https://github.com/WordPress/gutenberg/blob/master/components/autocomplete/README.md. diff --git a/editor/components/block-switcher/test/index.js b/editor/components/block-switcher/test/index.js index 156f419a72f22b..16d6ee17207259 100644 --- a/editor/components/block-switcher/test/index.js +++ b/editor/components/block-switcher/test/index.js @@ -6,7 +6,7 @@ import { shallow } from 'enzyme'; /** * WordPress dependencies */ -import { registerCoreBlocks } from '@wordpress/blocks'; +import { registerCoreBlocks } from '@wordpress/core-blocks'; import { keycodes } from '@wordpress/utils'; /** diff --git a/editor/components/document-outline/test/index.js b/editor/components/document-outline/test/index.js index 7151d044a5dbe5..a0b922b3b1f04a 100644 --- a/editor/components/document-outline/test/index.js +++ b/editor/components/document-outline/test/index.js @@ -6,7 +6,8 @@ import { mount, shallow } from 'enzyme'; /** * WordPress dependencies */ -import { createBlock, registerCoreBlocks } from '@wordpress/blocks'; +import { createBlock } from '@wordpress/blocks'; +import { registerCoreBlocks } from '@wordpress/core-blocks'; /** * Internal dependencies diff --git a/editor/store/test/reducer.js b/editor/store/test/reducer.js index c326a2ce433295..005173b127b791 100644 --- a/editor/store/test/reducer.js +++ b/editor/store/test/reducer.js @@ -8,11 +8,11 @@ import deepFreeze from 'deep-freeze'; * WordPress dependencies */ import { - registerCoreBlocks, registerBlockType, unregisterBlockType, createBlock, } from '@wordpress/blocks'; +import { registerCoreBlocks } from '@wordpress/core-blocks'; /** * Internal dependencies diff --git a/editor/store/test/selectors.js b/editor/store/test/selectors.js index da5d934eb97867..53aa2a2bcfd594 100644 --- a/editor/store/test/selectors.js +++ b/editor/store/test/selectors.js @@ -7,8 +7,9 @@ import { filter, property, union } from 'lodash'; * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { registerBlockType, unregisterBlockType, registerCoreBlocks, getBlockTypes } from '@wordpress/blocks'; +import { registerBlockType, unregisterBlockType, getBlockTypes } from '@wordpress/blocks'; import { moment } from '@wordpress/date'; +import { registerCoreBlocks } from '@wordpress/core-blocks'; /** * Internal dependencies diff --git a/lib/client-assets.php b/lib/client-assets.php index bb52445e67ead3..fabab189b76408 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -163,7 +163,7 @@ function gutenberg_register_scripts_and_styles() { wp_register_script( 'wp-blocks', gutenberg_url( 'blocks/build/index.js' ), - array( 'wp-element', 'wp-components', 'wp-utils', 'wp-hooks', 'wp-i18n', 'tinymce-latest', 'tinymce-latest-lists', 'tinymce-latest-paste', 'tinymce-latest-table', 'shortcode', 'editor', 'wp-core-data', 'lodash' ), + array( 'wp-element', 'wp-components', 'wp-utils', 'wp-hooks', 'wp-i18n', 'tinymce-latest', 'tinymce-latest-lists', 'tinymce-latest-paste', 'tinymce-latest-table', 'shortcode', 'wp-core-data', 'lodash' ), filemtime( gutenberg_dir_path() . 'blocks/build/index.js' ), true ); @@ -182,9 +182,16 @@ function gutenberg_register_scripts_and_styles() { filemtime( gutenberg_dir_path() . 'viewport/build/index.js' ), true ); + wp_register_script( + 'wp-core-blocks', + gutenberg_url( 'core-blocks/build/index.js' ), + array( 'wp-element', 'wp-components', 'wp-utils', 'wp-blocks', 'wp-i18n', 'editor', 'wp-core-data', 'lodash' ), + filemtime( gutenberg_dir_path() . 'core-blocks/build/index.js' ), + true + ); // Loading the old editor and its config to ensure the classic block works as expected. wp_add_inline_script( - 'wp-blocks', 'window.wp.oldEditor = window.wp.editor;', 'before' + 'wp-core-blocks', 'window.wp.oldEditor = window.wp.editor;', 'before' ); $tinymce_settings = apply_filters( 'tiny_mce_before_init', array( 'plugins' => implode( ',', array_unique( apply_filters( 'tiny_mce_plugins', array( @@ -243,7 +250,7 @@ function gutenberg_register_scripts_and_styles() { // Decode the options as we used to recommende json_encoding the TinyMCE settings. $tinymce_settings['style_formats'] = json_decode( $tinymce_settings['style_formats'] ); } - wp_localize_script( 'wp-blocks', 'wpEditorL10n', array( + wp_localize_script( 'wp-core-blocks', 'wpEditorL10n', array( 'tinymce' => array( 'baseURL' => includes_url( 'js/tinymce' ), 'suffix' => SCRIPT_DEBUG ? '' : '.min', @@ -279,7 +286,7 @@ function gutenberg_register_scripts_and_styles() { wp_register_script( 'wp-edit-post', gutenberg_url( 'edit-post/build/index.js' ), - array( 'jquery', 'media-views', 'media-models', 'wp-element', 'wp-components', 'wp-editor', 'wp-i18n', 'wp-date', 'wp-utils', 'wp-data', 'wp-embed', 'wp-viewport', 'wp-plugins', 'lodash' ), + array( 'jquery', 'media-views', 'media-models', 'wp-element', 'wp-components', 'wp-editor', 'wp-i18n', 'wp-date', 'wp-utils', 'wp-data', 'wp-embed', 'wp-viewport', 'wp-plugins', 'wp-core-blocks', 'lodash' ), filemtime( gutenberg_dir_path() . 'edit-post/build/index.js' ), true ); @@ -298,7 +305,7 @@ function gutenberg_register_scripts_and_styles() { wp_register_style( 'wp-editor', gutenberg_url( 'editor/build/style.css' ), - array( 'wp-components', 'wp-blocks', 'wp-edit-blocks', 'wp-editor-font' ), + array( 'wp-components', 'wp-blocks', 'wp-editor-font' ), filemtime( gutenberg_dir_path() . 'editor/build/style.css' ) ); wp_style_add_data( 'wp-editor', 'rtl', 'replace' ); @@ -306,7 +313,7 @@ function gutenberg_register_scripts_and_styles() { wp_register_style( 'wp-edit-post', gutenberg_url( 'edit-post/build/style.css' ), - array( 'wp-components', 'wp-editor' ), + array( 'wp-components', 'wp-editor', 'wp-edit-blocks', 'wp-core-blocks' ), filemtime( gutenberg_dir_path() . 'edit-post/build/style.css' ) ); wp_style_add_data( 'wp-edit-post', 'rtl', 'replace' ); @@ -328,10 +335,18 @@ function gutenberg_register_scripts_and_styles() { wp_style_add_data( 'wp-blocks', 'rtl', 'replace' ); wp_register_style( - 'wp-edit-blocks', - gutenberg_url( 'blocks/build/edit-blocks.css' ), + 'wp-core-blocks', + gutenberg_url( 'core-blocks/build/style.css' ), array(), - filemtime( gutenberg_dir_path() . 'blocks/build/edit-blocks.css' ) + filemtime( gutenberg_dir_path() . 'core-blocks/build/style.css' ) + ); + wp_style_add_data( 'wp-core-blocks', 'rtl', 'replace' ); + + wp_register_style( + 'wp-edit-blocks', + gutenberg_url( 'core-blocks/build/edit-blocks.css' ), + array( 'wp-components', 'wp-blocks' ), + filemtime( gutenberg_dir_path() . 'core-blocks/build/edit-blocks.css' ) ); wp_style_add_data( 'wp-edit-blocks', 'rtl', 'replace' ); @@ -714,7 +729,7 @@ function gutenberg_prepare_blocks_for_js() { */ function gutenberg_common_scripts_and_styles() { // Enqueue basic styles built out of Gutenberg through `npm build`. - wp_enqueue_style( 'wp-blocks' ); + wp_enqueue_style( 'wp-core-blocks' ); /* * Enqueue block styles built through plugins. This lives in a separate @@ -965,7 +980,7 @@ function gutenberg_editor_scripts_and_styles( $hook ) { $script .= sprintf( 'var editorSettings = %s;', wp_json_encode( $editor_settings ) ); $script .= << blocks/test/server-registered.json", + "fixtures:server-registered": "docker-compose run -w /var/www/html/wp-content/plugins/gutenberg --rm wordpress ./bin/get-server-blocks.php > core-blocks/test/server-registered.json", "fixtures:generate": "npm run fixtures:server-registered && cross-env GENERATE_MISSING_FIXTURES=y npm run test-unit", "fixtures:regenerate": "npm run fixtures:clean && npm run fixtures:generate", "package-plugin": "./bin/build-plugin-zip.sh", diff --git a/phpcs.xml.dist b/phpcs.xml.dist index ba92711ca12283..27b7a13c084242 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -14,7 +14,7 @@ ./bin - ./blocks/library + ./core-blocks ./lib ./lib/parser.php ./phpunit diff --git a/phpunit/class-parsing-test.php b/phpunit/class-parsing-test.php index cb1c2e9032b13a..cce4dbdfa6c1b7 100644 --- a/phpunit/class-parsing-test.php +++ b/phpunit/class-parsing-test.php @@ -9,7 +9,7 @@ class Parsing_Test extends WP_UnitTestCase { protected static $fixtures_dir; function parsing_test_filenames() { - self::$fixtures_dir = dirname( dirname( __FILE__ ) ) . '/blocks/test/fixtures'; + self::$fixtures_dir = dirname( dirname( __FILE__ ) ) . '/core-blocks/test/fixtures'; require_once dirname( dirname( __FILE__ ) ) . '/lib/parser.php'; diff --git a/test/unit/jest.config.json b/test/unit/jest.config.json index 0146f21fa39734..3e309518c9f76d 100644 --- a/test/unit/jest.config.json +++ b/test/unit/jest.config.json @@ -1,10 +1,10 @@ { "rootDir": "../../", "collectCoverageFrom": [ - "(blocks|components|date|editor|element|data|utils|edit-post|viewport|plugins|core-data)/**/*.js" + "(blocks|components|date|editor|element|data|utils|edit-post|viewport|plugins|core-data|core-blocks)/**/*.js" ], "moduleNameMapper": { - "@wordpress\\/(blocks|components|date|editor|element|data|utils|edit-post|viewport|plugins|core-data)": "$1" + "@wordpress\\/(blocks|components|date|editor|element|data|utils|edit-post|viewport|plugins|core-data|core-blocks)": "$1" }, "preset": "@wordpress/jest-preset-default", "setupFiles": [ diff --git a/test/unit/setup-blocks.js b/test/unit/setup-blocks.js index 5bab169511a653..7b21787ebfea84 100644 --- a/test/unit/setup-blocks.js +++ b/test/unit/setup-blocks.js @@ -1,2 +1,2 @@ // Bootstrap server-registered blocks -global.window._wpBlocks = require( 'blocks/test/server-registered.json' ); +global.window._wpBlocks = require( 'core-blocks/test/server-registered.json' ); diff --git a/test/unit/setup-wp-aliases.js b/test/unit/setup-wp-aliases.js index 2613588a99d5aa..339e0947c1b2f1 100644 --- a/test/unit/setup-wp-aliases.js +++ b/test/unit/setup-wp-aliases.js @@ -15,6 +15,7 @@ global.wp = { 'editor', 'data', 'core-data', + 'core-blocks', 'edit-post', 'viewport', 'plugins', diff --git a/webpack.config.js b/webpack.config.js index bf9b00b68afc2e..993d50723359e7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -18,12 +18,12 @@ const mainCSSExtractTextPlugin = new ExtractTextPlugin( { // CSS loader for styles specific to block editing. const editBlocksCSSPlugin = new ExtractTextPlugin( { - filename: './blocks/build/edit-blocks.css', + filename: './core-blocks/build/edit-blocks.css', } ); // CSS loader for styles specific to blocks in general. const blocksCSSPlugin = new ExtractTextPlugin( { - filename: './blocks/build/style.css', + filename: './core-blocks/build/style.css', } ); // Configuration for the ExtractTextPlugin. @@ -79,6 +79,7 @@ const entryPointNames = [ 'core-data', 'plugins', 'edit-post', + 'core-blocks', ]; const packageNames = [ @@ -154,21 +155,21 @@ const config = { { test: /style\.s?css$/, include: [ - /blocks/, + /core-blocks/, ], use: blocksCSSPlugin.extract( extractConfig ), }, { test: /editor\.s?css$/, include: [ - /blocks/, + /core-blocks/, ], use: editBlocksCSSPlugin.extract( extractConfig ), }, { test: /\.s?css$/, exclude: [ - /blocks/, + /core-blocks/, ], use: mainCSSExtractTextPlugin.extract( extractConfig ), },