@wordpress/editor 14.2.0 → 14.4.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 +8 -0
- package/README.md +2 -1
- package/build/bindings/api.js +65 -0
- package/build/bindings/api.js.map +1 -0
- package/build/bindings/pattern-overrides.js +26 -13
- package/build/bindings/pattern-overrides.js.map +1 -1
- package/build/bindings/post-meta.js +27 -12
- package/build/bindings/post-meta.js.map +1 -1
- package/build/components/block-settings-menu/content-only-settings-menu.js +4 -1
- package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build/components/blog-title/index.js +6 -2
- package/build/components/blog-title/index.js.map +1 -1
- package/build/components/collapsible-block-toolbar/index.js +2 -3
- package/build/components/collapsible-block-toolbar/index.js.map +1 -1
- package/build/components/editor-interface/index.js +2 -1
- package/build/components/editor-interface/index.js.map +1 -1
- package/build/components/entities-saved-states/index.js +1 -1
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/global-styles-provider/index.js +15 -3
- package/build/components/global-styles-provider/index.js.map +1 -1
- package/build/components/header/back-button.js +7 -8
- package/build/components/header/back-button.js.map +1 -1
- package/build/components/header/index.js +19 -17
- package/build/components/header/index.js.map +1 -1
- package/build/components/inserter-sidebar/index.js +10 -21
- package/build/components/inserter-sidebar/index.js.map +1 -1
- package/build/components/list-view-sidebar/index.js +19 -47
- package/build/components/list-view-sidebar/index.js.map +1 -1
- package/build/components/page-attributes/order.js +1 -67
- package/build/components/page-attributes/order.js.map +1 -1
- package/build/components/page-attributes/panel.js +1 -4
- package/build/components/page-attributes/panel.js.map +1 -1
- package/build/components/page-attributes/parent.js +2 -1
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/post-actions/actions.js +189 -244
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-actions/index.js +1 -1
- package/build/components/post-actions/index.js.map +1 -1
- package/build/components/post-card-panel/index.js +8 -2
- 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-content-information/index.js +7 -1
- package/build/components/post-content-information/index.js.map +1 -1
- package/build/components/post-discussion/panel.js +2 -2
- package/build/components/post-discussion/panel.js.map +1 -1
- package/build/components/post-excerpt/panel.js +2 -2
- package/build/components/post-excerpt/panel.js.map +1 -1
- package/build/components/post-featured-image/index.js +3 -1
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-last-revision/index.js +2 -1
- package/build/components/post-last-revision/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-button/index.js +4 -11
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-publish-panel/index.js +1 -1
- package/build/components/post-publish-panel/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-category-panel.js +4 -1
- package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js +2 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build/components/post-saved-state/index.js +11 -1
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-schedule/index.js +3 -0
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-status/index.js +32 -11
- package/build/components/post-status/index.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +17 -6
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/index.js +7 -1
- package/build/components/post-taxonomies/index.js.map +1 -1
- package/build/components/post-template/block-theme.js +4 -4
- package/build/components/post-template/block-theme.js.map +1 -1
- package/build/components/post-template/classic-theme.js +8 -2
- package/build/components/post-template/classic-theme.js.map +1 -1
- package/build/components/post-template/create-new-template.js +4 -1
- package/build/components/post-template/create-new-template.js.map +1 -1
- package/build/components/post-template/hooks.js +5 -1
- package/build/components/post-template/hooks.js.map +1 -1
- package/build/components/post-template/panel.js +8 -2
- package/build/components/post-template/panel.js.map +1 -1
- package/build/components/post-title/index.js +5 -13
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-trash/check.js +6 -4
- package/build/components/post-trash/check.js.map +1 -1
- package/build/components/post-url/panel.js +6 -2
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/posts-per-page/index.js +6 -2
- package/build/components/posts-per-page/index.js.map +1 -1
- package/build/components/preview-dropdown/index.js +1 -1
- package/build/components/preview-dropdown/index.js.map +1 -1
- package/build/components/provider/index.native.js +0 -4
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +21 -9
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/save-publish-panels/index.js +30 -17
- package/build/components/save-publish-panels/index.js.map +1 -1
- package/build/components/sidebar/index.js +3 -7
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar/post-summary.js +1 -2
- package/build/components/sidebar/post-summary.js.map +1 -1
- package/build/components/site-discussion/index.js +7 -3
- package/build/components/site-discussion/index.js.map +1 -1
- package/build/components/template-content-panel/index.js +28 -3
- package/build/components/template-content-panel/index.js.map +1 -1
- package/build/components/visual-editor/edit-template-blocks-notification.js +4 -4
- package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
- package/build/components/visual-editor/index.js +6 -3
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/{hooks → components/visual-editor}/use-select-nearest-editable-block.js +1 -1
- package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -0
- package/build/dataviews/actions/delete-post.js +98 -0
- package/build/dataviews/actions/delete-post.js.map +1 -0
- package/build/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.js} +11 -20
- package/build/dataviews/actions/export-pattern.js.map +1 -0
- package/build/dataviews/actions/index.js +32 -0
- package/build/dataviews/actions/index.js.map +1 -0
- package/build/dataviews/actions/reset-post.js +111 -0
- package/build/dataviews/actions/reset-post.js.map +1 -0
- package/build/dataviews/actions/utils.js +50 -0
- package/build/dataviews/actions/utils.js.map +1 -0
- package/build/dataviews/store/private-actions.js.map +1 -1
- package/build/dataviews/store/private-selectors.js +6 -6
- package/build/dataviews/store/private-selectors.js.map +1 -1
- package/build/dataviews/store/reducer.js +6 -2
- package/build/dataviews/store/reducer.js.map +1 -1
- package/build/dataviews/types.js +6 -0
- package/build/dataviews/types.js.map +1 -0
- package/build/hooks/pattern-overrides.js +3 -3
- package/build/hooks/pattern-overrides.js.map +1 -1
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build/private-apis.js +5 -0
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +0 -2
- package/build/private-apis.native.js.map +1 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/private-actions.js +1 -1
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +0 -18
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/utils/is-template-revertable.js +6 -8
- package/build/store/utils/is-template-revertable.js.map +1 -1
- package/build/utils/media-upload/index.js +35 -2
- package/build/utils/media-upload/index.js.map +1 -1
- package/build-module/bindings/api.js +57 -0
- package/build-module/bindings/api.js.map +1 -0
- package/build-module/bindings/pattern-overrides.js +26 -13
- package/build-module/bindings/pattern-overrides.js.map +1 -1
- package/build-module/bindings/post-meta.js +27 -12
- package/build-module/bindings/post-meta.js.map +1 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +4 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build-module/components/blog-title/index.js +6 -2
- package/build-module/components/blog-title/index.js.map +1 -1
- package/build-module/components/collapsible-block-toolbar/index.js +1 -2
- package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
- package/build-module/components/editor-interface/index.js +2 -1
- package/build-module/components/editor-interface/index.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +1 -1
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/global-styles-provider/index.js +15 -3
- package/build-module/components/global-styles-provider/index.js.map +1 -1
- package/build-module/components/header/back-button.js +5 -7
- package/build-module/components/header/back-button.js.map +1 -1
- package/build-module/components/header/index.js +19 -19
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/inserter-sidebar/index.js +11 -22
- package/build-module/components/inserter-sidebar/index.js.map +1 -1
- package/build-module/components/list-view-sidebar/index.js +20 -49
- package/build-module/components/list-view-sidebar/index.js.map +1 -1
- package/build-module/components/page-attributes/order.js +4 -70
- package/build-module/components/page-attributes/order.js.map +1 -1
- package/build-module/components/page-attributes/panel.js +1 -6
- package/build-module/components/page-attributes/panel.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +2 -1
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/post-actions/actions.js +186 -240
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-actions/index.js +1 -1
- package/build-module/components/post-actions/index.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +8 -2
- package/build-module/components/post-card-panel/index.js.map +1 -1
- package/build-module/components/post-comments/index.js +2 -2
- package/build-module/components/post-comments/index.js.map +1 -1
- package/build-module/components/post-content-information/index.js +7 -1
- package/build-module/components/post-content-information/index.js.map +1 -1
- package/build-module/components/post-discussion/panel.js +3 -3
- package/build-module/components/post-discussion/panel.js.map +1 -1
- package/build-module/components/post-excerpt/panel.js +2 -2
- package/build-module/components/post-excerpt/panel.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +3 -1
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +2 -1
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +1 -1
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +4 -11
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-publish-panel/index.js +1 -1
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-category-panel.js +4 -1
- package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-tags-panel.js +2 -1
- package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build-module/components/post-saved-state/index.js +11 -1
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/index.js +3 -0
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-status/index.js +31 -11
- package/build-module/components/post-status/index.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +17 -6
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/index.js +7 -1
- package/build-module/components/post-taxonomies/index.js.map +1 -1
- package/build-module/components/post-template/block-theme.js +4 -4
- package/build-module/components/post-template/block-theme.js.map +1 -1
- package/build-module/components/post-template/classic-theme.js +8 -2
- package/build-module/components/post-template/classic-theme.js.map +1 -1
- package/build-module/components/post-template/create-new-template.js +4 -1
- package/build-module/components/post-template/create-new-template.js.map +1 -1
- package/build-module/components/post-template/hooks.js +5 -1
- package/build-module/components/post-template/hooks.js.map +1 -1
- package/build-module/components/post-template/panel.js +8 -2
- package/build-module/components/post-template/panel.js.map +1 -1
- package/build-module/components/post-title/index.js +5 -13
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-trash/check.js +6 -4
- package/build-module/components/post-trash/check.js.map +1 -1
- package/build-module/components/post-url/panel.js +6 -2
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/posts-per-page/index.js +6 -2
- package/build-module/components/posts-per-page/index.js.map +1 -1
- package/build-module/components/preview-dropdown/index.js +1 -1
- package/build-module/components/preview-dropdown/index.js.map +1 -1
- package/build-module/components/provider/index.native.js +0 -4
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +21 -9
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/save-publish-panels/index.js +30 -17
- package/build-module/components/save-publish-panels/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +3 -7
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/post-summary.js +1 -2
- package/build-module/components/sidebar/post-summary.js.map +1 -1
- package/build-module/components/site-discussion/index.js +8 -4
- package/build-module/components/site-discussion/index.js.map +1 -1
- package/build-module/components/template-content-panel/index.js +29 -4
- package/build-module/components/template-content-panel/index.js.map +1 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js +4 -4
- package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
- package/build-module/components/visual-editor/index.js +6 -3
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/{hooks → components/visual-editor}/use-select-nearest-editable-block.js +1 -1
- package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -0
- package/build-module/dataviews/actions/delete-post.js +89 -0
- package/build-module/dataviews/actions/delete-post.js.map +1 -0
- package/build-module/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.js} +10 -19
- package/build-module/dataviews/actions/export-pattern.js.map +1 -0
- package/build-module/dataviews/actions/index.js +24 -0
- package/build-module/dataviews/actions/index.js.map +1 -0
- package/build-module/dataviews/actions/reset-post.js +104 -0
- package/build-module/dataviews/actions/reset-post.js.map +1 -0
- package/build-module/dataviews/actions/utils.js +41 -0
- package/build-module/dataviews/actions/utils.js.map +1 -0
- package/build-module/dataviews/store/private-actions.js.map +1 -1
- package/build-module/dataviews/store/private-selectors.js +5 -5
- package/build-module/dataviews/store/private-selectors.js.map +1 -1
- package/build-module/dataviews/store/reducer.js +6 -2
- package/build-module/dataviews/store/reducer.js.map +1 -1
- package/build-module/dataviews/types.js +2 -0
- package/build-module/dataviews/types.js.map +1 -0
- package/build-module/hooks/pattern-overrides.js +4 -2
- package/build-module/hooks/pattern-overrides.js.map +1 -1
- package/build-module/index.js +0 -1
- package/build-module/index.js.map +1 -1
- package/build-module/private-apis.js +5 -0
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +0 -2
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/private-actions.js +1 -1
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +0 -17
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/utils/is-template-revertable.js +6 -8
- package/build-module/store/utils/is-template-revertable.js.map +1 -1
- package/build-module/utils/media-upload/index.js +36 -3
- package/build-module/utils/media-upload/index.js.map +1 -1
- package/build-style/style-rtl.css +93 -95
- package/build-style/style.css +93 -95
- package/build-types/bindings/api.d.ts +25 -0
- package/build-types/bindings/api.d.ts.map +1 -0
- package/build-types/bindings/pattern-overrides.d.ts +17 -0
- package/build-types/bindings/pattern-overrides.d.ts.map +1 -0
- package/build-types/bindings/post-meta.d.ts +23 -0
- package/build-types/bindings/post-meta.d.ts.map +1 -0
- package/build-types/components/autocompleters/index.d.ts +2 -0
- package/build-types/components/autocompleters/index.d.ts.map +1 -0
- package/build-types/components/autocompleters/user.d.ts +6 -0
- package/build-types/components/autocompleters/user.d.ts.map +1 -0
- package/build-types/components/autosave-monitor/index.d.ts +15 -0
- package/build-types/components/autosave-monitor/index.d.ts.map +1 -0
- package/build-types/components/block-manager/category.d.ts +6 -0
- package/build-types/components/block-manager/category.d.ts.map +1 -0
- package/build-types/components/block-manager/checklist.d.ts +7 -0
- package/build-types/components/block-manager/checklist.d.ts.map +1 -0
- package/build-types/components/block-manager/index.d.ts +3 -0
- package/build-types/components/block-manager/index.d.ts.map +1 -0
- package/build-types/components/block-removal-warnings/index.d.ts +2 -0
- package/build-types/components/block-removal-warnings/index.d.ts.map +1 -0
- package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts +2 -0
- package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts.map +1 -0
- package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts +65 -0
- package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts.map +1 -0
- package/build-types/components/blog-title/index.d.ts +2 -0
- package/build-types/components/blog-title/index.d.ts.map +1 -0
- package/build-types/components/character-count/index.d.ts +7 -0
- package/build-types/components/character-count/index.d.ts.map +1 -0
- package/build-types/components/collapsible-block-toolbar/index.d.ts +5 -0
- package/build-types/components/collapsible-block-toolbar/index.d.ts.map +1 -0
- package/build-types/components/commands/index.d.ts +2 -0
- package/build-types/components/commands/index.d.ts.map +1 -0
- package/build-types/components/create-template-part-modal/index.d.ts +14 -0
- package/build-types/components/create-template-part-modal/index.d.ts.map +1 -0
- package/build-types/components/create-template-part-modal/utils.d.ts +4 -0
- package/build-types/components/create-template-part-modal/utils.d.ts.map +1 -0
- package/build-types/components/deprecated.d.ts +182 -0
- package/build-types/components/deprecated.d.ts.map +1 -0
- package/build-types/components/document-bar/index.d.ts +22 -0
- package/build-types/components/document-bar/index.d.ts.map +1 -0
- package/build-types/components/document-outline/check.d.ts +12 -0
- package/build-types/components/document-outline/check.d.ts.map +1 -0
- package/build-types/components/document-outline/index.d.ts +16 -0
- package/build-types/components/document-outline/index.d.ts.map +1 -0
- package/build-types/components/document-outline/item.d.ts +9 -0
- package/build-types/components/document-outline/item.d.ts.map +1 -0
- package/build-types/components/document-tools/index.d.ts +6 -0
- package/build-types/components/document-tools/index.d.ts.map +1 -0
- package/build-types/components/editor/index.d.ts +14 -0
- package/build-types/components/editor/index.d.ts.map +1 -0
- package/build-types/components/editor-history/redo.d.ts +4 -0
- package/build-types/components/editor-history/redo.d.ts.map +1 -0
- package/build-types/components/editor-history/undo.d.ts +4 -0
- package/build-types/components/editor-history/undo.d.ts.map +1 -0
- package/build-types/components/editor-interface/content-slot-fill.d.ts +3 -0
- package/build-types/components/editor-interface/content-slot-fill.d.ts.map +1 -0
- package/build-types/components/editor-interface/index.d.ts +17 -0
- package/build-types/components/editor-interface/index.d.ts.map +1 -0
- package/build-types/components/editor-notices/index.d.ts +13 -0
- package/build-types/components/editor-notices/index.d.ts.map +1 -0
- package/build-types/components/editor-snackbars/index.d.ts +7 -0
- package/build-types/components/editor-snackbars/index.d.ts.map +1 -0
- package/build-types/components/entities-saved-states/entity-record-item.d.ts +6 -0
- package/build-types/components/entities-saved-states/entity-record-item.d.ts.map +1 -0
- package/build-types/components/entities-saved-states/entity-type-list.d.ts +6 -0
- package/build-types/components/entities-saved-states/entity-type-list.d.ts.map +1 -0
- package/build-types/components/entities-saved-states/hooks/use-is-dirty.d.ts +2 -0
- package/build-types/components/entities-saved-states/hooks/use-is-dirty.d.ts.map +1 -0
- package/build-types/components/entities-saved-states/index.d.ts +43 -0
- package/build-types/components/entities-saved-states/index.d.ts.map +1 -0
- package/build-types/components/error-boundary/index.d.ts +14 -0
- package/build-types/components/error-boundary/index.d.ts.map +1 -0
- package/build-types/components/global-keyboard-shortcuts/index.d.ts +9 -0
- package/build-types/components/global-keyboard-shortcuts/index.d.ts.map +1 -0
- package/build-types/components/global-keyboard-shortcuts/register-shortcuts.d.ts +8 -0
- package/build-types/components/global-keyboard-shortcuts/register-shortcuts.d.ts.map +1 -0
- package/build-types/components/global-styles-provider/index.d.ts +20 -0
- package/build-types/components/global-styles-provider/index.d.ts.map +1 -0
- package/build-types/components/header/back-button.d.ts +7 -0
- package/build-types/components/header/back-button.d.ts.map +1 -0
- package/build-types/components/header/index.d.ts +10 -0
- package/build-types/components/header/index.d.ts.map +1 -0
- package/build-types/components/index.d.ts +108 -0
- package/build-types/components/index.d.ts.map +1 -0
- package/build-types/components/inserter-sidebar/index.d.ts +2 -0
- package/build-types/components/inserter-sidebar/index.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcut-help-modal/config.d.ts +26 -0
- package/build-types/components/keyboard-shortcut-help-modal/config.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts +5 -0
- package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcut-help-modal/index.d.ts +3 -0
- package/build-types/components/keyboard-shortcut-help-modal/index.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts +8 -0
- package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts.map +1 -0
- package/build-types/components/list-view-sidebar/index.d.ts +2 -0
- package/build-types/components/list-view-sidebar/index.d.ts.map +1 -0
- package/build-types/components/list-view-sidebar/list-view-outline.d.ts +2 -0
- package/build-types/components/list-view-sidebar/list-view-outline.d.ts.map +1 -0
- package/build-types/components/local-autosave-monitor/index.d.ts +3 -0
- package/build-types/components/local-autosave-monitor/index.d.ts.map +1 -0
- package/build-types/components/media-categories/index.d.ts +7 -0
- package/build-types/components/media-categories/index.d.ts.map +1 -0
- package/build-types/components/mode-switcher/index.d.ts +3 -0
- package/build-types/components/mode-switcher/index.d.ts.map +1 -0
- package/build-types/components/more-menu/copy-content-menu-item.d.ts +2 -0
- package/build-types/components/more-menu/copy-content-menu-item.d.ts.map +1 -0
- package/build-types/components/more-menu/index.d.ts +2 -0
- package/build-types/components/more-menu/index.d.ts.map +1 -0
- package/build-types/components/more-menu/tools-more-menu-group.d.ts +6 -0
- package/build-types/components/more-menu/tools-more-menu-group.d.ts.map +1 -0
- package/build-types/components/more-menu/view-more-menu-group.d.ts +6 -0
- package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -0
- package/build-types/components/page-attributes/check.d.ts +13 -0
- package/build-types/components/page-attributes/check.d.ts.map +1 -0
- package/build-types/components/page-attributes/order.d.ts +9 -0
- package/build-types/components/page-attributes/order.d.ts.map +1 -0
- package/build-types/components/page-attributes/panel.d.ts +7 -0
- package/build-types/components/page-attributes/panel.d.ts.map +1 -0
- package/build-types/components/page-attributes/parent.d.ts +11 -0
- package/build-types/components/page-attributes/parent.d.ts.map +1 -0
- package/build-types/components/pattern-duplicate-modal/index.d.ts +3 -0
- package/build-types/components/pattern-duplicate-modal/index.d.ts.map +1 -0
- package/build-types/components/pattern-overrides-panel/index.d.ts +2 -0
- package/build-types/components/pattern-overrides-panel/index.d.ts.map +1 -0
- package/build-types/components/pattern-rename-modal/index.d.ts +3 -0
- package/build-types/components/pattern-rename-modal/index.d.ts.map +1 -0
- package/build-types/components/plugin-document-setting-panel/index.d.ts +69 -0
- package/build-types/components/plugin-document-setting-panel/index.d.ts.map +1 -0
- package/build-types/components/plugin-more-menu-item/index.d.ts +3 -0
- package/build-types/components/plugin-more-menu-item/index.d.ts.map +1 -0
- package/build-types/components/plugin-post-publish-panel/index.d.ts +47 -0
- package/build-types/components/plugin-post-publish-panel/index.d.ts.map +1 -0
- package/build-types/components/plugin-post-status-info/index.d.ts +57 -0
- package/build-types/components/plugin-post-status-info/index.d.ts.map +1 -0
- package/build-types/components/plugin-pre-publish-panel/index.d.ts +50 -0
- package/build-types/components/plugin-pre-publish-panel/index.d.ts.map +1 -0
- package/build-types/components/plugin-sidebar/index.d.ts +73 -0
- package/build-types/components/plugin-sidebar/index.d.ts.map +1 -0
- package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts +52 -0
- package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts.map +1 -0
- package/build-types/components/post-actions/actions.d.ts +31 -0
- package/build-types/components/post-actions/actions.d.ts.map +1 -0
- package/build-types/components/post-actions/index.d.ts +5 -0
- package/build-types/components/post-actions/index.d.ts.map +1 -0
- package/build-types/components/post-author/check.d.ts +13 -0
- package/build-types/components/post-author/check.d.ts.map +1 -0
- package/build-types/components/post-author/combobox.d.ts +2 -0
- package/build-types/components/post-author/combobox.d.ts.map +1 -0
- package/build-types/components/post-author/constants.d.ts +9 -0
- package/build-types/components/post-author/constants.d.ts.map +1 -0
- package/build-types/components/post-author/hook.d.ts +6 -0
- package/build-types/components/post-author/hook.d.ts.map +1 -0
- package/build-types/components/post-author/index.d.ts +8 -0
- package/build-types/components/post-author/index.d.ts.map +1 -0
- package/build-types/components/post-author/panel.d.ts +8 -0
- package/build-types/components/post-author/panel.d.ts.map +1 -0
- package/build-types/components/post-author/select.d.ts +2 -0
- package/build-types/components/post-author/select.d.ts.map +1 -0
- package/build-types/components/post-card-panel/index.d.ts +4 -0
- package/build-types/components/post-card-panel/index.d.ts.map +1 -0
- package/build-types/components/post-comments/index.d.ts +3 -0
- package/build-types/components/post-comments/index.d.ts.map +1 -0
- package/build-types/components/post-content-information/index.d.ts +2 -0
- package/build-types/components/post-content-information/index.d.ts.map +1 -0
- package/build-types/components/post-discussion/panel.d.ts +10 -0
- package/build-types/components/post-discussion/panel.d.ts.map +1 -0
- package/build-types/components/post-excerpt/check.d.ts +13 -0
- package/build-types/components/post-excerpt/check.d.ts.map +1 -0
- package/build-types/components/post-excerpt/index.d.ts +15 -0
- package/build-types/components/post-excerpt/index.d.ts.map +1 -0
- package/build-types/components/post-excerpt/panel.d.ts +8 -0
- package/build-types/components/post-excerpt/panel.d.ts.map +1 -0
- package/build-types/components/post-excerpt/plugin.d.ts +53 -0
- package/build-types/components/post-excerpt/plugin.d.ts.map +1 -0
- package/build-types/components/post-featured-image/check.d.ts +14 -0
- package/build-types/components/post-featured-image/check.d.ts.map +1 -0
- package/build-types/components/post-featured-image/index.d.ts +3 -0
- package/build-types/components/post-featured-image/index.d.ts.map +1 -0
- package/build-types/components/post-featured-image/panel.d.ts +13 -0
- package/build-types/components/post-featured-image/panel.d.ts.map +1 -0
- package/build-types/components/post-format/check.d.ts +5 -0
- package/build-types/components/post-format/check.d.ts.map +1 -0
- package/build-types/components/post-format/index.d.ts +16 -0
- package/build-types/components/post-format/index.d.ts.map +1 -0
- package/build-types/components/post-format/panel.d.ts +8 -0
- package/build-types/components/post-format/panel.d.ts.map +1 -0
- package/build-types/components/post-last-edited-panel/index.d.ts +2 -0
- package/build-types/components/post-last-edited-panel/index.d.ts.map +1 -0
- package/build-types/components/post-last-revision/check.d.ts +13 -0
- package/build-types/components/post-last-revision/check.d.ts.map +1 -0
- package/build-types/components/post-last-revision/index.d.ts +9 -0
- package/build-types/components/post-last-revision/index.d.ts.map +1 -0
- package/build-types/components/post-last-revision/panel.d.ts +8 -0
- package/build-types/components/post-last-revision/panel.d.ts.map +1 -0
- package/build-types/components/post-locked-modal/index.d.ts +8 -0
- package/build-types/components/post-locked-modal/index.d.ts.map +1 -0
- package/build-types/components/post-panel-row/index.d.ts +3 -0
- package/build-types/components/post-panel-row/index.d.ts.map +1 -0
- package/build-types/components/post-panel-section/index.d.ts +6 -0
- package/build-types/components/post-panel-section/index.d.ts.map +1 -0
- package/build-types/components/post-pending-status/check.d.ts +15 -0
- package/build-types/components/post-pending-status/check.d.ts.map +1 -0
- package/build-types/components/post-pending-status/index.d.ts +8 -0
- package/build-types/components/post-pending-status/index.d.ts.map +1 -0
- package/build-types/components/post-pingbacks/index.d.ts +3 -0
- package/build-types/components/post-pingbacks/index.d.ts.map +1 -0
- package/build-types/components/post-preview-button/index.d.ts +23 -0
- package/build-types/components/post-preview-button/index.d.ts.map +1 -0
- package/build-types/components/post-publish-button/index.d.ts +17 -0
- package/build-types/components/post-publish-button/index.d.ts.map +1 -0
- package/build-types/components/post-publish-button/label.d.ts +7 -0
- package/build-types/components/post-publish-button/label.d.ts.map +1 -0
- package/build-types/components/post-publish-button/post-publish-button-or-toggle.d.ts +17 -0
- package/build-types/components/post-publish-button/post-publish-button-or-toggle.d.ts.map +1 -0
- package/build-types/components/post-publish-panel/index.d.ts +10 -0
- package/build-types/components/post-publish-panel/index.d.ts.map +1 -0
- package/build-types/components/post-publish-panel/maybe-category-panel.d.ts +3 -0
- package/build-types/components/post-publish-panel/maybe-category-panel.d.ts.map +1 -0
- package/build-types/components/post-publish-panel/maybe-post-format-panel.d.ts +2 -0
- package/build-types/components/post-publish-panel/maybe-post-format-panel.d.ts.map +1 -0
- package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts +3 -0
- package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts.map +1 -0
- package/build-types/components/post-publish-panel/maybe-upload-media.d.ts +2 -0
- package/build-types/components/post-publish-panel/maybe-upload-media.d.ts.map +1 -0
- package/build-types/components/post-publish-panel/postpublish.d.ts +3 -0
- package/build-types/components/post-publish-panel/postpublish.d.ts.map +1 -0
- package/build-types/components/post-publish-panel/prepublish.d.ts +5 -0
- package/build-types/components/post-publish-panel/prepublish.d.ts.map +1 -0
- package/build-types/components/post-saved-state/index.d.ts +13 -0
- package/build-types/components/post-saved-state/index.d.ts.map +1 -0
- package/build-types/components/post-schedule/check.d.ts +12 -0
- package/build-types/components/post-schedule/check.d.ts.map +1 -0
- package/build-types/components/post-schedule/index.d.ts +17 -0
- package/build-types/components/post-schedule/index.d.ts.map +1 -0
- package/build-types/components/post-schedule/label.d.ts +25 -0
- package/build-types/components/post-schedule/label.d.ts.map +1 -0
- package/build-types/components/post-schedule/panel.d.ts +7 -0
- package/build-types/components/post-schedule/panel.d.ts.map +1 -0
- package/build-types/components/post-slug/check.d.ts +12 -0
- package/build-types/components/post-slug/check.d.ts.map +1 -0
- package/build-types/components/post-slug/index.d.ts +7 -0
- package/build-types/components/post-slug/index.d.ts.map +1 -0
- package/build-types/components/post-slug/panel.d.ts +3 -0
- package/build-types/components/post-slug/panel.d.ts.map +1 -0
- package/build-types/components/post-status/index.d.ts +6 -0
- package/build-types/components/post-status/index.d.ts.map +1 -0
- package/build-types/components/post-sticky/check.d.ts +12 -0
- package/build-types/components/post-sticky/check.d.ts.map +1 -0
- package/build-types/components/post-sticky/index.d.ts +7 -0
- package/build-types/components/post-sticky/index.d.ts.map +1 -0
- package/build-types/components/post-sticky/panel.d.ts +3 -0
- package/build-types/components/post-sticky/panel.d.ts.map +1 -0
- package/build-types/components/post-switch-to-draft-button/index.d.ts +7 -0
- package/build-types/components/post-switch-to-draft-button/index.d.ts.map +1 -0
- package/build-types/components/post-sync-status/index.d.ts +7 -0
- package/build-types/components/post-sync-status/index.d.ts.map +1 -0
- package/build-types/components/post-taxonomies/check.d.ts +12 -0
- package/build-types/components/post-taxonomies/check.d.ts.map +1 -0
- package/build-types/components/post-taxonomies/flat-term-selector.d.ts +66 -0
- package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -0
- package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +104 -0
- package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -0
- package/build-types/components/post-taxonomies/index.d.ts +5 -0
- package/build-types/components/post-taxonomies/index.d.ts.map +1 -0
- package/build-types/components/post-taxonomies/most-used-terms.d.ts +5 -0
- package/build-types/components/post-taxonomies/most-used-terms.d.ts.map +1 -0
- package/build-types/components/post-taxonomies/panel.d.ts +3 -0
- package/build-types/components/post-taxonomies/panel.d.ts.map +1 -0
- package/build-types/components/post-template/block-theme.d.ts +4 -0
- package/build-types/components/post-template/block-theme.d.ts.map +1 -0
- package/build-types/components/post-template/classic-theme.d.ts +3 -0
- package/build-types/components/post-template/classic-theme.d.ts.map +1 -0
- package/build-types/components/post-template/create-new-template-modal.d.ts +4 -0
- package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -0
- package/build-types/components/post-template/create-new-template.d.ts +4 -0
- package/build-types/components/post-template/create-new-template.d.ts.map +1 -0
- package/build-types/components/post-template/hooks.d.ts +8 -0
- package/build-types/components/post-template/hooks.d.ts.map +1 -0
- package/build-types/components/post-template/panel.d.ts +7 -0
- package/build-types/components/post-template/panel.d.ts.map +1 -0
- package/build-types/components/post-template/reset-default-template.d.ts +4 -0
- package/build-types/components/post-template/reset-default-template.d.ts.map +1 -0
- package/build-types/components/post-template/swap-template-button.d.ts +4 -0
- package/build-types/components/post-template/swap-template-button.d.ts.map +1 -0
- package/build-types/components/post-text-editor/index.d.ts +7 -0
- package/build-types/components/post-text-editor/index.d.ts.map +1 -0
- package/build-types/components/post-title/constants.d.ts +3 -0
- package/build-types/components/post-title/constants.d.ts.map +1 -0
- package/build-types/components/post-title/index.d.ts +3 -0
- package/build-types/components/post-title/index.d.ts.map +1 -0
- package/build-types/components/post-title/post-title-raw.d.ts +3 -0
- package/build-types/components/post-title/post-title-raw.d.ts.map +1 -0
- package/build-types/components/post-title/use-post-title-focus.d.ts +9 -0
- package/build-types/components/post-title/use-post-title-focus.d.ts.map +1 -0
- package/build-types/components/post-title/use-post-title.d.ts +7 -0
- package/build-types/components/post-title/use-post-title.d.ts.map +1 -0
- package/build-types/components/post-transform-panel/hooks.d.ts +2 -0
- package/build-types/components/post-transform-panel/hooks.d.ts.map +1 -0
- package/build-types/components/post-transform-panel/index.d.ts +2 -0
- package/build-types/components/post-transform-panel/index.d.ts.map +1 -0
- package/build-types/components/post-trash/check.d.ts +12 -0
- package/build-types/components/post-trash/check.d.ts.map +1 -0
- package/build-types/components/post-trash/index.d.ts +7 -0
- package/build-types/components/post-trash/index.d.ts.map +1 -0
- package/build-types/components/post-type-support-check/index.d.ts +18 -0
- package/build-types/components/post-type-support-check/index.d.ts.map +1 -0
- package/build-types/components/post-url/check.d.ts +12 -0
- package/build-types/components/post-url/check.d.ts.map +1 -0
- package/build-types/components/post-url/index.d.ts +14 -0
- package/build-types/components/post-url/index.d.ts.map +1 -0
- package/build-types/components/post-url/label.d.ts +13 -0
- package/build-types/components/post-url/label.d.ts.map +1 -0
- package/build-types/components/post-url/panel.d.ts +7 -0
- package/build-types/components/post-url/panel.d.ts.map +1 -0
- package/build-types/components/post-view-link/index.d.ts +2 -0
- package/build-types/components/post-view-link/index.d.ts.map +1 -0
- package/build-types/components/post-visibility/check.d.ts +13 -0
- package/build-types/components/post-visibility/check.d.ts.map +1 -0
- package/build-types/components/post-visibility/index.d.ts +11 -0
- package/build-types/components/post-visibility/index.d.ts.map +1 -0
- package/build-types/components/post-visibility/label.d.ts +13 -0
- package/build-types/components/post-visibility/label.d.ts.map +1 -0
- package/build-types/components/post-visibility/utils.d.ts +21 -0
- package/build-types/components/post-visibility/utils.d.ts.map +1 -0
- package/build-types/components/posts-per-page/index.d.ts +2 -0
- package/build-types/components/posts-per-page/index.d.ts.map +1 -0
- package/build-types/components/preferences-modal/enable-panel.d.ts +3 -0
- package/build-types/components/preferences-modal/enable-panel.d.ts.map +1 -0
- package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts +14 -0
- package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts.map +1 -0
- package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts +3 -0
- package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts.map +1 -0
- package/build-types/components/preferences-modal/index.d.ts +4 -0
- package/build-types/components/preferences-modal/index.d.ts.map +1 -0
- package/build-types/components/preview-dropdown/index.d.ts +5 -0
- package/build-types/components/preview-dropdown/index.d.ts.map +1 -0
- package/build-types/components/provider/disable-non-page-content-blocks.d.ts +6 -0
- package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -0
- package/build-types/components/provider/index.d.ts +65 -0
- package/build-types/components/provider/index.d.ts.map +1 -0
- package/build-types/components/provider/navigation-block-editing-mode.d.ts +9 -0
- package/build-types/components/provider/navigation-block-editing-mode.d.ts.map +1 -0
- package/build-types/components/provider/use-auto-switch-editor-sidebars.d.ts +7 -0
- package/build-types/components/provider/use-auto-switch-editor-sidebars.d.ts.map +1 -0
- package/build-types/components/provider/use-block-editor-settings.d.ts +13 -0
- package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -0
- package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts +9 -0
- package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts.map +1 -0
- package/build-types/components/provider/with-registry-provider.d.ts +3 -0
- package/build-types/components/provider/with-registry-provider.d.ts.map +1 -0
- package/build-types/components/resizable-editor/index.d.ts +8 -0
- package/build-types/components/resizable-editor/index.d.ts.map +1 -0
- package/build-types/components/resizable-editor/resize-handle.d.ts +5 -0
- package/build-types/components/resizable-editor/resize-handle.d.ts.map +1 -0
- package/build-types/components/save-publish-panels/index.d.ts +11 -0
- package/build-types/components/save-publish-panels/index.d.ts.map +1 -0
- package/build-types/components/sidebar/constants.d.ts +5 -0
- package/build-types/components/sidebar/constants.d.ts.map +1 -0
- package/build-types/components/sidebar/header.d.ts +3 -0
- package/build-types/components/sidebar/header.d.ts.map +1 -0
- package/build-types/components/sidebar/index.d.ts +6 -0
- package/build-types/components/sidebar/index.d.ts.map +1 -0
- package/build-types/components/sidebar/post-summary.d.ts +4 -0
- package/build-types/components/sidebar/post-summary.d.ts.map +1 -0
- package/build-types/components/site-discussion/index.d.ts +2 -0
- package/build-types/components/site-discussion/index.d.ts.map +1 -0
- package/build-types/components/start-page-options/index.d.ts +2 -0
- package/build-types/components/start-page-options/index.d.ts.map +1 -0
- package/build-types/components/start-template-options/index.d.ts +2 -0
- package/build-types/components/start-template-options/index.d.ts.map +1 -0
- package/build-types/components/table-of-contents/index.d.ts +7 -0
- package/build-types/components/table-of-contents/index.d.ts.map +1 -0
- package/build-types/components/table-of-contents/panel.d.ts +6 -0
- package/build-types/components/table-of-contents/panel.d.ts.map +1 -0
- package/build-types/components/template-content-panel/index.d.ts +2 -0
- package/build-types/components/template-content-panel/index.d.ts.map +1 -0
- package/build-types/components/template-part-content-panel/index.d.ts +2 -0
- package/build-types/components/template-part-content-panel/index.d.ts.map +1 -0
- package/build-types/components/template-part-menu-items/convert-to-regular.d.ts +5 -0
- package/build-types/components/template-part-menu-items/convert-to-regular.d.ts.map +1 -0
- package/build-types/components/template-part-menu-items/convert-to-template-part.d.ts +5 -0
- package/build-types/components/template-part-menu-items/convert-to-template-part.d.ts.map +1 -0
- package/build-types/components/template-part-menu-items/index.d.ts +2 -0
- package/build-types/components/template-part-menu-items/index.d.ts.map +1 -0
- package/build-types/components/template-validation-notice/index.d.ts +2 -0
- package/build-types/components/template-validation-notice/index.d.ts.map +1 -0
- package/build-types/components/text-editor/index.d.ts +4 -0
- package/build-types/components/text-editor/index.d.ts.map +1 -0
- package/build-types/components/theme-support-check/index.d.ts +14 -0
- package/build-types/components/theme-support-check/index.d.ts.map +1 -0
- package/build-types/components/time-to-read/index.d.ts +7 -0
- package/build-types/components/time-to-read/index.d.ts.map +1 -0
- package/build-types/components/unsaved-changes-warning/index.d.ts +8 -0
- package/build-types/components/unsaved-changes-warning/index.d.ts.map +1 -0
- package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts +18 -0
- package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts.map +1 -0
- package/build-types/components/visual-editor/index.d.ts +10 -0
- package/build-types/components/visual-editor/index.d.ts.map +1 -0
- package/build-types/components/visual-editor/use-select-nearest-editable-block.d.ts +4 -0
- package/build-types/components/visual-editor/use-select-nearest-editable-block.d.ts.map +1 -0
- package/build-types/components/word-count/index.d.ts +7 -0
- package/build-types/components/word-count/index.d.ts.map +1 -0
- package/build-types/dataviews/actions/delete-post.d.ts +5 -0
- package/build-types/dataviews/actions/delete-post.d.ts.map +1 -0
- package/build-types/dataviews/actions/export-pattern.d.ts +8 -0
- package/build-types/dataviews/actions/export-pattern.d.ts.map +1 -0
- package/build-types/dataviews/actions/index.d.ts +2 -0
- package/build-types/dataviews/actions/index.d.ts.map +1 -0
- package/build-types/dataviews/actions/reset-post.d.ts +5 -0
- package/build-types/dataviews/actions/reset-post.d.ts.map +1 -0
- package/build-types/dataviews/actions/utils.d.ts +11 -0
- package/build-types/dataviews/actions/utils.d.ts.map +1 -0
- package/build-types/dataviews/api.d.ts +27 -0
- package/build-types/dataviews/api.d.ts.map +1 -0
- package/build-types/dataviews/store/private-actions.d.ts +2 -2
- package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
- package/build-types/dataviews/store/private-selectors.d.ts +1 -5
- package/build-types/dataviews/store/private-selectors.d.ts.map +1 -1
- package/build-types/dataviews/store/reducer.d.ts +5 -1
- package/build-types/dataviews/store/reducer.d.ts.map +1 -1
- package/build-types/dataviews/types.d.ts +34 -0
- package/build-types/dataviews/types.d.ts.map +1 -0
- package/build-types/hooks/custom-sources-backwards-compatibility.d.ts +10 -0
- package/build-types/hooks/custom-sources-backwards-compatibility.d.ts.map +1 -0
- package/build-types/hooks/default-autocompleters.d.ts +2 -0
- package/build-types/hooks/default-autocompleters.d.ts.map +1 -0
- package/build-types/hooks/index.d.ts +2 -0
- package/build-types/hooks/index.d.ts.map +1 -0
- package/build-types/hooks/media-upload.d.ts +2 -0
- package/build-types/hooks/media-upload.d.ts.map +1 -0
- package/build-types/hooks/pattern-overrides.d.ts +2 -0
- package/build-types/hooks/pattern-overrides.d.ts.map +1 -0
- package/build-types/index.d.ts +6 -0
- package/build-types/index.d.ts.map +1 -0
- package/build-types/lock-unlock.d.ts +3 -0
- package/build-types/lock-unlock.d.ts.map +1 -0
- package/build-types/private-apis.d.ts +2 -0
- package/build-types/private-apis.d.ts.map +1 -0
- package/build-types/store/actions.d.ts +367 -0
- package/build-types/store/actions.d.ts.map +1 -0
- package/build-types/store/constants.d.ts +31 -0
- package/build-types/store/constants.d.ts.map +1 -0
- package/build-types/store/defaults.d.ts +21 -0
- package/build-types/store/defaults.d.ts.map +1 -0
- package/build-types/store/index.d.ts +17 -0
- package/build-types/store/index.d.ts.map +1 -0
- package/build-types/store/local-autosave.d.ts +4 -0
- package/build-types/store/local-autosave.d.ts.map +1 -0
- package/build-types/store/private-actions.d.ts +37 -0
- package/build-types/store/private-actions.d.ts.map +1 -0
- package/build-types/store/private-selectors.d.ts +24 -0
- package/build-types/store/private-selectors.d.ts.map +1 -0
- package/build-types/store/reducer.d.ts +228 -0
- package/build-types/store/reducer.d.ts.map +1 -0
- package/build-types/store/selectors.d.ts +853 -0
- package/build-types/store/selectors.d.ts.map +1 -0
- package/build-types/store/utils/is-template-revertable.d.ts +8 -0
- package/build-types/store/utils/is-template-revertable.d.ts.map +1 -0
- package/build-types/store/utils/notice-builder.d.ts +27 -0
- package/build-types/store/utils/notice-builder.d.ts.map +1 -0
- package/build-types/utils/get-template-part-icon.d.ts +9 -0
- package/build-types/utils/get-template-part-icon.d.ts.map +1 -0
- package/build-types/utils/index.d.ts +5 -0
- package/build-types/utils/index.d.ts.map +1 -0
- package/build-types/utils/media-upload/index.d.ts +21 -0
- package/build-types/utils/media-upload/index.d.ts.map +1 -0
- package/build-types/utils/terms.d.ts +12 -0
- package/build-types/utils/terms.d.ts.map +1 -0
- package/build-types/utils/url.d.ts +18 -0
- package/build-types/utils/url.d.ts.map +1 -0
- package/package.json +38 -36
- package/src/bindings/api.js +57 -0
- package/src/bindings/pattern-overrides.js +30 -20
- package/src/bindings/post-meta.js +24 -14
- package/src/components/block-settings-menu/content-only-settings-menu.js +4 -4
- package/src/components/blog-title/index.js +7 -2
- package/src/components/collapsible-block-toolbar/index.js +1 -3
- package/src/components/collapsible-block-toolbar/style.scss +0 -3
- package/src/components/document-bar/style.scss +1 -5
- package/src/components/document-tools/style.scss +4 -4
- package/src/components/editor-interface/index.js +17 -12
- package/src/components/editor-interface/style.scss +4 -0
- package/src/components/entities-saved-states/index.js +1 -1
- package/src/components/global-styles-provider/index.js +22 -11
- package/src/components/header/back-button.js +6 -6
- package/src/components/header/index.js +26 -25
- package/src/components/header/style.scss +64 -21
- package/src/components/inserter-sidebar/index.js +4 -24
- package/src/components/inserter-sidebar/style.scss +1 -6
- package/src/components/list-view-sidebar/index.js +34 -62
- package/src/components/list-view-sidebar/style.scss +0 -34
- package/src/components/page-attributes/order.js +3 -77
- package/src/components/page-attributes/panel.js +1 -7
- package/src/components/page-attributes/parent.js +6 -3
- package/src/components/post-actions/actions.js +227 -304
- package/src/components/post-actions/index.js +1 -1
- package/src/components/post-card-panel/index.js +8 -2
- package/src/components/post-comments/index.js +2 -2
- package/src/components/post-content-information/index.js +7 -1
- package/src/components/post-discussion/panel.js +5 -3
- package/src/components/post-excerpt/panel.js +3 -2
- package/src/components/post-featured-image/index.js +5 -1
- package/src/components/post-featured-image/style.scss +15 -0
- package/src/components/post-last-revision/index.js +1 -0
- package/src/components/post-panel-row/style.scss +1 -1
- package/src/components/post-preview-button/index.js +1 -1
- package/src/components/post-publish-button/index.js +4 -17
- package/src/components/post-publish-panel/index.js +1 -1
- package/src/components/post-publish-panel/maybe-category-panel.js +4 -1
- package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
- package/src/components/post-saved-state/index.js +11 -1
- package/src/components/post-schedule/index.js +5 -0
- package/src/components/post-status/index.js +19 -11
- package/src/components/post-taxonomies/README.md +1 -1
- package/src/components/post-taxonomies/flat-term-selector.js +19 -5
- package/src/components/post-taxonomies/index.js +8 -1
- package/src/components/post-template/block-theme.js +5 -1
- package/src/components/post-template/classic-theme.js +8 -3
- package/src/components/post-template/create-new-template.js +4 -1
- package/src/components/post-template/hooks.js +8 -2
- package/src/components/post-template/panel.js +10 -2
- package/src/components/post-title/index.js +5 -12
- package/src/components/post-trash/check.js +9 -5
- package/src/components/post-url/panel.js +7 -2
- package/src/components/posts-per-page/index.js +7 -2
- package/src/components/preview-dropdown/index.js +1 -1
- package/src/components/provider/index.native.js +3 -11
- package/src/components/provider/use-block-editor-settings.js +25 -11
- package/src/components/save-publish-panels/index.js +31 -24
- package/src/components/sidebar/index.js +2 -7
- package/src/components/sidebar/post-summary.js +0 -2
- package/src/components/site-discussion/index.js +9 -4
- package/src/components/template-content-panel/index.js +29 -4
- package/src/components/visual-editor/edit-template-blocks-notification.js +5 -1
- package/src/components/visual-editor/index.js +6 -3
- package/src/components/visual-editor/style.scss +1 -2
- package/src/{hooks → components/visual-editor}/use-select-nearest-editable-block.js +1 -1
- package/src/dataviews/actions/delete-post.tsx +109 -0
- package/src/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.tsx} +19 -19
- package/src/dataviews/actions/index.ts +25 -0
- package/src/dataviews/actions/reset-post.tsx +144 -0
- package/src/dataviews/actions/utils.ts +54 -0
- package/src/dataviews/store/private-actions.ts +2 -2
- package/src/dataviews/store/private-selectors.ts +13 -6
- package/src/dataviews/store/reducer.ts +12 -5
- package/src/dataviews/types.ts +33 -0
- package/src/hooks/pattern-overrides.js +5 -2
- package/src/index.js +0 -1
- package/src/private-apis.js +8 -0
- package/src/private-apis.native.js +0 -2
- package/src/store/private-actions.js +1 -6
- package/src/store/private-selectors.js +0 -25
- package/src/store/test/actions.js +9 -3
- package/src/store/utils/is-template-revertable.js +8 -8
- package/src/style.scss +0 -1
- package/src/utils/media-upload/index.js +38 -3
- package/tsconfig.json +3 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/build/bindings/index.js +0 -22
- package/build/bindings/index.js.map +0 -1
- package/build/components/post-actions/export-pattern-action.js.map +0 -1
- package/build/components/post-actions/export-pattern-action.native.js +0 -11
- package/build/components/post-actions/export-pattern-action.native.js.map +0 -1
- package/build/components/template-areas/index.js +0 -84
- package/build/components/template-areas/index.js.map +0 -1
- package/build/hooks/use-select-nearest-editable-block.js.map +0 -1
- package/build/store/utils/get-filtered-template-parts.js +0 -71
- package/build/store/utils/get-filtered-template-parts.js.map +0 -1
- package/build/utils/set-nested-value.js +0 -44
- package/build/utils/set-nested-value.js.map +0 -1
- package/build-module/bindings/index.js +0 -17
- package/build-module/bindings/index.js.map +0 -1
- package/build-module/components/post-actions/export-pattern-action.js.map +0 -1
- package/build-module/components/post-actions/export-pattern-action.native.js +0 -5
- package/build-module/components/post-actions/export-pattern-action.native.js.map +0 -1
- package/build-module/components/template-areas/index.js +0 -78
- package/build-module/components/template-areas/index.js.map +0 -1
- package/build-module/hooks/use-select-nearest-editable-block.js.map +0 -1
- package/build-module/store/utils/get-filtered-template-parts.js +0 -64
- package/build-module/store/utils/get-filtered-template-parts.js.map +0 -1
- package/build-module/utils/set-nested-value.js +0 -38
- package/build-module/utils/set-nested-value.js.map +0 -1
- package/src/bindings/index.js +0 -15
- package/src/components/post-actions/export-pattern-action.native.js +0 -4
- package/src/components/template-areas/index.js +0 -94
- package/src/components/template-areas/style.scss +0 -22
- package/src/store/utils/get-filtered-template-parts.js +0 -69
- package/src/store/utils/test/get-filtered-template-parts.js +0 -189
- package/src/utils/set-nested-value.js +0 -39
- /package/src/store/{constants.js → constants.ts} +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { trash } from '@wordpress/icons';
|
|
5
|
+
import { useDispatch } from '@wordpress/data';
|
|
6
|
+
import { __, _n, sprintf } from '@wordpress/i18n';
|
|
7
|
+
import { useState } from '@wordpress/element';
|
|
8
|
+
import { Button, __experimentalText as Text, __experimentalHStack as HStack, __experimentalVStack as VStack } from '@wordpress/components';
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
import { privateApis as patternsPrivateApis } from '@wordpress/patterns';
|
|
11
|
+
/**
|
|
12
|
+
* Internal dependencies
|
|
13
|
+
*/
|
|
14
|
+
import { isTemplateRemovable, getItemTitle, isTemplateOrTemplatePart } from './utils';
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
import { store as editorStore } from '../../store';
|
|
17
|
+
import { unlock } from '../../lock-unlock';
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
const {
|
|
21
|
+
PATTERN_TYPES
|
|
22
|
+
} = unlock(patternsPrivateApis);
|
|
23
|
+
|
|
24
|
+
// This action is used for templates, patterns and template parts.
|
|
25
|
+
// Every other post type uses the similar `trashPostAction` which
|
|
26
|
+
// moves the post to trash.
|
|
27
|
+
const deletePostAction = {
|
|
28
|
+
id: 'delete-post',
|
|
29
|
+
label: __('Delete'),
|
|
30
|
+
isPrimary: true,
|
|
31
|
+
icon: trash,
|
|
32
|
+
isEligible(post) {
|
|
33
|
+
if (isTemplateOrTemplatePart(post)) {
|
|
34
|
+
return isTemplateRemovable(post);
|
|
35
|
+
}
|
|
36
|
+
// We can only remove user patterns.
|
|
37
|
+
return post.type === PATTERN_TYPES.user;
|
|
38
|
+
},
|
|
39
|
+
supportsBulk: true,
|
|
40
|
+
hideModalHeader: true,
|
|
41
|
+
RenderModal: ({
|
|
42
|
+
items,
|
|
43
|
+
closeModal,
|
|
44
|
+
onActionPerformed
|
|
45
|
+
}) => {
|
|
46
|
+
const [isBusy, setIsBusy] = useState(false);
|
|
47
|
+
const {
|
|
48
|
+
removeTemplates
|
|
49
|
+
} = unlock(useDispatch(editorStore));
|
|
50
|
+
return /*#__PURE__*/_jsxs(VStack, {
|
|
51
|
+
spacing: "5",
|
|
52
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
53
|
+
children: items.length > 1 ? sprintf(
|
|
54
|
+
// translators: %d: number of items to delete.
|
|
55
|
+
_n('Delete %d item?', 'Delete %d items?', items.length), items.length) : sprintf(
|
|
56
|
+
// translators: %s: The template or template part's titles
|
|
57
|
+
__('Delete "%s"?'), getItemTitle(items[0]))
|
|
58
|
+
}), /*#__PURE__*/_jsxs(HStack, {
|
|
59
|
+
justify: "right",
|
|
60
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
61
|
+
variant: "tertiary",
|
|
62
|
+
onClick: closeModal,
|
|
63
|
+
disabled: isBusy,
|
|
64
|
+
accessibleWhenDisabled: true,
|
|
65
|
+
__next40pxDefaultSize: true,
|
|
66
|
+
children: __('Cancel')
|
|
67
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
68
|
+
variant: "primary",
|
|
69
|
+
onClick: async () => {
|
|
70
|
+
setIsBusy(true);
|
|
71
|
+
await removeTemplates(items, {
|
|
72
|
+
allowUndo: false
|
|
73
|
+
});
|
|
74
|
+
onActionPerformed?.(items);
|
|
75
|
+
setIsBusy(false);
|
|
76
|
+
closeModal?.();
|
|
77
|
+
},
|
|
78
|
+
isBusy: isBusy,
|
|
79
|
+
disabled: isBusy,
|
|
80
|
+
accessibleWhenDisabled: true,
|
|
81
|
+
__next40pxDefaultSize: true,
|
|
82
|
+
children: __('Delete')
|
|
83
|
+
})]
|
|
84
|
+
})]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
export default deletePostAction;
|
|
89
|
+
//# sourceMappingURL=delete-post.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["trash","useDispatch","__","_n","sprintf","useState","Button","__experimentalText","Text","__experimentalHStack","HStack","__experimentalVStack","VStack","privateApis","patternsPrivateApis","isTemplateRemovable","getItemTitle","isTemplateOrTemplatePart","store","editorStore","unlock","jsx","_jsx","jsxs","_jsxs","PATTERN_TYPES","deletePostAction","id","label","isPrimary","icon","isEligible","post","type","user","supportsBulk","hideModalHeader","RenderModal","items","closeModal","onActionPerformed","isBusy","setIsBusy","removeTemplates","spacing","children","length","justify","variant","onClick","disabled","accessibleWhenDisabled","__next40pxDefaultSize","allowUndo"],"sources":["@wordpress/editor/src/dataviews/actions/delete-post.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { trash } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n// @ts-ignore\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport type { Action } from '@wordpress/dataviews';\nimport type { StoreDescriptor } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tisTemplateRemovable,\n\tgetItemTitle,\n\tisTemplateOrTemplatePart,\n} from './utils';\n// @ts-ignore\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport type { Post } from '../types';\n\nconst { PATTERN_TYPES } = unlock( patternsPrivateApis );\n\n// This action is used for templates, patterns and template parts.\n// Every other post type uses the similar `trashPostAction` which\n// moves the post to trash.\nconst deletePostAction: Action< Post > = {\n\tid: 'delete-post',\n\tlabel: __( 'Delete' ),\n\tisPrimary: true,\n\ticon: trash,\n\tisEligible( post ) {\n\t\tif ( isTemplateOrTemplatePart( post ) ) {\n\t\t\treturn isTemplateRemovable( post );\n\t\t}\n\t\t// We can only remove user patterns.\n\t\treturn post.type === PATTERN_TYPES.user;\n\t},\n\tsupportsBulk: true,\n\thideModalHeader: true,\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ isBusy, setIsBusy ] = useState( false );\n\t\tconst { removeTemplates } = unlock(\n\t\t\tuseDispatch( editorStore as StoreDescriptor )\n\t\t);\n\t\treturn (\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>\n\t\t\t\t\t{ items.length > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %d: number of items to delete.\n\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t'Delete %d item?',\n\t\t\t\t\t\t\t\t\t'Delete %d items?',\n\t\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The template or template part's titles\n\t\t\t\t\t\t\t\t__( 'Delete \"%s\"?' ),\n\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\tsetIsBusy( true );\n\t\t\t\t\t\t\tawait removeTemplates( items, {\n\t\t\t\t\t\t\t\tallowUndo: false,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tonActionPerformed?.( items );\n\t\t\t\t\t\t\tsetIsBusy( false );\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t</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AAE,QAAS;QAAC,CACT,CAAC;MAAA,CACF,CAAC;IAAA,CACF,CAAC;EAEX;AACD,CAAC;AAED,eAAewB,gBAAgB","ignoreList":[]}
|
|
@@ -9,42 +9,32 @@ import { downloadZip } from 'client-zip';
|
|
|
9
9
|
*/
|
|
10
10
|
import { downloadBlob } from '@wordpress/blob';
|
|
11
11
|
import { __ } from '@wordpress/i18n';
|
|
12
|
-
import { privateApis as patternsPrivateApis } from '@wordpress/patterns';
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* Internal dependencies
|
|
16
15
|
*/
|
|
17
|
-
import { unlock } from '../../lock-unlock';
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
const {
|
|
21
|
-
PATTERN_TYPES
|
|
22
|
-
} = unlock(patternsPrivateApis);
|
|
17
|
+
import { getItemTitle } from './utils';
|
|
23
18
|
function getJsonFromItem(item) {
|
|
24
19
|
return JSON.stringify({
|
|
25
20
|
__file: item.type,
|
|
26
|
-
title: item
|
|
27
|
-
content: item.
|
|
28
|
-
syncStatus: item.
|
|
21
|
+
title: getItemTitle(item),
|
|
22
|
+
content: typeof item.content === 'string' ? item.content : item.content?.raw,
|
|
23
|
+
syncStatus: item.wp_pattern_sync_status
|
|
29
24
|
}, null, 2);
|
|
30
25
|
}
|
|
31
|
-
|
|
26
|
+
const exportPattern = {
|
|
32
27
|
id: 'export-pattern',
|
|
33
28
|
label: __('Export as JSON'),
|
|
34
29
|
supportsBulk: true,
|
|
35
|
-
isEligible: item =>
|
|
36
|
-
if (!item.type) {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
return item.type === PATTERN_TYPES.user;
|
|
40
|
-
},
|
|
30
|
+
isEligible: item => item.type === 'wp_block',
|
|
41
31
|
callback: async items => {
|
|
42
32
|
if (items.length === 1) {
|
|
43
|
-
return downloadBlob(`${kebabCase(items[0]
|
|
33
|
+
return downloadBlob(`${kebabCase(getItemTitle(items[0]) || items[0].slug)}.json`, getJsonFromItem(items[0]), 'application/json');
|
|
44
34
|
}
|
|
45
35
|
const nameCount = {};
|
|
46
36
|
const filesToZip = items.map(item => {
|
|
47
|
-
const name = kebabCase(item
|
|
37
|
+
const name = kebabCase(getItemTitle(item) || item.slug);
|
|
48
38
|
nameCount[name] = (nameCount[name] || 0) + 1;
|
|
49
39
|
return {
|
|
50
40
|
name: `${name + (nameCount[name] > 1 ? '-' + (nameCount[name] - 1) : '')}.json`,
|
|
@@ -55,4 +45,5 @@ export const exportPatternAsJSONAction = {
|
|
|
55
45
|
return downloadBlob(__('patterns-export') + '.zip', await downloadZip(filesToZip).blob(), 'application/zip');
|
|
56
46
|
}
|
|
57
47
|
};
|
|
58
|
-
|
|
48
|
+
export default exportPattern;
|
|
49
|
+
//# sourceMappingURL=export-pattern.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["paramCase","kebabCase","downloadZip","downloadBlob","__","getItemTitle","getJsonFromItem","item","JSON","stringify","__file","type","title","content","raw","syncStatus","wp_pattern_sync_status","exportPattern","id","label","supportsBulk","isEligible","callback","items","length","slug","nameCount","filesToZip","map","name","lastModified","Date","input","blob"],"sources":["@wordpress/editor/src/dataviews/actions/export-pattern.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\nimport { downloadZip } from 'client-zip';\n\n/**\n * WordPress dependencies\n */\nimport { downloadBlob } from '@wordpress/blob';\nimport { __ } from '@wordpress/i18n';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { Pattern } from '../types';\nimport { getItemTitle } from './utils';\n\nfunction getJsonFromItem( item: Pattern ) {\n\treturn JSON.stringify(\n\t\t{\n\t\t\t__file: item.type,\n\t\t\ttitle: getItemTitle( item ),\n\t\t\tcontent:\n\t\t\t\ttypeof item.content === 'string'\n\t\t\t\t\t? item.content\n\t\t\t\t\t: item.content?.raw,\n\t\t\tsyncStatus: item.wp_pattern_sync_status,\n\t\t},\n\t\tnull,\n\t\t2\n\t);\n}\n\nconst exportPattern: Action< Pattern > = {\n\tid: 'export-pattern',\n\tlabel: __( 'Export as JSON' ),\n\tsupportsBulk: true,\n\tisEligible: ( item ) => item.type === 'wp_block',\n\tcallback: async ( items ) => {\n\t\tif ( items.length === 1 ) {\n\t\t\treturn downloadBlob(\n\t\t\t\t`${ kebabCase(\n\t\t\t\t\tgetItemTitle( items[ 0 ] ) || items[ 0 ].slug\n\t\t\t\t) }.json`,\n\t\t\t\tgetJsonFromItem( items[ 0 ] ),\n\t\t\t\t'application/json'\n\t\t\t);\n\t\t}\n\t\tconst nameCount: Record< string, number > = {};\n\t\tconst filesToZip = items.map( ( item ) => {\n\t\t\tconst name = kebabCase( getItemTitle( item ) || item.slug );\n\t\t\tnameCount[ name ] = ( nameCount[ name ] || 0 ) + 1;\n\t\t\treturn {\n\t\t\t\tname: `${\n\t\t\t\t\tname +\n\t\t\t\t\t( nameCount[ name ] > 1\n\t\t\t\t\t\t? '-' + ( nameCount[ name ] - 1 )\n\t\t\t\t\t\t: '' )\n\t\t\t\t}.json`,\n\t\t\t\tlastModified: new Date(),\n\t\t\t\tinput: getJsonFromItem( item ),\n\t\t\t};\n\t\t} );\n\t\treturn downloadBlob(\n\t\t\t__( 'patterns-export' ) + '.zip',\n\t\t\tawait downloadZip( filesToZip ).blob(),\n\t\t\t'application/zip'\n\t\t);\n\t},\n};\n\nexport default exportPattern;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,IAAIC,SAAS,QAAQ,aAAa;AACpD,SAASC,WAAW,QAAQ,YAAY;;AAExC;AACA;AACA;AACA,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;;AAGpC;AACA;AACA;;AAEA,SAASC,YAAY,QAAQ,SAAS;AAEtC,SAASC,eAAeA,CAAEC,IAAa,EAAG;EACzC,OAAOC,IAAI,CAACC,SAAS,CACpB;IACCC,MAAM,EAAEH,IAAI,CAACI,IAAI;IACjBC,KAAK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IAAI,CAAC,CAAC;QACxBC,KAAK,EAAE1B,eAAe,CAAEC,IAAK;MAC9B,CAAC;IACF,CAAE,CAAC;IACH,OAAOJ,YAAY,CAClBC,EAAE,CAAE,iBAAkB,CAAC,GAAG,MAAM,EAChC,MAAMF,WAAW,CAAEyB,UAAW,CAAC,CAACM,IAAI,CAAC,CAAC,EACtC,iBACD,CAAC;EACF;AACD,CAAC;AAED,eAAehB,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { dispatch } from '@wordpress/data';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import deletePost from './delete-post';
|
|
10
|
+
import exportPattern from './export-pattern';
|
|
11
|
+
import resetPost from './reset-post';
|
|
12
|
+
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import { store as editorStore } from '../../store';
|
|
15
|
+
import { unlock } from '../../lock-unlock';
|
|
16
|
+
export default function registerDefaultActions() {
|
|
17
|
+
const {
|
|
18
|
+
registerEntityAction
|
|
19
|
+
} = unlock(dispatch(editorStore));
|
|
20
|
+
registerEntityAction('postType', 'wp_block', exportPattern);
|
|
21
|
+
registerEntityAction('postType', '*', resetPost);
|
|
22
|
+
registerEntityAction('postType', '*', deletePost);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dispatch","deletePost","exportPattern","resetPost","store","editorStore","unlock","registerDefaultActions","registerEntityAction"],"sources":["@wordpress/editor/src/dataviews/actions/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { type StoreDescriptor, dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport deletePost from './delete-post';\nimport exportPattern from './export-pattern';\nimport resetPost from './reset-post';\n\n// @ts-ignore\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nexport default function registerDefaultActions() {\n\tconst { registerEntityAction } = unlock(\n\t\tdispatch( editorStore as StoreDescriptor )\n\t);\n\n\tregisterEntityAction( 'postType', 'wp_block', exportPattern );\n\tregisterEntityAction( 'postType', '*', resetPost );\n\tregisterEntityAction( 'postType', '*', deletePost );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAA+BA,QAAQ,QAAQ,iBAAiB;;AAEhE;AACA;AACA;AACA,OAAOC,UAAU,MAAM,eAAe;AACtC,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,OAAOC,SAAS,MAAM,cAAc;;AAEpC;AACA,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAClD,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,eAAe,SAASC,sBAAsBA,CAAA,EAAG;EAChD,MAAM;IAAEC;EAAqB,CAAC,GAAGF,MAAM,CACtCN,QAAQ,CAAEK,WAA+B,CAC1C,CAAC;EAEDG,oBAAoB,CAAE,UAAU,EAAE,UAAU,EAAEN,aAAc,CAAC;EAC7DM,oBAAoB,CAAE,UAAU,EAAE,GAAG,EAAEL,SAAU,CAAC;EAClDK,oBAAoB,CAAE,UAAU,EAAE,GAAG,EAAEP,UAAW,CAAC;AACpD","ignoreList":[]}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { backup } from '@wordpress/icons';
|
|
5
|
+
import { useDispatch } from '@wordpress/data';
|
|
6
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
7
|
+
import { __, sprintf } from '@wordpress/i18n';
|
|
8
|
+
import { store as noticesStore } from '@wordpress/notices';
|
|
9
|
+
import { useState } from '@wordpress/element';
|
|
10
|
+
import { Button, __experimentalText as Text, __experimentalHStack as HStack, __experimentalVStack as VStack } from '@wordpress/components';
|
|
11
|
+
/**
|
|
12
|
+
* Internal dependencies
|
|
13
|
+
*/
|
|
14
|
+
import { TEMPLATE_POST_TYPE, TEMPLATE_ORIGINS } from '../../store/constants';
|
|
15
|
+
import { store as editorStore } from '../../store';
|
|
16
|
+
import { unlock } from '../../lock-unlock';
|
|
17
|
+
import { isTemplateOrTemplatePart, getItemTitle } from './utils';
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
const resetPost = {
|
|
21
|
+
id: 'reset-post',
|
|
22
|
+
label: __('Reset'),
|
|
23
|
+
isEligible: item => {
|
|
24
|
+
return isTemplateOrTemplatePart(item) && item?.source === TEMPLATE_ORIGINS.custom && item?.has_theme_file;
|
|
25
|
+
},
|
|
26
|
+
icon: backup,
|
|
27
|
+
supportsBulk: true,
|
|
28
|
+
hideModalHeader: true,
|
|
29
|
+
RenderModal: ({
|
|
30
|
+
items,
|
|
31
|
+
closeModal,
|
|
32
|
+
onActionPerformed
|
|
33
|
+
}) => {
|
|
34
|
+
const [isBusy, setIsBusy] = useState(false);
|
|
35
|
+
const {
|
|
36
|
+
revertTemplate
|
|
37
|
+
} = unlock(useDispatch(editorStore));
|
|
38
|
+
const {
|
|
39
|
+
saveEditedEntityRecord
|
|
40
|
+
} = useDispatch(coreStore);
|
|
41
|
+
const {
|
|
42
|
+
createSuccessNotice,
|
|
43
|
+
createErrorNotice
|
|
44
|
+
} = useDispatch(noticesStore);
|
|
45
|
+
const onConfirm = async () => {
|
|
46
|
+
try {
|
|
47
|
+
for (const template of items) {
|
|
48
|
+
await revertTemplate(template, {
|
|
49
|
+
allowUndo: false
|
|
50
|
+
});
|
|
51
|
+
await saveEditedEntityRecord('postType', template.type, template.id);
|
|
52
|
+
}
|
|
53
|
+
createSuccessNotice(items.length > 1 ? sprintf( /* translators: The number of items. */
|
|
54
|
+
__('%s items reset.'), items.length) : sprintf( /* translators: The template/part's name. */
|
|
55
|
+
__('"%s" reset.'), getItemTitle(items[0])), {
|
|
56
|
+
type: 'snackbar',
|
|
57
|
+
id: 'revert-template-action'
|
|
58
|
+
});
|
|
59
|
+
} catch (error) {
|
|
60
|
+
let fallbackErrorMessage;
|
|
61
|
+
if (items[0].type === TEMPLATE_POST_TYPE) {
|
|
62
|
+
fallbackErrorMessage = items.length === 1 ? __('An error occurred while reverting the template.') : __('An error occurred while reverting the templates.');
|
|
63
|
+
} else {
|
|
64
|
+
fallbackErrorMessage = items.length === 1 ? __('An error occurred while reverting the template part.') : __('An error occurred while reverting the template parts.');
|
|
65
|
+
}
|
|
66
|
+
const typedError = error;
|
|
67
|
+
const errorMessage = typedError.message && typedError.code !== 'unknown_error' ? typedError.message : fallbackErrorMessage;
|
|
68
|
+
createErrorNotice(errorMessage, {
|
|
69
|
+
type: 'snackbar'
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
return /*#__PURE__*/_jsxs(VStack, {
|
|
74
|
+
spacing: "5",
|
|
75
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
76
|
+
children: __('Reset to default and clear all customizations?')
|
|
77
|
+
}), /*#__PURE__*/_jsxs(HStack, {
|
|
78
|
+
justify: "right",
|
|
79
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
80
|
+
variant: "tertiary",
|
|
81
|
+
onClick: closeModal,
|
|
82
|
+
disabled: isBusy,
|
|
83
|
+
accessibleWhenDisabled: true,
|
|
84
|
+
children: __('Cancel')
|
|
85
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
86
|
+
variant: "primary",
|
|
87
|
+
onClick: async () => {
|
|
88
|
+
setIsBusy(true);
|
|
89
|
+
await onConfirm();
|
|
90
|
+
onActionPerformed?.(items);
|
|
91
|
+
setIsBusy(false);
|
|
92
|
+
closeModal?.();
|
|
93
|
+
},
|
|
94
|
+
isBusy: isBusy,
|
|
95
|
+
disabled: isBusy,
|
|
96
|
+
accessibleWhenDisabled: true,
|
|
97
|
+
children: __('Reset')
|
|
98
|
+
})]
|
|
99
|
+
})]
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
export default resetPost;
|
|
104
|
+
//# sourceMappingURL=reset-post.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["backup","useDispatch","store","coreStore","__","sprintf","noticesStore","useState","Button","__experimentalText","Text","__experimentalHStack","HStack","__experimentalVStack","VStack","TEMPLATE_POST_TYPE","TEMPLATE_ORIGINS","editorStore","unlock","isTemplateOrTemplatePart","getItemTitle","jsx","_jsx","jsxs","_jsxs","resetPost","id","label","isEligible","item","source","custom","has_theme_file","icon","supportsBulk","hideModalHeader","RenderModal","items","closeModal","onActionPerformed","isBusy","setIsBusy","revertTemplate","saveEditedEntityRecord","createSuccessNotice","createErrorNotice","onConfirm","template","allowUndo","type","length","error","fallbackErrorMessage","typedError","errorMessage","message","code","spacing","children","justify","variant","onClick","disabled","accessibleWhenDisabled"],"sources":["@wordpress/editor/src/dataviews/actions/reset-post.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { backup } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport type { Action } from '@wordpress/dataviews';\nimport type { StoreDescriptor } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE, TEMPLATE_ORIGINS } from '../../store/constants';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport type { Post, CoreDataError } from '../types';\nimport { isTemplateOrTemplatePart, getItemTitle } from './utils';\n\nconst resetPost: Action< Post > = {\n\tid: 'reset-post',\n\tlabel: __( 'Reset' ),\n\tisEligible: ( item ) => {\n\t\treturn (\n\t\t\tisTemplateOrTemplatePart( item ) &&\n\t\t\titem?.source === TEMPLATE_ORIGINS.custom &&\n\t\t\titem?.has_theme_file\n\t\t);\n\t},\n\ticon: backup,\n\tsupportsBulk: true,\n\thideModalHeader: true,\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ isBusy, setIsBusy ] = useState( false );\n\t\tconst { revertTemplate } = unlock(\n\t\t\tuseDispatch( editorStore as StoreDescriptor )\n\t\t);\n\t\tconst { saveEditedEntityRecord } = useDispatch( coreStore );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tuseDispatch( noticesStore );\n\t\tconst onConfirm = async () => {\n\t\t\ttry {\n\t\t\t\tfor ( const template of items ) {\n\t\t\t\t\tawait revertTemplate( template, {\n\t\t\t\t\t\tallowUndo: false,\n\t\t\t\t\t} );\n\t\t\t\t\tawait saveEditedEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\ttemplate.type,\n\t\t\t\t\t\ttemplate.id\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\titems.length > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: The number of items. */\n\t\t\t\t\t\t\t\t__( '%s items reset.' ),\n\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t\t\t\t__( '\"%s\" reset.' ),\n\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t ),\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: 'revert-template-action',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} catch ( error ) {\n\t\t\t\tlet fallbackErrorMessage;\n\t\t\t\tif ( items[ 0 ].type === TEMPLATE_POST_TYPE ) {\n\t\t\t\t\tfallbackErrorMessage =\n\t\t\t\t\t\titems.length === 1\n\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the template.'\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the templates.'\n\t\t\t\t\t\t\t );\n\t\t\t\t} else {\n\t\t\t\t\tfallbackErrorMessage =\n\t\t\t\t\t\titems.length === 1\n\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the template part.'\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the template parts.'\n\t\t\t\t\t\t\t );\n\t\t\t\t}\n\n\t\t\t\tconst typedError = error as CoreDataError;\n\t\t\t\tconst errorMessage =\n\t\t\t\t\ttypedError.message && typedError.code !== 'unknown_error'\n\t\t\t\t\t\t? typedError.message\n\t\t\t\t\t\t: fallbackErrorMessage;\n\n\t\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t\t}\n\t\t};\n\t\treturn (\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>\n\t\t\t\t\t{ __( 'Reset to default and clear all customizations?' ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\tsetIsBusy( true );\n\t\t\t\t\t\t\tawait onConfirm();\n\t\t\t\t\t\t\tonActionPerformed?.( items );\n\t\t\t\t\t\t\tsetIsBusy( false );\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\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","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { decodeEntities } from '@wordpress/html-entities';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { TEMPLATE_ORIGINS, TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE } from '../../store/constants';
|
|
10
|
+
export function isTemplateOrTemplatePart(p) {
|
|
11
|
+
return p.type === TEMPLATE_POST_TYPE || p.type === TEMPLATE_PART_POST_TYPE;
|
|
12
|
+
}
|
|
13
|
+
export function getItemTitle(item) {
|
|
14
|
+
if (typeof item.title === 'string') {
|
|
15
|
+
return decodeEntities(item.title);
|
|
16
|
+
}
|
|
17
|
+
if ('rendered' in item.title) {
|
|
18
|
+
return decodeEntities(item.title.rendered);
|
|
19
|
+
}
|
|
20
|
+
if ('raw' in item.title) {
|
|
21
|
+
return decodeEntities(item.title.raw);
|
|
22
|
+
}
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Check if a template is removable.
|
|
28
|
+
*
|
|
29
|
+
* @param template The template entity to check.
|
|
30
|
+
* @return Whether the template is removable.
|
|
31
|
+
*/
|
|
32
|
+
export function isTemplateRemovable(template) {
|
|
33
|
+
if (!template) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
// In patterns list page we map the templates parts to a different object
|
|
37
|
+
// than the one returned from the endpoint. This is why we need to check for
|
|
38
|
+
// two props whether is custom or has a theme file.
|
|
39
|
+
return [template.source, template.source].includes(TEMPLATE_ORIGINS.custom) && !template.has_theme_file;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["decodeEntities","TEMPLATE_ORIGINS","TEMPLATE_PART_POST_TYPE","TEMPLATE_POST_TYPE","isTemplateOrTemplatePart","p","type","getItemTitle","item","title","rendered","raw","isTemplateRemovable","template","source","includes","custom","has_theme_file"],"sources":["@wordpress/editor/src/dataviews/actions/utils.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_ORIGINS,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../store/constants';\n\nimport type { Post, TemplateOrTemplatePart } from '../types';\n\nexport function isTemplateOrTemplatePart(\n\tp: Post\n): p is TemplateOrTemplatePart {\n\treturn p.type === TEMPLATE_POST_TYPE || p.type === TEMPLATE_PART_POST_TYPE;\n}\n\nexport function getItemTitle( item: Post ) {\n\tif ( typeof item.title === 'string' ) {\n\t\treturn decodeEntities( item.title );\n\t}\n\tif ( 'rendered' in item.title ) {\n\t\treturn decodeEntities( item.title.rendered );\n\t}\n\tif ( 'raw' in item.title ) {\n\t\treturn decodeEntities( item.title.raw );\n\t}\n\treturn '';\n}\n\n/**\n * Check if a template is removable.\n *\n * @param template The template entity to check.\n * @return Whether the template is removable.\n */\nexport function isTemplateRemovable( template: TemplateOrTemplatePart ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\t// In patterns list page we map the templates parts to a different object\n\t// than the one returned from the endpoint. This is why we need to check for\n\t// two props whether is custom or has a theme file.\n\treturn (\n\t\t[ template.source, template.source ].includes(\n\t\t\tTEMPLATE_ORIGINS.custom\n\t\t) && ! template.has_theme_file\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,0BAA0B;;AAEzD;AACA;AACA;AACA,SACCC,gBAAgB,EAChBC,uBAAuB,EACvBC,kBAAkB,QACZ,uBAAuB;AAI9B,OAAO,SAASC,wBAAwBA,CACvCC,CAAO,EACuB;EAC9B,OAAOA,CAAC,CAACC,IAAI,KAAKH,kBAAkB,IAAIE,CAAC,CAACC,IAAI,KAAKJ,uBAAuB;AAC3E;AAEA,OAAO,SAASK,YAAYA,CAAEC,IAAU,EAAG;EAC1C,IAAK,OAAOA,IAAI,CAACC,KAAK,KAAK,QAAQ,EAAG;IACrC,OAAOT,cAAc,CAAEQ,IAAI,CAACC,KAAM,CAAC;EACpC;EACA,IAAK,UAAU,IAAID,IAAI,CAACC,KAAK,EAAG;IAC/B,OAAOT,cAAc,CAAEQ,IAAI,CAACC,KAAK,CAACC,QAAS,CAAC;EAC7C;EACA,IAAK,KAAK,IAAIF,IAAI,CAACC,KAAK,EAAG;IAC1B,OAAOT,cAAc,CAAEQ,IAAI,CAACC,KAAK,CAACE,GAAI,CAAC;EACxC;EACA,OAAO,EAAE;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAEC,QAAgC,EAAG;EACvE,IAAK,CAAEA,QAAQ,EAAG;IACjB,OAAO,KAAK;EACb;EACA;EACA;EACA;EACA,OACC,CAAEA,QAAQ,CAACC,MAAM,EAAED,QAAQ,CAACC,MAAM,CAAE,CAACC,QAAQ,CAC5Cd,gBAAgB,CAACe,MAClB,CAAC,IAAI,CAAEH,QAAQ,CAACI,cAAc;AAEhC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["registerEntityAction","kind","name","config","type","unregisterEntityAction","actionId"],"sources":["@wordpress/editor/src/dataviews/store/private-actions.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport type { Action
|
|
1
|
+
{"version":3,"names":["registerEntityAction","kind","name","config","type","unregisterEntityAction","actionId"],"sources":["@wordpress/editor/src/dataviews/store/private-actions.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport type { Action } from '@wordpress/dataviews';\n\nexport function registerEntityAction< Item >(\n\tkind: string,\n\tname: string,\n\tconfig: Action< Item >\n) {\n\treturn {\n\t\ttype: 'REGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tconfig,\n\t};\n}\n\nexport function unregisterEntityAction(\n\tkind: string,\n\tname: string,\n\tactionId: string\n) {\n\treturn {\n\t\ttype: 'UNREGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tactionId,\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;;AAGA,OAAO,SAASA,oBAAoBA,CACnCC,IAAY,EACZC,IAAY,EACZC,MAAsB,EACrB;EACD,OAAO;IACNC,IAAI,EAAE,wBAAiC;IACvCH,IAAI;IACJC,IAAI;IACJC;EACD,CAAC;AACF;AAEA,OAAO,SAASE,sBAAsBA,CACrCJ,IAAY,EACZC,IAAY,EACZI,QAAgB,EACf;EACD,OAAO;IACNF,IAAI,EAAE,0BAAmC;IACzCH,IAAI;IACJC,IAAI;IACJI;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
+
import { createSelector } from '@wordpress/data';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Internal dependencies
|
|
7
8
|
*/
|
|
8
9
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
10
|
+
export const getEntityActions = createSelector((state, kind, name) => {
|
|
11
|
+
var _state$actions$kind$n, _state$actions$kind$;
|
|
12
|
+
return [...((_state$actions$kind$n = state.actions[kind]?.[name]) !== null && _state$actions$kind$n !== void 0 ? _state$actions$kind$n : []), ...((_state$actions$kind$ = state.actions[kind]?.['*']) !== null && _state$actions$kind$ !== void 0 ? _state$actions$kind$ : [])];
|
|
13
|
+
}, (state, kind, name) => [state.actions[kind]?.[name], state.actions[kind]?.['*']]);
|
|
14
14
|
//# sourceMappingURL=private-selectors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["createSelector","getEntityActions","state","kind","name","_state$actions$kind$n","_state$actions$kind$","actions"],"sources":["@wordpress/editor/src/dataviews/store/private-selectors.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSelector } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport type { State } from './reducer';\n\nexport const getEntityActions = createSelector(\n\t( state: State, kind: string, name: string ) => {\n\t\treturn [\n\t\t\t...( state.actions[ kind ]?.[ name ] ?? [] ),\n\t\t\t...( state.actions[ kind ]?.[ '*' ] ?? [] ),\n\t\t];\n\t},\n\t( state: State, kind: string, name: string ) => [\n\t\tstate.actions[ kind ]?.[ name ],\n\t\tstate.actions[ kind ]?.[ '*' ],\n\t]\n);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,iBAAiB;;AAEhD;AACA;AACA;;AAGA,OAAO,MAAMC,gBAAgB,GAAGD,cAAc,CAC7C,CAAEE,KAAY,EAAEC,IAAY,EAAEC,IAAY,KAAM;EAAA,IAAAC,qBAAA,EAAAC,oBAAA;EAC/C,OAAO,CACN,KAAAD,qBAAA,GAAKH,KAAK,CAACK,OAAO,CAAEJ,IAAI,CAAE,GAAIC,IAAI,CAAE,cAAAC,qBAAA,cAAAA,qBAAA,GAAI,EAAE,CAAE,EAC5C,KAAAC,oBAAA,GAAKJ,KAAK,CAACK,OAAO,CAAEJ,IAAI,CAAE,GAAI,GAAG,CAAE,cAAAG,oBAAA,cAAAA,oBAAA,GAAI,EAAE,CAAE,CAC3C;AACF,CAAC,EACD,CAAEJ,KAAY,EAAEC,IAAY,EAAEC,IAAY,KAAM,CAC/CF,KAAK,CAACK,OAAO,CAAEJ,IAAI,CAAE,GAAIC,IAAI,CAAE,EAC/BF,KAAK,CAACK,OAAO,CAAEJ,IAAI,CAAE,GAAI,GAAG,CAAE,CAEhC,CAAC","ignoreList":[]}
|
|
@@ -9,7 +9,8 @@ function actions(state = {}, action) {
|
|
|
9
9
|
return {
|
|
10
10
|
...state,
|
|
11
11
|
[action.kind]: {
|
|
12
|
-
|
|
12
|
+
...state[action.kind],
|
|
13
|
+
[action.name]: [...((_state$action$kind$ac = state[action.kind]?.[action.name]) !== null && _state$action$kind$ac !== void 0 ? _state$action$kind$ac : []).filter(_action => _action.id !== action.config.id), action.config]
|
|
13
14
|
}
|
|
14
15
|
};
|
|
15
16
|
case 'UNREGISTER_ENTITY_ACTION':
|
|
@@ -17,7 +18,10 @@ function actions(state = {}, action) {
|
|
|
17
18
|
var _state$action$kind$ac2;
|
|
18
19
|
return {
|
|
19
20
|
...state,
|
|
20
|
-
[action.kind]:
|
|
21
|
+
[action.kind]: {
|
|
22
|
+
...state[action.kind],
|
|
23
|
+
[action.name]: ((_state$action$kind$ac2 = state[action.kind]?.[action.name]) !== null && _state$action$kind$ac2 !== void 0 ? _state$action$kind$ac2 : []).filter(_action => _action.id !== action.actionId)
|
|
24
|
+
}
|
|
21
25
|
};
|
|
22
26
|
}
|
|
23
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["combineReducers","actions","state","action","_state$action$kind$ac","type","kind","name","
|
|
1
|
+
{"version":3,"names":["combineReducers","actions","state","action","_state$action$kind$ac","type","kind","name","filter","_action","id","config","_state$action$kind$ac2","actionId"],"sources":["@wordpress/editor/src/dataviews/store/reducer.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\nimport type { Action } from '@wordpress/dataviews';\n\ntype ReduxAction =\n\t| ReturnType< typeof import('./private-actions').registerEntityAction >\n\t| ReturnType< typeof import('./private-actions').unregisterEntityAction >;\n\nexport type ActionState = Record< string, Record< string, Action< any >[] > >;\nexport type State = {\n\tactions: ActionState;\n};\n\nfunction actions( state: ActionState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ENTITY_ACTION':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: [\n\t\t\t\t\t\t...(\n\t\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t\t).filter(\n\t\t\t\t\t\t\t( _action ) => _action.id !== action.config.id\n\t\t\t\t\t\t),\n\t\t\t\t\t\taction.config,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'UNREGISTER_ENTITY_ACTION': {\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: (\n\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t).filter( ( _action ) => _action.id !== action.actionId ),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tactions,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,iBAAiB;AAYjD,SAASC,OAAOA,CAAEC,KAAkB,GAAG,CAAC,CAAC,EAAEC,MAAmB,EAAG;EAAA,IAAAC,qBAAA;EAChE,QAASD,MAAM,CAACE,IAAI;IACnB,KAAK,wBAAwB;MAC5B,OAAO;QACN,GAAGH,KAAK;QACR,CAAEC,MAAM,CAACG,IAAI,GAAI;UAChB,GAAGJ,KAAK,CAAEC,MAAM,CAACG,IAAI,CAAE;UACvB,CAAEH,MAAM,CAACI,IAAI,GAAI,CAChB,GAAG,EAAAH,qBAAA,GACFF,KAAK,CAAEC,MAAM,CAACG,IAAI,CAAE,GAAIH,MAAM,CAACI,IAAI,CAAE,cAAAH,qBAAA,cAAAA,qBAAA,GAAI,EAAE,EAC1CI,MAAM,CACLC,OAAO,IAAMA,OAAO,CAACC,EAAE,KAAKP,MAAM,CAACQ,MAAM,CAACD,EAC7C,CAAC,EACDP,MAAM,CAACQ,MAAM;QAEf;MACD,CAAC;IACF,KAAK,0BAA0B;MAAE;QAAA,IAAAC,sBAAA;QAChC,OAAO;UACN,GAAGV,KAAK;UACR,CAAEC,MAAM,CAACG,IAAI,GAAI;YAChB,GAAGJ,KAAK,CAAEC,MAAM,CAACG,IAAI,CAAE;YACvB,CAAEH,MAAM,CAACI,IAAI,GAAI,EAAAK,sBAAA,GAChBV,KAAK,CAAEC,MAAM,CAACG,IAAI,CAAE,GAAIH,MAAM,CAACI,IAAI,CAAE,cAAAK,sBAAA,cAAAA,sBAAA,GAAI,EAAE,EAC1CJ,MAAM,CAAIC,OAAO,IAAMA,OAAO,CAACC,EAAE,KAAKP,MAAM,CAACU,QAAS;UACzD;QACD,CAAC;MACF;EACD;EAEA,OAAOX,KAAK;AACb;AAEA,eAAeF,eAAe,CAAE;EAC/BC;AACD,CAAE,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/editor/src/dataviews/types.ts"],"sourcesContent":["type PostStatus =\n\t| 'published'\n\t| 'draft'\n\t| 'pending'\n\t| 'private'\n\t| 'future'\n\t| 'auto-draft'\n\t| 'trash';\n\nexport interface BasePost {\n\tstatus?: PostStatus;\n\ttitle: string | { rendered: string } | { raw: string };\n\ttype: string;\n\tid: string | number;\n}\nexport interface TemplateOrTemplatePart extends BasePost {\n\ttype: 'wp_template' | 'wp_template_part';\n\tsource: string;\n\thas_theme_file: boolean;\n\tid: string;\n}\n\nexport interface Pattern extends BasePost {\n\tslug: string;\n\ttitle: { raw: string };\n\tcontent: { raw: string } | string;\n\twp_pattern_sync_status: string;\n}\n\nexport type Post = TemplateOrTemplatePart | Pattern | BasePost;\n\n// Will be unnecessary after typescript 5.0 upgrade.\nexport type CoreDataError = { message?: string; code?: string };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -13,6 +13,8 @@ import { store as blocksStore } from '@wordpress/blocks';
|
|
|
13
13
|
*/
|
|
14
14
|
import { store as editorStore } from '../store';
|
|
15
15
|
import { unlock } from '../lock-unlock';
|
|
16
|
+
|
|
17
|
+
/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */
|
|
16
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
19
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -39,11 +41,11 @@ const withPatternOverrideControls = createHigherOrderComponent(BlockEdit => prop
|
|
|
39
41
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
40
42
|
children: [/*#__PURE__*/_jsx(BlockEdit, {
|
|
41
43
|
...props
|
|
42
|
-
}), props.isSelected && isSupportedBlock && /*#__PURE__*/_jsx(ControlsWithStoreSubscription, {
|
|
44
|
+
}, "edit"), props.isSelected && isSupportedBlock && /*#__PURE__*/_jsx(ControlsWithStoreSubscription, {
|
|
43
45
|
...props
|
|
44
46
|
}), isSupportedBlock && /*#__PURE__*/_jsx(PatternOverridesBlockControls, {})]
|
|
45
47
|
});
|
|
46
|
-
});
|
|
48
|
+
}, 'withPatternOverrideControls');
|
|
47
49
|
|
|
48
50
|
// Split into a separate component to avoid a store subscription
|
|
49
51
|
// on every block.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["addFilter","privateApis","patternsPrivateApis","createHigherOrderComponent","useBlockEditingMode","useSelect","store","blocksStore","editorStore","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","PatternOverridesControls","ResetOverridesControl","PatternOverridesBlockControls","PATTERN_TYPES","PARTIAL_SYNCING_SUPPORTED_BLOCKS","PATTERN_SYNC_TYPES","withPatternOverrideControls","BlockEdit","props","isSupportedBlock","name","children","isSelected","ControlsWithStoreSubscription","blockEditingMode","hasPatternOverridesSource","isEditingSyncedPattern","select","getBlockBindingsSource","getCurrentPostType","getEditedPostAttribute","user","wp_pattern_sync_status","unsynced","bindings","attributes","metadata","hasPatternBindings","Object","values","some","binding","source","shouldShowPatternOverridesControls","shouldShowResetOverridesControl"],"sources":["@wordpress/editor/src/hooks/pattern-overrides.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useBlockEditingMode } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\nconst {\n\tPatternOverridesControls,\n\tResetOverridesControl,\n\tPatternOverridesBlockControls,\n\tPATTERN_TYPES,\n\tPARTIAL_SYNCING_SUPPORTED_BLOCKS,\n\tPATTERN_SYNC_TYPES,\n} = unlock( patternsPrivateApis );\n\n/**\n * Override the default edit UI to include a new block inspector control for\n * assigning a partial syncing controls to supported blocks in the pattern editor.\n * Currently, only the `core/paragraph` block is supported.\n *\n * @param {Component} BlockEdit Original component.\n *\n * @return {Component} Wrapped component.\n */\nconst withPatternOverrideControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isSupportedBlock =\n\t\t\t!! PARTIAL_SYNCING_SUPPORTED_BLOCKS[ props.name ];\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t{ props.isSelected && isSupportedBlock && (\n\t\t\t\t\t<ControlsWithStoreSubscription { ...props } />\n\t\t\t\t) }\n\t\t\t\t{ isSupportedBlock && <PatternOverridesBlockControls /> }\n\t\t\t</>\n\t\t);\n\t}\n);\n\n// Split into a separate component to avoid a store subscription\n// on every block.\nfunction ControlsWithStoreSubscription( props ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst { hasPatternOverridesSource, isEditingSyncedPattern } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockBindingsSource } = unlock( select( blocksStore ) );\n\t\t\tconst { getCurrentPostType, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\t// For editing link to the site editor if the theme and user permissions support it.\n\t\t\t\thasPatternOverridesSource: !! getBlockBindingsSource(\n\t\t\t\t\t'core/pattern-overrides'\n\t\t\t\t),\n\t\t\t\tisEditingSyncedPattern:\n\t\t\t\t\tgetCurrentPostType() === PATTERN_TYPES.user &&\n\t\t\t\t\tgetEditedPostAttribute( 'meta' )?.wp_pattern_sync_status !==\n\t\t\t\t\t\tPATTERN_SYNC_TYPES.unsynced &&\n\t\t\t\t\tgetEditedPostAttribute( 'wp_pattern_sync_status' ) !==\n\t\t\t\t\t\tPATTERN_SYNC_TYPES.unsynced,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst bindings = props.attributes.metadata?.bindings;\n\tconst hasPatternBindings =\n\t\t!! bindings &&\n\t\tObject.values( bindings ).some(\n\t\t\t( binding ) => binding.source === 'core/pattern-overrides'\n\t\t);\n\n\tconst shouldShowPatternOverridesControls =\n\t\tisEditingSyncedPattern && blockEditingMode === 'default';\n\tconst shouldShowResetOverridesControl =\n\t\t! isEditingSyncedPattern &&\n\t\t!! props.attributes.metadata?.name &&\n\t\tblockEditingMode !== 'disabled' &&\n\t\thasPatternBindings;\n\n\tif ( ! hasPatternOverridesSource ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ shouldShowPatternOverridesControls && (\n\t\t\t\t<PatternOverridesControls { ...props } />\n\t\t\t) }\n\t\t\t{ shouldShowResetOverridesControl && (\n\t\t\t\t<ResetOverridesControl { ...props } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/with-pattern-override-controls',\n\twithPatternOverrideControls\n);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,WAAW,IAAIC,mBAAmB,QAAQ,qBAAqB;AACxE,SAASC,0BAA0B,QAAQ,oBAAoB;AAC/D,SAASC,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,SAASD,KAAK,IAAIE,WAAW,QAAQ,UAAU;AAC/C,SAASC,MAAM,QAAQ,gBAAgB;
|
|
1
|
+
{"version":3,"names":["addFilter","privateApis","patternsPrivateApis","createHigherOrderComponent","useBlockEditingMode","useSelect","store","blocksStore","editorStore","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","PatternOverridesControls","ResetOverridesControl","PatternOverridesBlockControls","PATTERN_TYPES","PARTIAL_SYNCING_SUPPORTED_BLOCKS","PATTERN_SYNC_TYPES","withPatternOverrideControls","BlockEdit","props","isSupportedBlock","name","children","isSelected","ControlsWithStoreSubscription","blockEditingMode","hasPatternOverridesSource","isEditingSyncedPattern","select","getBlockBindingsSource","getCurrentPostType","getEditedPostAttribute","user","wp_pattern_sync_status","unsynced","bindings","attributes","metadata","hasPatternBindings","Object","values","some","binding","source","shouldShowPatternOverridesControls","shouldShowResetOverridesControl"],"sources":["@wordpress/editor/src/hooks/pattern-overrides.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useBlockEditingMode } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\n/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */\n\nconst {\n\tPatternOverridesControls,\n\tResetOverridesControl,\n\tPatternOverridesBlockControls,\n\tPATTERN_TYPES,\n\tPARTIAL_SYNCING_SUPPORTED_BLOCKS,\n\tPATTERN_SYNC_TYPES,\n} = unlock( patternsPrivateApis );\n\n/**\n * Override the default edit UI to include a new block inspector control for\n * assigning a partial syncing controls to supported blocks in the pattern editor.\n * Currently, only the `core/paragraph` block is supported.\n *\n * @param {Component} BlockEdit Original component.\n *\n * @return {Component} Wrapped component.\n */\nconst withPatternOverrideControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isSupportedBlock =\n\t\t\t!! PARTIAL_SYNCING_SUPPORTED_BLOCKS[ props.name ];\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t\t{ props.isSelected && isSupportedBlock && (\n\t\t\t\t\t<ControlsWithStoreSubscription { ...props } />\n\t\t\t\t) }\n\t\t\t\t{ isSupportedBlock && <PatternOverridesBlockControls /> }\n\t\t\t</>\n\t\t);\n\t},\n\t'withPatternOverrideControls'\n);\n\n// Split into a separate component to avoid a store subscription\n// on every block.\nfunction ControlsWithStoreSubscription( props ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst { hasPatternOverridesSource, isEditingSyncedPattern } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockBindingsSource } = unlock( select( blocksStore ) );\n\t\t\tconst { getCurrentPostType, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\t// For editing link to the site editor if the theme and user permissions support it.\n\t\t\t\thasPatternOverridesSource: !! getBlockBindingsSource(\n\t\t\t\t\t'core/pattern-overrides'\n\t\t\t\t),\n\t\t\t\tisEditingSyncedPattern:\n\t\t\t\t\tgetCurrentPostType() === PATTERN_TYPES.user &&\n\t\t\t\t\tgetEditedPostAttribute( 'meta' )?.wp_pattern_sync_status !==\n\t\t\t\t\t\tPATTERN_SYNC_TYPES.unsynced &&\n\t\t\t\t\tgetEditedPostAttribute( 'wp_pattern_sync_status' ) !==\n\t\t\t\t\t\tPATTERN_SYNC_TYPES.unsynced,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst bindings = props.attributes.metadata?.bindings;\n\tconst hasPatternBindings =\n\t\t!! bindings &&\n\t\tObject.values( bindings ).some(\n\t\t\t( binding ) => binding.source === 'core/pattern-overrides'\n\t\t);\n\n\tconst shouldShowPatternOverridesControls =\n\t\tisEditingSyncedPattern && blockEditingMode === 'default';\n\tconst shouldShowResetOverridesControl =\n\t\t! isEditingSyncedPattern &&\n\t\t!! props.attributes.metadata?.name &&\n\t\tblockEditingMode !== 'disabled' &&\n\t\thasPatternBindings;\n\n\tif ( ! hasPatternOverridesSource ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ shouldShowPatternOverridesControls && (\n\t\t\t\t<PatternOverridesControls { ...props } />\n\t\t\t) }\n\t\t\t{ shouldShowResetOverridesControl && (\n\t\t\t\t<ResetOverridesControl { ...props } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/with-pattern-override-controls',\n\twithPatternOverrideControls\n);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,WAAW,IAAIC,mBAAmB,QAAQ,qBAAqB;AACxE,SAASC,0BAA0B,QAAQ,oBAAoB;AAC/D,SAASC,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,SAASD,KAAK,IAAIE,WAAW,QAAQ,UAAU;AAC/C,SAASC,MAAM,QAAQ,gBAAgB;;AAEvC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEA,MAAM;EACLC,wBAAwB;EACxBC,qBAAqB;EACrBC,6BAA6B;EAC7BC,aAAa;EACbC,gCAAgC;EAChCC;AACD,CAAC,GAAGZ,MAAM,CAAEP,mBAAoB,CAAC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMoB,2BAA2B,GAAGnB,0BAA0B,CAC3DoB,SAAS,IAAQC,KAAK,IAAM;EAC7B,MAAMC,gBAAgB,GACrB,CAAC,C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C,OAAO,IAAMA,OAAO,CAACC,MAAM,KAAK,wBACnC,CAAC;EAEF,MAAMC,kCAAkC,GACvCjB,sBAAsB,IAAIF,gBAAgB,KAAK,SAAS;EACzD,MAAMoB,+BAA+B,GACpC,CAAElB,sBAAsB,IACxB,CAAC,CAAER,KAAK,CAACiB,UAAU,CAACC,QAAQ,EAAEhB,IAAI,IAClCI,gBAAgB,KAAK,UAAU,IAC/Ba,kBAAkB;EAEnB,IAAK,CAAEZ,yBAAyB,EAAG;IAClC,OAAO,IAAI;EACZ;EAEA,oBACChB,KAAA,CAAAF,SAAA;IAAAc,QAAA,GACGsB,kCAAkC,iBACnCtC,IAAA,CAACK,wBAAwB;MAAA,GAAMQ;IAAK,CAAI,CACxC,EACC0B,+BAA+B,iBAChCvC,IAAA,CAACM,qBAAqB;MAAA,GAAMO;IAAK,CAAI,CACrC;EAAA,CACA,CAAC;AAEL;AAEAxB,SAAS,CACR,kBAAkB,EAClB,4CAA4C,EAC5CsB,2BACD,CAAC","ignoreList":[]}
|
package/build-module/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["storeConfig","store","transformStyles"],"sources":["@wordpress/editor/src/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport './
|
|
1
|
+
{"version":3,"names":["storeConfig","store","transformStyles"],"sources":["@wordpress/editor/src/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport './hooks';\n\nexport { storeConfig, store } from './store';\nexport * from './components';\nexport * from './utils';\nexport * from './private-apis';\nexport * from './dataviews/api';\n\n/*\n * Backward compatibility\n */\nexport { transformStyles } from '@wordpress/block-editor';\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,SAAS;AAEhB,SAASA,WAAW,EAAEC,KAAK,QAAQ,SAAS;AAC5C,cAAc,cAAc;AAC5B,cAAc,SAAS;AACvB,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;;AAE/B;AACA;AACA;AACA,SAASC,eAAe,QAAQ,yBAAyB","ignoreList":[]}
|
|
@@ -20,6 +20,8 @@ import ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';
|
|
|
20
20
|
import ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';
|
|
21
21
|
import ResizableEditor from './components/resizable-editor';
|
|
22
22
|
import { mergeBaseAndUserConfigs, GlobalStylesProvider } from './components/global-styles-provider';
|
|
23
|
+
import registerDefaultActions from './dataviews/actions';
|
|
24
|
+
import { registerCoreBlockBindingsSources, bootstrapBlockBindingsSourcesFromServer } from './bindings/api';
|
|
23
25
|
const {
|
|
24
26
|
store: interfaceStore,
|
|
25
27
|
...remainingInterfaceApis
|
|
@@ -39,6 +41,9 @@ lock(privateApis, {
|
|
|
39
41
|
ToolsMoreMenuGroup,
|
|
40
42
|
ViewMoreMenuGroup,
|
|
41
43
|
ResizableEditor,
|
|
44
|
+
registerDefaultActions,
|
|
45
|
+
registerCoreBlockBindingsSources,
|
|
46
|
+
bootstrapBlockBindingsSourcesFromServer,
|
|
42
47
|
// This is a temporary private API while we're updating the site editor to use EditorProvider.
|
|
43
48
|
useBlockEditorSettings,
|
|
44
49
|
interfaceStore,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["interfaceApis","lock","EntitiesSavedStatesExtensible","EditorContentSlotFill","useBlockEditorSettings","BackButton","CreateTemplatePartModal","Editor","PluginPostExcerpt","PreferencesModal","usePostActions","ToolsMoreMenuGroup","ViewMoreMenuGroup","ResizableEditor","mergeBaseAndUserConfigs","GlobalStylesProvider","store","interfaceStore","remainingInterfaceApis","privateApis"],"sources":["@wordpress/editor/src/private-apis.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport * as interfaceApis from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { lock } from './lock-unlock';\nimport { EntitiesSavedStatesExtensible } from './components/entities-saved-states';\nimport EditorContentSlotFill from './components/editor-interface/content-slot-fill';\nimport useBlockEditorSettings from './components/provider/use-block-editor-settings';\nimport BackButton from './components/header/back-button';\nimport CreateTemplatePartModal from './components/create-template-part-modal';\nimport Editor from './components/editor';\nimport PluginPostExcerpt from './components/post-excerpt/plugin';\nimport PreferencesModal from './components/preferences-modal';\nimport { usePostActions } from './components/post-actions/actions';\nimport ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';\nimport ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';\nimport ResizableEditor from './components/resizable-editor';\nimport {\n\tmergeBaseAndUserConfigs,\n\tGlobalStylesProvider,\n} from './components/global-styles-provider';\n\nconst { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCreateTemplatePartModal,\n\tBackButton,\n\tEntitiesSavedStatesExtensible,\n\tEditor,\n\tEditorContentSlotFill,\n\tGlobalStylesProvider,\n\tmergeBaseAndUserConfigs,\n\tPluginPostExcerpt,\n\tPreferencesModal,\n\tusePostActions,\n\tToolsMoreMenuGroup,\n\tViewMoreMenuGroup,\n\tResizableEditor,\n\n\t// This is a temporary private API while we're updating the site editor to use EditorProvider.\n\tuseBlockEditorSettings,\n\tinterfaceStore,\n\t...remainingInterfaceApis,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,aAAa,MAAM,sBAAsB;;AAErD;AACA;AACA;AACA,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,6BAA6B,QAAQ,oCAAoC;AAClF,OAAOC,qBAAqB,MAAM,iDAAiD;AACnF,OAAOC,sBAAsB,MAAM,iDAAiD;AACpF,OAAOC,UAAU,MAAM,iCAAiC;AACxD,OAAOC,uBAAuB,MAAM,yCAAyC;AAC7E,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,iBAAiB,MAAM,kCAAkC;AAChE,OAAOC,gBAAgB,MAAM,gCAAgC;AAC7D,SAASC,cAAc,QAAQ,mCAAmC;AAClE,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,iBAAiB,MAAM,6CAA6C;AAC3E,OAAOC,eAAe,MAAM,+BAA+B;AAC3D,SACCC,uBAAuB,EACvBC,oBAAoB,QACd,qCAAqC;
|
|
1
|
+
{"version":3,"names":["interfaceApis","lock","EntitiesSavedStatesExtensible","EditorContentSlotFill","useBlockEditorSettings","BackButton","CreateTemplatePartModal","Editor","PluginPostExcerpt","PreferencesModal","usePostActions","ToolsMoreMenuGroup","ViewMoreMenuGroup","ResizableEditor","mergeBaseAndUserConfigs","GlobalStylesProvider","registerDefaultActions","registerCoreBlockBindingsSources","bootstrapBlockBindingsSourcesFromServer","store","interfaceStore","remainingInterfaceApis","privateApis"],"sources":["@wordpress/editor/src/private-apis.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport * as interfaceApis from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { lock } from './lock-unlock';\nimport { EntitiesSavedStatesExtensible } from './components/entities-saved-states';\nimport EditorContentSlotFill from './components/editor-interface/content-slot-fill';\nimport useBlockEditorSettings from './components/provider/use-block-editor-settings';\nimport BackButton from './components/header/back-button';\nimport CreateTemplatePartModal from './components/create-template-part-modal';\nimport Editor from './components/editor';\nimport PluginPostExcerpt from './components/post-excerpt/plugin';\nimport PreferencesModal from './components/preferences-modal';\nimport { usePostActions } from './components/post-actions/actions';\nimport ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';\nimport ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';\nimport ResizableEditor from './components/resizable-editor';\nimport {\n\tmergeBaseAndUserConfigs,\n\tGlobalStylesProvider,\n} from './components/global-styles-provider';\nimport registerDefaultActions from './dataviews/actions';\nimport {\n\tregisterCoreBlockBindingsSources,\n\tbootstrapBlockBindingsSourcesFromServer,\n} from './bindings/api';\n\nconst { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCreateTemplatePartModal,\n\tBackButton,\n\tEntitiesSavedStatesExtensible,\n\tEditor,\n\tEditorContentSlotFill,\n\tGlobalStylesProvider,\n\tmergeBaseAndUserConfigs,\n\tPluginPostExcerpt,\n\tPreferencesModal,\n\tusePostActions,\n\tToolsMoreMenuGroup,\n\tViewMoreMenuGroup,\n\tResizableEditor,\n\tregisterDefaultActions,\n\tregisterCoreBlockBindingsSources,\n\tbootstrapBlockBindingsSourcesFromServer,\n\n\t// This is a temporary private API while we're updating the site editor to use EditorProvider.\n\tuseBlockEditorSettings,\n\tinterfaceStore,\n\t...remainingInterfaceApis,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,aAAa,MAAM,sBAAsB;;AAErD;AACA;AACA;AACA,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,6BAA6B,QAAQ,oCAAoC;AAClF,OAAOC,qBAAqB,MAAM,iDAAiD;AACnF,OAAOC,sBAAsB,MAAM,iDAAiD;AACpF,OAAOC,UAAU,MAAM,iCAAiC;AACxD,OAAOC,uBAAuB,MAAM,yCAAyC;AAC7E,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,iBAAiB,MAAM,kCAAkC;AAChE,OAAOC,gBAAgB,MAAM,gCAAgC;AAC7D,SAASC,cAAc,QAAQ,mCAAmC;AAClE,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,iBAAiB,MAAM,6CAA6C;AAC3E,OAAOC,eAAe,MAAM,+BAA+B;AAC3D,SACCC,uBAAuB,EACvBC,oBAAoB,QACd,qCAAqC;AAC5C,OAAOC,sBAAsB,MAAM,qBAAqB;AACxD,SACCC,gCAAgC,EAChCC,uCAAuC,QACjC,gBAAgB;AAEvB,MAAM;EAAEC,KAAK,EAAEC,cAAc;EAAE,GAAGC;AAAuB,CAAC,GAAGrB,aAAa;AAE1E,OAAO,MAAMsB,WAAW,GAAG,CAAC,CAAC;AAC7BrB,IAAI,CAAEqB,WAAW,EAAE;EAClBhB,uBAAuB;EACvBD,UAAU;EACVH,6BAA6B;EAC7BK,MAAM;EACNJ,qBAAqB;EACrBY,oBAAoB;EACpBD,uBAAuB;EACvBN,iBAAiB;EACjBC,gBAAgB;EAChBC,cAAc;EACdC,kBAAkB;EAClBC,iBAAiB;EACjBC,eAAe;EACfG,sBAAsB;EACtBC,gCAAgC;EAChCC,uCAAuC;EAEvC;EACAd,sBAAsB;EACtBgB,cAAc;EACd,GAAGC;AACJ,CAAE,CAAC","ignoreList":[]}
|
|
@@ -12,7 +12,6 @@ import { EntitiesSavedStatesExtensible } from './components/entities-saved-state
|
|
|
12
12
|
import useBlockEditorSettings from './components/provider/use-block-editor-settings';
|
|
13
13
|
import PluginPostExcerpt from './components/post-excerpt/plugin';
|
|
14
14
|
import PreferencesModal from './components/preferences-modal';
|
|
15
|
-
import { usePostActions } from './components/post-actions/actions';
|
|
16
15
|
import ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';
|
|
17
16
|
import ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';
|
|
18
17
|
const {
|
|
@@ -25,7 +24,6 @@ lock(privateApis, {
|
|
|
25
24
|
EntitiesSavedStatesExtensible,
|
|
26
25
|
PluginPostExcerpt,
|
|
27
26
|
PreferencesModal,
|
|
28
|
-
usePostActions,
|
|
29
27
|
ToolsMoreMenuGroup,
|
|
30
28
|
ViewMoreMenuGroup,
|
|
31
29
|
// This is a temporary private API while we're updating the site editor to use EditorProvider.
|