@wordpress/edit-site 6.32.0 → 6.32.1-next.b8c8708f3.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/build/components/add-new-pattern/index.js +153 -141
- package/build/components/add-new-pattern/index.js.map +7 -1
- package/build/components/add-new-post/index.js +114 -89
- package/build/components/add-new-post/index.js.map +7 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +80 -60
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +7 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js +284 -207
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +7 -1
- package/build/components/add-new-template/index.js +309 -248
- package/build/components/add-new-template/index.js.map +7 -1
- package/build/components/add-new-template/utils.js +459 -446
- package/build/components/add-new-template/utils.js.map +7 -1
- package/build/components/app/index.js +72 -63
- package/build/components/app/index.js.map +7 -1
- package/build/components/block-editor/use-editor-iframe-props.js +63 -66
- package/build/components/block-editor/use-editor-iframe-props.js.map +7 -1
- package/build/components/block-editor/use-navigate-to-entity-record.js +34 -22
- package/build/components/block-editor/use-navigate-to-entity-record.js.map +7 -1
- package/build/components/block-editor/use-site-editor-settings.js +64 -51
- package/build/components/block-editor/use-site-editor-settings.js.map +7 -1
- package/build/components/canvas-loader/index.js +41 -56
- package/build/components/canvas-loader/index.js.map +7 -1
- package/build/components/dataviews-actions/index.js +96 -83
- package/build/components/dataviews-actions/index.js.map +7 -1
- package/build/components/editor/index.js +288 -235
- package/build/components/editor/index.js.map +7 -1
- package/build/components/editor/site-preview.js +55 -42
- package/build/components/editor/site-preview.js.map +7 -1
- package/build/components/editor/use-adapt-editor-to-canvas.js +49 -31
- package/build/components/editor/use-adapt-editor-to-canvas.js.map +7 -1
- package/build/components/editor/use-editor-title.js +79 -61
- package/build/components/editor/use-editor-title.js.map +7 -1
- package/build/components/editor/use-resolve-edited-entity.js +112 -140
- package/build/components/editor/use-resolve-edited-entity.js.map +7 -1
- package/build/components/editor-canvas-container/index.js +101 -91
- package/build/components/editor-canvas-container/index.js.map +7 -1
- package/build/components/global-styles/background-panel.js +46 -39
- package/build/components/global-styles/background-panel.js.map +7 -1
- package/build/components/global-styles/block-preview-panel.js +58 -52
- package/build/components/global-styles/block-preview-panel.js.map +7 -1
- package/build/components/global-styles/color-indicator-wrapper.js +47 -26
- package/build/components/global-styles/color-indicator-wrapper.js.map +7 -1
- package/build/components/global-styles/color-palette-panel.js +130 -81
- package/build/components/global-styles/color-palette-panel.js.map +7 -1
- package/build/components/global-styles/confirm-reset-shadow-dialog.js +38 -22
- package/build/components/global-styles/confirm-reset-shadow-dialog.js.map +7 -1
- package/build/components/global-styles/dimensions-panel.js +46 -41
- package/build/components/global-styles/dimensions-panel.js.map +7 -1
- package/build/components/global-styles/font-families.js +106 -102
- package/build/components/global-styles/font-families.js.map +7 -1
- package/build/components/global-styles/font-family-item.js +41 -43
- package/build/components/global-styles/font-family-item.js.map +7 -1
- package/build/components/global-styles/font-library-modal/collection-font-variant.js +55 -39
- package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +7 -1
- package/build/components/global-styles/font-library-modal/context.js +228 -243
- package/build/components/global-styles/font-library-modal/context.js.map +7 -1
- package/build/components/global-styles/font-library-modal/font-card.js +70 -59
- package/build/components/global-styles/font-library-modal/font-card.js.map +7 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +407 -321
- package/build/components/global-styles/font-library-modal/font-collection.js.map +7 -1
- package/build/components/global-styles/font-library-modal/font-demo.js +54 -50
- package/build/components/global-styles/font-library-modal/font-demo.js.map +7 -1
- package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +52 -44
- package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +7 -1
- package/build/components/global-styles/font-library-modal/index.js +90 -87
- package/build/components/global-styles/font-library-modal/index.js.map +7 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +369 -255
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +7 -1
- package/build/components/global-styles/font-library-modal/library-font-details.js +60 -42
- package/build/components/global-styles/font-library-modal/library-font-details.js.map +7 -1
- package/build/components/global-styles/font-library-modal/library-font-variant.js +64 -49
- package/build/components/global-styles/font-library-modal/library-font-variant.js.map +7 -1
- package/build/components/global-styles/font-library-modal/resolvers.js +64 -31
- package/build/components/global-styles/font-library-modal/resolvers.js.map +7 -1
- package/build/components/global-styles/font-library-modal/upload-fonts.js +133 -145
- package/build/components/global-styles/font-library-modal/upload-fonts.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/constants.js +45 -24
- package/build/components/global-styles/font-library-modal/utils/constants.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/filter-fonts.js +30 -27
- package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/fonts-outline.js +41 -13
- package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/index.js +127 -161
- package/build/components/global-styles/font-library-modal/utils/index.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js +25 -18
- package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/preview-styles.js +55 -74
- package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js +32 -16
- package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +7 -1
- package/build/components/global-styles/font-library-modal/utils/toggleFont.js +43 -72
- package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +7 -1
- package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +44 -23
- package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +7 -1
- package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +38 -22
- package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +7 -1
- package/build/components/global-styles/font-sizes/font-size-preview.js +42 -35
- package/build/components/global-styles/font-sizes/font-size-preview.js.map +7 -1
- package/build/components/global-styles/font-sizes/font-size.js +207 -170
- package/build/components/global-styles/font-sizes/font-size.js.map +7 -1
- package/build/components/global-styles/font-sizes/font-sizes-count.js +46 -45
- package/build/components/global-styles/font-sizes/font-sizes-count.js.map +7 -1
- package/build/components/global-styles/font-sizes/font-sizes.js +199 -136
- package/build/components/global-styles/font-sizes/font-sizes.js.map +7 -1
- package/build/components/global-styles/font-sizes/rename-font-size-dialog.js +81 -58
- package/build/components/global-styles/font-sizes/rename-font-size-dialog.js.map +7 -1
- package/build/components/global-styles/gradients-palette-panel.js +140 -85
- package/build/components/global-styles/gradients-palette-panel.js.map +7 -1
- package/build/components/global-styles/header.js +51 -48
- package/build/components/global-styles/header.js.map +7 -1
- package/build/components/global-styles/highlighted-colors.js +48 -40
- package/build/components/global-styles/highlighted-colors.js.map +7 -1
- package/build/components/global-styles/hooks.js +89 -68
- package/build/components/global-styles/hooks.js.map +7 -1
- package/build/components/global-styles/icon-with-current-color.js +50 -25
- package/build/components/global-styles/icon-with-current-color.js.map +7 -1
- package/build/components/global-styles/index.js +36 -11
- package/build/components/global-styles/index.js.map +7 -1
- package/build/components/global-styles/navigation-button.js +41 -42
- package/build/components/global-styles/navigation-button.js.map +7 -1
- package/build/components/global-styles/palette.js +82 -73
- package/build/components/global-styles/palette.js.map +7 -1
- package/build/components/global-styles/preset-colors.js +36 -24
- package/build/components/global-styles/preset-colors.js.map +7 -1
- package/build/components/global-styles/preview-colors.js +68 -46
- package/build/components/global-styles/preview-colors.js.map +7 -1
- package/build/components/global-styles/preview-styles.js +182 -136
- package/build/components/global-styles/preview-styles.js.map +7 -1
- package/build/components/global-styles/preview-typography.js +65 -44
- package/build/components/global-styles/preview-typography.js.map +7 -1
- package/build/components/global-styles/preview-wrapper.js +70 -85
- package/build/components/global-styles/preview-wrapper.js.map +7 -1
- package/build/components/global-styles/root-menu.js +53 -52
- package/build/components/global-styles/root-menu.js.map +7 -1
- package/build/components/global-styles/screen-background.js +54 -35
- package/build/components/global-styles/screen-background.js.map +7 -1
- package/build/components/global-styles/screen-block-list.js +129 -118
- package/build/components/global-styles/screen-block-list.js.map +7 -1
- package/build/components/global-styles/screen-block.js +185 -182
- package/build/components/global-styles/screen-block.js.map +7 -1
- package/build/components/global-styles/screen-color-palette.js +61 -56
- package/build/components/global-styles/screen-color-palette.js.map +7 -1
- package/build/components/global-styles/screen-colors.js +64 -40
- package/build/components/global-styles/screen-colors.js.map +7 -1
- package/build/components/global-styles/screen-css.js +80 -50
- package/build/components/global-styles/screen-css.js.map +7 -1
- package/build/components/global-styles/screen-layout.js +45 -32
- package/build/components/global-styles/screen-layout.js.map +7 -1
- package/build/components/global-styles/screen-revisions/index.js +144 -116
- package/build/components/global-styles/screen-revisions/index.js.map +7 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +165 -166
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +7 -1
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +93 -81
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +7 -1
- package/build/components/global-styles/screen-root.js +93 -84
- package/build/components/global-styles/screen-root.js.map +7 -1
- package/build/components/global-styles/screen-shadows.js +43 -16
- package/build/components/global-styles/screen-shadows.js.map +7 -1
- package/build/components/global-styles/screen-style-variations.js +64 -44
- package/build/components/global-styles/screen-style-variations.js.map +7 -1
- package/build/components/global-styles/screen-typography-element.js +146 -93
- package/build/components/global-styles/screen-typography-element.js.map +7 -1
- package/build/components/global-styles/screen-typography.js +64 -40
- package/build/components/global-styles/screen-typography.js.map +7 -1
- package/build/components/global-styles/shadow-utils.js +75 -180
- package/build/components/global-styles/shadow-utils.js.map +7 -1
- package/build/components/global-styles/shadows-edit-panel.js +433 -358
- package/build/components/global-styles/shadows-edit-panel.js.map +7 -1
- package/build/components/global-styles/shadows-panel.js +178 -131
- package/build/components/global-styles/shadows-panel.js.map +7 -1
- package/build/components/global-styles/size-control/index.js +66 -76
- package/build/components/global-styles/size-control/index.js.map +7 -1
- package/build/components/global-styles/style-variations-container.js +114 -102
- package/build/components/global-styles/style-variations-container.js.map +7 -1
- package/build/components/global-styles/subtitle.js +34 -21
- package/build/components/global-styles/subtitle.js.map +7 -1
- package/build/components/global-styles/typeset.js +73 -75
- package/build/components/global-styles/typeset.js.map +7 -1
- package/build/components/global-styles/typography-elements.js +109 -86
- package/build/components/global-styles/typography-elements.js.map +7 -1
- package/build/components/global-styles/typography-example.js +66 -65
- package/build/components/global-styles/typography-example.js.map +7 -1
- package/build/components/global-styles/typography-panel.js +57 -39
- package/build/components/global-styles/typography-panel.js.map +7 -1
- package/build/components/global-styles/typography-preview.js +73 -53
- package/build/components/global-styles/typography-preview.js.map +7 -1
- package/build/components/global-styles/ui.js +282 -314
- package/build/components/global-styles/ui.js.map +7 -1
- package/build/components/global-styles/utils.js +45 -31
- package/build/components/global-styles/utils.js.map +7 -1
- package/build/components/global-styles/variations/variation.js +90 -74
- package/build/components/global-styles/variations/variation.js.map +7 -1
- package/build/components/global-styles/variations/variations-color.js +52 -41
- package/build/components/global-styles/variations/variations-color.js.map +7 -1
- package/build/components/global-styles/variations/variations-panel.js +61 -51
- package/build/components/global-styles/variations/variations-panel.js.map +7 -1
- package/build/components/global-styles/variations/variations-typography.js +69 -49
- package/build/components/global-styles/variations/variations-typography.js.map +7 -1
- package/build/components/global-styles-renderer/index.js +39 -33
- package/build/components/global-styles-renderer/index.js.map +7 -1
- package/build/components/global-styles-sidebar/default-sidebar.js +53 -40
- package/build/components/global-styles-sidebar/default-sidebar.js.map +7 -1
- package/build/components/global-styles-sidebar/index.js +164 -141
- package/build/components/global-styles-sidebar/index.js.map +7 -1
- package/build/components/layout/animation.js +53 -78
- package/build/components/layout/animation.js.map +7 -1
- package/build/components/layout/hooks.js +40 -35
- package/build/components/layout/hooks.js.map +7 -1
- package/build/components/layout/index.js +220 -199
- package/build/components/layout/index.js.map +7 -1
- package/build/components/media/index.js +31 -26
- package/build/components/media/index.js.map +7 -1
- package/build/components/more-menu/index.js +45 -28
- package/build/components/more-menu/index.js.map +7 -1
- package/build/components/more-menu/site-export.js +69 -44
- package/build/components/more-menu/site-export.js.map +7 -1
- package/build/components/more-menu/welcome-guide-menu-item.js +29 -21
- package/build/components/more-menu/welcome-guide-menu-item.js.map +7 -1
- package/build/components/page-patterns/actions.js +82 -0
- package/build/components/page-patterns/actions.js.map +7 -0
- package/build/components/page-patterns/delete-category-menu-item.js +94 -82
- package/build/components/page-patterns/delete-category-menu-item.js.map +7 -1
- package/build/components/page-patterns/fields.js +135 -123
- package/build/components/page-patterns/fields.js.map +7 -1
- package/build/components/page-patterns/index.js +182 -148
- package/build/components/page-patterns/index.js.map +7 -1
- package/build/components/page-patterns/rename-category-menu-item.js +67 -62
- package/build/components/page-patterns/rename-category-menu-item.js.map +7 -1
- package/build/components/page-patterns/search-items.js +65 -89
- package/build/components/page-patterns/search-items.js.map +7 -1
- package/build/components/page-patterns/use-pattern-settings.js +45 -35
- package/build/components/page-patterns/use-pattern-settings.js.map +7 -1
- package/build/components/page-patterns/use-patterns.js +266 -200
- package/build/components/page-patterns/use-patterns.js.map +7 -1
- package/build/components/page-patterns/utils.js +27 -7
- package/build/components/page-patterns/utils.js.map +7 -1
- package/build/components/page-templates/fields.js +165 -159
- package/build/components/page-templates/fields.js.map +7 -1
- package/build/components/page-templates/hooks.js +66 -64
- package/build/components/page-templates/hooks.js.map +7 -1
- package/build/components/page-templates/index.js +211 -207
- package/build/components/page-templates/index.js.map +7 -1
- package/build/components/page-templates/view-utils.js +67 -0
- package/build/components/page-templates/view-utils.js.map +7 -0
- package/build/components/pagination/index.js +119 -82
- package/build/components/pagination/index.js.map +7 -1
- package/build/components/plugin-template-setting-panel/index.js +49 -56
- package/build/components/plugin-template-setting-panel/index.js.map +7 -1
- package/build/components/post-edit/index.js +171 -149
- package/build/components/post-edit/index.js.map +7 -1
- package/build/components/post-list/index.js +230 -301
- package/build/components/post-list/index.js.map +7 -1
- package/build/components/post-list/view-utils.js +167 -0
- package/build/components/post-list/view-utils.js.map +7 -0
- package/build/components/posts-app/index.js +44 -32
- package/build/components/posts-app/index.js.map +7 -1
- package/build/components/posts-app-routes/index.js +36 -25
- package/build/components/posts-app-routes/index.js.map +7 -1
- package/build/components/posts-app-routes/post-item.js +54 -35
- package/build/components/posts-app-routes/post-item.js.map +7 -1
- package/build/components/posts-app-routes/posts.js +91 -76
- package/build/components/posts-app-routes/posts.js.map +7 -1
- package/build/components/resizable-frame/index.js +200 -224
- package/build/components/resizable-frame/index.js.map +7 -1
- package/build/components/revisions/index.js +102 -71
- package/build/components/revisions/index.js.map +7 -1
- package/build/components/routes/use-title.js +45 -35
- package/build/components/routes/use-title.js.map +7 -1
- package/build/components/save-button/index.js +113 -111
- package/build/components/save-button/index.js.map +7 -1
- package/build/components/save-hub/index.js +52 -40
- package/build/components/save-hub/index.js.map +7 -1
- package/build/components/save-keyboard-shortcut/index.js +46 -52
- package/build/components/save-keyboard-shortcut/index.js.map +7 -1
- package/build/components/save-panel/index.js +155 -136
- package/build/components/save-panel/index.js.map +7 -1
- package/build/components/sidebar/index.js +81 -79
- package/build/components/sidebar/index.js.map +7 -1
- package/build/components/sidebar-button/index.js +43 -22
- package/build/components/sidebar-button/index.js.map +7 -1
- package/build/components/sidebar-dataviews/dataview-item.js +68 -55
- package/build/components/sidebar-dataviews/dataview-item.js.map +7 -1
- package/build/components/sidebar-dataviews/index.js +68 -54
- package/build/components/sidebar-dataviews/index.js.map +7 -1
- package/build/components/sidebar-global-styles-wrapper/index.js +125 -111
- package/build/components/sidebar-global-styles-wrapper/index.js.map +7 -1
- package/build/components/sidebar-navigation-item/index.js +79 -62
- package/build/components/sidebar-navigation-item/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen/index.js +129 -104
- package/build/components/sidebar-navigation-screen/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +63 -53
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-global-styles/content.js +50 -33
- package/build/components/sidebar-navigation-screen-global-styles/content.js.map +7 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +94 -81
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-main/index.js +141 -90
- package/build/components/sidebar-navigation-screen-main/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +40 -29
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +124 -91
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +116 -83
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +57 -48
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +80 -66
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +64 -38
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +125 -96
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +33 -19
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +30 -16
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +119 -105
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +130 -121
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +7 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +106 -88
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +7 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js +44 -21
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +7 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +129 -106
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +36 -25
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +7 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +81 -70
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +7 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +42 -32
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +7 -1
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +41 -28
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +7 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.js +95 -76
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +7 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +48 -27
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +7 -1
- package/build/components/sidebar-navigation-screen-unsupported/index.js +28 -20
- package/build/components/sidebar-navigation-screen-unsupported/index.js.map +7 -1
- package/build/components/site-editor-routes/home.js +50 -32
- package/build/components/site-editor-routes/home.js.map +7 -1
- package/build/components/site-editor-routes/index.js +62 -36
- package/build/components/site-editor-routes/index.js.map +7 -1
- package/build/components/site-editor-routes/navigation-item.js +55 -49
- package/build/components/site-editor-routes/navigation-item.js.map +7 -1
- package/build/components/site-editor-routes/navigation.js +55 -49
- package/build/components/site-editor-routes/navigation.js.map +7 -1
- package/build/components/site-editor-routes/notfound.js +54 -34
- package/build/components/site-editor-routes/notfound.js.map +7 -1
- package/build/components/site-editor-routes/page-item.js +58 -41
- package/build/components/site-editor-routes/page-item.js.map +7 -1
- package/build/components/site-editor-routes/pages.js +96 -86
- package/build/components/site-editor-routes/pages.js.map +7 -1
- package/build/components/site-editor-routes/pattern-item.js +48 -26
- package/build/components/site-editor-routes/pattern-item.js.map +7 -1
- package/build/components/site-editor-routes/patterns.js +51 -36
- package/build/components/site-editor-routes/patterns.js.map +7 -1
- package/build/components/site-editor-routes/stylebook.js +60 -43
- package/build/components/site-editor-routes/stylebook.js.map +7 -1
- package/build/components/site-editor-routes/styles.js +58 -46
- package/build/components/site-editor-routes/styles.js.map +7 -1
- package/build/components/site-editor-routes/template-item.js +54 -34
- package/build/components/site-editor-routes/template-item.js.map +7 -1
- package/build/components/site-editor-routes/template-part-item.js +45 -21
- package/build/components/site-editor-routes/template-part-item.js.map +7 -1
- package/build/components/site-editor-routes/templates.js +69 -44
- package/build/components/site-editor-routes/templates.js.map +7 -1
- package/build/components/site-editor-routes/utils.js +27 -13
- package/build/components/site-editor-routes/utils.js.map +7 -1
- package/build/components/site-hub/index.js +233 -222
- package/build/components/site-hub/index.js.map +7 -1
- package/build/components/site-icon/index.js +61 -49
- package/build/components/site-icon/index.js.map +7 -1
- package/build/components/style-book/categories.js +61 -52
- package/build/components/style-book/categories.js.map +7 -1
- package/build/components/style-book/color-examples.js +54 -40
- package/build/components/style-book/color-examples.js.map +7 -1
- package/build/components/style-book/constants.js +218 -144
- package/build/components/style-book/constants.js.map +7 -1
- package/build/components/style-book/duotone-examples.js +54 -40
- package/build/components/style-book/duotone-examples.js.map +7 -1
- package/build/components/style-book/examples.js +145 -120
- package/build/components/style-book/examples.js.map +7 -1
- package/build/components/style-book/index.js +454 -409
- package/build/components/style-book/index.js.map +7 -1
- package/build/components/style-book/types.js +16 -5
- package/build/components/style-book/types.js.map +7 -1
- package/build/components/welcome-guide/editor.js +87 -60
- package/build/components/welcome-guide/editor.js.map +7 -1
- package/build/components/welcome-guide/image.js +34 -22
- package/build/components/welcome-guide/image.js.map +7 -1
- package/build/components/welcome-guide/index.js +44 -21
- package/build/components/welcome-guide/index.js.map +7 -1
- package/build/components/welcome-guide/page.js +76 -52
- package/build/components/welcome-guide/page.js.map +7 -1
- package/build/components/welcome-guide/styles.js +135 -102
- package/build/components/welcome-guide/styles.js.map +7 -1
- package/build/components/welcome-guide/template.js +71 -59
- package/build/components/welcome-guide/template.js.map +7 -1
- package/build/deprecated.js +56 -46
- package/build/deprecated.js.map +7 -1
- package/build/hooks/commands/use-common-commands.js +117 -119
- package/build/hooks/commands/use-common-commands.js.map +7 -1
- package/build/hooks/commands/use-set-command-context.js +40 -50
- package/build/hooks/commands/use-set-command-context.js.map +7 -1
- package/build/hooks/index.js +2 -3
- package/build/hooks/index.js.map +7 -1
- package/build/hooks/push-changes-to-global-styles/index.js +236 -251
- package/build/hooks/push-changes-to-global-styles/index.js.map +7 -1
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +78 -111
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +7 -1
- package/build/index.js +87 -112
- package/build/index.js.map +7 -1
- package/build/lock-unlock.js +31 -14
- package/build/lock-unlock.js.map +7 -1
- package/build/posts.js +67 -63
- package/build/posts.js.map +7 -1
- package/build/store/actions.js +199 -365
- package/build/store/actions.js.map +7 -1
- package/build/store/constants.js +27 -11
- package/build/store/constants.js.map +7 -1
- package/build/store/index.js +52 -30
- package/build/store/index.js.map +7 -1
- package/build/store/private-actions.js +34 -19
- package/build/store/private-actions.js.map +7 -1
- package/build/store/private-selectors.js +28 -13
- package/build/store/private-selectors.js.map +7 -1
- package/build/store/reducer.js +42 -57
- package/build/store/reducer.js.map +7 -1
- package/build/store/selectors.js +205 -301
- package/build/store/selectors.js.map +7 -1
- package/build/utils/constants.js +94 -53
- package/build/utils/constants.js.map +7 -1
- package/build/utils/get-filtered-template-parts.js +36 -42
- package/build/utils/get-filtered-template-parts.js.map +7 -1
- package/build/utils/is-previewing-theme.js +31 -13
- package/build/utils/is-previewing-theme.js.map +7 -1
- package/build/utils/is-template-removable.js +24 -17
- package/build/utils/is-template-removable.js.map +7 -1
- package/build/utils/is-template-revertable.js +24 -19
- package/build/utils/is-template-revertable.js.map +7 -1
- package/build/utils/set-nested-value.js +24 -25
- package/build/utils/set-nested-value.js.map +7 -1
- package/build/utils/template-part-create.js +1 -1
- package/build/utils/template-part-create.js.map +7 -1
- package/build/utils/use-activate-theme.js +40 -45
- package/build/utils/use-activate-theme.js.map +7 -1
- package/build/utils/use-actual-current-theme.js +47 -25
- package/build/utils/use-actual-current-theme.js.map +7 -1
- package/build-module/components/add-new-pattern/index.js +133 -127
- package/build-module/components/add-new-pattern/index.js.map +7 -1
- package/build-module/components/add-new-post/index.js +100 -82
- package/build-module/components/add-new-post/index.js.map +7 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +63 -51
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +7 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js +269 -196
- package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +7 -1
- package/build-module/components/add-new-template/index.js +289 -219
- package/build-module/components/add-new-template/index.js.map +7 -1
- package/build-module/components/add-new-template/utils.js +430 -432
- package/build-module/components/add-new-template/utils.js.map +7 -1
- package/build-module/components/app/index.js +41 -51
- package/build-module/components/app/index.js.map +7 -1
- package/build-module/components/block-editor/use-editor-iframe-props.js +33 -58
- package/build-module/components/block-editor/use-editor-iframe-props.js.map +7 -1
- package/build-module/components/block-editor/use-navigate-to-entity-record.js +17 -18
- package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +7 -1
- package/build-module/components/block-editor/use-site-editor-settings.js +28 -41
- package/build-module/components/block-editor/use-site-editor-settings.js.map +7 -1
- package/build-module/components/canvas-loader/index.js +25 -50
- package/build-module/components/canvas-loader/index.js.map +7 -1
- package/build-module/components/dataviews-actions/index.js +75 -78
- package/build-module/components/dataviews-actions/index.js.map +7 -1
- package/build-module/components/editor/index.js +261 -220
- package/build-module/components/editor/index.js.map +7 -1
- package/build-module/components/editor/site-preview.js +38 -38
- package/build-module/components/editor/site-preview.js.map +7 -1
- package/build-module/components/editor/use-adapt-editor-to-canvas.js +25 -24
- package/build-module/components/editor/use-adapt-editor-to-canvas.js.map +7 -1
- package/build-module/components/editor/use-editor-title.js +49 -53
- package/build-module/components/editor/use-editor-title.js.map +7 -1
- package/build-module/components/editor/use-resolve-edited-entity.js +89 -129
- package/build-module/components/editor/use-resolve-edited-entity.js.map +7 -1
- package/build-module/components/editor-canvas-container/index.js +79 -80
- package/build-module/components/editor-canvas-container/index.js.map +7 -1
- package/build-module/components/global-styles/background-panel.js +25 -35
- package/build-module/components/global-styles/background-panel.js.map +7 -1
- package/build-module/components/global-styles/block-preview-panel.js +36 -43
- package/build-module/components/global-styles/block-preview-panel.js.map +7 -1
- package/build-module/components/global-styles/color-indicator-wrapper.js +19 -20
- package/build-module/components/global-styles/color-indicator-wrapper.js.map +7 -1
- package/build-module/components/global-styles/color-palette-panel.js +105 -74
- package/build-module/components/global-styles/color-palette-panel.js.map +7 -1
- package/build-module/components/global-styles/confirm-reset-shadow-dialog.js +20 -17
- package/build-module/components/global-styles/confirm-reset-shadow-dialog.js.map +7 -1
- package/build-module/components/global-styles/dimensions-panel.js +26 -34
- package/build-module/components/global-styles/dimensions-panel.js.map +7 -1
- package/build-module/components/global-styles/font-families.js +86 -93
- package/build-module/components/global-styles/font-families.js.map +7 -1
- package/build-module/components/global-styles/font-family-item.js +26 -37
- package/build-module/components/global-styles/font-family-item.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +26 -32
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/context.js +203 -224
- package/build-module/components/global-styles/font-library-modal/context.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/font-card.js +48 -52
- package/build-module/components/global-styles/font-library-modal/font-card.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/font-collection.js +397 -302
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/font-demo.js +32 -38
- package/build-module/components/global-styles/font-library-modal/font-demo.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +41 -39
- package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/index.js +65 -81
- package/build-module/components/global-styles/font-library-modal/index.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +354 -243
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/library-font-details.js +35 -36
- package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js +35 -42
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/resolvers.js +27 -20
- package/build-module/components/global-styles/font-library-modal/resolvers.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js +111 -135
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/constants.js +21 -19
- package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js +13 -24
- package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js +20 -10
- package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/index.js +102 -154
- package/build-module/components/global-styles/font-library-modal/utils/index.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js +8 -14
- package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js +34 -71
- package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js +11 -13
- package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +7 -1
- package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js +22 -69
- package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +26 -18
- package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +20 -17
- package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/font-size-preview.js +26 -29
- package/build-module/components/global-styles/font-sizes/font-size-preview.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/font-size.js +185 -160
- package/build-module/components/global-styles/font-sizes/font-size.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/font-sizes-count.js +23 -39
- package/build-module/components/global-styles/font-sizes/font-sizes-count.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/font-sizes.js +184 -128
- package/build-module/components/global-styles/font-sizes/font-sizes.js.map +7 -1
- package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js +68 -52
- package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js.map +7 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +117 -79
- package/build-module/components/global-styles/gradients-palette-panel.js.map +7 -1
- package/build-module/components/global-styles/header.js +40 -43
- package/build-module/components/global-styles/header.js.map +7 -1
- package/build-module/components/global-styles/highlighted-colors.js +31 -36
- package/build-module/components/global-styles/highlighted-colors.js.map +7 -1
- package/build-module/components/global-styles/hooks.js +56 -61
- package/build-module/components/global-styles/hooks.js.map +7 -1
- package/build-module/components/global-styles/icon-with-current-color.js +18 -19
- package/build-module/components/global-styles/icon-with-current-color.js.map +7 -1
- package/build-module/components/global-styles/index.js +5 -2
- package/build-module/components/global-styles/index.js.map +7 -1
- package/build-module/components/global-styles/navigation-button.js +23 -37
- package/build-module/components/global-styles/navigation-button.js.map +7 -1
- package/build-module/components/global-styles/palette.js +61 -67
- package/build-module/components/global-styles/palette.js.map +7 -1
- package/build-module/components/global-styles/preset-colors.js +19 -20
- package/build-module/components/global-styles/preset-colors.js.map +7 -1
- package/build-module/components/global-styles/preview-colors.js +43 -40
- package/build-module/components/global-styles/preview-colors.js.map +7 -1
- package/build-module/components/global-styles/preview-styles.js +158 -130
- package/build-module/components/global-styles/preview-styles.js.map +7 -1
- package/build-module/components/global-styles/preview-typography.js +37 -38
- package/build-module/components/global-styles/preview-typography.js.map +7 -1
- package/build-module/components/global-styles/preview-wrapper.js +51 -75
- package/build-module/components/global-styles/preview-wrapper.js.map +7 -1
- package/build-module/components/global-styles/root-menu.js +38 -44
- package/build-module/components/global-styles/root-menu.js.map +7 -1
- package/build-module/components/global-styles/screen-background.js +26 -29
- package/build-module/components/global-styles/screen-background.js.map +7 -1
- package/build-module/components/global-styles/screen-block-list.js +105 -105
- package/build-module/components/global-styles/screen-block-list.js.map +7 -1
- package/build-module/components/global-styles/screen-block.js +156 -169
- package/build-module/components/global-styles/screen-block.js.map +7 -1
- package/build-module/components/global-styles/screen-color-palette.js +33 -50
- package/build-module/components/global-styles/screen-color-palette.js.map +7 -1
- package/build-module/components/global-styles/screen-colors.js +35 -33
- package/build-module/components/global-styles/screen-colors.js.map +7 -1
- package/build-module/components/global-styles/screen-css.js +52 -44
- package/build-module/components/global-styles/screen-css.js.map +7 -1
- package/build-module/components/global-styles/screen-layout.js +17 -26
- package/build-module/components/global-styles/screen-layout.js.map +7 -1
- package/build-module/components/global-styles/screen-revisions/index.js +117 -105
- package/build-module/components/global-styles/screen-revisions/index.js.map +7 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +145 -158
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +7 -1
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +74 -75
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +7 -1
- package/build-module/components/global-styles/screen-root.js +74 -77
- package/build-module/components/global-styles/screen-root.js.map +7 -1
- package/build-module/components/global-styles/screen-shadows.js +12 -11
- package/build-module/components/global-styles/screen-shadows.js.map +7 -1
- package/build-module/components/global-styles/screen-style-variations.js +38 -37
- package/build-module/components/global-styles/screen-style-variations.js.map +7 -1
- package/build-module/components/global-styles/screen-typography-element.js +122 -87
- package/build-module/components/global-styles/screen-typography-element.js.map +7 -1
- package/build-module/components/global-styles/screen-typography.js +36 -34
- package/build-module/components/global-styles/screen-typography.js.map +7 -1
- package/build-module/components/global-styles/shadow-utils.js +53 -176
- package/build-module/components/global-styles/shadow-utils.js.map +7 -1
- package/build-module/components/global-styles/shadows-edit-panel.js +426 -344
- package/build-module/components/global-styles/shadows-edit-panel.js.map +7 -1
- package/build-module/components/global-styles/shadows-panel.js +159 -124
- package/build-module/components/global-styles/shadows-panel.js.map +7 -1
- package/build-module/components/global-styles/size-control/index.js +57 -70
- package/build-module/components/global-styles/size-control/index.js.map +7 -1
- package/build-module/components/global-styles/style-variations-container.js +85 -95
- package/build-module/components/global-styles/style-variations-container.js.map +7 -1
- package/build-module/components/global-styles/subtitle.js +16 -16
- package/build-module/components/global-styles/subtitle.js.map +7 -1
- package/build-module/components/global-styles/typeset.js +50 -65
- package/build-module/components/global-styles/typeset.js.map +7 -1
- package/build-module/components/global-styles/typography-elements.js +86 -80
- package/build-module/components/global-styles/typography-elements.js.map +7 -1
- package/build-module/components/global-styles/typography-example.js +45 -57
- package/build-module/components/global-styles/typography-example.js.map +7 -1
- package/build-module/components/global-styles/typography-panel.js +38 -33
- package/build-module/components/global-styles/typography-panel.js.map +7 -1
- package/build-module/components/global-styles/typography-preview.js +55 -48
- package/build-module/components/global-styles/typography-preview.js.map +7 -1
- package/build-module/components/global-styles/ui.js +252 -295
- package/build-module/components/global-styles/ui.js.map +7 -1
- package/build-module/components/global-styles/utils.js +24 -28
- package/build-module/components/global-styles/utils.js.map +7 -1
- package/build-module/components/global-styles/variations/variation.js +59 -65
- package/build-module/components/global-styles/variations/variation.js.map +7 -1
- package/build-module/components/global-styles/variations/variations-color.js +26 -34
- package/build-module/components/global-styles/variations/variations-color.js.map +7 -1
- package/build-module/components/global-styles/variations/variations-panel.js +39 -46
- package/build-module/components/global-styles/variations/variations-panel.js.map +7 -1
- package/build-module/components/global-styles/variations/variations-typography.js +43 -42
- package/build-module/components/global-styles/variations/variations-typography.js.map +7 -1
- package/build-module/components/global-styles-renderer/index.js +16 -27
- package/build-module/components/global-styles-renderer/index.js.map +7 -1
- package/build-module/components/global-styles-sidebar/default-sidebar.js +36 -36
- package/build-module/components/global-styles-sidebar/default-sidebar.js.map +7 -1
- package/build-module/components/global-styles-sidebar/index.js +137 -133
- package/build-module/components/global-styles-sidebar/index.js.map +7 -1
- package/build-module/components/layout/animation.js +31 -69
- package/build-module/components/layout/animation.js.map +7 -1
- package/build-module/components/layout/hooks.js +16 -28
- package/build-module/components/layout/hooks.js.map +7 -1
- package/build-module/components/layout/index.js +199 -183
- package/build-module/components/layout/index.js.map +7 -1
- package/build-module/components/media/index.js +13 -21
- package/build-module/components/media/index.js.map +7 -1
- package/build-module/components/more-menu/index.js +18 -23
- package/build-module/components/more-menu/index.js.map +7 -1
- package/build-module/components/more-menu/site-export.js +41 -38
- package/build-module/components/more-menu/site-export.js.map +7 -1
- package/build-module/components/more-menu/welcome-guide-menu-item.js +12 -17
- package/build-module/components/more-menu/welcome-guide-menu-item.js.map +7 -1
- package/build-module/components/page-patterns/actions.js +52 -0
- package/build-module/components/page-patterns/actions.js.map +7 -0
- package/build-module/components/page-patterns/delete-category-menu-item.js +78 -76
- package/build-module/components/page-patterns/delete-category-menu-item.js.map +7 -1
- package/build-module/components/page-patterns/fields.js +103 -112
- package/build-module/components/page-patterns/fields.js.map +7 -1
- package/build-module/components/page-patterns/index.js +144 -120
- package/build-module/components/page-patterns/index.js.map +7 -1
- package/build-module/components/page-patterns/rename-category-menu-item.js +37 -53
- package/build-module/components/page-patterns/rename-category-menu-item.js.map +7 -1
- package/build-module/components/page-patterns/search-items.js +43 -77
- package/build-module/components/page-patterns/search-items.js.map +7 -1
- package/build-module/components/page-patterns/use-pattern-settings.js +27 -30
- package/build-module/components/page-patterns/use-pattern-settings.js.map +7 -1
- package/build-module/components/page-patterns/use-patterns.js +249 -192
- package/build-module/components/page-patterns/use-patterns.js.map +7 -1
- package/build-module/components/page-patterns/utils.js +5 -2
- package/build-module/components/page-patterns/utils.js.map +7 -1
- package/build-module/components/page-templates/fields.js +132 -147
- package/build-module/components/page-templates/fields.js.map +7 -1
- package/build-module/components/page-templates/hooks.js +44 -55
- package/build-module/components/page-templates/hooks.js.map +7 -1
- package/build-module/components/page-templates/index.js +189 -194
- package/build-module/components/page-templates/index.js.map +7 -1
- package/build-module/components/page-templates/view-utils.js +42 -0
- package/build-module/components/page-templates/view-utils.js.map +7 -0
- package/build-module/components/pagination/index.js +96 -77
- package/build-module/components/pagination/index.js.map +7 -1
- package/build-module/components/plugin-template-setting-panel/index.js +21 -50
- package/build-module/components/plugin-template-setting-panel/index.js.map +7 -1
- package/build-module/components/post-edit/index.js +136 -140
- package/build-module/components/post-edit/index.js.map +7 -1
- package/build-module/components/post-list/index.js +205 -291
- package/build-module/components/post-list/index.js.map +7 -1
- package/build-module/components/post-list/view-utils.js +149 -0
- package/build-module/components/post-list/view-utils.js.map +7 -0
- package/build-module/components/posts-app/index.js +15 -25
- package/build-module/components/posts-app/index.js.map +7 -1
- package/build-module/components/posts-app-routes/index.js +12 -18
- package/build-module/components/posts-app-routes/index.js.map +7 -1
- package/build-module/components/posts-app-routes/post-item.js +22 -29
- package/build-module/components/posts-app-routes/post-item.js.map +7 -1
- package/build-module/components/posts-app-routes/posts.js +59 -70
- package/build-module/components/posts-app-routes/posts.js.map +7 -1
- package/build-module/components/resizable-frame/index.js +169 -211
- package/build-module/components/resizable-frame/index.js.map +7 -1
- package/build-module/components/revisions/index.js +78 -64
- package/build-module/components/revisions/index.js.map +7 -1
- package/build-module/components/routes/use-title.js +25 -28
- package/build-module/components/routes/use-title.js.map +7 -1
- package/build-module/components/save-button/index.js +99 -104
- package/build-module/components/save-button/index.js.map +7 -1
- package/build-module/components/save-hub/index.js +23 -33
- package/build-module/components/save-hub/index.js.map +7 -1
- package/build-module/components/save-keyboard-shortcut/index.js +31 -47
- package/build-module/components/save-keyboard-shortcut/index.js.map +7 -1
- package/build-module/components/save-panel/index.js +125 -124
- package/build-module/components/save-panel/index.js.map +7 -1
- package/build-module/components/sidebar/index.js +47 -65
- package/build-module/components/sidebar/index.js.map +7 -1
- package/build-module/components/sidebar-button/index.js +16 -17
- package/build-module/components/sidebar-button/index.js.map +7 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js +41 -50
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +7 -1
- package/build-module/components/sidebar-dataviews/index.js +40 -48
- package/build-module/components/sidebar-dataviews/index.js.map +7 -1
- package/build-module/components/sidebar-global-styles-wrapper/index.js +100 -104
- package/build-module/components/sidebar-global-styles-wrapper/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-item/index.js +56 -57
- package/build-module/components/sidebar-navigation-item/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen/index.js +108 -98
- package/build-module/components/sidebar-navigation-screen/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +36 -48
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js +23 -28
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +61 -73
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +108 -82
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +22 -24
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +92 -84
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +87 -76
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +28 -41
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +67 -60
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +37 -32
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +107 -91
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +14 -14
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js +8 -12
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +89 -98
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +113 -117
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +82 -82
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +17 -16
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +108 -99
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +19 -21
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +53 -59
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +27 -27
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +24 -24
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +67 -70
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +20 -21
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +7 -1
- package/build-module/components/sidebar-navigation-screen-unsupported/index.js +11 -16
- package/build-module/components/sidebar-navigation-screen-unsupported/index.js.map +7 -1
- package/build-module/components/site-editor-routes/home.js +18 -26
- package/build-module/components/site-editor-routes/home.js.map +7 -1
- package/build-module/components/site-editor-routes/index.js +39 -30
- package/build-module/components/site-editor-routes/index.js.map +7 -1
- package/build-module/components/site-editor-routes/navigation-item.js +23 -43
- package/build-module/components/site-editor-routes/navigation-item.js.map +7 -1
- package/build-module/components/site-editor-routes/navigation.js +23 -43
- package/build-module/components/site-editor-routes/navigation.js.map +7 -1
- package/build-module/components/site-editor-routes/notfound.js +22 -28
- package/build-module/components/site-editor-routes/notfound.js.map +7 -1
- package/build-module/components/site-editor-routes/page-item.js +26 -35
- package/build-module/components/site-editor-routes/page-item.js.map +7 -1
- package/build-module/components/site-editor-routes/pages.js +64 -80
- package/build-module/components/site-editor-routes/pages.js.map +7 -1
- package/build-module/components/site-editor-routes/pattern-item.js +16 -20
- package/build-module/components/site-editor-routes/pattern-item.js.map +7 -1
- package/build-module/components/site-editor-routes/patterns.js +19 -30
- package/build-module/components/site-editor-routes/patterns.js.map +7 -1
- package/build-module/components/site-editor-routes/stylebook.js +28 -37
- package/build-module/components/site-editor-routes/stylebook.js.map +7 -1
- package/build-module/components/site-editor-routes/styles.js +26 -40
- package/build-module/components/site-editor-routes/styles.js.map +7 -1
- package/build-module/components/site-editor-routes/template-item.js +21 -28
- package/build-module/components/site-editor-routes/template-item.js.map +7 -1
- package/build-module/components/site-editor-routes/template-part-item.js +13 -15
- package/build-module/components/site-editor-routes/template-part-item.js.map +7 -1
- package/build-module/components/site-editor-routes/templates.js +37 -38
- package/build-module/components/site-editor-routes/templates.js.map +7 -1
- package/build-module/components/site-editor-routes/utils.js +6 -10
- package/build-module/components/site-editor-routes/utils.js.map +7 -1
- package/build-module/components/site-hub/index.js +204 -215
- package/build-module/components/site-hub/index.js.map +7 -1
- package/build-module/components/site-icon/index.js +33 -43
- package/build-module/components/site-icon/index.js.map +7 -1
- package/build-module/components/style-book/categories.js +41 -48
- package/build-module/components/style-book/categories.js.map +7 -1
- package/build-module/components/style-book/color-examples.js +29 -37
- package/build-module/components/style-book/color-examples.js.map +7 -1
- package/build-module/components/style-book/constants.js +191 -140
- package/build-module/components/style-book/constants.js.map +7 -1
- package/build-module/components/style-book/duotone-examples.js +36 -35
- package/build-module/components/style-book/duotone-examples.js.map +7 -1
- package/build-module/components/style-book/examples.js +114 -116
- package/build-module/components/style-book/examples.js.map +7 -1
- package/build-module/components/style-book/index.js +431 -384
- package/build-module/components/style-book/index.js.map +7 -1
- package/build-module/components/style-book/types.js +1 -2
- package/build-module/components/style-book/types.js.map +7 -1
- package/build-module/components/welcome-guide/editor.js +59 -54
- package/build-module/components/welcome-guide/editor.js.map +7 -1
- package/build-module/components/welcome-guide/image.js +16 -18
- package/build-module/components/welcome-guide/image.js.map +7 -1
- package/build-module/components/welcome-guide/index.js +16 -15
- package/build-module/components/welcome-guide/index.js.map +7 -1
- package/build-module/components/welcome-guide/page.js +59 -48
- package/build-module/components/welcome-guide/page.js.map +7 -1
- package/build-module/components/welcome-guide/styles.js +108 -97
- package/build-module/components/welcome-guide/styles.js.map +7 -1
- package/build-module/components/welcome-guide/template.js +54 -55
- package/build-module/components/welcome-guide/template.js.map +7 -1
- package/build-module/deprecated.js +28 -40
- package/build-module/deprecated.js.map +7 -1
- package/build-module/hooks/commands/use-common-commands.js +89 -108
- package/build-module/hooks/commands/use-common-commands.js.map +7 -1
- package/build-module/hooks/commands/use-set-command-context.js +21 -44
- package/build-module/hooks/commands/use-set-command-context.js.map +7 -1
- package/build-module/hooks/index.js +2 -5
- package/build-module/hooks/index.js.map +7 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +218 -243
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +7 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +56 -105
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +7 -1
- package/build-module/index.js +55 -69
- package/build-module/index.js.map +7 -1
- package/build-module/lock-unlock.js +8 -7
- package/build-module/lock-unlock.js.map +7 -1
- package/build-module/posts.js +38 -54
- package/build-module/posts.js.map +7 -1
- package/build-module/store/actions.js +140 -320
- package/build-module/store/actions.js.map +7 -1
- package/build-module/store/constants.js +5 -7
- package/build-module/store/constants.js.map +7 -1
- package/build-module/store/index.js +15 -18
- package/build-module/store/index.js.map +7 -1
- package/build-module/store/private-actions.js +12 -14
- package/build-module/store/private-actions.js.map +7 -1
- package/build-module/store/private-selectors.js +7 -10
- package/build-module/store/private-selectors.js.map +7 -1
- package/build-module/store/reducer.js +21 -53
- package/build-module/store/reducer.js.map +7 -1
- package/build-module/store/selectors.js +151 -278
- package/build-module/store/selectors.js.map +7 -1
- package/build-module/utils/constants.js +53 -44
- package/build-module/utils/constants.js.map +7 -1
- package/build-module/utils/get-filtered-template-parts.js +18 -37
- package/build-module/utils/get-filtered-template-parts.js.map +7 -1
- package/build-module/utils/is-previewing-theme.js +10 -9
- package/build-module/utils/is-previewing-theme.js.map +7 -1
- package/build-module/utils/is-template-removable.js +6 -13
- package/build-module/utils/is-template-removable.js.map +7 -1
- package/build-module/utils/is-template-revertable.js +6 -15
- package/build-module/utils/is-template-revertable.js.map +7 -1
- package/build-module/utils/set-nested-value.js +7 -22
- package/build-module/utils/set-nested-value.js.map +7 -1
- package/build-module/utils/template-part-create.js +1 -2
- package/build-module/utils/template-part-create.js.map +7 -1
- package/build-module/utils/use-activate-theme.js +21 -40
- package/build-module/utils/use-activate-theme.js.map +7 -1
- package/build-module/utils/use-actual-current-theme.js +13 -17
- package/build-module/utils/use-actual-current-theme.js.map +7 -1
- package/build-style/posts-rtl.css +484 -214
- package/build-style/posts.css +484 -214
- package/build-style/style-rtl.css +629 -271
- package/build-style/style.css +629 -271
- package/package.json +52 -42
- package/src/components/add-new-template/index.js +5 -3
- package/src/components/add-new-template/style.scss +4 -0
- package/src/components/dataviews-actions/index.js +16 -9
- package/src/components/editor/style.scss +3 -0
- package/src/components/editor/use-resolve-edited-entity.js +4 -18
- package/src/components/editor-canvas-container/style.scss +4 -1
- package/src/components/global-styles/font-library-modal/style.scss +4 -0
- package/src/components/global-styles/screen-revisions/style.scss +4 -0
- package/src/components/global-styles/style.scss +3 -0
- package/src/components/global-styles/variations/style.scss +3 -0
- package/src/components/global-styles-sidebar/style.scss +3 -0
- package/src/components/layout/index.js +2 -1
- package/src/components/layout/style.scss +5 -0
- package/src/components/page-patterns/actions.js +54 -0
- package/src/components/page-patterns/index.js +79 -32
- package/src/components/page-patterns/style.scss +4 -0
- package/src/components/page-templates/fields.js +22 -1
- package/src/components/page-templates/index.js +71 -104
- package/src/components/page-templates/style.scss +4 -0
- package/src/components/page-templates/view-utils.js +41 -0
- package/src/components/pagination/style.scss +2 -0
- package/src/components/post-edit/index.js +4 -3
- package/src/components/post-edit/style.scss +3 -6
- package/src/components/post-list/index.js +76 -188
- package/src/components/post-list/style.scss +3 -0
- package/src/components/post-list/view-utils.js +155 -0
- package/src/components/posts-app-routes/posts.js +29 -16
- package/src/components/resizable-frame/style.scss +3 -0
- package/src/components/save-hub/style.scss +3 -0
- package/src/components/save-panel/index.js +2 -2
- package/src/components/save-panel/style.scss +2 -0
- package/src/components/sidebar/style.scss +4 -0
- package/src/components/sidebar-button/style.scss +2 -0
- package/src/components/sidebar-dataviews/dataview-item.js +5 -11
- package/src/components/sidebar-dataviews/index.js +17 -17
- package/src/components/sidebar-dataviews/style.scss +2 -16
- package/src/components/sidebar-global-styles-wrapper/index.js +16 -21
- package/src/components/sidebar-global-styles-wrapper/style.scss +4 -30
- package/src/components/sidebar-navigation-item/style.scss +3 -0
- package/src/components/sidebar-navigation-screen/style.scss +5 -0
- package/src/components/sidebar-navigation-screen-main/style.scss +2 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +2 -0
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +3 -0
- package/src/components/sidebar-navigation-screen-patterns/style.scss +3 -0
- package/src/components/sidebar-navigation-screen-templates-browse/style.scss +2 -0
- package/src/components/site-editor-routes/pages.js +29 -16
- package/src/components/site-editor-routes/templates.js +21 -4
- package/src/components/site-hub/style.scss +3 -0
- package/src/components/site-icon/style.scss +3 -0
- package/src/components/style-book/style.scss +3 -0
- package/src/components/welcome-guide/style.scss +2 -0
- package/src/posts.scss +14 -11
- package/src/style.scss +42 -39
- package/tsconfig.json +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/page/header.js +0 -45
- package/build/components/page/header.js.map +0 -1
- package/build/components/page/index.js +0 -50
- package/build/components/page/index.js.map +0 -1
- package/build/components/page-patterns/header.js +0 -96
- package/build/components/page-patterns/header.js.map +0 -1
- package/build/components/sidebar-dataviews/add-new-view.js +0 -137
- package/build/components/sidebar-dataviews/add-new-view.js.map +0 -1
- package/build/components/sidebar-dataviews/custom-dataviews-list.js +0 -211
- package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +0 -1
- package/build/components/sidebar-dataviews/default-views.js +0 -141
- package/build/components/sidebar-dataviews/default-views.js.map +0 -1
- package/build-module/components/page/header.js +0 -40
- package/build-module/components/page/header.js.map +0 -1
- package/build-module/components/page/index.js +0 -42
- package/build-module/components/page/index.js.map +0 -1
- package/build-module/components/page-patterns/header.js +0 -88
- package/build-module/components/page-patterns/header.js.map +0 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js +0 -129
- package/build-module/components/sidebar-dataviews/add-new-view.js.map +0 -1
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +0 -202
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +0 -1
- package/build-module/components/sidebar-dataviews/default-views.js +0 -133
- package/build-module/components/sidebar-dataviews/default-views.js.map +0 -1
- package/src/components/page/header.js +0 -44
- package/src/components/page/index.js +0 -43
- package/src/components/page/style.scss +0 -56
- package/src/components/page-patterns/header.js +0 -120
- package/src/components/sidebar-dataviews/add-new-view.js +0 -143
- package/src/components/sidebar-dataviews/custom-dataviews-list.js +0 -233
- package/src/components/sidebar-dataviews/default-views.js +0 -168
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-navigation-menus/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\tSpinner,\n} from '@wordpress/components';\nimport { navigation } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { PRELOADED_NAVIGATION_MENUS_QUERY } from './constants';\nimport SingleNavigationMenu from '../sidebar-navigation-screen-navigation-menu/single-navigation-menu';\nimport useNavigationMenuHandlers from '../sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers';\nimport { unlock } from '../../lock-unlock';\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\n\n// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.\nfunction buildMenuLabel( title, id, status ) {\n\tif ( ! title ) {\n\t\t/* translators: %s: the index of the menu in the list of menus. */\n\t\treturn sprintf( __( '(no title %s)' ), id );\n\t}\n\n\tif ( status === 'publish' ) {\n\t\treturn decodeEntities( title );\n\t}\n\n\treturn sprintf(\n\t\t// translators: 1: title of the menu. 2: status of the menu (draft, pending, etc.).\n\t\t_x( '%1$s (%2$s)', 'menu label' ),\n\t\tdecodeEntities( title ),\n\t\tstatus\n\t);\n}\n\nexport default function SidebarNavigationScreenNavigationMenus( { backPath } ) {\n\tconst {\n\t\trecords: navigationMenus,\n\t\tisResolving: isResolvingNavigationMenus,\n\t\thasResolved: hasResolvedNavigationMenus,\n\t} = useEntityRecords(\n\t\t'postType',\n\t\tNAVIGATION_POST_TYPE,\n\t\tPRELOADED_NAVIGATION_MENUS_QUERY\n\t);\n\n\tconst isLoading =\n\t\tisResolvingNavigationMenus && ! hasResolvedNavigationMenus;\n\n\tconst { getNavigationFallbackId } = unlock( useSelect( coreStore ) );\n\tconst isCreatingNavigationFallback = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).isResolving( 'getNavigationFallbackId' ),\n\t\t[]\n\t);\n\n\tconst firstNavigationMenu = navigationMenus?.[ 0 ];\n\n\t// If there is no navigation menu found\n\t// then trigger fallback algorithm to create one.\n\tif (\n\t\t! firstNavigationMenu &&\n\t\t! isResolvingNavigationMenus &&\n\t\thasResolvedNavigationMenus &&\n\t\t// Ensure a fallback navigation is created only once\n\t\t! isCreatingNavigationFallback\n\t) {\n\t\tgetNavigationFallbackId();\n\t}\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst hasNavigationMenus = !! navigationMenus?.length;\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper backPath={ backPath }>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! hasNavigationMenus ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'No Navigation Menus found.' ) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// if single menu then render it\n\tif ( navigationMenus?.length === 1 ) {\n\t\treturn (\n\t\t\t<SingleNavigationMenu\n\t\t\t\tnavigationMenu={ firstNavigationMenu }\n\t\t\t\tbackPath={ backPath }\n\t\t\t\thandleDelete={ () => handleDelete( firstNavigationMenu ) }\n\t\t\t\thandleDuplicate={ () => handleDuplicate( firstNavigationMenu ) }\n\t\t\t\thandleSave={ ( edits ) =>\n\t\t\t\t\thandleSave( firstNavigationMenu, edits )\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SidebarNavigationScreenWrapper backPath={ backPath }>\n\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-navigation-menus\">\n\t\t\t\t{ navigationMenus?.map( ( { id, title, status }, index ) => (\n\t\t\t\t\t<NavMenuItem\n\t\t\t\t\t\tpostId={ id }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ buildMenuLabel( title?.rendered, index + 1, status ) }\n\t\t\t\t\t</NavMenuItem>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</SidebarNavigationScreenWrapper>\n\t);\n}\n\nexport function SidebarNavigationScreenWrapper( {\n\tchildren,\n\tactions,\n\ttitle,\n\tdescription,\n\tbackPath,\n} ) {\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ title || __( 'Navigation' ) }\n\t\t\tactions={ actions }\n\t\t\tdescription={ description || __( 'Manage your Navigation Menus.' ) }\n\t\t\tbackPath={ backPath }\n\t\t\tcontent={ children }\n\t\t/>\n\t);\n}\n\nconst NavMenuItem = ( { postId, ...props } ) => {\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\tto={ `/wp_navigation/${ postId }` }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n};\n"],
|
|
5
|
+
"mappings": "AAuFI;AApFJ,SAAS,IAAI,IAAI,eAAe;AAChC,SAAS,kBAAkB,SAAS,iBAAiB;AACrD,SAAS,iBAAiB;AAE1B,SAAS,sBAAsB;AAC/B;AAAA,EACC,2BAA2B;AAAA,EAC3B;AAAA,OACM;AACP,SAAS,kBAAkB;AAK3B,OAAO,6BAA6B;AACpC,OAAO,2BAA2B;AAClC,SAAS,wCAAwC;AACjD,OAAO,0BAA0B;AACjC,OAAO,+BAA+B;AACtC,SAAS,cAAc;AACvB,SAAS,4BAA4B;AAGrC,SAAS,eAAgB,OAAO,IAAI,QAAS;AAC5C,MAAK,CAAE,OAAQ;AAEd,WAAO,QAAS,GAAI,eAAgB,GAAG,EAAG;AAAA,EAC3C;AAEA,MAAK,WAAW,WAAY;AAC3B,WAAO,eAAgB,KAAM;AAAA,EAC9B;AAEA,SAAO;AAAA;AAAA,IAEN,GAAI,eAAe,YAAa;AAAA,IAChC,eAAgB,KAAM;AAAA,IACtB;AAAA,EACD;AACD;AAEe,SAAR,uCAAyD,EAAE,SAAS,GAAI;AAC9E,QAAM;AAAA,IACL,SAAS;AAAA,IACT,aAAa;AAAA,IACb,aAAa;AAAA,EACd,IAAI;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAEA,QAAM,YACL,8BAA8B,CAAE;AAEjC,QAAM,EAAE,wBAAwB,IAAI,OAAQ,UAAW,SAAU,CAAE;AACnE,QAAM,+BAA+B;AAAA,IACpC,CAAE,WACD,OAAQ,SAAU,EAAE,YAAa,yBAA0B;AAAA,IAC5D,CAAC;AAAA,EACF;AAEA,QAAM,sBAAsB,kBAAmB,CAAE;AAIjD,MACC,CAAE,uBACF,CAAE,8BACF;AAAA,EAEA,CAAE,8BACD;AACD,4BAAwB;AAAA,EACzB;AAEA,QAAM,EAAE,YAAY,cAAc,gBAAgB,IACjD,0BAA0B;AAE3B,QAAM,qBAAqB,CAAC,CAAE,iBAAiB;AAE/C,MAAK,WAAY;AAChB,WACC,oBAAC,kCAA+B,UAC/B,8BAAC,WAAQ,WAAU,iEAAgE,GACpF;AAAA,EAEF;AAEA,MAAK,CAAE,aAAa,CAAE,oBAAqB;AAC1C,WACC;AAAA,MAAC;AAAA;AAAA,QACA,aAAc,GAAI,4BAA6B;AAAA,QAC/C;AAAA;AAAA,IACD;AAAA,EAEF;AAGA,MAAK,iBAAiB,WAAW,GAAI;AACpC,WACC;AAAA,MAAC;AAAA;AAAA,QACA,gBAAiB;AAAA,QACjB;AAAA,QACA,cAAe,MAAM,aAAc,mBAAoB;AAAA,QACvD,iBAAkB,MAAM,gBAAiB,mBAAoB;AAAA,QAC7D,YAAa,CAAE,UACd,WAAY,qBAAqB,KAAM;AAAA;AAAA,IAEzC;AAAA,EAEF;AAEA,SACC,oBAAC,kCAA+B,UAC/B,8BAAC,aAAU,WAAU,wDAClB,2BAAiB,IAAK,CAAE,EAAE,IAAI,OAAO,OAAO,GAAG,UAChD;AAAA,IAAC;AAAA;AAAA,MACA,QAAS;AAAA,MAET,aAAW;AAAA,MACX,MAAO;AAAA,MAEL,yBAAgB,OAAO,UAAU,QAAQ,GAAG,MAAO;AAAA;AAAA,IAJ/C;AAAA,EAKP,CACC,GACH,GACD;AAEF;AAEO,SAAS,+BAAgC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAQ,SAAS,GAAI,YAAa;AAAA,MAClC;AAAA,MACA,aAAc,eAAe,GAAI,+BAAgC;AAAA,MACjE;AAAA,MACA,SAAU;AAAA;AAAA,EACX;AAEF;AAEA,MAAM,cAAc,CAAE,EAAE,QAAQ,GAAG,MAAM,MAAO;AAC/C,SACC;AAAA,IAAC;AAAA;AAAA,MACA,IAAK,kBAAmB,MAAO;AAAA,MAC7B,GAAG;AAAA;AAAA,EACN;AAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js
CHANGED
|
@@ -1,122 +1,118 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
10
|
-
import { BlockTitle, store as blockEditorStore } from '@wordpress/block-editor';
|
|
11
|
-
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { chevronUp, chevronDown, moreVertical } from "@wordpress/icons";
|
|
3
|
+
import { DropdownMenu, MenuItem, MenuGroup } from "@wordpress/components";
|
|
4
|
+
import { useDispatch, useSelect } from "@wordpress/data";
|
|
5
|
+
import { useCallback } from "@wordpress/element";
|
|
6
|
+
import { __, sprintf } from "@wordpress/i18n";
|
|
7
|
+
import { BlockTitle, store as blockEditorStore } from "@wordpress/block-editor";
|
|
8
|
+
import { privateApis as routerPrivateApis } from "@wordpress/router";
|
|
12
9
|
const POPOVER_PROPS = {
|
|
13
|
-
className:
|
|
14
|
-
placement:
|
|
10
|
+
className: "block-editor-block-settings-menu__popover",
|
|
11
|
+
placement: "bottom-start"
|
|
15
12
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*/
|
|
20
|
-
import { unlock } from '../../lock-unlock';
|
|
21
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
22
|
-
const {
|
|
23
|
-
useHistory,
|
|
24
|
-
useLocation
|
|
25
|
-
} = unlock(routerPrivateApis);
|
|
26
|
-
export default function LeafMoreMenu(props) {
|
|
13
|
+
import { unlock } from "../../lock-unlock";
|
|
14
|
+
const { useHistory, useLocation } = unlock(routerPrivateApis);
|
|
15
|
+
function LeafMoreMenu(props) {
|
|
27
16
|
const history = useHistory();
|
|
28
|
-
const {
|
|
29
|
-
|
|
30
|
-
} =
|
|
31
|
-
const {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
clientId
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
attributes
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
17
|
+
const { path } = useLocation();
|
|
18
|
+
const { block } = props;
|
|
19
|
+
const { clientId } = block;
|
|
20
|
+
const { moveBlocksDown, moveBlocksUp, removeBlocks } = useDispatch(blockEditorStore);
|
|
21
|
+
const removeLabel = sprintf(
|
|
22
|
+
/* translators: %s: block name */
|
|
23
|
+
__("Remove %s"),
|
|
24
|
+
BlockTitle({ clientId, maximumLength: 25 })
|
|
25
|
+
);
|
|
26
|
+
const goToLabel = sprintf(
|
|
27
|
+
/* translators: %s: block name */
|
|
28
|
+
__("Go to %s"),
|
|
29
|
+
BlockTitle({ clientId, maximumLength: 25 })
|
|
30
|
+
);
|
|
31
|
+
const rootClientId = useSelect(
|
|
32
|
+
(select) => {
|
|
33
|
+
const { getBlockRootClientId } = select(blockEditorStore);
|
|
34
|
+
return getBlockRootClientId(clientId);
|
|
35
|
+
},
|
|
36
|
+
[clientId]
|
|
37
|
+
);
|
|
38
|
+
const onGoToPage = useCallback(
|
|
39
|
+
(selectedBlock) => {
|
|
40
|
+
const { attributes, name } = selectedBlock;
|
|
41
|
+
if (attributes.kind === "post-type" && attributes.id && attributes.type && history) {
|
|
42
|
+
history.navigate(
|
|
43
|
+
`/${attributes.type}/${attributes.id}?canvas=edit`,
|
|
44
|
+
{
|
|
45
|
+
state: { backPath: path }
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
if (name === "core/page-list-item" && attributes.id && history) {
|
|
50
|
+
history.navigate(`/page/${attributes.id}?canvas=edit`, {
|
|
51
|
+
state: { backPath: path }
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
[path, history]
|
|
56
|
+
);
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
DropdownMenu,
|
|
59
|
+
{
|
|
60
|
+
icon: moreVertical,
|
|
61
|
+
label: __("Options"),
|
|
62
|
+
className: "block-editor-block-settings-menu",
|
|
63
|
+
popoverProps: POPOVER_PROPS,
|
|
64
|
+
noIcons: true,
|
|
65
|
+
...props,
|
|
66
|
+
children: ({ onClose }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
67
|
+
/* @__PURE__ */ jsxs(MenuGroup, { children: [
|
|
68
|
+
/* @__PURE__ */ jsx(
|
|
69
|
+
MenuItem,
|
|
70
|
+
{
|
|
71
|
+
icon: chevronUp,
|
|
72
|
+
onClick: () => {
|
|
73
|
+
moveBlocksUp([clientId], rootClientId);
|
|
74
|
+
onClose();
|
|
75
|
+
},
|
|
76
|
+
children: __("Move up")
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ jsx(
|
|
80
|
+
MenuItem,
|
|
81
|
+
{
|
|
82
|
+
icon: chevronDown,
|
|
83
|
+
onClick: () => {
|
|
84
|
+
moveBlocksDown([clientId], rootClientId);
|
|
85
|
+
onClose();
|
|
86
|
+
},
|
|
87
|
+
children: __("Move down")
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
block.attributes?.type === "page" && block.attributes?.id && /* @__PURE__ */ jsx(
|
|
91
|
+
MenuItem,
|
|
92
|
+
{
|
|
93
|
+
onClick: () => {
|
|
94
|
+
onGoToPage(block);
|
|
95
|
+
onClose();
|
|
96
|
+
},
|
|
97
|
+
children: goToLabel
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ jsx(MenuGroup, { children: /* @__PURE__ */ jsx(
|
|
102
|
+
MenuItem,
|
|
103
|
+
{
|
|
104
|
+
onClick: () => {
|
|
105
|
+
removeBlocks([clientId], false);
|
|
106
|
+
onClose();
|
|
107
|
+
},
|
|
108
|
+
children: removeLabel
|
|
109
|
+
}
|
|
110
|
+
) })
|
|
111
|
+
] })
|
|
69
112
|
}
|
|
70
|
-
|
|
71
|
-
history.navigate(`/page/${attributes.id}?canvas=edit`, {
|
|
72
|
-
state: {
|
|
73
|
-
backPath: path
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}, [path, history]);
|
|
78
|
-
return /*#__PURE__*/_jsx(DropdownMenu, {
|
|
79
|
-
icon: moreVertical,
|
|
80
|
-
label: __('Options'),
|
|
81
|
-
className: "block-editor-block-settings-menu",
|
|
82
|
-
popoverProps: POPOVER_PROPS,
|
|
83
|
-
noIcons: true,
|
|
84
|
-
...props,
|
|
85
|
-
children: ({
|
|
86
|
-
onClose
|
|
87
|
-
}) => /*#__PURE__*/_jsxs(_Fragment, {
|
|
88
|
-
children: [/*#__PURE__*/_jsxs(MenuGroup, {
|
|
89
|
-
children: [/*#__PURE__*/_jsx(MenuItem, {
|
|
90
|
-
icon: chevronUp,
|
|
91
|
-
onClick: () => {
|
|
92
|
-
moveBlocksUp([clientId], rootClientId);
|
|
93
|
-
onClose();
|
|
94
|
-
},
|
|
95
|
-
children: __('Move up')
|
|
96
|
-
}), /*#__PURE__*/_jsx(MenuItem, {
|
|
97
|
-
icon: chevronDown,
|
|
98
|
-
onClick: () => {
|
|
99
|
-
moveBlocksDown([clientId], rootClientId);
|
|
100
|
-
onClose();
|
|
101
|
-
},
|
|
102
|
-
children: __('Move down')
|
|
103
|
-
}), block.attributes?.type === 'page' && block.attributes?.id && /*#__PURE__*/_jsx(MenuItem, {
|
|
104
|
-
onClick: () => {
|
|
105
|
-
onGoToPage(block);
|
|
106
|
-
onClose();
|
|
107
|
-
},
|
|
108
|
-
children: goToLabel
|
|
109
|
-
})]
|
|
110
|
-
}), /*#__PURE__*/_jsx(MenuGroup, {
|
|
111
|
-
children: /*#__PURE__*/_jsx(MenuItem, {
|
|
112
|
-
onClick: () => {
|
|
113
|
-
removeBlocks([clientId], false);
|
|
114
|
-
onClose();
|
|
115
|
-
},
|
|
116
|
-
children: removeLabel
|
|
117
|
-
})
|
|
118
|
-
})]
|
|
119
|
-
})
|
|
120
|
-
});
|
|
113
|
+
);
|
|
121
114
|
}
|
|
122
|
-
|
|
115
|
+
export {
|
|
116
|
+
LeafMoreMenu as default
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=leaf-more-menu.js.map
|
package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\n\nimport { chevronUp, chevronDown, moreVertical } from '@wordpress/icons';\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { BlockTitle, store as blockEditorStore } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\nconst POPOVER_PROPS = {\n\tclassName: 'block-editor-block-settings-menu__popover',\n\tplacement: 'bottom-start',\n};\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\n\nexport default function LeafMoreMenu( props ) {\n\tconst history = useHistory();\n\tconst { path } = useLocation();\n\tconst { block } = props;\n\tconst { clientId } = block;\n\tconst { moveBlocksDown, moveBlocksUp, removeBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst removeLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Remove %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst goToLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Go to %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst rootClientId = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId } = select( blockEditorStore );\n\n\t\t\treturn getBlockRootClientId( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst onGoToPage = useCallback(\n\t\t( selectedBlock ) => {\n\t\t\tconst { attributes, name } = selectedBlock;\n\t\t\tif (\n\t\t\t\tattributes.kind === 'post-type' &&\n\t\t\t\tattributes.id &&\n\t\t\t\tattributes.type &&\n\t\t\t\thistory\n\t\t\t) {\n\t\t\t\thistory.navigate(\n\t\t\t\t\t`/${ attributes.type }/${ attributes.id }?canvas=edit`,\n\t\t\t\t\t{\n\t\t\t\t\t\tstate: { backPath: path },\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( name === 'core/page-list-item' && attributes.id && history ) {\n\t\t\t\thistory.navigate( `/page/${ attributes.id }?canvas=edit`, {\n\t\t\t\t\tstate: { backPath: path },\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\t\t[ path, history ]\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Options' ) }\n\t\t\tclassName=\"block-editor-block-settings-menu\"\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\tnoIcons\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronUp }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksUp( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move up' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksDown( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move down' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t{ block.attributes?.type === 'page' &&\n\t\t\t\t\t\t\tblock.attributes?.id && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonGoToPage( block );\n\t\t\t\t\t\t\t\t\t\tonClose();\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\t\t{ goToLabel }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tremoveBlocks( [ clientId ], false );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ removeLabel }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "AAwFI,mBAEE,KADD,YADD;AApFJ,SAAS,WAAW,aAAa,oBAAoB;AACrD,SAAS,cAAc,UAAU,iBAAiB;AAClD,SAAS,aAAa,iBAAiB;AACvC,SAAS,mBAAmB;AAC5B,SAAS,IAAI,eAAe;AAC5B,SAAS,YAAY,SAAS,wBAAwB;AACtD,SAAS,eAAe,yBAAyB;AAEjD,MAAM,gBAAgB;AAAA,EACrB,WAAW;AAAA,EACX,WAAW;AACZ;AAKA,SAAS,cAAc;AAEvB,MAAM,EAAE,YAAY,YAAY,IAAI,OAAQ,iBAAkB;AAE/C,SAAR,aAA+B,OAAQ;AAC7C,QAAM,UAAU,WAAW;AAC3B,QAAM,EAAE,KAAK,IAAI,YAAY;AAC7B,QAAM,EAAE,MAAM,IAAI;AAClB,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM,EAAE,gBAAgB,cAAc,aAAa,IAClD,YAAa,gBAAiB;AAE/B,QAAM,cAAc;AAAA;AAAA,IAEnB,GAAI,WAAY;AAAA,IAChB,WAAY,EAAE,UAAU,eAAe,GAAG,CAAE;AAAA,EAC7C;AAEA,QAAM,YAAY;AAAA;AAAA,IAEjB,GAAI,UAAW;AAAA,IACf,WAAY,EAAE,UAAU,eAAe,GAAG,CAAE;AAAA,EAC7C;AAEA,QAAM,eAAe;AAAA,IACpB,CAAE,WAAY;AACb,YAAM,EAAE,qBAAqB,IAAI,OAAQ,gBAAiB;AAE1D,aAAO,qBAAsB,QAAS;AAAA,IACvC;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AAEA,QAAM,aAAa;AAAA,IAClB,CAAE,kBAAmB;AACpB,YAAM,EAAE,YAAY,KAAK,IAAI;AAC7B,UACC,WAAW,SAAS,eACpB,WAAW,MACX,WAAW,QACX,SACC;AACD,gBAAQ;AAAA,UACP,IAAK,WAAW,IAAK,IAAK,WAAW,EAAG;AAAA,UACxC;AAAA,YACC,OAAO,EAAE,UAAU,KAAK;AAAA,UACzB;AAAA,QACD;AAAA,MACD;AACA,UAAK,SAAS,yBAAyB,WAAW,MAAM,SAAU;AACjE,gBAAQ,SAAU,SAAU,WAAW,EAAG,gBAAgB;AAAA,UACzD,OAAO,EAAE,UAAU,KAAK;AAAA,QACzB,CAAE;AAAA,MACH;AAAA,IACD;AAAA,IACA,CAAE,MAAM,OAAQ;AAAA,EACjB;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAO;AAAA,MACP,OAAQ,GAAI,SAAU;AAAA,MACtB,WAAU;AAAA,MACV,cAAe;AAAA,MACf,SAAO;AAAA,MACL,GAAG;AAAA,MAEH,WAAE,EAAE,QAAQ,MACb,iCACC;AAAA,6BAAC,aACA;AAAA;AAAA,YAAC;AAAA;AAAA,cACA,MAAO;AAAA,cACP,SAAU,MAAM;AACf,6BAAc,CAAE,QAAS,GAAG,YAAa;AACzC,wBAAQ;AAAA,cACT;AAAA,cAEE,aAAI,SAAU;AAAA;AAAA,UACjB;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACA,MAAO;AAAA,cACP,SAAU,MAAM;AACf,+BAAgB,CAAE,QAAS,GAAG,YAAa;AAC3C,wBAAQ;AAAA,cACT;AAAA,cAEE,aAAI,WAAY;AAAA;AAAA,UACnB;AAAA,UACE,MAAM,YAAY,SAAS,UAC5B,MAAM,YAAY,MACjB;AAAA,YAAC;AAAA;AAAA,cACA,SAAU,MAAM;AACf,2BAAY,KAAM;AAClB,wBAAQ;AAAA,cACT;AAAA,cAEE;AAAA;AAAA,UACH;AAAA,WAEH;AAAA,QACA,oBAAC,aACA;AAAA,UAAC;AAAA;AAAA,YACA,SAAU,MAAM;AACf,2BAAc,CAAE,QAAS,GAAG,KAAM;AAClC,sBAAQ;AAAA,YACT;AAAA,YAEE;AAAA;AAAA,QACH,GACD;AAAA,SACD;AAAA;AAAA,EAEF;AAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import LeafMoreMenu from './leaf-more-menu';
|
|
15
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
-
const {
|
|
17
|
-
PrivateListView
|
|
18
|
-
} = unlock(blockEditorPrivateApis);
|
|
19
|
-
|
|
20
|
-
// Needs to be kept in sync with the query used at packages/block-library/src/page-list/edit.js.
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
privateApis as blockEditorPrivateApis,
|
|
4
|
+
store as blockEditorStore,
|
|
5
|
+
BlockList
|
|
6
|
+
} from "@wordpress/block-editor";
|
|
7
|
+
import { useDispatch, useSelect } from "@wordpress/data";
|
|
8
|
+
import { createBlock } from "@wordpress/blocks";
|
|
9
|
+
import { useCallback } from "@wordpress/element";
|
|
10
|
+
import { store as coreStore } from "@wordpress/core-data";
|
|
11
|
+
import { unlock } from "../../lock-unlock";
|
|
12
|
+
import LeafMoreMenu from "./leaf-more-menu";
|
|
13
|
+
const { PrivateListView } = unlock(blockEditorPrivateApis);
|
|
21
14
|
const MAX_PAGE_COUNT = 100;
|
|
22
|
-
const PAGES_QUERY = [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} = useDispatch(blockEditorStore);
|
|
62
|
-
const offCanvasOnselect = useCallback(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
15
|
+
const PAGES_QUERY = [
|
|
16
|
+
"postType",
|
|
17
|
+
"page",
|
|
18
|
+
{
|
|
19
|
+
per_page: MAX_PAGE_COUNT,
|
|
20
|
+
_fields: ["id", "link", "menu_order", "parent", "title", "type"],
|
|
21
|
+
// TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby
|
|
22
|
+
// values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent
|
|
23
|
+
// sort.
|
|
24
|
+
orderby: "menu_order",
|
|
25
|
+
order: "asc"
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
function NavigationMenuContent({ rootClientId }) {
|
|
29
|
+
const { listViewRootClientId, isLoading } = useSelect(
|
|
30
|
+
(select) => {
|
|
31
|
+
const {
|
|
32
|
+
areInnerBlocksControlled,
|
|
33
|
+
getBlockName,
|
|
34
|
+
getBlockCount,
|
|
35
|
+
getBlockOrder
|
|
36
|
+
} = select(blockEditorStore);
|
|
37
|
+
const { isResolving } = select(coreStore);
|
|
38
|
+
const blockClientIds = getBlockOrder(rootClientId);
|
|
39
|
+
const hasOnlyPageListBlock = blockClientIds.length === 1 && getBlockName(blockClientIds[0]) === "core/page-list";
|
|
40
|
+
const pageListHasBlocks = hasOnlyPageListBlock && getBlockCount(blockClientIds[0]) > 0;
|
|
41
|
+
const isLoadingPages = isResolving(
|
|
42
|
+
"getEntityRecords",
|
|
43
|
+
PAGES_QUERY
|
|
44
|
+
);
|
|
45
|
+
return {
|
|
46
|
+
listViewRootClientId: pageListHasBlocks ? blockClientIds[0] : rootClientId,
|
|
47
|
+
// This is a small hack to wait for the navigation block
|
|
48
|
+
// to actually load its inner blocks.
|
|
49
|
+
isLoading: !areInnerBlocksControlled(rootClientId) || isLoadingPages
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
[rootClientId]
|
|
53
|
+
);
|
|
54
|
+
const { replaceBlock, __unstableMarkNextChangeAsNotPersistent } = useDispatch(blockEditorStore);
|
|
55
|
+
const offCanvasOnselect = useCallback(
|
|
56
|
+
(block) => {
|
|
57
|
+
if (block.name === "core/navigation-link" && !block.attributes.url) {
|
|
58
|
+
__unstableMarkNextChangeAsNotPersistent();
|
|
59
|
+
replaceBlock(
|
|
60
|
+
block.clientId,
|
|
61
|
+
createBlock("core/navigation-link", block.attributes)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
[__unstableMarkNextChangeAsNotPersistent, replaceBlock]
|
|
66
|
+
);
|
|
67
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
68
|
+
!isLoading && /* @__PURE__ */ jsx(
|
|
69
|
+
PrivateListView,
|
|
70
|
+
{
|
|
71
|
+
rootClientId: listViewRootClientId,
|
|
72
|
+
onSelect: offCanvasOnselect,
|
|
73
|
+
blockSettingsMenu: LeafMoreMenu,
|
|
74
|
+
showAppender: false,
|
|
75
|
+
isExpanded: true
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
/* @__PURE__ */ jsx("div", { className: "edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor", children: /* @__PURE__ */ jsx(BlockList, {}) })
|
|
79
|
+
] });
|
|
83
80
|
}
|
|
84
|
-
|
|
81
|
+
export {
|
|
82
|
+
NavigationMenuContent as default
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=navigation-menu-content.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tBlockList,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { createBlock } from '@wordpress/blocks';\nimport { useCallback } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport LeafMoreMenu from './leaf-more-menu';\n\nconst { PrivateListView } = unlock( blockEditorPrivateApis );\n\n// Needs to be kept in sync with the query used at packages/block-library/src/page-list/edit.js.\nconst MAX_PAGE_COUNT = 100;\nconst PAGES_QUERY = [\n\t'postType',\n\t'page',\n\t{\n\t\tper_page: MAX_PAGE_COUNT,\n\t\t_fields: [ 'id', 'link', 'menu_order', 'parent', 'title', 'type' ],\n\t\t// TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby\n\t\t// values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent\n\t\t// sort.\n\t\torderby: 'menu_order',\n\t\torder: 'asc',\n\t},\n];\n\nexport default function NavigationMenuContent( { rootClientId } ) {\n\tconst { listViewRootClientId, isLoading } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tareInnerBlocksControlled,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockCount,\n\t\t\t\tgetBlockOrder,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { isResolving } = select( coreStore );\n\n\t\t\tconst blockClientIds = getBlockOrder( rootClientId );\n\n\t\t\tconst hasOnlyPageListBlock =\n\t\t\t\tblockClientIds.length === 1 &&\n\t\t\t\tgetBlockName( blockClientIds[ 0 ] ) === 'core/page-list';\n\t\t\tconst pageListHasBlocks =\n\t\t\t\thasOnlyPageListBlock &&\n\t\t\t\tgetBlockCount( blockClientIds[ 0 ] ) > 0;\n\n\t\t\tconst isLoadingPages = isResolving(\n\t\t\t\t'getEntityRecords',\n\t\t\t\tPAGES_QUERY\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tlistViewRootClientId: pageListHasBlocks\n\t\t\t\t\t? blockClientIds[ 0 ]\n\t\t\t\t\t: rootClientId,\n\t\t\t\t// This is a small hack to wait for the navigation block\n\t\t\t\t// to actually load its inner blocks.\n\t\t\t\tisLoading:\n\t\t\t\t\t! areInnerBlocksControlled( rootClientId ) ||\n\t\t\t\t\tisLoadingPages,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\tconst { replaceBlock, __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst offCanvasOnselect = useCallback(\n\t\t( block ) => {\n\t\t\tif (\n\t\t\t\tblock.name === 'core/navigation-link' &&\n\t\t\t\t! block.attributes.url\n\t\t\t) {\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\treplaceBlock(\n\t\t\t\t\tblock.clientId,\n\t\t\t\t\tcreateBlock( 'core/navigation-link', block.attributes )\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ __unstableMarkNextChangeAsNotPersistent, replaceBlock ]\n\t);\n\n\t// The hidden block is needed because it makes block edit side effects trigger.\n\t// For example a navigation page list load its items has an effect on edit to load its items.\n\treturn (\n\t\t<>\n\t\t\t{ ! isLoading && (\n\t\t\t\t<PrivateListView\n\t\t\t\t\trootClientId={ listViewRootClientId }\n\t\t\t\t\tonSelect={ offCanvasOnselect }\n\t\t\t\t\tblockSettingsMenu={ LeafMoreMenu }\n\t\t\t\t\tshowAppender={ false }\n\t\t\t\t\tisExpanded\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor\">\n\t\t\t\t<BlockList />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "AAiGE,mBAEE,KAFF;AA9FF;AAAA,EACC,eAAe;AAAA,EACf,SAAS;AAAA,EACT;AAAA,OACM;AACP,SAAS,aAAa,iBAAiB;AACvC,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,SAAS,iBAAiB;AAKnC,SAAS,cAAc;AACvB,OAAO,kBAAkB;AAEzB,MAAM,EAAE,gBAAgB,IAAI,OAAQ,sBAAuB;AAG3D,MAAM,iBAAiB;AACvB,MAAM,cAAc;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,IACC,UAAU;AAAA,IACV,SAAS,CAAE,MAAM,QAAQ,cAAc,UAAU,SAAS,MAAO;AAAA;AAAA;AAAA;AAAA,IAIjE,SAAS;AAAA,IACT,OAAO;AAAA,EACR;AACD;AAEe,SAAR,sBAAwC,EAAE,aAAa,GAAI;AACjE,QAAM,EAAE,sBAAsB,UAAU,IAAI;AAAA,IAC3C,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,gBAAiB;AAC7B,YAAM,EAAE,YAAY,IAAI,OAAQ,SAAU;AAE1C,YAAM,iBAAiB,cAAe,YAAa;AAEnD,YAAM,uBACL,eAAe,WAAW,KAC1B,aAAc,eAAgB,CAAE,CAAE,MAAM;AACzC,YAAM,oBACL,wBACA,cAAe,eAAgB,CAAE,CAAE,IAAI;AAExC,YAAM,iBAAiB;AAAA,QACtB;AAAA,QACA;AAAA,MACD;AAEA,aAAO;AAAA,QACN,sBAAsB,oBACnB,eAAgB,CAAE,IAClB;AAAA;AAAA;AAAA,QAGH,WACC,CAAE,yBAA0B,YAAa,KACzC;AAAA,MACF;AAAA,IACD;AAAA,IACA,CAAE,YAAa;AAAA,EAChB;AACA,QAAM,EAAE,cAAc,wCAAwC,IAC7D,YAAa,gBAAiB;AAE/B,QAAM,oBAAoB;AAAA,IACzB,CAAE,UAAW;AACZ,UACC,MAAM,SAAS,0BACf,CAAE,MAAM,WAAW,KAClB;AACD,gDAAwC;AACxC;AAAA,UACC,MAAM;AAAA,UACN,YAAa,wBAAwB,MAAM,UAAW;AAAA,QACvD;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,yCAAyC,YAAa;AAAA,EACzD;AAIA,SACC,iCACG;AAAA,KAAE,aACH;AAAA,MAAC;AAAA;AAAA,QACA,cAAe;AAAA,QACf,UAAW;AAAA,QACX,mBAAoB;AAAA,QACpB,cAAe;AAAA,QACf,YAAU;AAAA;AAAA,IACX;AAAA,IAED,oBAAC,SAAI,WAAU,6EACd,8BAAC,aAAU,GACZ;AAAA,KACD;AAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import SidebarNavigationItem from '../sidebar-navigation-item';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
export default function CategoryItem({
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import SidebarNavigationItem from "../sidebar-navigation-item";
|
|
3
|
+
function CategoryItem({
|
|
7
4
|
count,
|
|
8
5
|
icon,
|
|
9
6
|
id,
|
|
@@ -18,14 +15,18 @@ export default function CategoryItem({
|
|
|
18
15
|
if (id) {
|
|
19
16
|
queryArgs.push(`categoryId=${id}`);
|
|
20
17
|
}
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
SidebarNavigationItem,
|
|
20
|
+
{
|
|
21
|
+
icon,
|
|
22
|
+
suffix: /* @__PURE__ */ jsx("span", { children: count }),
|
|
23
|
+
"aria-current": isActive ? "true" : void 0,
|
|
24
|
+
to: `/pattern?${queryArgs.join("&")}`,
|
|
25
|
+
children: label
|
|
26
|
+
}
|
|
27
|
+
);
|
|
30
28
|
}
|
|
31
|
-
|
|
29
|
+
export {
|
|
30
|
+
CategoryItem as default
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=category-item.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-patterns/category-item.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport SidebarNavigationItem from '../sidebar-navigation-item';\n\nexport default function CategoryItem( {\n\tcount,\n\ticon,\n\tid,\n\tisActive,\n\tlabel,\n\ttype,\n} ) {\n\tif ( ! count ) {\n\t\treturn;\n\t}\n\tconst queryArgs = [ `postType=${ type }` ];\n\tif ( id ) {\n\t\tqueryArgs.push( `categoryId=${ id }` );\n\t}\n\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\ticon={ icon }\n\t\t\tsuffix={ <span>{ count }</span> }\n\t\t\taria-current={ isActive ? 'true' : undefined }\n\t\t\tto={ `/pattern?${ queryArgs.join( '&' ) }` }\n\t\t>\n\t\t\t{ label }\n\t\t</SidebarNavigationItem>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "AAwBY;AArBZ,OAAO,2BAA2B;AAEnB,SAAR,aAA+B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,MAAK,CAAE,OAAQ;AACd;AAAA,EACD;AACA,QAAM,YAAY,CAAE,YAAa,IAAK,EAAG;AACzC,MAAK,IAAK;AACT,cAAU,KAAM,cAAe,EAAG,EAAG;AAAA,EACtC;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,QAAS,oBAAC,UAAO,iBAAO;AAAA,MACxB,gBAAe,WAAW,SAAS;AAAA,MACnC,IAAK,YAAa,UAAU,KAAM,GAAI,CAAE;AAAA,MAEtC;AAAA;AAAA,EACH;AAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|