@wordpress/edit-site 6.33.5 → 6.34.1-next.2f1c7c01b.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-pattern/index.js +6 -4
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-post/index.js +3 -1
- package/build/components/add-new-post/index.js.map +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +3 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js +4 -2
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/index.js +7 -5
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/utils.js +14 -12
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js +4 -2
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/use-editor-iframe-props.js +3 -1
- package/build/components/block-editor/use-editor-iframe-props.js.map +1 -1
- package/build/components/block-editor/use-navigate-to-entity-record.js +3 -1
- package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
- package/build/components/block-editor/use-site-editor-settings.js +17 -3
- package/build/components/block-editor/use-site-editor-settings.js.map +3 -3
- package/build/components/canvas-loader/index.js +9 -10
- package/build/components/canvas-loader/index.js.map +3 -3
- package/build/components/dataviews-actions/index.js +5 -3
- package/build/components/dataviews-actions/index.js.map +1 -1
- package/build/components/editor/index.js +10 -46
- package/build/components/editor/index.js.map +3 -3
- package/build/components/editor/site-preview.js +3 -1
- package/build/components/editor/site-preview.js.map +1 -1
- package/build/components/editor/use-adapt-editor-to-canvas.js +2 -0
- package/build/components/editor/use-adapt-editor-to-canvas.js.map +1 -1
- package/build/components/editor/use-editor-title.js +3 -1
- package/build/components/editor/use-editor-title.js.map +1 -1
- package/build/components/editor/use-resolve-edited-entity.js +5 -3
- package/build/components/editor/use-resolve-edited-entity.js.map +1 -1
- package/build/components/layout/animation.js +3 -1
- package/build/components/layout/animation.js.map +1 -1
- package/build/components/layout/hooks.js +3 -1
- package/build/components/layout/hooks.js.map +1 -1
- package/build/components/layout/index.js +10 -10
- package/build/components/layout/index.js.map +3 -3
- package/build/components/media/index.js +3 -1
- package/build/components/media/index.js.map +1 -1
- package/build/components/more-menu/index.js +4 -2
- package/build/components/more-menu/index.js.map +1 -1
- package/build/components/more-menu/site-export.js +3 -1
- package/build/components/more-menu/site-export.js.map +1 -1
- package/build/components/more-menu/welcome-guide-menu-item.js +3 -1
- package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build/components/page-patterns/actions.js +3 -1
- package/build/components/page-patterns/actions.js.map +1 -1
- package/build/components/page-patterns/delete-category-menu-item.js +4 -2
- package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
- package/build/components/page-patterns/fields.js +11 -8
- package/build/components/page-patterns/fields.js.map +3 -3
- package/build/components/page-patterns/index.js +9 -7
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/rename-category-menu-item.js +4 -2
- package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build/components/page-patterns/search-items.js +10 -8
- package/build/components/page-patterns/search-items.js.map +1 -1
- package/build/components/page-patterns/use-pattern-settings.js +2 -0
- package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +8 -6
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-patterns/utils.js +3 -1
- package/build/components/page-patterns/utils.js.map +1 -1
- package/build/components/page-templates/fields.js +13 -11
- package/build/components/page-templates/fields.js.map +3 -3
- package/build/components/page-templates/hooks.js +2 -0
- package/build/components/page-templates/hooks.js.map +1 -1
- package/build/components/page-templates/index.js +6 -4
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/page-templates/view-utils.js +4 -2
- package/build/components/page-templates/view-utils.js.map +1 -1
- package/build/components/pagination/index.js +3 -1
- package/build/components/pagination/index.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js +5 -3
- package/build/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build/components/post-edit/index.js +5 -3
- package/build/components/post-edit/index.js.map +1 -1
- package/build/components/post-list/index.js +8 -6
- package/build/components/post-list/index.js.map +1 -1
- package/build/components/post-list/view-utils.js +5 -3
- package/build/components/post-list/view-utils.js.map +1 -1
- package/build/components/posts-app/index.js +4 -2
- package/build/components/posts-app/index.js.map +1 -1
- package/build/components/posts-app-routes/index.js +3 -1
- package/build/components/posts-app-routes/index.js.map +1 -1
- package/build/components/posts-app-routes/post-item.js +4 -2
- package/build/components/posts-app-routes/post-item.js.map +1 -1
- package/build/components/posts-app-routes/posts.js +5 -3
- package/build/components/posts-app-routes/posts.js.map +1 -1
- package/build/components/resizable-frame/index.js +10 -8
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/routes/use-title.js +3 -1
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/save-button/index.js +4 -2
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +3 -1
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-keyboard-shortcut/index.js +3 -1
- package/build/components/save-keyboard-shortcut/index.js.map +1 -1
- package/build/components/save-panel/index.js +7 -5
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar/index.js +4 -2
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-button/index.js +3 -1
- package/build/components/sidebar-button/index.js.map +1 -1
- package/build/components/sidebar-dataviews/dataview-item.js +4 -2
- package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +4 -2
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/{sidebar-global-styles-wrapper → sidebar-global-styles}/index.js +28 -50
- package/build/components/sidebar-global-styles/index.js.map +7 -0
- package/build/components/sidebar-navigation-item/index.js +4 -2
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +4 -2
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +3 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/content.js +41 -17
- package/build/components/sidebar-navigation-screen-global-styles/content.js.map +3 -3
- package/build/components/sidebar-navigation-screen-global-styles/index.js +10 -9
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +3 -3
- package/build/components/sidebar-navigation-screen-main/index.js +3 -10
- package/build/components/sidebar-navigation-screen-main/index.js.map +3 -3
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +3 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +5 -3
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +5 -3
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +4 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +4 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +3 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +3 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +2 -0
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +4 -2
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +5 -3
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +6 -4
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +4 -2
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +2 -0
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +2 -0
- 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 +3 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +2 -0
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.js +5 -3
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +3 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-unsupported/index.js +3 -1
- package/build/components/sidebar-navigation-screen-unsupported/index.js.map +1 -1
- package/build/components/site-editor-routes/home.js +4 -2
- package/build/components/site-editor-routes/home.js.map +1 -1
- package/build/components/site-editor-routes/index.js +3 -1
- package/build/components/site-editor-routes/index.js.map +1 -1
- package/build/components/site-editor-routes/navigation-item.js +5 -3
- package/build/components/site-editor-routes/navigation-item.js.map +1 -1
- package/build/components/site-editor-routes/navigation.js +5 -3
- package/build/components/site-editor-routes/navigation.js.map +1 -1
- package/build/components/site-editor-routes/notfound.js +4 -2
- package/build/components/site-editor-routes/notfound.js.map +1 -1
- package/build/components/site-editor-routes/page-item.js +4 -2
- package/build/components/site-editor-routes/page-item.js.map +1 -1
- package/build/components/site-editor-routes/pages.js +5 -3
- package/build/components/site-editor-routes/pages.js.map +1 -1
- package/build/components/site-editor-routes/pattern-item.js +4 -2
- package/build/components/site-editor-routes/pattern-item.js.map +1 -1
- package/build/components/site-editor-routes/patterns.js +4 -2
- package/build/components/site-editor-routes/patterns.js.map +1 -1
- package/build/components/site-editor-routes/stylebook.js +9 -5
- package/build/components/site-editor-routes/stylebook.js.map +3 -3
- package/build/components/site-editor-routes/styles.js +37 -13
- package/build/components/site-editor-routes/styles.js.map +3 -3
- package/build/components/site-editor-routes/template-item.js +5 -3
- package/build/components/site-editor-routes/template-item.js.map +1 -1
- package/build/components/site-editor-routes/template-part-item.js +4 -2
- package/build/components/site-editor-routes/template-part-item.js.map +1 -1
- package/build/components/site-editor-routes/templates.js +4 -2
- package/build/components/site-editor-routes/templates.js.map +1 -1
- package/build/components/site-editor-routes/utils.js +2 -0
- package/build/components/site-editor-routes/utils.js.map +1 -1
- package/build/components/site-hub/index.js +6 -4
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/site-icon/index.js +3 -1
- package/build/components/site-icon/index.js.map +1 -1
- package/build/components/welcome-guide/editor.js +3 -1
- package/build/components/welcome-guide/editor.js.map +1 -1
- package/build/components/welcome-guide/image.js +2 -0
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js +3 -3
- package/build/components/welcome-guide/index.js.map +3 -3
- package/build/components/welcome-guide/page.js +3 -1
- package/build/components/welcome-guide/page.js.map +1 -1
- package/build/components/welcome-guide/template.js +3 -1
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/deprecated.js +5 -3
- package/build/deprecated.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +16 -16
- package/build/hooks/commands/use-common-commands.js.map +3 -3
- package/build/hooks/commands/use-set-command-context.js +4 -7
- package/build/hooks/commands/use-set-command-context.js.map +2 -2
- package/build/index.js +4 -3
- package/build/index.js.map +2 -2
- package/build/lock-unlock.js +3 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/posts.js +3 -2
- package/build/posts.js.map +2 -2
- package/build/store/actions.js +14 -12
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +3 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +4 -2
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +2 -8
- package/build/store/private-actions.js.map +2 -2
- package/build/store/private-selectors.js +2 -5
- package/build/store/private-selectors.js.map +2 -2
- package/build/store/reducer.js +2 -8
- package/build/store/reducer.js.map +2 -2
- package/build/store/selectors.js +11 -9
- package/build/store/selectors.js.map +1 -1
- package/build/utils/constants.js +18 -16
- package/build/utils/constants.js.map +1 -1
- package/build/utils/get-filtered-template-parts.js +3 -1
- package/build/utils/get-filtered-template-parts.js.map +1 -1
- package/build/utils/is-previewing-theme.js +2 -0
- package/build/utils/is-previewing-theme.js.map +1 -1
- package/build/utils/is-template-removable.js +2 -0
- package/build/utils/is-template-removable.js.map +1 -1
- package/build/utils/is-template-revertable.js +2 -0
- package/build/utils/is-template-revertable.js.map +2 -2
- package/build/utils/use-activate-theme.js +3 -1
- package/build/utils/use-activate-theme.js.map +1 -1
- package/build/utils/use-actual-current-theme.js +3 -1
- package/build/utils/use-actual-current-theme.js.map +1 -1
- package/build-module/components/add-new-pattern/index.js +5 -4
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/add-new-post/index.js +2 -1
- package/build-module/components/add-new-post/index.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +2 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js +3 -2
- package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/index.js +6 -5
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +13 -12
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js +3 -2
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/use-editor-iframe-props.js +2 -1
- package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -1
- package/build-module/components/block-editor/use-navigate-to-entity-record.js +2 -1
- package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
- package/build-module/components/block-editor/use-site-editor-settings.js +16 -3
- package/build-module/components/block-editor/use-site-editor-settings.js.map +2 -2
- package/build-module/components/canvas-loader/index.js +8 -10
- package/build-module/components/canvas-loader/index.js.map +2 -2
- package/build-module/components/dataviews-actions/index.js +4 -3
- package/build-module/components/dataviews-actions/index.js.map +1 -1
- package/build-module/components/editor/index.js +11 -52
- package/build-module/components/editor/index.js.map +2 -2
- package/build-module/components/editor/site-preview.js +2 -1
- package/build-module/components/editor/site-preview.js.map +1 -1
- package/build-module/components/editor/use-adapt-editor-to-canvas.js +1 -0
- package/build-module/components/editor/use-adapt-editor-to-canvas.js.map +1 -1
- package/build-module/components/editor/use-editor-title.js +2 -1
- package/build-module/components/editor/use-editor-title.js.map +1 -1
- package/build-module/components/editor/use-resolve-edited-entity.js +4 -3
- package/build-module/components/editor/use-resolve-edited-entity.js.map +1 -1
- package/build-module/components/layout/animation.js +2 -1
- package/build-module/components/layout/animation.js.map +1 -1
- package/build-module/components/layout/hooks.js +2 -1
- package/build-module/components/layout/hooks.js.map +1 -1
- package/build-module/components/layout/index.js +9 -10
- package/build-module/components/layout/index.js.map +2 -2
- package/build-module/components/media/index.js +2 -1
- package/build-module/components/media/index.js.map +1 -1
- package/build-module/components/more-menu/index.js +3 -2
- package/build-module/components/more-menu/index.js.map +1 -1
- package/build-module/components/more-menu/site-export.js +2 -1
- package/build-module/components/more-menu/site-export.js.map +1 -1
- package/build-module/components/more-menu/welcome-guide-menu-item.js +2 -1
- package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/actions.js +2 -1
- package/build-module/components/page-patterns/actions.js.map +1 -1
- package/build-module/components/page-patterns/delete-category-menu-item.js +3 -2
- package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/fields.js +11 -12
- package/build-module/components/page-patterns/fields.js.map +2 -2
- package/build-module/components/page-patterns/index.js +8 -7
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/rename-category-menu-item.js +3 -2
- package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/search-items.js +11 -10
- package/build-module/components/page-patterns/search-items.js.map +1 -1
- package/build-module/components/page-patterns/use-pattern-settings.js +1 -0
- package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +7 -6
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-patterns/utils.js +2 -1
- package/build-module/components/page-patterns/utils.js.map +1 -1
- package/build-module/components/page-templates/fields.js +16 -15
- package/build-module/components/page-templates/fields.js.map +2 -2
- package/build-module/components/page-templates/hooks.js +1 -0
- package/build-module/components/page-templates/hooks.js.map +1 -1
- package/build-module/components/page-templates/index.js +5 -4
- package/build-module/components/page-templates/index.js.map +1 -1
- package/build-module/components/page-templates/view-utils.js +3 -2
- package/build-module/components/page-templates/view-utils.js.map +1 -1
- package/build-module/components/pagination/index.js +2 -1
- package/build-module/components/pagination/index.js.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js +4 -3
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build-module/components/post-edit/index.js +4 -3
- package/build-module/components/post-edit/index.js.map +1 -1
- package/build-module/components/post-list/index.js +7 -6
- package/build-module/components/post-list/index.js.map +1 -1
- package/build-module/components/post-list/view-utils.js +4 -3
- package/build-module/components/post-list/view-utils.js.map +1 -1
- package/build-module/components/posts-app/index.js +3 -2
- package/build-module/components/posts-app/index.js.map +1 -1
- package/build-module/components/posts-app-routes/index.js +2 -1
- package/build-module/components/posts-app-routes/index.js.map +1 -1
- package/build-module/components/posts-app-routes/post-item.js +3 -2
- package/build-module/components/posts-app-routes/post-item.js.map +1 -1
- package/build-module/components/posts-app-routes/posts.js +4 -3
- package/build-module/components/posts-app-routes/posts.js.map +1 -1
- package/build-module/components/resizable-frame/index.js +9 -8
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/routes/use-title.js +2 -1
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/save-button/index.js +3 -2
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +2 -1
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/save-keyboard-shortcut/index.js +2 -1
- package/build-module/components/save-keyboard-shortcut/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +6 -5
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +3 -2
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-button/index.js +2 -1
- package/build-module/components/sidebar-button/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js +3 -2
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +3 -2
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/{sidebar-global-styles-wrapper → sidebar-global-styles}/index.js +26 -45
- package/build-module/components/sidebar-global-styles/index.js.map +7 -0
- package/build-module/components/sidebar-navigation-item/index.js +3 -2
- package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +3 -2
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +2 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js +44 -7
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +2 -2
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +8 -8
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +2 -2
- package/build-module/components/sidebar-navigation-screen-main/index.js +3 -11
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +2 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +4 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +4 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +3 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +3 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +2 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js +2 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +3 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +5 -4
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +5 -4
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +2 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +3 -2
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +1 -0
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -0
- 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 +2 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -0
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +4 -3
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +2 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-unsupported/index.js +2 -1
- package/build-module/components/sidebar-navigation-screen-unsupported/index.js.map +1 -1
- package/build-module/components/site-editor-routes/home.js +3 -2
- package/build-module/components/site-editor-routes/home.js.map +1 -1
- package/build-module/components/site-editor-routes/index.js +2 -1
- package/build-module/components/site-editor-routes/index.js.map +1 -1
- package/build-module/components/site-editor-routes/navigation-item.js +4 -3
- package/build-module/components/site-editor-routes/navigation-item.js.map +1 -1
- package/build-module/components/site-editor-routes/navigation.js +4 -3
- package/build-module/components/site-editor-routes/navigation.js.map +1 -1
- package/build-module/components/site-editor-routes/notfound.js +3 -2
- package/build-module/components/site-editor-routes/notfound.js.map +1 -1
- package/build-module/components/site-editor-routes/page-item.js +3 -2
- package/build-module/components/site-editor-routes/page-item.js.map +1 -1
- package/build-module/components/site-editor-routes/pages.js +4 -3
- package/build-module/components/site-editor-routes/pages.js.map +1 -1
- package/build-module/components/site-editor-routes/pattern-item.js +3 -2
- package/build-module/components/site-editor-routes/pattern-item.js.map +1 -1
- package/build-module/components/site-editor-routes/patterns.js +3 -2
- package/build-module/components/site-editor-routes/patterns.js.map +1 -1
- package/build-module/components/site-editor-routes/stylebook.js +6 -3
- package/build-module/components/site-editor-routes/stylebook.js.map +2 -2
- package/build-module/components/site-editor-routes/styles.js +34 -11
- package/build-module/components/site-editor-routes/styles.js.map +2 -2
- package/build-module/components/site-editor-routes/template-item.js +4 -3
- package/build-module/components/site-editor-routes/template-item.js.map +1 -1
- package/build-module/components/site-editor-routes/template-part-item.js +3 -2
- package/build-module/components/site-editor-routes/template-part-item.js.map +1 -1
- package/build-module/components/site-editor-routes/templates.js +3 -2
- package/build-module/components/site-editor-routes/templates.js.map +1 -1
- package/build-module/components/site-editor-routes/utils.js +1 -0
- package/build-module/components/site-editor-routes/utils.js.map +1 -1
- package/build-module/components/site-hub/index.js +5 -4
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/site-icon/index.js +2 -1
- package/build-module/components/site-icon/index.js.map +1 -1
- package/build-module/components/welcome-guide/editor.js +2 -1
- package/build-module/components/welcome-guide/editor.js.map +1 -1
- package/build-module/components/welcome-guide/image.js +1 -0
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +2 -3
- package/build-module/components/welcome-guide/index.js.map +2 -2
- package/build-module/components/welcome-guide/page.js +2 -1
- package/build-module/components/welcome-guide/page.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +2 -1
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/deprecated.js +4 -3
- package/build-module/deprecated.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +18 -16
- package/build-module/hooks/commands/use-common-commands.js.map +2 -2
- package/build-module/hooks/commands/use-set-command-context.js +3 -7
- package/build-module/hooks/commands/use-set-command-context.js.map +2 -2
- package/build-module/index.js +7 -7
- package/build-module/index.js.map +2 -2
- package/build-module/lock-unlock.js +2 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/posts.js +2 -2
- package/build-module/posts.js.map +2 -2
- package/build-module/store/actions.js +13 -12
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js +2 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js +3 -2
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +1 -7
- package/build-module/store/private-actions.js.map +2 -2
- package/build-module/store/private-selectors.js +1 -4
- package/build-module/store/private-selectors.js.map +2 -2
- package/build-module/store/reducer.js +1 -8
- package/build-module/store/reducer.js.map +2 -2
- package/build-module/store/selectors.js +10 -9
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/constants.js +17 -16
- package/build-module/utils/constants.js.map +1 -1
- package/build-module/utils/get-filtered-template-parts.js +2 -1
- package/build-module/utils/get-filtered-template-parts.js.map +1 -1
- package/build-module/utils/is-previewing-theme.js +1 -0
- package/build-module/utils/is-previewing-theme.js.map +1 -1
- package/build-module/utils/is-template-removable.js +1 -0
- package/build-module/utils/is-template-removable.js.map +1 -1
- package/build-module/utils/is-template-revertable.js +1 -0
- package/build-module/utils/is-template-revertable.js.map +2 -2
- package/build-module/utils/use-activate-theme.js +2 -1
- package/build-module/utils/use-activate-theme.js.map +1 -1
- package/build-module/utils/use-actual-current-theme.js +2 -1
- package/build-module/utils/use-actual-current-theme.js.map +1 -1
- package/build-style/posts-rtl.css +13 -50
- package/build-style/posts.css +13 -50
- package/build-style/style-rtl.css +722 -726
- package/build-style/style.css +722 -726
- package/package.json +49 -44
- package/src/components/block-editor/use-site-editor-settings.js +21 -2
- package/src/components/canvas-loader/index.js +5 -9
- package/src/components/editor/index.js +2 -50
- package/src/components/layout/index.js +6 -10
- package/src/components/page-patterns/fields.js +5 -7
- package/src/components/page-templates/fields.js +6 -6
- package/src/components/{sidebar-global-styles-wrapper → sidebar-global-styles}/index.js +16 -48
- package/src/components/{sidebar-global-styles-wrapper → sidebar-global-styles}/style.scss +3 -3
- package/src/components/sidebar-navigation-screen/style.scss +5 -12
- package/src/components/sidebar-navigation-screen-global-styles/content.js +34 -6
- package/src/components/sidebar-navigation-screen-global-styles/index.js +6 -9
- package/src/components/sidebar-navigation-screen-main/index.js +1 -12
- package/src/components/sidebar-navigation-screen-patterns/style.scss +1 -1
- package/src/components/site-editor-routes/stylebook.js +4 -1
- package/src/components/site-editor-routes/styles.js +35 -9
- package/src/components/site-hub/style.scss +1 -1
- package/src/components/welcome-guide/index.js +0 -2
- package/src/components/welcome-guide/style.scss +1 -2
- package/src/hooks/commands/use-common-commands.js +19 -12
- package/src/hooks/commands/use-set-command-context.js +0 -11
- package/src/index.js +0 -1
- package/src/posts.js +0 -1
- package/src/posts.scss +0 -1
- package/src/store/private-actions.js +0 -14
- package/src/store/private-selectors.js +0 -11
- package/src/store/reducer.js +0 -18
- package/src/style.scss +2 -9
- package/src/utils/is-template-revertable.js +1 -2
- package/tsconfig.json +3 -11
- package/build/components/editor-canvas-container/index.js +0 -139
- package/build/components/editor-canvas-container/index.js.map +0 -7
- package/build/components/global-styles/background-panel.js +0 -62
- package/build/components/global-styles/background-panel.js.map +0 -7
- package/build/components/global-styles/block-preview-panel.js +0 -87
- package/build/components/global-styles/block-preview-panel.js.map +0 -7
- package/build/components/global-styles/color-indicator-wrapper.js +0 -50
- package/build/components/global-styles/color-indicator-wrapper.js.map +0 -7
- package/build/components/global-styles/color-palette-panel.js +0 -133
- package/build/components/global-styles/color-palette-panel.js.map +0 -7
- package/build/components/global-styles/confirm-reset-shadow-dialog.js +0 -55
- package/build/components/global-styles/confirm-reset-shadow-dialog.js.map +0 -7
- package/build/components/global-styles/dimensions-panel.js +0 -92
- package/build/components/global-styles/dimensions-panel.js.map +0 -7
- package/build/components/global-styles/font-families.js +0 -114
- package/build/components/global-styles/font-families.js.map +0 -7
- package/build/components/global-styles/font-family-item.js +0 -48
- package/build/components/global-styles/font-family-item.js.map +0 -7
- package/build/components/global-styles/font-library-modal/collection-font-variant.js +0 -75
- package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +0 -7
- package/build/components/global-styles/font-library-modal/context.js +0 -386
- package/build/components/global-styles/font-library-modal/context.js.map +0 -7
- package/build/components/global-styles/font-library-modal/font-card.js +0 -76
- package/build/components/global-styles/font-library-modal/font-card.js.map +0 -7
- package/build/components/global-styles/font-library-modal/font-collection.js +0 -504
- package/build/components/global-styles/font-library-modal/font-collection.js.map +0 -7
- package/build/components/global-styles/font-library-modal/font-demo.js +0 -108
- package/build/components/global-styles/font-library-modal/font-demo.js.map +0 -7
- package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +0 -58
- package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +0 -7
- package/build/components/global-styles/font-library-modal/index.js +0 -110
- package/build/components/global-styles/font-library-modal/index.js.map +0 -7
- package/build/components/global-styles/font-library-modal/installed-fonts.js +0 -455
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +0 -7
- package/build/components/global-styles/font-library-modal/library-font-details.js +0 -63
- package/build/components/global-styles/font-library-modal/library-font-details.js.map +0 -7
- package/build/components/global-styles/font-library-modal/library-font-variant.js +0 -78
- package/build/components/global-styles/font-library-modal/library-font-variant.js.map +0 -7
- package/build/components/global-styles/font-library-modal/resolvers.js +0 -115
- package/build/components/global-styles/font-library-modal/resolvers.js.map +0 -7
- package/build/components/global-styles/font-library-modal/upload-fonts.js +0 -205
- package/build/components/global-styles/font-library-modal/upload-fonts.js.map +0 -7
- package/build/components/global-styles/font-library-modal/utils/constants.js +0 -49
- package/build/components/global-styles/font-library-modal/utils/constants.js.map +0 -7
- package/build/components/global-styles/font-library-modal/utils/filter-fonts.js +0 -39
- package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +0 -7
- package/build/components/global-styles/font-library-modal/utils/fonts-outline.js +0 -51
- package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +0 -7
- package/build/components/global-styles/font-library-modal/utils/index.js +0 -277
- package/build/components/global-styles/font-library-modal/utils/index.js.map +0 -7
- package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js +0 -42
- package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +0 -7
- package/build/components/global-styles/font-library-modal/utils/preview-styles.js +0 -117
- package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +0 -7
- package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js +0 -56
- package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +0 -7
- package/build/components/global-styles/font-library-modal/utils/toggleFont.js +0 -63
- package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +0 -7
- package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +0 -60
- package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +0 -7
- package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +0 -55
- package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +0 -7
- package/build/components/global-styles/font-sizes/font-size-preview.js +0 -51
- package/build/components/global-styles/font-sizes/font-size-preview.js.map +0 -7
- package/build/components/global-styles/font-sizes/font-size.js +0 -260
- package/build/components/global-styles/font-sizes/font-size.js.map +0 -7
- package/build/components/global-styles/font-sizes/font-sizes-count.js +0 -50
- package/build/components/global-styles/font-sizes/font-sizes-count.js.map +0 -7
- package/build/components/global-styles/font-sizes/font-sizes.js +0 -220
- package/build/components/global-styles/font-sizes/font-sizes.js.map +0 -7
- package/build/components/global-styles/font-sizes/rename-font-size-dialog.js +0 -90
- package/build/components/global-styles/font-sizes/rename-font-size-dialog.js.map +0 -7
- package/build/components/global-styles/gradients-palette-panel.js +0 -144
- package/build/components/global-styles/gradients-palette-panel.js.map +0 -7
- package/build/components/global-styles/header.js +0 -54
- package/build/components/global-styles/header.js.map +0 -7
- package/build/components/global-styles/highlighted-colors.js +0 -57
- package/build/components/global-styles/highlighted-colors.js.map +0 -7
- package/build/components/global-styles/hooks.js +0 -113
- package/build/components/global-styles/hooks.js.map +0 -7
- package/build/components/global-styles/icon-with-current-color.js +0 -53
- package/build/components/global-styles/icon-with-current-color.js.map +0 -7
- package/build/components/global-styles/index.js +0 -39
- package/build/components/global-styles/index.js.map +0 -7
- package/build/components/global-styles/navigation-button.js +0 -48
- package/build/components/global-styles/navigation-button.js.map +0 -7
- package/build/components/global-styles/palette.js +0 -86
- package/build/components/global-styles/palette.js.map +0 -7
- package/build/components/global-styles/preset-colors.js +0 -40
- package/build/components/global-styles/preset-colors.js.map +0 -7
- package/build/components/global-styles/preview-colors.js +0 -82
- package/build/components/global-styles/preview-colors.js.map +0 -7
- package/build/components/global-styles/preview-styles.js +0 -214
- package/build/components/global-styles/preview-styles.js.map +0 -7
- package/build/components/global-styles/preview-typography.js +0 -68
- package/build/components/global-styles/preview-typography.js.map +0 -7
- package/build/components/global-styles/preview-wrapper.js +0 -101
- package/build/components/global-styles/preview-wrapper.js.map +0 -7
- package/build/components/global-styles/root-menu.js +0 -72
- package/build/components/global-styles/root-menu.js.map +0 -7
- package/build/components/global-styles/screen-background.js +0 -59
- package/build/components/global-styles/screen-background.js.map +0 -7
- package/build/components/global-styles/screen-block-list.js +0 -170
- package/build/components/global-styles/screen-block-list.js.map +0 -7
- package/build/components/global-styles/screen-block.js +0 -316
- package/build/components/global-styles/screen-block.js.map +0 -7
- package/build/components/global-styles/screen-color-palette.js +0 -64
- package/build/components/global-styles/screen-color-palette.js.map +0 -7
- package/build/components/global-styles/screen-colors.js +0 -81
- package/build/components/global-styles/screen-colors.js.map +0 -7
- package/build/components/global-styles/screen-css.js +0 -92
- package/build/components/global-styles/screen-css.js.map +0 -7
- package/build/components/global-styles/screen-layout.js +0 -51
- package/build/components/global-styles/screen-layout.js.map +0 -7
- package/build/components/global-styles/screen-revisions/index.js +0 -179
- package/build/components/global-styles/screen-revisions/index.js.map +0 -7
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +0 -192
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +0 -7
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +0 -148
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +0 -7
- package/build/components/global-styles/screen-root.js +0 -99
- package/build/components/global-styles/screen-root.js.map +0 -7
- package/build/components/global-styles/screen-shadows.js +0 -49
- package/build/components/global-styles/screen-shadows.js.map +0 -7
- package/build/components/global-styles/screen-style-variations.js +0 -70
- package/build/components/global-styles/screen-style-variations.js.map +0 -7
- package/build/components/global-styles/screen-typography-element.js +0 -167
- package/build/components/global-styles/screen-typography-element.js.map +0 -7
- package/build/components/global-styles/screen-typography.js +0 -68
- package/build/components/global-styles/screen-typography.js.map +0 -7
- package/build/components/global-styles/shadow-utils.js +0 -125
- package/build/components/global-styles/shadow-utils.js.map +0 -7
- package/build/components/global-styles/shadows-edit-panel.js +0 -501
- package/build/components/global-styles/shadows-edit-panel.js.map +0 -7
- package/build/components/global-styles/shadows-panel.js +0 -206
- package/build/components/global-styles/shadows-panel.js.map +0 -7
- package/build/components/global-styles/size-control/index.js +0 -80
- package/build/components/global-styles/size-control/index.js.map +0 -7
- package/build/components/global-styles/style-variations-container.js +0 -124
- package/build/components/global-styles/style-variations-container.js.map +0 -7
- package/build/components/global-styles/subtitle.js +0 -37
- package/build/components/global-styles/subtitle.js.map +0 -7
- package/build/components/global-styles/typeset.js +0 -78
- package/build/components/global-styles/typeset.js.map +0 -7
- package/build/components/global-styles/typography-elements.js +0 -123
- package/build/components/global-styles/typography-elements.js.map +0 -7
- package/build/components/global-styles/typography-example.js +0 -81
- package/build/components/global-styles/typography-example.js.map +0 -7
- package/build/components/global-styles/typography-panel.js +0 -69
- package/build/components/global-styles/typography-panel.js.map +0 -7
- package/build/components/global-styles/typography-preview.js +0 -80
- package/build/components/global-styles/typography-preview.js.map +0 -7
- package/build/components/global-styles/ui.js +0 -355
- package/build/components/global-styles/ui.js.map +0 -7
- package/build/components/global-styles/utils.js +0 -92
- package/build/components/global-styles/utils.js.map +0 -7
- package/build/components/global-styles/variations/variation.js +0 -118
- package/build/components/global-styles/variations/variation.js.map +0 -7
- package/build/components/global-styles/variations/variations-color.js +0 -61
- package/build/components/global-styles/variations/variations-color.js.map +0 -7
- package/build/components/global-styles/variations/variations-panel.js +0 -71
- package/build/components/global-styles/variations/variations-panel.js.map +0 -7
- package/build/components/global-styles/variations/variations-typography.js +0 -75
- package/build/components/global-styles/variations/variations-typography.js.map +0 -7
- package/build/components/global-styles-renderer/index.js +0 -57
- package/build/components/global-styles-renderer/index.js.map +0 -7
- package/build/components/global-styles-sidebar/default-sidebar.js +0 -68
- package/build/components/global-styles-sidebar/default-sidebar.js.map +0 -7
- package/build/components/global-styles-sidebar/index.js +0 -202
- package/build/components/global-styles-sidebar/index.js.map +0 -7
- package/build/components/revisions/index.js +0 -120
- package/build/components/revisions/index.js.map +0 -7
- package/build/components/sidebar-global-styles-wrapper/index.js.map +0 -7
- package/build/components/style-book/categories.js +0 -86
- package/build/components/style-book/categories.js.map +0 -7
- package/build/components/style-book/color-examples.js +0 -65
- package/build/components/style-book/color-examples.js.map +0 -7
- package/build/components/style-book/constants.js +0 -319
- package/build/components/style-book/constants.js.map +0 -7
- package/build/components/style-book/duotone-examples.js +0 -69
- package/build/components/style-book/duotone-examples.js.map +0 -7
- package/build/components/style-book/examples.js +0 -237
- package/build/components/style-book/examples.js.map +0 -7
- package/build/components/style-book/index.js +0 -644
- package/build/components/style-book/index.js.map +0 -7
- package/build/components/style-book/types.js +0 -17
- package/build/components/style-book/types.js.map +0 -7
- package/build/components/welcome-guide/styles.js +0 -145
- package/build/components/welcome-guide/styles.js.map +0 -7
- package/build/hooks/index.js +0 -3
- package/build/hooks/index.js.map +0 -7
- package/build/hooks/push-changes-to-global-styles/index.js +0 -319
- package/build/hooks/push-changes-to-global-styles/index.js.map +0 -7
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +0 -126
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +0 -7
- package/build/utils/set-nested-value.js +0 -43
- package/build/utils/set-nested-value.js.map +0 -7
- package/build-module/components/editor-canvas-container/index.js +0 -120
- package/build-module/components/editor-canvas-container/index.js.map +0 -7
- package/build-module/components/global-styles/background-panel.js +0 -38
- package/build-module/components/global-styles/background-panel.js.map +0 -7
- package/build-module/components/global-styles/block-preview-panel.js +0 -67
- package/build-module/components/global-styles/block-preview-panel.js.map +0 -7
- package/build-module/components/global-styles/color-indicator-wrapper.js +0 -20
- package/build-module/components/global-styles/color-indicator-wrapper.js.map +0 -7
- package/build-module/components/global-styles/color-palette-panel.js +0 -107
- package/build-module/components/global-styles/color-palette-panel.js.map +0 -7
- package/build-module/components/global-styles/confirm-reset-shadow-dialog.js +0 -35
- package/build-module/components/global-styles/confirm-reset-shadow-dialog.js.map +0 -7
- package/build-module/components/global-styles/dimensions-panel.js +0 -72
- package/build-module/components/global-styles/dimensions-panel.js.map +0 -7
- package/build-module/components/global-styles/font-families.js +0 -92
- package/build-module/components/global-styles/font-families.js.map +0 -7
- package/build-module/components/global-styles/font-family-item.js +0 -32
- package/build-module/components/global-styles/font-family-item.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +0 -45
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/context.js +0 -372
- package/build-module/components/global-styles/font-library-modal/context.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/font-card.js +0 -53
- package/build-module/components/global-styles/font-library-modal/font-card.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/font-collection.js +0 -505
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/font-demo.js +0 -91
- package/build-module/components/global-styles/font-library-modal/font-demo.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +0 -45
- package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/index.js +0 -83
- package/build-module/components/global-styles/font-library-modal/index.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +0 -444
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/library-font-details.js +0 -36
- package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js +0 -48
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/resolvers.js +0 -76
- package/build-module/components/global-styles/font-library-modal/resolvers.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js +0 -185
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/utils/constants.js +0 -23
- package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js +0 -19
- package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js +0 -26
- package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/utils/index.js +0 -241
- package/build-module/components/global-styles/font-library-modal/utils/index.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js +0 -22
- package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js +0 -90
- package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js +0 -32
- package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +0 -7
- package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js +0 -39
- package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +0 -7
- package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +0 -40
- package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +0 -7
- package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +0 -35
- package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +0 -7
- package/build-module/components/global-styles/font-sizes/font-size-preview.js +0 -34
- package/build-module/components/global-styles/font-sizes/font-size-preview.js.map +0 -7
- package/build-module/components/global-styles/font-sizes/font-size.js +0 -240
- package/build-module/components/global-styles/font-sizes/font-size.js.map +0 -7
- package/build-module/components/global-styles/font-sizes/font-sizes-count.js +0 -25
- package/build-module/components/global-styles/font-sizes/font-sizes-count.js.map +0 -7
- package/build-module/components/global-styles/font-sizes/font-sizes.js +0 -205
- package/build-module/components/global-styles/font-sizes/font-sizes.js.map +0 -7
- package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js +0 -76
- package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js.map +0 -7
- package/build-module/components/global-styles/gradients-palette-panel.js +0 -119
- package/build-module/components/global-styles/gradients-palette-panel.js.map +0 -7
- package/build-module/components/global-styles/header.js +0 -41
- package/build-module/components/global-styles/header.js.map +0 -7
- package/build-module/components/global-styles/highlighted-colors.js +0 -37
- package/build-module/components/global-styles/highlighted-colors.js.map +0 -7
- package/build-module/components/global-styles/hooks.js +0 -77
- package/build-module/components/global-styles/hooks.js.map +0 -7
- package/build-module/components/global-styles/icon-with-current-color.js +0 -19
- package/build-module/components/global-styles/icon-with-current-color.js.map +0 -7
- package/build-module/components/global-styles/index.js +0 -5
- package/build-module/components/global-styles/index.js.map +0 -7
- package/build-module/components/global-styles/navigation-button.js +0 -28
- package/build-module/components/global-styles/navigation-button.js.map +0 -7
- package/build-module/components/global-styles/palette.js +0 -63
- package/build-module/components/global-styles/palette.js.map +0 -7
- package/build-module/components/global-styles/preset-colors.js +0 -20
- package/build-module/components/global-styles/preset-colors.js.map +0 -7
- package/build-module/components/global-styles/preview-colors.js +0 -55
- package/build-module/components/global-styles/preview-colors.js.map +0 -7
- package/build-module/components/global-styles/preview-styles.js +0 -188
- package/build-module/components/global-styles/preview-styles.js.map +0 -7
- package/build-module/components/global-styles/preview-typography.js +0 -38
- package/build-module/components/global-styles/preview-typography.js.map +0 -7
- package/build-module/components/global-styles/preview-wrapper.js +0 -85
- package/build-module/components/global-styles/preview-wrapper.js.map +0 -7
- package/build-module/components/global-styles/root-menu.js +0 -58
- package/build-module/components/global-styles/root-menu.js.map +0 -7
- package/build-module/components/global-styles/screen-background.js +0 -29
- package/build-module/components/global-styles/screen-background.js.map +0 -7
- package/build-module/components/global-styles/screen-block-list.js +0 -150
- package/build-module/components/global-styles/screen-block-list.js.map +0 -7
- package/build-module/components/global-styles/screen-block.js +0 -293
- package/build-module/components/global-styles/screen-block.js.map +0 -7
- package/build-module/components/global-styles/screen-color-palette.js +0 -34
- package/build-module/components/global-styles/screen-color-palette.js.map +0 -7
- package/build-module/components/global-styles/screen-colors.js +0 -51
- package/build-module/components/global-styles/screen-colors.js.map +0 -7
- package/build-module/components/global-styles/screen-css.js +0 -62
- package/build-module/components/global-styles/screen-css.js.map +0 -7
- package/build-module/components/global-styles/screen-layout.js +0 -21
- package/build-module/components/global-styles/screen-layout.js.map +0 -7
- package/build-module/components/global-styles/screen-revisions/index.js +0 -155
- package/build-module/components/global-styles/screen-revisions/index.js.map +0 -7
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +0 -172
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +0 -7
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +0 -128
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +0 -7
- package/build-module/components/global-styles/screen-root.js +0 -79
- package/build-module/components/global-styles/screen-root.js.map +0 -7
- package/build-module/components/global-styles/screen-shadows.js +0 -14
- package/build-module/components/global-styles/screen-shadows.js.map +0 -7
- package/build-module/components/global-styles/screen-style-variations.js +0 -43
- package/build-module/components/global-styles/screen-style-variations.js.map +0 -7
- package/build-module/components/global-styles/screen-typography-element.js +0 -141
- package/build-module/components/global-styles/screen-typography-element.js.map +0 -7
- package/build-module/components/global-styles/screen-typography.js +0 -38
- package/build-module/components/global-styles/screen-typography.js.map +0 -7
- package/build-module/components/global-styles/shadow-utils.js +0 -98
- package/build-module/components/global-styles/shadow-utils.js.map +0 -7
- package/build-module/components/global-styles/shadows-edit-panel.js +0 -500
- package/build-module/components/global-styles/shadows-edit-panel.js.map +0 -7
- package/build-module/components/global-styles/shadows-panel.js +0 -185
- package/build-module/components/global-styles/shadows-panel.js.map +0 -7
- package/build-module/components/global-styles/size-control/index.js +0 -70
- package/build-module/components/global-styles/size-control/index.js.map +0 -7
- package/build-module/components/global-styles/style-variations-container.js +0 -94
- package/build-module/components/global-styles/style-variations-container.js.map +0 -7
- package/build-module/components/global-styles/subtitle.js +0 -17
- package/build-module/components/global-styles/subtitle.js.map +0 -7
- package/build-module/components/global-styles/typeset.js +0 -54
- package/build-module/components/global-styles/typeset.js.map +0 -7
- package/build-module/components/global-styles/typography-elements.js +0 -98
- package/build-module/components/global-styles/typography-elements.js.map +0 -7
- package/build-module/components/global-styles/typography-example.js +0 -61
- package/build-module/components/global-styles/typography-example.js.map +0 -7
- package/build-module/components/global-styles/typography-panel.js +0 -49
- package/build-module/components/global-styles/typography-panel.js.map +0 -7
- package/build-module/components/global-styles/typography-preview.js +0 -60
- package/build-module/components/global-styles/typography-preview.js.map +0 -7
- package/build-module/components/global-styles/ui.js +0 -334
- package/build-module/components/global-styles/ui.js.map +0 -7
- package/build-module/components/global-styles/utils.js +0 -66
- package/build-module/components/global-styles/utils.js.map +0 -7
- package/build-module/components/global-styles/variations/variation.js +0 -88
- package/build-module/components/global-styles/variations/variation.js.map +0 -7
- package/build-module/components/global-styles/variations/variations-color.js +0 -34
- package/build-module/components/global-styles/variations/variations-color.js.map +0 -7
- package/build-module/components/global-styles/variations/variations-panel.js +0 -46
- package/build-module/components/global-styles/variations/variations-panel.js.map +0 -7
- package/build-module/components/global-styles/variations/variations-typography.js +0 -48
- package/build-module/components/global-styles/variations/variations-typography.js.map +0 -7
- package/build-module/components/global-styles-renderer/index.js +0 -33
- package/build-module/components/global-styles-renderer/index.js.map +0 -7
- package/build-module/components/global-styles-sidebar/default-sidebar.js +0 -48
- package/build-module/components/global-styles-sidebar/default-sidebar.js.map +0 -7
- package/build-module/components/global-styles-sidebar/index.js +0 -175
- package/build-module/components/global-styles-sidebar/index.js.map +0 -7
- package/build-module/components/revisions/index.js +0 -96
- package/build-module/components/revisions/index.js.map +0 -7
- package/build-module/components/sidebar-global-styles-wrapper/index.js.map +0 -7
- package/build-module/components/style-book/categories.js +0 -64
- package/build-module/components/style-book/categories.js.map +0 -7
- package/build-module/components/style-book/color-examples.js +0 -38
- package/build-module/components/style-book/color-examples.js.map +0 -7
- package/build-module/components/style-book/constants.js +0 -290
- package/build-module/components/style-book/constants.js.map +0 -7
- package/build-module/components/style-book/duotone-examples.js +0 -49
- package/build-module/components/style-book/duotone-examples.js.map +0 -7
- package/build-module/components/style-book/examples.js +0 -208
- package/build-module/components/style-book/examples.js.map +0 -7
- package/build-module/components/style-book/index.js +0 -635
- package/build-module/components/style-book/index.js.map +0 -7
- package/build-module/components/style-book/types.js +0 -1
- package/build-module/components/style-book/types.js.map +0 -7
- package/build-module/components/welcome-guide/styles.js +0 -115
- package/build-module/components/welcome-guide/styles.js.map +0 -7
- package/build-module/hooks/index.js +0 -2
- package/build-module/hooks/index.js.map +0 -7
- package/build-module/hooks/push-changes-to-global-styles/index.js +0 -305
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +0 -7
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +0 -99
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +0 -7
- package/build-module/utils/set-nested-value.js +0 -23
- package/build-module/utils/set-nested-value.js.map +0 -7
- package/build-types/components/style-book/categories.d.ts +0 -18
- package/build-types/components/style-book/categories.d.ts.map +0 -1
- package/build-types/components/style-book/color-examples.d.ts +0 -7
- package/build-types/components/style-book/color-examples.d.ts.map +0 -1
- package/build-types/components/style-book/constants.d.ts +0 -11
- package/build-types/components/style-book/constants.d.ts.map +0 -1
- package/build-types/components/style-book/duotone-examples.d.ts +0 -9
- package/build-types/components/style-book/duotone-examples.d.ts.map +0 -1
- package/build-types/components/style-book/examples.d.ts +0 -12
- package/build-types/components/style-book/examples.d.ts.map +0 -1
- package/build-types/components/style-book/types.d.ts +0 -72
- package/build-types/components/style-book/types.d.ts.map +0 -1
- package/lib/inflate.js +0 -3333
- package/lib/lib-font.browser.js +0 -3861
- package/lib/unbrotli.js +0 -2039
- package/src/components/editor-canvas-container/index.js +0 -149
- package/src/components/editor-canvas-container/style.scss +0 -43
- package/src/components/global-styles/README.md +0 -17
- package/src/components/global-styles/background-panel.js +0 -55
- package/src/components/global-styles/block-preview-panel.js +0 -81
- package/src/components/global-styles/color-indicator-wrapper.js +0 -23
- package/src/components/global-styles/color-palette-panel.js +0 -110
- package/src/components/global-styles/confirm-reset-shadow-dialog.js +0 -37
- package/src/components/global-styles/dimensions-panel.js +0 -86
- package/src/components/global-styles/font-families.js +0 -128
- package/src/components/global-styles/font-family-item.js +0 -47
- package/src/components/global-styles/font-library-modal/collection-font-variant.js +0 -51
- package/src/components/global-styles/font-library-modal/context.js +0 -540
- package/src/components/global-styles/font-library-modal/font-card.js +0 -67
- package/src/components/global-styles/font-library-modal/font-collection.js +0 -575
- package/src/components/global-styles/font-library-modal/font-demo.js +0 -116
- package/src/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +0 -57
- package/src/components/global-styles/font-library-modal/index.js +0 -106
- package/src/components/global-styles/font-library-modal/installed-fonts.js +0 -518
- package/src/components/global-styles/font-library-modal/library-font-details.js +0 -45
- package/src/components/global-styles/font-library-modal/library-font-variant.js +0 -60
- package/src/components/global-styles/font-library-modal/resolvers.js +0 -78
- package/src/components/global-styles/font-library-modal/style.scss +0 -220
- package/src/components/global-styles/font-library-modal/upload-fonts.js +0 -253
- package/src/components/global-styles/font-library-modal/utils/constants.js +0 -23
- package/src/components/global-styles/font-library-modal/utils/filter-fonts.js +0 -35
- package/src/components/global-styles/font-library-modal/utils/fonts-outline.js +0 -22
- package/src/components/global-styles/font-library-modal/utils/index.js +0 -333
- package/src/components/global-styles/font-library-modal/utils/make-families-from-faces.js +0 -27
- package/src/components/global-styles/font-library-modal/utils/preview-styles.js +0 -152
- package/src/components/global-styles/font-library-modal/utils/sort-font-faces.js +0 -37
- package/src/components/global-styles/font-library-modal/utils/test/filter-fonts.spec.js +0 -99
- package/src/components/global-styles/font-library-modal/utils/test/fonts-outline.spec.js +0 -109
- package/src/components/global-styles/font-library-modal/utils/test/getDisplaySrcFromFontFace.spec.js +0 -42
- package/src/components/global-styles/font-library-modal/utils/test/getFontFaceVariantName.spec.js +0 -30
- package/src/components/global-styles/font-library-modal/utils/test/isUrlEncoded.spec.js +0 -31
- package/src/components/global-styles/font-library-modal/utils/test/makeFamiliesFromFaces.spec.js +0 -57
- package/src/components/global-styles/font-library-modal/utils/test/mergeFontFaces.spec.js +0 -56
- package/src/components/global-styles/font-library-modal/utils/test/mergeFontFamilies.spec.js +0 -108
- package/src/components/global-styles/font-library-modal/utils/test/preview-styles.spec.js +0 -216
- package/src/components/global-styles/font-library-modal/utils/test/setUIValuesNeeded.spec.js +0 -41
- package/src/components/global-styles/font-library-modal/utils/test/sort-font-faces.js +0 -74
- package/src/components/global-styles/font-library-modal/utils/test/toggleFont.spec.js +0 -141
- package/src/components/global-styles/font-library-modal/utils/toggleFont.js +0 -90
- package/src/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +0 -43
- package/src/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +0 -37
- package/src/components/global-styles/font-sizes/font-size-preview.js +0 -43
- package/src/components/global-styles/font-sizes/font-size.js +0 -265
- package/src/components/global-styles/font-sizes/font-sizes-count.js +0 -37
- package/src/components/global-styles/font-sizes/font-sizes.js +0 -261
- package/src/components/global-styles/font-sizes/rename-font-size-dialog.js +0 -70
- package/src/components/global-styles/gradients-palette-panel.js +0 -123
- package/src/components/global-styles/header.js +0 -48
- package/src/components/global-styles/highlighted-colors.js +0 -39
- package/src/components/global-styles/hooks.js +0 -111
- package/src/components/global-styles/icon-with-current-color.js +0 -21
- package/src/components/global-styles/index.js +0 -1
- package/src/components/global-styles/navigation-button.js +0 -38
- package/src/components/global-styles/palette.js +0 -90
- package/src/components/global-styles/preset-colors.js +0 -18
- package/src/components/global-styles/preview-colors.js +0 -58
- package/src/components/global-styles/preview-styles.js +0 -185
- package/src/components/global-styles/preview-typography.js +0 -39
- package/src/components/global-styles/preview-wrapper.js +0 -126
- package/src/components/global-styles/root-menu.js +0 -84
- package/src/components/global-styles/screen-background.js +0 -37
- package/src/components/global-styles/screen-block-list.js +0 -187
- package/src/components/global-styles/screen-block.js +0 -358
- package/src/components/global-styles/screen-color-palette.js +0 -42
- package/src/components/global-styles/screen-colors.js +0 -55
- package/src/components/global-styles/screen-css.js +0 -67
- package/src/components/global-styles/screen-layout.js +0 -30
- package/src/components/global-styles/screen-revisions/index.js +0 -202
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +0 -238
- package/src/components/global-styles/screen-revisions/style.scss +0 -194
- package/src/components/global-styles/screen-revisions/test/use-global-styles-revisions.js +0 -228
- package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +0 -159
- package/src/components/global-styles/screen-root.js +0 -102
- package/src/components/global-styles/screen-shadows.js +0 -13
- package/src/components/global-styles/screen-style-variations.js +0 -52
- package/src/components/global-styles/screen-typography-element.js +0 -121
- package/src/components/global-styles/screen-typography.js +0 -45
- package/src/components/global-styles/shadow-utils.js +0 -158
- package/src/components/global-styles/shadows-edit-panel.js +0 -525
- package/src/components/global-styles/shadows-panel.js +0 -196
- package/src/components/global-styles/size-control/index.js +0 -89
- package/src/components/global-styles/stories/index.story.js +0 -427
- package/src/components/global-styles/style-variations-container.js +0 -132
- package/src/components/global-styles/style.scss +0 -265
- package/src/components/global-styles/subtitle.js +0 -17
- package/src/components/global-styles/test/shadow-utils.spec.js +0 -251
- package/src/components/global-styles/test/utils.spec.js +0 -59
- package/src/components/global-styles/typeset.js +0 -73
- package/src/components/global-styles/typography-elements.js +0 -102
- package/src/components/global-styles/typography-example.js +0 -76
- package/src/components/global-styles/typography-panel.js +0 -54
- package/src/components/global-styles/typography-preview.js +0 -70
- package/src/components/global-styles/ui.js +0 -448
- package/src/components/global-styles/utils.js +0 -88
- package/src/components/global-styles/variations/style.scss +0 -43
- package/src/components/global-styles/variations/variation.js +0 -108
- package/src/components/global-styles/variations/variations-color.js +0 -45
- package/src/components/global-styles/variations/variations-panel.js +0 -65
- package/src/components/global-styles/variations/variations-typography.js +0 -54
- package/src/components/global-styles-renderer/index.js +0 -42
- package/src/components/global-styles-sidebar/default-sidebar.js +0 -51
- package/src/components/global-styles-sidebar/index.js +0 -206
- package/src/components/global-styles-sidebar/style.scss +0 -80
- package/src/components/revisions/index.js +0 -109
- package/src/components/style-book/categories.ts +0 -97
- package/src/components/style-book/color-examples.tsx +0 -57
- package/src/components/style-book/constants.ts +0 -308
- package/src/components/style-book/duotone-examples.tsx +0 -57
- package/src/components/style-book/examples.tsx +0 -273
- package/src/components/style-book/index.js +0 -804
- package/src/components/style-book/style.scss +0 -44
- package/src/components/style-book/test/categories.js +0 -166
- package/src/components/style-book/types.ts +0 -80
- package/src/components/welcome-guide/styles.js +0 -139
- package/src/hooks/index.js +0 -4
- package/src/hooks/push-changes-to-global-styles/index.js +0 -388
- package/src/hooks/push-changes-to-global-styles/style.scss +0 -4
- package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +0 -271
- package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +0 -175
- package/src/utils/set-nested-value.js +0 -39
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var ui_exports = {};
|
|
30
|
-
__export(ui_exports, {
|
|
31
|
-
GlobalStylesMenuSlot: () => GlobalStylesMenuSlot,
|
|
32
|
-
default: () => ui_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(ui_exports);
|
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var import_components = require("@wordpress/components");
|
|
37
|
-
var import_blocks = require("@wordpress/blocks");
|
|
38
|
-
var import_data = require("@wordpress/data");
|
|
39
|
-
var import_block_editor = require("@wordpress/block-editor");
|
|
40
|
-
var import_i18n = require("@wordpress/i18n");
|
|
41
|
-
var import_preferences = require("@wordpress/preferences");
|
|
42
|
-
var import_icons = require("@wordpress/icons");
|
|
43
|
-
var import_core_data = require("@wordpress/core-data");
|
|
44
|
-
var import_element = require("@wordpress/element");
|
|
45
|
-
var import_compose = require("@wordpress/compose");
|
|
46
|
-
var import_screen_root = __toESM(require("./screen-root"));
|
|
47
|
-
var import_screen_block_list = __toESM(require("./screen-block-list"));
|
|
48
|
-
var import_screen_block = __toESM(require("./screen-block"));
|
|
49
|
-
var import_screen_typography = __toESM(require("./screen-typography"));
|
|
50
|
-
var import_screen_typography_element = __toESM(require("./screen-typography-element"));
|
|
51
|
-
var import_font_size = __toESM(require("./font-sizes/font-size"));
|
|
52
|
-
var import_font_sizes = __toESM(require("./font-sizes/font-sizes"));
|
|
53
|
-
var import_screen_colors = __toESM(require("./screen-colors"));
|
|
54
|
-
var import_screen_color_palette = __toESM(require("./screen-color-palette"));
|
|
55
|
-
var import_screen_background = __toESM(require("./screen-background"));
|
|
56
|
-
var import_screen_shadows = require("./screen-shadows");
|
|
57
|
-
var import_screen_layout = __toESM(require("./screen-layout"));
|
|
58
|
-
var import_screen_style_variations = __toESM(require("./screen-style-variations"));
|
|
59
|
-
var import_style_book = __toESM(require("../style-book"));
|
|
60
|
-
var import_screen_css = __toESM(require("./screen-css"));
|
|
61
|
-
var import_screen_revisions = __toESM(require("./screen-revisions"));
|
|
62
|
-
var import_lock_unlock = require("../../lock-unlock");
|
|
63
|
-
var import_store = require("../../store");
|
|
64
|
-
var import_constants = require("../style-book/constants");
|
|
65
|
-
const SLOT_FILL_NAME = "GlobalStylesMenu";
|
|
66
|
-
const { useGlobalStylesReset } = (0, import_lock_unlock.unlock)(import_block_editor.privateApis);
|
|
67
|
-
const { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } = (0, import_components.createSlotFill)(SLOT_FILL_NAME);
|
|
68
|
-
function GlobalStylesActionMenu() {
|
|
69
|
-
const [canReset, onReset] = useGlobalStylesReset();
|
|
70
|
-
const { toggle } = (0, import_data.useDispatch)(import_preferences.store);
|
|
71
|
-
const { canEditCSS } = (0, import_data.useSelect)((select) => {
|
|
72
|
-
const { getEntityRecord, __experimentalGetCurrentGlobalStylesId } = select(import_core_data.store);
|
|
73
|
-
const globalStylesId = __experimentalGetCurrentGlobalStylesId();
|
|
74
|
-
const globalStyles = globalStylesId ? getEntityRecord("root", "globalStyles", globalStylesId) : void 0;
|
|
75
|
-
return {
|
|
76
|
-
canEditCSS: !!globalStyles?._links?.["wp:action-edit-css"]
|
|
77
|
-
};
|
|
78
|
-
}, []);
|
|
79
|
-
const { setEditorCanvasContainerView } = (0, import_lock_unlock.unlock)(
|
|
80
|
-
(0, import_data.useDispatch)(import_store.store)
|
|
81
|
-
);
|
|
82
|
-
const loadCustomCSS = () => {
|
|
83
|
-
setEditorCanvasContainerView("global-styles-css");
|
|
84
|
-
};
|
|
85
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesMenuFill, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
86
|
-
import_components.DropdownMenu,
|
|
87
|
-
{
|
|
88
|
-
icon: import_icons.moreVertical,
|
|
89
|
-
label: (0, import_i18n.__)("More"),
|
|
90
|
-
toggleProps: { size: "compact" },
|
|
91
|
-
children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
92
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.MenuGroup, { children: [
|
|
93
|
-
canEditCSS && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.MenuItem, { onClick: loadCustomCSS, children: (0, import_i18n.__)("Additional CSS") }),
|
|
94
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
|
-
import_components.MenuItem,
|
|
96
|
-
{
|
|
97
|
-
onClick: () => {
|
|
98
|
-
toggle(
|
|
99
|
-
"core/edit-site",
|
|
100
|
-
"welcomeGuideStyles"
|
|
101
|
-
);
|
|
102
|
-
onClose();
|
|
103
|
-
},
|
|
104
|
-
children: (0, import_i18n.__)("Welcome Guide")
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
] }),
|
|
108
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
109
|
-
import_components.MenuItem,
|
|
110
|
-
{
|
|
111
|
-
onClick: () => {
|
|
112
|
-
onReset();
|
|
113
|
-
onClose();
|
|
114
|
-
},
|
|
115
|
-
disabled: !canReset,
|
|
116
|
-
children: (0, import_i18n.__)("Reset styles")
|
|
117
|
-
}
|
|
118
|
-
) })
|
|
119
|
-
] })
|
|
120
|
-
}
|
|
121
|
-
) });
|
|
122
|
-
}
|
|
123
|
-
function GlobalStylesNavigationScreen({ className, ...props }) {
|
|
124
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
125
|
-
import_components.Navigator.Screen,
|
|
126
|
-
{
|
|
127
|
-
className: [
|
|
128
|
-
"edit-site-global-styles-sidebar__navigator-screen",
|
|
129
|
-
className
|
|
130
|
-
].filter(Boolean).join(" "),
|
|
131
|
-
...props
|
|
132
|
-
}
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
function BlockStylesNavigationScreens({
|
|
136
|
-
parentMenu,
|
|
137
|
-
blockStyles,
|
|
138
|
-
blockName
|
|
139
|
-
}) {
|
|
140
|
-
return blockStyles.map((style, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
141
|
-
GlobalStylesNavigationScreen,
|
|
142
|
-
{
|
|
143
|
-
path: parentMenu + "/variations/" + style.name,
|
|
144
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_block.default, { name: blockName, variation: style.name })
|
|
145
|
-
},
|
|
146
|
-
index
|
|
147
|
-
));
|
|
148
|
-
}
|
|
149
|
-
function ContextScreens({ name, parentMenu = "" }) {
|
|
150
|
-
const blockStyleVariations = (0, import_data.useSelect)(
|
|
151
|
-
(select) => {
|
|
152
|
-
const { getBlockStyles } = select(import_blocks.store);
|
|
153
|
-
return getBlockStyles(name);
|
|
154
|
-
},
|
|
155
|
-
[name]
|
|
156
|
-
);
|
|
157
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
158
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
159
|
-
GlobalStylesNavigationScreen,
|
|
160
|
-
{
|
|
161
|
-
path: parentMenu + "/colors/palette",
|
|
162
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_color_palette.default, { name })
|
|
163
|
-
}
|
|
164
|
-
),
|
|
165
|
-
!!blockStyleVariations?.length && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
166
|
-
BlockStylesNavigationScreens,
|
|
167
|
-
{
|
|
168
|
-
parentMenu,
|
|
169
|
-
blockStyles: blockStyleVariations,
|
|
170
|
-
blockName: name
|
|
171
|
-
}
|
|
172
|
-
)
|
|
173
|
-
] });
|
|
174
|
-
}
|
|
175
|
-
function GlobalStylesStyleBook() {
|
|
176
|
-
const navigator = (0, import_components.useNavigator)();
|
|
177
|
-
const { path } = navigator.location;
|
|
178
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
179
|
-
import_style_book.default,
|
|
180
|
-
{
|
|
181
|
-
isSelected: (blockName) => (
|
|
182
|
-
// Match '/blocks/core%2Fbutton' and
|
|
183
|
-
// '/blocks/core%2Fbutton/typography', but not
|
|
184
|
-
// '/blocks/core%2Fbuttons'.
|
|
185
|
-
path === `/blocks/${encodeURIComponent(blockName)}` || path.startsWith(
|
|
186
|
-
`/blocks/${encodeURIComponent(blockName)}/`
|
|
187
|
-
)
|
|
188
|
-
),
|
|
189
|
-
onSelect: (blockName) => {
|
|
190
|
-
if (import_constants.STYLE_BOOK_COLOR_GROUPS.find(
|
|
191
|
-
(group) => group.slug === blockName
|
|
192
|
-
)) {
|
|
193
|
-
navigator.goTo("/colors/palette");
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
if (blockName === "typography") {
|
|
197
|
-
navigator.goTo("/typography");
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
navigator.goTo("/blocks/" + encodeURIComponent(blockName));
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
);
|
|
204
|
-
}
|
|
205
|
-
function GlobalStylesBlockLink() {
|
|
206
|
-
const navigator = (0, import_components.useNavigator)();
|
|
207
|
-
const { selectedBlockName, selectedBlockClientId } = (0, import_data.useSelect)(
|
|
208
|
-
(select) => {
|
|
209
|
-
const { getSelectedBlockClientId, getBlockName } = select(import_block_editor.store);
|
|
210
|
-
const clientId = getSelectedBlockClientId();
|
|
211
|
-
return {
|
|
212
|
-
selectedBlockName: getBlockName(clientId),
|
|
213
|
-
selectedBlockClientId: clientId
|
|
214
|
-
};
|
|
215
|
-
},
|
|
216
|
-
[]
|
|
217
|
-
);
|
|
218
|
-
const blockHasGlobalStyles = (0, import_screen_block_list.useBlockHasGlobalStyles)(selectedBlockName);
|
|
219
|
-
(0, import_element.useEffect)(() => {
|
|
220
|
-
if (!selectedBlockClientId || !blockHasGlobalStyles) {
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
const currentPath = navigator.location.path;
|
|
224
|
-
if (currentPath !== "/blocks" && !currentPath.startsWith("/blocks/")) {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
const newPath = "/blocks/" + encodeURIComponent(selectedBlockName);
|
|
228
|
-
if (newPath !== currentPath) {
|
|
229
|
-
navigator.goTo(newPath, { skipFocus: true });
|
|
230
|
-
}
|
|
231
|
-
}, [selectedBlockClientId, selectedBlockName, blockHasGlobalStyles]);
|
|
232
|
-
}
|
|
233
|
-
function GlobalStylesEditorCanvasContainerLink() {
|
|
234
|
-
const { goTo, location } = (0, import_components.useNavigator)();
|
|
235
|
-
const editorCanvasContainerView = (0, import_data.useSelect)(
|
|
236
|
-
(select) => (0, import_lock_unlock.unlock)(select(import_store.store)).getEditorCanvasContainerView(),
|
|
237
|
-
[]
|
|
238
|
-
);
|
|
239
|
-
const path = location?.path;
|
|
240
|
-
const isRevisionsOpen = path === "/revisions";
|
|
241
|
-
(0, import_element.useEffect)(() => {
|
|
242
|
-
switch (editorCanvasContainerView) {
|
|
243
|
-
case "global-styles-revisions":
|
|
244
|
-
case "global-styles-revisions:style-book":
|
|
245
|
-
if (!isRevisionsOpen) {
|
|
246
|
-
goTo("/revisions");
|
|
247
|
-
}
|
|
248
|
-
break;
|
|
249
|
-
case "global-styles-css":
|
|
250
|
-
goTo("/css");
|
|
251
|
-
break;
|
|
252
|
-
// The stand-alone style book is open
|
|
253
|
-
// and the revisions panel is open,
|
|
254
|
-
// close the revisions panel.
|
|
255
|
-
// Otherwise keep the style book open while
|
|
256
|
-
// browsing global styles panel.
|
|
257
|
-
//
|
|
258
|
-
// Falling through as it matches the default scenario.
|
|
259
|
-
case "style-book":
|
|
260
|
-
default:
|
|
261
|
-
if (isRevisionsOpen) {
|
|
262
|
-
goTo("/", { isBack: true });
|
|
263
|
-
}
|
|
264
|
-
break;
|
|
265
|
-
}
|
|
266
|
-
}, [editorCanvasContainerView, isRevisionsOpen, goTo]);
|
|
267
|
-
}
|
|
268
|
-
function useNavigatorSync(parentPath, onPathChange) {
|
|
269
|
-
const navigator = (0, import_components.useNavigator)();
|
|
270
|
-
const { path: childPath } = navigator.location;
|
|
271
|
-
const previousParentPath = (0, import_compose.usePrevious)(parentPath);
|
|
272
|
-
const previousChildPath = (0, import_compose.usePrevious)(childPath);
|
|
273
|
-
(0, import_element.useEffect)(() => {
|
|
274
|
-
if (parentPath !== childPath) {
|
|
275
|
-
if (parentPath !== previousParentPath) {
|
|
276
|
-
navigator.goTo(parentPath);
|
|
277
|
-
} else if (childPath !== previousChildPath) {
|
|
278
|
-
onPathChange(childPath);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}, [
|
|
282
|
-
onPathChange,
|
|
283
|
-
parentPath,
|
|
284
|
-
previousChildPath,
|
|
285
|
-
previousParentPath,
|
|
286
|
-
childPath,
|
|
287
|
-
navigator
|
|
288
|
-
]);
|
|
289
|
-
}
|
|
290
|
-
function NavigationSync({ path: parentPath, onPathChange, children }) {
|
|
291
|
-
useNavigatorSync(parentPath, onPathChange);
|
|
292
|
-
return children;
|
|
293
|
-
}
|
|
294
|
-
function GlobalStylesUI({ path, onPathChange }) {
|
|
295
|
-
const blocks = (0, import_blocks.getBlockTypes)();
|
|
296
|
-
const editorCanvasContainerView = (0, import_data.useSelect)(
|
|
297
|
-
(select) => (0, import_lock_unlock.unlock)(select(import_store.store)).getEditorCanvasContainerView(),
|
|
298
|
-
[]
|
|
299
|
-
);
|
|
300
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
301
|
-
import_components.Navigator,
|
|
302
|
-
{
|
|
303
|
-
className: "edit-site-global-styles-sidebar__navigator-provider",
|
|
304
|
-
initialPath: "/",
|
|
305
|
-
children: [
|
|
306
|
-
path && onPathChange && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavigationSync, { path, onPathChange }),
|
|
307
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_root.default, {}) }),
|
|
308
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/variations", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_style_variations.default, {}) }),
|
|
309
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/blocks", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_block_list.default, {}) }),
|
|
310
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/typography", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_typography.default, {}) }),
|
|
311
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/typography/font-sizes", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_font_sizes.default, {}) }),
|
|
312
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/typography/font-sizes/:origin/:slug", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_font_size.default, {}) }),
|
|
313
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/typography/text", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_typography_element.default, { element: "text" }) }),
|
|
314
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/typography/link", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_typography_element.default, { element: "link" }) }),
|
|
315
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/typography/heading", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_typography_element.default, { element: "heading" }) }),
|
|
316
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/typography/caption", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_typography_element.default, { element: "caption" }) }),
|
|
317
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/typography/button", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_typography_element.default, { element: "button" }) }),
|
|
318
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/colors", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_colors.default, {}) }),
|
|
319
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/shadows", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_shadows.ScreenShadows, {}) }),
|
|
320
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/shadows/edit/:category/:slug", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_shadows.ScreenShadowsEdit, {}) }),
|
|
321
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/layout", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_layout.default, {}) }),
|
|
322
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/css", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_css.default, {}) }),
|
|
323
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/revisions", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_revisions.default, {}) }),
|
|
324
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesNavigationScreen, { path: "/background", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_background.default, {}) }),
|
|
325
|
-
blocks.map((block) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
326
|
-
GlobalStylesNavigationScreen,
|
|
327
|
-
{
|
|
328
|
-
path: "/blocks/" + encodeURIComponent(block.name),
|
|
329
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_screen_block.default, { name: block.name })
|
|
330
|
-
},
|
|
331
|
-
"menu-block-" + block.name
|
|
332
|
-
)),
|
|
333
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ContextScreens, {}),
|
|
334
|
-
blocks.map((block) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
335
|
-
ContextScreens,
|
|
336
|
-
{
|
|
337
|
-
name: block.name,
|
|
338
|
-
parentMenu: "/blocks/" + encodeURIComponent(block.name)
|
|
339
|
-
},
|
|
340
|
-
"screens-block-" + block.name
|
|
341
|
-
)),
|
|
342
|
-
"style-book" === editorCanvasContainerView && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesStyleBook, {}),
|
|
343
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesActionMenu, {}),
|
|
344
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesBlockLink, {}),
|
|
345
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesEditorCanvasContainerLink, {})
|
|
346
|
-
]
|
|
347
|
-
}
|
|
348
|
-
);
|
|
349
|
-
}
|
|
350
|
-
var ui_default = GlobalStylesUI;
|
|
351
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
352
|
-
0 && (module.exports = {
|
|
353
|
-
GlobalStylesMenuSlot
|
|
354
|
-
});
|
|
355
|
-
//# sourceMappingURL=ui.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/ui.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tNavigator,\n\tuseNavigator,\n\tcreateSlotFill,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\nimport { usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport FontSize from './font-sizes/font-size';\nimport FontSizes from './font-sizes/font-sizes';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenBackground from './screen-background';\nimport { ScreenShadows, ScreenShadowsEdit } from './screen-shadows';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport { STYLE_BOOK_COLOR_GROUPS } from '../style-book/constants';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { toggle } = useDispatch( preferencesStore );\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\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst loadCustomCSS = () => {\n\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t};\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'More' ) }\n\t\t\t\ttoggleProps={ { size: 'compact' } }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<Navigator.Screen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\tif (\n\t\t\t\t\tSTYLE_BOOK_COLOR_GROUPS.find(\n\t\t\t\t\t\t( group ) => group.slug === blockName\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t// Go to color palettes Global Styles.\n\t\t\t\t\tnavigator.goTo( '/colors/palette' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( blockName === 'typography' ) {\n\t\t\t\t\t// Go to typography Global Styles.\n\t\t\t\t\tnavigator.goTo( '/typography' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\tconst path = location?.path;\n\tconst isRevisionsOpen = path === '/revisions';\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tswitch ( editorCanvasContainerView ) {\n\t\t\tcase 'global-styles-revisions':\n\t\t\tcase 'global-styles-revisions:style-book':\n\t\t\t\tif ( ! isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/revisions' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'global-styles-css':\n\t\t\t\tgoTo( '/css' );\n\t\t\t\tbreak;\n\t\t\t// The stand-alone style book is open\n\t\t\t// and the revisions panel is open,\n\t\t\t// close the revisions panel.\n\t\t\t// Otherwise keep the style book open while\n\t\t\t// browsing global styles panel.\n\t\t\t//\n\t\t\t// Falling through as it matches the default scenario.\n\t\t\tcase 'style-book':\n\t\t\tdefault:\n\t\t\t\t// In general, if the revision screen is in view but the\n\t\t\t\t// `editorCanvasContainerView` is not a revision view, close it.\n\t\t\t\t// This also includes the scenario when the stand-alone style\n\t\t\t\t// book is open, in which case we want the user to close the\n\t\t\t\t// revisions screen and browse global styles.\n\t\t\t\tif ( isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/', { isBack: true } );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );\n}\n\nfunction useNavigatorSync( parentPath, onPathChange ) {\n\tconst navigator = useNavigator();\n\tconst { path: childPath } = navigator.location;\n\tconst previousParentPath = usePrevious( parentPath );\n\tconst previousChildPath = usePrevious( childPath );\n\tuseEffect( () => {\n\t\tif ( parentPath !== childPath ) {\n\t\t\tif ( parentPath !== previousParentPath ) {\n\t\t\t\tnavigator.goTo( parentPath );\n\t\t\t} else if ( childPath !== previousChildPath ) {\n\t\t\t\tonPathChange( childPath );\n\t\t\t}\n\t\t}\n\t}, [\n\t\tonPathChange,\n\t\tparentPath,\n\t\tpreviousChildPath,\n\t\tpreviousParentPath,\n\t\tchildPath,\n\t\tnavigator,\n\t] );\n}\n\n// This component is used to wrap the hook in order to conditionally execute it\n// when the parent component is used on controlled mode.\nfunction NavigationSync( { path: parentPath, onPathChange, children } ) {\n\tuseNavigatorSync( parentPath, onPathChange );\n\treturn children;\n}\n\nfunction GlobalStylesUI( { path, onPathChange } ) {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<Navigator\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t{ path && onPathChange && (\n\t\t\t\t<NavigationSync path={ path } onPathChange={ onPathChange } />\n\t\t\t) }\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/font-sizes\">\n\t\t\t\t<FontSizes />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/font-sizes/:origin/:slug\">\n\t\t\t\t<FontSize />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/shadows\">\n\t\t\t\t<ScreenShadows />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/shadows/edit/:category/:slug\">\n\t\t\t\t<ScreenShadowsEdit />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/revisions\">\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/background\">\n\t\t\t\t<ScreenBackground />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStyles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K,CAAE,UACf;AAAA,UAAC;AAAA;AAAA,YAEA,MAAO,MAAM;AAAA,YACb,YAAa,aAAa,mBAAoB,MAAM,IAAK;AAAA;AAAA,UAFnD,mBAAmB,MAAM;AAAA,QAGhC,CACC;AAAA,QAEA,iBAAiB,6BAClB,4CAAC,yBAAsB;AAAA,QAGxB,4CAAC,0BAAuB;AAAA,QACxB,4CAAC,yBAAsB;AAAA,QACvB,4CAAC,yCAAsC;AAAA;AAAA;AAAA,EACxC;AAEF;AAEA,IAAO,aAAQ;",
|
|
6
|
-
"names": ["blockEditorPrivateApis", "preferencesStore", "coreStore", "editSiteStore", "ScreenBlock", "blocksStore", "ScreenColorPalette", "StyleBook", "blockEditorStore", "ScreenRoot", "ScreenStyleVariations", "ScreenBlockList", "ScreenTypography", "FontSizes", "FontSize", "ScreenTypographyElement", "ScreenColors", "ScreenLayout", "ScreenCSS", "ScreenRevisions", "ScreenBackground"]
|
|
7
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var utils_exports = {};
|
|
20
|
-
__export(utils_exports, {
|
|
21
|
-
getFontFamilies: () => getFontFamilies,
|
|
22
|
-
getNewIndexFromPresets: () => getNewIndexFromPresets,
|
|
23
|
-
getVariationClassName: () => getVariationClassName
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(utils_exports);
|
|
26
|
-
function getVariationClassName(variation) {
|
|
27
|
-
if (!variation) {
|
|
28
|
-
return "";
|
|
29
|
-
}
|
|
30
|
-
return `is-style-${variation}`;
|
|
31
|
-
}
|
|
32
|
-
function getNewIndexFromPresets(presets, slugPrefix) {
|
|
33
|
-
const nameRegex = new RegExp(`^${slugPrefix}([\\d]+)$`);
|
|
34
|
-
const highestPresetValue = presets.reduce((currentHighest, preset) => {
|
|
35
|
-
if (typeof preset?.slug === "string") {
|
|
36
|
-
const matches = preset?.slug.match(nameRegex);
|
|
37
|
-
if (matches) {
|
|
38
|
-
const id = parseInt(matches[1], 10);
|
|
39
|
-
if (id > currentHighest) {
|
|
40
|
-
return id;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return currentHighest;
|
|
45
|
-
}, 0);
|
|
46
|
-
return highestPresetValue + 1;
|
|
47
|
-
}
|
|
48
|
-
function getFontFamilyFromSetting(fontFamilies, setting) {
|
|
49
|
-
if (!Array.isArray(fontFamilies) || !setting) {
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
const fontFamilyVariable = setting.replace("var(", "").replace(")", "");
|
|
53
|
-
const fontFamilySlug = fontFamilyVariable?.split("--").slice(-1)[0];
|
|
54
|
-
return fontFamilies.find(
|
|
55
|
-
(fontFamily) => fontFamily.slug === fontFamilySlug
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
function getFontFamilies(themeJson) {
|
|
59
|
-
const themeFontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme;
|
|
60
|
-
const customFontFamilies = themeJson?.settings?.typography?.fontFamilies?.custom;
|
|
61
|
-
let fontFamilies = [];
|
|
62
|
-
if (themeFontFamilies && customFontFamilies) {
|
|
63
|
-
fontFamilies = [...themeFontFamilies, ...customFontFamilies];
|
|
64
|
-
} else if (themeFontFamilies) {
|
|
65
|
-
fontFamilies = themeFontFamilies;
|
|
66
|
-
} else if (customFontFamilies) {
|
|
67
|
-
fontFamilies = customFontFamilies;
|
|
68
|
-
}
|
|
69
|
-
const bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;
|
|
70
|
-
const bodyFontFamily = getFontFamilyFromSetting(
|
|
71
|
-
fontFamilies,
|
|
72
|
-
bodyFontFamilySetting
|
|
73
|
-
);
|
|
74
|
-
const headingFontFamilySetting = themeJson?.styles?.elements?.heading?.typography?.fontFamily;
|
|
75
|
-
let headingFontFamily;
|
|
76
|
-
if (!headingFontFamilySetting) {
|
|
77
|
-
headingFontFamily = bodyFontFamily;
|
|
78
|
-
} else {
|
|
79
|
-
headingFontFamily = getFontFamilyFromSetting(
|
|
80
|
-
fontFamilies,
|
|
81
|
-
themeJson?.styles?.elements?.heading?.typography?.fontFamily
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
return [bodyFontFamily, headingFontFamily];
|
|
85
|
-
}
|
|
86
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
87
|
-
0 && (module.exports = {
|
|
88
|
-
getFontFamilies,
|
|
89
|
-
getNewIndexFromPresets,
|
|
90
|
-
getVariationClassName
|
|
91
|
-
});
|
|
92
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/utils.js"],
|
|
4
|
-
"sourcesContent": ["/**\n *\n * @param {string} variation The variation name.\n *\n * @return {string} The variation class name.\n */\nexport function getVariationClassName( variation ) {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n\n/**\n * Iterates through the presets array and searches for slugs that start with the specified\n * slugPrefix followed by a numerical suffix. It identifies the highest numerical suffix found\n * and returns one greater than the highest found suffix, ensuring that the new index is unique.\n *\n * @param {Array} presets The array of preset objects, each potentially containing a slug property.\n * @param {string} slugPrefix The prefix to look for in the preset slugs.\n *\n * @return {number} The next available index for a preset with the specified slug prefix, or 1 if no matching slugs are found.\n */\nexport function getNewIndexFromPresets( presets, slugPrefix ) {\n\tconst nameRegex = new RegExp( `^${ slugPrefix }([\\\\d]+)$` );\n\tconst highestPresetValue = presets.reduce( ( currentHighest, preset ) => {\n\t\tif ( typeof preset?.slug === 'string' ) {\n\t\t\tconst matches = preset?.slug.match( nameRegex );\n\t\t\tif ( matches ) {\n\t\t\t\tconst id = parseInt( matches[ 1 ], 10 );\n\t\t\t\tif ( id > currentHighest ) {\n\t\t\t\t\treturn id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn currentHighest;\n\t}, 0 );\n\treturn highestPresetValue + 1;\n}\n\nfunction getFontFamilyFromSetting( fontFamilies, setting ) {\n\tif ( ! Array.isArray( fontFamilies ) || ! setting ) {\n\t\treturn null;\n\t}\n\n\tconst fontFamilyVariable = setting.replace( 'var(', '' ).replace( ')', '' );\n\tconst fontFamilySlug = fontFamilyVariable?.split( '--' ).slice( -1 )[ 0 ];\n\n\treturn fontFamilies.find(\n\t\t( fontFamily ) => fontFamily.slug === fontFamilySlug\n\t);\n}\n\nexport function getFontFamilies( themeJson ) {\n\tconst themeFontFamilies =\n\t\tthemeJson?.settings?.typography?.fontFamilies?.theme;\n\tconst customFontFamilies =\n\t\tthemeJson?.settings?.typography?.fontFamilies?.custom;\n\n\tlet fontFamilies = [];\n\tif ( themeFontFamilies && customFontFamilies ) {\n\t\tfontFamilies = [ ...themeFontFamilies, ...customFontFamilies ];\n\t} else if ( themeFontFamilies ) {\n\t\tfontFamilies = themeFontFamilies;\n\t} else if ( customFontFamilies ) {\n\t\tfontFamilies = customFontFamilies;\n\t}\n\tconst bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;\n\tconst bodyFontFamily = getFontFamilyFromSetting(\n\t\tfontFamilies,\n\t\tbodyFontFamilySetting\n\t);\n\n\tconst headingFontFamilySetting =\n\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily;\n\n\tlet headingFontFamily;\n\tif ( ! headingFontFamilySetting ) {\n\t\theadingFontFamily = bodyFontFamily;\n\t} else {\n\t\theadingFontFamily = getFontFamilyFromSetting(\n\t\t\tfontFamilies,\n\t\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily\n\t\t);\n\t}\n\n\treturn [ bodyFontFamily, headingFontFamily ];\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,SAAS,sBAAuB,WAAY;AAClD,MAAK,CAAE,WAAY;AAClB,WAAO;AAAA,EACR;AACA,SAAO,YAAa,SAAU;AAC/B;AAYO,SAAS,uBAAwB,SAAS,YAAa;AAC7D,QAAM,YAAY,IAAI,OAAQ,IAAK,UAAW,WAAY;AAC1D,QAAM,qBAAqB,QAAQ,OAAQ,CAAE,gBAAgB,WAAY;AACxE,QAAK,OAAO,QAAQ,SAAS,UAAW;AACvC,YAAM,UAAU,QAAQ,KAAK,MAAO,SAAU;AAC9C,UAAK,SAAU;AACd,cAAM,KAAK,SAAU,QAAS,CAAE,GAAG,EAAG;AACtC,YAAK,KAAK,gBAAiB;AAC1B,iBAAO;AAAA,QACR;AAAA,MACD;AAAA,IACD;AACA,WAAO;AAAA,EACR,GAAG,CAAE;AACL,SAAO,qBAAqB;AAC7B;AAEA,SAAS,yBAA0B,cAAc,SAAU;AAC1D,MAAK,CAAE,MAAM,QAAS,YAAa,KAAK,CAAE,SAAU;AACnD,WAAO;AAAA,EACR;AAEA,QAAM,qBAAqB,QAAQ,QAAS,QAAQ,EAAG,EAAE,QAAS,KAAK,EAAG;AAC1E,QAAM,iBAAiB,oBAAoB,MAAO,IAAK,EAAE,MAAO,EAAG,EAAG,CAAE;AAExE,SAAO,aAAa;AAAA,IACnB,CAAE,eAAgB,WAAW,SAAS;AAAA,EACvC;AACD;AAEO,SAAS,gBAAiB,WAAY;AAC5C,QAAM,oBACL,WAAW,UAAU,YAAY,cAAc;AAChD,QAAM,qBACL,WAAW,UAAU,YAAY,cAAc;AAEhD,MAAI,eAAe,CAAC;AACpB,MAAK,qBAAqB,oBAAqB;AAC9C,mBAAe,CAAE,GAAG,mBAAmB,GAAG,kBAAmB;AAAA,EAC9D,WAAY,mBAAoB;AAC/B,mBAAe;AAAA,EAChB,WAAY,oBAAqB;AAChC,mBAAe;AAAA,EAChB;AACA,QAAM,wBAAwB,WAAW,QAAQ,YAAY;AAC7D,QAAM,iBAAiB;AAAA,IACtB;AAAA,IACA;AAAA,EACD;AAEA,QAAM,2BACL,WAAW,QAAQ,UAAU,SAAS,YAAY;AAEnD,MAAI;AACJ,MAAK,CAAE,0BAA2B;AACjC,wBAAoB;AAAA,EACrB,OAAO;AACN,wBAAoB;AAAA,MACnB;AAAA,MACA,WAAW,QAAQ,UAAU,SAAS,YAAY;AAAA,IACnD;AAAA,EACD;AAEA,SAAO,CAAE,gBAAgB,iBAAkB;AAC5C;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var variation_exports = {};
|
|
30
|
-
__export(variation_exports, {
|
|
31
|
-
default: () => Variation
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(variation_exports);
|
|
34
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var import_clsx = __toESM(require("clsx"));
|
|
36
|
-
var import_components = require("@wordpress/components");
|
|
37
|
-
var import_element = require("@wordpress/element");
|
|
38
|
-
var import_keycodes = require("@wordpress/keycodes");
|
|
39
|
-
var import_i18n = require("@wordpress/i18n");
|
|
40
|
-
var import_block_editor = require("@wordpress/block-editor");
|
|
41
|
-
var import_editor = require("@wordpress/editor");
|
|
42
|
-
var import_use_theme_style_variations_by_property = require("../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property");
|
|
43
|
-
var import_lock_unlock = require("../../../lock-unlock");
|
|
44
|
-
const { mergeBaseAndUserConfigs } = (0, import_lock_unlock.unlock)(import_editor.privateApis);
|
|
45
|
-
const { GlobalStylesContext, areGlobalStyleConfigsEqual } = (0, import_lock_unlock.unlock)(
|
|
46
|
-
import_block_editor.privateApis
|
|
47
|
-
);
|
|
48
|
-
function Variation({
|
|
49
|
-
variation,
|
|
50
|
-
children,
|
|
51
|
-
isPill,
|
|
52
|
-
properties,
|
|
53
|
-
showTooltip
|
|
54
|
-
}) {
|
|
55
|
-
const [isFocused, setIsFocused] = (0, import_element.useState)(false);
|
|
56
|
-
const { base, user, setUserConfig } = (0, import_element.useContext)(GlobalStylesContext);
|
|
57
|
-
const context = (0, import_element.useMemo)(() => {
|
|
58
|
-
let merged = mergeBaseAndUserConfigs(base, variation);
|
|
59
|
-
if (properties) {
|
|
60
|
-
merged = (0, import_use_theme_style_variations_by_property.filterObjectByProperties)(merged, properties);
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
user: variation,
|
|
64
|
-
base,
|
|
65
|
-
merged,
|
|
66
|
-
setUserConfig: () => {
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
}, [variation, base, properties]);
|
|
70
|
-
const selectVariation = () => setUserConfig(variation);
|
|
71
|
-
const selectOnEnter = (event) => {
|
|
72
|
-
if (event.keyCode === import_keycodes.ENTER) {
|
|
73
|
-
event.preventDefault();
|
|
74
|
-
selectVariation();
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
const isActive = (0, import_element.useMemo)(
|
|
78
|
-
() => areGlobalStyleConfigsEqual(user, variation),
|
|
79
|
-
[user, variation]
|
|
80
|
-
);
|
|
81
|
-
let label = variation?.title;
|
|
82
|
-
if (variation?.description) {
|
|
83
|
-
label = (0, import_i18n.sprintf)(
|
|
84
|
-
/* translators: 1: variation title. 2: variation description. */
|
|
85
|
-
(0, import_i18n._x)("%1$s (%2$s)", "variation label"),
|
|
86
|
-
variation?.title,
|
|
87
|
-
variation?.description
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
const content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
91
|
-
"div",
|
|
92
|
-
{
|
|
93
|
-
className: (0, import_clsx.default)("edit-site-global-styles-variations_item", {
|
|
94
|
-
"is-active": isActive
|
|
95
|
-
}),
|
|
96
|
-
role: "button",
|
|
97
|
-
onClick: selectVariation,
|
|
98
|
-
onKeyDown: selectOnEnter,
|
|
99
|
-
tabIndex: "0",
|
|
100
|
-
"aria-label": label,
|
|
101
|
-
"aria-current": isActive,
|
|
102
|
-
onFocus: () => setIsFocused(true),
|
|
103
|
-
onBlur: () => setIsFocused(false),
|
|
104
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
105
|
-
"div",
|
|
106
|
-
{
|
|
107
|
-
className: (0, import_clsx.default)(
|
|
108
|
-
"edit-site-global-styles-variations_item-preview",
|
|
109
|
-
{ "is-pill": isPill }
|
|
110
|
-
),
|
|
111
|
-
children: children(isFocused)
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
}
|
|
115
|
-
);
|
|
116
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStylesContext.Provider, { value: context, children: showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Tooltip, { text: variation?.title, children: content }) : content });
|
|
117
|
-
}
|
|
118
|
-
//# sourceMappingURL=variation.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/global-styles/variations/variation.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Tooltip } from '@wordpress/components';\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { _x, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { filterObjectByProperties } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport { unlock } from '../../../lock-unlock';\n\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport default function Variation( {\n\tvariation,\n\tchildren,\n\tisPill,\n\tproperties,\n\tshowTooltip,\n} ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\n\tconst context = useMemo( () => {\n\t\tlet merged = mergeBaseAndUserConfigs( base, variation );\n\t\tif ( properties ) {\n\t\t\tmerged = filterObjectByProperties( merged, properties );\n\t\t}\n\t\treturn {\n\t\t\tuser: variation,\n\t\t\tbase,\n\t\t\tmerged,\n\t\t\tsetUserConfig: () => {},\n\t\t};\n\t}, [ variation, base, properties ] );\n\n\tconst selectVariation = () => setUserConfig( variation );\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo(\n\t\t() => areGlobalStyleConfigsEqual( user, variation ),\n\t\t[ user, variation ]\n\t);\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: 1: variation title. 2: variation description. */\n\t\t\t_x( '%1$s (%2$s)', 'variation label' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\tconst content = (\n\t\t<div\n\t\t\tclassName={ clsx( 'edit-site-global-styles-variations_item', {\n\t\t\t\t'is-active': isActive,\n\t\t\t} ) }\n\t\t\trole=\"button\"\n\t\t\tonClick={ selectVariation }\n\t\t\tonKeyDown={ selectOnEnter }\n\t\t\ttabIndex=\"0\"\n\t\t\taria-label={ label }\n\t\t\taria-current={ isActive }\n\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'edit-site-global-styles-variations_item-preview',\n\t\t\t\t\t{ 'is-pill': isPill }\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t{ children( isFocused ) }\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t{ showTooltip ? (\n\t\t\t\t<Tooltip text={ variation?.title }>{ content }</Tooltip>\n\t\t\t) : (\n\t\t\t\tcontent\n\t\t\t) }\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuFG;AApFH,kBAAiB;AAKjB,wBAAwB;AACxB,qBAA8C;AAC9C,sBAAsB;AACtB,kBAA4B;AAC5B,0BAAsD;AACtD,oBAAiD;AAKjD,oDAAyC;AACzC,yBAAuB;AAEvB,MAAM,EAAE,wBAAwB,QAAI,2BAAQ,cAAAA,WAAkB;AAC9D,MAAM,EAAE,qBAAqB,2BAA2B,QAAI;AAAA,EAC3D,oBAAAC;AACD;AAEe,SAAR,UAA4B;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,CAAE,WAAW,YAAa,QAAI,yBAAU,KAAM;AACpD,QAAM,EAAE,MAAM,MAAM,cAAc,QAAI,2BAAY,mBAAoB;AAEtE,QAAM,cAAU,wBAAS,MAAM;AAC9B,QAAI,SAAS,wBAAyB,MAAM,SAAU;AACtD,QAAK,YAAa;AACjB,mBAAS,wEAA0B,QAAQ,UAAW;AAAA,IACvD;AACA,WAAO;AAAA,MACN,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA,eAAe,MAAM;AAAA,MAAC;AAAA,IACvB;AAAA,EACD,GAAG,CAAE,WAAW,MAAM,UAAW,CAAE;AAEnC,QAAM,kBAAkB,MAAM,cAAe,SAAU;AAEvD,QAAM,gBA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