@wordpress/editor 14.33.5 → 14.34.1-next.2f1c7c01b.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/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 +4 -2
- package/build/bindings/post-data.js.map +1 -1
- package/build/bindings/post-meta.js +2 -0
- package/build/bindings/post-meta.js.map +1 -1
- 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 +10 -8
- package/build/components/collab-sidebar/add-comment.js.map +2 -2
- package/build/components/collab-sidebar/comment-author-info.js +3 -1
- package/build/components/collab-sidebar/comment-author-info.js.map +1 -1
- package/build/components/collab-sidebar/comment-form.js +3 -1
- package/build/components/collab-sidebar/comment-form.js.map +1 -1
- package/build/components/collab-sidebar/comment-indicator-toolbar.js +5 -3
- package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +1 -1
- package/build/components/collab-sidebar/comment-menu-item.js +6 -4
- package/build/components/collab-sidebar/comment-menu-item.js.map +1 -1
- package/build/components/collab-sidebar/comments.js +40 -31
- package/build/components/collab-sidebar/comments.js.map +2 -2
- 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 +3 -1
- package/build/components/collab-sidebar/hooks.js.map +1 -1
- package/build/components/collab-sidebar/index.js +15 -13
- package/build/components/collab-sidebar/index.js.map +2 -2
- package/build/components/collab-sidebar/utils.js +5 -6
- 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 +6 -4
- package/build/components/commands/index.js.map +1 -1
- package/build/components/deprecated.js +55 -53
- package/build/components/deprecated.js.map +1 -1
- package/build/components/document-bar/index.js +20 -5
- package/build/components/document-bar/index.js.map +2 -2
- 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 +26 -5
- 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 +19 -12
- package/build/components/editor-interface/index.js.map +3 -3
- 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 +22 -16
- package/build/components/entities-saved-states/entity-type-list.js.map +3 -3
- 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 +1 -1
- 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 +72 -0
- package/build/components/global-styles/block-link.js.map +7 -0
- package/build/components/global-styles/header.js +56 -0
- package/build/components/global-styles/header.js.map +7 -0
- package/build/components/global-styles/hooks.js +178 -0
- package/build/components/global-styles/hooks.js.map +7 -0
- package/build/components/global-styles/index.js +140 -0
- package/build/components/global-styles/index.js.map +7 -0
- package/build/components/global-styles/menu.js +97 -0
- package/build/components/global-styles/menu.js.map +7 -0
- package/build/components/global-styles-provider/index.js +5 -49
- package/build/components/global-styles-provider/index.js.map +3 -3
- package/build/components/global-styles-renderer/index.js +57 -0
- package/build/components/global-styles-renderer/index.js.map +7 -0
- package/build/components/global-styles-sidebar/default-sidebar.js +68 -0
- package/build/components/global-styles-sidebar/default-sidebar.js.map +7 -0
- package/build/components/global-styles-sidebar/index.js +184 -0
- package/build/components/global-styles-sidebar/index.js.map +7 -0
- package/build/components/global-styles-sidebar/welcome-guide-image.js +39 -0
- package/build/components/global-styles-sidebar/welcome-guide-image.js.map +7 -0
- package/build/components/global-styles-sidebar/welcome-guide.js +145 -0
- package/build/components/global-styles-sidebar/welcome-guide.js.map +7 -0
- 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 +17 -12
- package/build/components/header/index.js.map +2 -2
- 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 +3 -1
- package/build/components/more-menu/index.js.map +1 -1
- 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 +41 -8
- package/build/components/post-featured-image/index.js.map +3 -3
- 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 +3 -1
- package/build/components/post-template/panel.js.map +1 -1
- 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 +7 -5
- package/build/components/post-title/index.js.map +1 -1
- 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 -8
- package/build/components/provider/index.js.map +3 -3
- 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 +88 -0
- package/build/components/style-book/categories.js.map +7 -0
- package/build/components/style-book/color-examples.js +66 -0
- package/build/components/style-book/color-examples.js.map +7 -0
- package/build/components/style-book/constants.js +321 -0
- package/build/components/style-book/constants.js.map +7 -0
- package/build/components/style-book/duotone-examples.js +70 -0
- package/build/components/style-book/duotone-examples.js.map +7 -0
- package/build/components/style-book/examples.js +239 -0
- package/build/components/style-book/examples.js.map +7 -0
- package/build/components/style-book/index.js +629 -0
- package/build/components/style-book/index.js.map +7 -0
- package/build/components/style-book/types.js +19 -0
- package/build/components/style-book/types.js.map +7 -0
- package/build/components/styles-canvas/index.js +140 -0
- package/build/components/styles-canvas/index.js.map +7 -0
- package/build/components/styles-canvas/revisions.js +123 -0
- package/build/components/styles-canvas/revisions.js.map +7 -0
- package/build/components/styles-canvas/style-book.js +70 -0
- package/build/components/styles-canvas/style-book.js.map +7 -0
- 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 +7 -4
- package/build/components/visual-editor/index.js.map +2 -2
- 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 +4 -2
- package/build/dataviews/fields/content-preview/content-preview-view.js.map +2 -2
- 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 +3 -0
- package/build/hooks/index.js.map +2 -2
- package/build/hooks/media-upload.js +17 -4
- package/build/hooks/media-upload.js.map +3 -3
- 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 +5 -3
- package/build/hooks/pattern-overrides.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +324 -0
- package/build/hooks/push-changes-to-global-styles/index.js.map +7 -0
- 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 +76 -0
- package/build/hooks/use-global-styles-output.js.map +7 -0
- 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 +14 -7
- package/build/private-apis.js.map +3 -3
- package/build/store/actions.js +53 -51
- package/build/store/actions.js.map +1 -1
- 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 +32 -7
- package/build/store/private-actions.js.map +2 -2
- package/build/store/private-selectors.js +20 -8
- package/build/store/private-selectors.js.map +2 -2
- package/build/store/reducer.js +26 -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/{components/editor-interface/content-slot-fill.js → utils/set-nested-value.js} +26 -10
- package/build/utils/set-nested-value.js.map +7 -0
- 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 +3 -2
- package/build-module/bindings/post-data.js.map +1 -1
- package/build-module/bindings/post-meta.js +1 -0
- package/build-module/bindings/post-meta.js.map +1 -1
- 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 +9 -8
- package/build-module/components/collab-sidebar/add-comment.js.map +2 -2
- package/build-module/components/collab-sidebar/comment-author-info.js +2 -1
- package/build-module/components/collab-sidebar/comment-author-info.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-form.js +2 -1
- package/build-module/components/collab-sidebar/comment-form.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +4 -3
- package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-menu-item.js +5 -4
- package/build-module/components/collab-sidebar/comment-menu-item.js.map +1 -1
- package/build-module/components/collab-sidebar/comments.js +39 -31
- 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 +2 -1
- package/build-module/components/collab-sidebar/hooks.js.map +1 -1
- package/build-module/components/collab-sidebar/index.js +14 -13
- package/build-module/components/collab-sidebar/index.js.map +2 -2
- package/build-module/components/collab-sidebar/utils.js +4 -6
- 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 +5 -4
- package/build-module/components/commands/index.js.map +1 -1
- 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 +19 -5
- package/build-module/components/document-bar/index.js.map +2 -2
- 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 +25 -5
- 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 +18 -12
- package/build-module/components/editor-interface/index.js.map +2 -2
- 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 +20 -15
- package/build-module/components/entities-saved-states/entity-type-list.js.map +2 -2
- 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 +1 -1
- 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 +47 -0
- package/build-module/components/global-styles/block-link.js.map +7 -0
- package/build-module/components/global-styles/header.js +42 -0
- package/build-module/components/global-styles/header.js.map +7 -0
- package/build-module/components/global-styles/hooks.js +155 -0
- package/build-module/components/global-styles/hooks.js.map +7 -0
- package/build-module/components/global-styles/index.js +113 -0
- package/build-module/components/global-styles/index.js.map +7 -0
- package/build-module/components/global-styles/menu.js +72 -0
- package/build-module/components/global-styles/menu.js.map +7 -0
- package/build-module/components/global-styles-provider/index.js +4 -37
- package/build-module/components/global-styles-provider/index.js.map +2 -2
- package/build-module/components/global-styles-renderer/index.js +32 -0
- package/build-module/components/global-styles-renderer/index.js.map +7 -0
- package/build-module/components/global-styles-sidebar/default-sidebar.js +50 -0
- package/build-module/components/global-styles-sidebar/default-sidebar.js.map +7 -0
- package/build-module/components/global-styles-sidebar/index.js +153 -0
- package/build-module/components/global-styles-sidebar/index.js.map +7 -0
- package/build-module/components/global-styles-sidebar/welcome-guide-image.js +18 -0
- package/build-module/components/global-styles-sidebar/welcome-guide-image.js.map +7 -0
- package/build-module/components/global-styles-sidebar/welcome-guide.js +114 -0
- package/build-module/components/global-styles-sidebar/welcome-guide.js.map +7 -0
- 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 +16 -12
- package/build-module/components/header/index.js.map +2 -2
- 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 +2 -1
- package/build-module/components/more-menu/index.js.map +1 -1
- 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 +42 -9
- package/build-module/components/post-featured-image/index.js.map +2 -2
- 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 +2 -1
- package/build-module/components/post-template/panel.js.map +1 -1
- 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 +3 -2
- package/build-module/components/post-title/index.js.map +1 -1
- 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 -8
- package/build-module/components/provider/index.js.map +2 -2
- 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 +65 -0
- package/build-module/components/style-book/categories.js.map +7 -0
- package/build-module/components/style-book/color-examples.js +38 -0
- package/build-module/components/style-book/color-examples.js.map +7 -0
- package/build-module/components/style-book/constants.js +291 -0
- package/build-module/components/style-book/constants.js.map +7 -0
- package/build-module/components/style-book/duotone-examples.js +49 -0
- package/build-module/components/style-book/duotone-examples.js.map +7 -0
- package/build-module/components/style-book/examples.js +209 -0
- package/build-module/components/style-book/examples.js.map +7 -0
- package/build-module/components/style-book/index.js +619 -0
- package/build-module/components/style-book/index.js.map +7 -0
- package/build-module/components/style-book/types.js +1 -0
- package/build-module/components/style-book/types.js.map +7 -0
- package/build-module/components/styles-canvas/index.js +105 -0
- package/build-module/components/styles-canvas/index.js.map +7 -0
- package/build-module/components/styles-canvas/revisions.js +108 -0
- package/build-module/components/styles-canvas/revisions.js.map +7 -0
- package/build-module/components/styles-canvas/style-book.js +39 -0
- package/build-module/components/styles-canvas/style-book.js.map +7 -0
- 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 +6 -4
- package/build-module/components/visual-editor/index.js.map +2 -2
- 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 +3 -2
- 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 +2 -0
- package/build-module/hooks/index.js.map +2 -2
- package/build-module/hooks/media-upload.js +20 -5
- package/build-module/hooks/media-upload.js.map +2 -2
- 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 +4 -3
- package/build-module/hooks/pattern-overrides.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +310 -0
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +7 -0
- 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 +50 -0
- package/build-module/hooks/use-global-styles-output.js.map +7 -0
- 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 +13 -10
- package/build-module/private-apis.js.map +2 -2
- package/build-module/store/actions.js +52 -51
- package/build-module/store/actions.js.map +1 -1
- 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 +28 -7
- package/build-module/store/private-actions.js.map +2 -2
- package/build-module/store/private-selectors.js +17 -8
- package/build-module/store/private-selectors.js.map +2 -2
- package/build-module/store/reducer.js +23 -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 +24 -0
- package/build-module/utils/set-nested-value.js.map +7 -0
- 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 +3020 -13
- package/build-style/style.css +3021 -13
- 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/comments.d.ts +3 -3
- package/build-types/components/collab-sidebar/comments.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 +2 -2
- package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
- package/build-types/components/document-bar/index.d.ts +2 -2
- package/build-types/components/document-bar/index.d.ts.map +1 -1
- package/build-types/components/editor/index.d.ts.map +1 -1
- package/build-types/components/editor-interface/index.d.ts +1 -3
- package/build-types/components/editor-interface/index.d.ts.map +1 -1
- package/build-types/components/entities-saved-states/entity-type-list.d.ts.map +1 -1
- package/build-types/components/global-styles/block-link.d.ts +12 -0
- package/build-types/components/global-styles/block-link.d.ts.map +1 -0
- package/build-types/components/global-styles/header.d.ts +7 -0
- package/build-types/components/global-styles/header.d.ts.map +1 -0
- package/build-types/components/global-styles/hooks.d.ts +24 -0
- package/build-types/components/global-styles/hooks.d.ts.map +1 -0
- package/build-types/components/global-styles/index.d.ts +6 -0
- package/build-types/components/global-styles/index.d.ts.map +1 -0
- package/build-types/components/global-styles/menu.d.ts +13 -0
- package/build-types/components/global-styles/menu.d.ts.map +1 -0
- package/build-types/components/global-styles-provider/index.d.ts +1 -5
- package/build-types/components/global-styles-provider/index.d.ts.map +1 -1
- package/build-types/components/global-styles-renderer/index.d.ts +4 -0
- package/build-types/components/global-styles-renderer/index.d.ts.map +1 -0
- package/build-types/components/global-styles-sidebar/default-sidebar.d.ts +13 -0
- package/build-types/components/global-styles-sidebar/default-sidebar.d.ts.map +1 -0
- package/build-types/components/global-styles-sidebar/index.d.ts +2 -0
- package/build-types/components/global-styles-sidebar/index.d.ts.map +1 -0
- package/build-types/components/global-styles-sidebar/welcome-guide-image.d.ts +5 -0
- package/build-types/components/global-styles-sidebar/welcome-guide-image.d.ts.map +1 -0
- package/build-types/components/global-styles-sidebar/welcome-guide.d.ts +2 -0
- package/build-types/components/global-styles-sidebar/welcome-guide.d.ts.map +1 -0
- package/build-types/components/header/index.d.ts +1 -3
- package/build-types/components/header/index.d.ts.map +1 -1
- package/build-types/components/provider/index.d.ts.map +1 -1
- package/build-types/components/start-page-options/index.d.ts.map +1 -1
- package/build-types/components/style-book/categories.d.ts +18 -0
- package/build-types/components/style-book/categories.d.ts.map +1 -0
- package/build-types/components/style-book/color-examples.d.ts +7 -0
- package/build-types/components/style-book/color-examples.d.ts.map +1 -0
- package/build-types/components/style-book/constants.d.ts +11 -0
- package/build-types/components/style-book/constants.d.ts.map +1 -0
- package/build-types/components/style-book/duotone-examples.d.ts +9 -0
- package/build-types/components/style-book/duotone-examples.d.ts.map +1 -0
- package/build-types/components/style-book/examples.d.ts +12 -0
- package/build-types/components/style-book/examples.d.ts.map +1 -0
- package/build-types/components/style-book/index.d.ts +31 -0
- package/build-types/components/style-book/index.d.ts.map +1 -0
- package/build-types/components/style-book/types.d.ts +72 -0
- package/build-types/components/style-book/types.d.ts.map +1 -0
- package/build-types/components/styles-canvas/index.d.ts +16 -0
- package/build-types/components/styles-canvas/index.d.ts.map +1 -0
- package/build-types/components/styles-canvas/revisions.d.ts +5 -0
- package/build-types/components/styles-canvas/revisions.d.ts.map +1 -0
- package/build-types/components/styles-canvas/style-book.d.ts +6 -0
- package/build-types/components/styles-canvas/style-book.d.ts.map +1 -0
- package/build-types/components/visual-editor/index.d.ts +1 -2
- package/build-types/components/visual-editor/index.d.ts.map +1 -1
- package/build-types/dataviews/fields/content-preview/content-preview-view.d.ts.map +1 -1
- package/build-types/hooks/push-changes-to-global-styles/index.d.ts +2 -0
- package/build-types/hooks/push-changes-to-global-styles/index.d.ts.map +1 -0
- package/build-types/hooks/use-global-styles-output.d.ts +18 -0
- package/build-types/hooks/use-global-styles-output.d.ts.map +1 -0
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/store/private-actions.d.ts +20 -0
- package/build-types/store/private-actions.d.ts.map +1 -1
- package/build-types/store/private-selectors.d.ts +14 -0
- package/build-types/store/private-selectors.d.ts.map +1 -1
- package/build-types/store/reducer.d.ts +20 -0
- package/build-types/store/reducer.d.ts.map +1 -1
- package/build-types/store/selectors.d.ts.map +1 -1
- package/build-types/utils/set-nested-value.d.ts +20 -0
- package/build-types/utils/set-nested-value.d.ts.map +1 -0
- package/package.json +40 -40
- package/src/components/collab-sidebar/add-comment.js +10 -6
- package/src/components/collab-sidebar/comments.js +42 -28
- package/src/components/collab-sidebar/index.js +14 -12
- package/src/components/collab-sidebar/style.scss +2 -1
- package/src/components/collab-sidebar/utils.js +3 -12
- package/src/components/document-bar/index.js +18 -3
- package/src/components/editor/index.js +25 -1
- package/src/components/editor-help/style.scss +1 -1
- package/src/components/editor-interface/index.js +40 -39
- package/src/components/entities-saved-states/entity-type-list.js +19 -17
- package/src/components/global-styles/block-link.js +65 -0
- package/src/components/global-styles/header.js +48 -0
- package/src/components/global-styles/hooks.js +216 -0
- package/src/components/global-styles/index.js +125 -0
- package/src/components/global-styles/menu.js +101 -0
- package/src/components/global-styles/style.scss +11 -0
- package/src/components/global-styles-provider/index.js +3 -45
- package/src/components/global-styles-renderer/index.js +39 -0
- package/src/components/global-styles-sidebar/default-sidebar.js +46 -0
- package/src/components/global-styles-sidebar/index.js +177 -0
- package/src/components/global-styles-sidebar/style.scss +119 -0
- package/src/components/global-styles-sidebar/welcome-guide-image.js +11 -0
- package/src/components/global-styles-sidebar/welcome-guide.js +136 -0
- package/src/components/header/index.js +11 -6
- package/src/components/post-featured-image/index.js +44 -1
- package/src/components/post-last-revision/style.scss +1 -1
- package/src/components/post-panel-row/style.scss +1 -0
- package/src/components/post-publish-panel/style.scss +1 -1
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +2 -2
- package/src/components/preferences-modal/index.js +1 -1
- package/src/components/provider/index.js +0 -2
- package/src/components/start-page-options/index.js +5 -6
- package/src/components/start-page-options/style.scss +1 -1
- package/src/components/style-book/categories.ts +97 -0
- package/src/components/style-book/color-examples.tsx +56 -0
- package/src/components/style-book/constants.ts +308 -0
- package/src/components/style-book/duotone-examples.tsx +56 -0
- package/src/components/style-book/examples.tsx +273 -0
- package/src/components/style-book/index.js +794 -0
- package/src/components/style-book/style.scss +44 -0
- package/src/components/style-book/test/categories.js +166 -0
- package/src/components/style-book/types.ts +80 -0
- package/src/components/styles-canvas/index.js +126 -0
- package/src/components/styles-canvas/revisions.js +144 -0
- package/src/components/styles-canvas/style-book.js +57 -0
- package/src/components/styles-canvas/style.scss +40 -0
- package/src/components/visual-editor/index.js +2 -1
- package/src/dataviews/fields/content-preview/content-preview-view.tsx +2 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/media-upload.js +25 -5
- package/src/hooks/push-changes-to-global-styles/index.js +391 -0
- package/src/hooks/push-changes-to-global-styles/style.scss +4 -0
- package/src/hooks/use-global-styles-output.js +76 -0
- package/src/private-apis.js +10 -8
- package/src/store/private-actions.js +37 -0
- package/src/store/private-selectors.js +20 -0
- package/src/store/reducer.js +36 -0
- package/src/store/selectors.js +0 -2
- package/src/style.scss +7 -1
- package/src/utils/set-nested-value.js +39 -0
- package/tsconfig.json +3 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/block-settings-menu/content-only-settings-menu.js +0 -186
- package/build/components/block-settings-menu/content-only-settings-menu.js.map +0 -7
- package/build/components/editor-interface/content-slot-fill.js.map +0 -7
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +0 -161
- package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +0 -7
- package/build-module/components/editor-interface/content-slot-fill.js +0 -9
- package/build-module/components/editor-interface/content-slot-fill.js.map +0 -7
- package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts +0 -2
- package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts.map +0 -1
- package/build-types/components/editor-interface/content-slot-fill.d.ts +0 -14
- package/build-types/components/editor-interface/content-slot-fill.d.ts.map +0 -1
- package/src/components/block-settings-menu/content-only-settings-menu.js +0 -185
- package/src/components/block-settings-menu/content-only-settings-menu.native.js +0 -4
- package/src/components/block-settings-menu/style.scss +0 -6
- package/src/components/editor-interface/content-slot-fill.js +0 -10
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
|
|
25
|
+
// packages/editor/src/hooks/push-changes-to-global-styles/index.js
|
|
26
|
+
var import_hooks = require("@wordpress/hooks");
|
|
27
|
+
var import_compose = require("@wordpress/compose");
|
|
28
|
+
var import_block_editor = require("@wordpress/block-editor");
|
|
29
|
+
var import_components = require("@wordpress/components");
|
|
30
|
+
var import_i18n = require("@wordpress/i18n");
|
|
31
|
+
var import_blocks = require("@wordpress/blocks");
|
|
32
|
+
var import_element = require("@wordpress/element");
|
|
33
|
+
var import_data = require("@wordpress/data");
|
|
34
|
+
var import_notices = require("@wordpress/notices");
|
|
35
|
+
var import_core_data = require("@wordpress/core-data");
|
|
36
|
+
var import_lock_unlock = require("../../lock-unlock");
|
|
37
|
+
var import_set_nested_value = __toESM(require("../../utils/set-nested-value"));
|
|
38
|
+
var import_hooks2 = require("../../components/global-styles/hooks");
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
+
var { cleanEmptyObject } = (0, import_lock_unlock.unlock)(import_block_editor.privateApis);
|
|
41
|
+
var STYLE_PROPERTY = {
|
|
42
|
+
...import_blocks.__EXPERIMENTAL_STYLE_PROPERTY,
|
|
43
|
+
blockGap: { value: ["spacing", "blockGap"] }
|
|
44
|
+
};
|
|
45
|
+
var STYLE_PATH_TO_CSS_VAR_INFIX = {
|
|
46
|
+
"border.color": "color",
|
|
47
|
+
"color.background": "color",
|
|
48
|
+
"color.text": "color",
|
|
49
|
+
"elements.link.color.text": "color",
|
|
50
|
+
"elements.link.:hover.color.text": "color",
|
|
51
|
+
"elements.link.typography.fontFamily": "font-family",
|
|
52
|
+
"elements.link.typography.fontSize": "font-size",
|
|
53
|
+
"elements.button.color.text": "color",
|
|
54
|
+
"elements.button.color.background": "color",
|
|
55
|
+
"elements.button.typography.fontFamily": "font-family",
|
|
56
|
+
"elements.button.typography.fontSize": "font-size",
|
|
57
|
+
"elements.caption.color.text": "color",
|
|
58
|
+
"elements.heading.color": "color",
|
|
59
|
+
"elements.heading.color.background": "color",
|
|
60
|
+
"elements.heading.typography.fontFamily": "font-family",
|
|
61
|
+
"elements.heading.gradient": "gradient",
|
|
62
|
+
"elements.heading.color.gradient": "gradient",
|
|
63
|
+
"elements.h1.color": "color",
|
|
64
|
+
"elements.h1.color.background": "color",
|
|
65
|
+
"elements.h1.typography.fontFamily": "font-family",
|
|
66
|
+
"elements.h1.color.gradient": "gradient",
|
|
67
|
+
"elements.h2.color": "color",
|
|
68
|
+
"elements.h2.color.background": "color",
|
|
69
|
+
"elements.h2.typography.fontFamily": "font-family",
|
|
70
|
+
"elements.h2.color.gradient": "gradient",
|
|
71
|
+
"elements.h3.color": "color",
|
|
72
|
+
"elements.h3.color.background": "color",
|
|
73
|
+
"elements.h3.typography.fontFamily": "font-family",
|
|
74
|
+
"elements.h3.color.gradient": "gradient",
|
|
75
|
+
"elements.h4.color": "color",
|
|
76
|
+
"elements.h4.color.background": "color",
|
|
77
|
+
"elements.h4.typography.fontFamily": "font-family",
|
|
78
|
+
"elements.h4.color.gradient": "gradient",
|
|
79
|
+
"elements.h5.color": "color",
|
|
80
|
+
"elements.h5.color.background": "color",
|
|
81
|
+
"elements.h5.typography.fontFamily": "font-family",
|
|
82
|
+
"elements.h5.color.gradient": "gradient",
|
|
83
|
+
"elements.h6.color": "color",
|
|
84
|
+
"elements.h6.color.background": "color",
|
|
85
|
+
"elements.h6.typography.fontFamily": "font-family",
|
|
86
|
+
"elements.h6.color.gradient": "gradient",
|
|
87
|
+
"color.gradient": "gradient",
|
|
88
|
+
blockGap: "spacing",
|
|
89
|
+
"typography.fontSize": "font-size",
|
|
90
|
+
"typography.fontFamily": "font-family"
|
|
91
|
+
};
|
|
92
|
+
var STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE = {
|
|
93
|
+
"border.color": "borderColor",
|
|
94
|
+
"color.background": "backgroundColor",
|
|
95
|
+
"color.text": "textColor",
|
|
96
|
+
"color.gradient": "gradient",
|
|
97
|
+
"typography.fontSize": "fontSize",
|
|
98
|
+
"typography.fontFamily": "fontFamily"
|
|
99
|
+
};
|
|
100
|
+
var SUPPORTED_STYLES = ["border", "color", "spacing", "typography"];
|
|
101
|
+
var getValueFromObjectPath = (object, path) => {
|
|
102
|
+
let value = object;
|
|
103
|
+
path.forEach((fieldName) => {
|
|
104
|
+
value = value?.[fieldName];
|
|
105
|
+
});
|
|
106
|
+
return value;
|
|
107
|
+
};
|
|
108
|
+
var flatBorderProperties = ["borderColor", "borderWidth", "borderStyle"];
|
|
109
|
+
var sides = ["top", "right", "bottom", "left"];
|
|
110
|
+
function getBorderStyleChanges(border, presetColor, userStyle) {
|
|
111
|
+
if (!border && !presetColor) {
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
const changes = [
|
|
115
|
+
...getFallbackBorderStyleChange("top", border, userStyle),
|
|
116
|
+
...getFallbackBorderStyleChange("right", border, userStyle),
|
|
117
|
+
...getFallbackBorderStyleChange("bottom", border, userStyle),
|
|
118
|
+
...getFallbackBorderStyleChange("left", border, userStyle)
|
|
119
|
+
];
|
|
120
|
+
const { color: customColor, style, width } = border || {};
|
|
121
|
+
const hasColorOrWidth = presetColor || customColor || width;
|
|
122
|
+
if (hasColorOrWidth && !style) {
|
|
123
|
+
sides.forEach((side) => {
|
|
124
|
+
if (!userStyle?.[side]?.style) {
|
|
125
|
+
changes.push({
|
|
126
|
+
path: ["border", side, "style"],
|
|
127
|
+
value: "solid"
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return changes;
|
|
133
|
+
}
|
|
134
|
+
function getFallbackBorderStyleChange(side, border, globalBorderStyle) {
|
|
135
|
+
if (!border?.[side] || globalBorderStyle?.[side]?.style) {
|
|
136
|
+
return [];
|
|
137
|
+
}
|
|
138
|
+
const { color, style, width } = border[side];
|
|
139
|
+
const hasColorOrWidth = color || width;
|
|
140
|
+
if (!hasColorOrWidth || style) {
|
|
141
|
+
return [];
|
|
142
|
+
}
|
|
143
|
+
return [{ path: ["border", side, "style"], value: "solid" }];
|
|
144
|
+
}
|
|
145
|
+
function useChangesToPush(name, attributes, userConfig) {
|
|
146
|
+
const supports = (0, import_data.useSelect)(
|
|
147
|
+
(select) => {
|
|
148
|
+
return (0, import_lock_unlock.unlock)(select(import_blocks.store)).getSupportedStyles(name);
|
|
149
|
+
},
|
|
150
|
+
[name]
|
|
151
|
+
);
|
|
152
|
+
const blockUserConfig = userConfig?.styles?.blocks?.[name];
|
|
153
|
+
return (0, import_element.useMemo)(() => {
|
|
154
|
+
const changes = supports.flatMap((key) => {
|
|
155
|
+
if (!STYLE_PROPERTY[key]) {
|
|
156
|
+
return [];
|
|
157
|
+
}
|
|
158
|
+
const { value: path } = STYLE_PROPERTY[key];
|
|
159
|
+
const presetAttributeKey = path.join(".");
|
|
160
|
+
const presetAttributeValue = attributes[STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE[presetAttributeKey]];
|
|
161
|
+
const value = presetAttributeValue ? `var:preset|${STYLE_PATH_TO_CSS_VAR_INFIX[presetAttributeKey]}|${presetAttributeValue}` : getValueFromObjectPath(attributes.style, path);
|
|
162
|
+
if (key === "linkColor") {
|
|
163
|
+
const linkChanges = value ? [{ path, value }] : [];
|
|
164
|
+
const hoverPath = [
|
|
165
|
+
"elements",
|
|
166
|
+
"link",
|
|
167
|
+
":hover",
|
|
168
|
+
"color",
|
|
169
|
+
"text"
|
|
170
|
+
];
|
|
171
|
+
const hoverValue = getValueFromObjectPath(
|
|
172
|
+
attributes.style,
|
|
173
|
+
hoverPath
|
|
174
|
+
);
|
|
175
|
+
if (hoverValue) {
|
|
176
|
+
linkChanges.push({ path: hoverPath, value: hoverValue });
|
|
177
|
+
}
|
|
178
|
+
return linkChanges;
|
|
179
|
+
}
|
|
180
|
+
if (flatBorderProperties.includes(key) && value) {
|
|
181
|
+
const borderChanges = [{ path, value }];
|
|
182
|
+
sides.forEach((side) => {
|
|
183
|
+
const currentPath = [...path];
|
|
184
|
+
currentPath.splice(-1, 0, side);
|
|
185
|
+
borderChanges.push({ path: currentPath, value });
|
|
186
|
+
});
|
|
187
|
+
return borderChanges;
|
|
188
|
+
}
|
|
189
|
+
return value ? [{ path, value }] : [];
|
|
190
|
+
});
|
|
191
|
+
getBorderStyleChanges(
|
|
192
|
+
attributes.style?.border,
|
|
193
|
+
attributes.borderColor,
|
|
194
|
+
blockUserConfig?.border
|
|
195
|
+
).forEach((change) => changes.push(change));
|
|
196
|
+
return changes;
|
|
197
|
+
}, [supports, attributes, blockUserConfig]);
|
|
198
|
+
}
|
|
199
|
+
function PushChangesToGlobalStylesControl({
|
|
200
|
+
name,
|
|
201
|
+
attributes,
|
|
202
|
+
setAttributes
|
|
203
|
+
}) {
|
|
204
|
+
const { user: userConfig, setUser: setUserConfig } = (0, import_hooks2.useGlobalStyles)();
|
|
205
|
+
const changes = useChangesToPush(name, attributes, userConfig);
|
|
206
|
+
const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data.useDispatch)(import_block_editor.store);
|
|
207
|
+
const { createSuccessNotice } = (0, import_data.useDispatch)(import_notices.store);
|
|
208
|
+
const pushChanges = (0, import_element.useCallback)(() => {
|
|
209
|
+
if (changes.length === 0) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
if (changes.length > 0) {
|
|
213
|
+
const { style: blockStyles } = attributes;
|
|
214
|
+
const newBlockStyles = structuredClone(blockStyles);
|
|
215
|
+
const newUserConfig = structuredClone(userConfig);
|
|
216
|
+
for (const { path, value } of changes) {
|
|
217
|
+
(0, import_set_nested_value.default)(newBlockStyles, path, void 0);
|
|
218
|
+
(0, import_set_nested_value.default)(
|
|
219
|
+
newUserConfig,
|
|
220
|
+
["styles", "blocks", name, ...path],
|
|
221
|
+
value
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
const newBlockAttributes = {
|
|
225
|
+
borderColor: void 0,
|
|
226
|
+
backgroundColor: void 0,
|
|
227
|
+
textColor: void 0,
|
|
228
|
+
gradient: void 0,
|
|
229
|
+
fontSize: void 0,
|
|
230
|
+
fontFamily: void 0,
|
|
231
|
+
style: cleanEmptyObject(newBlockStyles)
|
|
232
|
+
};
|
|
233
|
+
__unstableMarkNextChangeAsNotPersistent();
|
|
234
|
+
setAttributes(newBlockAttributes);
|
|
235
|
+
setUserConfig(newUserConfig, { undoIgnore: true });
|
|
236
|
+
createSuccessNotice(
|
|
237
|
+
(0, import_i18n.sprintf)(
|
|
238
|
+
// translators: %s: Title of the block e.g. 'Heading'.
|
|
239
|
+
(0, import_i18n.__)("%s styles applied."),
|
|
240
|
+
(0, import_blocks.getBlockType)(name).title
|
|
241
|
+
),
|
|
242
|
+
{
|
|
243
|
+
type: "snackbar",
|
|
244
|
+
actions: [
|
|
245
|
+
{
|
|
246
|
+
label: (0, import_i18n.__)("Undo"),
|
|
247
|
+
onClick() {
|
|
248
|
+
__unstableMarkNextChangeAsNotPersistent();
|
|
249
|
+
setAttributes(attributes);
|
|
250
|
+
setUserConfig(userConfig, {
|
|
251
|
+
undoIgnore: true
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
}, [
|
|
260
|
+
__unstableMarkNextChangeAsNotPersistent,
|
|
261
|
+
attributes,
|
|
262
|
+
changes,
|
|
263
|
+
createSuccessNotice,
|
|
264
|
+
name,
|
|
265
|
+
setAttributes,
|
|
266
|
+
setUserConfig,
|
|
267
|
+
userConfig
|
|
268
|
+
]);
|
|
269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
270
|
+
import_components.BaseControl,
|
|
271
|
+
{
|
|
272
|
+
__nextHasNoMarginBottom: true,
|
|
273
|
+
className: "editor-push-changes-to-global-styles-control",
|
|
274
|
+
help: (0, import_i18n.sprintf)(
|
|
275
|
+
// translators: %s: Title of the block e.g. 'Heading'.
|
|
276
|
+
(0, import_i18n.__)(
|
|
277
|
+
"Apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks."
|
|
278
|
+
),
|
|
279
|
+
(0, import_blocks.getBlockType)(name).title
|
|
280
|
+
),
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.BaseControl.VisualLabel, { children: (0, import_i18n.__)("Styles") }),
|
|
283
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
284
|
+
import_components.Button,
|
|
285
|
+
{
|
|
286
|
+
__next40pxDefaultSize: true,
|
|
287
|
+
variant: "secondary",
|
|
288
|
+
accessibleWhenDisabled: true,
|
|
289
|
+
disabled: changes.length === 0,
|
|
290
|
+
onClick: pushChanges,
|
|
291
|
+
children: (0, import_i18n.__)("Apply globally")
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
function PushChangesToGlobalStyles(props) {
|
|
299
|
+
const blockEditingMode = (0, import_block_editor.useBlockEditingMode)();
|
|
300
|
+
const isBlockBasedTheme = (0, import_data.useSelect)(
|
|
301
|
+
(select) => select(import_core_data.store).getCurrentTheme()?.is_block_theme,
|
|
302
|
+
[]
|
|
303
|
+
);
|
|
304
|
+
const supportsStyles = SUPPORTED_STYLES.some(
|
|
305
|
+
(feature) => (0, import_blocks.hasBlockSupport)(props.name, feature)
|
|
306
|
+
);
|
|
307
|
+
const isDisplayed = blockEditingMode === "default" && supportsStyles && isBlockBasedTheme;
|
|
308
|
+
if (!isDisplayed) {
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_block_editor.InspectorAdvancedControls, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PushChangesToGlobalStylesControl, { ...props }) });
|
|
312
|
+
}
|
|
313
|
+
var withPushChangesToGlobalStyles = (0, import_compose.createHigherOrderComponent)(
|
|
314
|
+
(BlockEdit) => (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
315
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BlockEdit, { ...props }, "edit"),
|
|
316
|
+
props.isSelected && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PushChangesToGlobalStyles, { ...props })
|
|
317
|
+
] })
|
|
318
|
+
);
|
|
319
|
+
(0, import_hooks.addFilter)(
|
|
320
|
+
"editor.BlockEdit",
|
|
321
|
+
"core/editor/push-changes-to-global-styles",
|
|
322
|
+
withPushChangesToGlobalStyles
|
|
323
|
+
);
|
|
324
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/push-changes-to-global-styles/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport {\n\tInspectorAdvancedControls,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { BaseControl, Button } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__EXPERIMENTAL_STYLE_PROPERTY,\n\tgetBlockType,\n\thasBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport setNestedValue from '../../utils/set-nested-value';\nimport { useGlobalStyles } from '../../components/global-styles/hooks';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\n// Block Gap is a special case and isn't defined within the blocks\n// style properties config. We'll add it here to allow it to be pushed\n// to global styles as well.\nconst STYLE_PROPERTY = {\n\t...__EXPERIMENTAL_STYLE_PROPERTY,\n\tblockGap: { value: [ 'spacing', 'blockGap' ] },\n};\n\n// TODO: Temporary duplication of constant in @wordpress/block-editor. Can be\n// removed by moving PushChangesToGlobalStylesControl to\n// @wordpress/block-editor.\nconst STYLE_PATH_TO_CSS_VAR_INFIX = {\n\t'border.color': 'color',\n\t'color.background': 'color',\n\t'color.text': 'color',\n\t'elements.link.color.text': 'color',\n\t'elements.link.:hover.color.text': 'color',\n\t'elements.link.typography.fontFamily': 'font-family',\n\t'elements.link.typography.fontSize': 'font-size',\n\t'elements.button.color.text': 'color',\n\t'elements.button.color.background': 'color',\n\t'elements.button.typography.fontFamily': 'font-family',\n\t'elements.button.typography.fontSize': 'font-size',\n\t'elements.caption.color.text': 'color',\n\t'elements.heading.color': 'color',\n\t'elements.heading.color.background': 'color',\n\t'elements.heading.typography.fontFamily': 'font-family',\n\t'elements.heading.gradient': 'gradient',\n\t'elements.heading.color.gradient': 'gradient',\n\t'elements.h1.color': 'color',\n\t'elements.h1.color.background': 'color',\n\t'elements.h1.typography.fontFamily': 'font-family',\n\t'elements.h1.color.gradient': 'gradient',\n\t'elements.h2.color': 'color',\n\t'elements.h2.color.background': 'color',\n\t'elements.h2.typography.fontFamily': 'font-family',\n\t'elements.h2.color.gradient': 'gradient',\n\t'elements.h3.color': 'color',\n\t'elements.h3.color.background': 'color',\n\t'elements.h3.typography.fontFamily': 'font-family',\n\t'elements.h3.color.gradient': 'gradient',\n\t'elements.h4.color': 'color',\n\t'elements.h4.color.background': 'color',\n\t'elements.h4.typography.fontFamily': 'font-family',\n\t'elements.h4.color.gradient': 'gradient',\n\t'elements.h5.color': 'color',\n\t'elements.h5.color.background': 'color',\n\t'elements.h5.typography.fontFamily': 'font-family',\n\t'elements.h5.color.gradient': 'gradient',\n\t'elements.h6.color': 'color',\n\t'elements.h6.color.background': 'color',\n\t'elements.h6.typography.fontFamily': 'font-family',\n\t'elements.h6.color.gradient': 'gradient',\n\t'color.gradient': 'gradient',\n\tblockGap: 'spacing',\n\t'typography.fontSize': 'font-size',\n\t'typography.fontFamily': 'font-family',\n};\n\n// TODO: Temporary duplication of constant in @wordpress/block-editor. Can be\n// removed by moving PushChangesToGlobalStylesControl to\n// @wordpress/block-editor.\nconst STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE = {\n\t'border.color': 'borderColor',\n\t'color.background': 'backgroundColor',\n\t'color.text': 'textColor',\n\t'color.gradient': 'gradient',\n\t'typography.fontSize': 'fontSize',\n\t'typography.fontFamily': 'fontFamily',\n};\n\nconst SUPPORTED_STYLES = [ 'border', 'color', 'spacing', 'typography' ];\n\nconst getValueFromObjectPath = ( object, path ) => {\n\tlet value = object;\n\tpath.forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value;\n};\n\nconst flatBorderProperties = [ 'borderColor', 'borderWidth', 'borderStyle' ];\nconst sides = [ 'top', 'right', 'bottom', 'left' ];\n\nfunction getBorderStyleChanges( border, presetColor, userStyle ) {\n\tif ( ! border && ! presetColor ) {\n\t\treturn [];\n\t}\n\n\tconst changes = [\n\t\t...getFallbackBorderStyleChange( 'top', border, userStyle ),\n\t\t...getFallbackBorderStyleChange( 'right', border, userStyle ),\n\t\t...getFallbackBorderStyleChange( 'bottom', border, userStyle ),\n\t\t...getFallbackBorderStyleChange( 'left', border, userStyle ),\n\t];\n\n\t// Handle a flat border i.e. all sides the same, CSS shorthand.\n\tconst { color: customColor, style, width } = border || {};\n\tconst hasColorOrWidth = presetColor || customColor || width;\n\n\tif ( hasColorOrWidth && ! style ) {\n\t\t// Global Styles need individual side configurations to overcome\n\t\t// theme.json configurations which are per side as well.\n\t\tsides.forEach( ( side ) => {\n\t\t\t// Only add fallback border-style if global styles don't already\n\t\t\t// have something set.\n\t\t\tif ( ! userStyle?.[ side ]?.style ) {\n\t\t\t\tchanges.push( {\n\t\t\t\t\tpath: [ 'border', side, 'style' ],\n\t\t\t\t\tvalue: 'solid',\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn changes;\n}\n\nfunction getFallbackBorderStyleChange( side, border, globalBorderStyle ) {\n\tif ( ! border?.[ side ] || globalBorderStyle?.[ side ]?.style ) {\n\t\treturn [];\n\t}\n\n\tconst { color, style, width } = border[ side ];\n\tconst hasColorOrWidth = color || width;\n\n\tif ( ! hasColorOrWidth || style ) {\n\t\treturn [];\n\t}\n\n\treturn [ { path: [ 'border', side, 'style' ], value: 'solid' } ];\n}\n\nfunction useChangesToPush( name, attributes, userConfig ) {\n\tconst supports = useSelect(\n\t\t( select ) => {\n\t\t\treturn unlock( select( blocksStore ) ).getSupportedStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst blockUserConfig = userConfig?.styles?.blocks?.[ name ];\n\n\treturn useMemo( () => {\n\t\tconst changes = supports.flatMap( ( key ) => {\n\t\t\tif ( ! STYLE_PROPERTY[ key ] ) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst { value: path } = STYLE_PROPERTY[ key ];\n\t\t\tconst presetAttributeKey = path.join( '.' );\n\t\t\tconst presetAttributeValue =\n\t\t\t\tattributes[\n\t\t\t\t\tSTYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE[ presetAttributeKey ]\n\t\t\t\t];\n\t\t\tconst value = presetAttributeValue\n\t\t\t\t? `var:preset|${ STYLE_PATH_TO_CSS_VAR_INFIX[ presetAttributeKey ] }|${ presetAttributeValue }`\n\t\t\t\t: getValueFromObjectPath( attributes.style, path );\n\n\t\t\t// Links only have a single support entry but have two element\n\t\t\t// style properties, color and hover color. The following check\n\t\t\t// will add the hover color to the changes if required.\n\t\t\tif ( key === 'linkColor' ) {\n\t\t\t\tconst linkChanges = value ? [ { path, value } ] : [];\n\t\t\t\tconst hoverPath = [\n\t\t\t\t\t'elements',\n\t\t\t\t\t'link',\n\t\t\t\t\t':hover',\n\t\t\t\t\t'color',\n\t\t\t\t\t'text',\n\t\t\t\t];\n\t\t\t\tconst hoverValue = getValueFromObjectPath(\n\t\t\t\t\tattributes.style,\n\t\t\t\t\thoverPath\n\t\t\t\t);\n\n\t\t\t\tif ( hoverValue ) {\n\t\t\t\t\tlinkChanges.push( { path: hoverPath, value: hoverValue } );\n\t\t\t\t}\n\n\t\t\t\treturn linkChanges;\n\t\t\t}\n\n\t\t\t// The shorthand border styles can't be mapped directly as global\n\t\t\t// styles requires longhand config.\n\t\t\tif ( flatBorderProperties.includes( key ) && value ) {\n\t\t\t\t// The shorthand config path is included to clear the block attribute.\n\t\t\t\tconst borderChanges = [ { path, value } ];\n\t\t\t\tsides.forEach( ( side ) => {\n\t\t\t\t\tconst currentPath = [ ...path ];\n\t\t\t\t\tcurrentPath.splice( -1, 0, side );\n\t\t\t\t\tborderChanges.push( { path: currentPath, value } );\n\t\t\t\t} );\n\t\t\t\treturn borderChanges;\n\t\t\t}\n\n\t\t\treturn value ? [ { path, value } ] : [];\n\t\t} );\n\n\t\t// To ensure display of a visible border, global styles require a\n\t\t// default border style if a border color or width is present.\n\t\tgetBorderStyleChanges(\n\t\t\tattributes.style?.border,\n\t\t\tattributes.borderColor,\n\t\t\tblockUserConfig?.border\n\t\t).forEach( ( change ) => changes.push( change ) );\n\n\t\treturn changes;\n\t}, [ supports, attributes, blockUserConfig ] );\n}\n\nfunction PushChangesToGlobalStylesControl( {\n\tname,\n\tattributes,\n\tsetAttributes,\n} ) {\n\tconst { user: userConfig, setUser: setUserConfig } = useGlobalStyles();\n\n\tconst changes = useChangesToPush( name, attributes, userConfig );\n\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst pushChanges = useCallback( () => {\n\t\tif ( changes.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( changes.length > 0 ) {\n\t\t\tconst { style: blockStyles } = attributes;\n\n\t\t\tconst newBlockStyles = structuredClone( blockStyles );\n\t\t\tconst newUserConfig = structuredClone( userConfig );\n\n\t\t\tfor ( const { path, value } of changes ) {\n\t\t\t\tsetNestedValue( newBlockStyles, path, undefined );\n\t\t\t\tsetNestedValue(\n\t\t\t\t\tnewUserConfig,\n\t\t\t\t\t[ 'styles', 'blocks', name, ...path ],\n\t\t\t\t\tvalue\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst newBlockAttributes = {\n\t\t\t\tborderColor: undefined,\n\t\t\t\tbackgroundColor: undefined,\n\t\t\t\ttextColor: undefined,\n\t\t\t\tgradient: undefined,\n\t\t\t\tfontSize: undefined,\n\t\t\t\tfontFamily: undefined,\n\t\t\t\tstyle: cleanEmptyObject( newBlockStyles ),\n\t\t\t};\n\n\t\t\t// @wordpress/core-data doesn't support editing multiple entity types in\n\t\t\t// a single undo level. So for now, we disable @wordpress/core-data undo\n\t\t\t// tracking and implement our own Undo button in the snackbar\n\t\t\t// notification.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( newBlockAttributes );\n\t\t\tsetUserConfig( newUserConfig, { undoIgnore: true } );\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: Title of the block e.g. 'Heading'.\n\t\t\t\t\t__( '%s styles applied.' ),\n\t\t\t\t\tgetBlockType( name ).title\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\t\t\t\t\tsetAttributes( attributes );\n\t\t\t\t\t\t\t\tsetUserConfig( userConfig, {\n\t\t\t\t\t\t\t\t\tundoIgnore: true,\n\t\t\t\t\t\t\t\t} );\n\t\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\t\t__unstableMarkNextChangeAsNotPersistent,\n\t\tattributes,\n\t\tchanges,\n\t\tcreateSuccessNotice,\n\t\tname,\n\t\tsetAttributes,\n\t\tsetUserConfig,\n\t\tuserConfig,\n\t] );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"editor-push-changes-to-global-styles-control\"\n\t\t\thelp={ sprintf(\n\t\t\t\t// translators: %s: Title of the block e.g. 'Heading'.\n\t\t\t\t__(\n\t\t\t\t\t'Apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks.'\n\t\t\t\t),\n\t\t\t\tgetBlockType( name ).title\n\t\t\t) }\n\t\t>\n\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t{ __( 'Styles' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tdisabled={ changes.length === 0 }\n\t\t\t\tonClick={ pushChanges }\n\t\t\t>\n\t\t\t\t{ __( 'Apply globally' ) }\n\t\t\t</Button>\n\t\t</BaseControl>\n\t);\n}\n\nfunction PushChangesToGlobalStyles( props ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst isBlockBasedTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t[]\n\t);\n\tconst supportsStyles = SUPPORTED_STYLES.some( ( feature ) =>\n\t\thasBlockSupport( props.name, feature )\n\t);\n\tconst isDisplayed =\n\t\tblockEditingMode === 'default' && supportsStyles && isBlockBasedTheme;\n\n\tif ( ! isDisplayed ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<InspectorAdvancedControls>\n\t\t\t<PushChangesToGlobalStylesControl { ...props } />\n\t\t</InspectorAdvancedControls>\n\t);\n}\n\nconst withPushChangesToGlobalStyles = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => (\n\t\t<>\n\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t{ props.isSelected && <PushChangesToGlobalStyles { ...props } /> }\n\t\t</>\n\t)\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/push-changes-to-global-styles',\n\twithPushChangesToGlobalStyles\n);\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["import_hooks", "blockEditorPrivateApis", "blocksStore", "blockEditorStore", "noticesStore", "setNestedValue", "coreStore"]
|
|
7
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
// packages/editor/src/hooks/template-part-navigation-edit-button.js
|
|
3
4
|
var import_hooks = require("@wordpress/hooks");
|
|
4
5
|
var import_compose = require("@wordpress/compose");
|
|
5
6
|
var import_element = require("@wordpress/element");
|
|
@@ -8,9 +9,10 @@ var import_block_editor = require("@wordpress/block-editor");
|
|
|
8
9
|
var import_components = require("@wordpress/components");
|
|
9
10
|
var import_data = require("@wordpress/data");
|
|
10
11
|
var import_interface = require("@wordpress/interface");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
13
|
+
var NAVIGATION_BLOCK_NAME = "core/navigation";
|
|
14
|
+
var TEMPLATE_PART_BLOCK_NAME = "core/template-part";
|
|
15
|
+
var BLOCK_INSPECTOR_AREA = "edit-post/block";
|
|
14
16
|
function TemplatePartNavigationEditButton({ clientId }) {
|
|
15
17
|
const { selectBlock, flashBlock } = (0, import_data.useDispatch)(import_block_editor.store);
|
|
16
18
|
const { enableComplementaryArea } = (0, import_data.useDispatch)(import_interface.store);
|
|
@@ -68,7 +70,7 @@ function TemplatePartNavigationEditButton({ clientId }) {
|
|
|
68
70
|
)
|
|
69
71
|
] }) });
|
|
70
72
|
}
|
|
71
|
-
|
|
73
|
+
var withTemplatePartNavigationEditButton = (0, import_compose.createHigherOrderComponent)(
|
|
72
74
|
(BlockEdit) => (props) => {
|
|
73
75
|
const isTemplatePart = props.name === TEMPLATE_PART_BLOCK_NAME;
|
|
74
76
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/hooks/template-part-navigation-edit-button.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useCallback } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBlockControls,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tToolbarButton,\n\tToolbarGroup,\n\t__experimentalDivider as Divider,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n// Block name constants\nconst NAVIGATION_BLOCK_NAME = 'core/navigation';\nconst TEMPLATE_PART_BLOCK_NAME = 'core/template-part';\n\n// Complementary area identifier for the block inspector\nconst BLOCK_INSPECTOR_AREA = 'edit-post/block';\n\n/**\n * Component that renders the \"Edit navigation\" button for template parts\n * that contain navigation blocks.\n *\n * @param {Object} props Component props.\n * @param {string} props.clientId The template part block client ID.\n * @return {JSX.Element|null} The Edit navigation button component or null if not applicable.\n */\nfunction TemplatePartNavigationEditButton( { clientId } ) {\n\tconst { selectBlock, flashBlock } = useDispatch( blockEditorStore );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tconst {\n\t\thasNavigationBlocks,\n\t\tfirstNavigationBlockId,\n\t\tisNavigationEditable,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetClientIdsOfDescendants,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst descendants = getClientIdsOfDescendants( clientId );\n\t\t\tconst navigationBlocksInTemplatePart = descendants.filter(\n\t\t\t\t( blockId ) => getBlockName( blockId ) === NAVIGATION_BLOCK_NAME\n\t\t\t);\n\n\t\t\tconst _hasNavigationBlocks =\n\t\t\t\tnavigationBlocksInTemplatePart.length > 0;\n\t\t\tconst _firstNavigationBlockId = _hasNavigationBlocks\n\t\t\t\t? navigationBlocksInTemplatePart[ 0 ]\n\t\t\t\t: null;\n\n\t\t\treturn {\n\t\t\t\thasNavigationBlocks: _hasNavigationBlocks,\n\t\t\t\tfirstNavigationBlockId: _firstNavigationBlockId,\n\t\t\t\t// We can't use the useBlockEditingMode hook here because the current\n\t\t\t\t// context is the template part, not the navigation block.\n\t\t\t\tisNavigationEditable:\n\t\t\t\t\tgetBlockEditingMode( _firstNavigationBlockId ) !==\n\t\t\t\t\t'disabled',\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst onEditNavigation = useCallback( () => {\n\t\tif ( firstNavigationBlockId ) {\n\t\t\t// Select the first Navigation block\n\t\t\tselectBlock( firstNavigationBlockId );\n\n\t\t\t// Flash the block for 500ms to make it obvious\n\t\t\tflashBlock( firstNavigationBlockId, 500 );\n\n\t\t\t// Enable the complementary area (inspector)\n\t\t\tenableComplementaryArea( 'core', BLOCK_INSPECTOR_AREA );\n\t\t}\n\t}, [\n\t\tfirstNavigationBlockId,\n\t\tselectBlock,\n\t\tflashBlock,\n\t\tenableComplementaryArea,\n\t] );\n\n\t// Only show if template part contains navigation blocks and they are editable\n\tif ( ! hasNavigationBlocks || ! isNavigationEditable ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockControls group=\"other\">\n\t\t\t<ToolbarGroup>\n\t\t\t\t{ /*\n\t\t\t\t * Add a vertical divider to visually separate the \"Edit navigation\"\n\t\t\t\t * button from the template part's \"Edit\" button. Both buttons share\n\t\t\t\t * the same toolbar group (\"other\"), so without this divider they\n\t\t\t\t * would appear directly adjacent with no visual separation.\n\t\t\t\t */ }\n\t\t\t\t<Divider orientation=\"vertical\" marginEnd={ 3 } />\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tlabel={ __( 'Edit navigation' ) }\n\t\t\t\t\tonClick={ onEditNavigation }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Edit navigation' ) }\n\t\t\t\t</ToolbarButton>\n\t\t\t</ToolbarGroup>\n\t\t</BlockControls>\n\t);\n}\n\n/**\n * Higher-order component that adds the Edit navigation button to template part blocks.\n */\nconst withTemplatePartNavigationEditButton = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isTemplatePart = props.name === TEMPLATE_PART_BLOCK_NAME;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t\t{ props.isSelected && isTemplatePart && (\n\t\t\t\t\t<TemplatePartNavigationEditButton\n\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t},\n\t'withTemplatePartNavigationEditButton'\n);\n\n// Register the filter.\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/with-template-part-navigation-edit-button',\n\twithTemplatePartNavigationEditButton\n);\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;AAGA,mBAA0B;AAC1B,qBAA2C;AAC3C,qBAA4B;AAC5B,kBAAmB;AACnB,0BAGO;AACP,wBAIO;AACP,kBAAuC;AACvC,uBAAwC;AAkFrC;AA/EH,IAAM,wBAAwB;AAC9B,IAAM,2BAA2B;AAGjC,IAAM,uBAAuB;AAU7B,SAAS,iCAAkC,EAAE,SAAS,GAAI;AACzD,QAAM,EAAE,aAAa,WAAW,QAAI,yBAAa,oBAAAA,KAAiB;AAClE,QAAM,EAAE,wBAAwB,QAAI,yBAAa,iBAAAC,KAAe;AAEhE,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACD,QAAI;AAAA,IACH,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,oBAAAD,KAAiB;AAE7B,YAAM,cAAc,0BAA2B,QAAS;AACxD,YAAM,iCAAiC,YAAY;AAAA,QAClD,CAAE,YAAa,aAAc,OAAQ,MAAM;AAAA,MAC5C;AAEA,YAAM,uBACL,+BAA+B,SAAS;AACzC,YAAM,0BAA0B,uBAC7B,+BAAgC,CAAE,IAClC;AAEH,aAAO;AAAA,QACN,qBAAqB;AAAA,QACrB,wBAAwB;AAAA;AAAA;AAAA,QAGxB,sBACC,oBAAqB,uBAAwB,MAC7C;AAAA,MACF;AAAA,IACD;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AAEA,QAAM,uBAAmB,4BAAa,MAAM;AAC3C,QAAK,wBAAyB;AAE7B,kBAAa,sBAAuB;AAGpC,iBAAY,wBAAwB,GAAI;AAGxC,8BAAyB,QAAQ,oBAAqB;AAAA,IACvD;AAAA,EACD,GAAG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AAGF,MAAK,CAAE,uBAAuB,CAAE,sBAAuB;AACtD,WAAO;AAAA,EACR;AAEA,SACC,4CAAC,qCAAc,OAAM,SACpB,uDAAC,kCAOA;AAAA,gDAAC,kBAAAE,uBAAA,EAAQ,aAAY,YAAW,WAAY,GAAI;AAAA,IAChD;AAAA,MAAC;AAAA;AAAA,QACA,WAAQ,gBAAI,iBAAkB;AAAA,QAC9B,SAAU;AAAA,QAER,8BAAI,iBAAkB;AAAA;AAAA,IACzB;AAAA,KACD,GACD;AAEF;AAKA,IAAM,2CAAuC;AAAA,EAC5C,CAAE,cAAe,CAAE,UAAW;AAC7B,UAAM,iBAAiB,MAAM,SAAS;AAEtC,WACC,4EACC;AAAA,kDAAC,aAAuB,GAAG,SAAZ,MAAoB;AAAA,MACjC,MAAM,cAAc,kBACrB;AAAA,QAAC;AAAA;AAAA,UACA,UAAW,MAAM;AAAA;AAAA,MAClB;AAAA,OAEF;AAAA,EAEF;AAAA,EACA;AACD;AAAA,IAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
|
|
6
6
|
"names": ["blockEditorStore", "interfaceStore", "Divider"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/editor/src/hooks/use-global-styles-output.js
|
|
21
|
+
var use_global_styles_output_exports = {};
|
|
22
|
+
__export(use_global_styles_output_exports, {
|
|
23
|
+
useGlobalStylesOutput: () => useGlobalStylesOutput,
|
|
24
|
+
useGlobalStylesOutputWithConfig: () => useGlobalStylesOutputWithConfig
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(use_global_styles_output_exports);
|
|
27
|
+
var import_blocks = require("@wordpress/blocks");
|
|
28
|
+
var import_data = require("@wordpress/data");
|
|
29
|
+
var import_element = require("@wordpress/element");
|
|
30
|
+
var import_global_styles_engine = require("@wordpress/global-styles-engine");
|
|
31
|
+
var import_store = require("../store");
|
|
32
|
+
var import_global_styles = require("../components/global-styles");
|
|
33
|
+
function useGlobalStylesOutputWithConfig(mergedConfig = {}, disableRootPadding = false) {
|
|
34
|
+
const blockGap = (0, import_global_styles.useSetting)("spacing.blockGap");
|
|
35
|
+
const hasBlockGapSupport = blockGap !== null;
|
|
36
|
+
const hasFallbackGapSupport = !hasBlockGapSupport;
|
|
37
|
+
const { disableLayoutStyles, getBlockStyles } = (0, import_data.useSelect)((select) => {
|
|
38
|
+
const { getEditorSettings } = select(import_store.store);
|
|
39
|
+
const { getBlockStyles: getBlockStylesSelector } = select(import_blocks.store);
|
|
40
|
+
const settings = getEditorSettings();
|
|
41
|
+
return {
|
|
42
|
+
disableLayoutStyles: !!settings?.disableLayoutStyles,
|
|
43
|
+
getBlockStyles: getBlockStylesSelector
|
|
44
|
+
};
|
|
45
|
+
}, []);
|
|
46
|
+
return (0, import_element.useMemo)(() => {
|
|
47
|
+
if (!mergedConfig?.styles || !mergedConfig?.settings) {
|
|
48
|
+
return [[], {}];
|
|
49
|
+
}
|
|
50
|
+
const blockTypes = (0, import_blocks.getBlockTypes)();
|
|
51
|
+
return (0, import_global_styles_engine.generateGlobalStyles)(mergedConfig, blockTypes, {
|
|
52
|
+
hasBlockGapSupport,
|
|
53
|
+
hasFallbackGapSupport,
|
|
54
|
+
disableLayoutStyles,
|
|
55
|
+
disableRootPadding,
|
|
56
|
+
getBlockStyles
|
|
57
|
+
});
|
|
58
|
+
}, [
|
|
59
|
+
hasBlockGapSupport,
|
|
60
|
+
hasFallbackGapSupport,
|
|
61
|
+
mergedConfig,
|
|
62
|
+
disableLayoutStyles,
|
|
63
|
+
disableRootPadding,
|
|
64
|
+
getBlockStyles
|
|
65
|
+
]);
|
|
66
|
+
}
|
|
67
|
+
function useGlobalStylesOutput(disableRootPadding = false) {
|
|
68
|
+
const { merged: mergedConfig } = (0, import_global_styles.useGlobalStyles)();
|
|
69
|
+
return useGlobalStylesOutputWithConfig(mergedConfig, disableRootPadding);
|
|
70
|
+
}
|
|
71
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
+
0 && (module.exports = {
|
|
73
|
+
useGlobalStylesOutput,
|
|
74
|
+
useGlobalStylesOutputWithConfig
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=use-global-styles-output.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/hooks/use-global-styles-output.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { generateGlobalStyles } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { useSetting, useGlobalStyles } from '../components/global-styles';\n\n/**\n * Returns the global styles output based on the provided global styles config.\n *\n * @param {Object} mergedConfig The merged global styles config.\n * @param {boolean} disableRootPadding Disable root padding styles.\n *\n * @return {Array} Array of stylesheets and settings.\n */\nexport function useGlobalStylesOutputWithConfig(\n\tmergedConfig = {},\n\tdisableRootPadding = false\n) {\n\tconst blockGap = useSetting( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGap !== null;\n\tconst hasFallbackGapSupport = ! hasBlockGapSupport;\n\n\tconst { disableLayoutStyles, getBlockStyles } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { getBlockStyles: getBlockStylesSelector } =\n\t\t\tselect( blocksStore );\n\t\tconst settings = getEditorSettings();\n\t\treturn {\n\t\t\tdisableLayoutStyles: !! settings?.disableLayoutStyles,\n\t\t\tgetBlockStyles: getBlockStylesSelector,\n\t\t};\n\t}, [] );\n\n\treturn useMemo( () => {\n\t\tif ( ! mergedConfig?.styles || ! mergedConfig?.settings ) {\n\t\t\treturn [ [], {} ];\n\t\t}\n\n\t\tconst blockTypes = getBlockTypes();\n\n\t\treturn generateGlobalStyles( mergedConfig, blockTypes, {\n\t\t\thasBlockGapSupport,\n\t\t\thasFallbackGapSupport,\n\t\t\tdisableLayoutStyles,\n\t\t\tdisableRootPadding,\n\t\t\tgetBlockStyles,\n\t\t} );\n\t}, [\n\t\thasBlockGapSupport,\n\t\thasFallbackGapSupport,\n\t\tmergedConfig,\n\t\tdisableLayoutStyles,\n\t\tdisableRootPadding,\n\t\tgetBlockStyles,\n\t] );\n}\n\n/**\n * Returns the global styles output based on the current state of global styles config loaded in the editor context.\n *\n * @param {boolean} disableRootPadding Disable root padding styles.\n *\n * @return {Array} Array of stylesheets and settings.\n */\nexport function useGlobalStylesOutput( disableRootPadding = false ) {\n\tconst { merged: mergedConfig } = useGlobalStyles();\n\treturn useGlobalStylesOutputWithConfig( mergedConfig, disableRootPadding );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAoD;AACpD,kBAA0B;AAC1B,qBAAwB;AACxB,kCAAqC;AAKrC,mBAAqC;AACrC,2BAA4C;AAUrC,SAAS,gCACf,eAAe,CAAC,GAChB,qBAAqB,OACpB;AACD,QAAM,eAAW,iCAAY,kBAAmB;AAChD,QAAM,qBAAqB,aAAa;AACxC,QAAM,wBAAwB,CAAE;AAEhC,QAAM,EAAE,qBAAqB,eAAe,QAAI,uBAAW,CAAE,WAAY;AACxE,UAAM,EAAE,kBAAkB,IAAI,OAAQ,aAAAA,KAAY;AAClD,UAAM,EAAE,gBAAgB,uBAAuB,IAC9C,OAAQ,cAAAC,KAAY;AACrB,UAAM,WAAW,kBAAkB;AACnC,WAAO;AAAA,MACN,qBAAqB,CAAC,CAAE,UAAU;AAAA,MAClC,gBAAgB;AAAA,IACjB;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,aAAO,wBAAS,MAAM;AACrB,QAAK,CAAE,cAAc,UAAU,CAAE,cAAc,UAAW;AACzD,aAAO,CAAE,CAAC,GAAG,CAAC,CAAE;AAAA,IACjB;AAEA,UAAM,iBAAa,6BAAc;AAEjC,eAAO,kDAAsB,cAAc,YAAY;AAAA,MACtD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD,CAAE;AAAA,EACH,GAAG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AACH;AASO,SAAS,sBAAuB,qBAAqB,OAAQ;AACnE,QAAM,EAAE,QAAQ,aAAa,QAAI,sCAAgB;AACjD,SAAO,gCAAiC,cAAc,kBAAmB;AAC1E;",
|
|
6
|
+
"names": ["editorStore", "blocksStore"]
|
|
7
|
+
}
|
package/build/index.js
CHANGED
|
@@ -17,6 +17,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// packages/editor/src/index.js
|
|
20
22
|
var index_exports = {};
|
|
21
23
|
__export(index_exports, {
|
|
22
24
|
store: () => import_store.store,
|
package/build/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport './hooks';\n\nexport { storeConfig, store } from './store';\nexport * from './components';\nexport * from './utils';\nexport * from './private-apis';\nexport * from './dataviews/api';\n\n/*\n * Backward compatibility\n */\nexport { transformStyles } from '@wordpress/block-editor';\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,mBAAO;AAEP,mBAAmC;AACnC,0BAAc,yBANd;AAOA,0BAAc,oBAPd;AAQA,0BAAc,2BARd;AASA,0BAAc,4BATd;AAcA,0BAAgC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/lock-unlock.js
CHANGED
|
@@ -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/lock-unlock.js
|
|
19
21
|
var lock_unlock_exports = {};
|
|
20
22
|
__export(lock_unlock_exports, {
|
|
21
23
|
lock: () => lock,
|
|
@@ -23,7 +25,7 @@ __export(lock_unlock_exports, {
|
|
|
23
25
|
});
|
|
24
26
|
module.exports = __toCommonJS(lock_unlock_exports);
|
|
25
27
|
var import_private_apis = require("@wordpress/private-apis");
|
|
26
|
-
|
|
28
|
+
var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
|
|
27
29
|
"I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
|
|
28
30
|
"@wordpress/editor"
|
|
29
31
|
);
|
package/build/lock-unlock.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/lock-unlock.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/editor'\n\t);\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAAiE;AAC1D,IAAM,EAAE,MAAM,OAAO,QAC3B;AAAA,EACC;AAAA,EACA;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/private-apis.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/private-apis.js
|
|
29
31
|
var private_apis_exports = {};
|
|
30
32
|
__export(private_apis_exports, {
|
|
31
33
|
privateApis: () => privateApis
|
|
@@ -34,7 +36,6 @@ module.exports = __toCommonJS(private_apis_exports);
|
|
|
34
36
|
var interfaceApis = __toESM(require("@wordpress/interface"));
|
|
35
37
|
var import_lock_unlock = require("./lock-unlock");
|
|
36
38
|
var import_entities_saved_states = require("./components/entities-saved-states");
|
|
37
|
-
var import_content_slot_fill = __toESM(require("./components/editor-interface/content-slot-fill"));
|
|
38
39
|
var import_back_button = __toESM(require("./components/header/back-button"));
|
|
39
40
|
var import_editor = __toESM(require("./components/editor"));
|
|
40
41
|
var import_plugin = __toESM(require("./components/post-excerpt/plugin"));
|
|
@@ -45,12 +46,15 @@ var import_post_fields = __toESM(require("./components/post-fields"));
|
|
|
45
46
|
var import_tools_more_menu_group = __toESM(require("./components/more-menu/tools-more-menu-group"));
|
|
46
47
|
var import_view_more_menu_group = __toESM(require("./components/more-menu/view-more-menu-group"));
|
|
47
48
|
var import_resizable_editor = __toESM(require("./components/resizable-editor"));
|
|
48
|
-
var import_global_styles_provider = require("./components/global-styles-provider");
|
|
49
49
|
var import_fields = require("@wordpress/fields");
|
|
50
50
|
var import_api = require("./bindings/api");
|
|
51
51
|
var import_get_template_info = require("./utils/get-template-info");
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
var import_global_styles = __toESM(require("./components/global-styles"));
|
|
53
|
+
var import_style_book = require("./components/style-book");
|
|
54
|
+
var import_hooks = require("./components/global-styles/hooks");
|
|
55
|
+
var import_menu = require("./components/global-styles/menu");
|
|
56
|
+
var { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;
|
|
57
|
+
var privateApis = {};
|
|
54
58
|
(0, import_lock_unlock.lock)(privateApis, {
|
|
55
59
|
CreateTemplatePartModal: import_fields.CreateTemplatePartModal,
|
|
56
60
|
patternTitleField: import_fields.patternTitleField,
|
|
@@ -58,9 +62,6 @@ const privateApis = {};
|
|
|
58
62
|
BackButton: import_back_button.default,
|
|
59
63
|
EntitiesSavedStatesExtensible: import_entities_saved_states.EntitiesSavedStatesExtensible,
|
|
60
64
|
Editor: import_editor.default,
|
|
61
|
-
EditorContentSlotFill: import_content_slot_fill.default,
|
|
62
|
-
GlobalStylesProvider: import_global_styles_provider.GlobalStylesProvider,
|
|
63
|
-
mergeBaseAndUserConfigs: import_global_styles_provider.mergeBaseAndUserConfigs,
|
|
64
65
|
PluginPostExcerpt: import_plugin.default,
|
|
65
66
|
PostCardPanel: import_post_card_panel.default,
|
|
66
67
|
PreferencesModal: import_preferences_modal.default,
|
|
@@ -71,6 +72,12 @@ const privateApis = {};
|
|
|
71
72
|
ResizableEditor: import_resizable_editor.default,
|
|
72
73
|
registerCoreBlockBindingsSources: import_api.registerCoreBlockBindingsSources,
|
|
73
74
|
getTemplateInfo: import_get_template_info.getTemplateInfo,
|
|
75
|
+
// Global Styles
|
|
76
|
+
GlobalStylesUIWrapper: import_global_styles.default,
|
|
77
|
+
GlobalStylesActionMenu: import_menu.GlobalStylesActionMenu,
|
|
78
|
+
StyleBookPreview: import_style_book.StyleBookPreview,
|
|
79
|
+
useGlobalStyles: import_hooks.useGlobalStyles,
|
|
80
|
+
useStyle: import_hooks.useStyle,
|
|
74
81
|
// This is a temporary private API while we're updating the site editor to use EditorProvider.
|
|
75
82
|
interfaceStore,
|
|
76
83
|
...remainingInterfaceApis
|