@wordpress/edit-site 5.31.0 → 5.33.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 +4 -0
- package/build/components/add-new-page/index.js.map +1 -1
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/index.js +282 -13
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/utils.js +22 -11
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js.map +1 -1
- package/build/components/async/index.js +51 -0
- package/build/components/async/index.js.map +1 -0
- package/build/components/block-editor/block-inspector-button.js +10 -9
- package/build/components/block-editor/block-inspector-button.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +23 -7
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build/components/block-editor/resizable-editor.js.map +1 -1
- package/build/components/block-editor/resize-handle.js.map +1 -1
- package/build/components/block-editor/site-editor-canvas.js +20 -5
- package/build/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/canvas-loader/index.js.map +1 -1
- package/build/components/code-editor/index.js.map +1 -1
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/editor/index.js +47 -11
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +1 -2
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/error-boundary/warning.js.map +1 -1
- package/build/components/global-styles/background-panel.js +50 -0
- package/build/components/global-styles/background-panel.js.map +1 -0
- package/build/components/global-styles/block-preview-panel.js +6 -1
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/font-families.js +2 -2
- package/build/components/global-styles/font-families.js.map +1 -1
- package/build/components/global-styles/font-family-item.js.map +1 -1
- package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
- package/build/components/global-styles/font-library-modal/context.js +88 -31
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +11 -4
- package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
- package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
- package/build/components/global-styles/font-library-modal/index.js +1 -1
- package/build/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +10 -9
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
- package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
- package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
- package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/index.js +20 -2
- package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
- package/build/components/global-styles/global-styles-provider.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/highlighted-colors.js +1 -1
- package/build/components/global-styles/highlighted-colors.js.map +1 -1
- package/build/components/global-styles/hooks.js +11 -3
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js +3 -1
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preview-colors.js +2 -2
- package/build/components/global-styles/preview-colors.js.map +1 -1
- package/build/components/global-styles/preview-iframe.js.map +1 -1
- package/build/components/global-styles/preview-styles.js.map +1 -1
- package/build/components/global-styles/root-menu.js +8 -2
- package/build/components/global-styles/root-menu.js.map +1 -1
- package/build/components/global-styles/screen-background.js +34 -0
- package/build/components/global-styles/screen-background.js.map +1 -0
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-color-palette.js +2 -2
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +6 -4
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +1 -1
- package/build/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +3 -37
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +6 -6
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +5 -2
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/subtitle.js.map +1 -1
- package/build/components/global-styles/typography-elements.js.map +1 -1
- package/build/components/global-styles/typography-example.js.map +1 -1
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-preview.js.map +1 -1
- package/build/components/global-styles/ui.js +5 -2
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/global-styles/variations/variation.js.map +1 -1
- package/build/components/global-styles/variations/variations-color.js +10 -3
- package/build/components/global-styles/variations/variations-color.js.map +1 -1
- package/build/components/global-styles/variations/variations-panel.js.map +1 -1
- package/build/components/global-styles/variations/variations-typography.js +9 -2
- package/build/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/header-edit-mode/document-tools/index.js.map +1 -1
- package/build/components/header-edit-mode/index.js +4 -4
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/index.js +10 -12
- package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/edit-mode.js +0 -23
- package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build/components/keyboard-shortcuts/global.js.map +1 -1
- package/build/components/keyboard-shortcuts/register.js +0 -18
- package/build/components/keyboard-shortcuts/register.js.map +1 -1
- package/build/components/layout/animation.js +130 -0
- package/build/components/layout/animation.js.map +1 -0
- package/build/components/layout/hooks.js.map +1 -1
- package/build/components/layout/index.js +21 -64
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/router.js +92 -23
- package/build/components/layout/router.js.map +1 -1
- package/build/components/media/index.js.map +1 -1
- package/build/components/page/header.js.map +1 -1
- package/build/components/page/index.js +5 -2
- package/build/components/page/index.js.map +1 -1
- package/build/components/page-pages/index.js +33 -33
- package/build/components/page-pages/index.js.map +1 -1
- package/build/components/page-patterns/dataviews-pattern-actions.js +5 -4
- package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
- package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
- package/build/components/page-patterns/header.js +2 -2
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/index.js +136 -39
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build/components/page-patterns/search-items.js +18 -59
- package/build/components/page-patterns/search-items.js.map +1 -1
- package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +5 -10
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-patterns/utils.js.map +1 -1
- package/build/components/page-templates-template-parts/add-new-template-part.js +2 -1
- package/build/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
- package/build/components/page-templates-template-parts/hooks.js.map +1 -1
- package/build/components/page-templates-template-parts/index.js +35 -80
- package/build/components/page-templates-template-parts/index.js.map +1 -1
- package/build/components/pagination/index.js.map +1 -1
- package/build/components/pattern-modal/duplicate.js +6 -3
- package/build/components/pattern-modal/duplicate.js.map +1 -1
- package/build/components/pattern-modal/index.js.map +1 -1
- package/build/components/pattern-modal/rename.js +6 -3
- package/build/components/pattern-modal/rename.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js +12 -1
- package/build/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +18 -16
- package/build/components/rename-post-menu-item/index.js.map +1 -0
- package/build/components/resizable-frame/index.js +1 -5
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/routes/link.js.map +1 -1
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/save-button/index.js +45 -16
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +8 -112
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-panel/index.js +3 -3
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar/index.js +41 -79
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-button/index.js.map +1 -1
- package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build/components/sidebar-dataviews/default-views.js +2 -2
- package/build/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +2 -2
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/default-sidebar.js +18 -7
- package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +30 -56
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/index.js +26 -15
- package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-content.js +7 -5
- package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js +2 -2
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build/components/sidebar-edit-mode/settings-header/index.js +4 -5
- package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/index.js +11 -17
- package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-item/index.js +31 -0
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +36 -9
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +5 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +11 -7
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +6 -15
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/index.js +22 -12
- package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/index.js +14 -5
- package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +34 -32
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/index.js +10 -7
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/site-hub/index.js +22 -21
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/site-icon/index.js.map +1 -1
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/style-book/index.js +1 -1
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -7
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build/components/table/index.js.map +1 -1
- package/build/components/template-actions/index.js +7 -8
- package/build/components/template-actions/index.js.map +1 -1
- package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build/components/template-part-converter/index.js.map +1 -1
- package/build/components/use-edited-entity-record/index.js.map +1 -1
- package/build/components/welcome-guide/editor.js.map +1 -1
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/page.js.map +1 -1
- package/build/components/welcome-guide/styles.js +6 -3
- package/build/components/welcome-guide/styles.js.map +1 -1
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/commands/use-edit-mode-commands.js +10 -28
- package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build/hooks/components.js.map +1 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +3 -40
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -1
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build/index.js +3 -8
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/store/actions.js +21 -96
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +1 -1
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +1 -85
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +1 -9
- package/build/store/selectors.js.map +1 -1
- package/build/utils/clone-deep.js.map +1 -1
- package/build/utils/constants.js +2 -1
- package/build/utils/constants.js.map +1 -1
- package/build/utils/get-is-list-page.js.map +1 -1
- package/build/utils/is-previewing-theme.js.map +1 -1
- package/build/utils/is-template-removable.js.map +1 -1
- package/build/utils/is-template-revertable.js.map +1 -1
- package/build/utils/math.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/utils/template-part-create.js.map +1 -1
- package/build/utils/use-activate-theme.js.map +1 -1
- package/build/utils/use-actual-current-theme.js.map +1 -1
- package/build-module/components/add-new-page/index.js.map +1 -1
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/index.js +283 -14
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +21 -11
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/async/index.js +44 -0
- package/build-module/components/async/index.js.map +1 -0
- package/build-module/components/block-editor/block-inspector-button.js +9 -8
- package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +24 -8
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build-module/components/block-editor/resizable-editor.js.map +1 -1
- package/build-module/components/block-editor/resize-handle.js.map +1 -1
- package/build-module/components/block-editor/site-editor-canvas.js +20 -5
- package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/canvas-loader/index.js.map +1 -1
- package/build-module/components/code-editor/index.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/editor/index.js +48 -12
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js +1 -2
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/error-boundary/warning.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +44 -0
- package/build-module/components/global-styles/background-panel.js.map +1 -0
- package/build-module/components/global-styles/block-preview-panel.js +6 -1
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/font-families.js +1 -1
- package/build-module/components/global-styles/font-families.js.map +1 -1
- package/build-module/components/global-styles/font-family-item.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +87 -31
- package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-collection.js +12 -5
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/index.js +2 -2
- package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +11 -10
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/index.js +20 -2
- package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
- package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/highlighted-colors.js +1 -1
- package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +11 -3
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/navigation-button.js.map +1 -1
- package/build-module/components/global-styles/palette.js +3 -1
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preview-colors.js +2 -2
- package/build-module/components/global-styles/preview-colors.js.map +1 -1
- package/build-module/components/global-styles/preview-iframe.js.map +1 -1
- package/build-module/components/global-styles/preview-styles.js.map +1 -1
- package/build-module/components/global-styles/root-menu.js +9 -3
- package/build-module/components/global-styles/root-menu.js.map +1 -1
- package/build-module/components/global-styles/screen-background.js +26 -0
- package/build-module/components/global-styles/screen-background.js.map +1 -0
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-color-palette.js +2 -2
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +6 -4
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +4 -38
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +6 -6
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +5 -2
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/subtitle.js.map +1 -1
- package/build-module/components/global-styles/typography-elements.js.map +1 -1
- package/build-module/components/global-styles/typography-example.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-preview.js.map +1 -1
- package/build-module/components/global-styles/ui.js +4 -1
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/global-styles/variations/variation.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-color.js +10 -3
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-typography.js +9 -2
- package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -1
- package/build-module/components/header-edit-mode/index.js +3 -3
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/index.js +8 -8
- package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -23
- package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/register.js +0 -18
- package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
- package/build-module/components/layout/animation.js +123 -0
- package/build-module/components/layout/animation.js.map +1 -0
- package/build-module/components/layout/hooks.js.map +1 -1
- package/build-module/components/layout/index.js +21 -64
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/router.js +92 -23
- package/build-module/components/layout/router.js.map +1 -1
- package/build-module/components/media/index.js.map +1 -1
- package/build-module/components/page/header.js.map +1 -1
- package/build-module/components/page/index.js +5 -2
- package/build-module/components/page/index.js.map +1 -1
- package/build-module/components/page-pages/index.js +32 -32
- package/build-module/components/page-pages/index.js.map +1 -1
- package/build-module/components/page-patterns/dataviews-pattern-actions.js +5 -4
- package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
- package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/header.js +2 -2
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/index.js +139 -42
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/search-items.js +17 -57
- package/build-module/components/page-patterns/search-items.js.map +1 -1
- package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +2 -6
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-patterns/utils.js.map +1 -1
- package/build-module/components/page-templates-template-parts/add-new-template-part.js +3 -2
- package/build-module/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
- package/build-module/components/page-templates-template-parts/hooks.js.map +1 -1
- package/build-module/components/page-templates-template-parts/index.js +36 -81
- package/build-module/components/page-templates-template-parts/index.js.map +1 -1
- package/build-module/components/pagination/index.js.map +1 -1
- package/build-module/components/pattern-modal/duplicate.js +4 -1
- package/build-module/components/pattern-modal/duplicate.js.map +1 -1
- package/build-module/components/pattern-modal/index.js.map +1 -1
- package/build-module/components/pattern-modal/rename.js +4 -1
- package/build-module/components/pattern-modal/rename.js.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js +12 -1
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build-module/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +17 -15
- package/build-module/components/rename-post-menu-item/index.js.map +1 -0
- package/build-module/components/resizable-frame/index.js +1 -5
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/components/routes/link.js.map +1 -1
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/save-button/index.js +46 -17
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +10 -114
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +2 -2
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +42 -79
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-button/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js +2 -2
- package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +2 -2
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/default-sidebar.js +16 -5
- package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +29 -55
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/index.js +29 -18
- package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +7 -5
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +4 -4
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/settings-header/index.js +4 -5
- package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/index.js +12 -18
- package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-item/index.js +31 -0
- package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +37 -10
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +5 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +12 -8
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +7 -16
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +8 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/index.js +24 -14
- package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/index.js +14 -5
- package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +35 -33
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js +12 -8
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +22 -21
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/site-icon/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/style-book/index.js +1 -1
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -7
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build-module/components/table/index.js.map +1 -1
- package/build-module/components/template-actions/index.js +7 -8
- package/build-module/components/template-actions/index.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build-module/components/template-part-converter/index.js.map +1 -1
- package/build-module/components/use-edited-entity-record/index.js.map +1 -1
- package/build-module/components/welcome-guide/editor.js.map +1 -1
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/page.js.map +1 -1
- package/build-module/components/welcome-guide/styles.js +6 -3
- package/build-module/components/welcome-guide/styles.js.map +1 -1
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/commands/use-edit-mode-commands.js +11 -29
- package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build-module/hooks/components.js.map +1 -1
- package/build-module/hooks/index.js +0 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +1 -38
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build-module/index.js +4 -6
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/store/actions.js +16 -92
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +0 -83
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +1 -9
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/clone-deep.js.map +1 -1
- package/build-module/utils/constants.js +1 -0
- package/build-module/utils/constants.js.map +1 -1
- package/build-module/utils/get-is-list-page.js.map +1 -1
- package/build-module/utils/is-previewing-theme.js.map +1 -1
- package/build-module/utils/is-template-removable.js.map +1 -1
- package/build-module/utils/is-template-revertable.js.map +1 -1
- package/build-module/utils/math.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-module/utils/template-part-create.js.map +1 -1
- package/build-module/utils/use-activate-theme.js.map +1 -1
- package/build-module/utils/use-actual-current-theme.js.map +1 -1
- package/build-style/style-rtl.css +287 -688
- package/build-style/style.css +287 -688
- package/package.json +44 -45
- package/src/components/add-new-template/index.js +412 -12
- package/src/components/add-new-template/style.scss +0 -22
- package/src/components/add-new-template/utils.js +44 -24
- package/src/components/async/index.js +43 -0
- package/src/components/block-editor/block-inspector-button.js +9 -11
- package/src/components/block-editor/editor-canvas.js +59 -23
- package/src/components/block-editor/site-editor-canvas.js +16 -8
- package/src/components/editor/index.js +61 -17
- package/src/components/editor-canvas-container/index.js +0 -1
- package/src/components/global-styles/background-panel.js +50 -0
- package/src/components/global-styles/block-preview-panel.js +6 -1
- package/src/components/global-styles/font-families.js +1 -1
- package/src/components/global-styles/font-library-modal/context.js +104 -50
- package/src/components/global-styles/font-library-modal/font-collection.js +247 -223
- package/src/components/global-styles/font-library-modal/index.js +2 -2
- package/src/components/global-styles/font-library-modal/installed-fonts.js +156 -147
- package/src/components/global-styles/font-library-modal/style.scss +32 -14
- package/src/components/global-styles/font-library-modal/utils/index.js +17 -4
- package/src/components/global-styles/highlighted-colors.js +1 -1
- package/src/components/global-styles/hooks.js +20 -3
- package/src/components/global-styles/palette.js +3 -1
- package/src/components/global-styles/preview-colors.js +2 -2
- package/src/components/global-styles/root-menu.js +12 -1
- package/src/components/global-styles/screen-background.js +29 -0
- package/src/components/global-styles/screen-color-palette.js +2 -2
- package/src/components/global-styles/screen-colors.js +4 -4
- package/src/components/global-styles/screen-revisions/index.js +1 -1
- package/src/components/global-styles/screen-style-variations.js +4 -36
- package/src/components/global-styles/screen-typography.js +6 -9
- package/src/components/global-styles/style-variations-container.js +2 -1
- package/src/components/global-styles/style.scss +14 -12
- package/src/components/global-styles/ui.js +5 -0
- package/src/components/global-styles/variations/style.scss +32 -17
- package/src/components/global-styles/variations/variations-color.js +4 -2
- package/src/components/global-styles/variations/variations-typography.js +4 -1
- package/src/components/header-edit-mode/index.js +3 -5
- package/src/components/header-edit-mode/more-menu/index.js +6 -17
- package/src/components/header-edit-mode/style.scss +29 -18
- package/src/components/keyboard-shortcuts/edit-mode.js +0 -29
- package/src/components/keyboard-shortcuts/register.js +0 -20
- package/src/components/layout/animation.js +125 -0
- package/src/components/layout/index.js +21 -74
- package/src/components/layout/router.js +99 -30
- package/src/components/layout/style.scss +17 -37
- package/src/components/page/index.js +7 -2
- package/src/components/page-pages/index.js +59 -65
- package/src/components/page-pages/style.scss +29 -22
- package/src/components/page-patterns/dataviews-pattern-actions.js +5 -6
- package/src/components/page-patterns/header.js +4 -2
- package/src/components/page-patterns/index.js +182 -78
- package/src/components/page-patterns/search-items.js +16 -58
- package/src/components/page-patterns/style.scss +7 -6
- package/src/components/page-patterns/use-patterns.js +2 -6
- package/src/components/page-templates-template-parts/add-new-template-part.js +4 -2
- package/src/components/page-templates-template-parts/index.js +44 -103
- package/src/components/page-templates-template-parts/style.scss +5 -0
- package/src/components/pattern-modal/duplicate.js +2 -1
- package/src/components/pattern-modal/rename.js +2 -1
- package/src/components/plugin-template-setting-panel/index.js +14 -1
- package/src/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +20 -24
- package/src/components/resizable-frame/index.js +2 -6
- package/src/components/save-button/index.js +55 -26
- package/src/components/save-hub/index.js +20 -164
- package/src/components/save-panel/index.js +2 -2
- package/src/components/sidebar/index.js +52 -105
- package/src/components/sidebar/style.scss +41 -6
- package/src/components/sidebar-dataviews/default-views.js +2 -2
- package/src/components/sidebar-dataviews/index.js +2 -2
- package/src/components/sidebar-edit-mode/default-sidebar.js +13 -6
- package/src/components/sidebar-edit-mode/global-styles-sidebar.js +7 -3
- package/src/components/sidebar-edit-mode/index.js +39 -77
- package/src/components/sidebar-edit-mode/page-panels/index.js +52 -60
- package/src/components/sidebar-edit-mode/page-panels/page-content.js +10 -10
- package/src/components/sidebar-edit-mode/page-panels/page-summary.js +20 -12
- package/src/components/sidebar-edit-mode/page-panels/style.scss +0 -6
- package/src/components/sidebar-edit-mode/settings-header/index.js +4 -5
- package/src/components/sidebar-edit-mode/style.scss +1 -1
- package/src/components/sidebar-edit-mode/template-panel/index.js +24 -34
- package/src/components/sidebar-edit-mode/template-panel/style.scss +1 -29
- package/src/components/sidebar-navigation-item/index.js +29 -0
- package/src/components/sidebar-navigation-screen/index.js +29 -12
- package/src/components/sidebar-navigation-screen/style.scss +13 -30
- package/src/components/sidebar-navigation-screen-details-footer/index.js +6 -2
- package/src/components/sidebar-navigation-screen-global-styles/index.js +9 -24
- package/src/components/sidebar-navigation-screen-main/index.js +11 -23
- package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/index.js +7 -6
- package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +14 -14
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +4 -5
- package/src/components/sidebar-navigation-screen-page/index.js +23 -13
- package/src/components/sidebar-navigation-screen-page/style.scss +8 -2
- package/src/components/sidebar-navigation-screen-pattern/index.js +9 -6
- package/src/components/sidebar-navigation-screen-patterns/index.js +70 -67
- package/src/components/sidebar-navigation-screen-patterns/style.scss +5 -0
- package/src/components/sidebar-navigation-screen-template/index.js +8 -12
- package/src/components/sidebar-navigation-screen-templates-browse/index.js +2 -7
- package/src/components/site-hub/index.js +80 -90
- package/src/components/site-hub/style.scss +14 -34
- package/src/components/style-book/index.js +1 -3
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +52 -37
- package/src/components/template-actions/index.js +8 -11
- package/src/components/welcome-guide/style.scss +1 -1
- package/src/components/welcome-guide/styles.js +6 -5
- package/src/hooks/commands/use-edit-mode-commands.js +12 -33
- package/src/hooks/index.js +0 -1
- package/src/hooks/push-changes-to-global-styles/index.js +1 -40
- package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +4 -0
- package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +5 -1
- package/src/index.js +9 -10
- package/src/store/actions.js +25 -141
- package/src/store/private-actions.js +0 -133
- package/src/store/selectors.js +3 -15
- package/src/store/test/actions.js +7 -2
- package/src/style.scss +0 -3
- package/src/utils/constants.js +1 -0
- package/src/utils/set-nested-value.js +39 -0
- package/build/components/actions/index.js +0 -319
- package/build/components/actions/index.js.map +0 -1
- package/build/components/add-new-template/new-template.js +0 -298
- package/build/components/add-new-template/new-template.js.map +0 -1
- package/build/components/add-new-template/template-actions-loading-screen.js +0 -27
- package/build/components/add-new-template/template-actions-loading-screen.js.map +0 -1
- package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -78
- package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
- package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -71
- package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
- package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -48
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +0 -116
- package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -54
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
- package/build/components/page-actions/index.js +0 -35
- package/build/components/page-actions/index.js.map +0 -1
- package/build/components/page-actions/trash-page-menu-item.js +0 -54
- package/build/components/page-actions/trash-page-menu-item.js.map +0 -1
- package/build/components/page-templates-template-parts/actions.js +0 -194
- package/build/components/page-templates-template-parts/actions.js.map +0 -1
- package/build/components/preferences-modal/index.js +0 -38
- package/build/components/preferences-modal/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/constants.js +0 -9
- package/build/components/sidebar-edit-mode/constants.js.map +0 -1
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -89
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/sidebar-card/index.js +0 -48
- package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js +0 -70
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +0 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js +0 -54
- package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
- package/build/components/sidebar-navigation-screen-pages/index.js +0 -175
- package/build/components/sidebar-navigation-screen-pages/index.js.map +0 -1
- package/build/components/sync-state-with-url/use-sync-path-with-url.js +0 -132
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
- package/build/components/template-actions/rename-menu-item.js.map +0 -1
- package/build/hooks/template-part-edit.js +0 -82
- package/build/hooks/template-part-edit.js.map +0 -1
- package/build/store/utils.js +0 -71
- package/build/store/utils.js.map +0 -1
- package/build-module/components/actions/index.js +0 -308
- package/build-module/components/actions/index.js.map +0 -1
- package/build-module/components/add-new-template/new-template.js +0 -290
- package/build-module/components/add-new-template/new-template.js.map +0 -1
- package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -20
- package/build-module/components/add-new-template/template-actions-loading-screen.js.map +0 -1
- package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
- package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
- package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -65
- package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -40
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -107
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -47
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
- package/build-module/components/page-actions/index.js +0 -27
- package/build-module/components/page-actions/index.js.map +0 -1
- package/build-module/components/page-actions/trash-page-menu-item.js +0 -47
- package/build-module/components/page-actions/trash-page-menu-item.js.map +0 -1
- package/build-module/components/page-templates-template-parts/actions.js +0 -185
- package/build-module/components/page-templates-template-parts/actions.js.map +0 -1
- package/build-module/components/preferences-modal/index.js +0 -30
- package/build-module/components/preferences-modal/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/constants.js +0 -3
- package/build-module/components/sidebar-edit-mode/constants.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -83
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +0 -40
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +0 -63
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +0 -46
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-pages/index.js +0 -167
- package/build-module/components/sidebar-navigation-screen-pages/index.js.map +0 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +0 -124
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
- package/build-module/components/template-actions/rename-menu-item.js.map +0 -1
- package/build-module/hooks/template-part-edit.js +0 -75
- package/build-module/hooks/template-part-edit.js.map +0 -1
- package/build-module/store/utils.js +0 -64
- package/build-module/store/utils.js.map +0 -1
- package/src/components/actions/index.js +0 -409
- package/src/components/add-new-template/new-template.js +0 -429
- package/src/components/add-new-template/template-actions-loading-screen.js +0 -23
- package/src/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
- package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -64
- package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
- package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
- package/src/components/keyboard-shortcut-help-modal/index.js +0 -147
- package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -70
- package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
- package/src/components/page-actions/index.js +0 -30
- package/src/components/page-actions/trash-page-menu-item.js +0 -63
- package/src/components/page-templates-template-parts/actions.js +0 -262
- package/src/components/preferences-modal/index.js +0 -29
- package/src/components/sidebar-edit-mode/constants.js +0 -2
- package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -80
- package/src/components/sidebar-edit-mode/sidebar-card/index.js +0 -53
- package/src/components/sidebar-edit-mode/sidebar-card/style.scss +0 -36
- package/src/components/sidebar-edit-mode/template-panel/template-areas.js +0 -86
- package/src/components/sidebar-navigation-screen-navigation-item/index.js +0 -59
- package/src/components/sidebar-navigation-screen-pages/index.js +0 -238
- package/src/components/sync-state-with-url/use-sync-path-with-url.js +0 -147
- package/src/hooks/template-part-edit.js +0 -89
- package/src/store/test/utils.js +0 -191
- package/src/store/utils.js +0 -69
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","Button","Modal","__experimentalGrid","Grid","__experimentalText","Text","__experimentalVStack","VStack","Flex","Icon","decodeEntities","useState","useSelect","useDispatch","store","coreStore","archive","blockMeta","calendar","category","commentAuthorAvatar","edit","home","layout","list","media","notFound","page","plus","pin","verse","search","tag","__","sprintf","noticesStore","privateApis","routerPrivateApis","TEMPLATE_POST_TYPE","AddCustomTemplateModalContent","useExistingTemplates","useDefaultTemplateTypes","useTaxonomiesMenuItems","usePostTypeMenuItems","useAuthorMenuItem","usePostTypeArchiveMenuItems","AddCustomGenericTemplateModalContent","TemplateActionsLoadingScreen","unlock","useHistory","DEFAULT_TEMPLATE_SLUGS","TEMPLATE_ICONS","single","index","author","taxonomy","date","attachment","TemplateListItem","title","direction","className","description","icon","onClick","children","createElement","label","showTooltip","as","spacing","align","justify","style","width","alignment","weight","lineHeight","modalContentMap","templatesList","customTemplate","customGenericTemplate","NewTemplate","postType","toggleProps","showIcon","showModal","setShowModal","modalContent","setModalContent","entityForSuggestions","setEntityForSuggestions","isCreatingTemplate","setIsCreatingTemplate","history","saveEntityRecord","createErrorNotice","createSuccessNotice","homeUrl","select","getUnstableBase","TEMPLATE_SHORT_DESCRIPTIONS","Date","getFullYear","createTemplate","template","isWPSuggestion","slug","newTemplate","toString","status","is_wp_suggestion","throwOnError","push","postId","id","type","canvas","rendered","error","errorMessage","message","code","onModalClose","missingTemplates","useMissingTemplates","length","Toggle","restToggleProps","modalTitle","labels","singular_name","Fragment","add_new_item","onRequestClose","overlayClassName","undefined","columns","gap","map","key","onSelect","onClose","existingTemplates","defaultTemplateTypes","existingTemplateSlugs","missingDefaultTemplates","filter","includes","onClickMenuItem","_entityForSuggestions","enhancedMissingDefaultTemplateTypes","defaultTaxonomiesMenuItems","taxonomiesMenuItems","defaultPostTypesMenuItems","postTypesMenuItems","authorMenuItem","forEach","menuItem","matchIndex","findIndex","sort","template1","template2","indexOf"],"sources":["@wordpress/edit-site/src/components/add-new-template/new-template.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tModal,\n\t__experimentalGrid as Grid,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n\tFlex,\n\tIcon,\n} from '@wordpress/components';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useState } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tarchive,\n\tblockMeta,\n\tcalendar,\n\tcategory,\n\tcommentAuthorAvatar,\n\tedit,\n\thome,\n\tlayout,\n\tlist,\n\tmedia,\n\tnotFound,\n\tpage,\n\tplus,\n\tpin,\n\tverse,\n\tsearch,\n\ttag,\n} from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\n/**\n * Internal dependencies\n */\nimport AddCustomTemplateModalContent from './add-custom-template-modal-content';\nimport {\n\tuseExistingTemplates,\n\tuseDefaultTemplateTypes,\n\tuseTaxonomiesMenuItems,\n\tusePostTypeMenuItems,\n\tuseAuthorMenuItem,\n\tusePostTypeArchiveMenuItems,\n} from './utils';\nimport AddCustomGenericTemplateModalContent from './add-custom-generic-template-modal-content';\nimport TemplateActionsLoadingScreen from './template-actions-loading-screen';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nconst DEFAULT_TEMPLATE_SLUGS = [\n\t'front-page',\n\t'home',\n\t'single',\n\t'page',\n\t'index',\n\t'archive',\n\t'author',\n\t'category',\n\t'date',\n\t'tag',\n\t'search',\n\t'404',\n];\n\nconst TEMPLATE_ICONS = {\n\t'front-page': home,\n\thome: verse,\n\tsingle: pin,\n\tpage,\n\tarchive,\n\tsearch,\n\t404: notFound,\n\tindex: list,\n\tcategory,\n\tauthor: commentAuthorAvatar,\n\ttaxonomy: blockMeta,\n\tdate: calendar,\n\ttag,\n\tattachment: media,\n};\n\nfunction TemplateListItem( {\n\ttitle,\n\tdirection,\n\tclassName,\n\tdescription,\n\ticon,\n\tonClick,\n\tchildren,\n} ) {\n\treturn (\n\t\t<Button\n\t\t\tclassName={ className }\n\t\t\tonClick={ onClick }\n\t\t\tlabel={ description }\n\t\t\tshowTooltip={ !! description }\n\t\t>\n\t\t\t<Flex\n\t\t\t\tas=\"span\"\n\t\t\t\tspacing={ 2 }\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"center\"\n\t\t\t\tstyle={ { width: '100%' } }\n\t\t\t\tdirection={ direction }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-add-new-template__template-icon\">\n\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t</div>\n\t\t\t\t<VStack\n\t\t\t\t\tclassName=\"edit-site-add-new-template__template-name\"\n\t\t\t\t\talignment=\"center\"\n\t\t\t\t\tspacing={ 0 }\n\t\t\t\t>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tweight={ 500 }\n\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</Text>\n\t\t\t\t\t{ children }\n\t\t\t\t</VStack>\n\t\t\t</Flex>\n\t\t</Button>\n\t);\n}\n\nconst modalContentMap = {\n\ttemplatesList: 1,\n\tcustomTemplate: 2,\n\tcustomGenericTemplate: 3,\n};\n\nexport default function NewTemplate( {\n\tpostType,\n\ttoggleProps,\n\tshowIcon = true,\n} ) {\n\tconst [ showModal, setShowModal ] = useState( false );\n\tconst [ modalContent, setModalContent ] = useState(\n\t\tmodalContentMap.templatesList\n\t);\n\tconst [ entityForSuggestions, setEntityForSuggestions ] = useState( {} );\n\tconst [ isCreatingTemplate, setIsCreatingTemplate ] = useState( false );\n\n\tconst history = useHistory();\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createErrorNotice, createSuccessNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst { homeUrl } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetUnstableBase, // Site index.\n\t\t} = select( coreStore );\n\n\t\treturn {\n\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t};\n\t}, [] );\n\n\tconst TEMPLATE_SHORT_DESCRIPTIONS = {\n\t\t'front-page': homeUrl,\n\t\tdate: sprintf(\n\t\t\t// translators: %s: The homepage url.\n\t\t\t__( 'E.g. %s' ),\n\t\t\thomeUrl + '/' + new Date().getFullYear()\n\t\t),\n\t};\n\n\tasync function createTemplate( template, isWPSuggestion = true ) {\n\t\tif ( isCreatingTemplate ) {\n\t\t\treturn;\n\t\t}\n\t\tsetIsCreatingTemplate( true );\n\t\ttry {\n\t\t\tconst { title, description, slug } = template;\n\t\t\tconst newTemplate = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t{\n\t\t\t\t\tdescription,\n\t\t\t\t\t// Slugs need to be strings, so this is for template `404`\n\t\t\t\t\tslug: slug.toString(),\n\t\t\t\t\tstatus: 'publish',\n\t\t\t\t\ttitle,\n\t\t\t\t\t// This adds a post meta field in template that is part of `is_custom` value calculation.\n\t\t\t\t\tis_wp_suggestion: isWPSuggestion,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\t// Navigate to the created template editor.\n\t\t\thistory.push( {\n\t\t\t\tpostId: newTemplate.id,\n\t\t\t\tpostType: newTemplate.type,\n\t\t\t\tcanvas: 'edit',\n\t\t\t} );\n\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: Title of the created template e.g: \"Category\".\n\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\tdecodeEntities( newTemplate.title?.rendered || title )\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\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: __( 'An error occurred while creating the template.' );\n\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} finally {\n\t\t\tsetIsCreatingTemplate( false );\n\t\t}\n\t}\n\tconst onModalClose = () => {\n\t\tsetShowModal( false );\n\t\tsetModalContent( modalContentMap.templatesList );\n\t};\n\n\tconst missingTemplates = useMissingTemplates( setEntityForSuggestions, () =>\n\t\tsetModalContent( modalContentMap.customTemplate )\n\t);\n\tif ( ! missingTemplates.length ) {\n\t\treturn null;\n\t}\n\tconst { as: Toggle = Button, ...restToggleProps } = toggleProps ?? {};\n\n\tlet modalTitle = __( 'Add template' );\n\tif ( modalContent === modalContentMap.customTemplate ) {\n\t\tmodalTitle = sprintf(\n\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t__( 'Add template: %s' ),\n\t\t\tentityForSuggestions.labels.singular_name\n\t\t);\n\t} else if ( modalContent === modalContentMap.customGenericTemplate ) {\n\t\tmodalTitle = __( 'Create custom template' );\n\t}\n\treturn (\n\t\t<>\n\t\t\t{ isCreatingTemplate && <TemplateActionsLoadingScreen /> }\n\t\t\t<Toggle\n\t\t\t\t{ ...restToggleProps }\n\t\t\t\tonClick={ () => setShowModal( true ) }\n\t\t\t\ticon={ showIcon ? plus : null }\n\t\t\t\tlabel={ postType.labels.add_new_item }\n\t\t\t>\n\t\t\t\t{ showIcon ? null : postType.labels.add_new_item }\n\t\t\t</Toggle>\n\t\t\t{ showModal && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ modalTitle }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-add-new-template__modal',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'edit-site-add-new-template__modal_template_list':\n\t\t\t\t\t\t\t\tmodalContent === modalContentMap.templatesList,\n\t\t\t\t\t\t\t'edit-site-custom-template-modal':\n\t\t\t\t\t\t\t\tmodalContent === modalContentMap.customTemplate,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tonRequestClose={ onModalClose }\n\t\t\t\t\toverlayClassName={\n\t\t\t\t\t\tmodalContent === modalContentMap.customGenericTemplate\n\t\t\t\t\t\t\t? 'edit-site-custom-generic-template__modal'\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ modalContent === modalContentMap.templatesList && (\n\t\t\t\t\t\t<Grid\n\t\t\t\t\t\t\tcolumns={ 3 }\n\t\t\t\t\t\t\tgap={ 4 }\n\t\t\t\t\t\t\talign=\"flex-start\"\n\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\tclassName=\"edit-site-add-new-template__template-list__contents\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Flex className=\"edit-site-add-new-template__template-list__prompt\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Select what the new template should apply to:'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t{ missingTemplates.map( ( template ) => {\n\t\t\t\t\t\t\t\tconst { title, slug, onClick } = template;\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<TemplateListItem\n\t\t\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\t\t\t\t\tdirection=\"column\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-add-new-template__template-button\"\n\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\tTEMPLATE_SHORT_DESCRIPTIONS[ slug ]\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tTEMPLATE_ICONS[ slug ] || layout\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tonClick\n\t\t\t\t\t\t\t\t\t\t\t\t? onClick( template )\n\t\t\t\t\t\t\t\t\t\t\t\t: createTemplate( template )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t<TemplateListItem\n\t\t\t\t\t\t\t\ttitle={ __( 'Custom template' ) }\n\t\t\t\t\t\t\t\tdirection=\"row\"\n\t\t\t\t\t\t\t\tclassName=\"edit-site-add-new-template__custom-template-button\"\n\t\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetModalContent(\n\t\t\t\t\t\t\t\t\t\tmodalContentMap.customGenericTemplate\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'A custom template can be manually applied to any post or page.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</TemplateListItem>\n\t\t\t\t\t\t</Grid>\n\t\t\t\t\t) }\n\t\t\t\t\t{ modalContent === modalContentMap.customTemplate && (\n\t\t\t\t\t\t<AddCustomTemplateModalContent\n\t\t\t\t\t\t\tonSelect={ createTemplate }\n\t\t\t\t\t\t\tentityForSuggestions={ entityForSuggestions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ modalContent ===\n\t\t\t\t\t\tmodalContentMap.customGenericTemplate && (\n\t\t\t\t\t\t<AddCustomGenericTemplateModalContent\n\t\t\t\t\t\t\tonClose={ onModalClose }\n\t\t\t\t\t\t\tcreateTemplate={ createTemplate }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction useMissingTemplates( setEntityForSuggestions, onClick ) {\n\tconst existingTemplates = useExistingTemplates();\n\tconst defaultTemplateTypes = useDefaultTemplateTypes();\n\tconst existingTemplateSlugs = ( existingTemplates || [] ).map(\n\t\t( { slug } ) => slug\n\t);\n\tconst missingDefaultTemplates = ( defaultTemplateTypes || [] ).filter(\n\t\t( template ) =>\n\t\t\tDEFAULT_TEMPLATE_SLUGS.includes( template.slug ) &&\n\t\t\t! existingTemplateSlugs.includes( template.slug )\n\t);\n\tconst onClickMenuItem = ( _entityForSuggestions ) => {\n\t\tonClick?.();\n\t\tsetEntityForSuggestions( _entityForSuggestions );\n\t};\n\t// We need to replace existing default template types with\n\t// the create specific template functionality. The original\n\t// info (title, description, etc.) is preserved in the\n\t// used hooks.\n\tconst enhancedMissingDefaultTemplateTypes = [ ...missingDefaultTemplates ];\n\tconst { defaultTaxonomiesMenuItems, taxonomiesMenuItems } =\n\t\tuseTaxonomiesMenuItems( onClickMenuItem );\n\tconst { defaultPostTypesMenuItems, postTypesMenuItems } =\n\t\tusePostTypeMenuItems( onClickMenuItem );\n\n\tconst authorMenuItem = useAuthorMenuItem( onClickMenuItem );\n\t[\n\t\t...defaultTaxonomiesMenuItems,\n\t\t...defaultPostTypesMenuItems,\n\t\tauthorMenuItem,\n\t].forEach( ( menuItem ) => {\n\t\tif ( ! menuItem ) {\n\t\t\treturn;\n\t\t}\n\t\tconst matchIndex = enhancedMissingDefaultTemplateTypes.findIndex(\n\t\t\t( template ) => template.slug === menuItem.slug\n\t\t);\n\t\t// Some default template types might have been filtered above from\n\t\t// `missingDefaultTemplates` because they only check for the general\n\t\t// template. So here we either replace or append the item, augmented\n\t\t// with the check if it has available specific item to create a\n\t\t// template for.\n\t\tif ( matchIndex > -1 ) {\n\t\t\tenhancedMissingDefaultTemplateTypes[ matchIndex ] = menuItem;\n\t\t} else {\n\t\t\tenhancedMissingDefaultTemplateTypes.push( menuItem );\n\t\t}\n\t} );\n\t// Update the sort order to match the DEFAULT_TEMPLATE_SLUGS order.\n\tenhancedMissingDefaultTemplateTypes?.sort( ( template1, template2 ) => {\n\t\treturn (\n\t\t\tDEFAULT_TEMPLATE_SLUGS.indexOf( template1.slug ) -\n\t\t\tDEFAULT_TEMPLATE_SLUGS.indexOf( template2.slug )\n\t\t);\n\t} );\n\tconst missingTemplates = [\n\t\t...enhancedMissingDefaultTemplateTypes,\n\t\t...usePostTypeArchiveMenuItems(),\n\t\t...postTypesMenuItems,\n\t\t...taxonomiesMenuItems,\n\t];\n\treturn missingTemplates;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU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yB;IAAEC;EAAmB,CAAC,GACtDhH,oBAAoB,CAAE0G,eAAgB,CAAC;EAExC,MAAMO,cAAc,GAAGhH,iBAAiB,CAAEyG,eAAgB,CAAC;EAC3D,CACC,GAAGG,0BAA0B,EAC7B,GAAGE,yBAAyB,EAC5BE,cAAc,CACd,CAACC,OAAO,CAAIC,QAAQ,IAAM;IAC1B,IAAK,CAAEA,QAAQ,EAAG;MACjB;IACD;IACA,MAAMC,UAAU,GAAGR,mCAAmC,CAACS,SAAS,CAC7DvD,QAAQ,IAAMA,QAAQ,CAACE,IAAI,KAAKmD,QAAQ,CAACnD,IAC5C,CAAC;IACD;IACA;IACA;IACA;IACA;IACA,IAAKoD,UAAU,GAAG,CAAC,CAAC,EAAG;MACtBR,mCAAmC,CAAEQ,UAAU,CAAE,GAAGD,QAAQ;IAC7D,CAAC,MAAM;MACNP,mCAAmC,CAACtC,IAAI,CAAE6C,QAAS,CAAC;IACrD;EACD,CAAE,CAAC;EACH;EACAP,mCAAmC,EAAEU,IAAI,CAAE,CAAEC,SAAS,EAAEC,SAAS,KAAM;IACtE,OACCjH,sBAAsB,CAACkH,OAAO,CAAEF,SAAS,CAACvD,IAAK,CAAC,GAChDzD,sBAAsB,CAACkH,OAAO,CAAED,SAAS,CAACxD,IAAK,CAAC;EAElD,CAAE,CAAC;EACH,MAAMiB,gBAAgB,GAAG,CACxB,GAAG2B,mCAAmC,EACtC,GAAG1G,2BAA2B,CAAC,CAAC,EAChC,GAAG8G,kBAAkB,EACrB,GAAGF,mBAAmB,CACtB;EACD,OAAO7B,gBAAgB;AACxB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { Spinner, Modal } from '@wordpress/components';
|
|
6
|
-
export default function TemplateActionsLoadingScreen() {
|
|
7
|
-
const baseCssClass = 'edit-site-template-actions-loading-screen-modal';
|
|
8
|
-
return createElement(Modal, {
|
|
9
|
-
isFullScreen: true,
|
|
10
|
-
isDismissible: false,
|
|
11
|
-
shouldCloseOnClickOutside: false,
|
|
12
|
-
shouldCloseOnEsc: false,
|
|
13
|
-
onRequestClose: () => {},
|
|
14
|
-
__experimentalHideHeader: true,
|
|
15
|
-
className: baseCssClass
|
|
16
|
-
}, createElement("div", {
|
|
17
|
-
className: `${baseCssClass}__content`
|
|
18
|
-
}, createElement(Spinner, null)));
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=template-actions-loading-screen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Spinner","Modal","TemplateActionsLoadingScreen","baseCssClass","createElement","isFullScreen","isDismissible","shouldCloseOnClickOutside","shouldCloseOnEsc","onRequestClose","__experimentalHideHeader","className"],"sources":["@wordpress/edit-site/src/components/add-new-template/template-actions-loading-screen.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Spinner, Modal } from '@wordpress/components';\n\nexport default function TemplateActionsLoadingScreen() {\n\tconst baseCssClass = 'edit-site-template-actions-loading-screen-modal';\n\treturn (\n\t\t<Modal\n\t\t\tisFullScreen\n\t\t\tisDismissible={ false }\n\t\t\tshouldCloseOnClickOutside={ false }\n\t\t\tshouldCloseOnEsc={ false }\n\t\t\tonRequestClose={ () => {} }\n\t\t\t__experimentalHideHeader\n\t\t\tclassName={ baseCssClass }\n\t\t>\n\t\t\t<div className={ `${ baseCssClass }__content` }>\n\t\t\t\t<Spinner />\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,EAAEC,KAAK,QAAQ,uBAAuB;AAEtD,eAAe,SAASC,4BAA4BA,CAAA,EAAG;EACtD,MAAMC,YAAY,GAAG,iDAAiD;EACtE,OACCC,aAAA,CAACH,KAAK;IACLI,YAAY;IACZC,aAAa,EAAG,KAAO;IACvBC,yBAAyB,EAAG,KAAO;IACnCC,gBAAgB,EAAG,KAAO;IAC1BC,cAAc,EAAGA,CAAA,KAAM,CAAC,CAAG;IAC3BC,wBAAwB;IACxBC,SAAS,EAAGR;EAAc,GAE1BC,aAAA;IAAKO,SAAS,EAAI,GAAGR,YAAc;EAAY,GAC9CC,aAAA,CAACJ,OAAO,MAAE,CACN,CACC,CAAC;AAEV"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { ActionItem } from '@wordpress/interface';
|
|
5
|
-
import { compose } from '@wordpress/compose';
|
|
6
|
-
import { MenuItem } from '@wordpress/components';
|
|
7
|
-
import { withPluginContext } from '@wordpress/plugins';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.
|
|
11
|
-
* The text within the component appears as the menu item label.
|
|
12
|
-
*
|
|
13
|
-
* @param {Object} props Component properties.
|
|
14
|
-
* @param {string} [props.href] When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.
|
|
15
|
-
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.
|
|
16
|
-
* @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.
|
|
17
|
-
* @param {...*} [props.other] Any additional props are passed through to the underlying [Button](/packages/components/src/button/README.md) component.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```js
|
|
21
|
-
* // Using ES5 syntax
|
|
22
|
-
* var __ = wp.i18n.__;
|
|
23
|
-
* var PluginMoreMenuItem = wp.editSite.PluginMoreMenuItem;
|
|
24
|
-
* var moreIcon = wp.element.createElement( 'svg' ); //... svg element.
|
|
25
|
-
*
|
|
26
|
-
* function onButtonClick() {
|
|
27
|
-
* alert( 'Button clicked.' );
|
|
28
|
-
* }
|
|
29
|
-
*
|
|
30
|
-
* function MyButtonMoreMenuItem() {
|
|
31
|
-
* return wp.element.createElement(
|
|
32
|
-
* PluginMoreMenuItem,
|
|
33
|
-
* {
|
|
34
|
-
* icon: moreIcon,
|
|
35
|
-
* onClick: onButtonClick,
|
|
36
|
-
* },
|
|
37
|
-
* __( 'My button title' )
|
|
38
|
-
* );
|
|
39
|
-
* }
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```jsx
|
|
44
|
-
* // Using ESNext syntax
|
|
45
|
-
* import { __ } from '@wordpress/i18n';
|
|
46
|
-
* import { PluginMoreMenuItem } from '@wordpress/edit-site';
|
|
47
|
-
* import { more } from '@wordpress/icons';
|
|
48
|
-
*
|
|
49
|
-
* function onButtonClick() {
|
|
50
|
-
* alert( 'Button clicked.' );
|
|
51
|
-
* }
|
|
52
|
-
*
|
|
53
|
-
* const MyButtonMoreMenuItem = () => (
|
|
54
|
-
* <PluginMoreMenuItem
|
|
55
|
-
* icon={ more }
|
|
56
|
-
* onClick={ onButtonClick }
|
|
57
|
-
* >
|
|
58
|
-
* { __( 'My button title' ) }
|
|
59
|
-
* </PluginMoreMenuItem>
|
|
60
|
-
* );
|
|
61
|
-
* ```
|
|
62
|
-
*
|
|
63
|
-
* @return {Component} The component to be rendered.
|
|
64
|
-
*/
|
|
65
|
-
export default compose(withPluginContext((context, ownProps) => {
|
|
66
|
-
var _ownProps$as;
|
|
67
|
-
return {
|
|
68
|
-
as: (_ownProps$as = ownProps.as) !== null && _ownProps$as !== void 0 ? _ownProps$as : MenuItem,
|
|
69
|
-
icon: ownProps.icon || context.icon,
|
|
70
|
-
name: 'core/edit-site/plugin-more-menu'
|
|
71
|
-
};
|
|
72
|
-
}))(ActionItem);
|
|
73
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ActionItem","compose","MenuItem","withPluginContext","context","ownProps","_ownProps$as","as","icon","name"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/plugin-more-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ActionItem } from '@wordpress/interface';\nimport { compose } from '@wordpress/compose';\nimport { MenuItem } from '@wordpress/components';\nimport { withPluginContext } from '@wordpress/plugins';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.href] When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n * @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying [Button](/packages/components/src/button/README.md) component.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginMoreMenuItem = wp.editSite.PluginMoreMenuItem;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * function MyButtonMoreMenuItem() {\n * \treturn wp.element.createElement(\n * \t\tPluginMoreMenuItem,\n * \t\t{\n * \t\t\ticon: moreIcon,\n * \t\t\tonClick: onButtonClick,\n * \t\t},\n * \t\t__( 'My button title' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginMoreMenuItem } from '@wordpress/edit-site';\n * import { more } from '@wordpress/icons';\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * const MyButtonMoreMenuItem = () => (\n * \t<PluginMoreMenuItem\n * \t\ticon={ more }\n * \t\tonClick={ onButtonClick }\n * \t>\n * \t\t{ __( 'My button title' ) }\n * \t</PluginMoreMenuItem>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nexport default compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\treturn {\n\t\t\tas: ownProps.as ?? MenuItem,\n\t\t\ticon: ownProps.icon || context.icon,\n\t\t\tname: 'core/edit-site/plugin-more-menu',\n\t\t};\n\t} )\n)( ActionItem );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,sBAAsB;AACjD,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,iBAAiB,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeF,OAAO,CACrBE,iBAAiB,CAAE,CAAEC,OAAO,EAAEC,QAAQ,KAAM;EAAA,IAAAC,YAAA;EAC3C,OAAO;IACNC,EAAE,GAAAD,YAAA,GAAED,QAAQ,CAACE,EAAE,cAAAD,YAAA,cAAAA,YAAA,GAAIJ,QAAQ;IAC3BM,IAAI,EAAEH,QAAQ,CAACG,IAAI,IAAIJ,OAAO,CAACI,IAAI;IACnCC,IAAI,EAAE;EACP,CAAC;AACF,CAAE,CACH,CAAC,CAAET,UAAW,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { ComplementaryAreaMoreMenuItem } from '@wordpress/interface';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Renders a menu item in `Plugins` group in `More Menu` drop down,
|
|
9
|
-
* and can be used to activate the corresponding `PluginSidebar` component.
|
|
10
|
-
* The text within the component appears as the menu item label.
|
|
11
|
-
*
|
|
12
|
-
* @param {Object} props Component props.
|
|
13
|
-
* @param {string} props.target A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.
|
|
14
|
-
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```js
|
|
18
|
-
* // Using ES5 syntax
|
|
19
|
-
* var __ = wp.i18n.__;
|
|
20
|
-
* var PluginSidebarMoreMenuItem = wp.editSite.PluginSidebarMoreMenuItem;
|
|
21
|
-
* var moreIcon = wp.element.createElement( 'svg' ); //... svg element.
|
|
22
|
-
*
|
|
23
|
-
* function MySidebarMoreMenuItem() {
|
|
24
|
-
* return wp.element.createElement(
|
|
25
|
-
* PluginSidebarMoreMenuItem,
|
|
26
|
-
* {
|
|
27
|
-
* target: 'my-sidebar',
|
|
28
|
-
* icon: moreIcon,
|
|
29
|
-
* },
|
|
30
|
-
* __( 'My sidebar title' )
|
|
31
|
-
* )
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```jsx
|
|
37
|
-
* // Using ESNext syntax
|
|
38
|
-
* import { __ } from '@wordpress/i18n';
|
|
39
|
-
* import { PluginSidebarMoreMenuItem } from '@wordpress/edit-site';
|
|
40
|
-
* import { more } from '@wordpress/icons';
|
|
41
|
-
*
|
|
42
|
-
* const MySidebarMoreMenuItem = () => (
|
|
43
|
-
* <PluginSidebarMoreMenuItem
|
|
44
|
-
* target="my-sidebar"
|
|
45
|
-
* icon={ more }
|
|
46
|
-
* >
|
|
47
|
-
* { __( 'My sidebar title' ) }
|
|
48
|
-
* </PluginSidebarMoreMenuItem>
|
|
49
|
-
* );
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @return {Component} The component to be rendered.
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
export default function PluginSidebarMoreMenuItem(props) {
|
|
56
|
-
return createElement(ComplementaryAreaMoreMenuItem
|
|
57
|
-
// Menu item is marked with unstable prop for backward compatibility.
|
|
58
|
-
// @see https://github.com/WordPress/gutenberg/issues/14457
|
|
59
|
-
, {
|
|
60
|
-
__unstableExplicitMenuItem: true,
|
|
61
|
-
scope: "core/edit-site",
|
|
62
|
-
...props
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ComplementaryAreaMoreMenuItem","PluginSidebarMoreMenuItem","props","createElement","__unstableExplicitMenuItem","scope"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ComplementaryAreaMoreMenuItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down,\n * and can be used to activate the corresponding `PluginSidebar` component.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component props.\n * @param {string} props.target A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginSidebarMoreMenuItem = wp.editSite.PluginSidebarMoreMenuItem;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function MySidebarMoreMenuItem() {\n * \treturn wp.element.createElement(\n * \t\tPluginSidebarMoreMenuItem,\n * \t\t{\n * \t\t\ttarget: 'my-sidebar',\n * \t\t\ticon: moreIcon,\n * \t\t},\n * \t\t__( 'My sidebar title' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginSidebarMoreMenuItem } from '@wordpress/edit-site';\n * import { more } from '@wordpress/icons';\n *\n * const MySidebarMoreMenuItem = () => (\n * \t<PluginSidebarMoreMenuItem\n * \t\ttarget=\"my-sidebar\"\n * \t\ticon={ more }\n * \t>\n * \t\t{ __( 'My sidebar title' ) }\n * \t</PluginSidebarMoreMenuItem>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\n\nexport default function PluginSidebarMoreMenuItem( props ) {\n\treturn (\n\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t// Menu item is marked with unstable prop for backward compatibility.\n\t\t\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t\t\t__unstableExplicitMenuItem\n\t\t\tscope=\"core/edit-site\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,6BAA6B,QAAQ,sBAAsB;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,SAASC,yBAAyBA,CAAEC,KAAK,EAAG;EAC1D,OACCC,aAAA,CAACH;EACA;EACA;EAAA;IACAI,0BAA0B;IAC1BC,KAAK,EAAC,gBAAgB;IAAA,GACjBH;EAAK,CACV,CAAC;AAEJ"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { __ } from '@wordpress/i18n';
|
|
5
|
-
export const textFormattingShortcuts = [{
|
|
6
|
-
keyCombination: {
|
|
7
|
-
modifier: 'primary',
|
|
8
|
-
character: 'b'
|
|
9
|
-
},
|
|
10
|
-
description: __('Make the selected text bold.')
|
|
11
|
-
}, {
|
|
12
|
-
keyCombination: {
|
|
13
|
-
modifier: 'primary',
|
|
14
|
-
character: 'i'
|
|
15
|
-
},
|
|
16
|
-
description: __('Make the selected text italic.')
|
|
17
|
-
}, {
|
|
18
|
-
keyCombination: {
|
|
19
|
-
modifier: 'primary',
|
|
20
|
-
character: 'k'
|
|
21
|
-
},
|
|
22
|
-
description: __('Convert the selected text into a link.')
|
|
23
|
-
}, {
|
|
24
|
-
keyCombination: {
|
|
25
|
-
modifier: 'primaryShift',
|
|
26
|
-
character: 'k'
|
|
27
|
-
},
|
|
28
|
-
description: __('Remove a link.')
|
|
29
|
-
}, {
|
|
30
|
-
keyCombination: {
|
|
31
|
-
character: '[['
|
|
32
|
-
},
|
|
33
|
-
description: __('Insert a link to a post or page.')
|
|
34
|
-
}, {
|
|
35
|
-
keyCombination: {
|
|
36
|
-
modifier: 'primary',
|
|
37
|
-
character: 'u'
|
|
38
|
-
},
|
|
39
|
-
description: __('Underline the selected text.')
|
|
40
|
-
}, {
|
|
41
|
-
keyCombination: {
|
|
42
|
-
modifier: 'access',
|
|
43
|
-
character: 'd'
|
|
44
|
-
},
|
|
45
|
-
description: __('Strikethrough the selected text.')
|
|
46
|
-
}, {
|
|
47
|
-
keyCombination: {
|
|
48
|
-
modifier: 'access',
|
|
49
|
-
character: 'x'
|
|
50
|
-
},
|
|
51
|
-
description: __('Make the selected text inline code.')
|
|
52
|
-
}, {
|
|
53
|
-
keyCombination: {
|
|
54
|
-
modifier: 'access',
|
|
55
|
-
character: '0'
|
|
56
|
-
},
|
|
57
|
-
description: __('Convert the current heading to a paragraph.')
|
|
58
|
-
}, {
|
|
59
|
-
keyCombination: {
|
|
60
|
-
modifier: 'access',
|
|
61
|
-
character: '1-6'
|
|
62
|
-
},
|
|
63
|
-
description: __('Convert the current paragraph or heading to a heading of level 1 to 6.')
|
|
64
|
-
}, {
|
|
65
|
-
keyCombination: {
|
|
66
|
-
modifier: 'primaryShift',
|
|
67
|
-
character: 'SPACE'
|
|
68
|
-
},
|
|
69
|
-
description: __('Add non breaking space.')
|
|
70
|
-
}];
|
|
71
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__","textFormattingShortcuts","keyCombination","modifier","character","description"],"sources":["@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/config.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '0' },\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( '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AE;EAAI,CAAC;EACtDC,WAAW,EAAEL,EAAE,CAAE,6CAA8C;AAChE,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAM,CAAC;EACxDC,WAAW,EAAEL,EAAE,CACd,wEACD;AACD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,cAAc;IAAEC,SAAS,EAAE;EAAQ,CAAC;EAChEC,WAAW,EAAEL,EAAE,CAAE,yBAA0B;AAC5C,CAAC,CACD"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { useSelect } from '@wordpress/data';
|
|
6
|
-
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
|
-
import Shortcut from './shortcut';
|
|
12
|
-
export default function DynamicShortcut({
|
|
13
|
-
name
|
|
14
|
-
}) {
|
|
15
|
-
const {
|
|
16
|
-
keyCombination,
|
|
17
|
-
description,
|
|
18
|
-
aliases
|
|
19
|
-
} = useSelect(select => {
|
|
20
|
-
const {
|
|
21
|
-
getShortcutKeyCombination,
|
|
22
|
-
getShortcutDescription,
|
|
23
|
-
getShortcutAliases
|
|
24
|
-
} = select(keyboardShortcutsStore);
|
|
25
|
-
return {
|
|
26
|
-
keyCombination: getShortcutKeyCombination(name),
|
|
27
|
-
aliases: getShortcutAliases(name),
|
|
28
|
-
description: getShortcutDescription(name)
|
|
29
|
-
};
|
|
30
|
-
}, [name]);
|
|
31
|
-
if (!keyCombination) {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
return createElement(Shortcut, {
|
|
35
|
-
keyCombination: keyCombination,
|
|
36
|
-
description: description,
|
|
37
|
-
aliases: aliases
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=dynamic-shortcut.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useSelect","store","keyboardShortcutsStore","Shortcut","DynamicShortcut","name","keyCombination","description","aliases","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","createElement"],"sources":["@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nexport default function DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;;AAE/E;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,YAAY;AAEjC,eAAe,SAASC,eAAeA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACnD,MAAM;IAAEC,cAAc;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGR,SAAS,CACvDS,MAAM,IAAM;IACb,MAAM;MACLC,yBAAyB;MACzBC,sBAAsB;MACtBC;IACD,CAAC,GAAGH,MAAM,CAAEP,sBAAuB,CAAC;IAEpC,OAAO;MACNI,cAAc,EAAEI,yBAAyB,CAAEL,IAAK,CAAC;MACjDG,OAAO,EAAEI,kBAAkB,CAAEP,IAAK,CAAC;MACnCE,WAAW,EAAEI,sBAAsB,CAAEN,IAAK;IAC3C,CAAC;EACF,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EAED,IAAK,CAAEC,cAAc,EAAG;IACvB,OAAO,IAAI;EACZ;EAEA,OACCO,aAAA,CAACV,QAAQ;IACRG,cAAc,EAAGA,cAAgB;IACjCC,WAAW,EAAGA,WAAa;IAC3BC,OAAO,EAAGA;EAAS,CACnB,CAAC;AAEJ"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* External dependencies
|
|
4
|
-
*/
|
|
5
|
-
import classnames from 'classnames';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* WordPress dependencies
|
|
9
|
-
*/
|
|
10
|
-
import { Modal } from '@wordpress/components';
|
|
11
|
-
import { __ } from '@wordpress/i18n';
|
|
12
|
-
import { useShortcut, store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
13
|
-
import { store as interfaceStore } from '@wordpress/interface';
|
|
14
|
-
import { useSelect, useDispatch } from '@wordpress/data';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Internal dependencies
|
|
18
|
-
*/
|
|
19
|
-
import { textFormattingShortcuts } from './config';
|
|
20
|
-
import Shortcut from './shortcut';
|
|
21
|
-
import DynamicShortcut from './dynamic-shortcut';
|
|
22
|
-
export const KEYBOARD_SHORTCUT_HELP_MODAL_NAME = 'edit-site/keyboard-shortcut-help';
|
|
23
|
-
const ShortcutList = ({
|
|
24
|
-
shortcuts
|
|
25
|
-
}) =>
|
|
26
|
-
/*
|
|
27
|
-
* Disable reason: The `list` ARIA role is redundant but
|
|
28
|
-
* Safari+VoiceOver won't announce the list otherwise.
|
|
29
|
-
*/
|
|
30
|
-
/* eslint-disable jsx-a11y/no-redundant-roles */
|
|
31
|
-
createElement("ul", {
|
|
32
|
-
className: "edit-site-keyboard-shortcut-help-modal__shortcut-list",
|
|
33
|
-
role: "list"
|
|
34
|
-
}, shortcuts.map((shortcut, index) => createElement("li", {
|
|
35
|
-
className: "edit-site-keyboard-shortcut-help-modal__shortcut",
|
|
36
|
-
key: index
|
|
37
|
-
}, typeof shortcut === 'string' ? createElement(DynamicShortcut, {
|
|
38
|
-
name: shortcut
|
|
39
|
-
}) : createElement(Shortcut, {
|
|
40
|
-
...shortcut
|
|
41
|
-
}))))
|
|
42
|
-
/* eslint-enable jsx-a11y/no-redundant-roles */;
|
|
43
|
-
const ShortcutSection = ({
|
|
44
|
-
title,
|
|
45
|
-
shortcuts,
|
|
46
|
-
className
|
|
47
|
-
}) => createElement("section", {
|
|
48
|
-
className: classnames('edit-site-keyboard-shortcut-help-modal__section', className)
|
|
49
|
-
}, !!title && createElement("h2", {
|
|
50
|
-
className: "edit-site-keyboard-shortcut-help-modal__section-title"
|
|
51
|
-
}, title), createElement(ShortcutList, {
|
|
52
|
-
shortcuts: shortcuts
|
|
53
|
-
}));
|
|
54
|
-
const ShortcutCategorySection = ({
|
|
55
|
-
title,
|
|
56
|
-
categoryName,
|
|
57
|
-
additionalShortcuts = []
|
|
58
|
-
}) => {
|
|
59
|
-
const categoryShortcuts = useSelect(select => {
|
|
60
|
-
return select(keyboardShortcutsStore).getCategoryShortcuts(categoryName);
|
|
61
|
-
}, [categoryName]);
|
|
62
|
-
return createElement(ShortcutSection, {
|
|
63
|
-
title: title,
|
|
64
|
-
shortcuts: categoryShortcuts.concat(additionalShortcuts)
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
export default function KeyboardShortcutHelpModal() {
|
|
68
|
-
const isModalActive = useSelect(select => select(interfaceStore).isModalActive(KEYBOARD_SHORTCUT_HELP_MODAL_NAME));
|
|
69
|
-
const {
|
|
70
|
-
closeModal,
|
|
71
|
-
openModal
|
|
72
|
-
} = useDispatch(interfaceStore);
|
|
73
|
-
const toggleModal = () => isModalActive ? closeModal() : openModal(KEYBOARD_SHORTCUT_HELP_MODAL_NAME);
|
|
74
|
-
useShortcut('core/edit-site/keyboard-shortcuts', toggleModal);
|
|
75
|
-
if (!isModalActive) {
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
return createElement(Modal, {
|
|
79
|
-
className: "edit-site-keyboard-shortcut-help-modal",
|
|
80
|
-
title: __('Keyboard shortcuts'),
|
|
81
|
-
onRequestClose: toggleModal
|
|
82
|
-
}, createElement(ShortcutSection, {
|
|
83
|
-
className: "edit-site-keyboard-shortcut-help-modal__main-shortcuts",
|
|
84
|
-
shortcuts: ['core/edit-site/keyboard-shortcuts']
|
|
85
|
-
}), createElement(ShortcutCategorySection, {
|
|
86
|
-
title: __('Global shortcuts'),
|
|
87
|
-
categoryName: "global"
|
|
88
|
-
}), createElement(ShortcutCategorySection, {
|
|
89
|
-
title: __('Selection shortcuts'),
|
|
90
|
-
categoryName: "selection"
|
|
91
|
-
}), createElement(ShortcutCategorySection, {
|
|
92
|
-
title: __('Block shortcuts'),
|
|
93
|
-
categoryName: "block",
|
|
94
|
-
additionalShortcuts: [{
|
|
95
|
-
keyCombination: {
|
|
96
|
-
character: '/'
|
|
97
|
-
},
|
|
98
|
-
description: __('Change the block type after adding a new paragraph.'),
|
|
99
|
-
/* translators: The forward-slash character. e.g. '/'. */
|
|
100
|
-
ariaLabel: __('Forward-slash')
|
|
101
|
-
}]
|
|
102
|
-
}), createElement(ShortcutSection, {
|
|
103
|
-
title: __('Text formatting'),
|
|
104
|
-
shortcuts: textFormattingShortcuts
|
|
105
|
-
}));
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","Modal","__","useShortcut","store","keyboardShortcutsStore","interfaceStore","useSelect","useDispatch","textFormattingShortcuts","Shortcut","DynamicShortcut","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","ShortcutList","shortcuts","createElement","className","role","map","shortcut","index","key","name","ShortcutSection","title","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","select","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","closeModal","openModal","toggleModal","onRequestClose","keyCombination","character","description","ariaLabel"],"sources":["@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nexport const KEYBOARD_SHORTCUT_HELP_MODAL_NAME =\n\t'edit-site/keyboard-shortcut-help';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"edit-site-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"edit-site-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ classnames(\n\t\t\t'edit-site-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"edit-site-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nexport default function KeyboardShortcutHelpModal() {\n\tconst isModalActive = useSelect( ( select ) =>\n\t\tselect( interfaceStore ).isModalActive(\n\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\n\t\t)\n\t);\n\tconst { closeModal, openModal } = useDispatch( interfaceStore );\n\tconst toggleModal = () =>\n\t\tisModalActive\n\t\t\t? closeModal()\n\t\t\t: openModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\tuseShortcut( 'core/edit-site/keyboard-shortcuts', toggleModal );\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"edit-site-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"edit-site-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/edit-site/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,EACXC,KAAK,IAAIC,sBAAsB,QACzB,+BAA+B;AACtC,SAASD,KAAK,IAAIE,cAAc,QAAQ,sBAAsB;AAC9D,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;;AAExD;AACA;AACA;AACA,SAASC,uBAAuB,QAAQ,UAAU;AAClD,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,eAAe,MAAM,oBAAoB;AAEhD,OAAO,MAAMC,iCAAiC,GAC7C,kCAAkC;AAEnC,MAAMC,YAAY,GAAGA,CAAE;EAAEC;AA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
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { Fragment } from '@wordpress/element';
|
|
6
|
-
import { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';
|
|
7
|
-
function KeyCombination({
|
|
8
|
-
keyCombination,
|
|
9
|
-
forceAriaLabel
|
|
10
|
-
}) {
|
|
11
|
-
const shortcut = keyCombination.modifier ? displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
|
|
12
|
-
const ariaLabel = keyCombination.modifier ? shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
|
|
13
|
-
return createElement("kbd", {
|
|
14
|
-
className: "edit-site-keyboard-shortcut-help-modal__shortcut-key-combination",
|
|
15
|
-
"aria-label": forceAriaLabel || ariaLabel
|
|
16
|
-
}, (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
|
|
17
|
-
if (character === '+') {
|
|
18
|
-
return createElement(Fragment, {
|
|
19
|
-
key: index
|
|
20
|
-
}, character);
|
|
21
|
-
}
|
|
22
|
-
return createElement("kbd", {
|
|
23
|
-
key: index,
|
|
24
|
-
className: "edit-site-keyboard-shortcut-help-modal__shortcut-key"
|
|
25
|
-
}, character);
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
export default function Shortcut({
|
|
29
|
-
description,
|
|
30
|
-
keyCombination,
|
|
31
|
-
aliases = [],
|
|
32
|
-
ariaLabel
|
|
33
|
-
}) {
|
|
34
|
-
return createElement(Fragment, null, createElement("div", {
|
|
35
|
-
className: "edit-site-keyboard-shortcut-help-modal__shortcut-description"
|
|
36
|
-
}, description), createElement("div", {
|
|
37
|
-
className: "edit-site-keyboard-shortcut-help-modal__shortcut-term"
|
|
38
|
-
}, createElement(KeyCombination, {
|
|
39
|
-
keyCombination: keyCombination,
|
|
40
|
-
forceAriaLabel: ariaLabel
|
|
41
|
-
}), aliases.map((alias, index) => createElement(KeyCombination, {
|
|
42
|
-
keyCombination: alias,
|
|
43
|
-
forceAriaLabel: ariaLabel,
|
|
44
|
-
key: index
|
|
45
|
-
}))));
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=shortcut.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Fragment","displayShortcutList","shortcutAriaLabel","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","character","ariaLabel","createElement","className","Array","isArray","map","index","key","Shortcut","description","aliases","alias"],"sources":["@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"edit-site-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"edit-site-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nexport default function Shortcut( {\n\tdescription,\n\tkeyCombination,\n\taliases = [],\n\tariaLabel,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-site-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-site-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,mBAAmB,EAAEC,iBAAiB,QAAQ,qBAAqB;AAE5E,SAASC,cAAcA,CAAE;EAAEC,cAAc;EAAEC;AAAe,CAAC,EAAG;EAC7D,MAAMC,QAAQ,GAAGF,cAAc,CAACG,QAAQ,GACrCN,mBAAmB,CAAEG,cAAc,CAACG,QAAQ,CAAE,CAC9CH,cAAc,CAACI,SACf,CAAC,GACDJ,cAAc,CAACI,SAAS;EAC3B,MAAMC,SAAS,GAAGL,cAAc,CAACG,QAAQ,GACtCL,iBAAiB,CAAEE,cAAc,CAACG,QAAQ,CAAE,CAC5CH,cAAc,CAACI,SACf,CAAC,GACDJ,cAAc,CAACI,SAAS;EAE3B,OACCE,aAAA;IACCC,SAAS,EAAC,kEAAkE;IAC5E,cAAaN,cAAc,IAAII;EAAW,GAExC,CAAEG,KAAK,CAACC,OAAO,CAAEP,QAAS,CAAC,GAAGA,QAAQ,GAAG,CAAEA,QAAQ,CAAE,EAAGQ,GAAG,CAC5D,CAAEN,SAAS,EAAEO,KAAK,KAAM;IACvB,IAAKP,SAAS,KAAK,GAAG,EAAG;MACxB,OAAOE,aAAA,CAACV,QAAQ;QAACgB,GAAG,EAAGD;MAAO,GAAGP,SAAqB,CAAC;IACxD;IAEA,OACCE,aAAA;MACCM,GAAG,EAAGD,KAAO;MACbJ,SAAS,EAAC;IAAsD,GAE9DH,SACE,CAAC;EAER,CACD,CACI,CAAC;AAER;AAEA,eAAe,SAASS,QAAQA,CAAE;EACjCC,WAAW;EACXd,cAAc;EACde,OAAO,GAAG,EAAE;EACZV;AACD,CAAC,EAAG;EACH,OACCC,aAAA,CAAAV,QAAA,QACCU,aAAA;IAAKC,SAAS,EAAC;EAA8D,GAC1EO,WACE,CAAC,EACNR,aAAA;IAAKC,SAAS,EAAC;EAAuD,GACrED,aAAA,CAACP,cAAc;IACdC,cAAc,EAAGA,cAAgB;IACjCC,cAAc,EAAGI;EAAW,CAC5B,CAAC,EACAU,OAAO,CAACL,GAAG,CAAE,CAAEM,KAAK,EAAEL,KAAK,KAC5BL,aAAA,CAACP,cAAc;IACdC,cAAc,EAAGgB,KAAO;IACxBf,cAAc,EAAGI,SAAW;IAC5BO,GAAG,EAAGD;EAAO,CACb,CACA,CACE,CACJ,CAAC;AAEL"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { __ } from '@wordpress/i18n';
|
|
6
|
-
import { DropdownMenu, MenuGroup } from '@wordpress/components';
|
|
7
|
-
import { moreVertical } from '@wordpress/icons';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Internal dependencies
|
|
11
|
-
*/
|
|
12
|
-
import TrashPageMenuItem from './trash-page-menu-item';
|
|
13
|
-
export default function PageActions({
|
|
14
|
-
postId,
|
|
15
|
-
toggleProps,
|
|
16
|
-
onRemove
|
|
17
|
-
}) {
|
|
18
|
-
return createElement(DropdownMenu, {
|
|
19
|
-
icon: moreVertical,
|
|
20
|
-
label: __('Actions'),
|
|
21
|
-
toggleProps: toggleProps
|
|
22
|
-
}, () => createElement(MenuGroup, null, createElement(TrashPageMenuItem, {
|
|
23
|
-
postId: postId,
|
|
24
|
-
onRemove: onRemove
|
|
25
|
-
})));
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__","DropdownMenu","MenuGroup","moreVertical","TrashPageMenuItem","PageActions","postId","toggleProps","onRemove","createElement","icon","label"],"sources":["@wordpress/edit-site/src/components/page-actions/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { DropdownMenu, MenuGroup } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport TrashPageMenuItem from './trash-page-menu-item';\n\nexport default function PageActions( { postId, toggleProps, onRemove } ) {\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Actions' ) }\n\t\t\ttoggleProps={ toggleProps }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<MenuGroup>\n\t\t\t\t\t<TrashPageMenuItem\n\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\tonRemove={ onRemove }\n\t\t\t\t\t/>\n\t\t\t\t</MenuGroup>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,EAAEC,SAAS,QAAQ,uBAAuB;AAC/D,SAASC,YAAY,QAAQ,kBAAkB;;AAE/C;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,wBAAwB;AAEtD,eAAe,SAASC,WAAWA,CAAE;EAAEC,MAAM;EAAEC,WAAW;EAAEC;AAAS,CAAC,EAAG;EACxE,OACCC,aAAA,CAACR,YAAY;IACZS,IAAI,EAAGP,YAAc;IACrBQ,KAAK,EAAGX,EAAE,CAAE,SAAU,CAAG;IACzBO,WAAW,EAAGA;EAAa,GAEzB,MACDE,aAAA,CAACP,SAAS,QACTO,aAAA,CAACL,iBAAiB;IACjBE,MAAM,EAAGA,MAAQ;IACjBE,QAAQ,EAAGA;EAAU,CACrB,CACS,CAEC,CAAC;AAEjB"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { createElement, Fragment } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { useDispatch, useSelect } from '@wordpress/data';
|
|
6
|
-
import { decodeEntities } from '@wordpress/html-entities';
|
|
7
|
-
import { store as coreStore } from '@wordpress/core-data';
|
|
8
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
9
|
-
import { MenuItem } from '@wordpress/components';
|
|
10
|
-
import { store as noticesStore } from '@wordpress/notices';
|
|
11
|
-
export default function TrashPageMenuItem({
|
|
12
|
-
postId,
|
|
13
|
-
onRemove
|
|
14
|
-
}) {
|
|
15
|
-
const {
|
|
16
|
-
createSuccessNotice,
|
|
17
|
-
createErrorNotice
|
|
18
|
-
} = useDispatch(noticesStore);
|
|
19
|
-
const {
|
|
20
|
-
deleteEntityRecord
|
|
21
|
-
} = useDispatch(coreStore);
|
|
22
|
-
const page = useSelect(select => select(coreStore).getEntityRecord('postType', 'page', postId), [postId]);
|
|
23
|
-
async function removePage() {
|
|
24
|
-
try {
|
|
25
|
-
await deleteEntityRecord('postType', 'page', postId, {}, {
|
|
26
|
-
throwOnError: true
|
|
27
|
-
});
|
|
28
|
-
createSuccessNotice(sprintf( /* translators: The page's title. */
|
|
29
|
-
__('"%s" moved to the Trash.'), decodeEntities(page.title.rendered)), {
|
|
30
|
-
type: 'snackbar',
|
|
31
|
-
id: 'edit-site-page-trashed'
|
|
32
|
-
});
|
|
33
|
-
onRemove?.();
|
|
34
|
-
} catch (error) {
|
|
35
|
-
const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : __('An error occurred while moving the page to the trash.');
|
|
36
|
-
createErrorNotice(errorMessage, {
|
|
37
|
-
type: 'snackbar'
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return createElement(Fragment, null, createElement(MenuItem, {
|
|
42
|
-
onClick: () => removePage(),
|
|
43
|
-
isDestructive: true,
|
|
44
|
-
variant: "secondary"
|
|
45
|
-
}, __('Move to Trash')));
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=trash-page-menu-item.js.map
|