@wordpress/editor 14.12.0 → 14.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +120 -99
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +1 -1
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build/components/collab-sidebar/add-comment.js +17 -65
- package/build/components/collab-sidebar/add-comment.js.map +1 -1
- package/build/components/collab-sidebar/comment-author-info.js +76 -0
- package/build/components/collab-sidebar/comment-author-info.js.map +1 -0
- package/build/components/collab-sidebar/comment-button-toolbar.js +2 -2
- package/build/components/collab-sidebar/comment-button-toolbar.js.map +1 -1
- package/build/components/collab-sidebar/comment-button.js +2 -2
- package/build/components/collab-sidebar/comment-button.js.map +1 -1
- package/build/components/collab-sidebar/comment-form.js +64 -0
- package/build/components/collab-sidebar/comment-form.js.map +1 -0
- package/build/components/collab-sidebar/comments.js +33 -91
- package/build/components/collab-sidebar/comments.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +1 -2
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/document-bar/index.js +10 -3
- package/build/components/document-bar/index.js.map +1 -1
- package/build/components/document-outline/check.js +4 -4
- package/build/components/document-outline/check.js.map +1 -1
- package/build/components/document-outline/index.js +8 -8
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/document-tools/index.js +1 -1
- package/build/components/document-tools/index.js.map +1 -1
- package/build/components/editor-history/redo.js +1 -1
- package/build/components/editor-history/redo.js.map +1 -1
- package/build/components/editor-history/undo.js +1 -1
- package/build/components/editor-history/undo.js.map +1 -1
- package/build/components/editor-interface/content-slot-fill.js +1 -10
- package/build/components/editor-interface/content-slot-fill.js.map +1 -1
- package/build/components/editor-interface/index.js +3 -9
- package/build/components/editor-interface/index.js.map +1 -1
- package/build/components/editor-notices/index.js +1 -1
- package/build/components/editor-notices/index.js.map +1 -1
- package/build/components/editor-snackbars/index.js +1 -1
- package/build/components/editor-snackbars/index.js.map +1 -1
- package/build/components/entities-saved-states/entity-record-item.js +9 -1
- package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build/components/entities-saved-states/index.js +2 -2
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/page-attributes/check.js +3 -3
- package/build/components/page-attributes/check.js.map +1 -1
- package/build/components/page-attributes/order.js +1 -1
- package/build/components/page-attributes/order.js.map +1 -1
- package/build/components/page-attributes/panel.js +1 -1
- package/build/components/page-attributes/panel.js.map +1 -1
- package/build/components/page-attributes/parent.js +1 -1
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/plugin-document-setting-panel/index.js +2 -2
- package/build/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build/components/plugin-more-menu-item/index.js +2 -1
- package/build/components/plugin-more-menu-item/index.js.map +1 -1
- package/build/components/plugin-post-publish-panel/index.js +2 -2
- package/build/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build/components/plugin-post-status-info/index.js +4 -4
- package/build/components/plugin-post-status-info/index.js.map +1 -1
- package/build/components/plugin-pre-publish-panel/index.js +2 -2
- package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build/components/plugin-preview-menu-item/index.js +2 -1
- package/build/components/plugin-preview-menu-item/index.js.map +1 -1
- package/build/components/plugin-sidebar/index.js +1 -0
- package/build/components/plugin-sidebar/index.js.map +1 -1
- package/build/components/plugin-sidebar-more-menu-item/index.js +2 -1
- package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build/components/post-actions/actions.js +3 -3
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-author/check.js +3 -3
- package/build/components/post-author/check.js.map +1 -1
- package/build/components/post-author/index.js +1 -1
- package/build/components/post-author/index.js.map +1 -1
- package/build/components/post-author/panel.js +1 -1
- package/build/components/post-author/panel.js.map +1 -1
- package/build/components/post-card-panel/index.js +9 -4
- package/build/components/post-card-panel/index.js.map +1 -1
- package/build/components/post-comments/index.js +1 -1
- package/build/components/post-comments/index.js.map +1 -1
- package/build/components/post-discussion/panel.js +1 -1
- package/build/components/post-discussion/panel.js.map +1 -1
- package/build/components/post-excerpt/check.js +3 -3
- package/build/components/post-excerpt/check.js.map +1 -1
- package/build/components/post-excerpt/panel.js +1 -1
- package/build/components/post-excerpt/panel.js.map +1 -1
- package/build/components/post-excerpt/plugin.js +4 -4
- package/build/components/post-excerpt/plugin.js.map +1 -1
- package/build/components/post-featured-image/check.js +3 -3
- package/build/components/post-featured-image/check.js.map +1 -1
- package/build/components/post-featured-image/index.js +39 -9
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-featured-image/panel.js +1 -1
- package/build/components/post-featured-image/panel.js.map +1 -1
- package/build/components/post-fields/index.js +70 -0
- package/build/components/post-fields/index.js.map +1 -0
- package/build/components/post-format/check.js +9 -12
- package/build/components/post-format/check.js.map +1 -1
- package/build/components/post-format/index.js +1 -1
- package/build/components/post-format/index.js.map +1 -1
- package/build/components/post-format/panel.js +1 -1
- package/build/components/post-format/panel.js.map +1 -1
- package/build/components/post-last-revision/check.js +3 -3
- package/build/components/post-last-revision/check.js.map +1 -1
- package/build/components/post-last-revision/index.js +1 -1
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-last-revision/panel.js +1 -1
- package/build/components/post-last-revision/panel.js.map +1 -1
- package/build/components/post-locked-modal/index.js +1 -1
- package/build/components/post-locked-modal/index.js.map +1 -1
- package/build/components/post-pending-status/check.js +3 -3
- package/build/components/post-pending-status/check.js.map +1 -1
- package/build/components/post-pending-status/index.js +1 -1
- package/build/components/post-pending-status/index.js.map +1 -1
- package/build/components/post-preview-button/index.js +1 -1
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-panel/index.js +5 -2
- package/build/components/post-publish-panel/index.js.map +1 -1
- package/build/components/post-schedule/check.js +3 -3
- package/build/components/post-schedule/check.js.map +1 -1
- package/build/components/post-schedule/index.js +1 -1
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-schedule/label.js +1 -1
- package/build/components/post-schedule/label.js.map +1 -1
- package/build/components/post-schedule/panel.js +1 -1
- package/build/components/post-schedule/panel.js.map +1 -1
- package/build/components/post-slug/check.js +3 -3
- package/build/components/post-slug/check.js.map +1 -1
- package/build/components/post-slug/index.js +1 -1
- package/build/components/post-slug/index.js.map +1 -1
- package/build/components/post-sticky/check.js +3 -3
- package/build/components/post-sticky/check.js.map +1 -1
- package/build/components/post-sticky/index.js +1 -1
- package/build/components/post-sticky/index.js.map +1 -1
- package/build/components/post-switch-to-draft-button/index.js +1 -1
- package/build/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build/components/post-sync-status/index.js +1 -1
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build/components/post-taxonomies/check.js +3 -3
- package/build/components/post-taxonomies/check.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/panel.js +16 -13
- package/build/components/post-taxonomies/panel.js.map +1 -1
- package/build/components/post-template/classic-theme.js +2 -2
- package/build/components/post-template/classic-theme.js.map +1 -1
- package/build/components/post-template/panel.js +1 -1
- package/build/components/post-template/panel.js.map +1 -1
- package/build/components/post-text-editor/index.js +1 -1
- package/build/components/post-text-editor/index.js.map +1 -1
- package/build/components/post-title/index.js +20 -18
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-title/post-title-raw.js +1 -1
- package/build/components/post-title/post-title-raw.js.map +1 -1
- package/build/components/post-trash/check.js +3 -3
- package/build/components/post-trash/check.js.map +1 -1
- package/build/components/post-trash/index.js +1 -1
- package/build/components/post-trash/index.js.map +1 -1
- package/build/components/post-type-support-check/index.js +6 -6
- package/build/components/post-type-support-check/index.js.map +1 -1
- package/build/components/post-url/check.js +3 -3
- package/build/components/post-url/check.js.map +1 -1
- package/build/components/post-url/index.js +1 -1
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/post-url/label.js +1 -1
- package/build/components/post-url/label.js.map +1 -1
- package/build/components/post-url/panel.js +1 -1
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/post-visibility/check.js +1 -1
- package/build/components/post-visibility/check.js.map +1 -1
- package/build/components/post-visibility/index.js +1 -1
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/preferences-modal/block-visibility.js +87 -0
- package/build/components/preferences-modal/block-visibility.js.map +1 -0
- package/build/components/preferences-modal/enable-panel.js +27 -19
- package/build/components/preferences-modal/enable-panel.js.map +1 -1
- package/build/components/preferences-modal/enable-publish-sidebar.js +13 -10
- package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
- package/build/components/preferences-modal/index.js +2 -2
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/provider/index.js +14 -8
- package/build/components/provider/index.js.map +1 -1
- package/build/components/table-of-contents/index.js +1 -1
- package/build/components/table-of-contents/index.js.map +1 -1
- package/build/components/theme-support-check/index.js +4 -4
- package/build/components/theme-support-check/index.js.map +1 -1
- package/build/components/time-to-read/index.js +1 -1
- package/build/components/time-to-read/index.js.map +1 -1
- package/build/components/unsaved-changes-warning/index.js +1 -1
- package/build/components/unsaved-changes-warning/index.js.map +1 -1
- package/build/components/word-count/index.js +1 -1
- package/build/components/word-count/index.js.map +1 -1
- package/build/components/zoom-out-toggle/index.js +8 -3
- package/build/components/zoom-out-toggle/index.js.map +1 -1
- package/build/dataviews/api.js +41 -0
- package/build/dataviews/api.js.map +1 -1
- package/build/dataviews/store/private-actions.js +26 -4
- package/build/dataviews/store/private-actions.js.map +1 -1
- package/build/dataviews/store/private-selectors.js +5 -0
- package/build/dataviews/store/private-selectors.js.map +1 -1
- package/build/dataviews/store/reducer.js +23 -0
- package/build/dataviews/store/reducer.js.map +1 -1
- package/build/private-apis.js +4 -0
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +11 -9
- package/build/store/actions.js.map +1 -1
- package/build/store/private-selectors.js +5 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.native.js +1 -0
- package/build/store/reducer.native.js.map +1 -1
- package/build/store/selectors.js +34 -42
- package/build/store/selectors.js.map +1 -1
- package/build/utils/get-template-info.js +60 -0
- package/build/utils/get-template-info.js.map +1 -0
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +1 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build-module/components/collab-sidebar/add-comment.js +18 -67
- package/build-module/components/collab-sidebar/add-comment.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-author-info.js +71 -0
- package/build-module/components/collab-sidebar/comment-author-info.js.map +1 -0
- package/build-module/components/collab-sidebar/comment-button-toolbar.js +2 -2
- package/build-module/components/collab-sidebar/comment-button-toolbar.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-button.js +2 -2
- package/build-module/components/collab-sidebar/comment-button.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-form.js +59 -0
- package/build-module/components/collab-sidebar/comment-form.js.map +1 -0
- package/build-module/components/collab-sidebar/comments.js +33 -91
- package/build-module/components/collab-sidebar/comments.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +1 -2
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/document-bar/index.js +10 -3
- package/build-module/components/document-bar/index.js.map +1 -1
- package/build-module/components/document-outline/check.js +4 -4
- package/build-module/components/document-outline/check.js.map +1 -1
- package/build-module/components/document-outline/index.js +8 -8
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/document-tools/index.js +1 -1
- package/build-module/components/document-tools/index.js.map +1 -1
- package/build-module/components/editor-history/redo.js +1 -1
- package/build-module/components/editor-history/redo.js.map +1 -1
- package/build-module/components/editor-history/undo.js +1 -1
- package/build-module/components/editor-history/undo.js.map +1 -1
- package/build-module/components/editor-interface/content-slot-fill.js +2 -11
- package/build-module/components/editor-interface/content-slot-fill.js.map +1 -1
- package/build-module/components/editor-interface/index.js +4 -10
- package/build-module/components/editor-interface/index.js.map +1 -1
- package/build-module/components/editor-notices/index.js +1 -1
- package/build-module/components/editor-notices/index.js.map +1 -1
- package/build-module/components/editor-snackbars/index.js +1 -1
- package/build-module/components/editor-snackbars/index.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-record-item.js +9 -1
- package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +2 -2
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/page-attributes/check.js +3 -3
- package/build-module/components/page-attributes/check.js.map +1 -1
- package/build-module/components/page-attributes/order.js +1 -1
- package/build-module/components/page-attributes/order.js.map +1 -1
- package/build-module/components/page-attributes/panel.js +1 -1
- package/build-module/components/page-attributes/panel.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +1 -1
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/plugin-document-setting-panel/index.js +2 -2
- 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 +2 -2
- package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-post-status-info/index.js +4 -4
- package/build-module/components/plugin-post-status-info/index.js.map +1 -1
- package/build-module/components/plugin-pre-publish-panel/index.js +2 -2
- 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 +1 -0
- 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 +3 -3
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-author/check.js +3 -3
- package/build-module/components/post-author/check.js.map +1 -1
- package/build-module/components/post-author/index.js +1 -1
- package/build-module/components/post-author/index.js.map +1 -1
- package/build-module/components/post-author/panel.js +1 -1
- package/build-module/components/post-author/panel.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +9 -4
- package/build-module/components/post-card-panel/index.js.map +1 -1
- package/build-module/components/post-comments/index.js +1 -1
- package/build-module/components/post-comments/index.js.map +1 -1
- package/build-module/components/post-discussion/panel.js +1 -1
- package/build-module/components/post-discussion/panel.js.map +1 -1
- package/build-module/components/post-excerpt/check.js +3 -3
- package/build-module/components/post-excerpt/check.js.map +1 -1
- package/build-module/components/post-excerpt/panel.js +1 -1
- package/build-module/components/post-excerpt/panel.js.map +1 -1
- package/build-module/components/post-excerpt/plugin.js +4 -4
- package/build-module/components/post-excerpt/plugin.js.map +1 -1
- package/build-module/components/post-featured-image/check.js +3 -3
- package/build-module/components/post-featured-image/check.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +40 -10
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-featured-image/panel.js +1 -1
- package/build-module/components/post-featured-image/panel.js.map +1 -1
- package/build-module/components/post-fields/index.js +62 -0
- package/build-module/components/post-fields/index.js.map +1 -0
- package/build-module/components/post-format/check.js +10 -11
- package/build-module/components/post-format/check.js.map +1 -1
- package/build-module/components/post-format/index.js +1 -1
- package/build-module/components/post-format/index.js.map +1 -1
- package/build-module/components/post-format/panel.js +1 -1
- package/build-module/components/post-format/panel.js.map +1 -1
- package/build-module/components/post-last-revision/check.js +3 -3
- package/build-module/components/post-last-revision/check.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +1 -1
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-last-revision/panel.js +1 -1
- package/build-module/components/post-last-revision/panel.js.map +1 -1
- package/build-module/components/post-locked-modal/index.js +1 -1
- package/build-module/components/post-locked-modal/index.js.map +1 -1
- package/build-module/components/post-pending-status/check.js +3 -3
- package/build-module/components/post-pending-status/check.js.map +1 -1
- package/build-module/components/post-pending-status/index.js +1 -1
- package/build-module/components/post-pending-status/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +1 -1
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-panel/index.js +5 -2
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-schedule/check.js +3 -3
- package/build-module/components/post-schedule/check.js.map +1 -1
- package/build-module/components/post-schedule/index.js +1 -1
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-schedule/label.js +1 -1
- package/build-module/components/post-schedule/label.js.map +1 -1
- package/build-module/components/post-schedule/panel.js +1 -1
- package/build-module/components/post-schedule/panel.js.map +1 -1
- package/build-module/components/post-slug/check.js +3 -3
- package/build-module/components/post-slug/check.js.map +1 -1
- package/build-module/components/post-slug/index.js +1 -1
- package/build-module/components/post-slug/index.js.map +1 -1
- package/build-module/components/post-sticky/check.js +3 -3
- package/build-module/components/post-sticky/check.js.map +1 -1
- package/build-module/components/post-sticky/index.js +1 -1
- package/build-module/components/post-sticky/index.js.map +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-module/components/post-sync-status/index.js +1 -1
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-taxonomies/check.js +3 -3
- package/build-module/components/post-taxonomies/check.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/panel.js +17 -12
- package/build-module/components/post-taxonomies/panel.js.map +1 -1
- package/build-module/components/post-template/classic-theme.js +2 -2
- package/build-module/components/post-template/classic-theme.js.map +1 -1
- package/build-module/components/post-template/panel.js +1 -1
- package/build-module/components/post-template/panel.js.map +1 -1
- package/build-module/components/post-text-editor/index.js +1 -1
- package/build-module/components/post-text-editor/index.js.map +1 -1
- package/build-module/components/post-title/index.js +20 -18
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-title/post-title-raw.js +1 -1
- package/build-module/components/post-title/post-title-raw.js.map +1 -1
- package/build-module/components/post-trash/check.js +3 -3
- package/build-module/components/post-trash/check.js.map +1 -1
- package/build-module/components/post-trash/index.js +1 -1
- package/build-module/components/post-trash/index.js.map +1 -1
- package/build-module/components/post-type-support-check/index.js +6 -6
- package/build-module/components/post-type-support-check/index.js.map +1 -1
- package/build-module/components/post-url/check.js +3 -3
- package/build-module/components/post-url/check.js.map +1 -1
- package/build-module/components/post-url/index.js +1 -1
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/post-url/label.js +1 -1
- package/build-module/components/post-url/label.js.map +1 -1
- package/build-module/components/post-url/panel.js +1 -1
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/post-visibility/check.js +1 -1
- package/build-module/components/post-visibility/check.js.map +1 -1
- package/build-module/components/post-visibility/index.js +1 -1
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/preferences-modal/block-visibility.js +80 -0
- package/build-module/components/preferences-modal/block-visibility.js.map +1 -0
- package/build-module/components/preferences-modal/enable-panel.js +27 -19
- package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
- package/build-module/components/preferences-modal/enable-publish-sidebar.js +13 -10
- package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +2 -2
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/provider/index.js +14 -8
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/table-of-contents/index.js +1 -1
- package/build-module/components/table-of-contents/index.js.map +1 -1
- package/build-module/components/theme-support-check/index.js +4 -4
- package/build-module/components/theme-support-check/index.js.map +1 -1
- package/build-module/components/time-to-read/index.js +1 -1
- package/build-module/components/time-to-read/index.js.map +1 -1
- package/build-module/components/unsaved-changes-warning/index.js +1 -1
- package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
- package/build-module/components/word-count/index.js +1 -1
- package/build-module/components/word-count/index.js.map +1 -1
- package/build-module/components/zoom-out-toggle/index.js +8 -3
- package/build-module/components/zoom-out-toggle/index.js.map +1 -1
- package/build-module/dataviews/api.js +39 -0
- package/build-module/dataviews/api.js.map +1 -1
- package/build-module/dataviews/store/private-actions.js +23 -3
- package/build-module/dataviews/store/private-actions.js.map +1 -1
- package/build-module/dataviews/store/private-selectors.js +4 -0
- package/build-module/dataviews/store/private-selectors.js.map +1 -1
- package/build-module/dataviews/store/reducer.js +23 -0
- package/build-module/dataviews/store/reducer.js.map +1 -1
- package/build-module/private-apis.js +4 -0
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +11 -9
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-selectors.js +6 -3
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.native.js +2 -1
- package/build-module/store/reducer.native.js.map +1 -1
- package/build-module/store/selectors.js +33 -39
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/get-template-info.js +51 -0
- package/build-module/utils/get-template-info.js.map +1 -0
- package/build-style/style-rtl.css +11 -81
- package/build-style/style.css +11 -81
- package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts +2 -2
- package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/add-comment.d.ts +2 -2
- package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comment-author-info.d.ts +17 -0
- package/build-types/components/collab-sidebar/comment-author-info.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/comment-form.d.ts +18 -0
- package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/comments.d.ts +2 -2
- package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
- package/build-types/components/create-template-part-modal/index.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/document-outline/check.d.ts +5 -5
- package/build-types/components/document-outline/check.d.ts.map +1 -1
- package/build-types/components/document-outline/index.d.ts +4 -6
- package/build-types/components/document-outline/index.d.ts.map +1 -1
- package/build-types/components/document-tools/index.d.ts.map +1 -1
- package/build-types/components/editor-interface/content-slot-fill.d.ts +12 -1
- package/build-types/components/editor-interface/content-slot-fill.d.ts.map +1 -1
- package/build-types/components/editor-interface/index.d.ts.map +1 -1
- package/build-types/components/editor-notices/index.d.ts +2 -2
- package/build-types/components/editor-notices/index.d.ts.map +1 -1
- package/build-types/components/editor-snackbars/index.d.ts +2 -2
- package/build-types/components/editor-snackbars/index.d.ts.map +1 -1
- package/build-types/components/entities-saved-states/entity-record-item.d.ts.map +1 -1
- package/build-types/components/entities-saved-states/index.d.ts +4 -4
- package/build-types/components/entities-saved-states/index.d.ts.map +1 -1
- package/build-types/components/header/back-button.d.ts.map +1 -1
- package/build-types/components/more-menu/tools-more-menu-group.d.ts.map +1 -1
- package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -1
- package/build-types/components/page-attributes/check.d.ts +5 -5
- package/build-types/components/page-attributes/check.d.ts.map +1 -1
- package/build-types/components/page-attributes/order.d.ts +2 -2
- package/build-types/components/page-attributes/order.d.ts.map +1 -1
- package/build-types/components/page-attributes/panel.d.ts +2 -2
- package/build-types/components/page-attributes/panel.d.ts.map +1 -1
- package/build-types/components/page-attributes/parent.d.ts +2 -2
- package/build-types/components/page-attributes/parent.d.ts.map +1 -1
- package/build-types/components/plugin-document-setting-panel/index.d.ts +4 -4
- package/build-types/components/plugin-document-setting-panel/index.d.ts.map +1 -1
- package/build-types/components/plugin-more-menu-item/index.d.ts +4 -2
- package/build-types/components/plugin-more-menu-item/index.d.ts.map +1 -1
- package/build-types/components/plugin-post-publish-panel/index.d.ts +4 -4
- package/build-types/components/plugin-post-publish-panel/index.d.ts.map +1 -1
- package/build-types/components/plugin-post-status-info/index.d.ts +6 -6
- package/build-types/components/plugin-post-status-info/index.d.ts.map +1 -1
- package/build-types/components/plugin-pre-publish-panel/index.d.ts +4 -4
- package/build-types/components/plugin-pre-publish-panel/index.d.ts.map +1 -1
- package/build-types/components/plugin-preview-menu-item/index.d.ts +4 -2
- package/build-types/components/plugin-preview-menu-item/index.d.ts.map +1 -1
- package/build-types/components/plugin-sidebar/index.d.ts +2 -0
- package/build-types/components/plugin-sidebar/index.d.ts.map +1 -1
- package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts +4 -2
- package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts.map +1 -1
- package/build-types/components/post-author/check.d.ts +5 -5
- package/build-types/components/post-author/check.d.ts.map +1 -1
- package/build-types/components/post-author/index.d.ts +2 -2
- package/build-types/components/post-author/index.d.ts.map +1 -1
- package/build-types/components/post-author/panel.d.ts +2 -2
- package/build-types/components/post-author/panel.d.ts.map +1 -1
- package/build-types/components/post-card-panel/index.d.ts.map +1 -1
- package/build-types/components/post-discussion/panel.d.ts +2 -2
- package/build-types/components/post-discussion/panel.d.ts.map +1 -1
- package/build-types/components/post-excerpt/check.d.ts +5 -5
- package/build-types/components/post-excerpt/check.d.ts.map +1 -1
- package/build-types/components/post-excerpt/panel.d.ts +2 -2
- package/build-types/components/post-excerpt/panel.d.ts.map +1 -1
- package/build-types/components/post-excerpt/plugin.d.ts +6 -6
- package/build-types/components/post-excerpt/plugin.d.ts.map +1 -1
- package/build-types/components/post-featured-image/check.d.ts +5 -5
- package/build-types/components/post-featured-image/check.d.ts.map +1 -1
- package/build-types/components/post-featured-image/panel.d.ts +2 -2
- package/build-types/components/post-featured-image/panel.d.ts.map +1 -1
- package/build-types/components/post-fields/index.d.ts +12 -0
- package/build-types/components/post-fields/index.d.ts.map +1 -0
- package/build-types/components/post-format/check.d.ts +11 -4
- package/build-types/components/post-format/check.d.ts.map +1 -1
- package/build-types/components/post-format/index.d.ts +2 -2
- package/build-types/components/post-format/index.d.ts.map +1 -1
- package/build-types/components/post-format/panel.d.ts +2 -2
- package/build-types/components/post-format/panel.d.ts.map +1 -1
- package/build-types/components/post-last-revision/check.d.ts +5 -5
- package/build-types/components/post-last-revision/check.d.ts.map +1 -1
- package/build-types/components/post-last-revision/index.d.ts +2 -2
- package/build-types/components/post-last-revision/index.d.ts.map +1 -1
- package/build-types/components/post-last-revision/panel.d.ts +2 -2
- package/build-types/components/post-last-revision/panel.d.ts.map +1 -1
- package/build-types/components/post-locked-modal/index.d.ts +2 -2
- package/build-types/components/post-locked-modal/index.d.ts.map +1 -1
- package/build-types/components/post-pending-status/check.d.ts +5 -5
- package/build-types/components/post-pending-status/check.d.ts.map +1 -1
- package/build-types/components/post-pending-status/index.d.ts +2 -2
- package/build-types/components/post-pending-status/index.d.ts.map +1 -1
- package/build-types/components/post-preview-button/index.d.ts +2 -2
- package/build-types/components/post-preview-button/index.d.ts.map +1 -1
- package/build-types/components/post-publish-panel/index.d.ts.map +1 -1
- package/build-types/components/post-schedule/check.d.ts +5 -5
- package/build-types/components/post-schedule/check.d.ts.map +1 -1
- package/build-types/components/post-schedule/index.d.ts +2 -2
- package/build-types/components/post-schedule/index.d.ts.map +1 -1
- package/build-types/components/post-schedule/label.d.ts +2 -2
- package/build-types/components/post-schedule/label.d.ts.map +1 -1
- package/build-types/components/post-schedule/panel.d.ts +2 -2
- package/build-types/components/post-schedule/panel.d.ts.map +1 -1
- package/build-types/components/post-slug/check.d.ts +5 -5
- package/build-types/components/post-slug/check.d.ts.map +1 -1
- package/build-types/components/post-slug/index.d.ts +2 -2
- package/build-types/components/post-slug/index.d.ts.map +1 -1
- package/build-types/components/post-sticky/check.d.ts +5 -5
- package/build-types/components/post-sticky/check.d.ts.map +1 -1
- package/build-types/components/post-sticky/index.d.ts +2 -2
- package/build-types/components/post-sticky/index.d.ts.map +1 -1
- package/build-types/components/post-switch-to-draft-button/index.d.ts +2 -2
- package/build-types/components/post-switch-to-draft-button/index.d.ts.map +1 -1
- package/build-types/components/post-sync-status/index.d.ts +2 -2
- package/build-types/components/post-sync-status/index.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/check.d.ts +5 -5
- package/build-types/components/post-taxonomies/check.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/flat-term-selector.d.ts +2 -2
- package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/panel.d.ts +6 -2
- package/build-types/components/post-taxonomies/panel.d.ts.map +1 -1
- package/build-types/components/post-template/panel.d.ts +2 -2
- package/build-types/components/post-template/panel.d.ts.map +1 -1
- package/build-types/components/post-text-editor/index.d.ts +2 -2
- package/build-types/components/post-text-editor/index.d.ts.map +1 -1
- package/build-types/components/post-title/index.d.ts +1 -1
- package/build-types/components/post-trash/check.d.ts +5 -5
- package/build-types/components/post-trash/check.d.ts.map +1 -1
- package/build-types/components/post-trash/index.d.ts +2 -2
- package/build-types/components/post-trash/index.d.ts.map +1 -1
- package/build-types/components/post-type-support-check/index.d.ts +8 -8
- package/build-types/components/post-type-support-check/index.d.ts.map +1 -1
- package/build-types/components/post-url/check.d.ts +5 -5
- package/build-types/components/post-url/check.d.ts.map +1 -1
- package/build-types/components/post-url/index.d.ts +2 -2
- package/build-types/components/post-url/index.d.ts.map +1 -1
- package/build-types/components/post-url/label.d.ts +2 -2
- package/build-types/components/post-url/label.d.ts.map +1 -1
- package/build-types/components/post-url/panel.d.ts +2 -2
- package/build-types/components/post-url/panel.d.ts.map +1 -1
- package/build-types/components/post-visibility/check.d.ts +2 -2
- package/build-types/components/post-visibility/check.d.ts.map +1 -1
- package/build-types/components/post-visibility/index.d.ts +2 -2
- package/build-types/components/post-visibility/index.d.ts.map +1 -1
- package/build-types/components/preferences-modal/block-visibility.d.ts +2 -0
- package/build-types/components/preferences-modal/block-visibility.d.ts.map +1 -0
- package/build-types/components/preferences-modal/enable-panel.d.ts +1 -2
- package/build-types/components/preferences-modal/enable-panel.d.ts.map +1 -1
- package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts.map +1 -1
- package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts +1 -2
- package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts.map +1 -1
- package/build-types/components/provider/index.d.ts +2 -2
- package/build-types/components/provider/index.d.ts.map +1 -1
- package/build-types/components/save-publish-panels/index.d.ts.map +1 -1
- package/build-types/components/theme-support-check/index.d.ts +6 -6
- package/build-types/components/theme-support-check/index.d.ts.map +1 -1
- package/build-types/components/time-to-read/index.d.ts +2 -2
- package/build-types/components/time-to-read/index.d.ts.map +1 -1
- package/build-types/components/unsaved-changes-warning/index.d.ts +2 -2
- package/build-types/components/unsaved-changes-warning/index.d.ts.map +1 -1
- package/build-types/components/word-count/index.d.ts +2 -2
- package/build-types/components/word-count/index.d.ts.map +1 -1
- package/build-types/components/zoom-out-toggle/index.d.ts.map +1 -1
- package/build-types/dataviews/api.d.ts +24 -0
- package/build-types/dataviews/api.d.ts.map +1 -1
- package/build-types/dataviews/store/private-actions.d.ts +14 -2
- package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
- package/build-types/dataviews/store/private-selectors.d.ts +1 -0
- package/build-types/dataviews/store/private-selectors.d.ts.map +1 -1
- package/build-types/dataviews/store/reducer.d.ts +10 -2
- package/build-types/dataviews/store/reducer.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/store/actions.d.ts +7 -5
- package/build-types/store/actions.d.ts.map +1 -1
- package/build-types/store/private-selectors.d.ts +1 -0
- package/build-types/store/private-selectors.d.ts.map +1 -1
- package/build-types/store/reducer.d.ts +5 -0
- package/build-types/store/reducer.d.ts.map +1 -1
- package/build-types/store/selectors.d.ts +4 -11
- package/build-types/store/selectors.d.ts.map +1 -1
- package/build-types/utils/get-template-info.d.ts +6 -0
- package/build-types/utils/get-template-info.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/components/block-settings-menu/plugin-block-settings-menu-item.js +1 -1
- package/src/components/collab-sidebar/add-comment.js +21 -78
- package/src/components/collab-sidebar/comment-author-info.js +68 -0
- package/src/components/collab-sidebar/comment-button-toolbar.js +3 -3
- package/src/components/collab-sidebar/comment-button.js +3 -3
- package/src/components/collab-sidebar/comment-form.js +62 -0
- package/src/components/collab-sidebar/comments.js +39 -101
- package/src/components/create-template-part-modal/index.js +3 -2
- package/src/components/document-bar/index.js +12 -3
- package/src/components/document-outline/check.js +4 -4
- package/src/components/document-outline/index.js +9 -9
- package/src/components/document-tools/index.js +3 -2
- package/src/components/editor-history/redo.js +1 -1
- package/src/components/editor-history/undo.js +1 -1
- package/src/components/editor-interface/content-slot-fill.js +4 -9
- package/src/components/editor-interface/index.js +1 -11
- package/src/components/editor-notices/index.js +1 -1
- package/src/components/editor-snackbars/index.js +1 -1
- package/src/components/entities-saved-states/entity-record-item.js +12 -4
- package/src/components/entities-saved-states/index.js +2 -2
- package/src/components/header/style.scss +2 -1
- package/src/components/page-attributes/check.js +3 -3
- package/src/components/page-attributes/order.js +1 -1
- package/src/components/page-attributes/panel.js +1 -1
- package/src/components/page-attributes/parent.js +1 -1
- package/src/components/plugin-document-setting-panel/index.js +2 -2
- package/src/components/plugin-more-menu-item/index.js +2 -1
- package/src/components/plugin-post-publish-panel/index.js +2 -2
- package/src/components/plugin-post-status-info/index.js +4 -4
- package/src/components/plugin-pre-publish-panel/index.js +2 -2
- package/src/components/plugin-preview-menu-item/index.js +2 -1
- package/src/components/plugin-sidebar/index.js +1 -0
- package/src/components/plugin-sidebar-more-menu-item/index.js +2 -2
- package/src/components/post-actions/actions.js +3 -3
- package/src/components/post-author/check.js +3 -3
- package/src/components/post-author/index.js +1 -1
- package/src/components/post-author/panel.js +1 -1
- package/src/components/post-card-panel/index.js +18 -5
- package/src/components/post-comments/index.js +1 -1
- package/src/components/post-discussion/panel.js +1 -1
- package/src/components/post-excerpt/check.js +3 -3
- package/src/components/post-excerpt/panel.js +1 -1
- package/src/components/post-excerpt/plugin.js +4 -4
- package/src/components/post-featured-image/check.js +3 -3
- package/src/components/post-featured-image/index.js +107 -43
- package/src/components/post-featured-image/panel.js +1 -1
- package/src/components/post-featured-image/style.scss +23 -13
- package/src/components/post-fields/index.ts +76 -0
- package/src/components/post-format/check.js +9 -11
- package/src/components/post-format/index.js +1 -1
- package/src/components/post-format/panel.js +1 -1
- package/src/components/post-last-revision/check.js +3 -3
- package/src/components/post-last-revision/index.js +1 -1
- package/src/components/post-last-revision/panel.js +1 -1
- package/src/components/post-locked-modal/index.js +1 -1
- package/src/components/post-pending-status/check.js +3 -3
- package/src/components/post-pending-status/index.js +1 -1
- package/src/components/post-preview-button/index.js +1 -1
- package/src/components/post-publish-panel/index.js +7 -3
- package/src/components/post-schedule/check.js +3 -3
- package/src/components/post-schedule/index.js +1 -1
- package/src/components/post-schedule/label.js +1 -1
- package/src/components/post-schedule/panel.js +1 -1
- package/src/components/post-slug/check.js +3 -3
- package/src/components/post-slug/index.js +1 -1
- package/src/components/post-sticky/check.js +3 -3
- package/src/components/post-sticky/index.js +1 -1
- package/src/components/post-switch-to-draft-button/index.js +1 -1
- package/src/components/post-sync-status/index.js +1 -1
- package/src/components/post-taxonomies/check.js +3 -3
- package/src/components/post-taxonomies/flat-term-selector.js +1 -1
- package/src/components/post-taxonomies/panel.js +15 -12
- package/src/components/post-template/classic-theme.js +2 -2
- package/src/components/post-template/panel.js +1 -1
- package/src/components/post-text-editor/index.js +1 -1
- package/src/components/post-title/index.js +20 -18
- package/src/components/post-title/post-title-raw.js +1 -1
- package/src/components/post-trash/check.js +3 -3
- package/src/components/post-trash/index.js +1 -1
- package/src/components/post-type-support-check/index.js +6 -6
- package/src/components/post-url/check.js +3 -3
- package/src/components/post-url/index.js +1 -1
- package/src/components/post-url/label.js +1 -1
- package/src/components/post-url/panel.js +1 -1
- package/src/components/post-visibility/check.js +1 -1
- package/src/components/post-visibility/index.js +1 -1
- package/src/components/preferences-modal/block-visibility.js +96 -0
- package/src/components/preferences-modal/enable-panel.js +27 -17
- package/src/components/preferences-modal/enable-publish-sidebar.js +18 -15
- package/src/components/preferences-modal/index.js +2 -2
- package/src/components/provider/index.js +55 -30
- package/src/components/table-of-contents/index.js +1 -1
- package/src/components/theme-support-check/index.js +4 -4
- package/src/components/time-to-read/index.js +1 -1
- package/src/components/unsaved-changes-warning/index.js +1 -1
- package/src/components/word-count/index.js +1 -1
- package/src/components/zoom-out-toggle/index.js +26 -13
- package/src/dataviews/api.js +41 -0
- package/src/dataviews/store/private-actions.ts +57 -3
- package/src/dataviews/store/private-selectors.ts +4 -0
- package/src/dataviews/store/reducer.ts +38 -1
- package/src/private-apis.js +4 -1
- package/src/store/actions.js +13 -9
- package/src/store/private-selectors.js +13 -8
- package/src/store/reducer.native.js +2 -0
- package/src/store/selectors.js +80 -62
- package/src/store/test/selectors.js +0 -255
- package/src/style.scss +0 -1
- package/src/utils/get-template-info.js +52 -0
- package/src/utils/test/get-template-info.js +224 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/block-manager/category.js +0 -107
- package/build/components/block-manager/category.js.map +0 -1
- package/build/components/block-manager/checklist.js +0 -35
- package/build/components/block-manager/checklist.js.map +0 -1
- package/build/components/block-manager/index.js +0 -115
- package/build/components/block-manager/index.js.map +0 -1
- package/build-module/components/block-manager/category.js +0 -99
- package/build-module/components/block-manager/category.js.map +0 -1
- package/build-module/components/block-manager/checklist.js +0 -28
- package/build-module/components/block-manager/checklist.js.map +0 -1
- package/build-module/components/block-manager/index.js +0 -107
- package/build-module/components/block-manager/index.js.map +0 -1
- package/build-types/components/block-manager/category.d.ts +0 -6
- package/build-types/components/block-manager/category.d.ts.map +0 -1
- package/build-types/components/block-manager/checklist.d.ts +0 -7
- package/build-types/components/block-manager/checklist.d.ts.map +0 -1
- package/build-types/components/block-manager/index.d.ts +0 -2
- package/build-types/components/block-manager/index.d.ts.map +0 -1
- package/src/components/block-manager/category.js +0 -96
- package/src/components/block-manager/checklist.js +0 -30
- package/src/components/block-manager/index.js +0 -145
- package/src/components/block-manager/style.scss +0 -82
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_a11y","require","_apiFetch","_interopRequireDefault","_deprecated","_blocks","_notices","_coreData","_blockEditor","_hooks","_preferences","_i18n","_constants","_localAutosave","_noticeBuilder","_lockUnlock","setupEditor","post","edits","template","dispatch","setEditedPost","type","id","isNewPost","status","content","raw","blocks","parse","synchronizeBlocksWithTemplate","resetEditorBlocks","__unstableShouldCreateUndoLevel","Object","values","some","key","edit","_post$key$raw","editPost","exports","__experimentalTearDownEditor","deprecated","since","resetPost","version","alternative","updatePost","setupEditorState","postType","postId","options","select","registry","getCurrentPost","coreStore","editEntityRecord","savePost","isEditedPostSaveable","getEditedPostContent","isAutosave","undoIgnore","previousRecord","getEntityRecordNonTransientEdits","error","applyFiltersAsync","err","saveEntityRecord","message","code","__","getLastEntitySaveError","applyFilters","Promise","resolve","doActionAsync","args","getNotificationArgumentsForSaveFail","length","noticesStore","createErrorNotice","updatedRecord","getNotificationArgumentsForSaveSuccess","previousPost","resolveSelect","getPostType","createSuccessNotice","blockEditorStore","__unstableMarkLastChangeAsPersistent","refreshPost","trashPost","postTypeSlug","getCurrentPostType","removeNotice","TRASH_POST_NOTICE_ID","rest_base","restBase","rest_namespace","restNamespace","apiFetch","path","method","getNotificationArgumentsForTrashFail","autosave","local","isPostNew","isEditedPostNew","title","getEditedPostAttribute","excerpt","localAutosaveSet","__unstableSaveForPreview","forceIsAutosaveable","isEditedPostAutosaveable","isPostLocked","isDraft","includes","isPreview","getEditedPostPreviewLink","redo","undo","createUndoLevel","updatePostLock","lock","enablePublishSidebar","preferencesStore","set","disablePublishSidebar","lockPostSaving","lockName","unlockPostSaving","lockPostAutosaving","unlockPostAutosaving","selection","noChange","getEditedEntityRecord","__unstableCreateUndoLevel","blocksForSerialization","__unstableSerializeAndClean","updateEditorSettings","settings","setRenderingMode","mode","__unstableIsEditorReady","clearSelectedBlock","undefined","setDeviceType","deviceType","toggleEditorPanelEnabled","panelName","_registry$select$get","inactivePanels","get","isPanelInactive","updatedInactivePanels","filter","invactivePanelName","toggleEditorPanelOpened","_registry$select$get2","openPanels","isPanelOpen","updatedOpenPanels","openPanelName","removeEditorPanel","setIsInserterOpened","value","hasOwnProperty","unlock","setInsertionPoint","rootClientId","index","insertionIndex","setIsListViewOpened","isOpen","toggleDistractionFree","createNotice","isDistractionFree","batch","createInfoNotice","actions","label","onClick","toggle","toggleSpotlightMode","isFocusMode","toggleTopToolbar","isTopToolbar","switchEditorMode","resetZoomLevel","speak","openPublishSidebar","closePublishSidebar","togglePublishSidebar","getBlockEditorAction","name","resetBlocks","receiveBlocks","updateBlock","updateBlockAttributes","selectBlock","startMultiSelect","stopMultiSelect","multiSelect","toggleSelection","replaceBlocks","replaceBlock","moveBlocksDown","moveBlocksUp","moveBlockToPosition","insertBlock","insertBlocks","showInsertionPoint","hideInsertionPoint","setTemplateValidity","synchronizeTemplate","mergeBlocks","removeBlocks","removeBlock","toggleBlockMode","startTyping","stopTyping","enterFormattedText","exitFormattedText","insertDefaultBlock","updateBlockListSettings"],"sources":["@wordpress/editor/src/store/actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport apiFetch from '@wordpress/api-fetch';\nimport deprecated from '@wordpress/deprecated';\nimport {\n\tparse,\n\tsynchronizeBlocksWithTemplate,\n\t__unstableSerializeAndClean,\n} from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\tapplyFilters,\n\tapplyFiltersAsync,\n\tdoActionAsync,\n} from '@wordpress/hooks';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { TRASH_POST_NOTICE_ID } from './constants';\nimport { localAutosaveSet } from './local-autosave';\nimport {\n\tgetNotificationArgumentsForSaveSuccess,\n\tgetNotificationArgumentsForSaveFail,\n\tgetNotificationArgumentsForTrashFail,\n} from './utils/notice-builder';\nimport { unlock } from '../lock-unlock';\n/**\n * Returns an action generator used in signalling that editor has initialized with\n * the specified post object and editor settings.\n *\n * @param {Object} post Post object.\n * @param {Object} edits Initial edited attributes object.\n * @param {Array?} template Block Template.\n */\nexport const setupEditor =\n\t( post, edits, template ) =>\n\t( { dispatch } ) => {\n\t\tdispatch.setEditedPost( post.type, post.id );\n\t\t// Apply a template for new posts only, if exists.\n\t\tconst isNewPost = post.status === 'auto-draft';\n\t\tif ( isNewPost && template ) {\n\t\t\t// In order to ensure maximum of a single parse during setup, edits are\n\t\t\t// included as part of editor setup action. Assume edited content as\n\t\t\t// canonical if provided, falling back to post.\n\t\t\tlet content;\n\t\t\tif ( 'content' in edits ) {\n\t\t\t\tcontent = edits.content;\n\t\t\t} else {\n\t\t\t\tcontent = post.content.raw;\n\t\t\t}\n\t\t\tlet blocks = parse( content );\n\t\t\tblocks = synchronizeBlocksWithTemplate( blocks, template );\n\t\t\tdispatch.resetEditorBlocks( blocks, {\n\t\t\t\t__unstableShouldCreateUndoLevel: false,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tedits &&\n\t\t\tObject.values( edits ).some(\n\t\t\t\t( [ key, edit ] ) =>\n\t\t\t\t\tedit !== ( post[ key ]?.raw ?? post[ key ] )\n\t\t\t)\n\t\t) {\n\t\t\tdispatch.editPost( edits );\n\t\t}\n\t};\n\n/**\n * Returns an action object signalling that the editor is being destroyed and\n * that any necessary state or side-effect cleanup should occur.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function __experimentalTearDownEditor() {\n\tdeprecated(\n\t\t\"wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor\",\n\t\t{\n\t\t\tsince: '6.5',\n\t\t}\n\t);\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Returns an action object used in signalling that the latest version of the\n * post has been received, either by initialization or save.\n *\n * @deprecated Since WordPress 6.0.\n */\nexport function resetPost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).resetPost\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Initialize the editor with the setupEditorState action',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Returns an action object used in signalling that a patch of updates for the\n * latest version of the post have been received.\n *\n * @return {Object} Action object.\n * @deprecated since Gutenberg 9.7.0.\n */\nexport function updatePost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).updatePost\", {\n\t\tsince: '5.7',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Setup the editor state.\n *\n * @deprecated\n *\n * @param {Object} post Post object.\n */\nexport function setupEditorState( post ) {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).setupEditorState\", {\n\t\tsince: '6.5',\n\t\talternative: \"wp.data.dispatch( 'core/editor' ).setEditedPost\",\n\t} );\n\treturn setEditedPost( post.type, post.id );\n}\n\n/**\n * Returns an action that sets the current post Type and post ID.\n *\n * @param {string} postType Post Type.\n * @param {string} postId Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setEditedPost( postType, postId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tpostId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that attributes of the post have\n * been edited.\n *\n * @param {Object} edits Post attributes to edit.\n * @param {Object} options Options for the edit.\n *\n * @example\n * ```js\n * // Update the post title\n * wp.data.dispatch( 'core/editor' ).editPost( { title: `${ newTitle }` } );\n * ```\n *\n * @example\n *```js\n * \t// Get specific media size based on the featured media ID\n * \t// Note: change sizes?.large for any registered size\n * \tconst getFeaturedMediaUrl = useSelect( ( select ) => {\n * \t\tconst getFeaturedMediaId =\n * \t\t\tselect( 'core/editor' ).getEditedPostAttribute( 'featured_media' );\n * \t\tconst getMedia = select( 'core' ).getMedia( getFeaturedMediaId );\n *\n * \t\treturn (\n * \t\t\tgetMedia?.media_details?.sizes?.large?.source_url || getMedia?.source_url || ''\n * \t\t);\n * }, [] );\n * ```\n *\n * @return {Object} Action object\n */\nexport const editPost =\n\t( edits, options ) =>\n\t( { select, registry } ) => {\n\t\tconst { id, type } = select.getCurrentPost();\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.editEntityRecord( 'postType', type, id, edits, options );\n\t};\n\n/**\n * Action for saving the current post in the editor.\n *\n * @param {Object} options\n */\nexport const savePost =\n\t( options = {} ) =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tif ( ! select.isEditedPostSaveable() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst content = select.getEditedPostContent();\n\n\t\tif ( ! options.isAutosave ) {\n\t\t\tdispatch.editPost( { content }, { undoIgnore: true } );\n\t\t}\n\n\t\tconst previousRecord = select.getCurrentPost();\n\t\tlet edits = {\n\t\t\tid: previousRecord.id,\n\t\t\t...registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEntityRecordNonTransientEdits(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\tpreviousRecord.id\n\t\t\t\t),\n\t\t\tcontent,\n\t\t};\n\t\tdispatch( { type: 'REQUEST_POST_UPDATE_START', options } );\n\n\t\tlet error = false;\n\t\ttry {\n\t\t\tedits = await applyFiltersAsync(\n\t\t\t\t'editor.preSavePost',\n\t\t\t\tedits,\n\t\t\t\toptions\n\t\t\t);\n\t\t} catch ( err ) {\n\t\t\terror = err;\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait registry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.saveEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\t\tedits,\n\t\t\t\t\t\toptions\n\t\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror =\n\t\t\t\t\terr.message && err.code !== 'unknown_error'\n\t\t\t\t\t\t? err.message\n\t\t\t\t\t\t: __( 'An error occurred while updating.' );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\terror = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getLastEntitySaveError(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\tpreviousRecord.id\n\t\t\t\t);\n\t\t}\n\n\t\t// Run the hook with legacy unstable name for backward compatibility\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait applyFilters(\n\t\t\t\t\t'editor.__unstableSavePost',\n\t\t\t\t\tPromise.resolve(),\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror = err;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait doActionAsync(\n\t\t\t\t\t'editor.savePost',\n\t\t\t\t\t{ id: previousRecord.id },\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror = err;\n\t\t\t}\n\t\t}\n\t\tdispatch( { type: 'REQUEST_POST_UPDATE_FINISH', options } );\n\n\t\tif ( error ) {\n\t\t\tconst args = getNotificationArgumentsForSaveFail( {\n\t\t\t\tpost: previousRecord,\n\t\t\t\tedits,\n\t\t\t\terror,\n\t\t\t} );\n\t\t\tif ( args.length ) {\n\t\t\t\tregistry.dispatch( noticesStore ).createErrorNotice( ...args );\n\t\t\t}\n\t\t} else {\n\t\t\tconst updatedRecord = select.getCurrentPost();\n\t\t\tconst args = getNotificationArgumentsForSaveSuccess( {\n\t\t\t\tpreviousPost: previousRecord,\n\t\t\t\tpost: updatedRecord,\n\t\t\t\tpostType: await registry\n\t\t\t\t\t.resolveSelect( coreStore )\n\t\t\t\t\t.getPostType( updatedRecord.type ),\n\t\t\t\toptions,\n\t\t\t} );\n\t\t\tif ( args.length ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createSuccessNotice( ...args );\n\t\t\t}\n\t\t\t// Make sure that any edits after saving create an undo level and are\n\t\t\t// considered for change detection.\n\t\t\tif ( ! options.isAutosave ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( blockEditorStore )\n\t\t\t\t\t.__unstableMarkLastChangeAsPersistent();\n\t\t\t}\n\t\t}\n\t};\n\n/**\n * Action for refreshing the current post.\n *\n * @deprecated Since WordPress 6.0.\n */\nexport function refreshPost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).refreshPost\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Action for trashing the current post in the editor.\n */\nexport const trashPost =\n\t() =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tconst postTypeSlug = select.getCurrentPostType();\n\t\tconst postType = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getPostType( postTypeSlug );\n\t\tregistry.dispatch( noticesStore ).removeNotice( TRASH_POST_NOTICE_ID );\n\t\tconst { rest_base: restBase, rest_namespace: restNamespace = 'wp/v2' } =\n\t\t\tpostType;\n\t\tdispatch( { type: 'REQUEST_POST_DELETE_START' } );\n\t\ttry {\n\t\t\tconst post = select.getCurrentPost();\n\t\t\tawait apiFetch( {\n\t\t\t\tpath: `/${ restNamespace }/${ restBase }/${ post.id }`,\n\t\t\t\tmethod: 'DELETE',\n\t\t\t} );\n\n\t\t\tawait dispatch.savePost();\n\t\t} catch ( error ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice(\n\t\t\t\t\t...getNotificationArgumentsForTrashFail( { error } )\n\t\t\t\t);\n\t\t}\n\t\tdispatch( { type: 'REQUEST_POST_DELETE_FINISH' } );\n\t};\n\n/**\n * Action that autosaves the current post. This\n * includes server-side autosaving (default) and client-side (a.k.a. local)\n * autosaving (e.g. on the Web, the post might be committed to Session\n * Storage).\n *\n * @param {Object?} options Extra flags to identify the autosave.\n */\nexport const autosave =\n\t( { local = false, ...options } = {} ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tconst post = select.getCurrentPost();\n\n\t\t// Currently template autosaving is not supported.\n\t\tif ( post.type === 'wp_template' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( local ) {\n\t\t\tconst isPostNew = select.isEditedPostNew();\n\t\t\tconst title = select.getEditedPostAttribute( 'title' );\n\t\t\tconst content = select.getEditedPostAttribute( 'content' );\n\t\t\tconst excerpt = select.getEditedPostAttribute( 'excerpt' );\n\t\t\tlocalAutosaveSet( post.id, isPostNew, title, content, excerpt );\n\t\t} else {\n\t\t\tawait dispatch.savePost( { isAutosave: true, ...options } );\n\t\t}\n\t};\n\nexport const __unstableSaveForPreview =\n\t( { forceIsAutosaveable } = {} ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif (\n\t\t\t( forceIsAutosaveable || select.isEditedPostAutosaveable() ) &&\n\t\t\t! select.isPostLocked()\n\t\t) {\n\t\t\tconst isDraft = [ 'draft', 'auto-draft' ].includes(\n\t\t\t\tselect.getEditedPostAttribute( 'status' )\n\t\t\t);\n\t\t\tif ( isDraft ) {\n\t\t\t\tawait dispatch.savePost( { isPreview: true } );\n\t\t\t} else {\n\t\t\t\tawait dispatch.autosave( { isPreview: true } );\n\t\t\t}\n\t\t}\n\n\t\treturn select.getEditedPostPreviewLink();\n\t};\n\n/**\n * Action that restores last popped state in undo history.\n */\nexport const redo =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( coreStore ).redo();\n\t};\n\n/**\n * Action that pops a record from undo history and undoes the edit.\n */\nexport const undo =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( coreStore ).undo();\n\t};\n\n/**\n * Action that creates an undo history record.\n *\n * @deprecated Since WordPress 6.0\n */\nexport function createUndoLevel() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).createUndoLevel\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Action that locks the editor.\n *\n * @param {Object} lock Details about the post lock status, user, and nonce.\n * @return {Object} Action object.\n */\nexport function updatePostLock( lock ) {\n\treturn {\n\t\ttype: 'UPDATE_POST_LOCK',\n\t\tlock,\n\t};\n}\n\n/**\n * Enable the publish sidebar.\n */\nexport const enablePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'isPublishSidebarEnabled', true );\n\t};\n\n/**\n * Disables the publish sidebar.\n */\nexport const disablePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'isPublishSidebarEnabled', false );\n\t};\n\n/**\n * Action that locks post saving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * const { subscribe } = wp.data;\n *\n * const initialPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );\n *\n * // Only allow publishing posts that are set to a future date.\n * if ( 'publish' !== initialPostStatus ) {\n *\n * \t// Track locking.\n * \tlet locked = false;\n *\n * \t// Watch for the publish event.\n * \tlet unssubscribe = subscribe( () => {\n * \t\tconst currentPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );\n * \t\tif ( 'publish' !== currentPostStatus ) {\n *\n * \t\t\t// Compare the post date to the current date, lock the post if the date isn't in the future.\n * \t\t\tconst postDate = new Date( wp.data.select( 'core/editor' ).getEditedPostAttribute( 'date' ) );\n * \t\t\tconst currentDate = new Date();\n * \t\t\tif ( postDate.getTime() <= currentDate.getTime() ) {\n * \t\t\t\tif ( ! locked ) {\n * \t\t\t\t\tlocked = true;\n * \t\t\t\t\twp.data.dispatch( 'core/editor' ).lockPostSaving( 'futurelock' );\n * \t\t\t\t}\n * \t\t\t} else {\n * \t\t\t\tif ( locked ) {\n * \t\t\t\t\tlocked = false;\n * \t\t\t\t\twp.data.dispatch( 'core/editor' ).unlockPostSaving( 'futurelock' );\n * \t\t\t\t}\n * \t\t\t}\n * \t\t}\n * \t} );\n * }\n * ```\n *\n * @return {Object} Action object\n */\nexport function lockPostSaving( lockName ) {\n\treturn {\n\t\ttype: 'LOCK_POST_SAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that unlocks post saving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Unlock post saving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function unlockPostSaving( lockName ) {\n\treturn {\n\t\ttype: 'UNLOCK_POST_SAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that locks post autosaving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Lock post autosaving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).lockPostAutosaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function lockPostAutosaving( lockName ) {\n\treturn {\n\t\ttype: 'LOCK_POST_AUTOSAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that unlocks post autosaving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Unlock post saving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).unlockPostAutosaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function unlockPostAutosaving( lockName ) {\n\treturn {\n\t\ttype: 'UNLOCK_POST_AUTOSAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Returns an action object used to signal that the blocks have been updated.\n *\n * @param {Array} blocks Block Array.\n * @param {?Object} options Optional options.\n */\nexport const resetEditorBlocks =\n\t( blocks, options = {} ) =>\n\t( { select, dispatch, registry } ) => {\n\t\tconst { __unstableShouldCreateUndoLevel, selection } = options;\n\t\tconst edits = { blocks, selection };\n\n\t\tif ( __unstableShouldCreateUndoLevel !== false ) {\n\t\t\tconst { id, type } = select.getCurrentPost();\n\t\t\tconst noChange =\n\t\t\t\tregistry\n\t\t\t\t\t.select( coreStore )\n\t\t\t\t\t.getEditedEntityRecord( 'postType', type, id ).blocks ===\n\t\t\t\tedits.blocks;\n\t\t\tif ( noChange ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.__unstableCreateUndoLevel( 'postType', type, id );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We create a new function here on every persistent edit\n\t\t\t// to make sure the edit makes the post dirty and creates\n\t\t\t// a new undo level.\n\t\t\tedits.content = ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t\t__unstableSerializeAndClean( blocksForSerialization );\n\t\t}\n\n\t\tdispatch.editPost( edits );\n\t};\n\n/*\n * Returns an action object used in signalling that the post editor settings have been updated.\n *\n * @param {Object} settings Updated settings\n *\n * @return {Object} Action object\n */\nexport function updateEditorSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_EDITOR_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Returns an action used to set the rendering mode of the post editor. We support multiple rendering modes:\n *\n * - `post-only`: This mode extracts the post blocks from the template and renders only those. The idea is to allow the user to edit the post/page in isolation without the wrapping template.\n * - `template-locked`: This mode renders both the template and the post blocks but the template blocks are locked and can't be edited. The post blocks are editable.\n *\n * @param {string} mode Mode (one of 'post-only' or 'template-locked').\n */\nexport const setRenderingMode =\n\t( mode ) =>\n\t( { dispatch, registry, select } ) => {\n\t\tif ( select.__unstableIsEditorReady() ) {\n\t\t\t// We clear the block selection but we also need to clear the selection from the core store.\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\tdispatch.editPost( { selection: undefined }, { undoIgnore: true } );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_RENDERING_MODE',\n\t\t\tmode,\n\t\t} );\n\t};\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport function setDeviceType( deviceType ) {\n\treturn {\n\t\ttype: 'SET_DEVICE_TYPE',\n\t\tdeviceType,\n\t};\n}\n\n/**\n * Returns an action object used to enable or disable a panel in the editor.\n *\n * @param {string} panelName A string that identifies the panel to enable or disable.\n *\n * @return {Object} Action object.\n */\nexport const toggleEditorPanelEnabled =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst inactivePanels =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'inactivePanels' ) ?? [];\n\n\t\tconst isPanelInactive = !! inactivePanels?.includes( panelName );\n\n\t\t// If the panel is inactive, remove it to enable it, else add it to\n\t\t// make it inactive.\n\t\tlet updatedInactivePanels;\n\t\tif ( isPanelInactive ) {\n\t\t\tupdatedInactivePanels = inactivePanels.filter(\n\t\t\t\t( invactivePanelName ) => invactivePanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedInactivePanels = [ ...inactivePanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'inactivePanels', updatedInactivePanels );\n\t};\n\n/**\n * Opens a closed panel and closes an open panel.\n *\n * @param {string} panelName A string that identifies the panel to open or close.\n */\nexport const toggleEditorPanelOpened =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst openPanels =\n\t\t\tregistry.select( preferencesStore ).get( 'core', 'openPanels' ) ??\n\t\t\t[];\n\n\t\tconst isPanelOpen = !! openPanels?.includes( panelName );\n\n\t\t// If the panel is open, remove it to close it, else add it to\n\t\t// make it open.\n\t\tlet updatedOpenPanels;\n\t\tif ( isPanelOpen ) {\n\t\t\tupdatedOpenPanels = openPanels.filter(\n\t\t\t\t( openPanelName ) => openPanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedOpenPanels = [ ...openPanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'openPanels', updatedOpenPanels );\n\t};\n\n/**\n * Returns an action object used to remove a panel from the editor.\n *\n * @param {string} panelName A string that identifies the panel to remove.\n *\n * @return {Object} Action object.\n */\nexport function removeEditorPanel( panelName ) {\n\treturn {\n\t\ttype: 'REMOVE_PANEL',\n\t\tpanelName,\n\t};\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @param {boolean|Object} value Whether the inserter should be\n * opened (true) or closed (false).\n * To specify an insertion point,\n * use an object.\n * @param {string} value.rootClientId The root client ID to insert at.\n * @param {number} value.insertionIndex The index to insert at.\n * @param {string} value.filterValue A query to filter the inserter results.\n * @param {Function} value.onSelect A callback when an item is selected.\n * @param {string} value.tab The tab to open in the inserter.\n * @param {string} value.category The category to initialize in the inserter.\n *\n * @return {Object} Action object.\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { dispatch, registry } ) => {\n\t\tif (\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue.hasOwnProperty( 'rootClientId' ) &&\n\t\t\tvalue.hasOwnProperty( 'insertionIndex' )\n\t\t) {\n\t\t\tunlock( registry.dispatch( blockEditorStore ) ).setInsertionPoint( {\n\t\t\t\trootClientId: value.rootClientId,\n\t\t\t\tindex: value.insertionIndex,\n\t\t\t} );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_IS_INSERTER_OPENED',\n\t\t\tvalue,\n\t\t} );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n * @return {Object} Action object.\n */\nexport function setIsListViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @param {Object} [options={}] Optional configuration object\n * @param {boolean} [options.createNotice=true] Whether to create a notice\n */\nexport const toggleDistractionFree =\n\t( { createNotice = true } = {} ) =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'distractionFree' );\n\t\tif ( isDistractionFree ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core', 'fixedToolbar', false );\n\t\t}\n\t\tif ( ! isDistractionFree ) {\n\t\t\tregistry.batch( () => {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t.set( 'core', 'fixedToolbar', true );\n\t\t\t\tdispatch.setIsInserterOpened( false );\n\t\t\t\tdispatch.setIsListViewOpened( false );\n\t\t\t} );\n\t\t}\n\t\tregistry.batch( () => {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core', 'distractionFree', ! isDistractionFree );\n\n\t\t\tif ( createNotice ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createInfoNotice(\n\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t? __( 'Distraction free mode deactivated.' )\n\t\t\t\t\t\t\t: __( 'Distraction free mode activated.' ),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'core/editor/distraction-free-mode/notice',\n\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t\t\t\t.set(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'fixedToolbar',\n\t\t\t\t\t\t\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t\t\t\t.toggle(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'distractionFree'\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t},\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}\n\t\t} );\n\t};\n\n/**\n * Action that toggles the Spotlight Mode view option.\n */\nexport const toggleSpotlightMode =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).toggle( 'core', 'focusMode' );\n\n\t\tconst isFocusMode = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'focusMode' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisFocusMode\n\t\t\t\t\t? __( 'Spotlight mode activated.' )\n\t\t\t\t\t: __( 'Spotlight mode deactivated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/editor/toggle-spotlight-mode/notice',\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\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle( 'core', 'focusMode' );\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};\n\n/**\n * Action that toggles the Top Toolbar view option.\n */\nexport const toggleTopToolbar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).toggle( 'core', 'fixedToolbar' );\n\n\t\tconst isTopToolbar = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'fixedToolbar' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisTopToolbar\n\t\t\t\t\t? __( 'Top toolbar activated.' )\n\t\t\t\t\t: __( 'Top toolbar deactivated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/editor/toggle-top-toolbar/notice',\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\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle( 'core', 'fixedToolbar' );\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};\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { dispatch, registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).set( 'core', 'editorMode', mode );\n\n\t\tif ( mode !== 'visual' ) {\n\t\t\t// Unselect blocks when we switch to a non visual mode.\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\t// Exit zoom out state when switching to a non visual mode.\n\t\t\tunlock( registry.dispatch( blockEditorStore ) ).resetZoomLevel();\n\t\t}\n\n\t\tif ( mode === 'visual' ) {\n\t\t\tspeak( __( 'Visual editor selected' ), 'assertive' );\n\t\t} else if ( mode === 'text' ) {\n\t\t\tconst isDistractionFree = registry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'distractionFree' );\n\t\t\tif ( isDistractionFree ) {\n\t\t\t\tdispatch.toggleDistractionFree();\n\t\t\t}\n\t\t\tspeak( __( 'Code editor selected' ), 'assertive' );\n\t\t}\n\t};\n\n/**\n * Returns an action object used in signalling that the user opened the publish\n * sidebar.\n *\n * @return {Object} Action object\n */\nexport function openPublishSidebar() {\n\treturn {\n\t\ttype: 'OPEN_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user closed the\n * publish sidebar.\n *\n * @return {Object} Action object.\n */\nexport function closePublishSidebar() {\n\treturn {\n\t\ttype: 'CLOSE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user toggles the publish sidebar.\n *\n * @return {Object} Action object\n */\nexport function togglePublishSidebar() {\n\treturn {\n\t\ttype: 'TOGGLE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Backward compatibility\n */\n\nconst getBlockEditorAction =\n\t( name ) =>\n\t( ...args ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"`wp.data.dispatch( 'core/editor' ).\" + name + '`', {\n\t\t\tsince: '5.3',\n\t\t\talternative:\n\t\t\t\t\"`wp.data.dispatch( 'core/block-editor' ).\" + name + '`',\n\t\t\tversion: '6.2',\n\t\t} );\n\t\tregistry.dispatch( blockEditorStore )[ name ]( ...args );\n\t};\n\n/**\n * @see resetBlocks in core/block-editor store.\n */\nexport const resetBlocks = getBlockEditorAction( 'resetBlocks' );\n\n/**\n * @see receiveBlocks in core/block-editor store.\n */\nexport const receiveBlocks = getBlockEditorAction( 'receiveBlocks' );\n\n/**\n * @see updateBlock in core/block-editor store.\n */\nexport const updateBlock = getBlockEditorAction( 'updateBlock' );\n\n/**\n * @see updateBlockAttributes in core/block-editor store.\n */\nexport const updateBlockAttributes = getBlockEditorAction(\n\t'updateBlockAttributes'\n);\n\n/**\n * @see selectBlock in core/block-editor store.\n */\nexport const selectBlock = getBlockEditorAction( 'selectBlock' );\n\n/**\n * @see startMultiSelect in core/block-editor store.\n */\nexport const startMultiSelect = getBlockEditorAction( 'startMultiSelect' );\n\n/**\n * @see stopMultiSelect in core/block-editor store.\n */\nexport const stopMultiSelect = getBlockEditorAction( 'stopMultiSelect' );\n\n/**\n * @see multiSelect in core/block-editor store.\n */\nexport const multiSelect = getBlockEditorAction( 'multiSelect' );\n\n/**\n * @see clearSelectedBlock in core/block-editor store.\n */\nexport const clearSelectedBlock = getBlockEditorAction( 'clearSelectedBlock' );\n\n/**\n * @see toggleSelection in core/block-editor store.\n */\nexport const toggleSelection = getBlockEditorAction( 'toggleSelection' );\n\n/**\n * @see replaceBlocks in core/block-editor store.\n */\nexport const replaceBlocks = getBlockEditorAction( 'replaceBlocks' );\n\n/**\n * @see replaceBlock in core/block-editor store.\n */\nexport const replaceBlock = getBlockEditorAction( 'replaceBlock' );\n\n/**\n * @see moveBlocksDown in core/block-editor store.\n */\nexport const moveBlocksDown = getBlockEditorAction( 'moveBlocksDown' );\n\n/**\n * @see moveBlocksUp in core/block-editor store.\n */\nexport const moveBlocksUp = getBlockEditorAction( 'moveBlocksUp' );\n\n/**\n * @see moveBlockToPosition in core/block-editor store.\n */\nexport const moveBlockToPosition = getBlockEditorAction(\n\t'moveBlockToPosition'\n);\n\n/**\n * @see insertBlock in core/block-editor store.\n */\nexport const insertBlock = getBlockEditorAction( 'insertBlock' );\n\n/**\n * @see insertBlocks in core/block-editor store.\n */\nexport const insertBlocks = getBlockEditorAction( 'insertBlocks' );\n\n/**\n * @see showInsertionPoint in core/block-editor store.\n */\nexport const showInsertionPoint = getBlockEditorAction( 'showInsertionPoint' );\n\n/**\n * @see hideInsertionPoint in core/block-editor store.\n */\nexport const hideInsertionPoint = getBlockEditorAction( 'hideInsertionPoint' );\n\n/**\n * @see setTemplateValidity in core/block-editor store.\n */\nexport const setTemplateValidity = getBlockEditorAction(\n\t'setTemplateValidity'\n);\n\n/**\n * @see synchronizeTemplate in core/block-editor store.\n */\nexport const synchronizeTemplate = getBlockEditorAction(\n\t'synchronizeTemplate'\n);\n\n/**\n * @see mergeBlocks in core/block-editor store.\n */\nexport const mergeBlocks = getBlockEditorAction( 'mergeBlocks' );\n\n/**\n * @see removeBlocks in core/block-editor store.\n */\nexport const removeBlocks = getBlockEditorAction( 'removeBlocks' );\n\n/**\n * @see removeBlock in core/block-editor store.\n */\nexport const removeBlock = getBlockEditorAction( 'removeBlock' );\n\n/**\n * @see toggleBlockMode in core/block-editor store.\n */\nexport const toggleBlockMode = getBlockEditorAction( 'toggleBlockMode' );\n\n/**\n * @see startTyping in core/block-editor store.\n */\nexport const startTyping = getBlockEditorAction( 'startTyping' );\n\n/**\n * @see stopTyping in core/block-editor store.\n */\nexport const stopTyping = getBlockEditorAction( 'stopTyping' );\n\n/**\n * @see enterFormattedText in core/block-editor store.\n */\nexport const enterFormattedText = getBlockEditorAction( 'enterFormattedText' );\n\n/**\n * @see exitFormattedText in core/block-editor store.\n */\nexport const exitFormattedText = getBlockEditorAction( 'exitFormattedText' );\n\n/**\n * @see insertDefaultBlock in core/block-editor store.\n */\nexport const insertDefaultBlock = getBlockEditorAction( 'insertDefaultBlock' );\n\n/**\n * @see updateBlockListSettings in core/block-editor store.\n */\nexport const updateBlockListSettings = getBlockEditorAction(\n\t'updateBlockListSettings'\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAKA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AAKA,IAAAW,UAAA,GAAAX,OAAA;AACA,IAAAY,cAAA,GAAAZ,OAAA;AACA,IAAAa,cAAA,GAAAb,OAAA;AAKA,IAAAc,WAAA,GAAAd,OAAA;AAhCA;AACA;AACA;;AAoBA;AACA;AACA;;AASA;AACA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NjC,QAAQ,CAAEyG,kBAAiB,CAAC,CAC5BC,GAAG,CAAE,MAAM,EAAE,yBAAyB,EAAE,KAAM,CAAC;AAClD,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1CAtF,OAAA,CAAAuF,qBAAA,GAAAA,qBAAA;AA2CO,SAASC,cAAcA,CAAEC,QAAQ,EAAG;EAC1C,OAAO;IACN3G,IAAI,EAAE,kBAAkB;IACxB2G;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,gBAAgBA,CAAED,QAAQ,EAAG;EAC5C,OAAO;IACN3G,IAAI,EAAE,oBAAoB;IAC1B2G;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,kBAAkBA,CAAEF,QAAQ,EAAG;EAC9C,OAAO;IACN3G,IAAI,EAAE,sBAAsB;IAC5B2G;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,oBAAoBA,CAAEH,QAAQ,EAAG;EAChD,OAAO;IACN3G,IAAI,EAAE,wBAAwB;IAC9B2G;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMlG,iBAAiB,GAC7BA,CAAEH,MAAM,EAAEuB,OAAO,GAAG,CAAC,CAAC,KACtB,CAAE;EAAEC,MAAM;EAAEhC,QAAQ;EAAEiC;AAAS,CAAC,KAAM;EACrC,MAAM;IAAErB,+BAA+B;IAAEqG;EAAU,CAAC,GAAGlF,OAAO;EAC9D,MAAMjC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,MAAMqB,mBAAmB,GAAA9K,OAAA,CAAA8K,mBAAA,GAAGrB,oBAAoB,CACtD,qBACD,CAAC;;AAED;AACA;AACA;AACO,MAAMsB,WAAW,GAAA/K,OAAA,CAAA+K,WAAA,GAAGtB,oBAAoB,CAAE,aAAc,CAAC;;AAEhE;AACA;AACA;AACO,MAAMuB,YAAY,GAAAhL,OAAA,CAAAgL,YAAA,GAAGvB,oBAAoB,CAAE,cAAe,CAAC;;AAElE;AACA;AACA;AACO,MAAMwB,WAAW,GAAAjL,OAAA,CAAAiL,WAAA,GAAGxB,oBAAoB,CAAE,aAAc,CAAC;;AAEhE;AACA;AACA;AACO,MAAMyB,eAAe,GAAAlL,OAAA,CAAAkL,eAAA,GAAGzB,oBAAoB,CAAE,iBAAkB,CAAC;;AAExE;AACA;AACA;AACO,MAAM0B,WAAW,GAAAnL,OAAA,CAAAmL,WAAA,GAAG1B,oBAAoB,CAAE,aAAc,CAAC;;AAEhE;AACA;AACA;AACO,MAAM2B,UAAU,GAAApL,OAAA,CAAAoL,UAAA,GAAG3B,oBAAoB,CAAE,YAAa,CAAC;;AAE9D;AACA;AACA;AACO,MAAM4B,kBAAkB,GAAArL,OAAA,CAAAqL,kBAAA,GAAG5B,oBAAoB,CAAE,oBAAqB,CAAC;;AAE9E;AACA;AACA;AACO,MAAM6B,iBAAiB,GAAAtL,OAAA,CAAAsL,iBAAA,GAAG7B,oBAAoB,CAAE,mBAAoB,CAAC;;AAE5E;AACA;AACA;AACO,MAAM8B,kBAAkB,GAAAvL,OAAA,CAAAuL,kBAAA,GAAG9B,oBAAoB,CAAE,oBAAqB,CAAC;;AAE9E;AACA;AACA;AACO,MAAM+B,uBAAuB,GAAAxL,OAAA,CAAAwL,uBAAA,GAAG/B,oBAAoB,CAC1D,yBACD,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_a11y","require","_apiFetch","_interopRequireDefault","_deprecated","_blocks","_notices","_coreData","_blockEditor","_hooks","_preferences","_i18n","_constants","_localAutosave","_noticeBuilder","_lockUnlock","setupEditor","post","edits","template","dispatch","setEditedPost","type","id","isNewPost","status","content","raw","blocks","parse","synchronizeBlocksWithTemplate","resetEditorBlocks","__unstableShouldCreateUndoLevel","Object","values","some","key","edit","_post$key$raw","editPost","exports","__experimentalTearDownEditor","deprecated","since","resetPost","version","alternative","updatePost","setupEditorState","postType","postId","options","select","registry","getCurrentPost","coreStore","editEntityRecord","savePost","isEditedPostSaveable","getEditedPostContent","isAutosave","undoIgnore","previousRecord","getEntityRecordNonTransientEdits","error","applyFiltersAsync","err","saveEntityRecord","message","code","__","getLastEntitySaveError","applyFilters","Promise","resolve","doActionAsync","args","getNotificationArgumentsForSaveFail","length","noticesStore","createErrorNotice","updatedRecord","getNotificationArgumentsForSaveSuccess","previousPost","resolveSelect","getPostType","createSuccessNotice","blockEditorStore","__unstableMarkLastChangeAsPersistent","refreshPost","trashPost","postTypeSlug","getCurrentPostType","removeNotice","TRASH_POST_NOTICE_ID","rest_base","restBase","rest_namespace","restNamespace","apiFetch","path","method","getNotificationArgumentsForTrashFail","autosave","local","isPostNew","isEditedPostNew","title","getEditedPostAttribute","excerpt","localAutosaveSet","__unstableSaveForPreview","forceIsAutosaveable","isEditedPostAutosaveable","isPostLocked","isDraft","includes","isPreview","getEditedPostPreviewLink","redo","undo","createUndoLevel","updatePostLock","lock","enablePublishSidebar","preferencesStore","set","disablePublishSidebar","lockPostSaving","lockName","unlockPostSaving","lockPostAutosaving","unlockPostAutosaving","selection","noChange","getEditedEntityRecord","__unstableCreateUndoLevel","blocksForSerialization","__unstableSerializeAndClean","updateEditorSettings","settings","setRenderingMode","mode","__unstableIsEditorReady","clearSelectedBlock","undefined","setDeviceType","deviceType","toggleEditorPanelEnabled","panelName","_registry$select$get","inactivePanels","get","isPanelInactive","updatedInactivePanels","filter","invactivePanelName","toggleEditorPanelOpened","_registry$select$get2","openPanels","isPanelOpen","updatedOpenPanels","openPanelName","removeEditorPanel","setIsInserterOpened","value","hasOwnProperty","unlock","setInsertionPoint","rootClientId","index","insertionIndex","setIsListViewOpened","isOpen","toggleDistractionFree","createNotice","isDistractionFree","batch","resetZoomLevel","createInfoNotice","actions","label","onClick","toggle","toggleSpotlightMode","isFocusMode","toggleTopToolbar","isTopToolbar","switchEditorMode","speak","openPublishSidebar","closePublishSidebar","togglePublishSidebar","getBlockEditorAction","name","resetBlocks","receiveBlocks","updateBlock","updateBlockAttributes","selectBlock","startMultiSelect","stopMultiSelect","multiSelect","toggleSelection","replaceBlocks","replaceBlock","moveBlocksDown","moveBlocksUp","moveBlockToPosition","insertBlock","insertBlocks","showInsertionPoint","hideInsertionPoint","setTemplateValidity","synchronizeTemplate","mergeBlocks","removeBlocks","removeBlock","toggleBlockMode","startTyping","stopTyping","enterFormattedText","exitFormattedText","insertDefaultBlock","updateBlockListSettings"],"sources":["@wordpress/editor/src/store/actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport apiFetch from '@wordpress/api-fetch';\nimport deprecated from '@wordpress/deprecated';\nimport {\n\tparse,\n\tsynchronizeBlocksWithTemplate,\n\t__unstableSerializeAndClean,\n} from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\tapplyFilters,\n\tapplyFiltersAsync,\n\tdoActionAsync,\n} from '@wordpress/hooks';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { TRASH_POST_NOTICE_ID } from './constants';\nimport { localAutosaveSet } from './local-autosave';\nimport {\n\tgetNotificationArgumentsForSaveSuccess,\n\tgetNotificationArgumentsForSaveFail,\n\tgetNotificationArgumentsForTrashFail,\n} from './utils/notice-builder';\nimport { unlock } from '../lock-unlock';\n/**\n * Returns an action generator used in signalling that editor has initialized with\n * the specified post object and editor settings.\n *\n * @param {Object} post Post object.\n * @param {Object} edits Initial edited attributes object.\n * @param {Array} [template] Block Template.\n */\nexport const setupEditor =\n\t( post, edits, template ) =>\n\t( { dispatch } ) => {\n\t\tdispatch.setEditedPost( post.type, post.id );\n\t\t// Apply a template for new posts only, if exists.\n\t\tconst isNewPost = post.status === 'auto-draft';\n\t\tif ( isNewPost && template ) {\n\t\t\t// In order to ensure maximum of a single parse during setup, edits are\n\t\t\t// included as part of editor setup action. Assume edited content as\n\t\t\t// canonical if provided, falling back to post.\n\t\t\tlet content;\n\t\t\tif ( 'content' in edits ) {\n\t\t\t\tcontent = edits.content;\n\t\t\t} else {\n\t\t\t\tcontent = post.content.raw;\n\t\t\t}\n\t\t\tlet blocks = parse( content );\n\t\t\tblocks = synchronizeBlocksWithTemplate( blocks, template );\n\t\t\tdispatch.resetEditorBlocks( blocks, {\n\t\t\t\t__unstableShouldCreateUndoLevel: false,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tedits &&\n\t\t\tObject.values( edits ).some(\n\t\t\t\t( [ key, edit ] ) =>\n\t\t\t\t\tedit !== ( post[ key ]?.raw ?? post[ key ] )\n\t\t\t)\n\t\t) {\n\t\t\tdispatch.editPost( edits );\n\t\t}\n\t};\n\n/**\n * Returns an action object signalling that the editor is being destroyed and\n * that any necessary state or side-effect cleanup should occur.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function __experimentalTearDownEditor() {\n\tdeprecated(\n\t\t\"wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor\",\n\t\t{\n\t\t\tsince: '6.5',\n\t\t}\n\t);\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Returns an action object used in signalling that the latest version of the\n * post has been received, either by initialization or save.\n *\n * @deprecated Since WordPress 6.0.\n */\nexport function resetPost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).resetPost\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Initialize the editor with the setupEditorState action',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Returns an action object used in signalling that a patch of updates for the\n * latest version of the post have been received.\n *\n * @return {Object} Action object.\n * @deprecated since Gutenberg 9.7.0.\n */\nexport function updatePost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).updatePost\", {\n\t\tsince: '5.7',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Setup the editor state.\n *\n * @deprecated\n *\n * @param {Object} post Post object.\n */\nexport function setupEditorState( post ) {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).setupEditorState\", {\n\t\tsince: '6.5',\n\t\talternative: \"wp.data.dispatch( 'core/editor' ).setEditedPost\",\n\t} );\n\treturn setEditedPost( post.type, post.id );\n}\n\n/**\n * Returns an action that sets the current post Type and post ID.\n *\n * @param {string} postType Post Type.\n * @param {string} postId Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setEditedPost( postType, postId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tpostId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that attributes of the post have\n * been edited.\n *\n * @param {Object} edits Post attributes to edit.\n * @param {Object} [options] Options for the edit.\n *\n * @example\n * ```js\n * // Update the post title\n * wp.data.dispatch( 'core/editor' ).editPost( { title: `${ newTitle }` } );\n * ```\n *\n * @example\n *```js\n * \t// Get specific media size based on the featured media ID\n * \t// Note: change sizes?.large for any registered size\n * \tconst getFeaturedMediaUrl = useSelect( ( select ) => {\n * \t\tconst getFeaturedMediaId =\n * \t\t\tselect( 'core/editor' ).getEditedPostAttribute( 'featured_media' );\n * \t\tconst getMedia = select( 'core' ).getMedia( getFeaturedMediaId );\n *\n * \t\treturn (\n * \t\t\tgetMedia?.media_details?.sizes?.large?.source_url || getMedia?.source_url || ''\n * \t\t);\n * }, [] );\n * ```\n *\n * @return {Object} Action object\n */\nexport const editPost =\n\t( edits, options ) =>\n\t( { select, registry } ) => {\n\t\tconst { id, type } = select.getCurrentPost();\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.editEntityRecord( 'postType', type, id, edits, options );\n\t};\n\n/**\n * Action for saving the current post in the editor.\n *\n * @param {Object} [options]\n */\nexport const savePost =\n\t( options = {} ) =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tif ( ! select.isEditedPostSaveable() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst content = select.getEditedPostContent();\n\n\t\tif ( ! options.isAutosave ) {\n\t\t\tdispatch.editPost( { content }, { undoIgnore: true } );\n\t\t}\n\n\t\tconst previousRecord = select.getCurrentPost();\n\t\tlet edits = {\n\t\t\tid: previousRecord.id,\n\t\t\t...registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEntityRecordNonTransientEdits(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\tpreviousRecord.id\n\t\t\t\t),\n\t\t\tcontent,\n\t\t};\n\t\tdispatch( { type: 'REQUEST_POST_UPDATE_START', options } );\n\n\t\tlet error = false;\n\t\ttry {\n\t\t\tedits = await applyFiltersAsync(\n\t\t\t\t'editor.preSavePost',\n\t\t\t\tedits,\n\t\t\t\toptions\n\t\t\t);\n\t\t} catch ( err ) {\n\t\t\terror = err;\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait registry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.saveEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\t\tedits,\n\t\t\t\t\t\toptions\n\t\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror =\n\t\t\t\t\terr.message && err.code !== 'unknown_error'\n\t\t\t\t\t\t? err.message\n\t\t\t\t\t\t: __( 'An error occurred while updating.' );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\terror = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getLastEntitySaveError(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\tpreviousRecord.id\n\t\t\t\t);\n\t\t}\n\n\t\t// Run the hook with legacy unstable name for backward compatibility\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait applyFilters(\n\t\t\t\t\t'editor.__unstableSavePost',\n\t\t\t\t\tPromise.resolve(),\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror = err;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait doActionAsync(\n\t\t\t\t\t'editor.savePost',\n\t\t\t\t\t{ id: previousRecord.id },\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror = err;\n\t\t\t}\n\t\t}\n\t\tdispatch( { type: 'REQUEST_POST_UPDATE_FINISH', options } );\n\n\t\tif ( error ) {\n\t\t\tconst args = getNotificationArgumentsForSaveFail( {\n\t\t\t\tpost: previousRecord,\n\t\t\t\tedits,\n\t\t\t\terror,\n\t\t\t} );\n\t\t\tif ( args.length ) {\n\t\t\t\tregistry.dispatch( noticesStore ).createErrorNotice( ...args );\n\t\t\t}\n\t\t} else {\n\t\t\tconst updatedRecord = select.getCurrentPost();\n\t\t\tconst args = getNotificationArgumentsForSaveSuccess( {\n\t\t\t\tpreviousPost: previousRecord,\n\t\t\t\tpost: updatedRecord,\n\t\t\t\tpostType: await registry\n\t\t\t\t\t.resolveSelect( coreStore )\n\t\t\t\t\t.getPostType( updatedRecord.type ),\n\t\t\t\toptions,\n\t\t\t} );\n\t\t\tif ( args.length ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createSuccessNotice( ...args );\n\t\t\t}\n\t\t\t// Make sure that any edits after saving create an undo level and are\n\t\t\t// considered for change detection.\n\t\t\tif ( ! options.isAutosave ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( blockEditorStore )\n\t\t\t\t\t.__unstableMarkLastChangeAsPersistent();\n\t\t\t}\n\t\t}\n\t};\n\n/**\n * Action for refreshing the current post.\n *\n * @deprecated Since WordPress 6.0.\n */\nexport function refreshPost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).refreshPost\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Action for trashing the current post in the editor.\n */\nexport const trashPost =\n\t() =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tconst postTypeSlug = select.getCurrentPostType();\n\t\tconst postType = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getPostType( postTypeSlug );\n\t\tregistry.dispatch( noticesStore ).removeNotice( TRASH_POST_NOTICE_ID );\n\t\tconst { rest_base: restBase, rest_namespace: restNamespace = 'wp/v2' } =\n\t\t\tpostType;\n\t\tdispatch( { type: 'REQUEST_POST_DELETE_START' } );\n\t\ttry {\n\t\t\tconst post = select.getCurrentPost();\n\t\t\tawait apiFetch( {\n\t\t\t\tpath: `/${ restNamespace }/${ restBase }/${ post.id }`,\n\t\t\t\tmethod: 'DELETE',\n\t\t\t} );\n\n\t\t\tawait dispatch.savePost();\n\t\t} catch ( error ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice(\n\t\t\t\t\t...getNotificationArgumentsForTrashFail( { error } )\n\t\t\t\t);\n\t\t}\n\t\tdispatch( { type: 'REQUEST_POST_DELETE_FINISH' } );\n\t};\n\n/**\n * Action that autosaves the current post. This\n * includes server-side autosaving (default) and client-side (a.k.a. local)\n * autosaving (e.g. on the Web, the post might be committed to Session\n * Storage).\n *\n * @param {Object} [options] Extra flags to identify the autosave.\n * @param {boolean} [options.local] Whether to perform a local autosave.\n */\nexport const autosave =\n\t( { local = false, ...options } = {} ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tconst post = select.getCurrentPost();\n\n\t\t// Currently template autosaving is not supported.\n\t\tif ( post.type === 'wp_template' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( local ) {\n\t\t\tconst isPostNew = select.isEditedPostNew();\n\t\t\tconst title = select.getEditedPostAttribute( 'title' );\n\t\t\tconst content = select.getEditedPostAttribute( 'content' );\n\t\t\tconst excerpt = select.getEditedPostAttribute( 'excerpt' );\n\t\t\tlocalAutosaveSet( post.id, isPostNew, title, content, excerpt );\n\t\t} else {\n\t\t\tawait dispatch.savePost( { isAutosave: true, ...options } );\n\t\t}\n\t};\n\nexport const __unstableSaveForPreview =\n\t( { forceIsAutosaveable } = {} ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif (\n\t\t\t( forceIsAutosaveable || select.isEditedPostAutosaveable() ) &&\n\t\t\t! select.isPostLocked()\n\t\t) {\n\t\t\tconst isDraft = [ 'draft', 'auto-draft' ].includes(\n\t\t\t\tselect.getEditedPostAttribute( 'status' )\n\t\t\t);\n\t\t\tif ( isDraft ) {\n\t\t\t\tawait dispatch.savePost( { isPreview: true } );\n\t\t\t} else {\n\t\t\t\tawait dispatch.autosave( { isPreview: true } );\n\t\t\t}\n\t\t}\n\n\t\treturn select.getEditedPostPreviewLink();\n\t};\n\n/**\n * Action that restores last popped state in undo history.\n */\nexport const redo =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( coreStore ).redo();\n\t};\n\n/**\n * Action that pops a record from undo history and undoes the edit.\n */\nexport const undo =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( coreStore ).undo();\n\t};\n\n/**\n * Action that creates an undo history record.\n *\n * @deprecated Since WordPress 6.0\n */\nexport function createUndoLevel() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).createUndoLevel\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Action that locks the editor.\n *\n * @param {Object} lock Details about the post lock status, user, and nonce.\n * @return {Object} Action object.\n */\nexport function updatePostLock( lock ) {\n\treturn {\n\t\ttype: 'UPDATE_POST_LOCK',\n\t\tlock,\n\t};\n}\n\n/**\n * Enable the publish sidebar.\n */\nexport const enablePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'isPublishSidebarEnabled', true );\n\t};\n\n/**\n * Disables the publish sidebar.\n */\nexport const disablePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'isPublishSidebarEnabled', false );\n\t};\n\n/**\n * Action that locks post saving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * const { subscribe } = wp.data;\n *\n * const initialPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );\n *\n * // Only allow publishing posts that are set to a future date.\n * if ( 'publish' !== initialPostStatus ) {\n *\n * \t// Track locking.\n * \tlet locked = false;\n *\n * \t// Watch for the publish event.\n * \tlet unssubscribe = subscribe( () => {\n * \t\tconst currentPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );\n * \t\tif ( 'publish' !== currentPostStatus ) {\n *\n * \t\t\t// Compare the post date to the current date, lock the post if the date isn't in the future.\n * \t\t\tconst postDate = new Date( wp.data.select( 'core/editor' ).getEditedPostAttribute( 'date' ) );\n * \t\t\tconst currentDate = new Date();\n * \t\t\tif ( postDate.getTime() <= currentDate.getTime() ) {\n * \t\t\t\tif ( ! locked ) {\n * \t\t\t\t\tlocked = true;\n * \t\t\t\t\twp.data.dispatch( 'core/editor' ).lockPostSaving( 'futurelock' );\n * \t\t\t\t}\n * \t\t\t} else {\n * \t\t\t\tif ( locked ) {\n * \t\t\t\t\tlocked = false;\n * \t\t\t\t\twp.data.dispatch( 'core/editor' ).unlockPostSaving( 'futurelock' );\n * \t\t\t\t}\n * \t\t\t}\n * \t\t}\n * \t} );\n * }\n * ```\n *\n * @return {Object} Action object\n */\nexport function lockPostSaving( lockName ) {\n\treturn {\n\t\ttype: 'LOCK_POST_SAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that unlocks post saving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Unlock post saving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function unlockPostSaving( lockName ) {\n\treturn {\n\t\ttype: 'UNLOCK_POST_SAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that locks post autosaving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Lock post autosaving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).lockPostAutosaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function lockPostAutosaving( lockName ) {\n\treturn {\n\t\ttype: 'LOCK_POST_AUTOSAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that unlocks post autosaving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Unlock post saving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).unlockPostAutosaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function unlockPostAutosaving( lockName ) {\n\treturn {\n\t\ttype: 'UNLOCK_POST_AUTOSAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Returns an action object used to signal that the blocks have been updated.\n *\n * @param {Array} blocks Block Array.\n * @param {Object} [options] Optional options.\n */\nexport const resetEditorBlocks =\n\t( blocks, options = {} ) =>\n\t( { select, dispatch, registry } ) => {\n\t\tconst { __unstableShouldCreateUndoLevel, selection } = options;\n\t\tconst edits = { blocks, selection };\n\n\t\tif ( __unstableShouldCreateUndoLevel !== false ) {\n\t\t\tconst { id, type } = select.getCurrentPost();\n\t\t\tconst noChange =\n\t\t\t\tregistry\n\t\t\t\t\t.select( coreStore )\n\t\t\t\t\t.getEditedEntityRecord( 'postType', type, id ).blocks ===\n\t\t\t\tedits.blocks;\n\t\t\tif ( noChange ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.__unstableCreateUndoLevel( 'postType', type, id );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We create a new function here on every persistent edit\n\t\t\t// to make sure the edit makes the post dirty and creates\n\t\t\t// a new undo level.\n\t\t\tedits.content = ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t\t__unstableSerializeAndClean( blocksForSerialization );\n\t\t}\n\n\t\tdispatch.editPost( edits );\n\t};\n\n/*\n * Returns an action object used in signalling that the post editor settings have been updated.\n *\n * @param {Object} settings Updated settings\n *\n * @return {Object} Action object\n */\nexport function updateEditorSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_EDITOR_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Returns an action used to set the rendering mode of the post editor. We support multiple rendering modes:\n *\n * - `post-only`: This mode extracts the post blocks from the template and renders only those. The idea is to allow the user to edit the post/page in isolation without the wrapping template.\n * - `template-locked`: This mode renders both the template and the post blocks but the template blocks are locked and can't be edited. The post blocks are editable.\n *\n * @param {string} mode Mode (one of 'post-only' or 'template-locked').\n */\nexport const setRenderingMode =\n\t( mode ) =>\n\t( { dispatch, registry, select } ) => {\n\t\tif ( select.__unstableIsEditorReady() ) {\n\t\t\t// We clear the block selection but we also need to clear the selection from the core store.\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\tdispatch.editPost( { selection: undefined }, { undoIgnore: true } );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_RENDERING_MODE',\n\t\t\tmode,\n\t\t} );\n\t};\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport function setDeviceType( deviceType ) {\n\treturn {\n\t\ttype: 'SET_DEVICE_TYPE',\n\t\tdeviceType,\n\t};\n}\n\n/**\n * Returns an action object used to enable or disable a panel in the editor.\n *\n * @param {string} panelName A string that identifies the panel to enable or disable.\n *\n * @return {Object} Action object.\n */\nexport const toggleEditorPanelEnabled =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst inactivePanels =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'inactivePanels' ) ?? [];\n\n\t\tconst isPanelInactive = !! inactivePanels?.includes( panelName );\n\n\t\t// If the panel is inactive, remove it to enable it, else add it to\n\t\t// make it inactive.\n\t\tlet updatedInactivePanels;\n\t\tif ( isPanelInactive ) {\n\t\t\tupdatedInactivePanels = inactivePanels.filter(\n\t\t\t\t( invactivePanelName ) => invactivePanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedInactivePanels = [ ...inactivePanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'inactivePanels', updatedInactivePanels );\n\t};\n\n/**\n * Opens a closed panel and closes an open panel.\n *\n * @param {string} panelName A string that identifies the panel to open or close.\n */\nexport const toggleEditorPanelOpened =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst openPanels =\n\t\t\tregistry.select( preferencesStore ).get( 'core', 'openPanels' ) ??\n\t\t\t[];\n\n\t\tconst isPanelOpen = !! openPanels?.includes( panelName );\n\n\t\t// If the panel is open, remove it to close it, else add it to\n\t\t// make it open.\n\t\tlet updatedOpenPanels;\n\t\tif ( isPanelOpen ) {\n\t\t\tupdatedOpenPanels = openPanels.filter(\n\t\t\t\t( openPanelName ) => openPanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedOpenPanels = [ ...openPanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'openPanels', updatedOpenPanels );\n\t};\n\n/**\n * Returns an action object used to remove a panel from the editor.\n *\n * @param {string} panelName A string that identifies the panel to remove.\n *\n * @return {Object} Action object.\n */\nexport function removeEditorPanel( panelName ) {\n\treturn {\n\t\ttype: 'REMOVE_PANEL',\n\t\tpanelName,\n\t};\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @param {boolean|Object} value Whether the inserter should be\n * opened (true) or closed (false).\n * To specify an insertion point,\n * use an object.\n * @param {string} value.rootClientId The root client ID to insert at.\n * @param {number} value.insertionIndex The index to insert at.\n * @param {string} value.filterValue A query to filter the inserter results.\n * @param {Function} value.onSelect A callback when an item is selected.\n * @param {string} value.tab The tab to open in the inserter.\n * @param {string} value.category The category to initialize in the inserter.\n *\n * @return {Object} Action object.\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { dispatch, registry } ) => {\n\t\tif (\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue.hasOwnProperty( 'rootClientId' ) &&\n\t\t\tvalue.hasOwnProperty( 'insertionIndex' )\n\t\t) {\n\t\t\tunlock( registry.dispatch( blockEditorStore ) ).setInsertionPoint( {\n\t\t\t\trootClientId: value.rootClientId,\n\t\t\t\tindex: value.insertionIndex,\n\t\t\t} );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_IS_INSERTER_OPENED',\n\t\t\tvalue,\n\t\t} );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n * @return {Object} Action object.\n */\nexport function setIsListViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @param {Object} [options={}] Optional configuration object\n * @param {boolean} [options.createNotice=true] Whether to create a notice\n */\nexport const toggleDistractionFree =\n\t( { createNotice = true } = {} ) =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'distractionFree' );\n\t\tif ( isDistractionFree ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core', 'fixedToolbar', false );\n\t\t}\n\t\tif ( ! isDistractionFree ) {\n\t\t\tregistry.batch( () => {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t.set( 'core', 'fixedToolbar', true );\n\t\t\t\tdispatch.setIsInserterOpened( false );\n\t\t\t\tdispatch.setIsListViewOpened( false );\n\t\t\t\tunlock(\n\t\t\t\t\tregistry.dispatch( blockEditorStore )\n\t\t\t\t).resetZoomLevel();\n\t\t\t} );\n\t\t}\n\t\tregistry.batch( () => {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core', 'distractionFree', ! isDistractionFree );\n\n\t\t\tif ( createNotice ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createInfoNotice(\n\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t? __( 'Distraction free mode deactivated.' )\n\t\t\t\t\t\t\t: __( 'Distraction free mode activated.' ),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'core/editor/distraction-free-mode/notice',\n\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t\t\t\t.set(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'fixedToolbar',\n\t\t\t\t\t\t\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t\t\t\t.toggle(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'distractionFree'\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t},\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}\n\t\t} );\n\t};\n\n/**\n * Action that toggles the Spotlight Mode view option.\n */\nexport const toggleSpotlightMode =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).toggle( 'core', 'focusMode' );\n\n\t\tconst isFocusMode = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'focusMode' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisFocusMode\n\t\t\t\t\t? __( 'Spotlight mode activated.' )\n\t\t\t\t\t: __( 'Spotlight mode deactivated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/editor/toggle-spotlight-mode/notice',\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\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle( 'core', 'focusMode' );\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};\n\n/**\n * Action that toggles the Top Toolbar view option.\n */\nexport const toggleTopToolbar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).toggle( 'core', 'fixedToolbar' );\n\n\t\tconst isTopToolbar = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'fixedToolbar' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisTopToolbar\n\t\t\t\t\t? __( 'Top toolbar activated.' )\n\t\t\t\t\t: __( 'Top toolbar deactivated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/editor/toggle-top-toolbar/notice',\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\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle( 'core', 'fixedToolbar' );\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};\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { dispatch, registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).set( 'core', 'editorMode', mode );\n\n\t\tif ( mode !== 'visual' ) {\n\t\t\t// Unselect blocks when we switch to a non visual mode.\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\t// Exit zoom out state when switching to a non visual mode.\n\t\t\tunlock( registry.dispatch( blockEditorStore ) ).resetZoomLevel();\n\t\t}\n\n\t\tif ( mode === 'visual' ) {\n\t\t\tspeak( __( 'Visual editor selected' ), 'assertive' );\n\t\t} else if ( mode === 'text' ) {\n\t\t\tconst isDistractionFree = registry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'distractionFree' );\n\t\t\tif ( isDistractionFree ) {\n\t\t\t\tdispatch.toggleDistractionFree();\n\t\t\t}\n\t\t\tspeak( __( 'Code editor selected' ), 'assertive' );\n\t\t}\n\t};\n\n/**\n * Returns an action object used in signalling that the user opened the publish\n * sidebar.\n *\n * @return {Object} Action object\n */\nexport function openPublishSidebar() {\n\treturn {\n\t\ttype: 'OPEN_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user closed the\n * publish sidebar.\n *\n * @return {Object} Action object.\n */\nexport function closePublishSidebar() {\n\treturn {\n\t\ttype: 'CLOSE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user toggles the publish sidebar.\n *\n * @return {Object} Action object\n */\nexport function togglePublishSidebar() {\n\treturn {\n\t\ttype: 'TOGGLE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Backward compatibility\n */\n\nconst getBlockEditorAction =\n\t( name ) =>\n\t( ...args ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"`wp.data.dispatch( 'core/editor' ).\" + name + '`', {\n\t\t\tsince: '5.3',\n\t\t\talternative:\n\t\t\t\t\"`wp.data.dispatch( 'core/block-editor' ).\" + name + '`',\n\t\t\tversion: '6.2',\n\t\t} );\n\t\tregistry.dispatch( blockEditorStore )[ name ]( ...args );\n\t};\n\n/**\n * @see resetBlocks in core/block-editor store.\n */\nexport const resetBlocks = getBlockEditorAction( 'resetBlocks' );\n\n/**\n * @see receiveBlocks in core/block-editor store.\n */\nexport const receiveBlocks = getBlockEditorAction( 'receiveBlocks' );\n\n/**\n * @see updateBlock in core/block-editor store.\n */\nexport const updateBlock = getBlockEditorAction( 'updateBlock' );\n\n/**\n * @see updateBlockAttributes in core/block-editor store.\n */\nexport const updateBlockAttributes = getBlockEditorAction(\n\t'updateBlockAttributes'\n);\n\n/**\n * @see selectBlock in core/block-editor store.\n */\nexport const selectBlock = getBlockEditorAction( 'selectBlock' );\n\n/**\n * @see startMultiSelect in core/block-editor store.\n */\nexport const startMultiSelect = getBlockEditorAction( 'startMultiSelect' );\n\n/**\n * @see stopMultiSelect in core/block-editor store.\n */\nexport const stopMultiSelect = getBlockEditorAction( 'stopMultiSelect' );\n\n/**\n * @see multiSelect in core/block-editor store.\n */\nexport const multiSelect = getBlockEditorAction( 'multiSelect' );\n\n/**\n * @see clearSelectedBlock in core/block-editor store.\n */\nexport const clearSelectedBlock = getBlockEditorAction( 'clearSelectedBlock' );\n\n/**\n * @see toggleSelection in core/block-editor store.\n */\nexport const toggleSelection = getBlockEditorAction( 'toggleSelection' );\n\n/**\n * @see replaceBlocks in core/block-editor store.\n */\nexport const replaceBlocks = getBlockEditorAction( 'replaceBlocks' );\n\n/**\n * @see replaceBlock in core/block-editor store.\n */\nexport const replaceBlock = getBlockEditorAction( 'replaceBlock' );\n\n/**\n * @see moveBlocksDown in core/block-editor store.\n */\nexport const moveBlocksDown = getBlockEditorAction( 'moveBlocksDown' );\n\n/**\n * @see moveBlocksUp in core/block-editor store.\n */\nexport const moveBlocksUp = getBlockEditorAction( 'moveBlocksUp' );\n\n/**\n * @see moveBlockToPosition in core/block-editor store.\n */\nexport const moveBlockToPosition = getBlockEditorAction(\n\t'moveBlockToPosition'\n);\n\n/**\n * @see insertBlock in core/block-editor store.\n */\nexport const insertBlock = getBlockEditorAction( 'insertBlock' );\n\n/**\n * @see insertBlocks in core/block-editor store.\n */\nexport const insertBlocks = getBlockEditorAction( 'insertBlocks' );\n\n/**\n * @see showInsertionPoint in core/block-editor store.\n */\nexport const showInsertionPoint = getBlockEditorAction( 'showInsertionPoint' );\n\n/**\n * @see hideInsertionPoint in core/block-editor store.\n */\nexport const hideInsertionPoint = getBlockEditorAction( 'hideInsertionPoint' );\n\n/**\n * @see setTemplateValidity in core/block-editor store.\n */\nexport const setTemplateValidity = getBlockEditorAction(\n\t'setTemplateValidity'\n);\n\n/**\n * @see synchronizeTemplate in core/block-editor store.\n */\nexport const synchronizeTemplate = getBlockEditorAction(\n\t'synchronizeTemplate'\n);\n\n/**\n * @see mergeBlocks in core/block-editor store.\n */\nexport const mergeBlocks = getBlockEditorAction( 'mergeBlocks' );\n\n/**\n * @see removeBlocks in core/block-editor store.\n */\nexport const removeBlocks = getBlockEditorAction( 'removeBlocks' );\n\n/**\n * @see removeBlock in core/block-editor store.\n */\nexport const removeBlock = getBlockEditorAction( 'removeBlock' );\n\n/**\n * @see toggleBlockMode in core/block-editor store.\n */\nexport const toggleBlockMode = getBlockEditorAction( 'toggleBlockMode' );\n\n/**\n * @see startTyping in core/block-editor store.\n */\nexport const startTyping = getBlockEditorAction( 'startTyping' );\n\n/**\n * @see stopTyping in core/block-editor store.\n */\nexport const stopTyping = getBlockEditorAction( 'stopTyping' );\n\n/**\n * @see enterFormattedText in core/block-editor store.\n */\nexport const enterFormattedText = getBlockEditorAction( 'enterFormattedText' );\n\n/**\n * @see exitFormattedText in core/block-editor store.\n */\nexport const exitFormattedText = getBlockEditorAction( 'exitFormattedText' );\n\n/**\n * @see insertDefaultBlock in core/block-editor store.\n */\nexport const insertDefaultBlock = getBlockEditorAction( 'insertDefaultBlock' );\n\n/**\n * @see updateBlockListSettings in core/block-editor store.\n */\nexport const updateBlockListSettings = getBlockEditorAction(\n\t'updateBlockListSettings'\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAKA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AAKA,IAAAW,UAAA,GAAAX,OAAA;AACA,IAAAY,cAAA,GAAAZ,OAAA;AACA,IAAAa,cAAA,GAAAb,OAAA;AAKA,IAAAc,WAAA,GAAAd,OAAA;AAhCA;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E1E;AAAS,CAAC,KAAM;EACnBA,QAAQ,CACNjC,QAAQ,CAAEyG,kBAAiB,CAAC,CAC5BC,GAAG,CAAE,MAAM,EAAE,yBAAyB,EAAE,KAAM,CAAC;AAClD,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1CAtF,OAAA,CAAAuF,qBAAA,GAAAA,qBAAA;AA2CO,SAASC,cAAcA,CAAEC,QAAQ,EAAG;EAC1C,OAAO;IACN3G,IAAI,EAAE,kBAAkB;IACxB2G;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,gBAAgBA,CAAED,QAAQ,EAAG;EAC5C,OAAO;IACN3G,IAAI,EAAE,oBAAoB;IAC1B2G;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,kBAAkBA,CAAEF,QAAQ,EAAG;EAC9C,OAAO;IACN3G,IAAI,EAAE,sBAAsB;IAC5B2G;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,oBAAoBA,CAAEH,QAAQ,EAAG;EAChD,OAAO;IACN3G,IAAI,EAAE,wBAAwB;IAC9B2G;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMlG,iBAAiB,GAC7BA,CAAEH,MAAM,EAAEuB,OAAO,GAAG,CAAC,CAAC,KACtB,CAAE;EAAEC,MAAM;EAAEhC,QAAQ;EAAEiC;AAAS,CAAC,KAAM;EACrC,MAAM;IAAErB,+BAA+B;IAAEqG;E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,oBAAoB,CAC1D,yBACD,CAAC","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.getEntityActions = getEntityActions;
|
|
8
|
+
exports.getEntityFields = getEntityFields;
|
|
8
9
|
exports.getInserter = void 0;
|
|
9
10
|
exports.getInserterSidebarToggleRef = getInserterSidebarToggleRef;
|
|
10
11
|
exports.getListViewToggleRef = getListViewToggleRef;
|
|
@@ -76,7 +77,7 @@ const CARD_ICONS = {
|
|
|
76
77
|
const getPostIcon = exports.getPostIcon = (0, _data.createRegistrySelector)(select => (state, postType, options) => {
|
|
77
78
|
{
|
|
78
79
|
if (postType === 'wp_template_part' || postType === 'wp_template') {
|
|
79
|
-
return (
|
|
80
|
+
return (select(_coreData.store).getEntityRecord('root', '__unstableBase')?.default_template_part_areas || []).find(item => options.area === item.area)?.icon || _icons.layout;
|
|
80
81
|
}
|
|
81
82
|
if (CARD_ICONS[postType]) {
|
|
82
83
|
return CARD_ICONS[postType];
|
|
@@ -129,6 +130,9 @@ function getEntityActions(state, ...args) {
|
|
|
129
130
|
function isEntityReady(state, ...args) {
|
|
130
131
|
return (0, _privateSelectors.isEntityReady)(state.dataviews, ...args);
|
|
131
132
|
}
|
|
133
|
+
function getEntityFields(state, ...args) {
|
|
134
|
+
return (0, _privateSelectors.getEntityFields)(state.dataviews, ...args);
|
|
135
|
+
}
|
|
132
136
|
|
|
133
137
|
/**
|
|
134
138
|
* Similar to getBlocksByName in @wordpress/block-editor, but only returns the top-most
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_fastDeepEqual","_interopRequireDefault","require","_blockEditor","_data","_icons","_coreData","_selectors","_privateSelectors","EMPTY_INSERTION_POINT","rootClientId","undefined","insertionIndex","filterValue","getInserter","exports","createRegistrySelector","select","createSelector","state","blockInserterPanel","getRenderingMode","postContentClientId","blockEditorStore","getBlocksByName","getListViewToggleRef","listViewToggleRef","getInserterSidebarToggleRef","inserterSidebarToggleRef","CARD_ICONS","wp_block","symbol","wp_navigation","navigation","page","pageIcon","post","verse","getPostIcon","postType","options","__experimentalGetDefaultTemplatePartAreas","find","item","area","icon","layout","postTypeEntity","coreStore","getPostType","startsWith","slice","hasPostMetaChanges","postId","type","currentPostType","id","currentPostId","getCurrentPost","edits","getEntityRecordNonTransientEdits","meta","originalPostMeta","getEntityRecord","fastDeepEqual","footnotes","getEntityActions","args","_getEntityActions","dataviews","isEntityReady","_isEntityReady","getPostBlocksByName","blockNames","Array","isArray","getBlockParents","getBlockName","filter","clientId","every","parentClientId","parentBlockName","includes","getBlocks"],"sources":["@wordpress/editor/src/store/private-selectors.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal';\n\n/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport {\n\tlayout,\n\tsymbol,\n\tnavigation,\n\tpage as pageIcon,\n\tverse,\n} from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetRenderingMode,\n\tgetCurrentPost,\n\t__experimentalGetDefaultTemplatePartAreas,\n} from './selectors';\nimport {\n\tgetEntityActions as _getEntityActions,\n\tisEntityReady as _isEntityReady,\n} from '../dataviews/store/private-selectors';\n\nconst EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n\tfilterValue: undefined,\n};\n\n/**\n * Get the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const getInserter = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state ) => {\n\t\t\tif ( typeof state.blockInserterPanel === 'object' ) {\n\t\t\t\treturn state.blockInserterPanel;\n\t\t\t}\n\n\t\t\tif ( getRenderingMode( state ) === 'template-locked' ) {\n\t\t\t\tconst [ postContentClientId ] =\n\t\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t\t'core/post-content'\n\t\t\t\t\t);\n\t\t\t\tif ( postContentClientId ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trootClientId: postContentClientId,\n\t\t\t\t\t\tinsertionIndex: undefined,\n\t\t\t\t\t\tfilterValue: undefined,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn EMPTY_INSERTION_POINT;\n\t\t},\n\t\t( state ) => {\n\t\t\tconst [ postContentClientId ] =\n\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t'core/post-content'\n\t\t\t\t);\n\t\t\treturn [\n\t\t\t\tstate.blockInserterPanel,\n\t\t\t\tgetRenderingMode( state ),\n\t\t\t\tpostContentClientId,\n\t\t\t];\n\t\t}\n\t)\n);\n\nexport function getListViewToggleRef( state ) {\n\treturn state.listViewToggleRef;\n}\nexport function getInserterSidebarToggleRef( state ) {\n\treturn state.inserterSidebarToggleRef;\n}\nconst CARD_ICONS = {\n\twp_block: symbol,\n\twp_navigation: navigation,\n\tpage: pageIcon,\n\tpost: verse,\n};\n\nexport const getPostIcon = createRegistrySelector(\n\t( select ) => ( state, postType, options ) => {\n\t\t{\n\t\t\tif (\n\t\t\t\tpostType === 'wp_template_part' ||\n\t\t\t\tpostType === 'wp_template'\n\t\t\t) {\n\t\t\t\treturn (\n\t\t\t\t\t__experimentalGetDefaultTemplatePartAreas( state ).find(\n\t\t\t\t\t\t( item ) => options.area === item.area\n\t\t\t\t\t)?.icon || layout\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( CARD_ICONS[ postType ] ) {\n\t\t\t\treturn CARD_ICONS[ postType ];\n\t\t\t}\n\t\t\tconst postTypeEntity = select( coreStore ).getPostType( postType );\n\t\t\t// `icon` is the `menu_icon` property of a post type. We\n\t\t\t// only handle `dashicons` for now, even if the `menu_icon`\n\t\t\t// also supports urls and svg as values.\n\t\t\tif (\n\t\t\t\ttypeof postTypeEntity?.icon === 'string' &&\n\t\t\t\tpostTypeEntity.icon.startsWith( 'dashicons-' )\n\t\t\t) {\n\t\t\t\treturn postTypeEntity.icon.slice( 10 );\n\t\t\t}\n\t\t\treturn pageIcon;\n\t\t}\n\t}\n);\n\n/**\n * Returns true if there are unsaved changes to the\n * post's meta fields, and false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} postType The post type of the post.\n * @param {number} postId The ID of the post.\n *\n * @return {boolean} Whether there are edits or not in the meta fields of the relevant post.\n */\nexport const hasPostMetaChanges = createRegistrySelector(\n\t( select ) => ( state, postType, postId ) => {\n\t\tconst { type: currentPostType, id: currentPostId } =\n\t\t\tgetCurrentPost( state );\n\t\t// If no postType or postId is passed, use the current post.\n\t\tconst edits = select( coreStore ).getEntityRecordNonTransientEdits(\n\t\t\t'postType',\n\t\t\tpostType || currentPostType,\n\t\t\tpostId || currentPostId\n\t\t);\n\n\t\tif ( ! edits?.meta ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Compare if anything apart from `footnotes` has changed.\n\t\tconst originalPostMeta = select( coreStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType || currentPostType,\n\t\t\tpostId || currentPostId\n\t\t)?.meta;\n\n\t\treturn ! fastDeepEqual(\n\t\t\t{ ...originalPostMeta, footnotes: undefined },\n\t\t\t{ ...edits.meta, footnotes: undefined }\n\t\t);\n\t}\n);\n\nexport function getEntityActions( state, ...args ) {\n\treturn _getEntityActions( state.dataviews, ...args );\n}\n\nexport function isEntityReady( state, ...args ) {\n\treturn _isEntityReady( state.dataviews, ...args );\n}\n\n/**\n * Similar to getBlocksByName in @wordpress/block-editor, but only returns the top-most\n * blocks that aren't descendants of the query block.\n *\n * @param {Object} state Global application state.\n * @param {Array|string} blockNames Block names of the blocks to retrieve.\n *\n * @return {Array} Block client IDs.\n */\nexport const getPostBlocksByName = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state, blockNames ) => {\n\t\t\tblockNames = Array.isArray( blockNames )\n\t\t\t\t? blockNames\n\t\t\t\t: [ blockNames ];\n\t\t\tconst { getBlocksByName, getBlockParents, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn getBlocksByName( blockNames ).filter( ( clientId ) =>\n\t\t\t\tgetBlockParents( clientId ).every( ( parentClientId ) => {\n\t\t\t\t\tconst parentBlockName = getBlockName( parentClientId );\n\t\t\t\t\treturn (\n\t\t\t\t\t\t// Ignore descendents of the query block.\n\t\t\t\t\t\tparentBlockName !== 'core/query' &&\n\t\t\t\t\t\t// Enable only the top-most block.\n\t\t\t\t\t\t! blockNames.includes( parentBlockName )\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\t() => [ select( blockEditorStore ).getBlocks() ]\n\t)\n);\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAOA,IAAAI,SAAA,GAAAJ,OAAA;AAKA,IAAAK,UAAA,GAAAL,OAAA;AAKA,IAAAM,iBAAA,GAAAN,OAAA;AA3BA;AACA;AACA;;AAGA;AACA;AACA;;AAYA;AACA;AACA;;AAWA,MAAMO,qBAAqB,GAAG;EAC7BC,YAAY,EAAEC,SAAS;EACvBC,cAAc,EAAED,SAAS;EACzBE,WAAW,EAAEF;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAAE,4BAAsB,EAAIC,MAAM,IAC1D,IAAAC,oBAAc,EACXC,KAAK,IAAM;EACZ,IAAK,OAAOA,KAAK,CAACC,kBAAkB,KAAK,QAAQ,EAAG;IACnD,OAAOD,KAAK,CAACC,kBAAkB;EAChC;EAEA,IAAK,IAAAC,2BAAgB,EAAEF,KAAM,CAAC,K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C;AACF,CACD,CAAC;AAEM,SAASuD,gBAAgBA,CAAE/C,KAAK,EAAE,GAAGgD,IAAI,EAAG;EAClD,OAAO,IAAAC,kCAAiB,EAAEjD,KAAK,CAACkD,SAAS,EAAE,GAAGF,IAAK,CAAC;AACrD;AAEO,SAASG,aAAaA,CAAEnD,KAAK,EAAE,GAAGgD,IAAI,EAAG;EAC/C,OAAO,IAAAI,+BAAc,EAAEpD,KAAK,CAACkD,SAAS,EAAE,GAAGF,IAAK,CAAC;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,mBAAmB,GAAAzD,OAAA,CAAAyD,mBAAA,GAAG,IAAAxD,4BAAsB,EAAIC,MAAM,IAClE,IAAAC,oBAAc,EACb,CAAEC,KAAK,EAAEsD,UAAU,KAAM;EACxBA,UAAU,GAAGC,KAAK,CAACC,OAAO,CAAEF,UAAW,CAAC,GACrCA,UAAU,GACV,CAAEA,UAAU,CAAE;EACjB,MAAM;IAAEjD,eAAe;IAAEoD,eAAe;IAAEC;EAAa,CAAC,GACvD5D,MAAM,CAAEM,kBAAiB,CAAC;EAC3B,OAAOC,eAAe,CAAEiD,UAAW,CAAC,CAACK,MAAM,CAAIC,QAAQ,IACtDH,eAAe,CAAEG,QAAS,CAAC,CAACC,KAAK,CAAIC,cAAc,IAAM;IACxD,MAAMC,eAAe,GAAGL,YAAY,CAAEI,cAAe,CAAC;IACtD;MACC;MACAC,eAAe,KAAK,YAAY;MAChC;MACA,CAAET,UAAU,CAACU,QAAQ,CAAED,eAAgB;IAAC;EAE1C,CAAE,CACH,CAAC;AACF,CAAC,EACD,MAAM,CAAEjE,MAAM,CAAEM,kBAAiB,CAAC,CAAC6D,SAAS,CAAC,CAAC,CAC/C,CACD,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_fastDeepEqual","_interopRequireDefault","require","_blockEditor","_data","_icons","_coreData","_selectors","_privateSelectors","EMPTY_INSERTION_POINT","rootClientId","undefined","insertionIndex","filterValue","getInserter","exports","createRegistrySelector","select","createSelector","state","blockInserterPanel","getRenderingMode","postContentClientId","blockEditorStore","getBlocksByName","getListViewToggleRef","listViewToggleRef","getInserterSidebarToggleRef","inserterSidebarToggleRef","CARD_ICONS","wp_block","symbol","wp_navigation","navigation","page","pageIcon","post","verse","getPostIcon","postType","options","coreStore","getEntityRecord","default_template_part_areas","find","item","area","icon","layout","postTypeEntity","getPostType","startsWith","slice","hasPostMetaChanges","postId","type","currentPostType","id","currentPostId","getCurrentPost","edits","getEntityRecordNonTransientEdits","meta","originalPostMeta","fastDeepEqual","footnotes","getEntityActions","args","_getEntityActions","dataviews","isEntityReady","_isEntityReady","getEntityFields","_getEntityFields","getPostBlocksByName","blockNames","Array","isArray","getBlockParents","getBlockName","filter","clientId","every","parentClientId","parentBlockName","includes","getBlocks"],"sources":["@wordpress/editor/src/store/private-selectors.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal';\n\n/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport {\n\tlayout,\n\tsymbol,\n\tnavigation,\n\tpage as pageIcon,\n\tverse,\n} from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { getRenderingMode, getCurrentPost } from './selectors';\nimport {\n\tgetEntityActions as _getEntityActions,\n\tgetEntityFields as _getEntityFields,\n\tisEntityReady as _isEntityReady,\n} from '../dataviews/store/private-selectors';\n\nconst EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n\tfilterValue: undefined,\n};\n\n/**\n * Get the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const getInserter = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state ) => {\n\t\t\tif ( typeof state.blockInserterPanel === 'object' ) {\n\t\t\t\treturn state.blockInserterPanel;\n\t\t\t}\n\n\t\t\tif ( getRenderingMode( state ) === 'template-locked' ) {\n\t\t\t\tconst [ postContentClientId ] =\n\t\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t\t'core/post-content'\n\t\t\t\t\t);\n\t\t\t\tif ( postContentClientId ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trootClientId: postContentClientId,\n\t\t\t\t\t\tinsertionIndex: undefined,\n\t\t\t\t\t\tfilterValue: undefined,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn EMPTY_INSERTION_POINT;\n\t\t},\n\t\t( state ) => {\n\t\t\tconst [ postContentClientId ] =\n\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t'core/post-content'\n\t\t\t\t);\n\t\t\treturn [\n\t\t\t\tstate.blockInserterPanel,\n\t\t\t\tgetRenderingMode( state ),\n\t\t\t\tpostContentClientId,\n\t\t\t];\n\t\t}\n\t)\n);\n\nexport function getListViewToggleRef( state ) {\n\treturn state.listViewToggleRef;\n}\nexport function getInserterSidebarToggleRef( state ) {\n\treturn state.inserterSidebarToggleRef;\n}\nconst CARD_ICONS = {\n\twp_block: symbol,\n\twp_navigation: navigation,\n\tpage: pageIcon,\n\tpost: verse,\n};\n\nexport const getPostIcon = createRegistrySelector(\n\t( select ) => ( state, postType, options ) => {\n\t\t{\n\t\t\tif (\n\t\t\t\tpostType === 'wp_template_part' ||\n\t\t\t\tpostType === 'wp_template'\n\t\t\t) {\n\t\t\t\treturn (\n\t\t\t\t\t(\n\t\t\t\t\t\tselect( coreStore ).getEntityRecord(\n\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t'__unstableBase'\n\t\t\t\t\t\t)?.default_template_part_areas || []\n\t\t\t\t\t).find( ( item ) => options.area === item.area )?.icon ||\n\t\t\t\t\tlayout\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( CARD_ICONS[ postType ] ) {\n\t\t\t\treturn CARD_ICONS[ postType ];\n\t\t\t}\n\t\t\tconst postTypeEntity = select( coreStore ).getPostType( postType );\n\t\t\t// `icon` is the `menu_icon` property of a post type. We\n\t\t\t// only handle `dashicons` for now, even if the `menu_icon`\n\t\t\t// also supports urls and svg as values.\n\t\t\tif (\n\t\t\t\ttypeof postTypeEntity?.icon === 'string' &&\n\t\t\t\tpostTypeEntity.icon.startsWith( 'dashicons-' )\n\t\t\t) {\n\t\t\t\treturn postTypeEntity.icon.slice( 10 );\n\t\t\t}\n\t\t\treturn pageIcon;\n\t\t}\n\t}\n);\n\n/**\n * Returns true if there are unsaved changes to the\n * post's meta fields, and false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} postType The post type of the post.\n * @param {number} postId The ID of the post.\n *\n * @return {boolean} Whether there are edits or not in the meta fields of the relevant post.\n */\nexport const hasPostMetaChanges = createRegistrySelector(\n\t( select ) => ( state, postType, postId ) => {\n\t\tconst { type: currentPostType, id: currentPostId } =\n\t\t\tgetCurrentPost( state );\n\t\t// If no postType or postId is passed, use the current post.\n\t\tconst edits = select( coreStore ).getEntityRecordNonTransientEdits(\n\t\t\t'postType',\n\t\t\tpostType || currentPostType,\n\t\t\tpostId || currentPostId\n\t\t);\n\n\t\tif ( ! edits?.meta ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Compare if anything apart from `footnotes` has changed.\n\t\tconst originalPostMeta = select( coreStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType || currentPostType,\n\t\t\tpostId || currentPostId\n\t\t)?.meta;\n\n\t\treturn ! fastDeepEqual(\n\t\t\t{ ...originalPostMeta, footnotes: undefined },\n\t\t\t{ ...edits.meta, footnotes: undefined }\n\t\t);\n\t}\n);\n\nexport function getEntityActions( state, ...args ) {\n\treturn _getEntityActions( state.dataviews, ...args );\n}\n\nexport function isEntityReady( state, ...args ) {\n\treturn _isEntityReady( state.dataviews, ...args );\n}\n\nexport function getEntityFields( state, ...args ) {\n\treturn _getEntityFields( state.dataviews, ...args );\n}\n\n/**\n * Similar to getBlocksByName in @wordpress/block-editor, but only returns the top-most\n * blocks that aren't descendants of the query block.\n *\n * @param {Object} state Global application state.\n * @param {Array|string} blockNames Block names of the blocks to retrieve.\n *\n * @return {Array} Block client IDs.\n */\nexport const getPostBlocksByName = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state, blockNames ) => {\n\t\t\tblockNames = Array.isArray( blockNames )\n\t\t\t\t? blockNames\n\t\t\t\t: [ blockNames ];\n\t\t\tconst { getBlocksByName, getBlockParents, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn getBlocksByName( blockNames ).filter( ( clientId ) =>\n\t\t\t\tgetBlockParents( clientId ).every( ( parentClientId ) => {\n\t\t\t\t\tconst parentBlockName = getBlockName( parentClientId );\n\t\t\t\t\treturn (\n\t\t\t\t\t\t// Ignore descendents of the query block.\n\t\t\t\t\t\tparentBlockName !== 'core/query' &&\n\t\t\t\t\t\t// Enable only the top-most block.\n\t\t\t\t\t\t! blockNames.includes( parentBlockName )\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\t() => [ select( blockEditorStore ).getBlocks() ]\n\t)\n);\n"],"mappings":";;;;;;;;;;;;;AAGA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAOA,IAAAI,SAAA,GAAAJ,OAAA;AAKA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AAvBA;AACA;AACA;;AAGA;AACA;AACA;;AAYA;AACA;AACA;;AAQA,MAAMO,qBAAqB,GAAG;EAC7BC,YAAY,EAAEC,SAAS;EACvBC,cAAc,EAAED,SAAS;EACzBE,WAAW,EAAEF;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,WAAW,G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AAEG,QAAS,CAAC,CAACC,KAAK,CAAIC,cAAc,IAAM;IACxD,MAAMC,eAAe,GAAGL,YAAY,CAAEI,cAAe,CAAC;IACtD;MACC;MACAC,eAAe,KAAK,YAAY;MAChC;MACA,CAAET,UAAU,CAACU,QAAQ,CAAED,eAAgB;IAAC;EAE1C,CAAE,CACH,CAAC;AACF,CAAC,EACD,MAAM,CAAEnE,MAAM,CAAEM,kBAAiB,CAAC,CAAC+D,SAAS,CAAC,CAAC,CAC/C,CACD,CAAC","ignoreList":[]}
|
|
@@ -93,6 +93,7 @@ var _default = exports.default = (0, _data.combineReducers)({
|
|
|
93
93
|
postId: _reducer.postId,
|
|
94
94
|
postType: _reducer.postType,
|
|
95
95
|
postTitle,
|
|
96
|
+
renderingMode: _reducer.renderingMode,
|
|
96
97
|
saving: _reducer.saving,
|
|
97
98
|
postLock: _reducer.postLock,
|
|
98
99
|
postSavingLock: _reducer.postSavingLock,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_reducer","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_defaults","EDITOR_SETTINGS_DEFAULTS","autosaveInterval","postTitle","combineReducers","isSelected","state","action","type","clipboard","notices","notice","filter","id","_default","default","postId","postType","saving","postLock","postSavingLock","template","editorSettings"],"sources":["@wordpress/editor/src/store/reducer.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tpostId,\n\tpostType,\n\tsaving,\n\tpostLock,\n\tpostSavingLock,\n\ttemplate,\n\teditorSettings,\n} from './reducer.js';\n\nimport { EDITOR_SETTINGS_DEFAULTS } from './defaults.js';\n\nEDITOR_SETTINGS_DEFAULTS.autosaveInterval = 1; // This is a way to override default behavior on mobile, and make it ping the native save every second as long as something changed\n\nexport * from './reducer.js';\n\n/**\n * Reducer returning the post title state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const postTitle = combineReducers( {\n\tisSelected( state = false, action ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'TOGGLE_POST_TITLE_SELECTION':\n\t\t\t\treturn action.isSelected;\n\t\t}\n\n\t\treturn state;\n\t},\n} );\n\n/**\n * Reducer returning the clipboard state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function clipboard( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_CLIPBOARD':\n\t\t\treturn action.clipboard;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the notices state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function notices( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'CREATE_NOTICE':\n\t\t\treturn [ ...state, action.notice ];\n\t\tcase 'REMOVE_ALL_NOTICES':\n\t\t\treturn [];\n\t\tcase 'REMOVE_NOTICE':\n\t\t\treturn state.filter( ( notice ) => notice.id !== action.id );\n\t}\n\treturn state;\n}\n\nexport default combineReducers( {\n\tpostId,\n\tpostType,\n\tpostTitle,\n\tsaving,\n\tpostLock,\n\tpostSavingLock,\n\ttemplate,\n\teditorSettings,\n\tclipboard,\n\tnotices,\n} );\n"],"mappings":";;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;
|
|
1
|
+
{"version":3,"names":["_data","require","_reducer","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_defaults","EDITOR_SETTINGS_DEFAULTS","autosaveInterval","postTitle","combineReducers","isSelected","state","action","type","clipboard","notices","notice","filter","id","_default","default","postId","postType","renderingMode","saving","postLock","postSavingLock","template","editorSettings"],"sources":["@wordpress/editor/src/store/reducer.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tpostId,\n\tpostType,\n\trenderingMode,\n\tsaving,\n\tpostLock,\n\tpostSavingLock,\n\ttemplate,\n\teditorSettings,\n} from './reducer.js';\n\nimport { EDITOR_SETTINGS_DEFAULTS } from './defaults.js';\n\nEDITOR_SETTINGS_DEFAULTS.autosaveInterval = 1; // This is a way to override default behavior on mobile, and make it ping the native save every second as long as something changed\n\nexport * from './reducer.js';\n\n/**\n * Reducer returning the post title state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const postTitle = combineReducers( {\n\tisSelected( state = false, action ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'TOGGLE_POST_TITLE_SELECTION':\n\t\t\t\treturn action.isSelected;\n\t\t}\n\n\t\treturn state;\n\t},\n} );\n\n/**\n * Reducer returning the clipboard state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function clipboard( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_CLIPBOARD':\n\t\t\treturn action.clipboard;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the notices state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function notices( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'CREATE_NOTICE':\n\t\t\treturn [ ...state, action.notice ];\n\t\tcase 'REMOVE_ALL_NOTICES':\n\t\t\treturn [];\n\t\tcase 'REMOVE_NOTICE':\n\t\t\treturn state.filter( ( notice ) => notice.id !== action.id );\n\t}\n\treturn state;\n}\n\nexport default combineReducers( {\n\tpostId,\n\tpostType,\n\tpostTitle,\n\trenderingMode,\n\tsaving,\n\tpostLock,\n\tpostSavingLock,\n\ttemplate,\n\teditorSettings,\n\tclipboard,\n\tnotices,\n} );\n"],"mappings":";;;;;;;;;;;;;;AAGA,IAAAA,KAA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,IAAI;IACnB,KAAK,eAAe;MACnB,OAAO,CAAE,GAAGF,KAAK,EAAEC,MAAM,CAACI,MAAM,CAAE;IACnC,KAAK,oBAAoB;MACxB,OAAO,EAAE;IACV,KAAK,eAAe;MACnB,OAAOL,KAAK,CAACM,MAAM,CAAID,MAAM,IAAMA,MAAM,CAACE,EAAE,KAAKN,MAAM,CAACM,EAAG,CAAC;EAC9D;EACA,OAAOP,KAAK;AACb;AAAC,IAAAQ,QAAA,GAAAlB,OAAA,CAAAmB,OAAA,GAEc,IAAAX,qBAAe,EAAE;EAC/BY,MAAM,EAANA,eAAM;EACNC,QAAQ,EAARA,iBAAQ;EACRd,SAAS;EACTe,aAAa,EAAbA,sBAAa;EACbC,MAAM,EAANA,eAAM;EACNC,QAAQ,EAARA,iBAAQ;EACRC,cAAc,EAAdA,uBAAc;EACdC,QAAQ,EAARA,iBAAQ;EACRC,cAAc,EAAdA,uBAAc;EACdd,SAAS;EACTC;AACD,CAAE,CAAC","ignoreList":[]}
|
package/build/store/selectors.js
CHANGED
|
@@ -4,9 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.__experimentalGetDefaultTemplateType = exports.__experimentalGetDefaultTemplatePartAreas = void 0;
|
|
8
|
-
exports.__experimentalGetDefaultTemplateTypes = __experimentalGetDefaultTemplateTypes;
|
|
9
|
-
exports.__experimentalGetTemplateInfo = void 0;
|
|
7
|
+
exports.__experimentalGetTemplateInfo = exports.__experimentalGetDefaultTemplateTypes = exports.__experimentalGetDefaultTemplateType = exports.__experimentalGetDefaultTemplatePartAreas = void 0;
|
|
10
8
|
exports.__unstableIsEditorReady = __unstableIsEditorReady;
|
|
11
9
|
exports.canInsertBlockType = void 0;
|
|
12
10
|
exports.canUserUseUnfilteredHTML = canUserUseUnfilteredHTML;
|
|
@@ -82,7 +80,6 @@ var _url = require("@wordpress/url");
|
|
|
82
80
|
var _data = require("@wordpress/data");
|
|
83
81
|
var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
|
|
84
82
|
var _element = require("@wordpress/element");
|
|
85
|
-
var _icons = require("@wordpress/icons");
|
|
86
83
|
var _blockEditor = require("@wordpress/block-editor");
|
|
87
84
|
var _coreData = require("@wordpress/core-data");
|
|
88
85
|
var _preferences = require("@wordpress/preferences");
|
|
@@ -90,6 +87,7 @@ var _constants = require("./constants");
|
|
|
90
87
|
var _reducer = require("./reducer");
|
|
91
88
|
var _getTemplatePartIcon = require("../utils/get-template-part-icon");
|
|
92
89
|
var _lockUnlock = require("../lock-unlock");
|
|
90
|
+
var _getTemplateInfo = require("../utils/get-template-info");
|
|
93
91
|
/**
|
|
94
92
|
* WordPress dependencies
|
|
95
93
|
*/
|
|
@@ -1523,17 +1521,13 @@ const hasInserterItems = exports.hasInserterItems = getBlockEditorSelector('hasI
|
|
|
1523
1521
|
* @see getBlockListSettings in core/block-editor store.
|
|
1524
1522
|
*/
|
|
1525
1523
|
const getBlockListSettings = exports.getBlockListSettings = getBlockEditorSelector('getBlockListSettings');
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
*/
|
|
1534
|
-
function __experimentalGetDefaultTemplateTypes(state) {
|
|
1535
|
-
return getEditorSettings(state)?.defaultTemplateTypes;
|
|
1536
|
-
}
|
|
1524
|
+
const __experimentalGetDefaultTemplateTypes = exports.__experimentalGetDefaultTemplateTypes = (0, _data.createRegistrySelector)(select => () => {
|
|
1525
|
+
(0, _deprecated.default)("select('core/editor').__experimentalGetDefaultTemplateTypes", {
|
|
1526
|
+
since: '6.8',
|
|
1527
|
+
alternative: "select('core/core-data').getEntityRecord( 'root', '__unstableBase' )?.default_template_types"
|
|
1528
|
+
});
|
|
1529
|
+
return select(_coreData.store).getEntityRecord('root', '__unstableBase')?.default_template_types;
|
|
1530
|
+
});
|
|
1537
1531
|
|
|
1538
1532
|
/**
|
|
1539
1533
|
* Returns the default template part areas.
|
|
@@ -1542,16 +1536,19 @@ function __experimentalGetDefaultTemplateTypes(state) {
|
|
|
1542
1536
|
*
|
|
1543
1537
|
* @return {Array} The template part areas.
|
|
1544
1538
|
*/
|
|
1545
|
-
const __experimentalGetDefaultTemplatePartAreas = exports.__experimentalGetDefaultTemplatePartAreas = (0, _data.createSelector)(
|
|
1546
|
-
|
|
1547
|
-
|
|
1539
|
+
const __experimentalGetDefaultTemplatePartAreas = exports.__experimentalGetDefaultTemplatePartAreas = (0, _data.createRegistrySelector)(select => (0, _data.createSelector)(() => {
|
|
1540
|
+
(0, _deprecated.default)("select('core/editor').__experimentalGetDefaultTemplatePartAreas", {
|
|
1541
|
+
since: '6.8',
|
|
1542
|
+
alternative: "select('core/core-data').getEntityRecord( 'root', '__unstableBase' )?.default_template_part_areas"
|
|
1543
|
+
});
|
|
1544
|
+
const areas = select(_coreData.store).getEntityRecord('root', '__unstableBase')?.default_template_part_areas || [];
|
|
1548
1545
|
return areas.map(item => {
|
|
1549
1546
|
return {
|
|
1550
1547
|
...item,
|
|
1551
1548
|
icon: (0, _getTemplatePartIcon.getTemplatePartIcon)(item.icon)
|
|
1552
1549
|
};
|
|
1553
1550
|
});
|
|
1554
|
-
}
|
|
1551
|
+
}));
|
|
1555
1552
|
|
|
1556
1553
|
/**
|
|
1557
1554
|
* Returns a default template type searched by slug.
|
|
@@ -1561,14 +1558,17 @@ const __experimentalGetDefaultTemplatePartAreas = exports.__experimentalGetDefau
|
|
|
1561
1558
|
*
|
|
1562
1559
|
* @return {Object} The template type.
|
|
1563
1560
|
*/
|
|
1564
|
-
const __experimentalGetDefaultTemplateType = exports.__experimentalGetDefaultTemplateType = (0, _data.createSelector)((state, slug) => {
|
|
1561
|
+
const __experimentalGetDefaultTemplateType = exports.__experimentalGetDefaultTemplateType = (0, _data.createRegistrySelector)(select => (0, _data.createSelector)((state, slug) => {
|
|
1565
1562
|
var _Object$values$find;
|
|
1566
|
-
|
|
1563
|
+
(0, _deprecated.default)("select('core/editor').__experimentalGetDefaultTemplateType", {
|
|
1564
|
+
since: '6.8'
|
|
1565
|
+
});
|
|
1566
|
+
const templateTypes = select(_coreData.store).getEntityRecord('root', '__unstableBase')?.default_template_types;
|
|
1567
1567
|
if (!templateTypes) {
|
|
1568
1568
|
return EMPTY_OBJECT;
|
|
1569
1569
|
}
|
|
1570
1570
|
return (_Object$values$find = Object.values(templateTypes).find(type => type.slug === slug)) !== null && _Object$values$find !== void 0 ? _Object$values$find : EMPTY_OBJECT;
|
|
1571
|
-
}
|
|
1571
|
+
}));
|
|
1572
1572
|
|
|
1573
1573
|
/**
|
|
1574
1574
|
* Given a template entity, return information about it which is ready to be
|
|
@@ -1578,29 +1578,21 @@ const __experimentalGetDefaultTemplateType = exports.__experimentalGetDefaultTem
|
|
|
1578
1578
|
* @param {Object} template The template for which we need information.
|
|
1579
1579
|
* @return {Object} Information about the template, including title, description, and icon.
|
|
1580
1580
|
*/
|
|
1581
|
-
const __experimentalGetTemplateInfo = exports.__experimentalGetTemplateInfo = (0, _data.createSelector)((state, template) => {
|
|
1581
|
+
const __experimentalGetTemplateInfo = exports.__experimentalGetTemplateInfo = (0, _data.createRegistrySelector)(select => (0, _data.createSelector)((state, template) => {
|
|
1582
|
+
(0, _deprecated.default)("select('core/editor').__experimentalGetTemplateInfo", {
|
|
1583
|
+
since: '6.8'
|
|
1584
|
+
});
|
|
1582
1585
|
if (!template) {
|
|
1583
1586
|
return EMPTY_OBJECT;
|
|
1584
1587
|
}
|
|
1585
|
-
const
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
description: defaultDescription
|
|
1594
|
-
} = __experimentalGetDefaultTemplateType(state, slug);
|
|
1595
|
-
const templateTitle = typeof title === 'string' ? title : title?.rendered;
|
|
1596
|
-
const templateDescription = typeof description === 'string' ? description : description?.raw;
|
|
1597
|
-
const templateIcon = __experimentalGetDefaultTemplatePartAreas(state).find(item => area === item.area)?.icon || _icons.layout;
|
|
1598
|
-
return {
|
|
1599
|
-
title: templateTitle && templateTitle !== slug ? templateTitle : defaultTitle || slug,
|
|
1600
|
-
description: templateDescription || defaultDescription,
|
|
1601
|
-
icon: templateIcon
|
|
1602
|
-
};
|
|
1603
|
-
}, state => [__experimentalGetDefaultTemplateTypes(state), __experimentalGetDefaultTemplatePartAreas(state)]);
|
|
1588
|
+
const templateTypes = select(_coreData.store).getEntityRecord('root', '__unstableBase')?.default_template_types || [];
|
|
1589
|
+
const templateAreas = select(_coreData.store).getEntityRecord('root', '__unstableBase')?.default_template_part_areas || [];
|
|
1590
|
+
return (0, _getTemplateInfo.getTemplateInfo)({
|
|
1591
|
+
template,
|
|
1592
|
+
templateAreas,
|
|
1593
|
+
templateTypes
|
|
1594
|
+
});
|
|
1595
|
+
}));
|
|
1604
1596
|
|
|
1605
1597
|
/**
|
|
1606
1598
|
* Returns a post type label depending on the current post.
|