@wordpress/editor 14.17.1 → 14.19.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 +4 -0
- package/README.md +2 -0
- package/build/bindings/pattern-overrides.js +0 -1
- package/build/bindings/pattern-overrides.js.map +1 -1
- package/build/bindings/post-meta.js +0 -1
- package/build/bindings/post-meta.js.map +1 -1
- package/build/components/autocompleters/user.js +0 -1
- package/build/components/autocompleters/user.js.map +1 -1
- package/build/components/block-removal-warnings/index.js +0 -1
- package/build/components/block-removal-warnings/index.js.map +1 -1
- package/build/components/block-settings-menu/content-only-settings-menu.js +0 -1
- 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 +0 -1
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build/components/collab-sidebar/comments.js +0 -1
- package/build/components/collab-sidebar/comments.js.map +1 -1
- package/build/components/collab-sidebar/index.js +0 -1
- package/build/components/collab-sidebar/index.js.map +1 -1
- package/build/components/collab-sidebar/utils.js +0 -1
- package/build/components/collab-sidebar/utils.js.map +1 -1
- package/build/components/deprecated.js +0 -1
- package/build/components/deprecated.js.map +1 -1
- package/build/components/document-outline/index.js +16 -17
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/editor/index.js +9 -5
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-help/index.native.js +0 -1
- package/build/components/editor-help/index.native.js.map +1 -1
- package/build/components/editor-notices/index.js +0 -1
- package/build/components/editor-notices/index.js.map +1 -1
- package/build/components/editor-snackbars/index.js +0 -1
- package/build/components/editor-snackbars/index.js.map +1 -1
- package/build/components/entities-saved-states/entity-record-item.js +2 -1
- package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build/components/entities-saved-states/entity-type-list.js +2 -2
- package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build/components/entities-saved-states/hooks/use-is-dirty.js +0 -1
- package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
- package/build/components/entities-saved-states/index.js +66 -43
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +0 -1
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/list-view-sidebar/index.js +0 -1
- package/build/components/list-view-sidebar/index.js.map +1 -1
- package/build/components/local-autosave-monitor/index.js +0 -1
- package/build/components/local-autosave-monitor/index.js.map +1 -1
- package/build/components/mode-switcher/index.js +0 -1
- package/build/components/mode-switcher/index.js.map +1 -1
- package/build/components/page-attributes/parent.js +8 -5
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/post-actions/actions.js +0 -1
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-actions/index.js +19 -29
- package/build/components/post-actions/index.js.map +1 -1
- package/build/components/post-author/check.js +3 -4
- package/build/components/post-author/check.js.map +1 -1
- package/build/components/post-author/combobox.js +4 -2
- package/build/components/post-author/combobox.js.map +1 -1
- package/build/components/post-author/hook.js +8 -5
- package/build/components/post-author/hook.js.map +1 -1
- package/build/components/post-card-panel/index.js +2 -2
- package/build/components/post-card-panel/index.js.map +1 -1
- package/build/components/post-featured-image/index.js +4 -2
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-fields/index.js +0 -1
- package/build/components/post-fields/index.js.map +1 -1
- package/build/components/post-format/index.js +0 -1
- package/build/components/post-format/index.js.map +1 -1
- package/build/components/post-format/panel.js +0 -1
- package/build/components/post-format/panel.js.map +1 -1
- package/build/components/post-publish-button/index.js +0 -1
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-category-panel.js +2 -4
- package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js +0 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js +1 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.js +0 -1
- package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build/components/post-publish-panel/media-util.js +0 -1
- package/build/components/post-publish-panel/media-util.js.map +1 -1
- package/build/components/post-saved-state/index.js +0 -1
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-schedule/index.js +0 -1
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-taxonomies/check.js +1 -1
- package/build/components/post-taxonomies/check.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +2 -3
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +2 -3
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/index.js +1 -2
- package/build/components/post-taxonomies/index.js.map +1 -1
- package/build/components/post-taxonomies/most-used-terms.js +0 -1
- package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build/components/post-template/block-theme.js +68 -48
- package/build/components/post-template/block-theme.js.map +1 -1
- package/build/components/post-template/classic-theme.js +30 -19
- package/build/components/post-template/classic-theme.js.map +1 -1
- package/build/components/post-template/create-new-template-modal.js +3 -1
- package/build/components/post-template/create-new-template-modal.js.map +1 -1
- package/build/components/post-template/panel.js +3 -11
- package/build/components/post-template/panel.js.map +1 -1
- package/build/components/post-template/swap-template-button.js +0 -1
- package/build/components/post-template/swap-template-button.js.map +1 -1
- package/build/components/post-transform-panel/hooks.js +0 -1
- package/build/components/post-transform-panel/hooks.js.map +1 -1
- package/build/components/post-type-support-check/index.js +0 -1
- package/build/components/post-type-support-check/index.js.map +1 -1
- package/build/components/preferences-modal/block-visibility.js +2 -2
- package/build/components/preferences-modal/block-visibility.js.map +1 -1
- package/build/components/preferences-modal/index.js +1 -2
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preview-dropdown/index.js +6 -3
- package/build/components/preview-dropdown/index.js.map +1 -1
- package/build/components/provider/disable-non-page-content-blocks.js +0 -1
- package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build/components/provider/index.js +19 -19
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js +0 -1
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +0 -1
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/sidebar/header.js +1 -1
- package/build/components/sidebar/header.js.map +1 -1
- package/build/components/sidebar/index.js +1 -2
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/start-page-options/index.js +148 -23
- package/build/components/start-page-options/index.js.map +1 -1
- package/build/components/start-template-options/index.js +0 -1
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/template-part-content-panel/index.js +0 -1
- package/build/components/template-part-content-panel/index.js.map +1 -1
- package/build/components/theme-support-check/index.js +0 -1
- package/build/components/theme-support-check/index.js.map +1 -1
- package/build/components/visual-editor/edit-template-blocks-notification.js +1 -1
- package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
- package/build/components/visual-editor/use-select-nearest-editable-block.js +0 -1
- package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
- package/build/dataviews/store/private-actions.js +0 -1
- package/build/dataviews/store/private-actions.js.map +1 -1
- package/build/dataviews/store/reducer.js +0 -1
- package/build/dataviews/store/reducer.js.map +1 -1
- package/build/hooks/custom-sources-backwards-compatibility.js +0 -1
- package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build/hooks/pattern-overrides.js +0 -1
- package/build/hooks/pattern-overrides.js.map +1 -1
- package/build/store/actions.js +0 -1
- package/build/store/actions.js.map +1 -1
- package/build/store/private-actions.js +29 -3
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +44 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +0 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/reducer.native.js +0 -1
- package/build/store/reducer.native.js.map +1 -1
- package/build/store/selectors.js +0 -1
- package/build/store/selectors.js.map +1 -1
- package/build/utils/get-template-info.js +0 -1
- package/build/utils/get-template-info.js.map +1 -1
- package/build/utils/media-upload/index.js +5 -2
- package/build/utils/media-upload/index.js.map +1 -1
- package/build/utils/terms.js +0 -1
- package/build/utils/terms.js.map +1 -1
- package/build-module/bindings/pattern-overrides.js +0 -1
- package/build-module/bindings/pattern-overrides.js.map +1 -1
- package/build-module/bindings/post-meta.js +0 -1
- package/build-module/bindings/post-meta.js.map +1 -1
- package/build-module/components/autocompleters/user.js +0 -1
- package/build-module/components/autocompleters/user.js.map +1 -1
- package/build-module/components/block-removal-warnings/index.js +0 -1
- package/build-module/components/block-removal-warnings/index.js.map +1 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +0 -1
- 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 +0 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build-module/components/collab-sidebar/comments.js +0 -1
- package/build-module/components/collab-sidebar/comments.js.map +1 -1
- package/build-module/components/collab-sidebar/index.js +0 -1
- package/build-module/components/collab-sidebar/index.js.map +1 -1
- package/build-module/components/collab-sidebar/utils.js +0 -1
- package/build-module/components/collab-sidebar/utils.js.map +1 -1
- package/build-module/components/deprecated.js +0 -1
- package/build-module/components/deprecated.js.map +1 -1
- package/build-module/components/document-outline/index.js +17 -18
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/editor/index.js +9 -5
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-help/index.native.js +0 -1
- package/build-module/components/editor-help/index.native.js.map +1 -1
- package/build-module/components/editor-notices/index.js +0 -1
- package/build-module/components/editor-notices/index.js.map +1 -1
- package/build-module/components/editor-snackbars/index.js +0 -1
- package/build-module/components/editor-snackbars/index.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-record-item.js +2 -1
- 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 +2 -2
- package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +0 -1
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +67 -44
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/list-view-sidebar/index.js +0 -1
- package/build-module/components/list-view-sidebar/index.js.map +1 -1
- package/build-module/components/local-autosave-monitor/index.js +0 -1
- package/build-module/components/local-autosave-monitor/index.js.map +1 -1
- package/build-module/components/mode-switcher/index.js +0 -1
- package/build-module/components/mode-switcher/index.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +8 -5
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/post-actions/actions.js +0 -1
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-actions/index.js +19 -29
- package/build-module/components/post-actions/index.js.map +1 -1
- package/build-module/components/post-author/check.js +3 -4
- package/build-module/components/post-author/check.js.map +1 -1
- package/build-module/components/post-author/combobox.js +4 -2
- package/build-module/components/post-author/combobox.js.map +1 -1
- package/build-module/components/post-author/hook.js +8 -5
- package/build-module/components/post-author/hook.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +2 -2
- package/build-module/components/post-card-panel/index.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +4 -2
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-fields/index.js +0 -1
- package/build-module/components/post-fields/index.js.map +1 -1
- package/build-module/components/post-format/index.js +0 -1
- package/build-module/components/post-format/index.js.map +1 -1
- package/build-module/components/post-format/panel.js +0 -1
- package/build-module/components/post-format/panel.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +0 -1
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-category-panel.js +2 -4
- 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 +0 -1
- 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 +1 -1
- 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 +0 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build-module/components/post-publish-panel/media-util.js +0 -1
- package/build-module/components/post-publish-panel/media-util.js.map +1 -1
- package/build-module/components/post-saved-state/index.js +0 -1
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/index.js +0 -1
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-taxonomies/check.js +1 -1
- package/build-module/components/post-taxonomies/check.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +2 -3
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +2 -3
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/index.js +1 -2
- package/build-module/components/post-taxonomies/index.js.map +1 -1
- package/build-module/components/post-taxonomies/most-used-terms.js +0 -1
- package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build-module/components/post-template/block-theme.js +68 -48
- package/build-module/components/post-template/block-theme.js.map +1 -1
- package/build-module/components/post-template/classic-theme.js +30 -19
- package/build-module/components/post-template/classic-theme.js.map +1 -1
- package/build-module/components/post-template/create-new-template-modal.js +3 -1
- package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
- package/build-module/components/post-template/panel.js +3 -11
- package/build-module/components/post-template/panel.js.map +1 -1
- package/build-module/components/post-template/swap-template-button.js +0 -1
- package/build-module/components/post-template/swap-template-button.js.map +1 -1
- package/build-module/components/post-transform-panel/hooks.js +0 -1
- package/build-module/components/post-transform-panel/hooks.js.map +1 -1
- package/build-module/components/post-type-support-check/index.js +0 -1
- package/build-module/components/post-type-support-check/index.js.map +1 -1
- package/build-module/components/preferences-modal/block-visibility.js +2 -2
- package/build-module/components/preferences-modal/block-visibility.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +1 -2
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preview-dropdown/index.js +6 -3
- package/build-module/components/preview-dropdown/index.js.map +1 -1
- package/build-module/components/provider/disable-non-page-content-blocks.js +0 -1
- package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build-module/components/provider/index.js +19 -19
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js +0 -1
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +0 -1
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/sidebar/header.js +1 -1
- package/build-module/components/sidebar/header.js.map +1 -1
- package/build-module/components/sidebar/index.js +1 -2
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/start-page-options/index.js +148 -24
- package/build-module/components/start-page-options/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js +0 -1
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/template-part-content-panel/index.js +0 -1
- package/build-module/components/template-part-content-panel/index.js.map +1 -1
- package/build-module/components/theme-support-check/index.js +0 -1
- package/build-module/components/theme-support-check/index.js.map +1 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js +1 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
- package/build-module/components/visual-editor/use-select-nearest-editable-block.js +0 -1
- package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
- package/build-module/dataviews/store/private-actions.js +0 -1
- package/build-module/dataviews/store/private-actions.js.map +1 -1
- package/build-module/dataviews/store/reducer.js +0 -1
- package/build-module/dataviews/store/reducer.js.map +1 -1
- package/build-module/hooks/custom-sources-backwards-compatibility.js +0 -1
- package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build-module/hooks/pattern-overrides.js +0 -1
- package/build-module/hooks/pattern-overrides.js.map +1 -1
- package/build-module/store/actions.js +0 -1
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-actions.js +25 -1
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +43 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +0 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/reducer.native.js +0 -1
- package/build-module/store/reducer.native.js.map +1 -1
- package/build-module/store/selectors.js +0 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/get-template-info.js +0 -1
- package/build-module/utils/get-template-info.js.map +1 -1
- package/build-module/utils/media-upload/index.js +5 -2
- package/build-module/utils/media-upload/index.js.map +1 -1
- package/build-module/utils/terms.js +0 -1
- package/build-module/utils/terms.js.map +1 -1
- package/build-style/style-rtl.css +49 -8
- package/build-style/style.css +49 -8
- package/build-types/components/document-outline/index.d.ts.map +1 -1
- package/build-types/components/editor/index.d.ts.map +1 -1
- package/build-types/components/entities-saved-states/entity-record-item.d.ts.map +1 -1
- package/build-types/components/entities-saved-states/entity-type-list.d.ts.map +1 -1
- package/build-types/components/entities-saved-states/index.d.ts +6 -2
- package/build-types/components/entities-saved-states/index.d.ts.map +1 -1
- package/build-types/components/page-attributes/parent.d.ts.map +1 -1
- package/build-types/components/post-actions/index.d.ts.map +1 -1
- package/build-types/components/post-author/check.d.ts.map +1 -1
- package/build-types/components/post-author/combobox.d.ts.map +1 -1
- package/build-types/components/post-author/hook.d.ts +1 -0
- package/build-types/components/post-author/hook.d.ts.map +1 -1
- package/build-types/components/post-card-panel/index.d.ts.map +1 -1
- package/build-types/components/post-publish-panel/maybe-category-panel.d.ts.map +1 -1
- package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/check.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/index.d.ts.map +1 -1
- package/build-types/components/post-template/block-theme.d.ts.map +1 -1
- package/build-types/components/post-template/classic-theme.d.ts.map +1 -1
- package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -1
- package/build-types/components/post-template/hooks.d.ts +1 -1
- package/build-types/components/post-template/hooks.d.ts.map +1 -1
- package/build-types/components/post-template/panel.d.ts.map +1 -1
- package/build-types/components/preferences-modal/block-visibility.d.ts.map +1 -1
- package/build-types/components/preview-dropdown/index.d.ts.map +1 -1
- package/build-types/components/provider/index.d.ts.map +1 -1
- package/build-types/components/start-page-options/index.d.ts +2 -1
- package/build-types/components/start-page-options/index.d.ts.map +1 -1
- package/build-types/store/private-actions.d.ts +4 -0
- package/build-types/store/private-actions.d.ts.map +1 -1
- package/build-types/store/private-selectors.d.ts +13 -0
- package/build-types/store/private-selectors.d.ts.map +1 -1
- package/build-types/utils/media-upload/index.d.ts +3 -1
- package/build-types/utils/media-upload/index.d.ts.map +1 -1
- package/package.json +37 -37
- package/src/components/document-outline/index.js +22 -16
- package/src/components/editor/index.js +24 -13
- package/src/components/entities-saved-states/entity-record-item.js +1 -0
- package/src/components/entities-saved-states/entity-type-list.js +6 -2
- package/src/components/entities-saved-states/index.js +98 -58
- package/src/components/entities-saved-states/style.scss +40 -5
- package/src/components/page-attributes/parent.js +55 -38
- package/src/components/post-actions/index.js +19 -37
- package/src/components/post-author/check.js +7 -4
- package/src/components/post-author/combobox.js +3 -1
- package/src/components/post-author/hook.js +4 -3
- package/src/components/post-card-panel/index.js +7 -5
- package/src/components/post-featured-image/index.js +2 -0
- package/src/components/post-publish-panel/maybe-category-panel.js +6 -2
- package/src/components/post-publish-panel/maybe-tags-panel.js +5 -1
- package/src/components/post-taxonomies/check.js +5 -3
- package/src/components/post-taxonomies/flat-term-selector.js +2 -2
- package/src/components/post-taxonomies/hierarchical-term-selector.js +2 -2
- package/src/components/post-taxonomies/index.js +5 -1
- package/src/components/post-taxonomies/test/index.js +32 -18
- package/src/components/post-template/block-theme.js +76 -56
- package/src/components/post-template/classic-theme.js +31 -15
- package/src/components/post-template/create-new-template-modal.js +1 -0
- package/src/components/post-template/panel.js +2 -12
- package/src/components/post-text-editor/style.scss +0 -2
- package/src/components/preferences-modal/block-visibility.js +2 -1
- package/src/components/preferences-modal/index.js +1 -1
- package/src/components/preview-dropdown/index.js +8 -6
- package/src/components/provider/index.js +21 -30
- package/src/components/sidebar/header.js +1 -1
- package/src/components/sidebar/index.js +1 -1
- package/src/components/start-page-options/index.js +149 -23
- package/src/components/start-page-options/style.scss +27 -0
- package/src/components/visual-editor/edit-template-blocks-notification.js +1 -1
- package/src/store/private-actions.js +33 -0
- package/src/store/private-selectors.js +57 -0
- package/src/utils/media-upload/index.js +3 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -976,14 +976,41 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
976
976
|
margin-bottom: 12px;
|
|
977
977
|
}
|
|
978
978
|
|
|
979
|
-
.entities-saved-
|
|
980
|
-
|
|
979
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt {
|
|
980
|
+
padding: 0;
|
|
981
|
+
}
|
|
982
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__panel-body {
|
|
983
|
+
padding-right: 0;
|
|
984
|
+
padding-left: 0;
|
|
985
|
+
border: 0;
|
|
986
|
+
}
|
|
987
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__panel-body > h2 {
|
|
988
|
+
margin-right: -16px;
|
|
989
|
+
margin-left: -16px;
|
|
990
|
+
margin-bottom: 0;
|
|
991
|
+
}
|
|
992
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__panel-body > h2 button {
|
|
993
|
+
font-size: 11px;
|
|
994
|
+
text-transform: uppercase;
|
|
995
|
+
}
|
|
996
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt--header-wrapper {
|
|
997
|
+
display: none;
|
|
998
|
+
}
|
|
999
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt--changes-count {
|
|
1000
|
+
margin-top: 0;
|
|
1001
|
+
margin-bottom: 8px;
|
|
1002
|
+
}
|
|
1003
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__panel-footer {
|
|
1004
|
+
margin-top: 16px;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
.entities-saved-states__change-control {
|
|
1008
|
+
flex: 1;
|
|
981
1009
|
}
|
|
982
1010
|
|
|
983
1011
|
.entities-saved-states__changes {
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
margin: 8px 16px 0 16px;
|
|
1012
|
+
font-size: 13px;
|
|
1013
|
+
margin: 4px 24px 0 16px;
|
|
987
1014
|
list-style: disc;
|
|
988
1015
|
}
|
|
989
1016
|
.entities-saved-states__changes li {
|
|
@@ -2094,7 +2121,6 @@ textarea.editor-post-text-editor::-webkit-input-placeholder {
|
|
|
2094
2121
|
}
|
|
2095
2122
|
textarea.editor-post-text-editor::-moz-placeholder {
|
|
2096
2123
|
color: rgba(30, 30, 30, 0.62);
|
|
2097
|
-
opacity: 1;
|
|
2098
2124
|
}
|
|
2099
2125
|
textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
2100
2126
|
color: rgba(30, 30, 30, 0.62);
|
|
@@ -2189,7 +2215,6 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2189
2215
|
color: rgba(30, 30, 30, 0.62);
|
|
2190
2216
|
}
|
|
2191
2217
|
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio]::-moz-placeholder {
|
|
2192
|
-
opacity: 1;
|
|
2193
2218
|
color: rgba(30, 30, 30, 0.62);
|
|
2194
2219
|
}
|
|
2195
2220
|
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio]:-ms-input-placeholder {
|
|
@@ -2276,7 +2301,6 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2276
2301
|
color: rgba(30, 30, 30, 0.62);
|
|
2277
2302
|
}
|
|
2278
2303
|
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text]::-moz-placeholder {
|
|
2279
|
-
opacity: 1;
|
|
2280
2304
|
color: rgba(30, 30, 30, 0.62);
|
|
2281
2305
|
}
|
|
2282
2306
|
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text]:-ms-input-placeholder {
|
|
@@ -2374,6 +2398,23 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2374
2398
|
bottom: 0;
|
|
2375
2399
|
}
|
|
2376
2400
|
|
|
2401
|
+
.editor-start-page-options__modal .editor-start-page-options__modal__actions {
|
|
2402
|
+
position: absolute;
|
|
2403
|
+
bottom: 0;
|
|
2404
|
+
width: 100%;
|
|
2405
|
+
height: 92px;
|
|
2406
|
+
background-color: #fff;
|
|
2407
|
+
margin-right: -32px;
|
|
2408
|
+
margin-left: -32px;
|
|
2409
|
+
padding-right: 32px;
|
|
2410
|
+
padding-left: 32px;
|
|
2411
|
+
border-top: 1px solid #ddd;
|
|
2412
|
+
z-index: 1;
|
|
2413
|
+
}
|
|
2414
|
+
.editor-start-page-options__modal .block-editor-block-patterns-list {
|
|
2415
|
+
padding-bottom: 92px;
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2377
2418
|
.editor-start-page-options__modal-content .block-editor-block-patterns-list {
|
|
2378
2419
|
column-count: 2;
|
|
2379
2420
|
column-gap: 24px;
|
package/build-style/style.css
CHANGED
|
@@ -976,14 +976,41 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
976
976
|
margin-bottom: 12px;
|
|
977
977
|
}
|
|
978
978
|
|
|
979
|
-
.entities-saved-
|
|
980
|
-
|
|
979
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt {
|
|
980
|
+
padding: 0;
|
|
981
|
+
}
|
|
982
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__panel-body {
|
|
983
|
+
padding-left: 0;
|
|
984
|
+
padding-right: 0;
|
|
985
|
+
border: 0;
|
|
986
|
+
}
|
|
987
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__panel-body > h2 {
|
|
988
|
+
margin-left: -16px;
|
|
989
|
+
margin-right: -16px;
|
|
990
|
+
margin-bottom: 0;
|
|
991
|
+
}
|
|
992
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__panel-body > h2 button {
|
|
993
|
+
font-size: 11px;
|
|
994
|
+
text-transform: uppercase;
|
|
995
|
+
}
|
|
996
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt--header-wrapper {
|
|
997
|
+
display: none;
|
|
998
|
+
}
|
|
999
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt--changes-count {
|
|
1000
|
+
margin-top: 0;
|
|
1001
|
+
margin-bottom: 8px;
|
|
1002
|
+
}
|
|
1003
|
+
.entities-saved-states__panel.is-inline .entities-saved-states__panel-footer {
|
|
1004
|
+
margin-top: 16px;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
.entities-saved-states__change-control {
|
|
1008
|
+
flex: 1;
|
|
981
1009
|
}
|
|
982
1010
|
|
|
983
1011
|
.entities-saved-states__changes {
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
margin: 8px 16px 0 16px;
|
|
1012
|
+
font-size: 13px;
|
|
1013
|
+
margin: 4px 16px 0 24px;
|
|
987
1014
|
list-style: disc;
|
|
988
1015
|
}
|
|
989
1016
|
.entities-saved-states__changes li {
|
|
@@ -2094,7 +2121,6 @@ textarea.editor-post-text-editor::-webkit-input-placeholder {
|
|
|
2094
2121
|
}
|
|
2095
2122
|
textarea.editor-post-text-editor::-moz-placeholder {
|
|
2096
2123
|
color: rgba(30, 30, 30, 0.62);
|
|
2097
|
-
opacity: 1;
|
|
2098
2124
|
}
|
|
2099
2125
|
textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
2100
2126
|
color: rgba(30, 30, 30, 0.62);
|
|
@@ -2193,7 +2219,6 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2193
2219
|
color: rgba(30, 30, 30, 0.62);
|
|
2194
2220
|
}
|
|
2195
2221
|
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio]::-moz-placeholder {
|
|
2196
|
-
opacity: 1;
|
|
2197
2222
|
color: rgba(30, 30, 30, 0.62);
|
|
2198
2223
|
}
|
|
2199
2224
|
.editor-post-visibility__fieldset .editor-post-visibility__radio[type=radio]:-ms-input-placeholder {
|
|
@@ -2280,7 +2305,6 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2280
2305
|
color: rgba(30, 30, 30, 0.62);
|
|
2281
2306
|
}
|
|
2282
2307
|
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text]::-moz-placeholder {
|
|
2283
|
-
opacity: 1;
|
|
2284
2308
|
color: rgba(30, 30, 30, 0.62);
|
|
2285
2309
|
}
|
|
2286
2310
|
.editor-post-visibility__fieldset .editor-post-visibility__password .editor-post-visibility__password-input[type=text]:-ms-input-placeholder {
|
|
@@ -2378,6 +2402,23 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2378
2402
|
bottom: 0;
|
|
2379
2403
|
}
|
|
2380
2404
|
|
|
2405
|
+
.editor-start-page-options__modal .editor-start-page-options__modal__actions {
|
|
2406
|
+
position: absolute;
|
|
2407
|
+
bottom: 0;
|
|
2408
|
+
width: 100%;
|
|
2409
|
+
height: 92px;
|
|
2410
|
+
background-color: #fff;
|
|
2411
|
+
margin-left: -32px;
|
|
2412
|
+
margin-right: -32px;
|
|
2413
|
+
padding-left: 32px;
|
|
2414
|
+
padding-right: 32px;
|
|
2415
|
+
border-top: 1px solid #ddd;
|
|
2416
|
+
z-index: 1;
|
|
2417
|
+
}
|
|
2418
|
+
.editor-start-page-options__modal .block-editor-block-patterns-list {
|
|
2419
|
+
padding-bottom: 92px;
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2381
2422
|
.editor-start-page-options__modal-content .block-editor-block-patterns-list {
|
|
2382
2423
|
column-count: 2;
|
|
2383
2424
|
column-gap: 24px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/document-outline/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/document-outline/index.js"],"names":[],"mappings":"AAkGA;;;;;;;;GAQG;AACH,gFALG;IAAwB,QAAQ;IACR,uBAAuB,EAAvC,OAAO;CAEf,GAAS,KAAK,CAAC,SAAS,CAsH1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/editor/index.js"],"names":[],"mappings":";AAgBA;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/editor/index.js"],"names":[],"mappings":";AAgBA;;;;;;;;;;;gCAgFC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-record-item.d.ts","sourceRoot":"","sources":["../../../src/components/entities-saved-states/entity-record-item.js"],"names":[],"mappings":"AAgBA;;;;
|
|
1
|
+
{"version":3,"file":"entity-record-item.d.ts","sourceRoot":"","sources":["../../../src/components/entities-saved-states/entity-record-item.js"],"names":[],"mappings":"AAgBA;;;;gCA4DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-type-list.d.ts","sourceRoot":"","sources":["../../../src/components/entities-saved-states/entity-type-list.js"],"names":[],"mappings":"AAyEA;;;;
|
|
1
|
+
{"version":3,"file":"entity-type-list.d.ts","sourceRoot":"","sources":["../../../src/components/entities-saved-states/entity-type-list.js"],"names":[],"mappings":"AAyEA;;;;gCAsDC"}
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
* @param {Object} props The component props.
|
|
5
5
|
* @param {Function} props.close The function to close the dialog.
|
|
6
6
|
* @param {boolean} props.renderDialog Whether to render the component with modal dialog behavior.
|
|
7
|
+
* @param {string} props.variant Changes the layout of the component. When an `inline` value is provided, the action buttons are rendered at the end of the component instead of at the start.
|
|
7
8
|
*
|
|
8
9
|
* @return {React.ReactNode} The rendered component.
|
|
9
10
|
*/
|
|
10
|
-
export default function EntitiesSavedStates({ close, renderDialog }: {
|
|
11
|
+
export default function EntitiesSavedStates({ close, renderDialog, variant, }: {
|
|
11
12
|
close: Function;
|
|
12
13
|
renderDialog: boolean;
|
|
14
|
+
variant: string;
|
|
13
15
|
}): React.ReactNode;
|
|
14
16
|
/**
|
|
15
17
|
* Renders a panel for saving entities with dirty records.
|
|
@@ -25,10 +27,11 @@ export default function EntitiesSavedStates({ close, renderDialog }: {
|
|
|
25
27
|
* @param {boolean} props.isDirty Flag indicating if there are dirty entities.
|
|
26
28
|
* @param {Function} props.setUnselectedEntities Function to set unselected entities.
|
|
27
29
|
* @param {Array} props.unselectedEntities Array of unselected entities.
|
|
30
|
+
* @param {string} props.variant Changes the layout of the component. When an `inline` value is provided, the action buttons are rendered at the end of the component instead of at the start.
|
|
28
31
|
*
|
|
29
32
|
* @return {React.ReactNode} The rendered component.
|
|
30
33
|
*/
|
|
31
|
-
export function EntitiesSavedStatesExtensible({ additionalPrompt, close, onSave, saveEnabled: saveEnabledProp, saveLabel, renderDialog, dirtyEntityRecords, isDirty, setUnselectedEntities, unselectedEntities, }: {
|
|
34
|
+
export function EntitiesSavedStatesExtensible({ additionalPrompt, close, onSave, saveEnabled: saveEnabledProp, saveLabel, renderDialog, dirtyEntityRecords, isDirty, setUnselectedEntities, unselectedEntities, variant, }: {
|
|
32
35
|
additionalPrompt: string;
|
|
33
36
|
close: Function;
|
|
34
37
|
onSave: Function;
|
|
@@ -39,5 +42,6 @@ export function EntitiesSavedStatesExtensible({ additionalPrompt, close, onSave,
|
|
|
39
42
|
isDirty: boolean;
|
|
40
43
|
setUnselectedEntities: Function;
|
|
41
44
|
unselectedEntities: any[];
|
|
45
|
+
variant: string;
|
|
42
46
|
}): React.ReactNode;
|
|
43
47
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/entities-saved-states/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/entities-saved-states/index.js"],"names":[],"mappings":"AAiCA;;;;;;;;;GASG;AACH,+EANG;IAAwB,KAAK;IACL,YAAY,EAA5B,OAAO;IACS,OAAO,EAAvB,MAAM;CAEd,GAAS,KAAK,CAAC,SAAS,CAgB1B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,4NAdG;IAAwB,gBAAgB,EAAhC,MAAM;IACU,KAAK;IACL,MAAM;IACN,WAAW,EAA3B,OAAO;IACS,SAAS,EAAzB,MAAM;IACU,YAAY,EAA5B,OAAO;IACS,kBAAkB;IAClB,OAAO,EAAvB,OAAO;IACS,qBAAqB;IACrB,kBAAkB;IAClB,OAAO,EAAvB,MAAM;CAEd,GAAS,KAAK,CAAC,SAAS,CAuK1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent.d.ts","sourceRoot":"","sources":["../../../src/components/page-attributes/parent.js"],"names":[],"mappings":"AAsDA;;;;;GAKG;AACH,wCAFY,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"parent.d.ts","sourceRoot":"","sources":["../../../src/components/page-attributes/parent.js"],"names":[],"mappings":"AAsDA;;;;;GAKG;AACH,wCAFY,KAAK,CAAC,SAAS,CAsJ1B;AAkCD,yDA4EC;AAtRM,qEAYN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-actions/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-actions/index.js"],"names":[],"mappings":"AAsBA;;;;gCAkEC;AAiBD;;;;gCAiBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/components/post-author/check.js"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AACH,sDALG;IAA+B,QAAQ,EAA/B,KAAK,CAAC,SAAS;CAEvB,GAAS,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/components/post-author/check.js"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AACH,sDALG;IAA+B,QAAQ,EAA/B,KAAK,CAAC,SAAS;CAEvB,GAAS,KAAK,CAAC,SAAS,CA0B1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../src/components/post-author/combobox.js"],"names":[],"mappings":"AAeA,
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../src/components/post-author/combobox.js"],"names":[],"mappings":"AAeA,0EA0CC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/components/post-author/hook.js"],"names":[],"mappings":"AAeA
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/components/post-author/hook.js"],"names":[],"mappings":"AAeA;;;;;EAyDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-card-panel/index.js"],"names":[],"mappings":"AA8BA;;;;;;;;GAQG;AACH,gFALG;IAAgC,QAAQ;IACR,MAAM;IACN,iBAAiB;CACjD,GAAS,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-card-panel/index.js"],"names":[],"mappings":"AA8BA;;;;;;;;GAQG;AACH,gFALG;IAAgC,QAAQ;IACR,MAAM;IACN,iBAAiB;CACjD,GAAS,KAAK,CAAC,SAAS,CAsG1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maybe-category-panel.d.ts","sourceRoot":"","sources":["../../../src/components/post-publish-panel/maybe-category-panel.js"],"names":[],"mappings":";AAeA,
|
|
1
|
+
{"version":3,"file":"maybe-category-panel.d.ts","sourceRoot":"","sources":["../../../src/components/post-publish-panel/maybe-category-panel.js"],"names":[],"mappings":";AAeA,0EAqEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maybe-tags-panel.d.ts","sourceRoot":"","sources":["../../../src/components/post-publish-panel/maybe-tags-panel.js"],"names":[],"mappings":";AAmCA,
|
|
1
|
+
{"version":3,"file":"maybe-tags-panel.d.ts","sourceRoot":"","sources":["../../../src/components/post-publish-panel/maybe-tags-panel.js"],"names":[],"mappings":";AAmCA,sEAyCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/check.js"],"names":[],"mappings":"AAWA;;;;;;;GAOG;AACH,0DAJG;IAA+B,QAAQ,EAA/B,KAAK,CAAC,SAAS;CAEvB,GAAS,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/check.js"],"names":[],"mappings":"AAWA;;;;;;;GAOG;AACH,0DAJG;IAA+B,QAAQ,EAA/B,KAAK,CAAC,SAAS;CAEvB,GAAS,KAAK,CAAC,SAAS,CAmB1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flat-term-selector.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/flat-term-selector.js"],"names":[],"mappings":"AAkEA;;;;;;;;GAQG;AACH,oEALG;IAAuB,IAAI,EAAnB,MAAM;IACS,uBAAuB,EAAtC,OAAO;CAEf,GAAS,KAAK,CAAC,SAAS,CAwP1B;;;;;;;yBAzRW,OAAO;;wJASX,CAAC;4BAGJ,CAAC;;;;kCAOM,OAAO;;6BACJ,CAAC;yBAId,CAAC,iCAGwB,OAAO;+BAEgB,CAAV;0BACY,CAAC,2DACjB,CAAC;0BAAwC,CAAC;iCAA2C,CAAC;iCAA2C,CAAC;wCAEtJ,CAAC;2BAEE,CAAC;kCAET,CAAC;;;;;yBAK4C,OAAO;;wJAI8E,CAAC;4BAS5I,CAAC;;;;kCAMM,OAAO;;6BAC8B,CAAC;
|
|
1
|
+
{"version":3,"file":"flat-term-selector.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/flat-term-selector.js"],"names":[],"mappings":"AAkEA;;;;;;;;GAQG;AACH,oEALG;IAAuB,IAAI,EAAnB,MAAM;IACS,uBAAuB,EAAtC,OAAO;CAEf,GAAS,KAAK,CAAC,SAAS,CAwP1B;;;;;;;yBAzRW,OAAO;;wJASX,CAAC;4BAGJ,CAAC;;;;kCAOM,OAAO;;6BACJ,CAAC;yBAId,CAAC,iCAGwB,OAAO;+BAEgB,CAAV;0BACY,CAAC,2DACjB,CAAC;0BAAwC,CAAC;iCAA2C,CAAC;iCAA2C,CAAC;wCAEtJ,CAAC;2BAEE,CAAC;kCAET,CAAC;;;;;yBAK4C,OAAO;;wJAI8E,CAAC;4BAS5I,CAAC;;;;kCAMM,OAAO;;6BAC8B,CAAC;yBAG1B,CAAA,iCAAiC,OAAO;+BAE7C,CAAC;0BAIR,CAAC,2DAEC,CAAC;0BAIG,CAAC;iCAET,CAAA;iCACA,CAAL;wCAIM,CAAC;2BAGH,CAAC;kCAGkC,CAAC;;yBAG5B,OACV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/index.js"],"names":[],"mappings":"AAgBA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/index.js"],"names":[],"mappings":"AAgBA;;kCAsCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-theme.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/block-theme.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"block-theme.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/block-theme.js"],"names":[],"mappings":"AA2BA;;uCA6IC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classic-theme.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/classic-theme.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"classic-theme.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/classic-theme.js"],"names":[],"mappings":";AAqNA,oEAiCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-new-template-modal.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/create-new-template-modal.js"],"names":[],"mappings":"AAwBA;;
|
|
1
|
+
{"version":3,"file":"create-new-template-modal.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/create-new-template-modal.js"],"names":[],"mappings":"AAwBA;;gCAmIC"}
|
|
@@ -3,6 +3,6 @@ export function useEditedPostContext(): {
|
|
|
3
3
|
postType: string;
|
|
4
4
|
};
|
|
5
5
|
export function useAllowSwitchingTemplates(): boolean;
|
|
6
|
-
export function useAvailableTemplates(postType: any): false | (import("@wordpress/core-data").UnstableBase<any> | import("@wordpress/core-data").Attachment<any> | import("@wordpress/core-data").Comment<any> | import("@wordpress/core-data").GlobalStylesRevision<any> | import("@wordpress/core-data").MenuLocation<any> | import("@wordpress/core-data").NavMenu<any> | import("@wordpress/core-data").NavMenuItem<any> | import("@wordpress/core-data").Page<any> | import("@wordpress/core-data").Plugin<any> | import("@wordpress/core-data").Post<any> | import("@wordpress/core-data").PostStatusObject<any> | import("@wordpress/core-data").PostRevision<any> | import("@wordpress/core-data").Settings<any> | import("@wordpress/core-data").Sidebar<any> | import("@wordpress/core-data").Taxonomy<any> | import("@wordpress/core-data").Theme<any> | import("@wordpress/core-data").User<any> | import("@wordpress/core-data").Type<any> | import("@wordpress/core-data").Widget<any> | import("@wordpress/core-data").WidgetType<any> | import("@wordpress/core-data").WpTemplate<any> | import("@wordpress/core-data").WpTemplatePart<any> | Partial<import("@wordpress/core-data").UnstableBase<any> | import("@wordpress/core-data").Attachment<any> | import("@wordpress/core-data").Comment<any> | import("@wordpress/core-data").GlobalStylesRevision<any> | import("@wordpress/core-data").MenuLocation<any> | import("@wordpress/core-data").NavMenu<any> | import("@wordpress/core-data").NavMenuItem<any> | import("@wordpress/core-data").Page<any> | import("@wordpress/core-data").Plugin<any> | import("@wordpress/core-data").Post<any> | import("@wordpress/core-data").PostStatusObject<any> | import("@wordpress/core-data").PostRevision<any> | import("@wordpress/core-data").Settings<any> | import("@wordpress/core-data").Sidebar<any> | import("@wordpress/core-data").Taxonomy<any> | import("@wordpress/core-data").Theme<any> | import("@wordpress/core-data").User<any> | import("@wordpress/core-data").Type<any> | import("@wordpress/core-data").Widget<any> | import("@wordpress/core-data").WidgetType<any> | import("@wordpress/core-data").WpTemplate<any> | import("@wordpress/core-data").WpTemplatePart<any>>)[] | undefined;
|
|
6
|
+
export function useAvailableTemplates(postType: any): false | (import("@wordpress/core-data").UnstableBase<any> | import("@wordpress/core-data").Attachment<any> | import("@wordpress/core-data").Comment<any> | import("@wordpress/core-data").GlobalStylesRevision<any> | import("@wordpress/core-data").MenuLocation<any> | import("@wordpress/core-data").NavMenu<any> | import("@wordpress/core-data").NavMenuItem<any> | import("@wordpress/core-data").Page<any> | import("@wordpress/core-data").Plugin<any> | import("@wordpress/core-data").Post<any> | import("@wordpress/core-data").PostStatusObject<any> | import("@wordpress/core-data").PostRevision<any> | import("@wordpress/core-data").Settings<any> | import("@wordpress/core-data").Sidebar<any> | import("@wordpress/core-data").Taxonomy<any> | import("@wordpress/core-data").Term<any> | import("@wordpress/core-data").Theme<any> | import("@wordpress/core-data").User<any> | import("@wordpress/core-data").Type<any> | import("@wordpress/core-data").Widget<any> | import("@wordpress/core-data").WidgetType<any> | import("@wordpress/core-data").WpTemplate<any> | import("@wordpress/core-data").WpTemplatePart<any> | Partial<import("@wordpress/core-data").UnstableBase<any> | import("@wordpress/core-data").Attachment<any> | import("@wordpress/core-data").Comment<any> | import("@wordpress/core-data").GlobalStylesRevision<any> | import("@wordpress/core-data").MenuLocation<any> | import("@wordpress/core-data").NavMenu<any> | import("@wordpress/core-data").NavMenuItem<any> | import("@wordpress/core-data").Page<any> | import("@wordpress/core-data").Plugin<any> | import("@wordpress/core-data").Post<any> | import("@wordpress/core-data").PostStatusObject<any> | import("@wordpress/core-data").PostRevision<any> | import("@wordpress/core-data").Settings<any> | import("@wordpress/core-data").Sidebar<any> | import("@wordpress/core-data").Taxonomy<any> | import("@wordpress/core-data").Term<any> | import("@wordpress/core-data").Theme<any> | import("@wordpress/core-data").User<any> | import("@wordpress/core-data").Type<any> | import("@wordpress/core-data").Widget<any> | import("@wordpress/core-data").WidgetType<any> | import("@wordpress/core-data").WpTemplate<any> | import("@wordpress/core-data").WpTemplatePart<any>>)[] | undefined;
|
|
7
7
|
export function useCurrentTemplateSlug(): any;
|
|
8
8
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/hooks.js"],"names":[],"mappings":"AAYA;;;EAQC;AACD,sDA0BC;AAaD,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/hooks.js"],"names":[],"mappings":"AAYA;;;EAQC;AACD,sDA0BC;AAaD,yuEAeC;AAED,8CAuBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/panel.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/panel.js"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,6CAFY,KAAK,CAAC,SAAS,CAwD1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-visibility.d.ts","sourceRoot":"","sources":["../../../src/components/preferences-modal/block-visibility.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"block-visibility.d.ts","sourceRoot":"","sources":["../../../src/components/preferences-modal/block-visibility.js"],"names":[],"mappings":"AAkBA,uEA8EC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/preview-dropdown/index.js"],"names":[],"mappings":"AAgCA;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/preview-dropdown/index.js"],"names":[],"mappings":"AAgCA;;;uCAwKC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/provider/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/provider/index.js"],"names":[],"mappings":"AAoYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,sCArBG;IAAgC,IAAI;IACJ,kBAAkB;IAElB,QAAQ;IAER,QAAQ,GAAhC,KAAK,CAAC,SAAS;CAGvB,GAWS,KAAK,CAAC,SAAS,CAW1B;AA1SD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,4GAuOE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/start-page-options/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/start-page-options/index.js"],"names":[],"mappings":"AAqBA,wCA0CC;AA8ED,+EA0CC"}
|
|
@@ -34,4 +34,8 @@ export function revertTemplate(template: Object, { allowUndo }?: {
|
|
|
34
34
|
export function removeTemplates(items: any[]): ({ registry }: {
|
|
35
35
|
registry: any;
|
|
36
36
|
}) => Promise<void>;
|
|
37
|
+
export function setDefaultRenderingMode(mode: string): ({ select, registry }: {
|
|
38
|
+
select: any;
|
|
39
|
+
registry: any;
|
|
40
|
+
}) => void;
|
|
37
41
|
//# sourceMappingURL=private-actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../src/store/private-actions.js"],"names":[],"mappings":"AAmBA;;;;;;GAMG;AACH,yCAJW,MAAM,GAEL,MAAM,CAOjB;;AAOM,yCAFK,MAAM,OAAA;;;;mBAqChB;AAOK,2CAFI,MAAM,EAAE;;WAoBjB;AAOK,2CAFI,MAAM,EAAE;;WAkBjB;AAWK,0FALJ;IAA2B,MAAM;IACN,kBAAkB;IAClB,cAAc;IACd,KAAK;CAClC;;WAmGC;AAUK,yCALI,MAAM,kBAEd;IAA0B,SAAS;CAErC;;oBA6HC;AAOK;;oBA0HL"}
|
|
1
|
+
{"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../src/store/private-actions.js"],"names":[],"mappings":"AAmBA;;;;;;GAMG;AACH,yCAJW,MAAM,GAEL,MAAM,CAOjB;;AAOM,yCAFK,MAAM,OAAA;;;;mBAqChB;AAOK,2CAFI,MAAM,EAAE;;WAoBjB;AAOK,2CAFI,MAAM,EAAE;;WAkBjB;AAWK,0FALJ;IAA2B,MAAM;IACN,kBAAkB;IAClB,cAAc;IACd,KAAK;CAClC;;WAmGC;AAUK,yCALI,MAAM,kBAEd;IAA0B,SAAS;CAErC;;oBA6HC;AAOK;;oBA0HL;AAOK,8CAFI,MAAM;;;WA4Bf"}
|
|
@@ -49,4 +49,17 @@ export const getPostBlocksByName: {
|
|
|
49
49
|
isRegistrySelector?: boolean;
|
|
50
50
|
registry?: any;
|
|
51
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* Returns the default rendering mode for a post type by user preference or post type configuration.
|
|
54
|
+
*
|
|
55
|
+
* @param {Object} state Global application state.
|
|
56
|
+
* @param {string} postType The post type.
|
|
57
|
+
*
|
|
58
|
+
* @return {string} The default rendering mode. Returns `undefined` while resolving value.
|
|
59
|
+
*/
|
|
60
|
+
export const getDefaultRenderingMode: {
|
|
61
|
+
(state?: any, postType?: any): any;
|
|
62
|
+
isRegistrySelector?: boolean;
|
|
63
|
+
registry?: any;
|
|
64
|
+
};
|
|
52
65
|
//# sourceMappingURL=private-selectors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-selectors.d.ts","sourceRoot":"","sources":["../../src/store/private-selectors.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"private-selectors.d.ts","sourceRoot":"","sources":["../../src/store/private-selectors.js"],"names":[],"mappings":"AAsFA,sDAEC;AACD,6DAEC;AAwFD,2GAEC;AAED,mEAEC;AAED,yGAEC;AAnJD;;;;;;GAMG;AACH;;;;EAmCE;AAeF;;;;EAuCE;AAEF;;;;;;;;;GASG;AACH;;;;EA2BE;AAcF;;;;;;;;GAQG;AACH;;;;EAsBE;AAEF;;;;;;;GAOG;AACH;;;;EAyCE"}
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* @param {Function} $0.onError Function called when an error happens.
|
|
11
11
|
* @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.
|
|
12
12
|
* @param {Function} $0.onSuccess Function called after the final representation of the file is available.
|
|
13
|
+
* @param {boolean} $0.multiple Whether to allow multiple files to be uploaded.
|
|
13
14
|
*/
|
|
14
|
-
export default function mediaUpload({ additionalData, allowedTypes, filesList, maxUploadFileSize, onError, onFileChange, onSuccess, }: {
|
|
15
|
+
export default function mediaUpload({ additionalData, allowedTypes, filesList, maxUploadFileSize, onError, onFileChange, onSuccess, multiple, }: {
|
|
15
16
|
additionalData: Object | null;
|
|
16
17
|
allowedTypes: string;
|
|
17
18
|
filesList: any[];
|
|
@@ -19,5 +20,6 @@ export default function mediaUpload({ additionalData, allowedTypes, filesList, m
|
|
|
19
20
|
onError: Function;
|
|
20
21
|
onFileChange: Function;
|
|
21
22
|
onSuccess: Function;
|
|
23
|
+
multiple: boolean;
|
|
22
24
|
}): void;
|
|
23
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/media-upload/index.js"],"names":[],"mappings":"AAkBA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/media-upload/index.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;GAaG;AACH,iJATG;IAAqB,cAAc,EAA1B,MAAM,OAAA;IACM,YAAY,EAAzB,MAAM;IACO,SAAS;IACT,iBAAiB,EAA7B,MAAM,OAAA;IACM,OAAO;IACP,YAAY;IACZ,SAAS;IACT,QAAQ,EAArB,OAAO;CACjB,QAmEA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.19.0",
|
|
4
4
|
"description": "Enhanced block editor for WordPress posts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -34,41 +34,41 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/runtime": "7.25.7",
|
|
37
|
-
"@wordpress/a11y": "^4.
|
|
38
|
-
"@wordpress/api-fetch": "^7.
|
|
39
|
-
"@wordpress/blob": "^4.
|
|
40
|
-
"@wordpress/block-editor": "^14.
|
|
41
|
-
"@wordpress/blocks": "^14.
|
|
42
|
-
"@wordpress/commands": "^1.
|
|
43
|
-
"@wordpress/components": "^29.
|
|
44
|
-
"@wordpress/compose": "^7.
|
|
45
|
-
"@wordpress/core-data": "^7.
|
|
46
|
-
"@wordpress/data": "^10.
|
|
47
|
-
"@wordpress/dataviews": "^4.
|
|
48
|
-
"@wordpress/date": "^5.
|
|
49
|
-
"@wordpress/deprecated": "^4.
|
|
50
|
-
"@wordpress/dom": "^4.
|
|
51
|
-
"@wordpress/element": "^6.
|
|
52
|
-
"@wordpress/fields": "^0.
|
|
53
|
-
"@wordpress/hooks": "^4.
|
|
54
|
-
"@wordpress/html-entities": "^4.
|
|
55
|
-
"@wordpress/i18n": "^5.
|
|
56
|
-
"@wordpress/icons": "^10.
|
|
57
|
-
"@wordpress/interface": "^9.
|
|
58
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
59
|
-
"@wordpress/keycodes": "^4.
|
|
60
|
-
"@wordpress/media-utils": "^5.
|
|
61
|
-
"@wordpress/notices": "^5.
|
|
62
|
-
"@wordpress/patterns": "^2.
|
|
63
|
-
"@wordpress/plugins": "^7.
|
|
64
|
-
"@wordpress/preferences": "^4.
|
|
65
|
-
"@wordpress/private-apis": "^1.
|
|
66
|
-
"@wordpress/reusable-blocks": "^5.
|
|
67
|
-
"@wordpress/rich-text": "^7.
|
|
68
|
-
"@wordpress/server-side-render": "^5.
|
|
69
|
-
"@wordpress/url": "^4.
|
|
70
|
-
"@wordpress/warning": "^3.
|
|
71
|
-
"@wordpress/wordcount": "^4.
|
|
37
|
+
"@wordpress/a11y": "^4.19.0",
|
|
38
|
+
"@wordpress/api-fetch": "^7.19.0",
|
|
39
|
+
"@wordpress/blob": "^4.19.0",
|
|
40
|
+
"@wordpress/block-editor": "^14.14.0",
|
|
41
|
+
"@wordpress/blocks": "^14.8.0",
|
|
42
|
+
"@wordpress/commands": "^1.19.0",
|
|
43
|
+
"@wordpress/components": "^29.5.0",
|
|
44
|
+
"@wordpress/compose": "^7.19.0",
|
|
45
|
+
"@wordpress/core-data": "^7.19.0",
|
|
46
|
+
"@wordpress/data": "^10.19.0",
|
|
47
|
+
"@wordpress/dataviews": "^4.15.0",
|
|
48
|
+
"@wordpress/date": "^5.19.0",
|
|
49
|
+
"@wordpress/deprecated": "^4.19.0",
|
|
50
|
+
"@wordpress/dom": "^4.19.0",
|
|
51
|
+
"@wordpress/element": "^6.19.0",
|
|
52
|
+
"@wordpress/fields": "^0.11.0",
|
|
53
|
+
"@wordpress/hooks": "^4.19.0",
|
|
54
|
+
"@wordpress/html-entities": "^4.19.0",
|
|
55
|
+
"@wordpress/i18n": "^5.19.0",
|
|
56
|
+
"@wordpress/icons": "^10.19.0",
|
|
57
|
+
"@wordpress/interface": "^9.4.0",
|
|
58
|
+
"@wordpress/keyboard-shortcuts": "^5.19.0",
|
|
59
|
+
"@wordpress/keycodes": "^4.19.0",
|
|
60
|
+
"@wordpress/media-utils": "^5.19.0",
|
|
61
|
+
"@wordpress/notices": "^5.19.0",
|
|
62
|
+
"@wordpress/patterns": "^2.19.0",
|
|
63
|
+
"@wordpress/plugins": "^7.19.0",
|
|
64
|
+
"@wordpress/preferences": "^4.19.0",
|
|
65
|
+
"@wordpress/private-apis": "^1.19.0",
|
|
66
|
+
"@wordpress/reusable-blocks": "^5.19.0",
|
|
67
|
+
"@wordpress/rich-text": "^7.19.0",
|
|
68
|
+
"@wordpress/server-side-render": "^5.19.0",
|
|
69
|
+
"@wordpress/url": "^4.19.0",
|
|
70
|
+
"@wordpress/warning": "^3.19.0",
|
|
71
|
+
"@wordpress/wordcount": "^4.19.0",
|
|
72
72
|
"change-case": "^4.1.2",
|
|
73
73
|
"client-zip": "^2.4.5",
|
|
74
74
|
"clsx": "^2.1.1",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "d6b0b20fa927b110140dc7fdd906a7e0bf662004"
|
|
92
92
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
6
|
-
import { useRef } from '@wordpress/element';
|
|
6
|
+
import { useRef, useMemo } from '@wordpress/element';
|
|
7
7
|
import { create, getTextContent } from '@wordpress/rich-text';
|
|
8
8
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
9
9
|
import { store as coreStore } from '@wordpress/core-data';
|
|
@@ -83,16 +83,13 @@ function EmptyOutlineIllustration() {
|
|
|
83
83
|
* @return {Array} An array of heading blocks enhanced with the properties described above.
|
|
84
84
|
*/
|
|
85
85
|
const computeOutlineHeadings = ( blocks = [] ) => {
|
|
86
|
-
return blocks
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
return computeOutlineHeadings( block.innerBlocks );
|
|
95
|
-
} );
|
|
86
|
+
return blocks
|
|
87
|
+
.filter( ( block ) => block.name === 'core/heading' )
|
|
88
|
+
.map( ( block ) => ( {
|
|
89
|
+
...block,
|
|
90
|
+
level: block.attributes.level,
|
|
91
|
+
isEmpty: isEmptyHeading( block ),
|
|
92
|
+
} ) );
|
|
96
93
|
};
|
|
97
94
|
|
|
98
95
|
const isEmptyHeading = ( heading ) =>
|
|
@@ -113,22 +110,31 @@ export default function DocumentOutline( {
|
|
|
113
110
|
hasOutlineItemsDisabled,
|
|
114
111
|
} ) {
|
|
115
112
|
const { selectBlock } = useDispatch( blockEditorStore );
|
|
116
|
-
const {
|
|
117
|
-
const { getBlocks } = select( blockEditorStore );
|
|
113
|
+
const { title, isTitleSupported } = useSelect( ( select ) => {
|
|
118
114
|
const { getEditedPostAttribute } = select( editorStore );
|
|
119
115
|
const { getPostType } = select( coreStore );
|
|
120
116
|
const postType = getPostType( getEditedPostAttribute( 'type' ) );
|
|
121
|
-
|
|
122
117
|
return {
|
|
123
118
|
title: getEditedPostAttribute( 'title' ),
|
|
124
|
-
blocks: getBlocks(),
|
|
125
119
|
isTitleSupported: postType?.supports?.title ?? false,
|
|
126
120
|
};
|
|
127
121
|
} );
|
|
122
|
+
const blocks = useSelect( ( select ) => {
|
|
123
|
+
const { getClientIdsWithDescendants, getBlock } =
|
|
124
|
+
select( blockEditorStore );
|
|
125
|
+
const clientIds = getClientIdsWithDescendants();
|
|
126
|
+
// Note: Don't modify data inside the `Array.map` callback,
|
|
127
|
+
// all compulations should happen in `computeOutlineHeadings`.
|
|
128
|
+
return clientIds.map( ( id ) => getBlock( id ) );
|
|
129
|
+
} );
|
|
128
130
|
|
|
129
131
|
const prevHeadingLevelRef = useRef( 1 );
|
|
130
132
|
|
|
131
|
-
const headings =
|
|
133
|
+
const headings = useMemo(
|
|
134
|
+
() => computeOutlineHeadings( blocks ),
|
|
135
|
+
[ blocks ]
|
|
136
|
+
);
|
|
137
|
+
|
|
132
138
|
if ( headings.length < 1 ) {
|
|
133
139
|
return (
|
|
134
140
|
<div className="editor-document-outline has-no-headings">
|