@wordpress/edit-site 6.33.3 → 6.34.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/block-editor/use-site-editor-settings.js +14 -2
- package/build/components/block-editor/use-site-editor-settings.js.map +3 -3
- package/build/components/canvas-loader/index.js +5 -8
- package/build/components/canvas-loader/index.js.map +3 -3
- package/build/components/editor/index.js +2 -40
- package/build/components/editor/index.js.map +3 -3
- package/build/components/layout/index.js +5 -7
- package/build/components/layout/index.js.map +3 -3
- package/build/components/page-patterns/fields.js +4 -3
- package/build/components/page-patterns/fields.js.map +3 -3
- package/build/components/page-templates/fields.js +2 -2
- package/build/components/page-templates/fields.js.map +3 -3
- package/build/components/{sidebar-global-styles-wrapper → sidebar-global-styles}/index.js +22 -46
- package/build/components/sidebar-global-styles/index.js.map +7 -0
- package/build/components/sidebar-navigation-screen-global-styles/content.js +38 -16
- package/build/components/sidebar-navigation-screen-global-styles/content.js.map +3 -3
- package/build/components/sidebar-navigation-screen-global-styles/index.js +6 -7
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +3 -3
- package/build/components/sidebar-navigation-screen-main/index.js +0 -9
- package/build/components/sidebar-navigation-screen-main/index.js.map +3 -3
- package/build/components/sidebar-navigation-screen-templates-browse/content.js +2 -2
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +2 -2
- package/build/components/site-editor-routes/stylebook.js +5 -3
- package/build/components/site-editor-routes/stylebook.js.map +3 -3
- package/build/components/site-editor-routes/styles.js +33 -11
- package/build/components/site-editor-routes/styles.js.map +3 -3
- package/build/components/welcome-guide/index.js +0 -2
- package/build/components/welcome-guide/index.js.map +3 -3
- package/build/hooks/commands/use-common-commands.js +10 -12
- package/build/hooks/commands/use-common-commands.js.map +3 -3
- package/build/hooks/commands/use-set-command-context.js +0 -5
- package/build/hooks/commands/use-set-command-context.js.map +2 -2
- package/build/index.js +0 -1
- package/build/index.js.map +2 -2
- package/build/posts.js +0 -1
- package/build/posts.js.map +2 -2
- package/build/store/private-actions.js +0 -8
- package/build/store/private-actions.js.map +2 -2
- package/build/store/private-selectors.js +0 -5
- package/build/store/private-selectors.js.map +2 -2
- package/build/store/reducer.js +0 -8
- package/build/store/reducer.js.map +2 -2
- package/build-module/components/block-editor/use-site-editor-settings.js +14 -2
- package/build-module/components/block-editor/use-site-editor-settings.js.map +2 -2
- package/build-module/components/canvas-loader/index.js +5 -8
- package/build-module/components/canvas-loader/index.js.map +2 -2
- package/build-module/components/editor/index.js +4 -46
- package/build-module/components/editor/index.js.map +2 -2
- package/build-module/components/layout/index.js +5 -7
- package/build-module/components/layout/index.js.map +2 -2
- package/build-module/components/page-patterns/fields.js +5 -7
- package/build-module/components/page-patterns/fields.js.map +2 -2
- package/build-module/components/page-templates/fields.js +6 -6
- package/build-module/components/page-templates/fields.js.map +2 -2
- package/build-module/components/{sidebar-global-styles-wrapper → sidebar-global-styles}/index.js +21 -41
- package/build-module/components/sidebar-global-styles/index.js.map +7 -0
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js +42 -6
- 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 +5 -6
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +2 -2
- package/build-module/components/sidebar-navigation-screen-main/index.js +1 -10
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +2 -2
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +2 -2
- package/build-module/components/site-editor-routes/stylebook.js +3 -1
- package/build-module/components/site-editor-routes/stylebook.js.map +2 -2
- package/build-module/components/site-editor-routes/styles.js +31 -9
- package/build-module/components/site-editor-routes/styles.js.map +2 -2
- package/build-module/components/welcome-guide/index.js +0 -2
- package/build-module/components/welcome-guide/index.js.map +2 -2
- package/build-module/hooks/commands/use-common-commands.js +13 -12
- package/build-module/hooks/commands/use-common-commands.js.map +2 -2
- package/build-module/hooks/commands/use-set-command-context.js +0 -5
- package/build-module/hooks/commands/use-set-command-context.js.map +2 -2
- package/build-module/index.js +0 -1
- package/build-module/index.js.map +2 -2
- package/build-module/posts.js +0 -1
- package/build-module/posts.js.map +2 -2
- package/build-module/store/private-actions.js +0 -7
- package/build-module/store/private-actions.js.map +2 -2
- package/build-module/store/private-selectors.js +0 -4
- package/build-module/store/private-selectors.js.map +2 -2
- package/build-module/store/reducer.js +0 -8
- package/build-module/store/reducer.js.map +2 -2
- 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/sidebar-navigation-screen-templates-browse/content.js +3 -3
- 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/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,139 +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 editor_canvas_container_exports = {};
|
|
20
|
-
__export(editor_canvas_container_exports, {
|
|
21
|
-
default: () => editor_canvas_container_default,
|
|
22
|
-
getEditorCanvasContainerTitle: () => getEditorCanvasContainerTitle,
|
|
23
|
-
useHasEditorCanvasContainer: () => useHasEditorCanvasContainer
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(editor_canvas_container_exports);
|
|
26
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
-
var import_element = require("@wordpress/element");
|
|
28
|
-
var import_components = require("@wordpress/components");
|
|
29
|
-
var import_keycodes = require("@wordpress/keycodes");
|
|
30
|
-
var import_i18n = require("@wordpress/i18n");
|
|
31
|
-
var import_data = require("@wordpress/data");
|
|
32
|
-
var import_icons = require("@wordpress/icons");
|
|
33
|
-
var import_compose = require("@wordpress/compose");
|
|
34
|
-
var import_preferences = require("@wordpress/preferences");
|
|
35
|
-
var import_editor = require("@wordpress/editor");
|
|
36
|
-
var import_lock_unlock = require("../../lock-unlock");
|
|
37
|
-
var import_store = require("../../store");
|
|
38
|
-
const { EditorContentSlotFill, ResizableEditor } = (0, import_lock_unlock.unlock)(import_editor.privateApis);
|
|
39
|
-
function getEditorCanvasContainerTitle(view) {
|
|
40
|
-
switch (view) {
|
|
41
|
-
case "style-book":
|
|
42
|
-
return (0, import_i18n.__)("Style Book");
|
|
43
|
-
case "global-styles-revisions":
|
|
44
|
-
case "global-styles-revisions:style-book":
|
|
45
|
-
return (0, import_i18n.__)("Style Revisions");
|
|
46
|
-
default:
|
|
47
|
-
return "";
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function EditorCanvasContainer({
|
|
51
|
-
children,
|
|
52
|
-
closeButtonLabel,
|
|
53
|
-
onClose,
|
|
54
|
-
enableResizing = false
|
|
55
|
-
}) {
|
|
56
|
-
const { editorCanvasContainerView, showListViewByDefault } = (0, import_data.useSelect)(
|
|
57
|
-
(select) => {
|
|
58
|
-
const _editorCanvasContainerView = (0, import_lock_unlock.unlock)(
|
|
59
|
-
select(import_store.store)
|
|
60
|
-
).getEditorCanvasContainerView();
|
|
61
|
-
const _showListViewByDefault = select(import_preferences.store).get(
|
|
62
|
-
"core",
|
|
63
|
-
"showListViewByDefault"
|
|
64
|
-
);
|
|
65
|
-
return {
|
|
66
|
-
editorCanvasContainerView: _editorCanvasContainerView,
|
|
67
|
-
showListViewByDefault: _showListViewByDefault
|
|
68
|
-
};
|
|
69
|
-
},
|
|
70
|
-
[]
|
|
71
|
-
);
|
|
72
|
-
const [isClosed, setIsClosed] = (0, import_element.useState)(false);
|
|
73
|
-
const { setEditorCanvasContainerView } = (0, import_lock_unlock.unlock)(
|
|
74
|
-
(0, import_data.useDispatch)(import_store.store)
|
|
75
|
-
);
|
|
76
|
-
const { setIsListViewOpened } = (0, import_data.useDispatch)(import_editor.store);
|
|
77
|
-
const focusOnMountRef = (0, import_compose.useFocusOnMount)("firstElement");
|
|
78
|
-
const sectionFocusReturnRef = (0, import_compose.useFocusReturn)();
|
|
79
|
-
function onCloseContainer() {
|
|
80
|
-
setIsListViewOpened(showListViewByDefault);
|
|
81
|
-
setEditorCanvasContainerView(void 0);
|
|
82
|
-
setIsClosed(true);
|
|
83
|
-
if (typeof onClose === "function") {
|
|
84
|
-
onClose();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
function closeOnEscape(event) {
|
|
88
|
-
if (event.keyCode === import_keycodes.ESCAPE && !event.defaultPrevented) {
|
|
89
|
-
event.preventDefault();
|
|
90
|
-
onCloseContainer();
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
const childrenWithProps = Array.isArray(children) ? import_element.Children.map(
|
|
94
|
-
children,
|
|
95
|
-
(child, index) => index === 0 ? (0, import_element.cloneElement)(child, {
|
|
96
|
-
ref: sectionFocusReturnRef
|
|
97
|
-
}) : child
|
|
98
|
-
) : (0, import_element.cloneElement)(children, {
|
|
99
|
-
ref: sectionFocusReturnRef
|
|
100
|
-
});
|
|
101
|
-
if (isClosed) {
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
const title = getEditorCanvasContainerTitle(editorCanvasContainerView);
|
|
105
|
-
const shouldShowCloseButton = onClose || closeButtonLabel;
|
|
106
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EditorContentSlotFill.Fill, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "edit-site-editor-canvas-container", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResizableEditor, { enableResizing, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
107
|
-
"section",
|
|
108
|
-
{
|
|
109
|
-
className: "edit-site-editor-canvas-container__section",
|
|
110
|
-
ref: shouldShowCloseButton ? focusOnMountRef : null,
|
|
111
|
-
onKeyDown: closeOnEscape,
|
|
112
|
-
"aria-label": title,
|
|
113
|
-
children: [
|
|
114
|
-
shouldShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
115
|
-
import_components.Button,
|
|
116
|
-
{
|
|
117
|
-
size: "compact",
|
|
118
|
-
className: "edit-site-editor-canvas-container__close-button",
|
|
119
|
-
icon: import_icons.closeSmall,
|
|
120
|
-
label: closeButtonLabel || (0, import_i18n.__)("Close"),
|
|
121
|
-
onClick: onCloseContainer
|
|
122
|
-
}
|
|
123
|
-
),
|
|
124
|
-
childrenWithProps
|
|
125
|
-
]
|
|
126
|
-
}
|
|
127
|
-
) }) }) });
|
|
128
|
-
}
|
|
129
|
-
function useHasEditorCanvasContainer() {
|
|
130
|
-
const fills = (0, import_components.__experimentalUseSlotFills)(EditorContentSlotFill.name);
|
|
131
|
-
return !!fills?.length;
|
|
132
|
-
}
|
|
133
|
-
var editor_canvas_container_default = EditorCanvasContainer;
|
|
134
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
135
|
-
0 && (module.exports = {
|
|
136
|
-
getEditorCanvasContainerTitle,
|
|
137
|
-
useHasEditorCanvasContainer
|
|
138
|
-
});
|
|
139
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/editor-canvas-container/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Children, cloneElement, useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalUseSlotFills as useSlotFills,\n} from '@wordpress/components';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { closeSmall } from '@wordpress/icons';\nimport { useFocusOnMount, useFocusReturn } from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst { EditorContentSlotFill, ResizableEditor } = unlock( editorPrivateApis );\n\n/**\n * Returns a translated string for the title of the editor canvas container.\n *\n * @param {string} view Editor canvas container view.\n *\n * @return {Object} Translated string for the view title and associated icon, both defaulting to ''.\n */\nfunction getEditorCanvasContainerTitle( view ) {\n\tswitch ( view ) {\n\t\tcase 'style-book':\n\t\t\treturn __( 'Style Book' );\n\t\tcase 'global-styles-revisions':\n\t\tcase 'global-styles-revisions:style-book':\n\t\t\treturn __( 'Style Revisions' );\n\t\tdefault:\n\t\t\treturn '';\n\t}\n}\n\nfunction EditorCanvasContainer( {\n\tchildren,\n\tcloseButtonLabel,\n\tonClose,\n\tenableResizing = false,\n} ) {\n\tconst { editorCanvasContainerView, showListViewByDefault } = useSelect(\n\t\t( select ) => {\n\t\t\tconst _editorCanvasContainerView = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView();\n\n\t\t\tconst _showListViewByDefault = select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\t'showListViewByDefault'\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\teditorCanvasContainerView: _editorCanvasContainerView,\n\t\t\t\tshowListViewByDefault: _showListViewByDefault,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst [ isClosed, setIsClosed ] = useState( false );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst sectionFocusReturnRef = useFocusReturn();\n\n\tfunction onCloseContainer() {\n\t\tsetIsListViewOpened( showListViewByDefault );\n\t\tsetEditorCanvasContainerView( undefined );\n\t\tsetIsClosed( true );\n\t\tif ( typeof onClose === 'function' ) {\n\t\t\tonClose();\n\t\t}\n\t}\n\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tonCloseContainer();\n\t\t}\n\t}\n\n\tconst childrenWithProps = Array.isArray( children )\n\t\t? Children.map( children, ( child, index ) =>\n\t\t\t\tindex === 0\n\t\t\t\t\t? cloneElement( child, {\n\t\t\t\t\t\t\tref: sectionFocusReturnRef,\n\t\t\t\t\t } )\n\t\t\t\t\t: child\n\t\t )\n\t\t: cloneElement( children, {\n\t\t\t\tref: sectionFocusReturnRef,\n\t\t } );\n\n\tif ( isClosed ) {\n\t\treturn null;\n\t}\n\n\tconst title = getEditorCanvasContainerTitle( editorCanvasContainerView );\n\tconst shouldShowCloseButton = onClose || closeButtonLabel;\n\n\treturn (\n\t\t<EditorContentSlotFill.Fill>\n\t\t\t<div className=\"edit-site-editor-canvas-container\">\n\t\t\t\t<ResizableEditor enableResizing={ enableResizing }>\n\t\t\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t\t\t<section\n\t\t\t\t\t\tclassName=\"edit-site-editor-canvas-container__section\"\n\t\t\t\t\t\tref={ shouldShowCloseButton ? focusOnMountRef : null }\n\t\t\t\t\t\tonKeyDown={ closeOnEscape }\n\t\t\t\t\t\taria-label={ title }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ shouldShowCloseButton && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\tclassName=\"edit-site-editor-canvas-container__close-button\"\n\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\tlabel={ closeButtonLabel || __( 'Close' ) }\n\t\t\t\t\t\t\t\tonClick={ onCloseContainer }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ childrenWithProps }\n\t\t\t\t\t</section>\n\t\t\t\t</ResizableEditor>\n\t\t\t</div>\n\t\t</EditorContentSlotFill.Fill>\n\t);\n}\n\nfunction useHasEditorCanvasContainer() {\n\tconst fills = useSlotFills( EditorContentSlotFill.name );\n\treturn !! fills?.length;\n}\n\nexport default EditorCanvasContainer;\nexport { useHasEditorCanvasContainer, getEditorCanvasContainerTitle };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuHK;AApHL,qBAAiD;AACjD,wBAGO;AACP,sBAAuB;AACvB,kBAAmB;AACnB,kBAAuC;AACvC,mBAA2B;AAC3B,qBAAgD;AAChD,yBAA0C;AAC1C,oBAGO;AAKP,yBAAuB;AACvB,mBAAuC;AAEvC,MAAM,EAAE,uBAAuB,gBAAgB,QAAI,2BAAQ,cAAAA,WAAkB;AAS7E,SAAS,8BAA+B,MAAO;AAC9C,UAAS,MAAO;AAAA,IACf,KAAK;AACJ,iBAAO,gBAAI,YAAa;AAAA,IACzB,KAAK;AAAA,IACL,KAAK;AACJ,iBAAO,gBAAI,iBAAkB;AAAA,IAC9B;AACC,aAAO;AAAA,EACT;AACD;AAEA,SAAS,sBAAuB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAClB,GAAI;AACH,QAAM,EAAE,2BAA2B,sBAAsB,QAAI;AAAA,IAC5D,CAAE,WAAY;AACb,YAAM,iCAA6B;AAAA,QAClC,OAAQ,aAAAC,KAAc;AAAA,MACvB,EAAE,6BAA6B;AAE/B,YAAM,yBAAyB,OAAQ,mBAAAC,KAAiB,EAAE;AAAA,QACzD;AAAA,QACA;AAAA,MACD;AAEA,aAAO;AAAA,QACN,2BAA2B;AAAA,QAC3B,uBAAuB;AAAA,MACxB;AAAA,IACD;AAAA,IACA,CAAC;AAAA,EACF;AACA,QAAM,CAAE,UAAU,WAAY,QAAI,yBAAU,KAAM;AAClD,QAAM,EAAE,6BAA6B,QAAI;AAAA,QACxC,yBAAa,aAAAD,KAAc;AAAA,EAC5B;AACA,QAAM,EAAE,oBAAoB,QAAI,yBAAa,cAAAE,KAAY;AAEzD,QAAM,sBAAkB,gCAAiB,cAAe;AACxD,QAAM,4BAAwB,+BAAe;AAE7C,WAAS,mBAAmB;AAC3B,wBAAqB,qBAAsB;AAC3C,iCAA8B,MAAU;AACxC,gBAAa,IAAK;AAClB,QAAK,OAAO,YAAY,YAAa;AACpC,cAAQ;AAAA,IACT;AAAA,EACD;AAEA,WAAS,cAAe,OAAQ;AAC/B,QAAK,MAAM,YAAY,0BAAU,CAAE,MAAM,kBAAmB;AAC3D,YAAM,eAAe;AACrB,uBAAiB;AAAA,IAClB;AAAA,EACD;AAEA,QAAM,oBAAoB,MAAM,QAAS,QAAS,IAC/C,wBAAS;AAAA,IAAK;AAAA,IAAU,CAAE,OAAO,UACjC,UAAU,QACP,6BAAc,OAAO;AAAA,MACrB,KAAK;AAAA,IACL,CAAE,IACF;AAAA,EACH,QACA,6BAAc,UAAU;AAAA,IACxB,KAAK;AAAA,EACL,CAAE;AAEL,MAAK,UAAW;AACf,WAAO;AAAA,EACR;AAEA,QAAM,QAAQ,8BAA+B,yBAA0B;AACvE,QAAM,wBAAwB,WAAW;AAEzC,SACC,4CAAC,sBAAsB,MAAtB,EACA,sDAAC,SAAI,WAAU,qCACd,sDAAC,mBAAgB,gBAEhB;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,KAAM,wBAAwB,kBAAkB;AAAA,MAChD,WAAY;AAAA,MACZ,cAAa;AAAA,MAEX;AAAA,iCACD;AAAA,UAAC;AAAA;AAAA,YACA,MAAK;AAAA,YACL,WAAU;AAAA,YACV,MAAO;AAAA,YACP,OAAQ,wBAAoB,gBAAI,OAAQ;AAAA,YACxC,SAAU;AAAA;AAAA,QACX;AAAA,QAEC;AAAA;AAAA;AAAA,EACH,GACD,GACD,GACD;AAEF;AAEA,SAAS,8BAA8B;AACtC,QAAM,YAAQ,kBAAAC,4BAAc,sBAAsB,IAAK;AACvD,SAAO,CAAC,CAAE,OAAO;AAClB;AAEA,IAAO,kCAAQ;",
|
|
6
|
-
"names": ["editorPrivateApis", "editSiteStore", "preferencesStore", "editorStore", "useSlotFills"]
|
|
7
|
-
}
|
|
@@ -1,62 +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 background_panel_exports = {};
|
|
20
|
-
__export(background_panel_exports, {
|
|
21
|
-
default: () => BackgroundPanel,
|
|
22
|
-
hasBackgroundImageValue: () => hasBackgroundImageValue
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(background_panel_exports);
|
|
25
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
-
var import_block_editor = require("@wordpress/block-editor");
|
|
27
|
-
var import_lock_unlock = require("../../lock-unlock");
|
|
28
|
-
const BACKGROUND_DEFAULT_VALUES = {
|
|
29
|
-
backgroundSize: "auto"
|
|
30
|
-
};
|
|
31
|
-
const {
|
|
32
|
-
useGlobalStyle,
|
|
33
|
-
useGlobalSetting,
|
|
34
|
-
BackgroundPanel: StylesBackgroundPanel
|
|
35
|
-
} = (0, import_lock_unlock.unlock)(import_block_editor.privateApis);
|
|
36
|
-
function hasBackgroundImageValue(style) {
|
|
37
|
-
return !!style?.background?.backgroundImage?.id || !!style?.background?.backgroundImage?.url || typeof style?.background?.backgroundImage === "string";
|
|
38
|
-
}
|
|
39
|
-
function BackgroundPanel() {
|
|
40
|
-
const [style] = useGlobalStyle("", void 0, "user", {
|
|
41
|
-
shouldDecodeEncode: false
|
|
42
|
-
});
|
|
43
|
-
const [inheritedStyle, setStyle] = useGlobalStyle("", void 0, "all", {
|
|
44
|
-
shouldDecodeEncode: false
|
|
45
|
-
});
|
|
46
|
-
const [settings] = useGlobalSetting("");
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
-
StylesBackgroundPanel,
|
|
49
|
-
{
|
|
50
|
-
inheritedValue: inheritedStyle,
|
|
51
|
-
value: style,
|
|
52
|
-
onChange: setStyle,
|
|
53
|
-
settings,
|
|
54
|
-
defaultValues: BACKGROUND_DEFAULT_VALUES
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
-
0 && (module.exports = {
|
|
60
|
-
hasBackgroundImageValue
|
|
61
|
-
});
|
|
62
|
-
//# sourceMappingURL=background-panel.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/background-panel.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\n// Initial control values where no block style is set.\nconst BACKGROUND_DEFAULT_VALUES = {\n\tbackgroundSize: 'auto',\n};\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tBackgroundPanel: StylesBackgroundPanel,\n} = unlock( blockEditorPrivateApis );\n\n/**\n * Checks if there is a current value in the background image block support\n * attributes.\n *\n * @param {Object} style Style attribute.\n * @return {boolean} Whether the block has a background image value set.\n */\nexport function hasBackgroundImageValue( style ) {\n\treturn (\n\t\t!! style?.background?.backgroundImage?.id ||\n\t\t!! style?.background?.backgroundImage?.url ||\n\t\ttypeof style?.background?.backgroundImage === 'string'\n\t);\n}\n\nexport default function BackgroundPanel() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ settings ] = useGlobalSetting( '' );\n\n\treturn (\n\t\t<StylesBackgroundPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t\tdefaultValues={ BACKGROUND_DEFAULT_VALUES }\n\t\t/>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8CE;AA3CF,0BAAsD;AAKtD,yBAAuB;AAGvB,MAAM,4BAA4B;AAAA,EACjC,gBAAgB;AACjB;AAEA,MAAM;AAAA,EACL;AAAA,EACA;AAAA,EACA,iBAAiB;AAClB,QAAI,2BAAQ,oBAAAA,WAAuB;AAS5B,SAAS,wBAAyB,OAAQ;AAChD,SACC,CAAC,CAAE,OAAO,YAAY,iBAAiB,MACvC,CAAC,CAAE,OAAO,YAAY,iBAAiB,OACvC,OAAO,OAAO,YAAY,oBAAoB;AAEhD;AAEe,SAAR,kBAAmC;AACzC,QAAM,CAAE,KAAM,IAAI,eAAgB,IAAI,QAAW,QAAQ;AAAA,IACxD,oBAAoB;AAAA,EACrB,CAAE;AACF,QAAM,CAAE,gBAAgB,QAAS,IAAI,eAAgB,IAAI,QAAW,OAAO;AAAA,IAC1E,oBAAoB;AAAA,EACrB,CAAE;AACF,QAAM,CAAE,QAAS,IAAI,iBAAkB,EAAG;AAE1C,SACC;AAAA,IAAC;AAAA;AAAA,MACA,gBAAiB;AAAA,MACjB,OAAQ;AAAA,MACR,UAAW;AAAA,MACX;AAAA,MACA,eAAgB;AAAA;AAAA,EACjB;AAEF;",
|
|
6
|
-
"names": ["blockEditorPrivateApis"]
|
|
7
|
-
}
|
|
@@ -1,87 +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 block_preview_panel_exports = {};
|
|
20
|
-
__export(block_preview_panel_exports, {
|
|
21
|
-
default: () => block_preview_panel_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(block_preview_panel_exports);
|
|
24
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
-
var import_block_editor = require("@wordpress/block-editor");
|
|
26
|
-
var import_blocks = require("@wordpress/blocks");
|
|
27
|
-
var import_components = require("@wordpress/components");
|
|
28
|
-
var import_element = require("@wordpress/element");
|
|
29
|
-
var import_utils = require("./utils");
|
|
30
|
-
const BlockPreviewPanel = ({ name, variation = "" }) => {
|
|
31
|
-
const blockExample = (0, import_blocks.getBlockType)(name)?.example;
|
|
32
|
-
const blocks = (0, import_element.useMemo)(() => {
|
|
33
|
-
if (!blockExample) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
const example = {
|
|
37
|
-
...blockExample,
|
|
38
|
-
attributes: {
|
|
39
|
-
...blockExample.attributes,
|
|
40
|
-
style: void 0,
|
|
41
|
-
className: variation ? (0, import_utils.getVariationClassName)(variation) : blockExample.attributes?.className
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
return (0, import_blocks.getBlockFromExample)(name, example);
|
|
45
|
-
}, [name, blockExample, variation]);
|
|
46
|
-
const viewportWidth = blockExample?.viewportWidth ?? 500;
|
|
47
|
-
const previewHeight = 144;
|
|
48
|
-
const sidebarWidth = 235;
|
|
49
|
-
const scale = sidebarWidth / viewportWidth;
|
|
50
|
-
const minHeight = scale !== 0 && scale < 1 && previewHeight ? previewHeight / scale : previewHeight;
|
|
51
|
-
if (!blockExample) {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalSpacer, { marginX: 4, marginBottom: 4, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
-
"div",
|
|
56
|
-
{
|
|
57
|
-
className: "edit-site-global-styles__block-preview-panel",
|
|
58
|
-
style: { maxHeight: previewHeight, boxSizing: "initial" },
|
|
59
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
-
import_block_editor.BlockPreview,
|
|
61
|
-
{
|
|
62
|
-
blocks,
|
|
63
|
-
viewportWidth,
|
|
64
|
-
minHeight: previewHeight,
|
|
65
|
-
additionalStyles: (
|
|
66
|
-
//We want this CSS to be in sync with the one in InserterPreviewPanel.
|
|
67
|
-
[
|
|
68
|
-
{
|
|
69
|
-
css: `
|
|
70
|
-
body{
|
|
71
|
-
padding: 24px;
|
|
72
|
-
min-height:${Math.round(minHeight)}px;
|
|
73
|
-
display:flex;
|
|
74
|
-
align-items:center;
|
|
75
|
-
}
|
|
76
|
-
.is-root-container { width: 100%; }
|
|
77
|
-
`
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
) });
|
|
85
|
-
};
|
|
86
|
-
var block_preview_panel_default = BlockPreviewPanel;
|
|
87
|
-
//# sourceMappingURL=block-preview-panel.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/block-preview-panel.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { BlockPreview } from '@wordpress/block-editor';\nimport { getBlockType, getBlockFromExample } from '@wordpress/blocks';\nimport { __experimentalSpacer as Spacer } from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getVariationClassName } from './utils';\n\nconst BlockPreviewPanel = ( { name, variation = '' } ) => {\n\tconst blockExample = getBlockType( name )?.example;\n\tconst blocks = useMemo( () => {\n\t\tif ( ! blockExample ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst example = {\n\t\t\t...blockExample,\n\t\t\tattributes: {\n\t\t\t\t...blockExample.attributes,\n\t\t\t\tstyle: undefined,\n\t\t\t\tclassName: variation\n\t\t\t\t\t? getVariationClassName( variation )\n\t\t\t\t\t: blockExample.attributes?.className,\n\t\t\t},\n\t\t};\n\n\t\treturn getBlockFromExample( name, example );\n\t}, [ name, blockExample, variation ] );\n\n\tconst viewportWidth = blockExample?.viewportWidth ?? 500;\n\t// Same as height of InserterPreviewPanel.\n\tconst previewHeight = 144;\n\tconst sidebarWidth = 235;\n\tconst scale = sidebarWidth / viewportWidth;\n\tconst minHeight =\n\t\tscale !== 0 && scale < 1 && previewHeight\n\t\t\t? previewHeight / scale\n\t\t\t: previewHeight;\n\n\tif ( ! blockExample ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Spacer marginX={ 4 } marginBottom={ 4 }>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-global-styles__block-preview-panel\"\n\t\t\t\tstyle={ { maxHeight: previewHeight, boxSizing: 'initial' } }\n\t\t\t>\n\t\t\t\t<BlockPreview\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\t\tminHeight={ previewHeight }\n\t\t\t\t\tadditionalStyles={\n\t\t\t\t\t\t//We want this CSS to be in sync with the one in InserterPreviewPanel.\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcss: `\n\t\t\t\t\t\t\t\tbody{\n\t\t\t\t\t\t\t\t\tpadding: 24px;\n\t\t\t\t\t\t\t\t\tmin-height:${ Math.round( minHeight ) }px;\n\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.is-root-container { width: 100%; }\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</Spacer>\n\t);\n};\n\nexport default BlockPreviewPanel;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsDI;AAnDJ,0BAA6B;AAC7B,oBAAkD;AAClD,wBAA+C;AAC/C,qBAAwB;AAKxB,mBAAsC;AAEtC,MAAM,oBAAoB,CAAE,EAAE,MAAM,YAAY,GAAG,MAAO;AACzD,QAAM,mBAAe,4BAAc,IAAK,GAAG;AAC3C,QAAM,aAAS,wBAAS,MAAM;AAC7B,QAAK,CAAE,cAAe;AACrB,aAAO;AAAA,IACR;AAEA,UAAM,UAAU;AAAA,MACf,GAAG;AAAA,MACH,YAAY;AAAA,QACX,GAAG,aAAa;AAAA,QAChB,OAAO;AAAA,QACP,WAAW,gBACR,oCAAuB,SAAU,IACjC,aAAa,YAAY;AAAA,MAC7B;AAAA,IACD;AAEA,eAAO,mCAAqB,MAAM,OAAQ;AAAA,EAC3C,GAAG,CAAE,MAAM,cAAc,SAAU,CAAE;AAErC,QAAM,gBAAgB,cAAc,iBAAiB;AAErD,QAAM,gBAAgB;AACtB,QAAM,eAAe;AACrB,QAAM,QAAQ,eAAe;AAC7B,QAAM,YACL,UAAU,KAAK,QAAQ,KAAK,gBACzB,gBAAgB,QAChB;AAEJ,MAAK,CAAE,cAAe;AACrB,WAAO;AAAA,EACR;AAEA,SACC,4CAAC,kBAAAA,sBAAA,EAAO,SAAU,GAAI,cAAe,GACpC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,OAAQ,EAAE,WAAW,eAAe,WAAW,UAAU;AAAA,MAEzD;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA;AAAA,UACA,WAAY;AAAA,UACZ;AAAA;AAAA,YAEC;AAAA,cACC;AAAA,gBACC,KAAK;AAAA;AAAA;AAAA,sBAGU,KAAK,MAAO,SAAU,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAMxC;AAAA,YACD;AAAA;AAAA;AAAA,MAEF;AAAA;AAAA,EACD,GACD;AAEF;AAEA,IAAO,8BAAQ;",
|
|
6
|
-
"names": ["Spacer"]
|
|
7
|
-
}
|
|
@@ -1,50 +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 color_indicator_wrapper_exports = {};
|
|
30
|
-
__export(color_indicator_wrapper_exports, {
|
|
31
|
-
default: () => color_indicator_wrapper_default
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(color_indicator_wrapper_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
|
-
function ColorIndicatorWrapper({ className, ...props }) {
|
|
38
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
39
|
-
import_components.Flex,
|
|
40
|
-
{
|
|
41
|
-
className: (0, import_clsx.default)(
|
|
42
|
-
"edit-site-global-styles__color-indicator-wrapper",
|
|
43
|
-
className
|
|
44
|
-
),
|
|
45
|
-
...props
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
var color_indicator_wrapper_default = ColorIndicatorWrapper;
|
|
50
|
-
//# sourceMappingURL=color-indicator-wrapper.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/color-indicator-wrapper.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Flex } from '@wordpress/components';\n\nfunction ColorIndicatorWrapper( { className, ...props } ) {\n\treturn (\n\t\t<Flex\n\t\t\tclassName={ clsx(\n\t\t\t\t'edit-site-global-styles__color-indicator-wrapper',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default ColorIndicatorWrapper;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYE;AATF,kBAAiB;AAKjB,wBAAqB;AAErB,SAAS,sBAAuB,EAAE,WAAW,GAAG,MAAM,GAAI;AACzD,SACC;AAAA,IAAC;AAAA;AAAA,MACA,eAAY,YAAAA;AAAA,QACX;AAAA,QACA;AAAA,MACD;AAAA,MACE,GAAG;AAAA;AAAA,EACN;AAEF;AAEA,IAAO,kCAAQ;",
|
|
6
|
-
"names": ["clsx"]
|
|
7
|
-
}
|
|
@@ -1,133 +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 color_palette_panel_exports = {};
|
|
30
|
-
__export(color_palette_panel_exports, {
|
|
31
|
-
default: () => ColorPalettePanel
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(color_palette_panel_exports);
|
|
34
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var import_compose = require("@wordpress/compose");
|
|
36
|
-
var import_components = require("@wordpress/components");
|
|
37
|
-
var import_i18n = require("@wordpress/i18n");
|
|
38
|
-
var import_block_editor = require("@wordpress/block-editor");
|
|
39
|
-
var import_icons = require("@wordpress/icons");
|
|
40
|
-
var import_lock_unlock = require("../../lock-unlock");
|
|
41
|
-
var import_variations_color = __toESM(require("./variations/variations-color"));
|
|
42
|
-
var import_hooks = require("./hooks");
|
|
43
|
-
const { useGlobalSetting } = (0, import_lock_unlock.unlock)(import_block_editor.privateApis);
|
|
44
|
-
const mobilePopoverProps = { placement: "bottom-start", offset: 8 };
|
|
45
|
-
function ColorPalettePanel({ name }) {
|
|
46
|
-
const [themeColors, setThemeColors] = useGlobalSetting(
|
|
47
|
-
"color.palette.theme",
|
|
48
|
-
name
|
|
49
|
-
);
|
|
50
|
-
const [baseThemeColors] = useGlobalSetting(
|
|
51
|
-
"color.palette.theme",
|
|
52
|
-
name,
|
|
53
|
-
"base"
|
|
54
|
-
);
|
|
55
|
-
const [defaultColors, setDefaultColors] = useGlobalSetting(
|
|
56
|
-
"color.palette.default",
|
|
57
|
-
name
|
|
58
|
-
);
|
|
59
|
-
const [baseDefaultColors] = useGlobalSetting(
|
|
60
|
-
"color.palette.default",
|
|
61
|
-
name,
|
|
62
|
-
"base"
|
|
63
|
-
);
|
|
64
|
-
const [customColors, setCustomColors] = useGlobalSetting(
|
|
65
|
-
"color.palette.custom",
|
|
66
|
-
name
|
|
67
|
-
);
|
|
68
|
-
const [defaultPaletteEnabled] = useGlobalSetting(
|
|
69
|
-
"color.defaultPalette",
|
|
70
|
-
name
|
|
71
|
-
);
|
|
72
|
-
const isMobileViewport = (0, import_compose.useViewportMatch)("small", "<");
|
|
73
|
-
const popoverProps = isMobileViewport ? mobilePopoverProps : void 0;
|
|
74
|
-
const [randomizeThemeColors] = (0, import_hooks.useColorRandomizer)();
|
|
75
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
76
|
-
import_components.__experimentalVStack,
|
|
77
|
-
{
|
|
78
|
-
className: "edit-site-global-styles-color-palette-panel",
|
|
79
|
-
spacing: 8,
|
|
80
|
-
children: [
|
|
81
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalVStack, { spacing: 4, children: [
|
|
82
|
-
!!themeColors && !!themeColors.length && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
|
-
import_components.__experimentalPaletteEdit,
|
|
84
|
-
{
|
|
85
|
-
canReset: themeColors !== baseThemeColors,
|
|
86
|
-
canOnlyChangeValues: true,
|
|
87
|
-
colors: themeColors,
|
|
88
|
-
onChange: setThemeColors,
|
|
89
|
-
paletteLabel: (0, import_i18n.__)("Theme"),
|
|
90
|
-
paletteLabelHeadingLevel: 3,
|
|
91
|
-
popoverProps
|
|
92
|
-
}
|
|
93
|
-
),
|
|
94
|
-
window.__experimentalEnableColorRandomizer && themeColors?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
|
-
import_components.Button,
|
|
96
|
-
{
|
|
97
|
-
__next40pxDefaultSize: true,
|
|
98
|
-
variant: "secondary",
|
|
99
|
-
icon: import_icons.shuffle,
|
|
100
|
-
onClick: randomizeThemeColors,
|
|
101
|
-
children: (0, import_i18n.__)("Randomize colors")
|
|
102
|
-
}
|
|
103
|
-
)
|
|
104
|
-
] }),
|
|
105
|
-
!!defaultColors && !!defaultColors.length && !!defaultPaletteEnabled && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
106
|
-
import_components.__experimentalPaletteEdit,
|
|
107
|
-
{
|
|
108
|
-
canReset: defaultColors !== baseDefaultColors,
|
|
109
|
-
canOnlyChangeValues: true,
|
|
110
|
-
colors: defaultColors,
|
|
111
|
-
onChange: setDefaultColors,
|
|
112
|
-
paletteLabel: (0, import_i18n.__)("Default"),
|
|
113
|
-
paletteLabelHeadingLevel: 3,
|
|
114
|
-
popoverProps
|
|
115
|
-
}
|
|
116
|
-
),
|
|
117
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
118
|
-
import_components.__experimentalPaletteEdit,
|
|
119
|
-
{
|
|
120
|
-
colors: customColors,
|
|
121
|
-
onChange: setCustomColors,
|
|
122
|
-
paletteLabel: (0, import_i18n.__)("Custom"),
|
|
123
|
-
paletteLabelHeadingLevel: 3,
|
|
124
|
-
slugPrefix: "custom-",
|
|
125
|
-
popoverProps
|
|
126
|
-
}
|
|
127
|
-
),
|
|
128
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_variations_color.default, { title: (0, import_i18n.__)("Palettes") })
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
//# sourceMappingURL=color-palette-panel.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/color-palette-panel.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalPaletteEdit as PaletteEdit,\n\t__experimentalVStack as VStack,\n\tButton,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { shuffle } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport ColorVariations from './variations/variations-color';\nimport { useColorRandomizer } from './hooks';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst mobilePopoverProps = { placement: 'bottom-start', offset: 8 };\n\nexport default function ColorPalettePanel( { name } ) {\n\tconst [ themeColors, setThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname\n\t);\n\tconst [ baseThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ defaultColors, setDefaultColors ] = useGlobalSetting(\n\t\t'color.palette.default',\n\t\tname\n\t);\n\tconst [ baseDefaultColors ] = useGlobalSetting(\n\t\t'color.palette.default',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ customColors, setCustomColors ] = useGlobalSetting(\n\t\t'color.palette.custom',\n\t\tname\n\t);\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultPalette',\n\t\tname\n\t);\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst popoverProps = isMobileViewport ? mobilePopoverProps : undefined;\n\n\tconst [ randomizeThemeColors ] = useColorRandomizer();\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-global-styles-color-palette-panel\"\n\t\t\tspacing={ 8 }\n\t\t>\n\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t{ !! themeColors && !! themeColors.length && (\n\t\t\t\t\t<PaletteEdit\n\t\t\t\t\t\tcanReset={ themeColors !== baseThemeColors }\n\t\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\t\tcolors={ themeColors }\n\t\t\t\t\t\tonChange={ setThemeColors }\n\t\t\t\t\t\tpaletteLabel={ __( 'Theme' ) }\n\t\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ window.__experimentalEnableColorRandomizer &&\n\t\t\t\t\tthemeColors?.length > 0 && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\ticon={ shuffle }\n\t\t\t\t\t\t\tonClick={ randomizeThemeColors }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Randomize colors' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t</VStack>\n\t\t\t{ !! defaultColors &&\n\t\t\t\t!! defaultColors.length &&\n\t\t\t\t!! defaultPaletteEnabled && (\n\t\t\t\t\t<PaletteEdit\n\t\t\t\t\t\tcanReset={ defaultColors !== baseDefaultColors }\n\t\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\t\tcolors={ defaultColors }\n\t\t\t\t\t\tonChange={ setDefaultColors }\n\t\t\t\t\t\tpaletteLabel={ __( 'Default' ) }\n\t\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t<PaletteEdit\n\t\t\t\tcolors={ customColors }\n\t\t\t\tonChange={ setCustomColors }\n\t\t\t\tpaletteLabel={ __( 'Custom' ) }\n\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\tslugPrefix=\"custom-\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t/>\n\t\t\t<ColorVariations title={ __( 'Palettes' ) } />\n\t\t</VStack>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6DG;AA1DH,qBAAiC;AACjC,wBAIO;AACP,kBAAmB;AACnB,0BAAsD;AACtD,mBAAwB;AAKxB,yBAAuB;AACvB,8BAA4B;AAC5B,mBAAmC;AAEnC,MAAM,EAAE,iBAAiB,QAAI,2BAAQ,oBAAAA,WAAuB;AAC5D,MAAM,qBAAqB,EAAE,WAAW,gBAAgB,QAAQ,EAAE;AAEnD,SAAR,kBAAoC,EAAE,KAAK,GAAI;AACrD,QAAM,CAAE,aAAa,cAAe,IAAI;AAAA,IACvC;AAAA,IACA;AAAA,EACD;AACA,QAAM,CAAE,eAAgB,IAAI;AAAA,IAC3B;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACA,QAAM,CAAE,eAAe,gBAAiB,IAAI;AAAA,IAC3C;AAAA,IACA;AAAA,EACD;AACA,QAAM,CAAE,iBAAkB,IAAI;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACA,QAAM,CAAE,cAAc,eAAgB,IAAI;AAAA,IACzC;AAAA,IACA;AAAA,EACD;AAEA,QAAM,CAAE,qBAAsB,IAAI;AAAA,IACjC;AAAA,IACA;AAAA,EACD;AACA,QAAM,uBAAmB,iCAAkB,SAAS,GAAI;AACxD,QAAM,eAAe,mBAAmB,qBAAqB;AAE7D,QAAM,CAAE,oBAAqB,QAAI,iCAAmB;AAEpD,SACC;AAAA,IAAC,kBAAAC;AAAA,IAAA;AAAA,MACA,WAAU;AAAA,MACV,SAAU;AAAA,MAEV;AAAA,qDAAC,kBAAAA,sBAAA,EAAO,SAAU,GACf;AAAA,WAAC,CAAE,eAAe,CAAC,CAAE,YAAY,UAClC;AAAA,YAAC,kBAAAC;AAAA,YAAA;AAAA,cACA,UAAW,gBAAgB;AAAA,cAC3B,qBAAmB;AAAA,cACnB,QAAS;AAAA,cACT,UAAW;AAAA,cACX,kBAAe,gBAAI,OAAQ;AAAA,cAC3B,0BAA2B;AAAA,cAC3B;AAAA;AAAA,UACD;AAAA,UAEC,OAAO,uCACR,aAAa,SAAS,KACrB;AAAA,YAAC;AAAA;AAAA,cACA,uBAAqB;AAAA,cACrB,SAAQ;AAAA,cACR,MAAO;AAAA,cACP,SAAU;AAAA,cAER,8BAAI,kBAAmB;AAAA;AAAA,UAC1B;AAAA,WAEH;AAAA,QACE,CAAC,CAAE,iBACJ,CAAC,CAAE,cAAc,UACjB,CAAC,CAAE,yBACF;AAAA,UAAC,kBAAAA;AAAA,UAAA;AAAA,YACA,UAAW,kBAAkB;AAAA,YAC7B,qBAAmB;AAAA,YACnB,QAAS;AAAA,YACT,UAAW;AAAA,YACX,kBAAe,gBAAI,SAAU;AAAA,YAC7B,0BAA2B;AAAA,YAC3B;AAAA;AAAA,QACD;AAAA,QAEF;AAAA,UAAC,kBAAAA;AAAA,UAAA;AAAA,YACA,QAAS;AAAA,YACT,UAAW;AAAA,YACX,kBAAe,gBAAI,QAAS;AAAA,YAC5B,0BAA2B;AAAA,YAC3B,YAAW;AAAA,YACX;AAAA;AAAA,QACD;AAAA,QACA,4CAAC,wBAAAC,SAAA,EAAgB,WAAQ,gBAAI,UAAW,GAAI;AAAA;AAAA;AAAA,EAC7C;AAEF;",
|
|
6
|
-
"names": ["blockEditorPrivateApis", "VStack", "PaletteEdit", "ColorVariations"]
|
|
7
|
-
}
|
|
@@ -1,55 +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 confirm_reset_shadow_dialog_exports = {};
|
|
20
|
-
__export(confirm_reset_shadow_dialog_exports, {
|
|
21
|
-
default: () => confirm_reset_shadow_dialog_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(confirm_reset_shadow_dialog_exports);
|
|
24
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
-
var import_components = require("@wordpress/components");
|
|
26
|
-
var import_i18n = require("@wordpress/i18n");
|
|
27
|
-
function ConfirmResetShadowDialog({
|
|
28
|
-
text,
|
|
29
|
-
confirmButtonText,
|
|
30
|
-
isOpen,
|
|
31
|
-
toggleOpen,
|
|
32
|
-
onConfirm
|
|
33
|
-
}) {
|
|
34
|
-
const handleConfirm = async () => {
|
|
35
|
-
toggleOpen();
|
|
36
|
-
onConfirm();
|
|
37
|
-
};
|
|
38
|
-
const handleCancel = () => {
|
|
39
|
-
toggleOpen();
|
|
40
|
-
};
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
42
|
-
import_components.__experimentalConfirmDialog,
|
|
43
|
-
{
|
|
44
|
-
isOpen,
|
|
45
|
-
cancelButtonText: (0, import_i18n.__)("Cancel"),
|
|
46
|
-
confirmButtonText,
|
|
47
|
-
onCancel: handleCancel,
|
|
48
|
-
onConfirm: handleConfirm,
|
|
49
|
-
size: "medium",
|
|
50
|
-
children: text
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
var confirm_reset_shadow_dialog_default = ConfirmResetShadowDialog;
|
|
55
|
-
//# sourceMappingURL=confirm-reset-shadow-dialog.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/confirm-reset-shadow-dialog.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nfunction ConfirmResetShadowDialog( {\n\ttext,\n\tconfirmButtonText,\n\tisOpen,\n\ttoggleOpen,\n\tonConfirm,\n} ) {\n\tconst handleConfirm = async () => {\n\t\ttoggleOpen();\n\t\tonConfirm();\n\t};\n\n\tconst handleCancel = () => {\n\t\ttoggleOpen();\n\t};\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isOpen }\n\t\t\tcancelButtonText={ __( 'Cancel' ) }\n\t\t\tconfirmButtonText={ confirmButtonText }\n\t\t\tonCancel={ handleCancel }\n\t\t\tonConfirm={ handleConfirm }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t{ text }\n\t\t</ConfirmDialog>\n\t);\n}\n\nexport default ConfirmResetShadowDialog;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBE;AApBF,wBAA6D;AAC7D,kBAAmB;AAEnB,SAAS,yBAA0B;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,gBAAgB,YAAY;AACjC,eAAW;AACX,cAAU;AAAA,EACX;AAEA,QAAM,eAAe,MAAM;AAC1B,eAAW;AAAA,EACZ;AAEA,SACC;AAAA,IAAC,kBAAAA;AAAA,IAAA;AAAA,MACA;AAAA,MACA,sBAAmB,gBAAI,QAAS;AAAA,MAChC;AAAA,MACA,UAAW;AAAA,MACX,WAAY;AAAA,MACZ,MAAK;AAAA,MAEH;AAAA;AAAA,EACH;AAEF;AAEA,IAAO,sCAAQ;",
|
|
6
|
-
"names": ["ConfirmDialog"]
|
|
7
|
-
}
|