@wordpress/editor 14.34.0 → 14.35.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 +2 -0
- package/README.md +1 -1
- package/build/bindings/api.js +2 -0
- package/build/bindings/api.js.map +1 -1
- package/build/bindings/pattern-overrides.js +3 -1
- package/build/bindings/pattern-overrides.js.map +1 -1
- package/build/bindings/post-data.js +50 -64
- package/build/bindings/post-data.js.map +3 -3
- package/build/bindings/post-meta.js +47 -39
- package/build/bindings/post-meta.js.map +2 -2
- package/build/bindings/term-data.js +3 -1
- package/build/bindings/term-data.js.map +1 -1
- package/build/components/autocompleters/index.js +2 -0
- package/build/components/autocompleters/index.js.map +1 -1
- package/build/components/autocompleters/user.js +3 -1
- package/build/components/autocompleters/user.js.map +1 -1
- package/build/components/autosave-monitor/index.js +4 -2
- package/build/components/autosave-monitor/index.js.map +1 -1
- package/build/components/block-removal-warnings/index.js +6 -4
- package/build/components/block-removal-warnings/index.js.map +1 -1
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +6 -4
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build/components/block-visibility/index.js +5 -3
- package/build/components/block-visibility/index.js.map +1 -1
- package/build/components/blog-title/index.js +4 -2
- package/build/components/blog-title/index.js.map +1 -1
- package/build/components/character-count/index.js +2 -0
- package/build/components/character-count/index.js.map +1 -1
- package/build/components/collab-sidebar/add-comment.js +21 -17
- package/build/components/collab-sidebar/add-comment.js.map +2 -2
- package/build/components/collab-sidebar/comment-author-info.js +4 -2
- package/build/components/collab-sidebar/comment-author-info.js.map +2 -2
- package/build/components/collab-sidebar/comment-form.js +17 -6
- package/build/components/collab-sidebar/comment-form.js.map +2 -2
- package/build/components/collab-sidebar/comment-indicator-toolbar.js +14 -26
- package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +3 -3
- package/build/components/collab-sidebar/comment-menu-item.js +40 -8
- package/build/components/collab-sidebar/comment-menu-item.js.map +3 -3
- package/build/components/collab-sidebar/comments.js +386 -325
- package/build/components/collab-sidebar/comments.js.map +3 -3
- package/build/components/collab-sidebar/constants.js +5 -3
- package/build/components/collab-sidebar/constants.js.map +1 -1
- package/build/components/collab-sidebar/hooks.js +8 -4
- package/build/components/collab-sidebar/hooks.js.map +2 -2
- package/build/components/collab-sidebar/index.js +53 -27
- package/build/components/collab-sidebar/index.js.map +3 -3
- package/build/components/collab-sidebar/utils.js +4 -2
- package/build/components/collab-sidebar/utils.js.map +2 -2
- package/build/components/collapsible-block-toolbar/index.js +4 -2
- package/build/components/collapsible-block-toolbar/index.js.map +1 -1
- package/build/components/commands/index.js +22 -8
- package/build/components/commands/index.js.map +2 -2
- package/build/components/deprecated.js +55 -53
- package/build/components/deprecated.js.map +1 -1
- package/build/components/document-bar/index.js +4 -2
- package/build/components/document-bar/index.js.map +1 -1
- package/build/components/document-outline/check.js +2 -0
- package/build/components/document-outline/check.js.map +1 -1
- package/build/components/document-outline/index.js +9 -7
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/document-outline/item.js +4 -2
- package/build/components/document-outline/item.js.map +1 -1
- package/build/components/document-tools/index.js +3 -1
- package/build/components/document-tools/index.js.map +1 -1
- package/build/components/editor/index.js +14 -4
- package/build/components/editor/index.js.map +3 -3
- package/build/components/editor-history/redo.js +3 -1
- package/build/components/editor-history/redo.js.map +1 -1
- package/build/components/editor-history/undo.js +3 -1
- package/build/components/editor-history/undo.js.map +1 -1
- package/build/components/editor-interface/index.js +4 -2
- package/build/components/editor-interface/index.js.map +1 -1
- package/build/components/editor-notices/index.js +3 -1
- package/build/components/editor-notices/index.js.map +1 -1
- package/build/components/editor-snackbars/index.js +4 -2
- package/build/components/editor-snackbars/index.js.map +1 -1
- package/build/components/entities-saved-states/entity-record-item.js +3 -1
- package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build/components/entities-saved-states/entity-type-list.js +3 -1
- package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build/components/entities-saved-states/hooks/use-is-dirty.js +3 -1
- package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
- package/build/components/entities-saved-states/index.js +3 -1
- package/build/components/entities-saved-states/index.js.map +2 -2
- package/build/components/error-boundary/index.js +5 -3
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/index.js +2 -0
- package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js +3 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build/components/global-styles/block-link.js +2 -0
- package/build/components/global-styles/block-link.js.map +1 -1
- package/build/components/global-styles/header.js +3 -1
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/hooks.js +3 -1
- package/build/components/global-styles/hooks.js.map +2 -2
- package/build/components/global-styles/index.js +3 -1
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/menu.js +3 -1
- package/build/components/global-styles/menu.js.map +1 -1
- package/build/components/global-styles-provider/index.js +3 -1
- package/build/components/global-styles-provider/index.js.map +1 -1
- package/build/components/global-styles-renderer/index.js +2 -0
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/global-styles-sidebar/default-sidebar.js +3 -1
- package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -1
- package/build/components/global-styles-sidebar/index.js +3 -1
- package/build/components/global-styles-sidebar/index.js.map +1 -1
- package/build/components/global-styles-sidebar/welcome-guide-image.js +2 -0
- package/build/components/global-styles-sidebar/welcome-guide-image.js.map +1 -1
- package/build/components/global-styles-sidebar/welcome-guide.js +3 -1
- package/build/components/global-styles-sidebar/welcome-guide.js.map +1 -1
- package/build/components/header/back-button.js +8 -6
- package/build/components/header/back-button.js.map +1 -1
- package/build/components/header/index.js +5 -3
- package/build/components/header/index.js.map +1 -1
- package/build/components/index.js +4 -2
- package/build/components/index.js.map +2 -2
- package/build/components/inserter-sidebar/index.js +4 -2
- package/build/components/inserter-sidebar/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +3 -1
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +7 -5
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +3 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/list-view-sidebar/index.js +4 -2
- package/build/components/list-view-sidebar/index.js.map +1 -1
- package/build/components/list-view-sidebar/list-view-outline.js +3 -1
- package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
- package/build/components/local-autosave-monitor/index.js +6 -4
- package/build/components/local-autosave-monitor/index.js.map +1 -1
- package/build/components/media-categories/index.js +8 -6
- package/build/components/media-categories/index.js.map +1 -1
- package/build/components/mode-switcher/index.js +4 -2
- package/build/components/mode-switcher/index.js.map +1 -1
- package/build/components/more-menu/copy-content-menu-item.js +3 -1
- package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
- package/build/components/more-menu/index.js +4 -2
- package/build/components/more-menu/index.js.map +2 -2
- package/build/components/more-menu/tools-more-menu-group.js +4 -2
- package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build/components/more-menu/view-more-menu-group.js +4 -2
- package/build/components/more-menu/view-more-menu-group.js.map +1 -1
- package/build/components/page-attributes/check.js +2 -0
- package/build/components/page-attributes/check.js.map +1 -1
- package/build/components/page-attributes/order.js +3 -1
- package/build/components/page-attributes/order.js.map +1 -1
- package/build/components/page-attributes/panel.js +4 -2
- package/build/components/page-attributes/panel.js.map +1 -1
- package/build/components/page-attributes/parent.js +4 -2
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/pattern-duplicate-modal/index.js +5 -3
- package/build/components/pattern-duplicate-modal/index.js.map +1 -1
- package/build/components/pattern-overrides-panel/index.js +4 -2
- package/build/components/pattern-overrides-panel/index.js.map +1 -1
- package/build/components/pattern-rename-modal/index.js +5 -3
- package/build/components/pattern-rename-modal/index.js.map +1 -1
- package/build/components/plugin-document-setting-panel/index.js +5 -3
- package/build/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build/components/plugin-more-menu-item/index.js +3 -1
- package/build/components/plugin-more-menu-item/index.js.map +1 -1
- package/build/components/plugin-post-publish-panel/index.js +5 -3
- package/build/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build/components/plugin-post-status-info/index.js +5 -3
- package/build/components/plugin-post-status-info/index.js.map +1 -1
- package/build/components/plugin-pre-publish-panel/index.js +5 -3
- package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build/components/plugin-preview-menu-item/index.js +3 -1
- package/build/components/plugin-preview-menu-item/index.js.map +1 -1
- package/build/components/plugin-sidebar/index.js +3 -1
- package/build/components/plugin-sidebar/index.js.map +1 -1
- package/build/components/plugin-sidebar-more-menu-item/index.js +3 -1
- package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build/components/post-actions/actions.js +3 -1
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-actions/index.js +4 -2
- package/build/components/post-actions/index.js.map +1 -1
- package/build/components/post-actions/set-as-homepage.js +5 -3
- package/build/components/post-actions/set-as-homepage.js.map +1 -1
- package/build/components/post-actions/set-as-posts-page.js +5 -3
- package/build/components/post-actions/set-as-posts-page.js.map +1 -1
- package/build/components/post-author/check.js +3 -1
- package/build/components/post-author/check.js.map +1 -1
- package/build/components/post-author/combobox.js +3 -1
- package/build/components/post-author/combobox.js.map +1 -1
- package/build/components/post-author/constants.js +4 -2
- package/build/components/post-author/constants.js.map +1 -1
- package/build/components/post-author/hook.js +2 -0
- package/build/components/post-author/hook.js.map +1 -1
- package/build/components/post-author/index.js +4 -2
- package/build/components/post-author/index.js.map +1 -1
- package/build/components/post-author/panel.js +3 -1
- package/build/components/post-author/panel.js.map +1 -1
- package/build/components/post-author/select.js +3 -1
- package/build/components/post-author/select.js.map +1 -1
- package/build/components/post-card-panel/index.js +4 -2
- package/build/components/post-card-panel/index.js.map +1 -1
- package/build/components/post-comments/index.js +4 -2
- package/build/components/post-comments/index.js.map +1 -1
- package/build/components/post-content-information/index.js +4 -2
- package/build/components/post-content-information/index.js.map +1 -1
- package/build/components/post-discussion/panel.js +4 -2
- package/build/components/post-discussion/panel.js.map +1 -1
- package/build/components/post-excerpt/check.js +3 -1
- package/build/components/post-excerpt/check.js.map +1 -1
- package/build/components/post-excerpt/index.js +3 -1
- package/build/components/post-excerpt/index.js.map +1 -1
- package/build/components/post-excerpt/panel.js +4 -2
- package/build/components/post-excerpt/panel.js.map +1 -1
- package/build/components/post-excerpt/plugin.js +5 -3
- package/build/components/post-excerpt/plugin.js.map +1 -1
- package/build/components/post-featured-image/check.js +3 -1
- package/build/components/post-featured-image/check.js.map +1 -1
- package/build/components/post-featured-image/index.js +10 -8
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-featured-image/panel.js +4 -2
- package/build/components/post-featured-image/panel.js.map +1 -1
- package/build/components/post-fields/index.js +2 -0
- package/build/components/post-fields/index.js.map +1 -1
- package/build/components/post-format/check.js +3 -1
- package/build/components/post-format/check.js.map +1 -1
- package/build/components/post-format/index.js +4 -2
- package/build/components/post-format/index.js.map +1 -1
- package/build/components/post-format/panel.js +3 -1
- package/build/components/post-format/panel.js.map +1 -1
- package/build/components/post-last-edited-panel/index.js +3 -1
- package/build/components/post-last-edited-panel/index.js.map +1 -1
- package/build/components/post-last-revision/check.js +3 -1
- package/build/components/post-last-revision/check.js.map +1 -1
- package/build/components/post-last-revision/index.js +3 -1
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-last-revision/panel.js +3 -1
- package/build/components/post-last-revision/panel.js.map +1 -1
- package/build/components/post-locked-modal/index.js +3 -1
- package/build/components/post-locked-modal/index.js.map +1 -1
- package/build/components/post-panel-row/index.js +4 -2
- package/build/components/post-panel-row/index.js.map +1 -1
- package/build/components/post-panel-section/index.js +3 -1
- package/build/components/post-panel-section/index.js.map +1 -1
- package/build/components/post-pending-status/check.js +2 -0
- package/build/components/post-pending-status/check.js.map +1 -1
- package/build/components/post-pending-status/index.js +3 -1
- package/build/components/post-pending-status/index.js.map +1 -1
- package/build/components/post-pingbacks/index.js +3 -1
- package/build/components/post-pingbacks/index.js.map +1 -1
- package/build/components/post-preview-button/index.js +3 -1
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-button/index.js +6 -4
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-publish-button/label.js +2 -0
- package/build/components/post-publish-button/label.js.map +1 -1
- package/build/components/post-publish-button/post-publish-button-or-toggle.js +5 -3
- package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
- package/build/components/post-publish-panel/index.js +5 -3
- package/build/components/post-publish-panel/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-category-panel.js +3 -1
- package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js +5 -3
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js +5 -3
- package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.js +3 -1
- package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build/components/post-publish-panel/media-util.js +2 -0
- package/build/components/post-publish-panel/media-util.js.map +1 -1
- package/build/components/post-publish-panel/postpublish.js +6 -4
- package/build/components/post-publish-panel/postpublish.js.map +1 -1
- package/build/components/post-publish-panel/prepublish.js +3 -1
- package/build/components/post-publish-panel/prepublish.js.map +1 -1
- package/build/components/post-saved-state/index.js +3 -1
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-schedule/check.js +2 -0
- package/build/components/post-schedule/check.js.map +1 -1
- package/build/components/post-schedule/index.js +4 -2
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-schedule/label.js +2 -0
- package/build/components/post-schedule/label.js.map +1 -1
- package/build/components/post-schedule/panel.js +4 -2
- package/build/components/post-schedule/panel.js.map +1 -1
- package/build/components/post-status/index.js +6 -4
- package/build/components/post-status/index.js.map +1 -1
- package/build/components/post-sticky/check.js +2 -0
- package/build/components/post-sticky/check.js.map +1 -1
- package/build/components/post-sticky/index.js +3 -1
- package/build/components/post-sticky/index.js.map +1 -1
- package/build/components/post-sticky/panel.js +3 -1
- package/build/components/post-sticky/panel.js.map +1 -1
- package/build/components/post-switch-to-draft-button/index.js +3 -1
- package/build/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build/components/post-sync-status/index.js +3 -1
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build/components/post-taxonomies/check.js +2 -0
- package/build/components/post-taxonomies/check.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +9 -7
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +8 -6
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/index.js +4 -2
- package/build/components/post-taxonomies/index.js.map +1 -1
- package/build/components/post-taxonomies/most-used-terms.js +5 -3
- package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build/components/post-taxonomies/panel.js +3 -1
- package/build/components/post-taxonomies/panel.js.map +1 -1
- package/build/components/post-template/block-theme.js +3 -1
- package/build/components/post-template/block-theme.js.map +1 -1
- package/build/components/post-template/classic-theme.js +3 -1
- package/build/components/post-template/classic-theme.js.map +1 -1
- package/build/components/post-template/create-new-template-modal.js +4 -2
- package/build/components/post-template/create-new-template-modal.js.map +1 -1
- package/build/components/post-template/create-new-template.js +3 -1
- package/build/components/post-template/create-new-template.js.map +1 -1
- package/build/components/post-template/hooks.js +2 -0
- package/build/components/post-template/hooks.js.map +1 -1
- package/build/components/post-template/panel.js +12 -7
- package/build/components/post-template/panel.js.map +2 -2
- package/build/components/post-template/reset-default-template.js +3 -1
- package/build/components/post-template/reset-default-template.js.map +1 -1
- package/build/components/post-template/swap-template-button.js +3 -1
- package/build/components/post-template/swap-template-button.js.map +1 -1
- package/build/components/post-text-editor/index.js +3 -1
- package/build/components/post-text-editor/index.js.map +1 -1
- package/build/components/post-title/constants.js +4 -2
- package/build/components/post-title/constants.js.map +1 -1
- package/build/components/post-title/index.js +25 -14
- package/build/components/post-title/index.js.map +2 -2
- package/build/components/post-title/post-title-raw.js +3 -1
- package/build/components/post-title/post-title-raw.js.map +1 -1
- package/build/components/post-title/use-post-title-focus.js +2 -0
- package/build/components/post-title/use-post-title-focus.js.map +1 -1
- package/build/components/post-title/use-post-title.js +2 -0
- package/build/components/post-title/use-post-title.js.map +1 -1
- package/build/components/post-transform-panel/hooks.js +3 -1
- package/build/components/post-transform-panel/hooks.js.map +1 -1
- package/build/components/post-transform-panel/index.js +3 -1
- package/build/components/post-transform-panel/index.js.map +1 -1
- package/build/components/post-trash/check.js +2 -0
- package/build/components/post-trash/check.js.map +1 -1
- package/build/components/post-trash/index.js +3 -1
- package/build/components/post-trash/index.js.map +1 -1
- package/build/components/post-type-support-check/index.js +2 -0
- package/build/components/post-type-support-check/index.js.map +1 -1
- package/build/components/post-url/check.js +2 -0
- package/build/components/post-url/check.js.map +1 -1
- package/build/components/post-url/index.js +3 -1
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/post-url/label.js +2 -0
- package/build/components/post-url/label.js.map +1 -1
- package/build/components/post-url/panel.js +3 -1
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/post-view-link/index.js +3 -1
- package/build/components/post-view-link/index.js.map +1 -1
- package/build/components/post-visibility/check.js +2 -0
- package/build/components/post-visibility/check.js.map +1 -1
- package/build/components/post-visibility/index.js +3 -1
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/post-visibility/label.js +2 -0
- package/build/components/post-visibility/label.js.map +1 -1
- package/build/components/post-visibility/utils.js +3 -1
- package/build/components/post-visibility/utils.js.map +1 -1
- package/build/components/posts-per-page/index.js +3 -1
- package/build/components/posts-per-page/index.js.map +1 -1
- package/build/components/preferences-modal/enable-panel.js +4 -2
- package/build/components/preferences-modal/enable-panel.js.map +1 -1
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +5 -3
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
- package/build/components/preferences-modal/enable-publish-sidebar.js +4 -2
- package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
- package/build/components/preferences-modal/index.js +5 -3
- package/build/components/preferences-modal/index.js.map +2 -2
- package/build/components/preview-dropdown/index.js +3 -1
- package/build/components/preview-dropdown/index.js.map +1 -1
- package/build/components/provider/disable-non-page-content-blocks.js +2 -0
- package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build/components/provider/index.js +8 -6
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/navigation-block-editing-mode.js +2 -0
- package/build/components/provider/navigation-block-editing-mode.js.map +1 -1
- package/build/components/provider/use-auto-switch-editor-sidebars.js +2 -0
- package/build/components/provider/use-auto-switch-editor-sidebars.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +5 -3
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/provider/use-hide-blocks-from-inserter.js +3 -1
- package/build/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
- package/build/components/provider/use-post-content-blocks.js +3 -1
- package/build/components/provider/use-post-content-blocks.js.map +1 -1
- package/build/components/provider/with-registry-provider.js +4 -2
- package/build/components/provider/with-registry-provider.js.map +1 -1
- package/build/components/resizable-editor/index.js +4 -2
- package/build/components/resizable-editor/index.js.map +1 -1
- package/build/components/resizable-editor/resize-handle.js +4 -2
- package/build/components/resizable-editor/resize-handle.js.map +1 -1
- package/build/components/save-publish-panels/index.js +5 -3
- package/build/components/save-publish-panels/index.js.map +1 -1
- package/build/components/sidebar/constants.js +3 -1
- package/build/components/sidebar/constants.js.map +1 -1
- package/build/components/sidebar/header.js +5 -3
- package/build/components/sidebar/header.js.map +1 -1
- package/build/components/sidebar/index.js +7 -5
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar/post-summary.js +4 -2
- package/build/components/sidebar/post-summary.js.map +1 -1
- package/build/components/site-discussion/index.js +4 -2
- package/build/components/site-discussion/index.js.map +1 -1
- package/build/components/start-page-options/index.js +7 -6
- package/build/components/start-page-options/index.js.map +2 -2
- package/build/components/start-template-options/index.js +3 -1
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/style-book/categories.js +2 -0
- package/build/components/style-book/categories.js.map +1 -1
- package/build/components/style-book/color-examples.js +4 -2
- package/build/components/style-book/color-examples.js.map +1 -1
- package/build/components/style-book/constants.js +9 -7
- package/build/components/style-book/constants.js.map +1 -1
- package/build/components/style-book/duotone-examples.js +4 -2
- package/build/components/style-book/duotone-examples.js.map +1 -1
- package/build/components/style-book/examples.js +3 -1
- package/build/components/style-book/examples.js.map +1 -1
- package/build/components/style-book/index.js +13 -11
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/style-book/types.js +2 -0
- package/build/components/style-book/types.js.map +1 -1
- package/build/components/styles-canvas/index.js +3 -1
- package/build/components/styles-canvas/index.js.map +1 -1
- package/build/components/styles-canvas/revisions.js +4 -2
- package/build/components/styles-canvas/revisions.js.map +1 -1
- package/build/components/styles-canvas/style-book.js +3 -1
- package/build/components/styles-canvas/style-book.js.map +1 -1
- package/build/components/table-of-contents/index.js +3 -1
- package/build/components/table-of-contents/index.js.map +1 -1
- package/build/components/table-of-contents/panel.js +3 -1
- package/build/components/table-of-contents/panel.js.map +1 -1
- package/build/components/template-content-panel/index.js +6 -4
- package/build/components/template-content-panel/index.js.map +1 -1
- package/build/components/template-part-content-panel/index.js +4 -2
- package/build/components/template-part-content-panel/index.js.map +1 -1
- package/build/components/template-part-menu-items/convert-to-regular.js +3 -1
- package/build/components/template-part-menu-items/convert-to-regular.js.map +1 -1
- package/build/components/template-part-menu-items/convert-to-template-part.js +3 -1
- package/build/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
- package/build/components/template-part-menu-items/index.js +3 -1
- package/build/components/template-part-menu-items/index.js.map +1 -1
- package/build/components/template-validation-notice/index.js +3 -1
- package/build/components/template-validation-notice/index.js.map +1 -1
- package/build/components/text-editor/index.js +3 -1
- package/build/components/text-editor/index.js.map +1 -1
- package/build/components/theme-support-check/index.js +2 -0
- package/build/components/theme-support-check/index.js.map +1 -1
- package/build/components/time-to-read/index.js +4 -2
- package/build/components/time-to-read/index.js.map +1 -1
- package/build/components/unsaved-changes-warning/index.js +2 -0
- package/build/components/unsaved-changes-warning/index.js.map +1 -1
- package/build/components/visual-editor/edit-template-blocks-notification.js +3 -1
- package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
- package/build/components/visual-editor/index.js +34 -13
- package/build/components/visual-editor/index.js.map +2 -2
- package/build/components/visual-editor/use-edit-content-only-section-exit.js +65 -0
- package/build/components/visual-editor/use-edit-content-only-section-exit.js.map +7 -0
- package/build/components/visual-editor/use-padding-appender.js +75 -0
- package/build/components/visual-editor/use-padding-appender.js.map +7 -0
- package/build/components/visual-editor/use-select-nearest-editable-block.js +3 -1
- package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
- package/build/components/visual-editor/use-zoom-out-mode-exit.js +2 -0
- package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -1
- package/build/components/word-count/index.js +3 -1
- package/build/components/word-count/index.js.map +1 -1
- package/build/components/zoom-out-toggle/index.js +4 -2
- package/build/components/zoom-out-toggle/index.js.map +1 -1
- package/build/dataviews/api.js +2 -0
- package/build/dataviews/api.js.map +1 -1
- package/build/dataviews/fields/content-preview/content-preview-view.js +5 -3
- package/build/dataviews/fields/content-preview/content-preview-view.js.map +3 -3
- package/build/dataviews/fields/content-preview/index.js +3 -1
- package/build/dataviews/fields/content-preview/index.js.map +1 -1
- package/build/dataviews/store/private-actions.js +3 -1
- package/build/dataviews/store/private-actions.js.map +1 -1
- package/build/dataviews/store/private-selectors.js +3 -1
- package/build/dataviews/store/private-selectors.js.map +1 -1
- package/build/dataviews/store/reducer.js +2 -0
- package/build/dataviews/store/reducer.js.map +1 -1
- package/build/hooks/custom-sources-backwards-compatibility.js +4 -2
- package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build/hooks/default-autocompleters.js +2 -0
- package/build/hooks/default-autocompleters.js.map +1 -1
- package/build/hooks/index.js +2 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/media-upload.js +3 -1
- package/build/hooks/media-upload.js.map +1 -1
- package/build/hooks/navigation-link-view-button.js +5 -3
- package/build/hooks/navigation-link-view-button.js.map +1 -1
- package/build/hooks/pattern-overrides.js +6 -6
- package/build/hooks/pattern-overrides.js.map +2 -2
- package/build/hooks/push-changes-to-global-styles/index.js +12 -10
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/hooks/template-part-navigation-edit-button.js +7 -5
- package/build/hooks/template-part-navigation-edit-button.js.map +1 -1
- package/build/hooks/use-global-styles-output.js +2 -0
- package/build/hooks/use-global-styles-output.js.map +1 -1
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js +3 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/private-apis.js +4 -2
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +54 -52
- package/build/store/actions.js.map +2 -2
- package/build/store/constants.js +15 -13
- package/build/store/constants.js.map +1 -1
- package/build/store/defaults.js +3 -1
- package/build/store/defaults.js.map +1 -1
- package/build/store/index.js +4 -2
- package/build/store/index.js.map +1 -1
- package/build/store/local-autosave.js +2 -0
- package/build/store/local-autosave.js.map +1 -1
- package/build/store/private-actions.js +17 -7
- package/build/store/private-actions.js.map +2 -2
- package/build/store/private-selectors.js +15 -8
- package/build/store/private-selectors.js.map +2 -2
- package/build/store/reducer.js +12 -0
- package/build/store/reducer.js.map +2 -2
- package/build/store/selectors.js +80 -78
- package/build/store/selectors.js.map +2 -2
- package/build/store/utils/is-template-revertable.js +2 -0
- package/build/store/utils/is-template-revertable.js.map +1 -1
- package/build/store/utils/notice-builder.js +2 -0
- package/build/store/utils/notice-builder.js.map +1 -1
- package/build/utils/get-item-title.js +2 -0
- package/build/utils/get-item-title.js.map +1 -1
- package/build/utils/get-template-info.js +4 -2
- package/build/utils/get-template-info.js.map +1 -1
- package/build/utils/get-template-part-icon.js +2 -0
- package/build/utils/get-template-part-icon.js.map +1 -1
- package/build/utils/index.js +2 -0
- package/build/utils/index.js.map +1 -1
- package/build/utils/media-sideload/index.js +3 -1
- package/build/utils/media-sideload/index.js.map +1 -1
- package/build/utils/media-upload/index.js +3 -1
- package/build/utils/media-upload/index.js.map +1 -1
- package/build/utils/pageTypeBadge.js +2 -0
- package/build/utils/pageTypeBadge.js.map +1 -1
- package/build/utils/search-templates.js +2 -0
- package/build/utils/search-templates.js.map +1 -1
- package/build/utils/set-nested-value.js +2 -0
- package/build/utils/set-nested-value.js.map +1 -1
- package/build/utils/terms.js +5 -3
- package/build/utils/terms.js.map +1 -1
- package/build/utils/url.js +2 -0
- package/build/utils/url.js.map +1 -1
- package/build-module/bindings/api.js +1 -0
- package/build-module/bindings/api.js.map +1 -1
- package/build-module/bindings/pattern-overrides.js +2 -1
- package/build-module/bindings/pattern-overrides.js.map +1 -1
- package/build-module/bindings/post-data.js +49 -64
- package/build-module/bindings/post-data.js.map +2 -2
- package/build-module/bindings/post-meta.js +46 -39
- package/build-module/bindings/post-meta.js.map +2 -2
- package/build-module/bindings/term-data.js +2 -1
- package/build-module/bindings/term-data.js.map +1 -1
- package/build-module/components/autocompleters/index.js +1 -0
- package/build-module/components/autocompleters/index.js.map +1 -1
- package/build-module/components/autocompleters/user.js +2 -1
- package/build-module/components/autocompleters/user.js.map +1 -1
- package/build-module/components/autosave-monitor/index.js +3 -2
- package/build-module/components/autosave-monitor/index.js.map +1 -1
- package/build-module/components/block-removal-warnings/index.js +5 -4
- package/build-module/components/block-removal-warnings/index.js.map +1 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +5 -4
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build-module/components/block-visibility/index.js +4 -3
- package/build-module/components/block-visibility/index.js.map +1 -1
- package/build-module/components/blog-title/index.js +3 -2
- package/build-module/components/blog-title/index.js.map +1 -1
- package/build-module/components/character-count/index.js +1 -0
- package/build-module/components/character-count/index.js.map +1 -1
- package/build-module/components/collab-sidebar/add-comment.js +21 -18
- package/build-module/components/collab-sidebar/add-comment.js.map +2 -2
- package/build-module/components/collab-sidebar/comment-author-info.js +3 -2
- package/build-module/components/collab-sidebar/comment-author-info.js.map +2 -2
- package/build-module/components/collab-sidebar/comment-form.js +16 -6
- package/build-module/components/collab-sidebar/comment-form.js.map +2 -2
- package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +19 -28
- package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +2 -2
- package/build-module/components/collab-sidebar/comment-menu-item.js +43 -9
- package/build-module/components/collab-sidebar/comment-menu-item.js.map +2 -2
- package/build-module/components/collab-sidebar/comments.js +387 -326
- package/build-module/components/collab-sidebar/comments.js.map +2 -2
- package/build-module/components/collab-sidebar/constants.js +4 -3
- package/build-module/components/collab-sidebar/constants.js.map +1 -1
- package/build-module/components/collab-sidebar/hooks.js +7 -4
- package/build-module/components/collab-sidebar/hooks.js.map +2 -2
- package/build-module/components/collab-sidebar/index.js +52 -27
- package/build-module/components/collab-sidebar/index.js.map +2 -2
- package/build-module/components/collab-sidebar/utils.js +3 -2
- package/build-module/components/collab-sidebar/utils.js.map +2 -2
- package/build-module/components/collapsible-block-toolbar/index.js +3 -2
- package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
- package/build-module/components/commands/index.js +21 -8
- package/build-module/components/commands/index.js.map +2 -2
- package/build-module/components/deprecated.js +54 -53
- package/build-module/components/deprecated.js.map +1 -1
- package/build-module/components/document-bar/index.js +3 -2
- package/build-module/components/document-bar/index.js.map +1 -1
- package/build-module/components/document-outline/check.js +1 -0
- package/build-module/components/document-outline/check.js.map +1 -1
- package/build-module/components/document-outline/index.js +8 -7
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/document-outline/item.js +3 -2
- package/build-module/components/document-outline/item.js.map +1 -1
- package/build-module/components/document-tools/index.js +2 -1
- package/build-module/components/document-tools/index.js.map +1 -1
- package/build-module/components/editor/index.js +13 -4
- package/build-module/components/editor/index.js.map +2 -2
- package/build-module/components/editor-history/redo.js +2 -1
- package/build-module/components/editor-history/redo.js.map +1 -1
- package/build-module/components/editor-history/undo.js +2 -1
- package/build-module/components/editor-history/undo.js.map +1 -1
- package/build-module/components/editor-interface/index.js +3 -2
- package/build-module/components/editor-interface/index.js.map +1 -1
- package/build-module/components/editor-notices/index.js +2 -1
- package/build-module/components/editor-notices/index.js.map +1 -1
- package/build-module/components/editor-snackbars/index.js +3 -2
- 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 -1
- 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 +2 -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 +2 -1
- package/build-module/components/entities-saved-states/index.js.map +2 -2
- package/build-module/components/error-boundary/index.js +4 -3
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/index.js +1 -0
- package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +2 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build-module/components/global-styles/block-link.js +1 -0
- package/build-module/components/global-styles/block-link.js.map +1 -1
- package/build-module/components/global-styles/header.js +2 -1
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +2 -1
- package/build-module/components/global-styles/hooks.js.map +2 -2
- package/build-module/components/global-styles/index.js +3 -2
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/menu.js +2 -1
- package/build-module/components/global-styles/menu.js.map +1 -1
- package/build-module/components/global-styles-provider/index.js +2 -1
- package/build-module/components/global-styles-provider/index.js.map +1 -1
- package/build-module/components/global-styles-renderer/index.js +1 -0
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/global-styles-sidebar/default-sidebar.js +2 -1
- package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -1
- package/build-module/components/global-styles-sidebar/index.js +2 -1
- package/build-module/components/global-styles-sidebar/index.js.map +1 -1
- package/build-module/components/global-styles-sidebar/welcome-guide-image.js +1 -0
- package/build-module/components/global-styles-sidebar/welcome-guide-image.js.map +1 -1
- package/build-module/components/global-styles-sidebar/welcome-guide.js +2 -1
- package/build-module/components/global-styles-sidebar/welcome-guide.js.map +1 -1
- package/build-module/components/header/back-button.js +7 -6
- package/build-module/components/header/back-button.js.map +1 -1
- package/build-module/components/header/index.js +4 -3
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/index.js +3 -2
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inserter-sidebar/index.js +3 -2
- package/build-module/components/inserter-sidebar/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +2 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +6 -5
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +5 -4
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/list-view-sidebar/index.js +3 -2
- package/build-module/components/list-view-sidebar/index.js.map +1 -1
- package/build-module/components/list-view-sidebar/list-view-outline.js +2 -1
- package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
- package/build-module/components/local-autosave-monitor/index.js +5 -4
- package/build-module/components/local-autosave-monitor/index.js.map +1 -1
- package/build-module/components/media-categories/index.js +7 -6
- package/build-module/components/media-categories/index.js.map +1 -1
- package/build-module/components/mode-switcher/index.js +3 -2
- package/build-module/components/mode-switcher/index.js.map +1 -1
- package/build-module/components/more-menu/copy-content-menu-item.js +2 -1
- package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
- package/build-module/components/more-menu/index.js +3 -2
- package/build-module/components/more-menu/index.js.map +2 -2
- package/build-module/components/more-menu/tools-more-menu-group.js +3 -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 +3 -2
- package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
- package/build-module/components/page-attributes/check.js +1 -0
- package/build-module/components/page-attributes/check.js.map +1 -1
- package/build-module/components/page-attributes/order.js +2 -1
- package/build-module/components/page-attributes/order.js.map +1 -1
- package/build-module/components/page-attributes/panel.js +3 -2
- package/build-module/components/page-attributes/panel.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +3 -2
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/pattern-duplicate-modal/index.js +4 -3
- package/build-module/components/pattern-duplicate-modal/index.js.map +1 -1
- package/build-module/components/pattern-overrides-panel/index.js +3 -2
- package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
- package/build-module/components/pattern-rename-modal/index.js +4 -3
- package/build-module/components/pattern-rename-modal/index.js.map +1 -1
- package/build-module/components/plugin-document-setting-panel/index.js +4 -3
- package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build-module/components/plugin-more-menu-item/index.js +2 -1
- package/build-module/components/plugin-more-menu-item/index.js.map +1 -1
- package/build-module/components/plugin-post-publish-panel/index.js +4 -3
- package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-post-status-info/index.js +4 -3
- package/build-module/components/plugin-post-status-info/index.js.map +1 -1
- package/build-module/components/plugin-pre-publish-panel/index.js +4 -3
- package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-preview-menu-item/index.js +2 -1
- package/build-module/components/plugin-preview-menu-item/index.js.map +1 -1
- package/build-module/components/plugin-sidebar/index.js +2 -1
- package/build-module/components/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -1
- package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build-module/components/post-actions/actions.js +2 -1
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-actions/index.js +3 -2
- package/build-module/components/post-actions/index.js.map +1 -1
- package/build-module/components/post-actions/set-as-homepage.js +4 -3
- package/build-module/components/post-actions/set-as-homepage.js.map +1 -1
- package/build-module/components/post-actions/set-as-posts-page.js +4 -3
- package/build-module/components/post-actions/set-as-posts-page.js.map +1 -1
- package/build-module/components/post-author/check.js +2 -1
- package/build-module/components/post-author/check.js.map +1 -1
- package/build-module/components/post-author/combobox.js +2 -1
- package/build-module/components/post-author/combobox.js.map +1 -1
- package/build-module/components/post-author/constants.js +3 -2
- package/build-module/components/post-author/constants.js.map +1 -1
- package/build-module/components/post-author/hook.js +1 -0
- package/build-module/components/post-author/hook.js.map +1 -1
- package/build-module/components/post-author/index.js +3 -2
- package/build-module/components/post-author/index.js.map +1 -1
- package/build-module/components/post-author/panel.js +2 -1
- package/build-module/components/post-author/panel.js.map +1 -1
- package/build-module/components/post-author/select.js +2 -1
- package/build-module/components/post-author/select.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +3 -2
- package/build-module/components/post-card-panel/index.js.map +1 -1
- package/build-module/components/post-comments/index.js +3 -2
- package/build-module/components/post-comments/index.js.map +1 -1
- package/build-module/components/post-content-information/index.js +3 -2
- package/build-module/components/post-content-information/index.js.map +1 -1
- package/build-module/components/post-discussion/panel.js +3 -2
- package/build-module/components/post-discussion/panel.js.map +1 -1
- package/build-module/components/post-excerpt/check.js +2 -1
- package/build-module/components/post-excerpt/check.js.map +1 -1
- package/build-module/components/post-excerpt/index.js +2 -1
- package/build-module/components/post-excerpt/index.js.map +1 -1
- package/build-module/components/post-excerpt/panel.js +3 -2
- package/build-module/components/post-excerpt/panel.js.map +1 -1
- package/build-module/components/post-excerpt/plugin.js +4 -3
- package/build-module/components/post-excerpt/plugin.js.map +1 -1
- package/build-module/components/post-featured-image/check.js +2 -1
- package/build-module/components/post-featured-image/check.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +9 -8
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-featured-image/panel.js +3 -2
- package/build-module/components/post-featured-image/panel.js.map +1 -1
- package/build-module/components/post-fields/index.js +1 -0
- package/build-module/components/post-fields/index.js.map +1 -1
- package/build-module/components/post-format/check.js +2 -1
- package/build-module/components/post-format/check.js.map +1 -1
- package/build-module/components/post-format/index.js +3 -2
- package/build-module/components/post-format/index.js.map +1 -1
- package/build-module/components/post-format/panel.js +2 -1
- package/build-module/components/post-format/panel.js.map +1 -1
- package/build-module/components/post-last-edited-panel/index.js +2 -1
- package/build-module/components/post-last-edited-panel/index.js.map +1 -1
- package/build-module/components/post-last-revision/check.js +2 -1
- package/build-module/components/post-last-revision/check.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +2 -1
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-last-revision/panel.js +2 -1
- package/build-module/components/post-last-revision/panel.js.map +1 -1
- package/build-module/components/post-locked-modal/index.js +2 -1
- package/build-module/components/post-locked-modal/index.js.map +1 -1
- package/build-module/components/post-panel-row/index.js +3 -2
- package/build-module/components/post-panel-row/index.js.map +1 -1
- package/build-module/components/post-panel-section/index.js +2 -1
- package/build-module/components/post-panel-section/index.js.map +1 -1
- package/build-module/components/post-pending-status/check.js +1 -0
- package/build-module/components/post-pending-status/check.js.map +1 -1
- package/build-module/components/post-pending-status/index.js +2 -1
- package/build-module/components/post-pending-status/index.js.map +1 -1
- package/build-module/components/post-pingbacks/index.js +2 -1
- package/build-module/components/post-pingbacks/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +2 -1
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +5 -4
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/label.js +1 -0
- package/build-module/components/post-publish-button/label.js.map +1 -1
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +4 -3
- 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 +4 -3
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-category-panel.js +2 -1
- 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 +4 -3
- 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 +4 -3
- 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 +2 -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 +1 -0
- package/build-module/components/post-publish-panel/media-util.js.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +5 -4
- package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
- package/build-module/components/post-publish-panel/prepublish.js +2 -1
- package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
- package/build-module/components/post-saved-state/index.js +2 -1
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/check.js +1 -0
- package/build-module/components/post-schedule/check.js.map +1 -1
- package/build-module/components/post-schedule/index.js +3 -2
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-schedule/label.js +1 -0
- package/build-module/components/post-schedule/label.js.map +1 -1
- package/build-module/components/post-schedule/panel.js +3 -2
- package/build-module/components/post-schedule/panel.js.map +1 -1
- package/build-module/components/post-status/index.js +5 -4
- package/build-module/components/post-status/index.js.map +1 -1
- package/build-module/components/post-sticky/check.js +1 -0
- package/build-module/components/post-sticky/check.js.map +1 -1
- package/build-module/components/post-sticky/index.js +2 -1
- package/build-module/components/post-sticky/index.js.map +1 -1
- package/build-module/components/post-sticky/panel.js +2 -1
- package/build-module/components/post-sticky/panel.js.map +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js +2 -1
- package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-module/components/post-sync-status/index.js +2 -1
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-taxonomies/check.js +1 -0
- package/build-module/components/post-taxonomies/check.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +8 -7
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +7 -6
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/index.js +3 -2
- package/build-module/components/post-taxonomies/index.js.map +1 -1
- package/build-module/components/post-taxonomies/most-used-terms.js +4 -3
- package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build-module/components/post-taxonomies/panel.js +2 -1
- package/build-module/components/post-taxonomies/panel.js.map +1 -1
- package/build-module/components/post-template/block-theme.js +2 -1
- package/build-module/components/post-template/block-theme.js.map +1 -1
- package/build-module/components/post-template/classic-theme.js +2 -1
- package/build-module/components/post-template/classic-theme.js.map +1 -1
- package/build-module/components/post-template/create-new-template-modal.js +3 -2
- package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
- package/build-module/components/post-template/create-new-template.js +2 -1
- package/build-module/components/post-template/create-new-template.js.map +1 -1
- package/build-module/components/post-template/hooks.js +1 -0
- package/build-module/components/post-template/hooks.js.map +1 -1
- package/build-module/components/post-template/panel.js +11 -7
- package/build-module/components/post-template/panel.js.map +2 -2
- package/build-module/components/post-template/reset-default-template.js +2 -1
- package/build-module/components/post-template/reset-default-template.js.map +1 -1
- package/build-module/components/post-template/swap-template-button.js +2 -1
- package/build-module/components/post-template/swap-template-button.js.map +1 -1
- package/build-module/components/post-text-editor/index.js +2 -1
- package/build-module/components/post-text-editor/index.js.map +1 -1
- package/build-module/components/post-title/constants.js +3 -2
- package/build-module/components/post-title/constants.js.map +1 -1
- package/build-module/components/post-title/index.js +21 -11
- package/build-module/components/post-title/index.js.map +2 -2
- package/build-module/components/post-title/post-title-raw.js +2 -1
- package/build-module/components/post-title/post-title-raw.js.map +1 -1
- package/build-module/components/post-title/use-post-title-focus.js +1 -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 +1 -0
- package/build-module/components/post-title/use-post-title.js.map +1 -1
- package/build-module/components/post-transform-panel/hooks.js +2 -1
- package/build-module/components/post-transform-panel/hooks.js.map +1 -1
- package/build-module/components/post-transform-panel/index.js +2 -1
- package/build-module/components/post-transform-panel/index.js.map +1 -1
- package/build-module/components/post-trash/check.js +1 -0
- package/build-module/components/post-trash/check.js.map +1 -1
- package/build-module/components/post-trash/index.js +2 -1
- package/build-module/components/post-trash/index.js.map +1 -1
- package/build-module/components/post-type-support-check/index.js +1 -0
- package/build-module/components/post-type-support-check/index.js.map +1 -1
- package/build-module/components/post-url/check.js +1 -0
- package/build-module/components/post-url/check.js.map +1 -1
- package/build-module/components/post-url/index.js +2 -1
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/post-url/label.js +1 -0
- package/build-module/components/post-url/label.js.map +1 -1
- package/build-module/components/post-url/panel.js +2 -1
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/post-view-link/index.js +2 -1
- package/build-module/components/post-view-link/index.js.map +1 -1
- package/build-module/components/post-visibility/check.js +1 -0
- package/build-module/components/post-visibility/check.js.map +1 -1
- package/build-module/components/post-visibility/index.js +2 -1
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/post-visibility/label.js +1 -0
- package/build-module/components/post-visibility/label.js.map +1 -1
- package/build-module/components/post-visibility/utils.js +2 -1
- package/build-module/components/post-visibility/utils.js.map +1 -1
- package/build-module/components/posts-per-page/index.js +2 -1
- package/build-module/components/posts-per-page/index.js.map +1 -1
- package/build-module/components/preferences-modal/enable-panel.js +3 -2
- package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
- package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +4 -3
- package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
- package/build-module/components/preferences-modal/enable-publish-sidebar.js +3 -2
- package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +4 -3
- package/build-module/components/preferences-modal/index.js.map +2 -2
- package/build-module/components/preview-dropdown/index.js +2 -1
- package/build-module/components/preview-dropdown/index.js.map +1 -1
- package/build-module/components/provider/disable-non-page-content-blocks.js +1 -0
- package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build-module/components/provider/index.js +7 -6
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/navigation-block-editing-mode.js +1 -0
- package/build-module/components/provider/navigation-block-editing-mode.js.map +1 -1
- package/build-module/components/provider/use-auto-switch-editor-sidebars.js +1 -0
- package/build-module/components/provider/use-auto-switch-editor-sidebars.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +4 -3
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/provider/use-hide-blocks-from-inserter.js +2 -1
- package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
- package/build-module/components/provider/use-post-content-blocks.js +2 -1
- package/build-module/components/provider/use-post-content-blocks.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js +3 -2
- package/build-module/components/provider/with-registry-provider.js.map +1 -1
- package/build-module/components/resizable-editor/index.js +3 -2
- package/build-module/components/resizable-editor/index.js.map +1 -1
- package/build-module/components/resizable-editor/resize-handle.js +3 -2
- package/build-module/components/resizable-editor/resize-handle.js.map +1 -1
- package/build-module/components/save-publish-panels/index.js +4 -3
- package/build-module/components/save-publish-panels/index.js.map +1 -1
- package/build-module/components/sidebar/constants.js +2 -1
- package/build-module/components/sidebar/constants.js.map +1 -1
- package/build-module/components/sidebar/header.js +4 -3
- package/build-module/components/sidebar/header.js.map +1 -1
- package/build-module/components/sidebar/index.js +6 -5
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/post-summary.js +3 -2
- package/build-module/components/sidebar/post-summary.js.map +1 -1
- package/build-module/components/site-discussion/index.js +3 -2
- package/build-module/components/site-discussion/index.js.map +1 -1
- package/build-module/components/start-page-options/index.js +7 -7
- package/build-module/components/start-page-options/index.js.map +2 -2
- package/build-module/components/start-template-options/index.js +2 -1
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/style-book/categories.js +1 -0
- package/build-module/components/style-book/categories.js.map +1 -1
- package/build-module/components/style-book/color-examples.js +3 -2
- package/build-module/components/style-book/color-examples.js.map +1 -1
- package/build-module/components/style-book/constants.js +8 -7
- package/build-module/components/style-book/constants.js.map +1 -1
- package/build-module/components/style-book/duotone-examples.js +3 -2
- package/build-module/components/style-book/duotone-examples.js.map +1 -1
- package/build-module/components/style-book/examples.js +2 -1
- package/build-module/components/style-book/examples.js.map +1 -1
- package/build-module/components/style-book/index.js +12 -11
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/styles-canvas/index.js +2 -1
- package/build-module/components/styles-canvas/index.js.map +1 -1
- package/build-module/components/styles-canvas/revisions.js +3 -2
- package/build-module/components/styles-canvas/revisions.js.map +1 -1
- package/build-module/components/styles-canvas/style-book.js +2 -1
- package/build-module/components/styles-canvas/style-book.js.map +1 -1
- package/build-module/components/table-of-contents/index.js +2 -1
- package/build-module/components/table-of-contents/index.js.map +1 -1
- package/build-module/components/table-of-contents/panel.js +2 -1
- package/build-module/components/table-of-contents/panel.js.map +1 -1
- package/build-module/components/template-content-panel/index.js +5 -4
- package/build-module/components/template-content-panel/index.js.map +1 -1
- package/build-module/components/template-part-content-panel/index.js +3 -2
- package/build-module/components/template-part-content-panel/index.js.map +1 -1
- package/build-module/components/template-part-menu-items/convert-to-regular.js +2 -1
- package/build-module/components/template-part-menu-items/convert-to-regular.js.map +1 -1
- package/build-module/components/template-part-menu-items/convert-to-template-part.js +2 -1
- package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
- package/build-module/components/template-part-menu-items/index.js +2 -1
- package/build-module/components/template-part-menu-items/index.js.map +1 -1
- package/build-module/components/template-validation-notice/index.js +2 -1
- package/build-module/components/template-validation-notice/index.js.map +1 -1
- package/build-module/components/text-editor/index.js +2 -1
- package/build-module/components/text-editor/index.js.map +1 -1
- package/build-module/components/theme-support-check/index.js +1 -0
- package/build-module/components/theme-support-check/index.js.map +1 -1
- package/build-module/components/time-to-read/index.js +3 -2
- package/build-module/components/time-to-read/index.js.map +1 -1
- package/build-module/components/unsaved-changes-warning/index.js +1 -0
- package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js +2 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
- package/build-module/components/visual-editor/index.js +33 -13
- package/build-module/components/visual-editor/index.js.map +2 -2
- package/build-module/components/visual-editor/use-edit-content-only-section-exit.js +40 -0
- package/build-module/components/visual-editor/use-edit-content-only-section-exit.js.map +7 -0
- package/build-module/components/visual-editor/use-padding-appender.js +50 -0
- package/build-module/components/visual-editor/use-padding-appender.js.map +7 -0
- package/build-module/components/visual-editor/use-select-nearest-editable-block.js +2 -1
- package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
- package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +1 -0
- package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -1
- package/build-module/components/word-count/index.js +2 -1
- package/build-module/components/word-count/index.js.map +1 -1
- package/build-module/components/zoom-out-toggle/index.js +3 -2
- package/build-module/components/zoom-out-toggle/index.js.map +1 -1
- package/build-module/dataviews/api.js +1 -0
- package/build-module/dataviews/api.js.map +1 -1
- package/build-module/dataviews/fields/content-preview/content-preview-view.js +5 -5
- package/build-module/dataviews/fields/content-preview/content-preview-view.js.map +2 -2
- package/build-module/dataviews/fields/content-preview/index.js +2 -1
- package/build-module/dataviews/fields/content-preview/index.js.map +1 -1
- package/build-module/dataviews/store/private-actions.js +2 -1
- package/build-module/dataviews/store/private-actions.js.map +1 -1
- package/build-module/dataviews/store/private-selectors.js +2 -1
- package/build-module/dataviews/store/private-selectors.js.map +1 -1
- package/build-module/dataviews/store/reducer.js +1 -0
- package/build-module/dataviews/store/reducer.js.map +1 -1
- package/build-module/hooks/custom-sources-backwards-compatibility.js +3 -2
- package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build-module/hooks/default-autocompleters.js +1 -0
- package/build-module/hooks/default-autocompleters.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 +2 -1
- package/build-module/hooks/media-upload.js.map +1 -1
- package/build-module/hooks/navigation-link-view-button.js +4 -3
- package/build-module/hooks/navigation-link-view-button.js.map +1 -1
- package/build-module/hooks/pattern-overrides.js +5 -6
- package/build-module/hooks/pattern-overrides.js.map +2 -2
- package/build-module/hooks/push-changes-to-global-styles/index.js +11 -10
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/hooks/template-part-navigation-edit-button.js +6 -5
- package/build-module/hooks/template-part-navigation-edit-button.js.map +1 -1
- package/build-module/hooks/use-global-styles-output.js +1 -0
- package/build-module/hooks/use-global-styles-output.js.map +1 -1
- package/build-module/index.js +1 -0
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js +2 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/private-apis.js +3 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +53 -52
- package/build-module/store/actions.js.map +2 -2
- package/build-module/store/constants.js +14 -13
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/defaults.js +2 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/index.js +3 -2
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/local-autosave.js +1 -0
- package/build-module/store/local-autosave.js.map +1 -1
- package/build-module/store/private-actions.js +15 -7
- package/build-module/store/private-actions.js.map +2 -2
- package/build-module/store/private-selectors.js +13 -8
- package/build-module/store/private-selectors.js.map +2 -2
- package/build-module/store/reducer.js +10 -0
- package/build-module/store/reducer.js.map +2 -2
- package/build-module/store/selectors.js +79 -78
- package/build-module/store/selectors.js.map +2 -2
- package/build-module/store/utils/is-template-revertable.js +1 -0
- package/build-module/store/utils/is-template-revertable.js.map +1 -1
- package/build-module/store/utils/notice-builder.js +1 -0
- package/build-module/store/utils/notice-builder.js.map +1 -1
- package/build-module/utils/get-item-title.js +1 -0
- package/build-module/utils/get-item-title.js.map +1 -1
- package/build-module/utils/get-template-info.js +3 -2
- package/build-module/utils/get-template-info.js.map +1 -1
- package/build-module/utils/get-template-part-icon.js +1 -0
- package/build-module/utils/get-template-part-icon.js.map +1 -1
- package/build-module/utils/index.js +1 -0
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/media-sideload/index.js +2 -1
- package/build-module/utils/media-sideload/index.js.map +1 -1
- package/build-module/utils/media-upload/index.js +2 -1
- package/build-module/utils/media-upload/index.js.map +1 -1
- package/build-module/utils/pageTypeBadge.js +1 -0
- package/build-module/utils/pageTypeBadge.js.map +1 -1
- package/build-module/utils/search-templates.js +1 -0
- package/build-module/utils/search-templates.js.map +1 -1
- package/build-module/utils/set-nested-value.js +1 -0
- package/build-module/utils/set-nested-value.js.map +1 -1
- package/build-module/utils/terms.js +4 -3
- package/build-module/utils/terms.js.map +1 -1
- package/build-module/utils/url.js +1 -0
- package/build-module/utils/url.js.map +1 -1
- package/build-style/style-rtl.css +58 -82
- package/build-style/style.css +58 -82
- package/build-types/bindings/post-data.d.ts +18 -8
- package/build-types/bindings/post-meta.d.ts +1 -7
- package/build-types/components/collab-sidebar/add-comment.d.ts +3 -3
- package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comment-menu-item.d.ts +3 -2
- package/build-types/components/collab-sidebar/comment-menu-item.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comments.d.ts +3 -3
- package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
- package/build-types/components/commands/index.d.ts.map +1 -1
- package/build-types/components/editor/index.d.ts.map +1 -1
- package/build-types/components/entities-saved-states/index.d.ts +2 -2
- package/build-types/components/entities-saved-states/index.d.ts.map +1 -1
- package/build-types/components/global-styles/hooks.d.ts +6 -6
- package/build-types/components/global-styles/hooks.d.ts.map +1 -1
- package/build-types/components/header/back-button.d.ts.map +1 -1
- package/build-types/components/local-autosave-monitor/index.d.ts.map +1 -1
- package/build-types/components/more-menu/tools-more-menu-group.d.ts.map +1 -1
- package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -1
- package/build-types/components/plugin-document-setting-panel/index.d.ts.map +1 -1
- package/build-types/components/plugin-post-publish-panel/index.d.ts.map +1 -1
- package/build-types/components/plugin-post-status-info/index.d.ts.map +1 -1
- package/build-types/components/plugin-pre-publish-panel/index.d.ts.map +1 -1
- package/build-types/components/post-excerpt/plugin.d.ts.map +1 -1
- package/build-types/components/post-locked-modal/index.d.ts.map +1 -1
- package/build-types/components/post-publish-button/index.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/hierarchical-term-selector.d.ts +1 -10
- package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
- package/build-types/components/post-template/panel.d.ts.map +1 -1
- package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts.map +1 -1
- package/build-types/components/save-publish-panels/index.d.ts.map +1 -1
- package/build-types/components/start-page-options/index.d.ts.map +1 -1
- package/build-types/components/style-book/color-examples.d.ts.map +1 -1
- package/build-types/components/style-book/duotone-examples.d.ts.map +1 -1
- package/build-types/components/visual-editor/index.d.ts.map +1 -1
- package/build-types/components/visual-editor/use-edit-content-only-section-exit.d.ts +6 -0
- package/build-types/components/visual-editor/use-edit-content-only-section-exit.d.ts.map +1 -0
- package/build-types/components/visual-editor/use-padding-appender.d.ts +2 -0
- package/build-types/components/visual-editor/use-padding-appender.d.ts.map +1 -0
- package/build-types/dataviews/fields/content-preview/content-preview-view.d.ts.map +1 -1
- package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
- package/build-types/store/actions.d.ts +3 -4
- package/build-types/store/actions.d.ts.map +1 -1
- package/build-types/store/private-actions.d.ts +7 -0
- package/build-types/store/private-actions.d.ts.map +1 -1
- package/build-types/store/private-selectors.d.ts +12 -5
- package/build-types/store/private-selectors.d.ts.map +1 -1
- package/build-types/store/reducer.d.ts +10 -0
- package/build-types/store/reducer.d.ts.map +1 -1
- package/build-types/store/selectors.d.ts +68 -68
- package/build-types/store/selectors.d.ts.map +1 -1
- package/package.json +40 -40
- package/src/bindings/post-data.js +63 -111
- package/src/bindings/post-meta.js +55 -46
- package/src/bindings/test/post-meta.js +211 -0
- package/src/components/collab-sidebar/add-comment.js +19 -16
- package/src/components/collab-sidebar/comment-author-info.js +1 -1
- package/src/components/collab-sidebar/comment-form.js +16 -4
- package/src/components/collab-sidebar/comment-indicator-toolbar.js +19 -29
- package/src/components/collab-sidebar/comment-menu-item.js +51 -11
- package/src/components/collab-sidebar/comments.js +173 -80
- package/src/components/collab-sidebar/hooks.js +6 -4
- package/src/components/collab-sidebar/index.js +78 -40
- package/src/components/collab-sidebar/style.scss +20 -44
- package/src/components/collab-sidebar/utils.js +3 -2
- package/src/components/commands/index.js +32 -19
- package/src/components/editor/index.js +12 -1
- package/src/components/entities-saved-states/index.js +1 -1
- package/src/components/global-styles/hooks.js +4 -4
- package/src/components/more-menu/index.js +1 -1
- package/src/components/post-template/panel.js +11 -8
- package/src/components/post-title/index.js +22 -9
- package/src/components/preferences-modal/index.js +1 -1
- package/src/components/start-page-options/index.js +5 -6
- package/src/components/start-page-options/style.scss +1 -1
- package/src/components/visual-editor/index.js +36 -6
- package/src/components/visual-editor/use-edit-content-only-section-exit.js +55 -0
- package/src/components/visual-editor/use-padding-appender.js +70 -0
- package/src/dataviews/fields/content-preview/content-preview-view.tsx +2 -5
- package/src/hooks/pattern-overrides.js +0 -2
- package/src/store/actions.js +9 -1
- package/src/store/private-actions.js +13 -0
- package/src/store/private-selectors.js +10 -0
- package/src/store/reducer.js +16 -0
- package/src/store/selectors.js +0 -2
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -401,7 +401,7 @@ _Parameters_
|
|
|
401
401
|
|
|
402
402
|
- _props_ `Object`: The component props.
|
|
403
403
|
- _props.close_ `Function`: The function to close the dialog.
|
|
404
|
-
- _props.renderDialog_ `boolean
|
|
404
|
+
- _props.renderDialog_ `boolean=`: Whether to render the component with modal dialog behavior.
|
|
405
405
|
- _props.variant_ `string`: 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.
|
|
406
406
|
|
|
407
407
|
_Returns_
|
package/build/bindings/api.js
CHANGED
|
@@ -26,6 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// packages/editor/src/bindings/api.js
|
|
29
31
|
var api_exports = {};
|
|
30
32
|
__export(api_exports, {
|
|
31
33
|
registerCoreBlockBindingsSources: () => registerCoreBlockBindingsSources
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/bindings/api.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { registerBlockBindingsSource } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport patternOverrides from './pattern-overrides';\nimport postData from './post-data';\nimport postMeta from './post-meta';\nimport termData from './term-data';\n\n/**\n * Function to register core block bindings sources provided by the editor.\n *\n * @example\n * ```js\n * import { registerCoreBlockBindingsSources } from '@wordpress/editor';\n *\n * registerCoreBlockBindingsSources();\n * ```\n */\nexport function registerCoreBlockBindingsSources() {\n\tregisterBlockBindingsSource( patternOverrides );\n\tregisterBlockBindingsSource( postData );\n\tregisterBlockBindingsSource( postMeta );\n\tregisterBlockBindingsSource( termData );\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAA4C;AAK5C,+BAA6B;AAC7B,uBAAqB;AACrB,uBAAqB;AACrB,uBAAqB;AAYd,SAAS,mCAAmC;AAClD,iDAA6B,yBAAAA,OAAiB;AAC9C,iDAA6B,iBAAAC,OAAS;AACtC,iDAA6B,iBAAAC,OAAS;AACtC,iDAA6B,iBAAAC,OAAS;AACvC;",
|
|
6
6
|
"names": ["patternOverrides", "postData", "postMeta", "termData"]
|
|
7
7
|
}
|
|
@@ -16,13 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/editor/src/bindings/pattern-overrides.js
|
|
19
21
|
var pattern_overrides_exports = {};
|
|
20
22
|
__export(pattern_overrides_exports, {
|
|
21
23
|
default: () => pattern_overrides_default
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(pattern_overrides_exports);
|
|
24
26
|
var import_block_editor = require("@wordpress/block-editor");
|
|
25
|
-
|
|
27
|
+
var CONTENT = "content";
|
|
26
28
|
var pattern_overrides_default = {
|
|
27
29
|
name: "core/pattern-overrides",
|
|
28
30
|
getValues({ select, clientId, context, bindings }) {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/bindings/pattern-overrides.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nconst CONTENT = 'content';\n\n/**\n * @type {WPBlockBindingsSource}\n */\nexport default {\n\tname: 'core/pattern-overrides',\n\tgetValues( { select, clientId, context, bindings } ) {\n\t\tconst patternOverridesContent = context[ 'pattern/overrides' ];\n\t\tconst { getBlockAttributes } = select( blockEditorStore );\n\t\tconst currentBlockAttributes = getBlockAttributes( clientId );\n\n\t\tconst overridesValues = {};\n\t\tfor ( const attributeName of Object.keys( bindings ) ) {\n\t\t\tconst overridableValue =\n\t\t\t\tpatternOverridesContent?.[\n\t\t\t\t\tcurrentBlockAttributes?.metadata?.name\n\t\t\t\t]?.[ attributeName ];\n\n\t\t\t// If it has not been overridden, return the original value.\n\t\t\t// Check undefined because empty string is a valid value.\n\t\t\tif ( overridableValue === undefined ) {\n\t\t\t\toverridesValues[ attributeName ] =\n\t\t\t\t\tcurrentBlockAttributes[ attributeName ];\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\toverridesValues[ attributeName ] =\n\t\t\t\t\toverridableValue === '' ? undefined : overridableValue;\n\t\t\t}\n\t\t}\n\t\treturn overridesValues;\n\t},\n\tsetValues( { select, dispatch, clientId, bindings } ) {\n\t\tconst { getBlockAttributes, getBlockParentsByBlockName, getBlocks } =\n\t\t\tselect( blockEditorStore );\n\t\tconst currentBlockAttributes = getBlockAttributes( clientId );\n\t\tconst blockName = currentBlockAttributes?.metadata?.name;\n\t\tif ( ! blockName ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst [ patternClientId ] = getBlockParentsByBlockName(\n\t\t\tclientId,\n\t\t\t'core/block',\n\t\t\ttrue\n\t\t);\n\n\t\t// Extract the updated attributes from the source bindings.\n\t\tconst attributes = Object.entries( bindings ).reduce(\n\t\t\t( attrs, [ key, { newValue } ] ) => {\n\t\t\t\tattrs[ key ] = newValue;\n\t\t\t\treturn attrs;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\n\t\t// If there is no pattern client ID, sync blocks with the same name and same attributes.\n\t\tif ( ! patternClientId ) {\n\t\t\tconst syncBlocksWithSameName = ( blocks ) => {\n\t\t\t\tfor ( const block of blocks ) {\n\t\t\t\t\tif ( block.attributes?.metadata?.name === blockName ) {\n\t\t\t\t\t\tdispatch( blockEditorStore ).updateBlockAttributes(\n\t\t\t\t\t\t\tblock.clientId,\n\t\t\t\t\t\t\tattributes\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tsyncBlocksWithSameName( block.innerBlocks );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tsyncBlocksWithSameName( getBlocks() );\n\t\t\treturn;\n\t\t}\n\t\tconst currentBindingValue =\n\t\t\tgetBlockAttributes( patternClientId )?.[ CONTENT ];\n\n\t\tdispatch( blockEditorStore ).updateBlockAttributes( patternClientId, {\n\t\t\t[ CONTENT ]: {\n\t\t\t\t...currentBindingValue,\n\t\t\t\t[ blockName ]: {\n\t\t\t\t\t...currentBindingValue?.[ blockName ],\n\t\t\t\t\t...Object.entries( attributes ).reduce(\n\t\t\t\t\t\t( acc, [ key, value ] ) => {\n\t\t\t\t\t\t\t// TODO: We need a way to represent `undefined` in the serialized overrides.\n\t\t\t\t\t\t\t// Also see: https://github.com/WordPress/gutenberg/pull/57249#discussion_r1452987871\n\t\t\t\t\t\t\t// We use an empty string to represent undefined for now until\n\t\t\t\t\t\t\t// we support a richer format for overrides and the block bindings API.\n\t\t\t\t\t\t\tacc[ key ] = value === undefined ? '' : value;\n\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{}\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t},\n\t\t} );\n\t},\n\tcanUserEditValue: () => true,\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAA0C;AAE1C,IAAM,UAAU;AAKhB,IAAO,4BAAQ;AAAA,EACd,MAAM;AAAA,EACN,UAAW,EAAE,QAAQ,UAAU,SAAS,SAAS,GAAI;AACpD,UAAM,0BAA0B,QAAS,mBAAoB;AAC7D,UAAM,EAAE,mBAAmB,IAAI,OAAQ,oBAAAA,KAAiB;AACxD,UAAM,yBAAyB,mBAAoB,QAAS;AAE5D,UAAM,kBAAkB,CAAC;AACzB,eAAY,iBAAiB,OAAO,KAAM,QAAS,GAAI;AACtD,YAAM,mBACL,0BACC,wBAAwB,UAAU,IACnC,IAAK,aAAc;AAIpB,UAAK,qBAAqB,QAAY;AACrC,wBAAiB,aAAc,IAC9B,uBAAwB,aAAc;AACvC;AAAA,MACD,OAAO;AACN,wBAAiB,aAAc,IAC9B,qBAAqB,KAAK,SAAY;AAAA,MACxC;AAAA,IACD;AACA,WAAO;AAAA,EACR;AAAA,EACA,UAAW,EAAE,QAAQ,UAAU,UAAU,SAAS,GAAI;AACrD,UAAM,EAAE,oBAAoB,4BAA4B,UAAU,IACjE,OAAQ,oBAAAA,KAAiB;AAC1B,UAAM,yBAAyB,mBAAoB,QAAS;AAC5D,UAAM,YAAY,wBAAwB,UAAU;AACpD,QAAK,CAAE,WAAY;AAClB;AAAA,IACD;AAEA,UAAM,CAAE,eAAgB,IAAI;AAAA,MAC3B;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAGA,UAAM,aAAa,OAAO,QAAS,QAAS,EAAE;AAAA,MAC7C,CAAE,OAAO,CAAE,KAAK,EAAE,SAAS,CAAE,MAAO;AACnC,cAAO,GAAI,IAAI;AACf,eAAO;AAAA,MACR;AAAA,MACA,CAAC;AAAA,IACF;AAGA,QAAK,CAAE,iBAAkB;AACxB,YAAM,yBAAyB,CAAE,WAAY;AAC5C,mBAAY,SAAS,QAAS;AAC7B,cAAK,MAAM,YAAY,UAAU,SAAS,WAAY;AACrD,qBAAU,oBAAAA,KAAiB,EAAE;AAAA,cAC5B,MAAM;AAAA,cACN;AAAA,YACD;AAAA,UACD;AACA,iCAAwB,MAAM,WAAY;AAAA,QAC3C;AAAA,MACD;AAEA,6BAAwB,UAAU,CAAE;AACpC;AAAA,IACD;AACA,UAAM,sBACL,mBAAoB,eAAgB,IAAK,OAAQ;AAElD,aAAU,oBAAAA,KAAiB,EAAE,sBAAuB,iBAAiB;AAAA,MACpE,CAAE,OAAQ,GAAG;AAAA,QACZ,GAAG;AAAA,QACH,CAAE,SAAU,GAAG;AAAA,UACd,GAAG,sBAAuB,SAAU;AAAA,UACpC,GAAG,OAAO,QAAS,UAAW,EAAE;AAAA,YAC/B,CAAE,KAAK,CAAE,KAAK,KAAM,MAAO;AAK1B,kBAAK,GAAI,IAAI,UAAU,SAAY,KAAK;AACxC,qBAAO;AAAA,YACR;AAAA,YACA,CAAC;AAAA,UACF;AAAA,QACD;AAAA,MACD;AAAA,IACD,CAAE;AAAA,EACH;AAAA,EACA,kBAAkB,MAAM;AACzB;",
|
|
6
6
|
"names": ["blockEditorStore"]
|
|
7
7
|
}
|
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/editor/src/bindings/post-data.js
|
|
19
21
|
var post_data_exports = {};
|
|
20
22
|
__export(post_data_exports, {
|
|
21
23
|
default: () => post_data_default
|
|
@@ -24,63 +26,60 @@ module.exports = __toCommonJS(post_data_exports);
|
|
|
24
26
|
var import_i18n = require("@wordpress/i18n");
|
|
25
27
|
var import_core_data = require("@wordpress/core-data");
|
|
26
28
|
var import_block_editor = require("@wordpress/block-editor");
|
|
27
|
-
|
|
29
|
+
var NAVIGATION_BLOCK_TYPES = [
|
|
28
30
|
"core/navigation-link",
|
|
29
31
|
"core/navigation-submenu"
|
|
30
32
|
];
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
var postDataFields = [
|
|
34
|
+
{
|
|
35
|
+
label: (0, import_i18n.__)("Post Date"),
|
|
36
|
+
args: { field: "date" },
|
|
37
|
+
type: "string"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: (0, import_i18n.__)("Post Modified Date"),
|
|
41
|
+
args: { field: "modified" },
|
|
42
|
+
type: "string"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: (0, import_i18n.__)("Post Link"),
|
|
46
|
+
args: { field: "link" },
|
|
47
|
+
type: "string"
|
|
45
48
|
}
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
];
|
|
50
|
+
var post_data_default = {
|
|
51
|
+
name: "core/post-data",
|
|
52
|
+
getValues({ select, context, bindings, clientId }) {
|
|
53
|
+
const allowedFields = postDataFields.map(
|
|
54
|
+
(field) => field.args.field
|
|
55
|
+
);
|
|
56
|
+
const { getBlockAttributes, getBlockName } = select(import_block_editor.store);
|
|
57
|
+
const blockName = getBlockName?.(clientId);
|
|
58
|
+
const isNavigationBlock = NAVIGATION_BLOCK_TYPES.includes(blockName);
|
|
59
|
+
let postId, postType;
|
|
60
|
+
if (isNavigationBlock) {
|
|
61
|
+
const blockAttributes = getBlockAttributes?.(clientId);
|
|
62
|
+
postId = blockAttributes?.id;
|
|
63
|
+
postType = blockAttributes?.type;
|
|
64
|
+
} else {
|
|
65
|
+
postId = context?.postId;
|
|
66
|
+
postType = context?.postType;
|
|
67
|
+
}
|
|
68
|
+
const { getEditedEntityRecord } = select(import_core_data.store);
|
|
69
|
+
const entityDataValues = getEditedEntityRecord(
|
|
48
70
|
"postType",
|
|
49
71
|
postType,
|
|
50
72
|
postId
|
|
51
73
|
);
|
|
52
|
-
dataFields = {
|
|
53
|
-
date: {
|
|
54
|
-
label: (0, import_i18n.__)("Post Date"),
|
|
55
|
-
value: entityDataValues?.date,
|
|
56
|
-
type: "string"
|
|
57
|
-
},
|
|
58
|
-
modified: {
|
|
59
|
-
label: (0, import_i18n.__)("Post Modified Date"),
|
|
60
|
-
value: entityDataValues?.modified,
|
|
61
|
-
type: "string"
|
|
62
|
-
},
|
|
63
|
-
link: {
|
|
64
|
-
label: (0, import_i18n.__)("Post Link"),
|
|
65
|
-
value: entityDataValues?.link,
|
|
66
|
-
type: "string"
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
if (!Object.keys(dataFields || {}).length) {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
return dataFields;
|
|
74
|
-
}
|
|
75
|
-
var post_data_default = {
|
|
76
|
-
name: "core/post-data",
|
|
77
|
-
getValues({ select, context, bindings, clientId }) {
|
|
78
|
-
const dataFields = getPostDataFields(select, context, clientId);
|
|
79
74
|
const newValues = {};
|
|
80
|
-
for (const [attributeName,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
for (const [attributeName, binding] of Object.entries(bindings)) {
|
|
76
|
+
if (!allowedFields.includes(binding.args.field)) {
|
|
77
|
+
newValues[attributeName] = {};
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
newValues[attributeName] = entityDataValues?.[binding.args.field] ?? postDataFields.find(
|
|
81
|
+
(field) => field.args.field === binding.args.field
|
|
82
|
+
).label;
|
|
84
83
|
}
|
|
85
84
|
return newValues;
|
|
86
85
|
},
|
|
@@ -101,7 +100,7 @@ var post_data_default = {
|
|
|
101
100
|
newData
|
|
102
101
|
);
|
|
103
102
|
},
|
|
104
|
-
canUserEditValue({ select, context
|
|
103
|
+
canUserEditValue({ select, context }) {
|
|
105
104
|
const { getBlockName, getSelectedBlockClientId } = select(import_block_editor.store);
|
|
106
105
|
const clientId = getSelectedBlockClientId();
|
|
107
106
|
const blockName = getBlockName?.(clientId);
|
|
@@ -114,10 +113,6 @@ var post_data_default = {
|
|
|
114
113
|
if (!context?.postType) {
|
|
115
114
|
return false;
|
|
116
115
|
}
|
|
117
|
-
const fieldValue = getPostDataFields(select, context, void 0)?.[args.field]?.value;
|
|
118
|
-
if (fieldValue === void 0) {
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
116
|
const canUserEdit = select(import_core_data.store).canUser("update", {
|
|
122
117
|
kind: "postType",
|
|
123
118
|
name: context?.postType,
|
|
@@ -128,7 +123,7 @@ var post_data_default = {
|
|
|
128
123
|
}
|
|
129
124
|
return true;
|
|
130
125
|
},
|
|
131
|
-
getFieldsList({ select
|
|
126
|
+
getFieldsList({ select }) {
|
|
132
127
|
const selectedBlock = select(import_block_editor.store).getSelectedBlock();
|
|
133
128
|
if (selectedBlock?.name !== "core/post-date") {
|
|
134
129
|
return [];
|
|
@@ -136,16 +131,7 @@ var post_data_default = {
|
|
|
136
131
|
if (NAVIGATION_BLOCK_TYPES.includes(selectedBlock?.name)) {
|
|
137
132
|
return [];
|
|
138
133
|
}
|
|
139
|
-
|
|
140
|
-
const postDataFields = getPostDataFields(select, context, clientId);
|
|
141
|
-
if (!postDataFields) {
|
|
142
|
-
return [];
|
|
143
|
-
}
|
|
144
|
-
return Object.entries(postDataFields).map(([key, field]) => ({
|
|
145
|
-
label: field.label,
|
|
146
|
-
type: field.type,
|
|
147
|
-
args: { field: key }
|
|
148
|
-
}));
|
|
134
|
+
return postDataFields;
|
|
149
135
|
}
|
|
150
136
|
};
|
|
151
137
|
//# sourceMappingURL=post-data.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/bindings/post-data.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n// Navigation block types that use special handling for backwards compatibility\nconst NAVIGATION_BLOCK_TYPES = [\n\t'core/navigation-link',\n\t'core/navigation-submenu',\n];\n\
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n// Navigation block types that use special handling for backwards compatibility\nconst NAVIGATION_BLOCK_TYPES = [\n\t'core/navigation-link',\n\t'core/navigation-submenu',\n];\n\nconst postDataFields = [\n\t{\n\t\tlabel: __( 'Post Date' ),\n\t\targs: { field: 'date' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Post Modified Date' ),\n\t\targs: { field: 'modified' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Post Link' ),\n\t\targs: { field: 'link' },\n\t\ttype: 'string',\n\t},\n];\n\n/**\n * @type {WPBlockBindingsSource}\n */\nexport default {\n\tname: 'core/post-data',\n\tgetValues( { select, context, bindings, clientId } ) {\n\t\tconst allowedFields = postDataFields.map(\n\t\t\t( field ) => field.args.field\n\t\t);\n\n\t\t/*\n\t\t * BACKWARDS COMPATIBILITY: Hardcoded exception for navigation blocks.\n\t\t * Required for WordPress 6.9+ navigation blocks. DO NOT REMOVE.\n\t\t */\n\t\tconst { getBlockAttributes, getBlockName } = select( blockEditorStore );\n\t\tconst blockName = getBlockName?.( clientId );\n\t\tconst isNavigationBlock = NAVIGATION_BLOCK_TYPES.includes( blockName );\n\n\t\tlet postId, postType;\n\n\t\tif ( isNavigationBlock ) {\n\t\t\t// Navigation blocks: read from block attributes\n\t\t\tconst blockAttributes = getBlockAttributes?.( clientId );\n\t\t\tpostId = blockAttributes?.id;\n\t\t\tpostType = blockAttributes?.type;\n\t\t} else {\n\t\t\t// All other blocks: use context\n\t\t\tpostId = context?.postId;\n\t\t\tpostType = context?.postType;\n\t\t}\n\n\t\tconst { getEditedEntityRecord } = select( coreDataStore );\n\t\tconst entityDataValues = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\n\t\tconst newValues = {};\n\t\tfor ( const [ attributeName, binding ] of Object.entries( bindings ) ) {\n\t\t\tif ( ! allowedFields.includes( binding.args.field ) ) {\n\t\t\t\tnewValues[ attributeName ] = {};\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnewValues[ attributeName ] =\n\t\t\t\tentityDataValues?.[ binding.args.field ] ??\n\t\t\t\tpostDataFields.find(\n\t\t\t\t\t( field ) => field.args.field === binding.args.field\n\t\t\t\t).label;\n\t\t}\n\t\treturn newValues;\n\t},\n\tsetValues( { dispatch, context, bindings, clientId, select } ) {\n\t\tconst { getBlockName } = select( blockEditorStore );\n\n\t\tconst blockName = getBlockName?.( clientId );\n\n\t\t// Navigaton block types are read-only.\n\t\t// See https://github.com/WordPress/gutenberg/pull/72165.\n\t\tif ( NAVIGATION_BLOCK_TYPES.includes( blockName ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tconst newData = {};\n\t\tObject.values( bindings ).forEach( ( { args, newValue } ) => {\n\t\t\tnewData[ args.field ] = newValue;\n\t\t} );\n\n\t\tdispatch( coreDataStore ).editEntityRecord(\n\t\t\t'postType',\n\t\t\tcontext?.postType,\n\t\t\tcontext?.postId,\n\t\t\tnewData\n\t\t);\n\t},\n\tcanUserEditValue( { select, context } ) {\n\t\tconst { getBlockName, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\t\tconst clientId = getSelectedBlockClientId();\n\t\tconst blockName = getBlockName?.( clientId );\n\n\t\t// Navigaton block types are read-only.\n\t\t// See https://github.com/WordPress/gutenberg/pull/72165.\n\t\tif ( NAVIGATION_BLOCK_TYPES.includes( blockName ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Lock editing in query loop.\n\t\tif ( context?.query || context?.queryId ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Lock editing when `postType` is not defined.\n\t\tif ( ! context?.postType ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check that the user has the capability to edit post data.\n\t\tconst canUserEdit = select( coreDataStore ).canUser( 'update', {\n\t\t\tkind: 'postType',\n\t\t\tname: context?.postType,\n\t\t\tid: context?.postId,\n\t\t} );\n\t\tif ( ! canUserEdit ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\tgetFieldsList( { select } ) {\n\t\tconst selectedBlock = select( blockEditorStore ).getSelectedBlock();\n\t\tif ( selectedBlock?.name !== 'core/post-date' ) {\n\t\t\treturn [];\n\t\t}\n\t\t// Exit early for navigation blocks (read-only)\n\t\tif ( NAVIGATION_BLOCK_TYPES.includes( selectedBlock?.name ) ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn postDataFields;\n\t},\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["blockEditorStore", "coreDataStore"]
|
|
7
7
|
}
|
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/editor/src/bindings/post-meta.js
|
|
19
21
|
var post_meta_exports = {};
|
|
20
22
|
__export(post_meta_exports, {
|
|
21
23
|
default: () => post_meta_default
|
|
@@ -25,45 +27,51 @@ var import_core_data = require("@wordpress/core-data");
|
|
|
25
27
|
var import_store = require("../store");
|
|
26
28
|
var import_lock_unlock = require("../lock-unlock");
|
|
27
29
|
function getPostMetaFields(select, context) {
|
|
28
|
-
const { getEditedEntityRecord } = select(import_core_data.store);
|
|
29
30
|
const { getRegisteredPostMeta } = (0, import_lock_unlock.unlock)(select(import_core_data.store));
|
|
30
|
-
let entityMetaValues;
|
|
31
|
-
if (context?.postType && context?.postId) {
|
|
32
|
-
entityMetaValues = getEditedEntityRecord(
|
|
33
|
-
"postType",
|
|
34
|
-
context?.postType,
|
|
35
|
-
context?.postId
|
|
36
|
-
).meta;
|
|
37
|
-
}
|
|
38
31
|
const registeredFields = getRegisteredPostMeta(context?.postType);
|
|
39
|
-
const metaFields =
|
|
40
|
-
Object.entries(registeredFields
|
|
41
|
-
if (key
|
|
42
|
-
|
|
43
|
-
label: props.title || key,
|
|
44
|
-
value: (
|
|
45
|
-
// When using the entity value, an empty string IS a valid value.
|
|
46
|
-
entityMetaValues?.[key] ?? // When using the default, an empty string IS NOT a valid value.
|
|
47
|
-
(props.default || void 0)
|
|
48
|
-
),
|
|
49
|
-
type: props.type
|
|
50
|
-
};
|
|
32
|
+
const metaFields = [];
|
|
33
|
+
Object.entries(registeredFields).forEach(([key, props]) => {
|
|
34
|
+
if (key === "footnotes" || key.charAt(0) === "_") {
|
|
35
|
+
return;
|
|
51
36
|
}
|
|
37
|
+
metaFields.push({
|
|
38
|
+
label: props.title || key,
|
|
39
|
+
args: { key },
|
|
40
|
+
default: props.default,
|
|
41
|
+
type: props.type
|
|
42
|
+
});
|
|
52
43
|
});
|
|
53
|
-
if (!Object.keys(metaFields || {}).length) {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
44
|
return metaFields;
|
|
57
45
|
}
|
|
46
|
+
function getValue({ select, context, args }) {
|
|
47
|
+
const metaFields = getPostMetaFields(select, context);
|
|
48
|
+
const metaField = metaFields.find(
|
|
49
|
+
(field) => field.args.key === args.key
|
|
50
|
+
);
|
|
51
|
+
if (!metaField) {
|
|
52
|
+
return args.key;
|
|
53
|
+
}
|
|
54
|
+
if (!context?.postId) {
|
|
55
|
+
return metaField.default || metaField.label || args.key;
|
|
56
|
+
}
|
|
57
|
+
const { getEditedEntityRecord } = select(import_core_data.store);
|
|
58
|
+
const entityMetaValues = getEditedEntityRecord(
|
|
59
|
+
"postType",
|
|
60
|
+
context?.postType,
|
|
61
|
+
context?.postId
|
|
62
|
+
).meta;
|
|
63
|
+
return entityMetaValues?.[args.key] ?? metaField?.label ?? args.key;
|
|
64
|
+
}
|
|
58
65
|
var post_meta_default = {
|
|
59
66
|
name: "core/post-meta",
|
|
60
67
|
getValues({ select, context, bindings }) {
|
|
61
|
-
const metaFields = getPostMetaFields(select, context);
|
|
62
68
|
const newValues = {};
|
|
63
|
-
for (const [attributeName,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
for (const [attributeName, binding] of Object.entries(bindings)) {
|
|
70
|
+
newValues[attributeName] = getValue({
|
|
71
|
+
select,
|
|
72
|
+
context,
|
|
73
|
+
args: binding.args
|
|
74
|
+
});
|
|
67
75
|
}
|
|
68
76
|
return newValues;
|
|
69
77
|
},
|
|
@@ -88,8 +96,11 @@ var post_meta_default = {
|
|
|
88
96
|
if (!context?.postType) {
|
|
89
97
|
return false;
|
|
90
98
|
}
|
|
91
|
-
const
|
|
92
|
-
|
|
99
|
+
const metaFields = getPostMetaFields(select, context);
|
|
100
|
+
const hasMatchingMetaField = metaFields.some(
|
|
101
|
+
(field) => field.args.key === args.key
|
|
102
|
+
);
|
|
103
|
+
if (!hasMatchingMetaField) {
|
|
93
104
|
return false;
|
|
94
105
|
}
|
|
95
106
|
const areCustomFieldsEnabled = select(import_store.store).getEditorSettings().enableCustomFields;
|
|
@@ -108,14 +119,11 @@ var post_meta_default = {
|
|
|
108
119
|
},
|
|
109
120
|
getFieldsList({ select, context }) {
|
|
110
121
|
const metaFields = getPostMetaFields(select, context);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
type: field.type,
|
|
117
|
-
args: { key }
|
|
118
|
-
}));
|
|
122
|
+
return metaFields.map(
|
|
123
|
+
({ default: defaultProp, ...otherProps }) => ({
|
|
124
|
+
...otherProps
|
|
125
|
+
})
|
|
126
|
+
);
|
|
119
127
|
}
|
|
120
128
|
};
|
|
121
129
|
//# sourceMappingURL=post-meta.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/bindings/post-meta.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\n/**\n * Gets a list of post meta fields with their values and labels\n * to be consumed in the needed callbacks.\n * If the value is not available based on context, like in templates,\n * it falls back to the default value, label, or key.\n *\n * @param {Object} select The select function from the data store.\n * @param {Object} context The context provided.\n * @return {Object} List of post meta fields with their value and label.\n *\n * @example\n * ```js\n * {\n * field_1_key: {\n * label: 'Field 1 Label',\n * value: 'Field 1 Value',\n * },\n * field_2_key: {\n * label: 'Field 2 Label',\n * value: 'Field 2 Value',\n * },\n * ...\n * }\n * ```\n */\nfunction getPostMetaFields( select, context ) {\n\tconst {
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\n/**\n * Gets a list of post meta fields with their values and labels\n * to be consumed in the needed callbacks.\n * If the value is not available based on context, like in templates,\n * it falls back to the default value, label, or key.\n *\n * @param {Object} select The select function from the data store.\n * @param {Object} context The context provided.\n * @return {Object} List of post meta fields with their value and label.\n *\n * @example\n * ```js\n * {\n * field_1_key: {\n * label: 'Field 1 Label',\n * value: 'Field 1 Value',\n * },\n * field_2_key: {\n * label: 'Field 2 Label',\n * value: 'Field 2 Value',\n * },\n * ...\n * }\n * ```\n */\nfunction getPostMetaFields( select, context ) {\n\tconst { getRegisteredPostMeta } = unlock( select( coreDataStore ) );\n\n\tconst registeredFields = getRegisteredPostMeta( context?.postType );\n\tconst metaFields = [];\n\tObject.entries( registeredFields ).forEach( ( [ key, props ] ) => {\n\t\t// Don't include footnotes or private fields.\n\t\tif ( key === 'footnotes' || key.charAt( 0 ) === '_' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmetaFields.push( {\n\t\t\tlabel: props.title || key,\n\t\t\targs: { key },\n\t\t\tdefault: props.default,\n\t\t\ttype: props.type,\n\t\t} );\n\t} );\n\n\treturn metaFields;\n}\n\nfunction getValue( { select, context, args } ) {\n\tconst metaFields = getPostMetaFields( select, context );\n\tconst metaField = metaFields.find(\n\t\t( field ) => field.args.key === args.key\n\t);\n\n\t// If the meta field was not found, it's either protected, inaccessible, or simply doesn't exist.\n\tif ( ! metaField ) {\n\t\treturn args.key;\n\t}\n\n\t// Without a postId, we cannot look up a meta value.\n\tif ( ! context?.postId ) {\n\t\t// Return the default value for the meta field if available.\n\t\treturn metaField.default || metaField.label || args.key;\n\t}\n\n\tconst { getEditedEntityRecord } = select( coreDataStore );\n\tconst entityMetaValues = getEditedEntityRecord(\n\t\t'postType',\n\t\tcontext?.postType,\n\t\tcontext?.postId\n\t).meta;\n\n\treturn entityMetaValues?.[ args.key ] ?? metaField?.label ?? args.key;\n}\n\n/**\n * @type {WPBlockBindingsSource}\n */\nexport default {\n\tname: 'core/post-meta',\n\tgetValues( { select, context, bindings } ) {\n\t\tconst newValues = {};\n\t\tfor ( const [ attributeName, binding ] of Object.entries( bindings ) ) {\n\t\t\tnewValues[ attributeName ] = getValue( {\n\t\t\t\tselect,\n\t\t\t\tcontext,\n\t\t\t\targs: binding.args,\n\t\t\t} );\n\t\t}\n\t\treturn newValues;\n\t},\n\tsetValues( { dispatch, context, bindings } ) {\n\t\tconst newMeta = {};\n\t\tObject.values( bindings ).forEach( ( { args, newValue } ) => {\n\t\t\tnewMeta[ args.key ] = newValue;\n\t\t} );\n\n\t\tdispatch( coreDataStore ).editEntityRecord(\n\t\t\t'postType',\n\t\t\tcontext?.postType,\n\t\t\tcontext?.postId,\n\t\t\t{\n\t\t\t\tmeta: newMeta,\n\t\t\t}\n\t\t);\n\t},\n\tcanUserEditValue( { select, context, args } ) {\n\t\t// Lock editing in query loop.\n\t\tif ( context?.query || context?.queryId ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Lock editing when `postType` is not defined.\n\t\tif ( ! context?.postType ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst metaFields = getPostMetaFields( select, context );\n\t\tconst hasMatchingMetaField = metaFields.some(\n\t\t\t( field ) => field.args.key === args.key\n\t\t);\n\t\tif ( ! hasMatchingMetaField ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check that custom fields metabox is not enabled.\n\t\tconst areCustomFieldsEnabled =\n\t\t\tselect( editorStore ).getEditorSettings().enableCustomFields;\n\t\tif ( areCustomFieldsEnabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check that the user has the capability to edit post meta.\n\t\tconst canUserEdit = select( coreDataStore ).canUser( 'update', {\n\t\t\tkind: 'postType',\n\t\t\tname: context?.postType,\n\t\t\tid: context?.postId,\n\t\t} );\n\t\tif ( ! canUserEdit ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\tgetFieldsList( { select, context } ) {\n\t\tconst metaFields = getPostMetaFields( select, context );\n\t\t// Remove 'default' property from meta fields.\n\t\treturn metaFields.map(\n\t\t\t( { default: defaultProp, ...otherProps } ) => ( {\n\t\t\t\t...otherProps,\n\t\t\t} )\n\t\t);\n\t},\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["coreDataStore", "editorStore"]
|
|
7
7
|
}
|
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/editor/src/bindings/term-data.js
|
|
19
21
|
var term_data_exports = {};
|
|
20
22
|
__export(term_data_exports, {
|
|
21
23
|
default: () => term_data_default
|
|
@@ -24,7 +26,7 @@ module.exports = __toCommonJS(term_data_exports);
|
|
|
24
26
|
var import_i18n = require("@wordpress/i18n");
|
|
25
27
|
var import_core_data = require("@wordpress/core-data");
|
|
26
28
|
var import_block_editor = require("@wordpress/block-editor");
|
|
27
|
-
|
|
29
|
+
var NAVIGATION_BLOCK_TYPES = [
|
|
28
30
|
"core/navigation-link",
|
|
29
31
|
"core/navigation-submenu"
|
|
30
32
|
];
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/bindings/term-data.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n// Navigation block types that use special handling for backwards compatibility\nconst NAVIGATION_BLOCK_TYPES = [\n\t'core/navigation-link',\n\t'core/navigation-submenu',\n];\n\n/**\n * Creates the data fields object with the given term data values and ID value.\n *\n * @param {Object} termDataValues The term data values.\n * @param {string|number} idValue The ID value to use.\n * @return {Object} The data fields object.\n */\nfunction createDataFields( termDataValues, idValue ) {\n\treturn {\n\t\tid: {\n\t\t\tlabel: __( 'Term ID' ),\n\t\t\tvalue: idValue,\n\t\t\ttype: 'string',\n\t\t},\n\t\tname: {\n\t\t\tlabel: __( 'Name' ),\n\t\t\tvalue: termDataValues?.name,\n\t\t\ttype: 'string',\n\t\t},\n\t\tslug: {\n\t\t\tlabel: __( 'Slug' ),\n\t\t\tvalue: termDataValues?.slug,\n\t\t\ttype: 'string',\n\t\t},\n\t\tlink: {\n\t\t\tlabel: __( 'Link' ),\n\t\t\tvalue: termDataValues?.link,\n\t\t\ttype: 'string',\n\t\t},\n\t\tdescription: {\n\t\t\tlabel: __( 'Description' ),\n\t\t\tvalue: termDataValues?.description,\n\t\t\ttype: 'string',\n\t\t},\n\t\tparent: {\n\t\t\tlabel: __( 'Parent ID' ),\n\t\t\tvalue: termDataValues?.parent,\n\t\t\ttype: 'string',\n\t\t},\n\t\tcount: {\n\t\t\tlabel: __( 'Count' ),\n\t\t\tvalue: `(${ termDataValues?.count ?? 0 })`,\n\t\t\ttype: 'string',\n\t\t},\n\t};\n}\n\n/**\n * Gets a list of term data fields with their values and labels\n * to be consumed in the needed callbacks.\n * If the value is not available based on context, like in templates,\n * it falls back to the default value, label, or key.\n *\n * @param {Object} select The select function from the data store.\n * @param {Object} context The context provided.\n * @param {string} clientId The block client ID used to read attributes.\n * @return {Object} List of term data fields with their value and label.\n *\n * @example\n * ```js\n * {\n * name: {\n * label: 'Term Name',\n * value: 'Category Name',\n * },\n * count: {\n * label: 'Term Count',\n * value: 5,\n * },\n * ...\n * }\n * ```\n */\nfunction getTermDataFields( select, context, clientId ) {\n\tconst { getEntityRecord } = select( coreDataStore );\n\tconst { getBlockAttributes, getBlockName } = select( blockEditorStore );\n\n\tlet termDataValues, dataFields;\n\n\t/*\n\t * BACKWARDS COMPATIBILITY: Hardcoded exception for navigation blocks.\n\t * Required for WordPress 6.9+ navigation blocks. DO NOT REMOVE.\n\t */\n\tconst blockName = getBlockName?.( clientId );\n\tconst isNavigationBlock = NAVIGATION_BLOCK_TYPES.includes( blockName );\n\n\tlet termId, taxonomy;\n\n\tif ( isNavigationBlock ) {\n\t\t// Navigation blocks: read from block attributes\n\t\tconst blockAttributes = getBlockAttributes?.( clientId );\n\t\ttermId = blockAttributes?.id;\n\t\tconst typeFromAttributes = blockAttributes?.type;\n\t\ttaxonomy =\n\t\t\ttypeFromAttributes === 'tag' ? 'post_tag' : typeFromAttributes;\n\t} else {\n\t\t// All other blocks: use context\n\t\ttermId = context?.termId;\n\t\ttaxonomy = context?.taxonomy;\n\t}\n\n\tif ( taxonomy && termId ) {\n\t\ttermDataValues = getEntityRecord( 'taxonomy', taxonomy, termId );\n\n\t\tif ( ! termDataValues && context?.termData ) {\n\t\t\ttermDataValues = context.termData;\n\t\t}\n\n\t\tif ( termDataValues ) {\n\t\t\tdataFields = createDataFields( termDataValues, termId );\n\t\t}\n\t} else if ( context?.termData ) {\n\t\ttermDataValues = context.termData;\n\t\tdataFields = createDataFields(\n\t\t\ttermDataValues,\n\t\t\ttermDataValues?.term_id\n\t\t);\n\t}\n\n\tif ( ! dataFields || ! Object.keys( dataFields ).length ) {\n\t\treturn null;\n\t}\n\n\treturn dataFields;\n}\n\n/**\n * @type {WPBlockBindingsSource}\n */\nexport default {\n\tname: 'core/term-data',\n\tusesContext: [ 'taxonomy', 'termId', 'termData' ],\n\tgetValues( { select, context, bindings, clientId } ) {\n\t\tconst dataFields = getTermDataFields( select, context, clientId );\n\n\t\tconst newValues = {};\n\t\tfor ( const [ attributeName, source ] of Object.entries( bindings ) ) {\n\t\t\t// Use the value, the field label, or the field key.\n\t\t\tconst fieldKey = source.args.field;\n\t\t\tconst { value: fieldValue, label: fieldLabel } =\n\t\t\t\tdataFields?.[ fieldKey ] || {};\n\t\t\tnewValues[ attributeName ] = fieldValue ?? fieldLabel ?? fieldKey;\n\t\t}\n\t\treturn newValues;\n\t},\n\t// eslint-disable-next-line no-unused-vars\n\tsetValues( { dispatch, context, bindings } ) {\n\t\t// Terms are typically not editable through block bindings in most contexts.\n\t\treturn false;\n\t},\n\tcanUserEditValue( { select, context, args } ) {\n\t\tconst { getBlockName, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\n\t\tconst clientId = getSelectedBlockClientId();\n\t\tconst blockName = getBlockName?.( clientId );\n\n\t\t// Navigaton block types are read-only.\n\t\t// See https://github.com/WordPress/gutenberg/pull/72165.\n\t\tif ( NAVIGATION_BLOCK_TYPES.includes( blockName ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Terms are typically read-only when displayed.\n\t\tif ( context?.termQuery ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Lock editing when `taxonomy` or `termId` is not defined.\n\t\tif ( ! context?.taxonomy || ! context?.termId ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst fieldValue = getTermDataFields( select, context, undefined )?.[\n\t\t\targs.field\n\t\t]?.value;\n\t\t// Empty string or `false` could be a valid value, so we need to check if the field value is undefined.\n\t\tif ( fieldValue === undefined ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn false;\n\t},\n\tgetFieldsList( { select, context } ) {\n\t\tconst clientId = select( blockEditorStore ).getSelectedBlockClientId();\n\t\tconst termDataFields = getTermDataFields( select, context, clientId );\n\t\tif ( ! termDataFields ) {\n\t\t\treturn [];\n\t\t}\n\t\treturn Object.entries( termDataFields ).map( ( [ key, field ] ) => ( {\n\t\t\tlabel: field.label,\n\t\t\ttype: field.type,\n\t\t\targs: { field: key },\n\t\t} ) );\n\t},\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["coreDataStore", "blockEditorStore"]
|
|
7
7
|
}
|
|
@@ -26,6 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// packages/editor/src/components/autocompleters/index.js
|
|
29
31
|
var autocompleters_exports = {};
|
|
30
32
|
__export(autocompleters_exports, {
|
|
31
33
|
userAutocompleter: () => import_user.default
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/autocompleters/index.js"],
|
|
4
4
|
"sourcesContent": ["export { default as userAutocompleter } from './user';\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,16 +16,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/editor/src/components/autocompleters/user.js
|
|
19
21
|
var user_exports = {};
|
|
20
22
|
__export(user_exports, {
|
|
21
23
|
default: () => user_default,
|
|
22
24
|
getUserLabel: () => getUserLabel
|
|
23
25
|
});
|
|
24
26
|
module.exports = __toCommonJS(user_exports);
|
|
25
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
27
|
var import_element = require("@wordpress/element");
|
|
27
28
|
var import_data = require("@wordpress/data");
|
|
28
29
|
var import_core_data = require("@wordpress/core-data");
|
|
30
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
31
|
function getUserLabel(user) {
|
|
30
32
|
const avatar = user.avatar_urls && user.avatar_urls[24] ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
31
33
|
"img",
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/autocompleters/user.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\nexport function getUserLabel( user ) {\n\tconst avatar =\n\t\tuser.avatar_urls && user.avatar_urls[ 24 ] ? (\n\t\t\t<img\n\t\t\t\tclassName=\"editor-autocompleters__user-avatar\"\n\t\t\t\talt=\"\"\n\t\t\t\tsrc={ user.avatar_urls[ 24 ] }\n\t\t\t/>\n\t\t) : (\n\t\t\t<span className=\"editor-autocompleters__no-avatar\"></span>\n\t\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ avatar }\n\t\t\t<span className=\"editor-autocompleters__user-name\">\n\t\t\t\t{ user.name }\n\t\t\t</span>\n\t\t\t<span className=\"editor-autocompleters__user-slug\">\n\t\t\t\t{ user.slug }\n\t\t\t</span>\n\t\t</>\n\t);\n}\n\n/**\n * A user mentions completer.\n *\n * @type {Object}\n */\nexport default {\n\tname: 'users',\n\tclassName: 'editor-autocompleters__user',\n\ttriggerPrefix: '@',\n\n\tuseItems( filterValue ) {\n\t\tconst users = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { getUsers } = select( coreStore );\n\t\t\t\treturn getUsers( {\n\t\t\t\t\tcontext: 'view',\n\t\t\t\t\tsearch: encodeURIComponent( filterValue ),\n\t\t\t\t} );\n\t\t\t},\n\t\t\t[ filterValue ]\n\t\t);\n\n\t\tconst options = useMemo(\n\t\t\t() =>\n\t\t\t\tusers\n\t\t\t\t\t? users.map( ( user ) => ( {\n\t\t\t\t\t\t\tkey: `user-${ user.slug }`,\n\t\t\t\t\t\t\tvalue: user,\n\t\t\t\t\t\t\tlabel: getUserLabel( user ),\n\t\t\t\t\t } ) )\n\t\t\t\t\t: [],\n\t\t\t[ users ]\n\t\t);\n\n\t\treturn [ options ];\n\t},\n\n\tgetOptionCompletion( user ) {\n\t\treturn `@${ user.slug }`;\n\t},\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAwB;AACxB,kBAA0B;AAC1B,uBAAmC;AAKhC;AAHI,SAAS,aAAc,MAAO;AACpC,QAAM,SACL,KAAK,eAAe,KAAK,YAAa,EAAG,IACxC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,KAAI;AAAA,MACJ,KAAM,KAAK,YAAa,EAAG;AAAA;AAAA,EAC5B,IAEA,4CAAC,UAAK,WAAU,oCAAmC;AAGrD,SACC,4EACG;AAAA;AAAA,IACF,4CAAC,UAAK,WAAU,oCACb,eAAK,MACR;AAAA,IACA,4CAAC,UAAK,WAAU,oCACb,eAAK,MACR;AAAA,KACD;AAEF;AAOA,IAAO,eAAQ;AAAA,EACd,MAAM;AAAA,EACN,WAAW;AAAA,EACX,eAAe;AAAA,EAEf,SAAU,aAAc;AACvB,UAAM,YAAQ;AAAA,MACb,CAAE,WAAY;AACb,cAAM,EAAE,SAAS,IAAI,OAAQ,iBAAAA,KAAU;AACvC,eAAO,SAAU;AAAA,UAChB,SAAS;AAAA,UACT,QAAQ,mBAAoB,WAAY;AAAA,QACzC,CAAE;AAAA,MACH;AAAA,MACA,CAAE,WAAY;AAAA,IACf;AAEA,UAAM,cAAU;AAAA,MACf,MACC,QACG,MAAM,IAAK,CAAE,UAAY;AAAA,QACzB,KAAK,QAAS,KAAK,IAAK;AAAA,QACxB,OAAO;AAAA,QACP,OAAO,aAAc,IAAK;AAAA,MAC1B,EAAI,IACJ,CAAC;AAAA,MACL,CAAE,KAAM;AAAA,IACT;AAEA,WAAO,CAAE,OAAQ;AAAA,EAClB;AAAA,EAEA,oBAAqB,MAAO;AAC3B,WAAO,IAAK,KAAK,IAAK;AAAA,EACvB;AACD;",
|
|
6
6
|
"names": ["coreStore"]
|
|
7
7
|
}
|
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/editor/src/components/autosave-monitor/index.js
|
|
19
21
|
var autosave_monitor_exports = {};
|
|
20
22
|
__export(autosave_monitor_exports, {
|
|
21
23
|
AutosaveMonitor: () => AutosaveMonitor,
|
|
@@ -27,7 +29,7 @@ var import_compose = require("@wordpress/compose");
|
|
|
27
29
|
var import_data = require("@wordpress/data");
|
|
28
30
|
var import_core_data = require("@wordpress/core-data");
|
|
29
31
|
var import_store = require("../../store");
|
|
30
|
-
|
|
32
|
+
var AutosaveMonitor = class extends import_element.Component {
|
|
31
33
|
constructor(props) {
|
|
32
34
|
super(props);
|
|
33
35
|
this.needsAutosave = !!(props.isDirty && props.isAutosaveable);
|
|
@@ -82,7 +84,7 @@ class AutosaveMonitor extends import_element.Component {
|
|
|
82
84
|
render() {
|
|
83
85
|
return null;
|
|
84
86
|
}
|
|
85
|
-
}
|
|
87
|
+
};
|
|
86
88
|
var autosave_monitor_default = (0, import_compose.compose)([
|
|
87
89
|
(0, import_data.withSelect)((select, ownProps) => {
|
|
88
90
|
const { getReferenceByDistinctEdits } = select(import_core_data.store);
|