@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
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CreateTemplatePartModalContents = CreateTemplatePartModalContents;
|
|
7
|
+
exports.default = CreateTemplatePartModal;
|
|
8
|
+
var _data = require("@wordpress/data");
|
|
9
|
+
var _components = require("@wordpress/components");
|
|
10
|
+
var _i18n = require("@wordpress/i18n");
|
|
11
|
+
var _element = require("@wordpress/element");
|
|
12
|
+
var _compose = require("@wordpress/compose");
|
|
13
|
+
var _notices = require("@wordpress/notices");
|
|
14
|
+
var _coreData = require("@wordpress/core-data");
|
|
15
|
+
var _icons = require("@wordpress/icons");
|
|
16
|
+
var _blocks = require("@wordpress/blocks");
|
|
17
|
+
var _store = require("../../store");
|
|
18
|
+
var _constants = require("../../store/constants");
|
|
19
|
+
var _utils = require("./utils");
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
/**
|
|
22
|
+
* WordPress dependencies
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Internal dependencies
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
function CreateTemplatePartModal({
|
|
30
|
+
modalTitle,
|
|
31
|
+
...restProps
|
|
32
|
+
}) {
|
|
33
|
+
const defaultModalTitle = (0, _data.useSelect)(select => select(_coreData.store).getPostType(_constants.TEMPLATE_PART_POST_TYPE)?.labels?.add_new_item, []);
|
|
34
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Modal, {
|
|
35
|
+
title: modalTitle || defaultModalTitle,
|
|
36
|
+
onRequestClose: restProps.closeModal,
|
|
37
|
+
overlayClassName: "editor-create-template-part-modal",
|
|
38
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CreateTemplatePartModalContents, {
|
|
39
|
+
...restProps
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function CreateTemplatePartModalContents({
|
|
44
|
+
defaultArea = _constants.TEMPLATE_PART_AREA_DEFAULT_CATEGORY,
|
|
45
|
+
blocks = [],
|
|
46
|
+
confirmLabel = (0, _i18n.__)('Add'),
|
|
47
|
+
closeModal,
|
|
48
|
+
onCreate,
|
|
49
|
+
onError,
|
|
50
|
+
defaultTitle = ''
|
|
51
|
+
}) {
|
|
52
|
+
const {
|
|
53
|
+
createErrorNotice
|
|
54
|
+
} = (0, _data.useDispatch)(_notices.store);
|
|
55
|
+
const {
|
|
56
|
+
saveEntityRecord
|
|
57
|
+
} = (0, _data.useDispatch)(_coreData.store);
|
|
58
|
+
const existingTemplateParts = (0, _utils.useExistingTemplateParts)();
|
|
59
|
+
const [title, setTitle] = (0, _element.useState)(defaultTitle);
|
|
60
|
+
const [area, setArea] = (0, _element.useState)(defaultArea);
|
|
61
|
+
const [isSubmitting, setIsSubmitting] = (0, _element.useState)(false);
|
|
62
|
+
const instanceId = (0, _compose.useInstanceId)(CreateTemplatePartModal);
|
|
63
|
+
const templatePartAreas = (0, _data.useSelect)(select => select(_store.store).__experimentalGetDefaultTemplatePartAreas(), []);
|
|
64
|
+
async function createTemplatePart() {
|
|
65
|
+
if (!title || isSubmitting) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
setIsSubmitting(true);
|
|
70
|
+
const uniqueTitle = (0, _utils.getUniqueTemplatePartTitle)(title, existingTemplateParts);
|
|
71
|
+
const cleanSlug = (0, _utils.getCleanTemplatePartSlug)(uniqueTitle);
|
|
72
|
+
const templatePart = await saveEntityRecord('postType', _constants.TEMPLATE_PART_POST_TYPE, {
|
|
73
|
+
slug: cleanSlug,
|
|
74
|
+
title: uniqueTitle,
|
|
75
|
+
content: (0, _blocks.serialize)(blocks),
|
|
76
|
+
area
|
|
77
|
+
}, {
|
|
78
|
+
throwOnError: true
|
|
79
|
+
});
|
|
80
|
+
await onCreate(templatePart);
|
|
81
|
+
|
|
82
|
+
// TODO: Add a success notice?
|
|
83
|
+
} catch (error) {
|
|
84
|
+
const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0, _i18n.__)('An error occurred while creating the template part.');
|
|
85
|
+
createErrorNotice(errorMessage, {
|
|
86
|
+
type: 'snackbar'
|
|
87
|
+
});
|
|
88
|
+
onError?.();
|
|
89
|
+
} finally {
|
|
90
|
+
setIsSubmitting(false);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("form", {
|
|
94
|
+
onSubmit: async event => {
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
await createTemplatePart();
|
|
97
|
+
},
|
|
98
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
|
|
99
|
+
spacing: "4",
|
|
100
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextControl, {
|
|
101
|
+
__next40pxDefaultSize: true,
|
|
102
|
+
__nextHasNoMarginBottom: true,
|
|
103
|
+
label: (0, _i18n.__)('Name'),
|
|
104
|
+
value: title,
|
|
105
|
+
onChange: setTitle,
|
|
106
|
+
required: true
|
|
107
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.BaseControl, {
|
|
108
|
+
label: (0, _i18n.__)('Area'),
|
|
109
|
+
id: `editor-create-template-part-modal__area-selection-${instanceId}`,
|
|
110
|
+
className: "editor-create-template-part-modal__area-base-control",
|
|
111
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalRadioGroup, {
|
|
112
|
+
label: (0, _i18n.__)('Area'),
|
|
113
|
+
className: "editor-create-template-part-modal__area-radio-group",
|
|
114
|
+
id: `editor-create-template-part-modal__area-selection-${instanceId}`,
|
|
115
|
+
onChange: setArea,
|
|
116
|
+
checked: area,
|
|
117
|
+
children: templatePartAreas.map(({
|
|
118
|
+
icon,
|
|
119
|
+
label,
|
|
120
|
+
area: value,
|
|
121
|
+
description
|
|
122
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalRadio, {
|
|
123
|
+
value: value,
|
|
124
|
+
className: "editor-create-template-part-modal__area-radio",
|
|
125
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Flex, {
|
|
126
|
+
align: "start",
|
|
127
|
+
justify: "start",
|
|
128
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
|
|
129
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
130
|
+
icon: icon
|
|
131
|
+
})
|
|
132
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.FlexBlock, {
|
|
133
|
+
className: "editor-create-template-part-modal__option-label",
|
|
134
|
+
children: [label, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
135
|
+
children: description
|
|
136
|
+
})]
|
|
137
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
|
|
138
|
+
className: "editor-create-template-part-modal__checkbox",
|
|
139
|
+
children: area === value && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
140
|
+
icon: _icons.check
|
|
141
|
+
})
|
|
142
|
+
})]
|
|
143
|
+
})
|
|
144
|
+
}, label))
|
|
145
|
+
})
|
|
146
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
|
|
147
|
+
justify: "right",
|
|
148
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
149
|
+
__next40pxDefaultSize: true,
|
|
150
|
+
variant: "tertiary",
|
|
151
|
+
onClick: () => {
|
|
152
|
+
closeModal();
|
|
153
|
+
},
|
|
154
|
+
children: (0, _i18n.__)('Cancel')
|
|
155
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
156
|
+
__next40pxDefaultSize: true,
|
|
157
|
+
variant: "primary",
|
|
158
|
+
type: "submit",
|
|
159
|
+
"aria-disabled": !title || isSubmitting,
|
|
160
|
+
isBusy: isSubmitting,
|
|
161
|
+
children: confirmLabel
|
|
162
|
+
})]
|
|
163
|
+
})]
|
|
164
|
+
})
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_data","require","_components","_i18n","_element","_compose","_notices","_coreData","_icons","_blocks","_store","_constants","_utils","_jsxRuntime","CreateTemplatePartModal","modalTitle","restProps","defaultModalTitle","useSelect","select","coreStore","getPostType","TEMPLATE_PART_POST_TYPE","labels","add_new_item","jsx","Modal","title","onRequestClose","closeModal","overlayClassName","children","CreateTemplatePartModalContents","defaultArea","TEMPLATE_PART_AREA_DEFAULT_CATEGORY","blocks","confirmLabel","__","onCreate","onError","defaultTitle","createErrorNotice","useDispatch","noticesStore","saveEntityRecord","existingTemplateParts","useExistingTemplateParts","setTitle","useState","area","setArea","isSubmitting","setIsSubmitting","instanceId","useInstanceId","templatePartAreas","editorStore","__experimentalGetDefaultTemplatePartAreas","createTemplatePart","uniqueTitle","getUniqueTemplatePartTitle","cleanSlug","getCleanTemplatePartSlug","templatePart","slug","content","serialize","throwOnError","error","errorMessage","message","code","type","onSubmit","event","preventDefault","jsxs","__experimentalVStack","spacing","TextControl","__next40pxDefaultSize","__nextHasNoMarginBottom","label","value","onChange","required","BaseControl","id","className","__experimentalRadioGroup","checked","map","icon","description","__experimentalRadio","Flex","align","justify","FlexItem","Icon","FlexBlock","check","__experimentalHStack","Button","variant","onClick","isBusy"],"sources":["@wordpress/editor/src/components/create-template-part-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tIcon,\n\tBaseControl,\n\tTextControl,\n\tFlex,\n\tFlexItem,\n\tFlexBlock,\n\tButton,\n\tModal,\n\t__experimentalRadioGroup as RadioGroup,\n\t__experimentalRadio as Radio,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { check } from '@wordpress/icons';\nimport { serialize } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport {\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n} from '../../store/constants';\nimport {\n\tuseExistingTemplateParts,\n\tgetUniqueTemplatePartTitle,\n\tgetCleanTemplatePartSlug,\n} from './utils';\n\nexport default function CreateTemplatePartModal( {\n\tmodalTitle,\n\t...restProps\n} ) {\n\tconst defaultModalTitle = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getPostType( TEMPLATE_PART_POST_TYPE )?.labels\n\t\t\t\t?.add_new_item,\n\t\t[]\n\t);\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ modalTitle || defaultModalTitle }\n\t\t\tonRequestClose={ restProps.closeModal }\n\t\t\toverlayClassName=\"editor-create-template-part-modal\"\n\t\t>\n\t\t\t<CreateTemplatePartModalContents { ...restProps } />\n\t\t</Modal>\n\t);\n}\n\nexport function CreateTemplatePartModalContents( {\n\tdefaultArea = TEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n\tblocks = [],\n\tconfirmLabel = __( 'Add' ),\n\tcloseModal,\n\tonCreate,\n\tonError,\n\tdefaultTitle = '',\n} ) {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst existingTemplateParts = useExistingTemplateParts();\n\n\tconst [ title, setTitle ] = useState( defaultTitle );\n\tconst [ area, setArea ] = useState( defaultArea );\n\tconst [ isSubmitting, setIsSubmitting ] = useState( false );\n\tconst instanceId = useInstanceId( CreateTemplatePartModal );\n\n\tconst templatePartAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).__experimentalGetDefaultTemplatePartAreas(),\n\t\t[]\n\t);\n\tasync function createTemplatePart() {\n\t\tif ( ! title || isSubmitting ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tsetIsSubmitting( true );\n\t\t\tconst uniqueTitle = getUniqueTemplatePartTitle(\n\t\t\t\ttitle,\n\t\t\t\texistingTemplateParts\n\t\t\t);\n\t\t\tconst cleanSlug = getCleanTemplatePartSlug( uniqueTitle );\n\n\t\t\tconst templatePart = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t\t{\n\t\t\t\t\tslug: cleanSlug,\n\t\t\t\t\ttitle: uniqueTitle,\n\t\t\t\t\tcontent: serialize( blocks ),\n\t\t\t\t\tarea,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\t\t\tawait onCreate( templatePart );\n\n\t\t\t// TODO: Add a success notice?\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __(\n\t\t\t\t\t\t\t'An error occurred while creating the template part.'\n\t\t\t\t\t );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\n\t\t\tonError?.();\n\t\t} finally {\n\t\t\tsetIsSubmitting( false );\n\t\t}\n\t}\n\treturn (\n\t\t<form\n\t\t\tonSubmit={ async ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tawait createTemplatePart();\n\t\t\t} }\n\t\t>\n\t\t\t<VStack spacing=\"4\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\tvalue={ title }\n\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\trequired\n\t\t\t\t/>\n\t\t\t\t<BaseControl\n\t\t\t\t\tlabel={ __( 'Area' ) }\n\t\t\t\t\tid={ `editor-create-template-part-modal__area-selection-${ instanceId }` }\n\t\t\t\t\tclassName=\"editor-create-template-part-modal__area-base-control\"\n\t\t\t\t>\n\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\tlabel={ __( 'Area' ) }\n\t\t\t\t\t\tclassName=\"editor-create-template-part-modal__area-radio-group\"\n\t\t\t\t\t\tid={ `editor-create-template-part-modal__area-selection-${ instanceId }` }\n\t\t\t\t\t\tonChange={ setArea }\n\t\t\t\t\t\tchecked={ area }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ templatePartAreas.map(\n\t\t\t\t\t\t\t( { icon, label, area: value, description } ) => (\n\t\t\t\t\t\t\t\t<Radio\n\t\t\t\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\t\tclassName=\"editor-create-template-part-modal__area-radio\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Flex align=\"start\" justify=\"start\">\n\t\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t\t<FlexBlock className=\"editor-create-template-part-modal__option-label\">\n\t\t\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t\t\t\t<div>{ description }</div>\n\t\t\t\t\t\t\t\t\t\t</FlexBlock>\n\n\t\t\t\t\t\t\t\t\t\t<FlexItem className=\"editor-create-template-part-modal__checkbox\">\n\t\t\t\t\t\t\t\t\t\t\t{ area === value && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon icon={ check } />\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t\t</Radio>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) }\n\t\t\t\t\t</RadioGroup>\n\t\t\t\t</BaseControl>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\taria-disabled={ ! title || isSubmitting }\n\t\t\t\t\t\tisBusy={ isSubmitting }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ confirmLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAcA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAA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QAAS;QAAC,CACT,CAAC,eACT,IAAAxB,WAAA,CAAAY,GAAA,EAACvB,WAAA,CAAAqG,MAAM;UACNvB,qBAAqB;UACrBwB,OAAO,EAAC,SAAS;UACjBhC,IAAI,EAAC,QAAQ;UACb,iBAAgB,CAAE7C,KAAK,IAAIwB,YAAc;UACzCuD,MAAM,EAAGvD,YAAc;UAAApB,QAAA,EAErBK;QAAY,CACP,CAAC;MAAA,CACF,CAAC;IAAA,CACF;EAAC,CACJ,CAAC;AAET","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useExistingTemplateParts = exports.getUniqueTemplatePartTitle = exports.getCleanTemplatePartSlug = void 0;
|
|
7
|
+
var _changeCase = require("change-case");
|
|
8
|
+
var _data = require("@wordpress/data");
|
|
9
|
+
var _coreData = require("@wordpress/core-data");
|
|
10
|
+
var _constants = require("../../store/constants");
|
|
11
|
+
/**
|
|
12
|
+
* External dependencies
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* WordPress dependencies
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Internal dependencies
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
const useExistingTemplateParts = () => {
|
|
24
|
+
return (0, _data.useSelect)(select => select(_coreData.store).getEntityRecords('postType', _constants.TEMPLATE_PART_POST_TYPE, {
|
|
25
|
+
per_page: -1
|
|
26
|
+
}), []);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Return a unique template part title based on
|
|
31
|
+
* the given title and existing template parts.
|
|
32
|
+
*
|
|
33
|
+
* @param {string} title The original template part title.
|
|
34
|
+
* @param {Object} templateParts The array of template part entities.
|
|
35
|
+
* @return {string} A unique template part title.
|
|
36
|
+
*/
|
|
37
|
+
exports.useExistingTemplateParts = useExistingTemplateParts;
|
|
38
|
+
const getUniqueTemplatePartTitle = (title, templateParts) => {
|
|
39
|
+
const lowercaseTitle = title.toLowerCase();
|
|
40
|
+
const existingTitles = templateParts.map(templatePart => templatePart.title.rendered.toLowerCase());
|
|
41
|
+
if (!existingTitles.includes(lowercaseTitle)) {
|
|
42
|
+
return title;
|
|
43
|
+
}
|
|
44
|
+
let suffix = 2;
|
|
45
|
+
while (existingTitles.includes(`${lowercaseTitle} ${suffix}`)) {
|
|
46
|
+
suffix++;
|
|
47
|
+
}
|
|
48
|
+
return `${title} ${suffix}`;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Get a valid slug for a template part.
|
|
53
|
+
* Currently template parts only allow latin chars.
|
|
54
|
+
* The fallback slug will receive suffix by default.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} title The template part title.
|
|
57
|
+
* @return {string} A valid template part slug.
|
|
58
|
+
*/
|
|
59
|
+
exports.getUniqueTemplatePartTitle = getUniqueTemplatePartTitle;
|
|
60
|
+
const getCleanTemplatePartSlug = title => {
|
|
61
|
+
return (0, _changeCase.paramCase)(title).replace(/[^\w-]+/g, '') || 'wp-custom-part';
|
|
62
|
+
};
|
|
63
|
+
exports.getCleanTemplatePartSlug = getCleanTemplatePartSlug;
|
|
64
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_changeCase","require","_data","_coreData","_constants","useExistingTemplateParts","useSelect","select","coreStore","getEntityRecords","TEMPLATE_PART_POST_TYPE","per_page","exports","getUniqueTemplatePartTitle","title","templateParts","lowercaseTitle","toLowerCase","existingTitles","map","templatePart","rendered","includes","suffix","getCleanTemplatePartSlug","kebabCase","replace"],"sources":["@wordpress/editor/src/components/create-template-part-modal/utils.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_PART_POST_TYPE } from '../../store/constants';\n\nexport const useExistingTemplateParts = () => {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t\t{\n\t\t\t\t\tper_page: -1,\n\t\t\t\t}\n\t\t\t),\n\t\t[]\n\t);\n};\n\n/**\n * Return a unique template part title based on\n * the given title and existing template parts.\n *\n * @param {string} title The original template part title.\n * @param {Object} templateParts The array of template part entities.\n * @return {string} A unique template part title.\n */\nexport const getUniqueTemplatePartTitle = ( title, templateParts ) => {\n\tconst lowercaseTitle = title.toLowerCase();\n\tconst existingTitles = templateParts.map( ( templatePart ) =>\n\t\ttemplatePart.title.rendered.toLowerCase()\n\t);\n\n\tif ( ! existingTitles.includes( lowercaseTitle ) ) {\n\t\treturn title;\n\t}\n\n\tlet suffix = 2;\n\twhile ( existingTitles.includes( `${ lowercaseTitle } ${ suffix }` ) ) {\n\t\tsuffix++;\n\t}\n\n\treturn `${ title } ${ suffix }`;\n};\n\n/**\n * Get a valid slug for a template part.\n * Currently template parts only allow latin chars.\n * The fallback slug will receive suffix by default.\n *\n * @param {string} title The template part title.\n * @return {string} A valid template part slug.\n */\nexport const getCleanTemplatePartSlug = ( title ) => {\n\treturn kebabCase( title ).replace( /[^\\w-]+/g, '' ) || 'wp-custom-part';\n};\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAKA,IAAAG,UAAA,GAAAH,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGO,MAAMI,wBAAwB,GAAGA,CAAA,KAAM;EAC7C,OAAO,IAAAC,eAAS,EACbC,MAAM,IACPA,MAAM,CAAEC,eAAU,CAAC,CAACC,gBAAgB,CACnC,UAAU,EACVC,kCAAuB,EACvB;IACCC,QAAQ,EAAE,CAAC;EACZ,CACD,CAAC,EACF,EACD,CAAC;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPAC,OAAA,CAAAP,wBAAA,GAAAA,wBAAA;AAQO,MAAMQ,0BAA0B,GAAGA,CAAEC,KAAK,EAAEC,aAAa,KAAM;EACrE,MAAMC,cAAc,GAAGF,KAAK,CAACG,WAAW,CAAC,CAAC;EAC1C,MAAMC,cAAc,GAAGH,aAAa,CAACI,GAAG,CAAIC,YAAY,IACvDA,YAAY,CAACN,KAAK,CAACO,QAAQ,CAACJ,WAAW,CAAC,CACzC,CAAC;EAED,IAAK,CAAEC,cAAc,CAACI,QAAQ,CAAEN,cAAe,CAAC,EAAG;IAClD,OAAOF,KAAK;EACb;EAEA,IAAIS,MAAM,GAAG,CAAC;EACd,OAAQL,cAAc,CAACI,QAAQ,CAAG,GAAGN,cAAgB,IAAIO,MAAQ,EAAE,CAAC,EAAG;IACtEA,MAAM,EAAE;EACT;EAEA,OAAQ,GAAGT,KAAO,IAAIS,MAAQ,EAAC;AAChC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPAX,OAAA,CAAAC,0BAAA,GAAAA,0BAAA;AAQO,MAAMW,wBAAwB,GAAKV,KAAK,IAAM;EACpD,OAAO,IAAAW,qBAAS,EAAEX,KAAM,CAAC,CAACY,OAAO,CAAE,UAAU,EAAE,EAAG,CAAC,IAAI,gBAAgB;AACxE,CAAC;AAACd,OAAA,CAAAY,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -12,10 +12,10 @@ Object.defineProperty(exports, "ServerSideRender", {
|
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
exports.withFontSizes = exports.withColors = exports.withColorContext = exports.getFontSizeClass = exports.getFontSize = exports.getColorObjectByColorValue = exports.getColorObjectByAttributeValues = exports.getColorClassName = exports.createCustomColorsHOC = exports.__unstableRichTextInputEvent = exports.WritingFlow = exports.Warning = exports.URLPopover = exports.URLInputButton = exports.URLInput = exports.SkipToSelectedBlock = void 0;
|
|
15
|
-
var _react = require("react");
|
|
16
15
|
var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
|
|
17
16
|
var _element = require("@wordpress/element");
|
|
18
17
|
var _blockEditor = require("@wordpress/block-editor");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
var _serverSideRender = _interopRequireDefault(require("@wordpress/server-side-render"));
|
|
20
20
|
// Block Creation Components.
|
|
21
21
|
/**
|
|
@@ -29,7 +29,7 @@ function deprecateComponent(name, Wrapped, staticsToHoist = []) {
|
|
|
29
29
|
alternative: 'wp.blockEditor.' + name,
|
|
30
30
|
version: '6.2'
|
|
31
31
|
});
|
|
32
|
-
return (0,
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapped, {
|
|
33
33
|
ref: ref,
|
|
34
34
|
...props
|
|
35
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_deprecated","_interopRequireDefault","require","_element","_blockEditor","_serverSideRender","deprecateComponent","name","Wrapped","staticsToHoist","Component","forwardRef","props","ref","deprecated","since","alternative","version","_react","createElement","forEach","staticName","deprecateFunction","func","args","RichText","exports","RootRichText","isEmpty","Autocomplete","RootAutocomplete","AlignmentToolbar","RootAlignmentToolbar","BlockAlignmentToolbar","RootBlockAlignmentToolbar","BlockControls","RootBlockControls","BlockEdit","RootBlockEdit","BlockEditorKeyboardShortcuts","RootBlockEditorKeyboardShortcuts","BlockFormatControls","RootBlockFormatControls","BlockIcon","RootBlockIcon","BlockInspector","RootBlockInspector","BlockList","RootBlockList","BlockMover","RootBlockMover","BlockNavigationDropdown","RootBlockNavigationDropdown","BlockSelectionClearer","RootBlockSelectionClearer","BlockSettingsMenu","RootBlockSettingsMenu","BlockTitle","RootBlockTitle","BlockToolbar","RootBlockToolbar","ColorPalette","RootColorPalette","ContrastChecker","RootContrastChecker","CopyHandler","RootCopyHandler","DefaultBlockAppender","RootDefaultBlockAppender","FontSizePicker","RootFontSizePicker","Inserter","RootInserter","InnerBlocks","RootInnerBlocks","InspectorAdvancedControls","RootInspectorAdvancedControls","InspectorControls","RootInspectorControls","PanelColorSettings","RootPanelColorSettings","PlainText","RootPlainText","RichTextShortcut","RootRichTextShortcut","RichTextToolbarButton","RootRichTextToolbarButton","__unstableRichTextInputEvent","__unstableRootRichTextInputEvent","MediaPlaceholder","RootMediaPlaceholder","MediaUpload","RootMediaUpload","MediaUploadCheck","RootMediaUploadCheck","MultiSelectScrollIntoView","RootMultiSelectScrollIntoView","NavigableToolbar","RootNavigableToolbar","ObserveTyping","RootObserveTyping","SkipToSelectedBlock","RootSkipToSelectedBlock","URLInput","RootURLInput","URLInputButton","RootURLInputButton","URLPopover","RootURLPopover","Warning","RootWarning","WritingFlow","RootWritingFlow","createCustomColorsHOC","rootCreateCustomColorsHOC","getColorClassName","rootGetColorClassName","getColorObjectByAttributeValues","rootGetColorObjectByAttributeValues","getColorObjectByColorValue","rootGetColorObjectByColorValue","getFontSize","rootGetFontSize","getFontSizeClass","rootGetFontSizeClass","withColorContext","rootWithColorContext","withColors","rootWithColors","withFontSizes","rootWithFontSizes"],"sources":["@wordpress/editor/src/components/deprecated.js"],"sourcesContent":["// Block Creation Components.\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\tAutocomplete as RootAutocomplete,\n\tAlignmentToolbar as RootAlignmentToolbar,\n\tBlockAlignmentToolbar as RootBlockAlignmentToolbar,\n\tBlockControls as RootBlockControls,\n\tBlockEdit as RootBlockEdit,\n\tBlockEditorKeyboardShortcuts as RootBlockEditorKeyboardShortcuts,\n\tBlockFormatControls as RootBlockFormatControls,\n\tBlockIcon as RootBlockIcon,\n\tBlockInspector as RootBlockInspector,\n\tBlockList as RootBlockList,\n\tBlockMover as RootBlockMover,\n\tBlockNavigationDropdown as RootBlockNavigationDropdown,\n\tBlockSelectionClearer as RootBlockSelectionClearer,\n\tBlockSettingsMenu as RootBlockSettingsMenu,\n\tBlockTitle as RootBlockTitle,\n\tBlockToolbar as RootBlockToolbar,\n\tColorPalette as RootColorPalette,\n\tContrastChecker as RootContrastChecker,\n\tCopyHandler as RootCopyHandler,\n\tcreateCustomColorsHOC as rootCreateCustomColorsHOC,\n\tDefaultBlockAppender as RootDefaultBlockAppender,\n\tFontSizePicker as RootFontSizePicker,\n\tgetColorClassName as rootGetColorClassName,\n\tgetColorObjectByAttributeValues as rootGetColorObjectByAttributeValues,\n\tgetColorObjectByColorValue as rootGetColorObjectByColorValue,\n\tgetFontSize as rootGetFontSize,\n\tgetFontSizeClass as rootGetFontSizeClass,\n\tInserter as RootInserter,\n\tInnerBlocks as RootInnerBlocks,\n\tInspectorAdvancedControls as RootInspectorAdvancedControls,\n\tInspectorControls as RootInspectorControls,\n\tPanelColorSettings as RootPanelColorSettings,\n\tPlainText as RootPlainText,\n\tRichText as RootRichText,\n\tRichTextShortcut as RootRichTextShortcut,\n\tRichTextToolbarButton as RootRichTextToolbarButton,\n\t__unstableRichTextInputEvent as __unstableRootRichTextInputEvent,\n\tMediaPlaceholder as RootMediaPlaceholder,\n\tMediaUpload as RootMediaUpload,\n\tMediaUploadCheck as RootMediaUploadCheck,\n\tMultiSelectScrollIntoView as RootMultiSelectScrollIntoView,\n\tNavigableToolbar as RootNavigableToolbar,\n\tObserveTyping as RootObserveTyping,\n\tSkipToSelectedBlock as RootSkipToSelectedBlock,\n\tURLInput as RootURLInput,\n\tURLInputButton as RootURLInputButton,\n\tURLPopover as RootURLPopover,\n\tWarning as RootWarning,\n\tWritingFlow as RootWritingFlow,\n\twithColorContext as rootWithColorContext,\n\twithColors as rootWithColors,\n\twithFontSizes as rootWithFontSizes,\n} from '@wordpress/block-editor';\n\nexport { default as ServerSideRender } from '@wordpress/server-side-render';\n\nfunction deprecateComponent( name, Wrapped, staticsToHoist = [] ) {\n\tconst Component = forwardRef( ( props, ref ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn <Wrapped ref={ ref } { ...props } />;\n\t} );\n\n\tstaticsToHoist.forEach( ( staticName ) => {\n\t\tComponent[ staticName ] = deprecateComponent(\n\t\t\tname + '.' + staticName,\n\t\t\tWrapped[ staticName ]\n\t\t);\n\t} );\n\n\treturn Component;\n}\n\nfunction deprecateFunction( name, func ) {\n\treturn ( ...args ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn func( ...args );\n\t};\n}\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichText` instead.\n */\nconst RichText = deprecateComponent( 'RichText', RootRichText, [ 'Content' ] );\nRichText.isEmpty = deprecateFunction(\n\t'RichText.isEmpty',\n\tRootRichText.isEmpty\n);\n\nexport { RichText };\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Autocomplete` instead.\n */\nexport const Autocomplete = deprecateComponent(\n\t'Autocomplete',\n\tRootAutocomplete\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.AlignmentToolbar` instead.\n */\nexport const AlignmentToolbar = deprecateComponent(\n\t'AlignmentToolbar',\n\tRootAlignmentToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockAlignmentToolbar` instead.\n */\nexport const BlockAlignmentToolbar = deprecateComponent(\n\t'BlockAlignmentToolbar',\n\tRootBlockAlignmentToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockControls` instead.\n */\nexport const BlockControls = deprecateComponent(\n\t'BlockControls',\n\tRootBlockControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockEdit` instead.\n */\nexport const BlockEdit = deprecateComponent( 'BlockEdit', RootBlockEdit );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockEditorKeyboardShortcuts` instead.\n */\nexport const BlockEditorKeyboardShortcuts = deprecateComponent(\n\t'BlockEditorKeyboardShortcuts',\n\tRootBlockEditorKeyboardShortcuts\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockFormatControls` instead.\n */\nexport const BlockFormatControls = deprecateComponent(\n\t'BlockFormatControls',\n\tRootBlockFormatControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockIcon` instead.\n */\nexport const BlockIcon = deprecateComponent( 'BlockIcon', RootBlockIcon );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockInspector` instead.\n */\nexport const BlockInspector = deprecateComponent(\n\t'BlockInspector',\n\tRootBlockInspector\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockList` instead.\n */\nexport const BlockList = deprecateComponent( 'BlockList', RootBlockList );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockMover` instead.\n */\nexport const BlockMover = deprecateComponent( 'BlockMover', RootBlockMover );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockNavigationDropdown` instead.\n */\nexport const BlockNavigationDropdown = deprecateComponent(\n\t'BlockNavigationDropdown',\n\tRootBlockNavigationDropdown\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockSelectionClearer` instead.\n */\nexport const BlockSelectionClearer = deprecateComponent(\n\t'BlockSelectionClearer',\n\tRootBlockSelectionClearer\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockSettingsMenu` instead.\n */\nexport const BlockSettingsMenu = deprecateComponent(\n\t'BlockSettingsMenu',\n\tRootBlockSettingsMenu\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockTitle` instead.\n */\nexport const BlockTitle = deprecateComponent( 'BlockTitle', RootBlockTitle );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockToolbar` instead.\n */\nexport const BlockToolbar = deprecateComponent(\n\t'BlockToolbar',\n\tRootBlockToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ColorPalette` instead.\n */\nexport const ColorPalette = deprecateComponent(\n\t'ColorPalette',\n\tRootColorPalette\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ContrastChecker` instead.\n */\nexport const ContrastChecker = deprecateComponent(\n\t'ContrastChecker',\n\tRootContrastChecker\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.CopyHandler` instead.\n */\nexport const CopyHandler = deprecateComponent( 'CopyHandler', RootCopyHandler );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.DefaultBlockAppender` instead.\n */\nexport const DefaultBlockAppender = deprecateComponent(\n\t'DefaultBlockAppender',\n\tRootDefaultBlockAppender\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.FontSizePicker` instead.\n */\nexport const FontSizePicker = deprecateComponent(\n\t'FontSizePicker',\n\tRootFontSizePicker\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Inserter` instead.\n */\nexport const Inserter = deprecateComponent( 'Inserter', RootInserter );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InnerBlocks` instead.\n */\nexport const InnerBlocks = deprecateComponent( 'InnerBlocks', RootInnerBlocks, [\n\t'ButtonBlockAppender',\n\t'DefaultBlockAppender',\n\t'Content',\n] );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InspectorAdvancedControls` instead.\n */\nexport const InspectorAdvancedControls = deprecateComponent(\n\t'InspectorAdvancedControls',\n\tRootInspectorAdvancedControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InspectorControls` instead.\n */\nexport const InspectorControls = deprecateComponent(\n\t'InspectorControls',\n\tRootInspectorControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.PanelColorSettings` instead.\n */\nexport const PanelColorSettings = deprecateComponent(\n\t'PanelColorSettings',\n\tRootPanelColorSettings\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.PlainText` instead.\n */\nexport const PlainText = deprecateComponent( 'PlainText', RootPlainText );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichTextShortcut` instead.\n */\nexport const RichTextShortcut = deprecateComponent(\n\t'RichTextShortcut',\n\tRootRichTextShortcut\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichTextToolbarButton` instead.\n */\nexport const RichTextToolbarButton = deprecateComponent(\n\t'RichTextToolbarButton',\n\tRootRichTextToolbarButton\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.__unstableRichTextInputEvent` instead.\n */\nexport const __unstableRichTextInputEvent = deprecateComponent(\n\t'__unstableRichTextInputEvent',\n\t__unstableRootRichTextInputEvent\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaPlaceholder` instead.\n */\nexport const MediaPlaceholder = deprecateComponent(\n\t'MediaPlaceholder',\n\tRootMediaPlaceholder\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaUpload` instead.\n */\nexport const MediaUpload = deprecateComponent( 'MediaUpload', RootMediaUpload );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaUploadCheck` instead.\n */\nexport const MediaUploadCheck = deprecateComponent(\n\t'MediaUploadCheck',\n\tRootMediaUploadCheck\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MultiSelectScrollIntoView` instead.\n */\nexport const MultiSelectScrollIntoView = deprecateComponent(\n\t'MultiSelectScrollIntoView',\n\tRootMultiSelectScrollIntoView\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.NavigableToolbar` instead.\n */\nexport const NavigableToolbar = deprecateComponent(\n\t'NavigableToolbar',\n\tRootNavigableToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ObserveTyping` instead.\n */\nexport const ObserveTyping = deprecateComponent(\n\t'ObserveTyping',\n\tRootObserveTyping\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.SkipToSelectedBlock` instead.\n */\nexport const SkipToSelectedBlock = deprecateComponent(\n\t'SkipToSelectedBlock',\n\tRootSkipToSelectedBlock\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLInput` instead.\n */\nexport const URLInput = deprecateComponent( 'URLInput', RootURLInput );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLInputButton` instead.\n */\nexport const URLInputButton = deprecateComponent(\n\t'URLInputButton',\n\tRootURLInputButton\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLPopover` instead.\n */\nexport const URLPopover = deprecateComponent( 'URLPopover', RootURLPopover );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Warning` instead.\n */\nexport const Warning = deprecateComponent( 'Warning', RootWarning );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.WritingFlow` instead.\n */\nexport const WritingFlow = deprecateComponent( 'WritingFlow', RootWritingFlow );\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.\n */\nexport const createCustomColorsHOC = deprecateFunction(\n\t'createCustomColorsHOC',\n\trootCreateCustomColorsHOC\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorClassName` instead.\n */\nexport const getColorClassName = deprecateFunction(\n\t'getColorClassName',\n\trootGetColorClassName\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorObjectByAttributeValues` instead.\n */\nexport const getColorObjectByAttributeValues = deprecateFunction(\n\t'getColorObjectByAttributeValues',\n\trootGetColorObjectByAttributeValues\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorObjectByColorValue` instead.\n */\nexport const getColorObjectByColorValue = deprecateFunction(\n\t'getColorObjectByColorValue',\n\trootGetColorObjectByColorValue\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getFontSize` instead.\n */\nexport const getFontSize = deprecateFunction( 'getFontSize', rootGetFontSize );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getFontSizeClass` instead.\n */\nexport const getFontSizeClass = deprecateFunction(\n\t'getFontSizeClass',\n\trootGetFontSizeClass\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.\n */\nexport const withColorContext = deprecateFunction(\n\t'withColorContext',\n\trootWithColorContext\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.withColors` instead.\n */\nexport const withColors = deprecateFunction( 'withColors', rootWithColors );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.withFontSizes` instead.\n */\nexport const withFontSizes = deprecateFunction(\n\t'withFontSizes',\n\trootWithFontSizes\n);\n"],"mappings":";;;;;;;;;;;;;;;AAIA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAuDA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AA7DA;AACA;AACA;AACA;;AA4DA,SAASI,kBAAkBA,CAAEC,IAAI,EAAEC,OAAO,EAAEC,cAAc,GAAG,EAAE,EAAG;EACjE,MAAMC,SAAS,GAAG,IAAAC,mBAAU,EAAE,CAAEC,KAAK,EAAEC,GAAG,KAAM;IAC/C,IAAAC,mBAAU,EAAE,YAAY,GAAGP,IAAI,EAAE;MAChCQ,KAAK,EAAE,KAAK;MACZC,WAAW,EAAE,iBAAiB,GAAGT,IAAI;MACrCU,OAAO,EAAE;IACV,CAAE,CAAC;IAEH,OAAO,IAAAC,MAAA,CAAAC,aAAA,EAACX,OAAO;MAACK,GAAG,EAAGA,GAAK;MAAA,GAAMD;IAAK,CAAI,CAAC;EAC5C,CAAE,CAAC;EAEHH,cAAc,CAACW,OAAO,CAAIC,UAAU,IAAM;IACzCX,SAAS,CAAEW,UAAU,CAAE,GAAGf,kBAAkB,CAC3CC,IAAI,GAAG,GAAG,GAAGc,UAAU,EACvBb,OAAO,CAAEa,UAAU,CACpB,CAAC;EACF,CAAE,CAAC;EAEH,OAAOX,SAAS;AACjB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iBAAiB,CAChD,kBAAkB,EAClBsG,6BACD,CAAC;AACD;AACA;AACA;AACO,MAAMC,gBAAgB,GAAAnG,OAAA,CAAAmG,gBAAA,GAAGvG,iBAAiB,CAChD,kBAAkB,EAClBwG,6BACD,CAAC;AACD;AACA;AACA;AACO,MAAMC,UAAU,GAAArG,OAAA,CAAAqG,UAAA,GAAGzG,iBAAiB,CAAE,YAAY,EAAE0G,uBAAe,CAAC;AAC3E;AACA;AACA;AACO,MAAMC,aAAa,GAAAvG,OAAA,CAAAuG,aAAA,GAAG3G,iBAAiB,CAC7C,eAAe,EACf4G,0BACD,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_deprecated","_interopRequireDefault","require","_element","_blockEditor","_jsxRuntime","_serverSideRender","deprecateComponent","name","Wrapped","staticsToHoist","Component","forwardRef","props","ref","deprecated","since","alternative","version","jsx","forEach","staticName","deprecateFunction","func","args","RichText","exports","RootRichText","isEmpty","Autocomplete","RootAutocomplete","AlignmentToolbar","RootAlignmentToolbar","BlockAlignmentToolbar","RootBlockAlignmentToolbar","BlockControls","RootBlockControls","BlockEdit","RootBlockEdit","BlockEditorKeyboardShortcuts","RootBlockEditorKeyboardShortcuts","BlockFormatControls","RootBlockFormatControls","BlockIcon","RootBlockIcon","BlockInspector","RootBlockInspector","BlockList","RootBlockList","BlockMover","RootBlockMover","BlockNavigationDropdown","RootBlockNavigationDropdown","BlockSelectionClearer","RootBlockSelectionClearer","BlockSettingsMenu","RootBlockSettingsMenu","BlockTitle","RootBlockTitle","BlockToolbar","RootBlockToolbar","ColorPalette","RootColorPalette","ContrastChecker","RootContrastChecker","CopyHandler","RootCopyHandler","DefaultBlockAppender","RootDefaultBlockAppender","FontSizePicker","RootFontSizePicker","Inserter","RootInserter","InnerBlocks","RootInnerBlocks","InspectorAdvancedControls","RootInspectorAdvancedControls","InspectorControls","RootInspectorControls","PanelColorSettings","RootPanelColorSettings","PlainText","RootPlainText","RichTextShortcut","RootRichTextShortcut","RichTextToolbarButton","RootRichTextToolbarButton","__unstableRichTextInputEvent","__unstableRootRichTextInputEvent","MediaPlaceholder","RootMediaPlaceholder","MediaUpload","RootMediaUpload","MediaUploadCheck","RootMediaUploadCheck","MultiSelectScrollIntoView","RootMultiSelectScrollIntoView","NavigableToolbar","RootNavigableToolbar","ObserveTyping","RootObserveTyping","SkipToSelectedBlock","RootSkipToSelectedBlock","URLInput","RootURLInput","URLInputButton","RootURLInputButton","URLPopover","RootURLPopover","Warning","RootWarning","WritingFlow","RootWritingFlow","createCustomColorsHOC","rootCreateCustomColorsHOC","getColorClassName","rootGetColorClassName","getColorObjectByAttributeValues","rootGetColorObjectByAttributeValues","getColorObjectByColorValue","rootGetColorObjectByColorValue","getFontSize","rootGetFontSize","getFontSizeClass","rootGetFontSizeClass","withColorContext","rootWithColorContext","withColors","rootWithColors","withFontSizes","rootWithFontSizes"],"sources":["@wordpress/editor/src/components/deprecated.js"],"sourcesContent":["// Block Creation Components.\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\tAutocomplete as RootAutocomplete,\n\tAlignmentToolbar as RootAlignmentToolbar,\n\tBlockAlignmentToolbar as RootBlockAlignmentToolbar,\n\tBlockControls as RootBlockControls,\n\tBlockEdit as RootBlockEdit,\n\tBlockEditorKeyboardShortcuts as RootBlockEditorKeyboardShortcuts,\n\tBlockFormatControls as RootBlockFormatControls,\n\tBlockIcon as RootBlockIcon,\n\tBlockInspector as RootBlockInspector,\n\tBlockList as RootBlockList,\n\tBlockMover as RootBlockMover,\n\tBlockNavigationDropdown as RootBlockNavigationDropdown,\n\tBlockSelectionClearer as RootBlockSelectionClearer,\n\tBlockSettingsMenu as RootBlockSettingsMenu,\n\tBlockTitle as RootBlockTitle,\n\tBlockToolbar as RootBlockToolbar,\n\tColorPalette as RootColorPalette,\n\tContrastChecker as RootContrastChecker,\n\tCopyHandler as RootCopyHandler,\n\tcreateCustomColorsHOC as rootCreateCustomColorsHOC,\n\tDefaultBlockAppender as RootDefaultBlockAppender,\n\tFontSizePicker as RootFontSizePicker,\n\tgetColorClassName as rootGetColorClassName,\n\tgetColorObjectByAttributeValues as rootGetColorObjectByAttributeValues,\n\tgetColorObjectByColorValue as rootGetColorObjectByColorValue,\n\tgetFontSize as rootGetFontSize,\n\tgetFontSizeClass as rootGetFontSizeClass,\n\tInserter as RootInserter,\n\tInnerBlocks as RootInnerBlocks,\n\tInspectorAdvancedControls as RootInspectorAdvancedControls,\n\tInspectorControls as RootInspectorControls,\n\tPanelColorSettings as RootPanelColorSettings,\n\tPlainText as RootPlainText,\n\tRichText as RootRichText,\n\tRichTextShortcut as RootRichTextShortcut,\n\tRichTextToolbarButton as RootRichTextToolbarButton,\n\t__unstableRichTextInputEvent as __unstableRootRichTextInputEvent,\n\tMediaPlaceholder as RootMediaPlaceholder,\n\tMediaUpload as RootMediaUpload,\n\tMediaUploadCheck as RootMediaUploadCheck,\n\tMultiSelectScrollIntoView as RootMultiSelectScrollIntoView,\n\tNavigableToolbar as RootNavigableToolbar,\n\tObserveTyping as RootObserveTyping,\n\tSkipToSelectedBlock as RootSkipToSelectedBlock,\n\tURLInput as RootURLInput,\n\tURLInputButton as RootURLInputButton,\n\tURLPopover as RootURLPopover,\n\tWarning as RootWarning,\n\tWritingFlow as RootWritingFlow,\n\twithColorContext as rootWithColorContext,\n\twithColors as rootWithColors,\n\twithFontSizes as rootWithFontSizes,\n} from '@wordpress/block-editor';\n\nexport { default as ServerSideRender } from '@wordpress/server-side-render';\n\nfunction deprecateComponent( name, Wrapped, staticsToHoist = [] ) {\n\tconst Component = forwardRef( ( props, ref ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn <Wrapped ref={ ref } { ...props } />;\n\t} );\n\n\tstaticsToHoist.forEach( ( staticName ) => {\n\t\tComponent[ staticName ] = deprecateComponent(\n\t\t\tname + '.' + staticName,\n\t\t\tWrapped[ staticName ]\n\t\t);\n\t} );\n\n\treturn Component;\n}\n\nfunction deprecateFunction( name, func ) {\n\treturn ( ...args ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn func( ...args );\n\t};\n}\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichText` instead.\n */\nconst RichText = deprecateComponent( 'RichText', RootRichText, [ 'Content' ] );\nRichText.isEmpty = deprecateFunction(\n\t'RichText.isEmpty',\n\tRootRichText.isEmpty\n);\n\nexport { RichText };\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Autocomplete` instead.\n */\nexport const Autocomplete = deprecateComponent(\n\t'Autocomplete',\n\tRootAutocomplete\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.AlignmentToolbar` instead.\n */\nexport const AlignmentToolbar = deprecateComponent(\n\t'AlignmentToolbar',\n\tRootAlignmentToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockAlignmentToolbar` instead.\n */\nexport const BlockAlignmentToolbar = deprecateComponent(\n\t'BlockAlignmentToolbar',\n\tRootBlockAlignmentToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockControls` instead.\n */\nexport const BlockControls = deprecateComponent(\n\t'BlockControls',\n\tRootBlockControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockEdit` instead.\n */\nexport const BlockEdit = deprecateComponent( 'BlockEdit', RootBlockEdit );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockEditorKeyboardShortcuts` instead.\n */\nexport const BlockEditorKeyboardShortcuts = deprecateComponent(\n\t'BlockEditorKeyboardShortcuts',\n\tRootBlockEditorKeyboardShortcuts\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockFormatControls` instead.\n */\nexport const BlockFormatControls = deprecateComponent(\n\t'BlockFormatControls',\n\tRootBlockFormatControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockIcon` instead.\n */\nexport const BlockIcon = deprecateComponent( 'BlockIcon', RootBlockIcon );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockInspector` instead.\n */\nexport const BlockInspector = deprecateComponent(\n\t'BlockInspector',\n\tRootBlockInspector\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockList` instead.\n */\nexport const BlockList = deprecateComponent( 'BlockList', RootBlockList );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockMover` instead.\n */\nexport const BlockMover = deprecateComponent( 'BlockMover', RootBlockMover );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockNavigationDropdown` instead.\n */\nexport const BlockNavigationDropdown = deprecateComponent(\n\t'BlockNavigationDropdown',\n\tRootBlockNavigationDropdown\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockSelectionClearer` instead.\n */\nexport const BlockSelectionClearer = deprecateComponent(\n\t'BlockSelectionClearer',\n\tRootBlockSelectionClearer\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockSettingsMenu` instead.\n */\nexport const BlockSettingsMenu = deprecateComponent(\n\t'BlockSettingsMenu',\n\tRootBlockSettingsMenu\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockTitle` instead.\n */\nexport const BlockTitle = deprecateComponent( 'BlockTitle', RootBlockTitle );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockToolbar` instead.\n */\nexport const BlockToolbar = deprecateComponent(\n\t'BlockToolbar',\n\tRootBlockToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ColorPalette` instead.\n */\nexport const ColorPalette = deprecateComponent(\n\t'ColorPalette',\n\tRootColorPalette\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ContrastChecker` instead.\n */\nexport const ContrastChecker = deprecateComponent(\n\t'ContrastChecker',\n\tRootContrastChecker\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.CopyHandler` instead.\n */\nexport const CopyHandler = deprecateComponent( 'CopyHandler', RootCopyHandler );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.DefaultBlockAppender` instead.\n */\nexport const DefaultBlockAppender = deprecateComponent(\n\t'DefaultBlockAppender',\n\tRootDefaultBlockAppender\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.FontSizePicker` instead.\n */\nexport const FontSizePicker = deprecateComponent(\n\t'FontSizePicker',\n\tRootFontSizePicker\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Inserter` instead.\n */\nexport const Inserter = deprecateComponent( 'Inserter', RootInserter );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InnerBlocks` instead.\n */\nexport const InnerBlocks = deprecateComponent( 'InnerBlocks', RootInnerBlocks, [\n\t'ButtonBlockAppender',\n\t'DefaultBlockAppender',\n\t'Content',\n] );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InspectorAdvancedControls` instead.\n */\nexport const InspectorAdvancedControls = deprecateComponent(\n\t'InspectorAdvancedControls',\n\tRootInspectorAdvancedControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InspectorControls` instead.\n */\nexport const InspectorControls = deprecateComponent(\n\t'InspectorControls',\n\tRootInspectorControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.PanelColorSettings` instead.\n */\nexport const PanelColorSettings = deprecateComponent(\n\t'PanelColorSettings',\n\tRootPanelColorSettings\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.PlainText` instead.\n */\nexport const PlainText = deprecateComponent( 'PlainText', RootPlainText );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichTextShortcut` instead.\n */\nexport const RichTextShortcut = deprecateComponent(\n\t'RichTextShortcut',\n\tRootRichTextShortcut\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichTextToolbarButton` instead.\n */\nexport const RichTextToolbarButton = deprecateComponent(\n\t'RichTextToolbarButton',\n\tRootRichTextToolbarButton\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.__unstableRichTextInputEvent` instead.\n */\nexport const __unstableRichTextInputEvent = deprecateComponent(\n\t'__unstableRichTextInputEvent',\n\t__unstableRootRichTextInputEvent\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaPlaceholder` instead.\n */\nexport const MediaPlaceholder = deprecateComponent(\n\t'MediaPlaceholder',\n\tRootMediaPlaceholder\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaUpload` instead.\n */\nexport const MediaUpload = deprecateComponent( 'MediaUpload', RootMediaUpload );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaUploadCheck` instead.\n */\nexport const MediaUploadCheck = deprecateComponent(\n\t'MediaUploadCheck',\n\tRootMediaUploadCheck\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MultiSelectScrollIntoView` instead.\n */\nexport const MultiSelectScrollIntoView = deprecateComponent(\n\t'MultiSelectScrollIntoView',\n\tRootMultiSelectScrollIntoView\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.NavigableToolbar` instead.\n */\nexport const NavigableToolbar = deprecateComponent(\n\t'NavigableToolbar',\n\tRootNavigableToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ObserveTyping` instead.\n */\nexport const ObserveTyping = deprecateComponent(\n\t'ObserveTyping',\n\tRootObserveTyping\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.SkipToSelectedBlock` instead.\n */\nexport const SkipToSelectedBlock = deprecateComponent(\n\t'SkipToSelectedBlock',\n\tRootSkipToSelectedBlock\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLInput` instead.\n */\nexport const URLInput = deprecateComponent( 'URLInput', RootURLInput );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLInputButton` instead.\n */\nexport const URLInputButton = deprecateComponent(\n\t'URLInputButton',\n\tRootURLInputButton\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLPopover` instead.\n */\nexport const URLPopover = deprecateComponent( 'URLPopover', RootURLPopover );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Warning` instead.\n */\nexport const Warning = deprecateComponent( 'Warning', RootWarning );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.WritingFlow` instead.\n */\nexport const WritingFlow = deprecateComponent( 'WritingFlow', RootWritingFlow );\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.\n */\nexport const createCustomColorsHOC = deprecateFunction(\n\t'createCustomColorsHOC',\n\trootCreateCustomColorsHOC\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorClassName` instead.\n */\nexport const getColorClassName = deprecateFunction(\n\t'getColorClassName',\n\trootGetColorClassName\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorObjectByAttributeValues` instead.\n */\nexport const getColorObjectByAttributeValues = deprecateFunction(\n\t'getColorObjectByAttributeValues',\n\trootGetColorObjectByAttributeValues\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorObjectByColorValue` instead.\n */\nexport const getColorObjectByColorValue = deprecateFunction(\n\t'getColorObjectByColorValue',\n\trootGetColorObjectByColorValue\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getFontSize` instead.\n */\nexport const getFontSize = deprecateFunction( 'getFontSize', rootGetFontSize );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getFontSizeClass` instead.\n */\nexport const getFontSizeClass = deprecateFunction(\n\t'getFontSizeClass',\n\trootGetFontSizeClass\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.\n */\nexport const withColorContext = deprecateFunction(\n\t'withColorContext',\n\trootWithColorContext\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.withColors` instead.\n */\nexport const withColors = deprecateFunction( 'withColors', rootWithColors );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.withFontSizes` instead.\n */\nexport const withFontSizes = deprecateFunction(\n\t'withFontSizes',\n\trootWithFontSizes\n);\n"],"mappings":";;;;;;;;;;;;;;AAIA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAqDiC,IAAAG,WAAA,GAAAH,OAAA;AAEjC,IAAAI,iBAAA,GAAAL,sBAAA,CAAAC,OAAA;AA7DA;AACA;AACA;AACA;;AA4DA,SAASK,kBAAkBA,CAAEC,IAAI,EAAEC,OAAO,EAAEC,cAAc,GAAG,EAAE,EAAG;EACjE,MAAMC,SAAS,GAAG,IAAAC,mBAAU,EAAE,CAAEC,KAAK,EAAEC,GAAG,KAAM;IAC/C,IAAAC,mBAAU,EAAE,YAAY,GAAGP,IAAI,EAAE;MAChCQ,KAAK,EAAE,KAAK;MACZC,WAAW,EAAE,iBAAiB,GAAGT,IAAI;MACrCU,OAAO,EAAE;IACV,CAAE,CAAC;IAEH,oBAAO,IAAAb,WAAA,CAAAc,GAAA,EAACV,OAAO;MAACK,GAAG,EAAGA,GAAK;MAAA,GAAMD;IAAK,CAAI,CAAC;EAC5C,CAAE,CAAC;EAEHH,cAAc,CAACU,OAAO,CAAIC,UAAU,IAAM;IACzCV,SAAS,CAAEU,UAAU,CAAE,GAAGd,kBAAkB,CAC3CC,IAAI,GAAG,GAAG,GAAGa,UAAU,EACvBZ,OAAO,CAAEY,UAAU,CACpB,CAAC;EACF,CAAE,CAAC;EAEH,OAAOV,SAAS;AACjB;AAEA,SAASW,iBAAiBA,CAAEd,IAAI,EAAEe,IAAI,EAAG;EACxC,OAAO,CAAE,GAAGC,IAAI,KAAM;IACrB,IAAAT,mBAAU,EAAE,YAAY,GAAGP,IAAI,EAAE;MAChCQ,KAAK,EAAE,KAAK;MACZC,WAAW,EAAE,iBAAiB,GAAGT,IAAI;MACrCU,OAAO,EAAE;IACV,C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YAAY,EAAE0G,uBAAe,CAAC;AAC3E;AACA;AACA;AACO,MAAMC,aAAa,GAAAvG,OAAA,CAAAuG,aAAA,GAAG3G,iBAAiB,CAC7C,eAAe,EACf4G,0BACD,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = DocumentBar;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
9
|
var _i18n = require("@wordpress/i18n");
|
|
11
10
|
var _data = require("@wordpress/data");
|
|
@@ -17,8 +16,11 @@ var _coreData = require("@wordpress/core-data");
|
|
|
17
16
|
var _commands = require("@wordpress/commands");
|
|
18
17
|
var _element = require("@wordpress/element");
|
|
19
18
|
var _compose = require("@wordpress/compose");
|
|
19
|
+
var _htmlEntities = require("@wordpress/html-entities");
|
|
20
|
+
var _constants = require("../../store/constants");
|
|
20
21
|
var _store = require("../../store");
|
|
21
22
|
var _lockUnlock = require("../../lock-unlock");
|
|
23
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
24
|
/**
|
|
23
25
|
* External dependencies
|
|
24
26
|
*/
|
|
@@ -41,14 +43,26 @@ const TYPE_LABELS = {
|
|
|
41
43
|
// translators: 1: Template part title.
|
|
42
44
|
wp_template_part: (0, _i18n.__)('Editing template part: %s')
|
|
43
45
|
};
|
|
44
|
-
const TEMPLATE_POST_TYPES = ['wp_template', 'wp_template_part'];
|
|
45
|
-
const GLOBAL_POST_TYPES = [...TEMPLATE_POST_TYPES, 'wp_block', 'wp_navigation'];
|
|
46
46
|
const MotionButton = (0, _components.__unstableMotion)(_components.Button);
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* This component renders a navigation bar at the top of the editor. It displays the title of the current document,
|
|
50
|
+
* a back button (if applicable), and a command center button. It also handles different states of the document,
|
|
51
|
+
* such as "not found" or "unsynced".
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```jsx
|
|
55
|
+
* <DocumentBar />
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @return {JSX.Element} The rendered DocumentBar component.
|
|
59
|
+
*/
|
|
47
60
|
function DocumentBar() {
|
|
48
61
|
const {
|
|
49
62
|
postType,
|
|
50
|
-
|
|
51
|
-
|
|
63
|
+
documentTitle,
|
|
64
|
+
isNotFound,
|
|
65
|
+
isUnsyncedPattern,
|
|
52
66
|
templateIcon,
|
|
53
67
|
templateTitle,
|
|
54
68
|
onNavigateToPreviousEntityRecord
|
|
@@ -69,8 +83,9 @@ function DocumentBar() {
|
|
|
69
83
|
const _templateInfo = getTemplateInfo(_document);
|
|
70
84
|
return {
|
|
71
85
|
postType: _postType,
|
|
72
|
-
|
|
73
|
-
|
|
86
|
+
documentTitle: _document.title,
|
|
87
|
+
isNotFound: !_document && !isResolvingSelector('getEditedEntityRecord', 'postType', _postType, _postId),
|
|
88
|
+
isUnsyncedPattern: _document?.wp_pattern_sync_status === 'unsynced',
|
|
74
89
|
templateIcon: (0, _lockUnlock.unlock)(select(_store.store)).getPostIcon(_postType, {
|
|
75
90
|
area: _document?.area
|
|
76
91
|
}),
|
|
@@ -82,75 +97,84 @@ function DocumentBar() {
|
|
|
82
97
|
open: openCommandCenter
|
|
83
98
|
} = (0, _data.useDispatch)(_commands.store);
|
|
84
99
|
const isReducedMotion = (0, _compose.useReducedMotion)();
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
const isGlobalEntity = GLOBAL_POST_TYPES.includes(postType);
|
|
100
|
+
const isTemplate = _constants.TEMPLATE_POST_TYPES.includes(postType);
|
|
101
|
+
const isGlobalEntity = _constants.GLOBAL_POST_TYPES.includes(postType);
|
|
88
102
|
const hasBackButton = !!onNavigateToPreviousEntityRecord;
|
|
89
|
-
const title = isTemplate ? templateTitle :
|
|
103
|
+
const title = isTemplate ? templateTitle : documentTitle;
|
|
90
104
|
const mounted = (0, _element.useRef)(false);
|
|
91
105
|
(0, _element.useEffect)(() => {
|
|
92
106
|
mounted.current = true;
|
|
93
107
|
}, []);
|
|
94
|
-
return (0,
|
|
108
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
95
109
|
className: (0, _clsx.default)('editor-document-bar', {
|
|
96
110
|
'has-back-button': hasBackButton,
|
|
97
|
-
'is-global': isGlobalEntity
|
|
98
|
-
})
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
111
|
+
'is-global': isGlobalEntity && !isUnsyncedPattern
|
|
112
|
+
}),
|
|
113
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__unstableAnimatePresence, {
|
|
114
|
+
children: hasBackButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(MotionButton, {
|
|
115
|
+
className: "editor-document-bar__back",
|
|
116
|
+
icon: (0, _i18n.isRTL)() ? _icons.chevronRightSmall : _icons.chevronLeftSmall,
|
|
117
|
+
onClick: event => {
|
|
118
|
+
event.stopPropagation();
|
|
119
|
+
onNavigateToPreviousEntityRecord();
|
|
120
|
+
},
|
|
121
|
+
size: "compact",
|
|
122
|
+
initial: mounted.current ? {
|
|
123
|
+
opacity: 0,
|
|
124
|
+
transform: 'translateX(15%)'
|
|
125
|
+
} : false // Don't show entry animation when DocumentBar mounts.
|
|
126
|
+
,
|
|
127
|
+
animate: {
|
|
128
|
+
opacity: 1,
|
|
129
|
+
transform: 'translateX(0%)'
|
|
130
|
+
},
|
|
131
|
+
exit: {
|
|
132
|
+
opacity: 0,
|
|
133
|
+
transform: 'translateX(15%)'
|
|
134
|
+
},
|
|
135
|
+
transition: isReducedMotion ? {
|
|
136
|
+
duration: 0
|
|
137
|
+
} : undefined,
|
|
138
|
+
children: (0, _i18n.__)('Back')
|
|
139
|
+
})
|
|
140
|
+
}), isNotFound ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalText, {
|
|
141
|
+
children: (0, _i18n.__)('Document not found')
|
|
142
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Button, {
|
|
143
|
+
className: "editor-document-bar__command",
|
|
144
|
+
onClick: () => openCommandCenter(),
|
|
145
|
+
size: "compact",
|
|
146
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__unstableMotion.div, {
|
|
147
|
+
className: "editor-document-bar__title"
|
|
148
|
+
// Force entry animation when the back button is added or removed.
|
|
149
|
+
,
|
|
150
|
+
|
|
151
|
+
initial: mounted.current ? {
|
|
152
|
+
opacity: 0,
|
|
153
|
+
transform: hasBackButton ? 'translateX(15%)' : 'translateX(-15%)'
|
|
154
|
+
} : false // Don't show entry animation when DocumentBar mounts.
|
|
155
|
+
,
|
|
156
|
+
animate: {
|
|
157
|
+
opacity: 1,
|
|
158
|
+
transform: 'translateX(0%)'
|
|
159
|
+
},
|
|
160
|
+
transition: isReducedMotion ? {
|
|
161
|
+
duration: 0
|
|
162
|
+
} : undefined,
|
|
163
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BlockIcon, {
|
|
164
|
+
icon: templateIcon
|
|
165
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalText, {
|
|
166
|
+
size: "body",
|
|
167
|
+
as: "h1",
|
|
168
|
+
"aria-label": TYPE_LABELS[postType] ?
|
|
169
|
+
// eslint-disable-next-line @wordpress/valid-sprintf
|
|
170
|
+
(0, _i18n.sprintf)(TYPE_LABELS[postType], title) : undefined,
|
|
171
|
+
children: title ? (0, _htmlEntities.decodeEntities)(title) : (0, _i18n.__)('No Title')
|
|
172
|
+
})]
|
|
173
|
+
}, hasBackButton), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
174
|
+
className: "editor-document-bar__shortcut",
|
|
175
|
+
children: _keycodes.displayShortcut.primary('k')
|
|
176
|
+
})]
|
|
177
|
+
})]
|
|
178
|
+
});
|
|
155
179
|
}
|
|
156
180
|
//# sourceMappingURL=index.js.map
|