@wordpress/editor 14.36.0 → 14.36.1-next.738bb1424.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/README.md +2 -3
- package/build/bindings/api.cjs +51 -0
- package/build/bindings/pattern-overrides.cjs +99 -0
- package/build/bindings/post-data.cjs +137 -0
- package/build/bindings/post-meta.cjs +129 -0
- package/build/bindings/term-data.cjs +159 -0
- package/build/components/autocompleters/index.cjs +41 -0
- package/build/components/autocompleters/user.cjs +79 -0
- package/build/components/autocompleters/user.cjs.map +7 -0
- package/build/components/autosave-monitor/index.cjs +117 -0
- package/build/components/block-removal-warnings/index.cjs +96 -0
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.cjs +55 -0
- package/build/components/block-visibility/index.cjs +125 -0
- package/build/components/blog-title/index.cjs +141 -0
- package/build/components/character-count/index.cjs +36 -0
- package/build/components/collab-sidebar/add-comment.cjs +122 -0
- package/build/components/collab-sidebar/comment-author-info.cjs +106 -0
- package/build/components/collab-sidebar/comment-form.cjs +111 -0
- package/build/components/collab-sidebar/comment-indicator-toolbar.cjs +100 -0
- package/build/components/collab-sidebar/comment-menu-item.cjs +78 -0
- package/build/components/collab-sidebar/comments.cjs +810 -0
- package/build/components/collab-sidebar/comments.cjs.map +7 -0
- package/build/components/collab-sidebar/constants.cjs +37 -0
- package/build/components/collab-sidebar/hooks.cjs +367 -0
- package/build/components/collab-sidebar/hooks.cjs.map +7 -0
- package/build/components/collab-sidebar/index.cjs +239 -0
- package/build/components/collab-sidebar/utils.cjs +112 -0
- package/build/components/collapsible-block-toolbar/index.cjs +87 -0
- package/build/components/commands/index.cjs +412 -0
- package/build/components/deprecated.cjs +345 -0
- package/build/components/document-bar/index.cjs +215 -0
- package/build/components/document-bar/index.cjs.map +7 -0
- package/build/components/document-bar/useEditedSectionDetails.cjs +95 -0
- package/build/components/document-bar/useEditedSectionDetails.cjs.map +7 -0
- package/build/components/document-outline/check.cjs +38 -0
- package/build/components/document-outline/index.cjs +217 -0
- package/build/components/document-outline/item.cjs +88 -0
- package/build/components/document-tools/index.cjs +177 -0
- package/build/components/editor/index.cjs +172 -0
- package/build/components/editor/index.cjs.map +7 -0
- package/build/components/editor-history/redo.cjs +57 -0
- package/build/components/editor-history/undo.cjs +56 -0
- package/build/components/editor-interface/index.cjs +193 -0
- package/build/components/editor-interface/index.cjs.map +7 -0
- package/build/components/editor-notices/index.cjs +80 -0
- package/build/components/editor-snackbars/index.cjs +47 -0
- package/build/components/entities-saved-states/entity-record-item.cjs +78 -0
- package/build/components/entities-saved-states/entity-record-item.cjs.map +7 -0
- package/build/components/entities-saved-states/entity-type-list.cjs +135 -0
- package/build/components/entities-saved-states/hooks/use-is-dirty.cjs +88 -0
- package/build/components/entities-saved-states/index.cjs +216 -0
- package/build/components/error-boundary/index.cjs +84 -0
- package/build/components/global-keyboard-shortcuts/index.cjs +106 -0
- package/build/components/global-keyboard-shortcuts/register-shortcuts.cjs +156 -0
- package/build/components/global-styles/block-link.cjs +72 -0
- package/build/components/global-styles/header.cjs +56 -0
- package/build/components/global-styles/hooks.cjs +178 -0
- package/build/components/global-styles/index.cjs +140 -0
- package/build/components/global-styles/menu.cjs +97 -0
- package/build/components/global-styles-provider/index.cjs +181 -0
- package/build/components/global-styles-renderer/index.cjs +57 -0
- package/build/components/global-styles-sidebar/default-sidebar.cjs +68 -0
- package/build/components/global-styles-sidebar/index.cjs +184 -0
- package/build/components/global-styles-sidebar/welcome-guide-image.cjs +39 -0
- package/build/components/global-styles-sidebar/welcome-guide.cjs +145 -0
- package/build/components/header/back-button.cjs +52 -0
- package/build/components/header/index.cjs +211 -0
- package/build/components/index.cjs +316 -0
- package/build/components/index.cjs.map +7 -0
- package/build/components/inserter-sidebar/index.cjs +108 -0
- package/build/components/keyboard-shortcut-help-modal/config.cjs +88 -0
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs +69 -0
- package/build/components/keyboard-shortcut-help-modal/index.cjs +187 -0
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +82 -0
- package/build/components/list-view-sidebar/index.cjs +140 -0
- package/build/components/list-view-sidebar/list-view-outline.cjs +62 -0
- package/build/components/local-autosave-monitor/index.cjs +170 -0
- package/build/components/media-categories/index.cjs +202 -0
- package/build/components/mode-switcher/index.cjs +93 -0
- package/build/components/more-menu/copy-content-menu-item.cjs +65 -0
- package/build/components/more-menu/index.cjs +190 -0
- package/build/components/more-menu/tools-more-menu-group.cjs +31 -0
- package/build/components/more-menu/view-more-menu-group.cjs +34 -0
- package/build/components/page-attributes/check.cjs +47 -0
- package/build/components/page-attributes/order.cjs +76 -0
- package/build/components/page-attributes/panel.cjs +60 -0
- package/build/components/page-attributes/parent.cjs +289 -0
- package/build/components/page-attributes/parent.cjs.map +7 -0
- package/build/components/pattern-duplicate-modal/index.cjs +77 -0
- package/build/components/pattern-overrides-panel/index.cjs +42 -0
- package/build/components/pattern-rename-modal/index.cjs +70 -0
- package/build/components/plugin-document-setting-panel/index.cjs +90 -0
- package/build/components/plugin-more-menu-item/index.cjs +42 -0
- package/build/components/plugin-post-publish-panel/index.cjs +51 -0
- package/build/components/plugin-post-status-info/index.cjs +32 -0
- package/build/components/plugin-pre-publish-panel/index.cjs +51 -0
- package/build/components/plugin-preview-menu-item/index.cjs +42 -0
- package/build/components/plugin-sidebar/index.cjs +39 -0
- package/build/components/plugin-sidebar-more-menu-item/index.cjs +38 -0
- package/build/components/post-actions/actions.cjs +156 -0
- package/build/components/post-actions/index.cjs +148 -0
- package/build/components/post-actions/set-as-homepage.cjs +162 -0
- package/build/components/post-actions/set-as-posts-page.cjs +155 -0
- package/build/components/post-author/check.cjs +53 -0
- package/build/components/post-author/combobox.cjs +59 -0
- package/build/components/post-author/combobox.cjs.map +7 -0
- package/build/components/post-author/constants.cjs +42 -0
- package/build/components/post-author/hook.cjs +87 -0
- package/build/components/post-author/index.cjs +54 -0
- package/build/components/post-author/panel.cjs +118 -0
- package/build/components/post-author/select.cjs +52 -0
- package/build/components/post-author/select.cjs.map +7 -0
- package/build/components/post-card-panel/index.cjs +142 -0
- package/build/components/post-card-panel/index.cjs.map +7 -0
- package/build/components/post-comments/index.cjs +68 -0
- package/build/components/post-content-information/index.cjs +81 -0
- package/build/components/post-discussion/panel.cjs +146 -0
- package/build/components/post-excerpt/check.cjs +42 -0
- package/build/components/post-excerpt/index.cjs +87 -0
- package/build/components/post-excerpt/index.cjs.map +7 -0
- package/build/components/post-excerpt/panel.cjs +200 -0
- package/build/components/post-excerpt/plugin.cjs +34 -0
- package/build/components/post-featured-image/check.cjs +43 -0
- package/build/components/post-featured-image/index.cjs +308 -0
- package/build/components/post-featured-image/panel.cjs +76 -0
- package/build/components/post-fields/index.cjs +49 -0
- package/build/components/post-format/check.cjs +50 -0
- package/build/components/post-format/index.cjs +126 -0
- package/build/components/post-format/panel.cjs +104 -0
- package/build/components/post-last-edited-panel/index.cjs +47 -0
- package/build/components/post-last-revision/check.cjs +54 -0
- package/build/components/post-last-revision/index.cjs +95 -0
- package/build/components/post-last-revision/panel.cjs +44 -0
- package/build/components/post-locked-modal/index.cjs +236 -0
- package/build/components/post-panel-row/index.cjs +54 -0
- package/build/components/post-panel-section/index.cjs +43 -0
- package/build/components/post-pending-status/check.cjs +47 -0
- package/build/components/post-pending-status/index.cjs +67 -0
- package/build/components/post-pending-status/index.cjs.map +7 -0
- package/build/components/post-pingbacks/index.cjs +59 -0
- package/build/components/post-pingbacks/index.cjs.map +7 -0
- package/build/components/post-preview-button/index.cjs +180 -0
- package/build/components/post-publish-button/index.cjs +209 -0
- package/build/components/post-publish-button/label.cjs +83 -0
- package/build/components/post-publish-button/post-publish-button-or-toggle.cjs +91 -0
- package/build/components/post-publish-panel/index.cjs +194 -0
- package/build/components/post-publish-panel/index.cjs.map +7 -0
- package/build/components/post-publish-panel/maybe-category-panel.cjs +93 -0
- package/build/components/post-publish-panel/maybe-post-format-panel.cjs +91 -0
- package/build/components/post-publish-panel/maybe-tags-panel.cjs +103 -0
- package/build/components/post-publish-panel/maybe-tags-panel.cjs.map +7 -0
- package/build/components/post-publish-panel/maybe-upload-media.cjs +220 -0
- package/build/components/post-publish-panel/media-util.cjs +72 -0
- package/build/components/post-publish-panel/postpublish.cjs +179 -0
- package/build/components/post-publish-panel/postpublish.cjs.map +7 -0
- package/build/components/post-publish-panel/prepublish.cjs +165 -0
- package/build/components/post-saved-state/index.cjs +156 -0
- package/build/components/post-schedule/check.cjs +37 -0
- package/build/components/post-schedule/index.cjs +109 -0
- package/build/components/post-schedule/label.cjs +118 -0
- package/build/components/post-schedule/panel.cjs +100 -0
- package/build/components/post-status/index.cjs +273 -0
- package/build/components/post-status/index.cjs.map +7 -0
- package/build/components/post-sticky/check.cjs +41 -0
- package/build/components/post-sticky/index.cjs +58 -0
- package/build/components/post-sticky/index.cjs.map +7 -0
- package/build/components/post-sticky/panel.cjs +49 -0
- package/build/components/post-switch-to-draft-button/index.cjs +102 -0
- package/build/components/post-sync-status/index.cjs +56 -0
- package/build/components/post-taxonomies/check.cjs +46 -0
- package/build/components/post-taxonomies/flat-term-selector.cjs +247 -0
- package/build/components/post-taxonomies/flat-term-selector.cjs.map +7 -0
- package/build/components/post-taxonomies/hierarchical-term-selector.cjs +374 -0
- package/build/components/post-taxonomies/hierarchical-term-selector.cjs.map +7 -0
- package/build/components/post-taxonomies/index.cjs +76 -0
- package/build/components/post-taxonomies/index.cjs.map +7 -0
- package/build/components/post-taxonomies/most-used-terms.cjs +86 -0
- package/build/components/post-taxonomies/panel.cjs +83 -0
- package/build/components/post-template/block-theme.cjs +198 -0
- package/build/components/post-template/classic-theme.cjs +223 -0
- package/build/components/post-template/classic-theme.cjs.map +7 -0
- package/build/components/post-template/create-new-template-modal.cjs +162 -0
- package/build/components/post-template/create-new-template-modal.cjs.map +7 -0
- package/build/components/post-template/create-new-template.cjs +79 -0
- package/build/components/post-template/hooks.cjs +111 -0
- package/build/components/post-template/panel.cjs +87 -0
- package/build/components/post-template/reset-default-template.cjs +57 -0
- package/build/components/post-template/swap-template-button.cjs +117 -0
- package/build/components/post-template/swap-template-button.cjs.map +7 -0
- package/build/components/post-text-editor/index.cjs +99 -0
- package/build/components/post-title/constants.cjs +34 -0
- package/build/components/post-title/index.cjs +180 -0
- package/build/components/post-title/post-title-raw.cjs +91 -0
- package/build/components/post-title/post-title-raw.cjs.map +7 -0
- package/build/components/post-title/use-post-title-focus.cjs +56 -0
- package/build/components/post-title/use-post-title.cjs +41 -0
- package/build/components/post-transform-panel/hooks.cjs +103 -0
- package/build/components/post-transform-panel/index.cjs +103 -0
- package/build/components/post-trash/check.cjs +51 -0
- package/build/components/post-trash/index.cjs +96 -0
- package/build/components/post-type-support-check/index.cjs +53 -0
- package/build/components/post-url/check.cjs +51 -0
- package/build/components/post-url/index.cjs +179 -0
- package/build/components/post-url/label.cjs +44 -0
- package/build/components/post-url/panel.cjs +134 -0
- package/build/components/post-view-link/index.cjs +62 -0
- package/build/components/post-visibility/check.cjs +34 -0
- package/build/components/post-visibility/index.cjs +98 -0
- package/build/components/post-visibility/index.cjs.map +7 -0
- package/build/components/post-visibility/label.cjs +44 -0
- package/build/components/post-visibility/utils.cjs +48 -0
- package/build/components/posts-per-page/index.cjs +127 -0
- package/build/components/preferences-modal/enable-panel.cjs +56 -0
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.cjs +45 -0
- package/build/components/preferences-modal/enable-publish-sidebar.cjs +46 -0
- package/build/components/preferences-modal/index.cjs +406 -0
- package/build/components/preview-dropdown/index.cjs +206 -0
- package/build/components/provider/disable-non-page-content-blocks.cjs +112 -0
- package/build/components/provider/index.cjs +312 -0
- package/build/components/provider/index.cjs.map +7 -0
- package/build/components/provider/navigation-block-editing-mode.cjs +45 -0
- package/build/components/provider/use-auto-switch-editor-sidebars.cjs +63 -0
- package/build/components/provider/use-block-editor-settings.cjs +353 -0
- package/build/components/provider/use-block-editor-settings.cjs.map +7 -0
- package/build/components/provider/use-hide-blocks-from-inserter.cjs +75 -0
- package/build/components/provider/use-post-content-blocks.cjs +55 -0
- package/build/components/provider/with-registry-provider.cjs +66 -0
- package/build/components/resizable-editor/index.cjs +111 -0
- package/build/components/resizable-editor/resize-handle.cjs +71 -0
- package/build/components/save-publish-panels/index.cjs +134 -0
- package/build/components/sidebar/constants.cjs +34 -0
- package/build/components/sidebar/header.cjs +65 -0
- package/build/components/sidebar/header.cjs.map +7 -0
- package/build/components/sidebar/index.cjs +180 -0
- package/build/components/sidebar/post-summary.cjs +119 -0
- package/build/components/site-discussion/index.cjs +144 -0
- package/build/components/start-page-options/index.cjs +177 -0
- package/build/components/start-page-options/index.cjs.map +7 -0
- package/build/components/start-template-options/index.cjs +209 -0
- package/build/components/style-book/categories.cjs +88 -0
- package/build/components/style-book/color-examples.cjs +66 -0
- package/build/components/style-book/constants.cjs +321 -0
- package/build/components/style-book/duotone-examples.cjs +70 -0
- package/build/components/style-book/examples.cjs +239 -0
- package/build/components/style-book/index.cjs +627 -0
- package/build/components/style-book/index.cjs.map +7 -0
- package/build/components/style-book/types.cjs +19 -0
- package/build/components/styles-canvas/index.cjs +140 -0
- package/build/components/styles-canvas/revisions.cjs +123 -0
- package/build/components/styles-canvas/style-book.cjs +70 -0
- package/build/components/table-of-contents/index.cjs +83 -0
- package/build/components/table-of-contents/panel.cjs +113 -0
- package/build/components/template-content-panel/index.cjs +84 -0
- package/build/components/template-part-content-panel/index.cjs +69 -0
- package/build/components/template-part-menu-items/convert-to-regular.cjs +52 -0
- package/build/components/template-part-menu-items/convert-to-template-part.cjs +89 -0
- package/build/components/template-part-menu-items/index.cjs +71 -0
- package/build/components/template-validation-notice/index.cjs +81 -0
- package/build/components/text-editor/index.cjs +82 -0
- package/build/components/theme-support-check/index.cjs +48 -0
- package/build/components/time-to-read/index.cjs +60 -0
- package/build/components/unsaved-changes-warning/index.cjs +49 -0
- package/build/components/visual-editor/edit-template-blocks-notification.cjs +91 -0
- package/build/components/visual-editor/index.cjs +421 -0
- package/build/components/visual-editor/use-edit-content-only-section-exit.cjs +64 -0
- package/build/components/visual-editor/use-padding-appender.cjs +75 -0
- package/build/components/visual-editor/use-select-nearest-editable-block.cjs +96 -0
- package/build/components/visual-editor/use-zoom-out-mode-exit.cjs +60 -0
- package/build/components/word-count/index.cjs +39 -0
- package/build/components/zoom-out-toggle/index.cjs +109 -0
- package/build/dataviews/api.cjs +71 -0
- package/build/dataviews/fields/content-preview/content-preview-view.cjs +95 -0
- package/build/dataviews/fields/content-preview/index.cjs +46 -0
- package/build/dataviews/store/private-actions.cjs +194 -0
- package/build/dataviews/store/private-actions.cjs.map +7 -0
- package/build/dataviews/store/private-selectors.cjs +44 -0
- package/build/dataviews/store/reducer.cjs +98 -0
- package/build/hooks/custom-sources-backwards-compatibility.cjs +79 -0
- package/build/hooks/default-autocompleters.cjs +15 -0
- package/build/hooks/index.cjs +11 -0
- package/build/hooks/media-upload.cjs +105 -0
- package/build/hooks/navigation-link-view-button.cjs +56 -0
- package/build/hooks/pattern-overrides.cjs +64 -0
- package/build/hooks/push-changes-to-global-styles/index.cjs +323 -0
- package/build/hooks/push-changes-to-global-styles/index.cjs.map +7 -0
- package/build/hooks/template-part-navigation-edit-button.cjs +90 -0
- package/build/hooks/use-global-styles-output.cjs +76 -0
- package/build/index.cjs +46 -0
- package/build/index.cjs.map +7 -0
- package/build/lock-unlock.cjs +37 -0
- package/build/private-apis.cjs +93 -0
- package/build/private-apis.cjs.map +7 -0
- package/build/store/actions.cjs +771 -0
- package/build/store/constants.cjs +83 -0
- package/build/store/defaults.cjs +39 -0
- package/build/store/index.cjs +61 -0
- package/build/store/local-autosave.cjs +53 -0
- package/build/store/private-actions.cjs +417 -0
- package/build/store/private-actions.cjs.map +7 -0
- package/build/store/private-selectors.cjs +231 -0
- package/build/store/reducer.cjs +313 -0
- package/build/store/selectors.cjs +1020 -0
- package/build/store/utils/is-template-revertable.cjs +33 -0
- package/build/store/utils/notice-builder.cjs +132 -0
- package/build/store/utils/notice-builder.cjs.map +7 -0
- package/build/utils/block-selection-path.cjs +106 -0
- package/build/utils/block-selection-path.cjs.map +7 -0
- package/build/utils/get-item-title.cjs +43 -0
- package/build/utils/get-template-info.cjs +53 -0
- package/build/utils/get-template-part-icon.cjs +46 -0
- package/build/utils/get-template-part-icon.cjs.map +7 -0
- package/build/utils/index.cjs +47 -0
- package/build/utils/media-sideload/index.cjs +30 -0
- package/build/utils/media-upload/index.cjs +104 -0
- package/build/utils/pageTypeBadge.cjs +49 -0
- package/build/utils/search-templates.cjs +75 -0
- package/build/utils/set-nested-value.cjs +45 -0
- package/build/utils/terms.cjs +84 -0
- package/build/utils/url.cjs +50 -0
- package/build-module/bindings/api.js +4 -4
- package/build-module/bindings/post-meta.js +2 -2
- package/build-module/components/autocompleters/index.js +1 -1
- package/build-module/components/autocompleters/user.js.map +2 -2
- package/build-module/components/autosave-monitor/index.js +1 -1
- package/build-module/components/block-removal-warnings/index.js +2 -2
- package/build-module/components/block-visibility/index.js +2 -2
- package/build-module/components/blog-title/index.js +3 -3
- package/build-module/components/character-count/index.js +1 -1
- package/build-module/components/collab-sidebar/add-comment.js +4 -4
- package/build-module/components/collab-sidebar/comment-author-info.js +1 -1
- package/build-module/components/collab-sidebar/comment-form.js +1 -1
- package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +2 -2
- package/build-module/components/collab-sidebar/comment-menu-item.js +1 -1
- package/build-module/components/collab-sidebar/comments.js +11 -19
- package/build-module/components/collab-sidebar/comments.js.map +2 -2
- package/build-module/components/collab-sidebar/hooks.js +18 -27
- package/build-module/components/collab-sidebar/hooks.js.map +2 -2
- package/build-module/components/collab-sidebar/index.js +11 -11
- package/build-module/components/collapsible-block-toolbar/index.js +1 -1
- package/build-module/components/commands/index.js +6 -6
- package/build-module/components/document-bar/index.js +26 -15
- package/build-module/components/document-bar/index.js.map +2 -2
- package/build-module/components/document-bar/useEditedSectionDetails.js +74 -0
- package/build-module/components/document-bar/useEditedSectionDetails.js.map +7 -0
- package/build-module/components/document-outline/index.js +2 -2
- package/build-module/components/document-tools/index.js +4 -4
- package/build-module/components/editor/index.js +33 -9
- package/build-module/components/editor/index.js.map +2 -2
- package/build-module/components/editor-history/redo.js +1 -1
- package/build-module/components/editor-history/undo.js +1 -1
- package/build-module/components/editor-interface/index.js +20 -18
- package/build-module/components/editor-interface/index.js.map +2 -2
- package/build-module/components/editor-notices/index.js +1 -1
- package/build-module/components/entities-saved-states/entity-record-item.js +3 -4
- package/build-module/components/entities-saved-states/entity-record-item.js.map +2 -2
- package/build-module/components/entities-saved-states/entity-type-list.js +1 -1
- package/build-module/components/entities-saved-states/index.js +4 -4
- package/build-module/components/error-boundary/index.js +1 -1
- package/build-module/components/global-keyboard-shortcuts/index.js +1 -1
- package/build-module/components/global-styles/hooks.js +1 -1
- package/build-module/components/global-styles/index.js +4 -4
- package/build-module/components/global-styles/menu.js +1 -1
- package/build-module/components/global-styles-provider/index.js +1 -1
- package/build-module/components/global-styles-renderer/index.js +2 -2
- package/build-module/components/global-styles-sidebar/index.js +6 -6
- package/build-module/components/global-styles-sidebar/welcome-guide.js +1 -1
- package/build-module/components/header/index.js +14 -14
- package/build-module/components/index.js +89 -89
- package/build-module/components/inserter-sidebar/index.js +2 -2
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +3 -3
- package/build-module/components/list-view-sidebar/index.js +3 -3
- package/build-module/components/list-view-sidebar/list-view-outline.js +4 -4
- package/build-module/components/local-autosave-monitor/index.js +3 -3
- package/build-module/components/mode-switcher/index.js +1 -1
- package/build-module/components/more-menu/copy-content-menu-item.js +1 -1
- package/build-module/components/more-menu/index.js +5 -5
- package/build-module/components/page-attributes/check.js +1 -1
- package/build-module/components/page-attributes/order.js +2 -2
- package/build-module/components/page-attributes/panel.js +3 -3
- package/build-module/components/page-attributes/parent.js +4 -4
- package/build-module/components/page-attributes/parent.js.map +2 -2
- package/build-module/components/pattern-duplicate-modal/index.js +3 -3
- package/build-module/components/pattern-overrides-panel/index.js +2 -2
- package/build-module/components/pattern-rename-modal/index.js +3 -3
- package/build-module/components/plugin-document-setting-panel/index.js +2 -2
- package/build-module/components/post-actions/actions.js +4 -4
- package/build-module/components/post-actions/index.js +2 -2
- package/build-module/components/post-actions/set-as-homepage.js +1 -1
- package/build-module/components/post-actions/set-as-posts-page.js +1 -1
- package/build-module/components/post-author/check.js +2 -2
- package/build-module/components/post-author/combobox.js +2 -3
- package/build-module/components/post-author/combobox.js.map +2 -2
- package/build-module/components/post-author/hook.js +2 -2
- package/build-module/components/post-author/index.js +3 -3
- package/build-module/components/post-author/panel.js +5 -5
- package/build-module/components/post-author/select.js +2 -3
- package/build-module/components/post-author/select.js.map +2 -2
- package/build-module/components/post-card-panel/index.js +7 -7
- package/build-module/components/post-card-panel/index.js.map +2 -2
- package/build-module/components/post-comments/index.js +1 -1
- package/build-module/components/post-content-information/index.js +2 -2
- package/build-module/components/post-discussion/panel.js +5 -5
- package/build-module/components/post-excerpt/check.js +1 -1
- package/build-module/components/post-excerpt/index.js +1 -2
- package/build-module/components/post-excerpt/index.js.map +2 -2
- package/build-module/components/post-excerpt/panel.js +6 -6
- package/build-module/components/post-featured-image/check.js +2 -2
- package/build-module/components/post-featured-image/index.js +2 -2
- package/build-module/components/post-featured-image/panel.js +3 -3
- package/build-module/components/post-fields/index.js +2 -2
- package/build-module/components/post-format/check.js +2 -2
- package/build-module/components/post-format/index.js +2 -2
- package/build-module/components/post-format/panel.js +4 -4
- package/build-module/components/post-last-edited-panel/index.js +1 -1
- package/build-module/components/post-last-revision/check.js +2 -2
- package/build-module/components/post-last-revision/index.js +3 -3
- package/build-module/components/post-last-revision/panel.js +2 -2
- package/build-module/components/post-locked-modal/index.js +1 -1
- package/build-module/components/post-pending-status/check.js +1 -1
- package/build-module/components/post-pending-status/index.js +2 -3
- package/build-module/components/post-pending-status/index.js.map +2 -2
- package/build-module/components/post-pingbacks/index.js +1 -2
- package/build-module/components/post-pingbacks/index.js.map +2 -2
- package/build-module/components/post-preview-button/index.js +1 -1
- package/build-module/components/post-publish-button/index.js +2 -2
- package/build-module/components/post-publish-button/label.js +1 -1
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
- package/build-module/components/post-publish-panel/index.js +4 -5
- package/build-module/components/post-publish-panel/index.js.map +2 -2
- package/build-module/components/post-publish-panel/maybe-category-panel.js +2 -2
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js +2 -2
- package/build-module/components/post-publish-panel/maybe-tags-panel.js +3 -3
- package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +2 -2
- package/build-module/components/post-publish-panel/maybe-upload-media.js +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +2 -3
- package/build-module/components/post-publish-panel/postpublish.js.map +2 -2
- package/build-module/components/post-publish-panel/prepublish.js +9 -9
- package/build-module/components/post-saved-state/index.js +2 -2
- package/build-module/components/post-schedule/check.js +1 -1
- package/build-module/components/post-schedule/index.js +2 -2
- package/build-module/components/post-schedule/label.js +1 -1
- package/build-module/components/post-schedule/panel.js +6 -6
- package/build-module/components/post-status/index.js +5 -7
- package/build-module/components/post-status/index.js.map +2 -2
- package/build-module/components/post-sticky/check.js +1 -1
- package/build-module/components/post-sticky/index.js +3 -4
- package/build-module/components/post-sticky/index.js.map +2 -2
- package/build-module/components/post-sticky/panel.js +3 -3
- package/build-module/components/post-switch-to-draft-button/index.js +1 -1
- package/build-module/components/post-sync-status/index.js +2 -2
- package/build-module/components/post-taxonomies/check.js +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +7 -20
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +2 -2
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +3 -7
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +2 -2
- package/build-module/components/post-taxonomies/index.js +4 -8
- package/build-module/components/post-taxonomies/index.js.map +2 -2
- package/build-module/components/post-taxonomies/most-used-terms.js +1 -1
- package/build-module/components/post-taxonomies/panel.js +3 -3
- package/build-module/components/post-template/block-theme.js +6 -6
- package/build-module/components/post-template/classic-theme.js +4 -5
- package/build-module/components/post-template/classic-theme.js.map +2 -2
- package/build-module/components/post-template/create-new-template-modal.js +2 -3
- package/build-module/components/post-template/create-new-template-modal.js.map +2 -2
- package/build-module/components/post-template/create-new-template.js +2 -2
- package/build-module/components/post-template/hooks.js +1 -1
- package/build-module/components/post-template/panel.js +3 -3
- package/build-module/components/post-template/reset-default-template.js +1 -1
- package/build-module/components/post-template/swap-template-button.js +2 -3
- package/build-module/components/post-template/swap-template-button.js.map +2 -2
- package/build-module/components/post-text-editor/index.js +1 -1
- package/build-module/components/post-title/index.js +5 -5
- package/build-module/components/post-title/post-title-raw.js +4 -5
- package/build-module/components/post-title/post-title-raw.js.map +2 -2
- package/build-module/components/post-title/use-post-title-focus.js +1 -1
- package/build-module/components/post-title/use-post-title.js +1 -1
- package/build-module/components/post-transform-panel/hooks.js +2 -2
- package/build-module/components/post-transform-panel/index.js +3 -3
- package/build-module/components/post-trash/check.js +2 -2
- package/build-module/components/post-trash/index.js +2 -2
- package/build-module/components/post-type-support-check/index.js +1 -1
- package/build-module/components/post-url/check.js +1 -1
- package/build-module/components/post-url/index.js +1 -1
- package/build-module/components/post-url/label.js +1 -1
- package/build-module/components/post-url/panel.js +4 -4
- package/build-module/components/post-view-link/index.js +1 -1
- package/build-module/components/post-visibility/check.js +1 -1
- package/build-module/components/post-visibility/index.js +2 -3
- package/build-module/components/post-visibility/index.js.map +2 -2
- package/build-module/components/post-visibility/label.js +2 -2
- package/build-module/components/posts-per-page/index.js +3 -3
- package/build-module/components/preferences-modal/enable-panel.js +2 -2
- package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +1 -1
- package/build-module/components/preferences-modal/enable-publish-sidebar.js +2 -2
- package/build-module/components/preferences-modal/index.js +11 -11
- package/build-module/components/preview-dropdown/index.js +3 -3
- package/build-module/components/provider/disable-non-page-content-blocks.js +1 -1
- package/build-module/components/provider/index.js +17 -16
- package/build-module/components/provider/index.js.map +2 -2
- package/build-module/components/provider/use-block-editor-settings.js +34 -10
- package/build-module/components/provider/use-block-editor-settings.js.map +2 -2
- package/build-module/components/provider/use-post-content-blocks.js +2 -2
- package/build-module/components/provider/with-registry-provider.js +1 -1
- package/build-module/components/resizable-editor/index.js +1 -1
- package/build-module/components/save-publish-panels/index.js +5 -5
- package/build-module/components/sidebar/header.js +12 -12
- package/build-module/components/sidebar/header.js.map +2 -2
- package/build-module/components/sidebar/index.js +14 -14
- package/build-module/components/sidebar/post-summary.js +22 -22
- package/build-module/components/site-discussion/index.js +3 -3
- package/build-module/components/start-page-options/index.js +7 -4
- package/build-module/components/start-page-options/index.js.map +2 -2
- package/build-module/components/start-template-options/index.js +2 -2
- package/build-module/components/style-book/categories.js +1 -1
- package/build-module/components/style-book/examples.js +3 -3
- package/build-module/components/style-book/index.js +12 -14
- package/build-module/components/style-book/index.js.map +2 -2
- package/build-module/components/styles-canvas/index.js +5 -5
- package/build-module/components/styles-canvas/revisions.js +3 -3
- package/build-module/components/styles-canvas/style-book.js +2 -2
- package/build-module/components/table-of-contents/index.js +1 -1
- package/build-module/components/table-of-contents/panel.js +4 -4
- package/build-module/components/template-content-panel/index.js +3 -3
- package/build-module/components/template-part-content-panel/index.js +3 -3
- package/build-module/components/template-part-menu-items/index.js +2 -2
- package/build-module/components/text-editor/index.js +3 -3
- package/build-module/components/theme-support-check/index.js +1 -1
- package/build-module/components/time-to-read/index.js +1 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js +1 -1
- package/build-module/components/visual-editor/index.js +10 -10
- package/build-module/components/visual-editor/use-edit-content-only-section-exit.js +1 -1
- package/build-module/components/visual-editor/use-select-nearest-editable-block.js +1 -1
- package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +1 -1
- package/build-module/components/word-count/index.js +1 -1
- package/build-module/components/zoom-out-toggle/index.js +1 -1
- package/build-module/dataviews/api.js +2 -2
- package/build-module/dataviews/fields/content-preview/content-preview-view.js +4 -4
- package/build-module/dataviews/fields/content-preview/index.js +1 -1
- package/build-module/dataviews/store/private-actions.js +15 -6
- package/build-module/dataviews/store/private-actions.js.map +2 -2
- package/build-module/hooks/custom-sources-backwards-compatibility.js +1 -1
- package/build-module/hooks/default-autocompleters.js +1 -1
- package/build-module/hooks/index.js +7 -7
- package/build-module/hooks/media-upload.js +1 -1
- package/build-module/hooks/pattern-overrides.js +2 -2
- package/build-module/hooks/push-changes-to-global-styles/index.js +3 -4
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +2 -2
- package/build-module/hooks/use-global-styles-output.js +2 -2
- package/build-module/index.js +6 -6
- package/build-module/private-apis.js +25 -18
- package/build-module/private-apis.js.map +2 -2
- package/build-module/store/actions.js +3 -3
- package/build-module/store/index.js +7 -7
- package/build-module/store/private-actions.js +2 -2
- package/build-module/store/private-selectors.js +3 -3
- package/build-module/store/reducer.js +2 -2
- package/build-module/store/selectors.js +5 -5
- package/build-module/store/utils/is-template-revertable.js +1 -1
- package/build-module/store/utils/notice-builder.js +12 -4
- package/build-module/store/utils/notice-builder.js.map +2 -2
- package/build-module/utils/block-selection-path.js +80 -0
- package/build-module/utils/block-selection-path.js.map +7 -0
- package/build-module/utils/get-template-info.js +1 -1
- package/build-module/utils/get-template-part-icon.js +10 -4
- package/build-module/utils/get-template-part-icon.js.map +2 -2
- package/build-module/utils/index.js +2 -2
- package/build-module/utils/media-sideload/index.js +1 -1
- package/build-module/utils/media-upload/index.js +1 -1
- package/build-style/style-rtl.css +144 -211
- package/build-style/style.css +144 -211
- package/build-types/components/autocompleters/user.d.ts +8 -2
- package/build-types/components/autocompleters/user.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/hooks.d.ts +0 -1
- package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
- package/build-types/components/document-bar/index.d.ts.map +1 -1
- package/build-types/components/document-bar/useEditedSectionDetails.d.ts +8 -0
- package/build-types/components/document-bar/useEditedSectionDetails.d.ts.map +1 -0
- package/build-types/components/editor/index.d.ts +2 -1
- package/build-types/components/editor/index.d.ts.map +1 -1
- package/build-types/components/editor-interface/index.d.ts.map +1 -1
- package/build-types/components/entities-saved-states/entity-record-item.d.ts.map +1 -1
- package/build-types/components/post-author/combobox.d.ts.map +1 -1
- package/build-types/components/post-author/select.d.ts.map +1 -1
- package/build-types/components/post-excerpt/index.d.ts.map +1 -1
- package/build-types/components/post-pending-status/index.d.ts.map +1 -1
- package/build-types/components/post-pingbacks/index.d.ts.map +1 -1
- package/build-types/components/post-publish-panel/index.d.ts.map +1 -1
- package/build-types/components/post-publish-panel/postpublish.d.ts.map +1 -1
- package/build-types/components/post-status/index.d.ts.map +1 -1
- package/build-types/components/post-sticky/index.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/flat-term-selector.d.ts +3 -5
- package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/index.d.ts.map +1 -1
- package/build-types/components/post-template/classic-theme.d.ts.map +1 -1
- package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -1
- package/build-types/components/post-template/hooks.d.ts +1 -1
- package/build-types/components/post-template/hooks.d.ts.map +1 -1
- package/build-types/components/post-visibility/index.d.ts.map +1 -1
- package/build-types/components/provider/index.d.ts.map +1 -1
- package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -1
- package/build-types/components/start-page-options/index.d.ts.map +1 -1
- package/build-types/components/style-book/index.d.ts.map +1 -1
- package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
- package/build-types/dataviews/store/private-selectors.d.ts +2 -2
- package/build-types/dataviews/store/private-selectors.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/store/index.d.ts +1 -1
- package/build-types/store/index.d.ts.map +1 -1
- package/build-types/store/private-selectors.d.ts +2 -2
- package/build-types/store/private-selectors.d.ts.map +1 -1
- package/build-types/store/reducer.d.ts +4 -4
- package/build-types/store/utils/notice-builder.d.ts.map +1 -1
- package/build-types/utils/block-selection-path.d.ts +16 -0
- package/build-types/utils/block-selection-path.d.ts.map +1 -0
- package/build-types/utils/get-template-part-icon.d.ts +3 -3
- package/build-types/utils/get-template-part-icon.d.ts.map +1 -1
- package/package.json +53 -44
- package/src/components/autocompleters/user.js +6 -0
- package/src/components/collab-sidebar/comments.js +16 -23
- package/src/components/collab-sidebar/hooks.js +16 -27
- package/src/components/document-bar/index.js +41 -9
- package/src/components/document-bar/useEditedSectionDetails.js +103 -0
- package/src/components/document-outline/style.scss +0 -2
- package/src/components/editor/index.js +31 -1
- package/src/components/editor-interface/index.js +11 -7
- package/src/components/entities-saved-states/entity-record-item.js +0 -1
- package/src/components/global-styles-sidebar/style.scss +0 -4
- package/src/components/list-view-sidebar/style.scss +7 -1
- package/src/components/page-attributes/parent.js +2 -2
- package/src/components/post-author/combobox.js +0 -1
- package/src/components/post-author/select.js +0 -1
- package/src/components/post-card-panel/index.js +1 -1
- package/src/components/post-excerpt/index.js +0 -1
- package/src/components/post-pending-status/index.js +0 -1
- package/src/components/post-pingbacks/index.js +0 -1
- package/src/components/post-publish-panel/index.js +0 -1
- package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
- package/src/components/post-publish-panel/postpublish.js +0 -1
- package/src/components/post-status/index.js +0 -2
- package/src/components/post-sticky/index.js +0 -1
- package/src/components/post-taxonomies/flat-term-selector.js +6 -27
- package/src/components/post-taxonomies/hierarchical-term-selector.js +0 -4
- package/src/components/post-taxonomies/index.js +1 -7
- package/src/components/post-template/classic-theme.js +0 -1
- package/src/components/post-template/create-new-template-modal.js +0 -1
- package/src/components/post-template/swap-template-button.js +0 -1
- package/src/components/post-title/post-title-raw.js +0 -1
- package/src/components/post-visibility/index.js +0 -1
- package/src/components/provider/index.js +2 -0
- package/src/components/provider/use-block-editor-settings.js +39 -3
- package/src/components/sidebar/header.js +9 -8
- package/src/components/start-page-options/index.js +7 -3
- package/src/components/style-book/index.js +3 -5
- package/src/dataviews/store/private-actions.ts +16 -0
- package/src/hooks/push-changes-to-global-styles/index.js +0 -1
- package/src/private-apis.js +7 -0
- package/src/store/utils/notice-builder.js +12 -4
- package/src/utils/block-selection-path.js +127 -0
- package/src/utils/get-template-part-icon.js +19 -6
- package/build/bindings/api.js +0 -51
- package/build/bindings/pattern-overrides.js +0 -99
- package/build/bindings/post-data.js +0 -137
- package/build/bindings/post-meta.js +0 -129
- package/build/bindings/term-data.js +0 -159
- package/build/components/autocompleters/index.js +0 -41
- package/build/components/autocompleters/user.js +0 -79
- package/build/components/autocompleters/user.js.map +0 -7
- package/build/components/autosave-monitor/index.js +0 -117
- package/build/components/block-removal-warnings/index.js +0 -96
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -55
- package/build/components/block-visibility/index.js +0 -125
- package/build/components/blog-title/index.js +0 -141
- package/build/components/character-count/index.js +0 -36
- package/build/components/collab-sidebar/add-comment.js +0 -122
- package/build/components/collab-sidebar/comment-author-info.js +0 -106
- package/build/components/collab-sidebar/comment-form.js +0 -111
- package/build/components/collab-sidebar/comment-indicator-toolbar.js +0 -100
- package/build/components/collab-sidebar/comment-menu-item.js +0 -78
- package/build/components/collab-sidebar/comments.js +0 -818
- package/build/components/collab-sidebar/comments.js.map +0 -7
- package/build/components/collab-sidebar/constants.js +0 -37
- package/build/components/collab-sidebar/hooks.js +0 -375
- package/build/components/collab-sidebar/hooks.js.map +0 -7
- package/build/components/collab-sidebar/index.js +0 -239
- package/build/components/collab-sidebar/utils.js +0 -112
- package/build/components/collapsible-block-toolbar/index.js +0 -87
- package/build/components/commands/index.js +0 -412
- package/build/components/deprecated.js +0 -345
- package/build/components/document-bar/index.js +0 -204
- package/build/components/document-bar/index.js.map +0 -7
- package/build/components/document-outline/check.js +0 -38
- package/build/components/document-outline/index.js +0 -217
- package/build/components/document-outline/item.js +0 -88
- package/build/components/document-tools/index.js +0 -177
- package/build/components/editor/index.js +0 -148
- package/build/components/editor/index.js.map +0 -7
- package/build/components/editor-history/redo.js +0 -57
- package/build/components/editor-history/undo.js +0 -56
- package/build/components/editor-interface/index.js +0 -191
- package/build/components/editor-interface/index.js.map +0 -7
- package/build/components/editor-notices/index.js +0 -80
- package/build/components/editor-snackbars/index.js +0 -47
- package/build/components/entities-saved-states/entity-record-item.js +0 -79
- package/build/components/entities-saved-states/entity-record-item.js.map +0 -7
- package/build/components/entities-saved-states/entity-type-list.js +0 -135
- package/build/components/entities-saved-states/hooks/use-is-dirty.js +0 -88
- package/build/components/entities-saved-states/index.js +0 -216
- package/build/components/error-boundary/index.js +0 -84
- package/build/components/global-keyboard-shortcuts/index.js +0 -106
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js +0 -156
- package/build/components/global-styles/block-link.js +0 -72
- package/build/components/global-styles/header.js +0 -56
- package/build/components/global-styles/hooks.js +0 -178
- package/build/components/global-styles/index.js +0 -140
- package/build/components/global-styles/menu.js +0 -97
- package/build/components/global-styles-provider/index.js +0 -181
- package/build/components/global-styles-renderer/index.js +0 -57
- package/build/components/global-styles-sidebar/default-sidebar.js +0 -68
- package/build/components/global-styles-sidebar/index.js +0 -184
- package/build/components/global-styles-sidebar/welcome-guide-image.js +0 -39
- package/build/components/global-styles-sidebar/welcome-guide.js +0 -145
- package/build/components/header/back-button.js +0 -52
- package/build/components/header/index.js +0 -211
- package/build/components/index.js +0 -316
- package/build/components/index.js.map +0 -7
- package/build/components/inserter-sidebar/index.js +0 -108
- package/build/components/keyboard-shortcut-help-modal/config.js +0 -88
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -69
- package/build/components/keyboard-shortcut-help-modal/index.js +0 -187
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -82
- package/build/components/list-view-sidebar/index.js +0 -140
- package/build/components/list-view-sidebar/list-view-outline.js +0 -62
- package/build/components/local-autosave-monitor/index.js +0 -170
- package/build/components/media-categories/index.js +0 -202
- package/build/components/mode-switcher/index.js +0 -93
- package/build/components/more-menu/copy-content-menu-item.js +0 -65
- package/build/components/more-menu/index.js +0 -190
- package/build/components/more-menu/tools-more-menu-group.js +0 -31
- package/build/components/more-menu/view-more-menu-group.js +0 -34
- package/build/components/page-attributes/check.js +0 -47
- package/build/components/page-attributes/order.js +0 -76
- package/build/components/page-attributes/panel.js +0 -60
- package/build/components/page-attributes/parent.js +0 -289
- package/build/components/page-attributes/parent.js.map +0 -7
- package/build/components/pattern-duplicate-modal/index.js +0 -77
- package/build/components/pattern-overrides-panel/index.js +0 -42
- package/build/components/pattern-rename-modal/index.js +0 -70
- package/build/components/plugin-document-setting-panel/index.js +0 -90
- package/build/components/plugin-more-menu-item/index.js +0 -42
- package/build/components/plugin-post-publish-panel/index.js +0 -51
- package/build/components/plugin-post-status-info/index.js +0 -32
- package/build/components/plugin-pre-publish-panel/index.js +0 -51
- package/build/components/plugin-preview-menu-item/index.js +0 -42
- package/build/components/plugin-sidebar/index.js +0 -39
- package/build/components/plugin-sidebar-more-menu-item/index.js +0 -38
- package/build/components/post-actions/actions.js +0 -156
- package/build/components/post-actions/index.js +0 -148
- package/build/components/post-actions/set-as-homepage.js +0 -162
- package/build/components/post-actions/set-as-posts-page.js +0 -155
- package/build/components/post-author/check.js +0 -53
- package/build/components/post-author/combobox.js +0 -60
- package/build/components/post-author/combobox.js.map +0 -7
- package/build/components/post-author/constants.js +0 -42
- package/build/components/post-author/hook.js +0 -87
- package/build/components/post-author/index.js +0 -54
- package/build/components/post-author/panel.js +0 -118
- package/build/components/post-author/select.js +0 -53
- package/build/components/post-author/select.js.map +0 -7
- package/build/components/post-card-panel/index.js +0 -142
- package/build/components/post-card-panel/index.js.map +0 -7
- package/build/components/post-comments/index.js +0 -68
- package/build/components/post-content-information/index.js +0 -81
- package/build/components/post-discussion/panel.js +0 -146
- package/build/components/post-excerpt/check.js +0 -42
- package/build/components/post-excerpt/index.js +0 -88
- package/build/components/post-excerpt/index.js.map +0 -7
- package/build/components/post-excerpt/panel.js +0 -200
- package/build/components/post-excerpt/plugin.js +0 -34
- package/build/components/post-featured-image/check.js +0 -43
- package/build/components/post-featured-image/index.js +0 -308
- package/build/components/post-featured-image/panel.js +0 -76
- package/build/components/post-fields/index.js +0 -49
- package/build/components/post-format/check.js +0 -50
- package/build/components/post-format/index.js +0 -126
- package/build/components/post-format/panel.js +0 -104
- package/build/components/post-last-edited-panel/index.js +0 -47
- package/build/components/post-last-revision/check.js +0 -54
- package/build/components/post-last-revision/index.js +0 -95
- package/build/components/post-last-revision/panel.js +0 -44
- package/build/components/post-locked-modal/index.js +0 -236
- package/build/components/post-panel-row/index.js +0 -54
- package/build/components/post-panel-section/index.js +0 -43
- package/build/components/post-pending-status/check.js +0 -47
- package/build/components/post-pending-status/index.js +0 -68
- package/build/components/post-pending-status/index.js.map +0 -7
- package/build/components/post-pingbacks/index.js +0 -60
- package/build/components/post-pingbacks/index.js.map +0 -7
- package/build/components/post-preview-button/index.js +0 -180
- package/build/components/post-publish-button/index.js +0 -209
- package/build/components/post-publish-button/label.js +0 -83
- package/build/components/post-publish-button/post-publish-button-or-toggle.js +0 -91
- package/build/components/post-publish-panel/index.js +0 -195
- package/build/components/post-publish-panel/index.js.map +0 -7
- package/build/components/post-publish-panel/maybe-category-panel.js +0 -93
- package/build/components/post-publish-panel/maybe-post-format-panel.js +0 -91
- package/build/components/post-publish-panel/maybe-tags-panel.js +0 -103
- package/build/components/post-publish-panel/maybe-tags-panel.js.map +0 -7
- package/build/components/post-publish-panel/maybe-upload-media.js +0 -220
- package/build/components/post-publish-panel/media-util.js +0 -72
- package/build/components/post-publish-panel/postpublish.js +0 -180
- package/build/components/post-publish-panel/postpublish.js.map +0 -7
- package/build/components/post-publish-panel/prepublish.js +0 -165
- package/build/components/post-saved-state/index.js +0 -156
- package/build/components/post-schedule/check.js +0 -37
- package/build/components/post-schedule/index.js +0 -109
- package/build/components/post-schedule/label.js +0 -118
- package/build/components/post-schedule/panel.js +0 -100
- package/build/components/post-status/index.js +0 -275
- package/build/components/post-status/index.js.map +0 -7
- package/build/components/post-sticky/check.js +0 -41
- package/build/components/post-sticky/index.js +0 -59
- package/build/components/post-sticky/index.js.map +0 -7
- package/build/components/post-sticky/panel.js +0 -49
- package/build/components/post-switch-to-draft-button/index.js +0 -102
- package/build/components/post-sync-status/index.js +0 -56
- package/build/components/post-taxonomies/check.js +0 -46
- package/build/components/post-taxonomies/flat-term-selector.js +0 -260
- package/build/components/post-taxonomies/flat-term-selector.js.map +0 -7
- package/build/components/post-taxonomies/hierarchical-term-selector.js +0 -378
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +0 -7
- package/build/components/post-taxonomies/index.js +0 -80
- package/build/components/post-taxonomies/index.js.map +0 -7
- package/build/components/post-taxonomies/most-used-terms.js +0 -86
- package/build/components/post-taxonomies/panel.js +0 -83
- package/build/components/post-template/block-theme.js +0 -198
- package/build/components/post-template/classic-theme.js +0 -224
- package/build/components/post-template/classic-theme.js.map +0 -7
- package/build/components/post-template/create-new-template-modal.js +0 -163
- package/build/components/post-template/create-new-template-modal.js.map +0 -7
- package/build/components/post-template/create-new-template.js +0 -79
- package/build/components/post-template/hooks.js +0 -111
- package/build/components/post-template/panel.js +0 -87
- package/build/components/post-template/reset-default-template.js +0 -57
- package/build/components/post-template/swap-template-button.js +0 -118
- package/build/components/post-template/swap-template-button.js.map +0 -7
- package/build/components/post-text-editor/index.js +0 -99
- package/build/components/post-title/constants.js +0 -34
- package/build/components/post-title/index.js +0 -180
- package/build/components/post-title/post-title-raw.js +0 -92
- package/build/components/post-title/post-title-raw.js.map +0 -7
- package/build/components/post-title/use-post-title-focus.js +0 -56
- package/build/components/post-title/use-post-title.js +0 -41
- package/build/components/post-transform-panel/hooks.js +0 -103
- package/build/components/post-transform-panel/index.js +0 -103
- package/build/components/post-trash/check.js +0 -51
- package/build/components/post-trash/index.js +0 -96
- package/build/components/post-type-support-check/index.js +0 -53
- package/build/components/post-url/check.js +0 -51
- package/build/components/post-url/index.js +0 -179
- package/build/components/post-url/label.js +0 -44
- package/build/components/post-url/panel.js +0 -134
- package/build/components/post-view-link/index.js +0 -62
- package/build/components/post-visibility/check.js +0 -34
- package/build/components/post-visibility/index.js +0 -99
- package/build/components/post-visibility/index.js.map +0 -7
- package/build/components/post-visibility/label.js +0 -44
- package/build/components/post-visibility/utils.js +0 -48
- package/build/components/posts-per-page/index.js +0 -127
- package/build/components/preferences-modal/enable-panel.js +0 -56
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +0 -45
- package/build/components/preferences-modal/enable-publish-sidebar.js +0 -46
- package/build/components/preferences-modal/index.js +0 -406
- package/build/components/preview-dropdown/index.js +0 -206
- package/build/components/provider/disable-non-page-content-blocks.js +0 -112
- package/build/components/provider/index.js +0 -311
- package/build/components/provider/index.js.map +0 -7
- package/build/components/provider/navigation-block-editing-mode.js +0 -45
- package/build/components/provider/use-auto-switch-editor-sidebars.js +0 -63
- package/build/components/provider/use-block-editor-settings.js +0 -329
- package/build/components/provider/use-block-editor-settings.js.map +0 -7
- package/build/components/provider/use-hide-blocks-from-inserter.js +0 -75
- package/build/components/provider/use-post-content-blocks.js +0 -55
- package/build/components/provider/with-registry-provider.js +0 -66
- package/build/components/resizable-editor/index.js +0 -111
- package/build/components/resizable-editor/resize-handle.js +0 -71
- package/build/components/save-publish-panels/index.js +0 -134
- package/build/components/sidebar/constants.js +0 -34
- package/build/components/sidebar/header.js +0 -65
- package/build/components/sidebar/header.js.map +0 -7
- package/build/components/sidebar/index.js +0 -180
- package/build/components/sidebar/post-summary.js +0 -119
- package/build/components/site-discussion/index.js +0 -144
- package/build/components/start-page-options/index.js +0 -177
- package/build/components/start-page-options/index.js.map +0 -7
- package/build/components/start-template-options/index.js +0 -209
- package/build/components/style-book/categories.js +0 -88
- package/build/components/style-book/color-examples.js +0 -66
- package/build/components/style-book/constants.js +0 -321
- package/build/components/style-book/duotone-examples.js +0 -70
- package/build/components/style-book/examples.js +0 -239
- package/build/components/style-book/index.js +0 -629
- package/build/components/style-book/index.js.map +0 -7
- package/build/components/style-book/types.js +0 -19
- package/build/components/styles-canvas/index.js +0 -140
- package/build/components/styles-canvas/revisions.js +0 -123
- package/build/components/styles-canvas/style-book.js +0 -70
- package/build/components/table-of-contents/index.js +0 -83
- package/build/components/table-of-contents/panel.js +0 -113
- package/build/components/template-content-panel/index.js +0 -84
- package/build/components/template-part-content-panel/index.js +0 -69
- package/build/components/template-part-menu-items/convert-to-regular.js +0 -52
- package/build/components/template-part-menu-items/convert-to-template-part.js +0 -89
- package/build/components/template-part-menu-items/index.js +0 -71
- package/build/components/template-validation-notice/index.js +0 -81
- package/build/components/text-editor/index.js +0 -82
- package/build/components/theme-support-check/index.js +0 -48
- package/build/components/time-to-read/index.js +0 -60
- package/build/components/unsaved-changes-warning/index.js +0 -49
- package/build/components/visual-editor/edit-template-blocks-notification.js +0 -91
- package/build/components/visual-editor/index.js +0 -421
- package/build/components/visual-editor/use-edit-content-only-section-exit.js +0 -64
- package/build/components/visual-editor/use-padding-appender.js +0 -75
- package/build/components/visual-editor/use-select-nearest-editable-block.js +0 -96
- package/build/components/visual-editor/use-zoom-out-mode-exit.js +0 -60
- package/build/components/word-count/index.js +0 -39
- package/build/components/zoom-out-toggle/index.js +0 -109
- package/build/dataviews/api.js +0 -71
- package/build/dataviews/fields/content-preview/content-preview-view.js +0 -95
- package/build/dataviews/fields/content-preview/index.js +0 -46
- package/build/dataviews/store/private-actions.js +0 -186
- package/build/dataviews/store/private-actions.js.map +0 -7
- package/build/dataviews/store/private-selectors.js +0 -44
- package/build/dataviews/store/reducer.js +0 -98
- package/build/hooks/custom-sources-backwards-compatibility.js +0 -79
- package/build/hooks/default-autocompleters.js +0 -15
- package/build/hooks/index.js +0 -11
- package/build/hooks/media-upload.js +0 -105
- package/build/hooks/navigation-link-view-button.js +0 -56
- package/build/hooks/pattern-overrides.js +0 -64
- package/build/hooks/push-changes-to-global-styles/index.js +0 -324
- package/build/hooks/push-changes-to-global-styles/index.js.map +0 -7
- package/build/hooks/template-part-navigation-edit-button.js +0 -90
- package/build/hooks/use-global-styles-output.js +0 -76
- package/build/index.js +0 -46
- package/build/index.js.map +0 -7
- package/build/lock-unlock.js +0 -37
- package/build/private-apis.js +0 -89
- package/build/private-apis.js.map +0 -7
- package/build/store/actions.js +0 -771
- package/build/store/constants.js +0 -83
- package/build/store/defaults.js +0 -39
- package/build/store/index.js +0 -61
- package/build/store/local-autosave.js +0 -53
- package/build/store/private-actions.js +0 -417
- package/build/store/private-actions.js.map +0 -7
- package/build/store/private-selectors.js +0 -231
- package/build/store/reducer.js +0 -313
- package/build/store/selectors.js +0 -1020
- package/build/store/utils/is-template-revertable.js +0 -33
- package/build/store/utils/notice-builder.js +0 -124
- package/build/store/utils/notice-builder.js.map +0 -7
- package/build/utils/get-item-title.js +0 -43
- package/build/utils/get-template-info.js +0 -53
- package/build/utils/get-template-part-icon.js +0 -41
- package/build/utils/get-template-part-icon.js.map +0 -7
- package/build/utils/index.js +0 -47
- package/build/utils/media-sideload/index.js +0 -30
- package/build/utils/media-upload/index.js +0 -104
- package/build/utils/pageTypeBadge.js +0 -49
- package/build/utils/search-templates.js +0 -75
- package/build/utils/set-nested-value.js +0 -45
- package/build/utils/terms.js +0 -84
- package/build/utils/url.js +0 -50
- package/tsconfig.json +0 -39
- package/tsconfig.tsbuildinfo +0 -1
- /package/build/bindings/{api.js.map → api.cjs.map} +0 -0
- /package/build/bindings/{pattern-overrides.js.map → pattern-overrides.cjs.map} +0 -0
- /package/build/bindings/{post-data.js.map → post-data.cjs.map} +0 -0
- /package/build/bindings/{post-meta.js.map → post-meta.cjs.map} +0 -0
- /package/build/bindings/{term-data.js.map → term-data.cjs.map} +0 -0
- /package/build/components/autocompleters/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/autosave-monitor/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/block-removal-warnings/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/block-settings-menu/{plugin-block-settings-menu-item.js.map → plugin-block-settings-menu-item.cjs.map} +0 -0
- /package/build/components/block-visibility/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/blog-title/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/character-count/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/collab-sidebar/{add-comment.js.map → add-comment.cjs.map} +0 -0
- /package/build/components/collab-sidebar/{comment-author-info.js.map → comment-author-info.cjs.map} +0 -0
- /package/build/components/collab-sidebar/{comment-form.js.map → comment-form.cjs.map} +0 -0
- /package/build/components/collab-sidebar/{comment-indicator-toolbar.js.map → comment-indicator-toolbar.cjs.map} +0 -0
- /package/build/components/collab-sidebar/{comment-menu-item.js.map → comment-menu-item.cjs.map} +0 -0
- /package/build/components/collab-sidebar/{constants.js.map → constants.cjs.map} +0 -0
- /package/build/components/collab-sidebar/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/collab-sidebar/{utils.js.map → utils.cjs.map} +0 -0
- /package/build/components/collapsible-block-toolbar/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/commands/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/{deprecated.js.map → deprecated.cjs.map} +0 -0
- /package/build/components/document-outline/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/document-outline/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/document-outline/{item.js.map → item.cjs.map} +0 -0
- /package/build/components/document-tools/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/editor-history/{redo.js.map → redo.cjs.map} +0 -0
- /package/build/components/editor-history/{undo.js.map → undo.cjs.map} +0 -0
- /package/build/components/editor-notices/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/editor-snackbars/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/entities-saved-states/{entity-type-list.js.map → entity-type-list.cjs.map} +0 -0
- /package/build/components/entities-saved-states/hooks/{use-is-dirty.js.map → use-is-dirty.cjs.map} +0 -0
- /package/build/components/entities-saved-states/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/error-boundary/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/global-keyboard-shortcuts/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/global-keyboard-shortcuts/{register-shortcuts.js.map → register-shortcuts.cjs.map} +0 -0
- /package/build/components/global-styles/{block-link.js.map → block-link.cjs.map} +0 -0
- /package/build/components/global-styles/{header.js.map → header.cjs.map} +0 -0
- /package/build/components/global-styles/{hooks.js.map → hooks.cjs.map} +0 -0
- /package/build/components/global-styles/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/global-styles/{menu.js.map → menu.cjs.map} +0 -0
- /package/build/components/global-styles-provider/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/global-styles-renderer/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/global-styles-sidebar/{default-sidebar.js.map → default-sidebar.cjs.map} +0 -0
- /package/build/components/global-styles-sidebar/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/global-styles-sidebar/{welcome-guide-image.js.map → welcome-guide-image.cjs.map} +0 -0
- /package/build/components/global-styles-sidebar/{welcome-guide.js.map → welcome-guide.cjs.map} +0 -0
- /package/build/components/header/{back-button.js.map → back-button.cjs.map} +0 -0
- /package/build/components/header/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/inserter-sidebar/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/keyboard-shortcut-help-modal/{config.js.map → config.cjs.map} +0 -0
- /package/build/components/keyboard-shortcut-help-modal/{dynamic-shortcut.js.map → dynamic-shortcut.cjs.map} +0 -0
- /package/build/components/keyboard-shortcut-help-modal/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/keyboard-shortcut-help-modal/{shortcut.js.map → shortcut.cjs.map} +0 -0
- /package/build/components/list-view-sidebar/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/list-view-sidebar/{list-view-outline.js.map → list-view-outline.cjs.map} +0 -0
- /package/build/components/local-autosave-monitor/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/media-categories/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/mode-switcher/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/more-menu/{copy-content-menu-item.js.map → copy-content-menu-item.cjs.map} +0 -0
- /package/build/components/more-menu/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/more-menu/{tools-more-menu-group.js.map → tools-more-menu-group.cjs.map} +0 -0
- /package/build/components/more-menu/{view-more-menu-group.js.map → view-more-menu-group.cjs.map} +0 -0
- /package/build/components/page-attributes/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/page-attributes/{order.js.map → order.cjs.map} +0 -0
- /package/build/components/page-attributes/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/pattern-duplicate-modal/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/pattern-overrides-panel/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/pattern-rename-modal/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/plugin-document-setting-panel/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/plugin-more-menu-item/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/plugin-post-publish-panel/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/plugin-post-status-info/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/plugin-pre-publish-panel/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/plugin-preview-menu-item/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/plugin-sidebar/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/plugin-sidebar-more-menu-item/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-actions/{actions.js.map → actions.cjs.map} +0 -0
- /package/build/components/post-actions/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-actions/{set-as-homepage.js.map → set-as-homepage.cjs.map} +0 -0
- /package/build/components/post-actions/{set-as-posts-page.js.map → set-as-posts-page.cjs.map} +0 -0
- /package/build/components/post-author/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/post-author/{constants.js.map → constants.cjs.map} +0 -0
- /package/build/components/post-author/{hook.js.map → hook.cjs.map} +0 -0
- /package/build/components/post-author/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-author/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/post-comments/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-content-information/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-discussion/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/post-excerpt/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/post-excerpt/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/post-excerpt/{plugin.js.map → plugin.cjs.map} +0 -0
- /package/build/components/post-featured-image/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/post-featured-image/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-featured-image/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/post-fields/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-format/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/post-format/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-format/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/post-last-edited-panel/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-last-revision/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/post-last-revision/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-last-revision/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/post-locked-modal/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-panel-row/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-panel-section/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-pending-status/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/post-preview-button/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-publish-button/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-publish-button/{label.js.map → label.cjs.map} +0 -0
- /package/build/components/post-publish-button/{post-publish-button-or-toggle.js.map → post-publish-button-or-toggle.cjs.map} +0 -0
- /package/build/components/post-publish-panel/{maybe-category-panel.js.map → maybe-category-panel.cjs.map} +0 -0
- /package/build/components/post-publish-panel/{maybe-post-format-panel.js.map → maybe-post-format-panel.cjs.map} +0 -0
- /package/build/components/post-publish-panel/{maybe-upload-media.js.map → maybe-upload-media.cjs.map} +0 -0
- /package/build/components/post-publish-panel/{media-util.js.map → media-util.cjs.map} +0 -0
- /package/build/components/post-publish-panel/{prepublish.js.map → prepublish.cjs.map} +0 -0
- /package/build/components/post-saved-state/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-schedule/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/post-schedule/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-schedule/{label.js.map → label.cjs.map} +0 -0
- /package/build/components/post-schedule/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/post-sticky/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/post-sticky/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/post-switch-to-draft-button/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-sync-status/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-taxonomies/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/post-taxonomies/{most-used-terms.js.map → most-used-terms.cjs.map} +0 -0
- /package/build/components/post-taxonomies/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/post-template/{block-theme.js.map → block-theme.cjs.map} +0 -0
- /package/build/components/post-template/{create-new-template.js.map → create-new-template.cjs.map} +0 -0
- /package/build/components/post-template/{hooks.js.map → hooks.cjs.map} +0 -0
- /package/build/components/post-template/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/post-template/{reset-default-template.js.map → reset-default-template.cjs.map} +0 -0
- /package/build/components/post-text-editor/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-title/{constants.js.map → constants.cjs.map} +0 -0
- /package/build/components/post-title/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-title/{use-post-title-focus.js.map → use-post-title-focus.cjs.map} +0 -0
- /package/build/components/post-title/{use-post-title.js.map → use-post-title.cjs.map} +0 -0
- /package/build/components/post-transform-panel/{hooks.js.map → hooks.cjs.map} +0 -0
- /package/build/components/post-transform-panel/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-trash/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/post-trash/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-type-support-check/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-url/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/post-url/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-url/{label.js.map → label.cjs.map} +0 -0
- /package/build/components/post-url/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/post-view-link/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/post-visibility/{check.js.map → check.cjs.map} +0 -0
- /package/build/components/post-visibility/{label.js.map → label.cjs.map} +0 -0
- /package/build/components/post-visibility/{utils.js.map → utils.cjs.map} +0 -0
- /package/build/components/posts-per-page/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/preferences-modal/{enable-panel.js.map → enable-panel.cjs.map} +0 -0
- /package/build/components/preferences-modal/{enable-plugin-document-setting-panel.js.map → enable-plugin-document-setting-panel.cjs.map} +0 -0
- /package/build/components/preferences-modal/{enable-publish-sidebar.js.map → enable-publish-sidebar.cjs.map} +0 -0
- /package/build/components/preferences-modal/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/preview-dropdown/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/provider/{disable-non-page-content-blocks.js.map → disable-non-page-content-blocks.cjs.map} +0 -0
- /package/build/components/provider/{navigation-block-editing-mode.js.map → navigation-block-editing-mode.cjs.map} +0 -0
- /package/build/components/provider/{use-auto-switch-editor-sidebars.js.map → use-auto-switch-editor-sidebars.cjs.map} +0 -0
- /package/build/components/provider/{use-hide-blocks-from-inserter.js.map → use-hide-blocks-from-inserter.cjs.map} +0 -0
- /package/build/components/provider/{use-post-content-blocks.js.map → use-post-content-blocks.cjs.map} +0 -0
- /package/build/components/provider/{with-registry-provider.js.map → with-registry-provider.cjs.map} +0 -0
- /package/build/components/resizable-editor/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/resizable-editor/{resize-handle.js.map → resize-handle.cjs.map} +0 -0
- /package/build/components/save-publish-panels/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/sidebar/{constants.js.map → constants.cjs.map} +0 -0
- /package/build/components/sidebar/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/sidebar/{post-summary.js.map → post-summary.cjs.map} +0 -0
- /package/build/components/site-discussion/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/start-template-options/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/style-book/{categories.js.map → categories.cjs.map} +0 -0
- /package/build/components/style-book/{color-examples.js.map → color-examples.cjs.map} +0 -0
- /package/build/components/style-book/{constants.js.map → constants.cjs.map} +0 -0
- /package/build/components/style-book/{duotone-examples.js.map → duotone-examples.cjs.map} +0 -0
- /package/build/components/style-book/{examples.js.map → examples.cjs.map} +0 -0
- /package/build/components/style-book/{types.js.map → types.cjs.map} +0 -0
- /package/build/components/styles-canvas/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/styles-canvas/{revisions.js.map → revisions.cjs.map} +0 -0
- /package/build/components/styles-canvas/{style-book.js.map → style-book.cjs.map} +0 -0
- /package/build/components/table-of-contents/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/table-of-contents/{panel.js.map → panel.cjs.map} +0 -0
- /package/build/components/template-content-panel/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/template-part-content-panel/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/template-part-menu-items/{convert-to-regular.js.map → convert-to-regular.cjs.map} +0 -0
- /package/build/components/template-part-menu-items/{convert-to-template-part.js.map → convert-to-template-part.cjs.map} +0 -0
- /package/build/components/template-part-menu-items/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/template-validation-notice/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/text-editor/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/theme-support-check/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/time-to-read/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/unsaved-changes-warning/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/visual-editor/{edit-template-blocks-notification.js.map → edit-template-blocks-notification.cjs.map} +0 -0
- /package/build/components/visual-editor/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/visual-editor/{use-edit-content-only-section-exit.js.map → use-edit-content-only-section-exit.cjs.map} +0 -0
- /package/build/components/visual-editor/{use-padding-appender.js.map → use-padding-appender.cjs.map} +0 -0
- /package/build/components/visual-editor/{use-select-nearest-editable-block.js.map → use-select-nearest-editable-block.cjs.map} +0 -0
- /package/build/components/visual-editor/{use-zoom-out-mode-exit.js.map → use-zoom-out-mode-exit.cjs.map} +0 -0
- /package/build/components/word-count/{index.js.map → index.cjs.map} +0 -0
- /package/build/components/zoom-out-toggle/{index.js.map → index.cjs.map} +0 -0
- /package/build/dataviews/{api.js.map → api.cjs.map} +0 -0
- /package/build/dataviews/fields/content-preview/{content-preview-view.js.map → content-preview-view.cjs.map} +0 -0
- /package/build/dataviews/fields/content-preview/{index.js.map → index.cjs.map} +0 -0
- /package/build/dataviews/store/{private-selectors.js.map → private-selectors.cjs.map} +0 -0
- /package/build/dataviews/store/{reducer.js.map → reducer.cjs.map} +0 -0
- /package/build/hooks/{custom-sources-backwards-compatibility.js.map → custom-sources-backwards-compatibility.cjs.map} +0 -0
- /package/build/hooks/{default-autocompleters.js.map → default-autocompleters.cjs.map} +0 -0
- /package/build/hooks/{index.js.map → index.cjs.map} +0 -0
- /package/build/hooks/{media-upload.js.map → media-upload.cjs.map} +0 -0
- /package/build/hooks/{navigation-link-view-button.js.map → navigation-link-view-button.cjs.map} +0 -0
- /package/build/hooks/{pattern-overrides.js.map → pattern-overrides.cjs.map} +0 -0
- /package/build/hooks/{template-part-navigation-edit-button.js.map → template-part-navigation-edit-button.cjs.map} +0 -0
- /package/build/hooks/{use-global-styles-output.js.map → use-global-styles-output.cjs.map} +0 -0
- /package/build/{lock-unlock.js.map → lock-unlock.cjs.map} +0 -0
- /package/build/store/{actions.js.map → actions.cjs.map} +0 -0
- /package/build/store/{constants.js.map → constants.cjs.map} +0 -0
- /package/build/store/{defaults.js.map → defaults.cjs.map} +0 -0
- /package/build/store/{index.js.map → index.cjs.map} +0 -0
- /package/build/store/{local-autosave.js.map → local-autosave.cjs.map} +0 -0
- /package/build/store/{private-selectors.js.map → private-selectors.cjs.map} +0 -0
- /package/build/store/{reducer.js.map → reducer.cjs.map} +0 -0
- /package/build/store/{selectors.js.map → selectors.cjs.map} +0 -0
- /package/build/store/utils/{is-template-revertable.js.map → is-template-revertable.cjs.map} +0 -0
- /package/build/utils/{get-item-title.js.map → get-item-title.cjs.map} +0 -0
- /package/build/utils/{get-template-info.js.map → get-template-info.cjs.map} +0 -0
- /package/build/utils/{index.js.map → index.cjs.map} +0 -0
- /package/build/utils/media-sideload/{index.js.map → index.cjs.map} +0 -0
- /package/build/utils/media-upload/{index.js.map → index.cjs.map} +0 -0
- /package/build/utils/{pageTypeBadge.js.map → pageTypeBadge.cjs.map} +0 -0
- /package/build/utils/{search-templates.js.map → search-templates.cjs.map} +0 -0
- /package/build/utils/{set-nested-value.js.map → set-nested-value.cjs.map} +0 -0
- /package/build/utils/{terms.js.map → terms.cjs.map} +0 -0
- /package/build/utils/{url.js.map → url.cjs.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/document-bar/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { chevronLeftSmall, chevronRightSmall, layout } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPES } from '../../store/constants';\nimport { store as editorStore } from '../../store';\nimport usePageTypeBadge from '../../utils/pageTypeBadge';\nimport { getTemplateInfo } from '../../utils/get-template-info';\nimport { getStylesCanvasTitle } from '../styles-canvas';\nimport { unlock } from '../../lock-unlock';\n\n/** @typedef {import(\"@wordpress/components\").IconType} IconType */\n\nconst MotionButton = motion.create( Button );\n\n/**\n * This component renders a navigation bar at the top of the editor. It displays the title of the current document,\n * a back button (if applicable), and a command center button. It also handles different states of the document,\n * such as \"not found\" or \"unsynced\".\n *\n * @example\n * ```jsx\n * <DocumentBar />\n * ```\n *\n * @param {Object} props The component props.\n * @param {string} props.title A title for the document, defaulting to the document or template title currently being edited.\n * @param {IconType} props.icon An icon for the document, no default.\n * (A default icon indicating the document post type is no longer used.)\n *\n * @return {React.ReactNode} The rendered DocumentBar component.\n */\nexport default function DocumentBar( props ) {\n\tconst {\n\t\tpostId,\n\t\tpostType,\n\t\tpostTypeLabel,\n\t\tdocumentTitle,\n\t\tisNotFound,\n\t\ttemplateTitle,\n\t\tonNavigateToPreviousEntityRecord,\n\t\tisTemplatePreview,\n\t\tstylesCanvasTitle,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentPostId,\n\t\t\tgetEditorSettings,\n\t\t\tgetRenderingMode,\n\t\t} = select( editorStore );\n\n\t\tconst {\n\t\t\tgetEditedEntityRecord,\n\t\t\tgetPostType,\n\t\t\tgetCurrentTheme,\n\t\t\tisResolving: isResolvingSelector,\n\t\t} = select( coreStore );\n\t\tconst _postType = getCurrentPostType();\n\t\tconst _postId = getCurrentPostId();\n\t\tconst _document = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\t_postType,\n\t\t\t_postId\n\t\t);\n\n\t\tconst { default_template_types: templateTypes = [] } =\n\t\t\tgetCurrentTheme() ?? {};\n\n\t\tconst _templateInfo = getTemplateInfo( {\n\t\t\ttemplateTypes,\n\t\t\ttemplate: _document,\n\t\t} );\n\t\tconst _postTypeLabel = getPostType( _postType )?.labels?.singular_name;\n\n\t\t// Check if styles canvas is active and get its title\n\t\tconst { getStylesPath, getShowStylebook } = unlock(\n\t\t\tselect( editorStore )\n\t\t);\n\t\tconst _stylesPath = getStylesPath();\n\t\tconst _showStylebook = getShowStylebook();\n\t\tconst _stylesCanvasTitle = getStylesCanvasTitle(\n\t\t\t_stylesPath,\n\t\t\t_showStylebook\n\t\t);\n\n\t\treturn {\n\t\t\tpostId: _postId,\n\t\t\tpostType: _postType,\n\t\t\tpostTypeLabel: _postTypeLabel,\n\t\t\tdocumentTitle: _document.title,\n\t\t\tisNotFound:\n\t\t\t\t! _document &&\n\t\t\t\t! isResolvingSelector(\n\t\t\t\t\t'getEditedEntityRecord',\n\t\t\t\t\t'postType',\n\t\t\t\t\t_postType,\n\t\t\t\t\t_postId\n\t\t\t\t),\n\t\t\ttemplateTitle: _templateInfo.title,\n\t\t\tonNavigateToPreviousEntityRecord:\n\t\t\t\tgetEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\tisTemplatePreview: getRenderingMode() === 'template-locked',\n\t\t\tstylesCanvasTitle: _stylesCanvasTitle,\n\t\t};\n\t}, [] );\n\n\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\tconst isReducedMotion = useReducedMotion();\n\n\tconst isTemplate = TEMPLATE_POST_TYPES.includes( postType );\n\tconst hasBackButton
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,IAAI,aAAa;AAC1B,SAAS,WAAW,mBAAmB;AACvC;AAAA,EACC;AAAA,EACA,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,6BAA6B;AAAA,OACvB;AACP,SAAS,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { BlockIcon, store as blockEditorStore } from '@wordpress/block-editor';\nimport { chevronLeftSmall, chevronRightSmall, layout } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPES } from '../../store/constants';\nimport { store as editorStore } from '../../store';\nimport usePageTypeBadge from '../../utils/pageTypeBadge';\nimport { getTemplateInfo } from '../../utils/get-template-info';\nimport { getStylesCanvasTitle } from '../styles-canvas';\nimport { unlock } from '../../lock-unlock';\nimport useEditedSectionDetails from './useEditedSectionDetails';\n\n/** @typedef {import(\"@wordpress/components\").IconType} IconType */\n\nconst MotionButton = motion.create( Button );\n\n/**\n * This component renders a navigation bar at the top of the editor. It displays the title of the current document,\n * a back button (if applicable), and a command center button. It also handles different states of the document,\n * such as \"not found\" or \"unsynced\".\n *\n * @example\n * ```jsx\n * <DocumentBar />\n * ```\n *\n * @param {Object} props The component props.\n * @param {string} props.title A title for the document, defaulting to the document or template title currently being edited.\n * @param {IconType} props.icon An icon for the document, no default.\n * (A default icon indicating the document post type is no longer used.)\n *\n * @return {React.ReactNode} The rendered DocumentBar component.\n */\nexport default function DocumentBar( props ) {\n\t// Get action to lock the pattern design\n\tconst { stopEditingContentOnlySection } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\n\t// Get details about the currently edited content-only section\n\tconst unlockedPatternInfo = useEditedSectionDetails();\n\n\tconst {\n\t\tpostId,\n\t\tpostType,\n\t\tpostTypeLabel,\n\t\tdocumentTitle,\n\t\tisNotFound,\n\t\ttemplateTitle,\n\t\tonNavigateToPreviousEntityRecord,\n\t\tisTemplatePreview,\n\t\tstylesCanvasTitle,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentPostId,\n\t\t\tgetEditorSettings,\n\t\t\tgetRenderingMode,\n\t\t} = select( editorStore );\n\n\t\tconst {\n\t\t\tgetEditedEntityRecord,\n\t\t\tgetPostType,\n\t\t\tgetCurrentTheme,\n\t\t\tisResolving: isResolvingSelector,\n\t\t} = select( coreStore );\n\t\tconst _postType = getCurrentPostType();\n\t\tconst _postId = getCurrentPostId();\n\t\tconst _document = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\t_postType,\n\t\t\t_postId\n\t\t);\n\n\t\tconst { default_template_types: templateTypes = [] } =\n\t\t\tgetCurrentTheme() ?? {};\n\n\t\tconst _templateInfo = getTemplateInfo( {\n\t\t\ttemplateTypes,\n\t\t\ttemplate: _document,\n\t\t} );\n\t\tconst _postTypeLabel = getPostType( _postType )?.labels?.singular_name;\n\n\t\t// Check if styles canvas is active and get its title\n\t\tconst { getStylesPath, getShowStylebook } = unlock(\n\t\t\tselect( editorStore )\n\t\t);\n\t\tconst _stylesPath = getStylesPath();\n\t\tconst _showStylebook = getShowStylebook();\n\t\tconst _stylesCanvasTitle = getStylesCanvasTitle(\n\t\t\t_stylesPath,\n\t\t\t_showStylebook\n\t\t);\n\n\t\treturn {\n\t\t\tpostId: _postId,\n\t\t\tpostType: _postType,\n\t\t\tpostTypeLabel: _postTypeLabel,\n\t\t\tdocumentTitle: _document.title,\n\t\t\tisNotFound:\n\t\t\t\t! _document &&\n\t\t\t\t! isResolvingSelector(\n\t\t\t\t\t'getEditedEntityRecord',\n\t\t\t\t\t'postType',\n\t\t\t\t\t_postType,\n\t\t\t\t\t_postId\n\t\t\t\t),\n\t\t\ttemplateTitle: _templateInfo.title,\n\t\t\tonNavigateToPreviousEntityRecord:\n\t\t\t\tgetEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\tisTemplatePreview: getRenderingMode() === 'template-locked',\n\t\t\tstylesCanvasTitle: _stylesCanvasTitle,\n\t\t};\n\t}, [] );\n\n\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\tconst isReducedMotion = useReducedMotion();\n\n\tconst isTemplate = TEMPLATE_POST_TYPES.includes( postType );\n\tconst hasBackButton =\n\t\t!! onNavigateToPreviousEntityRecord || !! unlockedPatternInfo;\n\tconst entityTitle = isTemplate ? templateTitle : documentTitle;\n\n\t// Use pattern info if a pattern block is unlocked, otherwise use document/entity info\n\tconst title =\n\t\tunlockedPatternInfo?.patternTitle ||\n\t\tprops.title ||\n\t\tstylesCanvasTitle ||\n\t\tentityTitle;\n\tconst icon = props.icon;\n\n\t// Determine the back button action\n\tconst handleBackClick = ( event ) => {\n\t\tevent.stopPropagation();\n\t\tif ( unlockedPatternInfo ) {\n\t\t\tstopEditingContentOnlySection();\n\t\t} else if ( onNavigateToPreviousEntityRecord ) {\n\t\t\tonNavigateToPreviousEntityRecord();\n\t\t}\n\t};\n\n\tconst pageTypeBadge = usePageTypeBadge( postId );\n\n\tconst mountedRef = useRef( false );\n\tuseEffect( () => {\n\t\tmountedRef.current = true;\n\t}, [] );\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'editor-document-bar', {\n\t\t\t\t'has-back-button': hasBackButton,\n\t\t\t} ) }\n\t\t>\n\t\t\t<AnimatePresence>\n\t\t\t\t{ hasBackButton && (\n\t\t\t\t\t<MotionButton\n\t\t\t\t\t\tclassName=\"editor-document-bar__back\"\n\t\t\t\t\t\ticon={ isRTL() ? chevronRightSmall : chevronLeftSmall }\n\t\t\t\t\t\tonClick={ handleBackClick }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\tmountedRef.current\n\t\t\t\t\t\t\t\t? { opacity: 0, transform: 'translateX(15%)' }\n\t\t\t\t\t\t\t\t: false // Don't show entry animation when DocumentBar mounts.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimate={ { opacity: 1, transform: 'translateX(0%)' } }\n\t\t\t\t\t\texit={ { opacity: 0, transform: 'translateX(15%)' } }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tisReducedMotion ? { duration: 0 } : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t\t</MotionButton>\n\t\t\t\t) }\n\t\t\t</AnimatePresence>\n\t\t\t{ ! isTemplate && isTemplatePreview && ! hasBackButton && (\n\t\t\t\t<BlockIcon\n\t\t\t\t\ticon={ layout }\n\t\t\t\t\tclassName=\"editor-document-bar__icon-layout\"\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ isNotFound ? (\n\t\t\t\t<Text>{ __( 'Document not found' ) }</Text>\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"editor-document-bar__command\"\n\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tclassName=\"editor-document-bar__title\"\n\t\t\t\t\t\t// Force entry animation when the back button is added or removed.\n\t\t\t\t\t\tkey={ hasBackButton }\n\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\tmountedRef.current\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t\t\ttransform: hasBackButton\n\t\t\t\t\t\t\t\t\t\t\t? 'translateX(15%)'\n\t\t\t\t\t\t\t\t\t\t\t: 'translateX(-15%)',\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t: false // Don't show entry animation when DocumentBar mounts.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\ttransform: 'translateX(0%)',\n\t\t\t\t\t\t} }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tisReducedMotion ? { duration: 0 } : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ icon && <BlockIcon icon={ icon } /> }\n\t\t\t\t\t\t<Text size=\"body\" as=\"h1\">\n\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-title\">\n\t\t\t\t\t\t\t\t{ title\n\t\t\t\t\t\t\t\t\t? stripHTML( title )\n\t\t\t\t\t\t\t\t\t: __( 'No title' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{ unlockedPatternInfo && (\n\t\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-type-label\">\n\t\t\t\t\t\t\t\t\t{ unlockedPatternInfo.type ===\n\t\t\t\t\t\t\t\t\t'template-part'\n\t\t\t\t\t\t\t\t\t\t? `\u00B7 ${ __( 'Template Part' ) }`\n\t\t\t\t\t\t\t\t\t\t: `\u00B7 ${ __( 'Pattern' ) }` }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! unlockedPatternInfo && pageTypeBadge && (\n\t\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-type-label\">\n\t\t\t\t\t\t\t\t\t{ `\u00B7 ${ pageTypeBadge }` }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! unlockedPatternInfo &&\n\t\t\t\t\t\t\t\tpostTypeLabel &&\n\t\t\t\t\t\t\t\t! props.title &&\n\t\t\t\t\t\t\t\t! pageTypeBadge && (\n\t\t\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-type-label\">\n\t\t\t\t\t\t\t\t\t\t{ `\u00B7 ${ decodeEntities(\n\t\t\t\t\t\t\t\t\t\t\tpostTypeLabel\n\t\t\t\t\t\t\t\t\t\t) }` }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</motion.div>\n\t\t\t\t\t<span className=\"editor-document-bar__shortcut\">\n\t\t\t\t\t\t{ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t</span>\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// packages/editor/src/components/document-bar/useEditedSectionDetails.js
|
|
2
|
+
import { useSelect } from "@wordpress/data";
|
|
3
|
+
import { decodeEntities } from "@wordpress/html-entities";
|
|
4
|
+
import { store as blockEditorStore } from "@wordpress/block-editor";
|
|
5
|
+
import { store as coreStore } from "@wordpress/core-data";
|
|
6
|
+
import { unlock } from "../../lock-unlock.js";
|
|
7
|
+
function useEditedSectionDetails() {
|
|
8
|
+
return useSelect((select) => {
|
|
9
|
+
if (!window?.__experimentalContentOnlyPatternInsertion) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
const {
|
|
13
|
+
getBlockAttributes,
|
|
14
|
+
getBlockName,
|
|
15
|
+
__experimentalGetParsedPattern
|
|
16
|
+
} = select(blockEditorStore);
|
|
17
|
+
const { getEditedEntityRecord, getCurrentTheme } = select(coreStore);
|
|
18
|
+
const { getEditedContentOnlySection } = unlock(
|
|
19
|
+
select(blockEditorStore)
|
|
20
|
+
);
|
|
21
|
+
const editedSectionId = getEditedContentOnlySection();
|
|
22
|
+
if (!editedSectionId) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
const attributes = getBlockAttributes(editedSectionId);
|
|
26
|
+
const patternName = attributes?.metadata?.patternName;
|
|
27
|
+
if (patternName) {
|
|
28
|
+
const pattern = typeof __experimentalGetParsedPattern === "function" ? __experimentalGetParsedPattern(patternName) : null;
|
|
29
|
+
return {
|
|
30
|
+
patternName,
|
|
31
|
+
patternTitle: pattern?.title || attributes?.metadata?.name,
|
|
32
|
+
type: "pattern"
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const blockName = getBlockName(editedSectionId);
|
|
36
|
+
if (blockName === "core/block" && !!attributes?.ref) {
|
|
37
|
+
const entity = getEditedEntityRecord(
|
|
38
|
+
"postType",
|
|
39
|
+
"wp_block",
|
|
40
|
+
attributes.ref
|
|
41
|
+
);
|
|
42
|
+
if (entity?.title) {
|
|
43
|
+
return {
|
|
44
|
+
patternName: attributes.ref,
|
|
45
|
+
patternTitle: decodeEntities(entity.title),
|
|
46
|
+
type: "synced-pattern"
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (blockName === "core/template-part" && !!attributes?.slug) {
|
|
51
|
+
const theme = attributes.theme || getCurrentTheme()?.stylesheet;
|
|
52
|
+
const templatePartId = theme ? `${theme}//${attributes.slug}` : null;
|
|
53
|
+
if (templatePartId) {
|
|
54
|
+
const entity = getEditedEntityRecord(
|
|
55
|
+
"postType",
|
|
56
|
+
"wp_template_part",
|
|
57
|
+
templatePartId
|
|
58
|
+
);
|
|
59
|
+
if (entity?.title) {
|
|
60
|
+
return {
|
|
61
|
+
patternName: attributes.slug,
|
|
62
|
+
patternTitle: decodeEntities(entity.title),
|
|
63
|
+
type: "template-part"
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}, []);
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
useEditedSectionDetails as default
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=useEditedSectionDetails.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/document-bar/useEditedSectionDetails.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Hook to get details about the currently edited content-only section.\n * Only returns information when the content only pattern insertion experiment is enabled.\n *\n * @return {Object|null} Object with patternName, patternTitle, and type, or null if no section is being edited or experiment is disabled.\n */\nexport default function useEditedSectionDetails() {\n\treturn useSelect( ( select ) => {\n\t\t// Only run when the content only pattern insertion experiment is enabled\n\t\tif ( ! window?.__experimentalContentOnlyPatternInsertion ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst {\n\t\t\tgetBlockAttributes,\n\t\t\tgetBlockName,\n\t\t\t__experimentalGetParsedPattern,\n\t\t} = select( blockEditorStore );\n\t\tconst { getEditedEntityRecord, getCurrentTheme } = select( coreStore );\n\t\tconst { getEditedContentOnlySection } = unlock(\n\t\t\tselect( blockEditorStore )\n\t\t);\n\n\t\t// Get the clientId of the unlocked pattern/section\n\t\tconst editedSectionId = getEditedContentOnlySection();\n\t\tif ( ! editedSectionId ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst attributes = getBlockAttributes( editedSectionId );\n\n\t\t// Handle unsynced patterns (contentOnly patterns with patternName)\n\t\tconst patternName = attributes?.metadata?.patternName;\n\t\tif ( patternName ) {\n\t\t\t// Get pattern details if available\n\t\t\tconst pattern =\n\t\t\t\ttypeof __experimentalGetParsedPattern === 'function'\n\t\t\t\t\t? __experimentalGetParsedPattern( patternName )\n\t\t\t\t\t: null;\n\n\t\t\treturn {\n\t\t\t\tpatternName,\n\t\t\t\tpatternTitle: pattern?.title || attributes?.metadata?.name,\n\t\t\t\ttype: 'pattern',\n\t\t\t};\n\t\t}\n\n\t\tconst blockName = getBlockName( editedSectionId );\n\n\t\t// Handle synced patterns (core/block)\n\t\tif ( blockName === 'core/block' && !! attributes?.ref ) {\n\t\t\tconst entity = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_block',\n\t\t\t\tattributes.ref\n\t\t\t);\n\t\t\tif ( entity?.title ) {\n\t\t\t\treturn {\n\t\t\t\t\tpatternName: attributes.ref,\n\t\t\t\t\tpatternTitle: decodeEntities( entity.title ),\n\t\t\t\t\ttype: 'synced-pattern',\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Handle template parts (core/template-part)\n\t\tif ( blockName === 'core/template-part' && !! attributes?.slug ) {\n\t\t\tconst theme = attributes.theme || getCurrentTheme()?.stylesheet;\n\t\t\tconst templatePartId = theme\n\t\t\t\t? `${ theme }//${ attributes.slug }`\n\t\t\t\t: null;\n\t\t\tif ( templatePartId ) {\n\t\t\t\tconst entity = getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template_part',\n\t\t\t\t\ttemplatePartId\n\t\t\t\t);\n\t\t\t\tif ( entity?.title ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpatternName: attributes.slug,\n\t\t\t\t\t\tpatternTitle: decodeEntities( entity.title ),\n\t\t\t\t\t\ttype: 'template-part',\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}, [] );\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAC/B,SAAS,SAAS,wBAAwB;AAC1C,SAAS,SAAS,iBAAiB;AAKnC,SAAS,cAAc;AAQR,SAAR,0BAA2C;AACjD,SAAO,UAAW,CAAE,WAAY;AAE/B,QAAK,CAAE,QAAQ,2CAA4C;AAC1D,aAAO;AAAA,IACR;AAEA,UAAM;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACD,IAAI,OAAQ,gBAAiB;AAC7B,UAAM,EAAE,uBAAuB,gBAAgB,IAAI,OAAQ,SAAU;AACrE,UAAM,EAAE,4BAA4B,IAAI;AAAA,MACvC,OAAQ,gBAAiB;AAAA,IAC1B;AAGA,UAAM,kBAAkB,4BAA4B;AACpD,QAAK,CAAE,iBAAkB;AACxB,aAAO;AAAA,IACR;AAEA,UAAM,aAAa,mBAAoB,eAAgB;AAGvD,UAAM,cAAc,YAAY,UAAU;AAC1C,QAAK,aAAc;AAElB,YAAM,UACL,OAAO,mCAAmC,aACvC,+BAAgC,WAAY,IAC5C;AAEJ,aAAO;AAAA,QACN;AAAA,QACA,cAAc,SAAS,SAAS,YAAY,UAAU;AAAA,QACtD,MAAM;AAAA,MACP;AAAA,IACD;AAEA,UAAM,YAAY,aAAc,eAAgB;AAGhD,QAAK,cAAc,gBAAgB,CAAC,CAAE,YAAY,KAAM;AACvD,YAAM,SAAS;AAAA,QACd;AAAA,QACA;AAAA,QACA,WAAW;AAAA,MACZ;AACA,UAAK,QAAQ,OAAQ;AACpB,eAAO;AAAA,UACN,aAAa,WAAW;AAAA,UACxB,cAAc,eAAgB,OAAO,KAAM;AAAA,UAC3C,MAAM;AAAA,QACP;AAAA,MACD;AAAA,IACD;AAGA,QAAK,cAAc,wBAAwB,CAAC,CAAE,YAAY,MAAO;AAChE,YAAM,QAAQ,WAAW,SAAS,gBAAgB,GAAG;AACrD,YAAM,iBAAiB,QACpB,GAAI,KAAM,KAAM,WAAW,IAAK,KAChC;AACH,UAAK,gBAAiB;AACrB,cAAM,SAAS;AAAA,UACd;AAAA,UACA;AAAA,UACA;AAAA,QACD;AACA,YAAK,QAAQ,OAAQ;AACpB,iBAAO;AAAA,YACN,aAAa,WAAW;AAAA,YACxB,cAAc,eAAgB,OAAO,KAAM;AAAA,YAC3C,MAAM;AAAA,UACP;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAEA,WAAO;AAAA,EACR,GAAG,CAAC,CAAE;AACP;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -6,8 +6,8 @@ import { create, getTextContent } from "@wordpress/rich-text";
|
|
|
6
6
|
import { store as blockEditorStore } from "@wordpress/block-editor";
|
|
7
7
|
import { store as coreStore } from "@wordpress/core-data";
|
|
8
8
|
import { Path, SVG, Line, Rect } from "@wordpress/components";
|
|
9
|
-
import DocumentOutlineItem from "./item";
|
|
10
|
-
import { store as editorStore } from "../../store";
|
|
9
|
+
import DocumentOutlineItem from "./item.js";
|
|
10
|
+
import { store as editorStore } from "../../store/index.js";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
var emptyHeadingContent = /* @__PURE__ */ jsx("em", { children: __("(Empty heading)") });
|
|
13
13
|
var incorrectLevelContent = [
|
|
@@ -9,10 +9,10 @@ import { listView, plus } from "@wordpress/icons";
|
|
|
9
9
|
import { useCallback } from "@wordpress/element";
|
|
10
10
|
import { store as keyboardShortcutsStore } from "@wordpress/keyboard-shortcuts";
|
|
11
11
|
import { store as preferencesStore } from "@wordpress/preferences";
|
|
12
|
-
import { unlock } from "../../lock-unlock";
|
|
13
|
-
import { store as editorStore } from "../../store";
|
|
14
|
-
import EditorHistoryRedo from "../editor-history/redo";
|
|
15
|
-
import EditorHistoryUndo from "../editor-history/undo";
|
|
12
|
+
import { unlock } from "../../lock-unlock.js";
|
|
13
|
+
import { store as editorStore } from "../../store/index.js";
|
|
14
|
+
import EditorHistoryRedo from "../editor-history/redo.js";
|
|
15
|
+
import EditorHistoryUndo from "../editor-history/undo.js";
|
|
16
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
function DocumentTools({ className, disableBlockTools = false }) {
|
|
18
18
|
const { setIsInserterOpened, setIsListViewOpened } = useDispatch(editorStore);
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
// packages/editor/src/components/editor/index.js
|
|
2
|
-
import { useSelect } from "@wordpress/data";
|
|
2
|
+
import { useSelect, useDispatch } from "@wordpress/data";
|
|
3
3
|
import { store as coreStore } from "@wordpress/core-data";
|
|
4
4
|
import { Notice } from "@wordpress/components";
|
|
5
5
|
import { __ } from "@wordpress/i18n";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
6
|
+
import { useEffect } from "@wordpress/element";
|
|
7
|
+
import { store as blockEditorStore } from "@wordpress/block-editor";
|
|
8
|
+
import { store as editorStore } from "../../store/index.js";
|
|
9
|
+
import { TEMPLATE_POST_TYPE } from "../../store/constants.js";
|
|
10
|
+
import { useRestoreBlockFromPath } from "../../utils/block-selection-path.js";
|
|
11
|
+
import EditorInterface from "../editor-interface/index.js";
|
|
12
|
+
import { ExperimentalEditorProvider } from "../provider/index.js";
|
|
13
|
+
import Sidebar from "../sidebar/index.js";
|
|
14
|
+
import NotesSidebar from "../collab-sidebar/index.js";
|
|
15
|
+
import GlobalStylesSidebar from "../global-styles-sidebar/index.js";
|
|
16
|
+
import { GlobalStylesRenderer } from "../global-styles-renderer/index.js";
|
|
14
17
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
18
|
function Editor({
|
|
16
19
|
postType,
|
|
@@ -19,6 +22,7 @@ function Editor({
|
|
|
19
22
|
settings,
|
|
20
23
|
children,
|
|
21
24
|
initialEdits,
|
|
25
|
+
initialSelection,
|
|
22
26
|
// This could be part of the settings.
|
|
23
27
|
onActionPerformed,
|
|
24
28
|
// The following abstractions are not ideal but necessary
|
|
@@ -73,6 +77,26 @@ function Editor({
|
|
|
73
77
|
},
|
|
74
78
|
[postType, postId, templateId]
|
|
75
79
|
);
|
|
80
|
+
const { selectBlock } = useDispatch(blockEditorStore);
|
|
81
|
+
const restoreBlockFromPath = useRestoreBlockFromPath();
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
if (!initialSelection || !hasLoadedPost || !post) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const timeoutId = setTimeout(() => {
|
|
87
|
+
const clientId = restoreBlockFromPath(initialSelection);
|
|
88
|
+
if (clientId) {
|
|
89
|
+
selectBlock(clientId);
|
|
90
|
+
}
|
|
91
|
+
}, 0);
|
|
92
|
+
return () => clearTimeout(timeoutId);
|
|
93
|
+
}, [
|
|
94
|
+
initialSelection,
|
|
95
|
+
hasLoadedPost,
|
|
96
|
+
post,
|
|
97
|
+
selectBlock,
|
|
98
|
+
restoreBlockFromPath
|
|
99
|
+
]);
|
|
76
100
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
77
101
|
hasLoadedPost && !post && /* @__PURE__ */ jsx(
|
|
78
102
|
Notice,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/editor/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport EditorInterface from '../editor-interface';\nimport { ExperimentalEditorProvider } from '../provider';\nimport Sidebar from '../sidebar';\nimport NotesSidebar from '../collab-sidebar';\nimport GlobalStylesSidebar from '../global-styles-sidebar';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\n\nfunction Editor( {\n\tpostType,\n\tpostId,\n\ttemplateId,\n\tsettings,\n\tchildren,\n\tinitialEdits,\n\n\t// This could be part of the settings.\n\tonActionPerformed,\n\n\t// The following abstractions are not ideal but necessary\n\t// to account for site editor and post editor differences for now.\n\textraContent,\n\textraSidebarPanels,\n\t...props\n} ) {\n\tconst {\n\t\tpost,\n\t\ttemplate,\n\t\thasLoadedPost,\n\t\terror,\n\t\tisBlockTheme,\n\t\tshowGlobalStyles,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetResolutionError,\n\t\t\t\thasFinishedResolution,\n\t\t\t\tgetCurrentTheme,\n\t\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t\tcanUser,\n\t\t\t} = select( coreStore );\n\t\t\tconst { getRenderingMode, getCurrentPostType } =\n\t\t\t\tselect( editorStore );\n\n\t\t\tconst postArgs = [ 'postType', postType, postId ];\n\t\t\tconst renderingMode = getRenderingMode();\n\t\t\tconst currentPostType = getCurrentPostType();\n\t\t\tconst _isBlockTheme = getCurrentTheme()?.is_block_theme;\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst userCanEditGlobalStyles = globalStylesId\n\t\t\t\t? canUser( 'update', {\n\t\t\t\t\t\tkind: 'root',\n\t\t\t\t\t\tname: 'globalStyles',\n\t\t\t\t\t\tid: globalStylesId,\n\t\t\t\t } )\n\t\t\t\t: false;\n\n\t\t\treturn {\n\t\t\t\tpost: getEntityRecord( ...postArgs ),\n\t\t\t\ttemplate: templateId\n\t\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\t\t\ttemplateId\n\t\t\t\t\t )\n\t\t\t\t\t: undefined,\n\t\t\t\thasLoadedPost: hasFinishedResolution(\n\t\t\t\t\t'getEntityRecord',\n\t\t\t\t\tpostArgs\n\t\t\t\t),\n\t\t\t\terror: getResolutionError( 'getEntityRecord', postArgs )\n\t\t\t\t\t?.message,\n\t\t\t\tisBlockTheme: _isBlockTheme,\n\t\t\t\tshowGlobalStyles:\n\t\t\t\t\t_isBlockTheme &&\n\t\t\t\t\tuserCanEditGlobalStyles &&\n\t\t\t\t\t( currentPostType === 'wp_template' ||\n\t\t\t\t\t\trenderingMode === 'template-locked' ),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, templateId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ hasLoadedPost && ! post && (\n\t\t\t\t<Notice\n\t\t\t\t\tstatus={ !! error ? 'error' : 'warning' }\n\t\t\t\t\tisDismissible={ false }\n\t\t\t\t>\n\t\t\t\t\t{ ! error\n\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: error }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ !! post && (\n\t\t\t\t<ExperimentalEditorProvider\n\t\t\t\t\tpost={ post }\n\t\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<EditorInterface { ...props }>\n\t\t\t\t\t\t{ extraContent }\n\t\t\t\t\t</EditorInterface>\n\t\t\t\t\t{ children }\n\t\t\t\t\t<Sidebar\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraPanels={ extraSidebarPanels }\n\t\t\t\t\t/>\n\t\t\t\t\t<NotesSidebar />\n\t\t\t\t\t{ isBlockTheme && <GlobalStylesRenderer /> }\n\t\t\t\t\t{ showGlobalStyles && <GlobalStylesSidebar /> }\n\t\t\t\t</ExperimentalEditorProvider>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Editor;\n"],
|
|
5
|
-
"mappings": ";AAGA,SAAS,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport { useRestoreBlockFromPath } from '../../utils/block-selection-path';\nimport EditorInterface from '../editor-interface';\nimport { ExperimentalEditorProvider } from '../provider';\nimport Sidebar from '../sidebar';\nimport NotesSidebar from '../collab-sidebar';\nimport GlobalStylesSidebar from '../global-styles-sidebar';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\n\nfunction Editor( {\n\tpostType,\n\tpostId,\n\ttemplateId,\n\tsettings,\n\tchildren,\n\tinitialEdits,\n\tinitialSelection,\n\n\t// This could be part of the settings.\n\tonActionPerformed,\n\n\t// The following abstractions are not ideal but necessary\n\t// to account for site editor and post editor differences for now.\n\textraContent,\n\textraSidebarPanels,\n\t...props\n} ) {\n\tconst {\n\t\tpost,\n\t\ttemplate,\n\t\thasLoadedPost,\n\t\terror,\n\t\tisBlockTheme,\n\t\tshowGlobalStyles,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetResolutionError,\n\t\t\t\thasFinishedResolution,\n\t\t\t\tgetCurrentTheme,\n\t\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t\tcanUser,\n\t\t\t} = select( coreStore );\n\t\t\tconst { getRenderingMode, getCurrentPostType } =\n\t\t\t\tselect( editorStore );\n\n\t\t\tconst postArgs = [ 'postType', postType, postId ];\n\t\t\tconst renderingMode = getRenderingMode();\n\t\t\tconst currentPostType = getCurrentPostType();\n\t\t\tconst _isBlockTheme = getCurrentTheme()?.is_block_theme;\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst userCanEditGlobalStyles = globalStylesId\n\t\t\t\t? canUser( 'update', {\n\t\t\t\t\t\tkind: 'root',\n\t\t\t\t\t\tname: 'globalStyles',\n\t\t\t\t\t\tid: globalStylesId,\n\t\t\t\t } )\n\t\t\t\t: false;\n\n\t\t\treturn {\n\t\t\t\tpost: getEntityRecord( ...postArgs ),\n\t\t\t\ttemplate: templateId\n\t\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\t\t\ttemplateId\n\t\t\t\t\t )\n\t\t\t\t\t: undefined,\n\t\t\t\thasLoadedPost: hasFinishedResolution(\n\t\t\t\t\t'getEntityRecord',\n\t\t\t\t\tpostArgs\n\t\t\t\t),\n\t\t\t\terror: getResolutionError( 'getEntityRecord', postArgs )\n\t\t\t\t\t?.message,\n\t\t\t\tisBlockTheme: _isBlockTheme,\n\t\t\t\tshowGlobalStyles:\n\t\t\t\t\t_isBlockTheme &&\n\t\t\t\t\tuserCanEditGlobalStyles &&\n\t\t\t\t\t( currentPostType === 'wp_template' ||\n\t\t\t\t\t\trenderingMode === 'template-locked' ),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, templateId ]\n\t);\n\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst restoreBlockFromPath = useRestoreBlockFromPath();\n\n\t// Restore initial block selection if provided (e.g., from navigation)\n\tuseEffect( () => {\n\t\tif ( ! initialSelection || ! hasLoadedPost || ! post ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Use setTimeout to ensure blocks are fully rendered before selecting\n\t\tconst timeoutId = setTimeout( () => {\n\t\t\tconst clientId = restoreBlockFromPath( initialSelection );\n\t\t\tif ( clientId ) {\n\t\t\t\tselectBlock( clientId );\n\t\t\t}\n\t\t}, 0 );\n\n\t\treturn () => clearTimeout( timeoutId );\n\t}, [\n\t\tinitialSelection,\n\t\thasLoadedPost,\n\t\tpost,\n\t\tselectBlock,\n\t\trestoreBlockFromPath,\n\t] );\n\n\treturn (\n\t\t<>\n\t\t\t{ hasLoadedPost && ! post && (\n\t\t\t\t<Notice\n\t\t\t\t\tstatus={ !! error ? 'error' : 'warning' }\n\t\t\t\t\tisDismissible={ false }\n\t\t\t\t>\n\t\t\t\t\t{ ! error\n\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: error }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ !! post && (\n\t\t\t\t<ExperimentalEditorProvider\n\t\t\t\t\tpost={ post }\n\t\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<EditorInterface { ...props }>\n\t\t\t\t\t\t{ extraContent }\n\t\t\t\t\t</EditorInterface>\n\t\t\t\t\t{ children }\n\t\t\t\t\t<Sidebar\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraPanels={ extraSidebarPanels }\n\t\t\t\t\t/>\n\t\t\t\t\t<NotesSidebar />\n\t\t\t\t\t{ isBlockTheme && <GlobalStylesRenderer /> }\n\t\t\t\t\t{ showGlobalStyles && <GlobalStylesSidebar /> }\n\t\t\t\t</ExperimentalEditorProvider>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Editor;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ import { useSelect, useDispatch } from "@wordpress/data";
|
|
|
5
5
|
import { displayShortcut, isAppleOS } from "@wordpress/keycodes";
|
|
6
6
|
import { redo as redoIcon, undo as undoIcon } from "@wordpress/icons";
|
|
7
7
|
import { forwardRef } from "@wordpress/element";
|
|
8
|
-
import { store as editorStore } from "../../store";
|
|
8
|
+
import { store as editorStore } from "../../store/index.js";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
function EditorHistoryRedo(props, ref) {
|
|
11
11
|
const shortcut = isAppleOS() ? displayShortcut.primaryShift("z") : displayShortcut.primary("y");
|
|
@@ -5,7 +5,7 @@ import { useSelect, useDispatch } from "@wordpress/data";
|
|
|
5
5
|
import { displayShortcut } from "@wordpress/keycodes";
|
|
6
6
|
import { undo as undoIcon, redo as redoIcon } from "@wordpress/icons";
|
|
7
7
|
import { forwardRef } from "@wordpress/element";
|
|
8
|
-
import { store as editorStore } from "../../store";
|
|
8
|
+
import { store as editorStore } from "../../store/index.js";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
function EditorHistoryUndo(props, ref) {
|
|
11
11
|
const hasUndo = useSelect(
|
|
@@ -2,21 +2,22 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { InterfaceSkeleton, ComplementaryArea } from "@wordpress/interface";
|
|
4
4
|
import { useSelect } from "@wordpress/data";
|
|
5
|
-
import { __
|
|
5
|
+
import { __ } from "@wordpress/i18n";
|
|
6
6
|
import { store as preferencesStore } from "@wordpress/preferences";
|
|
7
7
|
import { BlockBreadcrumb, BlockToolbar } from "@wordpress/block-editor";
|
|
8
8
|
import { useViewportMatch } from "@wordpress/compose";
|
|
9
9
|
import { useState, useCallback } from "@wordpress/element";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
10
|
+
import { decodeEntities } from "@wordpress/html-entities";
|
|
11
|
+
import { store as editorStore } from "../../store/index.js";
|
|
12
|
+
import { unlock } from "../../lock-unlock.js";
|
|
13
|
+
import EditorNotices from "../editor-notices/index.js";
|
|
14
|
+
import Header from "../header/index.js";
|
|
15
|
+
import InserterSidebar from "../inserter-sidebar/index.js";
|
|
16
|
+
import ListViewSidebar from "../list-view-sidebar/index.js";
|
|
17
|
+
import SavePublishPanels from "../save-publish-panels/index.js";
|
|
18
|
+
import TextEditor from "../text-editor/index.js";
|
|
19
|
+
import VisualEditor from "../visual-editor/index.js";
|
|
20
|
+
import StylesCanvas from "../styles-canvas/index.js";
|
|
20
21
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
21
22
|
var interfaceLabels = {
|
|
22
23
|
/* translators: accessibility text for the editor top bar landmark region. */
|
|
@@ -49,7 +50,7 @@ function EditorInterface({
|
|
|
49
50
|
isDistractionFree,
|
|
50
51
|
isPreviewMode,
|
|
51
52
|
showBlockBreadcrumbs,
|
|
52
|
-
|
|
53
|
+
postTypeLabel,
|
|
53
54
|
stylesPath,
|
|
54
55
|
showStylebook
|
|
55
56
|
} = useSelect((select) => {
|
|
@@ -59,7 +60,6 @@ function EditorInterface({
|
|
|
59
60
|
select(editorStore)
|
|
60
61
|
);
|
|
61
62
|
const editorSettings = getEditorSettings();
|
|
62
|
-
const postTypeLabel = getPostTypeLabel();
|
|
63
63
|
let _mode = select(editorStore).getEditorMode();
|
|
64
64
|
if (!editorSettings.richEditingEnabled && _mode === "visual") {
|
|
65
65
|
_mode = "text";
|
|
@@ -74,10 +74,7 @@ function EditorInterface({
|
|
|
74
74
|
isDistractionFree: get("core", "distractionFree"),
|
|
75
75
|
isPreviewMode: editorSettings.isPreviewMode,
|
|
76
76
|
showBlockBreadcrumbs: get("core", "showBlockBreadcrumbs"),
|
|
77
|
-
|
|
78
|
-
// translators: Default label for the Document in the Block Breadcrumb.
|
|
79
|
-
postTypeLabel || _x("Document", "noun, breadcrumb")
|
|
80
|
-
),
|
|
77
|
+
postTypeLabel: getPostTypeLabel(),
|
|
81
78
|
stylesPath: getStylesPath(),
|
|
82
79
|
showStylebook: getShowStylebook()
|
|
83
80
|
};
|
|
@@ -141,7 +138,12 @@ function EditorInterface({
|
|
|
141
138
|
children
|
|
142
139
|
] })
|
|
143
140
|
] }),
|
|
144
|
-
footer: !isPreviewMode && !isDistractionFree && isLargeViewport && showBlockBreadcrumbs && mode === "visual" && /* @__PURE__ */ jsx(
|
|
141
|
+
footer: !isPreviewMode && !isDistractionFree && isLargeViewport && showBlockBreadcrumbs && mode === "visual" && /* @__PURE__ */ jsx(
|
|
142
|
+
BlockBreadcrumb,
|
|
143
|
+
{
|
|
144
|
+
rootLabelText: postTypeLabel ? decodeEntities(postTypeLabel) : void 0
|
|
145
|
+
}
|
|
146
|
+
),
|
|
145
147
|
actions: !isPreviewMode ? customSavePanel || /* @__PURE__ */ jsx(
|
|
146
148
|
SavePublishPanels,
|
|
147
149
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/editor-interface/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { InterfaceSkeleton, ComplementaryArea } from '@wordpress/interface';\nimport { useSelect } from '@wordpress/data';\nimport { __
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,mBAAmB,yBAAyB;AACrD,SAAS,iBAAiB;AAC1B,SAAS,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { InterfaceSkeleton, ComplementaryArea } from '@wordpress/interface';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { BlockBreadcrumb, BlockToolbar } from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useState, useCallback } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport EditorNotices from '../editor-notices';\nimport Header from '../header';\nimport InserterSidebar from '../inserter-sidebar';\nimport ListViewSidebar from '../list-view-sidebar';\nimport SavePublishPanels from '../save-publish-panels';\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport StylesCanvas from '../styles-canvas';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nexport default function EditorInterface( {\n\tclassName,\n\tchildren,\n\tforceIsDirty,\n\tcontentRef,\n\tdisableIframe,\n\tautoFocus,\n\tcustomSaveButton,\n\tcustomSavePanel,\n\tforceDisableBlockTools,\n\tiframeProps,\n} ) {\n\tconst {\n\t\tmode,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tisDistractionFree,\n\t\tisPreviewMode,\n\t\tshowBlockBreadcrumbs,\n\t\tpostTypeLabel,\n\t\tstylesPath,\n\t\tshowStylebook,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst { getStylesPath, getShowStylebook } = unlock(\n\t\t\tselect( editorStore )\n\t\t);\n\t\tconst editorSettings = getEditorSettings();\n\n\t\tlet _mode = select( editorStore ).getEditorMode();\n\t\tif ( ! editorSettings.richEditingEnabled && _mode === 'visual' ) {\n\t\t\t_mode = 'text';\n\t\t}\n\t\tif ( ! editorSettings.codeEditingEnabled && _mode === 'text' ) {\n\t\t\t_mode = 'visual';\n\t\t}\n\n\t\treturn {\n\t\t\tmode: _mode,\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editorStore ).isListViewOpened(),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tisPreviewMode: editorSettings.isPreviewMode,\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tpostTypeLabel: getPostTypeLabel(),\n\t\t\tstylesPath: getStylesPath(),\n\t\t\tshowStylebook: getShowStylebook(),\n\t\t};\n\t}, [] );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\tconst shouldShowStylesCanvas =\n\t\tshowStylebook || stylesPath?.startsWith( '/revisions' );\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\tclassName={ clsx( 'editor-editor-interface', className, {\n\t\t\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t\t\t\t'is-distraction-free': isDistractionFree && ! isPreviewMode,\n\t\t\t} ) }\n\t\t\tlabels={ {\n\t\t\t\t...interfaceLabels,\n\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t} }\n\t\t\theader={\n\t\t\t\t! isPreviewMode && (\n\t\t\t\t\t<Header\n\t\t\t\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcustomSaveButton={ customSaveButton }\n\t\t\t\t\t\tforceDisableBlockTools={ forceDisableBlockTools }\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\tsecondarySidebar={\n\t\t\t\t! isPreviewMode &&\n\t\t\t\tmode === 'visual' &&\n\t\t\t\t( ( isInserterOpened && <InserterSidebar /> ) ||\n\t\t\t\t\t( isListViewOpened && <ListViewSidebar /> ) )\n\t\t\t}\n\t\t\tsidebar={\n\t\t\t\t! isPreviewMode &&\n\t\t\t\t! isDistractionFree && <ComplementaryArea.Slot scope=\"core\" />\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ ! isDistractionFree && ! isPreviewMode && (\n\t\t\t\t\t\t<EditorNotices />\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ shouldShowStylesCanvas ? (\n\t\t\t\t\t\t<StylesCanvas />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! isPreviewMode && mode === 'text' && (\n\t\t\t\t\t\t\t\t<TextEditor\n\t\t\t\t\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\t\t\t\t\tautoFocus={ autoFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! isPreviewMode &&\n\t\t\t\t\t\t\t\t! isLargeViewport &&\n\t\t\t\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ( isPreviewMode || mode === 'visual' ) && (\n\t\t\t\t\t\t\t\t<VisualEditor\n\t\t\t\t\t\t\t\t\tcontentRef={ contentRef }\n\t\t\t\t\t\t\t\t\tdisableIframe={ disableIframe }\n\t\t\t\t\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\t\t\t\t\tautoFocus={ autoFocus }\n\t\t\t\t\t\t\t\t\tiframeProps={ iframeProps }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t! isPreviewMode &&\n\t\t\t\t! isDistractionFree &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t<BlockBreadcrumb\n\t\t\t\t\t\trootLabelText={\n\t\t\t\t\t\t\tpostTypeLabel\n\t\t\t\t\t\t\t\t? decodeEntities( postTypeLabel )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t\tactions={\n\t\t\t\t! isPreviewMode\n\t\t\t\t\t? customSavePanel || (\n\t\t\t\t\t\t\t<SavePublishPanels\n\t\t\t\t\t\t\t\tcloseEntitiesSavedStates={\n\t\t\t\t\t\t\t\t\tcloseEntitiesSavedStates\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tforceIsDirtyPublishPanel={ forceIsDirty }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t/>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { NoticeList } from "@wordpress/components";
|
|
3
3
|
import { useDispatch, useSelect } from "@wordpress/data";
|
|
4
4
|
import { store as noticesStore } from "@wordpress/notices";
|
|
5
|
-
import TemplateValidationNotice from "../template-validation-notice";
|
|
5
|
+
import TemplateValidationNotice from "../template-validation-notice/index.js";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
function EditorNotices() {
|
|
8
8
|
const { notices } = useSelect(
|
|
@@ -4,9 +4,9 @@ import { __ } from "@wordpress/i18n";
|
|
|
4
4
|
import { useSelect } from "@wordpress/data";
|
|
5
5
|
import { store as coreStore } from "@wordpress/core-data";
|
|
6
6
|
import { decodeEntities } from "@wordpress/html-entities";
|
|
7
|
-
import { store as editorStore } from "../../store";
|
|
8
|
-
import { unlock } from "../../lock-unlock";
|
|
9
|
-
import { getTemplateInfo } from "../../utils/get-template-info";
|
|
7
|
+
import { store as editorStore } from "../../store/index.js";
|
|
8
|
+
import { unlock } from "../../lock-unlock.js";
|
|
9
|
+
import { getTemplateInfo } from "../../utils/get-template-info.js";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
function EntityRecordItem({ record, checked, onChange }) {
|
|
12
12
|
const { name, kind, title, key } = record;
|
|
@@ -42,7 +42,6 @@ function EntityRecordItem({ record, checked, onChange }) {
|
|
|
42
42
|
/* @__PURE__ */ jsx(PanelRow, { children: /* @__PURE__ */ jsx(
|
|
43
43
|
CheckboxControl,
|
|
44
44
|
{
|
|
45
|
-
__nextHasNoMarginBottom: true,
|
|
46
45
|
label: decodeEntities(entityRecordTitle) || __("Untitled"),
|
|
47
46
|
checked,
|
|
48
47
|
onChange,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/entities-saved-states/entity-record-item.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { CheckboxControl, PanelRow } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { getTemplateInfo } from '../../utils/get-template-info';\n\nexport default function EntityRecordItem( { record, checked, onChange } ) {\n\tconst { name, kind, title, key } = record;\n\n\t// Handle templates that might use default descriptive titles.\n\tconst { entityRecordTitle, hasPostMetaChanges } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( 'postType' !== kind || 'wp_template' !== name ) {\n\t\t\t\treturn {\n\t\t\t\t\tentityRecordTitle: title,\n\t\t\t\t\thasPostMetaChanges: unlock(\n\t\t\t\t\t\tselect( editorStore )\n\t\t\t\t\t).hasPostMetaChanges( name, key ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst template = select( coreStore ).getEditedEntityRecord(\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\tkey\n\t\t\t);\n\n\t\t\tconst { default_template_types: templateTypes = [] } =\n\t\t\t\tselect( coreStore ).getCurrentTheme() ?? {};\n\n\t\t\treturn {\n\t\t\t\tentityRecordTitle: getTemplateInfo( {\n\t\t\t\t\ttemplate,\n\t\t\t\t\ttemplateTypes,\n\t\t\t\t} ).title,\n\t\t\t\thasPostMetaChanges: unlock(\n\t\t\t\t\tselect( editorStore )\n\t\t\t\t).hasPostMetaChanges( name, key ),\n\t\t\t};\n\t\t},\n\t\t[ name, kind, title, key ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<PanelRow>\n\t\t\t\t<CheckboxControl\n\t\t\t\t\
|
|
5
|
-
"mappings": ";AAGA,SAAS,iBAAiB,gBAAgB;AAC1C,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AACnC,SAAS,sBAAsB;AAK/B,SAAS,SAAS,mBAAmB;AACrC,SAAS,cAAc;AACvB,SAAS,uBAAuB;AAwC9B,mBAEE,KAFF;AAtCa,SAAR,iBAAmC,EAAE,QAAQ,SAAS,SAAS,GAAI;AACzE,QAAM,EAAE,MAAM,MAAM,OAAO,IAAI,IAAI;AAGnC,QAAM,EAAE,mBAAmB,mBAAmB,IAAI;AAAA,IACjD,CAAE,WAAY;AACb,UAAK,eAAe,QAAQ,kBAAkB,MAAO;AACpD,eAAO;AAAA,UACN,mBAAmB;AAAA,UACnB,oBAAoB;AAAA,YACnB,OAAQ,WAAY;AAAA,UACrB,EAAE,mBAAoB,MAAM,GAAI;AAAA,QACjC;AAAA,MACD;AAEA,YAAM,WAAW,OAAQ,SAAU,EAAE;AAAA,QACpC;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAEA,YAAM,EAAE,wBAAwB,gBAAgB,CAAC,EAAE,IAClD,OAAQ,SAAU,EAAE,gBAAgB,KAAK,CAAC;AAE3C,aAAO;AAAA,QACN,mBAAmB,gBAAiB;AAAA,UACnC;AAAA,UACA;AAAA,QACD,CAAE,EAAE;AAAA,QACJ,oBAAoB;AAAA,UACnB,OAAQ,WAAY;AAAA,QACrB,EAAE,mBAAoB,MAAM,GAAI;AAAA,MACjC;AAAA,IACD;AAAA,IACA,CAAE,MAAM,MAAM,OAAO,GAAI;AAAA,EAC1B;AAEA,SACC,iCACC;AAAA,wBAAC,YACA;AAAA,MAAC;AAAA;AAAA,QACA,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { CheckboxControl, PanelRow } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { getTemplateInfo } from '../../utils/get-template-info';\n\nexport default function EntityRecordItem( { record, checked, onChange } ) {\n\tconst { name, kind, title, key } = record;\n\n\t// Handle templates that might use default descriptive titles.\n\tconst { entityRecordTitle, hasPostMetaChanges } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( 'postType' !== kind || 'wp_template' !== name ) {\n\t\t\t\treturn {\n\t\t\t\t\tentityRecordTitle: title,\n\t\t\t\t\thasPostMetaChanges: unlock(\n\t\t\t\t\t\tselect( editorStore )\n\t\t\t\t\t).hasPostMetaChanges( name, key ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst template = select( coreStore ).getEditedEntityRecord(\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\tkey\n\t\t\t);\n\n\t\t\tconst { default_template_types: templateTypes = [] } =\n\t\t\t\tselect( coreStore ).getCurrentTheme() ?? {};\n\n\t\t\treturn {\n\t\t\t\tentityRecordTitle: getTemplateInfo( {\n\t\t\t\t\ttemplate,\n\t\t\t\t\ttemplateTypes,\n\t\t\t\t} ).title,\n\t\t\t\thasPostMetaChanges: unlock(\n\t\t\t\t\tselect( editorStore )\n\t\t\t\t).hasPostMetaChanges( name, key ),\n\t\t\t};\n\t\t},\n\t\t[ name, kind, title, key ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<PanelRow>\n\t\t\t\t<CheckboxControl\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tdecodeEntities( entityRecordTitle ) || __( 'Untitled' )\n\t\t\t\t\t}\n\t\t\t\t\tchecked={ checked }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tclassName=\"entities-saved-states__change-control\"\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t{ hasPostMetaChanges && (\n\t\t\t\t<ul className=\"entities-saved-states__changes\">\n\t\t\t\t\t<li>{ __( 'Post Meta.' ) }</li>\n\t\t\t\t</ul>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,iBAAiB,gBAAgB;AAC1C,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AACnC,SAAS,sBAAsB;AAK/B,SAAS,SAAS,mBAAmB;AACrC,SAAS,cAAc;AACvB,SAAS,uBAAuB;AAwC9B,mBAEE,KAFF;AAtCa,SAAR,iBAAmC,EAAE,QAAQ,SAAS,SAAS,GAAI;AACzE,QAAM,EAAE,MAAM,MAAM,OAAO,IAAI,IAAI;AAGnC,QAAM,EAAE,mBAAmB,mBAAmB,IAAI;AAAA,IACjD,CAAE,WAAY;AACb,UAAK,eAAe,QAAQ,kBAAkB,MAAO;AACpD,eAAO;AAAA,UACN,mBAAmB;AAAA,UACnB,oBAAoB;AAAA,YACnB,OAAQ,WAAY;AAAA,UACrB,EAAE,mBAAoB,MAAM,GAAI;AAAA,QACjC;AAAA,MACD;AAEA,YAAM,WAAW,OAAQ,SAAU,EAAE;AAAA,QACpC;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAEA,YAAM,EAAE,wBAAwB,gBAAgB,CAAC,EAAE,IAClD,OAAQ,SAAU,EAAE,gBAAgB,KAAK,CAAC;AAE3C,aAAO;AAAA,QACN,mBAAmB,gBAAiB;AAAA,UACnC;AAAA,UACA;AAAA,QACD,CAAE,EAAE;AAAA,QACJ,oBAAoB;AAAA,UACnB,OAAQ,WAAY;AAAA,QACrB,EAAE,mBAAoB,MAAM,GAAI;AAAA,MACjC;AAAA,IACD;AAAA,IACA,CAAE,MAAM,MAAM,OAAO,GAAI;AAAA,EAC1B;AAEA,SACC,iCACC;AAAA,wBAAC,YACA;AAAA,MAAC;AAAA;AAAA,QACA,OACC,eAAgB,iBAAkB,KAAK,GAAI,UAAW;AAAA,QAEvD;AAAA,QACA;AAAA,QACA,WAAU;AAAA;AAAA,IACX,GACD;AAAA,IACE,sBACD,oBAAC,QAAG,WAAU,kCACb,8BAAC,QAAK,aAAI,YAAa,GAAG,GAC3B;AAAA,KAEF;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,7 +4,7 @@ import { useSelect } from "@wordpress/data";
|
|
|
4
4
|
import { PanelBody, PanelRow } from "@wordpress/components";
|
|
5
5
|
import { store as coreStore } from "@wordpress/core-data";
|
|
6
6
|
import { getGlobalStylesChanges } from "@wordpress/global-styles-engine";
|
|
7
|
-
import EntityRecordItem from "./entity-record-item";
|
|
7
|
+
import EntityRecordItem from "./entity-record-item.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
function getEntityDescription(entity, count) {
|
|
10
10
|
switch (entity) {
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
useInstanceId
|
|
13
13
|
} from "@wordpress/compose";
|
|
14
14
|
import { useDispatch } from "@wordpress/data";
|
|
15
|
-
import EntityTypeList from "./entity-type-list";
|
|
16
|
-
import { useIsDirty } from "./hooks/use-is-dirty";
|
|
17
|
-
import { store as editorStore } from "../../store";
|
|
18
|
-
import { unlock } from "../../lock-unlock";
|
|
15
|
+
import EntityTypeList from "./entity-type-list.js";
|
|
16
|
+
import { useIsDirty } from "./hooks/use-is-dirty.js";
|
|
17
|
+
import { store as editorStore } from "../../store/index.js";
|
|
18
|
+
import { unlock } from "../../lock-unlock.js";
|
|
19
19
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
20
|
function identity(values) {
|
|
21
21
|
return values;
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { select } from "@wordpress/data";
|
|
10
10
|
import { useCopyToClipboard } from "@wordpress/compose";
|
|
11
11
|
import { doAction } from "@wordpress/hooks";
|
|
12
|
-
import { store as editorStore } from "../../store";
|
|
12
|
+
import { store as editorStore } from "../../store/index.js";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
function getContent() {
|
|
15
15
|
try {
|
|
@@ -3,7 +3,7 @@ import { useShortcut } from "@wordpress/keyboard-shortcuts";
|
|
|
3
3
|
import { useDispatch, useSelect } from "@wordpress/data";
|
|
4
4
|
import { store as interfaceStore } from "@wordpress/interface";
|
|
5
5
|
import { store as blockEditorStore } from "@wordpress/block-editor";
|
|
6
|
-
import { store as editorStore } from "../../store";
|
|
6
|
+
import { store as editorStore } from "../../store/index.js";
|
|
7
7
|
function EditorKeyboardShortcuts() {
|
|
8
8
|
const isModeToggleDisabled = useSelect((select) => {
|
|
9
9
|
const { richEditingEnabled, codeEditingEnabled } = select(editorStore).getEditorSettings();
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import { store as coreStore } from "@wordpress/core-data";
|
|
9
9
|
import { useSelect, useDispatch } from "@wordpress/data";
|
|
10
10
|
import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
|
|
11
|
-
import { unlock } from "../../lock-unlock";
|
|
11
|
+
import { unlock } from "../../lock-unlock.js";
|
|
12
12
|
var { cleanEmptyObject } = unlock(blockEditorPrivateApis);
|
|
13
13
|
function useGlobalStylesUserConfig() {
|
|
14
14
|
const { globalStylesId, isReady, settings, styles, _links } = useSelect(
|
|
@@ -4,10 +4,10 @@ import { useSelect } from "@wordpress/data";
|
|
|
4
4
|
import { useMemo } from "@wordpress/element";
|
|
5
5
|
import { GlobalStylesUI } from "@wordpress/global-styles-ui";
|
|
6
6
|
import { uploadMedia } from "@wordpress/media-utils";
|
|
7
|
-
import { store as editorStore } from "../../store";
|
|
8
|
-
import { GlobalStylesBlockLink } from "./block-link";
|
|
9
|
-
import { useGlobalStyles } from "./hooks";
|
|
10
|
-
import { useGlobalStyles as useGlobalStyles2, useStyle, useSetting } from "./hooks";
|
|
7
|
+
import { store as editorStore } from "../../store/index.js";
|
|
8
|
+
import { GlobalStylesBlockLink } from "./block-link.js";
|
|
9
|
+
import { useGlobalStyles } from "./hooks.js";
|
|
10
|
+
import { useGlobalStyles as useGlobalStyles2, useStyle, useSetting } from "./hooks.js";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
function useServerData() {
|
|
13
13
|
const {
|
|
@@ -5,7 +5,7 @@ import { __ } from "@wordpress/i18n";
|
|
|
5
5
|
import { store as preferencesStore } from "@wordpress/preferences";
|
|
6
6
|
import { moreVertical } from "@wordpress/icons";
|
|
7
7
|
import { store as coreStore } from "@wordpress/core-data";
|
|
8
|
-
import { useGlobalStyles } from "./hooks";
|
|
8
|
+
import { useGlobalStyles } from "./hooks.js";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
function GlobalStylesActionMenu({
|
|
11
11
|
hideWelcomeGuide = false,
|
|
@@ -4,7 +4,7 @@ import { store as coreStore } from "@wordpress/core-data";
|
|
|
4
4
|
import { useSelect, useDispatch } from "@wordpress/data";
|
|
5
5
|
import { useMemo, useCallback } from "@wordpress/element";
|
|
6
6
|
import { mergeGlobalStyles } from "@wordpress/global-styles-engine";
|
|
7
|
-
import { unlock } from "../../lock-unlock";
|
|
7
|
+
import { unlock } from "../../lock-unlock.js";
|
|
8
8
|
var { cleanEmptyObject } = unlock(blockEditorPrivateApis);
|
|
9
9
|
function useGlobalStylesUserConfig() {
|
|
10
10
|
const { globalStylesId, isReady, settings, styles, _links } = useSelect(
|