@wordpress/edit-site 6.11.0 → 6.12.1-next.082ed6819.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/add-new-template/utils.js +1 -2
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js +0 -5
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/use-editor-iframe-props.js +6 -8
- package/build/components/block-editor/use-editor-iframe-props.js.map +1 -1
- package/build/components/block-editor/use-site-editor-settings.js +4 -12
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/editor/index.js +23 -27
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor/use-editor-title.js +37 -12
- package/build/components/editor/use-editor-title.js.map +1 -1
- package/build/components/editor/use-resolve-edited-entity.js +133 -0
- package/build/components/editor/use-resolve-edited-entity.js.map +1 -0
- package/build/components/editor-canvas-container/index.js +1 -1
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +8 -10
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/screen-block.js +18 -5
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +24 -22
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +11 -5
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/shadows-edit-panel.js +2 -3
- package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build/components/global-styles/ui.js +42 -2
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles-renderer/index.js +6 -8
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/global-styles-sidebar/index.js +17 -1
- package/build/components/global-styles-sidebar/index.js.map +1 -1
- package/build/components/layout/hooks.js +1 -10
- package/build/components/layout/hooks.js.map +1 -1
- package/build/components/layout/index.js +1 -0
- package/build/components/layout/index.js.map +1 -1
- package/build/components/page-patterns/fields.js +3 -7
- package/build/components/page-patterns/fields.js.map +1 -1
- package/build/components/page-patterns/header.js +2 -2
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +4 -8
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-templates/fields.js +1 -2
- package/build/components/page-templates/fields.js.map +1 -1
- package/build/components/post-edit/index.js +15 -11
- package/build/components/post-edit/index.js.map +1 -1
- package/build/components/post-list/index.js +13 -3
- package/build/components/post-list/index.js.map +1 -1
- package/build/components/posts-app/index.js +3 -4
- package/build/components/posts-app/index.js.map +1 -1
- package/build/components/posts-app-routes/home.js +48 -0
- package/build/components/posts-app-routes/home.js.map +1 -0
- package/build/components/posts-app-routes/index.js +37 -0
- package/build/components/posts-app-routes/index.js.map +1 -0
- package/build/components/posts-app-routes/posts-edit.js +44 -0
- package/build/components/posts-app-routes/posts-edit.js.map +1 -0
- package/build/components/posts-app-routes/posts-list-view-quick-edit.js +63 -0
- package/build/components/posts-app-routes/posts-list-view-quick-edit.js.map +1 -0
- package/build/components/posts-app-routes/posts-list-view.js +48 -0
- package/build/components/posts-app-routes/posts-list-view.js.map +1 -0
- package/build/components/posts-app-routes/posts-view-quick-edit.js +60 -0
- package/build/components/posts-app-routes/posts-view-quick-edit.js.map +1 -0
- package/build/components/posts-app-routes/posts-view.js +41 -0
- package/build/components/posts-app-routes/posts-view.js.map +1 -0
- package/build/components/sidebar/index.js +11 -3
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-global-styles-wrapper/index.js +129 -0
- package/build/components/sidebar-global-styles-wrapper/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-details-footer/index.js +17 -23
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +18 -90
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +43 -42
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +2 -3
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build/components/site-editor-routes/index.js +1 -2
- package/build/components/site-editor-routes/index.js.map +1 -1
- package/build/components/site-editor-routes/styles-view.js +8 -2
- package/build/components/site-editor-routes/styles-view.js.map +1 -1
- package/build/components/site-hub/index.js +19 -6
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/style-book/constants.js +10 -3
- package/build/components/style-book/constants.js.map +1 -1
- package/build/components/style-book/examples.js +94 -2
- package/build/components/style-book/examples.js.map +1 -1
- package/build/components/style-book/index.js +70 -11
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/welcome-guide/index.js +4 -2
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/page.js +1 -9
- package/build/components/welcome-guide/page.js.map +1 -1
- package/build/components/welcome-guide/template.js +1 -12
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +15 -15
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/index.js +1 -9
- package/build/index.js.map +1 -1
- package/build/posts.js +1 -0
- package/build/posts.js.map +1 -1
- package/build/store/actions.js +13 -0
- package/build/store/actions.js.map +1 -1
- package/build/store/selectors.js +21 -1
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +1 -2
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js +0 -5
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/use-editor-iframe-props.js +6 -8
- package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -1
- package/build-module/components/block-editor/use-site-editor-settings.js +4 -12
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/editor/index.js +23 -27
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor/use-editor-title.js +37 -12
- package/build-module/components/editor/use-editor-title.js.map +1 -1
- package/build-module/components/editor/use-resolve-edited-entity.js +125 -0
- package/build-module/components/editor/use-resolve-edited-entity.js.map +1 -0
- package/build-module/components/editor-canvas-container/index.js +1 -1
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +8 -10
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +18 -5
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +25 -23
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +11 -5
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/shadows-edit-panel.js +2 -3
- package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build-module/components/global-styles/ui.js +42 -2
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles-renderer/index.js +6 -8
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/global-styles-sidebar/index.js +18 -2
- package/build-module/components/global-styles-sidebar/index.js.map +1 -1
- package/build-module/components/layout/hooks.js +1 -9
- package/build-module/components/layout/hooks.js.map +1 -1
- package/build-module/components/layout/index.js +1 -0
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/page-patterns/fields.js +4 -8
- package/build-module/components/page-patterns/fields.js.map +1 -1
- package/build-module/components/page-patterns/header.js +2 -2
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +4 -8
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-templates/fields.js +1 -2
- package/build-module/components/page-templates/fields.js.map +1 -1
- package/build-module/components/post-edit/index.js +14 -10
- package/build-module/components/post-edit/index.js.map +1 -1
- package/build-module/components/post-list/index.js +13 -3
- package/build-module/components/post-list/index.js.map +1 -1
- package/build-module/components/posts-app/index.js +3 -4
- package/build-module/components/posts-app/index.js.map +1 -1
- package/build-module/components/posts-app-routes/home.js +40 -0
- package/build-module/components/posts-app-routes/home.js.map +1 -0
- package/build-module/components/posts-app-routes/index.js +30 -0
- package/build-module/components/posts-app-routes/index.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-edit.js +36 -0
- package/build-module/components/posts-app-routes/posts-edit.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-list-view-quick-edit.js +55 -0
- package/build-module/components/posts-app-routes/posts-list-view-quick-edit.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-list-view.js +40 -0
- package/build-module/components/posts-app-routes/posts-list-view.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-view-quick-edit.js +52 -0
- package/build-module/components/posts-app-routes/posts-view-quick-edit.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-view.js +33 -0
- package/build-module/components/posts-app-routes/posts-view.js.map +1 -0
- package/build-module/components/sidebar/index.js +11 -3
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-global-styles-wrapper/index.js +121 -0
- package/build-module/components/sidebar-global-styles-wrapper/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +20 -26
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +19 -91
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +43 -43
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +3 -4
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build-module/components/site-editor-routes/index.js +1 -2
- package/build-module/components/site-editor-routes/index.js.map +1 -1
- package/build-module/components/site-editor-routes/styles-view.js +8 -2
- package/build-module/components/site-editor-routes/styles-view.js.map +1 -1
- package/build-module/components/site-hub/index.js +19 -6
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/style-book/constants.js +10 -3
- package/build-module/components/style-book/constants.js.map +1 -1
- package/build-module/components/style-book/examples.js +94 -2
- package/build-module/components/style-book/examples.js.map +1 -1
- package/build-module/components/style-book/index.js +71 -12
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +4 -2
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/page.js +1 -9
- package/build-module/components/welcome-guide/page.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +1 -11
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +15 -15
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/index.js +2 -10
- package/build-module/index.js.map +1 -1
- package/build-module/posts.js +1 -0
- package/build-module/posts.js.map +1 -1
- package/build-module/store/actions.js +13 -0
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/selectors.js +21 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/posts-rtl.css +106 -16
- package/build-style/posts.css +106 -16
- package/build-style/style-rtl.css +176 -78
- package/build-style/style.css +176 -78
- package/package.json +39 -40
- package/src/components/add-new-template/utils.js +2 -2
- package/src/components/app/index.js +0 -5
- package/src/components/block-editor/use-editor-iframe-props.js +2 -3
- package/src/components/block-editor/use-site-editor-settings.js +7 -21
- package/src/components/editor/index.js +31 -30
- package/src/components/editor/use-editor-title.js +50 -13
- package/src/components/editor/use-resolve-edited-entity.js +132 -0
- package/src/components/editor-canvas-container/index.js +1 -1
- package/src/components/editor-canvas-container/style.scss +0 -1
- package/src/components/global-styles/block-preview-panel.js +10 -10
- package/src/components/global-styles/screen-block.js +26 -8
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +28 -31
- package/src/components/global-styles/screen-revisions/style.scss +11 -17
- package/src/components/global-styles/screen-style-variations.js +14 -5
- package/src/components/global-styles/shadows-edit-panel.js +4 -2
- package/src/components/global-styles/ui.js +41 -1
- package/src/components/global-styles-renderer/index.js +4 -10
- package/src/components/global-styles-sidebar/index.js +16 -2
- package/src/components/layout/hooks.js +1 -7
- package/src/components/layout/index.js +6 -1
- package/src/components/page-patterns/fields.js +6 -12
- package/src/components/page-patterns/header.js +3 -2
- package/src/components/page-patterns/style.scss +0 -5
- package/src/components/page-patterns/use-patterns.js +9 -7
- package/src/components/page-templates/fields.js +2 -3
- package/src/components/page-templates/style.scss +1 -0
- package/src/components/post-edit/index.js +37 -32
- package/src/components/post-edit/style.scss +7 -0
- package/src/components/post-list/index.js +10 -5
- package/src/components/post-list/style.scss +29 -3
- package/src/components/posts-app/index.js +3 -4
- package/src/components/posts-app-routes/home.js +36 -0
- package/src/components/posts-app-routes/index.js +36 -0
- package/src/components/posts-app-routes/posts-edit.js +31 -0
- package/src/components/posts-app-routes/posts-list-view-quick-edit.js +52 -0
- package/src/components/posts-app-routes/posts-list-view.js +40 -0
- package/src/components/posts-app-routes/posts-view-quick-edit.js +49 -0
- package/src/components/posts-app-routes/posts-view.js +35 -0
- package/src/components/sidebar/index.js +23 -7
- package/src/components/sidebar-global-styles-wrapper/index.js +150 -0
- package/src/components/sidebar-global-styles-wrapper/style.scss +35 -0
- package/src/components/sidebar-navigation-item/style.scss +2 -2
- package/src/components/sidebar-navigation-screen/style.scss +7 -2
- package/src/components/sidebar-navigation-screen-details-footer/index.js +27 -38
- package/src/components/sidebar-navigation-screen-details-footer/style.scss +0 -4
- package/src/components/sidebar-navigation-screen-global-styles/index.js +19 -103
- package/src/components/sidebar-navigation-screen-main/index.js +46 -45
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +8 -0
- package/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
- package/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +4 -4
- package/src/components/site-editor-routes/README.md +2 -2
- package/src/components/site-editor-routes/index.js +0 -2
- package/src/components/site-editor-routes/styles-view.js +11 -1
- package/src/components/site-hub/index.js +33 -16
- package/src/components/site-hub/style.scss +1 -1
- package/src/components/site-icon/style.scss +16 -0
- package/src/components/style-book/constants.ts +11 -3
- package/src/components/style-book/examples.tsx +128 -2
- package/src/components/style-book/index.js +86 -8
- package/src/components/welcome-guide/index.js +3 -3
- package/src/components/welcome-guide/page.js +1 -7
- package/src/components/welcome-guide/template.js +1 -8
- package/src/hooks/commands/use-common-commands.js +253 -246
- package/src/index.js +2 -13
- package/src/posts.js +1 -0
- package/src/store/actions.js +15 -0
- package/src/store/selectors.js +24 -1
- package/src/style.scss +2 -5
- package/build/components/async/index.js +0 -51
- package/build/components/async/index.js.map +0 -1
- package/build/components/post-fields/index.js +0 -290
- package/build/components/post-fields/index.js.map +0 -1
- package/build/components/posts-app/router.js +0 -85
- package/build/components/posts-app/router.js.map +0 -1
- package/build/components/sidebar-navigation-screen-details-panel/index.js +0 -54
- package/build/components/sidebar-navigation-screen-details-panel/index.js.map +0 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -21
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +0 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +0 -33
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +0 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -21
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +0 -1
- package/build/components/site-editor-routes/styles-edit.js +0 -28
- package/build/components/site-editor-routes/styles-edit.js.map +0 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -219
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +0 -1
- package/build/components/use-edited-entity-record/index.js +0 -60
- package/build/components/use-edited-entity-record/index.js.map +0 -1
- package/build/hooks/commands/use-edit-mode-commands.js +0 -179
- package/build/hooks/commands/use-edit-mode-commands.js.map +0 -1
- package/build-module/components/async/index.js +0 -44
- package/build-module/components/async/index.js.map +0 -1
- package/build-module/components/post-fields/index.js +0 -283
- package/build-module/components/post-fields/index.js.map +0 -1
- package/build-module/components/posts-app/router.js +0 -77
- package/build-module/components/posts-app/router.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js +0 -29
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -14
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +0 -25
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -14
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +0 -1
- package/build-module/components/site-editor-routes/styles-edit.js +0 -20
- package/build-module/components/site-editor-routes/styles-edit.js.map +0 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -212
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +0 -1
- package/build-module/components/use-edited-entity-record/index.js +0 -53
- package/build-module/components/use-edited-entity-record/index.js.map +0 -1
- package/build-module/hooks/commands/use-edit-mode-commands.js +0 -171
- package/build-module/hooks/commands/use-edit-mode-commands.js.map +0 -1
- package/src/components/async/index.js +0 -43
- package/src/components/post-fields/index.js +0 -361
- package/src/components/post-fields/style.scss +0 -3
- package/src/components/posts-app/router.js +0 -69
- package/src/components/sidebar-navigation-screen-details-panel/index.js +0 -40
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -14
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +0 -31
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -14
- package/src/components/sidebar-navigation-screen-details-panel/style.scss +0 -26
- package/src/components/site-editor-routes/styles-edit.js +0 -17
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -267
- package/src/components/use-edited-entity-record/index.js +0 -58
- package/src/hooks/commands/use-edit-mode-commands.js +0 -168
- package/src/store/test/actions.js +0 -83
- package/src/store/test/reducer.js +0 -69
- package/src/store/test/selectors.js +0 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","Disabled","Composite","privateApis","componentsPrivateApis","__","_x","sprintf","BlockList","blockEditorPrivateApis","store","blockEditorStore","useSettings","__unstableEditorStyles","EditorStyles","__unstableIframe","Iframe","__experimentalUseMultipleOriginColorsAndGradients","useMultipleOriginColorsAndGradients","editorPrivateApis","useSelect","useResizeObserver","useMemo","useState","memo","useContext","ENTER","SPACE","unlock","EditorCanvasContainer","STYLE_BOOK_IFRAME_STYLES","getExamplesByCategory","getTopLevelStyleBookCategories","getExamples","jsx","_jsx","jsxs","_jsxs","ExperimentalBlockEditorProvider","useGlobalStyle","GlobalStylesContext","useGlobalStylesOutputWithConfig","mergeBaseAndUserConfigs","Tabs","isObjectEmpty","object","Object","keys","length","useMultiOriginPalettes","colors","gradients","shouldDisplayDefaultDuotones","customDuotones","themeDuotones","defaultDuotones","palettes","result","duotones","push","name","slug","StyleBook","enableResizing","isSelected","onClick","onSelect","showCloseButton","onClose","showTabs","userConfig","resizeObserver","sizes","textColor","backgroundColor","examples","tabs","filter","category","some","example","base","baseConfig","mergedConfig","originalSettings","select","getSettings","globalStyles","settings","styles","isPreviewMode","closeButtonLabel","children","className","width","style","color","background","TabList","map","tab","Tab","tabId","title","TabPanel","focusable","StyleBookBody","isFocused","setIsFocused","buttonModeProps","role","onFocus","onBlur","onKeyDown","event","defaultPrevented","keyCode","preventDefault","readonly","tabIndex","Examples","label","categoryDefinition","find","_category","filteredExamples","orientation","Example","id","content","blocks","subcategories","subcategory","Group","GroupLabel","Subcategory","disabledExamples","focusMode","renderedBlocks","Array","isArray","disabledProps","includes","disabled","accessibleWhenDisabled","Item","render","value","renderAppender"],"sources":["@wordpress/edit-site/src/components/style-book/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tDisabled,\n\tComposite,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tBlockList,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tuseSettings,\n\t__unstableEditorStyles as EditorStyles,\n\t__unstableIframe as Iframe,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n} from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { useResizeObserver } from '@wordpress/compose';\nimport { useMemo, useState, memo, useContext } from '@wordpress/element';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport EditorCanvasContainer from '../editor-canvas-container';\nimport { STYLE_BOOK_IFRAME_STYLES } from './constants';\nimport {\n\tgetExamplesByCategory,\n\tgetTopLevelStyleBookCategories,\n} from './categories';\nimport { getExamples } from './examples';\n\nconst {\n\tExperimentalBlockEditorProvider,\n\tuseGlobalStyle,\n\tGlobalStylesContext,\n\tuseGlobalStylesOutputWithConfig,\n} = unlock( blockEditorPrivateApis );\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Retrieves colors, gradients, and duotone filters from Global Styles.\n * The inclusion of default (Core) palettes is controlled by the relevant\n * theme.json property e.g. defaultPalette, defaultGradients, defaultDuotone.\n *\n * @return {Object} Object containing properties for each type of palette.\n */\nfunction useMultiOriginPalettes() {\n\tconst { colors, gradients } = useMultipleOriginColorsAndGradients();\n\n\t// Add duotone filters to the palettes data.\n\tconst [\n\t\tshouldDisplayDefaultDuotones,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t] = useSettings(\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default'\n\t);\n\n\tconst palettes = useMemo( () => {\n\t\tconst result = { colors, gradients, duotones: [] };\n\n\t\tif ( themeDuotones && themeDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates these duotone filters come from the theme.'\n\t\t\t\t),\n\t\t\t\tslug: 'theme',\n\t\t\t\tduotones: themeDuotones,\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tshouldDisplayDefaultDuotones &&\n\t\t\tdefaultDuotones &&\n\t\t\tdefaultDuotones.length\n\t\t) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates these duotone filters come from WordPress.'\n\t\t\t\t),\n\t\t\t\tslug: 'default',\n\t\t\t\tduotones: defaultDuotones,\n\t\t\t} );\n\t\t}\n\t\tif ( customDuotones && customDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates these doutone filters are created by the user.'\n\t\t\t\t),\n\t\t\t\tslug: 'custom',\n\t\t\t\tduotones: customDuotones,\n\t\t\t} );\n\t\t}\n\n\t\treturn result;\n\t}, [\n\t\tcolors,\n\t\tgradients,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t\tshouldDisplayDefaultDuotones,\n\t] );\n\n\treturn palettes;\n}\n\nfunction StyleBook( {\n\tenableResizing = true,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tshowCloseButton = true,\n\tonClose,\n\tshowTabs = true,\n\tuserConfig = {},\n} ) {\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\tconst [ textColor ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst colors = useMultiOriginPalettes();\n\tconst examples = useMemo( () => getExamples( colors ), [ colors ] );\n\tconst tabs = useMemo(\n\t\t() =>\n\t\t\tgetTopLevelStyleBookCategories().filter( ( category ) =>\n\t\t\t\texamples.some(\n\t\t\t\t\t( example ) => example.category === category.slug\n\t\t\t\t)\n\t\t\t),\n\t\t[ examples ]\n\t);\n\n\tconst { base: baseConfig } = useContext( GlobalStylesContext );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\t// Copied from packages/edit-site/src/components/revisions/index.js\n\t// could we create a shared hook?\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tstyles:\n\t\t\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t\t\t? globalStyles\n\t\t\t\t\t: originalSettings.styles,\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ globalStyles, originalSettings, userConfig ]\n\t);\n\n\treturn (\n\t\t<EditorCanvasContainer\n\t\t\tonClose={ onClose }\n\t\t\tenableResizing={ enableResizing }\n\t\t\tcloseButtonLabel={ showCloseButton ? __( 'Close' ) : null }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'edit-site-style-book', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t\t'is-button': !! onClick,\n\t\t\t\t} ) }\n\t\t\t\tstyle={ {\n\t\t\t\t\tcolor: textColor,\n\t\t\t\t\tbackground: backgroundColor,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ resizeObserver }\n\t\t\t\t{ showTabs ? (\n\t\t\t\t\t<Tabs>\n\t\t\t\t\t\t<div className=\"edit-site-style-book__tablist-container\">\n\t\t\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-style-book__tabpanel\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\t\t\t\tcategory={ tab.slug }\n\t\t\t\t\t\t\t\t\texamples={ examples }\n\t\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t\t\t\t\ttitle={ tab.title }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</Tabs>\n\t\t\t\t) : (\n\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\texamples={ examples }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</EditorCanvasContainer>\n\t);\n}\n\nconst StyleBookBody = ( {\n\tcategory,\n\texamples,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tsettings,\n\tsizes,\n\ttitle,\n} ) => {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\t// The presence of an `onClick` prop indicates that the Style Book is being used as a button.\n\t// In this case, add additional props to the iframe to make it behave like a button.\n\tconst buttonModeProps = {\n\t\trole: 'button',\n\t\tonFocus: () => setIsFocused( true ),\n\t\tonBlur: () => setIsFocused( false ),\n\t\tonKeyDown: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { keyCode } = event;\n\t\t\tif ( onClick && ( keyCode === ENTER || keyCode === SPACE ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\tonClick: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( onClick ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\treadonly: true,\n\t};\n\n\treturn (\n\t\t<Iframe\n\t\t\tclassName={ clsx( 'edit-site-style-book__iframe', {\n\t\t\t\t'is-focused': isFocused && !! onClick,\n\t\t\t\t'is-button': !! onClick,\n\t\t\t} ) }\n\t\t\tname=\"style-book-canvas\"\n\t\t\ttabIndex={ 0 }\n\t\t\t{ ...( onClick ? buttonModeProps : {} ) }\n\t\t>\n\t\t\t<EditorStyles styles={ settings.styles } />\n\t\t\t<style>\n\t\t\t\t{ STYLE_BOOK_IFRAME_STYLES }\n\t\t\t\t{ !! onClick &&\n\t\t\t\t\t'body { cursor: pointer; } body * { pointer-events: none; }' }\n\t\t\t</style>\n\t\t\t<Examples\n\t\t\t\tclassName={ clsx( 'edit-site-style-book__examples', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t} ) }\n\t\t\t\texamples={ examples }\n\t\t\t\tcategory={ category }\n\t\t\t\tlabel={\n\t\t\t\t\ttitle\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Category of blocks, e.g. Text.\n\t\t\t\t\t\t\t\t__( 'Examples of blocks in the %s category' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Examples of blocks' )\n\t\t\t\t}\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tkey={ category }\n\t\t\t/>\n\t\t</Iframe>\n\t);\n};\n\nconst Examples = memo(\n\t( { className, examples, category, label, isSelected, onSelect } ) => {\n\t\tconst categoryDefinition = category\n\t\t\t? getTopLevelStyleBookCategories().find(\n\t\t\t\t\t( _category ) => _category.slug === category\n\t\t\t )\n\t\t\t: null;\n\n\t\tconst filteredExamples = categoryDefinition\n\t\t\t? getExamplesByCategory( categoryDefinition, examples )\n\t\t\t: { examples };\n\n\t\treturn (\n\t\t\t<Composite\n\t\t\t\torientation=\"vertical\"\n\t\t\t\tclassName={ className }\n\t\t\t\taria-label={ label }\n\t\t\t\trole=\"grid\"\n\t\t\t>\n\t\t\t\t{ !! filteredExamples?.examples?.length &&\n\t\t\t\t\tfilteredExamples.examples.map( ( example ) => (\n\t\t\t\t\t\t<Example\n\t\t\t\t\t\t\tkey={ example.name }\n\t\t\t\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\t\t\t\ttitle={ example.title }\n\t\t\t\t\t\t\tcontent={ example.content }\n\t\t\t\t\t\t\tblocks={ example.blocks }\n\t\t\t\t\t\t\tisSelected={ isSelected( example.name ) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonSelect?.( example.name );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t{ !! filteredExamples?.subcategories?.length &&\n\t\t\t\t\tfilteredExamples.subcategories.map( ( subcategory ) => (\n\t\t\t\t\t\t<Composite.Group\n\t\t\t\t\t\t\tclassName=\"edit-site-style-book__subcategory\"\n\t\t\t\t\t\t\tkey={ `subcategory-${ subcategory.slug }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Composite.GroupLabel>\n\t\t\t\t\t\t\t\t<h2 className=\"edit-site-style-book__subcategory-title\">\n\t\t\t\t\t\t\t\t\t{ subcategory.title }\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t</Composite.GroupLabel>\n\t\t\t\t\t\t\t<Subcategory\n\t\t\t\t\t\t\t\texamples={ subcategory.examples }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Composite.Group>\n\t\t\t\t\t) ) }\n\t\t\t</Composite>\n\t\t);\n\t}\n);\n\nconst Subcategory = ( { examples, isSelected, onSelect } ) => {\n\treturn (\n\t\t!! examples?.length &&\n\t\texamples.map( ( example ) => (\n\t\t\t<Example\n\t\t\t\tkey={ example.name }\n\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\ttitle={ example.title }\n\t\t\t\tcontent={ example.content }\n\t\t\t\tblocks={ example.blocks }\n\t\t\t\tisSelected={ isSelected( example.name ) }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tonSelect?.( example.name );\n\t\t\t\t} }\n\t\t\t/>\n\t\t) )\n\t);\n};\n\nconst disabledExamples = [ 'example-duotones' ];\n\nconst Example = ( { id, title, blocks, isSelected, onClick, content } ) => {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tfocusMode: false, // Disable \"Spotlight mode\".\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\n\t// Cache the list of blocks to avoid additional processing when the component is re-rendered.\n\tconst renderedBlocks = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tconst disabledProps = disabledExamples.includes( id )\n\t\t? {\n\t\t\t\tdisabled: true,\n\t\t\t\taccessibleWhenDisabled: true,\n\t\t }\n\t\t: {};\n\n\treturn (\n\t\t<div role=\"row\">\n\t\t\t<div role=\"gridcell\">\n\t\t\t\t<Composite.Item\n\t\t\t\t\tclassName={ clsx( 'edit-site-style-book__example', {\n\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t'is-disabled-example': !! disabledProps?.disabled,\n\t\t\t\t\t} ) }\n\t\t\t\t\tid={ id }\n\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t// translators: %s: Title of a block, e.g. Heading.\n\t\t\t\t\t\t__( 'Open %s styles in Styles panel' ),\n\t\t\t\t\t\ttitle\n\t\t\t\t\t) }\n\t\t\t\t\trender={ <div /> }\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t{ ...disabledProps }\n\t\t\t\t>\n\t\t\t\t\t<span className=\"edit-site-style-book__example-title\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</span>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"edit-site-style-book__example-preview\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t<Disabled className=\"edit-site-style-book__example-preview__content\">\n\t\t\t\t\t\t\t{ content ? (\n\t\t\t\t\t\t\t\tcontent\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\t\t\t\t\t\tvalue={ renderedBlocks }\n\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EditorStyles />\n\t\t\t\t\t\t\t\t\t<BlockList renderAppender={ false } />\n\t\t\t\t\t\t\t\t</ExperimentalBlockEditorProvider>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Disabled>\n\t\t\t\t\t</div>\n\t\t\t\t</Composite.Item>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default StyleBook;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,QAAQ,EACRC,SAAS,EACTC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SACCC,SAAS,EACTL,WAAW,IAAIM,sBAAsB,EACrCC,KAAK,IAAIC,gBAAgB,EACzBC,WAAW,EACXC,sBAAsB,IAAIC,YAAY,EACtCC,gBAAgB,IAAIC,MAAM,EAC1BC,iDAAiD,IAAIC,mCAAmC,QAClF,yBAAyB;AAChC,SAASf,WAAW,IAAIgB,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,OAAO,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,UAAU,QAAQ,oBAA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CAAE,CAAC;YAAA,CACN;UACjC,CACQ;QAAC,CACP,CAAC;MAAA,CACS;IAAC,CACb;EAAC,CACF,CAAC;AAER,CAAC;AAED,eAAetF,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["clsx","Disabled","Composite","privateApis","componentsPrivateApis","__","_x","sprintf","BlockList","blockEditorPrivateApis","store","blockEditorStore","useSettings","__unstableEditorStyles","EditorStyles","__unstableIframe","Iframe","__experimentalUseMultipleOriginColorsAndGradients","useMultipleOriginColorsAndGradients","editorPrivateApis","useSelect","useResizeObserver","useMemo","useState","memo","useContext","useRef","useLayoutEffect","ENTER","SPACE","unlock","EditorCanvasContainer","STYLE_BOOK_IFRAME_STYLES","getExamplesByCategory","getTopLevelStyleBookCategories","getExamples","jsx","_jsx","jsxs","_jsxs","ExperimentalBlockEditorProvider","useGlobalStyle","GlobalStylesContext","useGlobalStylesOutputWithConfig","mergeBaseAndUserConfigs","Tabs","isObjectEmpty","object","Object","keys","length","scrollToSection","anchorId","iframe","contentDocument","element","getElementById","scrollIntoView","behavior","getStyleBookNavigationFromPath","path","block","includes","decodeURIComponent","split","endsWith","useMultiOriginPalettes","colors","gradients","shouldDisplayDefaultDuotones","customDuotones","themeDuotones","defaultDuotones","palettes","result","duotones","push","name","slug","StyleBook","enableResizing","isSelected","onClick","onSelect","showCloseButton","onClose","showTabs","userConfig","resizeObserver","sizes","textColor","backgroundColor","examples","tabs","filter","category","some","example","examplesForSinglePageUse","overviewCategoryExamples","otherExamples","find","overviewExample","base","baseConfig","goTo","mergedConfig","originalSettings","select","getSettings","globalStyles","settings","styles","isPreviewMode","closeButtonLabel","children","className","width","style","color","background","TabList","map","tab","Tab","tabId","title","TabPanel","focusable","StyleBookBody","isFocused","setIsFocused","hasIframeLoaded","setHasIframeLoaded","iframeRef","buttonModeProps","role","onFocus","onBlur","onKeyDown","event","defaultPrevented","keyCode","preventDefault","readonly","handleLoad","current","onLoad","ref","tabIndex","Examples","label","categoryDefinition","_category","filteredExamples","orientation","Example","id","content","blocks","subcategories","subcategory","Group","GroupLabel","Subcategory","disabledExamples","focusMode","renderedBlocks","Array","isArray","disabledProps","disabled","accessibleWhenDisabled","Item","render","value","renderAppender"],"sources":["@wordpress/edit-site/src/components/style-book/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tDisabled,\n\tComposite,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tBlockList,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tuseSettings,\n\t__unstableEditorStyles as EditorStyles,\n\t__unstableIframe as Iframe,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n} from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { useResizeObserver } from '@wordpress/compose';\nimport {\n\tuseMemo,\n\tuseState,\n\tmemo,\n\tuseContext,\n\tuseRef,\n\tuseLayoutEffect,\n} from '@wordpress/element';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport EditorCanvasContainer from '../editor-canvas-container';\nimport { STYLE_BOOK_IFRAME_STYLES } from './constants';\nimport {\n\tgetExamplesByCategory,\n\tgetTopLevelStyleBookCategories,\n} from './categories';\nimport { getExamples } from './examples';\n\nconst {\n\tExperimentalBlockEditorProvider,\n\tuseGlobalStyle,\n\tGlobalStylesContext,\n\tuseGlobalStylesOutputWithConfig,\n} = unlock( blockEditorPrivateApis );\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Scrolls to a section within an iframe.\n *\n * @param {string} anchorId The id of the element to scroll to.\n * @param {HTMLIFrameElement} iframe The target iframe.\n */\nconst scrollToSection = ( anchorId, iframe ) => {\n\tif ( ! iframe || ! iframe?.contentDocument ) {\n\t\treturn;\n\t}\n\n\tconst element = iframe.contentDocument.getElementById( anchorId );\n\tif ( element ) {\n\t\telement.scrollIntoView( {\n\t\t\tbehavior: 'smooth',\n\t\t} );\n\t}\n};\n\n/**\n * Parses a Block Editor navigation path to extract the block name and\n * build a style book navigation path. The object can be extended to include a category,\n * representing a style book tab/section.\n *\n * @param {string} path An internal Block Editor navigation path.\n * @return {null|{block: string}} An object containing the example to navigate to.\n */\nconst getStyleBookNavigationFromPath = ( path ) => {\n\tif ( path && typeof path === 'string' ) {\n\t\tlet block = path.includes( '/blocks/' )\n\t\t\t? decodeURIComponent( path.split( '/blocks/' )[ 1 ] )\n\t\t\t: null;\n\t\t// Default to theme-colors if the path ends with /colors.\n\t\tblock = path.endsWith( '/colors' ) ? 'theme-colors' : block;\n\n\t\treturn {\n\t\t\tblock,\n\t\t};\n\t}\n\treturn null;\n};\n\n/**\n * Retrieves colors, gradients, and duotone filters from Global Styles.\n * The inclusion of default (Core) palettes is controlled by the relevant\n * theme.json property e.g. defaultPalette, defaultGradients, defaultDuotone.\n *\n * @return {Object} Object containing properties for each type of palette.\n */\nfunction useMultiOriginPalettes() {\n\tconst { colors, gradients } = useMultipleOriginColorsAndGradients();\n\n\t// Add duotone filters to the palettes data.\n\tconst [\n\t\tshouldDisplayDefaultDuotones,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t] = useSettings(\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default'\n\t);\n\n\tconst palettes = useMemo( () => {\n\t\tconst result = { colors, gradients, duotones: [] };\n\n\t\tif ( themeDuotones && themeDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates these duotone filters come from the theme.'\n\t\t\t\t),\n\t\t\t\tslug: 'theme',\n\t\t\t\tduotones: themeDuotones,\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tshouldDisplayDefaultDuotones &&\n\t\t\tdefaultDuotones &&\n\t\t\tdefaultDuotones.length\n\t\t) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates these duotone filters come from WordPress.'\n\t\t\t\t),\n\t\t\t\tslug: 'default',\n\t\t\t\tduotones: defaultDuotones,\n\t\t\t} );\n\t\t}\n\t\tif ( customDuotones && customDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates these doutone filters are created by the user.'\n\t\t\t\t),\n\t\t\t\tslug: 'custom',\n\t\t\t\tduotones: customDuotones,\n\t\t\t} );\n\t\t}\n\n\t\treturn result;\n\t}, [\n\t\tcolors,\n\t\tgradients,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t\tshouldDisplayDefaultDuotones,\n\t] );\n\n\treturn palettes;\n}\n\nfunction StyleBook( {\n\tenableResizing = true,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tshowCloseButton = true,\n\tonClose,\n\tshowTabs = true,\n\tuserConfig = {},\n\tpath = '',\n} ) {\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\tconst [ textColor ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst colors = useMultiOriginPalettes();\n\tconst examples = useMemo( () => getExamples( colors ), [ colors ] );\n\tconst tabs = useMemo(\n\t\t() =>\n\t\t\tgetTopLevelStyleBookCategories().filter( ( category ) =>\n\t\t\t\texamples.some(\n\t\t\t\t\t( example ) => example.category === category.slug\n\t\t\t\t)\n\t\t\t),\n\t\t[ examples ]\n\t);\n\n\tconst examplesForSinglePageUse = [];\n\tconst overviewCategoryExamples = getExamplesByCategory(\n\t\t{ slug: 'overview' },\n\t\texamples\n\t);\n\texamplesForSinglePageUse.push( ...overviewCategoryExamples.examples );\n\tconst otherExamples = examples.filter( ( example ) => {\n\t\treturn (\n\t\t\texample.category !== 'overview' &&\n\t\t\t! overviewCategoryExamples.examples.find(\n\t\t\t\t( overviewExample ) => overviewExample.name === example.name\n\t\t\t)\n\t\t);\n\t} );\n\texamplesForSinglePageUse.push( ...otherExamples );\n\n\tconst { base: baseConfig } = useContext( GlobalStylesContext );\n\tconst goTo = getStyleBookNavigationFromPath( path );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\t// Copied from packages/edit-site/src/components/revisions/index.js\n\t// could we create a shared hook?\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tstyles:\n\t\t\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t\t\t? globalStyles\n\t\t\t\t\t: originalSettings.styles,\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ globalStyles, originalSettings, userConfig ]\n\t);\n\n\treturn (\n\t\t<EditorCanvasContainer\n\t\t\tonClose={ onClose }\n\t\t\tenableResizing={ enableResizing }\n\t\t\tcloseButtonLabel={ showCloseButton ? __( 'Close' ) : null }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'edit-site-style-book', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t\t'is-button': !! onClick,\n\t\t\t\t} ) }\n\t\t\t\tstyle={ {\n\t\t\t\t\tcolor: textColor,\n\t\t\t\t\tbackground: backgroundColor,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ resizeObserver }\n\t\t\t\t{ showTabs ? (\n\t\t\t\t\t<Tabs>\n\t\t\t\t\t\t<div className=\"edit-site-style-book__tablist-container\">\n\t\t\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-style-book__tabpanel\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\t\t\t\tcategory={ tab.slug }\n\t\t\t\t\t\t\t\t\texamples={ examples }\n\t\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t\t\t\t\ttitle={ tab.title }\n\t\t\t\t\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</Tabs>\n\t\t\t\t) : (\n\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\texamples={ examplesForSinglePageUse }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</EditorCanvasContainer>\n\t);\n}\n\nconst StyleBookBody = ( {\n\tcategory,\n\texamples,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tsettings,\n\tsizes,\n\ttitle,\n\tgoTo,\n} ) => {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst [ hasIframeLoaded, setHasIframeLoaded ] = useState( false );\n\tconst iframeRef = useRef( null );\n\t// The presence of an `onClick` prop indicates that the Style Book is being used as a button.\n\t// In this case, add additional props to the iframe to make it behave like a button.\n\tconst buttonModeProps = {\n\t\trole: 'button',\n\t\tonFocus: () => setIsFocused( true ),\n\t\tonBlur: () => setIsFocused( false ),\n\t\tonKeyDown: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { keyCode } = event;\n\t\t\tif ( onClick && ( keyCode === ENTER || keyCode === SPACE ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\tonClick: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( onClick ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\treadonly: true,\n\t};\n\n\tconst handleLoad = () => setHasIframeLoaded( true );\n\tuseLayoutEffect( () => {\n\t\tif ( goTo?.block && hasIframeLoaded && iframeRef?.current ) {\n\t\t\tscrollToSection( `example-${ goTo?.block }`, iframeRef?.current );\n\t\t}\n\t}, [ iframeRef?.current, goTo?.block, scrollToSection, hasIframeLoaded ] );\n\n\treturn (\n\t\t<Iframe\n\t\t\tonLoad={ handleLoad }\n\t\t\tref={ iframeRef }\n\t\t\tclassName={ clsx( 'edit-site-style-book__iframe', {\n\t\t\t\t'is-focused': isFocused && !! onClick,\n\t\t\t\t'is-button': !! onClick,\n\t\t\t} ) }\n\t\t\tname=\"style-book-canvas\"\n\t\t\ttabIndex={ 0 }\n\t\t\t{ ...( onClick ? buttonModeProps : {} ) }\n\t\t>\n\t\t\t<EditorStyles styles={ settings.styles } />\n\t\t\t<style>\n\t\t\t\t{ STYLE_BOOK_IFRAME_STYLES }\n\t\t\t\t{ !! onClick &&\n\t\t\t\t\t'body { cursor: pointer; } body * { pointer-events: none; }' }\n\t\t\t</style>\n\t\t\t<Examples\n\t\t\t\tclassName={ clsx( 'edit-site-style-book__examples', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t} ) }\n\t\t\t\texamples={ examples }\n\t\t\t\tcategory={ category }\n\t\t\t\tlabel={\n\t\t\t\t\ttitle\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Category of blocks, e.g. Text.\n\t\t\t\t\t\t\t\t__( 'Examples of blocks in the %s category' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Examples of blocks' )\n\t\t\t\t}\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tkey={ category }\n\t\t\t/>\n\t\t</Iframe>\n\t);\n};\n\nconst Examples = memo(\n\t( { className, examples, category, label, isSelected, onSelect } ) => {\n\t\tconst categoryDefinition = category\n\t\t\t? getTopLevelStyleBookCategories().find(\n\t\t\t\t\t( _category ) => _category.slug === category\n\t\t\t )\n\t\t\t: null;\n\n\t\tconst filteredExamples = categoryDefinition\n\t\t\t? getExamplesByCategory( categoryDefinition, examples )\n\t\t\t: { examples };\n\n\t\treturn (\n\t\t\t<Composite\n\t\t\t\torientation=\"vertical\"\n\t\t\t\tclassName={ className }\n\t\t\t\taria-label={ label }\n\t\t\t\trole=\"grid\"\n\t\t\t>\n\t\t\t\t{ !! filteredExamples?.examples?.length &&\n\t\t\t\t\tfilteredExamples.examples.map( ( example ) => (\n\t\t\t\t\t\t<Example\n\t\t\t\t\t\t\tkey={ example.name }\n\t\t\t\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\t\t\t\ttitle={ example.title }\n\t\t\t\t\t\t\tcontent={ example.content }\n\t\t\t\t\t\t\tblocks={ example.blocks }\n\t\t\t\t\t\t\tisSelected={ isSelected?.( example.name ) }\n\t\t\t\t\t\t\tonClick={ () => onSelect?.( example.name ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t{ !! filteredExamples?.subcategories?.length &&\n\t\t\t\t\tfilteredExamples.subcategories.map( ( subcategory ) => (\n\t\t\t\t\t\t<Composite.Group\n\t\t\t\t\t\t\tclassName=\"edit-site-style-book__subcategory\"\n\t\t\t\t\t\t\tkey={ `subcategory-${ subcategory.slug }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Composite.GroupLabel>\n\t\t\t\t\t\t\t\t<h2 className=\"edit-site-style-book__subcategory-title\">\n\t\t\t\t\t\t\t\t\t{ subcategory.title }\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t</Composite.GroupLabel>\n\t\t\t\t\t\t\t<Subcategory\n\t\t\t\t\t\t\t\texamples={ subcategory.examples }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Composite.Group>\n\t\t\t\t\t) ) }\n\t\t\t</Composite>\n\t\t);\n\t}\n);\n\nconst Subcategory = ( { examples, isSelected, onSelect } ) => {\n\treturn (\n\t\t!! examples?.length &&\n\t\texamples.map( ( example ) => (\n\t\t\t<Example\n\t\t\t\tkey={ example.name }\n\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\ttitle={ example.title }\n\t\t\t\tcontent={ example.content }\n\t\t\t\tblocks={ example.blocks }\n\t\t\t\tisSelected={ isSelected?.( example.name ) }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tonSelect?.( example.name );\n\t\t\t\t} }\n\t\t\t/>\n\t\t) )\n\t);\n};\n\nconst disabledExamples = [ 'example-duotones' ];\n\nconst Example = ( { id, title, blocks, isSelected, onClick, content } ) => {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tfocusMode: false, // Disable \"Spotlight mode\".\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\n\t// Cache the list of blocks to avoid additional processing when the component is re-rendered.\n\tconst renderedBlocks = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tconst disabledProps = disabledExamples.includes( id )\n\t\t? {\n\t\t\t\tdisabled: true,\n\t\t\t\taccessibleWhenDisabled: true,\n\t\t }\n\t\t: {};\n\n\treturn (\n\t\t<div role=\"row\">\n\t\t\t<div role=\"gridcell\">\n\t\t\t\t<Composite.Item\n\t\t\t\t\tclassName={ clsx( 'edit-site-style-book__example', {\n\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t'is-disabled-example': !! disabledProps?.disabled,\n\t\t\t\t\t} ) }\n\t\t\t\t\tid={ id }\n\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t// translators: %s: Title of a block, e.g. Heading.\n\t\t\t\t\t\t__( 'Open %s styles in Styles panel' ),\n\t\t\t\t\t\ttitle\n\t\t\t\t\t) }\n\t\t\t\t\trender={ <div /> }\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t{ ...disabledProps }\n\t\t\t\t>\n\t\t\t\t\t<span className=\"edit-site-style-book__example-title\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</span>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"edit-site-style-book__example-preview\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t<Disabled className=\"edit-site-style-book__example-preview__content\">\n\t\t\t\t\t\t\t{ content ? (\n\t\t\t\t\t\t\t\tcontent\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\t\t\t\t\t\tvalue={ renderedBlocks }\n\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EditorStyles />\n\t\t\t\t\t\t\t\t\t<BlockList renderAppender={ false } />\n\t\t\t\t\t\t\t\t</ExperimentalBlockEditorProvider>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Disabled>\n\t\t\t\t\t</div>\n\t\t\t\t</Composite.Item>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default StyleBook;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,QAAQ,EACRC,SAAS,EACTC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SACCC,SAAS,EACTL,WAAW,IAAIM,sBAAsB,EACrCC,KAAK,IAAIC,gBAAgB,EACzBC,WAAW,EACXC,sBAAsB,IAAIC,YAAY,EACtCC,gBAAgB,IAAIC,MAAM,EAC1BC,iDAAiD,IAAIC,mCAAmC,QAClF,yBAAyB;AAChC,SAASf,WAAW,IAAIgB,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SACCC,OAAO,EACPC,QAAQ,EACRC,IAAI,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AAArB,QAAA,eACnB5E,KAAA,CAACrC,SAAS,CAAC2K,IAAI;QACdzD,SAAS,EAAGpH,IAAI,CAAE,+BAA+B,EAAE;UAClD,aAAa,EAAEiF,UAAU;UACzB,qBAAqB,EAAE,CAAC,CAAEyF,aAAa,EAAEC;QAC1C,CAAE,CAAG;QACLd,EAAE,EAAGA,EAAI;QACT,cAAatJ,OAAO;QACnB;QACAF,EAAE,CAAE,gCAAiC,CAAC,EACtCyH,KACD,CAAG;QACHgD,MAAM,eAAGzI,IAAA,UAAM,CAAG;QAClBmG,IAAI,EAAC,QAAQ;QACbtD,OAAO,EAAGA,OAAS;QAAA,GACdwF,aAAa;QAAAvD,QAAA,gBAElB9E,IAAA;UAAM+E,SAAS,EAAC,qCAAqC;UAAAD,QAAA,EAClDW;QAAK,CACF,CAAC,eACPzF,IAAA;UACC+E,SAAS,EAAC,uCAAuC;UACjD,mBAAW;UAAAD,QAAA,eAEX9E,IAAA,CAACpC,QAAQ;YAACmH,SAAS,EAAC,gDAAgD;YAAAD,QAAA,EACjE2C,OAAO,GACRA,OAAO,gBAEPvH,KAAA,CAACC,+BAA+B;cAC/BuI,KAAK,EAAGR,cAAgB;cACxBxD,QAAQ,EAAGA,QAAU;cAAAI,QAAA,gBAErB9E,IAAA,CAACvB,YAAY,IAAE,CAAC,eAChBuB,IAAA,CAAC7B,SAAS;gBAACwK,cAAc,EAAG;cAAO,CAAE,CAAC;YAAA,CACN;UACjC,CACQ;QAAC,CACP,CAAC;MAAA,CACS;IAAC,CACb;EAAC,CACF,CAAC;AAER,CAAC;AAED,eAAejG,SAAS","ignoreList":[]}
|
|
@@ -6,9 +6,11 @@ import WelcomeGuideStyles from './styles';
|
|
|
6
6
|
import WelcomeGuidePage from './page';
|
|
7
7
|
import WelcomeGuideTemplate from './template';
|
|
8
8
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
export default function WelcomeGuide(
|
|
9
|
+
export default function WelcomeGuide({
|
|
10
|
+
postType
|
|
11
|
+
}) {
|
|
10
12
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
11
|
-
children: [/*#__PURE__*/_jsx(WelcomeGuideEditor, {}), /*#__PURE__*/_jsx(WelcomeGuideStyles, {}), /*#__PURE__*/_jsx(WelcomeGuidePage, {}), /*#__PURE__*/_jsx(WelcomeGuideTemplate, {})]
|
|
13
|
+
children: [/*#__PURE__*/_jsx(WelcomeGuideEditor, {}), /*#__PURE__*/_jsx(WelcomeGuideStyles, {}), postType === 'page' && /*#__PURE__*/_jsx(WelcomeGuidePage, {}), postType === 'wp_template' && /*#__PURE__*/_jsx(WelcomeGuideTemplate, {})]
|
|
12
14
|
});
|
|
13
15
|
}
|
|
14
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WelcomeGuideEditor","WelcomeGuideStyles","WelcomeGuidePage","WelcomeGuideTemplate","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuide","children"],"sources":["@wordpress/edit-site/src/components/welcome-guide/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport WelcomeGuideEditor from './editor';\nimport WelcomeGuideStyles from './styles';\nimport WelcomeGuidePage from './page';\nimport WelcomeGuideTemplate from './template';\n\nexport default function WelcomeGuide() {\n\treturn (\n\t\t<>\n\t\t\t<WelcomeGuideEditor />\n\t\t\t<WelcomeGuideStyles />\n\t\t\t<WelcomeGuidePage
|
|
1
|
+
{"version":3,"names":["WelcomeGuideEditor","WelcomeGuideStyles","WelcomeGuidePage","WelcomeGuideTemplate","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuide","postType","children"],"sources":["@wordpress/edit-site/src/components/welcome-guide/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport WelcomeGuideEditor from './editor';\nimport WelcomeGuideStyles from './styles';\nimport WelcomeGuidePage from './page';\nimport WelcomeGuideTemplate from './template';\n\nexport default function WelcomeGuide( { postType } ) {\n\treturn (\n\t\t<>\n\t\t\t<WelcomeGuideEditor />\n\t\t\t<WelcomeGuideStyles />\n\t\t\t{ postType === 'page' && <WelcomeGuidePage /> }\n\t\t\t{ postType === 'wp_template' && <WelcomeGuideTemplate /> }\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,kBAAkB,MAAM,UAAU;AACzC,OAAOC,kBAAkB,MAAM,UAAU;AACzC,OAAOC,gBAAgB,MAAM,QAAQ;AACrC,OAAOC,oBAAoB,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9C,eAAe,SAASC,YAAYA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACpD,oBACCF,KAAA,CAAAF,SAAA;IAAAK,QAAA,gBACCP,IAAA,CAACL,kBAAkB,IAAE,CAAC,eACtBK,IAAA,CAACJ,kBAAkB,IAAE,CAAC,EACpBU,QAAQ,KAAK,MAAM,iBAAIN,IAAA,CAACH,gBAAgB,IAAE,CAAC,EAC3CS,QAAQ,KAAK,aAAa,iBAAIN,IAAA,CAACF,oBAAoB,IAAE,CAAC;EAAA,CACvD,CAAC;AAEL","ignoreList":[]}
|
|
@@ -5,11 +5,6 @@ import { useDispatch, useSelect } from '@wordpress/data';
|
|
|
5
5
|
import { Guide } from '@wordpress/components';
|
|
6
6
|
import { __ } from '@wordpress/i18n';
|
|
7
7
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Internal dependencies
|
|
11
|
-
*/
|
|
12
|
-
import { store as editSiteStore } from '../../store';
|
|
13
8
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
9
|
export default function WelcomeGuidePage() {
|
|
15
10
|
const {
|
|
@@ -18,10 +13,7 @@ export default function WelcomeGuidePage() {
|
|
|
18
13
|
const isVisible = useSelect(select => {
|
|
19
14
|
const isPageActive = !!select(preferencesStore).get('core/edit-site', 'welcomeGuidePage');
|
|
20
15
|
const isEditorActive = !!select(preferencesStore).get('core/edit-site', 'welcomeGuide');
|
|
21
|
-
|
|
22
|
-
isPage
|
|
23
|
-
} = select(editSiteStore);
|
|
24
|
-
return isPageActive && !isEditorActive && isPage();
|
|
16
|
+
return isPageActive && !isEditorActive;
|
|
25
17
|
}, []);
|
|
26
18
|
if (!isVisible) {
|
|
27
19
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useDispatch","useSelect","Guide","__","store","preferencesStore","
|
|
1
|
+
{"version":3,"names":["useDispatch","useSelect","Guide","__","store","preferencesStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuidePage","toggle","isVisible","select","isPageActive","get","isEditorActive","heading","className","contentLabel","finishButtonText","onFinish","pages","image","autoPlay","loop","muted","width","height","children","src","type","content"],"sources":["@wordpress/edit-site/src/components/welcome-guide/page.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\nexport default function WelcomeGuidePage() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst isPageActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuidePage'\n\t\t);\n\t\tconst isEditorActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuide'\n\t\t);\n\t\treturn isPageActive && ! isEditorActive;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a page' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-page\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuidePage' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-page.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEnE,eAAe,SAASC,gBAAgBA,CAAA,EAAG;EA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ACH;IAEJ,CAAC;EACC,CACH,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -6,21 +6,11 @@ import { Guide } from '@wordpress/components';
|
|
|
6
6
|
import { __ } from '@wordpress/i18n';
|
|
7
7
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
8
8
|
import { store as editorStore } from '@wordpress/editor';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
|
-
import useEditedEntityRecord from '../use-edited-entity-record';
|
|
14
9
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
10
|
export default function WelcomeGuideTemplate() {
|
|
16
11
|
const {
|
|
17
12
|
toggle
|
|
18
13
|
} = useDispatch(preferencesStore);
|
|
19
|
-
const {
|
|
20
|
-
isLoaded,
|
|
21
|
-
record
|
|
22
|
-
} = useEditedEntityRecord();
|
|
23
|
-
const isPostTypeTemplate = isLoaded && record.type === 'wp_template';
|
|
24
14
|
const {
|
|
25
15
|
isActive,
|
|
26
16
|
hasPreviousEntity
|
|
@@ -36,7 +26,7 @@ export default function WelcomeGuideTemplate() {
|
|
|
36
26
|
hasPreviousEntity: !!getEditorSettings().onNavigateToPreviousEntityRecord
|
|
37
27
|
};
|
|
38
28
|
}, []);
|
|
39
|
-
const isVisible = isActive &&
|
|
29
|
+
const isVisible = isActive && hasPreviousEntity;
|
|
40
30
|
if (!isVisible) {
|
|
41
31
|
return null;
|
|
42
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useDispatch","useSelect","Guide","__","store","preferencesStore","editorStore","
|
|
1
|
+
{"version":3,"names":["useDispatch","useSelect","Guide","__","store","preferencesStore","editorStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuideTemplate","toggle","isActive","hasPreviousEntity","select","getEditorSettings","get","onNavigateToPreviousEntityRecord","isVisible","heading","className","contentLabel","finishButtonText","onFinish","pages","image","autoPlay","loop","muted","width","height","children","src","type","content"],"sources":["@wordpress/edit-site/src/components/welcome-guide/template.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\n\nexport default function WelcomeGuideTemplate() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst { isActive, hasPreviousEntity } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { get } = select( preferencesStore );\n\t\treturn {\n\t\t\tisActive: get( 'core/edit-site', 'welcomeGuideTemplate' ),\n\t\t\thasPreviousEntity:\n\t\t\t\t!! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t};\n\t}, [] );\n\tconst isVisible = isActive && hasPreviousEntity;\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a template' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-template\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () =>\n\t\t\t\ttoggle( 'core/edit-site', 'welcomeGuideTemplate' )\n\t\t\t}\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-template.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;AAClE,SAASD,KAAK,IAAIE,WAAW,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEzD,eAAe,SAASC,oBAAoBA,CAAA,EAAG;EAC9C,MAAM;IAAEC;EAAO,CAAC,GAAGd,WAAW,CAAEK,gBAAiB,CAAC;EAElD,MAAM;IAAEU,QAAQ;IAAEC;EAAkB,CAAC,GAAGf,SAAS,CAAIgB,MAAM,IAAM;IAChE,MAAM;MAAEC;IAAkB,CAAC,GAAGD,MAAM,CAAEX,WAAY,CAAC;IACnD,MAAM;MAAEa;IAAI,CAAC,GAAGF,MAAM,CAAEZ,gBAAiB,CAAC;IAC1C,OAAO;MACNU,QAAQ,EAAEI,GAAG,CAAE,gBAAgB,EAAE,sBAAuB,CAAC;MACzDH,iBAAiB,EAChB,CAAC,CAAEE,iBAAiB,CAAC,CAAC,CAACE;IACzB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAMC,SAAS,GAAGN,QAAQ,IAAIC,iBAAiB;EAE/C,IAAK,CAAEK,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,MAAMC,OAAO,GAAGnB,EAAE,CAAE,oBAAqB,CAAC;EAE1C,oBACCK,IAAA,CAACN,KAAK;IACLqB,SAAS,EAAC,wCAAwC;IAClDC,YAAY,EAAGF,OAAS;IACxBG,gBAAgB,EAAGtB,EAAE,CAAE,UAAW,CAAG;IACrCuB,QAAQ,EAAGA,CAAA,KACVZ,MAAM,CAAE,gBAAgB,EAAE,sBAAuB,CACjD;IACDa,KAAK,EAAG,CACP;MACCC,KAAK,eACJpB,IAAA;QACCe,SAAS,EAAC,gCAAgC;QAC1CM,QAAQ;QACRC,IAAI;QACJC,KAAK;QACLC,KAAK,EAAC,KAAK;QACXC,MAAM,EAAC,KAAK;QAAAC,QAAA,eAEZ1B,IAAA;UACC2B,GAAG,EAAC,+DAA+D;UACnEC,IAAI,EAAC;QAAW,CAChB;MAAC,CACI,CACP;MACDC,OAAO,eACNzB,KAAA,CAAAF,SAAA;QAAAwB,QAAA,gBACC1B,IAAA;UAAIe,SAAS,EAAC,kCAAkC;UAAAW,QAAA,EAC7CZ;QAAO,CACN,CAAC,eACLd,IAAA;UAAGe,SAAS,EAAC,+BAA+B;UAAAW,QAAA,EACzC/B,EAAE,CACH,4MACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC;EACC,CACH,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -23,7 +23,7 @@ const {
|
|
|
23
23
|
useHistory,
|
|
24
24
|
useLocation
|
|
25
25
|
} = unlock(routerPrivateApis);
|
|
26
|
-
function useGlobalStylesOpenStylesCommands() {
|
|
26
|
+
const getGlobalStylesOpenStylesCommands = () => function useGlobalStylesOpenStylesCommands() {
|
|
27
27
|
const {
|
|
28
28
|
openGeneralSidebar
|
|
29
29
|
} = unlock(useDispatch(editSiteStore));
|
|
@@ -71,8 +71,8 @@ function useGlobalStylesOpenStylesCommands() {
|
|
|
71
71
|
isLoading: false,
|
|
72
72
|
commands
|
|
73
73
|
};
|
|
74
|
-
}
|
|
75
|
-
function useGlobalStylesToggleWelcomeGuideCommands() {
|
|
74
|
+
};
|
|
75
|
+
const getGlobalStylesToggleWelcomeGuideCommands = () => function useGlobalStylesToggleWelcomeGuideCommands() {
|
|
76
76
|
const {
|
|
77
77
|
openGeneralSidebar
|
|
78
78
|
} = unlock(useDispatch(editSiteStore));
|
|
@@ -129,8 +129,8 @@ function useGlobalStylesToggleWelcomeGuideCommands() {
|
|
|
129
129
|
isLoading: false,
|
|
130
130
|
commands
|
|
131
131
|
};
|
|
132
|
-
}
|
|
133
|
-
function useGlobalStylesResetCommands() {
|
|
132
|
+
};
|
|
133
|
+
const getGlobalStylesResetCommands = () => function useGlobalStylesResetCommands() {
|
|
134
134
|
const [canReset, onReset] = useGlobalStylesReset();
|
|
135
135
|
const commands = useMemo(() => {
|
|
136
136
|
if (!canReset) {
|
|
@@ -152,8 +152,8 @@ function useGlobalStylesResetCommands() {
|
|
|
152
152
|
isLoading: false,
|
|
153
153
|
commands
|
|
154
154
|
};
|
|
155
|
-
}
|
|
156
|
-
function useGlobalStylesOpenCssCommands() {
|
|
155
|
+
};
|
|
156
|
+
const getGlobalStylesOpenCssCommands = () => function useGlobalStylesOpenCssCommands() {
|
|
157
157
|
const {
|
|
158
158
|
openGeneralSidebar,
|
|
159
159
|
setEditorCanvasContainerView
|
|
@@ -213,8 +213,8 @@ function useGlobalStylesOpenCssCommands() {
|
|
|
213
213
|
isLoading: false,
|
|
214
214
|
commands
|
|
215
215
|
};
|
|
216
|
-
}
|
|
217
|
-
function useGlobalStylesOpenRevisionsCommands() {
|
|
216
|
+
};
|
|
217
|
+
const getGlobalStylesOpenRevisionsCommands = () => function useGlobalStylesOpenRevisionsCommands() {
|
|
218
218
|
const {
|
|
219
219
|
openGeneralSidebar,
|
|
220
220
|
setEditorCanvasContainerView
|
|
@@ -270,7 +270,7 @@ function useGlobalStylesOpenRevisionsCommands() {
|
|
|
270
270
|
isLoading: false,
|
|
271
271
|
commands
|
|
272
272
|
};
|
|
273
|
-
}
|
|
273
|
+
};
|
|
274
274
|
export function useCommonCommands() {
|
|
275
275
|
const homeUrl = useSelect(select => {
|
|
276
276
|
// Site index.
|
|
@@ -289,23 +289,23 @@ export function useCommonCommands() {
|
|
|
289
289
|
});
|
|
290
290
|
useCommandLoader({
|
|
291
291
|
name: 'core/edit-site/open-styles',
|
|
292
|
-
hook:
|
|
292
|
+
hook: getGlobalStylesOpenStylesCommands()
|
|
293
293
|
});
|
|
294
294
|
useCommandLoader({
|
|
295
295
|
name: 'core/edit-site/toggle-styles-welcome-guide',
|
|
296
|
-
hook:
|
|
296
|
+
hook: getGlobalStylesToggleWelcomeGuideCommands()
|
|
297
297
|
});
|
|
298
298
|
useCommandLoader({
|
|
299
299
|
name: 'core/edit-site/reset-global-styles',
|
|
300
|
-
hook:
|
|
300
|
+
hook: getGlobalStylesResetCommands()
|
|
301
301
|
});
|
|
302
302
|
useCommandLoader({
|
|
303
303
|
name: 'core/edit-site/open-styles-css',
|
|
304
|
-
hook:
|
|
304
|
+
hook: getGlobalStylesOpenCssCommands()
|
|
305
305
|
});
|
|
306
306
|
useCommandLoader({
|
|
307
307
|
name: 'core/edit-site/open-styles-revisions',
|
|
308
|
-
hook:
|
|
308
|
+
hook: getGlobalStylesOpenRevisionsCommands()
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
//# sourceMappingURL=use-common-commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useDispatch","useSelect","__","isRTL","rotateLeft","rotateRight","backup","help","styles","external","brush","useCommandLoader","useCommand","privateApis","blockEditorPrivateApis","routerPrivateApis","store","preferencesStore","coreStore","unlock","editSiteStore","useGlobalStylesReset","useHistory","useLocation","useGlobalStylesOpenStylesCommands","openGeneralSidebar","params","canvas","history","isBlockBasedTheme","select","getCurrentTheme","is_block_theme","commands","name","label","callback","close","postId","push","path","undefined","transition","icon","isLoading","useGlobalStylesToggleWelcomeGuideCommands","set","setTimeout","useGlobalStylesResetCommands","canReset","onReset","useGlobalStylesOpenCssCommands","setEditorCanvasContainerView","canEditCSS","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","useGlobalStylesOpenRevisionsCommands","hasRevisions","count","useCommonCommands","homeUrl","home","window","open","hook"],"sources":["@wordpress/edit-site/src/hooks/commands/use-common-commands.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, isRTL } from '@wordpress/i18n';\nimport {\n\trotateLeft,\n\trotateRight,\n\tbackup,\n\thelp,\n\tstyles,\n\texternal,\n\tbrush,\n} from '@wordpress/icons';\nimport { useCommandLoader, useCommand } from '@wordpress/commands';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\n\nfunction useGlobalStylesOpenStylesCommands() {\n\tconst { openGeneralSidebar } = unlock( useDispatch( editSiteStore ) );\n\tconst { params } = useLocation();\n\tconst { canvas = 'view' } = params;\n\tconst history = useHistory();\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! isBlockBasedTheme ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-styles',\n\t\t\t\tlabel: __( 'Open styles' ),\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && canvas !== 'edit' ) {\n\t\t\t\t\t\thistory.push(\n\t\t\t\t\t\t\t{ ...params, canvas: 'edit' },\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttransition: 'canvas-mode-edit-transition',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t},\n\t\t\t\ticon: styles,\n\t\t\t},\n\t\t];\n\t}, [ history, openGeneralSidebar, params, canvas, isBlockBasedTheme ] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesToggleWelcomeGuideCommands() {\n\tconst { openGeneralSidebar } = unlock( useDispatch( editSiteStore ) );\n\tconst { params } = useLocation();\n\tconst { canvas = 'view' } = params;\n\tconst { set } = useDispatch( preferencesStore );\n\n\tconst history = useHistory();\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! isBlockBasedTheme ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\t\t\tlabel: __( 'Learn about styles' ),\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && canvas !== 'edit' ) {\n\t\t\t\t\t\thistory.push(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t...params,\n\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttransition: 'canvas-mode-edit-transition',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t\t\t// sometimes there's a focus loss that happens after some time\n\t\t\t\t\t// that closes the modal, we need to force reopening it.\n\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t\t\t}, 500 );\n\t\t\t\t},\n\t\t\t\ticon: help,\n\t\t\t},\n\t\t];\n\t}, [\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tcanvas,\n\t\tisBlockBasedTheme,\n\t\tset,\n\t\tparams,\n\t] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesResetCommands() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst commands = useMemo( () => {\n\t\tif ( ! canReset ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/reset-global-styles',\n\t\t\t\tlabel: __( 'Reset styles' ),\n\t\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tonReset();\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [ canReset, onReset ] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesOpenCssCommands() {\n\tconst { openGeneralSidebar, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { params } = useLocation();\n\tconst { canvas = 'view' } = params;\n\tconst history = useHistory();\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! canEditCSS ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-styles-css',\n\t\t\t\tlabel: __( 'Customize CSS' ),\n\t\t\t\ticon: brush,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && canvas !== 'edit' ) {\n\t\t\t\t\t\thistory.push(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t...params,\n\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttransition: 'canvas-mode-edit-transition',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetEditorCanvasContainerView,\n\t\tcanEditCSS,\n\t\tcanvas,\n\t\tparams,\n\t] );\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesOpenRevisionsCommands() {\n\tconst { openGeneralSidebar, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { params } = useLocation();\n\tconst { canvas = 'view' } = params;\n\tconst history = useHistory();\n\tconst hasRevisions = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\t\treturn !! globalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count;\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! hasRevisions ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-global-styles-revisions',\n\t\t\t\tlabel: __( 'Style revisions' ),\n\t\t\t\ticon: backup,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && canvas !== 'edit' ) {\n\t\t\t\t\t\thistory.push(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t...params,\n\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttransition: 'canvas-mode-edit-transition',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [\n\t\thasRevisions,\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetEditorCanvasContainerView,\n\t\tcanvas,\n\t\tparams,\n\t] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nexport function useCommonCommands() {\n\tconst homeUrl = useSelect( ( select ) => {\n\t\t// Site index.\n\t\treturn select( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t?.home;\n\t}, [] );\n\n\tuseCommand( {\n\t\tname: 'core/edit-site/view-site',\n\t\tlabel: __( 'View site' ),\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\twindow.open( homeUrl, '_blank' );\n\t\t},\n\t\ticon: external,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles',\n\t\thook: useGlobalStylesOpenStylesCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\thook: useGlobalStylesToggleWelcomeGuideCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/reset-global-styles',\n\t\thook: useGlobalStylesResetCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles-css',\n\t\thook: useGlobalStylesOpenCssCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles-revisions',\n\t\thook: useGlobalStylesOpenRevisionsCommands,\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAE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iBAAiBA,CAAA,EAAG;EACnC,MAAMC,OAAO,GAAG9D,SAAS,CAAI6B,MAAM,IAAM;IACxC;IACA,OAAOA,MAAM,CAAEZ,SAAU,CAAC,CAACoC,eAAe,CAAE,MAAM,EAAE,gBAAiB,CAAC,EACnEU,IAAI;EACR,CAAC,EAAE,EAAG,CAAC;EAEPpD,UAAU,CAAE;IACXsB,IAAI,EAAE,0BAA0B;IAChCC,KAAK,EAAEjC,EAAE,CAAE,WAAY,CAAC;IACxBkC,QAAQ,EAAEA,CAAE;MAAEC;IAAM,CAAC,KAAM;MAC1BA,KAAK,CAAC,CAAC;MACP4B,MAAM,CAACC,IAAI,CAAEH,OAAO,EAAE,QAAS,CAAC;IACjC,CAAC;IACDpB,IAAI,EAAElC;EACP,CAAE,CAAC;EAEHE,gBAAgB,CAAE;IACjBuB,IAAI,EAAE,4BAA4B;IAClCiC,IAAI,EAAE3C;EACP,CAAE,CAAC;EAEHb,gBAAgB,CAAE;IACjBuB,IAAI,EAAE,4CAA4C;IAClDiC,IAAI,EAAEtB;EACP,CAAE,CAAC;EAEHlC,gBAAgB,CAAE;IACjBuB,IAAI,EAAE,oCAAoC;IAC1CiC,IAAI,EAAEnB;EACP,CAAE,CAAC;EAEHrC,gBAAgB,CAAE;IACjBuB,IAAI,EAAE,gCAAgC;IACtCiC,IAAI,EAAEhB;EACP,CAAE,CAAC;EAEHxC,gBAAgB,CAAE;IACjBuB,IAAI,EAAE,sCAAsC;IAC5CiC,IAAI,EAAER;EACP,CAAE,CAAC;AACJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useMemo","useDispatch","useSelect","__","isRTL","rotateLeft","rotateRight","backup","help","styles","external","brush","useCommandLoader","useCommand","privateApis","blockEditorPrivateApis","routerPrivateApis","store","preferencesStore","coreStore","unlock","editSiteStore","useGlobalStylesReset","useHistory","useLocation","getGlobalStylesOpenStylesCommands","useGlobalStylesOpenStylesCommands","openGeneralSidebar","params","canvas","history","isBlockBasedTheme","select","getCurrentTheme","is_block_theme","commands","name","label","callback","close","postId","push","path","undefined","transition","icon","isLoading","getGlobalStylesToggleWelcomeGuideCommands","useGlobalStylesToggleWelcomeGuideCommands","set","setTimeout","getGlobalStylesResetCommands","useGlobalStylesResetCommands","canReset","onReset","getGlobalStylesOpenCssCommands","useGlobalStylesOpenCssCommands","setEditorCanvasContainerView","canEditCSS","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","getGlobalStylesOpenRevisionsCommands","useGlobalStylesOpenRevisionsCommands","hasRevisions","count","useCommonCommands","homeUrl","home","window","open","hook"],"sources":["@wordpress/edit-site/src/hooks/commands/use-common-commands.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, isRTL } from '@wordpress/i18n';\nimport {\n\trotateLeft,\n\trotateRight,\n\tbackup,\n\thelp,\n\tstyles,\n\texternal,\n\tbrush,\n} from '@wordpress/icons';\nimport { useCommandLoader, useCommand } from '@wordpress/commands';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\n\nconst getGlobalStylesOpenStylesCommands = () =>\n\tfunction useGlobalStylesOpenStylesCommands() {\n\t\tconst { openGeneralSidebar } = unlock( useDispatch( editSiteStore ) );\n\t\tconst { params } = useLocation();\n\t\tconst { canvas = 'view' } = params;\n\t\tconst history = useHistory();\n\t\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t\t}, [] );\n\n\t\tconst commands = useMemo( () => {\n\t\t\tif ( ! isBlockBasedTheme ) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tname: 'core/edit-site/open-styles',\n\t\t\t\t\tlabel: __( 'Open styles' ),\n\t\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\t\tclose();\n\t\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( params.postId && canvas !== 'edit' ) {\n\t\t\t\t\t\t\thistory.push(\n\t\t\t\t\t\t\t\t{ ...params, canvas: 'edit' },\n\t\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttransition: 'canvas-mode-edit-transition',\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\t},\n\t\t\t\t\ticon: styles,\n\t\t\t\t},\n\t\t\t];\n\t\t}, [ history, openGeneralSidebar, params, canvas, isBlockBasedTheme ] );\n\n\t\treturn {\n\t\t\tisLoading: false,\n\t\t\tcommands,\n\t\t};\n\t};\n\nconst getGlobalStylesToggleWelcomeGuideCommands = () =>\n\tfunction useGlobalStylesToggleWelcomeGuideCommands() {\n\t\tconst { openGeneralSidebar } = unlock( useDispatch( editSiteStore ) );\n\t\tconst { params } = useLocation();\n\t\tconst { canvas = 'view' } = params;\n\t\tconst { set } = useDispatch( preferencesStore );\n\n\t\tconst history = useHistory();\n\t\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t\t}, [] );\n\n\t\tconst commands = useMemo( () => {\n\t\t\tif ( ! isBlockBasedTheme ) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\t\t\t\tlabel: __( 'Learn about styles' ),\n\t\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\t\tclose();\n\t\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( params.postId && canvas !== 'edit' ) {\n\t\t\t\t\t\t\thistory.push(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t...params,\n\t\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttransition: 'canvas-mode-edit-transition',\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t\t\t\t// sometimes there's a focus loss that happens after some time\n\t\t\t\t\t\t// that closes the modal, we need to force reopening it.\n\t\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t\t\t\t}, 500 );\n\t\t\t\t\t},\n\t\t\t\t\ticon: help,\n\t\t\t\t},\n\t\t\t];\n\t\t}, [\n\t\t\thistory,\n\t\t\topenGeneralSidebar,\n\t\t\tcanvas,\n\t\t\tisBlockBasedTheme,\n\t\t\tset,\n\t\t\tparams,\n\t\t] );\n\n\t\treturn {\n\t\t\tisLoading: false,\n\t\t\tcommands,\n\t\t};\n\t};\n\nconst getGlobalStylesResetCommands = () =>\n\tfunction useGlobalStylesResetCommands() {\n\t\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\t\tconst commands = useMemo( () => {\n\t\t\tif ( ! canReset ) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tname: 'core/edit-site/reset-global-styles',\n\t\t\t\t\tlabel: __( 'Reset styles' ),\n\t\t\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\t\tclose();\n\t\t\t\t\t\tonReset();\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t];\n\t\t}, [ canReset, onReset ] );\n\n\t\treturn {\n\t\t\tisLoading: false,\n\t\t\tcommands,\n\t\t};\n\t};\n\nconst getGlobalStylesOpenCssCommands = () =>\n\tfunction useGlobalStylesOpenCssCommands() {\n\t\tconst { openGeneralSidebar, setEditorCanvasContainerView } = unlock(\n\t\t\tuseDispatch( editSiteStore )\n\t\t);\n\t\tconst { params } = useLocation();\n\t\tconst { canvas = 'view' } = params;\n\t\tconst history = useHistory();\n\t\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\t\tselect( coreStore );\n\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\n\t\t\treturn {\n\t\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t\t};\n\t\t}, [] );\n\n\t\tconst commands = useMemo( () => {\n\t\t\tif ( ! canEditCSS ) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tname: 'core/edit-site/open-styles-css',\n\t\t\t\t\tlabel: __( 'Customize CSS' ),\n\t\t\t\t\ticon: brush,\n\t\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\t\tclose();\n\t\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( params.postId && canvas !== 'edit' ) {\n\t\t\t\t\t\t\thistory.push(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t...params,\n\t\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttransition: 'canvas-mode-edit-transition',\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t];\n\t\t}, [\n\t\t\thistory,\n\t\t\topenGeneralSidebar,\n\t\t\tsetEditorCanvasContainerView,\n\t\t\tcanEditCSS,\n\t\t\tcanvas,\n\t\t\tparams,\n\t\t] );\n\t\treturn {\n\t\t\tisLoading: false,\n\t\t\tcommands,\n\t\t};\n\t};\n\nconst getGlobalStylesOpenRevisionsCommands = () =>\n\tfunction useGlobalStylesOpenRevisionsCommands() {\n\t\tconst { openGeneralSidebar, setEditorCanvasContainerView } = unlock(\n\t\t\tuseDispatch( editSiteStore )\n\t\t);\n\t\tconst { params } = useLocation();\n\t\tconst { canvas = 'view' } = params;\n\t\tconst history = useHistory();\n\t\tconst hasRevisions = useSelect( ( select ) => {\n\t\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\treturn !! globalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count;\n\t\t}, [] );\n\n\t\tconst commands = useMemo( () => {\n\t\t\tif ( ! hasRevisions ) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tname: 'core/edit-site/open-global-styles-revisions',\n\t\t\t\t\tlabel: __( 'Style revisions' ),\n\t\t\t\t\ticon: backup,\n\t\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\t\tclose();\n\t\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( params.postId && canvas !== 'edit' ) {\n\t\t\t\t\t\t\thistory.push(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t...params,\n\t\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttransition: 'canvas-mode-edit-transition',\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t'global-styles-revisions'\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t];\n\t\t}, [\n\t\t\thasRevisions,\n\t\t\thistory,\n\t\t\topenGeneralSidebar,\n\t\t\tsetEditorCanvasContainerView,\n\t\t\tcanvas,\n\t\t\tparams,\n\t\t] );\n\n\t\treturn {\n\t\t\tisLoading: false,\n\t\t\tcommands,\n\t\t};\n\t};\n\nexport function useCommonCommands() {\n\tconst homeUrl = useSelect( ( select ) => {\n\t\t// Site index.\n\t\treturn select( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t?.home;\n\t}, [] );\n\n\tuseCommand( {\n\t\tname: 'core/edit-site/view-site',\n\t\tlabel: __( 'View site' ),\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\twindow.open( homeUrl, '_blank' );\n\t\t},\n\t\ticon: external,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles',\n\t\thook: getGlobalStylesOpenStylesCommands(),\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\thook: getGlobalStylesToggleWelcomeGuideCommands(),\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/reset-global-styles',\n\t\thook: getGlobalStylesResetCommands(),\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles-css',\n\t\thook: getGlobalStylesOpenCssCommands(),\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles-revisions',\n\t\thook: getGlobalStylesOpenRevisionsCommands(),\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,KAAK,QAAQ,iBAAiB;AAC3C,SACCC,UAAU,EACVC,WAAW,EACXC,MAAM,EACNC,IAAI,EACJC,MAAM,EACNC,QAAQ,EACRC,KAAK,QACC,kBAAkB;AACzB,SAASC,gBAAgB,EAAEC,UAAU,QAAQ,qBAAqB;AAClE,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASD,WAAW,IAAIE,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;AAClE,SAASD,KAAK,IAAIE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BAAiB,CAAC,EACnEW,IAAI;EACR,CAAC,EAAE,EAAG,CAAC;EAEPzD,UAAU,CAAE;IACXuB,IAAI,EAAE,0BAA0B;IAChCC,KAAK,EAAElC,EAAE,CAAE,WAAY,CAAC;IACxBmC,QAAQ,EAAEA,CAAE;MAAEC;IAAM,CAAC,KAAM;MAC1BA,KAAK,CAAC,CAAC;MACPgC,MAAM,CAACC,IAAI,CAAEH,OAAO,EAAE,QAAS,CAAC;IACjC,CAAC;IACDxB,IAAI,EAAEnC;EACP,CAAE,CAAC;EAEHE,gBAAgB,CAAE;IACjBwB,IAAI,EAAE,4BAA4B;IAClCqC,IAAI,EAAEhD,iCAAiC,CAAC;EACzC,CAAE,CAAC;EAEHb,gBAAgB,CAAE;IACjBwB,IAAI,EAAE,4CAA4C;IAClDqC,IAAI,EAAE1B,yCAAyC,CAAC;EACjD,CAAE,CAAC;EAEHnC,gBAAgB,CAAE;IACjBwB,IAAI,EAAE,oCAAoC;IAC1CqC,IAAI,EAAEtB,4BAA4B,CAAC;EACpC,CAAE,CAAC;EAEHvC,gBAAgB,CAAE;IACjBwB,IAAI,EAAE,gCAAgC;IACtCqC,IAAI,EAAElB,8BAA8B,CAAC;EACtC,CAAE,CAAC;EAEH3C,gBAAgB,CAAE;IACjBwB,IAAI,EAAE,sCAAsC;IAC5CqC,IAAI,EAAET,oCAAoC,CAAC;EAC5C,CAAE,CAAC;AACJ","ignoreList":[]}
|
package/build-module/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { registerCoreBlocks, __experimentalGetCoreBlocks, __experimentalRegister
|
|
|
6
6
|
import { dispatch } from '@wordpress/data';
|
|
7
7
|
import deprecated from '@wordpress/deprecated';
|
|
8
8
|
import { createRoot, StrictMode } from '@wordpress/element';
|
|
9
|
-
import {
|
|
9
|
+
import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
10
10
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
11
11
|
import { registerLegacyWidgetBlock, registerWidgetGroupBlock } from '@wordpress/widgets';
|
|
12
12
|
|
|
@@ -62,6 +62,7 @@ export function initializeEditor(id, settings) {
|
|
|
62
62
|
allowRightClickOverrides: true,
|
|
63
63
|
distractionFree: false,
|
|
64
64
|
editorMode: 'visual',
|
|
65
|
+
editorTool: 'edit',
|
|
65
66
|
fixedToolbar: false,
|
|
66
67
|
focusMode: false,
|
|
67
68
|
inactivePanels: [],
|
|
@@ -79,15 +80,6 @@ export function initializeEditor(id, settings) {
|
|
|
79
80
|
}
|
|
80
81
|
dispatch(editSiteStore).updateSettings(settings);
|
|
81
82
|
|
|
82
|
-
// Keep the defaultTemplateTypes in the core/editor settings too,
|
|
83
|
-
// so that they can be selected with core/editor selectors in any editor.
|
|
84
|
-
// This is needed because edit-site doesn't initialize with EditorProvider,
|
|
85
|
-
// which internally uses updateEditorSettings as well.
|
|
86
|
-
dispatch(editorStore).updateEditorSettings({
|
|
87
|
-
defaultTemplateTypes: settings.defaultTemplateTypes,
|
|
88
|
-
defaultTemplatePartAreas: settings.defaultTemplatePartAreas
|
|
89
|
-
});
|
|
90
|
-
|
|
91
83
|
// Prevent the default browser action for files dropped outside of dropzones.
|
|
92
84
|
window.addEventListener('dragover', e => e.preventDefault(), false);
|
|
93
85
|
window.addEventListener('drop', e => e.preventDefault(), false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","deprecated","createRoot","StrictMode","
|
|
1
|
+
{"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","deprecated","createRoot","StrictMode","privateApis","editorPrivateApis","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editSiteStore","unlock","App","jsx","_jsx","registerCoreBlockBindingsSources","initializeEditor","id","settings","target","document","getElementById","root","reapplyBlockTypeFilters","coreBlocks","filter","name","setFreeformFallbackBlockName","inserter","globalThis","IS_GUTENBERG_PLUGIN","enableFSEBlocks","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","editorTool","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","enableChoosePatternModal","window","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","updateSettings","addEventListener","e","preventDefault","render","children","reinitializeEditor","since","version","default","PluginTemplateSettingPanel","initializePostsDashboard"],"sources":["@wordpress/edit-site/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst { registerCoreBlockBindingsSources } = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n\n// Temporary: While the posts dashboard is being iterated on\n// it's being built in the same package as the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BAAgB,CAAE,MAAM,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EAErElC,IAAI,CAACmC,MAAM,cACV3C,IAAA,CAACV,UAAU;IAAAsD,QAAA,eACV5C,IAAA,CAACF,GAAG,IAAE;EAAC,CACI,CACb,CAAC;EAED,OAAOU,IAAI;AACZ;AAEA,OAAO,SAASqC,kBAAkBA,CAAA,EAAG;EACpCzD,UAAU,CAAE,gCAAgC,EAAE;IAC7C0D,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;AAEA,SAASC,OAAO,IAAIC,0BAA0B,QAAQ,4CAA4C;AAClG,SAASnE,KAAK,QAAQ,SAAS;AAC/B,cAAc,cAAc;;AAE5B;AACA;AACA,SAASoE,wBAAwB,QAAQ,SAAS","ignoreList":[]}
|
package/build-module/posts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","createRoot","StrictMode","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editSiteStore","PostsApp","jsx","_jsx","initializePostsDashboard","id","settings","globalThis","IS_GUTENBERG_PLUGIN","target","document","getElementById","root","reapplyBlockTypeFilters","coreBlocks","filter","name","setFreeformFallbackBlockName","inserter","enableFSEBlocks","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","enableChoosePatternModal","updateSettings","window","addEventListener","e","preventDefault","render","children"],"sources":["@wordpress/edit-site/src/posts.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\n\n/**\n * Internal dependencies\n */\nimport PostsApp from './components/posts-app';\n\n/**\n * Initializes the \"Posts Dashboard\"\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializePostsDashboard( id, settings ) {\n\tif ( ! globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\treturn;\n\t}\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<PostsApp />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,2BAA2B,EAC3BC,4CAA4C,QACtC,0BAA0B;AACjC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;AAC3D,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;;AAE3B;AACA;AACA;AACA,OAAO,SAAS;AAChB,SAASV,KAAK,IAAIW,aAAa,QAAQ,SAAS;;AAEhD;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,wBAAwB;;AAE7C;AACA;AACA;AACA;AACA;AAJA,SAAAC,GAAA,IAAAC,IAAA;AAKA,OAAO,SAASC,wBAAwBA,CAAEC,EAAE,EAAEC,QAAQ,EAAG;EACxD,IAAK,CAAEC,UAAU,CAACC,mBAAmB,EAAG;IACvC;EACD;EACA,MAAMC,MAAM,GAAGC,QAAQ,CAACC,cAAc,CAAEN,EAAG,CAAC;EAC5C,MAAMO,IAAI,GAAGjB,UAAU,CAAEc,MAAO,CAAC;EAEjCf,QAAQ,CAAEJ,WAAY,CAAC,CAACuB,uBAAuB,CAAC,CAAC;EACjD,MAAMC,UAAU,GAAGtB,2BAA2B,CAAC,CAAC,CAACuB,MAAM,CACtD,CAAE;IAAEC;EAAK,CAAC,KAAMA,IAAI,KAAK,eAC1B,CAAC;EACDzB,kBAAkB,CAAEuB,UAAW,CAAC;EAChCpB,QAAQ,CAAEJ,WAAY,CAAC,CAAC2B,4BAA4B,CAAE,WAAY,CAAC;EACnEnB,yBAAyB,CAAE;IAAEoB,QAAQ,EAAE;EAAM,CAAE,CAAC;EAChDnB,wBAAwB,CAAE;IAAEmB,QAAQ,EAAE;EAAM,CAAE,CAAC;EAC/C,IAAKX,UAAU,CAACC,mBAAmB,EAAG;IACrCf,4CAA4C,CAAE;MAC7C0B,eAAe,EAAE;IAClB,CAAE,CAAC;EACJ;;EAEA;EACA;EACAzB,QAAQ,CAAEG,gBAAiB,CAAC,CAACuB,WAAW,CAAE,gBAAgB,EAAE;IAC3DC,YAAY,EAAE,IAAI;IAClBC,kBAAkB,EAAE,IAAI;IACxBC,gBAAgB,EAAE,IAAI;IACtBC,oBAAoB,EAAE;EACvB,CAAE,CAAC;EAEH9B,QAAQ,CAAEG,gBAAiB,CAAC,CAACuB,WAAW,CAAE,MAAM,EAAE;IACjDK,wBAAwB,EAAE,IAAI;IAC9BC,eAAe,EAAE,KAAK;IACtBC,UAAU,EAAE,QAAQ;IACpBC,YAAY,EAAE,KAAK;IACnBC,SAAS,EAAE,KAAK;IAChBC,cAAc,EAAE,EAAE;IAClBC,oBAAoB,EAAE,KAAK;IAC3BC,UAAU,EAAE,CAAE,aAAa,CAAE;IAC7BC,oBAAoB,EAAE,IAAI;IAC1BC,qBAAqB,EAAE,KAAK;IAC5BC,wBAAwB,EAAE;EAC3B,CAAE,CAAC;
|
|
1
|
+
{"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","createRoot","StrictMode","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editSiteStore","PostsApp","jsx","_jsx","initializePostsDashboard","id","settings","globalThis","IS_GUTENBERG_PLUGIN","target","document","getElementById","root","reapplyBlockTypeFilters","coreBlocks","filter","name","setFreeformFallbackBlockName","inserter","enableFSEBlocks","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","editorTool","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","enableChoosePatternModal","updateSettings","window","addEventListener","e","preventDefault","render","children"],"sources":["@wordpress/edit-site/src/posts.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\n\n/**\n * Internal dependencies\n */\nimport PostsApp from './components/posts-app';\n\n/**\n * Initializes the \"Posts Dashboard\"\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializePostsDashboard( id, settings ) {\n\tif ( ! globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\treturn;\n\t}\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<PostsApp />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,2BAA2B,EAC3BC,4CAA4C,QACtC,0BAA0B;AACjC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;AAC3D,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;;AAE3B;AACA;AACA;AACA,OAAO,SAAS;AAChB,SAASV,KAAK,IAAIW,aAAa,QAAQ,SAAS;;AAEhD;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,wBAAwB;;AAE7C;AACA;A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