@wordpress/edit-site 5.29.0 → 5.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/actions/index.js +1 -1
- package/build/components/actions/index.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +10 -11
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/editor/index.js +1 -15
- package/build/components/editor/index.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +9 -0
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/font-families.js +1 -1
- package/build/components/global-styles/font-families.js.map +1 -1
- package/build/components/global-styles/font-library-modal/collection-font-variant.js +2 -2
- package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
- package/build/components/global-styles/font-library-modal/context.js +62 -58
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-card.js +10 -15
- package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +118 -76
- package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-demo.js +29 -8
- package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
- package/build/components/global-styles/font-library-modal/index.js +19 -6
- package/build/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +151 -79
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/library-font-variant.js +2 -2
- package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
- package/build/components/global-styles/font-library-modal/upload-fonts.js +8 -14
- package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/index.js +38 -4
- package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/preview-styles.js +1 -1
- package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/header.js +1 -1
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/highlighted-colors.js +50 -0
- package/build/components/global-styles/highlighted-colors.js.map +1 -0
- package/build/components/global-styles/preview-colors.js +62 -0
- package/build/components/global-styles/preview-colors.js.map +1 -0
- package/build/components/global-styles/preview-iframe.js +131 -0
- package/build/components/global-styles/preview-iframe.js.map +1 -0
- package/build/components/global-styles/preview-styles.js +163 -0
- package/build/components/global-styles/preview-styles.js.map +1 -0
- package/build/components/global-styles/preview-typography.js +65 -0
- package/build/components/global-styles/preview-typography.js.map +1 -0
- package/build/components/global-styles/screen-block-list.js +1 -1
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js +1 -1
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +10 -2
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +2 -2
- package/build/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build/components/global-styles/screen-root.js +2 -2
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +10 -2
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +12 -84
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/{typogrphy-elements.js → typography-elements.js} +1 -1
- package/build/components/global-styles/typography-elements.js.map +1 -0
- package/build/components/global-styles/ui.js +27 -2
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/utils.js +22 -0
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/global-styles/variations/variation.js +90 -0
- package/build/components/global-styles/variations/variation.js.map +1 -0
- package/build/components/global-styles/variations/variations-color.js +36 -0
- package/build/components/global-styles/variations/variations-color.js.map +1 -0
- package/build/components/global-styles/{variations-panel.js → variations/variations-panel.js} +1 -1
- package/build/components/global-styles/variations/variations-panel.js.map +1 -0
- package/build/components/global-styles/variations/variations-typography.js +64 -0
- package/build/components/global-styles/variations/variations-typography.js.map +1 -0
- package/build/components/header-edit-mode/index.js +12 -11
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/index.js +10 -2
- package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build/components/layout/index.js +4 -1
- package/build/components/layout/index.js.map +1 -1
- package/build/components/page-patterns/index.js +14 -14
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/{list/added-by.js → page-templates-template-parts/hooks.js} +1 -61
- package/build/components/page-templates-template-parts/hooks.js.map +1 -0
- package/build/components/page-templates-template-parts/index.js +14 -6
- package/build/components/page-templates-template-parts/index.js.map +1 -1
- package/build/components/resizable-frame/index.js +2 -1
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/save-panel/index.js +18 -3
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar/index.js +1 -1
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-dataviews/default-views.js +2 -0
- package/build/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +1 -2
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -3
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +2 -2
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/index.js +2 -2
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.js +4 -4
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +7 -5
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +65 -0
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build-module/components/actions/index.js +1 -1
- package/build-module/components/actions/index.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +10 -11
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/editor/index.js +2 -16
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +8 -0
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/font-families.js +1 -1
- package/build-module/components/global-styles/font-families.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +4 -4
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +63 -59
- package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-card.js +11 -16
- package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-collection.js +121 -79
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-demo.js +30 -9
- package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/index.js +19 -6
- package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +151 -79
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js +4 -4
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js +9 -15
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/index.js +37 -4
- package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/header.js +1 -1
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/highlighted-colors.js +43 -0
- package/build-module/components/global-styles/highlighted-colors.js.map +1 -0
- package/build-module/components/global-styles/preview-colors.js +54 -0
- package/build-module/components/global-styles/preview-colors.js.map +1 -0
- package/build-module/components/global-styles/preview-iframe.js +124 -0
- package/build-module/components/global-styles/preview-iframe.js.map +1 -0
- package/build-module/components/global-styles/preview-styles.js +155 -0
- package/build-module/components/global-styles/preview-styles.js.map +1 -0
- package/build-module/components/global-styles/preview-typography.js +58 -0
- package/build-module/components/global-styles/preview-typography.js.map +1 -0
- package/build-module/components/global-styles/screen-block-list.js +1 -1
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +1 -1
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +10 -2
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +2 -2
- package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build-module/components/global-styles/screen-root.js +2 -2
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +10 -2
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +13 -85
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/{typogrphy-elements.js → typography-elements.js} +1 -1
- package/build-module/components/global-styles/typography-elements.js.map +1 -0
- package/build-module/components/global-styles/ui.js +27 -2
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/utils.js +21 -0
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/global-styles/variations/variation.js +82 -0
- package/build-module/components/global-styles/variations/variation.js.map +1 -0
- package/build-module/components/global-styles/variations/variations-color.js +28 -0
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -0
- package/build-module/components/global-styles/{variations-panel.js → variations/variations-panel.js} +1 -1
- package/build-module/components/global-styles/variations/variations-panel.js.map +1 -0
- package/build-module/components/global-styles/variations/variations-typography.js +56 -0
- package/build-module/components/global-styles/variations/variations-typography.js.map +1 -0
- package/build-module/components/header-edit-mode/index.js +13 -12
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/index.js +13 -5
- package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build-module/components/layout/index.js +4 -1
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/page-patterns/index.js +14 -14
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/{list/added-by.js → page-templates-template-parts/hooks.js} +2 -59
- package/build-module/components/page-templates-template-parts/hooks.js.map +1 -0
- package/build-module/components/page-templates-template-parts/index.js +13 -5
- package/build-module/components/page-templates-template-parts/index.js.map +1 -1
- package/build-module/components/resizable-frame/index.js +2 -1
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +18 -3
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +1 -1
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js +3 -1
- package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +1 -2
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +7 -5
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +63 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build-style/style-rtl.css +163 -286
- package/build-style/style.css +163 -286
- package/package.json +42 -42
- package/src/components/actions/index.js +1 -1
- package/src/components/block-editor/editor-canvas.js +13 -12
- package/src/components/block-editor/style.scss +0 -3
- package/src/components/editor/index.js +0 -20
- package/src/components/global-styles/color-palette-panel.js +11 -1
- package/src/components/global-styles/font-families.js +1 -1
- package/src/components/global-styles/font-library-modal/collection-font-variant.js +5 -5
- package/src/components/global-styles/font-library-modal/context.js +116 -104
- package/src/components/global-styles/font-library-modal/font-card.js +11 -26
- package/src/components/global-styles/font-library-modal/font-collection.js +297 -218
- package/src/components/global-styles/font-library-modal/font-demo.js +38 -4
- package/src/components/global-styles/font-library-modal/index.js +23 -16
- package/src/components/global-styles/font-library-modal/installed-fonts.js +243 -114
- package/src/components/global-styles/font-library-modal/library-font-variant.js +5 -5
- package/src/components/global-styles/font-library-modal/style.scss +15 -8
- package/src/components/global-styles/font-library-modal/upload-fonts.js +17 -19
- package/src/components/global-styles/font-library-modal/utils/index.js +44 -4
- package/src/components/global-styles/font-library-modal/utils/preview-styles.js +2 -1
- package/src/components/global-styles/font-library-modal/utils/test/getDisplaySrcFromFontFace.spec.js +7 -18
- package/src/components/global-styles/gradients-palette-panel.js +2 -2
- package/src/components/global-styles/header.js +1 -1
- package/src/components/global-styles/highlighted-colors.js +39 -0
- package/src/components/global-styles/preview-colors.js +61 -0
- package/src/components/global-styles/preview-iframe.js +153 -0
- package/src/components/global-styles/preview-styles.js +185 -0
- package/src/components/global-styles/preview-typography.js +62 -0
- package/src/components/global-styles/screen-block-list.js +1 -1
- package/src/components/global-styles/screen-block.js +4 -1
- package/src/components/global-styles/screen-colors.js +13 -1
- package/src/components/global-styles/screen-revisions/index.js +5 -2
- package/src/components/global-styles/screen-root.js +2 -2
- package/src/components/global-styles/screen-typography.js +19 -2
- package/src/components/global-styles/style-variations-container.js +14 -92
- package/src/components/global-styles/style.scss +0 -34
- package/src/components/global-styles/ui.js +26 -2
- package/src/components/global-styles/utils.js +37 -0
- package/src/components/global-styles/variations/style.scss +44 -0
- package/src/components/global-styles/variations/variation.js +93 -0
- package/src/components/global-styles/variations/variations-color.js +30 -0
- package/src/components/global-styles/{variations-panel.js → variations/variations-panel.js} +1 -1
- package/src/components/global-styles/variations/variations-typography.js +85 -0
- package/src/components/header-edit-mode/index.js +20 -27
- package/src/components/header-edit-mode/more-menu/index.js +17 -8
- package/src/components/header-edit-mode/style.scss +4 -0
- package/src/components/layout/index.js +5 -0
- package/src/components/page-patterns/index.js +21 -21
- package/src/components/{list/added-by.js → page-templates-template-parts/hooks.js} +1 -66
- package/src/components/page-templates-template-parts/index.js +20 -3
- package/src/components/page-templates-template-parts/style.scss +48 -0
- package/src/components/resizable-frame/index.js +1 -0
- package/src/components/revisions/index.js +1 -1
- package/src/components/save-panel/index.js +34 -12
- package/src/components/sidebar/index.js +1 -1
- package/src/components/sidebar-dataviews/default-views.js +3 -1
- package/src/components/sidebar-edit-mode/page-panels/page-status.js +1 -1
- package/src/components/sidebar-edit-mode/template-panel/index.js +1 -1
- package/src/components/sidebar-navigation-screen-main/index.js +0 -2
- package/src/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -2
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -1
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +1 -1
- package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
- package/src/components/sidebar-navigation-screen-template/index.js +1 -1
- package/src/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
- package/src/components/sidebar-navigation-screen-templates-browse/index.js +5 -3
- package/src/components/start-template-options/index.js +1 -1
- package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +173 -0
- package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +68 -1
- package/src/style.scss +2 -2
- package/build/components/global-styles/font-library-modal/collection-font-details.js +0 -50
- package/build/components/global-styles/font-library-modal/collection-font-details.js.map +0 -1
- package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js +0 -30
- package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js.map +0 -1
- package/build/components/global-styles/font-library-modal/library-font-card.js +0 -39
- package/build/components/global-styles/font-library-modal/library-font-card.js.map +0 -1
- package/build/components/global-styles/font-library-modal/tab-panel-layout.js +0 -67
- package/build/components/global-styles/font-library-modal/tab-panel-layout.js.map +0 -1
- package/build/components/global-styles/preview.js +0 -271
- package/build/components/global-styles/preview.js.map +0 -1
- package/build/components/global-styles/typogrphy-elements.js.map +0 -1
- package/build/components/global-styles/variations-panel.js.map +0 -1
- package/build/components/list/added-by.js.map +0 -1
- package/build/components/list/header.js +0 -55
- package/build/components/list/header.js.map +0 -1
- package/build/components/list/index.js +0 -80
- package/build/components/list/index.js.map +0 -1
- package/build/components/list/table.js +0 -94
- package/build/components/list/table.js.map +0 -1
- package/build/components/list/use-register-shortcuts.js +0 -51
- package/build/components/list/use-register-shortcuts.js.map +0 -1
- package/build/components/sidebar-navigation-screen-main/template-part-hint.js +0 -36
- package/build/components/sidebar-navigation-screen-main/template-part-hint.js.map +0 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +0 -36
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +0 -1
- package/build-module/components/global-styles/font-library-modal/collection-font-details.js +0 -42
- package/build-module/components/global-styles/font-library-modal/collection-font-details.js.map +0 -1
- package/build-module/components/global-styles/font-library-modal/confirm-delete-dialog.js +0 -23
- package/build-module/components/global-styles/font-library-modal/confirm-delete-dialog.js.map +0 -1
- package/build-module/components/global-styles/font-library-modal/library-font-card.js +0 -31
- package/build-module/components/global-styles/font-library-modal/library-font-card.js.map +0 -1
- package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js +0 -60
- package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js.map +0 -1
- package/build-module/components/global-styles/preview.js +0 -264
- package/build-module/components/global-styles/preview.js.map +0 -1
- package/build-module/components/global-styles/typogrphy-elements.js.map +0 -1
- package/build-module/components/global-styles/variations-panel.js.map +0 -1
- package/build-module/components/list/added-by.js.map +0 -1
- package/build-module/components/list/header.js +0 -47
- package/build-module/components/list/header.js.map +0 -1
- package/build-module/components/list/index.js +0 -72
- package/build-module/components/list/index.js.map +0 -1
- package/build-module/components/list/table.js +0 -86
- package/build-module/components/list/table.js.map +0 -1
- package/build-module/components/list/use-register-shortcuts.js +0 -45
- package/build-module/components/list/use-register-shortcuts.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js +0 -29
- package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +0 -27
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +0 -1
- package/src/components/global-styles/font-library-modal/collection-font-details.js +0 -56
- package/src/components/global-styles/font-library-modal/confirm-delete-dialog.js +0 -33
- package/src/components/global-styles/font-library-modal/library-font-card.js +0 -34
- package/src/components/global-styles/font-library-modal/tab-panel-layout.js +0 -85
- package/src/components/global-styles/preview.js +0 -327
- package/src/components/list/header.js +0 -48
- package/src/components/list/index.js +0 -87
- package/src/components/list/style.scss +0 -188
- package/src/components/list/table.js +0 -140
- package/src/components/list/use-register-shortcuts.js +0 -49
- package/src/components/sidebar-navigation-screen-main/template-part-hint.js +0 -34
- package/src/components/sidebar-navigation-screen-navigation-menu/edit-button.js +0 -22
- /package/src/components/global-styles/{typogrphy-elements.js → typography-elements.js} +0 -0
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _blockEditor = require("@wordpress/block-editor");
|
|
9
|
-
var _components = require("@wordpress/components");
|
|
10
|
-
var _compose = require("@wordpress/compose");
|
|
11
|
-
var _element = require("@wordpress/element");
|
|
12
|
-
var _lockUnlock = require("../../lock-unlock");
|
|
13
|
-
var _hooks = require("./hooks");
|
|
14
|
-
/**
|
|
15
|
-
* WordPress dependencies
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Internal dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
const {
|
|
23
|
-
useGlobalStyle,
|
|
24
|
-
useGlobalStylesOutput
|
|
25
|
-
} = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
|
|
26
|
-
const firstFrame = {
|
|
27
|
-
start: {
|
|
28
|
-
scale: 1,
|
|
29
|
-
opacity: 1
|
|
30
|
-
},
|
|
31
|
-
hover: {
|
|
32
|
-
scale: 0,
|
|
33
|
-
opacity: 0
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const midFrame = {
|
|
37
|
-
hover: {
|
|
38
|
-
opacity: 1
|
|
39
|
-
},
|
|
40
|
-
start: {
|
|
41
|
-
opacity: 0.5
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
const secondFrame = {
|
|
45
|
-
hover: {
|
|
46
|
-
scale: 1,
|
|
47
|
-
opacity: 1
|
|
48
|
-
},
|
|
49
|
-
start: {
|
|
50
|
-
scale: 0,
|
|
51
|
-
opacity: 0
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
const normalizedWidth = 248;
|
|
55
|
-
const normalizedHeight = 152;
|
|
56
|
-
const normalizedColorSwatchSize = 32;
|
|
57
|
-
|
|
58
|
-
// Throttle options for useThrottle. Must be defined outside of the component,
|
|
59
|
-
// so that the object reference is the same on each render.
|
|
60
|
-
const THROTTLE_OPTIONS = {
|
|
61
|
-
leading: true,
|
|
62
|
-
trailing: true
|
|
63
|
-
};
|
|
64
|
-
const StylesPreview = ({
|
|
65
|
-
label,
|
|
66
|
-
isFocused,
|
|
67
|
-
withHoverView
|
|
68
|
-
}) => {
|
|
69
|
-
const [fontWeight] = useGlobalStyle('typography.fontWeight');
|
|
70
|
-
const [fontFamily = 'serif'] = useGlobalStyle('typography.fontFamily');
|
|
71
|
-
const [headingFontFamily = fontFamily] = useGlobalStyle('elements.h1.typography.fontFamily');
|
|
72
|
-
const [headingFontWeight = fontWeight] = useGlobalStyle('elements.h1.typography.fontWeight');
|
|
73
|
-
const [textColor = 'black'] = useGlobalStyle('color.text');
|
|
74
|
-
const [headingColor = textColor] = useGlobalStyle('elements.h1.color.text');
|
|
75
|
-
const [backgroundColor = 'white'] = useGlobalStyle('color.background');
|
|
76
|
-
const [gradientValue] = useGlobalStyle('color.gradient');
|
|
77
|
-
const [styles] = useGlobalStylesOutput();
|
|
78
|
-
const disableMotion = (0, _compose.useReducedMotion)();
|
|
79
|
-
const [isHovered, setIsHovered] = (0, _element.useState)(false);
|
|
80
|
-
const [containerResizeListener, {
|
|
81
|
-
width
|
|
82
|
-
}] = (0, _compose.useResizeObserver)();
|
|
83
|
-
const [throttledWidth, setThrottledWidthState] = (0, _element.useState)(width);
|
|
84
|
-
const [ratioState, setRatioState] = (0, _element.useState)();
|
|
85
|
-
const setThrottledWidth = (0, _compose.useThrottle)(setThrottledWidthState, 250, THROTTLE_OPTIONS);
|
|
86
|
-
|
|
87
|
-
// Must use useLayoutEffect to avoid a flash of the iframe at the wrong
|
|
88
|
-
// size before the width is set.
|
|
89
|
-
(0, _element.useLayoutEffect)(() => {
|
|
90
|
-
if (width) {
|
|
91
|
-
setThrottledWidth(width);
|
|
92
|
-
}
|
|
93
|
-
}, [width, setThrottledWidth]);
|
|
94
|
-
|
|
95
|
-
// Must use useLayoutEffect to avoid a flash of the iframe at the wrong
|
|
96
|
-
// size before the width is set.
|
|
97
|
-
(0, _element.useLayoutEffect)(() => {
|
|
98
|
-
const newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;
|
|
99
|
-
const ratioDiff = newRatio - (ratioState || 0);
|
|
100
|
-
|
|
101
|
-
// Only update the ratio state if the difference is big enough
|
|
102
|
-
// or if the ratio state is not yet set. This is to avoid an
|
|
103
|
-
// endless loop of updates at particular viewport heights when the
|
|
104
|
-
// presence of a scrollbar causes the width to change slightly.
|
|
105
|
-
const isRatioDiffBigEnough = Math.abs(ratioDiff) > 0.1;
|
|
106
|
-
if (isRatioDiffBigEnough || !ratioState) {
|
|
107
|
-
setRatioState(newRatio);
|
|
108
|
-
}
|
|
109
|
-
}, [throttledWidth, ratioState]);
|
|
110
|
-
|
|
111
|
-
// Set a fallbackRatio to use before the throttled ratio has been set.
|
|
112
|
-
const fallbackRatio = width ? width / normalizedWidth : 1;
|
|
113
|
-
// Use the throttled ratio if it has been calculated, otherwise
|
|
114
|
-
// use the fallback ratio. The throttled ratio is used to avoid
|
|
115
|
-
// an endless loop of updates at particular viewport heights.
|
|
116
|
-
// See: https://github.com/WordPress/gutenberg/issues/55112
|
|
117
|
-
const ratio = ratioState ? ratioState : fallbackRatio;
|
|
118
|
-
const {
|
|
119
|
-
paletteColors,
|
|
120
|
-
highlightedColors
|
|
121
|
-
} = (0, _hooks.useStylesPreviewColors)();
|
|
122
|
-
|
|
123
|
-
// Reset leaked styles from WP common.css and remove main content layout padding and border.
|
|
124
|
-
const editorStyles = (0, _element.useMemo)(() => {
|
|
125
|
-
if (styles) {
|
|
126
|
-
return [...styles, {
|
|
127
|
-
css: 'html{overflow:hidden}body{min-width: 0;padding: 0;border: none;}',
|
|
128
|
-
isGlobalStyles: true
|
|
129
|
-
}];
|
|
130
|
-
}
|
|
131
|
-
return styles;
|
|
132
|
-
}, [styles]);
|
|
133
|
-
const isReady = !!width;
|
|
134
|
-
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)("div", {
|
|
135
|
-
style: {
|
|
136
|
-
position: 'relative'
|
|
137
|
-
}
|
|
138
|
-
}, containerResizeListener), isReady && (0, _react.createElement)(_blockEditor.__unstableIframe, {
|
|
139
|
-
className: "edit-site-global-styles-preview__iframe",
|
|
140
|
-
style: {
|
|
141
|
-
width: '100%',
|
|
142
|
-
height: normalizedHeight * ratio
|
|
143
|
-
},
|
|
144
|
-
onMouseEnter: () => setIsHovered(true),
|
|
145
|
-
onMouseLeave: () => setIsHovered(false),
|
|
146
|
-
tabIndex: -1
|
|
147
|
-
}, (0, _react.createElement)(_blockEditor.__unstableEditorStyles, {
|
|
148
|
-
styles: editorStyles
|
|
149
|
-
}), (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
150
|
-
style: {
|
|
151
|
-
height: normalizedHeight * ratio,
|
|
152
|
-
width: '100%',
|
|
153
|
-
background: gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor,
|
|
154
|
-
cursor: withHoverView ? 'pointer' : undefined
|
|
155
|
-
},
|
|
156
|
-
initial: "start",
|
|
157
|
-
animate: (isHovered || isFocused) && !disableMotion && label ? 'hover' : 'start'
|
|
158
|
-
}, (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
159
|
-
variants: firstFrame,
|
|
160
|
-
style: {
|
|
161
|
-
height: '100%',
|
|
162
|
-
overflow: 'hidden'
|
|
163
|
-
}
|
|
164
|
-
}, (0, _react.createElement)(_components.__experimentalHStack, {
|
|
165
|
-
spacing: 10 * ratio,
|
|
166
|
-
justify: "center",
|
|
167
|
-
style: {
|
|
168
|
-
height: '100%',
|
|
169
|
-
overflow: 'hidden'
|
|
170
|
-
}
|
|
171
|
-
}, (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
172
|
-
style: {
|
|
173
|
-
fontFamily: headingFontFamily,
|
|
174
|
-
fontSize: 65 * ratio,
|
|
175
|
-
color: headingColor,
|
|
176
|
-
fontWeight: headingFontWeight
|
|
177
|
-
},
|
|
178
|
-
animate: {
|
|
179
|
-
scale: 1,
|
|
180
|
-
opacity: 1
|
|
181
|
-
},
|
|
182
|
-
initial: {
|
|
183
|
-
scale: 0.1,
|
|
184
|
-
opacity: 0
|
|
185
|
-
},
|
|
186
|
-
transition: {
|
|
187
|
-
delay: 0.3,
|
|
188
|
-
type: 'tween'
|
|
189
|
-
}
|
|
190
|
-
}, "Aa"), (0, _react.createElement)(_components.__experimentalVStack, {
|
|
191
|
-
spacing: 4 * ratio
|
|
192
|
-
}, highlightedColors.map(({
|
|
193
|
-
slug,
|
|
194
|
-
color
|
|
195
|
-
}, index) => (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
196
|
-
key: slug,
|
|
197
|
-
style: {
|
|
198
|
-
height: normalizedColorSwatchSize * ratio,
|
|
199
|
-
width: normalizedColorSwatchSize * ratio,
|
|
200
|
-
background: color,
|
|
201
|
-
borderRadius: normalizedColorSwatchSize * ratio / 2
|
|
202
|
-
},
|
|
203
|
-
animate: {
|
|
204
|
-
scale: 1,
|
|
205
|
-
opacity: 1
|
|
206
|
-
},
|
|
207
|
-
initial: {
|
|
208
|
-
scale: 0.1,
|
|
209
|
-
opacity: 0
|
|
210
|
-
},
|
|
211
|
-
transition: {
|
|
212
|
-
delay: index === 1 ? 0.2 : 0.1
|
|
213
|
-
}
|
|
214
|
-
}))))), (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
215
|
-
variants: withHoverView && midFrame,
|
|
216
|
-
style: {
|
|
217
|
-
height: '100%',
|
|
218
|
-
width: '100%',
|
|
219
|
-
position: 'absolute',
|
|
220
|
-
top: 0,
|
|
221
|
-
overflow: 'hidden',
|
|
222
|
-
filter: 'blur(60px)',
|
|
223
|
-
opacity: 0.1
|
|
224
|
-
}
|
|
225
|
-
}, (0, _react.createElement)(_components.__experimentalHStack, {
|
|
226
|
-
spacing: 0,
|
|
227
|
-
justify: "flex-start",
|
|
228
|
-
style: {
|
|
229
|
-
height: '100%',
|
|
230
|
-
overflow: 'hidden'
|
|
231
|
-
}
|
|
232
|
-
}, paletteColors.slice(0, 4).map(({
|
|
233
|
-
color
|
|
234
|
-
}, index) => (0, _react.createElement)("div", {
|
|
235
|
-
key: index,
|
|
236
|
-
style: {
|
|
237
|
-
height: '100%',
|
|
238
|
-
background: color,
|
|
239
|
-
flexGrow: 1
|
|
240
|
-
}
|
|
241
|
-
})))), (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
242
|
-
variants: secondFrame,
|
|
243
|
-
style: {
|
|
244
|
-
height: '100%',
|
|
245
|
-
width: '100%',
|
|
246
|
-
overflow: 'hidden',
|
|
247
|
-
position: 'absolute',
|
|
248
|
-
top: 0
|
|
249
|
-
}
|
|
250
|
-
}, (0, _react.createElement)(_components.__experimentalVStack, {
|
|
251
|
-
spacing: 3 * ratio,
|
|
252
|
-
justify: "center",
|
|
253
|
-
style: {
|
|
254
|
-
height: '100%',
|
|
255
|
-
overflow: 'hidden',
|
|
256
|
-
padding: 10 * ratio,
|
|
257
|
-
boxSizing: 'border-box'
|
|
258
|
-
}
|
|
259
|
-
}, label && (0, _react.createElement)("div", {
|
|
260
|
-
style: {
|
|
261
|
-
fontSize: 40 * ratio,
|
|
262
|
-
fontFamily: headingFontFamily,
|
|
263
|
-
color: headingColor,
|
|
264
|
-
fontWeight: headingFontWeight,
|
|
265
|
-
lineHeight: '1em',
|
|
266
|
-
textAlign: 'center'
|
|
267
|
-
}
|
|
268
|
-
}, label))))));
|
|
269
|
-
};
|
|
270
|
-
var _default = exports.default = StylesPreview;
|
|
271
|
-
//# sourceMappingURL=preview.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_blockEditor","require","_components","_compose","_element","_lockUnlock","_hooks","useGlobalStyle","useGlobalStylesOutput","unlock","blockEditorPrivateApis","firstFrame","start","scale","opacity","hover","midFrame","secondFrame","normalizedWidth","normalizedHeight","normalizedColorSwatchSize","THROTTLE_OPTIONS","leading","trailing","StylesPreview","label","isFocused","withHoverView","fontWeight","fontFamily","headingFontFamily","headingFontWeight","textColor","headingColor","backgroundColor","gradientValue","styles","disableMotion","useReducedMotion","isHovered","setIsHovered","useState","containerResizeListener","width","useResizeObserver","throttledWidth","setThrottledWidthState","ratioState","setRatioState","setThrottledWidth","useThrottle","useLayoutEffect","newRatio","ratioDiff","isRatioDiffBigEnough","Math","abs","fallbackRatio","ratio","paletteColors","highlightedColors","useStylesPreviewColors","editorStyles","useMemo","css","isGlobalStyles","isReady","_react","createElement","Fragment","style","position","__unstableIframe","className","height","onMouseEnter","onMouseLeave","tabIndex","__unstableEditorStyles","__unstableMotion","div","background","cursor","undefined","initial","animate","variants","overflow","__experimentalHStack","spacing","justify","fontSize","color","transition","delay","type","__experimentalVStack","map","slug","index","key","borderRadius","top","filter","slice","flexGrow","padding","boxSizing","lineHeight","textAlign","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/preview.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__unstableIframe as Iframe,\n\t__unstableEditorStyles as EditorStyles,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport {\n\t__unstableMotion as motion,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport {\n\tuseThrottle,\n\tuseReducedMotion,\n\tuseResizeObserver,\n} from '@wordpress/compose';\nimport { useLayoutEffect, useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useStylesPreviewColors } from './hooks';\n\nconst { useGlobalStyle, useGlobalStylesOutput } = unlock(\n\tblockEditorPrivateApis\n);\n\nconst firstFrame = {\n\tstart: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\thover: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\nconst midFrame = {\n\thover: {\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\topacity: 0.5,\n\t},\n};\n\nconst secondFrame = {\n\thover: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\nconst normalizedWidth = 248;\nconst normalizedHeight = 152;\n\nconst normalizedColorSwatchSize = 32;\n\n// Throttle options for useThrottle. Must be defined outside of the component,\n// so that the object reference is the same on each render.\nconst THROTTLE_OPTIONS = {\n\tleading: true,\n\ttrailing: true,\n};\n\nconst StylesPreview = ( { label, isFocused, withHoverView } ) => {\n\tconst [ fontWeight ] = useGlobalStyle( 'typography.fontWeight' );\n\tconst [ fontFamily = 'serif' ] = useGlobalStyle( 'typography.fontFamily' );\n\tconst [ headingFontFamily = fontFamily ] = useGlobalStyle(\n\t\t'elements.h1.typography.fontFamily'\n\t);\n\tconst [ headingFontWeight = fontWeight ] = useGlobalStyle(\n\t\t'elements.h1.typography.fontWeight'\n\t);\n\tconst [ textColor = 'black' ] = useGlobalStyle( 'color.text' );\n\tconst [ headingColor = textColor ] = useGlobalStyle(\n\t\t'elements.h1.color.text'\n\t);\n\tconst [ backgroundColor = 'white' ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( 'color.gradient' );\n\tconst [ styles ] = useGlobalStylesOutput();\n\tconst disableMotion = useReducedMotion();\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ containerResizeListener, { width } ] = useResizeObserver();\n\tconst [ throttledWidth, setThrottledWidthState ] = useState( width );\n\tconst [ ratioState, setRatioState ] = useState();\n\n\tconst setThrottledWidth = useThrottle(\n\t\tsetThrottledWidthState,\n\t\t250,\n\t\tTHROTTLE_OPTIONS\n\t);\n\n\t// Must use useLayoutEffect to avoid a flash of the iframe at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tif ( width ) {\n\t\t\tsetThrottledWidth( width );\n\t\t}\n\t}, [ width, setThrottledWidth ] );\n\n\t// Must use useLayoutEffect to avoid a flash of the iframe at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tconst newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;\n\t\tconst ratioDiff = newRatio - ( ratioState || 0 );\n\n\t\t// Only update the ratio state if the difference is big enough\n\t\t// or if the ratio state is not yet set. This is to avoid an\n\t\t// endless loop of updates at particular viewport heights when the\n\t\t// presence of a scrollbar causes the width to change slightly.\n\t\tconst isRatioDiffBigEnough = Math.abs( ratioDiff ) > 0.1;\n\n\t\tif ( isRatioDiffBigEnough || ! ratioState ) {\n\t\t\tsetRatioState( newRatio );\n\t\t}\n\t}, [ throttledWidth, ratioState ] );\n\n\t// Set a fallbackRatio to use before the throttled ratio has been set.\n\tconst fallbackRatio = width ? width / normalizedWidth : 1;\n\t// Use the throttled ratio if it has been calculated, otherwise\n\t// use the fallback ratio. The throttled ratio is used to avoid\n\t// an endless loop of updates at particular viewport heights.\n\t// See: https://github.com/WordPress/gutenberg/issues/55112\n\tconst ratio = ratioState ? ratioState : fallbackRatio;\n\n\tconst { paletteColors, highlightedColors } = useStylesPreviewColors();\n\n\t// Reset leaked styles from WP common.css and remove main content layout padding and border.\n\tconst editorStyles = useMemo( () => {\n\t\tif ( styles ) {\n\t\t\treturn [\n\t\t\t\t...styles,\n\t\t\t\t{\n\t\t\t\t\tcss: 'html{overflow:hidden}body{min-width: 0;padding: 0;border: none;}',\n\t\t\t\t\tisGlobalStyles: true,\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn styles;\n\t}, [ styles ] );\n\tconst isReady = !! width;\n\n\treturn (\n\t\t<>\n\t\t\t<div style={ { position: 'relative' } }>\n\t\t\t\t{ containerResizeListener }\n\t\t\t</div>\n\t\t\t{ isReady && (\n\t\t\t\t<Iframe\n\t\t\t\t\tclassName=\"edit-site-global-styles-preview__iframe\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t} }\n\t\t\t\t\tonMouseEnter={ () => setIsHovered( true ) }\n\t\t\t\t\tonMouseLeave={ () => setIsHovered( false ) }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t>\n\t\t\t\t\t<EditorStyles styles={ editorStyles } />\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\t\t\t\tcursor: withHoverView ? 'pointer' : undefined,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tinitial=\"start\"\n\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\t( isHovered || isFocused ) &&\n\t\t\t\t\t\t\t! disableMotion &&\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t? 'hover'\n\t\t\t\t\t\t\t\t: 'start'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tvariants={ firstFrame }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\t\tfontSize: 65 * ratio,\n\t\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tanimate={ { scale: 1, opacity: 1 } }\n\t\t\t\t\t\t\t\t\tinitial={ { scale: 0.1, opacity: 0 } }\n\t\t\t\t\t\t\t\t\ttransition={ { delay: 0.3, type: 'tween' } }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tAa\n\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 * ratio }>\n\t\t\t\t\t\t\t\t\t{ highlightedColors.map(\n\t\t\t\t\t\t\t\t\t\t( { slug, color }, index ) => (\n\t\t\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnormalizedColorSwatchSize *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tratio,\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnormalizedColorSwatchSize *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tratio,\n\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t( normalizedColorSwatchSize *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tratio ) /\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\tinitial={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\tscale: 0.1,\n\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\tdelay:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex === 1 ? 0.2 : 0.1,\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tvariants={ withHoverView && midFrame }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tfilter: 'blur(60px)',\n\t\t\t\t\t\t\t\topacity: 0.1,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ paletteColors\n\t\t\t\t\t\t\t\t\t.slice( 0, 4 )\n\t\t\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\t\t\tflexGrow: 1,\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tvariants={ secondFrame }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\tspacing={ 3 * ratio }\n\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t\tpadding: 10 * ratio,\n\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ label && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\tfontSize: 40 * ratio,\n\t\t\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\t\t\tlineHeight: '1em',\n\t\t\t\t\t\t\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t</motion.div>\n\t\t\t\t</Iframe>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nexport default StylesPreview;\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAxBA;AACA;AACA;;AAkBA;AACA;AACA;;AAIA,MAAM;EAAEM,cAAc;EAAEC;AAAs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,OAAA,GAEaxF,aAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_blockEditor","_navigationButton","_subtitle","_interopRequireDefault","_lockUnlock","useGlobalStyle","unlock","blockEditorPrivateApis","ElementItem","parentMenu","element","label","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","gradientValue","color","navigationButtonLabel","sprintf","__","_react","createElement","NavigationButtonAsItem","path","__experimentalHStack","justify","FlexItem","className","style","background","TypographyElements","__experimentalVStack","spacing","default","level","__experimentalItemGroup","isBordered","isSeparated","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/typogrphy-elements.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\n\nimport { unlock } from '../../lock-unlock';\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ElementItem( { parentMenu, element, label } ) {\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\tconst [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );\n\tconst [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing'\n\t);\n\tconst [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text' );\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.\n\t\t__( 'Typography %s styles' ),\n\t\tlabel\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ parentMenu + '/typography/' + element }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\tletterSpacing,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction TypographyElements() {\n\tconst parentMenu = '';\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"text\"\n\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"link\"\n\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"heading\"\n\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"caption\"\n\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"button\"\n\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t/>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default TypographyElements;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAC,sBAAA,CAAAL,OAAA;AAEA,IAAAM,WAAA,GAAAN,OAAA;AAlBA;AACA;AACA;;AAUA;AACA;AACA;;AAKA,MAAM;EAAEO;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE3D,SAASC,WAAWA,CAAE;EAAEC,UAAU;EAAEC,OAAO;EAAEC;AAAM,CAAC,EAAG;EACtD,MAAMC,MAAM,GACXF,OAAO,KAAK,MAAM,IAAI,CAAEA,OAAO,GAAG,EAAE,GAAI,YAAYA,OAAS,GAAE;EAChE,MAAMG,WAAW,GAChBH,OAAO,KAAK,MAAM,GACf;IACAI,cAAc,EAAE;EAChB,CAAC,GACD,CAAC,CAAC;EACN,MAAM,CAAEC,UAAU,CAAE,GAAGV,cAAc,CAAEO,MAAM,GAAG,uBAAwB,CAAC;EACzE,MAAM,CAAEI,SAAS,CAAE,GAAGX,cAAc,CAAEO,MAAM,GAAG,sBAAuB,CAAC;EACvE,MAAM,CAAEK,UAAU,CAAE,GAAGZ,cAAc,CAAEO,MAAM,GAAG,uBAAwB,CAAC;EACzE,MAAM,CAAEM,aAAa,CAAE,GAAGb,cAAc,CACvCO,MAAM,GAAG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A,EAACxB,SAAA,CAAAoC,OAAQ;IAACC,KAAK,EAAG;EAAG,GAAG,IAAAf,QAAE,EAAE,UAAW,CAAa,CAAC,EACrD,IAAAC,MAAA,CAAAC,aAAA,EAAC3B,WAAA,CAAAyC,uBAAS;IAACC,UAAU;IAACC,WAAW;EAAA,GAChC,IAAAjB,MAAA,CAAAC,aAAA,EAAClB,WAAW;IACXC,UAAU,EAAGA,UAAY;IACzBC,OAAO,EAAC,MAAM;IACdC,KAAK,EAAG,IAAAa,QAAE,EAAE,MAAO;EAAG,CACtB,CAAC,EACF,IAAAC,MAAA,CAAAC,aAAA,EAAClB,WAAW;IACXC,UAAU,EAAGA,UAAY;IACzBC,OAAO,EAAC,MAAM;IACdC,KAAK,EAAG,IAAAa,QAAE,EAAE,OAAQ;EAAG,CACvB,CAAC,EACF,IAAAC,MAAA,CAAAC,aAAA,EAAClB,WAAW;IACXC,UAAU,EAAGA,UAAY;IACzBC,OAAO,EAAC,SAAS;IACjBC,KAAK,EAAG,IAAAa,QAAE,EAAE,UAAW;EAAG,CAC1B,CAAC,EACF,IAAAC,MAAA,CAAAC,aAAA,EAAClB,WAAW;IACXC,UAAU,EAAGA,UAAY;IACzBC,OAAO,EAAC,SAAS;IACjBC,KAAK,EAAG,IAAAa,QAAE,EAAE,UAAW;EAAG,CAC1B,CAAC,EACF,IAAAC,MAAA,CAAAC,aAAA,EAAClB,WAAW;IACXC,UAAU,EAAGA,UAAY;IACzBC,OAAO,EAAC,QAAQ;IAChBC,KAAK,EAAG,IAAAa,QAAE,EAAE,SAAU;EAAG,CACzB,CACS,CACJ,CAAC;AAEX;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAAN,OAAA,GAEcH,kBAAkB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","_data","_components","_navigationButton","getCoreBlockStyles","blockStyles","filter","style","source","useBlockVariations","name","useSelect","select","getBlockStyles","blocksStore","coreBlockStyles","VariationsPanel","_react","createElement","__experimentalItemGroup","isBordered","isSeparated","map","index","isDefault","NavigationButtonAsItem","key","path","encodeURIComponent","label"],"sources":["@wordpress/edit-site/src/components/global-styles/variations-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\n\nimport { NavigationButtonAsItem } from './navigation-button';\n\nfunction getCoreBlockStyles( blockStyles ) {\n\treturn blockStyles?.filter( ( style ) => style.source === 'block' );\n}\n\nexport function useBlockVariations( name ) {\n\tconst blockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst coreBlockStyles = getCoreBlockStyles( blockStyles );\n\treturn coreBlockStyles;\n}\n\nexport function VariationsPanel( { name } ) {\n\tconst coreBlockStyles = useBlockVariations( name );\n\n\treturn (\n\t\t<ItemGroup isBordered isSeparated>\n\t\t\t{ coreBlockStyles.map( ( style, index ) => {\n\t\t\t\tif ( style?.isDefault ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\tencodeURIComponent( name ) +\n\t\t\t\t\t\t\t'/variations/' +\n\t\t\t\t\t\t\tencodeURIComponent( style.name )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ style.label }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ style.label }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ItemGroup>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IA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version":3,"names":["_classnames","_interopRequireDefault","require","_components","_coreData","_data","_element","_icons","_i18n","_constants","useAddedBy","postType","postId","useSelect","select","getEntityRecord","getMedia","getUser","getEditedEntityRecord","coreStore","template","originalSource","original_source","authorText","author_text","type","icon","themeIcon","text","isCustomized","source","TEMPLATE_ORIGINS","custom","pluginIcon","siteData","globeIcon","imageUrl","site_logo","source_url","undefined","user","author","authorIcon","avatar_urls","AvatarImage","isImageLoaded","setIsImageLoaded","useState","_react","createElement","className","classnames","onLoad","alt","src","AddedBy","__experimentalHStack","alignment","Icon","TEMPLATE_POST_TYPE","_x"],"sources":["@wordpress/edit-site/src/components/list/added-by.js"],"sourcesContent":["// @ts-check\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, __experimentalHStack as HStack } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport {\n\tcommentAuthorAvatar as authorIcon,\n\tlayout as themeIcon,\n\tplugins as pluginIcon,\n\tglobe as globeIcon,\n} from '@wordpress/icons';\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE, TEMPLATE_ORIGINS } from '../../utils/constants';\n\n/** @typedef {'wp_template'|'wp_template_part'} TemplateType */\n\n/**\n * @typedef {'theme'|'plugin'|'site'|'user'} AddedByType\n *\n * @typedef AddedByData\n * @type {Object}\n * @property {AddedByType} type The type of the data.\n * @property {JSX.Element} icon The icon to display.\n * @property {string} [imageUrl] The optional image URL to display.\n * @property {string} [text] The text to display.\n * @property {boolean} isCustomized Whether the template has been customized.\n *\n * @param {TemplateType} postType The template post type.\n * @param {number} postId The template post id.\n * @return {AddedByData} The added by object or null.\n */\nexport function useAddedBy( postType, postId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetMedia,\n\t\t\t\tgetUser,\n\t\t\t\tgetEditedEntityRecord,\n\t\t\t} = select( coreStore );\n\t\t\tconst template = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tconst originalSource = template?.original_source;\n\t\t\tconst authorText = template?.author_text;\n\n\t\t\tswitch ( originalSource ) {\n\t\t\t\tcase 'theme': {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: originalSource,\n\t\t\t\t\t\ticon: themeIcon,\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized:\n\t\t\t\t\t\t\ttemplate.source === TEMPLATE_ORIGINS.custom,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tcase 'plugin': {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: originalSource,\n\t\t\t\t\t\ticon: pluginIcon,\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized:\n\t\t\t\t\t\t\ttemplate.source === TEMPLATE_ORIGINS.custom,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tcase 'site': {\n\t\t\t\t\tconst siteData = getEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'__unstableBase'\n\t\t\t\t\t);\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: originalSource,\n\t\t\t\t\t\ticon: globeIcon,\n\t\t\t\t\t\timageUrl: siteData?.site_logo\n\t\t\t\t\t\t\t? getMedia( siteData.site_logo )?.source_url\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tconst user = getUser( template.author );\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'user',\n\t\t\t\t\t\ticon: authorIcon,\n\t\t\t\t\t\timageUrl: user?.avatar_urls?.[ 48 ],\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[ postType, postId ]\n\t);\n}\n\n/**\n * @param {Object} props\n * @param {string} props.imageUrl\n */\nexport function AvatarImage( { imageUrl } ) {\n\tconst [ isImageLoaded, setIsImageLoaded ] = useState( false );\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-list-added-by__avatar', {\n\t\t\t\t'is-loaded': isImageLoaded,\n\t\t\t} ) }\n\t\t>\n\t\t\t<img\n\t\t\t\tonLoad={ () => setIsImageLoaded( true ) }\n\t\t\t\talt=\"\"\n\t\t\t\tsrc={ imageUrl }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\n/**\n * @param {Object} props\n * @param {TemplateType} props.postType The template post type.\n * @param {number} props.postId The template post id.\n */\nexport default function AddedBy( { postType, postId } ) {\n\tconst { text, icon, imageUrl, isCustomized } = useAddedBy(\n\t\tpostType,\n\t\tpostId\n\t);\n\n\treturn (\n\t\t<HStack alignment=\"left\">\n\t\t\t{ imageUrl ? (\n\t\t\t\t<AvatarImage imageUrl={ imageUrl } />\n\t\t\t) : (\n\t\t\t\t<div className=\"edit-site-list-added-by__icon\">\n\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span>\n\t\t\t\t{ text }\n\t\t\t\t{ isCustomized && (\n\t\t\t\t\t<span className=\"edit-site-list-added-by__customized-info\">\n\t\t\t\t\t\t{ postType === TEMPLATE_POST_TYPE\n\t\t\t\t\t\t\t? _x( 'Customized', 'template' )\n\t\t\t\t\t\t\t: _x( 'Customized', 'template part' ) }\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</span>\n\t\t</HStack>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAIA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,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rBrB,QAAQ,GACT,IAAAY,MAAA,CAAAC,aAAA,EAACL,WAAW;IAACR,QAAQ,EAAGA;EAAU,CAAE,CAAC,GAErC,IAAAY,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAA+B,GAC7C,IAAAF,MAAA,CAAAC,aAAA,EAAC9C,WAAA,CAAAuD,IAAI;IAAChC,IAAI,EAAGA;EAAM,CAAE,CACjB,CACL,EACD,IAAAsB,MAAA,CAAAC,aAAA,gBACGrB,IAAI,EACJC,YAAY,IACb,IAAAmB,MAAA,CAAAC,aAAA;IAAMC,SAAS,EAAC;EAA0C,GACvDvC,QAAQ,KAAKgD,6BAAkB,GAC9B,IAAAC,QAAE,EAAE,YAAY,EAAE,UAAW,CAAC,GAC9B,IAAAA,QAAE,EAAE,YAAY,EAAE,eAAgB,CAChC,CAEF,CACC,CAAC;AAEX"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = Header;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _data = require("@wordpress/data");
|
|
10
|
-
var _coreData = require("@wordpress/core-data");
|
|
11
|
-
var _components = require("@wordpress/components");
|
|
12
|
-
var _addNewTemplate = _interopRequireDefault(require("../add-new-template"));
|
|
13
|
-
var _store = require("../../store");
|
|
14
|
-
/**
|
|
15
|
-
* WordPress dependencies
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Internal dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
function Header({
|
|
23
|
-
templateType
|
|
24
|
-
}) {
|
|
25
|
-
const {
|
|
26
|
-
canCreate,
|
|
27
|
-
postType
|
|
28
|
-
} = (0, _data.useSelect)(select => {
|
|
29
|
-
const {
|
|
30
|
-
supportsTemplatePartsMode
|
|
31
|
-
} = select(_store.store).getSettings();
|
|
32
|
-
return {
|
|
33
|
-
postType: select(_coreData.store).getPostType(templateType),
|
|
34
|
-
canCreate: !supportsTemplatePartsMode
|
|
35
|
-
};
|
|
36
|
-
}, [templateType]);
|
|
37
|
-
if (!postType) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
return (0, _react.createElement)("header", {
|
|
41
|
-
className: "edit-site-list-header"
|
|
42
|
-
}, (0, _react.createElement)(_components.__experimentalHeading, {
|
|
43
|
-
level: 1,
|
|
44
|
-
className: "edit-site-list-header__title"
|
|
45
|
-
}, postType.labels?.name), canCreate && (0, _react.createElement)("div", {
|
|
46
|
-
className: "edit-site-list-header__right"
|
|
47
|
-
}, (0, _react.createElement)(_addNewTemplate.default, {
|
|
48
|
-
templateType: templateType,
|
|
49
|
-
showIcon: false,
|
|
50
|
-
toggleProps: {
|
|
51
|
-
variant: 'primary'
|
|
52
|
-
}
|
|
53
|
-
})));
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_coreData","_components","_addNewTemplate","_interopRequireDefault","_store","Header","templateType","canCreate","postType","useSelect","select","supportsTemplatePartsMode","editSiteStore","getSettings","coreStore","getPostType","_react","createElement","className","__experimentalHeading","level","labels","name","default","showIcon","toggleProps","variant"],"sources":["@wordpress/edit-site/src/components/list/header.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalHeading as Heading } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport AddNewTemplate from '../add-new-template';\nimport { store as editSiteStore } from '../../store';\n\nexport default function Header( { templateType } ) {\n\tconst { canCreate, postType } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { supportsTemplatePartsMode } =\n\t\t\t\tselect( editSiteStore ).getSettings();\n\t\t\treturn {\n\t\t\t\tpostType: select( coreStore ).getPostType( templateType ),\n\t\t\t\tcanCreate: ! supportsTemplatePartsMode,\n\t\t\t};\n\t\t},\n\t\t[ templateType ]\n\t);\n\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<header className=\"edit-site-list-header\">\n\t\t\t<Heading level={ 1 } className=\"edit-site-list-header__title\">\n\t\t\t\t{ postType.labels?.name }\n\t\t\t</Heading>\n\n\t\t\t{ canCreate && (\n\t\t\t\t<div className=\"edit-site-list-header__right\">\n\t\t\t\t\t<AddNewTemplate\n\t\t\t\t\t\ttemplateType={ templateType }\n\t\t\t\t\t\tshowIcon={ false }\n\t\t\t\t\t\ttoggleProps={ { variant: 'primary' } }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</header>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAXA;AACA;AACA;;AAKA;AACA;AACA;;AAIe,SAASM,MAAMA,CAAE;EAAEC;AAAa,CAAC,EAAG;EAClD,MAAM;IAAEC,SAAS;IAAEC;EAAS,CAAC,GAAG,IAAAC,eAAS,EACtCC,MAAM,IAAM;IACb,MAAM;MAAEC;IAA0B,CAAC,GAClCD,MAAM,CAAEE,YAAc,CAAC,CAACC,WAAW,CAAC,CAAC;IACtC,OAAO;MACNL,QAAQ,EAAEE,MAAM,CAAEI,eAAU,CAAC,CAACC,WAAW,CAAET,YAAa,CAAC;MACzDC,SAAS,EAAE,CAAEI;IACd,CAAC;EACF,CAAC,EACD,CAAEL,YAAY,CACf,CAAC;EAED,IAAK,CAAEE,QAAQ,EAAG;IACjB,OAAO,IAAI;EACZ;EAEA,OACC,IAAAQ,MAAA,CAAAC,aAAA;IAAQC,SAAS,EAAC;EAAuB,GACxC,IAAAF,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAkB,qBAAO;IAACC,KAAK,EAAG,CAAG;IAACF,SAAS,EAAC;EAA8B,GAC1DV,QAAQ,CAACa,MAAM,EAAEC,IACX,CAAC,EAERf,SAAS,IACV,IAAAS,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAA8B,GAC5C,IAAAF,MAAA,CAAAC,aAAA,EAACf,eAAA,CAAAqB,OAAc;IACdjB,YAAY,EAAGA,YAAc;IAC7BkB,QAAQ,EAAG,KAAO;IAClBC,WAAW,EAAG;MAAEC,OAAO,EAAE;IAAU;EAAG,CACtC,CACG,CAEC,CAAC;AAEX"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = List;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _coreData = require("@wordpress/core-data");
|
|
10
|
-
var _data = require("@wordpress/data");
|
|
11
|
-
var _interface = require("@wordpress/interface");
|
|
12
|
-
var _i18n = require("@wordpress/i18n");
|
|
13
|
-
var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
|
|
14
|
-
var _editor = require("@wordpress/editor");
|
|
15
|
-
var _router = require("@wordpress/router");
|
|
16
|
-
var _useRegisterShortcuts = _interopRequireDefault(require("./use-register-shortcuts"));
|
|
17
|
-
var _header = _interopRequireDefault(require("./header"));
|
|
18
|
-
var _table = _interopRequireDefault(require("./table"));
|
|
19
|
-
var _useTitle = _interopRequireDefault(require("../routes/use-title"));
|
|
20
|
-
var _lockUnlock = require("../../lock-unlock");
|
|
21
|
-
var _constants = require("../../utils/constants");
|
|
22
|
-
/**
|
|
23
|
-
* WordPress dependencies
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Internal dependencies
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
const {
|
|
31
|
-
useLocation
|
|
32
|
-
} = (0, _lockUnlock.unlock)(_router.privateApis);
|
|
33
|
-
function List() {
|
|
34
|
-
const {
|
|
35
|
-
params: {
|
|
36
|
-
path
|
|
37
|
-
}
|
|
38
|
-
} = useLocation();
|
|
39
|
-
const templateType = path === '/wp_template/all' ? _constants.TEMPLATE_POST_TYPE : _constants.TEMPLATE_PART_POST_TYPE;
|
|
40
|
-
(0, _useRegisterShortcuts.default)();
|
|
41
|
-
const {
|
|
42
|
-
previousShortcut,
|
|
43
|
-
nextShortcut
|
|
44
|
-
} = (0, _data.useSelect)(select => {
|
|
45
|
-
return {
|
|
46
|
-
previousShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/edit-site/previous-region'),
|
|
47
|
-
nextShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/edit-site/next-region')
|
|
48
|
-
};
|
|
49
|
-
}, []);
|
|
50
|
-
const postType = (0, _data.useSelect)(select => select(_coreData.store).getPostType(templateType), [templateType]);
|
|
51
|
-
(0, _useTitle.default)(postType?.labels?.name);
|
|
52
|
-
|
|
53
|
-
// `postType` could load in asynchronously. Only provide the detailed region labels if
|
|
54
|
-
// the postType has loaded, otherwise `InterfaceSkeleton` will fallback to the defaults.
|
|
55
|
-
const itemsListLabel = postType?.labels?.items_list;
|
|
56
|
-
const detailedRegionLabels = postType ? {
|
|
57
|
-
header: (0, _i18n.sprintf)(
|
|
58
|
-
// translators: %s - the name of the page, 'Header' as in the header area of that page.
|
|
59
|
-
(0, _i18n.__)('%s - Header'), itemsListLabel),
|
|
60
|
-
body: (0, _i18n.sprintf)(
|
|
61
|
-
// translators: %s - the name of the page, 'Content' as in the content area of that page.
|
|
62
|
-
(0, _i18n.__)('%s - Content'), itemsListLabel)
|
|
63
|
-
} : undefined;
|
|
64
|
-
return (0, _react.createElement)(_interface.InterfaceSkeleton, {
|
|
65
|
-
className: "edit-site-list",
|
|
66
|
-
labels: detailedRegionLabels,
|
|
67
|
-
header: (0, _react.createElement)(_header.default, {
|
|
68
|
-
templateType: templateType
|
|
69
|
-
}),
|
|
70
|
-
notices: (0, _react.createElement)(_editor.EditorSnackbars, null),
|
|
71
|
-
content: (0, _react.createElement)(_table.default, {
|
|
72
|
-
templateType: templateType
|
|
73
|
-
}),
|
|
74
|
-
shortcuts: {
|
|
75
|
-
previous: previousShortcut,
|
|
76
|
-
next: nextShortcut
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_coreData","require","_data","_interface","_i18n","_keyboardShortcuts","_editor","_router","_useRegisterShortcuts","_interopRequireDefault","_header","_table","_useTitle","_lockUnlock","_constants","useLocation","unlock","routerPrivateApis","List","params","path","templateType","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","useRegisterShortcuts","previousShortcut","nextShortcut","useSelect","select","keyboardShortcutsStore","getAllShortcutKeyCombinations","postType","coreStore","getPostType","useTitle","labels","name","itemsListLabel","items_list","detailedRegionLabels","header","sprintf","__","body","undefined","_react","createElement","InterfaceSkeleton","className","default","notices","EditorSnackbars","content","shortcuts","previous","next"],"sources":["@wordpress/edit-site/src/components/list/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { InterfaceSkeleton } from '@wordpress/interface';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { EditorSnackbars } from '@wordpress/editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport useRegisterShortcuts from './use-register-shortcuts';\nimport Header from './header';\nimport Table from './table';\nimport useTitle from '../routes/use-title';\nimport { unlock } from '../../lock-unlock';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../utils/constants';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function List() {\n\tconst {\n\t\tparams: { path },\n\t} = useLocation();\n\tconst templateType =\n\t\tpath === '/wp_template/all'\n\t\t\t? TEMPLATE_POST_TYPE\n\t\t\t: TEMPLATE_PART_POST_TYPE;\n\n\tuseRegisterShortcuts();\n\n\tconst { previousShortcut, nextShortcut } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-site/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-site/next-region' ),\n\t\t};\n\t}, [] );\n\n\tconst postType = useSelect(\n\t\t( select ) => select( coreStore ).getPostType( templateType ),\n\t\t[ templateType ]\n\t);\n\n\tuseTitle( postType?.labels?.name );\n\n\t// `postType` could load in asynchronously. Only provide the detailed region labels if\n\t// the postType has loaded, otherwise `InterfaceSkeleton` will fallback to the defaults.\n\tconst itemsListLabel = postType?.labels?.items_list;\n\tconst detailedRegionLabels = postType\n\t\t? {\n\t\t\t\theader: sprintf(\n\t\t\t\t\t// translators: %s - the name of the page, 'Header' as in the header area of that page.\n\t\t\t\t\t__( '%s - Header' ),\n\t\t\t\t\titemsListLabel\n\t\t\t\t),\n\t\t\t\tbody: sprintf(\n\t\t\t\t\t// translators: %s - the name of the page, 'Content' as in the content area of that page.\n\t\t\t\t\t__( '%s - Content' ),\n\t\t\t\t\titemsListLabel\n\t\t\t\t),\n\t\t }\n\t\t: undefined;\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tclassName=\"edit-site-list\"\n\t\t\tlabels={ detailedRegionLabels }\n\t\t\theader={ <Header templateType={ templateType } /> }\n\t\t\tnotices={ <EditorSnackbars /> }\n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ineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = Table;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _data = require("@wordpress/data");
|
|
10
|
-
var _coreData = require("@wordpress/core-data");
|
|
11
|
-
var _i18n = require("@wordpress/i18n");
|
|
12
|
-
var _components = require("@wordpress/components");
|
|
13
|
-
var _htmlEntities = require("@wordpress/html-entities");
|
|
14
|
-
var _templateActions = _interopRequireDefault(require("../template-actions"));
|
|
15
|
-
var _link = _interopRequireDefault(require("../routes/link"));
|
|
16
|
-
var _addedBy = _interopRequireDefault(require("./added-by"));
|
|
17
|
-
/**
|
|
18
|
-
* WordPress dependencies
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Internal dependencies
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
function Table({
|
|
26
|
-
templateType
|
|
27
|
-
}) {
|
|
28
|
-
const {
|
|
29
|
-
records: allTemplates
|
|
30
|
-
} = (0, _coreData.useEntityRecords)('postType', templateType, {
|
|
31
|
-
per_page: -1
|
|
32
|
-
});
|
|
33
|
-
const templates = (0, _data.useSelect)(select => allTemplates?.filter(template => !select(_coreData.store).isDeletingEntityRecord('postType', templateType, template.id)), [allTemplates]);
|
|
34
|
-
const postType = (0, _data.useSelect)(select => select(_coreData.store).getPostType(templateType), [templateType]);
|
|
35
|
-
if (!templates) {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
if (!templates.length) {
|
|
39
|
-
return (0, _react.createElement)("div", null, (0, _i18n.sprintf)(
|
|
40
|
-
// translators: The template type name, should be either "templates" or "template parts".
|
|
41
|
-
(0, _i18n.__)('No %s found.'), postType?.labels?.name?.toLowerCase()));
|
|
42
|
-
}
|
|
43
|
-
const sortedTemplates = [...templates];
|
|
44
|
-
sortedTemplates.sort((a, b) => a.title.rendered.localeCompare(b.title.rendered));
|
|
45
|
-
return (
|
|
46
|
-
// These explicit aria roles are needed for Safari.
|
|
47
|
-
// See https://developer.mozilla.org/en-US/docs/Web/CSS/display#tables
|
|
48
|
-
(0, _react.createElement)("table", {
|
|
49
|
-
className: "edit-site-list-table",
|
|
50
|
-
role: "table"
|
|
51
|
-
}, (0, _react.createElement)("thead", null, (0, _react.createElement)("tr", {
|
|
52
|
-
className: "edit-site-list-table-head",
|
|
53
|
-
role: "row"
|
|
54
|
-
}, (0, _react.createElement)("th", {
|
|
55
|
-
className: "edit-site-list-table-column",
|
|
56
|
-
role: "columnheader"
|
|
57
|
-
}, (0, _i18n.__)('Template')), (0, _react.createElement)("th", {
|
|
58
|
-
className: "edit-site-list-table-column",
|
|
59
|
-
role: "columnheader"
|
|
60
|
-
}, (0, _i18n.__)('Added by')), (0, _react.createElement)("th", {
|
|
61
|
-
className: "edit-site-list-table-column",
|
|
62
|
-
role: "columnheader"
|
|
63
|
-
}, (0, _react.createElement)(_components.VisuallyHidden, null, (0, _i18n.__)('Actions'))))), (0, _react.createElement)("tbody", null, sortedTemplates.map(template => (0, _react.createElement)("tr", {
|
|
64
|
-
key: template.id,
|
|
65
|
-
className: "edit-site-list-table-row",
|
|
66
|
-
role: "row"
|
|
67
|
-
}, (0, _react.createElement)("td", {
|
|
68
|
-
className: "edit-site-list-table-column",
|
|
69
|
-
role: "cell"
|
|
70
|
-
}, (0, _react.createElement)(_components.__experimentalHeading, {
|
|
71
|
-
level: 4
|
|
72
|
-
}, (0, _react.createElement)(_link.default, {
|
|
73
|
-
params: {
|
|
74
|
-
postId: template.id,
|
|
75
|
-
postType: template.type,
|
|
76
|
-
canvas: 'edit'
|
|
77
|
-
}
|
|
78
|
-
}, (0, _htmlEntities.decodeEntities)(template.title?.rendered || template.slug))), (0, _htmlEntities.decodeEntities)(template.description)), (0, _react.createElement)("td", {
|
|
79
|
-
className: "edit-site-list-table-column",
|
|
80
|
-
role: "cell"
|
|
81
|
-
}, template ? (0, _react.createElement)(_addedBy.default, {
|
|
82
|
-
postType: template.type,
|
|
83
|
-
postId: template.id
|
|
84
|
-
}) : null), (0, _react.createElement)("td", {
|
|
85
|
-
className: "edit-site-list-table-column",
|
|
86
|
-
role: "cell"
|
|
87
|
-
}, (0, _react.createElement)(_templateActions.default, {
|
|
88
|
-
postType: template.type,
|
|
89
|
-
postId: template.id,
|
|
90
|
-
className: "edit-site-list-table__actions"
|
|
91
|
-
}))))))
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=table.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_coreData","_i18n","_components","_htmlEntities","_templateActions","_interopRequireDefault","_link","_addedBy","Table","templateType","records","allTemplates","useEntityRecords","per_page","templates","useSelect","select","filter","template","coreStore","isDeletingEntityRecord","id","postType","getPostType","length","_react","createElement","sprintf","__","labels","name","toLowerCase","sortedTemplates","sort","a","b","title","rendered","localeCompare","className","role","VisuallyHidden","map","key","__experimentalHeading","level","default","params","postId","type","canvas","decodeEntities","slug","description"],"sources":["@wordpress/edit-site/src/components/list/table.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore, useEntityRecords } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tVisuallyHidden,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport TemplateActions from '../template-actions';\nimport Link from '../routes/link';\nimport AddedBy from './added-by';\n\nexport default function Table( { templateType } ) {\n\tconst { records: allTemplates } = useEntityRecords(\n\t\t'postType',\n\t\ttemplateType,\n\t\t{\n\t\t\tper_page: -1,\n\t\t}\n\t);\n\n\tconst templates = useSelect(\n\t\t( select ) =>\n\t\t\tallTemplates?.filter(\n\t\t\t\t( template ) =>\n\t\t\t\t\t! select( coreStore ).isDeletingEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\ttemplateType,\n\t\t\t\t\t\ttemplate.id\n\t\t\t\t\t)\n\t\t\t),\n\t\t[ allTemplates ]\n\t);\n\n\tconst postType = useSelect(\n\t\t( select ) => select( coreStore ).getPostType( templateType ),\n\t\t[ templateType ]\n\t);\n\n\tif ( ! templates ) {\n\t\treturn null;\n\t}\n\n\tif ( ! templates.length ) {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: The template type name, should be either \"templates\" or \"template parts\".\n\t\t\t\t\t__( 'No %s found.' ),\n\t\t\t\t\tpostType?.labels?.name?.toLowerCase()\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst sortedTemplates = [ ...templates ];\n\tsortedTemplates.sort( ( a, b ) =>\n\t\ta.title.rendered.localeCompare( b.title.rendered )\n\t);\n\n\treturn (\n\t\t// These explicit aria roles are needed for Safari.\n\t\t// See https://developer.mozilla.org/en-US/docs/Web/CSS/display#tables\n\t\t<table className=\"edit-site-list-table\" role=\"table\">\n\t\t\t<thead>\n\t\t\t\t<tr className=\"edit-site-list-table-head\" role=\"row\">\n\t\t\t\t\t<th\n\t\t\t\t\t\tclassName=\"edit-site-list-table-column\"\n\t\t\t\t\t\trole=\"columnheader\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Template' ) }\n\t\t\t\t\t</th>\n\t\t\t\t\t<th\n\t\t\t\t\t\tclassName=\"edit-site-list-table-column\"\n\t\t\t\t\t\trole=\"columnheader\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Added by' ) }\n\t\t\t\t\t</th>\n\t\t\t\t\t<th\n\t\t\t\t\t\tclassName=\"edit-site-list-table-column\"\n\t\t\t\t\t\trole=\"columnheader\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<VisuallyHidden>{ __( 'Actions' ) }</VisuallyHidden>\n\t\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\n\t\t\t<tbody>\n\t\t\t\t{ sortedTemplates.map( ( template ) => (\n\t\t\t\t\t<tr\n\t\t\t\t\t\tkey={ template.id }\n\t\t\t\t\t\tclassName=\"edit-site-list-table-row\"\n\t\t\t\t\t\trole=\"row\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<td className=\"edit-site-list-table-column\" role=\"cell\">\n\t\t\t\t\t\t\t<Heading level={ 4 }>\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tparams={ {\n\t\t\t\t\t\t\t\t\t\tpostId: template.id,\n\t\t\t\t\t\t\t\t\t\tpostType: template.type,\n\t\t\t\t\t\t\t\t\t\tcanvas: 'edit',\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{ decodeEntities(\n\t\t\t\t\t\t\t\t\t\ttemplate.title?.rendered ||\n\t\t\t\t\t\t\t\t\t\t\ttemplate.slug\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t{ decodeEntities( template.description ) }\n\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t<td className=\"edit-site-list-table-column\" role=\"cell\">\n\t\t\t\t\t\t\t{ template ? (\n\t\t\t\t\t\t\t\t<AddedBy\n\t\t\t\t\t\t\t\t\tpostType={ template.type }\n\t\t\t\t\t\t\t\t\tpostId={ template.id }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : null }\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td className=\"edit-site-list-table-column\" role=\"cell\">\n\t\t\t\t\t\t\t<TemplateActions\n\t\t\t\t\t\t\t\tpostType={ template.type }\n\t\t\t\t\t\t\t\tpostId={ template.id }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-list-table__actions\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t) ) }\n\t\t\t</tbody>\n\t\t</table>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IA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