@wordpress/editor 13.35.0 → 14.0.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 +7 -0
- package/README.md +333 -39
- package/build/bindings/index.js +1 -3
- package/build/bindings/index.js.map +1 -1
- package/build/bindings/pattern-overrides.js +1 -1
- package/build/bindings/pattern-overrides.js.map +1 -1
- package/build/bindings/post-meta.js +38 -2
- package/build/bindings/post-meta.js.map +1 -1
- package/build/components/autocompleters/user.js +12 -8
- package/build/components/autocompleters/user.js.map +1 -1
- package/build/components/block-manager/category.js +19 -17
- package/build/components/block-manager/category.js.map +1 -1
- package/build/components/block-manager/checklist.js +15 -14
- package/build/components/block-manager/checklist.js.map +1 -1
- package/build/components/block-manager/index.js +37 -33
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/block-removal-warnings/index.js +2 -2
- package/build/components/block-removal-warnings/index.js.map +1 -1
- package/build/components/block-settings-menu/content-only-settings-menu.js +46 -32
- package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build/components/blog-title/index.js +116 -0
- package/build/components/blog-title/index.js.map +1 -0
- package/build/components/collapsible-block-toolbar/index.js +21 -18
- package/build/components/collapsible-block-toolbar/index.js.map +1 -1
- package/build/components/commands/index.js +109 -3
- package/build/components/commands/index.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +167 -0
- package/build/components/create-template-part-modal/index.js.map +1 -0
- package/build/components/create-template-part-modal/utils.js +64 -0
- package/build/components/create-template-part-modal/utils.js.map +1 -0
- package/build/components/deprecated.js +2 -2
- package/build/components/deprecated.js.map +1 -1
- package/build/components/document-bar/index.js +94 -70
- package/build/components/document-bar/index.js.map +1 -1
- package/build/components/document-outline/index.js +124 -121
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/document-outline/item.js +18 -14
- package/build/components/document-outline/item.js.map +1 -1
- package/build/components/document-tools/index.js +56 -53
- package/build/components/document-tools/index.js.map +1 -1
- package/build/components/editor-help/add-blocks.native.js +14 -11
- package/build/components/editor-help/add-blocks.native.js.map +1 -1
- package/build/components/editor-help/customize-blocks.native.js +14 -11
- package/build/components/editor-help/customize-blocks.native.js.map +1 -1
- package/build/components/editor-help/help-detail-navigation-screen.native.js +32 -22
- package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
- package/build/components/editor-help/help-get-support-button.native.js +8 -6
- package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
- package/build/components/editor-help/help-section-title.native.js +8 -6
- package/build/components/editor-help/help-section-title.native.js.map +1 -1
- package/build/components/editor-help/help-topic-row.native.js +7 -6
- package/build/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build/components/editor-help/icon-move-blocks.native.js +7 -6
- package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
- package/build/components/editor-help/index.native.js +94 -76
- package/build/components/editor-help/index.native.js.map +1 -1
- package/build/components/editor-help/intro-to-blocks.native.js +41 -37
- package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
- package/build/components/editor-help/move-blocks.native.js +25 -21
- package/build/components/editor-help/move-blocks.native.js.map +1 -1
- package/build/components/editor-help/remove-blocks.native.js +12 -9
- package/build/components/editor-help/remove-blocks.native.js.map +1 -1
- package/build/components/editor-help/view-sections.native.js +24 -19
- package/build/components/editor-help/view-sections.native.js.map +1 -1
- package/build/components/editor-history/redo.js +2 -2
- package/build/components/editor-history/redo.js.map +1 -1
- package/build/components/editor-history/undo.js +2 -2
- package/build/components/editor-history/undo.js.map +1 -1
- package/build/components/editor-interface/content-slot-fill.js +23 -0
- package/build/components/editor-interface/content-slot-fill.js.map +1 -0
- package/build/components/editor-interface/index.js +178 -0
- package/build/components/editor-interface/index.js.map +1 -0
- package/build/components/editor-notices/index.js +22 -9
- package/build/components/editor-notices/index.js.map +1 -1
- package/build/components/editor-snackbars/index.js +2 -2
- package/build/components/editor-snackbars/index.js.map +1 -1
- package/build/components/entities-saved-states/entity-record-item.js +37 -10
- package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build/components/entities-saved-states/entity-type-list.js +25 -22
- package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build/components/entities-saved-states/index.js +53 -46
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/error-boundary/index.js +27 -14
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/error-boundary/index.native.js +45 -35
- package/build/components/error-boundary/index.native.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js +3 -4
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build/components/global-styles-provider/index.js +81 -16
- package/build/components/global-styles-provider/index.js.map +1 -1
- package/build/components/header/back-button.js +34 -0
- package/build/components/header/back-button.js.map +1 -0
- package/build/components/header/index.js +88 -59
- package/build/components/header/index.js.map +1 -1
- package/build/components/inserter-sidebar/index.js +45 -19
- package/build/components/inserter-sidebar/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +53 -48
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +30 -26
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/list-view-sidebar/index.js +59 -47
- package/build/components/list-view-sidebar/index.js.map +1 -1
- package/build/components/list-view-sidebar/list-view-outline.js +21 -4
- package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
- package/build/components/local-autosave-monitor/index.js +15 -2
- package/build/components/local-autosave-monitor/index.js.map +1 -1
- package/build/components/mode-switcher/index.js +10 -10
- package/build/components/mode-switcher/index.js.map +1 -1
- package/build/components/more-menu/copy-content-menu-item.js +5 -4
- package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
- package/build/components/more-menu/index.js +89 -76
- package/build/components/more-menu/index.js.map +1 -1
- package/build/components/more-menu/tools-more-menu-group.js +2 -2
- package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build/components/more-menu/view-more-menu-group.js +2 -2
- package/build/components/more-menu/view-more-menu-group.js.map +1 -1
- package/build/components/offline-status/index.native.js +12 -11
- package/build/components/offline-status/index.native.js.map +1 -1
- package/build/components/page-attributes/order.js +87 -14
- package/build/components/page-attributes/order.js.map +1 -1
- package/build/components/page-attributes/panel.js +10 -19
- package/build/components/page-attributes/panel.js.map +1 -1
- package/build/components/page-attributes/parent.js +86 -3
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/pattern-duplicate-modal/index.js +59 -0
- package/build/components/pattern-duplicate-modal/index.js.map +1 -0
- package/build/components/pattern-overrides-panel/index.js +2 -2
- package/build/components/pattern-overrides-panel/index.js.map +1 -1
- package/build/components/pattern-rename-modal/index.js +58 -0
- package/build/components/pattern-rename-modal/index.js.map +1 -0
- package/build/components/plugin-document-setting-panel/index.js +17 -12
- package/build/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build/components/plugin-post-publish-panel/index.js +10 -7
- package/build/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build/components/plugin-post-status-info/index.js +7 -4
- package/build/components/plugin-post-status-info/index.js.map +1 -1
- package/build/components/plugin-pre-publish-panel/index.js +10 -7
- package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build/components/plugin-sidebar/index.js +3 -4
- package/build/components/plugin-sidebar/index.js.map +1 -1
- package/build/components/plugin-sidebar-more-menu-item/index.js +3 -5
- package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build/components/post-actions/actions.js +378 -309
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-actions/export-pattern-action.js +64 -0
- package/build/components/post-actions/export-pattern-action.js.map +1 -0
- package/build/components/post-actions/export-pattern-action.native.js +11 -0
- package/build/components/post-actions/export-pattern-action.native.js.map +1 -0
- package/build/components/post-actions/index.js +66 -50
- package/build/components/post-actions/index.js.map +1 -1
- package/build/components/post-author/check.js +6 -6
- package/build/components/post-author/check.js.map +1 -1
- package/build/components/post-author/combobox.js +4 -3
- package/build/components/post-author/combobox.js.map +1 -1
- package/build/components/post-author/hook.js +2 -1
- package/build/components/post-author/hook.js.map +1 -1
- package/build/components/post-author/index.js +3 -3
- package/build/components/post-author/index.js.map +1 -1
- package/build/components/post-author/panel.js +72 -4
- package/build/components/post-author/panel.js.map +1 -1
- package/build/components/post-author/select.js +4 -3
- package/build/components/post-author/select.js.map +1 -1
- package/build/components/post-card-panel/index.js +54 -19
- package/build/components/post-card-panel/index.js.map +1 -1
- package/build/components/post-comments/index.js +38 -22
- package/build/components/post-comments/index.js.map +1 -1
- package/build/components/post-content-information/index.js +8 -5
- package/build/components/post-content-information/index.js.map +1 -1
- package/build/components/post-discussion/panel.js +54 -38
- package/build/components/post-discussion/panel.js.map +1 -1
- package/build/components/post-excerpt/check.js +6 -6
- package/build/components/post-excerpt/check.js.map +1 -1
- package/build/components/post-excerpt/index.js +18 -17
- package/build/components/post-excerpt/index.js.map +1 -1
- package/build/components/post-excerpt/panel.js +59 -42
- package/build/components/post-excerpt/panel.js.map +1 -1
- package/build/components/post-excerpt/plugin.js +7 -4
- package/build/components/post-excerpt/plugin.js.map +1 -1
- package/build/components/post-featured-image/check.js +17 -7
- package/build/components/post-featured-image/check.js.map +1 -1
- package/build/components/post-featured-image/index.js +77 -49
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-featured-image/panel.js +22 -7
- package/build/components/post-featured-image/panel.js.map +1 -1
- package/build/components/post-format/check.js +14 -4
- package/build/components/post-format/check.js.map +1 -1
- package/build/components/post-format/index.js +37 -20
- package/build/components/post-format/index.js.map +1 -1
- package/build/components/post-format/panel.js +73 -7
- package/build/components/post-format/panel.js.map +1 -1
- package/build/components/post-last-edited-panel/index.js +7 -4
- package/build/components/post-last-edited-panel/index.js.map +1 -1
- package/build/components/post-last-revision/check.js +13 -5
- package/build/components/post-last-revision/check.js.map +1 -1
- package/build/components/post-last-revision/index.js +19 -13
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-last-revision/panel.js +12 -5
- package/build/components/post-last-revision/panel.js.map +1 -1
- package/build/components/post-locked-modal/index.js +57 -35
- package/build/components/post-locked-modal/index.js.map +1 -1
- package/build/components/post-panel-row/index.js +11 -8
- package/build/components/post-panel-row/index.js.map +1 -1
- package/build/components/post-panel-section/index.js +5 -4
- package/build/components/post-panel-section/index.js.map +1 -1
- package/build/components/post-pending-status/check.js +10 -0
- package/build/components/post-pending-status/check.js.map +1 -1
- package/build/components/post-pending-status/index.js +14 -7
- package/build/components/post-pending-status/index.js.map +1 -1
- package/build/components/post-pingbacks/index.js +13 -5
- package/build/components/post-pingbacks/index.js.map +1 -1
- package/build/components/post-preview-button/index.js +45 -21
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-button/index.js +21 -11
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
- package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
- package/build/components/post-publish-panel/index.js +46 -33
- package/build/components/post-publish-panel/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-category-panel.js +12 -9
- package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js +21 -15
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js +13 -10
- package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.js +29 -24
- package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build/components/post-publish-panel/postpublish.js +55 -38
- package/build/components/post-publish-panel/postpublish.js.map +1 -1
- package/build/components/post-publish-panel/prepublish.js +41 -26
- package/build/components/post-publish-panel/prepublish.js.map +1 -1
- package/build/components/post-saved-state/index.js +8 -8
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-schedule/check.js +8 -0
- package/build/components/post-schedule/check.js.map +1 -1
- package/build/components/post-schedule/index.js +30 -5
- package/build/components/post-schedule/index.js.map +1 -1
- package/build/components/post-schedule/label.js +16 -0
- package/build/components/post-schedule/label.js.map +1 -1
- package/build/components/post-schedule/panel.js +43 -30
- package/build/components/post-schedule/panel.js.map +1 -1
- package/build/components/post-slug/check.js +5 -4
- package/build/components/post-slug/check.js.map +1 -1
- package/build/components/post-slug/index.js +5 -3
- package/build/components/post-slug/index.js.map +1 -1
- package/build/components/post-slug/panel.js +7 -4
- package/build/components/post-slug/panel.js.map +1 -1
- package/build/components/post-status/index.js +118 -119
- package/build/components/post-status/index.js.map +1 -1
- package/build/components/post-sticky/index.js +16 -8
- package/build/components/post-sticky/index.js.map +1 -1
- package/build/components/post-sticky/panel.js +6 -2
- package/build/components/post-sticky/panel.js.map +1 -1
- package/build/components/post-switch-to-draft-button/index.js +25 -21
- package/build/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build/components/post-sync-status/index.js +8 -6
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +21 -20
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +71 -61
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/index.js +6 -6
- package/build/components/post-taxonomies/index.js.map +1 -1
- package/build/components/post-taxonomies/most-used-terms.js +19 -15
- package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build/components/post-taxonomies/panel.js +15 -11
- package/build/components/post-taxonomies/panel.js.map +1 -1
- package/build/components/post-template/block-theme.js +42 -32
- package/build/components/post-template/block-theme.js.map +1 -1
- package/build/components/post-template/classic-theme.js +73 -50
- package/build/components/post-template/classic-theme.js.map +1 -1
- package/build/components/post-template/create-new-template-modal.js +33 -27
- package/build/components/post-template/create-new-template-modal.js.map +1 -1
- package/build/components/post-template/create-new-template.js +14 -11
- package/build/components/post-template/create-new-template.js.map +1 -1
- package/build/components/post-template/panel.js +16 -10
- package/build/components/post-template/panel.js.map +1 -1
- package/build/components/post-template/reset-default-template.js +5 -4
- package/build/components/post-template/reset-default-template.js.map +1 -1
- package/build/components/post-template/swap-template-button.js +20 -15
- package/build/components/post-template/swap-template-button.js.map +1 -1
- package/build/components/post-text-editor/index.js +27 -20
- package/build/components/post-text-editor/index.js.map +1 -1
- package/build/components/post-title/index.js +29 -17
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-title/index.native.js +81 -57
- package/build/components/post-title/index.native.js.map +1 -1
- package/build/components/post-title/post-title-raw.js +10 -3
- package/build/components/post-title/post-title-raw.js.map +1 -1
- package/build/components/post-title/use-post-title-focus.js +7 -0
- package/build/components/post-title/use-post-title-focus.js.map +1 -1
- package/build/components/post-title/use-post-title.js +5 -0
- package/build/components/post-title/use-post-title.js.map +1 -1
- package/build/components/post-transform-panel/index.js +11 -11
- package/build/components/post-transform-panel/index.js.map +1 -1
- package/build/components/post-trash/index.js +19 -15
- package/build/components/post-trash/index.js.map +1 -1
- package/build/components/post-url/check.js +8 -0
- package/build/components/post-url/check.js.map +1 -1
- package/build/components/post-url/index.js +98 -73
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/post-url/label.js +11 -0
- package/build/components/post-url/label.js.map +1 -1
- package/build/components/post-url/panel.js +33 -25
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/post-view-link/index.js +2 -2
- package/build/components/post-view-link/index.js.map +1 -1
- package/build/components/post-visibility/check.js +9 -0
- package/build/components/post-visibility/check.js.map +1 -1
- package/build/components/post-visibility/index.js +83 -68
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/post-visibility/label.js +11 -0
- package/build/components/post-visibility/label.js.map +1 -1
- package/build/components/posts-per-page/index.js +109 -0
- package/build/components/posts-per-page/index.js.map +1 -0
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
- package/build/components/preferences-modal/index.js +124 -102
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preview-dropdown/index.js +47 -31
- package/build/components/preview-dropdown/index.js.map +1 -1
- package/build/components/provider/index.js +94 -20
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js +55 -19
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +7 -6
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/provider/with-registry-provider.js +31 -24
- package/build/components/provider/with-registry-provider.js.map +1 -1
- package/build/components/resizable-editor/index.js +96 -0
- package/build/components/resizable-editor/index.js.map +1 -0
- package/build/components/resizable-editor/resize-handle.js +59 -0
- package/build/components/resizable-editor/resize-handle.js.map +1 -0
- package/build/components/save-publish-panels/index.js +35 -26
- package/build/components/save-publish-panels/index.js.map +1 -1
- package/build/components/sidebar/header.js +17 -14
- package/build/components/sidebar/header.js.map +1 -1
- package/build/components/sidebar/index.js +36 -32
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar/post-summary.js +38 -33
- package/build/components/sidebar/post-summary.js.map +1 -1
- package/build/components/site-discussion/index.js +133 -0
- package/build/components/site-discussion/index.js.map +1 -0
- package/build/components/start-page-options/index.js +13 -11
- package/build/components/start-page-options/index.js.map +1 -1
- package/build/components/start-template-options/index.js +29 -23
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/table-of-contents/index.js +4 -4
- package/build/components/table-of-contents/index.js.map +1 -1
- package/build/components/table-of-contents/panel.js +53 -35
- package/build/components/table-of-contents/panel.js.map +1 -1
- package/build/components/template-areas/index.js +36 -22
- package/build/components/template-areas/index.js.map +1 -1
- package/build/components/template-content-panel/index.js +7 -6
- package/build/components/template-content-panel/index.js.map +1 -1
- package/build/components/template-validation-notice/index.js +25 -21
- package/build/components/template-validation-notice/index.js.map +1 -1
- package/build/components/text-editor/index.js +73 -0
- package/build/components/text-editor/index.js.map +1 -0
- package/build/components/time-to-read/index.js +8 -8
- package/build/components/time-to-read/index.js.map +1 -1
- package/build/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +6 -6
- package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
- package/build/components/{editor-canvas → visual-editor}/index.js +115 -74
- package/build/components/visual-editor/index.js.map +1 -0
- package/build/components/word-count/index.js +5 -4
- package/build/components/word-count/index.js.map +1 -1
- package/build/hooks/custom-sources-backwards-compatibility.js +3 -4
- package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build/hooks/index.js +1 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/media-upload.js +10 -0
- package/build/hooks/media-upload.js.map +1 -0
- package/build/hooks/pattern-overrides.js +15 -11
- package/build/hooks/pattern-overrides.js.map +1 -1
- package/build/private-apis.js +10 -28
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +2 -26
- package/build/private-apis.native.js.map +1 -1
- package/build/store/constants.js +4 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/private-actions.js +10 -14
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +39 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/selectors.js +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build/utils/set-nested-value.js +44 -0
- package/build/utils/set-nested-value.js.map +1 -0
- package/build-module/bindings/index.js +1 -3
- package/build-module/bindings/index.js.map +1 -1
- package/build-module/bindings/pattern-overrides.js +1 -1
- package/build-module/bindings/pattern-overrides.js.map +1 -1
- package/build-module/bindings/post-meta.js +38 -2
- package/build-module/bindings/post-meta.js.map +1 -1
- package/build-module/components/autocompleters/user.js +14 -9
- package/build-module/components/autocompleters/user.js.map +1 -1
- package/build-module/components/block-manager/category.js +20 -17
- package/build-module/components/block-manager/category.js.map +1 -1
- package/build-module/components/block-manager/checklist.js +16 -14
- package/build-module/components/block-manager/checklist.js.map +1 -1
- package/build-module/components/block-manager/index.js +38 -33
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/block-removal-warnings/index.js +2 -2
- package/build-module/components/block-removal-warnings/index.js.map +1 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +48 -32
- package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
- package/build-module/components/blog-title/index.js +110 -0
- package/build-module/components/blog-title/index.js.map +1 -0
- package/build-module/components/collapsible-block-toolbar/index.js +23 -18
- package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
- package/build-module/components/commands/index.js +111 -5
- package/build-module/components/commands/index.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +160 -0
- package/build-module/components/create-template-part-modal/index.js.map +1 -0
- package/build-module/components/create-template-part-modal/utils.js +54 -0
- package/build-module/components/create-template-part-modal/utils.js.map +1 -0
- package/build-module/components/deprecated.js +2 -2
- package/build-module/components/deprecated.js.map +1 -1
- package/build-module/components/document-bar/index.js +93 -68
- package/build-module/components/document-bar/index.js.map +1 -1
- package/build-module/components/document-outline/index.js +125 -120
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/document-outline/item.js +19 -14
- package/build-module/components/document-outline/item.js.map +1 -1
- package/build-module/components/document-tools/index.js +58 -53
- package/build-module/components/document-tools/index.js.map +1 -1
- package/build-module/components/editor-help/add-blocks.native.js +16 -11
- package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/customize-blocks.native.js +16 -11
- package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js +33 -22
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
- package/build-module/components/editor-help/help-get-support-button.native.js +8 -6
- package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
- package/build-module/components/editor-help/help-section-title.native.js +8 -6
- package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
- package/build-module/components/editor-help/help-topic-row.native.js +7 -6
- package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
- package/build-module/components/editor-help/icon-move-blocks.native.js +7 -6
- package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/index.native.js +96 -76
- package/build-module/components/editor-help/index.native.js.map +1 -1
- package/build-module/components/editor-help/intro-to-blocks.native.js +43 -37
- package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/move-blocks.native.js +27 -21
- package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/remove-blocks.native.js +14 -9
- package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/view-sections.native.js +25 -19
- package/build-module/components/editor-help/view-sections.native.js.map +1 -1
- package/build-module/components/editor-history/redo.js +2 -2
- package/build-module/components/editor-history/redo.js.map +1 -1
- package/build-module/components/editor-history/undo.js +2 -2
- package/build-module/components/editor-history/undo.js.map +1 -1
- package/build-module/components/editor-interface/content-slot-fill.js +16 -0
- package/build-module/components/editor-interface/content-slot-fill.js.map +1 -0
- package/build-module/components/editor-interface/index.js +172 -0
- package/build-module/components/editor-interface/index.js.map +1 -0
- package/build-module/components/editor-notices/index.js +25 -9
- package/build-module/components/editor-notices/index.js.map +1 -1
- package/build-module/components/editor-snackbars/index.js +2 -2
- package/build-module/components/editor-snackbars/index.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-record-item.js +40 -11
- package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-type-list.js +26 -22
- package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +54 -46
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js +27 -14
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/error-boundary/index.native.js +46 -35
- package/build-module/components/error-boundary/index.native.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +2 -2
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build-module/components/global-styles-provider/index.js +82 -17
- package/build-module/components/global-styles-provider/index.js.map +1 -1
- package/build-module/components/header/back-button.js +28 -0
- package/build-module/components/header/back-button.js.map +1 -0
- package/build-module/components/header/index.js +89 -59
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/inserter-sidebar/index.js +47 -21
- package/build-module/components/inserter-sidebar/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +54 -48
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +32 -26
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/list-view-sidebar/index.js +60 -47
- package/build-module/components/list-view-sidebar/index.js.map +1 -1
- package/build-module/components/list-view-sidebar/list-view-outline.js +23 -4
- package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
- package/build-module/components/local-autosave-monitor/index.js +15 -2
- package/build-module/components/local-autosave-monitor/index.js.map +1 -1
- package/build-module/components/mode-switcher/index.js +9 -8
- package/build-module/components/mode-switcher/index.js.map +1 -1
- package/build-module/components/more-menu/copy-content-menu-item.js +5 -4
- package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
- package/build-module/components/more-menu/index.js +91 -76
- package/build-module/components/more-menu/index.js.map +1 -1
- package/build-module/components/more-menu/tools-more-menu-group.js +2 -2
- package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build-module/components/more-menu/view-more-menu-group.js +2 -2
- package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
- package/build-module/components/offline-status/index.native.js +12 -9
- package/build-module/components/offline-status/index.native.js.map +1 -1
- package/build-module/components/page-attributes/order.js +90 -17
- package/build-module/components/page-attributes/order.js.map +1 -1
- package/build-module/components/page-attributes/panel.js +13 -21
- package/build-module/components/page-attributes/panel.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +88 -5
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/pattern-duplicate-modal/index.js +51 -0
- package/build-module/components/pattern-duplicate-modal/index.js.map +1 -0
- package/build-module/components/pattern-overrides-panel/index.js +2 -2
- package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
- package/build-module/components/pattern-rename-modal/index.js +50 -0
- package/build-module/components/pattern-rename-modal/index.js.map +1 -0
- package/build-module/components/plugin-document-setting-panel/index.js +19 -12
- package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build-module/components/plugin-post-publish-panel/index.js +10 -7
- package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-post-status-info/index.js +7 -4
- package/build-module/components/plugin-post-status-info/index.js.map +1 -1
- package/build-module/components/plugin-pre-publish-panel/index.js +10 -7
- package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-sidebar/index.js +2 -2
- package/build-module/components/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -3
- package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build-module/components/post-actions/actions.js +379 -309
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-actions/export-pattern-action.js +58 -0
- package/build-module/components/post-actions/export-pattern-action.js.map +1 -0
- package/build-module/components/post-actions/export-pattern-action.native.js +5 -0
- package/build-module/components/post-actions/export-pattern-action.native.js.map +1 -0
- package/build-module/components/post-actions/index.js +68 -50
- package/build-module/components/post-actions/index.js.map +1 -1
- package/build-module/components/post-author/check.js +5 -4
- package/build-module/components/post-author/check.js.map +1 -1
- package/build-module/components/post-author/combobox.js +4 -3
- package/build-module/components/post-author/combobox.js.map +1 -1
- package/build-module/components/post-author/hook.js +2 -1
- package/build-module/components/post-author/hook.js.map +1 -1
- package/build-module/components/post-author/index.js +3 -3
- package/build-module/components/post-author/index.js.map +1 -1
- package/build-module/components/post-author/panel.js +72 -4
- package/build-module/components/post-author/panel.js.map +1 -1
- package/build-module/components/post-author/select.js +4 -3
- package/build-module/components/post-author/select.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +54 -20
- package/build-module/components/post-card-panel/index.js.map +1 -1
- package/build-module/components/post-comments/index.js +40 -22
- package/build-module/components/post-comments/index.js.map +1 -1
- package/build-module/components/post-content-information/index.js +8 -5
- package/build-module/components/post-content-information/index.js.map +1 -1
- package/build-module/components/post-discussion/panel.js +56 -39
- package/build-module/components/post-discussion/panel.js.map +1 -1
- package/build-module/components/post-excerpt/check.js +5 -4
- package/build-module/components/post-excerpt/check.js.map +1 -1
- package/build-module/components/post-excerpt/index.js +17 -15
- package/build-module/components/post-excerpt/index.js.map +1 -1
- package/build-module/components/post-excerpt/panel.js +60 -40
- package/build-module/components/post-excerpt/panel.js.map +1 -1
- package/build-module/components/post-excerpt/plugin.js +7 -4
- package/build-module/components/post-excerpt/plugin.js.map +1 -1
- package/build-module/components/post-featured-image/check.js +18 -6
- package/build-module/components/post-featured-image/check.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +78 -49
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-featured-image/panel.js +22 -7
- package/build-module/components/post-featured-image/panel.js.map +1 -1
- package/build-module/components/post-format/check.js +14 -4
- package/build-module/components/post-format/check.js.map +1 -1
- package/build-module/components/post-format/index.js +39 -21
- package/build-module/components/post-format/index.js.map +1 -1
- package/build-module/components/post-format/panel.js +75 -7
- package/build-module/components/post-format/panel.js.map +1 -1
- package/build-module/components/post-last-edited-panel/index.js +7 -4
- package/build-module/components/post-last-edited-panel/index.js.map +1 -1
- package/build-module/components/post-last-revision/check.js +14 -4
- package/build-module/components/post-last-revision/check.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +21 -13
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-last-revision/panel.js +13 -4
- package/build-module/components/post-last-revision/panel.js.map +1 -1
- package/build-module/components/post-locked-modal/index.js +60 -34
- package/build-module/components/post-locked-modal/index.js.map +1 -1
- package/build-module/components/post-panel-row/index.js +12 -8
- package/build-module/components/post-panel-row/index.js.map +1 -1
- package/build-module/components/post-panel-section/index.js +5 -4
- package/build-module/components/post-panel-section/index.js.map +1 -1
- package/build-module/components/post-pending-status/check.js +11 -0
- package/build-module/components/post-pending-status/check.js.map +1 -1
- package/build-module/components/post-pending-status/index.js +15 -7
- package/build-module/components/post-pending-status/index.js.map +1 -1
- package/build-module/components/post-pingbacks/index.js +13 -5
- package/build-module/components/post-pingbacks/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +47 -21
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +22 -11
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
- package/build-module/components/post-publish-panel/index.js +48 -33
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-category-panel.js +13 -9
- package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js +22 -15
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-tags-panel.js +14 -10
- package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.js +30 -24
- package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +57 -38
- package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
- package/build-module/components/post-publish-panel/prepublish.js +43 -26
- package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
- package/build-module/components/post-saved-state/index.js +8 -6
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/check.js +9 -0
- package/build-module/components/post-schedule/check.js.map +1 -1
- package/build-module/components/post-schedule/index.js +30 -6
- package/build-module/components/post-schedule/index.js.map +1 -1
- package/build-module/components/post-schedule/label.js +17 -0
- package/build-module/components/post-schedule/label.js.map +1 -1
- package/build-module/components/post-schedule/panel.js +43 -30
- package/build-module/components/post-schedule/panel.js.map +1 -1
- package/build-module/components/post-slug/check.js +5 -4
- package/build-module/components/post-slug/check.js.map +1 -1
- package/build-module/components/post-slug/index.js +5 -3
- package/build-module/components/post-slug/index.js.map +1 -1
- package/build-module/components/post-slug/panel.js +7 -4
- package/build-module/components/post-slug/panel.js.map +1 -1
- package/build-module/components/post-status/index.js +121 -120
- package/build-module/components/post-status/index.js.map +1 -1
- package/build-module/components/post-sticky/index.js +17 -9
- package/build-module/components/post-sticky/index.js.map +1 -1
- package/build-module/components/post-sticky/panel.js +6 -2
- package/build-module/components/post-sticky/panel.js.map +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js +27 -21
- package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-module/components/post-sync-status/index.js +8 -6
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +22 -18
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +71 -59
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/index.js +6 -6
- package/build-module/components/post-taxonomies/index.js.map +1 -1
- package/build-module/components/post-taxonomies/most-used-terms.js +20 -15
- package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build-module/components/post-taxonomies/panel.js +15 -11
- package/build-module/components/post-taxonomies/panel.js.map +1 -1
- package/build-module/components/post-template/block-theme.js +44 -32
- package/build-module/components/post-template/block-theme.js.map +1 -1
- package/build-module/components/post-template/classic-theme.js +74 -50
- package/build-module/components/post-template/classic-theme.js.map +1 -1
- package/build-module/components/post-template/create-new-template-modal.js +34 -27
- package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
- package/build-module/components/post-template/create-new-template.js +16 -11
- package/build-module/components/post-template/create-new-template.js.map +1 -1
- package/build-module/components/post-template/panel.js +17 -9
- package/build-module/components/post-template/panel.js.map +1 -1
- package/build-module/components/post-template/reset-default-template.js +5 -4
- package/build-module/components/post-template/reset-default-template.js.map +1 -1
- package/build-module/components/post-template/swap-template-button.js +22 -15
- package/build-module/components/post-template/swap-template-button.js.map +1 -1
- package/build-module/components/post-text-editor/index.js +30 -19
- package/build-module/components/post-text-editor/index.js.map +1 -1
- package/build-module/components/post-title/index.js +29 -18
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-title/index.native.js +81 -57
- package/build-module/components/post-title/index.native.js.map +1 -1
- package/build-module/components/post-title/post-title-raw.js +11 -2
- package/build-module/components/post-title/post-title-raw.js.map +1 -1
- package/build-module/components/post-title/use-post-title-focus.js +8 -0
- package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
- package/build-module/components/post-title/use-post-title.js +6 -0
- package/build-module/components/post-title/use-post-title.js.map +1 -1
- package/build-module/components/post-transform-panel/index.js +12 -12
- package/build-module/components/post-transform-panel/index.js.map +1 -1
- package/build-module/components/post-trash/index.js +21 -15
- package/build-module/components/post-trash/index.js.map +1 -1
- package/build-module/components/post-url/check.js +9 -0
- package/build-module/components/post-url/check.js.map +1 -1
- package/build-module/components/post-url/index.js +100 -72
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/post-url/label.js +12 -0
- package/build-module/components/post-url/label.js.map +1 -1
- package/build-module/components/post-url/panel.js +35 -24
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/post-view-link/index.js +2 -2
- package/build-module/components/post-view-link/index.js.map +1 -1
- package/build-module/components/post-visibility/check.js +10 -0
- package/build-module/components/post-visibility/check.js.map +1 -1
- package/build-module/components/post-visibility/index.js +85 -67
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/post-visibility/label.js +12 -0
- package/build-module/components/post-visibility/label.js.map +1 -1
- package/build-module/components/posts-per-page/index.js +103 -0
- package/build-module/components/posts-per-page/index.js.map +1 -0
- package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
- package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +126 -102
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preview-dropdown/index.js +49 -31
- package/build-module/components/preview-dropdown/index.js.map +1 -1
- package/build-module/components/provider/index.js +96 -20
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js +58 -20
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +7 -6
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js +33 -26
- package/build-module/components/provider/with-registry-provider.js.map +1 -1
- package/build-module/components/resizable-editor/index.js +89 -0
- package/build-module/components/resizable-editor/index.js.map +1 -0
- package/build-module/components/resizable-editor/resize-handle.js +54 -0
- package/build-module/components/resizable-editor/resize-handle.js.map +1 -0
- package/build-module/components/save-publish-panels/index.js +37 -26
- package/build-module/components/save-publish-panels/index.js.map +1 -1
- package/build-module/components/sidebar/header.js +18 -14
- package/build-module/components/sidebar/header.js.map +1 -1
- package/build-module/components/sidebar/index.js +36 -31
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/post-summary.js +33 -25
- package/build-module/components/sidebar/post-summary.js.map +1 -1
- package/build-module/components/site-discussion/index.js +127 -0
- package/build-module/components/site-discussion/index.js.map +1 -0
- package/build-module/components/start-page-options/index.js +13 -11
- package/build-module/components/start-page-options/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js +30 -23
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/table-of-contents/index.js +4 -4
- package/build-module/components/table-of-contents/index.js.map +1 -1
- package/build-module/components/table-of-contents/panel.js +55 -35
- package/build-module/components/table-of-contents/panel.js.map +1 -1
- package/build-module/components/template-areas/index.js +37 -22
- package/build-module/components/template-areas/index.js.map +1 -1
- package/build-module/components/template-content-panel/index.js +7 -6
- package/build-module/components/template-content-panel/index.js.map +1 -1
- package/build-module/components/template-validation-notice/index.js +27 -21
- package/build-module/components/template-validation-notice/index.js.map +1 -1
- package/build-module/components/text-editor/index.js +66 -0
- package/build-module/components/text-editor/index.js.map +1 -0
- package/build-module/components/time-to-read/index.js +7 -6
- package/build-module/components/time-to-read/index.js.map +1 -1
- package/build-module/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +5 -4
- package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
- package/build-module/components/{editor-canvas → visual-editor}/index.js +118 -75
- package/build-module/components/visual-editor/index.js.map +1 -0
- package/build-module/components/word-count/index.js +5 -4
- package/build-module/components/word-count/index.js.map +1 -1
- package/build-module/hooks/custom-sources-backwards-compatibility.js +2 -2
- package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/media-upload.js +7 -0
- package/build-module/hooks/media-upload.js.map +1 -0
- package/build-module/hooks/pattern-overrides.js +17 -11
- package/build-module/hooks/pattern-overrides.js.map +1 -1
- package/build-module/private-apis.js +10 -28
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +2 -26
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/constants.js +3 -0
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/private-actions.js +10 -14
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +38 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/selectors.js +1 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/set-nested-value.js +38 -0
- package/build-module/utils/set-nested-value.js.map +1 -0
- package/build-style/style-rtl.css +318 -90
- package/build-style/style.css +318 -90
- package/package.json +40 -36
- package/src/bindings/index.js +1 -4
- package/src/bindings/pattern-overrides.js +1 -1
- package/src/bindings/post-meta.js +46 -6
- package/src/components/blog-title/index.js +124 -0
- package/src/components/blog-title/style.scss +4 -0
- package/src/components/commands/index.js +113 -3
- package/src/components/create-template-part-modal/index.js +205 -0
- package/src/components/create-template-part-modal/style.scss +69 -0
- package/src/components/create-template-part-modal/test/utils.js +60 -0
- package/src/components/create-template-part-modal/utils.js +67 -0
- package/src/components/document-bar/index.js +32 -21
- package/src/components/document-tools/index.js +2 -7
- package/src/components/editor-help/help-get-support-button.native.js +1 -1
- package/src/components/editor-interface/content-slot-fill.js +15 -0
- package/src/components/editor-interface/index.js +230 -0
- package/src/components/editor-notices/index.js +10 -0
- package/src/components/entities-saved-states/entity-record-item.js +45 -16
- package/src/components/entities-saved-states/style.scss +13 -0
- package/src/components/error-boundary/index.js +10 -0
- package/src/components/error-boundary/index.native.js +1 -1
- package/src/components/global-styles-provider/index.js +100 -8
- package/src/components/header/back-button.js +27 -0
- package/src/components/header/index.js +25 -10
- package/src/components/header/style.scss +5 -0
- package/src/components/inserter-sidebar/index.js +65 -32
- package/src/components/inserter-sidebar/style.scss +0 -13
- package/src/components/local-autosave-monitor/index.js +12 -0
- package/src/components/page-attributes/order.js +79 -3
- package/src/components/page-attributes/panel.js +10 -26
- package/src/components/page-attributes/parent.js +98 -2
- package/src/components/page-attributes/style.scss +19 -0
- package/src/components/pattern-duplicate-modal/index.js +50 -0
- package/src/components/pattern-rename-modal/index.js +44 -0
- package/src/components/post-actions/actions.js +306 -261
- package/src/components/post-actions/export-pattern-action.js +74 -0
- package/src/components/post-actions/export-pattern-action.native.js +4 -0
- package/src/components/post-actions/index.js +16 -5
- package/src/components/post-author/combobox.js +1 -0
- package/src/components/post-author/hook.js +1 -1
- package/src/components/post-author/panel.js +63 -2
- package/src/components/post-author/select.js +1 -0
- package/src/components/post-author/style.scss +6 -0
- package/src/components/post-card-panel/index.js +69 -22
- package/src/components/post-card-panel/style.scss +23 -1
- package/src/components/post-comments/index.js +5 -0
- package/src/components/post-discussion/panel.js +9 -2
- package/src/components/post-discussion/style.scss +1 -3
- package/src/components/post-excerpt/panel.js +45 -48
- package/src/components/post-excerpt/style.scss +0 -17
- package/src/components/post-featured-image/check.js +9 -0
- package/src/components/post-featured-image/index.js +15 -0
- package/src/components/post-featured-image/panel.js +9 -0
- package/src/components/post-format/check.js +8 -0
- package/src/components/post-format/index.js +15 -4
- package/src/components/post-format/panel.js +71 -6
- package/src/components/post-format/style.scss +10 -4
- package/src/components/post-last-revision/check.js +8 -0
- package/src/components/post-last-revision/index.js +7 -2
- package/src/components/post-last-revision/panel.js +5 -0
- package/src/components/post-locked-modal/index.js +6 -0
- package/src/components/post-panel-row/style.scss +15 -0
- package/src/components/post-pending-status/check.js +10 -0
- package/src/components/post-pending-status/index.js +5 -0
- package/src/components/post-pingbacks/index.js +6 -0
- package/src/components/post-preview-button/index.js +15 -0
- package/src/components/post-publish-button/index.js +17 -4
- package/src/components/post-publish-panel/index.js +1 -0
- package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +3 -3
- package/src/components/post-schedule/check.js +8 -0
- package/src/components/post-schedule/index.js +30 -3
- package/src/components/post-schedule/label.js +15 -0
- package/src/components/post-schedule/panel.js +9 -1
- package/src/components/post-schedule/style.scss +0 -11
- package/src/components/post-status/index.js +30 -52
- package/src/components/post-status/style.scss +4 -34
- package/src/components/post-sticky/index.js +12 -7
- package/src/components/post-sticky/style.scss +3 -0
- package/src/components/post-template/block-theme.js +1 -0
- package/src/components/post-template/classic-theme.js +15 -0
- package/src/components/post-template/panel.js +5 -0
- package/src/components/post-template/style.scss +0 -8
- package/src/components/post-text-editor/index.js +5 -0
- package/src/components/post-title/index.js +8 -1
- package/src/components/post-title/index.native.js +70 -35
- package/src/components/post-title/post-title-raw.js +8 -0
- package/src/components/post-title/use-post-title-focus.js +7 -0
- package/src/components/post-title/use-post-title.js +5 -0
- package/src/components/post-transform-panel/index.js +2 -10
- package/src/components/post-url/check.js +8 -0
- package/src/components/post-url/index.js +41 -24
- package/src/components/post-url/label.js +10 -0
- package/src/components/post-url/panel.js +6 -1
- package/src/components/post-url/style.scss +0 -9
- package/src/components/post-visibility/check.js +9 -0
- package/src/components/post-visibility/index.js +7 -0
- package/src/components/post-visibility/label.js +10 -0
- package/src/components/posts-per-page/index.js +101 -0
- package/src/components/posts-per-page/style.scss +4 -0
- package/src/components/provider/index.js +68 -0
- package/src/components/provider/index.native.js +43 -2
- package/src/components/provider/use-block-editor-settings.js +4 -6
- package/src/components/provider/with-registry-provider.js +32 -31
- package/src/components/resizable-editor/index.js +90 -0
- package/src/components/resizable-editor/resize-handle.js +62 -0
- package/src/components/resizable-editor/style.scss +53 -0
- package/src/components/save-publish-panels/index.js +10 -2
- package/src/components/sidebar/index.js +0 -4
- package/src/components/sidebar/post-summary.js +14 -21
- package/src/components/sidebar/style.scss +1 -1
- package/src/components/site-discussion/index.js +138 -0
- package/src/components/site-discussion/style.scss +19 -0
- package/src/components/start-template-options/style.scss +0 -8
- package/src/components/template-areas/index.js +15 -6
- package/src/components/text-editor/index.js +57 -0
- package/src/components/text-editor/style.scss +71 -0
- package/src/components/{editor-canvas → visual-editor}/index.js +177 -108
- package/src/components/visual-editor/style.scss +37 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/media-upload.js +11 -0
- package/src/private-apis.js +10 -28
- package/src/private-apis.native.js +2 -26
- package/src/store/constants.js +7 -0
- package/src/store/private-actions.js +22 -50
- package/src/store/private-selectors.js +45 -0
- package/src/store/selectors.js +1 -1
- package/src/style.scss +9 -0
- package/src/utils/set-nested-value.js +39 -0
- package/build/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
- package/build/components/editor-canvas/index.js.map +0 -1
- package/build/components/post-trash/panel.js +0 -18
- package/build/components/post-trash/panel.js.map +0 -1
- package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
- package/build-module/components/editor-canvas/index.js.map +0 -1
- package/build-module/components/post-trash/panel.js +0 -10
- package/build-module/components/post-trash/panel.js.map +0 -1
- package/src/components/post-trash/panel.js +0 -13
- package/src/components/provider/README.md +0 -37
- /package/src/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_data","_i18n","_coreData","_postFormat","_store","getSuggestion","supportedFormats","suggestedPostFormat","formats","POST_FORMATS","filter","format","includes","id","find","PostFormatSuggestion","suggestionText","onUpdatePostFormat","
|
|
1
|
+
{"version":3,"names":["_components","require","_data","_i18n","_coreData","_postFormat","_store","_jsxRuntime","getSuggestion","supportedFormats","suggestedPostFormat","formats","POST_FORMATS","filter","format","includes","id","find","PostFormatSuggestion","suggestionText","onUpdatePostFormat","jsx","Button","variant","onClick","children","PostFormatPanel","currentPostFormat","suggestion","useSelect","select","_select$getThemeSuppo","getEditedPostAttribute","getSuggestedPostFormat","editorStore","coreStore","getThemeSupports","editPost","useDispatch","panelBodyTitle","__","className","jsxs","PanelBody","initialOpen","title","sprintf","caption"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-post-format-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, PanelBody } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { POST_FORMATS } from '../post-format';\nimport { store as editorStore } from '../../store';\n\nconst getSuggestion = ( supportedFormats, suggestedPostFormat ) => {\n\tconst formats = POST_FORMATS.filter( ( format ) =>\n\t\tsupportedFormats?.includes( format.id )\n\t);\n\treturn formats.find( ( format ) => format.id === suggestedPostFormat );\n};\n\nconst PostFormatSuggestion = ( {\n\tsuggestedPostFormat,\n\tsuggestionText,\n\tonUpdatePostFormat,\n} ) => (\n\t<Button\n\t\tvariant=\"link\"\n\t\tonClick={ () => onUpdatePostFormat( suggestedPostFormat ) }\n\t>\n\t\t{ suggestionText }\n\t</Button>\n);\n\nexport default function PostFormatPanel() {\n\tconst { currentPostFormat, suggestion } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\tselect( editorStore );\n\t\tconst supportedFormats =\n\t\t\tselect( coreStore ).getThemeSupports().formats ?? [];\n\t\treturn {\n\t\t\tcurrentPostFormat: getEditedPostAttribute( 'format' ),\n\t\t\tsuggestion: getSuggestion(\n\t\t\t\tsupportedFormats,\n\t\t\t\tgetSuggestedPostFormat()\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Use a post format' ) }\n\t\t</span>,\n\t];\n\n\tif ( ! suggestion || suggestion.id === currentPostFormat ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<PostFormatSuggestion\n\t\t\t\t\tonUpdatePostFormat={ onUpdatePostFormat }\n\t\t\t\t\tsuggestedPostFormat={ suggestion.id }\n\t\t\t\t\tsuggestionText={ sprintf(\n\t\t\t\t\t\t/* translators: %s: post format */\n\t\t\t\t\t\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ACZ;MAAG,CACH;IAAC,CACA,CAAC;EAAA,CACM,CAAC;AAEd","ignoreList":[]}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _i18n = require("@wordpress/i18n");
|
|
10
9
|
var _element = require("@wordpress/element");
|
|
11
10
|
var _data = require("@wordpress/data");
|
|
@@ -13,6 +12,7 @@ var _components = require("@wordpress/components");
|
|
|
13
12
|
var _coreData = require("@wordpress/core-data");
|
|
14
13
|
var _flatTermSelector = _interopRequireDefault(require("../post-taxonomies/flat-term-selector"));
|
|
15
14
|
var _store = require("../../store");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
/**
|
|
17
17
|
* WordPress dependencies
|
|
18
18
|
*/
|
|
@@ -22,16 +22,19 @@ var _store = require("../../store");
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
const TagsPanel = () => {
|
|
25
|
-
const panelBodyTitle = [(0, _i18n.__)('Suggestion:'), (0,
|
|
25
|
+
const panelBodyTitle = [(0, _i18n.__)('Suggestion:'), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
26
26
|
className: "editor-post-publish-panel__link",
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
return (0,
|
|
27
|
+
children: (0, _i18n.__)('Add tags')
|
|
28
|
+
}, "label")];
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.PanelBody, {
|
|
30
30
|
initialOpen: false,
|
|
31
|
-
title: panelBodyTitle
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
title: panelBodyTitle,
|
|
32
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
33
|
+
children: (0, _i18n.__)('Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.')
|
|
34
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_flatTermSelector.default, {
|
|
35
|
+
slug: "post_tag"
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
35
38
|
};
|
|
36
39
|
const MaybeTagsPanel = () => {
|
|
37
40
|
const {
|
|
@@ -64,7 +67,7 @@ const MaybeTagsPanel = () => {
|
|
|
64
67
|
* more than one tag.
|
|
65
68
|
*/
|
|
66
69
|
if (!hadTagsWhenOpeningThePanel) {
|
|
67
|
-
return (0,
|
|
70
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TagsPanel, {});
|
|
68
71
|
}
|
|
69
72
|
return null;
|
|
70
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_element","_data","_components","_coreData","_flatTermSelector","_interopRequireDefault","_store","TagsPanel","panelBodyTitle","__","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_element","_data","_components","_coreData","_flatTermSelector","_interopRequireDefault","_store","_jsxRuntime","TagsPanel","panelBodyTitle","__","jsx","className","children","jsxs","PanelBody","initialOpen","title","default","slug","MaybeTagsPanel","hasTags","isPostTypeSupported","useSelect","select","postType","editorStore","getCurrentPostType","tagsTaxonomy","coreStore","getTaxonomy","_isPostTypeSupported","types","includes","areTagsFetched","undefined","tags","getEditedPostAttribute","rest_base","length","hadTagsWhenOpeningThePanel","useState","_default","exports"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-tags-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport FlatTermSelector from '../post-taxonomies/flat-term-selector';\nimport { store as editorStore } from '../../store';\n\nconst TagsPanel = () => {\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Add tags' ) }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<FlatTermSelector slug=\"post_tag\" />\n\t\t</PanelBody>\n\t);\n};\n\nconst MaybeTagsPanel = () => {\n\tconst { hasTags, isPostTypeSupported } = useSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst tagsTaxonomy = select( coreStore ).getTaxonomy( 'post_tag' );\n\t\tconst _isPostTypeSupported = tagsTaxonomy?.types?.includes( postType );\n\t\tconst areTagsFetched = tagsTaxonomy !== undefined;\n\t\tconst tags =\n\t\t\ttagsTaxonomy &&\n\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\ttagsTaxonomy.rest_base\n\t\t\t);\n\t\treturn {\n\t\t\thasTags: !! tags?.length,\n\t\t\tisPostTypeSupported: areTagsFetched && _isPostTypeSupported,\n\t\t};\n\t}, [] );\n\tconst [ hadTagsWhenOpeningThePanel ] = useState( hasTags );\n\n\tif ( ! isPostTypeSupported ) {\n\t\treturn null;\n\t}\n\n\t/*\n\t * We only want to show the tag panel if the post didn't have\n\t * any tags when the user hit the Publish button.\n\t *\n\t * We can't use the prop.hasTags because it'll change to true\n\t * if the user adds a new tag within the pre-publish panel.\n\t * This would force a re-render and a new prop.hasTags check,\n\t * hiding this panel and keeping the user from adding\n\t * more than one tag.\n\t */\n\tif ( ! hadTagsWhenOpeningThePanel ) {\n\t\treturn <TagsPanel />;\n\t}\n\n\treturn null;\n};\n\nexport default MaybeTagsPanel;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAA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,YAAY,CAAC,CAACW,sBAAsB,CAC3CT,YAAY,CAACU,SACd,CAAC;IACF,OAAO;MACNjB,OAAO,EAAE,CAAC,CAAEe,IAAI,EAAEG,MAAM;MACxBjB,mBAAmB,EAAEY,cAAc,IAAIH;IACxC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM,CAAES,0BAA0B,CAAE,GAAG,IAAAC,iBAAQ,EAAEpB,OAAQ,CAAC;EAE1D,IAAK,CAAEC,mBAAmB,EAAG;IAC5B,OAAO,IAAI;EACZ;;EAEA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,IAAK,CAAEkB,0BAA0B,EAAG;IACnC,oBAAO,IAAAjC,WAAA,CAAAI,GAAA,EAACH,SAAS,IAAE,CAAC;EACrB;EAEA,OAAO,IAAI;AACZ,CAAC;AAAC,IAAAkC,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAEaE,cAAc","ignoreList":[]}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = PostFormatPanel;
|
|
7
|
-
var _react = require("react");
|
|
8
7
|
var _components = require("@wordpress/components");
|
|
9
8
|
var _data = require("@wordpress/data");
|
|
10
9
|
var _i18n = require("@wordpress/i18n");
|
|
@@ -12,6 +11,7 @@ var _blockEditor = require("@wordpress/block-editor");
|
|
|
12
11
|
var _element = require("@wordpress/element");
|
|
13
12
|
var _blob = require("@wordpress/blob");
|
|
14
13
|
var _store = require("../../store");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
/**
|
|
16
16
|
* WordPress dependencies
|
|
17
17
|
*/
|
|
@@ -32,7 +32,7 @@ function Image(block) {
|
|
|
32
32
|
const {
|
|
33
33
|
selectBlock
|
|
34
34
|
} = (0, _data.useDispatch)(_blockEditor.store);
|
|
35
|
-
return (0,
|
|
35
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__unstableMotion.img, {
|
|
36
36
|
tabIndex: 0,
|
|
37
37
|
role: "button",
|
|
38
38
|
"aria-label": (0, _i18n.__)('Select image block.'),
|
|
@@ -45,7 +45,6 @@ function Image(block) {
|
|
|
45
45
|
event.preventDefault();
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
key: block.clientId,
|
|
49
48
|
alt: block.attributes.alt,
|
|
50
49
|
src: block.attributes.url,
|
|
51
50
|
animate: {
|
|
@@ -65,7 +64,7 @@ function Image(block) {
|
|
|
65
64
|
whileHover: {
|
|
66
65
|
scale: 1.08
|
|
67
66
|
}
|
|
68
|
-
});
|
|
67
|
+
}, block.clientId);
|
|
69
68
|
}
|
|
70
69
|
function PostFormatPanel() {
|
|
71
70
|
const [isUploading, setIsUploading] = (0, _element.useState)(false);
|
|
@@ -83,10 +82,10 @@ function PostFormatPanel() {
|
|
|
83
82
|
if (!mediaUpload || !externalImages.length) {
|
|
84
83
|
return null;
|
|
85
84
|
}
|
|
86
|
-
const panelBodyTitle = [(0, _i18n.__)('Suggestion:'), (0,
|
|
85
|
+
const panelBodyTitle = [(0, _i18n.__)('Suggestion:'), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
87
86
|
className: "editor-post-publish-panel__link",
|
|
88
|
-
|
|
89
|
-
},
|
|
87
|
+
children: (0, _i18n.__)('External media')
|
|
88
|
+
}, "label")];
|
|
90
89
|
function uploadImages() {
|
|
91
90
|
setIsUploading(true);
|
|
92
91
|
Promise.all(externalImages.map(image => window.fetch(image.attributes.url.includes('?') ? image.attributes.url : image.attributes.url + '?').then(response => response.blob()).then(blob => new Promise((resolve, reject) => {
|
|
@@ -110,23 +109,29 @@ function PostFormatPanel() {
|
|
|
110
109
|
setIsUploading(false);
|
|
111
110
|
});
|
|
112
111
|
}
|
|
113
|
-
return (0,
|
|
112
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.PanelBody, {
|
|
114
113
|
initialOpen: true,
|
|
115
|
-
title: panelBodyTitle
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
114
|
+
title: panelBodyTitle,
|
|
115
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
116
|
+
children: (0, _i18n.__)('Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.')
|
|
117
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
118
|
+
style: {
|
|
119
|
+
display: 'inline-flex',
|
|
120
|
+
flexWrap: 'wrap',
|
|
121
|
+
gap: '8px'
|
|
122
|
+
},
|
|
123
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__unstableAnimatePresence, {
|
|
124
|
+
children: externalImages.map(image => {
|
|
125
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Image, {
|
|
126
|
+
...image
|
|
127
|
+
}, image.clientId);
|
|
128
|
+
})
|
|
129
|
+
}), isUploading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Spinner, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
130
|
+
variant: "primary",
|
|
131
|
+
onClick: uploadImages,
|
|
132
|
+
children: (0, _i18n.__)('Upload')
|
|
133
|
+
})]
|
|
134
|
+
})]
|
|
135
|
+
});
|
|
131
136
|
}
|
|
132
137
|
//# sourceMappingURL=maybe-upload-media.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_data","_i18n","_blockEditor","_element","_blob","_store","flattenBlocks","blocks","result","forEach","block","push","innerBlocks","Image","selectBlock","useDispatch","blockEditorStore","
|
|
1
|
+
{"version":3,"names":["_components","require","_data","_i18n","_blockEditor","_element","_blob","_store","_jsxRuntime","flattenBlocks","blocks","result","forEach","block","push","innerBlocks","Image","selectBlock","useDispatch","blockEditorStore","jsx","__unstableMotion","img","tabIndex","role","__","onClick","clientId","onKeyDown","event","key","preventDefault","alt","attributes","src","url","animate","opacity","exit","scale","style","width","height","objectFit","borderRadius","cursor","whileHover","PostFormatPanel","isUploading","setIsUploading","useState","editorBlocks","mediaUpload","useSelect","select","editorStore","getEditorBlocks","getSettings","externalImages","filter","name","id","updateBlockAttributes","length","panelBodyTitle","className","children","uploadImages","Promise","all","map","image","window","fetch","includes","then","response","blob","resolve","reject","filesList","onFileChange","media","isBlobURL","onError","finally","jsxs","PanelBody","initialOpen","title","display","flexWrap","gap","__unstableAnimatePresence","Spinner","Button","variant"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-upload-media.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tButton,\n\tSpinner,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport { isBlobURL } from '@wordpress/blob';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction flattenBlocks( blocks ) {\n\tconst result = [];\n\n\tblocks.forEach( ( block ) => {\n\t\tresult.push( block );\n\t\tresult.push( ...flattenBlocks( block.innerBlocks ) );\n\t} );\n\n\treturn result;\n}\n\nfunction Image( block ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<motion.img\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"button\"\n\t\t\taria-label={ __( 'Select image block.' ) }\n\t\t\tonClick={ () => {\n\t\t\t\tselectBlock( block.clientId );\n\t\t\t} }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.key === 'Enter' || event.key === ' ' ) {\n\t\t\t\t\tselectBlock( block.clientId );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tkey={ block.clientId }\n\t\t\talt={ block.attributes.alt }\n\t\t\tsrc={ block.attributes.url }\n\t\t\tanimate={ { opacity: 1 } }\n\t\t\texit={ { opacity: 0, scale: 0 } }\n\t\t\tstyle={ {\n\t\t\t\twidth: '36px',\n\t\t\t\theight: '36px',\n\t\t\t\tobjectFit: 'cover',\n\t\t\t\tborderRadius: '2px',\n\t\t\t\tcursor: 'pointer',\n\t\t\t} }\n\t\t\twhileHover={ { scale: 1.08 } }\n\t\t/>\n\t);\n}\n\nexport default function PostFormatPanel() {\n\tconst [ isUploading, setIsUploading ] = useState( false );\n\tconst { editorBlocks, mediaUpload } = useSelect(\n\t\t( select ) => ( {\n\t\t\teditorBlocks: select( editorStore ).getEditorBlocks(),\n\t\t\tmediaUpload: select( blockEditorStore ).getSettings().mediaUpload,\n\t\t} ),\n\t\t[]\n\t);\n\tconst externalImages = flattenBlocks( editorBlocks ).filter(\n\t\t( block ) =>\n\t\t\tblock.name === 'core/image' &&\n\t\t\tblock.attributes.url &&\n\t\t\t! block.attributes.id\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tif ( ! mediaUpload || ! externalImages.length ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'External media' ) }\n\t\t</span>,\n\t];\n\n\tfunction uploadImages() {\n\t\tsetIsUploading( true );\n\t\tPromise.all(\n\t\t\texternalImages.map( ( image ) =>\n\t\t\t\twindow\n\t\t\t\t\t.fetch(\n\t\t\t\t\t\timage.attributes.url.includes( '?' )\n\t\t\t\t\t\t\t? image.attributes.url\n\t\t\t\t\t\t\t: image.attributes.url + '?'\n\t\t\t\t\t)\n\t\t\t\t\t.then( ( response ) => response.blob() )\n\t\t\t\t\t.then(\n\t\t\t\t\t\t( blob ) =>\n\t\t\t\t\t\t\tnew Promise( ( resolve, reject ) => {\n\t\t\t\t\t\t\t\tmediaUpload( {\n\t\t\t\t\t\t\t\t\tfilesList: [ blob ],\n\t\t\t\t\t\t\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\t\t\t\t\t\t\tif ( isBlobURL( media.url ) ) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tupdateBlockAttributes( image.clientId, {\n\t\t\t\t\t\t\t\t\t\t\tid: media.id,\n\t\t\t\t\t\t\t\t\t\t\turl: media.url,\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonError() {\n\t\t\t\t\t\t\t\t\t\treject();\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t)\n\t\t\t)\n\t\t).finally( () => {\n\t\t\tsetIsUploading( false );\n\t\t} );\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<div\n\t\t\t\tstyle={ {\n\t\t\t\t\tdisplay: 'inline-flex',\n\t\t\t\t\tflexWrap: 'wrap',\n\t\t\t\t\tgap: '8px',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<AnimatePresence>\n\t\t\t\t\t{ externalImages.map( ( image ) => {\n\t\t\t\t\t\treturn <Image key={ image.clientId } { ...image } />;\n\t\t\t\t\t} ) }\n\t\t\t\t</AnimatePresence>\n\t\t\t\t{ isUploading ? (\n\t\t\t\t\t<Spinner />\n\t\t\t\t) : (\n\t\t\t\t\t<Button variant=\"primary\" onClick={ uploadIm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AAC,CAACM,OAAO,CAAE,MAAM;MAChBpC,cAAc,CAAE,KAAM,CAAC;IACxB,CAAE,CAAC;EACJ;EAEA,oBACC,IAAAzC,WAAA,CAAA8E,IAAA,EAACtF,WAAA,CAAAuF,SAAS;IAACC,WAAW;IAACC,KAAK,EAAGzB,cAAgB;IAAAE,QAAA,gBAC9C,IAAA1D,WAAA,CAAAY,GAAA;MAAA8C,QAAA,EACG,IAAAzC,QAAE,EACH,8IACD;IAAC,CACC,CAAC,eACJ,IAAAjB,WAAA,CAAA8E,IAAA;MACC9C,KAAK,EAAG;QACPkD,OAAO,EAAE,aAAa;QACtBC,QAAQ,EAAE,MAAM;QAChBC,GAAG,EAAE;MACN,CAAG;MAAA1B,QAAA,gBAEH,IAAA1D,WAAA,CAAAY,GAAA,EAACpB,WAAA,CAAA6F,yBAAe;QAAA3B,QAAA,EACbR,cAAc,CAACY,GAAG,CAAIC,KAAK,IAAM;UAClC,oBAAO,IAAA/D,WAAA,CAAAY,GAAA,EAACJ,KAAK;YAAA,GAA6BuD;UAAK,GAA3BA,KAAK,CAAC5C,QAAyB,CAAC;QACrD,CAAE;MAAC,CACa,CAAC,EAChBqB,WAAW,gBACZ,IAAAxC,WAAA,CAAAY,GAAA,EAACpB,WAAA,CAAA8F,OAAO,IAAE,CAAC,gBAEX,IAAAtF,WAAA,CAAAY,GAAA,EAACpB,WAAA,CAAA+F,MAAM;QAACC,OAAO,EAAC,SAAS;QAACtE,OAAO,EAAGyC,YAAc;QAAAD,QAAA,EAC/C,IAAAzC,QAAE,EAAE,QAAS;MAAC,CACT,CACR;IAAA,CACG,CAAC;EAAA,CACI,CAAC;AAEd","ignoreList":[]}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _components = require("@wordpress/components");
|
|
10
9
|
var _i18n = require("@wordpress/i18n");
|
|
11
10
|
var _element = require("@wordpress/element");
|
|
@@ -16,6 +15,7 @@ var _compose = require("@wordpress/compose");
|
|
|
16
15
|
var _coreData = require("@wordpress/core-data");
|
|
17
16
|
var _label = _interopRequireDefault(require("../post-schedule/label"));
|
|
18
17
|
var _store = require("../../store");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
/**
|
|
20
20
|
* WordPress dependencies
|
|
21
21
|
*/
|
|
@@ -53,10 +53,11 @@ function CopyButton({
|
|
|
53
53
|
children
|
|
54
54
|
}) {
|
|
55
55
|
const ref = (0, _compose.useCopyToClipboard)(text, onCopy);
|
|
56
|
-
return (0,
|
|
56
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
57
57
|
variant: "secondary",
|
|
58
|
-
ref: ref
|
|
59
|
-
|
|
58
|
+
ref: ref,
|
|
59
|
+
children: children
|
|
60
|
+
});
|
|
60
61
|
}
|
|
61
62
|
class PostPublishPanelPostpublish extends _element.Component {
|
|
62
63
|
constructor() {
|
|
@@ -104,40 +105,56 @@ class PostPublishPanelPostpublish extends _element.Component {
|
|
|
104
105
|
const addLink = (0, _url.addQueryArgs)('post-new.php', {
|
|
105
106
|
post_type: post.type
|
|
106
107
|
});
|
|
107
|
-
const postPublishNonLinkHeader = isScheduled ? (0,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
className: "post-publish-panel__postpublish
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
108
|
+
const postPublishNonLinkHeader = isScheduled ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
109
|
+
children: [(0, _i18n.__)('is now scheduled. It will go live on'), ' ', /*#__PURE__*/(0, _jsxRuntime.jsx)(_label.default, {}), "."]
|
|
110
|
+
}) : (0, _i18n.__)('is now live.');
|
|
111
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
112
|
+
className: "post-publish-panel__postpublish",
|
|
113
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.PanelBody, {
|
|
114
|
+
className: "post-publish-panel__postpublish-header",
|
|
115
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
116
|
+
ref: this.postLink,
|
|
117
|
+
href: link,
|
|
118
|
+
children: (0, _htmlEntities.decodeEntities)(post.title) || (0, _i18n.__)('(no title)')
|
|
119
|
+
}), ' ', postPublishNonLinkHeader]
|
|
120
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.PanelBody, {
|
|
121
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
122
|
+
className: "post-publish-panel__postpublish-subheader",
|
|
123
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
|
|
124
|
+
children: (0, _i18n.__)('What’s next?')
|
|
125
|
+
})
|
|
126
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
127
|
+
className: "post-publish-panel__postpublish-post-address-container",
|
|
128
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextControl, {
|
|
129
|
+
__nextHasNoMarginBottom: true,
|
|
130
|
+
className: "post-publish-panel__postpublish-post-address",
|
|
131
|
+
readOnly: true,
|
|
132
|
+
label: (0, _i18n.sprintf)( /* translators: %s: post type singular name */
|
|
133
|
+
(0, _i18n.__)('%s address'), postLabel),
|
|
134
|
+
value: (0, _url.safeDecodeURIComponent)(link),
|
|
135
|
+
onFocus: this.onSelectInput
|
|
136
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
137
|
+
className: "post-publish-panel__postpublish-post-address__copy-button-wrap",
|
|
138
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CopyButton, {
|
|
139
|
+
text: link,
|
|
140
|
+
onCopy: this.onCopy,
|
|
141
|
+
children: this.state.showCopyConfirmation ? (0, _i18n.__)('Copied!') : (0, _i18n.__)('Copy')
|
|
142
|
+
})
|
|
143
|
+
})]
|
|
144
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
145
|
+
className: "post-publish-panel__postpublish-buttons",
|
|
146
|
+
children: [!isScheduled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
147
|
+
variant: "primary",
|
|
148
|
+
href: link,
|
|
149
|
+
children: viewPostLabel
|
|
150
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
151
|
+
variant: isScheduled ? 'primary' : 'secondary',
|
|
152
|
+
href: addLink,
|
|
153
|
+
children: addNewPostLabel
|
|
154
|
+
})]
|
|
155
|
+
})]
|
|
156
|
+
}), children]
|
|
157
|
+
});
|
|
141
158
|
}
|
|
142
159
|
}
|
|
143
160
|
var _default = exports.default = (0, _data.withSelect)(select => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_i18n","_element","_data","_url","_htmlEntities","_compose","_coreData","_label","_interopRequireDefault","_store","POSTNAME","PAGENAME","getFuturePostUrl","post","slug","permalink_template","includes","replace","CopyButton","text","onCopy","children","ref","useCopyToClipboard","_react","createElement","Button","variant","PostPublishPanelPostpublish","Component","constructor","arguments","state","showCopyConfirmation","bind","onSelectInput","postLink","createRef","componentDidMount","props","focusOnMount","current","focus","componentWillUnmount","clearTimeout","dismissCopyConfirmation","setState","setTimeout","event","target","select","render","isScheduled","postType","postLabel","labels","singular_name","viewPostLabel","view_item","addNewPostLabel","add_new_item","link","status","addLink","addQueryArgs","post_type","type","postPublishNonLinkHeader","Fragment","__","default","className","PanelBody","href","decodeEntities","title","TextControl","__nextHasNoMarginBottom","readOnly","label","sprintf","value","safeDecodeURIComponent","onFocus","_default","exports","withSelect","getEditedPostAttribute","getCurrentPost","isCurrentPostScheduled","editorStore","getPostType","coreStore"],"sources":["@wordpress/editor/src/components/post-publish-panel/postpublish.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelBody, Button, TextControl } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { addQueryArgs, safeDecodeURIComponent } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleLabel from '../post-schedule/label';\nimport { store as editorStore } from '../../store';\n\nconst POSTNAME = '%postname%';\nconst PAGENAME = '%pagename%';\n\n/**\n * Returns URL for a future post.\n *\n * @param {Object} post Post object.\n *\n * @return {string} PostPublish URL.\n */\n\nconst getFuturePostUrl = ( post ) => {\n\tconst { slug } = post;\n\n\tif ( post.permalink_template.includes( POSTNAME ) ) {\n\t\treturn post.permalink_template.replace( POSTNAME, slug );\n\t}\n\n\tif ( post.permalink_template.includes( PAGENAME ) ) {\n\t\treturn post.permalink_template.replace( PAGENAME, slug );\n\t}\n\n\treturn post.permalink_template;\n};\n\nfunction CopyButton( { text, onCopy, children } ) {\n\tconst ref = useCopyToClipboard( text, onCopy );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nclass PostPublishPanelPostpublish extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tshowCopyConfirmation: false,\n\t\t};\n\t\tthis.onCopy = this.onCopy.bind( this );\n\t\tthis.onSelectInput = this.onSelectInput.bind( this );\n\t\tthis.postLink = createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.props.focusOnMount ) {\n\t\t\tthis.postLink.current.focus();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t}\n\n\tonCopy() {\n\t\tthis.setState( {\n\t\t\tshowCopyConfirmation: true,\n\t\t} );\n\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t\tthis.dismissCopyConfirmation = setTimeout( () => {\n\t\t\tthis.setState( {\n\t\t\t\tshowCopyConfirmation: false,\n\t\t\t} );\n\t\t}, 4000 );\n\t}\n\n\tonSelectInput( event ) {\n\t\tevent.target.select();\n\t}\n\n\trender() {\n\t\tconst { children, isScheduled, post, postType } = this.props;\n\t\tconst postLabel = postType?.labels?.singular_name;\n\t\tconst viewPostLabel = postType?.labels?.view_item;\n\t\tconst addNewPostLabel = postType?.labels?.add_new_item;\n\t\tconst link =\n\t\t\tpost.status === 'future' ? getFuturePostUrl( post ) : post.link;\n\t\tconst addLink = addQueryArgs( 'post-new.php', {\n\t\t\tpost_type: post.type,\n\t\t} );\n\n\t\tconst postPublishNonLinkHeader = isScheduled ? (\n\t\t\t<>\n\t\t\t\t{ __( 'is now scheduled. It will go live on' ) }{ ' ' }\n\t\t\t\t<PostScheduleLabel />.\n\t\t\t</>\n\t\t) : (\n\t\t\t__( 'is now live.' )\n\t\t);\n\n\t\treturn (\n\t\t\t<div className=\"post-publish-panel__postpublish\">\n\t\t\t\t<PanelBody className=\"post-publish-panel__postpublish-header\">\n\t\t\t\t\t<a ref={ this.postLink } href={ link }>\n\t\t\t\t\t\t{ decodeEntities( post.title ) || __( '(no title)' ) }\n\t\t\t\t\t</a>{ ' ' }\n\t\t\t\t\t{ postPublishNonLinkHeader }\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<p className=\"post-publish-panel__postpublish-subheader\">\n\t\t\t\t\t\t<strong>{ __( 'What’s next?' ) }</strong>\n\t\t\t\t\t</p>\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address-container\">\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tclassName=\"post-publish-panel__postpublish-post-address\"\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: post type singular name */\n\t\t\t\t\t\t\t\t__( '%s address' ),\n\t\t\t\t\t\t\t\tpostLabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ safeDecodeURIComponent( link ) }\n\t\t\t\t\t\t\tonFocus={ this.onSelectInput }\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address__copy-button-wrap\">\n\t\t\t\t\t\t\t<CopyButton text={ link } onCopy={ this.onCopy }>\n\t\t\t\t\t\t\t\t{ this.state.showCopyConfirmation\n\t\t\t\t\t\t\t\t\t? __( 'Copied!' )\n\t\t\t\t\t\t\t\t\t: __( 'Copy' ) }\n\t\t\t\t\t\t\t</CopyButton>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-buttons\">\n\t\t\t\t\t\t{ ! isScheduled && (\n\t\t\t\t\t\t\t<Button variant=\"primary\" href={ link }>\n\t\t\t\t\t\t\t\t{ viewPostLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant={ isScheduled ? 'primary' : 'secondary' }\n\t\t\t\t\t\t\thref={ addLink }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ addNewPostLabel }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</PanelBody>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditedPostAttribute, getCurrentPost, isCurrentPostScheduled } =\n\t\tselect( editorStore );\n\tconst { getPostType } = select( coreStore );\n\n\treturn {\n\t\tpost: getCurrentPost(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tisScheduled: isCurrentPostScheduled(),\n\t};\n} )( PostPublishPanelPostpublish );\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AAhBA;AACA;AACA;;AAUA;AACA;AACA;;AAIA,MAAMW,QAAQ,GAAG,YAAY;AAC7B,MAAMC,QAAQ,GAAG,YAAY;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,gBAAgB,GAAKC,IAAI,IAAM;EACpC,MAAM;IAAEC;EAAK,CAAC,GAAGD,IAAI;EAErB,IAAKA,IAAI,CAACE,kBAAkB,CAACC,QAAQ,CAAEN,QAAS,CAAC,EAAG;IACnD,OAAOG,IAAI,CAACE,kBAAkB,CAACE,OAAO,CAAEP,QAAQ,EAAEI,IAAK,CAAC;EACzD;EAEA,IAAKD,IAAI,CAACE,kBAAkB,CAACC,QAAQ,CAAEL,QAAS,CAAC,EAAG;IACnD,OAAOE,IAAI,CAACE,kBAAkB,CAACE,OAAO,CAAEN,QAAQ,EAAEG,IAAK,CAAC;EACzD;EAEA,OAAOD,IAAI,CAACE,kBAAkB;AAC/B,CAAC;AAED,SAASG,UAAUA,CAAE;EAAEC,IAAI;EAAEC,MAAM;EAAEC;AAAS,CAA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,CAAC,EACVtC,QACE,CAAC;EAER;AACD;AAAC,IAAA+D,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEc,IAAAgB,gBAAU,EAAIpC,MAAM,IAAM;EACxC,MAAM;IAAEqC,sBAAsB;IAAEC,cAAc;IAAEC;EAAuB,CAAC,GACvEvC,MAAM,CAAEwC,YAAY,CAAC;EACtB,MAAM;IAAEC;EAAY,CAAC,GAAGzC,MAAM,CAAE0C,eAAU,CAAC;EAE3C,OAAO;IACN/E,IAAI,EAAE2E,cAAc,CAAC,CAAC;IACtBnC,QAAQ,EAAEsC,WAAW,CAAEJ,sBAAsB,CAAE,MAAO,CAAE,CAAC;IACzDnC,WAAW,EAAEqC,sBAAsB,CAAC;EACrC,CAAC;AACF,CAAE,CAAC,CAAE7D,2BAA4B,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","_element","_data","_url","_htmlEntities","_compose","_coreData","_label","_interopRequireDefault","_store","_jsxRuntime","POSTNAME","PAGENAME","getFuturePostUrl","post","slug","permalink_template","includes","replace","CopyButton","text","onCopy","children","ref","useCopyToClipboard","jsx","Button","variant","PostPublishPanelPostpublish","Component","constructor","arguments","state","showCopyConfirmation","bind","onSelectInput","postLink","createRef","componentDidMount","props","focusOnMount","current","focus","componentWillUnmount","clearTimeout","dismissCopyConfirmation","setState","setTimeout","event","target","select","render","isScheduled","postType","postLabel","labels","singular_name","viewPostLabel","view_item","addNewPostLabel","add_new_item","link","status","addLink","addQueryArgs","post_type","type","postPublishNonLinkHeader","jsxs","Fragment","__","default","className","PanelBody","href","decodeEntities","title","TextControl","__nextHasNoMarginBottom","readOnly","label","sprintf","value","safeDecodeURIComponent","onFocus","_default","exports","withSelect","getEditedPostAttribute","getCurrentPost","isCurrentPostScheduled","editorStore","getPostType","coreStore"],"sources":["@wordpress/editor/src/components/post-publish-panel/postpublish.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelBody, Button, TextControl } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { addQueryArgs, safeDecodeURIComponent } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleLabel from '../post-schedule/label';\nimport { store as editorStore } from '../../store';\n\nconst POSTNAME = '%postname%';\nconst PAGENAME = '%pagename%';\n\n/**\n * Returns URL for a future post.\n *\n * @param {Object} post Post object.\n *\n * @return {string} PostPublish URL.\n */\n\nconst getFuturePostUrl = ( post ) => {\n\tconst { slug } = post;\n\n\tif ( post.permalink_template.includes( POSTNAME ) ) {\n\t\treturn post.permalink_template.replace( POSTNAME, slug );\n\t}\n\n\tif ( post.permalink_template.includes( PAGENAME ) ) {\n\t\treturn post.permalink_template.replace( PAGENAME, slug );\n\t}\n\n\treturn post.permalink_template;\n};\n\nfunction CopyButton( { text, onCopy, children } ) {\n\tconst ref = useCopyToClipboard( text, onCopy );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nclass PostPublishPanelPostpublish extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tshowCopyConfirmation: false,\n\t\t};\n\t\tthis.onCopy = this.onCopy.bind( this );\n\t\tthis.onSelectInput = this.onSelectInput.bind( this );\n\t\tthis.postLink = createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.props.focusOnMount ) {\n\t\t\tthis.postLink.current.focus();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t}\n\n\tonCopy() {\n\t\tthis.setState( {\n\t\t\tshowCopyConfirmation: true,\n\t\t} );\n\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t\tthis.dismissCopyConfirmation = setTimeout( () => {\n\t\t\tthis.setState( {\n\t\t\t\tshowCopyConfirmation: false,\n\t\t\t} );\n\t\t}, 4000 );\n\t}\n\n\tonSelectInput( event ) {\n\t\tevent.target.select();\n\t}\n\n\trender() {\n\t\tconst { children, isScheduled, post, postType } = this.props;\n\t\tconst postLabel = postType?.labels?.singular_name;\n\t\tconst viewPostLabel = postType?.labels?.view_item;\n\t\tconst addNewPostLabel = postType?.labels?.add_new_item;\n\t\tconst link =\n\t\t\tpost.status === 'future' ? getFuturePostUrl( post ) : post.link;\n\t\tconst addLink = addQueryArgs( 'post-new.php', {\n\t\t\tpost_type: post.type,\n\t\t} );\n\n\t\tconst postPublishNonLinkHeader = isScheduled ? (\n\t\t\t<>\n\t\t\t\t{ __( 'is now scheduled. It will go live on' ) }{ ' ' }\n\t\t\t\t<PostScheduleLabel />.\n\t\t\t</>\n\t\t) : (\n\t\t\t__( 'is now live.' )\n\t\t);\n\n\t\treturn (\n\t\t\t<div className=\"post-publish-panel__postpublish\">\n\t\t\t\t<PanelBody className=\"post-publish-panel__postpublish-header\">\n\t\t\t\t\t<a ref={ this.postLink } href={ link }>\n\t\t\t\t\t\t{ decodeEntities( post.title ) || __( '(no title)' ) }\n\t\t\t\t\t</a>{ ' ' }\n\t\t\t\t\t{ postPublishNonLinkHeader }\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<p className=\"post-publish-panel__postpublish-subheader\">\n\t\t\t\t\t\t<strong>{ __( 'What’s next?' ) }</strong>\n\t\t\t\t\t</p>\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address-container\">\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tclassName=\"post-publish-panel__postpublish-post-address\"\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: post type singular name */\n\t\t\t\t\t\t\t\t__( '%s address' ),\n\t\t\t\t\t\t\t\tpostLabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ safeDecodeURIComponent( link ) }\n\t\t\t\t\t\t\tonFocus={ this.onSelectInput }\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address__copy-button-wrap\">\n\t\t\t\t\t\t\t<CopyButton text={ link } onCopy={ this.onCopy }>\n\t\t\t\t\t\t\t\t{ this.state.showCopyConfirmation\n\t\t\t\t\t\t\t\t\t? __( 'Copied!' )\n\t\t\t\t\t\t\t\t\t: __( 'Copy' ) }\n\t\t\t\t\t\t\t</CopyButton>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-buttons\">\n\t\t\t\t\t\t{ ! isScheduled && (\n\t\t\t\t\t\t\t<Button variant=\"primary\" href={ link }>\n\t\t\t\t\t\t\t\t{ viewPostLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant={ isScheduled ? 'primary' : 'secondary' }\n\t\t\t\t\t\t\thref={ addLink }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ addNewPostLabel }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</PanelBody>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditedPostAttribute, getCurrentPost, isCurrentPostScheduled } =\n\t\tselect( editorStore );\n\tconst { getPostType } = select( coreStore );\n\n\treturn {\n\t\tpost: getCurrentPost(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tisScheduled: isCurrentPostScheduled(),\n\t};\n} )( PostPublishPanelPostpublish );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,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AAe,CACV,CAAC;QAAA,CACL,CAAC;MAAA,CACI,CAAC,EACVrC,QAAQ;IAAA,CACN,CAAC;EAER;AACD;AAAC,IAAA+D,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEc,IAAAgB,gBAAU,EAAIrC,MAAM,IAAM;EACxC,MAAM;IAAEsC,sBAAsB;IAAEC,cAAc;IAAEC;EAAuB,CAAC,GACvExC,MAAM,CAAEyC,YAAY,CAAC;EACtB,MAAM;IAAEC;EAAY,CAAC,GAAG1C,MAAM,CAAE2C,eAAU,CAAC;EAE3C,OAAO;IACN/E,IAAI,EAAE2E,cAAc,CAAC,CAAC;IACtBpC,QAAQ,EAAEuC,WAAW,CAAEJ,sBAAsB,CAAE,MAAO,CAAE,CAAC;IACzDpC,WAAW,EAAEsC,sBAAsB,CAAC;EACrC,CAAC;AACF,CAAE,CAAC,CAAE9D,2BAA4B,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _i18n = require("@wordpress/i18n");
|
|
10
9
|
var _components = require("@wordpress/components");
|
|
11
10
|
var _data = require("@wordpress/data");
|
|
@@ -22,6 +21,7 @@ var _maybePostFormatPanel = _interopRequireDefault(require("./maybe-post-format-
|
|
|
22
21
|
var _store = require("../../store");
|
|
23
22
|
var _maybeCategoryPanel = _interopRequireDefault(require("./maybe-category-panel"));
|
|
24
23
|
var _maybeUploadMedia = _interopRequireDefault(require("./maybe-upload-media"));
|
|
24
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
/**
|
|
26
26
|
* WordPress dependencies
|
|
27
27
|
*/
|
|
@@ -60,13 +60,13 @@ function PostPublishPanelPrepublish({
|
|
|
60
60
|
siteHome: siteData.home && (0, _url.filterURLForDisplay)(siteData.home)
|
|
61
61
|
};
|
|
62
62
|
}, []);
|
|
63
|
-
let siteIcon = (0,
|
|
63
|
+
let siteIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
64
64
|
className: "components-site-icon",
|
|
65
65
|
size: "36px",
|
|
66
66
|
icon: _icons.wordpress
|
|
67
67
|
});
|
|
68
68
|
if (siteIconUrl) {
|
|
69
|
-
siteIcon = (0,
|
|
69
|
+
siteIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
70
70
|
alt: (0, _i18n.__)('Site Icon'),
|
|
71
71
|
className: "components-site-icon",
|
|
72
72
|
src: siteIconUrl
|
|
@@ -86,29 +86,44 @@ function PostPublishPanelPrepublish({
|
|
|
86
86
|
prePublishTitle = (0, _i18n.__)('Are you ready to publish?');
|
|
87
87
|
prePublishBodyText = (0, _i18n.__)('Double-check your settings before publishing.');
|
|
88
88
|
}
|
|
89
|
-
return (0,
|
|
90
|
-
className: "editor-post-publish-panel__prepublish"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
89
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
90
|
+
className: "editor-post-publish-panel__prepublish",
|
|
91
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
92
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
|
|
93
|
+
children: prePublishTitle
|
|
94
|
+
})
|
|
95
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
96
|
+
children: prePublishBodyText
|
|
97
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
98
|
+
className: "components-site-card",
|
|
99
|
+
children: [siteIcon, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
100
|
+
className: "components-site-info",
|
|
101
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
102
|
+
className: "components-site-name",
|
|
103
|
+
children: (0, _htmlEntities.decodeEntities)(siteTitle) || (0, _i18n.__)('(Untitled)')
|
|
104
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
105
|
+
className: "components-site-home",
|
|
106
|
+
children: siteHome
|
|
107
|
+
})]
|
|
108
|
+
})]
|
|
109
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_maybeUploadMedia.default, {}), hasPublishAction && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
110
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PanelBody, {
|
|
111
|
+
initialOpen: false,
|
|
112
|
+
title: [(0, _i18n.__)('Visibility:'), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
113
|
+
className: "editor-post-publish-panel__link",
|
|
114
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_label.default, {})
|
|
115
|
+
}, "label")],
|
|
116
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_postVisibility.default, {})
|
|
117
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PanelBody, {
|
|
118
|
+
initialOpen: false,
|
|
119
|
+
title: [(0, _i18n.__)('Publish:'), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
120
|
+
className: "editor-post-publish-panel__link",
|
|
121
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_label2.default, {})
|
|
122
|
+
}, "label")],
|
|
123
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_postSchedule.default, {})
|
|
124
|
+
})]
|
|
125
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_maybePostFormatPanel.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_maybeTagsPanel.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_maybeCategoryPanel.default, {}), children]
|
|
126
|
+
});
|
|
112
127
|
}
|
|
113
128
|
var _default = exports.default = PostPublishPanelPrepublish;
|
|
114
129
|
//# sourceMappingURL=prepublish.js.map
|