@wordpress/editor 13.35.0 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +333 -39
- package/build/bindings/index.js +1 -3
- package/build/bindings/index.js.map +1 -1
- package/build/bindings/pattern-overrides.js +1 -1
- package/build/bindings/pattern-overrides.js.map +1 -1
- package/build/bindings/post-meta.js +38 -2
- package/build/bindings/post-meta.js.map +1 -1
- package/build/components/autocompleters/user.js +12 -8
- package/build/components/autocompleters/user.js.map +1 -1
- package/build/components/block-manager/category.js +19 -17
- package/build/components/block-manager/category.js.map +1 -1
- package/build/components/block-manager/checklist.js +15 -14
- package/build/components/block-manager/checklist.js.map +1 -1
- package/build/components/block-manager/index.js +37 -33
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/block-removal-warnings/index.js +2 -2
- package/build/components/block-removal-warnings/index.js.map +1 -1
- package/build/components/block-settings-menu/content-only-settings-menu.js +46 -32
- package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build/components/blog-title/index.js +116 -0
- package/build/components/blog-title/index.js.map +1 -0
- package/build/components/collapsible-block-toolbar/index.js +21 -18
- package/build/components/collapsible-block-toolbar/index.js.map +1 -1
- package/build/components/commands/index.js +109 -3
- package/build/components/commands/index.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +167 -0
- package/build/components/create-template-part-modal/index.js.map +1 -0
- package/build/components/create-template-part-modal/utils.js +64 -0
- package/build/components/create-template-part-modal/utils.js.map +1 -0
- package/build/components/deprecated.js +2 -2
- package/build/components/deprecated.js.map +1 -1
- package/build/components/document-bar/index.js +94 -70
- package/build/components/document-bar/index.js.map +1 -1
- package/build/components/document-outline/index.js +124 -121
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/document-outline/item.js +18 -14
- package/build/components/document-outline/item.js.map +1 -1
- package/build/components/document-tools/index.js +56 -53
- package/build/components/document-tools/index.js.map +1 -1
- package/build/components/editor-help/add-blocks.native.js +14 -11
- package/build/components/editor-help/add-blocks.native.js.map +1 -1
- package/build/components/editor-help/customize-blocks.native.js +14 -11
- package/build/components/editor-help/customize-blocks.native.js.map +1 -1
- package/build/components/editor-help/help-detail-navigation-screen.native.js +32 -22
- package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
- package/build/components/editor-help/help-get-support-button.native.js +8 -6
- package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
- package/build/components/editor-help/help-section-title.native.js +8 -6
- package/build/components/editor-help/help-section-title.native.js.map +1 -1
- package/build/components/editor-help/help-topic-row.native.js +7 -6
- package/build/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build/components/editor-help/icon-move-blocks.native.js +7 -6
- package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
- package/build/components/editor-help/index.native.js +94 -76
- package/build/components/editor-help/index.native.js.map +1 -1
- package/build/components/editor-help/intro-to-blocks.native.js +41 -37
- package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
- package/build/components/editor-help/move-blocks.native.js +25 -21
- package/build/components/editor-help/move-blocks.native.js.map +1 -1
- package/build/components/editor-help/remove-blocks.native.js +12 -9
- package/build/components/editor-help/remove-blocks.native.js.map +1 -1
- package/build/components/editor-help/view-sections.native.js +24 -19
- package/build/components/editor-help/view-sections.native.js.map +1 -1
- package/build/components/editor-history/redo.js +2 -2
- package/build/components/editor-history/redo.js.map +1 -1
- package/build/components/editor-history/undo.js +2 -2
- package/build/components/editor-history/undo.js.map +1 -1
- package/build/components/editor-interface/content-slot-fill.js +23 -0
- package/build/components/editor-interface/content-slot-fill.js.map +1 -0
- package/build/components/editor-interface/index.js +178 -0
- package/build/components/editor-interface/index.js.map +1 -0
- package/build/components/editor-notices/index.js +22 -9
- package/build/components/editor-notices/index.js.map +1 -1
- package/build/components/editor-snackbars/index.js +2 -2
- package/build/components/editor-snackbars/index.js.map +1 -1
- package/build/components/entities-saved-states/entity-record-item.js +37 -10
- package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build/components/entities-saved-states/entity-type-list.js +25 -22
- package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build/components/entities-saved-states/index.js +53 -46
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/error-boundary/index.js +27 -14
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/error-boundary/index.native.js +45 -35
- package/build/components/error-boundary/index.native.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js +3 -4
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build/components/global-styles-provider/index.js +81 -16
- package/build/components/global-styles-provider/index.js.map +1 -1
- package/build/components/header/back-button.js +34 -0
- package/build/components/header/back-button.js.map +1 -0
- package/build/components/header/index.js +88 -59
- package/build/components/header/index.js.map +1 -1
- package/build/components/inserter-sidebar/index.js +45 -19
- package/build/components/inserter-sidebar/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +53 -48
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +30 -26
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/list-view-sidebar/index.js +59 -47
- package/build/components/list-view-sidebar/index.js.map +1 -1
- package/build/components/list-view-sidebar/list-view-outline.js +21 -4
- package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
- package/build/components/local-autosave-monitor/index.js +15 -2
- package/build/components/local-autosave-monitor/index.js.map +1 -1
- package/build/components/mode-switcher/index.js +10 -10
- package/build/components/mode-switcher/index.js.map +1 -1
- package/build/components/more-menu/copy-content-menu-item.js +5 -4
- package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
- package/build/components/more-menu/index.js +89 -76
- package/build/components/more-menu/index.js.map +1 -1
- package/build/components/more-menu/tools-more-menu-group.js +2 -2
- package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build/components/more-menu/view-more-menu-group.js +2 -2
- package/build/components/more-menu/view-more-menu-group.js.map +1 -1
- package/build/components/offline-status/index.native.js +12 -11
- package/build/components/offline-status/index.native.js.map +1 -1
- package/build/components/page-attributes/order.js +87 -14
- package/build/components/page-attributes/order.js.map +1 -1
- package/build/components/page-attributes/panel.js +10 -19
- package/build/components/page-attributes/panel.js.map +1 -1
- package/build/components/page-attributes/parent.js +86 -3
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/pattern-duplicate-modal/index.js +59 -0
- package/build/components/pattern-duplicate-modal/index.js.map +1 -0
- package/build/components/pattern-overrides-panel/index.js +2 -2
- package/build/components/pattern-overrides-panel/index.js.map +1 -1
- package/build/components/pattern-rename-modal/index.js +58 -0
- package/build/components/pattern-rename-modal/index.js.map +1 -0
- package/build/components/plugin-document-setting-panel/index.js +17 -12
- package/build/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build/components/plugin-post-publish-panel/index.js +10 -7
- package/build/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build/components/plugin-post-status-info/index.js +7 -4
- package/build/components/plugin-post-status-info/index.js.map +1 -1
- package/build/components/plugin-pre-publish-panel/index.js +10 -7
- package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build/components/plugin-sidebar/index.js +3 -4
- package/build/components/plugin-sidebar/index.js.map +1 -1
- package/build/components/plugin-sidebar-more-menu-item/index.js +3 -5
- package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build/components/post-actions/actions.js +378 -309
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-actions/export-pattern-action.js +64 -0
- package/build/components/post-actions/export-pattern-action.js.map +1 -0
- package/build/components/post-actions/export-pattern-action.native.js +11 -0
- package/build/components/post-actions/export-pattern-action.native.js.map +1 -0
- package/build/components/post-actions/index.js +66 -50
- package/build/components/post-actions/index.js.map +1 -1
- package/build/components/post-author/check.js +6 -6
- package/build/components/post-author/check.js.map +1 -1
- package/build/components/post-author/combobox.js +4 -3
- package/build/components/post-author/combobox.js.map +1 -1
- package/build/components/post-author/hook.js +2 -1
- package/build/components/post-author/hook.js.map +1 -1
- package/build/components/post-author/index.js +3 -3
- package/build/components/post-author/index.js.map +1 -1
- package/build/components/post-author/panel.js +72 -4
- package/build/components/post-author/panel.js.map +1 -1
- package/build/components/post-author/select.js +4 -3
- package/build/components/post-author/select.js.map +1 -1
- package/build/components/post-card-panel/index.js +54 -19
- package/build/components/post-card-panel/index.js.map +1 -1
- package/build/components/post-comments/index.js +38 -22
- package/build/components/post-comments/index.js.map +1 -1
- package/build/components/post-content-information/index.js +8 -5
- package/build/components/post-content-information/index.js.map +1 -1
- package/build/components/post-discussion/panel.js +54 -38
- package/build/components/post-discussion/panel.js.map +1 -1
- package/build/components/post-excerpt/check.js +6 -6
- package/build/components/post-excerpt/check.js.map +1 -1
- package/build/components/post-excerpt/index.js +18 -17
- package/build/components/post-excerpt/index.js.map +1 -1
- package/build/components/post-excerpt/panel.js +59 -42
- package/build/components/post-excerpt/panel.js.map +1 -1
- package/build/components/post-excerpt/plugin.js +7 -4
- package/build/components/post-excerpt/plugin.js.map +1 -1
- package/build/components/post-featured-image/check.js +17 -7
- package/build/components/post-featured-image/check.js.map +1 -1
- package/build/components/post-featured-image/index.js +77 -49
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-featured-image/panel.js +22 -7
- package/build/components/post-featured-image/panel.js.map +1 -1
- package/build/components/post-format/check.js +14 -4
- package/build/components/post-format/check.js.map +1 -1
- package/build/components/post-format/index.js +37 -20
- package/build/components/post-format/index.js.map +1 -1
- package/build/components/post-format/panel.js +73 -7
- package/build/components/post-format/panel.js.map +1 -1
- package/build/components/post-last-edited-panel/index.js +7 -4
- package/build/components/post-last-edited-panel/index.js.map +1 -1
- package/build/components/post-last-revision/check.js +13 -5
- package/build/components/post-last-revision/check.js.map +1 -1
- package/build/components/post-last-revision/index.js +19 -13
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-last-revision/panel.js +12 -5
- package/build/components/post-last-revision/panel.js.map +1 -1
- package/build/components/post-locked-modal/index.js +57 -35
- package/build/components/post-locked-modal/index.js.map +1 -1
- package/build/components/post-panel-row/index.js +11 -8
- package/build/components/post-panel-row/index.js.map +1 -1
- package/build/components/post-panel-section/index.js +5 -4
- package/build/components/post-panel-section/index.js.map +1 -1
- package/build/components/post-pending-status/check.js +10 -0
- package/build/components/post-pending-status/check.js.map +1 -1
- package/build/components/post-pending-status/index.js +14 -7
- package/build/components/post-pending-status/index.js.map +1 -1
- package/build/components/post-pingbacks/index.js +13 -5
- package/build/components/post-pingbacks/index.js.map +1 -1
- package/build/components/post-preview-button/index.js +45 -21
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-button/index.js +21 -11
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
- package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
- package/build/components/post-publish-panel/index.js +46 -33
- package/build/components/post-publish-panel/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-category-panel.js +12 -9
- package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js +21 -15
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js +13 -10
- package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.js +29 -24
- package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build/components/post-publish-panel/postpublish.js +55 -38
- package/build/components/post-publish-panel/postpublish.js.map +1 -1
- package/build/components/post-publish-panel/prepublish.js +41 -26
- package/build/components/post-publish-panel/prepublish.js.map +1 -1
- package/build/components/post-saved-state/index.js +8 -8
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-schedule/check.js +8 -0
- package/build/components/post-schedule/check.js.map +1 -1
- package/build/components/post-schedule/index.js +30 -5
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-schedule/label.js +16 -0
- package/build/components/post-schedule/label.js.map +1 -1
- package/build/components/post-schedule/panel.js +43 -30
- package/build/components/post-schedule/panel.js.map +1 -1
- package/build/components/post-slug/check.js +5 -4
- package/build/components/post-slug/check.js.map +1 -1
- package/build/components/post-slug/index.js +5 -3
- package/build/components/post-slug/index.js.map +1 -1
- package/build/components/post-slug/panel.js +7 -4
- package/build/components/post-slug/panel.js.map +1 -1
- package/build/components/post-status/index.js +118 -119
- package/build/components/post-status/index.js.map +1 -1
- package/build/components/post-sticky/index.js +16 -8
- package/build/components/post-sticky/index.js.map +1 -1
- package/build/components/post-sticky/panel.js +6 -2
- package/build/components/post-sticky/panel.js.map +1 -1
- package/build/components/post-switch-to-draft-button/index.js +25 -21
- package/build/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build/components/post-sync-status/index.js +8 -6
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +21 -20
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +71 -61
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/index.js +6 -6
- package/build/components/post-taxonomies/index.js.map +1 -1
- package/build/components/post-taxonomies/most-used-terms.js +19 -15
- package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build/components/post-taxonomies/panel.js +15 -11
- package/build/components/post-taxonomies/panel.js.map +1 -1
- package/build/components/post-template/block-theme.js +42 -32
- package/build/components/post-template/block-theme.js.map +1 -1
- package/build/components/post-template/classic-theme.js +73 -50
- package/build/components/post-template/classic-theme.js.map +1 -1
- package/build/components/post-template/create-new-template-modal.js +33 -27
- package/build/components/post-template/create-new-template-modal.js.map +1 -1
- package/build/components/post-template/create-new-template.js +14 -11
- package/build/components/post-template/create-new-template.js.map +1 -1
- package/build/components/post-template/panel.js +16 -10
- package/build/components/post-template/panel.js.map +1 -1
- package/build/components/post-template/reset-default-template.js +5 -4
- package/build/components/post-template/reset-default-template.js.map +1 -1
- package/build/components/post-template/swap-template-button.js +20 -15
- package/build/components/post-template/swap-template-button.js.map +1 -1
- package/build/components/post-text-editor/index.js +27 -20
- package/build/components/post-text-editor/index.js.map +1 -1
- package/build/components/post-title/index.js +29 -17
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-title/index.native.js +81 -57
- package/build/components/post-title/index.native.js.map +1 -1
- package/build/components/post-title/post-title-raw.js +10 -3
- package/build/components/post-title/post-title-raw.js.map +1 -1
- package/build/components/post-title/use-post-title-focus.js +7 -0
- package/build/components/post-title/use-post-title-focus.js.map +1 -1
- package/build/components/post-title/use-post-title.js +5 -0
- package/build/components/post-title/use-post-title.js.map +1 -1
- package/build/components/post-transform-panel/index.js +11 -11
- package/build/components/post-transform-panel/index.js.map +1 -1
- package/build/components/post-trash/index.js +19 -15
- package/build/components/post-trash/index.js.map +1 -1
- package/build/components/post-url/check.js +8 -0
- package/build/components/post-url/check.js.map +1 -1
- package/build/components/post-url/index.js +98 -73
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/post-url/label.js +11 -0
- package/build/components/post-url/label.js.map +1 -1
- package/build/components/post-url/panel.js +33 -25
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/post-view-link/index.js +2 -2
- package/build/components/post-view-link/index.js.map +1 -1
- package/build/components/post-visibility/check.js +9 -0
- package/build/components/post-visibility/check.js.map +1 -1
- package/build/components/post-visibility/index.js +83 -68
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/post-visibility/label.js +11 -0
- package/build/components/post-visibility/label.js.map +1 -1
- package/build/components/posts-per-page/index.js +109 -0
- package/build/components/posts-per-page/index.js.map +1 -0
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
- package/build/components/preferences-modal/index.js +124 -102
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preview-dropdown/index.js +47 -31
- package/build/components/preview-dropdown/index.js.map +1 -1
- package/build/components/provider/index.js +94 -20
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js +55 -19
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +7 -6
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/provider/with-registry-provider.js +31 -24
- package/build/components/provider/with-registry-provider.js.map +1 -1
- package/build/components/resizable-editor/index.js +96 -0
- package/build/components/resizable-editor/index.js.map +1 -0
- package/build/components/resizable-editor/resize-handle.js +59 -0
- package/build/components/resizable-editor/resize-handle.js.map +1 -0
- package/build/components/save-publish-panels/index.js +35 -26
- package/build/components/save-publish-panels/index.js.map +1 -1
- package/build/components/sidebar/header.js +17 -14
- package/build/components/sidebar/header.js.map +1 -1
- package/build/components/sidebar/index.js +36 -32
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar/post-summary.js +38 -33
- package/build/components/sidebar/post-summary.js.map +1 -1
- package/build/components/site-discussion/index.js +133 -0
- package/build/components/site-discussion/index.js.map +1 -0
- package/build/components/start-page-options/index.js +13 -11
- package/build/components/start-page-options/index.js.map +1 -1
- package/build/components/start-template-options/index.js +29 -23
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/table-of-contents/index.js +4 -4
- package/build/components/table-of-contents/index.js.map +1 -1
- package/build/components/table-of-contents/panel.js +53 -35
- package/build/components/table-of-contents/panel.js.map +1 -1
- package/build/components/template-areas/index.js +36 -22
- package/build/components/template-areas/index.js.map +1 -1
- package/build/components/template-content-panel/index.js +7 -6
- package/build/components/template-content-panel/index.js.map +1 -1
- package/build/components/template-validation-notice/index.js +25 -21
- package/build/components/template-validation-notice/index.js.map +1 -1
- package/build/components/text-editor/index.js +73 -0
- package/build/components/text-editor/index.js.map +1 -0
- package/build/components/time-to-read/index.js +8 -8
- package/build/components/time-to-read/index.js.map +1 -1
- package/build/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +6 -6
- package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
- package/build/components/{editor-canvas → visual-editor}/index.js +115 -74
- package/build/components/visual-editor/index.js.map +1 -0
- package/build/components/word-count/index.js +5 -4
- package/build/components/word-count/index.js.map +1 -1
- package/build/hooks/custom-sources-backwards-compatibility.js +3 -4
- package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build/hooks/index.js +1 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/media-upload.js +10 -0
- package/build/hooks/media-upload.js.map +1 -0
- package/build/hooks/pattern-overrides.js +15 -11
- package/build/hooks/pattern-overrides.js.map +1 -1
- package/build/private-apis.js +10 -28
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +2 -26
- package/build/private-apis.native.js.map +1 -1
- package/build/store/constants.js +4 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/private-actions.js +10 -14
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +39 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/selectors.js +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build/utils/set-nested-value.js +44 -0
- package/build/utils/set-nested-value.js.map +1 -0
- package/build-module/bindings/index.js +1 -3
- package/build-module/bindings/index.js.map +1 -1
- package/build-module/bindings/pattern-overrides.js +1 -1
- package/build-module/bindings/pattern-overrides.js.map +1 -1
- package/build-module/bindings/post-meta.js +38 -2
- package/build-module/bindings/post-meta.js.map +1 -1
- package/build-module/components/autocompleters/user.js +14 -9
- package/build-module/components/autocompleters/user.js.map +1 -1
- package/build-module/components/block-manager/category.js +20 -17
- package/build-module/components/block-manager/category.js.map +1 -1
- package/build-module/components/block-manager/checklist.js +16 -14
- package/build-module/components/block-manager/checklist.js.map +1 -1
- package/build-module/components/block-manager/index.js +38 -33
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/block-removal-warnings/index.js +2 -2
- package/build-module/components/block-removal-warnings/index.js.map +1 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +48 -32
- package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build-module/components/blog-title/index.js +110 -0
- package/build-module/components/blog-title/index.js.map +1 -0
- package/build-module/components/collapsible-block-toolbar/index.js +23 -18
- package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
- package/build-module/components/commands/index.js +111 -5
- package/build-module/components/commands/index.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +160 -0
- package/build-module/components/create-template-part-modal/index.js.map +1 -0
- package/build-module/components/create-template-part-modal/utils.js +54 -0
- package/build-module/components/create-template-part-modal/utils.js.map +1 -0
- package/build-module/components/deprecated.js +2 -2
- package/build-module/components/deprecated.js.map +1 -1
- package/build-module/components/document-bar/index.js +93 -68
- package/build-module/components/document-bar/index.js.map +1 -1
- package/build-module/components/document-outline/index.js +125 -120
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/document-outline/item.js +19 -14
- package/build-module/components/document-outline/item.js.map +1 -1
- package/build-module/components/document-tools/index.js +58 -53
- package/build-module/components/document-tools/index.js.map +1 -1
- package/build-module/components/editor-help/add-blocks.native.js +16 -11
- package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/customize-blocks.native.js +16 -11
- package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js +33 -22
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
- package/build-module/components/editor-help/help-get-support-button.native.js +8 -6
- package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
- package/build-module/components/editor-help/help-section-title.native.js +8 -6
- package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
- package/build-module/components/editor-help/help-topic-row.native.js +7 -6
- package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build-module/components/editor-help/icon-move-blocks.native.js +7 -6
- package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/index.native.js +96 -76
- package/build-module/components/editor-help/index.native.js.map +1 -1
- package/build-module/components/editor-help/intro-to-blocks.native.js +43 -37
- package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/move-blocks.native.js +27 -21
- package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/remove-blocks.native.js +14 -9
- package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/view-sections.native.js +25 -19
- package/build-module/components/editor-help/view-sections.native.js.map +1 -1
- package/build-module/components/editor-history/redo.js +2 -2
- package/build-module/components/editor-history/redo.js.map +1 -1
- package/build-module/components/editor-history/undo.js +2 -2
- package/build-module/components/editor-history/undo.js.map +1 -1
- package/build-module/components/editor-interface/content-slot-fill.js +16 -0
- package/build-module/components/editor-interface/content-slot-fill.js.map +1 -0
- package/build-module/components/editor-interface/index.js +172 -0
- package/build-module/components/editor-interface/index.js.map +1 -0
- package/build-module/components/editor-notices/index.js +25 -9
- package/build-module/components/editor-notices/index.js.map +1 -1
- package/build-module/components/editor-snackbars/index.js +2 -2
- package/build-module/components/editor-snackbars/index.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-record-item.js +40 -11
- package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-type-list.js +26 -22
- package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +54 -46
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js +27 -14
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/error-boundary/index.native.js +46 -35
- package/build-module/components/error-boundary/index.native.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +2 -2
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build-module/components/global-styles-provider/index.js +82 -17
- package/build-module/components/global-styles-provider/index.js.map +1 -1
- package/build-module/components/header/back-button.js +28 -0
- package/build-module/components/header/back-button.js.map +1 -0
- package/build-module/components/header/index.js +89 -59
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/inserter-sidebar/index.js +47 -21
- package/build-module/components/inserter-sidebar/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +54 -48
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +32 -26
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/list-view-sidebar/index.js +60 -47
- package/build-module/components/list-view-sidebar/index.js.map +1 -1
- package/build-module/components/list-view-sidebar/list-view-outline.js +23 -4
- package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
- package/build-module/components/local-autosave-monitor/index.js +15 -2
- package/build-module/components/local-autosave-monitor/index.js.map +1 -1
- package/build-module/components/mode-switcher/index.js +9 -8
- package/build-module/components/mode-switcher/index.js.map +1 -1
- package/build-module/components/more-menu/copy-content-menu-item.js +5 -4
- package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
- package/build-module/components/more-menu/index.js +91 -76
- package/build-module/components/more-menu/index.js.map +1 -1
- package/build-module/components/more-menu/tools-more-menu-group.js +2 -2
- package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build-module/components/more-menu/view-more-menu-group.js +2 -2
- package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
- package/build-module/components/offline-status/index.native.js +12 -9
- package/build-module/components/offline-status/index.native.js.map +1 -1
- package/build-module/components/page-attributes/order.js +90 -17
- package/build-module/components/page-attributes/order.js.map +1 -1
- package/build-module/components/page-attributes/panel.js +13 -21
- package/build-module/components/page-attributes/panel.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +88 -5
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/pattern-duplicate-modal/index.js +51 -0
- package/build-module/components/pattern-duplicate-modal/index.js.map +1 -0
- package/build-module/components/pattern-overrides-panel/index.js +2 -2
- package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
- package/build-module/components/pattern-rename-modal/index.js +50 -0
- package/build-module/components/pattern-rename-modal/index.js.map +1 -0
- package/build-module/components/plugin-document-setting-panel/index.js +19 -12
- package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build-module/components/plugin-post-publish-panel/index.js +10 -7
- package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-post-status-info/index.js +7 -4
- package/build-module/components/plugin-post-status-info/index.js.map +1 -1
- package/build-module/components/plugin-pre-publish-panel/index.js +10 -7
- package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-sidebar/index.js +2 -2
- package/build-module/components/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -3
- package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build-module/components/post-actions/actions.js +379 -309
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-actions/export-pattern-action.js +58 -0
- package/build-module/components/post-actions/export-pattern-action.js.map +1 -0
- package/build-module/components/post-actions/export-pattern-action.native.js +5 -0
- package/build-module/components/post-actions/export-pattern-action.native.js.map +1 -0
- package/build-module/components/post-actions/index.js +68 -50
- package/build-module/components/post-actions/index.js.map +1 -1
- package/build-module/components/post-author/check.js +5 -4
- package/build-module/components/post-author/check.js.map +1 -1
- package/build-module/components/post-author/combobox.js +4 -3
- package/build-module/components/post-author/combobox.js.map +1 -1
- package/build-module/components/post-author/hook.js +2 -1
- package/build-module/components/post-author/hook.js.map +1 -1
- package/build-module/components/post-author/index.js +3 -3
- package/build-module/components/post-author/index.js.map +1 -1
- package/build-module/components/post-author/panel.js +72 -4
- package/build-module/components/post-author/panel.js.map +1 -1
- package/build-module/components/post-author/select.js +4 -3
- package/build-module/components/post-author/select.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +54 -20
- package/build-module/components/post-card-panel/index.js.map +1 -1
- package/build-module/components/post-comments/index.js +40 -22
- package/build-module/components/post-comments/index.js.map +1 -1
- package/build-module/components/post-content-information/index.js +8 -5
- package/build-module/components/post-content-information/index.js.map +1 -1
- package/build-module/components/post-discussion/panel.js +56 -39
- package/build-module/components/post-discussion/panel.js.map +1 -1
- package/build-module/components/post-excerpt/check.js +5 -4
- package/build-module/components/post-excerpt/check.js.map +1 -1
- package/build-module/components/post-excerpt/index.js +17 -15
- package/build-module/components/post-excerpt/index.js.map +1 -1
- package/build-module/components/post-excerpt/panel.js +60 -40
- package/build-module/components/post-excerpt/panel.js.map +1 -1
- package/build-module/components/post-excerpt/plugin.js +7 -4
- package/build-module/components/post-excerpt/plugin.js.map +1 -1
- package/build-module/components/post-featured-image/check.js +18 -6
- package/build-module/components/post-featured-image/check.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +78 -49
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-featured-image/panel.js +22 -7
- package/build-module/components/post-featured-image/panel.js.map +1 -1
- package/build-module/components/post-format/check.js +14 -4
- package/build-module/components/post-format/check.js.map +1 -1
- package/build-module/components/post-format/index.js +39 -21
- package/build-module/components/post-format/index.js.map +1 -1
- package/build-module/components/post-format/panel.js +75 -7
- package/build-module/components/post-format/panel.js.map +1 -1
- package/build-module/components/post-last-edited-panel/index.js +7 -4
- package/build-module/components/post-last-edited-panel/index.js.map +1 -1
- package/build-module/components/post-last-revision/check.js +14 -4
- package/build-module/components/post-last-revision/check.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +21 -13
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-last-revision/panel.js +13 -4
- package/build-module/components/post-last-revision/panel.js.map +1 -1
- package/build-module/components/post-locked-modal/index.js +60 -34
- package/build-module/components/post-locked-modal/index.js.map +1 -1
- package/build-module/components/post-panel-row/index.js +12 -8
- package/build-module/components/post-panel-row/index.js.map +1 -1
- package/build-module/components/post-panel-section/index.js +5 -4
- package/build-module/components/post-panel-section/index.js.map +1 -1
- package/build-module/components/post-pending-status/check.js +11 -0
- package/build-module/components/post-pending-status/check.js.map +1 -1
- package/build-module/components/post-pending-status/index.js +15 -7
- package/build-module/components/post-pending-status/index.js.map +1 -1
- package/build-module/components/post-pingbacks/index.js +13 -5
- package/build-module/components/post-pingbacks/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +47 -21
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +22 -11
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
- package/build-module/components/post-publish-panel/index.js +48 -33
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-category-panel.js +13 -9
- package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js +22 -15
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-tags-panel.js +14 -10
- package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.js +30 -24
- package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +57 -38
- package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
- package/build-module/components/post-publish-panel/prepublish.js +43 -26
- package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
- package/build-module/components/post-saved-state/index.js +8 -6
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/check.js +9 -0
- package/build-module/components/post-schedule/check.js.map +1 -1
- package/build-module/components/post-schedule/index.js +30 -6
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-schedule/label.js +17 -0
- package/build-module/components/post-schedule/label.js.map +1 -1
- package/build-module/components/post-schedule/panel.js +43 -30
- package/build-module/components/post-schedule/panel.js.map +1 -1
- package/build-module/components/post-slug/check.js +5 -4
- package/build-module/components/post-slug/check.js.map +1 -1
- package/build-module/components/post-slug/index.js +5 -3
- package/build-module/components/post-slug/index.js.map +1 -1
- package/build-module/components/post-slug/panel.js +7 -4
- package/build-module/components/post-slug/panel.js.map +1 -1
- package/build-module/components/post-status/index.js +121 -120
- package/build-module/components/post-status/index.js.map +1 -1
- package/build-module/components/post-sticky/index.js +17 -9
- package/build-module/components/post-sticky/index.js.map +1 -1
- package/build-module/components/post-sticky/panel.js +6 -2
- package/build-module/components/post-sticky/panel.js.map +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js +27 -21
- package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-module/components/post-sync-status/index.js +8 -6
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +22 -18
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +71 -59
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/index.js +6 -6
- package/build-module/components/post-taxonomies/index.js.map +1 -1
- package/build-module/components/post-taxonomies/most-used-terms.js +20 -15
- package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build-module/components/post-taxonomies/panel.js +15 -11
- package/build-module/components/post-taxonomies/panel.js.map +1 -1
- package/build-module/components/post-template/block-theme.js +44 -32
- package/build-module/components/post-template/block-theme.js.map +1 -1
- package/build-module/components/post-template/classic-theme.js +74 -50
- package/build-module/components/post-template/classic-theme.js.map +1 -1
- package/build-module/components/post-template/create-new-template-modal.js +34 -27
- package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
- package/build-module/components/post-template/create-new-template.js +16 -11
- package/build-module/components/post-template/create-new-template.js.map +1 -1
- package/build-module/components/post-template/panel.js +17 -9
- package/build-module/components/post-template/panel.js.map +1 -1
- package/build-module/components/post-template/reset-default-template.js +5 -4
- package/build-module/components/post-template/reset-default-template.js.map +1 -1
- package/build-module/components/post-template/swap-template-button.js +22 -15
- package/build-module/components/post-template/swap-template-button.js.map +1 -1
- package/build-module/components/post-text-editor/index.js +30 -19
- package/build-module/components/post-text-editor/index.js.map +1 -1
- package/build-module/components/post-title/index.js +29 -18
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-title/index.native.js +81 -57
- package/build-module/components/post-title/index.native.js.map +1 -1
- package/build-module/components/post-title/post-title-raw.js +11 -2
- package/build-module/components/post-title/post-title-raw.js.map +1 -1
- package/build-module/components/post-title/use-post-title-focus.js +8 -0
- package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
- package/build-module/components/post-title/use-post-title.js +6 -0
- package/build-module/components/post-title/use-post-title.js.map +1 -1
- package/build-module/components/post-transform-panel/index.js +12 -12
- package/build-module/components/post-transform-panel/index.js.map +1 -1
- package/build-module/components/post-trash/index.js +21 -15
- package/build-module/components/post-trash/index.js.map +1 -1
- package/build-module/components/post-url/check.js +9 -0
- package/build-module/components/post-url/check.js.map +1 -1
- package/build-module/components/post-url/index.js +100 -72
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/post-url/label.js +12 -0
- package/build-module/components/post-url/label.js.map +1 -1
- package/build-module/components/post-url/panel.js +35 -24
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/post-view-link/index.js +2 -2
- package/build-module/components/post-view-link/index.js.map +1 -1
- package/build-module/components/post-visibility/check.js +10 -0
- package/build-module/components/post-visibility/check.js.map +1 -1
- package/build-module/components/post-visibility/index.js +85 -67
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/post-visibility/label.js +12 -0
- package/build-module/components/post-visibility/label.js.map +1 -1
- package/build-module/components/posts-per-page/index.js +103 -0
- package/build-module/components/posts-per-page/index.js.map +1 -0
- package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
- package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +126 -102
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preview-dropdown/index.js +49 -31
- package/build-module/components/preview-dropdown/index.js.map +1 -1
- package/build-module/components/provider/index.js +96 -20
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js +58 -20
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +7 -6
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js +33 -26
- package/build-module/components/provider/with-registry-provider.js.map +1 -1
- package/build-module/components/resizable-editor/index.js +89 -0
- package/build-module/components/resizable-editor/index.js.map +1 -0
- package/build-module/components/resizable-editor/resize-handle.js +54 -0
- package/build-module/components/resizable-editor/resize-handle.js.map +1 -0
- package/build-module/components/save-publish-panels/index.js +37 -26
- package/build-module/components/save-publish-panels/index.js.map +1 -1
- package/build-module/components/sidebar/header.js +18 -14
- package/build-module/components/sidebar/header.js.map +1 -1
- package/build-module/components/sidebar/index.js +36 -31
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/post-summary.js +33 -25
- package/build-module/components/sidebar/post-summary.js.map +1 -1
- package/build-module/components/site-discussion/index.js +127 -0
- package/build-module/components/site-discussion/index.js.map +1 -0
- package/build-module/components/start-page-options/index.js +13 -11
- package/build-module/components/start-page-options/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js +30 -23
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/table-of-contents/index.js +4 -4
- package/build-module/components/table-of-contents/index.js.map +1 -1
- package/build-module/components/table-of-contents/panel.js +55 -35
- package/build-module/components/table-of-contents/panel.js.map +1 -1
- package/build-module/components/template-areas/index.js +37 -22
- package/build-module/components/template-areas/index.js.map +1 -1
- package/build-module/components/template-content-panel/index.js +7 -6
- package/build-module/components/template-content-panel/index.js.map +1 -1
- package/build-module/components/template-validation-notice/index.js +27 -21
- package/build-module/components/template-validation-notice/index.js.map +1 -1
- package/build-module/components/text-editor/index.js +66 -0
- package/build-module/components/text-editor/index.js.map +1 -0
- package/build-module/components/time-to-read/index.js +7 -6
- package/build-module/components/time-to-read/index.js.map +1 -1
- package/build-module/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +5 -4
- package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
- package/build-module/components/{editor-canvas → visual-editor}/index.js +118 -75
- package/build-module/components/visual-editor/index.js.map +1 -0
- package/build-module/components/word-count/index.js +5 -4
- package/build-module/components/word-count/index.js.map +1 -1
- package/build-module/hooks/custom-sources-backwards-compatibility.js +2 -2
- package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/media-upload.js +7 -0
- package/build-module/hooks/media-upload.js.map +1 -0
- package/build-module/hooks/pattern-overrides.js +17 -11
- package/build-module/hooks/pattern-overrides.js.map +1 -1
- package/build-module/private-apis.js +10 -28
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +2 -26
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/constants.js +3 -0
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/private-actions.js +10 -14
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +38 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/selectors.js +1 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/set-nested-value.js +38 -0
- package/build-module/utils/set-nested-value.js.map +1 -0
- package/build-style/style-rtl.css +318 -90
- package/build-style/style.css +318 -90
- package/package.json +40 -36
- package/src/bindings/index.js +1 -4
- package/src/bindings/pattern-overrides.js +1 -1
- package/src/bindings/post-meta.js +46 -6
- package/src/components/blog-title/index.js +124 -0
- package/src/components/blog-title/style.scss +4 -0
- package/src/components/commands/index.js +113 -3
- package/src/components/create-template-part-modal/index.js +205 -0
- package/src/components/create-template-part-modal/style.scss +69 -0
- package/src/components/create-template-part-modal/test/utils.js +60 -0
- package/src/components/create-template-part-modal/utils.js +67 -0
- package/src/components/document-bar/index.js +32 -21
- package/src/components/document-tools/index.js +2 -7
- package/src/components/editor-help/help-get-support-button.native.js +1 -1
- package/src/components/editor-interface/content-slot-fill.js +15 -0
- package/src/components/editor-interface/index.js +230 -0
- package/src/components/editor-notices/index.js +10 -0
- package/src/components/entities-saved-states/entity-record-item.js +45 -16
- package/src/components/entities-saved-states/style.scss +13 -0
- package/src/components/error-boundary/index.js +10 -0
- package/src/components/error-boundary/index.native.js +1 -1
- package/src/components/global-styles-provider/index.js +100 -8
- package/src/components/header/back-button.js +27 -0
- package/src/components/header/index.js +25 -10
- package/src/components/header/style.scss +5 -0
- package/src/components/inserter-sidebar/index.js +65 -32
- package/src/components/inserter-sidebar/style.scss +0 -13
- package/src/components/local-autosave-monitor/index.js +12 -0
- package/src/components/page-attributes/order.js +79 -3
- package/src/components/page-attributes/panel.js +10 -26
- package/src/components/page-attributes/parent.js +98 -2
- package/src/components/page-attributes/style.scss +19 -0
- package/src/components/pattern-duplicate-modal/index.js +50 -0
- package/src/components/pattern-rename-modal/index.js +44 -0
- package/src/components/post-actions/actions.js +306 -261
- package/src/components/post-actions/export-pattern-action.js +74 -0
- package/src/components/post-actions/export-pattern-action.native.js +4 -0
- package/src/components/post-actions/index.js +16 -5
- package/src/components/post-author/combobox.js +1 -0
- package/src/components/post-author/hook.js +1 -1
- package/src/components/post-author/panel.js +63 -2
- package/src/components/post-author/select.js +1 -0
- package/src/components/post-author/style.scss +6 -0
- package/src/components/post-card-panel/index.js +69 -22
- package/src/components/post-card-panel/style.scss +23 -1
- package/src/components/post-comments/index.js +5 -0
- package/src/components/post-discussion/panel.js +9 -2
- package/src/components/post-discussion/style.scss +1 -3
- package/src/components/post-excerpt/panel.js +45 -48
- package/src/components/post-excerpt/style.scss +0 -17
- package/src/components/post-featured-image/check.js +9 -0
- package/src/components/post-featured-image/index.js +15 -0
- package/src/components/post-featured-image/panel.js +9 -0
- package/src/components/post-format/check.js +8 -0
- package/src/components/post-format/index.js +15 -4
- package/src/components/post-format/panel.js +71 -6
- package/src/components/post-format/style.scss +10 -4
- package/src/components/post-last-revision/check.js +8 -0
- package/src/components/post-last-revision/index.js +7 -2
- package/src/components/post-last-revision/panel.js +5 -0
- package/src/components/post-locked-modal/index.js +6 -0
- package/src/components/post-panel-row/style.scss +15 -0
- package/src/components/post-pending-status/check.js +10 -0
- package/src/components/post-pending-status/index.js +5 -0
- package/src/components/post-pingbacks/index.js +6 -0
- package/src/components/post-preview-button/index.js +15 -0
- package/src/components/post-publish-button/index.js +17 -4
- package/src/components/post-publish-panel/index.js +1 -0
- package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +3 -3
- package/src/components/post-schedule/check.js +8 -0
- package/src/components/post-schedule/index.js +30 -3
- package/src/components/post-schedule/label.js +15 -0
- package/src/components/post-schedule/panel.js +9 -1
- package/src/components/post-schedule/style.scss +0 -11
- package/src/components/post-status/index.js +30 -52
- package/src/components/post-status/style.scss +4 -34
- package/src/components/post-sticky/index.js +12 -7
- package/src/components/post-sticky/style.scss +3 -0
- package/src/components/post-template/block-theme.js +1 -0
- package/src/components/post-template/classic-theme.js +15 -0
- package/src/components/post-template/panel.js +5 -0
- package/src/components/post-template/style.scss +0 -8
- package/src/components/post-text-editor/index.js +5 -0
- package/src/components/post-title/index.js +8 -1
- package/src/components/post-title/index.native.js +70 -35
- package/src/components/post-title/post-title-raw.js +8 -0
- package/src/components/post-title/use-post-title-focus.js +7 -0
- package/src/components/post-title/use-post-title.js +5 -0
- package/src/components/post-transform-panel/index.js +2 -10
- package/src/components/post-url/check.js +8 -0
- package/src/components/post-url/index.js +41 -24
- package/src/components/post-url/label.js +10 -0
- package/src/components/post-url/panel.js +6 -1
- package/src/components/post-url/style.scss +0 -9
- package/src/components/post-visibility/check.js +9 -0
- package/src/components/post-visibility/index.js +7 -0
- package/src/components/post-visibility/label.js +10 -0
- package/src/components/posts-per-page/index.js +101 -0
- package/src/components/posts-per-page/style.scss +4 -0
- package/src/components/provider/index.js +68 -0
- package/src/components/provider/index.native.js +43 -2
- package/src/components/provider/use-block-editor-settings.js +4 -6
- package/src/components/provider/with-registry-provider.js +32 -31
- package/src/components/resizable-editor/index.js +90 -0
- package/src/components/resizable-editor/resize-handle.js +62 -0
- package/src/components/resizable-editor/style.scss +53 -0
- package/src/components/save-publish-panels/index.js +10 -2
- package/src/components/sidebar/index.js +0 -4
- package/src/components/sidebar/post-summary.js +14 -21
- package/src/components/sidebar/style.scss +1 -1
- package/src/components/site-discussion/index.js +138 -0
- package/src/components/site-discussion/style.scss +19 -0
- package/src/components/start-template-options/style.scss +0 -8
- package/src/components/template-areas/index.js +15 -6
- package/src/components/text-editor/index.js +57 -0
- package/src/components/text-editor/style.scss +71 -0
- package/src/components/{editor-canvas → visual-editor}/index.js +177 -108
- package/src/components/visual-editor/style.scss +37 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/media-upload.js +11 -0
- package/src/private-apis.js +10 -28
- package/src/private-apis.native.js +2 -26
- package/src/store/constants.js +7 -0
- package/src/store/private-actions.js +22 -50
- package/src/store/private-selectors.js +45 -0
- package/src/store/selectors.js +1 -1
- package/src/style.scss +9 -0
- package/src/utils/set-nested-value.js +39 -0
- package/build/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
- package/build/components/editor-canvas/index.js.map +0 -1
- package/build/components/post-trash/panel.js +0 -18
- package/build/components/post-trash/panel.js.map +0 -1
- package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
- package/build-module/components/editor-canvas/index.js.map +0 -1
- package/build-module/components/post-trash/panel.js +0 -10
- package/build-module/components/post-trash/panel.js.map +0 -1
- package/src/components/post-trash/panel.js +0 -13
- package/src/components/provider/README.md +0 -37
- /package/src/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +0 -0
|
@@ -2,15 +2,6 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.components-button.editor-post-url__panel-toggle {
|
|
6
|
-
display: block;
|
|
7
|
-
max-width: 100%;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
text-align: left;
|
|
10
|
-
text-overflow: ellipsis;
|
|
11
|
-
white-space: nowrap;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
5
|
.editor-post-url__panel-dialog .editor-post-url {
|
|
15
6
|
// sidebar width - popover padding - form margin
|
|
16
7
|
min-width: $sidebar-width - $grid-unit-20 - $grid-unit-20;
|
|
@@ -8,6 +8,15 @@ import { useSelect } from '@wordpress/data';
|
|
|
8
8
|
*/
|
|
9
9
|
import { store as editorStore } from '../../store';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Determines if the current post can be edited (published)
|
|
13
|
+
* and passes this information to the provided render function.
|
|
14
|
+
*
|
|
15
|
+
* @param {Object} props The component props.
|
|
16
|
+
* @param {Function} props.render Function to render the component.
|
|
17
|
+
* Receives an object with a `canEdit` property.
|
|
18
|
+
* @return {JSX.Element} The rendered component.
|
|
19
|
+
*/
|
|
11
20
|
export default function PostVisibilityCheck( { render } ) {
|
|
12
21
|
const canEdit = useSelect( ( select ) => {
|
|
13
22
|
return (
|
|
@@ -17,6 +17,13 @@ import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '
|
|
|
17
17
|
import { visibilityOptions } from './utils';
|
|
18
18
|
import { store as editorStore } from '../../store';
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Allows users to set the visibility of a post.
|
|
22
|
+
*
|
|
23
|
+
* @param {Object} props The component props.
|
|
24
|
+
* @param {Function} props.onClose Function to call when the popover is closed.
|
|
25
|
+
* @return {JSX.Element} The rendered component.
|
|
26
|
+
*/
|
|
20
27
|
export default function PostVisibility( { onClose } ) {
|
|
21
28
|
const instanceId = useInstanceId( PostVisibility );
|
|
22
29
|
|
|
@@ -9,10 +9,20 @@ import { useSelect } from '@wordpress/data';
|
|
|
9
9
|
import { visibilityOptions } from './utils';
|
|
10
10
|
import { store as editorStore } from '../../store';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Returns the label for the current post visibility setting.
|
|
14
|
+
*
|
|
15
|
+
* @return {string} Post visibility label.
|
|
16
|
+
*/
|
|
12
17
|
export default function PostVisibilityLabel() {
|
|
13
18
|
return usePostVisibilityLabel();
|
|
14
19
|
}
|
|
15
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Get the label for the current post visibility setting.
|
|
23
|
+
*
|
|
24
|
+
* @return {string} Post visibility label.
|
|
25
|
+
*/
|
|
16
26
|
export function usePostVisibilityLabel() {
|
|
17
27
|
const visibility = useSelect( ( select ) =>
|
|
18
28
|
select( editorStore ).getEditedPostVisibility()
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import { useSelect, useDispatch } from '@wordpress/data';
|
|
6
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
7
|
+
import {
|
|
8
|
+
Button,
|
|
9
|
+
Dropdown,
|
|
10
|
+
__experimentalNumberControl as NumberControl,
|
|
11
|
+
} from '@wordpress/components';
|
|
12
|
+
import { useState, useMemo } from '@wordpress/element';
|
|
13
|
+
import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Internal dependencies
|
|
17
|
+
*/
|
|
18
|
+
import { TEMPLATE_POST_TYPE } from '../../store/constants';
|
|
19
|
+
import { store as editorStore } from '../../store';
|
|
20
|
+
import PostPanelRow from '../post-panel-row';
|
|
21
|
+
|
|
22
|
+
export default function PostsPerPage() {
|
|
23
|
+
const { editEntityRecord } = useDispatch( coreStore );
|
|
24
|
+
const { postsPerPage, isTemplate, postSlug } = useSelect( ( select ) => {
|
|
25
|
+
const { getEditedPostAttribute, getCurrentPostType } =
|
|
26
|
+
select( editorStore );
|
|
27
|
+
const { getEditedEntityRecord } = select( coreStore );
|
|
28
|
+
const siteSettings = getEditedEntityRecord( 'root', 'site' );
|
|
29
|
+
return {
|
|
30
|
+
isTemplate: getCurrentPostType() === TEMPLATE_POST_TYPE,
|
|
31
|
+
postSlug: getEditedPostAttribute( 'slug' ),
|
|
32
|
+
postsPerPage: siteSettings?.posts_per_page || 1,
|
|
33
|
+
};
|
|
34
|
+
}, [] );
|
|
35
|
+
// Use internal state instead of a ref to make sure that the component
|
|
36
|
+
// re-renders when the popover's anchor updates.
|
|
37
|
+
const [ popoverAnchor, setPopoverAnchor ] = useState( null );
|
|
38
|
+
// Memoize popoverProps to avoid returning a new object every time.
|
|
39
|
+
const popoverProps = useMemo(
|
|
40
|
+
() => ( {
|
|
41
|
+
// Anchor the popover to the middle of the entire row so that it doesn't
|
|
42
|
+
// move around when the label changes.
|
|
43
|
+
anchor: popoverAnchor,
|
|
44
|
+
placement: 'left-start',
|
|
45
|
+
offset: 36,
|
|
46
|
+
shift: true,
|
|
47
|
+
} ),
|
|
48
|
+
[ popoverAnchor ]
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
if ( ! isTemplate || ! [ 'home', 'index' ].includes( postSlug ) ) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
const setPostsPerPage = ( newValue ) => {
|
|
55
|
+
editEntityRecord( 'root', 'site', undefined, {
|
|
56
|
+
posts_per_page: newValue,
|
|
57
|
+
} );
|
|
58
|
+
};
|
|
59
|
+
return (
|
|
60
|
+
<PostPanelRow label={ __( 'Posts per page' ) } ref={ setPopoverAnchor }>
|
|
61
|
+
<Dropdown
|
|
62
|
+
popoverProps={ popoverProps }
|
|
63
|
+
contentClassName="editor-posts-per-page-dropdown__content"
|
|
64
|
+
focusOnMount
|
|
65
|
+
renderToggle={ ( { isOpen, onToggle } ) => (
|
|
66
|
+
<Button
|
|
67
|
+
size="compact"
|
|
68
|
+
variant="tertiary"
|
|
69
|
+
aria-expanded={ isOpen }
|
|
70
|
+
aria-label={ __( 'Change posts per page' ) }
|
|
71
|
+
onClick={ onToggle }
|
|
72
|
+
>
|
|
73
|
+
{ postsPerPage }
|
|
74
|
+
</Button>
|
|
75
|
+
) }
|
|
76
|
+
renderContent={ ( { onClose } ) => (
|
|
77
|
+
<>
|
|
78
|
+
<InspectorPopoverHeader
|
|
79
|
+
title={ __( 'Posts per page' ) }
|
|
80
|
+
onClose={ onClose }
|
|
81
|
+
/>
|
|
82
|
+
<NumberControl
|
|
83
|
+
placeholder={ 0 }
|
|
84
|
+
value={ postsPerPage }
|
|
85
|
+
size="__unstable-large"
|
|
86
|
+
spinControls="custom"
|
|
87
|
+
step="1"
|
|
88
|
+
min="1"
|
|
89
|
+
onChange={ setPostsPerPage }
|
|
90
|
+
label={ __( 'Posts per page' ) }
|
|
91
|
+
help={ __(
|
|
92
|
+
'Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.'
|
|
93
|
+
) }
|
|
94
|
+
hideLabelFromVision
|
|
95
|
+
/>
|
|
96
|
+
</>
|
|
97
|
+
) }
|
|
98
|
+
/>
|
|
99
|
+
</PostPanelRow>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -30,6 +30,9 @@ import StartPageOptions from '../start-page-options';
|
|
|
30
30
|
import KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';
|
|
31
31
|
import ContentOnlySettingsMenu from '../block-settings-menu/content-only-settings-menu';
|
|
32
32
|
import StartTemplateOptions from '../start-template-options';
|
|
33
|
+
import EditorKeyboardShortcuts from '../global-keyboard-shortcuts';
|
|
34
|
+
import PatternRenameModal from '../pattern-rename-modal';
|
|
35
|
+
import PatternDuplicateModal from '../pattern-duplicate-modal';
|
|
33
36
|
|
|
34
37
|
const { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );
|
|
35
38
|
const { PatternsMenuItems } = unlock( editPatternsPrivateApis );
|
|
@@ -56,6 +59,12 @@ const NON_CONTEXTUAL_POST_TYPES = [
|
|
|
56
59
|
* @param {Array} post Block list.
|
|
57
60
|
* @param {boolean} template Whether the page content has focus (and the surrounding template is inert). If `true` return page content blocks. Default `false`.
|
|
58
61
|
* @param {string} mode Rendering mode.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```jsx
|
|
65
|
+
* const [ blocks, onInput, onChange ] = useBlockEditorProps( post, template, mode );
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
59
68
|
* @return {Array} Block editor props.
|
|
60
69
|
*/
|
|
61
70
|
function useBlockEditorProps( post, template, mode ) {
|
|
@@ -115,6 +124,32 @@ function useBlockEditorProps( post, template, mode ) {
|
|
|
115
124
|
];
|
|
116
125
|
}
|
|
117
126
|
|
|
127
|
+
/**
|
|
128
|
+
* This component provides the editor context and manages the state of the block editor.
|
|
129
|
+
*
|
|
130
|
+
* @param {Object} props The component props.
|
|
131
|
+
* @param {Object} props.post The post object.
|
|
132
|
+
* @param {Object} props.settings The editor settings.
|
|
133
|
+
* @param {boolean} props.recovery Indicates if the editor is in recovery mode.
|
|
134
|
+
* @param {Array} props.initialEdits The initial edits for the editor.
|
|
135
|
+
* @param {Object} props.children The child components.
|
|
136
|
+
* @param {Object} [props.BlockEditorProviderComponent] The block editor provider component to use. Defaults to ExperimentalBlockEditorProvider.
|
|
137
|
+
* @param {Object} [props.__unstableTemplate] The template object.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```jsx
|
|
141
|
+
* <ExperimentalEditorProvider
|
|
142
|
+
* post={ post }
|
|
143
|
+
* settings={ settings }
|
|
144
|
+
* recovery={ recovery }
|
|
145
|
+
* initialEdits={ initialEdits }
|
|
146
|
+
* __unstableTemplate={ template }
|
|
147
|
+
* >
|
|
148
|
+
* { children }
|
|
149
|
+
* </ExperimentalEditorProvider>
|
|
150
|
+
*
|
|
151
|
+
* @return {Object} The rendered ExperimentalEditorProvider component.
|
|
152
|
+
*/
|
|
118
153
|
export const ExperimentalEditorProvider = withRegistryProvider(
|
|
119
154
|
( {
|
|
120
155
|
post,
|
|
@@ -273,10 +308,13 @@ export const ExperimentalEditorProvider = withRegistryProvider(
|
|
|
273
308
|
{ type === 'wp_navigation' && (
|
|
274
309
|
<NavigationBlockEditingMode />
|
|
275
310
|
) }
|
|
311
|
+
<EditorKeyboardShortcuts />
|
|
276
312
|
<KeyboardShortcutHelpModal />
|
|
277
313
|
<BlockRemovalWarnings />
|
|
278
314
|
<StartPageOptions />
|
|
279
315
|
<StartTemplateOptions />
|
|
316
|
+
<PatternRenameModal />
|
|
317
|
+
<PatternDuplicateModal />
|
|
280
318
|
</>
|
|
281
319
|
) }
|
|
282
320
|
</BlockEditorProviderComponent>
|
|
@@ -287,6 +325,36 @@ export const ExperimentalEditorProvider = withRegistryProvider(
|
|
|
287
325
|
}
|
|
288
326
|
);
|
|
289
327
|
|
|
328
|
+
/**
|
|
329
|
+
* This component establishes a new post editing context, and serves as the entry point for a new post editor (or post with template editor).
|
|
330
|
+
*
|
|
331
|
+
* It supports a large number of post types, including post, page, templates,
|
|
332
|
+
* custom post types, patterns, template parts.
|
|
333
|
+
*
|
|
334
|
+
* All modification and changes are performed to the `@wordpress/core-data` store.
|
|
335
|
+
*
|
|
336
|
+
* @param {Object} props The component props.
|
|
337
|
+
* @param {Object} [props.post] The post object to edit. This is required.
|
|
338
|
+
* @param {Object} [props.__unstableTemplate] The template object wrapper the edited post.
|
|
339
|
+
* This is optional and can only be used when the post type supports templates (like posts and pages).
|
|
340
|
+
* @param {Object} [props.settings] The settings object to use for the editor.
|
|
341
|
+
* This is optional and can be used to override the default settings.
|
|
342
|
+
* @param {Element} [props.children] Children elements for which the BlockEditorProvider context should apply.
|
|
343
|
+
* This is optional.
|
|
344
|
+
*
|
|
345
|
+
* @example
|
|
346
|
+
* ```jsx
|
|
347
|
+
* <EditorProvider
|
|
348
|
+
* post={ post }
|
|
349
|
+
* settings={ settings }
|
|
350
|
+
* __unstableTemplate={ template }
|
|
351
|
+
* >
|
|
352
|
+
* { children }
|
|
353
|
+
* </EditorProvider>
|
|
354
|
+
* ```
|
|
355
|
+
*
|
|
356
|
+
* @return {JSX.Element} The rendered EditorProvider component.
|
|
357
|
+
*/
|
|
290
358
|
export function EditorProvider( props ) {
|
|
291
359
|
return (
|
|
292
360
|
<ExperimentalEditorProvider
|
|
@@ -21,6 +21,7 @@ import RNReactNativeGutenbergBridge, {
|
|
|
21
21
|
subscribeUpdateCapabilities,
|
|
22
22
|
subscribeShowNotice,
|
|
23
23
|
subscribeShowEditorHelp,
|
|
24
|
+
subscribeToContentUpdate,
|
|
24
25
|
} from '@wordpress/react-native-bridge';
|
|
25
26
|
import { Component } from '@wordpress/element';
|
|
26
27
|
import { count as wordCount } from '@wordpress/wordcount';
|
|
@@ -30,12 +31,16 @@ import {
|
|
|
30
31
|
getUnregisteredTypeHandlerName,
|
|
31
32
|
getBlockType,
|
|
32
33
|
createBlock,
|
|
34
|
+
pasteHandler,
|
|
33
35
|
} from '@wordpress/blocks';
|
|
34
36
|
import { withDispatch, withSelect } from '@wordpress/data';
|
|
35
37
|
import { compose } from '@wordpress/compose';
|
|
36
38
|
import { applyFilters } from '@wordpress/hooks';
|
|
37
|
-
import {
|
|
38
|
-
|
|
39
|
+
import {
|
|
40
|
+
store as blockEditorStore,
|
|
41
|
+
getGlobalStyles,
|
|
42
|
+
getColorsAndGradients,
|
|
43
|
+
} from '@wordpress/block-editor';
|
|
39
44
|
import { NEW_BLOCK_TYPES } from '@wordpress/block-library';
|
|
40
45
|
import { __ } from '@wordpress/i18n';
|
|
41
46
|
|
|
@@ -64,6 +69,7 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
64
69
|
* Internal dependencies
|
|
65
70
|
*/
|
|
66
71
|
import EditorProvider from './index.js';
|
|
72
|
+
import { insertContentWithTitle } from '../post-title';
|
|
67
73
|
|
|
68
74
|
class NativeEditorProvider extends Component {
|
|
69
75
|
constructor() {
|
|
@@ -79,6 +85,7 @@ class NativeEditorProvider extends Component {
|
|
|
79
85
|
);
|
|
80
86
|
|
|
81
87
|
this.onHardwareBackPress = this.onHardwareBackPress.bind( this );
|
|
88
|
+
this.onContentUpdate = this.onContentUpdate.bind( this );
|
|
82
89
|
|
|
83
90
|
this.getEditorSettings = memize(
|
|
84
91
|
( settings, capabilities ) => ( {
|
|
@@ -197,6 +204,12 @@ class NativeEditorProvider extends Component {
|
|
|
197
204
|
this.onHardwareBackPress
|
|
198
205
|
);
|
|
199
206
|
|
|
207
|
+
this.subscriptionOnContentUpdate = subscribeToContentUpdate(
|
|
208
|
+
( data ) => {
|
|
209
|
+
this.onContentUpdate( data );
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
|
|
200
213
|
// Request current block impressions from native app.
|
|
201
214
|
requestBlockTypeImpressions( ( storedImpressions ) => {
|
|
202
215
|
const impressions = { ...NEW_BLOCK_TYPES, ...storedImpressions };
|
|
@@ -260,6 +273,10 @@ class NativeEditorProvider extends Component {
|
|
|
260
273
|
if ( this.hardwareBackPressListener ) {
|
|
261
274
|
this.hardwareBackPressListener.remove();
|
|
262
275
|
}
|
|
276
|
+
|
|
277
|
+
if ( this.subscriptionOnContentUpdate ) {
|
|
278
|
+
this.subscriptionOnContentUpdate.remove();
|
|
279
|
+
}
|
|
263
280
|
}
|
|
264
281
|
|
|
265
282
|
getThemeColors( { rawStyles, rawFeatures } ) {
|
|
@@ -300,6 +317,21 @@ class NativeEditorProvider extends Component {
|
|
|
300
317
|
return false;
|
|
301
318
|
}
|
|
302
319
|
|
|
320
|
+
onContentUpdate( { content: rawContent } ) {
|
|
321
|
+
const {
|
|
322
|
+
editTitle,
|
|
323
|
+
onClearPostTitleSelection,
|
|
324
|
+
onInsertBlockAfter: onInsertBlocks,
|
|
325
|
+
title,
|
|
326
|
+
} = this.props;
|
|
327
|
+
const content = pasteHandler( {
|
|
328
|
+
plainText: rawContent,
|
|
329
|
+
} );
|
|
330
|
+
|
|
331
|
+
insertContentWithTitle( title, content, editTitle, onInsertBlocks );
|
|
332
|
+
onClearPostTitleSelection();
|
|
333
|
+
}
|
|
334
|
+
|
|
303
335
|
serializeToNativeAction() {
|
|
304
336
|
const title = this.props.title;
|
|
305
337
|
let html;
|
|
@@ -420,11 +452,13 @@ const ComposedNativeProvider = compose( [
|
|
|
420
452
|
resetEditorBlocks,
|
|
421
453
|
updateEditorSettings,
|
|
422
454
|
switchEditorMode,
|
|
455
|
+
togglePostTitleSelection,
|
|
423
456
|
} = dispatch( editorStore );
|
|
424
457
|
const {
|
|
425
458
|
clearSelectedBlock,
|
|
426
459
|
updateSettings,
|
|
427
460
|
insertBlock,
|
|
461
|
+
insertBlocks,
|
|
428
462
|
replaceBlock,
|
|
429
463
|
} = dispatch( blockEditorStore );
|
|
430
464
|
const { addEntities, receiveEntityRecords } = dispatch( coreStore );
|
|
@@ -436,6 +470,7 @@ const ComposedNativeProvider = compose( [
|
|
|
436
470
|
updateEditorSettings,
|
|
437
471
|
addEntities,
|
|
438
472
|
insertBlock,
|
|
473
|
+
insertBlocks,
|
|
439
474
|
createSuccessNotice,
|
|
440
475
|
createErrorNotice,
|
|
441
476
|
clearSelectedBlock,
|
|
@@ -451,6 +486,12 @@ const ComposedNativeProvider = compose( [
|
|
|
451
486
|
switchMode( mode ) {
|
|
452
487
|
switchEditorMode( mode );
|
|
453
488
|
},
|
|
489
|
+
onInsertBlockAfter( blocks ) {
|
|
490
|
+
insertBlocks( blocks, undefined, undefined, false );
|
|
491
|
+
},
|
|
492
|
+
onClearPostTitleSelection() {
|
|
493
|
+
togglePostTitleSelection( false );
|
|
494
|
+
},
|
|
454
495
|
replaceBlock,
|
|
455
496
|
};
|
|
456
497
|
} ),
|
|
@@ -88,6 +88,9 @@ const BLOCK_EDITOR_SETTINGS = [
|
|
|
88
88
|
'__experimentalArchiveTitleNameLabel',
|
|
89
89
|
];
|
|
90
90
|
|
|
91
|
+
const { globalStylesDataKey, selectBlockPatternsKey, reusableBlocksSelectKey } =
|
|
92
|
+
unlock( privateApis );
|
|
93
|
+
|
|
91
94
|
/**
|
|
92
95
|
* React hook used to compute the block editor settings to use for the post editor.
|
|
93
96
|
*
|
|
@@ -256,8 +259,6 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) {
|
|
|
256
259
|
}, [ settings.allowedBlockTypes, hiddenBlockTypes, blockTypes ] );
|
|
257
260
|
|
|
258
261
|
const forceDisableFocusMode = settings.focusMode === false;
|
|
259
|
-
const { globalStylesDataKey, selectBlockPatternsKey } =
|
|
260
|
-
unlock( privateApis );
|
|
261
262
|
|
|
262
263
|
return useMemo( () => {
|
|
263
264
|
const blockEditorSettings = {
|
|
@@ -283,8 +284,7 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) {
|
|
|
283
284
|
? patterns
|
|
284
285
|
: undefined;
|
|
285
286
|
},
|
|
286
|
-
[
|
|
287
|
-
__experimentalReusableBlocksSelect,
|
|
287
|
+
[ reusableBlocksSelectKey ]: __experimentalReusableBlocksSelect,
|
|
288
288
|
__experimentalBlockPatternCategories: blockPatternCategories,
|
|
289
289
|
__experimentalUserPatternCategories: userPatternCategories,
|
|
290
290
|
__experimentalFetchLinkSuggestions: ( search, searchOptions ) =>
|
|
@@ -340,8 +340,6 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) {
|
|
|
340
340
|
setIsInserterOpened,
|
|
341
341
|
sectionRootClientId,
|
|
342
342
|
globalStylesData,
|
|
343
|
-
globalStylesDataKey,
|
|
344
|
-
selectBlockPatternsKey,
|
|
345
343
|
] );
|
|
346
344
|
}
|
|
347
345
|
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { useState
|
|
5
|
-
import {
|
|
6
|
-
withRegistry,
|
|
7
|
-
createRegistry,
|
|
8
|
-
RegistryProvider,
|
|
9
|
-
} from '@wordpress/data';
|
|
4
|
+
import { useState } from '@wordpress/element';
|
|
5
|
+
import { useRegistry, createRegistry, RegistryProvider } from '@wordpress/data';
|
|
10
6
|
import { createHigherOrderComponent } from '@wordpress/compose';
|
|
11
7
|
import { storeConfig as blockEditorStoreConfig } from '@wordpress/block-editor';
|
|
12
8
|
|
|
@@ -15,41 +11,46 @@ import { storeConfig as blockEditorStoreConfig } from '@wordpress/block-editor';
|
|
|
15
11
|
*/
|
|
16
12
|
import { storeConfig } from '../../store';
|
|
17
13
|
|
|
14
|
+
function getSubRegistry( subRegistries, registry, useSubRegistry ) {
|
|
15
|
+
if ( ! useSubRegistry ) {
|
|
16
|
+
return registry;
|
|
17
|
+
}
|
|
18
|
+
let subRegistry = subRegistries.get( registry );
|
|
19
|
+
if ( ! subRegistry ) {
|
|
20
|
+
subRegistry = createRegistry(
|
|
21
|
+
{
|
|
22
|
+
'core/block-editor': blockEditorStoreConfig,
|
|
23
|
+
},
|
|
24
|
+
registry
|
|
25
|
+
);
|
|
26
|
+
// Todo: The interface store should also be created per instance.
|
|
27
|
+
subRegistry.registerStore( 'core/editor', storeConfig );
|
|
28
|
+
subRegistries.set( registry, subRegistry );
|
|
29
|
+
}
|
|
30
|
+
return subRegistry;
|
|
31
|
+
}
|
|
32
|
+
|
|
18
33
|
const withRegistryProvider = createHigherOrderComponent(
|
|
19
34
|
( WrappedComponent ) =>
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
35
|
+
( { useSubRegistry = true, ...props } ) => {
|
|
36
|
+
const registry = useRegistry();
|
|
37
|
+
const [ subRegistries ] = useState( () => new WeakMap() );
|
|
38
|
+
const subRegistry = getSubRegistry(
|
|
39
|
+
subRegistries,
|
|
23
40
|
registry,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if ( ! useSubRegistry ) {
|
|
27
|
-
return <WrappedComponent { ...additionalProps } />;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const [ subRegistry, setSubRegistry ] = useState( null );
|
|
31
|
-
useEffect( () => {
|
|
32
|
-
const newRegistry = createRegistry(
|
|
33
|
-
{
|
|
34
|
-
'core/block-editor': blockEditorStoreConfig,
|
|
35
|
-
},
|
|
36
|
-
registry
|
|
37
|
-
);
|
|
38
|
-
// Todo: The interface store should also be created per instance.
|
|
39
|
-
newRegistry.registerStore( 'core/editor', storeConfig );
|
|
40
|
-
setSubRegistry( newRegistry );
|
|
41
|
-
}, [ registry ] );
|
|
41
|
+
useSubRegistry
|
|
42
|
+
);
|
|
42
43
|
|
|
43
|
-
if (
|
|
44
|
-
return
|
|
44
|
+
if ( subRegistry === registry ) {
|
|
45
|
+
return <WrappedComponent registry={ registry } { ...props } />;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
return (
|
|
48
49
|
<RegistryProvider value={ subRegistry }>
|
|
49
|
-
<WrappedComponent { ...
|
|
50
|
+
<WrappedComponent registry={ subRegistry } { ...props } />
|
|
50
51
|
</RegistryProvider>
|
|
51
52
|
);
|
|
52
|
-
}
|
|
53
|
+
},
|
|
53
54
|
'withRegistryProvider'
|
|
54
55
|
);
|
|
55
56
|
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { useState, useRef, useCallback } from '@wordpress/element';
|
|
10
|
+
import { ResizableBox } from '@wordpress/components';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
import ResizeHandle from './resize-handle';
|
|
16
|
+
|
|
17
|
+
// Removes the inline styles in the drag handles.
|
|
18
|
+
const HANDLE_STYLES_OVERRIDE = {
|
|
19
|
+
position: undefined,
|
|
20
|
+
userSelect: undefined,
|
|
21
|
+
cursor: undefined,
|
|
22
|
+
width: undefined,
|
|
23
|
+
height: undefined,
|
|
24
|
+
top: undefined,
|
|
25
|
+
right: undefined,
|
|
26
|
+
bottom: undefined,
|
|
27
|
+
left: undefined,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function ResizableEditor( { className, enableResizing, height, children } ) {
|
|
31
|
+
const [ width, setWidth ] = useState( '100%' );
|
|
32
|
+
const resizableRef = useRef();
|
|
33
|
+
const resizeWidthBy = useCallback( ( deltaPixels ) => {
|
|
34
|
+
if ( resizableRef.current ) {
|
|
35
|
+
setWidth( resizableRef.current.offsetWidth + deltaPixels );
|
|
36
|
+
}
|
|
37
|
+
}, [] );
|
|
38
|
+
return (
|
|
39
|
+
<ResizableBox
|
|
40
|
+
className={ clsx( 'editor-resizable-editor', className, {
|
|
41
|
+
'is-resizable': enableResizing,
|
|
42
|
+
} ) }
|
|
43
|
+
ref={ ( api ) => {
|
|
44
|
+
resizableRef.current = api?.resizable;
|
|
45
|
+
} }
|
|
46
|
+
size={ {
|
|
47
|
+
width: enableResizing ? width : '100%',
|
|
48
|
+
height: enableResizing && height ? height : '100%',
|
|
49
|
+
} }
|
|
50
|
+
onResizeStop={ ( event, direction, element ) => {
|
|
51
|
+
setWidth( element.style.width );
|
|
52
|
+
} }
|
|
53
|
+
minWidth={ 300 }
|
|
54
|
+
maxWidth="100%"
|
|
55
|
+
maxHeight="100%"
|
|
56
|
+
enable={ {
|
|
57
|
+
left: enableResizing,
|
|
58
|
+
right: enableResizing,
|
|
59
|
+
} }
|
|
60
|
+
showHandle={ enableResizing }
|
|
61
|
+
// The editor is centered horizontally, resizing it only
|
|
62
|
+
// moves half the distance. Hence double the ratio to correctly
|
|
63
|
+
// align the cursor to the resizer handle.
|
|
64
|
+
resizeRatio={ 2 }
|
|
65
|
+
handleComponent={ {
|
|
66
|
+
left: (
|
|
67
|
+
<ResizeHandle
|
|
68
|
+
direction="left"
|
|
69
|
+
resizeWidthBy={ resizeWidthBy }
|
|
70
|
+
/>
|
|
71
|
+
),
|
|
72
|
+
right: (
|
|
73
|
+
<ResizeHandle
|
|
74
|
+
direction="right"
|
|
75
|
+
resizeWidthBy={ resizeWidthBy }
|
|
76
|
+
/>
|
|
77
|
+
),
|
|
78
|
+
} }
|
|
79
|
+
handleClasses={ undefined }
|
|
80
|
+
handleStyles={ {
|
|
81
|
+
left: HANDLE_STYLES_OVERRIDE,
|
|
82
|
+
right: HANDLE_STYLES_OVERRIDE,
|
|
83
|
+
} }
|
|
84
|
+
>
|
|
85
|
+
{ children }
|
|
86
|
+
</ResizableBox>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export default ResizableEditor;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import { LEFT, RIGHT } from '@wordpress/keycodes';
|
|
6
|
+
import {
|
|
7
|
+
VisuallyHidden,
|
|
8
|
+
Tooltip,
|
|
9
|
+
__unstableMotion as motion,
|
|
10
|
+
} from '@wordpress/components';
|
|
11
|
+
|
|
12
|
+
const DELTA_DISTANCE = 20; // The distance to resize per keydown in pixels.
|
|
13
|
+
|
|
14
|
+
export default function ResizeHandle( { direction, resizeWidthBy } ) {
|
|
15
|
+
function handleKeyDown( event ) {
|
|
16
|
+
const { keyCode } = event;
|
|
17
|
+
|
|
18
|
+
if (
|
|
19
|
+
( direction === 'left' && keyCode === LEFT ) ||
|
|
20
|
+
( direction === 'right' && keyCode === RIGHT )
|
|
21
|
+
) {
|
|
22
|
+
resizeWidthBy( DELTA_DISTANCE );
|
|
23
|
+
} else if (
|
|
24
|
+
( direction === 'left' && keyCode === RIGHT ) ||
|
|
25
|
+
( direction === 'right' && keyCode === LEFT )
|
|
26
|
+
) {
|
|
27
|
+
resizeWidthBy( -DELTA_DISTANCE );
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const resizeHandleVariants = {
|
|
32
|
+
active: {
|
|
33
|
+
opacity: 1,
|
|
34
|
+
scaleY: 1.3,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const resizableHandleHelpId = `resizable-editor__resize-help-${ direction }`;
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<>
|
|
42
|
+
<Tooltip text={ __( 'Drag to resize' ) }>
|
|
43
|
+
<motion.button
|
|
44
|
+
className={ `editor-resizable-editor__resize-handle is-${ direction }` }
|
|
45
|
+
aria-label={ __( 'Drag to resize' ) }
|
|
46
|
+
aria-describedby={ resizableHandleHelpId }
|
|
47
|
+
onKeyDown={ handleKeyDown }
|
|
48
|
+
variants={ resizeHandleVariants }
|
|
49
|
+
whileFocus="active"
|
|
50
|
+
whileHover="active"
|
|
51
|
+
whileTap="active"
|
|
52
|
+
key="handle"
|
|
53
|
+
role="separator"
|
|
54
|
+
aria-orientation="vertical"
|
|
55
|
+
/>
|
|
56
|
+
</Tooltip>
|
|
57
|
+
<VisuallyHidden id={ resizableHandleHelpId }>
|
|
58
|
+
{ __( 'Use left and right arrow keys to resize the canvas.' ) }
|
|
59
|
+
</VisuallyHidden>
|
|
60
|
+
</>
|
|
61
|
+
);
|
|
62
|
+
}
|