@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,119 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useViewportMatch } from "@wordpress/compose";
|
|
3
|
-
import {
|
|
4
|
-
__experimentalVStack as VStack,
|
|
5
|
-
__experimentalPaletteEdit as PaletteEdit,
|
|
6
|
-
__experimentalSpacer as Spacer,
|
|
7
|
-
DuotonePicker
|
|
8
|
-
} from "@wordpress/components";
|
|
9
|
-
import { __ } from "@wordpress/i18n";
|
|
10
|
-
import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
|
|
11
|
-
import Subtitle from "./subtitle";
|
|
12
|
-
import { unlock } from "../../lock-unlock";
|
|
13
|
-
const { useGlobalSetting } = unlock(blockEditorPrivateApis);
|
|
14
|
-
const mobilePopoverProps = { placement: "bottom-start", offset: 8 };
|
|
15
|
-
const noop = () => {
|
|
16
|
-
};
|
|
17
|
-
function GradientPalettePanel({ name }) {
|
|
18
|
-
const [themeGradients, setThemeGradients] = useGlobalSetting(
|
|
19
|
-
"color.gradients.theme",
|
|
20
|
-
name
|
|
21
|
-
);
|
|
22
|
-
const [baseThemeGradients] = useGlobalSetting(
|
|
23
|
-
"color.gradients.theme",
|
|
24
|
-
name,
|
|
25
|
-
"base"
|
|
26
|
-
);
|
|
27
|
-
const [defaultGradients, setDefaultGradients] = useGlobalSetting(
|
|
28
|
-
"color.gradients.default",
|
|
29
|
-
name
|
|
30
|
-
);
|
|
31
|
-
const [baseDefaultGradients] = useGlobalSetting(
|
|
32
|
-
"color.gradients.default",
|
|
33
|
-
name,
|
|
34
|
-
"base"
|
|
35
|
-
);
|
|
36
|
-
const [customGradients, setCustomGradients] = useGlobalSetting(
|
|
37
|
-
"color.gradients.custom",
|
|
38
|
-
name
|
|
39
|
-
);
|
|
40
|
-
const [defaultPaletteEnabled] = useGlobalSetting(
|
|
41
|
-
"color.defaultGradients",
|
|
42
|
-
name
|
|
43
|
-
);
|
|
44
|
-
const [customDuotone] = useGlobalSetting("color.duotone.custom") || [];
|
|
45
|
-
const [defaultDuotone] = useGlobalSetting("color.duotone.default") || [];
|
|
46
|
-
const [themeDuotone] = useGlobalSetting("color.duotone.theme") || [];
|
|
47
|
-
const [defaultDuotoneEnabled] = useGlobalSetting(
|
|
48
|
-
"color.defaultDuotone"
|
|
49
|
-
);
|
|
50
|
-
const duotonePalette = [
|
|
51
|
-
...customDuotone || [],
|
|
52
|
-
...themeDuotone || [],
|
|
53
|
-
...defaultDuotone && defaultDuotoneEnabled ? defaultDuotone : []
|
|
54
|
-
];
|
|
55
|
-
const isMobileViewport = useViewportMatch("small", "<");
|
|
56
|
-
const popoverProps = isMobileViewport ? mobilePopoverProps : void 0;
|
|
57
|
-
return /* @__PURE__ */ jsxs(
|
|
58
|
-
VStack,
|
|
59
|
-
{
|
|
60
|
-
className: "edit-site-global-styles-gradient-palette-panel",
|
|
61
|
-
spacing: 8,
|
|
62
|
-
children: [
|
|
63
|
-
!!themeGradients && !!themeGradients.length && /* @__PURE__ */ jsx(
|
|
64
|
-
PaletteEdit,
|
|
65
|
-
{
|
|
66
|
-
canReset: themeGradients !== baseThemeGradients,
|
|
67
|
-
canOnlyChangeValues: true,
|
|
68
|
-
gradients: themeGradients,
|
|
69
|
-
onChange: setThemeGradients,
|
|
70
|
-
paletteLabel: __("Theme"),
|
|
71
|
-
paletteLabelHeadingLevel: 3,
|
|
72
|
-
popoverProps
|
|
73
|
-
}
|
|
74
|
-
),
|
|
75
|
-
!!defaultGradients && !!defaultGradients.length && !!defaultPaletteEnabled && /* @__PURE__ */ jsx(
|
|
76
|
-
PaletteEdit,
|
|
77
|
-
{
|
|
78
|
-
canReset: defaultGradients !== baseDefaultGradients,
|
|
79
|
-
canOnlyChangeValues: true,
|
|
80
|
-
gradients: defaultGradients,
|
|
81
|
-
onChange: setDefaultGradients,
|
|
82
|
-
paletteLabel: __("Default"),
|
|
83
|
-
paletteLabelLevel: 3,
|
|
84
|
-
popoverProps
|
|
85
|
-
}
|
|
86
|
-
),
|
|
87
|
-
/* @__PURE__ */ jsx(
|
|
88
|
-
PaletteEdit,
|
|
89
|
-
{
|
|
90
|
-
gradients: customGradients,
|
|
91
|
-
onChange: setCustomGradients,
|
|
92
|
-
paletteLabel: __("Custom"),
|
|
93
|
-
paletteLabelLevel: 3,
|
|
94
|
-
slugPrefix: "custom-",
|
|
95
|
-
popoverProps
|
|
96
|
-
}
|
|
97
|
-
),
|
|
98
|
-
!!duotonePalette && !!duotonePalette.length && /* @__PURE__ */ jsxs("div", { children: [
|
|
99
|
-
/* @__PURE__ */ jsx(Subtitle, { level: 3, children: __("Duotone") }),
|
|
100
|
-
/* @__PURE__ */ jsx(Spacer, { margin: 3 }),
|
|
101
|
-
/* @__PURE__ */ jsx(
|
|
102
|
-
DuotonePicker,
|
|
103
|
-
{
|
|
104
|
-
duotonePalette,
|
|
105
|
-
disableCustomDuotone: true,
|
|
106
|
-
disableCustomColors: true,
|
|
107
|
-
clearable: false,
|
|
108
|
-
onChange: noop
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
] })
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
export {
|
|
117
|
-
GradientPalettePanel as default
|
|
118
|
-
};
|
|
119
|
-
//# sourceMappingURL=gradients-palette-panel.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/gradients-palette-panel.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalPaletteEdit as PaletteEdit,\n\t__experimentalSpacer as Spacer,\n\tDuotonePicker,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport Subtitle from './subtitle';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst mobilePopoverProps = { placement: 'bottom-start', offset: 8 };\n\nconst noop = () => {};\n\nexport default function GradientPalettePanel( { name } ) {\n\tconst [ themeGradients, setThemeGradients ] = useGlobalSetting(\n\t\t'color.gradients.theme',\n\t\tname\n\t);\n\tconst [ baseThemeGradients ] = useGlobalSetting(\n\t\t'color.gradients.theme',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ defaultGradients, setDefaultGradients ] = useGlobalSetting(\n\t\t'color.gradients.default',\n\t\tname\n\t);\n\tconst [ baseDefaultGradients ] = useGlobalSetting(\n\t\t'color.gradients.default',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ customGradients, setCustomGradients ] = useGlobalSetting(\n\t\t'color.gradients.custom',\n\t\tname\n\t);\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultGradients',\n\t\tname\n\t);\n\n\tconst [ customDuotone ] = useGlobalSetting( 'color.duotone.custom' ) || [];\n\tconst [ defaultDuotone ] =\n\t\tuseGlobalSetting( 'color.duotone.default' ) || [];\n\tconst [ themeDuotone ] = useGlobalSetting( 'color.duotone.theme' ) || [];\n\tconst [ defaultDuotoneEnabled ] = useGlobalSetting(\n\t\t'color.defaultDuotone'\n\t);\n\n\tconst duotonePalette = [\n\t\t...( customDuotone || [] ),\n\t\t...( themeDuotone || [] ),\n\t\t...( defaultDuotone && defaultDuotoneEnabled ? defaultDuotone : [] ),\n\t];\n\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst popoverProps = isMobileViewport ? mobilePopoverProps : undefined;\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-global-styles-gradient-palette-panel\"\n\t\t\tspacing={ 8 }\n\t\t>\n\t\t\t{ !! themeGradients && !! themeGradients.length && (\n\t\t\t\t<PaletteEdit\n\t\t\t\t\tcanReset={ themeGradients !== baseThemeGradients }\n\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\tgradients={ themeGradients }\n\t\t\t\t\tonChange={ setThemeGradients }\n\t\t\t\t\tpaletteLabel={ __( 'Theme' ) }\n\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ !! defaultGradients &&\n\t\t\t\t!! defaultGradients.length &&\n\t\t\t\t!! defaultPaletteEnabled && (\n\t\t\t\t\t<PaletteEdit\n\t\t\t\t\t\tcanReset={ defaultGradients !== baseDefaultGradients }\n\t\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\t\tgradients={ defaultGradients }\n\t\t\t\t\t\tonChange={ setDefaultGradients }\n\t\t\t\t\t\tpaletteLabel={ __( 'Default' ) }\n\t\t\t\t\t\tpaletteLabelLevel={ 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\tgradients={ customGradients }\n\t\t\t\tonChange={ setCustomGradients }\n\t\t\t\tpaletteLabel={ __( 'Custom' ) }\n\t\t\t\tpaletteLabelLevel={ 3 }\n\t\t\t\tslugPrefix=\"custom-\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t/>\n\t\t\t{ !! duotonePalette && !! duotonePalette.length && (\n\t\t\t\t<div>\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Duotone' ) }</Subtitle>\n\t\t\t\t\t<Spacer margin={ 3 } />\n\t\t\t\t\t<DuotonePicker\n\t\t\t\t\t\tduotonePalette={ duotonePalette }\n\t\t\t\t\t\tdisableCustomDuotone\n\t\t\t\t\t\tdisableCustomColors\n\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\tonChange={ noop }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n"],
|
|
5
|
-
"mappings": "AA4EI,cAgCA,YAhCA;AAzEJ,SAAS,wBAAwB;AACjC;AAAA,EACC,wBAAwB;AAAA,EACxB,6BAA6B;AAAA,EAC7B,wBAAwB;AAAA,EACxB;AAAA,OACM;AACP,SAAS,UAAU;AACnB,SAAS,eAAe,8BAA8B;AAKtD,OAAO,cAAc;AACrB,SAAS,cAAc;AAEvB,MAAM,EAAE,iBAAiB,IAAI,OAAQ,sBAAuB;AAC5D,MAAM,qBAAqB,EAAE,WAAW,gBAAgB,QAAQ,EAAE;AAElE,MAAM,OAAO,MAAM;AAAC;AAEL,SAAR,qBAAuC,EAAE,KAAK,GAAI;AACxD,QAAM,CAAE,gBAAgB,iBAAkB,IAAI;AAAA,IAC7C;AAAA,IACA;AAAA,EACD;AACA,QAAM,CAAE,kBAAmB,IAAI;AAAA,IAC9B;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACA,QAAM,CAAE,kBAAkB,mBAAoB,IAAI;AAAA,IACjD;AAAA,IACA;AAAA,EACD;AACA,QAAM,CAAE,oBAAqB,IAAI;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACA,QAAM,CAAE,iBAAiB,kBAAmB,IAAI;AAAA,IAC/C;AAAA,IACA;AAAA,EACD;AAEA,QAAM,CAAE,qBAAsB,IAAI;AAAA,IACjC;AAAA,IACA;AAAA,EACD;AAEA,QAAM,CAAE,aAAc,IAAI,iBAAkB,sBAAuB,KAAK,CAAC;AACzE,QAAM,CAAE,cAAe,IACtB,iBAAkB,uBAAwB,KAAK,CAAC;AACjD,QAAM,CAAE,YAAa,IAAI,iBAAkB,qBAAsB,KAAK,CAAC;AACvE,QAAM,CAAE,qBAAsB,IAAI;AAAA,IACjC;AAAA,EACD;AAEA,QAAM,iBAAiB;AAAA,IACtB,GAAK,iBAAiB,CAAC;AAAA,IACvB,GAAK,gBAAgB,CAAC;AAAA,IACtB,GAAK,kBAAkB,wBAAwB,iBAAiB,CAAC;AAAA,EAClE;AAEA,QAAM,mBAAmB,iBAAkB,SAAS,GAAI;AACxD,QAAM,eAAe,mBAAmB,qBAAqB;AAE7D,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,SAAU;AAAA,MAER;AAAA,SAAC,CAAE,kBAAkB,CAAC,CAAE,eAAe,UACxC;AAAA,UAAC;AAAA;AAAA,YACA,UAAW,mBAAmB;AAAA,YAC9B,qBAAmB;AAAA,YACnB,WAAY;AAAA,YACZ,UAAW;AAAA,YACX,cAAe,GAAI,OAAQ;AAAA,YAC3B,0BAA2B;AAAA,YAC3B;AAAA;AAAA,QACD;AAAA,QAEC,CAAC,CAAE,oBACJ,CAAC,CAAE,iBAAiB,UACpB,CAAC,CAAE,yBACF;AAAA,UAAC;AAAA;AAAA,YACA,UAAW,qBAAqB;AAAA,YAChC,qBAAmB;AAAA,YACnB,WAAY;AAAA,YACZ,UAAW;AAAA,YACX,cAAe,GAAI,SAAU;AAAA,YAC7B,mBAAoB;AAAA,YACpB;AAAA;AAAA,QACD;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACA,WAAY;AAAA,YACZ,UAAW;AAAA,YACX,cAAe,GAAI,QAAS;AAAA,YAC5B,mBAAoB;AAAA,YACpB,YAAW;AAAA,YACX;AAAA;AAAA,QACD;AAAA,QACE,CAAC,CAAE,kBAAkB,CAAC,CAAE,eAAe,UACxC,qBAAC,SACA;AAAA,8BAAC,YAAS,OAAQ,GAAM,aAAI,SAAU,GAAG;AAAA,UACzC,oBAAC,UAAO,QAAS,GAAI;AAAA,UACrB;AAAA,YAAC;AAAA;AAAA,cACA;AAAA,cACA,sBAAoB;AAAA,cACpB,qBAAmB;AAAA,cACnB,WAAY;AAAA,cACZ,UAAW;AAAA;AAAA,UACZ;AAAA,WACD;AAAA;AAAA;AAAA,EAEF;AAEF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
__experimentalHStack as HStack,
|
|
4
|
-
__experimentalVStack as VStack,
|
|
5
|
-
__experimentalSpacer as Spacer,
|
|
6
|
-
__experimentalHeading as Heading,
|
|
7
|
-
__experimentalView as View,
|
|
8
|
-
Navigator
|
|
9
|
-
} from "@wordpress/components";
|
|
10
|
-
import { isRTL, __ } from "@wordpress/i18n";
|
|
11
|
-
import { chevronRight, chevronLeft } from "@wordpress/icons";
|
|
12
|
-
function ScreenHeader({ title, description, onBack }) {
|
|
13
|
-
return /* @__PURE__ */ jsxs(VStack, { spacing: 0, children: [
|
|
14
|
-
/* @__PURE__ */ jsx(View, { children: /* @__PURE__ */ jsx(Spacer, { marginBottom: 0, paddingX: 4, paddingY: 3, children: /* @__PURE__ */ jsxs(HStack, { spacing: 2, children: [
|
|
15
|
-
/* @__PURE__ */ jsx(
|
|
16
|
-
Navigator.BackButton,
|
|
17
|
-
{
|
|
18
|
-
icon: isRTL() ? chevronRight : chevronLeft,
|
|
19
|
-
size: "small",
|
|
20
|
-
label: __("Back"),
|
|
21
|
-
onClick: onBack
|
|
22
|
-
}
|
|
23
|
-
),
|
|
24
|
-
/* @__PURE__ */ jsx(Spacer, { children: /* @__PURE__ */ jsx(
|
|
25
|
-
Heading,
|
|
26
|
-
{
|
|
27
|
-
className: "edit-site-global-styles-header",
|
|
28
|
-
level: 2,
|
|
29
|
-
size: 13,
|
|
30
|
-
children: title
|
|
31
|
-
}
|
|
32
|
-
) })
|
|
33
|
-
] }) }) }),
|
|
34
|
-
description && /* @__PURE__ */ jsx("p", { className: "edit-site-global-styles-header__description", children: description })
|
|
35
|
-
] });
|
|
36
|
-
}
|
|
37
|
-
var header_default = ScreenHeader;
|
|
38
|
-
export {
|
|
39
|
-
header_default as default
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=header.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/header.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalHeading as Heading,\n\t__experimentalView as View,\n\tNavigator,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\n\nfunction ScreenHeader( { title, description, onBack } ) {\n\treturn (\n\t\t<VStack spacing={ 0 }>\n\t\t\t<View>\n\t\t\t\t<Spacer marginBottom={ 0 } paddingX={ 4 } paddingY={ 3 }>\n\t\t\t\t\t<HStack spacing={ 2 }>\n\t\t\t\t\t\t<Navigator.BackButton\n\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\tonClick={ onBack }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Spacer>\n\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-header\"\n\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t</HStack>\n\t\t\t\t</Spacer>\n\t\t\t</View>\n\t\t\t{ description && (\n\t\t\t\t<p className=\"edit-site-global-styles-header__description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default ScreenHeader;\n"],
|
|
5
|
-
"mappings": "AAmBK,SACC,KADD;AAhBL;AAAA,EACC,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,sBAAsB;AAAA,EACtB;AAAA,OACM;AACP,SAAS,OAAO,UAAU;AAC1B,SAAS,cAAc,mBAAmB;AAE1C,SAAS,aAAc,EAAE,OAAO,aAAa,OAAO,GAAI;AACvD,SACC,qBAAC,UAAO,SAAU,GACjB;AAAA,wBAAC,QACA,8BAAC,UAAO,cAAe,GAAI,UAAW,GAAI,UAAW,GACpD,+BAAC,UAAO,SAAU,GACjB;AAAA;AAAA,QAAC,UAAU;AAAA,QAAV;AAAA,UACA,MAAO,MAAM,IAAI,eAAe;AAAA,UAChC,MAAK;AAAA,UACL,OAAQ,GAAI,MAAO;AAAA,UACnB,SAAU;AAAA;AAAA,MACX;AAAA,MACA,oBAAC,UACA;AAAA,QAAC;AAAA;AAAA,UACA,WAAU;AAAA,UACV,OAAQ;AAAA,UACR,MAAO;AAAA,UAEL;AAAA;AAAA,MACH,GACD;AAAA,OACD,GACD,GACD;AAAA,IACE,eACD,oBAAC,OAAE,WAAU,+CACV,uBACH;AAAA,KAEF;AAEF;AAEA,IAAO,iBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { __unstableMotion as motion } from "@wordpress/components";
|
|
3
|
-
import { useStylesPreviewColors } from "./hooks";
|
|
4
|
-
function HighlightedColors({
|
|
5
|
-
normalizedColorSwatchSize,
|
|
6
|
-
ratio
|
|
7
|
-
}) {
|
|
8
|
-
const { highlightedColors } = useStylesPreviewColors();
|
|
9
|
-
const scaledSwatchSize = normalizedColorSwatchSize * ratio;
|
|
10
|
-
return highlightedColors.map(({ slug, color }, index) => /* @__PURE__ */ jsx(
|
|
11
|
-
motion.div,
|
|
12
|
-
{
|
|
13
|
-
style: {
|
|
14
|
-
height: scaledSwatchSize,
|
|
15
|
-
width: scaledSwatchSize,
|
|
16
|
-
background: color,
|
|
17
|
-
borderRadius: scaledSwatchSize / 2
|
|
18
|
-
},
|
|
19
|
-
animate: {
|
|
20
|
-
scale: 1,
|
|
21
|
-
opacity: 1
|
|
22
|
-
},
|
|
23
|
-
initial: {
|
|
24
|
-
scale: 0.1,
|
|
25
|
-
opacity: 0
|
|
26
|
-
},
|
|
27
|
-
transition: {
|
|
28
|
-
delay: index === 1 ? 0.2 : 0.1
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
`${slug}-${index}`
|
|
32
|
-
));
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
HighlightedColors as default
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=highlighted-colors.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/highlighted-colors.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useStylesPreviewColors } from './hooks';\n\nexport default function HighlightedColors( {\n\tnormalizedColorSwatchSize,\n\tratio,\n} ) {\n\tconst { highlightedColors } = useStylesPreviewColors();\n\tconst scaledSwatchSize = normalizedColorSwatchSize * ratio;\n\treturn highlightedColors.map( ( { slug, color }, index ) => (\n\t\t<motion.div\n\t\t\tkey={ `${ slug }-${ index }` }\n\t\t\tstyle={ {\n\t\t\t\theight: scaledSwatchSize,\n\t\t\t\twidth: scaledSwatchSize,\n\t\t\t\tbackground: color,\n\t\t\t\tborderRadius: scaledSwatchSize / 2,\n\t\t\t} }\n\t\t\tanimate={ {\n\t\t\t\tscale: 1,\n\t\t\t\topacity: 1,\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tscale: 0.1,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\ttransition={ {\n\t\t\t\tdelay: index === 1 ? 0.2 : 0.1,\n\t\t\t} }\n\t\t/>\n\t) );\n}\n"],
|
|
5
|
-
"mappings": "AAiBE;AAdF,SAAS,oBAAoB,cAAc;AAK3C,SAAS,8BAA8B;AAExB,SAAR,kBAAoC;AAAA,EAC1C;AAAA,EACA;AACD,GAAI;AACH,QAAM,EAAE,kBAAkB,IAAI,uBAAuB;AACrD,QAAM,mBAAmB,4BAA4B;AACrD,SAAO,kBAAkB,IAAK,CAAE,EAAE,MAAM,MAAM,GAAG,UAChD;AAAA,IAAC,OAAO;AAAA,IAAP;AAAA,MAEA,OAAQ;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,YAAY;AAAA,QACZ,cAAc,mBAAmB;AAAA,MAClC;AAAA,MACA,SAAU;AAAA,QACT,OAAO;AAAA,QACP,SAAS;AAAA,MACV;AAAA,MACA,SAAU;AAAA,QACT,OAAO;AAAA,QACP,SAAS;AAAA,MACV;AAAA,MACA,YAAa;AAAA,QACZ,OAAO,UAAU,IAAI,MAAM;AAAA,MAC5B;AAAA;AAAA,IAjBM,GAAI,IAAK,IAAK,KAAM;AAAA,EAkB3B,CACC;AACH;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { colord, extend } from "colord";
|
|
2
|
-
import a11yPlugin from "colord/plugins/a11y";
|
|
3
|
-
import { store as blocksStore } from "@wordpress/blocks";
|
|
4
|
-
import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
|
|
5
|
-
import { unlock } from "../../lock-unlock";
|
|
6
|
-
import { useSelect } from "@wordpress/data";
|
|
7
|
-
const { useGlobalSetting, useGlobalStyle } = unlock(blockEditorPrivateApis);
|
|
8
|
-
extend([a11yPlugin]);
|
|
9
|
-
function useColorRandomizer(name) {
|
|
10
|
-
const [themeColors, setThemeColors] = useGlobalSetting(
|
|
11
|
-
"color.palette.theme",
|
|
12
|
-
name
|
|
13
|
-
);
|
|
14
|
-
function randomizeColors() {
|
|
15
|
-
const randomRotationValue = Math.floor(Math.random() * 225);
|
|
16
|
-
const newColors = themeColors.map((colorObject) => {
|
|
17
|
-
const { color } = colorObject;
|
|
18
|
-
const newColor = colord(color).rotate(randomRotationValue).toHex();
|
|
19
|
-
return {
|
|
20
|
-
...colorObject,
|
|
21
|
-
color: newColor
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
setThemeColors(newColors);
|
|
25
|
-
}
|
|
26
|
-
return window.__experimentalEnableColorRandomizer ? [randomizeColors] : [];
|
|
27
|
-
}
|
|
28
|
-
function useStylesPreviewColors() {
|
|
29
|
-
const [textColor = "black"] = useGlobalStyle("color.text");
|
|
30
|
-
const [backgroundColor = "white"] = useGlobalStyle("color.background");
|
|
31
|
-
const [headingColor = textColor] = useGlobalStyle(
|
|
32
|
-
"elements.h1.color.text"
|
|
33
|
-
);
|
|
34
|
-
const [linkColor = headingColor] = useGlobalStyle(
|
|
35
|
-
"elements.link.color.text"
|
|
36
|
-
);
|
|
37
|
-
const [buttonBackgroundColor = linkColor] = useGlobalStyle(
|
|
38
|
-
"elements.button.color.background"
|
|
39
|
-
);
|
|
40
|
-
const [coreColors] = useGlobalSetting("color.palette.core");
|
|
41
|
-
const [themeColors] = useGlobalSetting("color.palette.theme");
|
|
42
|
-
const [customColors] = useGlobalSetting("color.palette.custom");
|
|
43
|
-
const paletteColors = (themeColors ?? []).concat(customColors ?? []).concat(coreColors ?? []);
|
|
44
|
-
const textColorObject = paletteColors.filter(
|
|
45
|
-
({ color }) => color === textColor
|
|
46
|
-
);
|
|
47
|
-
const buttonBackgroundColorObject = paletteColors.filter(
|
|
48
|
-
({ color }) => color === buttonBackgroundColor
|
|
49
|
-
);
|
|
50
|
-
const highlightedColors = textColorObject.concat(buttonBackgroundColorObject).concat(paletteColors).filter(
|
|
51
|
-
// we exclude these background color because it is already visible in the preview.
|
|
52
|
-
({ color }) => color !== backgroundColor
|
|
53
|
-
).slice(0, 2);
|
|
54
|
-
return {
|
|
55
|
-
paletteColors,
|
|
56
|
-
highlightedColors
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function useSupportedStyles(name, element) {
|
|
60
|
-
const { supportedPanels } = useSelect(
|
|
61
|
-
(select) => {
|
|
62
|
-
return {
|
|
63
|
-
supportedPanels: unlock(
|
|
64
|
-
select(blocksStore)
|
|
65
|
-
).getSupportedStyles(name, element)
|
|
66
|
-
};
|
|
67
|
-
},
|
|
68
|
-
[name, element]
|
|
69
|
-
);
|
|
70
|
-
return supportedPanels;
|
|
71
|
-
}
|
|
72
|
-
export {
|
|
73
|
-
useColorRandomizer,
|
|
74
|
-
useStylesPreviewColors,
|
|
75
|
-
useSupportedStyles
|
|
76
|
-
};
|
|
77
|
-
//# sourceMappingURL=hooks.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/hooks.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useSelect } from '@wordpress/data';\n\nconst { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );\n\n// Enable colord's a11y plugin.\nextend( [ a11yPlugin ] );\n\nexport function useColorRandomizer( name ) {\n\tconst [ themeColors, setThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname\n\t);\n\n\tfunction randomizeColors() {\n\t\t/* eslint-disable no-restricted-syntax */\n\t\tconst randomRotationValue = Math.floor( Math.random() * 225 );\n\t\t/* eslint-enable no-restricted-syntax */\n\n\t\tconst newColors = themeColors.map( ( colorObject ) => {\n\t\t\tconst { color } = colorObject;\n\t\t\tconst newColor = colord( color )\n\t\t\t\t.rotate( randomRotationValue )\n\t\t\t\t.toHex();\n\n\t\t\treturn {\n\t\t\t\t...colorObject,\n\t\t\t\tcolor: newColor,\n\t\t\t};\n\t\t} );\n\n\t\tsetThemeColors( newColors );\n\t}\n\n\treturn window.__experimentalEnableColorRandomizer\n\t\t? [ randomizeColors ]\n\t\t: [];\n}\n\nexport function useStylesPreviewColors() {\n\tconst [ textColor = 'black' ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor = 'white' ] = useGlobalStyle( 'color.background' );\n\tconst [ headingColor = textColor ] = useGlobalStyle(\n\t\t'elements.h1.color.text'\n\t);\n\tconst [ linkColor = headingColor ] = useGlobalStyle(\n\t\t'elements.link.color.text'\n\t);\n\n\tconst [ buttonBackgroundColor = linkColor ] = useGlobalStyle(\n\t\t'elements.button.color.background'\n\t);\n\tconst [ coreColors ] = useGlobalSetting( 'color.palette.core' );\n\tconst [ themeColors ] = useGlobalSetting( 'color.palette.theme' );\n\tconst [ customColors ] = useGlobalSetting( 'color.palette.custom' );\n\n\tconst paletteColors = ( themeColors ?? [] )\n\t\t.concat( customColors ?? [] )\n\t\t.concat( coreColors ?? [] );\n\n\tconst textColorObject = paletteColors.filter(\n\t\t( { color } ) => color === textColor\n\t);\n\tconst buttonBackgroundColorObject = paletteColors.filter(\n\t\t( { color } ) => color === buttonBackgroundColor\n\t);\n\n\tconst highlightedColors = textColorObject\n\t\t.concat( buttonBackgroundColorObject )\n\t\t.concat( paletteColors )\n\t\t.filter(\n\t\t\t// we exclude these background color because it is already visible in the preview.\n\t\t\t( { color } ) => color !== backgroundColor\n\t\t)\n\t\t.slice( 0, 2 );\n\n\treturn {\n\t\tpaletteColors,\n\t\thighlightedColors,\n\t};\n}\n\nexport function useSupportedStyles( name, element ) {\n\tconst { supportedPanels } = useSelect(\n\t\t( select ) => {\n\t\t\treturn {\n\t\t\t\tsupportedPanels: unlock(\n\t\t\t\t\tselect( blocksStore )\n\t\t\t\t).getSupportedStyles( name, element ),\n\t\t\t};\n\t\t},\n\t\t[ name, element ]\n\t);\n\n\treturn supportedPanels;\n}\n"],
|
|
5
|
-
"mappings": "AAGA,SAAS,QAAQ,cAAc;AAC/B,OAAO,gBAAgB;AAKvB,SAAS,SAAS,mBAAmB;AACrC,SAAS,eAAe,8BAA8B;AAKtD,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAE1B,MAAM,EAAE,kBAAkB,eAAe,IAAI,OAAQ,sBAAuB;AAG5E,OAAQ,CAAE,UAAW,CAAE;AAEhB,SAAS,mBAAoB,MAAO;AAC1C,QAAM,CAAE,aAAa,cAAe,IAAI;AAAA,IACvC;AAAA,IACA;AAAA,EACD;AAEA,WAAS,kBAAkB;AAE1B,UAAM,sBAAsB,KAAK,MAAO,KAAK,OAAO,IAAI,GAAI;AAG5D,UAAM,YAAY,YAAY,IAAK,CAAE,gBAAiB;AACrD,YAAM,EAAE,MAAM,IAAI;AAClB,YAAM,WAAW,OAAQ,KAAM,EAC7B,OAAQ,mBAAoB,EAC5B,MAAM;AAER,aAAO;AAAA,QACN,GAAG;AAAA,QACH,OAAO;AAAA,MACR;AAAA,IACD,CAAE;AAEF,mBAAgB,SAAU;AAAA,EAC3B;AAEA,SAAO,OAAO,sCACX,CAAE,eAAgB,IAClB,CAAC;AACL;AAEO,SAAS,yBAAyB;AACxC,QAAM,CAAE,YAAY,OAAQ,IAAI,eAAgB,YAAa;AAC7D,QAAM,CAAE,kBAAkB,OAAQ,IAAI,eAAgB,kBAAmB;AACzE,QAAM,CAAE,eAAe,SAAU,IAAI;AAAA,IACpC;AAAA,EACD;AACA,QAAM,CAAE,YAAY,YAAa,IAAI;AAAA,IACpC;AAAA,EACD;AAEA,QAAM,CAAE,wBAAwB,SAAU,IAAI;AAAA,IAC7C;AAAA,EACD;AACA,QAAM,CAAE,UAAW,IAAI,iBAAkB,oBAAqB;AAC9D,QAAM,CAAE,WAAY,IAAI,iBAAkB,qBAAsB;AAChE,QAAM,CAAE,YAAa,IAAI,iBAAkB,sBAAuB;AAElE,QAAM,iBAAkB,eAAe,CAAC,GACtC,OAAQ,gBAAgB,CAAC,CAAE,EAC3B,OAAQ,cAAc,CAAC,CAAE;AAE3B,QAAM,kBAAkB,cAAc;AAAA,IACrC,CAAE,EAAE,MAAM,MAAO,UAAU;AAAA,EAC5B;AACA,QAAM,8BAA8B,cAAc;AAAA,IACjD,CAAE,EAAE,MAAM,MAAO,UAAU;AAAA,EAC5B;AAEA,QAAM,oBAAoB,gBACxB,OAAQ,2BAA4B,EACpC,OAAQ,aAAc,EACtB;AAAA;AAAA,IAEA,CAAE,EAAE,MAAM,MAAO,UAAU;AAAA,EAC5B,EACC,MAAO,GAAG,CAAE;AAEd,SAAO;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;AAEO,SAAS,mBAAoB,MAAM,SAAU;AACnD,QAAM,EAAE,gBAAgB,IAAI;AAAA,IAC3B,CAAE,WAAY;AACb,aAAO;AAAA,QACN,iBAAiB;AAAA,UAChB,OAAQ,WAAY;AAAA,QACrB,EAAE,mBAAoB,MAAM,OAAQ;AAAA,MACrC;AAAA,IACD;AAAA,IACA,CAAE,MAAM,OAAQ;AAAA,EACjB;AAEA,SAAO;AACR;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import { Icon } from "@wordpress/components";
|
|
4
|
-
function IconWithCurrentColor({ className, ...props }) {
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
-
Icon,
|
|
7
|
-
{
|
|
8
|
-
className: clsx(
|
|
9
|
-
className,
|
|
10
|
-
"edit-site-global-styles-icon-with-current-color"
|
|
11
|
-
),
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
IconWithCurrentColor
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=icon-with-current-color.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/icon-with-current-color.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\n\nexport function IconWithCurrentColor( { className, ...props } ) {\n\treturn (\n\t\t<Icon\n\t\t\tclassName={ clsx(\n\t\t\t\tclassName,\n\t\t\t\t'edit-site-global-styles-icon-with-current-color'\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],
|
|
5
|
-
"mappings": "AAYE;AATF,OAAO,UAAU;AAKjB,SAAS,YAAY;AAEd,SAAS,qBAAsB,EAAE,WAAW,GAAG,MAAM,GAAI;AAC/D,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAY;AAAA,QACX;AAAA,QACA;AAAA,MACD;AAAA,MACE,GAAG;AAAA;AAAA,EACN;AAEF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
Navigator,
|
|
4
|
-
__experimentalItem as Item,
|
|
5
|
-
FlexItem,
|
|
6
|
-
__experimentalHStack as HStack
|
|
7
|
-
} from "@wordpress/components";
|
|
8
|
-
import { IconWithCurrentColor } from "./icon-with-current-color";
|
|
9
|
-
function GenericNavigationButton({ icon, children, ...props }) {
|
|
10
|
-
return /* @__PURE__ */ jsxs(Item, { ...props, children: [
|
|
11
|
-
icon && /* @__PURE__ */ jsxs(HStack, { justify: "flex-start", children: [
|
|
12
|
-
/* @__PURE__ */ jsx(IconWithCurrentColor, { icon, size: 24 }),
|
|
13
|
-
/* @__PURE__ */ jsx(FlexItem, { children })
|
|
14
|
-
] }),
|
|
15
|
-
!icon && children
|
|
16
|
-
] });
|
|
17
|
-
}
|
|
18
|
-
function NavigationButtonAsItem(props) {
|
|
19
|
-
return /* @__PURE__ */ jsx(Navigator.Button, { as: GenericNavigationButton, ...props });
|
|
20
|
-
}
|
|
21
|
-
function NavigationBackButtonAsItem(props) {
|
|
22
|
-
return /* @__PURE__ */ jsx(Navigator.BackButton, { as: GenericNavigationButton, ...props });
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
NavigationBackButtonAsItem,
|
|
26
|
-
NavigationButtonAsItem
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=navigation-button.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/navigation-button.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tNavigator,\n\t__experimentalItem as Item,\n\tFlexItem,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\n\nfunction GenericNavigationButton( { icon, children, ...props } ) {\n\treturn (\n\t\t<Item { ...props }>\n\t\t\t{ icon && (\n\t\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t\t<IconWithCurrentColor icon={ icon } size={ 24 } />\n\t\t\t\t\t<FlexItem>{ children }</FlexItem>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t\t{ ! icon && children }\n\t\t</Item>\n\t);\n}\n\nfunction NavigationButtonAsItem( props ) {\n\treturn <Navigator.Button as={ GenericNavigationButton } { ...props } />;\n}\n\nfunction NavigationBackButtonAsItem( props ) {\n\treturn <Navigator.BackButton as={ GenericNavigationButton } { ...props } />;\n}\n\nexport { NavigationButtonAsItem, NavigationBackButtonAsItem };\n"],
|
|
5
|
-
"mappings": "AAmBI,SACC,KADD;AAhBJ;AAAA,EACC;AAAA,EACA,sBAAsB;AAAA,EACtB;AAAA,EACA,wBAAwB;AAAA,OAClB;AAKP,SAAS,4BAA4B;AAErC,SAAS,wBAAyB,EAAE,MAAM,UAAU,GAAG,MAAM,GAAI;AAChE,SACC,qBAAC,QAAO,GAAG,OACR;AAAA,YACD,qBAAC,UAAO,SAAQ,cACf;AAAA,0BAAC,wBAAqB,MAAc,MAAO,IAAK;AAAA,MAChD,oBAAC,YAAW,UAAU;AAAA,OACvB;AAAA,IAEC,CAAE,QAAQ;AAAA,KACb;AAEF;AAEA,SAAS,uBAAwB,OAAQ;AACxC,SAAO,oBAAC,UAAU,QAAV,EAAiB,IAAK,yBAA4B,GAAG,OAAQ;AACtE;AAEA,SAAS,2BAA4B,OAAQ;AAC5C,SAAO,oBAAC,UAAU,YAAV,EAAqB,IAAK,yBAA4B,GAAG,OAAQ;AAC1E;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
__experimentalItemGroup as ItemGroup,
|
|
4
|
-
FlexItem,
|
|
5
|
-
__experimentalHStack as HStack,
|
|
6
|
-
__experimentalZStack as ZStack,
|
|
7
|
-
__experimentalVStack as VStack,
|
|
8
|
-
ColorIndicator
|
|
9
|
-
} from "@wordpress/components";
|
|
10
|
-
import { isRTL, __ } from "@wordpress/i18n";
|
|
11
|
-
import { Icon, chevronLeft, chevronRight } from "@wordpress/icons";
|
|
12
|
-
import { useMemo } from "@wordpress/element";
|
|
13
|
-
import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
|
|
14
|
-
import Subtitle from "./subtitle";
|
|
15
|
-
import { NavigationButtonAsItem } from "./navigation-button";
|
|
16
|
-
import ColorIndicatorWrapper from "./color-indicator-wrapper";
|
|
17
|
-
import { unlock } from "../../lock-unlock";
|
|
18
|
-
const { useGlobalSetting } = unlock(blockEditorPrivateApis);
|
|
19
|
-
const EMPTY_COLORS = [];
|
|
20
|
-
function Palette({ name }) {
|
|
21
|
-
const [customColors] = useGlobalSetting("color.palette.custom");
|
|
22
|
-
const [themeColors] = useGlobalSetting("color.palette.theme");
|
|
23
|
-
const [defaultColors] = useGlobalSetting("color.palette.default");
|
|
24
|
-
const [defaultPaletteEnabled] = useGlobalSetting(
|
|
25
|
-
"color.defaultPalette",
|
|
26
|
-
name
|
|
27
|
-
);
|
|
28
|
-
const colors = useMemo(
|
|
29
|
-
() => [
|
|
30
|
-
...customColors || EMPTY_COLORS,
|
|
31
|
-
...themeColors || EMPTY_COLORS,
|
|
32
|
-
...defaultColors && defaultPaletteEnabled ? defaultColors : EMPTY_COLORS
|
|
33
|
-
],
|
|
34
|
-
[customColors, themeColors, defaultColors, defaultPaletteEnabled]
|
|
35
|
-
);
|
|
36
|
-
const screenPath = !name ? "/colors/palette" : "/blocks/" + encodeURIComponent(name) + "/colors/palette";
|
|
37
|
-
return /* @__PURE__ */ jsxs(VStack, { spacing: 3, children: [
|
|
38
|
-
/* @__PURE__ */ jsx(Subtitle, { level: 3, children: __("Palette") }),
|
|
39
|
-
/* @__PURE__ */ jsx(ItemGroup, { isBordered: true, isSeparated: true, children: /* @__PURE__ */ jsx(NavigationButtonAsItem, { path: screenPath, children: /* @__PURE__ */ jsxs(HStack, { direction: "row", children: [
|
|
40
|
-
colors.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
41
|
-
/* @__PURE__ */ jsx(ZStack, { isLayered: false, offset: -8, children: colors.slice(0, 5).map(({ color }, index) => /* @__PURE__ */ jsx(
|
|
42
|
-
ColorIndicatorWrapper,
|
|
43
|
-
{
|
|
44
|
-
children: /* @__PURE__ */ jsx(
|
|
45
|
-
ColorIndicator,
|
|
46
|
-
{
|
|
47
|
-
colorValue: color
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
},
|
|
51
|
-
`${color}-${index}`
|
|
52
|
-
)) }),
|
|
53
|
-
/* @__PURE__ */ jsx(FlexItem, { isBlock: true, children: __("Edit palette") })
|
|
54
|
-
] }) : /* @__PURE__ */ jsx(FlexItem, { children: __("Add colors") }),
|
|
55
|
-
/* @__PURE__ */ jsx(Icon, { icon: isRTL() ? chevronLeft : chevronRight })
|
|
56
|
-
] }) }) })
|
|
57
|
-
] });
|
|
58
|
-
}
|
|
59
|
-
var palette_default = Palette;
|
|
60
|
-
export {
|
|
61
|
-
palette_default as default
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=palette.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/palette.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\tFlexItem,\n\t__experimentalHStack as HStack,\n\t__experimentalZStack as ZStack,\n\t__experimentalVStack as VStack,\n\tColorIndicator,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport Subtitle from './subtitle';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport ColorIndicatorWrapper from './color-indicator-wrapper';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\n\nconst EMPTY_COLORS = [];\n\nfunction Palette( { name } ) {\n\tconst [ customColors ] = useGlobalSetting( 'color.palette.custom' );\n\tconst [ themeColors ] = useGlobalSetting( 'color.palette.theme' );\n\tconst [ defaultColors ] = useGlobalSetting( 'color.palette.default' );\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultPalette',\n\t\tname\n\t);\n\n\tconst colors = useMemo(\n\t\t() => [\n\t\t\t...( customColors || EMPTY_COLORS ),\n\t\t\t...( themeColors || EMPTY_COLORS ),\n\t\t\t...( defaultColors && defaultPaletteEnabled\n\t\t\t\t? defaultColors\n\t\t\t\t: EMPTY_COLORS ),\n\t\t],\n\t\t[ customColors, themeColors, defaultColors, defaultPaletteEnabled ]\n\t);\n\n\tconst screenPath = ! name\n\t\t? '/colors/palette'\n\t\t: '/blocks/' + encodeURIComponent( name ) + '/colors/palette';\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Palette' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<NavigationButtonAsItem path={ screenPath }>\n\t\t\t\t\t<HStack direction=\"row\">\n\t\t\t\t\t\t{ colors.length > 0 ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ZStack isLayered={ false } offset={ -8 }>\n\t\t\t\t\t\t\t\t\t{ colors\n\t\t\t\t\t\t\t\t\t\t.slice( 0, 5 )\n\t\t\t\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t\t\t\t<ColorIndicatorWrapper\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ `${ color }-${ index }` }\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<ColorIndicator\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolorValue={ color }\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</ColorIndicatorWrapper>\n\t\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t</ZStack>\n\t\t\t\t\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t\t\t\t\t{ __( 'Edit palette' ) }\n\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Add colors' ) }</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Icon icon={ isRTL() ? chevronLeft : chevronRight } />\n\t\t\t\t\t</HStack>\n\t\t\t\t</NavigationButtonAsItem>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default Palette;\n"],
|
|
5
|
-
"mappings": "AAuDG,SAKI,UALJ,KAKI,YALJ;AApDH;AAAA,EACC,2BAA2B;AAAA,EAC3B;AAAA,EACA,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB;AAAA,OACM;AACP,SAAS,OAAO,UAAU;AAC1B,SAAS,MAAM,aAAa,oBAAoB;AAChD,SAAS,eAAe;AACxB,SAAS,eAAe,8BAA8B;AAKtD,OAAO,cAAc;AACrB,SAAS,8BAA8B;AACvC,OAAO,2BAA2B;AAClC,SAAS,cAAc;AAEvB,MAAM,EAAE,iBAAiB,IAAI,OAAQ,sBAAuB;AAE5D,MAAM,eAAe,CAAC;AAEtB,SAAS,QAAS,EAAE,KAAK,GAAI;AAC5B,QAAM,CAAE,YAAa,IAAI,iBAAkB,sBAAuB;AAClE,QAAM,CAAE,WAAY,IAAI,iBAAkB,qBAAsB;AAChE,QAAM,CAAE,aAAc,IAAI,iBAAkB,uBAAwB;AAEpE,QAAM,CAAE,qBAAsB,IAAI;AAAA,IACjC;AAAA,IACA;AAAA,EACD;AAEA,QAAM,SAAS;AAAA,IACd,MAAM;AAAA,MACL,GAAK,gBAAgB;AAAA,MACrB,GAAK,eAAe;AAAA,MACpB,GAAK,iBAAiB,wBACnB,gBACA;AAAA,IACJ;AAAA,IACA,CAAE,cAAc,aAAa,eAAe,qBAAsB;AAAA,EACnE;AAEA,QAAM,aAAa,CAAE,OAClB,oBACA,aAAa,mBAAoB,IAAK,IAAI;AAE7C,SACC,qBAAC,UAAO,SAAU,GACjB;AAAA,wBAAC,YAAS,OAAQ,GAAM,aAAI,SAAU,GAAG;AAAA,IACzC,oBAAC,aAAU,YAAU,MAAC,aAAW,MAChC,8BAAC,0BAAuB,MAAO,YAC9B,+BAAC,UAAO,WAAU,OACf;AAAA,aAAO,SAAS,IACjB,iCACC;AAAA,4BAAC,UAAO,WAAY,OAAQ,QAAS,IAClC,iBACA,MAAO,GAAG,CAAE,EACZ,IAAK,CAAE,EAAE,MAAM,GAAG,UAClB;AAAA,UAAC;AAAA;AAAA,YAGA;AAAA,cAAC;AAAA;AAAA,gBACA,YAAa;AAAA;AAAA,YACd;AAAA;AAAA,UAJM,GAAI,KAAM,IAAK,KAAM;AAAA,QAK5B,CACC,GACJ;AAAA,QACA,oBAAC,YAAS,SAAO,MACd,aAAI,cAAe,GACtB;AAAA,SACD,IAEA,oBAAC,YAAW,aAAI,YAAa,GAAG;AAAA,MAEjC,oBAAC,QAAK,MAAO,MAAM,IAAI,cAAc,cAAe;AAAA,OACrD,GACD,GACD;AAAA,KACD;AAEF;AAEA,IAAO,kBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useStylesPreviewColors } from "./hooks";
|
|
3
|
-
function PresetColors() {
|
|
4
|
-
const { paletteColors } = useStylesPreviewColors();
|
|
5
|
-
return paletteColors.slice(0, 4).map(({ slug, color }, index) => /* @__PURE__ */ jsx(
|
|
6
|
-
"div",
|
|
7
|
-
{
|
|
8
|
-
style: {
|
|
9
|
-
flexGrow: 1,
|
|
10
|
-
height: "100%",
|
|
11
|
-
background: color
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
`${slug}-${index}`
|
|
15
|
-
));
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
PresetColors as default
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=preset-colors.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/preset-colors.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport { useStylesPreviewColors } from './hooks';\n\nexport default function PresetColors() {\n\tconst { paletteColors } = useStylesPreviewColors();\n\treturn paletteColors.slice( 0, 4 ).map( ( { slug, color }, index ) => (\n\t\t<div\n\t\t\tkey={ `${ slug }-${ index }` }\n\t\t\tstyle={ {\n\t\t\t\tflexGrow: 1,\n\t\t\t\theight: '100%',\n\t\t\t\tbackground: color,\n\t\t\t} }\n\t\t/>\n\t) );\n}\n"],
|
|
5
|
-
"mappings": "AAQE;AALF,SAAS,8BAA8B;AAExB,SAAR,eAAgC;AACtC,QAAM,EAAE,cAAc,IAAI,uBAAuB;AACjD,SAAO,cAAc,MAAO,GAAG,CAAE,EAAE,IAAK,CAAE,EAAE,MAAM,MAAM,GAAG,UAC1D;AAAA,IAAC;AAAA;AAAA,MAEA,OAAQ;AAAA,QACP,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,YAAY;AAAA,MACb;AAAA;AAAA,IALM,GAAI,IAAK,IAAK,KAAM;AAAA,EAM3B,CACC;AACH;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
__experimentalHStack as HStack,
|
|
4
|
-
__unstableMotion as motion
|
|
5
|
-
} from "@wordpress/components";
|
|
6
|
-
import PresetColors from "./preset-colors";
|
|
7
|
-
import PreviewWrapper from "./preview-wrapper";
|
|
8
|
-
const firstFrameVariants = {
|
|
9
|
-
start: {
|
|
10
|
-
scale: 1,
|
|
11
|
-
opacity: 1
|
|
12
|
-
},
|
|
13
|
-
hover: {
|
|
14
|
-
scale: 0,
|
|
15
|
-
opacity: 0
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const StylesPreviewColors = ({ label, isFocused, withHoverView }) => {
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
-
PreviewWrapper,
|
|
21
|
-
{
|
|
22
|
-
label,
|
|
23
|
-
isFocused,
|
|
24
|
-
withHoverView,
|
|
25
|
-
children: ({ key }) => /* @__PURE__ */ jsx(
|
|
26
|
-
motion.div,
|
|
27
|
-
{
|
|
28
|
-
variants: firstFrameVariants,
|
|
29
|
-
style: {
|
|
30
|
-
height: "100%",
|
|
31
|
-
overflow: "hidden"
|
|
32
|
-
},
|
|
33
|
-
children: /* @__PURE__ */ jsx(
|
|
34
|
-
HStack,
|
|
35
|
-
{
|
|
36
|
-
spacing: 0,
|
|
37
|
-
justify: "center",
|
|
38
|
-
style: {
|
|
39
|
-
height: "100%",
|
|
40
|
-
overflow: "hidden"
|
|
41
|
-
},
|
|
42
|
-
children: /* @__PURE__ */ jsx(PresetColors, {})
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
},
|
|
46
|
-
key
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
var preview_colors_default = StylesPreviewColors;
|
|
52
|
-
export {
|
|
53
|
-
preview_colors_default as default
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=preview-colors.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/global-styles/preview-colors.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport PresetColors from './preset-colors';\nimport PreviewWrapper from './preview-wrapper';\n\nconst firstFrameVariants = {\n\tstart: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\thover: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\nconst StylesPreviewColors = ( { label, isFocused, withHoverView } ) => {\n\treturn (\n\t\t<PreviewWrapper\n\t\t\tlabel={ label }\n\t\t\tisFocused={ isFocused }\n\t\t\twithHoverView={ withHoverView }\n\t\t>\n\t\t\t{ ( { key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ firstFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PresetColors />\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t</PreviewWrapper>\n\t);\n};\n\nexport default StylesPreviewColors;\n"],
|
|
5
|
-
"mappings": "AAiDM;AA9CN;AAAA,EACC,wBAAwB;AAAA,EACxB,oBAAoB;AAAA,OACd;AAKP,OAAO,kBAAkB;AACzB,OAAO,oBAAoB;AAE3B,MAAM,qBAAqB;AAAA,EAC1B,OAAO;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,EACV;AAAA,EACA,OAAO;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,EACV;AACD;AAEA,MAAM,sBAAsB,CAAE,EAAE,OAAO,WAAW,cAAc,MAAO;AACtE,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEE,WAAE,EAAE,IAAI,MACT;AAAA,QAAC,OAAO;AAAA,QAAP;AAAA,UAEA,UAAW;AAAA,UACX,OAAQ;AAAA,YACP,QAAQ;AAAA,YACR,UAAU;AAAA,UACX;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACA,SAAU;AAAA,cACV,SAAQ;AAAA,cACR,OAAQ;AAAA,gBACP,QAAQ;AAAA,gBACR,UAAU;AAAA,cACX;AAAA,cAEA,8BAAC,gBAAa;AAAA;AAAA,UACf;AAAA;AAAA,QAhBM;AAAA,MAiBP;AAAA;AAAA,EAEF;AAEF;AAEA,IAAO,yBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|