@wordpress/editor 14.36.1-next.8fd3f8831.0 → 14.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/bindings/api.js +51 -0
- package/build/bindings/pattern-overrides.js +99 -0
- package/build/bindings/post-data.js +137 -0
- package/build/bindings/post-meta.js +129 -0
- package/build/bindings/term-data.js +159 -0
- package/build/components/autocompleters/index.js +41 -0
- package/build/components/autocompleters/user.js +79 -0
- package/build/components/autosave-monitor/index.js +117 -0
- package/build/components/block-removal-warnings/index.js +96 -0
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +55 -0
- package/build/components/block-visibility/index.js +125 -0
- package/build/components/blog-title/index.js +141 -0
- package/build/components/character-count/index.js +36 -0
- package/build/components/collab-sidebar/add-comment.js +122 -0
- package/build/components/collab-sidebar/comment-author-info.js +106 -0
- package/build/components/collab-sidebar/comment-form.js +111 -0
- package/build/components/collab-sidebar/comment-indicator-toolbar.js +100 -0
- package/build/components/collab-sidebar/comment-menu-item.js +78 -0
- package/build/components/collab-sidebar/comments.js +810 -0
- package/build/components/collab-sidebar/constants.js +37 -0
- package/build/components/collab-sidebar/hooks.js +363 -0
- package/build/components/collab-sidebar/hooks.js.map +7 -0
- package/build/components/collab-sidebar/index.js +239 -0
- package/build/components/collab-sidebar/utils.js +112 -0
- package/build/components/collapsible-block-toolbar/index.js +87 -0
- package/build/components/commands/index.js +412 -0
- package/build/components/deprecated.js +345 -0
- package/build/components/document-bar/index.js +215 -0
- package/build/components/document-bar/useEditedSectionDetails.js +95 -0
- package/build/components/document-outline/check.js +38 -0
- package/build/components/document-outline/index.js +217 -0
- package/build/components/document-outline/item.js +88 -0
- package/build/components/document-tools/index.js +177 -0
- package/build/components/editor/index.js +148 -0
- package/build/components/editor/index.js.map +7 -0
- package/build/components/editor-history/redo.js +57 -0
- package/build/components/editor-history/undo.js +56 -0
- package/build/components/editor-interface/index.js +191 -0
- package/build/components/editor-interface/index.js.map +7 -0
- package/build/components/editor-notices/index.js +80 -0
- package/build/components/editor-snackbars/index.js +47 -0
- package/build/components/entities-saved-states/entity-record-item.js +79 -0
- package/build/components/entities-saved-states/entity-record-item.js.map +7 -0
- package/build/components/entities-saved-states/entity-type-list.js +135 -0
- package/build/components/entities-saved-states/hooks/use-is-dirty.js +88 -0
- package/build/components/entities-saved-states/index.js +216 -0
- package/build/components/error-boundary/index.js +84 -0
- package/build/components/global-keyboard-shortcuts/index.js +106 -0
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js +156 -0
- package/build/components/global-styles/block-link.js +72 -0
- package/build/components/global-styles/header.js +56 -0
- package/build/components/global-styles/hooks.js +178 -0
- package/build/components/global-styles/index.js +140 -0
- package/build/components/global-styles/menu.js +97 -0
- package/build/components/global-styles-provider/index.js +181 -0
- package/build/components/global-styles-renderer/index.js +57 -0
- package/build/components/global-styles-sidebar/default-sidebar.js +68 -0
- package/build/components/global-styles-sidebar/index.js +184 -0
- package/build/components/global-styles-sidebar/welcome-guide-image.js +39 -0
- package/build/components/global-styles-sidebar/welcome-guide.js +145 -0
- package/build/components/header/back-button.js +52 -0
- package/build/components/header/index.js +211 -0
- package/build/components/index.js +316 -0
- package/build/components/index.js.map +7 -0
- package/build/components/inserter-sidebar/index.js +108 -0
- package/build/components/keyboard-shortcut-help-modal/config.js +88 -0
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +69 -0
- package/build/components/keyboard-shortcut-help-modal/index.js +187 -0
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +82 -0
- package/build/components/list-view-sidebar/index.js +140 -0
- package/build/components/list-view-sidebar/list-view-outline.js +62 -0
- package/build/components/local-autosave-monitor/index.js +170 -0
- package/build/components/media-categories/index.js +202 -0
- package/build/components/mode-switcher/index.js +93 -0
- package/build/components/more-menu/copy-content-menu-item.js +65 -0
- package/build/components/more-menu/index.js +190 -0
- package/build/components/more-menu/tools-more-menu-group.js +31 -0
- package/build/components/more-menu/view-more-menu-group.js +34 -0
- package/build/components/page-attributes/check.js +47 -0
- package/build/components/page-attributes/order.js +76 -0
- package/build/components/page-attributes/panel.js +60 -0
- package/build/components/page-attributes/parent.js +290 -0
- package/build/components/page-attributes/parent.js.map +7 -0
- package/build/components/pattern-duplicate-modal/index.js +77 -0
- package/build/components/pattern-overrides-panel/index.js +42 -0
- package/build/components/pattern-rename-modal/index.js +70 -0
- package/build/components/plugin-document-setting-panel/index.js +90 -0
- package/build/components/plugin-more-menu-item/index.js +42 -0
- package/build/components/plugin-post-publish-panel/index.js +51 -0
- package/build/components/plugin-post-status-info/index.js +32 -0
- package/build/components/plugin-pre-publish-panel/index.js +51 -0
- package/build/components/plugin-preview-menu-item/index.js +42 -0
- package/build/components/plugin-sidebar/index.js +39 -0
- package/build/components/plugin-sidebar-more-menu-item/index.js +38 -0
- package/build/components/post-actions/actions.js +156 -0
- package/build/components/post-actions/index.js +148 -0
- package/build/components/post-actions/set-as-homepage.js +162 -0
- package/build/components/post-actions/set-as-posts-page.js +155 -0
- package/build/components/post-author/check.js +53 -0
- package/build/components/post-author/combobox.js +60 -0
- package/build/components/post-author/combobox.js.map +7 -0
- package/build/components/post-author/constants.js +42 -0
- package/build/components/post-author/hook.js +87 -0
- package/build/components/post-author/index.js +54 -0
- package/build/components/post-author/panel.js +118 -0
- package/build/components/post-author/select.js +53 -0
- package/build/components/post-author/select.js.map +7 -0
- package/build/components/post-card-panel/index.js +142 -0
- package/build/components/post-comments/index.js +68 -0
- package/build/components/post-content-information/index.js +81 -0
- package/build/components/post-discussion/panel.js +146 -0
- package/build/components/post-excerpt/check.js +42 -0
- package/build/components/post-excerpt/index.js +88 -0
- package/build/components/post-excerpt/index.js.map +7 -0
- package/build/components/post-excerpt/panel.js +200 -0
- package/build/components/post-excerpt/plugin.js +34 -0
- package/build/components/post-featured-image/check.js +43 -0
- package/build/components/post-featured-image/index.js +308 -0
- package/build/components/post-featured-image/panel.js +76 -0
- package/build/components/post-fields/index.js +49 -0
- package/build/components/post-format/check.js +50 -0
- package/build/components/post-format/index.js +126 -0
- package/build/components/post-format/panel.js +104 -0
- package/build/components/post-last-edited-panel/index.js +47 -0
- package/build/components/post-last-revision/check.js +54 -0
- package/build/components/post-last-revision/index.js +95 -0
- package/build/components/post-last-revision/panel.js +44 -0
- package/build/components/post-locked-modal/index.js +236 -0
- package/build/components/post-panel-row/index.js +54 -0
- package/build/components/post-panel-section/index.js +43 -0
- package/build/components/post-pending-status/check.js +47 -0
- package/build/components/post-pending-status/index.js +68 -0
- package/build/components/post-pending-status/index.js.map +7 -0
- package/build/components/post-pingbacks/index.js +60 -0
- package/build/components/post-pingbacks/index.js.map +7 -0
- package/build/components/post-preview-button/index.js +180 -0
- package/build/components/post-publish-button/index.js +209 -0
- package/build/components/post-publish-button/label.js +83 -0
- package/build/components/post-publish-button/post-publish-button-or-toggle.js +91 -0
- package/build/components/post-publish-panel/index.js +195 -0
- package/build/components/post-publish-panel/index.js.map +7 -0
- package/build/components/post-publish-panel/maybe-category-panel.js +93 -0
- package/build/components/post-publish-panel/maybe-post-format-panel.js +91 -0
- package/build/components/post-publish-panel/maybe-tags-panel.js +103 -0
- package/build/components/post-publish-panel/maybe-upload-media.js +220 -0
- package/build/components/post-publish-panel/media-util.js +72 -0
- package/build/components/post-publish-panel/postpublish.js +180 -0
- package/build/components/post-publish-panel/postpublish.js.map +7 -0
- package/build/components/post-publish-panel/prepublish.js +165 -0
- package/build/components/post-saved-state/index.js +156 -0
- package/build/components/post-schedule/check.js +37 -0
- package/build/components/post-schedule/index.js +109 -0
- package/build/components/post-schedule/label.js +118 -0
- package/build/components/post-schedule/panel.js +100 -0
- package/build/components/post-status/index.js +275 -0
- package/build/components/post-status/index.js.map +7 -0
- package/build/components/post-sticky/check.js +41 -0
- package/build/components/post-sticky/index.js +59 -0
- package/build/components/post-sticky/index.js.map +7 -0
- package/build/components/post-sticky/panel.js +49 -0
- package/build/components/post-switch-to-draft-button/index.js +102 -0
- package/build/components/post-sync-status/index.js +56 -0
- package/build/components/post-taxonomies/check.js +46 -0
- package/build/components/post-taxonomies/flat-term-selector.js +247 -0
- package/build/components/post-taxonomies/hierarchical-term-selector.js +378 -0
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +7 -0
- package/build/components/post-taxonomies/index.js +76 -0
- package/build/components/post-taxonomies/most-used-terms.js +86 -0
- package/build/components/post-taxonomies/panel.js +83 -0
- package/build/components/post-template/block-theme.js +198 -0
- package/build/components/post-template/classic-theme.js +224 -0
- package/build/components/post-template/classic-theme.js.map +7 -0
- package/build/components/post-template/create-new-template-modal.js +163 -0
- package/build/components/post-template/create-new-template-modal.js.map +7 -0
- package/build/components/post-template/create-new-template.js +79 -0
- package/build/components/post-template/hooks.js +111 -0
- package/build/components/post-template/panel.js +87 -0
- package/build/components/post-template/reset-default-template.js +57 -0
- package/build/components/post-template/swap-template-button.js +118 -0
- package/build/components/post-template/swap-template-button.js.map +7 -0
- package/build/components/post-text-editor/index.js +99 -0
- package/build/components/post-title/constants.js +34 -0
- package/build/components/post-title/index.js +180 -0
- package/build/components/post-title/post-title-raw.js +92 -0
- package/build/components/post-title/post-title-raw.js.map +7 -0
- package/build/components/post-title/use-post-title-focus.js +56 -0
- package/build/components/post-title/use-post-title.js +41 -0
- package/build/components/post-transform-panel/hooks.js +103 -0
- package/build/components/post-transform-panel/index.js +103 -0
- package/build/components/post-trash/check.js +51 -0
- package/build/components/post-trash/index.js +96 -0
- package/build/components/post-type-support-check/index.js +53 -0
- package/build/components/post-url/check.js +51 -0
- package/build/components/post-url/index.js +179 -0
- package/build/components/post-url/label.js +44 -0
- package/build/components/post-url/panel.js +134 -0
- package/build/components/post-view-link/index.js +62 -0
- package/build/components/post-visibility/check.js +34 -0
- package/build/components/post-visibility/index.js +99 -0
- package/build/components/post-visibility/index.js.map +7 -0
- package/build/components/post-visibility/label.js +44 -0
- package/build/components/post-visibility/utils.js +48 -0
- package/build/components/posts-per-page/index.js +127 -0
- package/build/components/preferences-modal/enable-panel.js +56 -0
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +45 -0
- package/build/components/preferences-modal/enable-publish-sidebar.js +46 -0
- package/build/components/preferences-modal/index.js +406 -0
- package/build/components/preview-dropdown/index.js +206 -0
- package/build/components/provider/disable-non-page-content-blocks.js +112 -0
- package/build/components/provider/index.js +311 -0
- package/build/components/provider/index.js.map +7 -0
- package/build/components/provider/navigation-block-editing-mode.js +45 -0
- package/build/components/provider/use-auto-switch-editor-sidebars.js +63 -0
- package/build/components/provider/use-block-editor-settings.js +337 -0
- package/build/components/provider/use-block-editor-settings.js.map +7 -0
- package/build/components/provider/use-hide-blocks-from-inserter.js +75 -0
- package/build/components/provider/use-post-content-blocks.js +55 -0
- package/build/components/provider/with-registry-provider.js +66 -0
- package/build/components/resizable-editor/index.js +111 -0
- package/build/components/resizable-editor/resize-handle.js +71 -0
- package/build/components/save-publish-panels/index.js +134 -0
- package/build/components/sidebar/constants.js +34 -0
- package/build/components/sidebar/header.js +65 -0
- package/build/components/sidebar/header.js.map +7 -0
- package/build/components/sidebar/index.js +180 -0
- package/build/components/sidebar/post-summary.js +119 -0
- package/build/components/site-discussion/index.js +144 -0
- package/build/components/start-page-options/index.js +177 -0
- package/build/components/start-page-options/index.js.map +7 -0
- package/build/components/start-template-options/index.js +209 -0
- package/build/components/style-book/categories.js +88 -0
- package/build/components/style-book/color-examples.js +66 -0
- package/build/components/style-book/constants.js +321 -0
- package/build/components/style-book/duotone-examples.js +70 -0
- package/build/components/style-book/examples.js +239 -0
- package/build/components/style-book/index.js +627 -0
- package/build/components/style-book/types.js +19 -0
- package/build/components/styles-canvas/index.js +140 -0
- package/build/components/styles-canvas/revisions.js +123 -0
- package/build/components/styles-canvas/style-book.js +70 -0
- package/build/components/table-of-contents/index.js +83 -0
- package/build/components/table-of-contents/panel.js +113 -0
- package/build/components/template-content-panel/index.js +84 -0
- package/build/components/template-part-content-panel/index.js +69 -0
- package/build/components/template-part-menu-items/convert-to-regular.js +52 -0
- package/build/components/template-part-menu-items/convert-to-template-part.js +89 -0
- package/build/components/template-part-menu-items/index.js +71 -0
- package/build/components/template-validation-notice/index.js +81 -0
- package/build/components/text-editor/index.js +82 -0
- package/build/components/theme-support-check/index.js +48 -0
- package/build/components/time-to-read/index.js +60 -0
- package/build/components/unsaved-changes-warning/index.js +49 -0
- package/build/components/visual-editor/edit-template-blocks-notification.js +91 -0
- package/build/components/visual-editor/index.js +421 -0
- package/build/components/visual-editor/use-edit-content-only-section-exit.js +64 -0
- package/build/components/visual-editor/use-padding-appender.js +75 -0
- package/build/components/visual-editor/use-select-nearest-editable-block.js +96 -0
- package/build/components/visual-editor/use-zoom-out-mode-exit.js +60 -0
- package/build/components/word-count/index.js +39 -0
- package/build/components/zoom-out-toggle/index.js +109 -0
- package/build/dataviews/api.js +71 -0
- package/build/dataviews/fields/content-preview/content-preview-view.js +95 -0
- package/build/dataviews/fields/content-preview/index.js +46 -0
- package/build/dataviews/store/private-actions.js +194 -0
- package/build/dataviews/store/private-selectors.js +44 -0
- package/build/dataviews/store/reducer.js +98 -0
- package/build/hooks/custom-sources-backwards-compatibility.js +79 -0
- package/build/hooks/default-autocompleters.js +15 -0
- package/build/hooks/index.js +11 -0
- package/build/hooks/media-upload.js +105 -0
- package/build/hooks/navigation-link-view-button.js +56 -0
- package/build/hooks/pattern-overrides.js +64 -0
- package/build/hooks/push-changes-to-global-styles/index.js +324 -0
- package/build/hooks/push-changes-to-global-styles/index.js.map +7 -0
- package/build/hooks/template-part-navigation-edit-button.js +90 -0
- package/build/hooks/use-global-styles-output.js +76 -0
- package/build/index.js +46 -0
- package/build/index.js.map +7 -0
- package/build/lock-unlock.js +37 -0
- package/build/private-apis.js +89 -0
- package/build/private-apis.js.map +7 -0
- package/build/store/actions.js +771 -0
- package/build/store/constants.js +83 -0
- package/build/store/defaults.js +39 -0
- package/build/store/index.js +61 -0
- package/build/store/local-autosave.js +53 -0
- package/build/store/private-actions.js +417 -0
- package/build/store/private-actions.js.map +7 -0
- package/build/store/private-selectors.js +231 -0
- package/build/store/reducer.js +313 -0
- package/build/store/selectors.js +1020 -0
- package/build/store/utils/is-template-revertable.js +33 -0
- package/build/store/utils/notice-builder.js +132 -0
- package/build/store/utils/notice-builder.js.map +7 -0
- package/build/utils/get-item-title.js +43 -0
- package/build/utils/get-template-info.js +53 -0
- package/build/utils/get-template-part-icon.js +46 -0
- package/build/utils/index.js +47 -0
- package/build/utils/media-sideload/index.js +30 -0
- package/build/utils/media-upload/index.js +104 -0
- package/build/utils/pageTypeBadge.js +49 -0
- package/build/utils/search-templates.js +75 -0
- package/build/utils/set-nested-value.js +45 -0
- package/build/utils/terms.js +84 -0
- package/build/utils/url.js +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/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 +7 -7
- package/build-module/components/collab-sidebar/hooks.js +7 -11
- 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 +7 -7
- package/build-module/components/document-bar/useEditedSectionDetails.js +1 -1
- 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 +9 -33
- 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 +18 -20
- 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 +4 -3
- 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 -3
- 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 +3 -2
- 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 +3 -2
- package/build-module/components/post-author/select.js.map +2 -2
- package/build-module/components/post-card-panel/index.js +6 -6
- 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 +2 -1
- 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 +3 -2
- package/build-module/components/post-pending-status/index.js.map +2 -2
- package/build-module/components/post-pingbacks/index.js +2 -1
- 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 +5 -4
- 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 +2 -2
- package/build-module/components/post-publish-panel/maybe-upload-media.js +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +3 -2
- 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 +7 -5
- 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 +4 -3
- 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 +3 -3
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +7 -3
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +2 -2
- package/build-module/components/post-taxonomies/index.js +3 -3
- 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 +5 -4
- package/build-module/components/post-template/classic-theme.js.map +2 -2
- package/build-module/components/post-template/create-new-template-modal.js +3 -2
- package/build-module/components/post-template/create-new-template-modal.js.map +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 +3 -2
- 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 +5 -4
- 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 +3 -2
- 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 +16 -17
- package/build-module/components/provider/index.js.map +2 -2
- package/build-module/components/provider/use-block-editor-settings.js +8 -24
- 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 +4 -7
- 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 +9 -9
- 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 +4 -4
- 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 +4 -3
- 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 +19 -26
- 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 +4 -4
- package/build-module/store/utils/notice-builder.js.map +1 -1
- package/build-module/utils/get-template-info.js +1 -1
- 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 +61 -310
- package/build-style/style.css +60 -313
- package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
- package/build-types/components/editor/index.d.ts +1 -2
- 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/page-attributes/parent.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/hierarchical-term-selector.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-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/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/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/package.json +44 -53
- package/src/components/collab-sidebar/hooks.js +3 -9
- package/src/components/document-outline/style.scss +2 -0
- package/src/components/editor/index.js +1 -31
- package/src/components/editor-interface/index.js +7 -11
- package/src/components/entities-saved-states/entity-record-item.js +1 -0
- package/src/components/list-view-sidebar/style.scss +1 -7
- package/src/components/page-attributes/parent.js +1 -0
- package/src/components/post-author/combobox.js +1 -0
- package/src/components/post-author/select.js +1 -0
- package/src/components/post-excerpt/index.js +1 -0
- package/src/components/post-featured-image/style.scss +0 -2
- package/src/components/post-pending-status/index.js +1 -0
- package/src/components/post-pingbacks/index.js +1 -0
- package/src/components/post-publish-panel/index.js +1 -0
- package/src/components/post-publish-panel/postpublish.js +1 -0
- package/src/components/post-status/index.js +2 -0
- package/src/components/post-sticky/index.js +1 -0
- package/src/components/post-taxonomies/hierarchical-term-selector.js +4 -0
- package/src/components/post-template/classic-theme.js +1 -0
- package/src/components/post-template/create-new-template-modal.js +1 -0
- package/src/components/post-template/swap-template-button.js +1 -0
- package/src/components/post-title/post-title-raw.js +1 -0
- package/src/components/post-visibility/index.js +1 -0
- package/src/components/provider/index.js +0 -2
- package/src/components/provider/use-block-editor-settings.js +3 -31
- package/src/components/sidebar/header.js +8 -9
- package/src/components/start-page-options/index.js +3 -7
- package/src/hooks/push-changes-to-global-styles/index.js +1 -0
- package/src/private-apis.js +5 -12
- package/src/store/utils/notice-builder.js +4 -4
- package/tsconfig.json +39 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/build/bindings/api.cjs +0 -51
- package/build/bindings/pattern-overrides.cjs +0 -99
- package/build/bindings/post-data.cjs +0 -137
- package/build/bindings/post-meta.cjs +0 -129
- package/build/bindings/term-data.cjs +0 -159
- package/build/components/autocompleters/index.cjs +0 -41
- package/build/components/autocompleters/user.cjs +0 -79
- package/build/components/autosave-monitor/index.cjs +0 -117
- package/build/components/block-removal-warnings/index.cjs +0 -96
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.cjs +0 -55
- package/build/components/block-visibility/index.cjs +0 -125
- package/build/components/blog-title/index.cjs +0 -141
- package/build/components/character-count/index.cjs +0 -36
- package/build/components/collab-sidebar/add-comment.cjs +0 -122
- package/build/components/collab-sidebar/comment-author-info.cjs +0 -106
- package/build/components/collab-sidebar/comment-form.cjs +0 -111
- package/build/components/collab-sidebar/comment-indicator-toolbar.cjs +0 -100
- package/build/components/collab-sidebar/comment-menu-item.cjs +0 -78
- package/build/components/collab-sidebar/comments.cjs +0 -810
- package/build/components/collab-sidebar/constants.cjs +0 -37
- package/build/components/collab-sidebar/hooks.cjs +0 -367
- package/build/components/collab-sidebar/hooks.cjs.map +0 -7
- package/build/components/collab-sidebar/index.cjs +0 -239
- package/build/components/collab-sidebar/utils.cjs +0 -112
- package/build/components/collapsible-block-toolbar/index.cjs +0 -87
- package/build/components/commands/index.cjs +0 -412
- package/build/components/deprecated.cjs +0 -345
- package/build/components/document-bar/index.cjs +0 -215
- package/build/components/document-bar/useEditedSectionDetails.cjs +0 -95
- package/build/components/document-outline/check.cjs +0 -38
- package/build/components/document-outline/index.cjs +0 -217
- package/build/components/document-outline/item.cjs +0 -88
- package/build/components/document-tools/index.cjs +0 -177
- package/build/components/editor/index.cjs +0 -172
- package/build/components/editor/index.cjs.map +0 -7
- package/build/components/editor-history/redo.cjs +0 -57
- package/build/components/editor-history/undo.cjs +0 -56
- package/build/components/editor-interface/index.cjs +0 -193
- package/build/components/editor-interface/index.cjs.map +0 -7
- package/build/components/editor-notices/index.cjs +0 -80
- package/build/components/editor-snackbars/index.cjs +0 -47
- package/build/components/entities-saved-states/entity-record-item.cjs +0 -78
- package/build/components/entities-saved-states/entity-record-item.cjs.map +0 -7
- package/build/components/entities-saved-states/entity-type-list.cjs +0 -135
- package/build/components/entities-saved-states/hooks/use-is-dirty.cjs +0 -88
- package/build/components/entities-saved-states/index.cjs +0 -216
- package/build/components/error-boundary/index.cjs +0 -84
- package/build/components/global-keyboard-shortcuts/index.cjs +0 -106
- package/build/components/global-keyboard-shortcuts/register-shortcuts.cjs +0 -156
- package/build/components/global-styles/block-link.cjs +0 -72
- package/build/components/global-styles/header.cjs +0 -56
- package/build/components/global-styles/hooks.cjs +0 -178
- package/build/components/global-styles/index.cjs +0 -140
- package/build/components/global-styles/menu.cjs +0 -97
- package/build/components/global-styles-provider/index.cjs +0 -181
- package/build/components/global-styles-renderer/index.cjs +0 -57
- package/build/components/global-styles-sidebar/default-sidebar.cjs +0 -68
- package/build/components/global-styles-sidebar/index.cjs +0 -184
- package/build/components/global-styles-sidebar/welcome-guide-image.cjs +0 -39
- package/build/components/global-styles-sidebar/welcome-guide.cjs +0 -145
- package/build/components/header/back-button.cjs +0 -52
- package/build/components/header/index.cjs +0 -211
- package/build/components/index.cjs +0 -316
- package/build/components/index.cjs.map +0 -7
- package/build/components/inserter-sidebar/index.cjs +0 -108
- package/build/components/keyboard-shortcut-help-modal/config.cjs +0 -88
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs +0 -69
- package/build/components/keyboard-shortcut-help-modal/index.cjs +0 -187
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +0 -82
- package/build/components/list-view-sidebar/index.cjs +0 -140
- package/build/components/list-view-sidebar/list-view-outline.cjs +0 -62
- package/build/components/local-autosave-monitor/index.cjs +0 -170
- package/build/components/media-categories/index.cjs +0 -202
- package/build/components/mode-switcher/index.cjs +0 -93
- package/build/components/more-menu/copy-content-menu-item.cjs +0 -65
- package/build/components/more-menu/index.cjs +0 -190
- package/build/components/more-menu/tools-more-menu-group.cjs +0 -31
- package/build/components/more-menu/view-more-menu-group.cjs +0 -34
- package/build/components/page-attributes/check.cjs +0 -47
- package/build/components/page-attributes/order.cjs +0 -76
- package/build/components/page-attributes/panel.cjs +0 -60
- package/build/components/page-attributes/parent.cjs +0 -289
- package/build/components/page-attributes/parent.cjs.map +0 -7
- package/build/components/pattern-duplicate-modal/index.cjs +0 -77
- package/build/components/pattern-overrides-panel/index.cjs +0 -42
- package/build/components/pattern-rename-modal/index.cjs +0 -70
- package/build/components/plugin-document-setting-panel/index.cjs +0 -90
- package/build/components/plugin-more-menu-item/index.cjs +0 -42
- package/build/components/plugin-post-publish-panel/index.cjs +0 -51
- package/build/components/plugin-post-status-info/index.cjs +0 -32
- package/build/components/plugin-pre-publish-panel/index.cjs +0 -51
- package/build/components/plugin-preview-menu-item/index.cjs +0 -42
- package/build/components/plugin-sidebar/index.cjs +0 -39
- package/build/components/plugin-sidebar-more-menu-item/index.cjs +0 -38
- package/build/components/post-actions/actions.cjs +0 -156
- package/build/components/post-actions/index.cjs +0 -148
- package/build/components/post-actions/set-as-homepage.cjs +0 -162
- package/build/components/post-actions/set-as-posts-page.cjs +0 -155
- package/build/components/post-author/check.cjs +0 -53
- package/build/components/post-author/combobox.cjs +0 -59
- package/build/components/post-author/combobox.cjs.map +0 -7
- package/build/components/post-author/constants.cjs +0 -42
- package/build/components/post-author/hook.cjs +0 -87
- package/build/components/post-author/index.cjs +0 -54
- package/build/components/post-author/panel.cjs +0 -118
- package/build/components/post-author/select.cjs +0 -52
- package/build/components/post-author/select.cjs.map +0 -7
- package/build/components/post-card-panel/index.cjs +0 -142
- package/build/components/post-comments/index.cjs +0 -68
- package/build/components/post-content-information/index.cjs +0 -81
- package/build/components/post-discussion/panel.cjs +0 -146
- package/build/components/post-excerpt/check.cjs +0 -42
- package/build/components/post-excerpt/index.cjs +0 -87
- package/build/components/post-excerpt/index.cjs.map +0 -7
- package/build/components/post-excerpt/panel.cjs +0 -200
- package/build/components/post-excerpt/plugin.cjs +0 -34
- package/build/components/post-featured-image/check.cjs +0 -43
- package/build/components/post-featured-image/index.cjs +0 -308
- package/build/components/post-featured-image/panel.cjs +0 -76
- package/build/components/post-fields/index.cjs +0 -49
- package/build/components/post-format/check.cjs +0 -50
- package/build/components/post-format/index.cjs +0 -126
- package/build/components/post-format/panel.cjs +0 -104
- package/build/components/post-last-edited-panel/index.cjs +0 -47
- package/build/components/post-last-revision/check.cjs +0 -54
- package/build/components/post-last-revision/index.cjs +0 -95
- package/build/components/post-last-revision/panel.cjs +0 -44
- package/build/components/post-locked-modal/index.cjs +0 -236
- package/build/components/post-panel-row/index.cjs +0 -54
- package/build/components/post-panel-section/index.cjs +0 -43
- package/build/components/post-pending-status/check.cjs +0 -47
- package/build/components/post-pending-status/index.cjs +0 -67
- package/build/components/post-pending-status/index.cjs.map +0 -7
- package/build/components/post-pingbacks/index.cjs +0 -59
- package/build/components/post-pingbacks/index.cjs.map +0 -7
- package/build/components/post-preview-button/index.cjs +0 -180
- package/build/components/post-publish-button/index.cjs +0 -209
- package/build/components/post-publish-button/label.cjs +0 -83
- package/build/components/post-publish-button/post-publish-button-or-toggle.cjs +0 -91
- package/build/components/post-publish-panel/index.cjs +0 -194
- package/build/components/post-publish-panel/index.cjs.map +0 -7
- package/build/components/post-publish-panel/maybe-category-panel.cjs +0 -93
- package/build/components/post-publish-panel/maybe-post-format-panel.cjs +0 -91
- package/build/components/post-publish-panel/maybe-tags-panel.cjs +0 -103
- package/build/components/post-publish-panel/maybe-upload-media.cjs +0 -220
- package/build/components/post-publish-panel/media-util.cjs +0 -72
- package/build/components/post-publish-panel/postpublish.cjs +0 -179
- package/build/components/post-publish-panel/postpublish.cjs.map +0 -7
- package/build/components/post-publish-panel/prepublish.cjs +0 -165
- package/build/components/post-saved-state/index.cjs +0 -156
- package/build/components/post-schedule/check.cjs +0 -37
- package/build/components/post-schedule/index.cjs +0 -109
- package/build/components/post-schedule/label.cjs +0 -118
- package/build/components/post-schedule/panel.cjs +0 -100
- package/build/components/post-status/index.cjs +0 -273
- package/build/components/post-status/index.cjs.map +0 -7
- package/build/components/post-sticky/check.cjs +0 -41
- package/build/components/post-sticky/index.cjs +0 -58
- package/build/components/post-sticky/index.cjs.map +0 -7
- package/build/components/post-sticky/panel.cjs +0 -49
- package/build/components/post-switch-to-draft-button/index.cjs +0 -102
- package/build/components/post-sync-status/index.cjs +0 -56
- package/build/components/post-taxonomies/check.cjs +0 -46
- package/build/components/post-taxonomies/flat-term-selector.cjs +0 -247
- package/build/components/post-taxonomies/hierarchical-term-selector.cjs +0 -374
- package/build/components/post-taxonomies/hierarchical-term-selector.cjs.map +0 -7
- package/build/components/post-taxonomies/index.cjs +0 -76
- package/build/components/post-taxonomies/most-used-terms.cjs +0 -86
- package/build/components/post-taxonomies/panel.cjs +0 -83
- package/build/components/post-template/block-theme.cjs +0 -198
- package/build/components/post-template/classic-theme.cjs +0 -223
- package/build/components/post-template/classic-theme.cjs.map +0 -7
- package/build/components/post-template/create-new-template-modal.cjs +0 -162
- package/build/components/post-template/create-new-template-modal.cjs.map +0 -7
- package/build/components/post-template/create-new-template.cjs +0 -79
- package/build/components/post-template/hooks.cjs +0 -111
- package/build/components/post-template/panel.cjs +0 -87
- package/build/components/post-template/reset-default-template.cjs +0 -57
- package/build/components/post-template/swap-template-button.cjs +0 -117
- package/build/components/post-template/swap-template-button.cjs.map +0 -7
- package/build/components/post-text-editor/index.cjs +0 -99
- package/build/components/post-title/constants.cjs +0 -34
- package/build/components/post-title/index.cjs +0 -180
- package/build/components/post-title/post-title-raw.cjs +0 -91
- package/build/components/post-title/post-title-raw.cjs.map +0 -7
- package/build/components/post-title/use-post-title-focus.cjs +0 -56
- package/build/components/post-title/use-post-title.cjs +0 -41
- package/build/components/post-transform-panel/hooks.cjs +0 -103
- package/build/components/post-transform-panel/index.cjs +0 -103
- package/build/components/post-trash/check.cjs +0 -51
- package/build/components/post-trash/index.cjs +0 -96
- package/build/components/post-type-support-check/index.cjs +0 -53
- package/build/components/post-url/check.cjs +0 -51
- package/build/components/post-url/index.cjs +0 -179
- package/build/components/post-url/label.cjs +0 -44
- package/build/components/post-url/panel.cjs +0 -134
- package/build/components/post-view-link/index.cjs +0 -62
- package/build/components/post-visibility/check.cjs +0 -34
- package/build/components/post-visibility/index.cjs +0 -98
- package/build/components/post-visibility/index.cjs.map +0 -7
- package/build/components/post-visibility/label.cjs +0 -44
- package/build/components/post-visibility/utils.cjs +0 -48
- package/build/components/posts-per-page/index.cjs +0 -127
- package/build/components/preferences-modal/enable-panel.cjs +0 -56
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.cjs +0 -45
- package/build/components/preferences-modal/enable-publish-sidebar.cjs +0 -46
- package/build/components/preferences-modal/index.cjs +0 -406
- package/build/components/preview-dropdown/index.cjs +0 -206
- package/build/components/provider/disable-non-page-content-blocks.cjs +0 -112
- package/build/components/provider/index.cjs +0 -312
- package/build/components/provider/index.cjs.map +0 -7
- package/build/components/provider/navigation-block-editing-mode.cjs +0 -45
- package/build/components/provider/use-auto-switch-editor-sidebars.cjs +0 -63
- package/build/components/provider/use-block-editor-settings.cjs +0 -353
- package/build/components/provider/use-block-editor-settings.cjs.map +0 -7
- package/build/components/provider/use-hide-blocks-from-inserter.cjs +0 -75
- package/build/components/provider/use-post-content-blocks.cjs +0 -55
- package/build/components/provider/with-registry-provider.cjs +0 -66
- package/build/components/resizable-editor/index.cjs +0 -111
- package/build/components/resizable-editor/resize-handle.cjs +0 -71
- package/build/components/save-publish-panels/index.cjs +0 -134
- package/build/components/sidebar/constants.cjs +0 -34
- package/build/components/sidebar/header.cjs +0 -65
- package/build/components/sidebar/header.cjs.map +0 -7
- package/build/components/sidebar/index.cjs +0 -180
- package/build/components/sidebar/post-summary.cjs +0 -119
- package/build/components/site-discussion/index.cjs +0 -144
- package/build/components/start-page-options/index.cjs +0 -177
- package/build/components/start-page-options/index.cjs.map +0 -7
- package/build/components/start-template-options/index.cjs +0 -209
- package/build/components/style-book/categories.cjs +0 -88
- package/build/components/style-book/color-examples.cjs +0 -66
- package/build/components/style-book/constants.cjs +0 -321
- package/build/components/style-book/duotone-examples.cjs +0 -70
- package/build/components/style-book/examples.cjs +0 -239
- package/build/components/style-book/index.cjs +0 -627
- package/build/components/style-book/types.cjs +0 -19
- package/build/components/styles-canvas/index.cjs +0 -140
- package/build/components/styles-canvas/revisions.cjs +0 -123
- package/build/components/styles-canvas/style-book.cjs +0 -70
- package/build/components/table-of-contents/index.cjs +0 -83
- package/build/components/table-of-contents/panel.cjs +0 -113
- package/build/components/template-content-panel/index.cjs +0 -84
- package/build/components/template-part-content-panel/index.cjs +0 -69
- package/build/components/template-part-menu-items/convert-to-regular.cjs +0 -52
- package/build/components/template-part-menu-items/convert-to-template-part.cjs +0 -89
- package/build/components/template-part-menu-items/index.cjs +0 -71
- package/build/components/template-validation-notice/index.cjs +0 -81
- package/build/components/text-editor/index.cjs +0 -82
- package/build/components/theme-support-check/index.cjs +0 -48
- package/build/components/time-to-read/index.cjs +0 -60
- package/build/components/unsaved-changes-warning/index.cjs +0 -49
- package/build/components/visual-editor/edit-template-blocks-notification.cjs +0 -91
- package/build/components/visual-editor/index.cjs +0 -421
- package/build/components/visual-editor/use-edit-content-only-section-exit.cjs +0 -64
- package/build/components/visual-editor/use-padding-appender.cjs +0 -75
- package/build/components/visual-editor/use-select-nearest-editable-block.cjs +0 -96
- package/build/components/visual-editor/use-zoom-out-mode-exit.cjs +0 -60
- package/build/components/word-count/index.cjs +0 -39
- package/build/components/zoom-out-toggle/index.cjs +0 -109
- package/build/dataviews/api.cjs +0 -71
- package/build/dataviews/fields/content-preview/content-preview-view.cjs +0 -95
- package/build/dataviews/fields/content-preview/index.cjs +0 -46
- package/build/dataviews/store/private-actions.cjs +0 -194
- package/build/dataviews/store/private-selectors.cjs +0 -44
- package/build/dataviews/store/reducer.cjs +0 -98
- package/build/hooks/custom-sources-backwards-compatibility.cjs +0 -79
- package/build/hooks/default-autocompleters.cjs +0 -15
- package/build/hooks/index.cjs +0 -11
- package/build/hooks/media-upload.cjs +0 -105
- package/build/hooks/navigation-link-view-button.cjs +0 -56
- package/build/hooks/pattern-overrides.cjs +0 -64
- package/build/hooks/push-changes-to-global-styles/index.cjs +0 -323
- package/build/hooks/push-changes-to-global-styles/index.cjs.map +0 -7
- package/build/hooks/template-part-navigation-edit-button.cjs +0 -90
- package/build/hooks/use-global-styles-output.cjs +0 -76
- package/build/index.cjs +0 -46
- package/build/index.cjs.map +0 -7
- package/build/lock-unlock.cjs +0 -37
- package/build/private-apis.cjs +0 -93
- package/build/private-apis.cjs.map +0 -7
- package/build/store/actions.cjs +0 -771
- package/build/store/constants.cjs +0 -83
- package/build/store/defaults.cjs +0 -39
- package/build/store/index.cjs +0 -61
- package/build/store/local-autosave.cjs +0 -53
- package/build/store/private-actions.cjs +0 -417
- package/build/store/private-actions.cjs.map +0 -7
- package/build/store/private-selectors.cjs +0 -231
- package/build/store/reducer.cjs +0 -313
- package/build/store/selectors.cjs +0 -1020
- package/build/store/utils/is-template-revertable.cjs +0 -33
- package/build/store/utils/notice-builder.cjs +0 -132
- package/build/store/utils/notice-builder.cjs.map +0 -7
- package/build/utils/block-selection-path.cjs +0 -106
- package/build/utils/block-selection-path.cjs.map +0 -7
- package/build/utils/get-item-title.cjs +0 -43
- package/build/utils/get-template-info.cjs +0 -53
- package/build/utils/get-template-part-icon.cjs +0 -46
- package/build/utils/index.cjs +0 -47
- package/build/utils/media-sideload/index.cjs +0 -30
- package/build/utils/media-upload/index.cjs +0 -104
- package/build/utils/pageTypeBadge.cjs +0 -49
- package/build/utils/search-templates.cjs +0 -75
- package/build/utils/set-nested-value.cjs +0 -45
- package/build/utils/terms.cjs +0 -84
- package/build/utils/url.cjs +0 -50
- package/build-module/utils/block-selection-path.js +0 -80
- package/build-module/utils/block-selection-path.js.map +0 -7
- package/build-types/utils/block-selection-path.d.ts +0 -16
- package/build-types/utils/block-selection-path.d.ts.map +0 -1
- package/src/utils/block-selection-path.js +0 -127
- /package/build/bindings/{api.cjs.map → api.js.map} +0 -0
- /package/build/bindings/{pattern-overrides.cjs.map → pattern-overrides.js.map} +0 -0
- /package/build/bindings/{post-data.cjs.map → post-data.js.map} +0 -0
- /package/build/bindings/{post-meta.cjs.map → post-meta.js.map} +0 -0
- /package/build/bindings/{term-data.cjs.map → term-data.js.map} +0 -0
- /package/build/components/autocompleters/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/autocompleters/{user.cjs.map → user.js.map} +0 -0
- /package/build/components/autosave-monitor/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/block-removal-warnings/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/block-settings-menu/{plugin-block-settings-menu-item.cjs.map → plugin-block-settings-menu-item.js.map} +0 -0
- /package/build/components/block-visibility/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/blog-title/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/character-count/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/collab-sidebar/{add-comment.cjs.map → add-comment.js.map} +0 -0
- /package/build/components/collab-sidebar/{comment-author-info.cjs.map → comment-author-info.js.map} +0 -0
- /package/build/components/collab-sidebar/{comment-form.cjs.map → comment-form.js.map} +0 -0
- /package/build/components/collab-sidebar/{comment-indicator-toolbar.cjs.map → comment-indicator-toolbar.js.map} +0 -0
- /package/build/components/collab-sidebar/{comment-menu-item.cjs.map → comment-menu-item.js.map} +0 -0
- /package/build/components/collab-sidebar/{comments.cjs.map → comments.js.map} +0 -0
- /package/build/components/collab-sidebar/{constants.cjs.map → constants.js.map} +0 -0
- /package/build/components/collab-sidebar/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/collab-sidebar/{utils.cjs.map → utils.js.map} +0 -0
- /package/build/components/collapsible-block-toolbar/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/commands/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/{deprecated.cjs.map → deprecated.js.map} +0 -0
- /package/build/components/document-bar/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/document-bar/{useEditedSectionDetails.cjs.map → useEditedSectionDetails.js.map} +0 -0
- /package/build/components/document-outline/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/document-outline/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/document-outline/{item.cjs.map → item.js.map} +0 -0
- /package/build/components/document-tools/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/editor-history/{redo.cjs.map → redo.js.map} +0 -0
- /package/build/components/editor-history/{undo.cjs.map → undo.js.map} +0 -0
- /package/build/components/editor-notices/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/editor-snackbars/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/entities-saved-states/{entity-type-list.cjs.map → entity-type-list.js.map} +0 -0
- /package/build/components/entities-saved-states/hooks/{use-is-dirty.cjs.map → use-is-dirty.js.map} +0 -0
- /package/build/components/entities-saved-states/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/error-boundary/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/global-keyboard-shortcuts/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/global-keyboard-shortcuts/{register-shortcuts.cjs.map → register-shortcuts.js.map} +0 -0
- /package/build/components/global-styles/{block-link.cjs.map → block-link.js.map} +0 -0
- /package/build/components/global-styles/{header.cjs.map → header.js.map} +0 -0
- /package/build/components/global-styles/{hooks.cjs.map → hooks.js.map} +0 -0
- /package/build/components/global-styles/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/global-styles/{menu.cjs.map → menu.js.map} +0 -0
- /package/build/components/global-styles-provider/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/global-styles-renderer/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/global-styles-sidebar/{default-sidebar.cjs.map → default-sidebar.js.map} +0 -0
- /package/build/components/global-styles-sidebar/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/global-styles-sidebar/{welcome-guide-image.cjs.map → welcome-guide-image.js.map} +0 -0
- /package/build/components/global-styles-sidebar/{welcome-guide.cjs.map → welcome-guide.js.map} +0 -0
- /package/build/components/header/{back-button.cjs.map → back-button.js.map} +0 -0
- /package/build/components/header/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/inserter-sidebar/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/keyboard-shortcut-help-modal/{config.cjs.map → config.js.map} +0 -0
- /package/build/components/keyboard-shortcut-help-modal/{dynamic-shortcut.cjs.map → dynamic-shortcut.js.map} +0 -0
- /package/build/components/keyboard-shortcut-help-modal/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/keyboard-shortcut-help-modal/{shortcut.cjs.map → shortcut.js.map} +0 -0
- /package/build/components/list-view-sidebar/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/list-view-sidebar/{list-view-outline.cjs.map → list-view-outline.js.map} +0 -0
- /package/build/components/local-autosave-monitor/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/media-categories/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/mode-switcher/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/more-menu/{copy-content-menu-item.cjs.map → copy-content-menu-item.js.map} +0 -0
- /package/build/components/more-menu/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/more-menu/{tools-more-menu-group.cjs.map → tools-more-menu-group.js.map} +0 -0
- /package/build/components/more-menu/{view-more-menu-group.cjs.map → view-more-menu-group.js.map} +0 -0
- /package/build/components/page-attributes/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/page-attributes/{order.cjs.map → order.js.map} +0 -0
- /package/build/components/page-attributes/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/pattern-duplicate-modal/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/pattern-overrides-panel/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/pattern-rename-modal/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/plugin-document-setting-panel/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/plugin-more-menu-item/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/plugin-post-publish-panel/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/plugin-post-status-info/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/plugin-pre-publish-panel/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/plugin-preview-menu-item/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/plugin-sidebar/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/plugin-sidebar-more-menu-item/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-actions/{actions.cjs.map → actions.js.map} +0 -0
- /package/build/components/post-actions/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-actions/{set-as-homepage.cjs.map → set-as-homepage.js.map} +0 -0
- /package/build/components/post-actions/{set-as-posts-page.cjs.map → set-as-posts-page.js.map} +0 -0
- /package/build/components/post-author/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/post-author/{constants.cjs.map → constants.js.map} +0 -0
- /package/build/components/post-author/{hook.cjs.map → hook.js.map} +0 -0
- /package/build/components/post-author/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-author/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/post-card-panel/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-comments/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-content-information/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-discussion/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/post-excerpt/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/post-excerpt/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/post-excerpt/{plugin.cjs.map → plugin.js.map} +0 -0
- /package/build/components/post-featured-image/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/post-featured-image/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-featured-image/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/post-fields/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-format/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/post-format/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-format/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/post-last-edited-panel/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-last-revision/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/post-last-revision/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-last-revision/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/post-locked-modal/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-panel-row/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-panel-section/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-pending-status/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/post-preview-button/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-publish-button/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-publish-button/{label.cjs.map → label.js.map} +0 -0
- /package/build/components/post-publish-button/{post-publish-button-or-toggle.cjs.map → post-publish-button-or-toggle.js.map} +0 -0
- /package/build/components/post-publish-panel/{maybe-category-panel.cjs.map → maybe-category-panel.js.map} +0 -0
- /package/build/components/post-publish-panel/{maybe-post-format-panel.cjs.map → maybe-post-format-panel.js.map} +0 -0
- /package/build/components/post-publish-panel/{maybe-tags-panel.cjs.map → maybe-tags-panel.js.map} +0 -0
- /package/build/components/post-publish-panel/{maybe-upload-media.cjs.map → maybe-upload-media.js.map} +0 -0
- /package/build/components/post-publish-panel/{media-util.cjs.map → media-util.js.map} +0 -0
- /package/build/components/post-publish-panel/{prepublish.cjs.map → prepublish.js.map} +0 -0
- /package/build/components/post-saved-state/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-schedule/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/post-schedule/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-schedule/{label.cjs.map → label.js.map} +0 -0
- /package/build/components/post-schedule/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/post-sticky/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/post-sticky/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/post-switch-to-draft-button/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-sync-status/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-taxonomies/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/post-taxonomies/{flat-term-selector.cjs.map → flat-term-selector.js.map} +0 -0
- /package/build/components/post-taxonomies/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-taxonomies/{most-used-terms.cjs.map → most-used-terms.js.map} +0 -0
- /package/build/components/post-taxonomies/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/post-template/{block-theme.cjs.map → block-theme.js.map} +0 -0
- /package/build/components/post-template/{create-new-template.cjs.map → create-new-template.js.map} +0 -0
- /package/build/components/post-template/{hooks.cjs.map → hooks.js.map} +0 -0
- /package/build/components/post-template/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/post-template/{reset-default-template.cjs.map → reset-default-template.js.map} +0 -0
- /package/build/components/post-text-editor/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-title/{constants.cjs.map → constants.js.map} +0 -0
- /package/build/components/post-title/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-title/{use-post-title-focus.cjs.map → use-post-title-focus.js.map} +0 -0
- /package/build/components/post-title/{use-post-title.cjs.map → use-post-title.js.map} +0 -0
- /package/build/components/post-transform-panel/{hooks.cjs.map → hooks.js.map} +0 -0
- /package/build/components/post-transform-panel/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-trash/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/post-trash/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-type-support-check/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-url/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/post-url/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-url/{label.cjs.map → label.js.map} +0 -0
- /package/build/components/post-url/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/post-view-link/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/post-visibility/{check.cjs.map → check.js.map} +0 -0
- /package/build/components/post-visibility/{label.cjs.map → label.js.map} +0 -0
- /package/build/components/post-visibility/{utils.cjs.map → utils.js.map} +0 -0
- /package/build/components/posts-per-page/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/preferences-modal/{enable-panel.cjs.map → enable-panel.js.map} +0 -0
- /package/build/components/preferences-modal/{enable-plugin-document-setting-panel.cjs.map → enable-plugin-document-setting-panel.js.map} +0 -0
- /package/build/components/preferences-modal/{enable-publish-sidebar.cjs.map → enable-publish-sidebar.js.map} +0 -0
- /package/build/components/preferences-modal/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/preview-dropdown/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/provider/{disable-non-page-content-blocks.cjs.map → disable-non-page-content-blocks.js.map} +0 -0
- /package/build/components/provider/{navigation-block-editing-mode.cjs.map → navigation-block-editing-mode.js.map} +0 -0
- /package/build/components/provider/{use-auto-switch-editor-sidebars.cjs.map → use-auto-switch-editor-sidebars.js.map} +0 -0
- /package/build/components/provider/{use-hide-blocks-from-inserter.cjs.map → use-hide-blocks-from-inserter.js.map} +0 -0
- /package/build/components/provider/{use-post-content-blocks.cjs.map → use-post-content-blocks.js.map} +0 -0
- /package/build/components/provider/{with-registry-provider.cjs.map → with-registry-provider.js.map} +0 -0
- /package/build/components/resizable-editor/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/resizable-editor/{resize-handle.cjs.map → resize-handle.js.map} +0 -0
- /package/build/components/save-publish-panels/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/sidebar/{constants.cjs.map → constants.js.map} +0 -0
- /package/build/components/sidebar/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/sidebar/{post-summary.cjs.map → post-summary.js.map} +0 -0
- /package/build/components/site-discussion/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/start-template-options/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/style-book/{categories.cjs.map → categories.js.map} +0 -0
- /package/build/components/style-book/{color-examples.cjs.map → color-examples.js.map} +0 -0
- /package/build/components/style-book/{constants.cjs.map → constants.js.map} +0 -0
- /package/build/components/style-book/{duotone-examples.cjs.map → duotone-examples.js.map} +0 -0
- /package/build/components/style-book/{examples.cjs.map → examples.js.map} +0 -0
- /package/build/components/style-book/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/style-book/{types.cjs.map → types.js.map} +0 -0
- /package/build/components/styles-canvas/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/styles-canvas/{revisions.cjs.map → revisions.js.map} +0 -0
- /package/build/components/styles-canvas/{style-book.cjs.map → style-book.js.map} +0 -0
- /package/build/components/table-of-contents/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/table-of-contents/{panel.cjs.map → panel.js.map} +0 -0
- /package/build/components/template-content-panel/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/template-part-content-panel/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/template-part-menu-items/{convert-to-regular.cjs.map → convert-to-regular.js.map} +0 -0
- /package/build/components/template-part-menu-items/{convert-to-template-part.cjs.map → convert-to-template-part.js.map} +0 -0
- /package/build/components/template-part-menu-items/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/template-validation-notice/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/text-editor/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/theme-support-check/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/time-to-read/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/unsaved-changes-warning/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/visual-editor/{edit-template-blocks-notification.cjs.map → edit-template-blocks-notification.js.map} +0 -0
- /package/build/components/visual-editor/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/visual-editor/{use-edit-content-only-section-exit.cjs.map → use-edit-content-only-section-exit.js.map} +0 -0
- /package/build/components/visual-editor/{use-padding-appender.cjs.map → use-padding-appender.js.map} +0 -0
- /package/build/components/visual-editor/{use-select-nearest-editable-block.cjs.map → use-select-nearest-editable-block.js.map} +0 -0
- /package/build/components/visual-editor/{use-zoom-out-mode-exit.cjs.map → use-zoom-out-mode-exit.js.map} +0 -0
- /package/build/components/word-count/{index.cjs.map → index.js.map} +0 -0
- /package/build/components/zoom-out-toggle/{index.cjs.map → index.js.map} +0 -0
- /package/build/dataviews/{api.cjs.map → api.js.map} +0 -0
- /package/build/dataviews/fields/content-preview/{content-preview-view.cjs.map → content-preview-view.js.map} +0 -0
- /package/build/dataviews/fields/content-preview/{index.cjs.map → index.js.map} +0 -0
- /package/build/dataviews/store/{private-actions.cjs.map → private-actions.js.map} +0 -0
- /package/build/dataviews/store/{private-selectors.cjs.map → private-selectors.js.map} +0 -0
- /package/build/dataviews/store/{reducer.cjs.map → reducer.js.map} +0 -0
- /package/build/hooks/{custom-sources-backwards-compatibility.cjs.map → custom-sources-backwards-compatibility.js.map} +0 -0
- /package/build/hooks/{default-autocompleters.cjs.map → default-autocompleters.js.map} +0 -0
- /package/build/hooks/{index.cjs.map → index.js.map} +0 -0
- /package/build/hooks/{media-upload.cjs.map → media-upload.js.map} +0 -0
- /package/build/hooks/{navigation-link-view-button.cjs.map → navigation-link-view-button.js.map} +0 -0
- /package/build/hooks/{pattern-overrides.cjs.map → pattern-overrides.js.map} +0 -0
- /package/build/hooks/{template-part-navigation-edit-button.cjs.map → template-part-navigation-edit-button.js.map} +0 -0
- /package/build/hooks/{use-global-styles-output.cjs.map → use-global-styles-output.js.map} +0 -0
- /package/build/{lock-unlock.cjs.map → lock-unlock.js.map} +0 -0
- /package/build/store/{actions.cjs.map → actions.js.map} +0 -0
- /package/build/store/{constants.cjs.map → constants.js.map} +0 -0
- /package/build/store/{defaults.cjs.map → defaults.js.map} +0 -0
- /package/build/store/{index.cjs.map → index.js.map} +0 -0
- /package/build/store/{local-autosave.cjs.map → local-autosave.js.map} +0 -0
- /package/build/store/{private-selectors.cjs.map → private-selectors.js.map} +0 -0
- /package/build/store/{reducer.cjs.map → reducer.js.map} +0 -0
- /package/build/store/{selectors.cjs.map → selectors.js.map} +0 -0
- /package/build/store/utils/{is-template-revertable.cjs.map → is-template-revertable.js.map} +0 -0
- /package/build/utils/{get-item-title.cjs.map → get-item-title.js.map} +0 -0
- /package/build/utils/{get-template-info.cjs.map → get-template-info.js.map} +0 -0
- /package/build/utils/{get-template-part-icon.cjs.map → get-template-part-icon.js.map} +0 -0
- /package/build/utils/{index.cjs.map → index.js.map} +0 -0
- /package/build/utils/media-sideload/{index.cjs.map → index.js.map} +0 -0
- /package/build/utils/media-upload/{index.cjs.map → index.js.map} +0 -0
- /package/build/utils/{pageTypeBadge.cjs.map → pageTypeBadge.js.map} +0 -0
- /package/build/utils/{search-templates.cjs.map → search-templates.js.map} +0 -0
- /package/build/utils/{set-nested-value.cjs.map → set-nested-value.js.map} +0 -0
- /package/build/utils/{terms.cjs.map → terms.js.map} +0 -0
- /package/build/utils/{url.cjs.map → url.js.map} +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/editor/src/utils/set-nested-value.js
|
|
21
|
+
var set_nested_value_exports = {};
|
|
22
|
+
__export(set_nested_value_exports, {
|
|
23
|
+
default: () => setNestedValue
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(set_nested_value_exports);
|
|
26
|
+
function setNestedValue(object, path, value) {
|
|
27
|
+
if (!object || typeof object !== "object") {
|
|
28
|
+
return object;
|
|
29
|
+
}
|
|
30
|
+
path.reduce((acc, key, idx) => {
|
|
31
|
+
if (acc[key] === void 0) {
|
|
32
|
+
if (Number.isInteger(path[idx + 1])) {
|
|
33
|
+
acc[key] = [];
|
|
34
|
+
} else {
|
|
35
|
+
acc[key] = {};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (idx === path.length - 1) {
|
|
39
|
+
acc[key] = value;
|
|
40
|
+
}
|
|
41
|
+
return acc[key];
|
|
42
|
+
}, object);
|
|
43
|
+
return object;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=set-nested-value.js.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/editor/src/utils/terms.js
|
|
21
|
+
var terms_exports = {};
|
|
22
|
+
__export(terms_exports, {
|
|
23
|
+
buildTermsTree: () => buildTermsTree,
|
|
24
|
+
unescapeString: () => unescapeString,
|
|
25
|
+
unescapeTerm: () => unescapeTerm,
|
|
26
|
+
unescapeTerms: () => unescapeTerms
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(terms_exports);
|
|
29
|
+
var import_html_entities = require("@wordpress/html-entities");
|
|
30
|
+
function buildTermsTree(flatTerms) {
|
|
31
|
+
const flatTermsWithParentAndChildren = flatTerms.map((term) => {
|
|
32
|
+
return {
|
|
33
|
+
children: [],
|
|
34
|
+
parent: void 0,
|
|
35
|
+
...term
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
if (flatTermsWithParentAndChildren.some(
|
|
39
|
+
({ parent }) => parent === void 0
|
|
40
|
+
)) {
|
|
41
|
+
return flatTermsWithParentAndChildren;
|
|
42
|
+
}
|
|
43
|
+
const termsByParent = flatTermsWithParentAndChildren.reduce(
|
|
44
|
+
(acc, term) => {
|
|
45
|
+
const { parent } = term;
|
|
46
|
+
if (!acc[parent]) {
|
|
47
|
+
acc[parent] = [];
|
|
48
|
+
}
|
|
49
|
+
acc[parent].push(term);
|
|
50
|
+
return acc;
|
|
51
|
+
},
|
|
52
|
+
{}
|
|
53
|
+
);
|
|
54
|
+
const fillWithChildren = (terms) => {
|
|
55
|
+
return terms.map((term) => {
|
|
56
|
+
const children = termsByParent[term.id];
|
|
57
|
+
return {
|
|
58
|
+
...term,
|
|
59
|
+
children: children && children.length ? fillWithChildren(children) : []
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
return fillWithChildren(termsByParent["0"] || []);
|
|
64
|
+
}
|
|
65
|
+
var unescapeString = (arg) => {
|
|
66
|
+
return (0, import_html_entities.decodeEntities)(arg);
|
|
67
|
+
};
|
|
68
|
+
var unescapeTerm = (term) => {
|
|
69
|
+
return {
|
|
70
|
+
...term,
|
|
71
|
+
name: unescapeString(term.name)
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
var unescapeTerms = (terms) => {
|
|
75
|
+
return (terms ?? []).map(unescapeTerm);
|
|
76
|
+
};
|
|
77
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
78
|
+
0 && (module.exports = {
|
|
79
|
+
buildTermsTree,
|
|
80
|
+
unescapeString,
|
|
81
|
+
unescapeTerm,
|
|
82
|
+
unescapeTerms
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=terms.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// packages/editor/src/utils/url.js
|
|
31
|
+
var url_exports = {};
|
|
32
|
+
__export(url_exports, {
|
|
33
|
+
cleanForSlug: () => cleanForSlug
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(url_exports);
|
|
36
|
+
var import_url = require("@wordpress/url");
|
|
37
|
+
var import_deprecated = __toESM(require("@wordpress/deprecated"));
|
|
38
|
+
function cleanForSlug(string) {
|
|
39
|
+
(0, import_deprecated.default)("wp.editor.cleanForSlug", {
|
|
40
|
+
since: "12.7",
|
|
41
|
+
plugin: "Gutenberg",
|
|
42
|
+
alternative: "wp.url.cleanForSlug"
|
|
43
|
+
});
|
|
44
|
+
return (0, import_url.cleanForSlug)(string);
|
|
45
|
+
}
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
cleanForSlug
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=url.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// packages/editor/src/bindings/api.js
|
|
2
2
|
import { registerBlockBindingsSource } from "@wordpress/blocks";
|
|
3
|
-
import patternOverrides from "./pattern-overrides
|
|
4
|
-
import postData from "./post-data
|
|
5
|
-
import postMeta from "./post-meta
|
|
6
|
-
import termData from "./term-data
|
|
3
|
+
import patternOverrides from "./pattern-overrides";
|
|
4
|
+
import postData from "./post-data";
|
|
5
|
+
import postMeta from "./post-meta";
|
|
6
|
+
import termData from "./term-data";
|
|
7
7
|
function registerCoreBlockBindingsSources() {
|
|
8
8
|
registerBlockBindingsSource(patternOverrides);
|
|
9
9
|
registerBlockBindingsSource(postData);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// packages/editor/src/bindings/post-meta.js
|
|
2
2
|
import { store as coreDataStore } from "@wordpress/core-data";
|
|
3
|
-
import { store as editorStore } from "../store
|
|
4
|
-
import { unlock } from "../lock-unlock
|
|
3
|
+
import { store as editorStore } from "../store";
|
|
4
|
+
import { unlock } from "../lock-unlock";
|
|
5
5
|
function getPostMetaFields(select, context) {
|
|
6
6
|
const { getRegisteredPostMeta } = unlock(select(coreDataStore));
|
|
7
7
|
const registeredFields = getRegisteredPostMeta(context?.postType);
|
|
@@ -3,7 +3,7 @@ import { Component } from "@wordpress/element";
|
|
|
3
3
|
import { compose } from "@wordpress/compose";
|
|
4
4
|
import { withSelect, withDispatch } from "@wordpress/data";
|
|
5
5
|
import { store as coreStore } from "@wordpress/core-data";
|
|
6
|
-
import { store as editorStore } from "../../store
|
|
6
|
+
import { store as editorStore } from "../../store";
|
|
7
7
|
var AutosaveMonitor = class extends Component {
|
|
8
8
|
constructor(props) {
|
|
9
9
|
super(props);
|
|
@@ -3,8 +3,8 @@ import { _n } from "@wordpress/i18n";
|
|
|
3
3
|
import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
|
|
4
4
|
import { useSelect } from "@wordpress/data";
|
|
5
5
|
import { useMemo } from "@wordpress/element";
|
|
6
|
-
import { unlock } from "../../lock-unlock
|
|
7
|
-
import { store as editorStore } from "../../store
|
|
6
|
+
import { unlock } from "../../lock-unlock";
|
|
7
|
+
import { store as editorStore } from "../../store";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
var { BlockRemovalWarningModal } = unlock(blockEditorPrivateApis);
|
|
10
10
|
var TEMPLATE_BLOCKS = [
|
|
@@ -6,8 +6,8 @@ import { useMemo } from "@wordpress/element";
|
|
|
6
6
|
import { Button } from "@wordpress/components";
|
|
7
7
|
import { __, _n, sprintf } from "@wordpress/i18n";
|
|
8
8
|
import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
|
|
9
|
-
import { store as editorStore } from "../../store
|
|
10
|
-
import { unlock } from "../../lock-unlock
|
|
9
|
+
import { store as editorStore } from "../../store";
|
|
10
|
+
import { unlock } from "../../lock-unlock";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
var { BlockManager } = unlock(blockEditorPrivateApis);
|
|
13
13
|
var EMPTY_ARRAY = [];
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
} from "@wordpress/components";
|
|
12
12
|
import { useState, useMemo } from "@wordpress/element";
|
|
13
13
|
import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from "@wordpress/block-editor";
|
|
14
|
-
import { TEMPLATE_POST_TYPE } from "../../store/constants
|
|
15
|
-
import PostPanelRow from "../post-panel-row
|
|
16
|
-
import { store as editorStore } from "../../store
|
|
14
|
+
import { TEMPLATE_POST_TYPE } from "../../store/constants";
|
|
15
|
+
import PostPanelRow from "../post-panel-row";
|
|
16
|
+
import { store as editorStore } from "../../store";
|
|
17
17
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
18
|
var EMPTY_OBJECT = {};
|
|
19
19
|
function BlogTitle() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// packages/editor/src/components/character-count/index.js
|
|
2
2
|
import { useSelect } from "@wordpress/data";
|
|
3
3
|
import { count as characterCount } from "@wordpress/wordcount";
|
|
4
|
-
import { store as editorStore } from "../../store
|
|
4
|
+
import { store as editorStore } from "../../store";
|
|
5
5
|
function CharacterCount() {
|
|
6
6
|
const content = useSelect(
|
|
7
7
|
(select) => select(editorStore).getEditedPostAttribute("content"),
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
store as blockEditorStore,
|
|
11
11
|
privateApis as blockEditorPrivateApis
|
|
12
12
|
} from "@wordpress/block-editor";
|
|
13
|
-
import { unlock } from "../../lock-unlock
|
|
14
|
-
import CommentAuthorInfo from "./comment-author-info
|
|
15
|
-
import CommentForm from "./comment-form
|
|
16
|
-
import { focusCommentThread, noop } from "./utils
|
|
13
|
+
import { unlock } from "../../lock-unlock";
|
|
14
|
+
import CommentAuthorInfo from "./comment-author-info";
|
|
15
|
+
import CommentForm from "./comment-form";
|
|
16
|
+
import { focusCommentThread, noop } from "./utils";
|
|
17
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
18
|
var { useBlockElement } = unlock(blockEditorPrivateApis);
|
|
19
19
|
function AddComment({
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import { store as coreStore } from "@wordpress/core-data";
|
|
11
11
|
import { useSelect } from "@wordpress/data";
|
|
12
12
|
import { store as blockEditorStore } from "@wordpress/block-editor";
|
|
13
|
-
import { getAvatarBorderColor } from "./utils
|
|
13
|
+
import { getAvatarBorderColor } from "./utils";
|
|
14
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
function CommentAuthorInfo({ avatar, name, date, userId }) {
|
|
16
16
|
const hasAvatar = !!avatar;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import { __ } from "@wordpress/i18n";
|
|
12
12
|
import { useInstanceId, useDebounce } from "@wordpress/compose";
|
|
13
13
|
import { isKeyboardEvent } from "@wordpress/keycodes";
|
|
14
|
-
import { sanitizeCommentString, noop } from "./utils
|
|
14
|
+
import { sanitizeCommentString, noop } from "./utils";
|
|
15
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
function CommentForm({
|
|
17
17
|
onSubmit,
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
import { __, sprintf } from "@wordpress/i18n";
|
|
8
8
|
import { useMemo } from "@wordpress/element";
|
|
9
9
|
import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
|
|
10
|
-
import { unlock } from "../../lock-unlock
|
|
11
|
-
import { getAvatarBorderColor } from "./utils
|
|
10
|
+
import { unlock } from "../../lock-unlock";
|
|
11
|
+
import { getAvatarBorderColor } from "./utils";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
var { CommentIconToolbarSlotFill } = unlock(blockEditorPrivateApis);
|
|
14
14
|
var CommentAvatarIndicator = ({ onClick, thread }) => {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "@wordpress/block-editor";
|
|
9
9
|
import { useSelect } from "@wordpress/data";
|
|
10
10
|
import { getUnregisteredTypeHandlerName } from "@wordpress/blocks";
|
|
11
|
-
import { unlock } from "../../lock-unlock
|
|
11
|
+
import { unlock } from "../../lock-unlock";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
var { CommentIconSlotFill } = unlock(blockEditorPrivateApis);
|
|
14
14
|
var AddCommentMenuItem = ({ clientId, onClick, isDistractionFree }) => {
|
|
@@ -26,13 +26,13 @@ import {
|
|
|
26
26
|
store as blockEditorStore,
|
|
27
27
|
privateApis as blockEditorPrivateApis
|
|
28
28
|
} from "@wordpress/block-editor";
|
|
29
|
-
import { unlock } from "../../lock-unlock
|
|
30
|
-
import CommentAuthorInfo from "./comment-author-info
|
|
31
|
-
import CommentForm from "./comment-form
|
|
32
|
-
import { focusCommentThread, getCommentExcerpt } from "./utils
|
|
33
|
-
import { useFloatingThread } from "./hooks
|
|
34
|
-
import { AddComment } from "./add-comment
|
|
35
|
-
import { store as editorStore } from "../../store
|
|
29
|
+
import { unlock } from "../../lock-unlock";
|
|
30
|
+
import CommentAuthorInfo from "./comment-author-info";
|
|
31
|
+
import CommentForm from "./comment-form";
|
|
32
|
+
import { focusCommentThread, getCommentExcerpt } from "./utils";
|
|
33
|
+
import { useFloatingThread } from "./hooks";
|
|
34
|
+
import { AddComment } from "./add-comment";
|
|
35
|
+
import { store as editorStore } from "../../store";
|
|
36
36
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
37
37
|
var { useBlockElement } = unlock(blockEditorPrivateApis);
|
|
38
38
|
var { Menu } = unlock(componentsPrivateApis);
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
import { store as noticesStore } from "@wordpress/notices";
|
|
21
21
|
import { decodeEntities } from "@wordpress/html-entities";
|
|
22
22
|
import { store as interfaceStore } from "@wordpress/interface";
|
|
23
|
-
import { store as editorStore } from "../../store
|
|
24
|
-
import { collabSidebarName } from "./constants
|
|
25
|
-
import { unlock } from "../../lock-unlock
|
|
26
|
-
import { noop } from "./utils
|
|
23
|
+
import { store as editorStore } from "../../store";
|
|
24
|
+
import { collabSidebarName } from "./constants";
|
|
25
|
+
import { unlock } from "../../lock-unlock";
|
|
26
|
+
import { noop } from "./utils";
|
|
27
27
|
var { useBlockElement, cleanEmptyObject } = unlock(blockEditorPrivateApis);
|
|
28
28
|
function useBlockComments(postId) {
|
|
29
29
|
const [commentLastUpdated, reflowComments] = useReducer(
|
|
@@ -62,14 +62,10 @@ function useBlockComments(postId) {
|
|
|
62
62
|
}, {});
|
|
63
63
|
const compare = {};
|
|
64
64
|
const result = [];
|
|
65
|
-
const commentIdToBlockClientId = Object.keys(
|
|
66
|
-
blocksWithComments
|
|
67
|
-
).reduce((mapping, clientId) => {
|
|
68
|
-
mapping[blocksWithComments[clientId]] = clientId;
|
|
69
|
-
return mapping;
|
|
70
|
-
}, {});
|
|
71
65
|
threads.forEach((item) => {
|
|
72
|
-
const itemBlock =
|
|
66
|
+
const itemBlock = Object.keys(blocksWithComments).find(
|
|
67
|
+
(key) => blocksWithComments[key] === item.id
|
|
68
|
+
);
|
|
73
69
|
compare[item.id] = {
|
|
74
70
|
...item,
|
|
75
71
|
reply: [],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/collab-sidebar/hooks.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport {\n\tuseFloating,\n\toffset as offsetMiddleware,\n\tautoUpdate,\n} from '@floating-ui/react-dom';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseEffect,\n\tuseMemo,\n\tuseCallback,\n\tuseReducer,\n} from '@wordpress/element';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { useDispatch, useRegistry, useSelect } from '@wordpress/data';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { collabSidebarName } from './constants';\nimport { unlock } from '../../lock-unlock';\nimport { noop } from './utils';\n\nconst { useBlockElement, cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\nexport function useBlockComments( postId ) {\n\tconst [ commentLastUpdated, reflowComments ] = useReducer(\n\t\t() => Date.now(),\n\t\t0\n\t);\n\n\tconst queryArgs = {\n\t\tpost: postId,\n\t\ttype: 'note',\n\t\tstatus: 'all',\n\t\tper_page: -1,\n\t};\n\n\tconst { records: threads } = useEntityRecords(\n\t\t'root',\n\t\t'comment',\n\t\tqueryArgs,\n\t\t{ enabled: !! postId && typeof postId === 'number' }\n\t);\n\n\tconst { getBlockAttributes } = useSelect( blockEditorStore );\n\tconst { clientIds } = useSelect( ( select ) => {\n\t\tconst { getClientIdsWithDescendants } = select( blockEditorStore );\n\t\treturn {\n\t\t\tclientIds: getClientIdsWithDescendants(),\n\t\t};\n\t}, [] );\n\n\t// Process comments to build the tree structure.\n\tconst { resultComments, unresolvedSortedThreads } = useMemo( () => {\n\t\tif ( ! threads || threads.length === 0 ) {\n\t\t\treturn { resultComments: [], unresolvedSortedThreads: [] };\n\t\t}\n\n\t\tconst blocksWithComments = clientIds.reduce( ( results, clientId ) => {\n\t\t\tconst commentId = getBlockAttributes( clientId )?.metadata?.noteId;\n\t\t\tif ( commentId ) {\n\t\t\t\tresults[ clientId ] = commentId;\n\t\t\t}\n\t\t\treturn results;\n\t\t}, {} );\n\n\t\t// Create a compare to store the references to all objects by id.\n\t\tconst compare = {};\n\t\tconst result = [];\n\n\t\t// Create a reverse map for faster lookup.\n\t\tconst commentIdToBlockClientId = Object.keys(\n\t\t\tblocksWithComments\n\t\t).reduce( ( mapping, clientId ) => {\n\t\t\tmapping[ blocksWithComments[ clientId ] ] = clientId;\n\t\t\treturn mapping;\n\t\t}, {} );\n\n\t\t// Initialize each object with an empty `reply` array and map blockClientId.\n\t\tthreads.forEach( ( item ) => {\n\t\t\tconst itemBlock = commentIdToBlockClientId[ item.id ];\n\n\t\t\tcompare[ item.id ] = {\n\t\t\t\t...item,\n\t\t\t\treply: [],\n\t\t\t\tblockClientId: item.parent === 0 ? itemBlock : null,\n\t\t\t};\n\t\t} );\n\n\t\t// Iterate over the data to build the tree structure.\n\t\tthreads.forEach( ( item ) => {\n\t\t\tif ( item.parent === 0 ) {\n\t\t\t\t// If parent is 0, it's a root item, push it to the result array.\n\t\t\t\tresult.push( compare[ item.id ] );\n\t\t\t} else if ( compare[ item.parent ] ) {\n\t\t\t\t// Otherwise, find its parent and push it to the parent's `reply` array.\n\t\t\t\tcompare[ item.parent ].reply.push( compare[ item.id ] );\n\t\t\t}\n\t\t} );\n\n\t\tif ( 0 === result?.length ) {\n\t\t\treturn { resultComments: [], unresolvedSortedThreads: [] };\n\t\t}\n\n\t\tconst updatedResult = result.map( ( item ) => ( {\n\t\t\t...item,\n\t\t\treply: [ ...item.reply ].reverse(),\n\t\t} ) );\n\n\t\tconst threadIdMap = new Map(\n\t\t\tupdatedResult.map( ( thread ) => [ String( thread.id ), thread ] )\n\t\t);\n\n\t\t// Prepare sets to determine which threads are linked to existing blocks.\n\t\tconst mappedIds = new Set(\n\t\t\tObject.values( blocksWithComments ).map( ( id ) => String( id ) )\n\t\t);\n\n\t\t// Get comments by block order, first unresolved, then resolved.\n\t\tconst unresolvedSortedComments = Object.values( blocksWithComments )\n\t\t\t.map( ( commentId ) => threadIdMap.get( String( commentId ) ) )\n\t\t\t.filter(\n\t\t\t\t( thread ) => thread !== undefined && thread.status === 'hold'\n\t\t\t);\n\n\t\tconst resolvedSortedComments = Object.values( blocksWithComments )\n\t\t\t.map( ( commentId ) => threadIdMap.get( String( commentId ) ) )\n\t\t\t.filter(\n\t\t\t\t( thread ) =>\n\t\t\t\t\tthread !== undefined && thread.status === 'approved'\n\t\t\t);\n\n\t\t// Append orphaned notes (whose related block was deleted or missing).\n\t\tconst orphanedComments = updatedResult.filter(\n\t\t\t( thread ) => ! mappedIds.has( String( thread.id ) )\n\t\t);\n\n\t\tconst allSortedComments = [\n\t\t\t...unresolvedSortedComments,\n\t\t\t...resolvedSortedComments,\n\t\t\t...orphanedComments,\n\t\t];\n\n\t\treturn {\n\t\t\tresultComments: allSortedComments,\n\t\t\tunresolvedSortedThreads: unresolvedSortedComments,\n\t\t};\n\t}, [ clientIds, threads, getBlockAttributes ] );\n\n\treturn {\n\t\tresultComments,\n\t\tunresolvedSortedThreads,\n\t\treflowComments,\n\t\tcommentLastUpdated,\n\t};\n}\n\nexport function useBlockCommentsActions( reflowComments = noop ) {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { saveEntityRecord, deleteEntityRecord } = useDispatch( coreStore );\n\tconst { getCurrentPostId } = useSelect( editorStore );\n\tconst { getBlockAttributes, getSelectedBlockClientId } =\n\t\tuseSelect( blockEditorStore );\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tconst onError = ( error ) => {\n\t\tconst errorMessage =\n\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t? decodeEntities( error.message )\n\t\t\t\t: __( 'An error occurred while performing an update.' );\n\t\tcreateNotice( 'error', errorMessage, {\n\t\t\ttype: 'snackbar',\n\t\t\tisDismissible: true,\n\t\t} );\n\t};\n\n\tconst onCreate = async ( { content, parent } ) => {\n\t\ttry {\n\t\t\tconst savedRecord = await saveEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'comment',\n\t\t\t\t{\n\t\t\t\t\tpost: getCurrentPostId(),\n\t\t\t\t\tcontent,\n\t\t\t\t\tstatus: 'hold',\n\t\t\t\t\ttype: 'note',\n\t\t\t\t\tparent: parent || 0,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\t// If it's a main comment, update the block attributes with the comment id.\n\t\t\tif ( ! parent && savedRecord?.id ) {\n\t\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\t\tconst metadata = getBlockAttributes( clientId )?.metadata;\n\t\t\t\tupdateBlockAttributes( clientId, {\n\t\t\t\t\tmetadata: {\n\t\t\t\t\t\t...metadata,\n\t\t\t\t\t\tnoteId: savedRecord.id,\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice(\n\t\t\t\t'snackbar',\n\t\t\t\tparent ? __( 'Reply added.' ) : __( 'Note added.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tisDismissible: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\tsetTimeout( reflowComments, 300 );\n\t\t\treturn savedRecord;\n\t\t} catch ( error ) {\n\t\t\treflowComments();\n\t\t\tonError( error );\n\t\t}\n\t};\n\n\tconst onEdit = async ( { id, content, status } ) => {\n\t\tconst messageType = status ? status : 'updated';\n\t\tconst messages = {\n\t\t\tapproved: __( 'Note marked as resolved.' ),\n\t\t\thold: __( 'Note reopened.' ),\n\t\t\tupdated: __( 'Note updated.' ),\n\t\t};\n\n\t\ttry {\n\t\t\t// For resolution or reopen actions, create a new note with metadata.\n\t\t\tif ( status === 'approved' || status === 'hold' ) {\n\t\t\t\t// First, update the thread status.\n\t\t\t\tawait saveEntityRecord(\n\t\t\t\t\t'root',\n\t\t\t\t\t'comment',\n\t\t\t\t\t{\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tstatus,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tthrowOnError: true,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Then create a new comment with the metadata.\n\t\t\t\tconst newCommentData = {\n\t\t\t\t\tpost: getCurrentPostId(),\n\t\t\t\t\tcontent: content || '', // Empty content for resolve, content for reopen.\n\t\t\t\t\ttype: 'note',\n\t\t\t\t\tstatus,\n\t\t\t\t\tparent: id,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\t_wp_note_status:\n\t\t\t\t\t\t\tstatus === 'approved' ? 'resolved' : 'reopen',\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tawait saveEntityRecord( 'root', 'comment', newCommentData, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst updateData = {\n\t\t\t\t\tid,\n\t\t\t\t\tcontent,\n\t\t\t\t\tstatus,\n\t\t\t\t};\n\n\t\t\t\tawait saveEntityRecord( 'root', 'comment', updateData, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice(\n\t\t\t\t'snackbar',\n\t\t\t\tmessages[ messageType ] ?? __( 'Note updated.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tisDismissible: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\treflowComments();\n\t\t} catch ( error ) {\n\t\t\treflowComments();\n\t\t\tonError( error );\n\t\t}\n\t};\n\n\tconst onDelete = async ( comment ) => {\n\t\ttry {\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'comment',\n\t\t\t\tcomment.id,\n\t\t\t\tundefined,\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! comment.parent ) {\n\t\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\t\tconst metadata = getBlockAttributes( clientId )?.metadata;\n\t\t\t\tupdateBlockAttributes( clientId, {\n\t\t\t\t\tmetadata: cleanEmptyObject( {\n\t\t\t\t\t\t...metadata,\n\t\t\t\t\t\tnoteId: undefined,\n\t\t\t\t\t} ),\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice( 'snackbar', __( 'Note deleted.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t\tisDismissible: true,\n\t\t\t} );\n\t\t\treflowComments();\n\t\t} catch ( error ) {\n\t\t\treflowComments();\n\t\t\tonError( error );\n\t\t}\n\t};\n\n\treturn { onCreate, onEdit, onDelete };\n}\n\nexport function useEnableFloatingSidebar( enabled = false ) {\n\tconst registry = useRegistry();\n\tuseEffect( () => {\n\t\tif ( ! enabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { getActiveComplementaryArea } =\n\t\t\tregistry.select( interfaceStore );\n\t\tconst { disableComplementaryArea, enableComplementaryArea } =\n\t\t\tregistry.dispatch( interfaceStore );\n\n\t\tconst unsubscribe = registry.subscribe( () => {\n\t\t\t// Return `null` to indicate the user hid the complementary area.\n\t\t\tif ( getActiveComplementaryArea( 'core' ) === null ) {\n\t\t\t\tenableComplementaryArea( 'core', collabSidebarName );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tunsubscribe();\n\t\t\tif ( getActiveComplementaryArea( 'core' ) === collabSidebarName ) {\n\t\t\t\tdisableComplementaryArea( 'core', collabSidebarName );\n\t\t\t}\n\t\t};\n\t}, [ enabled, registry ] );\n}\n\nexport function useFloatingThread( {\n\tthread,\n\tcalculatedOffset,\n\tsetHeights,\n\tselectedThread,\n\tsetBlockRef,\n\tcommentLastUpdated,\n} ) {\n\tconst blockElement = useBlockElement( thread.blockClientId );\n\tconst updateHeight = useCallback(\n\t\t( id, newHeight ) => {\n\t\t\tsetHeights( ( prev ) => {\n\t\t\t\tif ( prev[ id ] !== newHeight ) {\n\t\t\t\t\treturn { ...prev, [ id ]: newHeight };\n\t\t\t\t}\n\t\t\t\treturn prev;\n\t\t\t} );\n\t\t},\n\t\t[ setHeights ]\n\t);\n\n\t// Use floating-ui to track the block element's position with the calculated offset.\n\tconst { y, refs } = useFloating( {\n\t\tplacement: 'right-start',\n\t\tmiddleware: [\n\t\t\toffsetMiddleware( {\n\t\t\t\tcrossAxis: calculatedOffset || -16,\n\t\t\t} ),\n\t\t],\n\t\twhileElementsMounted: autoUpdate,\n\t} );\n\n\t// Store the block reference for each thread.\n\tuseEffect( () => {\n\t\tif ( blockElement ) {\n\t\t\trefs.setReference( blockElement );\n\t\t}\n\t}, [ blockElement, refs, commentLastUpdated ] );\n\n\t// Track thread heights.\n\tuseEffect( () => {\n\t\tif ( refs.floating?.current ) {\n\t\t\tsetBlockRef( thread.id, blockElement );\n\t\t}\n\t}, [ blockElement, thread.id, refs.floating, setBlockRef ] );\n\n\t// When the selected thread changes, update heights, triggering offset recalculation.\n\tuseEffect( () => {\n\t\tif ( refs.floating?.current ) {\n\t\t\tconst newHeight = refs.floating.current.scrollHeight;\n\t\t\tupdateHeight( thread.id, newHeight );\n\t\t}\n\t}, [\n\t\tthread.id,\n\t\tupdateHeight,\n\t\trefs.floating,\n\t\tselectedThread,\n\t\tcommentLastUpdated,\n\t] );\n\n\treturn {\n\t\ty,\n\t\trefs,\n\t};\n}\n"],
|
|
5
|
-
"mappings": ";AAGA;AAAA,EACC;AAAA,EACA,UAAU;AAAA,EACV;AAAA,OACM;AAKP,SAAS,UAAU;AACnB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,kBAAkB,SAAS,iBAAiB;AACrD,SAAS,aAAa,aAAa,iBAAiB;AACpD;AAAA,EACC,SAAS;AAAA,EACT,eAAe;AAAA,OACT;AACP,SAAS,SAAS,oBAAoB;AACtC,SAAS,sBAAsB;AAC/B,SAAS,SAAS,sBAAsB;AAKxC,SAAS,SAAS,mBAAmB;AACrC,SAAS,yBAAyB;AAClC,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,IAAM,EAAE,iBAAiB,iBAAiB,IAAI,OAAQ,sBAAuB;AAEtE,SAAS,iBAAkB,QAAS;AAC1C,QAAM,CAAE,oBAAoB,cAAe,IAAI;AAAA,IAC9C,MAAM,KAAK,IAAI;AAAA,IACf;AAAA,EACD;AAEA,QAAM,YAAY;AAAA,IACjB,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACX;AAEA,QAAM,EAAE,SAAS,QAAQ,IAAI;AAAA,IAC5B;AAAA,IACA;AAAA,IACA;AAAA,IACA,EAAE,SAAS,CAAC,CAAE,UAAU,OAAO,WAAW,SAAS;AAAA,EACpD;AAEA,QAAM,EAAE,mBAAmB,IAAI,UAAW,gBAAiB;AAC3D,QAAM,EAAE,UAAU,IAAI,UAAW,CAAE,WAAY;AAC9C,UAAM,EAAE,4BAA4B,IAAI,OAAQ,gBAAiB;AACjE,WAAO;AAAA,MACN,WAAW,4BAA4B;AAAA,IACxC;AAAA,EACD,GAAG,CAAC,CAAE;AAGN,QAAM,EAAE,gBAAgB,wBAAwB,IAAI,QAAS,MAAM;AAClE,QAAK,CAAE,WAAW,QAAQ,WAAW,GAAI;AACxC,aAAO,EAAE,gBAAgB,CAAC,GAAG,yBAAyB,CAAC,EAAE;AAAA,IAC1D;AAEA,UAAM,qBAAqB,UAAU,OAAQ,CAAE,SAAS,aAAc;AACrE,YAAM,YAAY,mBAAoB,QAAS,GAAG,UAAU;AAC5D,UAAK,WAAY;AAChB,gBAAS,QAAS,IAAI;AAAA,MACvB;AACA,aAAO;AAAA,IACR,GAAG,CAAC,CAAE;AAGN,UAAM,UAAU,CAAC;AACjB,UAAM,SAAS,CAAC;AAGhB,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport {\n\tuseFloating,\n\toffset as offsetMiddleware,\n\tautoUpdate,\n} from '@floating-ui/react-dom';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseEffect,\n\tuseMemo,\n\tuseCallback,\n\tuseReducer,\n} from '@wordpress/element';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { useDispatch, useRegistry, useSelect } from '@wordpress/data';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { collabSidebarName } from './constants';\nimport { unlock } from '../../lock-unlock';\nimport { noop } from './utils';\n\nconst { useBlockElement, cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\nexport function useBlockComments( postId ) {\n\tconst [ commentLastUpdated, reflowComments ] = useReducer(\n\t\t() => Date.now(),\n\t\t0\n\t);\n\n\tconst queryArgs = {\n\t\tpost: postId,\n\t\ttype: 'note',\n\t\tstatus: 'all',\n\t\tper_page: -1,\n\t};\n\n\tconst { records: threads } = useEntityRecords(\n\t\t'root',\n\t\t'comment',\n\t\tqueryArgs,\n\t\t{ enabled: !! postId && typeof postId === 'number' }\n\t);\n\n\tconst { getBlockAttributes } = useSelect( blockEditorStore );\n\tconst { clientIds } = useSelect( ( select ) => {\n\t\tconst { getClientIdsWithDescendants } = select( blockEditorStore );\n\t\treturn {\n\t\t\tclientIds: getClientIdsWithDescendants(),\n\t\t};\n\t}, [] );\n\n\t// Process comments to build the tree structure.\n\tconst { resultComments, unresolvedSortedThreads } = useMemo( () => {\n\t\tif ( ! threads || threads.length === 0 ) {\n\t\t\treturn { resultComments: [], unresolvedSortedThreads: [] };\n\t\t}\n\n\t\tconst blocksWithComments = clientIds.reduce( ( results, clientId ) => {\n\t\t\tconst commentId = getBlockAttributes( clientId )?.metadata?.noteId;\n\t\t\tif ( commentId ) {\n\t\t\t\tresults[ clientId ] = commentId;\n\t\t\t}\n\t\t\treturn results;\n\t\t}, {} );\n\n\t\t// Create a compare to store the references to all objects by id.\n\t\tconst compare = {};\n\t\tconst result = [];\n\n\t\t// Initialize each object with an empty `reply` array and map blockClientId.\n\t\tthreads.forEach( ( item ) => {\n\t\t\tconst itemBlock = Object.keys( blocksWithComments ).find(\n\t\t\t\t( key ) => blocksWithComments[ key ] === item.id\n\t\t\t);\n\n\t\t\tcompare[ item.id ] = {\n\t\t\t\t...item,\n\t\t\t\treply: [],\n\t\t\t\tblockClientId: item.parent === 0 ? itemBlock : null,\n\t\t\t};\n\t\t} );\n\n\t\t// Iterate over the data to build the tree structure.\n\t\tthreads.forEach( ( item ) => {\n\t\t\tif ( item.parent === 0 ) {\n\t\t\t\t// If parent is 0, it's a root item, push it to the result array.\n\t\t\t\tresult.push( compare[ item.id ] );\n\t\t\t} else if ( compare[ item.parent ] ) {\n\t\t\t\t// Otherwise, find its parent and push it to the parent's `reply` array.\n\t\t\t\tcompare[ item.parent ].reply.push( compare[ item.id ] );\n\t\t\t}\n\t\t} );\n\n\t\tif ( 0 === result?.length ) {\n\t\t\treturn { resultComments: [], unresolvedSortedThreads: [] };\n\t\t}\n\n\t\tconst updatedResult = result.map( ( item ) => ( {\n\t\t\t...item,\n\t\t\treply: [ ...item.reply ].reverse(),\n\t\t} ) );\n\n\t\tconst threadIdMap = new Map(\n\t\t\tupdatedResult.map( ( thread ) => [ String( thread.id ), thread ] )\n\t\t);\n\n\t\t// Prepare sets to determine which threads are linked to existing blocks.\n\t\tconst mappedIds = new Set(\n\t\t\tObject.values( blocksWithComments ).map( ( id ) => String( id ) )\n\t\t);\n\n\t\t// Get comments by block order, first unresolved, then resolved.\n\t\tconst unresolvedSortedComments = Object.values( blocksWithComments )\n\t\t\t.map( ( commentId ) => threadIdMap.get( String( commentId ) ) )\n\t\t\t.filter(\n\t\t\t\t( thread ) => thread !== undefined && thread.status === 'hold'\n\t\t\t);\n\n\t\tconst resolvedSortedComments = Object.values( blocksWithComments )\n\t\t\t.map( ( commentId ) => threadIdMap.get( String( commentId ) ) )\n\t\t\t.filter(\n\t\t\t\t( thread ) =>\n\t\t\t\t\tthread !== undefined && thread.status === 'approved'\n\t\t\t);\n\n\t\t// Append orphaned notes (whose related block was deleted or missing).\n\t\tconst orphanedComments = updatedResult.filter(\n\t\t\t( thread ) => ! mappedIds.has( String( thread.id ) )\n\t\t);\n\n\t\tconst allSortedComments = [\n\t\t\t...unresolvedSortedComments,\n\t\t\t...resolvedSortedComments,\n\t\t\t...orphanedComments,\n\t\t];\n\n\t\treturn {\n\t\t\tresultComments: allSortedComments,\n\t\t\tunresolvedSortedThreads: unresolvedSortedComments,\n\t\t};\n\t}, [ clientIds, threads, getBlockAttributes ] );\n\n\treturn {\n\t\tresultComments,\n\t\tunresolvedSortedThreads,\n\t\treflowComments,\n\t\tcommentLastUpdated,\n\t};\n}\n\nexport function useBlockCommentsActions( reflowComments = noop ) {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { saveEntityRecord, deleteEntityRecord } = useDispatch( coreStore );\n\tconst { getCurrentPostId } = useSelect( editorStore );\n\tconst { getBlockAttributes, getSelectedBlockClientId } =\n\t\tuseSelect( blockEditorStore );\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tconst onError = ( error ) => {\n\t\tconst errorMessage =\n\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t? decodeEntities( error.message )\n\t\t\t\t: __( 'An error occurred while performing an update.' );\n\t\tcreateNotice( 'error', errorMessage, {\n\t\t\ttype: 'snackbar',\n\t\t\tisDismissible: true,\n\t\t} );\n\t};\n\n\tconst onCreate = async ( { content, parent } ) => {\n\t\ttry {\n\t\t\tconst savedRecord = await saveEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'comment',\n\t\t\t\t{\n\t\t\t\t\tpost: getCurrentPostId(),\n\t\t\t\t\tcontent,\n\t\t\t\t\tstatus: 'hold',\n\t\t\t\t\ttype: 'note',\n\t\t\t\t\tparent: parent || 0,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\t// If it's a main comment, update the block attributes with the comment id.\n\t\t\tif ( ! parent && savedRecord?.id ) {\n\t\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\t\tconst metadata = getBlockAttributes( clientId )?.metadata;\n\t\t\t\tupdateBlockAttributes( clientId, {\n\t\t\t\t\tmetadata: {\n\t\t\t\t\t\t...metadata,\n\t\t\t\t\t\tnoteId: savedRecord.id,\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice(\n\t\t\t\t'snackbar',\n\t\t\t\tparent ? __( 'Reply added.' ) : __( 'Note added.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tisDismissible: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\tsetTimeout( reflowComments, 300 );\n\t\t\treturn savedRecord;\n\t\t} catch ( error ) {\n\t\t\treflowComments();\n\t\t\tonError( error );\n\t\t}\n\t};\n\n\tconst onEdit = async ( { id, content, status } ) => {\n\t\tconst messageType = status ? status : 'updated';\n\t\tconst messages = {\n\t\t\tapproved: __( 'Note marked as resolved.' ),\n\t\t\thold: __( 'Note reopened.' ),\n\t\t\tupdated: __( 'Note updated.' ),\n\t\t};\n\n\t\ttry {\n\t\t\t// For resolution or reopen actions, create a new note with metadata.\n\t\t\tif ( status === 'approved' || status === 'hold' ) {\n\t\t\t\t// First, update the thread status.\n\t\t\t\tawait saveEntityRecord(\n\t\t\t\t\t'root',\n\t\t\t\t\t'comment',\n\t\t\t\t\t{\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tstatus,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tthrowOnError: true,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Then create a new comment with the metadata.\n\t\t\t\tconst newCommentData = {\n\t\t\t\t\tpost: getCurrentPostId(),\n\t\t\t\t\tcontent: content || '', // Empty content for resolve, content for reopen.\n\t\t\t\t\ttype: 'note',\n\t\t\t\t\tstatus,\n\t\t\t\t\tparent: id,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\t_wp_note_status:\n\t\t\t\t\t\t\tstatus === 'approved' ? 'resolved' : 'reopen',\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tawait saveEntityRecord( 'root', 'comment', newCommentData, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst updateData = {\n\t\t\t\t\tid,\n\t\t\t\t\tcontent,\n\t\t\t\t\tstatus,\n\t\t\t\t};\n\n\t\t\t\tawait saveEntityRecord( 'root', 'comment', updateData, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice(\n\t\t\t\t'snackbar',\n\t\t\t\tmessages[ messageType ] ?? __( 'Note updated.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tisDismissible: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\treflowComments();\n\t\t} catch ( error ) {\n\t\t\treflowComments();\n\t\t\tonError( error );\n\t\t}\n\t};\n\n\tconst onDelete = async ( comment ) => {\n\t\ttry {\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'comment',\n\t\t\t\tcomment.id,\n\t\t\t\tundefined,\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! comment.parent ) {\n\t\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\t\tconst metadata = getBlockAttributes( clientId )?.metadata;\n\t\t\t\tupdateBlockAttributes( clientId, {\n\t\t\t\t\tmetadata: cleanEmptyObject( {\n\t\t\t\t\t\t...metadata,\n\t\t\t\t\t\tnoteId: undefined,\n\t\t\t\t\t} ),\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice( 'snackbar', __( 'Note deleted.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t\tisDismissible: true,\n\t\t\t} );\n\t\t\treflowComments();\n\t\t} catch ( error ) {\n\t\t\treflowComments();\n\t\t\tonError( error );\n\t\t}\n\t};\n\n\treturn { onCreate, onEdit, onDelete };\n}\n\nexport function useEnableFloatingSidebar( enabled = false ) {\n\tconst registry = useRegistry();\n\tuseEffect( () => {\n\t\tif ( ! enabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { getActiveComplementaryArea } =\n\t\t\tregistry.select( interfaceStore );\n\t\tconst { disableComplementaryArea, enableComplementaryArea } =\n\t\t\tregistry.dispatch( interfaceStore );\n\n\t\tconst unsubscribe = registry.subscribe( () => {\n\t\t\t// Return `null` to indicate the user hid the complementary area.\n\t\t\tif ( getActiveComplementaryArea( 'core' ) === null ) {\n\t\t\t\tenableComplementaryArea( 'core', collabSidebarName );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tunsubscribe();\n\t\t\tif ( getActiveComplementaryArea( 'core' ) === collabSidebarName ) {\n\t\t\t\tdisableComplementaryArea( 'core', collabSidebarName );\n\t\t\t}\n\t\t};\n\t}, [ enabled, registry ] );\n}\n\nexport function useFloatingThread( {\n\tthread,\n\tcalculatedOffset,\n\tsetHeights,\n\tselectedThread,\n\tsetBlockRef,\n\tcommentLastUpdated,\n} ) {\n\tconst blockElement = useBlockElement( thread.blockClientId );\n\tconst updateHeight = useCallback(\n\t\t( id, newHeight ) => {\n\t\t\tsetHeights( ( prev ) => {\n\t\t\t\tif ( prev[ id ] !== newHeight ) {\n\t\t\t\t\treturn { ...prev, [ id ]: newHeight };\n\t\t\t\t}\n\t\t\t\treturn prev;\n\t\t\t} );\n\t\t},\n\t\t[ setHeights ]\n\t);\n\n\t// Use floating-ui to track the block element's position with the calculated offset.\n\tconst { y, refs } = useFloating( {\n\t\tplacement: 'right-start',\n\t\tmiddleware: [\n\t\t\toffsetMiddleware( {\n\t\t\t\tcrossAxis: calculatedOffset || -16,\n\t\t\t} ),\n\t\t],\n\t\twhileElementsMounted: autoUpdate,\n\t} );\n\n\t// Store the block reference for each thread.\n\tuseEffect( () => {\n\t\tif ( blockElement ) {\n\t\t\trefs.setReference( blockElement );\n\t\t}\n\t}, [ blockElement, refs, commentLastUpdated ] );\n\n\t// Track thread heights.\n\tuseEffect( () => {\n\t\tif ( refs.floating?.current ) {\n\t\t\tsetBlockRef( thread.id, blockElement );\n\t\t}\n\t}, [ blockElement, thread.id, refs.floating, setBlockRef ] );\n\n\t// When the selected thread changes, update heights, triggering offset recalculation.\n\tuseEffect( () => {\n\t\tif ( refs.floating?.current ) {\n\t\t\tconst newHeight = refs.floating.current.scrollHeight;\n\t\t\tupdateHeight( thread.id, newHeight );\n\t\t}\n\t}, [\n\t\tthread.id,\n\t\tupdateHeight,\n\t\trefs.floating,\n\t\tselectedThread,\n\t\tcommentLastUpdated,\n\t] );\n\n\treturn {\n\t\ty,\n\t\trefs,\n\t};\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -7,25 +7,25 @@ import { useViewportMatch } from "@wordpress/compose";
|
|
|
7
7
|
import { comment as commentIcon } from "@wordpress/icons";
|
|
8
8
|
import { store as blockEditorStore } from "@wordpress/block-editor";
|
|
9
9
|
import { store as interfaceStore } from "@wordpress/interface";
|
|
10
|
-
import PluginSidebar from "../plugin-sidebar
|
|
10
|
+
import PluginSidebar from "../plugin-sidebar";
|
|
11
11
|
import {
|
|
12
12
|
collabHistorySidebarName,
|
|
13
13
|
collabSidebarName,
|
|
14
14
|
SIDEBARS
|
|
15
|
-
} from "./constants
|
|
16
|
-
import { Comments } from "./comments
|
|
17
|
-
import { store as editorStore } from "../../store
|
|
18
|
-
import AddCommentMenuItem from "./comment-menu-item
|
|
19
|
-
import CommentAvatarIndicator from "./comment-indicator-toolbar
|
|
20
|
-
import { useGlobalStylesContext } from "../global-styles-provider
|
|
15
|
+
} from "./constants";
|
|
16
|
+
import { Comments } from "./comments";
|
|
17
|
+
import { store as editorStore } from "../../store";
|
|
18
|
+
import AddCommentMenuItem from "./comment-menu-item";
|
|
19
|
+
import CommentAvatarIndicator from "./comment-indicator-toolbar";
|
|
20
|
+
import { useGlobalStylesContext } from "../global-styles-provider";
|
|
21
21
|
import {
|
|
22
22
|
useBlockComments,
|
|
23
23
|
useBlockCommentsActions,
|
|
24
24
|
useEnableFloatingSidebar
|
|
25
|
-
} from "./hooks
|
|
26
|
-
import { focusCommentThread } from "./utils
|
|
27
|
-
import PostTypeSupportCheck from "../post-type-support-check
|
|
28
|
-
import { unlock } from "../../lock-unlock
|
|
25
|
+
} from "./hooks";
|
|
26
|
+
import { focusCommentThread } from "./utils";
|
|
27
|
+
import PostTypeSupportCheck from "../post-type-support-check";
|
|
28
|
+
import { unlock } from "../../lock-unlock";
|
|
29
29
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
30
30
|
function NotesSidebarContent({
|
|
31
31
|
newNoteFormState,
|
|
@@ -10,7 +10,7 @@ import { Button, Popover } from "@wordpress/components";
|
|
|
10
10
|
import { __ } from "@wordpress/i18n";
|
|
11
11
|
import { next, previous } from "@wordpress/icons";
|
|
12
12
|
import { useSelect } from "@wordpress/data";
|
|
13
|
-
import { unlock } from "../../lock-unlock
|
|
13
|
+
import { unlock } from "../../lock-unlock";
|
|
14
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
var { useHasBlockToolbar } = unlock(blockEditorPrivateApis);
|
|
16
16
|
function CollapsibleBlockToolbar({ isCollapsed, onToggle }) {
|
|
@@ -24,16 +24,16 @@ import { store as blockEditorStore } from "@wordpress/block-editor";
|
|
|
24
24
|
import { store as coreStore, useEntityRecord } from "@wordpress/core-data";
|
|
25
25
|
import { store as interfaceStore } from "@wordpress/interface";
|
|
26
26
|
import { decodeEntities } from "@wordpress/html-entities";
|
|
27
|
-
import { unlock } from "../../lock-unlock
|
|
28
|
-
import { store as editorStore } from "../../store
|
|
27
|
+
import { unlock } from "../../lock-unlock";
|
|
28
|
+
import { store as editorStore } from "../../store";
|
|
29
29
|
import {
|
|
30
30
|
PATTERN_POST_TYPE,
|
|
31
31
|
TEMPLATE_PART_POST_TYPE,
|
|
32
32
|
TEMPLATE_POST_TYPE
|
|
33
|
-
} from "../../store/constants
|
|
34
|
-
import { modalName as patternRenameModalName } from "../pattern-rename-modal
|
|
35
|
-
import { modalName as patternDuplicateModalName } from "../pattern-duplicate-modal
|
|
36
|
-
import isTemplateRevertable from "../../store/utils/is-template-revertable
|
|
33
|
+
} from "../../store/constants";
|
|
34
|
+
import { modalName as patternRenameModalName } from "../pattern-rename-modal";
|
|
35
|
+
import { modalName as patternDuplicateModalName } from "../pattern-duplicate-modal";
|
|
36
|
+
import isTemplateRevertable from "../../store/utils/is-template-revertable";
|
|
37
37
|
var getEditorCommandLoader = () => function useEditorCommandLoader() {
|
|
38
38
|
const {
|
|
39
39
|
editorMode,
|
|
@@ -17,13 +17,13 @@ import { useRef, useEffect } from "@wordpress/element";
|
|
|
17
17
|
import { useReducedMotion } from "@wordpress/compose";
|
|
18
18
|
import { decodeEntities } from "@wordpress/html-entities";
|
|
19
19
|
import { __unstableStripHTML as stripHTML } from "@wordpress/dom";
|
|
20
|
-
import { TEMPLATE_POST_TYPES } from "../../store/constants
|
|
21
|
-
import { store as editorStore } from "../../store
|
|
22
|
-
import usePageTypeBadge from "../../utils/pageTypeBadge
|
|
23
|
-
import { getTemplateInfo } from "../../utils/get-template-info
|
|
24
|
-
import { getStylesCanvasTitle } from "../styles-canvas
|
|
25
|
-
import { unlock } from "../../lock-unlock
|
|
26
|
-
import useEditedSectionDetails from "./useEditedSectionDetails
|
|
20
|
+
import { TEMPLATE_POST_TYPES } from "../../store/constants";
|
|
21
|
+
import { store as editorStore } from "../../store";
|
|
22
|
+
import usePageTypeBadge from "../../utils/pageTypeBadge";
|
|
23
|
+
import { getTemplateInfo } from "../../utils/get-template-info";
|
|
24
|
+
import { getStylesCanvasTitle } from "../styles-canvas";
|
|
25
|
+
import { unlock } from "../../lock-unlock";
|
|
26
|
+
import useEditedSectionDetails from "./useEditedSectionDetails";
|
|
27
27
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
28
|
var MotionButton = motion.create(Button);
|
|
29
29
|
function DocumentBar(props) {
|
|
@@ -3,7 +3,7 @@ import { useSelect } from "@wordpress/data";
|
|
|
3
3
|
import { decodeEntities } from "@wordpress/html-entities";
|
|
4
4
|
import { store as blockEditorStore } from "@wordpress/block-editor";
|
|
5
5
|
import { store as coreStore } from "@wordpress/core-data";
|
|
6
|
-
import { unlock } from "../../lock-unlock
|
|
6
|
+
import { unlock } from "../../lock-unlock";
|
|
7
7
|
function useEditedSectionDetails() {
|
|
8
8
|
return useSelect((select) => {
|
|
9
9
|
if (!window?.__experimentalContentOnlyPatternInsertion) {
|
|
@@ -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";
|
|
10
|
+
import { store as editorStore } from "../../store";
|
|
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";
|
|
13
|
+
import { store as editorStore } from "../../store";
|
|
14
|
+
import EditorHistoryRedo from "../editor-history/redo";
|
|
15
|
+
import EditorHistoryUndo from "../editor-history/undo";
|
|
16
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
function DocumentTools({ className, disableBlockTools = false }) {
|
|
18
18
|
const { setIsInserterOpened, setIsListViewOpened } = useDispatch(editorStore);
|