@wordpress/editor 13.35.0 → 14.0.1
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 +59 -36
- 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/index.js +83 -0
- package/build/components/editor/index.js.map +1 -0
- 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 +176 -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 +37 -0
- package/build/components/header/back-button.js.map +1 -0
- package/build/components/header/index.js +85 -60
- 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/media-categories/index.js +1 -1
- package/build/components/media-categories/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 +379 -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 +49 -17
- 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 +46 -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 +47 -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 +56 -26
- 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/disable-non-page-content-blocks.js +5 -3
- package/build/components/provider/disable-non-page-content-blocks.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 +39 -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 +12 -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 +61 -36
- 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/index.js +76 -0
- package/build-module/components/editor/index.js.map +1 -0
- 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 +170 -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 +31 -0
- package/build-module/components/header/back-button.js.map +1 -0
- package/build-module/components/header/index.js +86 -60
- 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/media-categories/index.js +1 -1
- package/build-module/components/media-categories/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 +380 -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 +48 -17
- 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 +48 -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 +49 -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 +59 -25
- 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/disable-non-page-content-blocks.js +5 -3
- package/build-module/components/provider/disable-non-page-content-blocks.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 +34 -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 +12 -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 +344 -129
- package/build-style/style.css +344 -129
- 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/block-settings-menu/content-only-settings-menu.js +26 -12
- package/src/components/blog-title/index.js +124 -0
- package/src/components/blog-title/style.scss +4 -0
- package/src/components/collapsible-block-toolbar/style.scss +3 -1
- 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/index.js +93 -0
- 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-interface/style.scss +3 -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 +11 -5
- 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 +32 -0
- package/src/components/header/index.js +26 -18
- package/src/components/header/style.scss +6 -1
- 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/media-categories/index.js +1 -3
- 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 +308 -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 +31 -3
- package/src/components/post-last-revision/panel.js +5 -0
- package/src/components/post-last-revision/style.scss +4 -0
- package/src/components/post-locked-modal/index.js +6 -0
- package/src/components/post-panel-row/style.scss +16 -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 +16 -0
- package/src/components/post-preview-button/test/index.js +10 -2
- package/src/components/post-publish-button/index.js +17 -4
- package/src/components/post-publish-panel/index.js +2 -0
- package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
- package/src/components/post-publish-panel/style.scss +28 -36
- 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-sync-status/index.js +2 -8
- 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 +18 -5
- 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/disable-non-page-content-blocks.js +9 -4
- 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/save-publish-panels/style.scss +0 -8
- package/src/components/sidebar/index.js +0 -4
- package/src/components/sidebar/post-summary.js +16 -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 +12 -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 +10 -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
|
@@ -10,10 +10,25 @@ import { useSelect } from '@wordpress/data';
|
|
|
10
10
|
*/
|
|
11
11
|
import { store as editorStore } from '../../store';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Renders the PostScheduleLabel component.
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} props Props.
|
|
17
|
+
*
|
|
18
|
+
* @return {Component} The component to be rendered.
|
|
19
|
+
*/
|
|
13
20
|
export default function PostScheduleLabel( props ) {
|
|
14
21
|
return usePostScheduleLabel( props );
|
|
15
22
|
}
|
|
16
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Custom hook to get the label for post schedule.
|
|
26
|
+
*
|
|
27
|
+
* @param {Object} options Options for the hook.
|
|
28
|
+
* @param {boolean} options.full Whether to get the full label or not. Default is false.
|
|
29
|
+
*
|
|
30
|
+
* @return {string} The label for post schedule.
|
|
31
|
+
*/
|
|
17
32
|
export function usePostScheduleLabel( { full = false } = {} ) {
|
|
18
33
|
const { date, isFloating } = useSelect(
|
|
19
34
|
( select ) => ( {
|
|
@@ -28,6 +28,11 @@ const DESIGN_POST_TYPES = [
|
|
|
28
28
|
NAVIGATION_POST_TYPE,
|
|
29
29
|
];
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Renders the Post Schedule Panel component.
|
|
33
|
+
*
|
|
34
|
+
* @return {Component} The component to be rendered.
|
|
35
|
+
*/
|
|
31
36
|
export default function PostSchedulePanel() {
|
|
32
37
|
const [ popoverAnchor, setPopoverAnchor ] = useState( null );
|
|
33
38
|
const postType = useSelect(
|
|
@@ -41,7 +46,9 @@ export default function PostSchedulePanel() {
|
|
|
41
46
|
// move around when the label changes.
|
|
42
47
|
anchor: popoverAnchor,
|
|
43
48
|
'aria-label': __( 'Change publish date' ),
|
|
44
|
-
placement: '
|
|
49
|
+
placement: 'left-start',
|
|
50
|
+
offset: 36,
|
|
51
|
+
shift: true,
|
|
45
52
|
} ),
|
|
46
53
|
[ popoverAnchor ]
|
|
47
54
|
);
|
|
@@ -65,6 +72,7 @@ export default function PostSchedulePanel() {
|
|
|
65
72
|
size="compact"
|
|
66
73
|
className="editor-post-schedule__dialog-toggle"
|
|
67
74
|
variant="tertiary"
|
|
75
|
+
tooltipPosition="middle left"
|
|
68
76
|
onClick={ onToggle }
|
|
69
77
|
aria-label={ sprintf(
|
|
70
78
|
// translators: %s: Current post date.
|
|
@@ -8,14 +8,3 @@
|
|
|
8
8
|
padding: $grid-unit-20;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
.editor-post-schedule__dialog-toggle.components-button {
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
text-align: left;
|
|
15
|
-
white-space: unset;
|
|
16
|
-
height: auto;
|
|
17
|
-
min-height: $button-size-compact;
|
|
18
|
-
|
|
19
|
-
// The line height + the padding should be the same as the button size.
|
|
20
|
-
line-height: inherit;
|
|
21
|
-
}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -15,13 +10,12 @@ import {
|
|
|
15
10
|
TextControl,
|
|
16
11
|
RadioControl,
|
|
17
12
|
} from '@wordpress/components';
|
|
18
|
-
import { __ } from '@wordpress/i18n';
|
|
13
|
+
import { __, sprintf } from '@wordpress/i18n';
|
|
19
14
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
20
15
|
import { useState, useMemo } from '@wordpress/element';
|
|
21
16
|
import { store as coreStore } from '@wordpress/core-data';
|
|
22
17
|
import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';
|
|
23
18
|
import { useInstanceId } from '@wordpress/compose';
|
|
24
|
-
import { Icon, chevronDownSmall } from '@wordpress/icons';
|
|
25
19
|
|
|
26
20
|
/**
|
|
27
21
|
* Internal dependencies
|
|
@@ -33,44 +27,17 @@ import {
|
|
|
33
27
|
NAVIGATION_POST_TYPE,
|
|
34
28
|
} from '../../store/constants';
|
|
35
29
|
import PostPanelRow from '../post-panel-row';
|
|
30
|
+
import { PrivatePostSchedule } from '../post-schedule';
|
|
36
31
|
import { store as editorStore } from '../../store';
|
|
37
32
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
statusLabel = __( 'Published' );
|
|
47
|
-
break;
|
|
48
|
-
case 'future':
|
|
49
|
-
statusLabel = __( 'Scheduled' );
|
|
50
|
-
break;
|
|
51
|
-
case 'draft':
|
|
52
|
-
case 'auto-draft':
|
|
53
|
-
statusLabel = __( 'Draft' );
|
|
54
|
-
break;
|
|
55
|
-
case 'pending':
|
|
56
|
-
statusLabel = __( 'Pending' );
|
|
57
|
-
break;
|
|
58
|
-
case 'private':
|
|
59
|
-
statusLabel = __( 'Private' );
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
return (
|
|
63
|
-
<Text
|
|
64
|
-
className={ clsx( 'editor-post-status-label', {
|
|
65
|
-
[ ` has-status-${ status }` ]: !! status,
|
|
66
|
-
'has-icon': canEdit,
|
|
67
|
-
} ) }
|
|
68
|
-
>
|
|
69
|
-
{ statusLabel }
|
|
70
|
-
{ canEdit && <Icon icon={ chevronDownSmall } /> }
|
|
71
|
-
</Text>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
33
|
+
const labels = {
|
|
34
|
+
'auto-draft': __( 'Draft' ),
|
|
35
|
+
draft: __( 'Draft' ),
|
|
36
|
+
pending: __( 'Pending' ),
|
|
37
|
+
private: __( 'Private' ),
|
|
38
|
+
future: __( 'Scheduled' ),
|
|
39
|
+
publish: __( 'Published' ),
|
|
40
|
+
};
|
|
74
41
|
|
|
75
42
|
const STATUS_OPTIONS = [
|
|
76
43
|
{
|
|
@@ -208,11 +175,6 @@ export default function PostStatus() {
|
|
|
208
175
|
let newPassword = password;
|
|
209
176
|
if ( status === 'future' && new Date( date ) > new Date() ) {
|
|
210
177
|
newDate = null;
|
|
211
|
-
} else if ( value === 'future' ) {
|
|
212
|
-
if ( ! date || new Date( date ) < new Date() ) {
|
|
213
|
-
newDate = new Date();
|
|
214
|
-
newDate.setDate( newDate.getDate() + 7 );
|
|
215
|
-
}
|
|
216
178
|
}
|
|
217
179
|
if ( value === 'private' && password ) {
|
|
218
180
|
newPassword = '';
|
|
@@ -234,10 +196,16 @@ export default function PostStatus() {
|
|
|
234
196
|
focusOnMount
|
|
235
197
|
renderToggle={ ( { onToggle } ) => (
|
|
236
198
|
<Button
|
|
237
|
-
|
|
199
|
+
variant="tertiary"
|
|
200
|
+
size="compact"
|
|
238
201
|
onClick={ onToggle }
|
|
202
|
+
aria-label={ sprintf(
|
|
203
|
+
// translators: %s: Current post status.
|
|
204
|
+
__( 'Change post status: %s' ),
|
|
205
|
+
labels[ status ]
|
|
206
|
+
) }
|
|
239
207
|
>
|
|
240
|
-
|
|
208
|
+
{ labels[ status ] }
|
|
241
209
|
</Button>
|
|
242
210
|
) }
|
|
243
211
|
renderContent={ ( { onClose } ) => (
|
|
@@ -260,6 +228,16 @@ export default function PostStatus() {
|
|
|
260
228
|
: status
|
|
261
229
|
}
|
|
262
230
|
/>
|
|
231
|
+
{ status === 'future' && (
|
|
232
|
+
<div className="editor-change-status__publish-date-wrapper">
|
|
233
|
+
<PrivatePostSchedule
|
|
234
|
+
showPopoverHeaderActions={
|
|
235
|
+
false
|
|
236
|
+
}
|
|
237
|
+
isCompact
|
|
238
|
+
/>
|
|
239
|
+
</div>
|
|
240
|
+
) }
|
|
263
241
|
{ status !== 'private' && (
|
|
264
242
|
<VStack
|
|
265
243
|
as="fieldset"
|
|
@@ -309,8 +287,8 @@ export default function PostStatus() {
|
|
|
309
287
|
) }
|
|
310
288
|
/>
|
|
311
289
|
) : (
|
|
312
|
-
<div className="editor-post-status">
|
|
313
|
-
|
|
290
|
+
<div className="editor-post-status is-read-only">
|
|
291
|
+
{ labels[ status ] }
|
|
314
292
|
</div>
|
|
315
293
|
) }
|
|
316
294
|
</PostPanelRow>
|
|
@@ -1,43 +1,13 @@
|
|
|
1
1
|
.editor-post-status {
|
|
2
2
|
max-width: 100%;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
padding:
|
|
6
|
-
height: auto;
|
|
7
|
-
border-radius: $grid-unit-20;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.editor-post-status-label {
|
|
11
|
-
border-radius: $grid-unit-20;
|
|
12
|
-
display: inline-flex;
|
|
13
|
-
padding: 0 $grid-unit-15 0 $grid-unit-15;
|
|
14
|
-
background: rgba($gray-900, 0.04);
|
|
15
|
-
height: $button-size-compact;
|
|
16
|
-
align-items: center;
|
|
17
|
-
color: $gray-900;
|
|
18
|
-
|
|
19
|
-
&.has-icon {
|
|
20
|
-
padding: 0 $grid-unit-10 0 $grid-unit-15;
|
|
21
|
-
|
|
22
|
-
&:hover {
|
|
23
|
-
background: rgba($gray-900, 0.08);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&.has-status-publish,
|
|
28
|
-
&.has-status-private,
|
|
29
|
-
&.has-status-future {
|
|
30
|
-
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
|
|
31
|
-
color: var(--wp-admin-theme-color);
|
|
32
|
-
|
|
33
|
-
&:hover {
|
|
34
|
-
background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
4
|
+
&.is-read-only {
|
|
5
|
+
padding: 6px 12px;
|
|
37
6
|
}
|
|
38
7
|
}
|
|
39
8
|
|
|
40
|
-
.editor-change-status__password-fieldset
|
|
9
|
+
.editor-change-status__password-fieldset,
|
|
10
|
+
.editor-change-status__publish-date-wrapper {
|
|
41
11
|
border-top: $border-width solid $gray-200;
|
|
42
12
|
padding-top: $grid-unit-20;
|
|
43
13
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import {
|
|
5
|
+
import { ToggleControl, VisuallyHidden } from '@wordpress/components';
|
|
6
6
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -10,6 +10,7 @@ import { useDispatch, useSelect } from '@wordpress/data';
|
|
|
10
10
|
*/
|
|
11
11
|
import PostStickyCheck from './check';
|
|
12
12
|
import { store as editorStore } from '../../store';
|
|
13
|
+
import PostPanelRow from '../post-panel-row';
|
|
13
14
|
|
|
14
15
|
export default function PostSticky() {
|
|
15
16
|
const postSticky = useSelect( ( select ) => {
|
|
@@ -21,12 +22,16 @@ export default function PostSticky() {
|
|
|
21
22
|
|
|
22
23
|
return (
|
|
23
24
|
<PostStickyCheck>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
<PostPanelRow label={ __( 'Sticky' ) }>
|
|
26
|
+
<ToggleControl
|
|
27
|
+
className="editor-post-sticky__toggle-control"
|
|
28
|
+
label={
|
|
29
|
+
<VisuallyHidden>{ __( 'Sticky' ) }</VisuallyHidden>
|
|
30
|
+
}
|
|
31
|
+
checked={ postSticky }
|
|
32
|
+
onChange={ () => editPost( { sticky: ! postSticky } ) }
|
|
33
|
+
/>
|
|
34
|
+
</PostPanelRow>
|
|
30
35
|
</PostStickyCheck>
|
|
31
36
|
);
|
|
32
37
|
}
|
|
@@ -35,14 +35,8 @@ export default function PostSyncStatus() {
|
|
|
35
35
|
<PostPanelRow label={ __( 'Sync status' ) }>
|
|
36
36
|
<div className="editor-post-sync-status__value">
|
|
37
37
|
{ syncStatus === 'unsynced'
|
|
38
|
-
? _x(
|
|
39
|
-
|
|
40
|
-
'Text that indicates that the pattern is not synchronized'
|
|
41
|
-
)
|
|
42
|
-
: _x(
|
|
43
|
-
'Synced',
|
|
44
|
-
'Text that indicates that the pattern is synchronized'
|
|
45
|
-
) }
|
|
38
|
+
? _x( 'Not synced', 'pattern (singular)' )
|
|
39
|
+
: _x( 'Synced', 'pattern (singular)' ) }
|
|
46
40
|
</div>
|
|
47
41
|
</PostPanelRow>
|
|
48
42
|
);
|
|
@@ -55,6 +55,14 @@ function PostTemplateToggle( { isOpen, onClick } ) {
|
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Renders the dropdown content for selecting a post template.
|
|
60
|
+
*
|
|
61
|
+
* @param {Object} props The component props.
|
|
62
|
+
* @param {Function} props.onClose The function to close the dropdown.
|
|
63
|
+
*
|
|
64
|
+
* @return {JSX.Element} The rendered dropdown content.
|
|
65
|
+
*/
|
|
58
66
|
function PostTemplateDropdownContent( { onClose } ) {
|
|
59
67
|
const allowSwitchingTemplate = useAllowSwitchingTemplates();
|
|
60
68
|
const {
|
|
@@ -216,4 +224,11 @@ function ClassicThemeControl() {
|
|
|
216
224
|
);
|
|
217
225
|
}
|
|
218
226
|
|
|
227
|
+
/**
|
|
228
|
+
* Provides a dropdown menu for selecting and managing post templates.
|
|
229
|
+
*
|
|
230
|
+
* The dropdown menu includes a button for toggling the menu, a list of available templates, and options for creating and editing templates.
|
|
231
|
+
*
|
|
232
|
+
* @return {JSX.Element} The rendered ClassicThemeControl component.
|
|
233
|
+
*/
|
|
219
234
|
export default ClassicThemeControl;
|
|
@@ -13,6 +13,11 @@ import ClassicThemeControl from './classic-theme';
|
|
|
13
13
|
import BlockThemeControl from './block-theme';
|
|
14
14
|
import PostPanelRow from '../post-panel-row';
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Displays the template controls based on the current editor settings and user permissions.
|
|
18
|
+
*
|
|
19
|
+
* @return {JSX.Element|null} The rendered PostTemplatePanel component.
|
|
20
|
+
*/
|
|
16
21
|
export default function PostTemplatePanel() {
|
|
17
22
|
const { templateId, isBlockTheme } = useSelect( ( select ) => {
|
|
18
23
|
const { getCurrentTemplateId, getEditorSettings } =
|
|
@@ -20,14 +20,6 @@
|
|
|
20
20
|
.block-editor-block-patterns-list__list-item {
|
|
21
21
|
break-inside: avoid-column;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
.block-editor-block-patterns-list__item {
|
|
25
|
-
// Avoid to override the BlockPatternList component
|
|
26
|
-
// default hover and focus styles.
|
|
27
|
-
&:not(:focus):not(:hover) .block-editor-block-preview__container {
|
|
28
|
-
box-shadow: 0 0 0 1px $gray-300;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
23
|
}
|
|
32
24
|
|
|
33
25
|
.editor-post-template__dropdown {
|
|
@@ -19,6 +19,11 @@ import { VisuallyHidden } from '@wordpress/components';
|
|
|
19
19
|
*/
|
|
20
20
|
import { store as editorStore } from '../../store';
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Displays the Post Text Editor along with content in Visual and Text mode.
|
|
24
|
+
*
|
|
25
|
+
* @return {JSX.Element|null} The rendered PostTextEditor component.
|
|
26
|
+
*/
|
|
22
27
|
export default function PostTextEditor() {
|
|
23
28
|
const instanceId = useInstanceId( PostTextEditor );
|
|
24
29
|
const { content, blocks, type, id } = useSelect( ( select ) => {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* WordPress dependencies
|
|
8
7
|
*/
|
|
@@ -211,4 +210,12 @@ function PostTitle( _, forwardedRef ) {
|
|
|
211
210
|
);
|
|
212
211
|
}
|
|
213
212
|
|
|
213
|
+
/**
|
|
214
|
+
* Renders the `PostTitle` component.
|
|
215
|
+
*
|
|
216
|
+
* @param {Object} _ Unused parameter.
|
|
217
|
+
* @param {Element} forwardedRef Forwarded ref for the component.
|
|
218
|
+
*
|
|
219
|
+
* @return {Component} The rendered PostTitle component.
|
|
220
|
+
*/
|
|
214
221
|
export default forwardRef( PostTitle );
|
|
@@ -18,11 +18,67 @@ import { store as blockEditorStore, RichText } from '@wordpress/block-editor';
|
|
|
18
18
|
import { store as editorStore } from '@wordpress/editor';
|
|
19
19
|
import { __unstableStripHTML as stripHTML } from '@wordpress/dom';
|
|
20
20
|
|
|
21
|
+
/** @typedef {import('./types').RichTextValue} RichTextValue */
|
|
22
|
+
|
|
21
23
|
/**
|
|
22
24
|
* Internal dependencies
|
|
23
25
|
*/
|
|
24
26
|
import styles from './style.scss';
|
|
25
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Inserts content with title
|
|
30
|
+
*
|
|
31
|
+
* This function processes the given content and title, updating the title
|
|
32
|
+
* and content based on certain conditions. If the content is an array of
|
|
33
|
+
* blocks, it will check the first block for a heading or paragraph to use
|
|
34
|
+
* as the title. If the content is a string, it will strip HTML and update
|
|
35
|
+
* the title and content accordingly.
|
|
36
|
+
*
|
|
37
|
+
* @param {string} title The post title.
|
|
38
|
+
* @param {Array | string} content The content to be processed. It can be an array of blocks or a string.
|
|
39
|
+
* @param {Function} onUpdateTitle Callback function to update the title.
|
|
40
|
+
* @param {Function} onUpdateContent Callback function to update the content.
|
|
41
|
+
* @param {RichTextValue} value The initial value object, default is an object with empty text.
|
|
42
|
+
*/
|
|
43
|
+
export function insertContentWithTitle(
|
|
44
|
+
title,
|
|
45
|
+
content,
|
|
46
|
+
onUpdateTitle,
|
|
47
|
+
onUpdateContent,
|
|
48
|
+
value = create( { text: '' } )
|
|
49
|
+
) {
|
|
50
|
+
if ( ! content.length ) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if ( typeof content !== 'string' ) {
|
|
55
|
+
const [ firstBlock ] = content;
|
|
56
|
+
|
|
57
|
+
if (
|
|
58
|
+
! title &&
|
|
59
|
+
( firstBlock.name === 'core/heading' ||
|
|
60
|
+
firstBlock.name === 'core/paragraph' )
|
|
61
|
+
) {
|
|
62
|
+
// Strip HTML to avoid unwanted HTML being added to the title.
|
|
63
|
+
// In the majority of cases it is assumed that HTML in the title
|
|
64
|
+
// is undesirable.
|
|
65
|
+
const contentNoHTML = stripHTML( firstBlock.attributes.content );
|
|
66
|
+
onUpdateTitle( contentNoHTML );
|
|
67
|
+
onUpdateContent( content.slice( 1 ) );
|
|
68
|
+
} else {
|
|
69
|
+
onUpdateContent( content );
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
// Strip HTML to avoid unwanted HTML being added to the title.
|
|
73
|
+
// In the majority of cases it is assumed that HTML in the title
|
|
74
|
+
// is undesirable.
|
|
75
|
+
const contentNoHTML = stripHTML( content );
|
|
76
|
+
|
|
77
|
+
const newValue = insert( value, create( { html: contentNoHTML } ) );
|
|
78
|
+
onUpdateTitle( toHTMLString( { value: newValue } ) );
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
26
82
|
class PostTitle extends Component {
|
|
27
83
|
constructor( props ) {
|
|
28
84
|
super( props );
|
|
@@ -59,45 +115,24 @@ class PostTitle extends Component {
|
|
|
59
115
|
}
|
|
60
116
|
|
|
61
117
|
onPaste( { value, plainText, html } ) {
|
|
62
|
-
const {
|
|
118
|
+
const {
|
|
119
|
+
title,
|
|
120
|
+
onInsertBlockAfter: onInsertBlocks,
|
|
121
|
+
onUpdate,
|
|
122
|
+
} = this.props;
|
|
63
123
|
|
|
64
124
|
const content = pasteHandler( {
|
|
65
125
|
HTML: html,
|
|
66
126
|
plainText,
|
|
67
127
|
} );
|
|
68
128
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if (
|
|
77
|
-
! title &&
|
|
78
|
-
( firstBlock.name === 'core/heading' ||
|
|
79
|
-
firstBlock.name === 'core/paragraph' )
|
|
80
|
-
) {
|
|
81
|
-
// Strip HTML to avoid unwanted HTML being added to the title.
|
|
82
|
-
// In the majority of cases it is assumed that HTML in the title
|
|
83
|
-
// is undesirable.
|
|
84
|
-
const contentNoHTML = stripHTML(
|
|
85
|
-
firstBlock.attributes.content
|
|
86
|
-
);
|
|
87
|
-
onUpdate( contentNoHTML );
|
|
88
|
-
onInsertBlockAfter( content.slice( 1 ) );
|
|
89
|
-
} else {
|
|
90
|
-
onInsertBlockAfter( content );
|
|
91
|
-
}
|
|
92
|
-
} else {
|
|
93
|
-
// Strip HTML to avoid unwanted HTML being added to the title.
|
|
94
|
-
// In the majority of cases it is assumed that HTML in the title
|
|
95
|
-
// is undesirable.
|
|
96
|
-
const contentNoHTML = stripHTML( content );
|
|
97
|
-
|
|
98
|
-
const newValue = insert( value, create( { html: contentNoHTML } ) );
|
|
99
|
-
onUpdate( toHTMLString( { value: newValue } ) );
|
|
100
|
-
}
|
|
129
|
+
insertContentWithTitle(
|
|
130
|
+
title,
|
|
131
|
+
content,
|
|
132
|
+
onUpdate,
|
|
133
|
+
onInsertBlocks,
|
|
134
|
+
value
|
|
135
|
+
);
|
|
101
136
|
}
|
|
102
137
|
|
|
103
138
|
setRef( richText ) {
|
|
@@ -166,7 +201,7 @@ class PostTitle extends Component {
|
|
|
166
201
|
<RichText.Raw
|
|
167
202
|
ref={ this.setRef }
|
|
168
203
|
accessibilityLabel={ this.getTitle( title, postType ) }
|
|
169
|
-
tagName=
|
|
204
|
+
tagName="p"
|
|
170
205
|
tagsToEliminate={ [ 'strong' ] }
|
|
171
206
|
unstableOnFocus={ this.props.onSelect }
|
|
172
207
|
onBlur={ this.props.onBlur } // Always assign onBlur as a props.
|
|
@@ -174,7 +209,7 @@ class PostTitle extends Component {
|
|
|
174
209
|
styles={ styles }
|
|
175
210
|
fontSize={ 24 }
|
|
176
211
|
lineHeight={ 1 }
|
|
177
|
-
fontWeight=
|
|
212
|
+
fontWeight="bold"
|
|
178
213
|
deleteEnter
|
|
179
214
|
onChange={ ( value ) => {
|
|
180
215
|
this.props.onUpdate( value );
|
|
@@ -20,6 +20,14 @@ import { DEFAULT_CLASSNAMES, REGEXP_NEWLINES } from './constants';
|
|
|
20
20
|
import usePostTitleFocus from './use-post-title-focus';
|
|
21
21
|
import usePostTitle from './use-post-title';
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Renders a raw post title input field.
|
|
25
|
+
*
|
|
26
|
+
* @param {Object} _ Unused parameter.
|
|
27
|
+
* @param {Element} forwardedRef Reference to the component's DOM node.
|
|
28
|
+
*
|
|
29
|
+
* @return {Component} The rendered component.
|
|
30
|
+
*/
|
|
23
31
|
function PostTitleRaw( _, forwardedRef ) {
|
|
24
32
|
const { placeholder, hasFixedToolbar } = useSelect( ( select ) => {
|
|
25
33
|
const { getSettings } = select( blockEditorStore );
|
|
@@ -9,6 +9,13 @@ import { useSelect } from '@wordpress/data';
|
|
|
9
9
|
*/
|
|
10
10
|
import { store as editorStore } from '../../store';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Custom hook that manages the focus behavior of the post title input field.
|
|
14
|
+
*
|
|
15
|
+
* @param {Element} forwardedRef - The forwarded ref for the input field.
|
|
16
|
+
*
|
|
17
|
+
* @return {Object} - The ref object.
|
|
18
|
+
*/
|
|
12
19
|
export default function usePostTitleFocus( forwardedRef ) {
|
|
13
20
|
const ref = useRef();
|
|
14
21
|
|
|
@@ -7,6 +7,11 @@ import { useSelect, useDispatch } from '@wordpress/data';
|
|
|
7
7
|
*/
|
|
8
8
|
import { store as editorStore } from '../../store';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Custom hook for managing the post title in the editor.
|
|
12
|
+
*
|
|
13
|
+
* @return {Object} An object containing the current title and a function to update the title.
|
|
14
|
+
*/
|
|
10
15
|
export default function usePostTitle() {
|
|
11
16
|
const { editPost } = useDispatch( editorStore );
|
|
12
17
|
const { title } = useSelect( ( select ) => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
5
|
import { store as coreStore } from '@wordpress/core-data';
|
|
6
|
-
import { PanelBody
|
|
6
|
+
import { PanelBody } from '@wordpress/components';
|
|
7
7
|
import { __ } from '@wordpress/i18n';
|
|
8
8
|
import { useAsyncList } from '@wordpress/compose';
|
|
9
9
|
import { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';
|
|
@@ -62,17 +62,9 @@ function PostTransform() {
|
|
|
62
62
|
|
|
63
63
|
return (
|
|
64
64
|
<PanelBody
|
|
65
|
-
title={ __( '
|
|
65
|
+
title={ __( 'Design' ) }
|
|
66
66
|
initialOpen={ record.type === TEMPLATE_PART_POST_TYPE }
|
|
67
67
|
>
|
|
68
|
-
<PanelRow>
|
|
69
|
-
<p>
|
|
70
|
-
{ __(
|
|
71
|
-
'Choose a predefined pattern to switch up the look of your template.' // TODO - make this dynamic?
|
|
72
|
-
) }
|
|
73
|
-
</p>
|
|
74
|
-
</PanelRow>
|
|
75
|
-
|
|
76
68
|
<TemplatesList
|
|
77
69
|
availableTemplates={ availablePatterns }
|
|
78
70
|
onSelect={ onTemplateSelect }
|
|
@@ -9,6 +9,14 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
9
9
|
*/
|
|
10
10
|
import { store as editorStore } from '../../store';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Check if the post URL is valid and visible.
|
|
14
|
+
*
|
|
15
|
+
* @param {Object} props The component props.
|
|
16
|
+
* @param {Element} props.children The child components.
|
|
17
|
+
*
|
|
18
|
+
* @return {Component|null} The child components if the post URL is valid and visible, otherwise null.
|
|
19
|
+
*/
|
|
12
20
|
export default function PostURLCheck( { children } ) {
|
|
13
21
|
const isVisible = useSelect( ( select ) => {
|
|
14
22
|
const postTypeSlug = select( editorStore ).getCurrentPostType();
|