From 359858da0675943d8a759a0a7c03e7b3846536f5 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 8 Mar 2019 11:16:49 +0100 Subject: [PATCH] Move the block components to the block editor module (#14112) --- .../filters/autocomplete-filters.md | 2 +- .../developers/packages.md | 6 +- lib/client-assets.php | 14 +- lib/packages-dependencies.php | 14 + package-lock.json | 26 +- packages/block-editor/README.md | 439 +++++++++++++++++- packages/block-editor/package.json | 19 +- .../src/components/alignment-toolbar/index.js | 0 .../test/__snapshots__/index.js.snap | 0 .../alignment-toolbar/test/index.js | 0 .../src/components/autocomplete/README.md | 0 .../src/components/autocomplete/index.js | 0 .../src/components/autocomplete/test/index.js | 0 .../src/components/block-actions/index.js | 0 .../block-alignment-toolbar/index.js | 0 .../test/__snapshots__/index.js.snap | 0 .../block-alignment-toolbar/test/index.js | 0 .../src/components/block-compare/README.md | 0 .../components/block-compare/block-view.js | 0 .../src/components/block-compare/index.js | 0 .../src/components/block-compare/style.scss | 0 .../test/__snapshots__/block-view.js.snap | 0 .../block-compare/test/block-view.js | 0 .../src/components/block-controls/index.js | 0 .../test/__snapshots__/index.js.snap | 0 .../components/block-controls/test/index.js | 0 .../src/components/block-draggable/index.js | 0 .../src/components/block-drop-zone/README.md | 0 .../src/components/block-drop-zone/index.js | 0 .../src/components/block-drop-zone/style.scss | 0 .../src/components/block-edit/context.js | 0 .../src/components/block-edit/edit.js | 0 .../src/components/block-edit/edit.native.js | 0 .../src/components/block-edit/index.js | 0 .../src/components/block-edit/test/edit.js | 0 .../block-editor-keyboard-shortcuts/index.js} | 0 .../components/block-format-controls/index.js | 0 .../src/components/block-icon/index.js | 0 .../src/components/block-icon/style.scss | 0 .../src/components/block-icon/test/index.js | 0 .../src/components/block-inspector/index.js | 0 .../src/components/block-inspector/style.scss | 0 .../components/block-list-appender/index.js | 0 .../components/block-list-appender/style.scss | 0 .../block-list/block-contextual-toolbar.js | 0 .../block-list/block-crash-boundary.js | 0 .../block-list/block-crash-warning.js | 0 .../src/components/block-list/block-html.js | 0 .../block-list/block-invalid-warning.js | 0 .../block-list/block-mobile-toolbar.js | 0 .../src/components/block-list/block.js | 0 .../src/components/block-list/breadcrumb.js | 0 .../src/components/block-list/hover-area.js | 0 .../src/components/block-list/index.js | 0 .../components/block-list/insertion-point.js | 0 .../components/block-list/multi-controls.js | 0 .../src/components/block-list/style.scss | 0 .../components/block-list/test/block-html.js | 0 .../src/components/block-mover/drag-handle.js | 0 .../src/components/block-mover/icons.js | 0 .../src/components/block-mover/index.js | 0 .../block-mover/mover-description.js | 0 .../src/components/block-mover/style.scss | 0 .../src/components/block-mover/test/index.js | 0 .../block-mover/test/mover-description.js | 0 .../components/block-navigation/dropdown.js | 0 .../src/components/block-navigation/index.js | 0 .../components/block-navigation/style.scss | 0 .../src/components/block-preview/index.js | 0 .../src/components/block-preview/style.scss | 0 .../block-selection-clearer/index.js | 0 .../block-convert-button.js | 0 .../block-html-convert-button.js | 0 .../block-settings-menu/block-mode-toggle.js | 0 .../block-settings-menu-first-item.js | 0 .../block-settings-menu-plugins-extension.js | 0 .../block-unknown-convert-button.js | 0 .../components/block-settings-menu/index.js | 2 +- .../reusable-block-convert-button.js | 0 .../reusable-block-delete-button.js | 0 .../components/block-settings-menu/style.scss | 0 .../reusable-block-delete-button.js.snap | 0 .../test/block-mode-toggle.js | 0 .../test/reusable-block-convert-button.js | 0 .../test/reusable-block-delete-button.js | 0 .../src/components/block-styles/index.js | 0 .../src/components/block-styles/style.scss | 0 .../src/components/block-styles/test/index.js | 0 .../src/components/block-switcher/index.js | 0 .../block-switcher/multi-blocks-switcher.js | 0 .../src/components/block-switcher/style.scss | 0 .../test/__snapshots__/index.js.snap | 0 .../multi-blocks-switcher.js.snap | 0 .../components/block-switcher/test/index.js | 0 .../test/multi-blocks-switcher.js | 0 .../src/components/block-title/README.md | 0 .../src/components/block-title/index.js | 0 .../src/components/block-title/test/index.js | 0 .../src/components/block-toolbar/index.js | 0 .../src/components/block-toolbar/style.scss | 0 .../src/components/block-types-list/index.js | 0 .../components/block-types-list/style.scss | 0 .../src/components/color-palette/control.js | 0 .../src/components/color-palette/control.scss | 0 .../src/components/color-palette/index.js | 0 .../test/__snapshots__/control.js.snap | 0 .../components/color-palette/test/control.js | 0 .../color-palette/with-color-context.js | 0 .../src/components/colors/index.js | 0 .../test/__snapshots__/with-colors.js.snap | 0 .../src/components/colors/test/with-colors.js | 0 .../src/components/colors/utils.js | 0 .../src/components/colors/with-colors.js | 0 .../src/components/contrast-checker/index.js | 0 .../components/contrast-checker/style.scss | 0 .../test/__snapshots__/index.js.snap | 0 .../components/contrast-checker/test/index.js | 0 .../src/components/copy-handler/index.js | 0 .../default-block-appender/index.js | 0 .../default-block-appender/index.native.js | 0 .../default-block-appender/style.native.scss | 0 .../default-block-appender/style.scss | 0 .../test/__snapshots__/index.js.snap | 0 .../default-block-appender/test/index.js | 0 .../components/font-sizes/font-size-picker.js | 0 .../src/components/font-sizes/index.js | 0 .../src/components/font-sizes/index.native.js | 0 .../src/components/font-sizes/style.scss | 0 .../src/components/font-sizes/utils.js | 0 .../components/font-sizes/with-font-sizes.js | 0 .../components/ignore-nested-events/index.js | 0 .../ignore-nested-events/test/index.js | 0 packages/block-editor/src/components/index.js | 56 +++ .../src/components/inner-blocks/README.md | 2 +- .../src/components/inner-blocks/index.js | 0 .../src/components/inner-blocks/style.scss | 0 .../test/__snapshots__/index.js.snap | 0 .../src/components/inner-blocks/test/index.js | 0 .../components/inserter-list-item/index.js | 0 .../components/inserter-list-item/style.scss | 0 .../inserter-with-shortcuts/index.js | 0 .../inserter-with-shortcuts/style.scss | 0 .../src/components/inserter/child-blocks.js | 0 .../src/components/inserter/index.js | 0 .../src/components/inserter/menu.js | 0 .../src/components/inserter/style.scss | 0 .../src/components/inserter/test/menu.js | 0 .../inspector-advanced-controls/index.js | 0 .../components/inspector-controls/README.md | 0 .../components/inspector-controls/index.js | 0 .../components/media-placeholder/README.md | 0 .../src/components/media-placeholder/index.js | 0 .../media-placeholder/index.native.js | 0 .../components/media-placeholder/style.scss | 0 .../media-placeholder/styles.native.scss | 0 .../media-placeholder/test/index.js | 0 .../src/components/media-upload/README.md | 2 +- .../src/components/media-upload/check.js | 0 .../src/components/media-upload/index.js | 0 .../multi-select-scroll-into-view/index.js | 0 .../multi-selection-inspector/index.js | 0 .../multi-selection-inspector/style.scss | 0 .../src/components/navigable-toolbar/index.js | 0 .../src/components/observe-typing/README.md | 0 .../src/components/observe-typing/index.js | 0 .../components/panel-color-settings/index.js | 0 .../panel-color-settings/style.scss | 0 .../test/__snapshots__/index.js.snap | 0 .../panel-color-settings/test/index.js | 0 .../src/components/plain-text/README.md | 0 .../src/components/plain-text/index.js | 0 .../src/components/plain-text/index.native.js | 0 .../components/plain-text/style.native.scss | 0 .../src/components/plain-text/style.scss | 0 .../preserve-scroll-in-reorder/index.js | 0 .../src/components/rich-text/README.md | 0 .../src/components/rich-text/aria.js | 0 .../src/components/rich-text/editable.js | 0 .../src/components/rich-text/format-edit.js | 0 .../rich-text/format-toolbar/index.js | 0 .../rich-text/format-toolbar/index.native.js | 0 .../rich-text/format-toolbar/style.scss | 0 .../src/components/rich-text/index.js | 0 .../src/components/rich-text/index.native.js | 2 +- .../src/components/rich-text/input-event.js | 0 .../rich-text/input-event.native.js | 0 .../src/components/rich-text/list-edit.js | 0 .../src/components/rich-text/patterns.js | 0 .../rich-text/remove-browser-shortcuts.js | 0 .../src/components/rich-text/shortcut.js | 0 .../components/rich-text/shortcut.native.js | 0 .../components/rich-text/style.native.scss | 0 .../src/components/rich-text/style.scss | 0 .../src/components/rich-text/test/index.js | 0 .../components/rich-text/toolbar-button.js | 0 .../skip-to-selected-block/index.js | 0 .../skip-to-selected-block/style.scss | 0 .../src/components/url-input/README.md | 0 .../src/components/url-input/button.js | 0 .../src/components/url-input/index.js | 0 .../src/components/url-input/index.native.js | 0 .../src/components/url-input/style.scss | 0 .../src/components/url-input/test/button.js | 0 .../src/components/url-popover/README.md | 2 +- .../src/components/url-popover/index.js | 0 .../src/components/url-popover/style.scss | 0 .../test/__snapshots__/index.js.snap | 0 .../src/components/url-popover/test/index.js | 0 .../src/components/warning/index.js | 0 .../src/components/warning/style.scss | 0 .../warning/test/__snapshots__/index.js.snap | 0 .../src/components/warning/test/index.js | 0 .../src/components/writing-flow/index.js | 0 .../src/components/writing-flow/style.scss | 0 .../src/components/writing-flow/test/index.js | 0 .../src/hooks/align.js | 0 .../src/hooks/anchor.js | 0 .../src/hooks/custom-class-name.js | 0 .../src/hooks/custom-class-name.native.js | 0 .../src/hooks/generated-class-name.js | 0 packages/block-editor/src/hooks/index.js | 7 + .../block-editor/src/hooks/index.native.js | 5 + .../src/hooks/test/align.js | 0 .../src/hooks/test/anchor.js | 0 .../src/hooks/test/custom-class-name.js | 0 .../src/hooks/test/generated-class-name.js | 0 packages/block-editor/src/index.js | 4 + packages/block-editor/src/style.scss | 33 ++ .../{editor => block-editor}/src/utils/dom.js | 0 .../src/utils/test/dom.js | 0 packages/block-library/src/archives/edit.js | 8 +- packages/block-library/src/audio/edit.js | 4 +- packages/block-library/src/audio/index.js | 2 +- packages/block-library/src/block/edit.js | 2 +- packages/block-library/src/button/edit.js | 2 +- packages/block-library/src/button/index.js | 2 +- packages/block-library/src/categories/edit.js | 2 +- packages/block-library/src/code/edit.js | 2 +- .../block-library/src/code/edit.native.js | 2 +- packages/block-library/src/columns/column.js | 2 +- packages/block-library/src/columns/index.js | 2 +- packages/block-library/src/cover/index.js | 2 +- .../block-library/src/embed/embed-controls.js | 2 +- .../src/embed/embed-placeholder.js | 2 +- .../block-library/src/embed/embed-preview.js | 2 +- packages/block-library/src/embed/settings.js | 2 +- packages/block-library/src/file/edit.js | 4 +- packages/block-library/src/file/index.js | 2 +- packages/block-library/src/file/inspector.js | 2 +- packages/block-library/src/gallery/edit.js | 4 +- .../src/gallery/gallery-image.js | 2 +- packages/block-library/src/gallery/index.js | 3 +- packages/block-library/src/heading/edit.js | 7 +- .../block-library/src/heading/edit.native.js | 2 +- packages/block-library/src/heading/index.js | 2 +- packages/block-library/src/html/edit.js | 3 +- packages/block-library/src/image/edit.js | 4 +- .../block-library/src/image/edit.native.js | 2 + packages/block-library/src/image/index.js | 2 +- .../block-library/src/latest-comments/edit.js | 4 +- .../block-library/src/latest-posts/edit.js | 2 +- packages/block-library/src/list/index.js | 2 +- packages/block-library/src/media-text/edit.js | 2 +- .../block-library/src/media-text/index.js | 2 +- .../src/media-text/media-container.js | 2 +- packages/block-library/src/missing/index.js | 2 +- packages/block-library/src/more/edit.js | 2 +- .../block-library/src/more/edit.native.js | 2 +- packages/block-library/src/paragraph/edit.js | 2 +- .../src/paragraph/edit.native.js | 2 +- packages/block-library/src/paragraph/index.js | 2 +- .../block-library/src/preformatted/index.js | 2 +- packages/block-library/src/pullquote/edit.js | 2 +- packages/block-library/src/pullquote/index.js | 2 +- packages/block-library/src/quote/index.js | 2 +- packages/block-library/src/rss/edit.js | 2 +- packages/block-library/src/search/edit.js | 2 +- packages/block-library/src/shortcode/index.js | 2 +- packages/block-library/src/spacer/index.js | 2 +- packages/block-library/src/subhead/index.js | 2 +- packages/block-library/src/table/edit.js | 2 +- packages/block-library/src/table/index.js | 2 +- packages/block-library/src/tag-cloud/edit.js | 2 +- packages/block-library/src/template/index.js | 2 +- .../block-library/src/test/helpers/index.js | 3 +- .../block-library/src/text-columns/index.js | 2 +- packages/block-library/src/verse/index.js | 2 +- packages/block-library/src/video/edit.js | 4 +- packages/block-library/src/video/index.js | 2 +- .../__snapshots__/block-deletion.test.js.snap | 4 +- .../e2e-tests/specs/block-deletion.test.js | 2 +- .../components/header/header-toolbar/index.js | 6 +- .../edit-post/src/components/layout/index.js | 2 +- .../src/components/options-modal/index.js | 8 +- .../sidebar/settings-sidebar/index.js | 2 +- .../src/components/visual-editor/index.js | 10 +- .../src/hooks/validate-multiple-use/index.js | 2 +- packages/editor/package.json | 6 - .../src/components/autocompleters/block.js | 6 +- packages/editor/src/components/deprecated.js | 119 +++++ .../src/components/document-outline/item.js | 6 +- .../components/document-outline/test/index.js | 4 +- .../src/components/error-boundary/index.js | 6 +- .../visual-editor-shortcuts.js | 2 +- packages/editor/src/components/index.js | 56 +-- .../components/post-featured-image/index.js | 3 +- .../src/components/post-title/index.native.js | 2 +- packages/editor/src/hooks/index.js | 4 - packages/editor/src/hooks/index.native.js | 5 - packages/editor/src/store/test/selectors.js | 3 + packages/editor/src/style.scss | 33 -- packages/format-library/package.json | 1 + packages/format-library/src/bold/index.js | 2 +- packages/format-library/src/code/index.js | 2 +- packages/format-library/src/image/index.js | 2 +- packages/format-library/src/italic/index.js | 2 +- packages/format-library/src/link/index.js | 2 +- .../format-library/src/link/index.native.js | 2 +- packages/format-library/src/link/inline.js | 2 +- .../format-library/src/strikethrough/index.js | 2 +- .../format-library/src/underline/index.js | 2 +- 321 files changed, 855 insertions(+), 234 deletions(-) rename packages/{editor => block-editor}/src/components/alignment-toolbar/index.js (100%) rename packages/{editor => block-editor}/src/components/alignment-toolbar/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/alignment-toolbar/test/index.js (100%) rename packages/{editor => block-editor}/src/components/autocomplete/README.md (100%) rename packages/{editor => block-editor}/src/components/autocomplete/index.js (100%) rename packages/{editor => block-editor}/src/components/autocomplete/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-actions/index.js (100%) rename packages/{editor => block-editor}/src/components/block-alignment-toolbar/index.js (100%) rename packages/{editor => block-editor}/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/block-alignment-toolbar/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-compare/README.md (100%) rename packages/{editor => block-editor}/src/components/block-compare/block-view.js (100%) rename packages/{editor => block-editor}/src/components/block-compare/index.js (100%) rename packages/{editor => block-editor}/src/components/block-compare/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-compare/test/__snapshots__/block-view.js.snap (100%) rename packages/{editor => block-editor}/src/components/block-compare/test/block-view.js (100%) rename packages/{editor => block-editor}/src/components/block-controls/index.js (100%) rename packages/{editor => block-editor}/src/components/block-controls/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/block-controls/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-draggable/index.js (100%) rename packages/{editor => block-editor}/src/components/block-drop-zone/README.md (100%) rename packages/{editor => block-editor}/src/components/block-drop-zone/index.js (100%) rename packages/{editor => block-editor}/src/components/block-drop-zone/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-edit/context.js (100%) rename packages/{editor => block-editor}/src/components/block-edit/edit.js (100%) rename packages/{editor => block-editor}/src/components/block-edit/edit.native.js (100%) rename packages/{editor => block-editor}/src/components/block-edit/index.js (100%) rename packages/{editor => block-editor}/src/components/block-edit/test/edit.js (100%) rename packages/{editor/src/components/global-keyboard-shortcuts/block-editor-shortcuts.js => block-editor/src/components/block-editor-keyboard-shortcuts/index.js} (100%) rename packages/{editor => block-editor}/src/components/block-format-controls/index.js (100%) rename packages/{editor => block-editor}/src/components/block-icon/index.js (100%) rename packages/{editor => block-editor}/src/components/block-icon/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-icon/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-inspector/index.js (100%) rename packages/{editor => block-editor}/src/components/block-inspector/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-list-appender/index.js (100%) rename packages/{editor => block-editor}/src/components/block-list-appender/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-list/block-contextual-toolbar.js (100%) rename packages/{editor => block-editor}/src/components/block-list/block-crash-boundary.js (100%) rename packages/{editor => block-editor}/src/components/block-list/block-crash-warning.js (100%) rename packages/{editor => block-editor}/src/components/block-list/block-html.js (100%) rename packages/{editor => block-editor}/src/components/block-list/block-invalid-warning.js (100%) rename packages/{editor => block-editor}/src/components/block-list/block-mobile-toolbar.js (100%) rename packages/{editor => block-editor}/src/components/block-list/block.js (100%) rename packages/{editor => block-editor}/src/components/block-list/breadcrumb.js (100%) rename packages/{editor => block-editor}/src/components/block-list/hover-area.js (100%) rename packages/{editor => block-editor}/src/components/block-list/index.js (100%) rename packages/{editor => block-editor}/src/components/block-list/insertion-point.js (100%) rename packages/{editor => block-editor}/src/components/block-list/multi-controls.js (100%) rename packages/{editor => block-editor}/src/components/block-list/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-list/test/block-html.js (100%) rename packages/{editor => block-editor}/src/components/block-mover/drag-handle.js (100%) rename packages/{editor => block-editor}/src/components/block-mover/icons.js (100%) rename packages/{editor => block-editor}/src/components/block-mover/index.js (100%) rename packages/{editor => block-editor}/src/components/block-mover/mover-description.js (100%) rename packages/{editor => block-editor}/src/components/block-mover/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-mover/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-mover/test/mover-description.js (100%) rename packages/{editor => block-editor}/src/components/block-navigation/dropdown.js (100%) rename packages/{editor => block-editor}/src/components/block-navigation/index.js (100%) rename packages/{editor => block-editor}/src/components/block-navigation/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-preview/index.js (100%) rename packages/{editor => block-editor}/src/components/block-preview/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-selection-clearer/index.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/block-convert-button.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/block-html-convert-button.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/block-mode-toggle.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/block-settings-menu-first-item.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/block-settings-menu-plugins-extension.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/block-unknown-convert-button.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/index.js (98%) rename packages/{editor => block-editor}/src/components/block-settings-menu/reusable-block-convert-button.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/reusable-block-delete-button.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/test/__snapshots__/reusable-block-delete-button.js.snap (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/test/block-mode-toggle.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/test/reusable-block-convert-button.js (100%) rename packages/{editor => block-editor}/src/components/block-settings-menu/test/reusable-block-delete-button.js (100%) rename packages/{editor => block-editor}/src/components/block-styles/index.js (100%) rename packages/{editor => block-editor}/src/components/block-styles/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-styles/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-switcher/index.js (100%) rename packages/{editor => block-editor}/src/components/block-switcher/multi-blocks-switcher.js (100%) rename packages/{editor => block-editor}/src/components/block-switcher/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-switcher/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/block-switcher/test/__snapshots__/multi-blocks-switcher.js.snap (100%) rename packages/{editor => block-editor}/src/components/block-switcher/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-switcher/test/multi-blocks-switcher.js (100%) rename packages/{editor => block-editor}/src/components/block-title/README.md (100%) rename packages/{editor => block-editor}/src/components/block-title/index.js (100%) rename packages/{editor => block-editor}/src/components/block-title/test/index.js (100%) rename packages/{editor => block-editor}/src/components/block-toolbar/index.js (100%) rename packages/{editor => block-editor}/src/components/block-toolbar/style.scss (100%) rename packages/{editor => block-editor}/src/components/block-types-list/index.js (100%) rename packages/{editor => block-editor}/src/components/block-types-list/style.scss (100%) rename packages/{editor => block-editor}/src/components/color-palette/control.js (100%) rename packages/{editor => block-editor}/src/components/color-palette/control.scss (100%) rename packages/{editor => block-editor}/src/components/color-palette/index.js (100%) rename packages/{editor => block-editor}/src/components/color-palette/test/__snapshots__/control.js.snap (100%) rename packages/{editor => block-editor}/src/components/color-palette/test/control.js (100%) rename packages/{editor => block-editor}/src/components/color-palette/with-color-context.js (100%) rename packages/{editor => block-editor}/src/components/colors/index.js (100%) rename packages/{editor => block-editor}/src/components/colors/test/__snapshots__/with-colors.js.snap (100%) rename packages/{editor => block-editor}/src/components/colors/test/with-colors.js (100%) rename packages/{editor => block-editor}/src/components/colors/utils.js (100%) rename packages/{editor => block-editor}/src/components/colors/with-colors.js (100%) rename packages/{editor => block-editor}/src/components/contrast-checker/index.js (100%) rename packages/{editor => block-editor}/src/components/contrast-checker/style.scss (100%) rename packages/{editor => block-editor}/src/components/contrast-checker/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/contrast-checker/test/index.js (100%) rename packages/{editor => block-editor}/src/components/copy-handler/index.js (100%) rename packages/{editor => block-editor}/src/components/default-block-appender/index.js (100%) rename packages/{editor => block-editor}/src/components/default-block-appender/index.native.js (100%) rename packages/{editor => block-editor}/src/components/default-block-appender/style.native.scss (100%) rename packages/{editor => block-editor}/src/components/default-block-appender/style.scss (100%) rename packages/{editor => block-editor}/src/components/default-block-appender/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/default-block-appender/test/index.js (100%) rename packages/{editor => block-editor}/src/components/font-sizes/font-size-picker.js (100%) rename packages/{editor => block-editor}/src/components/font-sizes/index.js (100%) rename packages/{editor => block-editor}/src/components/font-sizes/index.native.js (100%) rename packages/{editor => block-editor}/src/components/font-sizes/style.scss (100%) rename packages/{editor => block-editor}/src/components/font-sizes/utils.js (100%) rename packages/{editor => block-editor}/src/components/font-sizes/with-font-sizes.js (100%) rename packages/{editor => block-editor}/src/components/ignore-nested-events/index.js (100%) rename packages/{editor => block-editor}/src/components/ignore-nested-events/test/index.js (100%) rename packages/{editor => block-editor}/src/components/inner-blocks/README.md (98%) rename packages/{editor => block-editor}/src/components/inner-blocks/index.js (100%) rename packages/{editor => block-editor}/src/components/inner-blocks/style.scss (100%) rename packages/{editor => block-editor}/src/components/inner-blocks/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/inner-blocks/test/index.js (100%) rename packages/{editor => block-editor}/src/components/inserter-list-item/index.js (100%) rename packages/{editor => block-editor}/src/components/inserter-list-item/style.scss (100%) rename packages/{editor => block-editor}/src/components/inserter-with-shortcuts/index.js (100%) rename packages/{editor => block-editor}/src/components/inserter-with-shortcuts/style.scss (100%) rename packages/{editor => block-editor}/src/components/inserter/child-blocks.js (100%) rename packages/{editor => block-editor}/src/components/inserter/index.js (100%) rename packages/{editor => block-editor}/src/components/inserter/menu.js (100%) rename packages/{editor => block-editor}/src/components/inserter/style.scss (100%) rename packages/{editor => block-editor}/src/components/inserter/test/menu.js (100%) rename packages/{editor => block-editor}/src/components/inspector-advanced-controls/index.js (100%) rename packages/{editor => block-editor}/src/components/inspector-controls/README.md (100%) rename packages/{editor => block-editor}/src/components/inspector-controls/index.js (100%) rename packages/{editor => block-editor}/src/components/media-placeholder/README.md (100%) rename packages/{editor => block-editor}/src/components/media-placeholder/index.js (100%) rename packages/{editor => block-editor}/src/components/media-placeholder/index.native.js (100%) rename packages/{editor => block-editor}/src/components/media-placeholder/style.scss (100%) rename packages/{editor => block-editor}/src/components/media-placeholder/styles.native.scss (100%) rename packages/{editor => block-editor}/src/components/media-placeholder/test/index.js (100%) rename packages/{editor => block-editor}/src/components/media-upload/README.md (97%) rename packages/{editor => block-editor}/src/components/media-upload/check.js (100%) rename packages/{editor => block-editor}/src/components/media-upload/index.js (100%) rename packages/{editor => block-editor}/src/components/multi-select-scroll-into-view/index.js (100%) rename packages/{editor => block-editor}/src/components/multi-selection-inspector/index.js (100%) rename packages/{editor => block-editor}/src/components/multi-selection-inspector/style.scss (100%) rename packages/{editor => block-editor}/src/components/navigable-toolbar/index.js (100%) rename packages/{editor => block-editor}/src/components/observe-typing/README.md (100%) rename packages/{editor => block-editor}/src/components/observe-typing/index.js (100%) rename packages/{editor => block-editor}/src/components/panel-color-settings/index.js (100%) rename packages/{editor => block-editor}/src/components/panel-color-settings/style.scss (100%) rename packages/{editor => block-editor}/src/components/panel-color-settings/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/panel-color-settings/test/index.js (100%) rename packages/{editor => block-editor}/src/components/plain-text/README.md (100%) rename packages/{editor => block-editor}/src/components/plain-text/index.js (100%) rename packages/{editor => block-editor}/src/components/plain-text/index.native.js (100%) rename packages/{editor => block-editor}/src/components/plain-text/style.native.scss (100%) rename packages/{editor => block-editor}/src/components/plain-text/style.scss (100%) rename packages/{editor => block-editor}/src/components/preserve-scroll-in-reorder/index.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/README.md (100%) rename packages/{editor => block-editor}/src/components/rich-text/aria.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/editable.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/format-edit.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/format-toolbar/index.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/format-toolbar/index.native.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/format-toolbar/style.scss (100%) rename packages/{editor => block-editor}/src/components/rich-text/index.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/index.native.js (99%) rename packages/{editor => block-editor}/src/components/rich-text/input-event.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/input-event.native.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/list-edit.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/patterns.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/remove-browser-shortcuts.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/shortcut.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/shortcut.native.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/style.native.scss (100%) rename packages/{editor => block-editor}/src/components/rich-text/style.scss (100%) rename packages/{editor => block-editor}/src/components/rich-text/test/index.js (100%) rename packages/{editor => block-editor}/src/components/rich-text/toolbar-button.js (100%) rename packages/{editor => block-editor}/src/components/skip-to-selected-block/index.js (100%) rename packages/{editor => block-editor}/src/components/skip-to-selected-block/style.scss (100%) rename packages/{editor => block-editor}/src/components/url-input/README.md (100%) rename packages/{editor => block-editor}/src/components/url-input/button.js (100%) rename packages/{editor => block-editor}/src/components/url-input/index.js (100%) rename packages/{editor => block-editor}/src/components/url-input/index.native.js (100%) rename packages/{editor => block-editor}/src/components/url-input/style.scss (100%) rename packages/{editor => block-editor}/src/components/url-input/test/button.js (100%) rename packages/{editor => block-editor}/src/components/url-popover/README.md (98%) rename packages/{editor => block-editor}/src/components/url-popover/index.js (100%) rename packages/{editor => block-editor}/src/components/url-popover/style.scss (100%) rename packages/{editor => block-editor}/src/components/url-popover/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/url-popover/test/index.js (100%) rename packages/{editor => block-editor}/src/components/warning/index.js (100%) rename packages/{editor => block-editor}/src/components/warning/style.scss (100%) rename packages/{editor => block-editor}/src/components/warning/test/__snapshots__/index.js.snap (100%) rename packages/{editor => block-editor}/src/components/warning/test/index.js (100%) rename packages/{editor => block-editor}/src/components/writing-flow/index.js (100%) rename packages/{editor => block-editor}/src/components/writing-flow/style.scss (100%) rename packages/{editor => block-editor}/src/components/writing-flow/test/index.js (100%) rename packages/{editor => block-editor}/src/hooks/align.js (100%) rename packages/{editor => block-editor}/src/hooks/anchor.js (100%) rename packages/{editor => block-editor}/src/hooks/custom-class-name.js (100%) rename packages/{editor => block-editor}/src/hooks/custom-class-name.native.js (100%) rename packages/{editor => block-editor}/src/hooks/generated-class-name.js (100%) create mode 100644 packages/block-editor/src/hooks/index.js create mode 100644 packages/block-editor/src/hooks/index.native.js rename packages/{editor => block-editor}/src/hooks/test/align.js (100%) rename packages/{editor => block-editor}/src/hooks/test/anchor.js (100%) rename packages/{editor => block-editor}/src/hooks/test/custom-class-name.js (100%) rename packages/{editor => block-editor}/src/hooks/test/generated-class-name.js (100%) create mode 100644 packages/block-editor/src/style.scss rename packages/{editor => block-editor}/src/utils/dom.js (100%) rename packages/{editor => block-editor}/src/utils/test/dom.js (100%) create mode 100644 packages/editor/src/components/deprecated.js diff --git a/docs/designers-developers/developers/filters/autocomplete-filters.md b/docs/designers-developers/developers/filters/autocomplete-filters.md index 4086139c60a19d..1707080e867e8c 100644 --- a/docs/designers-developers/developers/filters/autocomplete-filters.md +++ b/docs/designers-developers/developers/filters/autocomplete-filters.md @@ -2,7 +2,7 @@ The `editor.Autocomplete.completers` filter is for extending and overriding the list of autocompleters used by blocks. -The `Autocomplete` component found in `@wordpress/editor` applies this filter. The `@wordpress/components` package provides the foundational `Autocomplete` component that does not apply such a filter, but blocks should generally use the component provided by `@wordpress/editor`. +The `Autocomplete` component found in `@wordpress/block-editor` applies this filter. The `@wordpress/components` package provides the foundational `Autocomplete` component that does not apply such a filter, but blocks should generally use the component provided by `@wordpress/block-editor`. ### Example diff --git a/docs/designers-developers/developers/packages.md b/docs/designers-developers/developers/packages.md index e2d5a97a482117..b5ef06c18782a2 100644 --- a/docs/designers-developers/developers/packages.md +++ b/docs/designers-developers/developers/packages.md @@ -26,15 +26,15 @@ const { PlainText } = wp.editor; All the packages are also available on [npm](https://www.npmjs.com/org/wordpress) if you want to bundle them in your code. -Using the same `PlainText` example, you would install the editor module with npm: +Using the same `PlainText` example, you would install the block editor module with npm: ```bash -npm install @wordpress/editor --save +npm install @wordpress/block-editor --save ``` Once installed, you can access the component in your code using: ```js -import { PlainText } from '@wordpress/editor'; +import { PlainText } from '@wordpress/block-editor'; ``` diff --git a/lib/client-assets.php b/lib/client-assets.php index f721c3855bc0d5..7839df9dbb3ea9 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -264,10 +264,18 @@ function gutenberg_register_scripts_and_styles() { // This empty stylesheet is defined to ensure backward compatibility. gutenberg_override_style( 'wp-blocks', false ); + gutenberg_override_style( + 'wp-block-editor', + gutenberg_url( 'build/block-editor/style.css' ), + array( 'wp-components', 'wp-editor-font' ), + filemtime( gutenberg_dir_path() . 'build/editor/style.css' ) + ); + wp_style_add_data( 'wp-block-editor', 'rtl', 'replace' ); + gutenberg_override_style( 'wp-editor', gutenberg_url( 'build/editor/style.css' ), - array( 'wp-components', 'wp-editor-font', 'wp-nux' ), + array( 'wp-components', 'wp-block-editor', 'wp-nux' ), filemtime( gutenberg_dir_path() . 'build/editor/style.css' ) ); wp_style_add_data( 'wp-editor', 'rtl', 'replace' ); @@ -275,7 +283,7 @@ function gutenberg_register_scripts_and_styles() { gutenberg_override_style( 'wp-edit-post', gutenberg_url( 'build/edit-post/style.css' ), - array( 'wp-components', 'wp-editor', 'wp-edit-blocks', 'wp-block-library', 'wp-nux' ), + array( 'wp-components', 'wp-block-editor', 'wp-editor', 'wp-edit-blocks', 'wp-block-library', 'wp-nux' ), filemtime( gutenberg_dir_path() . 'build/edit-post/style.css' ) ); wp_style_add_data( 'wp-edit-post', 'rtl', 'replace' ); @@ -299,7 +307,7 @@ function gutenberg_register_scripts_and_styles() { gutenberg_override_style( 'wp-format-library', gutenberg_url( 'build/format-library/style.css' ), - array(), + array( 'wp-block-editor', 'wp-components' ), filemtime( gutenberg_dir_path() . 'build/format-library/style.css' ) ); wp_style_add_data( 'wp-format-library', 'rtl', 'replace' ); diff --git a/lib/packages-dependencies.php b/lib/packages-dependencies.php index 47c7d154229408..3a59c5de5f2822 100644 --- a/lib/packages-dependencies.php +++ b/lib/packages-dependencies.php @@ -47,12 +47,25 @@ 'wp-block-serialization-spec-parser' => array(), 'wp-block-editor' => array( 'lodash', + 'wp-a11y', + 'wp-blob', 'wp-blocks', 'wp-compose', 'wp-components', + 'wp-core-data', 'wp-data', + 'wp-dom', 'wp-element', + 'wp-hooks', + 'wp-html-entities', 'wp-i18n', + 'wp-is-shallow-equal', + 'wp-keycodes', + 'wp-rich-text', + 'wp-token-list', + 'wp-url', + 'wp-viewport', + 'wp-wordcount', ), 'wp-blocks' => array( 'lodash', @@ -180,6 +193,7 @@ ), 'wp-escape-html' => array(), 'wp-format-library' => array( + 'wp-block-editor', 'wp-components', 'wp-editor', 'wp-element', diff --git a/package-lock.json b/package-lock.json index 82560b53523e71..9d1ac8494ae024 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2532,15 +2532,32 @@ "version": "file:packages/block-editor", "requires": { "@babel/runtime": "^7.0.0", + "@wordpress/a11y": "file:packages/a11y", + "@wordpress/blob": "file:packages/blob", "@wordpress/blocks": "file:packages/blocks", "@wordpress/components": "file:packages/components", "@wordpress/compose": "file:packages/compose", + "@wordpress/core-data": "file:packages/core-data", "@wordpress/data": "file:packages/data", + "@wordpress/dom": "file:packages/dom", "@wordpress/element": "file:packages/element", + "@wordpress/hooks": "file:packages/hooks", + "@wordpress/html-entities": "file:packages/html-entities", "@wordpress/i18n": "file:packages/i18n", + "@wordpress/is-shallow-equal": "file:packages/is-shallow-equal", + "@wordpress/keycodes": "file:packages/keycodes", + "@wordpress/rich-text": "file:packages/rich-text", + "@wordpress/token-list": "file:packages/token-list", + "@wordpress/url": "file:packages/url", + "@wordpress/viewport": "file:packages/viewport", + "@wordpress/wordcount": "file:packages/wordcount", + "classnames": "^2.2.5", + "dom-scroll-into-view": "^1.2.1", "lodash": "^4.17.10", + "redux-multi": "^0.1.12", "refx": "^3.0.0", - "rememo": "^3.0.0" + "rememo": "^3.0.0", + "tinycolor2": "^1.4.1" } }, "@wordpress/block-library": { @@ -2786,7 +2803,6 @@ "version": "file:packages/editor", "requires": { "@babel/runtime": "^7.3.1", - "@wordpress/a11y": "file:packages/a11y", "@wordpress/api-fetch": "file:packages/api-fetch", "@wordpress/blob": "file:packages/blob", "@wordpress/block-editor": "file:packages/block-editor", @@ -2797,21 +2813,17 @@ "@wordpress/data": "file:packages/data", "@wordpress/date": "file:packages/date", "@wordpress/deprecated": "file:packages/deprecated", - "@wordpress/dom": "file:packages/dom", "@wordpress/element": "file:packages/element", "@wordpress/hooks": "file:packages/hooks", "@wordpress/html-entities": "file:packages/html-entities", "@wordpress/i18n": "file:packages/i18n", - "@wordpress/is-shallow-equal": "file:packages/is-shallow-equal", "@wordpress/keycodes": "file:packages/keycodes", "@wordpress/notices": "file:packages/notices", "@wordpress/nux": "file:packages/nux", - "@wordpress/token-list": "file:packages/token-list", "@wordpress/url": "file:packages/url", "@wordpress/viewport": "file:packages/viewport", "@wordpress/wordcount": "file:packages/wordcount", "classnames": "^2.2.5", - "dom-scroll-into-view": "^1.2.1", "inherits": "^2.0.3", "lodash": "^4.17.11", "memize": "^1.0.5", @@ -2820,7 +2832,6 @@ "redux-optimist": "^1.0.0", "refx": "^3.0.0", "rememo": "^3.0.0", - "tinycolor2": "^1.4.1", "traverse": "^0.6.6" } }, @@ -2854,6 +2865,7 @@ "version": "file:packages/format-library", "requires": { "@babel/runtime": "^7.3.1", + "@wordpress/block-editor": "file:packages/block-editor", "@wordpress/components": "file:packages/components", "@wordpress/editor": "file:packages/editor", "@wordpress/element": "file:packages/element", diff --git a/packages/block-editor/README.md b/packages/block-editor/README.md index 3172cb260f2a83..7686f0fba4f188 100644 --- a/packages/block-editor/README.md +++ b/packages/block-editor/README.md @@ -16,15 +16,350 @@ _This package assumes that your code will run in an **ES2015+** environment. If +### AlignmentToolbar + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### Autocomplete + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockAlignmentToolbar + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockControls + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockEdit + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockEditorKeyboardShortcuts + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + ### BlockEditorProvider -[src/index.js#L11-L11](src/index.js#L11-L11) +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockFormatControls + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockIcon + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockInspector + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockList + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockMover + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockNavigationDropdown + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockSelectionClearer + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockSettingsMenu + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockTitle + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### BlockToolbar + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### ColorPalette + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### ContrastChecker + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### CopyHandler + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### createCustomColorsHOC + +[src/index.js#L15-L15](src/index.js#L15-L15) + +A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic +for class generation color value, retrieval and color attribute setting. + +Use this higher-order component to work with a custom set of colors. + +**Usage** + +```jsx +const CUSTOM_COLORS = [ { name: 'Red', slug: 'red', color: '#ff0000' }, { name: 'Blue', slug: 'blue', color: '#0000ff' } ]; +const withCustomColors = createCustomColorsHOC( CUSTOM_COLORS ); +// ... +export default compose( + withCustomColors( 'backgroundColor', 'borderColor' ), + MyColorfulComponent, +); +``` + +**Parameters** + +- **colorsArray** `Array`: The array of color objects (name, slug, color, etc... ). + +**Returns** + +`Function`: Higher-order component. + +### DefaultBlockAppender + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### FontSizePicker + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### getColorClassName + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Returns a class based on the context a color is being used and its slug. + +**Parameters** + +- **colorContextName** `string`: Context/place where color is being used e.g: background, text etc... +- **colorSlug** `string`: Slug of the color. + +**Returns** + +`string`: String with the class corresponding to the color in the provided context. + +### getColorObjectByAttributeValues + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Provided an array of color objects as set by the theme or by the editor defaults, +and the values of the defined color or custom color returns a color object describing the color. + +**Parameters** + +- **colors** `Array`: Array of color objects as set by the theme or by the editor defaults. +- **definedColor** `?string`: A string containing the color slug. +- **customColor** `?string`: A string containing the customColor value. + +**Returns** + +`?string`: If definedColor is passed and the name is found in colors, the color object exactly as set by the theme or editor defaults is returned. Otherwise, an object that just sets the color is defined. + +### getColorObjectByColorValue + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Provided an array of color objects as set by the theme or by the editor defaults, and a color value returns the color object matching that value or undefined. + +**Parameters** + +- **colors** `Array`: Array of color objects as set by the theme or by the editor defaults. +- **colorValue** `?string`: A string containing the color value. + +**Returns** + +`?string`: Returns the color object included in the colors array whose color property equals colorValue. Returns undefined if no color object matches this requirement. + +### getFontSize + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values. + If namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned. + +**Parameters** + +- **fontSizes** `Array`: Array of font size objects containing at least the "name" and "size" values as properties. +- **fontSizeAttribute** `?string`: Content of the font size attribute (slug). +- **customFontSizeAttribute** `?number`: Contents of the custom font size attribute (value). + +**Returns** + +`?string`: If fontSizeAttribute is set and an equal slug is found in fontSizes it returns the font size object for that slug. Otherwise, an object with just the size value based on customFontSize is returned. + +### getFontSizeClass + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Returns a class based on fontSizeName. + +**Parameters** + +- **fontSizeSlug** `string`: Slug of the fontSize. + +**Returns** + +`string`: String with the class corresponding to the fontSize passed. The class is generated by appending 'has-' followed by fontSizeSlug in kebabCase and ending with '-font-size'. + +### InnerBlocks + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### Inserter + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### InspectorAdvancedControls + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### InspectorControls + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### MediaPlaceholder + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### MediaUpload + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### MediaUploadCheck + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### MultiBlocksSwitcher + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### MultiSelectScrollIntoView + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### NavigableToolbar + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### ObserveTyping + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### PanelColorSettings + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### PlainText + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### PreserveScrollInReorder + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### RichText + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### RichTextShortcut + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### RichTextToolbarButton + +[src/index.js#L15-L15](src/index.js#L15-L15) Undocumented declaration. ### SETTINGS_DEFAULTS -[src/index.js#L13-L13](src/index.js#L13-L13) +[src/index.js#L17-L17](src/index.js#L17-L17) The default editor settings @@ -43,6 +378,106 @@ The default editor settings bodyPlaceholder string Empty post placeholder titlePlaceholder string Empty title placeholder +### SkipToSelectedBlock + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### UnstableRichTextInputEvent + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### URLInput + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### URLInputButton + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### URLPopover + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### Warning + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### withColorContext + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### withColors + +[src/index.js#L15-L15](src/index.js#L15-L15) + +A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting. + +For use with the default editor/theme color palette. + +**Usage** + +```jsx +export default compose( + withColors( 'backgroundColor', { textColor: 'color' } ), + MyColorfulComponent, +); +``` + +**Parameters** + +- **colorTypes** `...(object|string)`: The arguments can be strings or objects. If the argument is an object, it should contain the color attribute name as key and the color context as value. If the argument is a string the value should be the color attribute name, the color context is computed by applying a kebab case transform to the value. Color context represents the context/place where the color is going to be used. The class name of the color is generated using 'has' followed by the color name and ending with the color context all in kebab case e.g: has-green-background-color. + +**Returns** + +`Function`: Higher-order component. + +### withFontSizes + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Higher-order component, which handles font size logic for class generation, +font size value retrieval, and font size change handling. + +**Parameters** + +- **args** `...(object|string)`: The arguments should all be strings Each string contains the font size attribute name e.g: 'fontSize'. + +**Returns** + +`Function`: Higher-order component. + +### WritingFlow + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### \_BlockSettingsMenuFirstItem + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + +### \_BlockSettingsMenuPluginsExtension + +[src/index.js#L15-L15](src/index.js#L15-L15) + +Undocumented declaration. + diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json index 17cd7064411ec5..b6f19c50b0f150 100644 --- a/packages/block-editor/package.json +++ b/packages/block-editor/package.json @@ -23,15 +23,32 @@ "react-native": "src/index", "dependencies": { "@babel/runtime": "^7.0.0", + "@wordpress/a11y": "file:../a11y", + "@wordpress/blob": "file:../blob", "@wordpress/blocks": "file:../blocks", "@wordpress/components": "file:../components", "@wordpress/compose": "file:../compose", + "@wordpress/core-data": "file:../core-data", "@wordpress/data": "file:../data", + "@wordpress/dom": "file:../dom", "@wordpress/element": "file:../element", + "@wordpress/hooks": "file:../hooks", + "@wordpress/html-entities": "file:../html-entities", "@wordpress/i18n": "file:../i18n", + "@wordpress/is-shallow-equal": "file:../is-shallow-equal", + "@wordpress/keycodes": "file:../keycodes", + "@wordpress/rich-text": "file:../rich-text", + "@wordpress/token-list": "file:../token-list", + "@wordpress/url": "file:../url", + "@wordpress/viewport": "file:../viewport", + "@wordpress/wordcount": "file:../wordcount", + "classnames": "^2.2.5", + "dom-scroll-into-view": "^1.2.1", "lodash": "^4.17.10", + "redux-multi": "^0.1.12", "refx": "^3.0.0", - "rememo": "^3.0.0" + "rememo": "^3.0.0", + "tinycolor2": "^1.4.1" }, "publishConfig": { "access": "public" diff --git a/packages/editor/src/components/alignment-toolbar/index.js b/packages/block-editor/src/components/alignment-toolbar/index.js similarity index 100% rename from packages/editor/src/components/alignment-toolbar/index.js rename to packages/block-editor/src/components/alignment-toolbar/index.js diff --git a/packages/editor/src/components/alignment-toolbar/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/alignment-toolbar/test/__snapshots__/index.js.snap similarity index 100% rename from packages/editor/src/components/alignment-toolbar/test/__snapshots__/index.js.snap rename to packages/block-editor/src/components/alignment-toolbar/test/__snapshots__/index.js.snap diff --git a/packages/editor/src/components/alignment-toolbar/test/index.js b/packages/block-editor/src/components/alignment-toolbar/test/index.js similarity index 100% rename from packages/editor/src/components/alignment-toolbar/test/index.js rename to packages/block-editor/src/components/alignment-toolbar/test/index.js diff --git a/packages/editor/src/components/autocomplete/README.md b/packages/block-editor/src/components/autocomplete/README.md similarity index 100% rename from packages/editor/src/components/autocomplete/README.md rename to packages/block-editor/src/components/autocomplete/README.md diff --git a/packages/editor/src/components/autocomplete/index.js b/packages/block-editor/src/components/autocomplete/index.js similarity index 100% rename from packages/editor/src/components/autocomplete/index.js rename to packages/block-editor/src/components/autocomplete/index.js diff --git a/packages/editor/src/components/autocomplete/test/index.js b/packages/block-editor/src/components/autocomplete/test/index.js similarity index 100% rename from packages/editor/src/components/autocomplete/test/index.js rename to packages/block-editor/src/components/autocomplete/test/index.js diff --git a/packages/editor/src/components/block-actions/index.js b/packages/block-editor/src/components/block-actions/index.js similarity index 100% rename from packages/editor/src/components/block-actions/index.js rename to packages/block-editor/src/components/block-actions/index.js diff --git a/packages/editor/src/components/block-alignment-toolbar/index.js b/packages/block-editor/src/components/block-alignment-toolbar/index.js similarity index 100% rename from packages/editor/src/components/block-alignment-toolbar/index.js rename to packages/block-editor/src/components/block-alignment-toolbar/index.js diff --git a/packages/editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap similarity index 100% rename from packages/editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap rename to packages/block-editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap diff --git a/packages/editor/src/components/block-alignment-toolbar/test/index.js b/packages/block-editor/src/components/block-alignment-toolbar/test/index.js similarity index 100% rename from packages/editor/src/components/block-alignment-toolbar/test/index.js rename to packages/block-editor/src/components/block-alignment-toolbar/test/index.js diff --git a/packages/editor/src/components/block-compare/README.md b/packages/block-editor/src/components/block-compare/README.md similarity index 100% rename from packages/editor/src/components/block-compare/README.md rename to packages/block-editor/src/components/block-compare/README.md diff --git a/packages/editor/src/components/block-compare/block-view.js b/packages/block-editor/src/components/block-compare/block-view.js similarity index 100% rename from packages/editor/src/components/block-compare/block-view.js rename to packages/block-editor/src/components/block-compare/block-view.js diff --git a/packages/editor/src/components/block-compare/index.js b/packages/block-editor/src/components/block-compare/index.js similarity index 100% rename from packages/editor/src/components/block-compare/index.js rename to packages/block-editor/src/components/block-compare/index.js diff --git a/packages/editor/src/components/block-compare/style.scss b/packages/block-editor/src/components/block-compare/style.scss similarity index 100% rename from packages/editor/src/components/block-compare/style.scss rename to packages/block-editor/src/components/block-compare/style.scss diff --git a/packages/editor/src/components/block-compare/test/__snapshots__/block-view.js.snap b/packages/block-editor/src/components/block-compare/test/__snapshots__/block-view.js.snap similarity index 100% rename from packages/editor/src/components/block-compare/test/__snapshots__/block-view.js.snap rename to packages/block-editor/src/components/block-compare/test/__snapshots__/block-view.js.snap diff --git a/packages/editor/src/components/block-compare/test/block-view.js b/packages/block-editor/src/components/block-compare/test/block-view.js similarity index 100% rename from packages/editor/src/components/block-compare/test/block-view.js rename to packages/block-editor/src/components/block-compare/test/block-view.js diff --git a/packages/editor/src/components/block-controls/index.js b/packages/block-editor/src/components/block-controls/index.js similarity index 100% rename from packages/editor/src/components/block-controls/index.js rename to packages/block-editor/src/components/block-controls/index.js diff --git a/packages/editor/src/components/block-controls/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap similarity index 100% rename from packages/editor/src/components/block-controls/test/__snapshots__/index.js.snap rename to packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap diff --git a/packages/editor/src/components/block-controls/test/index.js b/packages/block-editor/src/components/block-controls/test/index.js similarity index 100% rename from packages/editor/src/components/block-controls/test/index.js rename to packages/block-editor/src/components/block-controls/test/index.js diff --git a/packages/editor/src/components/block-draggable/index.js b/packages/block-editor/src/components/block-draggable/index.js similarity index 100% rename from packages/editor/src/components/block-draggable/index.js rename to packages/block-editor/src/components/block-draggable/index.js diff --git a/packages/editor/src/components/block-drop-zone/README.md b/packages/block-editor/src/components/block-drop-zone/README.md similarity index 100% rename from packages/editor/src/components/block-drop-zone/README.md rename to packages/block-editor/src/components/block-drop-zone/README.md diff --git a/packages/editor/src/components/block-drop-zone/index.js b/packages/block-editor/src/components/block-drop-zone/index.js similarity index 100% rename from packages/editor/src/components/block-drop-zone/index.js rename to packages/block-editor/src/components/block-drop-zone/index.js diff --git a/packages/editor/src/components/block-drop-zone/style.scss b/packages/block-editor/src/components/block-drop-zone/style.scss similarity index 100% rename from packages/editor/src/components/block-drop-zone/style.scss rename to packages/block-editor/src/components/block-drop-zone/style.scss diff --git a/packages/editor/src/components/block-edit/context.js b/packages/block-editor/src/components/block-edit/context.js similarity index 100% rename from packages/editor/src/components/block-edit/context.js rename to packages/block-editor/src/components/block-edit/context.js diff --git a/packages/editor/src/components/block-edit/edit.js b/packages/block-editor/src/components/block-edit/edit.js similarity index 100% rename from packages/editor/src/components/block-edit/edit.js rename to packages/block-editor/src/components/block-edit/edit.js diff --git a/packages/editor/src/components/block-edit/edit.native.js b/packages/block-editor/src/components/block-edit/edit.native.js similarity index 100% rename from packages/editor/src/components/block-edit/edit.native.js rename to packages/block-editor/src/components/block-edit/edit.native.js diff --git a/packages/editor/src/components/block-edit/index.js b/packages/block-editor/src/components/block-edit/index.js similarity index 100% rename from packages/editor/src/components/block-edit/index.js rename to packages/block-editor/src/components/block-edit/index.js diff --git a/packages/editor/src/components/block-edit/test/edit.js b/packages/block-editor/src/components/block-edit/test/edit.js similarity index 100% rename from packages/editor/src/components/block-edit/test/edit.js rename to packages/block-editor/src/components/block-edit/test/edit.js diff --git a/packages/editor/src/components/global-keyboard-shortcuts/block-editor-shortcuts.js b/packages/block-editor/src/components/block-editor-keyboard-shortcuts/index.js similarity index 100% rename from packages/editor/src/components/global-keyboard-shortcuts/block-editor-shortcuts.js rename to packages/block-editor/src/components/block-editor-keyboard-shortcuts/index.js diff --git a/packages/editor/src/components/block-format-controls/index.js b/packages/block-editor/src/components/block-format-controls/index.js similarity index 100% rename from packages/editor/src/components/block-format-controls/index.js rename to packages/block-editor/src/components/block-format-controls/index.js diff --git a/packages/editor/src/components/block-icon/index.js b/packages/block-editor/src/components/block-icon/index.js similarity index 100% rename from packages/editor/src/components/block-icon/index.js rename to packages/block-editor/src/components/block-icon/index.js diff --git a/packages/editor/src/components/block-icon/style.scss b/packages/block-editor/src/components/block-icon/style.scss similarity index 100% rename from packages/editor/src/components/block-icon/style.scss rename to packages/block-editor/src/components/block-icon/style.scss diff --git a/packages/editor/src/components/block-icon/test/index.js b/packages/block-editor/src/components/block-icon/test/index.js similarity index 100% rename from packages/editor/src/components/block-icon/test/index.js rename to packages/block-editor/src/components/block-icon/test/index.js diff --git a/packages/editor/src/components/block-inspector/index.js b/packages/block-editor/src/components/block-inspector/index.js similarity index 100% rename from packages/editor/src/components/block-inspector/index.js rename to packages/block-editor/src/components/block-inspector/index.js diff --git a/packages/editor/src/components/block-inspector/style.scss b/packages/block-editor/src/components/block-inspector/style.scss similarity index 100% rename from packages/editor/src/components/block-inspector/style.scss rename to packages/block-editor/src/components/block-inspector/style.scss diff --git a/packages/editor/src/components/block-list-appender/index.js b/packages/block-editor/src/components/block-list-appender/index.js similarity index 100% rename from packages/editor/src/components/block-list-appender/index.js rename to packages/block-editor/src/components/block-list-appender/index.js diff --git a/packages/editor/src/components/block-list-appender/style.scss b/packages/block-editor/src/components/block-list-appender/style.scss similarity index 100% rename from packages/editor/src/components/block-list-appender/style.scss rename to packages/block-editor/src/components/block-list-appender/style.scss diff --git a/packages/editor/src/components/block-list/block-contextual-toolbar.js b/packages/block-editor/src/components/block-list/block-contextual-toolbar.js similarity index 100% rename from packages/editor/src/components/block-list/block-contextual-toolbar.js rename to packages/block-editor/src/components/block-list/block-contextual-toolbar.js diff --git a/packages/editor/src/components/block-list/block-crash-boundary.js b/packages/block-editor/src/components/block-list/block-crash-boundary.js similarity index 100% rename from packages/editor/src/components/block-list/block-crash-boundary.js rename to packages/block-editor/src/components/block-list/block-crash-boundary.js diff --git a/packages/editor/src/components/block-list/block-crash-warning.js b/packages/block-editor/src/components/block-list/block-crash-warning.js similarity index 100% rename from packages/editor/src/components/block-list/block-crash-warning.js rename to packages/block-editor/src/components/block-list/block-crash-warning.js diff --git a/packages/editor/src/components/block-list/block-html.js b/packages/block-editor/src/components/block-list/block-html.js similarity index 100% rename from packages/editor/src/components/block-list/block-html.js rename to packages/block-editor/src/components/block-list/block-html.js diff --git a/packages/editor/src/components/block-list/block-invalid-warning.js b/packages/block-editor/src/components/block-list/block-invalid-warning.js similarity index 100% rename from packages/editor/src/components/block-list/block-invalid-warning.js rename to packages/block-editor/src/components/block-list/block-invalid-warning.js diff --git a/packages/editor/src/components/block-list/block-mobile-toolbar.js b/packages/block-editor/src/components/block-list/block-mobile-toolbar.js similarity index 100% rename from packages/editor/src/components/block-list/block-mobile-toolbar.js rename to packages/block-editor/src/components/block-list/block-mobile-toolbar.js diff --git a/packages/editor/src/components/block-list/block.js b/packages/block-editor/src/components/block-list/block.js similarity index 100% rename from packages/editor/src/components/block-list/block.js rename to packages/block-editor/src/components/block-list/block.js diff --git a/packages/editor/src/components/block-list/breadcrumb.js b/packages/block-editor/src/components/block-list/breadcrumb.js similarity index 100% rename from packages/editor/src/components/block-list/breadcrumb.js rename to packages/block-editor/src/components/block-list/breadcrumb.js diff --git a/packages/editor/src/components/block-list/hover-area.js b/packages/block-editor/src/components/block-list/hover-area.js similarity index 100% rename from packages/editor/src/components/block-list/hover-area.js rename to packages/block-editor/src/components/block-list/hover-area.js diff --git a/packages/editor/src/components/block-list/index.js b/packages/block-editor/src/components/block-list/index.js similarity index 100% rename from packages/editor/src/components/block-list/index.js rename to packages/block-editor/src/components/block-list/index.js diff --git a/packages/editor/src/components/block-list/insertion-point.js b/packages/block-editor/src/components/block-list/insertion-point.js similarity index 100% rename from packages/editor/src/components/block-list/insertion-point.js rename to packages/block-editor/src/components/block-list/insertion-point.js diff --git a/packages/editor/src/components/block-list/multi-controls.js b/packages/block-editor/src/components/block-list/multi-controls.js similarity index 100% rename from packages/editor/src/components/block-list/multi-controls.js rename to packages/block-editor/src/components/block-list/multi-controls.js diff --git a/packages/editor/src/components/block-list/style.scss b/packages/block-editor/src/components/block-list/style.scss similarity index 100% rename from packages/editor/src/components/block-list/style.scss rename to packages/block-editor/src/components/block-list/style.scss diff --git a/packages/editor/src/components/block-list/test/block-html.js b/packages/block-editor/src/components/block-list/test/block-html.js similarity index 100% rename from packages/editor/src/components/block-list/test/block-html.js rename to packages/block-editor/src/components/block-list/test/block-html.js diff --git a/packages/editor/src/components/block-mover/drag-handle.js b/packages/block-editor/src/components/block-mover/drag-handle.js similarity index 100% rename from packages/editor/src/components/block-mover/drag-handle.js rename to packages/block-editor/src/components/block-mover/drag-handle.js diff --git a/packages/editor/src/components/block-mover/icons.js b/packages/block-editor/src/components/block-mover/icons.js similarity index 100% rename from packages/editor/src/components/block-mover/icons.js rename to packages/block-editor/src/components/block-mover/icons.js diff --git a/packages/editor/src/components/block-mover/index.js b/packages/block-editor/src/components/block-mover/index.js similarity index 100% rename from packages/editor/src/components/block-mover/index.js rename to packages/block-editor/src/components/block-mover/index.js diff --git a/packages/editor/src/components/block-mover/mover-description.js b/packages/block-editor/src/components/block-mover/mover-description.js similarity index 100% rename from packages/editor/src/components/block-mover/mover-description.js rename to packages/block-editor/src/components/block-mover/mover-description.js diff --git a/packages/editor/src/components/block-mover/style.scss b/packages/block-editor/src/components/block-mover/style.scss similarity index 100% rename from packages/editor/src/components/block-mover/style.scss rename to packages/block-editor/src/components/block-mover/style.scss diff --git a/packages/editor/src/components/block-mover/test/index.js b/packages/block-editor/src/components/block-mover/test/index.js similarity index 100% rename from packages/editor/src/components/block-mover/test/index.js rename to packages/block-editor/src/components/block-mover/test/index.js diff --git a/packages/editor/src/components/block-mover/test/mover-description.js b/packages/block-editor/src/components/block-mover/test/mover-description.js similarity index 100% rename from packages/editor/src/components/block-mover/test/mover-description.js rename to packages/block-editor/src/components/block-mover/test/mover-description.js diff --git a/packages/editor/src/components/block-navigation/dropdown.js b/packages/block-editor/src/components/block-navigation/dropdown.js similarity index 100% rename from packages/editor/src/components/block-navigation/dropdown.js rename to packages/block-editor/src/components/block-navigation/dropdown.js diff --git a/packages/editor/src/components/block-navigation/index.js b/packages/block-editor/src/components/block-navigation/index.js similarity index 100% rename from packages/editor/src/components/block-navigation/index.js rename to packages/block-editor/src/components/block-navigation/index.js diff --git a/packages/editor/src/components/block-navigation/style.scss b/packages/block-editor/src/components/block-navigation/style.scss similarity index 100% rename from packages/editor/src/components/block-navigation/style.scss rename to packages/block-editor/src/components/block-navigation/style.scss diff --git a/packages/editor/src/components/block-preview/index.js b/packages/block-editor/src/components/block-preview/index.js similarity index 100% rename from packages/editor/src/components/block-preview/index.js rename to packages/block-editor/src/components/block-preview/index.js diff --git a/packages/editor/src/components/block-preview/style.scss b/packages/block-editor/src/components/block-preview/style.scss similarity index 100% rename from packages/editor/src/components/block-preview/style.scss rename to packages/block-editor/src/components/block-preview/style.scss diff --git a/packages/editor/src/components/block-selection-clearer/index.js b/packages/block-editor/src/components/block-selection-clearer/index.js similarity index 100% rename from packages/editor/src/components/block-selection-clearer/index.js rename to packages/block-editor/src/components/block-selection-clearer/index.js diff --git a/packages/editor/src/components/block-settings-menu/block-convert-button.js b/packages/block-editor/src/components/block-settings-menu/block-convert-button.js similarity index 100% rename from packages/editor/src/components/block-settings-menu/block-convert-button.js rename to packages/block-editor/src/components/block-settings-menu/block-convert-button.js diff --git a/packages/editor/src/components/block-settings-menu/block-html-convert-button.js b/packages/block-editor/src/components/block-settings-menu/block-html-convert-button.js similarity index 100% rename from packages/editor/src/components/block-settings-menu/block-html-convert-button.js rename to packages/block-editor/src/components/block-settings-menu/block-html-convert-button.js diff --git a/packages/editor/src/components/block-settings-menu/block-mode-toggle.js b/packages/block-editor/src/components/block-settings-menu/block-mode-toggle.js similarity index 100% rename from packages/editor/src/components/block-settings-menu/block-mode-toggle.js rename to packages/block-editor/src/components/block-settings-menu/block-mode-toggle.js diff --git a/packages/editor/src/components/block-settings-menu/block-settings-menu-first-item.js b/packages/block-editor/src/components/block-settings-menu/block-settings-menu-first-item.js similarity index 100% rename from packages/editor/src/components/block-settings-menu/block-settings-menu-first-item.js rename to packages/block-editor/src/components/block-settings-menu/block-settings-menu-first-item.js diff --git a/packages/editor/src/components/block-settings-menu/block-settings-menu-plugins-extension.js b/packages/block-editor/src/components/block-settings-menu/block-settings-menu-plugins-extension.js similarity index 100% rename from packages/editor/src/components/block-settings-menu/block-settings-menu-plugins-extension.js rename to packages/block-editor/src/components/block-settings-menu/block-settings-menu-plugins-extension.js diff --git a/packages/editor/src/components/block-settings-menu/block-unknown-convert-button.js b/packages/block-editor/src/components/block-settings-menu/block-unknown-convert-button.js similarity index 100% rename from packages/editor/src/components/block-settings-menu/block-unknown-convert-button.js rename to packages/block-editor/src/components/block-settings-menu/block-unknown-convert-button.js diff --git a/packages/editor/src/components/block-settings-menu/index.js b/packages/block-editor/src/components/block-settings-menu/index.js similarity index 98% rename from packages/editor/src/components/block-settings-menu/index.js rename to packages/block-editor/src/components/block-settings-menu/index.js index c15bc11c63b290..6ab78e2b70c200 100644 --- a/packages/editor/src/components/block-settings-menu/index.js +++ b/packages/block-editor/src/components/block-settings-menu/index.js @@ -15,7 +15,7 @@ import { withDispatch } from '@wordpress/data'; /** * Internal dependencies */ -import { shortcuts } from '../global-keyboard-shortcuts/block-editor-shortcuts'; +import { shortcuts } from '../block-editor-keyboard-shortcuts'; import BlockActions from '../block-actions'; import BlockModeToggle from './block-mode-toggle'; import ReusableBlockConvertButton from './reusable-block-convert-button'; diff --git a/packages/editor/src/components/block-settings-menu/reusable-block-convert-button.js b/packages/block-editor/src/components/block-settings-menu/reusable-block-convert-button.js similarity index 100% rename from packages/editor/src/components/block-settings-menu/reusable-block-convert-button.js rename to packages/block-editor/src/components/block-settings-menu/reusable-block-convert-button.js diff --git a/packages/editor/src/components/block-settings-menu/reusable-block-delete-button.js b/packages/block-editor/src/components/block-settings-menu/reusable-block-delete-button.js similarity index 100% rename from packages/editor/src/components/block-settings-menu/reusable-block-delete-button.js rename to packages/block-editor/src/components/block-settings-menu/reusable-block-delete-button.js diff --git a/packages/editor/src/components/block-settings-menu/style.scss b/packages/block-editor/src/components/block-settings-menu/style.scss similarity index 100% rename from packages/editor/src/components/block-settings-menu/style.scss rename to packages/block-editor/src/components/block-settings-menu/style.scss diff --git a/packages/editor/src/components/block-settings-menu/test/__snapshots__/reusable-block-delete-button.js.snap b/packages/block-editor/src/components/block-settings-menu/test/__snapshots__/reusable-block-delete-button.js.snap similarity index 100% rename from packages/editor/src/components/block-settings-menu/test/__snapshots__/reusable-block-delete-button.js.snap rename to packages/block-editor/src/components/block-settings-menu/test/__snapshots__/reusable-block-delete-button.js.snap diff --git a/packages/editor/src/components/block-settings-menu/test/block-mode-toggle.js b/packages/block-editor/src/components/block-settings-menu/test/block-mode-toggle.js similarity index 100% rename from packages/editor/src/components/block-settings-menu/test/block-mode-toggle.js rename to packages/block-editor/src/components/block-settings-menu/test/block-mode-toggle.js diff --git a/packages/editor/src/components/block-settings-menu/test/reusable-block-convert-button.js b/packages/block-editor/src/components/block-settings-menu/test/reusable-block-convert-button.js similarity index 100% rename from packages/editor/src/components/block-settings-menu/test/reusable-block-convert-button.js rename to packages/block-editor/src/components/block-settings-menu/test/reusable-block-convert-button.js diff --git a/packages/editor/src/components/block-settings-menu/test/reusable-block-delete-button.js b/packages/block-editor/src/components/block-settings-menu/test/reusable-block-delete-button.js similarity index 100% rename from packages/editor/src/components/block-settings-menu/test/reusable-block-delete-button.js rename to packages/block-editor/src/components/block-settings-menu/test/reusable-block-delete-button.js diff --git a/packages/editor/src/components/block-styles/index.js b/packages/block-editor/src/components/block-styles/index.js similarity index 100% rename from packages/editor/src/components/block-styles/index.js rename to packages/block-editor/src/components/block-styles/index.js diff --git a/packages/editor/src/components/block-styles/style.scss b/packages/block-editor/src/components/block-styles/style.scss similarity index 100% rename from packages/editor/src/components/block-styles/style.scss rename to packages/block-editor/src/components/block-styles/style.scss diff --git a/packages/editor/src/components/block-styles/test/index.js b/packages/block-editor/src/components/block-styles/test/index.js similarity index 100% rename from packages/editor/src/components/block-styles/test/index.js rename to packages/block-editor/src/components/block-styles/test/index.js diff --git a/packages/editor/src/components/block-switcher/index.js b/packages/block-editor/src/components/block-switcher/index.js similarity index 100% rename from packages/editor/src/components/block-switcher/index.js rename to packages/block-editor/src/components/block-switcher/index.js diff --git a/packages/editor/src/components/block-switcher/multi-blocks-switcher.js b/packages/block-editor/src/components/block-switcher/multi-blocks-switcher.js similarity index 100% rename from packages/editor/src/components/block-switcher/multi-blocks-switcher.js rename to packages/block-editor/src/components/block-switcher/multi-blocks-switcher.js diff --git a/packages/editor/src/components/block-switcher/style.scss b/packages/block-editor/src/components/block-switcher/style.scss similarity index 100% rename from packages/editor/src/components/block-switcher/style.scss rename to packages/block-editor/src/components/block-switcher/style.scss diff --git a/packages/editor/src/components/block-switcher/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/block-switcher/test/__snapshots__/index.js.snap similarity index 100% rename from packages/editor/src/components/block-switcher/test/__snapshots__/index.js.snap rename to packages/block-editor/src/components/block-switcher/test/__snapshots__/index.js.snap diff --git a/packages/editor/src/components/block-switcher/test/__snapshots__/multi-blocks-switcher.js.snap b/packages/block-editor/src/components/block-switcher/test/__snapshots__/multi-blocks-switcher.js.snap similarity index 100% rename from packages/editor/src/components/block-switcher/test/__snapshots__/multi-blocks-switcher.js.snap rename to packages/block-editor/src/components/block-switcher/test/__snapshots__/multi-blocks-switcher.js.snap diff --git a/packages/editor/src/components/block-switcher/test/index.js b/packages/block-editor/src/components/block-switcher/test/index.js similarity index 100% rename from packages/editor/src/components/block-switcher/test/index.js rename to packages/block-editor/src/components/block-switcher/test/index.js diff --git a/packages/editor/src/components/block-switcher/test/multi-blocks-switcher.js b/packages/block-editor/src/components/block-switcher/test/multi-blocks-switcher.js similarity index 100% rename from packages/editor/src/components/block-switcher/test/multi-blocks-switcher.js rename to packages/block-editor/src/components/block-switcher/test/multi-blocks-switcher.js diff --git a/packages/editor/src/components/block-title/README.md b/packages/block-editor/src/components/block-title/README.md similarity index 100% rename from packages/editor/src/components/block-title/README.md rename to packages/block-editor/src/components/block-title/README.md diff --git a/packages/editor/src/components/block-title/index.js b/packages/block-editor/src/components/block-title/index.js similarity index 100% rename from packages/editor/src/components/block-title/index.js rename to packages/block-editor/src/components/block-title/index.js diff --git a/packages/editor/src/components/block-title/test/index.js b/packages/block-editor/src/components/block-title/test/index.js similarity index 100% rename from packages/editor/src/components/block-title/test/index.js rename to packages/block-editor/src/components/block-title/test/index.js diff --git a/packages/editor/src/components/block-toolbar/index.js b/packages/block-editor/src/components/block-toolbar/index.js similarity index 100% rename from packages/editor/src/components/block-toolbar/index.js rename to packages/block-editor/src/components/block-toolbar/index.js diff --git a/packages/editor/src/components/block-toolbar/style.scss b/packages/block-editor/src/components/block-toolbar/style.scss similarity index 100% rename from packages/editor/src/components/block-toolbar/style.scss rename to packages/block-editor/src/components/block-toolbar/style.scss diff --git a/packages/editor/src/components/block-types-list/index.js b/packages/block-editor/src/components/block-types-list/index.js similarity index 100% rename from packages/editor/src/components/block-types-list/index.js rename to packages/block-editor/src/components/block-types-list/index.js diff --git a/packages/editor/src/components/block-types-list/style.scss b/packages/block-editor/src/components/block-types-list/style.scss similarity index 100% rename from packages/editor/src/components/block-types-list/style.scss rename to packages/block-editor/src/components/block-types-list/style.scss diff --git a/packages/editor/src/components/color-palette/control.js b/packages/block-editor/src/components/color-palette/control.js similarity index 100% rename from packages/editor/src/components/color-palette/control.js rename to packages/block-editor/src/components/color-palette/control.js diff --git a/packages/editor/src/components/color-palette/control.scss b/packages/block-editor/src/components/color-palette/control.scss similarity index 100% rename from packages/editor/src/components/color-palette/control.scss rename to packages/block-editor/src/components/color-palette/control.scss diff --git a/packages/editor/src/components/color-palette/index.js b/packages/block-editor/src/components/color-palette/index.js similarity index 100% rename from packages/editor/src/components/color-palette/index.js rename to packages/block-editor/src/components/color-palette/index.js diff --git a/packages/editor/src/components/color-palette/test/__snapshots__/control.js.snap b/packages/block-editor/src/components/color-palette/test/__snapshots__/control.js.snap similarity index 100% rename from packages/editor/src/components/color-palette/test/__snapshots__/control.js.snap rename to packages/block-editor/src/components/color-palette/test/__snapshots__/control.js.snap diff --git a/packages/editor/src/components/color-palette/test/control.js b/packages/block-editor/src/components/color-palette/test/control.js similarity index 100% rename from packages/editor/src/components/color-palette/test/control.js rename to packages/block-editor/src/components/color-palette/test/control.js diff --git a/packages/editor/src/components/color-palette/with-color-context.js b/packages/block-editor/src/components/color-palette/with-color-context.js similarity index 100% rename from packages/editor/src/components/color-palette/with-color-context.js rename to packages/block-editor/src/components/color-palette/with-color-context.js diff --git a/packages/editor/src/components/colors/index.js b/packages/block-editor/src/components/colors/index.js similarity index 100% rename from packages/editor/src/components/colors/index.js rename to packages/block-editor/src/components/colors/index.js diff --git a/packages/editor/src/components/colors/test/__snapshots__/with-colors.js.snap b/packages/block-editor/src/components/colors/test/__snapshots__/with-colors.js.snap similarity index 100% rename from packages/editor/src/components/colors/test/__snapshots__/with-colors.js.snap rename to packages/block-editor/src/components/colors/test/__snapshots__/with-colors.js.snap diff --git a/packages/editor/src/components/colors/test/with-colors.js b/packages/block-editor/src/components/colors/test/with-colors.js similarity index 100% rename from packages/editor/src/components/colors/test/with-colors.js rename to packages/block-editor/src/components/colors/test/with-colors.js diff --git a/packages/editor/src/components/colors/utils.js b/packages/block-editor/src/components/colors/utils.js similarity index 100% rename from packages/editor/src/components/colors/utils.js rename to packages/block-editor/src/components/colors/utils.js diff --git a/packages/editor/src/components/colors/with-colors.js b/packages/block-editor/src/components/colors/with-colors.js similarity index 100% rename from packages/editor/src/components/colors/with-colors.js rename to packages/block-editor/src/components/colors/with-colors.js diff --git a/packages/editor/src/components/contrast-checker/index.js b/packages/block-editor/src/components/contrast-checker/index.js similarity index 100% rename from packages/editor/src/components/contrast-checker/index.js rename to packages/block-editor/src/components/contrast-checker/index.js diff --git a/packages/editor/src/components/contrast-checker/style.scss b/packages/block-editor/src/components/contrast-checker/style.scss similarity index 100% rename from packages/editor/src/components/contrast-checker/style.scss rename to packages/block-editor/src/components/contrast-checker/style.scss diff --git a/packages/editor/src/components/contrast-checker/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/contrast-checker/test/__snapshots__/index.js.snap similarity index 100% rename from packages/editor/src/components/contrast-checker/test/__snapshots__/index.js.snap rename to packages/block-editor/src/components/contrast-checker/test/__snapshots__/index.js.snap diff --git a/packages/editor/src/components/contrast-checker/test/index.js b/packages/block-editor/src/components/contrast-checker/test/index.js similarity index 100% rename from packages/editor/src/components/contrast-checker/test/index.js rename to packages/block-editor/src/components/contrast-checker/test/index.js diff --git a/packages/editor/src/components/copy-handler/index.js b/packages/block-editor/src/components/copy-handler/index.js similarity index 100% rename from packages/editor/src/components/copy-handler/index.js rename to packages/block-editor/src/components/copy-handler/index.js diff --git a/packages/editor/src/components/default-block-appender/index.js b/packages/block-editor/src/components/default-block-appender/index.js similarity index 100% rename from packages/editor/src/components/default-block-appender/index.js rename to packages/block-editor/src/components/default-block-appender/index.js diff --git a/packages/editor/src/components/default-block-appender/index.native.js b/packages/block-editor/src/components/default-block-appender/index.native.js similarity index 100% rename from packages/editor/src/components/default-block-appender/index.native.js rename to packages/block-editor/src/components/default-block-appender/index.native.js diff --git a/packages/editor/src/components/default-block-appender/style.native.scss b/packages/block-editor/src/components/default-block-appender/style.native.scss similarity index 100% rename from packages/editor/src/components/default-block-appender/style.native.scss rename to packages/block-editor/src/components/default-block-appender/style.native.scss diff --git a/packages/editor/src/components/default-block-appender/style.scss b/packages/block-editor/src/components/default-block-appender/style.scss similarity index 100% rename from packages/editor/src/components/default-block-appender/style.scss rename to packages/block-editor/src/components/default-block-appender/style.scss diff --git a/packages/editor/src/components/default-block-appender/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/default-block-appender/test/__snapshots__/index.js.snap similarity index 100% rename from packages/editor/src/components/default-block-appender/test/__snapshots__/index.js.snap rename to packages/block-editor/src/components/default-block-appender/test/__snapshots__/index.js.snap diff --git a/packages/editor/src/components/default-block-appender/test/index.js b/packages/block-editor/src/components/default-block-appender/test/index.js similarity index 100% rename from packages/editor/src/components/default-block-appender/test/index.js rename to packages/block-editor/src/components/default-block-appender/test/index.js diff --git a/packages/editor/src/components/font-sizes/font-size-picker.js b/packages/block-editor/src/components/font-sizes/font-size-picker.js similarity index 100% rename from packages/editor/src/components/font-sizes/font-size-picker.js rename to packages/block-editor/src/components/font-sizes/font-size-picker.js diff --git a/packages/editor/src/components/font-sizes/index.js b/packages/block-editor/src/components/font-sizes/index.js similarity index 100% rename from packages/editor/src/components/font-sizes/index.js rename to packages/block-editor/src/components/font-sizes/index.js diff --git a/packages/editor/src/components/font-sizes/index.native.js b/packages/block-editor/src/components/font-sizes/index.native.js similarity index 100% rename from packages/editor/src/components/font-sizes/index.native.js rename to packages/block-editor/src/components/font-sizes/index.native.js diff --git a/packages/editor/src/components/font-sizes/style.scss b/packages/block-editor/src/components/font-sizes/style.scss similarity index 100% rename from packages/editor/src/components/font-sizes/style.scss rename to packages/block-editor/src/components/font-sizes/style.scss diff --git a/packages/editor/src/components/font-sizes/utils.js b/packages/block-editor/src/components/font-sizes/utils.js similarity index 100% rename from packages/editor/src/components/font-sizes/utils.js rename to packages/block-editor/src/components/font-sizes/utils.js diff --git a/packages/editor/src/components/font-sizes/with-font-sizes.js b/packages/block-editor/src/components/font-sizes/with-font-sizes.js similarity index 100% rename from packages/editor/src/components/font-sizes/with-font-sizes.js rename to packages/block-editor/src/components/font-sizes/with-font-sizes.js diff --git a/packages/editor/src/components/ignore-nested-events/index.js b/packages/block-editor/src/components/ignore-nested-events/index.js similarity index 100% rename from packages/editor/src/components/ignore-nested-events/index.js rename to packages/block-editor/src/components/ignore-nested-events/index.js diff --git a/packages/editor/src/components/ignore-nested-events/test/index.js b/packages/block-editor/src/components/ignore-nested-events/test/index.js similarity index 100% rename from packages/editor/src/components/ignore-nested-events/test/index.js rename to packages/block-editor/src/components/ignore-nested-events/test/index.js diff --git a/packages/block-editor/src/components/index.js b/packages/block-editor/src/components/index.js index cb2cca8f110bac..a43c53ea54f123 100644 --- a/packages/block-editor/src/components/index.js +++ b/packages/block-editor/src/components/index.js @@ -1 +1,57 @@ +// Block Creation Components +export { default as Autocomplete } from './autocomplete'; +export { default as AlignmentToolbar } from './alignment-toolbar'; +export { default as BlockAlignmentToolbar } from './block-alignment-toolbar'; +export { default as BlockControls } from './block-controls'; +export { default as BlockEdit } from './block-edit'; +export { default as BlockFormatControls } from './block-format-controls'; +export { default as BlockNavigationDropdown } from './block-navigation/dropdown'; +export { default as BlockIcon } from './block-icon'; +export { default as ColorPalette } from './color-palette'; +export { default as withColorContext } from './color-palette/with-color-context'; +export * from './colors'; +export { default as ContrastChecker } from './contrast-checker'; +export * from './font-sizes'; +export { default as InnerBlocks } from './inner-blocks'; +export { default as InspectorAdvancedControls } from './inspector-advanced-controls'; +export { default as InspectorControls } from './inspector-controls'; +export { default as PanelColorSettings } from './panel-color-settings'; +export { default as PlainText } from './plain-text'; +export { + default as RichText, + RichTextShortcut, + RichTextToolbarButton, + UnstableRichTextInputEvent, +} from './rich-text'; +export { default as MediaPlaceholder } from './media-placeholder'; +export { default as MediaUpload } from './media-upload'; +export { default as MediaUploadCheck } from './media-upload/check'; +export { default as URLInput } from './url-input'; +export { default as URLInputButton } from './url-input/button'; +export { default as URLPopover } from './url-popover'; + +// Content Related Components +export { default as BlockEditorKeyboardShortcuts } from './block-editor-keyboard-shortcuts'; +export { default as BlockInspector } from './block-inspector'; +export { default as BlockList } from './block-list'; +export { default as BlockMover } from './block-mover'; +export { default as BlockSelectionClearer } from './block-selection-clearer'; +export { default as BlockSettingsMenu } from './block-settings-menu'; +export { default as _BlockSettingsMenuFirstItem } from './block-settings-menu/block-settings-menu-first-item'; +export { default as _BlockSettingsMenuPluginsExtension } from './block-settings-menu/block-settings-menu-plugins-extension'; +export { default as BlockTitle } from './block-title'; +export { default as BlockToolbar } from './block-toolbar'; +export { default as CopyHandler } from './copy-handler'; +export { default as DefaultBlockAppender } from './default-block-appender'; +export { default as Inserter } from './inserter'; +export { default as MultiBlocksSwitcher } from './block-switcher/multi-blocks-switcher'; +export { default as MultiSelectScrollIntoView } from './multi-select-scroll-into-view'; +export { default as NavigableToolbar } from './navigable-toolbar'; +export { default as ObserveTyping } from './observe-typing'; +export { default as PreserveScrollInReorder } from './preserve-scroll-in-reorder'; +export { default as SkipToSelectedBlock } from './skip-to-selected-block'; +export { default as Warning } from './warning'; +export { default as WritingFlow } from './writing-flow'; + +// State Related Components export { default as BlockEditorProvider } from './provider'; diff --git a/packages/editor/src/components/inner-blocks/README.md b/packages/block-editor/src/components/inner-blocks/README.md similarity index 98% rename from packages/editor/src/components/inner-blocks/README.md rename to packages/block-editor/src/components/inner-blocks/README.md index 040b0d463861cf..8904d4b5cceba4 100644 --- a/packages/editor/src/components/inner-blocks/README.md +++ b/packages/block-editor/src/components/inner-blocks/README.md @@ -11,7 +11,7 @@ In a block's `edit` implementation, render `InnerBlocks`. Then, in the `save` im ```jsx import { registerBlockType } from '@wordpress/blocks'; -import { InnerBlocks } from '@wordpress/editor'; +import { InnerBlocks } from '@wordpress/block-editor'; registerBlockType( 'my-plugin/my-block', { // ... diff --git a/packages/editor/src/components/inner-blocks/index.js b/packages/block-editor/src/components/inner-blocks/index.js similarity index 100% rename from packages/editor/src/components/inner-blocks/index.js rename to packages/block-editor/src/components/inner-blocks/index.js diff --git a/packages/editor/src/components/inner-blocks/style.scss b/packages/block-editor/src/components/inner-blocks/style.scss similarity index 100% rename from packages/editor/src/components/inner-blocks/style.scss rename to packages/block-editor/src/components/inner-blocks/style.scss diff --git a/packages/editor/src/components/inner-blocks/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/inner-blocks/test/__snapshots__/index.js.snap similarity index 100% rename from packages/editor/src/components/inner-blocks/test/__snapshots__/index.js.snap rename to packages/block-editor/src/components/inner-blocks/test/__snapshots__/index.js.snap diff --git a/packages/editor/src/components/inner-blocks/test/index.js b/packages/block-editor/src/components/inner-blocks/test/index.js similarity index 100% rename from packages/editor/src/components/inner-blocks/test/index.js rename to packages/block-editor/src/components/inner-blocks/test/index.js diff --git a/packages/editor/src/components/inserter-list-item/index.js b/packages/block-editor/src/components/inserter-list-item/index.js similarity index 100% rename from packages/editor/src/components/inserter-list-item/index.js rename to packages/block-editor/src/components/inserter-list-item/index.js diff --git a/packages/editor/src/components/inserter-list-item/style.scss b/packages/block-editor/src/components/inserter-list-item/style.scss similarity index 100% rename from packages/editor/src/components/inserter-list-item/style.scss rename to packages/block-editor/src/components/inserter-list-item/style.scss diff --git a/packages/editor/src/components/inserter-with-shortcuts/index.js b/packages/block-editor/src/components/inserter-with-shortcuts/index.js similarity index 100% rename from packages/editor/src/components/inserter-with-shortcuts/index.js rename to packages/block-editor/src/components/inserter-with-shortcuts/index.js diff --git a/packages/editor/src/components/inserter-with-shortcuts/style.scss b/packages/block-editor/src/components/inserter-with-shortcuts/style.scss similarity index 100% rename from packages/editor/src/components/inserter-with-shortcuts/style.scss rename to packages/block-editor/src/components/inserter-with-shortcuts/style.scss diff --git a/packages/editor/src/components/inserter/child-blocks.js b/packages/block-editor/src/components/inserter/child-blocks.js similarity index 100% rename from packages/editor/src/components/inserter/child-blocks.js rename to packages/block-editor/src/components/inserter/child-blocks.js diff --git a/packages/editor/src/components/inserter/index.js b/packages/block-editor/src/components/inserter/index.js similarity index 100% rename from packages/editor/src/components/inserter/index.js rename to packages/block-editor/src/components/inserter/index.js diff --git a/packages/editor/src/components/inserter/menu.js b/packages/block-editor/src/components/inserter/menu.js similarity index 100% rename from packages/editor/src/components/inserter/menu.js rename to packages/block-editor/src/components/inserter/menu.js diff --git a/packages/editor/src/components/inserter/style.scss b/packages/block-editor/src/components/inserter/style.scss similarity index 100% rename from packages/editor/src/components/inserter/style.scss rename to packages/block-editor/src/components/inserter/style.scss diff --git a/packages/editor/src/components/inserter/test/menu.js b/packages/block-editor/src/components/inserter/test/menu.js similarity index 100% rename from packages/editor/src/components/inserter/test/menu.js rename to packages/block-editor/src/components/inserter/test/menu.js diff --git a/packages/editor/src/components/inspector-advanced-controls/index.js b/packages/block-editor/src/components/inspector-advanced-controls/index.js similarity index 100% rename from packages/editor/src/components/inspector-advanced-controls/index.js rename to packages/block-editor/src/components/inspector-advanced-controls/index.js diff --git a/packages/editor/src/components/inspector-controls/README.md b/packages/block-editor/src/components/inspector-controls/README.md similarity index 100% rename from packages/editor/src/components/inspector-controls/README.md rename to packages/block-editor/src/components/inspector-controls/README.md diff --git a/packages/editor/src/components/inspector-controls/index.js b/packages/block-editor/src/components/inspector-controls/index.js similarity index 100% rename from packages/editor/src/components/inspector-controls/index.js rename to packages/block-editor/src/components/inspector-controls/index.js diff --git a/packages/editor/src/components/media-placeholder/README.md b/packages/block-editor/src/components/media-placeholder/README.md similarity index 100% rename from packages/editor/src/components/media-placeholder/README.md rename to packages/block-editor/src/components/media-placeholder/README.md diff --git a/packages/editor/src/components/media-placeholder/index.js b/packages/block-editor/src/components/media-placeholder/index.js similarity index 100% rename from packages/editor/src/components/media-placeholder/index.js rename to packages/block-editor/src/components/media-placeholder/index.js diff --git a/packages/editor/src/components/media-placeholder/index.native.js b/packages/block-editor/src/components/media-placeholder/index.native.js similarity index 100% rename from packages/editor/src/components/media-placeholder/index.native.js rename to packages/block-editor/src/components/media-placeholder/index.native.js diff --git a/packages/editor/src/components/media-placeholder/style.scss b/packages/block-editor/src/components/media-placeholder/style.scss similarity index 100% rename from packages/editor/src/components/media-placeholder/style.scss rename to packages/block-editor/src/components/media-placeholder/style.scss diff --git a/packages/editor/src/components/media-placeholder/styles.native.scss b/packages/block-editor/src/components/media-placeholder/styles.native.scss similarity index 100% rename from packages/editor/src/components/media-placeholder/styles.native.scss rename to packages/block-editor/src/components/media-placeholder/styles.native.scss diff --git a/packages/editor/src/components/media-placeholder/test/index.js b/packages/block-editor/src/components/media-placeholder/test/index.js similarity index 100% rename from packages/editor/src/components/media-placeholder/test/index.js rename to packages/block-editor/src/components/media-placeholder/test/index.js diff --git a/packages/editor/src/components/media-upload/README.md b/packages/block-editor/src/components/media-upload/README.md similarity index 97% rename from packages/editor/src/components/media-upload/README.md rename to packages/block-editor/src/components/media-upload/README.md index 74567c86942058..eb2f75cbdd8af2 100644 --- a/packages/editor/src/components/media-upload/README.md +++ b/packages/block-editor/src/components/media-upload/README.md @@ -28,7 +28,7 @@ To make sure the current user has Upload permissions, you need to wrap the Media ```jsx import { Button } from '@wordpress/components'; -import { MediaUpload, MediaUploadCheck } from '@wordpress/editor'; +import { MediaUpload, MediaUploadCheck } from '@wordpress/block-editor'; const ALLOWED_MEDIA_TYPES = [ 'audio' ]; diff --git a/packages/editor/src/components/media-upload/check.js b/packages/block-editor/src/components/media-upload/check.js similarity index 100% rename from packages/editor/src/components/media-upload/check.js rename to packages/block-editor/src/components/media-upload/check.js diff --git a/packages/editor/src/components/media-upload/index.js b/packages/block-editor/src/components/media-upload/index.js similarity index 100% rename from packages/editor/src/components/media-upload/index.js rename to packages/block-editor/src/components/media-upload/index.js diff --git a/packages/editor/src/components/multi-select-scroll-into-view/index.js b/packages/block-editor/src/components/multi-select-scroll-into-view/index.js similarity index 100% rename from packages/editor/src/components/multi-select-scroll-into-view/index.js rename to packages/block-editor/src/components/multi-select-scroll-into-view/index.js diff --git a/packages/editor/src/components/multi-selection-inspector/index.js b/packages/block-editor/src/components/multi-selection-inspector/index.js similarity index 100% rename from packages/editor/src/components/multi-selection-inspector/index.js rename to packages/block-editor/src/components/multi-selection-inspector/index.js diff --git a/packages/editor/src/components/multi-selection-inspector/style.scss b/packages/block-editor/src/components/multi-selection-inspector/style.scss similarity index 100% rename from packages/editor/src/components/multi-selection-inspector/style.scss rename to packages/block-editor/src/components/multi-selection-inspector/style.scss diff --git a/packages/editor/src/components/navigable-toolbar/index.js b/packages/block-editor/src/components/navigable-toolbar/index.js similarity index 100% rename from packages/editor/src/components/navigable-toolbar/index.js rename to packages/block-editor/src/components/navigable-toolbar/index.js diff --git a/packages/editor/src/components/observe-typing/README.md b/packages/block-editor/src/components/observe-typing/README.md similarity index 100% rename from packages/editor/src/components/observe-typing/README.md rename to packages/block-editor/src/components/observe-typing/README.md diff --git a/packages/editor/src/components/observe-typing/index.js b/packages/block-editor/src/components/observe-typing/index.js similarity index 100% rename from packages/editor/src/components/observe-typing/index.js rename to packages/block-editor/src/components/observe-typing/index.js diff --git a/packages/editor/src/components/panel-color-settings/index.js b/packages/block-editor/src/components/panel-color-settings/index.js similarity index 100% rename from packages/editor/src/components/panel-color-settings/index.js rename to packages/block-editor/src/components/panel-color-settings/index.js diff --git a/packages/editor/src/components/panel-color-settings/style.scss b/packages/block-editor/src/components/panel-color-settings/style.scss similarity index 100% rename from packages/editor/src/components/panel-color-settings/style.scss rename to packages/block-editor/src/components/panel-color-settings/style.scss diff --git a/packages/editor/src/components/panel-color-settings/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/panel-color-settings/test/__snapshots__/index.js.snap similarity index 100% rename from packages/editor/src/components/panel-color-settings/test/__snapshots__/index.js.snap rename to packages/block-editor/src/components/panel-color-settings/test/__snapshots__/index.js.snap diff --git a/packages/editor/src/components/panel-color-settings/test/index.js b/packages/block-editor/src/components/panel-color-settings/test/index.js similarity index 100% rename from packages/editor/src/components/panel-color-settings/test/index.js rename to packages/block-editor/src/components/panel-color-settings/test/index.js diff --git a/packages/editor/src/components/plain-text/README.md b/packages/block-editor/src/components/plain-text/README.md similarity index 100% rename from packages/editor/src/components/plain-text/README.md rename to packages/block-editor/src/components/plain-text/README.md diff --git a/packages/editor/src/components/plain-text/index.js b/packages/block-editor/src/components/plain-text/index.js similarity index 100% rename from packages/editor/src/components/plain-text/index.js rename to packages/block-editor/src/components/plain-text/index.js diff --git a/packages/editor/src/components/plain-text/index.native.js b/packages/block-editor/src/components/plain-text/index.native.js similarity index 100% rename from packages/editor/src/components/plain-text/index.native.js rename to packages/block-editor/src/components/plain-text/index.native.js diff --git a/packages/editor/src/components/plain-text/style.native.scss b/packages/block-editor/src/components/plain-text/style.native.scss similarity index 100% rename from packages/editor/src/components/plain-text/style.native.scss rename to packages/block-editor/src/components/plain-text/style.native.scss diff --git a/packages/editor/src/components/plain-text/style.scss b/packages/block-editor/src/components/plain-text/style.scss similarity index 100% rename from packages/editor/src/components/plain-text/style.scss rename to packages/block-editor/src/components/plain-text/style.scss diff --git a/packages/editor/src/components/preserve-scroll-in-reorder/index.js b/packages/block-editor/src/components/preserve-scroll-in-reorder/index.js similarity index 100% rename from packages/editor/src/components/preserve-scroll-in-reorder/index.js rename to packages/block-editor/src/components/preserve-scroll-in-reorder/index.js diff --git a/packages/editor/src/components/rich-text/README.md b/packages/block-editor/src/components/rich-text/README.md similarity index 100% rename from packages/editor/src/components/rich-text/README.md rename to packages/block-editor/src/components/rich-text/README.md diff --git a/packages/editor/src/components/rich-text/aria.js b/packages/block-editor/src/components/rich-text/aria.js similarity index 100% rename from packages/editor/src/components/rich-text/aria.js rename to packages/block-editor/src/components/rich-text/aria.js diff --git a/packages/editor/src/components/rich-text/editable.js b/packages/block-editor/src/components/rich-text/editable.js similarity index 100% rename from packages/editor/src/components/rich-text/editable.js rename to packages/block-editor/src/components/rich-text/editable.js diff --git a/packages/editor/src/components/rich-text/format-edit.js b/packages/block-editor/src/components/rich-text/format-edit.js similarity index 100% rename from packages/editor/src/components/rich-text/format-edit.js rename to packages/block-editor/src/components/rich-text/format-edit.js diff --git a/packages/editor/src/components/rich-text/format-toolbar/index.js b/packages/block-editor/src/components/rich-text/format-toolbar/index.js similarity index 100% rename from packages/editor/src/components/rich-text/format-toolbar/index.js rename to packages/block-editor/src/components/rich-text/format-toolbar/index.js diff --git a/packages/editor/src/components/rich-text/format-toolbar/index.native.js b/packages/block-editor/src/components/rich-text/format-toolbar/index.native.js similarity index 100% rename from packages/editor/src/components/rich-text/format-toolbar/index.native.js rename to packages/block-editor/src/components/rich-text/format-toolbar/index.native.js diff --git a/packages/editor/src/components/rich-text/format-toolbar/style.scss b/packages/block-editor/src/components/rich-text/format-toolbar/style.scss similarity index 100% rename from packages/editor/src/components/rich-text/format-toolbar/style.scss rename to packages/block-editor/src/components/rich-text/format-toolbar/style.scss diff --git a/packages/editor/src/components/rich-text/index.js b/packages/block-editor/src/components/rich-text/index.js similarity index 100% rename from packages/editor/src/components/rich-text/index.js rename to packages/block-editor/src/components/rich-text/index.js diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/block-editor/src/components/rich-text/index.native.js similarity index 99% rename from packages/editor/src/components/rich-text/index.native.js rename to packages/block-editor/src/components/rich-text/index.native.js index 1e3de4f168086a..55bf4580e5e70d 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/block-editor/src/components/rich-text/index.native.js @@ -9,7 +9,7 @@ import { View, Platform } from 'react-native'; */ import { Component, RawHTML } from '@wordpress/element'; import { withInstanceId, compose } from '@wordpress/compose'; -import { BlockFormatControls } from '@wordpress/editor'; +import { BlockFormatControls } from '@wordpress/block-editor'; import { withSelect } from '@wordpress/data'; import { applyFormat, diff --git a/packages/editor/src/components/rich-text/input-event.js b/packages/block-editor/src/components/rich-text/input-event.js similarity index 100% rename from packages/editor/src/components/rich-text/input-event.js rename to packages/block-editor/src/components/rich-text/input-event.js diff --git a/packages/editor/src/components/rich-text/input-event.native.js b/packages/block-editor/src/components/rich-text/input-event.native.js similarity index 100% rename from packages/editor/src/components/rich-text/input-event.native.js rename to packages/block-editor/src/components/rich-text/input-event.native.js diff --git a/packages/editor/src/components/rich-text/list-edit.js b/packages/block-editor/src/components/rich-text/list-edit.js similarity index 100% rename from packages/editor/src/components/rich-text/list-edit.js rename to packages/block-editor/src/components/rich-text/list-edit.js diff --git a/packages/editor/src/components/rich-text/patterns.js b/packages/block-editor/src/components/rich-text/patterns.js similarity index 100% rename from packages/editor/src/components/rich-text/patterns.js rename to packages/block-editor/src/components/rich-text/patterns.js diff --git a/packages/editor/src/components/rich-text/remove-browser-shortcuts.js b/packages/block-editor/src/components/rich-text/remove-browser-shortcuts.js similarity index 100% rename from packages/editor/src/components/rich-text/remove-browser-shortcuts.js rename to packages/block-editor/src/components/rich-text/remove-browser-shortcuts.js diff --git a/packages/editor/src/components/rich-text/shortcut.js b/packages/block-editor/src/components/rich-text/shortcut.js similarity index 100% rename from packages/editor/src/components/rich-text/shortcut.js rename to packages/block-editor/src/components/rich-text/shortcut.js diff --git a/packages/editor/src/components/rich-text/shortcut.native.js b/packages/block-editor/src/components/rich-text/shortcut.native.js similarity index 100% rename from packages/editor/src/components/rich-text/shortcut.native.js rename to packages/block-editor/src/components/rich-text/shortcut.native.js diff --git a/packages/editor/src/components/rich-text/style.native.scss b/packages/block-editor/src/components/rich-text/style.native.scss similarity index 100% rename from packages/editor/src/components/rich-text/style.native.scss rename to packages/block-editor/src/components/rich-text/style.native.scss diff --git a/packages/editor/src/components/rich-text/style.scss b/packages/block-editor/src/components/rich-text/style.scss similarity index 100% rename from packages/editor/src/components/rich-text/style.scss rename to packages/block-editor/src/components/rich-text/style.scss diff --git a/packages/editor/src/components/rich-text/test/index.js b/packages/block-editor/src/components/rich-text/test/index.js similarity index 100% rename from packages/editor/src/components/rich-text/test/index.js rename to packages/block-editor/src/components/rich-text/test/index.js diff --git a/packages/editor/src/components/rich-text/toolbar-button.js b/packages/block-editor/src/components/rich-text/toolbar-button.js similarity index 100% rename from packages/editor/src/components/rich-text/toolbar-button.js rename to packages/block-editor/src/components/rich-text/toolbar-button.js diff --git a/packages/editor/src/components/skip-to-selected-block/index.js b/packages/block-editor/src/components/skip-to-selected-block/index.js similarity index 100% rename from packages/editor/src/components/skip-to-selected-block/index.js rename to packages/block-editor/src/components/skip-to-selected-block/index.js diff --git a/packages/editor/src/components/skip-to-selected-block/style.scss b/packages/block-editor/src/components/skip-to-selected-block/style.scss similarity index 100% rename from packages/editor/src/components/skip-to-selected-block/style.scss rename to packages/block-editor/src/components/skip-to-selected-block/style.scss diff --git a/packages/editor/src/components/url-input/README.md b/packages/block-editor/src/components/url-input/README.md similarity index 100% rename from packages/editor/src/components/url-input/README.md rename to packages/block-editor/src/components/url-input/README.md diff --git a/packages/editor/src/components/url-input/button.js b/packages/block-editor/src/components/url-input/button.js similarity index 100% rename from packages/editor/src/components/url-input/button.js rename to packages/block-editor/src/components/url-input/button.js diff --git a/packages/editor/src/components/url-input/index.js b/packages/block-editor/src/components/url-input/index.js similarity index 100% rename from packages/editor/src/components/url-input/index.js rename to packages/block-editor/src/components/url-input/index.js diff --git a/packages/editor/src/components/url-input/index.native.js b/packages/block-editor/src/components/url-input/index.native.js similarity index 100% rename from packages/editor/src/components/url-input/index.native.js rename to packages/block-editor/src/components/url-input/index.native.js diff --git a/packages/editor/src/components/url-input/style.scss b/packages/block-editor/src/components/url-input/style.scss similarity index 100% rename from packages/editor/src/components/url-input/style.scss rename to packages/block-editor/src/components/url-input/style.scss diff --git a/packages/editor/src/components/url-input/test/button.js b/packages/block-editor/src/components/url-input/test/button.js similarity index 100% rename from packages/editor/src/components/url-input/test/button.js rename to packages/block-editor/src/components/url-input/test/button.js diff --git a/packages/editor/src/components/url-popover/README.md b/packages/block-editor/src/components/url-popover/README.md similarity index 98% rename from packages/editor/src/components/url-popover/README.md rename to packages/block-editor/src/components/url-popover/README.md index da0fc4dbefb214..4705ecadfe4373 100644 --- a/packages/editor/src/components/url-popover/README.md +++ b/packages/block-editor/src/components/url-popover/README.md @@ -10,7 +10,7 @@ The component will be rendered adjacent to its parent. ```jsx import { Fragment } from '@wordpress/elements'; import { ToggleControl, IconButton, Button } from '@wordpress/components'; -import { URLPopover } from '@wordpress/editor'; +import { URLPopover } from '@wordpress/block-editor'; class MyURLPopover extends Component { constructor() { diff --git a/packages/editor/src/components/url-popover/index.js b/packages/block-editor/src/components/url-popover/index.js similarity index 100% rename from packages/editor/src/components/url-popover/index.js rename to packages/block-editor/src/components/url-popover/index.js diff --git a/packages/editor/src/components/url-popover/style.scss b/packages/block-editor/src/components/url-popover/style.scss similarity index 100% rename from packages/editor/src/components/url-popover/style.scss rename to packages/block-editor/src/components/url-popover/style.scss diff --git a/packages/editor/src/components/url-popover/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap similarity index 100% rename from packages/editor/src/components/url-popover/test/__snapshots__/index.js.snap rename to packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap diff --git a/packages/editor/src/components/url-popover/test/index.js b/packages/block-editor/src/components/url-popover/test/index.js similarity index 100% rename from packages/editor/src/components/url-popover/test/index.js rename to packages/block-editor/src/components/url-popover/test/index.js diff --git a/packages/editor/src/components/warning/index.js b/packages/block-editor/src/components/warning/index.js similarity index 100% rename from packages/editor/src/components/warning/index.js rename to packages/block-editor/src/components/warning/index.js diff --git a/packages/editor/src/components/warning/style.scss b/packages/block-editor/src/components/warning/style.scss similarity index 100% rename from packages/editor/src/components/warning/style.scss rename to packages/block-editor/src/components/warning/style.scss diff --git a/packages/editor/src/components/warning/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/warning/test/__snapshots__/index.js.snap similarity index 100% rename from packages/editor/src/components/warning/test/__snapshots__/index.js.snap rename to packages/block-editor/src/components/warning/test/__snapshots__/index.js.snap diff --git a/packages/editor/src/components/warning/test/index.js b/packages/block-editor/src/components/warning/test/index.js similarity index 100% rename from packages/editor/src/components/warning/test/index.js rename to packages/block-editor/src/components/warning/test/index.js diff --git a/packages/editor/src/components/writing-flow/index.js b/packages/block-editor/src/components/writing-flow/index.js similarity index 100% rename from packages/editor/src/components/writing-flow/index.js rename to packages/block-editor/src/components/writing-flow/index.js diff --git a/packages/editor/src/components/writing-flow/style.scss b/packages/block-editor/src/components/writing-flow/style.scss similarity index 100% rename from packages/editor/src/components/writing-flow/style.scss rename to packages/block-editor/src/components/writing-flow/style.scss diff --git a/packages/editor/src/components/writing-flow/test/index.js b/packages/block-editor/src/components/writing-flow/test/index.js similarity index 100% rename from packages/editor/src/components/writing-flow/test/index.js rename to packages/block-editor/src/components/writing-flow/test/index.js diff --git a/packages/editor/src/hooks/align.js b/packages/block-editor/src/hooks/align.js similarity index 100% rename from packages/editor/src/hooks/align.js rename to packages/block-editor/src/hooks/align.js diff --git a/packages/editor/src/hooks/anchor.js b/packages/block-editor/src/hooks/anchor.js similarity index 100% rename from packages/editor/src/hooks/anchor.js rename to packages/block-editor/src/hooks/anchor.js diff --git a/packages/editor/src/hooks/custom-class-name.js b/packages/block-editor/src/hooks/custom-class-name.js similarity index 100% rename from packages/editor/src/hooks/custom-class-name.js rename to packages/block-editor/src/hooks/custom-class-name.js diff --git a/packages/editor/src/hooks/custom-class-name.native.js b/packages/block-editor/src/hooks/custom-class-name.native.js similarity index 100% rename from packages/editor/src/hooks/custom-class-name.native.js rename to packages/block-editor/src/hooks/custom-class-name.native.js diff --git a/packages/editor/src/hooks/generated-class-name.js b/packages/block-editor/src/hooks/generated-class-name.js similarity index 100% rename from packages/editor/src/hooks/generated-class-name.js rename to packages/block-editor/src/hooks/generated-class-name.js diff --git a/packages/block-editor/src/hooks/index.js b/packages/block-editor/src/hooks/index.js new file mode 100644 index 00000000000000..7bd9f390390c4d --- /dev/null +++ b/packages/block-editor/src/hooks/index.js @@ -0,0 +1,7 @@ +/** + * Internal dependencies + */ +import './align'; +import './anchor'; +import './custom-class-name'; +import './generated-class-name'; diff --git a/packages/block-editor/src/hooks/index.native.js b/packages/block-editor/src/hooks/index.native.js new file mode 100644 index 00000000000000..d85f61d596d93b --- /dev/null +++ b/packages/block-editor/src/hooks/index.native.js @@ -0,0 +1,5 @@ +/** + * Internal dependencies + */ +import './custom-class-name'; +import './generated-class-name'; diff --git a/packages/editor/src/hooks/test/align.js b/packages/block-editor/src/hooks/test/align.js similarity index 100% rename from packages/editor/src/hooks/test/align.js rename to packages/block-editor/src/hooks/test/align.js diff --git a/packages/editor/src/hooks/test/anchor.js b/packages/block-editor/src/hooks/test/anchor.js similarity index 100% rename from packages/editor/src/hooks/test/anchor.js rename to packages/block-editor/src/hooks/test/anchor.js diff --git a/packages/editor/src/hooks/test/custom-class-name.js b/packages/block-editor/src/hooks/test/custom-class-name.js similarity index 100% rename from packages/editor/src/hooks/test/custom-class-name.js rename to packages/block-editor/src/hooks/test/custom-class-name.js diff --git a/packages/editor/src/hooks/test/generated-class-name.js b/packages/block-editor/src/hooks/test/generated-class-name.js similarity index 100% rename from packages/editor/src/hooks/test/generated-class-name.js rename to packages/block-editor/src/hooks/test/generated-class-name.js diff --git a/packages/block-editor/src/index.js b/packages/block-editor/src/index.js index 58e920befd5eae..fe526a2352a428 100644 --- a/packages/block-editor/src/index.js +++ b/packages/block-editor/src/index.js @@ -2,11 +2,15 @@ * WordPress dependencies */ import '@wordpress/blocks'; +import '@wordpress/core-data'; +import '@wordpress/rich-text'; +import '@wordpress/viewport'; /** * Internal dependencies */ import './store'; +import './hooks'; export * from './components'; diff --git a/packages/block-editor/src/style.scss b/packages/block-editor/src/style.scss new file mode 100644 index 00000000000000..deedea8be7ec1f --- /dev/null +++ b/packages/block-editor/src/style.scss @@ -0,0 +1,33 @@ +@import "./components/block-drop-zone/style.scss"; +@import "./components/block-icon/style.scss"; +@import "./components/block-inspector/style.scss"; +@import "./components/block-list/style.scss"; +@import "./components/block-list-appender/style.scss"; +@import "./components/block-compare/style.scss"; +@import "./components/block-mover/style.scss"; +@import "./components/block-navigation/style.scss"; +@import "./components/block-preview/style.scss"; +@import "./components/block-settings-menu/style.scss"; +@import "./components/block-styles/style.scss"; +@import "./components/block-switcher/style.scss"; +@import "./components/block-toolbar/style.scss"; +@import "./components/block-types-list/style.scss"; +@import "./components/color-palette/control.scss"; +@import "./components/contrast-checker/style.scss"; +@import "./components/default-block-appender/style.scss"; +@import "./components/font-sizes/style.scss"; +@import "./components/inner-blocks/style.scss"; +@import "./components/inserter-with-shortcuts/style.scss"; +@import "./components/inserter/style.scss"; +@import "./components/inserter-list-item/style.scss"; +@import "./components/media-placeholder/style.scss"; +@import "./components/multi-selection-inspector/style.scss"; +@import "./components/panel-color-settings/style.scss"; +@import "./components/plain-text/style.scss"; +@import "./components/rich-text/format-toolbar/style.scss"; +@import "./components/rich-text/style.scss"; +@import "./components/skip-to-selected-block/style.scss"; +@import "./components/url-input/style.scss"; +@import "./components/url-popover/style.scss"; +@import "./components/warning/style.scss"; +@import "./components/writing-flow/style.scss"; diff --git a/packages/editor/src/utils/dom.js b/packages/block-editor/src/utils/dom.js similarity index 100% rename from packages/editor/src/utils/dom.js rename to packages/block-editor/src/utils/dom.js diff --git a/packages/editor/src/utils/test/dom.js b/packages/block-editor/src/utils/test/dom.js similarity index 100% rename from packages/editor/src/utils/test/dom.js rename to packages/block-editor/src/utils/test/dom.js diff --git a/packages/block-library/src/archives/edit.js b/packages/block-library/src/archives/edit.js index b59f4dd04d930f..51f9df96f147fc 100644 --- a/packages/block-library/src/archives/edit.js +++ b/packages/block-library/src/archives/edit.js @@ -8,16 +8,12 @@ import { Disabled, } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; - -/** - * Internal dependencies - */ import { InspectorControls, BlockAlignmentToolbar, BlockControls, - ServerSideRender, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; +import { ServerSideRender } from '@wordpress/editor'; export default function ArchivesEdit( { attributes, setAttributes } ) { const { align, showPostCounts, displayAsDropdown } = attributes; diff --git a/packages/block-library/src/audio/edit.js b/packages/block-library/src/audio/edit.js index 9e85cea5de22dd..d222b42ae6a641 100644 --- a/packages/block-library/src/audio/edit.js +++ b/packages/block-library/src/audio/edit.js @@ -17,8 +17,8 @@ import { InspectorControls, MediaPlaceholder, RichText, - mediaUpload, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; +import { mediaUpload } from '@wordpress/editor'; import { Component, Fragment } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; diff --git a/packages/block-library/src/audio/index.js b/packages/block-library/src/audio/index.js index 1e3d95da29b45b..7528ac483311ef 100644 --- a/packages/block-library/src/audio/index.js +++ b/packages/block-library/src/audio/index.js @@ -3,7 +3,7 @@ */ import { createBlobURL } from '@wordpress/blob'; import { createBlock } from '@wordpress/blocks'; -import { RichText } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; /** diff --git a/packages/block-library/src/block/edit.js b/packages/block-library/src/block/edit.js index 5db7bda7c7f60d..722aad97c9bfcc 100644 --- a/packages/block-library/src/block/edit.js +++ b/packages/block-library/src/block/edit.js @@ -10,7 +10,7 @@ import { Component, Fragment } from '@wordpress/element'; import { Placeholder, Spinner, Disabled } from '@wordpress/components'; import { withSelect, withDispatch } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; -import { BlockEdit } from '@wordpress/editor'; +import { BlockEdit } from '@wordpress/block-editor'; import { compose } from '@wordpress/compose'; /** diff --git a/packages/block-library/src/button/edit.js b/packages/block-library/src/button/edit.js index 860d6a1fb64b6b..1cf0c1e43d049c 100644 --- a/packages/block-library/src/button/edit.js +++ b/packages/block-library/src/button/edit.js @@ -24,7 +24,7 @@ import { InspectorControls, withColors, PanelColorSettings, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; const { getComputedStyle } = window; diff --git a/packages/block-library/src/button/index.js b/packages/block-library/src/button/index.js index cbc60718bb7165..d736c954b9982d 100644 --- a/packages/block-library/src/button/index.js +++ b/packages/block-library/src/button/index.js @@ -12,7 +12,7 @@ import { __, _x } from '@wordpress/i18n'; import { RichText, getColorClassName, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; /** * Internal dependencies diff --git a/packages/block-library/src/categories/edit.js b/packages/block-library/src/categories/edit.js index aee240e7384e69..69e70a2596f254 100644 --- a/packages/block-library/src/categories/edit.js +++ b/packages/block-library/src/categories/edit.js @@ -9,7 +9,7 @@ import { times, unescape } from 'lodash'; import { PanelBody, Placeholder, Spinner, ToggleControl } from '@wordpress/components'; import { compose, withInstanceId } from '@wordpress/compose'; import { withSelect } from '@wordpress/data'; -import { InspectorControls } from '@wordpress/editor'; +import { InspectorControls } from '@wordpress/block-editor'; import { Component, Fragment } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; diff --git a/packages/block-library/src/code/edit.js b/packages/block-library/src/code/edit.js index b41ba7327f15d9..5aa4b337bd3f12 100644 --- a/packages/block-library/src/code/edit.js +++ b/packages/block-library/src/code/edit.js @@ -6,7 +6,7 @@ import { __ } from '@wordpress/i18n'; /** * Internal dependencies */ -import { PlainText } from '@wordpress/editor'; +import { PlainText } from '@wordpress/block-editor'; export default function CodeEdit( { attributes, setAttributes, className } ) { return ( diff --git a/packages/block-library/src/code/edit.native.js b/packages/block-library/src/code/edit.native.js index c072c01df50045..264814f760dee7 100644 --- a/packages/block-library/src/code/edit.native.js +++ b/packages/block-library/src/code/edit.native.js @@ -11,7 +11,7 @@ import { __ } from '@wordpress/i18n'; /** * Internal dependencies */ -import { PlainText } from '@wordpress/editor'; +import { PlainText } from '@wordpress/block-editor'; /** * Block code style diff --git a/packages/block-library/src/columns/column.js b/packages/block-library/src/columns/column.js index 802e2c15082b4c..b593f3ee061341 100644 --- a/packages/block-library/src/columns/column.js +++ b/packages/block-library/src/columns/column.js @@ -3,7 +3,7 @@ */ import { Path, SVG } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; -import { InnerBlocks } from '@wordpress/editor'; +import { InnerBlocks } from '@wordpress/block-editor'; export const name = 'core/column'; diff --git a/packages/block-library/src/columns/index.js b/packages/block-library/src/columns/index.js index 374650b9ab13be..7d28794e8a7760 100644 --- a/packages/block-library/src/columns/index.js +++ b/packages/block-library/src/columns/index.js @@ -15,7 +15,7 @@ import { createBlock } from '@wordpress/blocks'; import { InspectorControls, InnerBlocks, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; /** * Allowed blocks constant is passed to InnerBlocks precisely as specified here. diff --git a/packages/block-library/src/cover/index.js b/packages/block-library/src/cover/index.js index cd39eaf9e496a5..de5a34699e414e 100644 --- a/packages/block-library/src/cover/index.js +++ b/packages/block-library/src/cover/index.js @@ -12,7 +12,7 @@ import { InnerBlocks, RichText, getColorClassName, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; /** diff --git a/packages/block-library/src/embed/embed-controls.js b/packages/block-library/src/embed/embed-controls.js index e16b91ba7552f9..f768f3fa529038 100644 --- a/packages/block-library/src/embed/embed-controls.js +++ b/packages/block-library/src/embed/embed-controls.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { Fragment } from '@wordpress/element'; import { IconButton, Toolbar, PanelBody, ToggleControl } from '@wordpress/components'; -import { BlockControls, InspectorControls } from '@wordpress/editor'; +import { BlockControls, InspectorControls } from '@wordpress/block-editor'; const EmbedControls = ( props ) => { const { diff --git a/packages/block-library/src/embed/embed-placeholder.js b/packages/block-library/src/embed/embed-placeholder.js index 9b2176d5ccf3c8..b532d7b1a84a78 100644 --- a/packages/block-library/src/embed/embed-placeholder.js +++ b/packages/block-library/src/embed/embed-placeholder.js @@ -3,7 +3,7 @@ */ import { __, _x } from '@wordpress/i18n'; import { Button, Placeholder } from '@wordpress/components'; -import { BlockIcon } from '@wordpress/editor'; +import { BlockIcon } from '@wordpress/block-editor'; const EmbedPlaceholder = ( props ) => { const { icon, label, value, onSubmit, onChange, cannotEmbed, fallback, tryAgain } = props; diff --git a/packages/block-library/src/embed/embed-preview.js b/packages/block-library/src/embed/embed-preview.js index 1b1f2dfb93787e..eeda8d33f91153 100644 --- a/packages/block-library/src/embed/embed-preview.js +++ b/packages/block-library/src/embed/embed-preview.js @@ -16,7 +16,7 @@ import classnames from 'classnames/dedupe'; */ import { __, sprintf } from '@wordpress/i18n'; import { Placeholder, SandBox } from '@wordpress/components'; -import { RichText, BlockIcon } from '@wordpress/editor'; +import { RichText, BlockIcon } from '@wordpress/block-editor'; import { Component } from '@wordpress/element'; /** diff --git a/packages/block-library/src/embed/settings.js b/packages/block-library/src/embed/settings.js index 7995939c325a3d..17d97cee43da6d 100644 --- a/packages/block-library/src/embed/settings.js +++ b/packages/block-library/src/embed/settings.js @@ -13,7 +13,7 @@ import classnames from 'classnames/dedupe'; */ import { __ } from '@wordpress/i18n'; import { compose } from '@wordpress/compose'; -import { RichText } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; import { withSelect, withDispatch } from '@wordpress/data'; const embedAttributes = { diff --git a/packages/block-library/src/file/edit.js b/packages/block-library/src/file/edit.js index 9dca21987bc8cd..3ce7211eceb854 100644 --- a/packages/block-library/src/file/edit.js +++ b/packages/block-library/src/file/edit.js @@ -26,8 +26,8 @@ import { MediaUploadCheck, MediaPlaceholder, RichText, - mediaUpload, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; +import { mediaUpload } from '@wordpress/editor'; import { Component, Fragment } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; diff --git a/packages/block-library/src/file/index.js b/packages/block-library/src/file/index.js index 9ce871bcfa2774..7a58074192e216 100644 --- a/packages/block-library/src/file/index.js +++ b/packages/block-library/src/file/index.js @@ -10,7 +10,7 @@ import { __, _x } from '@wordpress/i18n'; import { createBlobURL } from '@wordpress/blob'; import { createBlock } from '@wordpress/blocks'; import { select } from '@wordpress/data'; -import { RichText } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; /** * Internal dependencies diff --git a/packages/block-library/src/file/inspector.js b/packages/block-library/src/file/inspector.js index 4c686ad5afe6d4..6ed6747f4455c6 100644 --- a/packages/block-library/src/file/inspector.js +++ b/packages/block-library/src/file/inspector.js @@ -8,7 +8,7 @@ import { ToggleControl, } from '@wordpress/components'; import { Fragment } from '@wordpress/element'; -import { InspectorControls } from '@wordpress/editor'; +import { InspectorControls } from '@wordpress/block-editor'; export default function FileBlockInspector( { hrefs, diff --git a/packages/block-library/src/gallery/edit.js b/packages/block-library/src/gallery/edit.js index 203403023abd2b..868a6a083723d3 100644 --- a/packages/block-library/src/gallery/edit.js +++ b/packages/block-library/src/gallery/edit.js @@ -24,8 +24,8 @@ import { MediaPlaceholder, MediaUpload, InspectorControls, - mediaUpload, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; +import { mediaUpload } from '@wordpress/editor'; import { Component, Fragment } from '@wordpress/element'; import { __, sprintf } from '@wordpress/i18n'; diff --git a/packages/block-library/src/gallery/gallery-image.js b/packages/block-library/src/gallery/gallery-image.js index ff95dd1cc49cb4..de187969265002 100644 --- a/packages/block-library/src/gallery/gallery-image.js +++ b/packages/block-library/src/gallery/gallery-image.js @@ -11,7 +11,7 @@ import { IconButton, Spinner } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { BACKSPACE, DELETE } from '@wordpress/keycodes'; import { withSelect } from '@wordpress/data'; -import { RichText } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; import { isBlobURL } from '@wordpress/blob'; class GalleryImage extends Component { diff --git a/packages/block-library/src/gallery/index.js b/packages/block-library/src/gallery/index.js index 9e616efa3684fd..4387f9a5e70838 100644 --- a/packages/block-library/src/gallery/index.js +++ b/packages/block-library/src/gallery/index.js @@ -8,7 +8,8 @@ import { filter, every, map, some } from 'lodash'; */ import { __ } from '@wordpress/i18n'; import { createBlock } from '@wordpress/blocks'; -import { RichText, mediaUpload } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; +import { mediaUpload } from '@wordpress/editor'; import { createBlobURL } from '@wordpress/blob'; /** diff --git a/packages/block-library/src/heading/edit.js b/packages/block-library/src/heading/edit.js index 95b810c90c5294..cf723896a55a03 100644 --- a/packages/block-library/src/heading/edit.js +++ b/packages/block-library/src/heading/edit.js @@ -10,7 +10,12 @@ import { __ } from '@wordpress/i18n'; import { Fragment } from '@wordpress/element'; import { PanelBody } from '@wordpress/components'; import { createBlock } from '@wordpress/blocks'; -import { RichText, BlockControls, InspectorControls, AlignmentToolbar } from '@wordpress/editor'; +import { + RichText, + BlockControls, + InspectorControls, + AlignmentToolbar, +} from '@wordpress/block-editor'; export default function HeadingEdit( { attributes, diff --git a/packages/block-library/src/heading/edit.native.js b/packages/block-library/src/heading/edit.native.js index d28021a0bbd992..7ead0d8bf074bd 100644 --- a/packages/block-library/src/heading/edit.native.js +++ b/packages/block-library/src/heading/edit.native.js @@ -13,7 +13,7 @@ import { View } from 'react-native'; */ import { __ } from '@wordpress/i18n'; import { Component } from '@wordpress/element'; -import { RichText, BlockControls } from '@wordpress/editor'; +import { RichText, BlockControls } from '@wordpress/block-editor'; import { createBlock } from '@wordpress/blocks'; /** diff --git a/packages/block-library/src/heading/index.js b/packages/block-library/src/heading/index.js index 288a72d35bc1be..f5760985785687 100644 --- a/packages/block-library/src/heading/index.js +++ b/packages/block-library/src/heading/index.js @@ -12,7 +12,7 @@ import { getPhrasingContentSchema, getBlockAttributes, } from '@wordpress/blocks'; -import { RichText } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; import { Path, SVG, diff --git a/packages/block-library/src/html/edit.js b/packages/block-library/src/html/edit.js index 0000654785a43a..99df666bb55ec8 100644 --- a/packages/block-library/src/html/edit.js +++ b/packages/block-library/src/html/edit.js @@ -3,7 +3,8 @@ */ import { __ } from '@wordpress/i18n'; import { Component } from '@wordpress/element'; -import { BlockControls, PlainText, transformStyles } from '@wordpress/editor'; +import { BlockControls, PlainText } from '@wordpress/block-editor'; +import { transformStyles } from '@wordpress/editor'; import { Disabled, SandBox } from '@wordpress/components'; import { withSelect } from '@wordpress/data'; diff --git a/packages/block-library/src/image/edit.js b/packages/block-library/src/image/edit.js index f8308165923f10..51d2587591eda3 100644 --- a/packages/block-library/src/image/edit.js +++ b/packages/block-library/src/image/edit.js @@ -40,8 +40,8 @@ import { MediaUpload, MediaUploadCheck, RichText, - mediaUpload, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; +import { mediaUpload } from '@wordpress/editor'; import { Component, Fragment } from '@wordpress/element'; import { __, sprintf } from '@wordpress/i18n'; import { getPath } from '@wordpress/url'; diff --git a/packages/block-library/src/image/edit.native.js b/packages/block-library/src/image/edit.native.js index eabcdc9941a263..95eb712a83f8e6 100644 --- a/packages/block-library/src/image/edit.native.js +++ b/packages/block-library/src/image/edit.native.js @@ -27,6 +27,8 @@ import { RichText, BlockControls, InspectorControls, +} from '@wordpress/block-editor'; +import { BottomSheet, Picker, } from '@wordpress/editor'; diff --git a/packages/block-library/src/image/index.js b/packages/block-library/src/image/index.js index 9c8d519425dfd3..92b9af7ec9a42c 100644 --- a/packages/block-library/src/image/index.js +++ b/packages/block-library/src/image/index.js @@ -12,7 +12,7 @@ import { getBlockAttributes, getPhrasingContentSchema, } from '@wordpress/blocks'; -import { RichText } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; import { Fragment } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; diff --git a/packages/block-library/src/latest-comments/edit.js b/packages/block-library/src/latest-comments/edit.js index 7d4e65913f9917..0f44f30b8ac5ad 100644 --- a/packages/block-library/src/latest-comments/edit.js +++ b/packages/block-library/src/latest-comments/edit.js @@ -13,8 +13,8 @@ import { InspectorControls, BlockAlignmentToolbar, BlockControls, - ServerSideRender, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; +import { ServerSideRender } from '@wordpress/editor'; /** * Minimum number of comments a user can show using this block. diff --git a/packages/block-library/src/latest-posts/edit.js b/packages/block-library/src/latest-posts/edit.js index a275afda148abb..f5f8bc5d121d06 100644 --- a/packages/block-library/src/latest-posts/edit.js +++ b/packages/block-library/src/latest-posts/edit.js @@ -29,7 +29,7 @@ import { InspectorControls, BlockAlignmentToolbar, BlockControls, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import { withSelect } from '@wordpress/data'; /** diff --git a/packages/block-library/src/list/index.js b/packages/block-library/src/list/index.js index 4137dcdf3a6735..961d57535d0449 100644 --- a/packages/block-library/src/list/index.js +++ b/packages/block-library/src/list/index.js @@ -12,7 +12,7 @@ import { getPhrasingContentSchema, getBlockAttributes, } from '@wordpress/blocks'; -import { RichText } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; import { replace, join, split, create, toHTMLString, LINE_SEPARATOR } from '@wordpress/rich-text'; import { G, Path, SVG } from '@wordpress/components'; diff --git a/packages/block-library/src/media-text/edit.js b/packages/block-library/src/media-text/edit.js index 9f9b626f837fd2..061d36ccf6c697 100644 --- a/packages/block-library/src/media-text/edit.js +++ b/packages/block-library/src/media-text/edit.js @@ -14,7 +14,7 @@ import { InspectorControls, PanelColorSettings, withColors, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import { Component, Fragment } from '@wordpress/element'; import { PanelBody, diff --git a/packages/block-library/src/media-text/index.js b/packages/block-library/src/media-text/index.js index 01182b306a6420..6809ba48ad4355 100644 --- a/packages/block-library/src/media-text/index.js +++ b/packages/block-library/src/media-text/index.js @@ -11,7 +11,7 @@ import { createBlock } from '@wordpress/blocks'; import { InnerBlocks, getColorClassName, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; /** diff --git a/packages/block-library/src/media-text/media-container.js b/packages/block-library/src/media-text/media-container.js index 6f0ce32685f63b..a255e37dc65380 100644 --- a/packages/block-library/src/media-text/media-container.js +++ b/packages/block-library/src/media-text/media-container.js @@ -7,7 +7,7 @@ import { BlockIcon, MediaPlaceholder, MediaUpload, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import { Component, Fragment } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; diff --git a/packages/block-library/src/missing/index.js b/packages/block-library/src/missing/index.js index 62ad7ed96b9992..bee4d275fa85b8 100644 --- a/packages/block-library/src/missing/index.js +++ b/packages/block-library/src/missing/index.js @@ -6,7 +6,7 @@ import { RawHTML, Fragment } from '@wordpress/element'; import { Button } from '@wordpress/components'; import { getBlockType, createBlock } from '@wordpress/blocks'; import { withDispatch } from '@wordpress/data'; -import { Warning } from '@wordpress/editor'; +import { Warning } from '@wordpress/block-editor'; function MissingBlockWarning( { attributes, convertToHTML } ) { const { originalName, originalUndelimitedContent } = attributes; diff --git a/packages/block-library/src/more/edit.js b/packages/block-library/src/more/edit.js index 54347bbdbc6fd0..3840182a80d845 100644 --- a/packages/block-library/src/more/edit.js +++ b/packages/block-library/src/more/edit.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { PanelBody, ToggleControl } from '@wordpress/components'; import { Component, Fragment } from '@wordpress/element'; -import { InspectorControls } from '@wordpress/editor'; +import { InspectorControls } from '@wordpress/block-editor'; import { ENTER } from '@wordpress/keycodes'; import { getDefaultBlockName, diff --git a/packages/block-library/src/more/edit.native.js b/packages/block-library/src/more/edit.native.js index 6a73a44c73b6a8..e6d519c26b3042 100644 --- a/packages/block-library/src/more/edit.native.js +++ b/packages/block-library/src/more/edit.native.js @@ -16,7 +16,7 @@ import { /** * Internal dependencies */ -import { PlainText } from '@wordpress/editor'; +import { PlainText } from '@wordpress/block-editor'; import styles from './editor.scss'; export default class MoreEdit extends Component { diff --git a/packages/block-library/src/paragraph/edit.js b/packages/block-library/src/paragraph/edit.js index 060080b971e599..0ed9c5c91b5820 100644 --- a/packages/block-library/src/paragraph/edit.js +++ b/packages/block-library/src/paragraph/edit.js @@ -27,7 +27,7 @@ import { PanelColorSettings, RichText, withFontSizes, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import { createBlock } from '@wordpress/blocks'; import { compose } from '@wordpress/compose'; import { withSelect } from '@wordpress/data'; diff --git a/packages/block-library/src/paragraph/edit.native.js b/packages/block-library/src/paragraph/edit.native.js index 4b303d489557db..aae89121947259 100644 --- a/packages/block-library/src/paragraph/edit.native.js +++ b/packages/block-library/src/paragraph/edit.native.js @@ -9,7 +9,7 @@ import { View } from 'react-native'; import { __ } from '@wordpress/i18n'; import { Component } from '@wordpress/element'; import { createBlock } from '@wordpress/blocks'; -import { RichText } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; /** * Internal dependencies diff --git a/packages/block-library/src/paragraph/index.js b/packages/block-library/src/paragraph/index.js index 934efe8dc1c90d..460bb680d3dcf8 100644 --- a/packages/block-library/src/paragraph/index.js +++ b/packages/block-library/src/paragraph/index.js @@ -15,7 +15,7 @@ import { getColorClassName, getFontSizeClass, RichText, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import { getPhrasingContentSchema } from '@wordpress/blocks'; import { Path, diff --git a/packages/block-library/src/preformatted/index.js b/packages/block-library/src/preformatted/index.js index 25144b04abcfe8..7d90224f9639cd 100644 --- a/packages/block-library/src/preformatted/index.js +++ b/packages/block-library/src/preformatted/index.js @@ -3,7 +3,7 @@ */ import { __ } from '@wordpress/i18n'; import { createBlock, getPhrasingContentSchema } from '@wordpress/blocks'; -import { RichText } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; import { Path, Rect, SVG } from '@wordpress/components'; export const name = 'core/preformatted'; diff --git a/packages/block-library/src/pullquote/edit.js b/packages/block-library/src/pullquote/edit.js index eb7b2b4e0bbd86..45acc1f67463d2 100644 --- a/packages/block-library/src/pullquote/edit.js +++ b/packages/block-library/src/pullquote/edit.js @@ -18,7 +18,7 @@ import { InspectorControls, withColors, PanelColorSettings, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; export const SOLID_COLOR_STYLE_NAME = 'solid-color'; export const SOLID_COLOR_CLASS = `is-style-${ SOLID_COLOR_STYLE_NAME }`; diff --git a/packages/block-library/src/pullquote/index.js b/packages/block-library/src/pullquote/index.js index 766cb78861158c..308f230c94dd9a 100644 --- a/packages/block-library/src/pullquote/index.js +++ b/packages/block-library/src/pullquote/index.js @@ -12,7 +12,7 @@ import { getColorClassName, RichText, getColorObjectByAttributeValues, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import { select, } from '@wordpress/data'; diff --git a/packages/block-library/src/quote/index.js b/packages/block-library/src/quote/index.js index 43c380be09f3ab..535dd29e4d8b59 100644 --- a/packages/block-library/src/quote/index.js +++ b/packages/block-library/src/quote/index.js @@ -13,7 +13,7 @@ import { BlockControls, AlignmentToolbar, RichText, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import { join, split, create, toHTMLString } from '@wordpress/rich-text'; import { Path, SVG } from '@wordpress/components'; diff --git a/packages/block-library/src/rss/edit.js b/packages/block-library/src/rss/edit.js index a08e7fc8fe4d56..e7262e11b2bc16 100644 --- a/packages/block-library/src/rss/edit.js +++ b/packages/block-library/src/rss/edit.js @@ -17,7 +17,7 @@ import { __ } from '@wordpress/i18n'; import { BlockControls, InspectorControls, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; const DEFAULT_MIN_ITEMS = 1; const DEFAULT_MAX_ITEMS = 10; diff --git a/packages/block-library/src/search/edit.js b/packages/block-library/src/search/edit.js index f5a5acd20c4982..6525f5a82408f9 100644 --- a/packages/block-library/src/search/edit.js +++ b/packages/block-library/src/search/edit.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { RichText } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; export default function SearchEdit( { className, attributes, setAttributes } ) { diff --git a/packages/block-library/src/shortcode/index.js b/packages/block-library/src/shortcode/index.js index 7204cd1eadf439..6d497a0e29aca9 100644 --- a/packages/block-library/src/shortcode/index.js +++ b/packages/block-library/src/shortcode/index.js @@ -5,7 +5,7 @@ import { removep, autop } from '@wordpress/autop'; import { RawHTML } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { Dashicon, SVG, Path } from '@wordpress/components'; -import { PlainText } from '@wordpress/editor'; +import { PlainText } from '@wordpress/block-editor'; import { withInstanceId } from '@wordpress/compose'; export const name = 'core/shortcode'; diff --git a/packages/block-library/src/spacer/index.js b/packages/block-library/src/spacer/index.js index d671a24b994c03..fd83148315454d 100644 --- a/packages/block-library/src/spacer/index.js +++ b/packages/block-library/src/spacer/index.js @@ -8,7 +8,7 @@ import classnames from 'classnames'; */ import { Fragment } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; -import { InspectorControls } from '@wordpress/editor'; +import { InspectorControls } from '@wordpress/block-editor'; import { BaseControl, PanelBody, ResizableBox, G, SVG, Path } from '@wordpress/components'; import { withInstanceId } from '@wordpress/compose'; diff --git a/packages/block-library/src/subhead/index.js b/packages/block-library/src/subhead/index.js index 82fa6536fc3662..d35847e4edce1d 100644 --- a/packages/block-library/src/subhead/index.js +++ b/packages/block-library/src/subhead/index.js @@ -9,7 +9,7 @@ import { RichText, BlockControls, AlignmentToolbar, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import { SVG, Path } from '@wordpress/components'; export const name = 'core/subhead'; diff --git a/packages/block-library/src/table/edit.js b/packages/block-library/src/table/edit.js index 175de8277d071e..a54b3e9d1789d7 100644 --- a/packages/block-library/src/table/edit.js +++ b/packages/block-library/src/table/edit.js @@ -13,7 +13,7 @@ import { RichText, PanelColorSettings, createCustomColorsHOC, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; import { PanelBody, diff --git a/packages/block-library/src/table/index.js b/packages/block-library/src/table/index.js index 78bc014bd80b04..35a37c52f00d55 100644 --- a/packages/block-library/src/table/index.js +++ b/packages/block-library/src/table/index.js @@ -9,7 +9,7 @@ import classnames from 'classnames'; import { __, _x } from '@wordpress/i18n'; import { getPhrasingContentSchema } from '@wordpress/blocks'; import { G, Path, SVG } from '@wordpress/components'; -import { RichText, getColorClassName } from '@wordpress/editor'; +import { RichText, getColorClassName } from '@wordpress/block-editor'; /** * Internal dependencies diff --git a/packages/block-library/src/tag-cloud/edit.js b/packages/block-library/src/tag-cloud/edit.js index 2fb7179e2ca221..9a58c64de87e16 100644 --- a/packages/block-library/src/tag-cloud/edit.js +++ b/packages/block-library/src/tag-cloud/edit.js @@ -15,7 +15,7 @@ import { } from '@wordpress/components'; import { withSelect } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; -import { InspectorControls } from '@wordpress/editor'; +import { InspectorControls } from '@wordpress/block-editor'; class TagCloudEdit extends Component { constructor() { diff --git a/packages/block-library/src/template/index.js b/packages/block-library/src/template/index.js index 831f6bfeee5d64..6da60730b2596d 100644 --- a/packages/block-library/src/template/index.js +++ b/packages/block-library/src/template/index.js @@ -2,7 +2,7 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { InnerBlocks } from '@wordpress/editor'; +import { InnerBlocks } from '@wordpress/block-editor'; import { G, Path, Rect, SVG } from '@wordpress/components'; export const name = 'core/template'; diff --git a/packages/block-library/src/test/helpers/index.js b/packages/block-library/src/test/helpers/index.js index 789eff443d7cc0..2f672f2090bd31 100644 --- a/packages/block-library/src/test/helpers/index.js +++ b/packages/block-library/src/test/helpers/index.js @@ -12,7 +12,8 @@ import { getBlockType, registerBlockType, } from '@wordpress/blocks'; -import { BlockEdit } from '@wordpress/editor'; +import { BlockEdit } from '@wordpress/block-editor'; +import '@wordpress/editor'; export const blockEditRender = ( name, settings ) => { if ( ! getBlockType( name ) ) { diff --git a/packages/block-library/src/text-columns/index.js b/packages/block-library/src/text-columns/index.js index 60f93e61c60fd0..5bcf5cc3b6a790 100644 --- a/packages/block-library/src/text-columns/index.js +++ b/packages/block-library/src/text-columns/index.js @@ -15,7 +15,7 @@ import { BlockAlignmentToolbar, InspectorControls, RichText, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import deprecated from '@wordpress/deprecated'; export const name = 'core/text-columns'; diff --git a/packages/block-library/src/verse/index.js b/packages/block-library/src/verse/index.js index 17306b3284f007..e3832d1f6d8b42 100644 --- a/packages/block-library/src/verse/index.js +++ b/packages/block-library/src/verse/index.js @@ -8,7 +8,7 @@ import { RichText, BlockControls, AlignmentToolbar, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; import { SVG, Path } from '@wordpress/components'; export const name = 'core/verse'; diff --git a/packages/block-library/src/video/edit.js b/packages/block-library/src/video/edit.js index e22f35d0bf41e9..6661db034b75c0 100644 --- a/packages/block-library/src/video/edit.js +++ b/packages/block-library/src/video/edit.js @@ -21,8 +21,8 @@ import { MediaUpload, MediaUploadCheck, RichText, - mediaUpload, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; +import { mediaUpload } from '@wordpress/editor'; import { Component, Fragment, createRef } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; diff --git a/packages/block-library/src/video/index.js b/packages/block-library/src/video/index.js index bba58193002288..e56d99127d5881 100644 --- a/packages/block-library/src/video/index.js +++ b/packages/block-library/src/video/index.js @@ -3,7 +3,7 @@ */ import { createBlobURL } from '@wordpress/blob'; import { createBlock } from '@wordpress/blocks'; -import { RichText } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; /** diff --git a/packages/e2e-tests/specs/__snapshots__/block-deletion.test.js.snap b/packages/e2e-tests/specs/__snapshots__/block-deletion.test.js.snap index 9758679af968fd..0eadd8df917678 100644 --- a/packages/e2e-tests/specs/__snapshots__/block-deletion.test.js.snap +++ b/packages/e2e-tests/specs/__snapshots__/block-deletion.test.js.snap @@ -80,7 +80,7 @@ exports[`block deletion - deleting the third block using the Remove Block shortc " `; -exports[`block deletion - deleting third third and fourth blocks using backspace with multi-block selection results in two remaining blocks and positions the caret at the end of the second block 1`] = ` +exports[`block deletion - deleting the third and fourth blocks using backspace with multi-block selection results in two remaining blocks and positions the caret at the end of the second block 1`] = ` "

First paragraph

@@ -90,7 +90,7 @@ exports[`block deletion - deleting third third and fourth blocks using backspace " `; -exports[`block deletion - deleting third third and fourth blocks using backspace with multi-block selection results in two remaining blocks and positions the caret at the end of the second block 2`] = ` +exports[`block deletion - deleting the third and fourth blocks using backspace with multi-block selection results in two remaining blocks and positions the caret at the end of the second block 2`] = ` "

First paragraph

diff --git a/packages/e2e-tests/specs/block-deletion.test.js b/packages/e2e-tests/specs/block-deletion.test.js index b08eacd1f6d622..24550537beff48 100644 --- a/packages/e2e-tests/specs/block-deletion.test.js +++ b/packages/e2e-tests/specs/block-deletion.test.js @@ -90,7 +90,7 @@ describe( 'block deletion -', () => { } ); } ); - describe( 'deleting third third and fourth blocks using backspace with multi-block selection', () => { + describe( 'deleting the third and fourth blocks using backspace with multi-block selection', () => { it( 'results in two remaining blocks and positions the caret at the end of the second block', async () => { // Add a third paragraph for this test. await page.keyboard.type( 'Third paragraph' ); diff --git a/packages/edit-post/src/components/header/header-toolbar/index.js b/packages/edit-post/src/components/header/header-toolbar/index.js index 7d99c1f889e04f..56f8dd7d5fdb2e 100644 --- a/packages/edit-post/src/components/header/header-toolbar/index.js +++ b/packages/edit-post/src/components/header/header-toolbar/index.js @@ -9,11 +9,13 @@ import { __ } from '@wordpress/i18n'; import { Inserter, BlockToolbar, + NavigableToolbar, + BlockNavigationDropdown, +} from '@wordpress/block-editor'; +import { TableOfContents, EditorHistoryRedo, EditorHistoryUndo, - NavigableToolbar, - BlockNavigationDropdown, } from '@wordpress/editor'; /** diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js index f0876f46722872..2274ff9ffa3ecf 100644 --- a/packages/edit-post/src/components/layout/index.js +++ b/packages/edit-post/src/components/layout/index.js @@ -8,12 +8,12 @@ import classnames from 'classnames'; */ import { Button, Popover, ScrollLock, navigateRegions } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; +import { PreserveScrollInReorder } from '@wordpress/block-editor'; import { AutosaveMonitor, UnsavedChangesWarning, EditorNotices, PostPublishPanel, - PreserveScrollInReorder, } from '@wordpress/editor'; import { withDispatch, withSelect } from '@wordpress/data'; import { Fragment } from '@wordpress/element'; diff --git a/packages/edit-post/src/components/options-modal/index.js b/packages/edit-post/src/components/options-modal/index.js index 76cf40a74cd92d..a7e2cc2f395cc0 100644 --- a/packages/edit-post/src/components/options-modal/index.js +++ b/packages/edit-post/src/components/options-modal/index.js @@ -10,7 +10,13 @@ import { Modal } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { withSelect, withDispatch } from '@wordpress/data'; import { compose } from '@wordpress/compose'; -import { PostTaxonomies, PostExcerptCheck, PageAttributesCheck, PostFeaturedImageCheck, PostTypeSupportCheck } from '@wordpress/editor'; +import { + PostTaxonomies, + PostExcerptCheck, + PageAttributesCheck, + PostFeaturedImageCheck, + PostTypeSupportCheck, +} from '@wordpress/editor'; /** * Internal dependencies diff --git a/packages/edit-post/src/components/sidebar/settings-sidebar/index.js b/packages/edit-post/src/components/sidebar/settings-sidebar/index.js index d6874aa100f04f..c43856376a3890 100644 --- a/packages/edit-post/src/components/sidebar/settings-sidebar/index.js +++ b/packages/edit-post/src/components/sidebar/settings-sidebar/index.js @@ -4,7 +4,7 @@ import { Panel, PanelBody } from '@wordpress/components'; import { compose, ifCondition } from '@wordpress/compose'; import { withSelect } from '@wordpress/data'; -import { BlockInspector } from '@wordpress/editor'; +import { BlockInspector } from '@wordpress/block-editor'; import { Fragment } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; /** diff --git a/packages/edit-post/src/components/visual-editor/index.js b/packages/edit-post/src/components/visual-editor/index.js index a8cdc7e06f69df..eadf8a5fc461df 100644 --- a/packages/edit-post/src/components/visual-editor/index.js +++ b/packages/edit-post/src/components/visual-editor/index.js @@ -2,17 +2,19 @@ * WordPress dependencies */ import { - BlockList, - CopyHandler, PostTitle, + VisualEditorGlobalKeyboardShortcuts, +} from '@wordpress/editor'; +import { WritingFlow, ObserveTyping, - VisualEditorGlobalKeyboardShortcuts, + BlockList, + CopyHandler, BlockSelectionClearer, MultiSelectScrollIntoView, _BlockSettingsMenuFirstItem, _BlockSettingsMenuPluginsExtension, -} from '@wordpress/editor'; +} from '@wordpress/block-editor'; /** * Internal dependencies diff --git a/packages/edit-post/src/hooks/validate-multiple-use/index.js b/packages/edit-post/src/hooks/validate-multiple-use/index.js index 8a9f15a2c1f49e..ea2958949f7e2d 100644 --- a/packages/edit-post/src/hooks/validate-multiple-use/index.js +++ b/packages/edit-post/src/hooks/validate-multiple-use/index.js @@ -15,7 +15,7 @@ import { } from '@wordpress/blocks'; import { Button } from '@wordpress/components'; import { withSelect, withDispatch } from '@wordpress/data'; -import { Warning } from '@wordpress/editor'; +import { Warning } from '@wordpress/block-editor'; import { addFilter } from '@wordpress/hooks'; import { __ } from '@wordpress/i18n'; import { compose, createHigherOrderComponent } from '@wordpress/compose'; diff --git a/packages/editor/package.json b/packages/editor/package.json index 97935dd04b4069..36b5da996439e3 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -22,7 +22,6 @@ "react-native": "src/index", "dependencies": { "@babel/runtime": "^7.3.1", - "@wordpress/a11y": "file:../a11y", "@wordpress/api-fetch": "file:../api-fetch", "@wordpress/blob": "file:../blob", "@wordpress/block-editor": "file:../block-editor", @@ -33,21 +32,17 @@ "@wordpress/data": "file:../data", "@wordpress/date": "file:../date", "@wordpress/deprecated": "file:../deprecated", - "@wordpress/dom": "file:../dom", "@wordpress/element": "file:../element", "@wordpress/hooks": "file:../hooks", "@wordpress/html-entities": "file:../html-entities", "@wordpress/i18n": "file:../i18n", - "@wordpress/is-shallow-equal": "file:../is-shallow-equal", "@wordpress/keycodes": "file:../keycodes", "@wordpress/notices": "file:../notices", "@wordpress/nux": "file:../nux", - "@wordpress/token-list": "file:../token-list", "@wordpress/url": "file:../url", "@wordpress/viewport": "file:../viewport", "@wordpress/wordcount": "file:../wordcount", "classnames": "^2.2.5", - "dom-scroll-into-view": "^1.2.1", "inherits": "^2.0.3", "lodash": "^4.17.11", "memize": "^1.0.5", @@ -56,7 +51,6 @@ "redux-optimist": "^1.0.0", "refx": "^3.0.0", "rememo": "^3.0.0", - "tinycolor2": "^1.4.1", "traverse": "^0.6.6" }, "publishConfig": { diff --git a/packages/editor/src/components/autocompleters/block.js b/packages/editor/src/components/autocompleters/block.js index 2945ea43227864..746928ea7752ec 100644 --- a/packages/editor/src/components/autocompleters/block.js +++ b/packages/editor/src/components/autocompleters/block.js @@ -3,11 +3,7 @@ */ import { select } from '@wordpress/data'; import { createBlock } from '@wordpress/blocks'; - -/** - * Internal dependencies - */ -import BlockIcon from '../block-icon'; +import { BlockIcon } from '@wordpress/block-editor'; /** * Returns the client ID of the parent where a newly inserted block would be diff --git a/packages/editor/src/components/deprecated.js b/packages/editor/src/components/deprecated.js new file mode 100644 index 00000000000000..80004056ec3114 --- /dev/null +++ b/packages/editor/src/components/deprecated.js @@ -0,0 +1,119 @@ +// Block Creation Components +/** + * WordPress dependencies + */ +import { + Autocomplete, + AlignmentToolbar, + BlockAlignmentToolbar, + BlockControls, + BlockEdit, + BlockEditorKeyboardShortcuts, + BlockFormatControls, + BlockIcon, + BlockInspector, + BlockList, + BlockMover, + BlockNavigationDropdown, + BlockSelectionClearer, + BlockSettingsMenu, + BlockTitle, + BlockToolbar, + ColorPalette, + ContrastChecker, + CopyHandler, + createCustomColorsHOC, + DefaultBlockAppender, + FontSizePicker, + getColorClassName, + getColorObjectByAttributeValues, + getColorObjectByColorValue, + getFontSize, + getFontSizeClass, + Inserter, + InnerBlocks, + InspectorAdvancedControls, + InspectorControls, + PanelColorSettings, + PlainText, + RichText, + RichTextShortcut, + RichTextToolbarButton, + RichTextInserterItem, + UnstableRichTextInputEvent, + MediaPlaceholder, + MediaUpload, + MediaUploadCheck, + MultiBlocksSwitcher, + MultiSelectScrollIntoView, + NavigableToolbar, + ObserveTyping, + PreserveScrollInReorder, + SkipToSelectedBlock, + URLInput, + URLInputButton, + URLPopover, + Warning, + WritingFlow, + withColorContext, + withColors, + withFontSizes, +} from '@wordpress/block-editor'; + +export { + Autocomplete, + AlignmentToolbar, + BlockAlignmentToolbar, + BlockControls, + BlockEdit, + BlockEditorKeyboardShortcuts, + BlockFormatControls, + BlockIcon, + BlockInspector, + BlockList, + BlockMover, + BlockNavigationDropdown, + BlockSelectionClearer, + BlockSettingsMenu, + BlockTitle, + BlockToolbar, + ColorPalette, + ContrastChecker, + CopyHandler, + createCustomColorsHOC, + DefaultBlockAppender, + FontSizePicker, + getColorClassName, + getColorObjectByAttributeValues, + getColorObjectByColorValue, + getFontSize, + getFontSizeClass, + Inserter, + InnerBlocks, + InspectorAdvancedControls, + InspectorControls, + PanelColorSettings, + PlainText, + RichText, + RichTextShortcut, + RichTextToolbarButton, + RichTextInserterItem, + UnstableRichTextInputEvent, + MediaPlaceholder, + MediaUpload, + MediaUploadCheck, + MultiBlocksSwitcher, + MultiSelectScrollIntoView, + NavigableToolbar, + ObserveTyping, + PreserveScrollInReorder, + SkipToSelectedBlock, + URLInput, + URLInputButton, + URLPopover, + Warning, + WritingFlow, + withColorContext, + withColors, + withFontSizes, +}; diff --git a/packages/editor/src/components/document-outline/item.js b/packages/editor/src/components/document-outline/item.js index eb6b147056f672..c0638100d25f19 100644 --- a/packages/editor/src/components/document-outline/item.js +++ b/packages/editor/src/components/document-outline/item.js @@ -7,11 +7,7 @@ import classnames from 'classnames'; * WordPress dependencies */ import { __ } from '@wordpress/i18n'; - -/** - * Internal dependencies - */ -import BlockTitle from '../block-title'; +import { BlockTitle } from '@wordpress/block-editor'; const TableOfContentsItem = ( { children, diff --git a/packages/editor/src/components/document-outline/test/index.js b/packages/editor/src/components/document-outline/test/index.js index a3fe67f9eab942..024cb615beeeba 100644 --- a/packages/editor/src/components/document-outline/test/index.js +++ b/packages/editor/src/components/document-outline/test/index.js @@ -13,7 +13,9 @@ import { createBlock, registerBlockType, unregisterBlockType } from '@wordpress/ */ import { DocumentOutline } from '../'; -jest.mock( '../../block-title', () => () => 'Block Title' ); +jest.mock( '@wordpress/block-editor', () => ( { + BlockTitle: () => 'Block Title', +} ) ); describe( 'DocumentOutline', () => { let paragraph, headingH1, headingParent, headingChild, nestedHeading; diff --git a/packages/editor/src/components/error-boundary/index.js b/packages/editor/src/components/error-boundary/index.js index 2218494072125a..ce74c05857777f 100644 --- a/packages/editor/src/components/error-boundary/index.js +++ b/packages/editor/src/components/error-boundary/index.js @@ -5,11 +5,7 @@ import { Component } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { Button, ClipboardButton } from '@wordpress/components'; import { select } from '@wordpress/data'; - -/** - * Internal dependencies - */ -import { Warning } from '../'; +import { Warning } from '@wordpress/block-editor'; class ErrorBoundary extends Component { constructor() { diff --git a/packages/editor/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js b/packages/editor/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js index 4a0cd7f8fd4f7b..6298496b87f479 100644 --- a/packages/editor/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js +++ b/packages/editor/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js @@ -6,12 +6,12 @@ import { KeyboardShortcuts } from '@wordpress/components'; import { withDispatch } from '@wordpress/data'; import { rawShortcut } from '@wordpress/keycodes'; import deprecated from '@wordpress/deprecated'; +import { BlockEditorKeyboardShortcuts } from '@wordpress/block-editor'; /** * Internal dependencies */ import SaveShortcut from './save-shortcut'; -import BlockEditorKeyboardShortcuts from './block-editor-shortcuts'; class VisualEditorGlobalKeyboardShortcuts extends Component { constructor() { diff --git a/packages/editor/src/components/index.js b/packages/editor/src/components/index.js index 9ebb2dacc86400..9d12344c50dc2a 100644 --- a/packages/editor/src/components/index.js +++ b/packages/editor/src/components/index.js @@ -1,36 +1,6 @@ // Block Creation Components -export { default as Autocomplete } from './autocomplete'; export * from './autocompleters'; -export { default as AlignmentToolbar } from './alignment-toolbar'; -export { default as BlockAlignmentToolbar } from './block-alignment-toolbar'; -export { default as BlockControls } from './block-controls'; -export { default as BlockEdit } from './block-edit'; -export { default as BlockFormatControls } from './block-format-controls'; -export { default as BlockNavigationDropdown } from './block-navigation/dropdown'; -export { default as BlockIcon } from './block-icon'; -export { default as ColorPalette } from './color-palette'; -export { default as withColorContext } from './color-palette/with-color-context'; -export * from './colors'; -export { default as ContrastChecker } from './contrast-checker'; -export * from './font-sizes'; -export { default as InnerBlocks } from './inner-blocks'; -export { default as InspectorAdvancedControls } from './inspector-advanced-controls'; -export { default as InspectorControls } from './inspector-controls'; -export { default as PanelColorSettings } from './panel-color-settings'; -export { default as PlainText } from './plain-text'; -export { - default as RichText, - RichTextShortcut, - RichTextToolbarButton, - UnstableRichTextInputEvent, -} from './rich-text'; export { default as ServerSideRender } from './server-side-render'; -export { default as MediaPlaceholder } from './media-placeholder'; -export { default as MediaUpload } from './media-upload'; -export { default as MediaUploadCheck } from './media-upload/check'; -export { default as URLInput } from './url-input'; -export { default as URLInputButton } from './url-input/button'; -export { default as URLPopover } from './url-popover'; // Post Related Components export { default as AutosaveMonitor } from './autosave-monitor'; @@ -44,6 +14,7 @@ export { default as TextEditorGlobalKeyboardShortcuts } from './global-keyboard- export { default as EditorHistoryRedo } from './editor-history/redo'; export { default as EditorHistoryUndo } from './editor-history/undo'; export { default as EditorNotices } from './editor-notices'; +export { default as ErrorBoundary } from './error-boundary'; export { default as PageAttributesCheck } from './page-attributes/check'; export { default as PageAttributesOrder } from './page-attributes/order'; export { default as PageAttributesParent } from './page-attributes/parent'; @@ -88,28 +59,7 @@ export { default as TableOfContents } from './table-of-contents'; export { default as UnsavedChangesWarning } from './unsaved-changes-warning'; export { default as WordCount } from './word-count'; -// Content Related Components -export { default as BlockInspector } from './block-inspector'; -export { default as BlockList } from './block-list'; -export { default as BlockMover } from './block-mover'; -export { default as BlockSelectionClearer } from './block-selection-clearer'; -export { default as BlockSettingsMenu } from './block-settings-menu'; -export { default as _BlockSettingsMenuFirstItem } from './block-settings-menu/block-settings-menu-first-item'; -export { default as _BlockSettingsMenuPluginsExtension } from './block-settings-menu/block-settings-menu-plugins-extension'; -export { default as BlockTitle } from './block-title'; -export { default as BlockToolbar } from './block-toolbar'; -export { default as CopyHandler } from './copy-handler'; -export { default as DefaultBlockAppender } from './default-block-appender'; -export { default as ErrorBoundary } from './error-boundary'; -export { default as Inserter } from './inserter'; -export { default as MultiBlocksSwitcher } from './block-switcher/multi-blocks-switcher'; -export { default as MultiSelectScrollIntoView } from './multi-select-scroll-into-view'; -export { default as NavigableToolbar } from './navigable-toolbar'; -export { default as ObserveTyping } from './observe-typing'; -export { default as PreserveScrollInReorder } from './preserve-scroll-in-reorder'; -export { default as SkipToSelectedBlock } from './skip-to-selected-block'; -export { default as Warning } from './warning'; -export { default as WritingFlow } from './writing-flow'; - // State Related Components export { default as EditorProvider } from './provider'; + +export * from './deprecated'; diff --git a/packages/editor/src/components/post-featured-image/index.js b/packages/editor/src/components/post-featured-image/index.js index 0c77b6dbc69443..05e74ae5a2ace0 100644 --- a/packages/editor/src/components/post-featured-image/index.js +++ b/packages/editor/src/components/post-featured-image/index.js @@ -11,13 +11,12 @@ import { applyFilters } from '@wordpress/hooks'; import { Button, Spinner, ResponsiveWrapper, withFilters } from '@wordpress/components'; import { compose } from '@wordpress/compose'; import { withSelect, withDispatch } from '@wordpress/data'; +import { MediaUpload, MediaUploadCheck } from '@wordpress/block-editor'; /** * Internal dependencies */ import PostFeaturedImageCheck from './check'; -import MediaUpload from '../media-upload'; -import MediaUploadCheck from '../media-upload/check'; const ALLOWED_MEDIA_TYPES = [ 'image' ]; diff --git a/packages/editor/src/components/post-title/index.native.js b/packages/editor/src/components/post-title/index.native.js index 55e56d03a101da..95384a6aca6d77 100644 --- a/packages/editor/src/components/post-title/index.native.js +++ b/packages/editor/src/components/post-title/index.native.js @@ -7,7 +7,7 @@ import { View } from 'react-native'; * WordPress dependencies */ import { Component } from '@wordpress/element'; -import { RichText } from '@wordpress/editor'; +import { RichText } from '@wordpress/block-editor'; import { decodeEntities } from '@wordpress/html-entities'; import { withDispatch } from '@wordpress/data'; import { withFocusOutside } from '@wordpress/components'; diff --git a/packages/editor/src/hooks/index.js b/packages/editor/src/hooks/index.js index e0a1ee626d6722..2c8a61d9802521 100644 --- a/packages/editor/src/hooks/index.js +++ b/packages/editor/src/hooks/index.js @@ -1,8 +1,4 @@ /** * Internal dependencies */ -import './align'; -import './anchor'; -import './custom-class-name'; import './default-autocompleters'; -import './generated-class-name'; diff --git a/packages/editor/src/hooks/index.native.js b/packages/editor/src/hooks/index.native.js index d85f61d596d93b..e69de29bb2d1d6 100644 --- a/packages/editor/src/hooks/index.native.js +++ b/packages/editor/src/hooks/index.native.js @@ -1,5 +0,0 @@ -/** - * Internal dependencies - */ -import './custom-class-name'; -import './generated-class-name'; diff --git a/packages/editor/src/store/test/selectors.js b/packages/editor/src/store/test/selectors.js index 01f2d09199e52b..1740302fe73d6c 100644 --- a/packages/editor/src/store/test/selectors.js +++ b/packages/editor/src/store/test/selectors.js @@ -122,6 +122,9 @@ describe( 'selectors', () => { category: 'common', title: 'Test Freeform Content Handler', icon: 'test', + supports: { + className: false, + }, attributes: { content: { type: 'string', diff --git a/packages/editor/src/style.scss b/packages/editor/src/style.scss index 028e9094d629be..63f0e18c9974db 100644 --- a/packages/editor/src/style.scss +++ b/packages/editor/src/style.scss @@ -1,33 +1,7 @@ @import "./components/autocompleters/style.scss"; -@import "./components/block-drop-zone/style.scss"; -@import "./components/block-icon/style.scss"; -@import "./components/block-inspector/style.scss"; -@import "./components/block-list/style.scss"; -@import "./components/block-list-appender/style.scss"; -@import "./components/block-compare/style.scss"; -@import "./components/block-mover/style.scss"; -@import "./components/block-navigation/style.scss"; -@import "./components/block-preview/style.scss"; -@import "./components/block-settings-menu/style.scss"; -@import "./components/block-styles/style.scss"; -@import "./components/block-switcher/style.scss"; -@import "./components/block-toolbar/style.scss"; -@import "./components/block-types-list/style.scss"; -@import "./components/color-palette/control.scss"; -@import "./components/contrast-checker/style.scss"; -@import "./components/default-block-appender/style.scss"; @import "./components/document-outline/style.scss"; @import "./components/error-boundary/style.scss"; -@import "./components/font-sizes/style.scss"; -@import "./components/inner-blocks/style.scss"; -@import "./components/inserter-with-shortcuts/style.scss"; -@import "./components/inserter/style.scss"; -@import "./components/inserter-list-item/style.scss"; -@import "./components/media-placeholder/style.scss"; -@import "./components/multi-selection-inspector/style.scss"; @import "./components/page-attributes/style.scss"; -@import "./components/panel-color-settings/style.scss"; -@import "./components/plain-text/style.scss"; @import "./components/post-excerpt/style.scss"; @import "./components/post-featured-image/style.scss"; @import "./components/post-format/style.scss"; @@ -41,12 +15,5 @@ @import "./components/post-visibility/style.scss"; @import "./components/post-title/style.scss"; @import "./components/post-trash/style.scss"; -@import "./components/rich-text/format-toolbar/style.scss"; -@import "./components/rich-text/style.scss"; -@import "./components/skip-to-selected-block/style.scss"; @import "./components/table-of-contents/style.scss"; @import "./components/template-validation-notice/style.scss"; -@import "./components/url-input/style.scss"; -@import "./components/url-popover/style.scss"; -@import "./components/warning/style.scss"; -@import "./components/writing-flow/style.scss"; diff --git a/packages/format-library/package.json b/packages/format-library/package.json index 32f10182c632ff..c2824cc5ec0dc1 100644 --- a/packages/format-library/package.json +++ b/packages/format-library/package.json @@ -22,6 +22,7 @@ "react-native": "src/index", "dependencies": { "@babel/runtime": "^7.3.1", + "@wordpress/block-editor": "file:../block-editor", "@wordpress/components": "file:../components", "@wordpress/editor": "file:../editor", "@wordpress/element": "file:../element", diff --git a/packages/format-library/src/bold/index.js b/packages/format-library/src/bold/index.js index 15c64261fbfded..3026b749025ebf 100644 --- a/packages/format-library/src/bold/index.js +++ b/packages/format-library/src/bold/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { Fragment } from '@wordpress/element'; import { toggleFormat } from '@wordpress/rich-text'; -import { RichTextToolbarButton, RichTextShortcut, UnstableRichTextInputEvent } from '@wordpress/editor'; +import { RichTextToolbarButton, RichTextShortcut, UnstableRichTextInputEvent } from '@wordpress/block-editor'; const name = 'core/bold'; diff --git a/packages/format-library/src/code/index.js b/packages/format-library/src/code/index.js index f5bf96bb32a2e1..7e3a7b0dbf1517 100644 --- a/packages/format-library/src/code/index.js +++ b/packages/format-library/src/code/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { Fragment } from '@wordpress/element'; import { toggleFormat } from '@wordpress/rich-text'; -import { RichTextShortcut, RichTextToolbarButton } from '@wordpress/editor'; +import { RichTextShortcut, RichTextToolbarButton } from '@wordpress/block-editor'; const name = 'core/code'; diff --git a/packages/format-library/src/image/index.js b/packages/format-library/src/image/index.js index b7a3db3b1d4c34..2dca1c41506b61 100644 --- a/packages/format-library/src/image/index.js +++ b/packages/format-library/src/image/index.js @@ -5,7 +5,7 @@ import { Path, SVG, TextControl, Popover, IconButton, PositionedAtSelection } fr import { __ } from '@wordpress/i18n'; import { Component } from '@wordpress/element'; import { insertObject } from '@wordpress/rich-text'; -import { MediaUpload, RichTextToolbarButton, MediaUploadCheck } from '@wordpress/editor'; +import { MediaUpload, RichTextToolbarButton, MediaUploadCheck } from '@wordpress/block-editor'; import { LEFT, RIGHT, UP, DOWN, BACKSPACE, ENTER } from '@wordpress/keycodes'; const ALLOWED_MEDIA_TYPES = [ 'image' ]; diff --git a/packages/format-library/src/italic/index.js b/packages/format-library/src/italic/index.js index 1acadaf6f48267..36974eb1c0fc00 100644 --- a/packages/format-library/src/italic/index.js +++ b/packages/format-library/src/italic/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { Fragment } from '@wordpress/element'; import { toggleFormat } from '@wordpress/rich-text'; -import { RichTextToolbarButton, RichTextShortcut, UnstableRichTextInputEvent } from '@wordpress/editor'; +import { RichTextToolbarButton, RichTextShortcut, UnstableRichTextInputEvent } from '@wordpress/block-editor'; const name = 'core/italic'; diff --git a/packages/format-library/src/link/index.js b/packages/format-library/src/link/index.js index a3ffc2c6b27f09..c4e3c67348b165 100644 --- a/packages/format-library/src/link/index.js +++ b/packages/format-library/src/link/index.js @@ -11,7 +11,7 @@ import { slice, } from '@wordpress/rich-text'; import { isURL } from '@wordpress/url'; -import { RichTextToolbarButton, RichTextShortcut } from '@wordpress/editor'; +import { RichTextToolbarButton, RichTextShortcut } from '@wordpress/block-editor'; /** * Internal dependencies diff --git a/packages/format-library/src/link/index.native.js b/packages/format-library/src/link/index.native.js index 4ea3ee0e309342..99713b911a62f4 100644 --- a/packages/format-library/src/link/index.native.js +++ b/packages/format-library/src/link/index.native.js @@ -9,7 +9,7 @@ import { find } from 'lodash'; import { __ } from '@wordpress/i18n'; import { Component, Fragment } from '@wordpress/element'; import { withSpokenMessages } from '@wordpress/components'; -import { RichTextToolbarButton } from '@wordpress/editor'; +import { RichTextToolbarButton } from '@wordpress/block-editor'; import { applyFormat, getActiveFormat, diff --git a/packages/format-library/src/link/inline.js b/packages/format-library/src/link/inline.js index c700ad2ef3dc53..4f32382bebaa9d 100644 --- a/packages/format-library/src/link/inline.js +++ b/packages/format-library/src/link/inline.js @@ -25,7 +25,7 @@ import { getTextContent, slice, } from '@wordpress/rich-text'; -import { URLInput, URLPopover } from '@wordpress/editor'; +import { URLInput, URLPopover } from '@wordpress/block-editor'; /** * Internal dependencies diff --git a/packages/format-library/src/strikethrough/index.js b/packages/format-library/src/strikethrough/index.js index 7caa96781730bd..636b1b1d9122ca 100644 --- a/packages/format-library/src/strikethrough/index.js +++ b/packages/format-library/src/strikethrough/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { Fragment } from '@wordpress/element'; import { toggleFormat } from '@wordpress/rich-text'; -import { RichTextToolbarButton, RichTextShortcut } from '@wordpress/editor'; +import { RichTextToolbarButton, RichTextShortcut } from '@wordpress/block-editor'; const name = 'core/strikethrough'; diff --git a/packages/format-library/src/underline/index.js b/packages/format-library/src/underline/index.js index 0777e83e1f7178..c049a0e8a3fba2 100644 --- a/packages/format-library/src/underline/index.js +++ b/packages/format-library/src/underline/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { Fragment } from '@wordpress/element'; import { toggleFormat } from '@wordpress/rich-text'; -import { RichTextShortcut, UnstableRichTextInputEvent } from '@wordpress/editor'; +import { RichTextShortcut, UnstableRichTextInputEvent } from '@wordpress/block-editor'; const name = 'core/underline';