Block Editor: Update the WordPress packages with the fixes for 5.8 beta 2.
This includes: **Various** - Fix multi selection for nested blocks https://github.com/WordPress/gutenberg/pull/32536 - Consistently show the drop indicator while dragging blocks https://github.com/WordPress/gutenberg/pull/31896 - Fix horizontal drop indicator https://github.com/WordPress/gutenberg/pull/32589 - Fix Safari flickering issue https://github.com/WordPress/gutenberg/pull/32581 - Silence useSelect zombie bug errors https://github.com/WordPress/gutenberg/pull/32088 **Template Editor** - Clarify the template creation modal https://github.com/WordPress/gutenberg/pull/32427 - Only add skip links for block templates https://github.com/WordPress/gutenberg/pull/32451 **Widgets Editor** - Add block breadcrumb https://github.com/WordPress/gutenberg/pull/32498 https://github.com/WordPress/gutenberg/pull/32528 https://github.com/WordPress/gutenberg/pull/32569 - Saved deleted and restored widgets. https://github.com/WordPress/gutenberg/pull/32534 - Fix unsaved changes detection https://github.com/WordPress/gutenberg/pull/32573 - Fix button spacing in the header https://github.com/WordPress/gutenberg/pull/32585 - Avoid extra undo levels https://github.com/WordPress/gutenberg/pull/32572 - Move Legacy Widget block to the `@wordpress/widgets` package https://github.com/WordPress/gutenberg/pull/32501 - Fix Social Links color inheritance https://github.com/WordPress/gutenberg/pull/32625 - Use Button appender https://github.com/WordPress/gutenberg/pull/32580 **Global Styles (theme.json)** - Separate the presets per origin in the block editor settings https://github.com/WordPress/gutenberg/pull/32358 https://github.com/WordPress/gutenberg/pull/32622 - Use CSS Custom Properties for the preset styles https://github.com/WordPress/gutenberg/pull/32627 **Performance** - Remove is-typing classname to improve typing performance https://github.com/WordPress/gutenberg/pull/32567 Props nosolosw, jorgefilipecosta, aristath, ntsekouras, peterwilsoncc, mcsf. See #53397. Built from https://develop.svn.wordpress.org/trunk@51149 git-svn-id: http://core.svn.wordpress.org/trunk@50758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f0ac297720
commit
c114304471
|
@ -24,7 +24,10 @@ $preload_paths = array(
|
||||||
);
|
);
|
||||||
block_editor_rest_api_preload( $preload_paths, $block_editor_context );
|
block_editor_rest_api_preload( $preload_paths, $block_editor_context );
|
||||||
|
|
||||||
$editor_settings = get_block_editor_settings( array(), $block_editor_context );
|
$editor_settings = get_block_editor_settings(
|
||||||
|
get_legacy_widget_block_editor_settings(),
|
||||||
|
$block_editor_context
|
||||||
|
);
|
||||||
|
|
||||||
wp_add_inline_script(
|
wp_add_inline_script(
|
||||||
'wp-edit-widgets',
|
'wp-edit-widgets',
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -225,6 +225,20 @@ function get_default_block_editor_settings() {
|
||||||
$editor_settings['gradients'] = $gradient_presets;
|
$editor_settings['gradients'] = $gradient_presets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $editor_settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the block editor settings needed to use the Legacy Widget block which
|
||||||
|
* is not registered by default.
|
||||||
|
*
|
||||||
|
* @since 5.8.0
|
||||||
|
*
|
||||||
|
* @return array Settings to be used with get_block_editor_settings().
|
||||||
|
*/
|
||||||
|
function get_legacy_widget_block_editor_settings() {
|
||||||
|
$editor_settings = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the list of widget-type IDs that should **not** be offered by the
|
* Filters the list of widget-type IDs that should **not** be offered by the
|
||||||
* Legacy Widget block.
|
* Legacy Widget block.
|
||||||
|
@ -296,13 +310,32 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex
|
||||||
|
|
||||||
$editor_settings['__experimentalFeatures'] = $theme_json->get_settings();
|
$editor_settings['__experimentalFeatures'] = $theme_json->get_settings();
|
||||||
// These settings may need to be updated based on data coming from theme.json sources.
|
// These settings may need to be updated based on data coming from theme.json sources.
|
||||||
if ( isset( $editor_settings['__experimentalFeatures']['color']['palette'] ) ) {
|
if ( isset( $settings['__experimentalFeatures']['color']['palette'] ) ) {
|
||||||
$editor_settings['colors'] = $editor_settings['__experimentalFeatures']['color']['palette'];
|
$colors_by_origin = $settings['__experimentalFeatures']['color']['palette'];
|
||||||
unset( $editor_settings['__experimentalFeatures']['color']['palette'] );
|
$settings['colors'] = isset( $colors_by_origin['user'] ) ?
|
||||||
|
$colors_by_origin['user'] : (
|
||||||
|
isset( $colors_by_origin['theme'] ) ?
|
||||||
|
$colors_by_origin['theme'] :
|
||||||
|
$colors_by_origin['core']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if ( isset( $editor_settings['__experimentalFeatures']['color']['gradients'] ) ) {
|
if ( isset( $settings['__experimentalFeatures']['color']['gradients'] ) ) {
|
||||||
$editor_settings['gradients'] = $editor_settings['__experimentalFeatures']['color']['gradients'];
|
$gradients_by_origin = $settings['__experimentalFeatures']['color']['gradients'];
|
||||||
unset( $editor_settings['__experimentalFeatures']['color']['gradients'] );
|
$settings['gradients'] = isset( $gradients_by_origin['user'] ) ?
|
||||||
|
$gradients_by_origin['user'] : (
|
||||||
|
isset( $gradients_by_origin['theme'] ) ?
|
||||||
|
$gradients_by_origin['theme'] :
|
||||||
|
$gradients_by_origin['core']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if ( isset( $settings['__experimentalFeatures']['typography']['fontSizes'] ) ) {
|
||||||
|
$font_sizes_by_origin = $settings['__experimentalFeatures']['typography']['fontSizes'];
|
||||||
|
$settings['fontSizes'] = isset( $font_sizes_by_origin['user'] ) ?
|
||||||
|
$font_sizes_by_origin['user'] : (
|
||||||
|
isset( $font_sizes_by_origin['theme'] ) ?
|
||||||
|
$font_sizes_by_origin['theme'] :
|
||||||
|
$font_sizes_by_origin['core']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if ( isset( $editor_settings['__experimentalFeatures']['color']['custom'] ) ) {
|
if ( isset( $editor_settings['__experimentalFeatures']['color']['custom'] ) ) {
|
||||||
$editor_settings['disableCustomColors'] = ! $editor_settings['__experimentalFeatures']['color']['custom'];
|
$editor_settings['disableCustomColors'] = ! $editor_settings['__experimentalFeatures']['color']['custom'];
|
||||||
|
@ -312,10 +345,6 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex
|
||||||
$editor_settings['disableCustomGradients'] = ! $editor_settings['__experimentalFeatures']['color']['customGradient'];
|
$editor_settings['disableCustomGradients'] = ! $editor_settings['__experimentalFeatures']['color']['customGradient'];
|
||||||
unset( $editor_settings['__experimentalFeatures']['color']['customGradient'] );
|
unset( $editor_settings['__experimentalFeatures']['color']['customGradient'] );
|
||||||
}
|
}
|
||||||
if ( isset( $editor_settings['__experimentalFeatures']['typography']['fontSizes'] ) ) {
|
|
||||||
$editor_settings['fontSizes'] = $editor_settings['__experimentalFeatures']['typography']['fontSizes'];
|
|
||||||
unset( $editor_settings['__experimentalFeatures']['typography']['fontSizes'] );
|
|
||||||
}
|
|
||||||
if ( isset( $editor_settings['__experimentalFeatures']['typography']['customFontSize'] ) ) {
|
if ( isset( $editor_settings['__experimentalFeatures']['typography']['customFontSize'] ) ) {
|
||||||
$editor_settings['disableCustomFontSizes'] = ! $editor_settings['__experimentalFeatures']['typography']['customFontSize'];
|
$editor_settings['disableCustomFontSizes'] = ! $editor_settings['__experimentalFeatures']['typography']['customFontSize'];
|
||||||
unset( $editor_settings['__experimentalFeatures']['typography']['customFontSize'] );
|
unset( $editor_settings['__experimentalFeatures']['typography']['customFontSize'] );
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
.wp-block-legacy-widget__edit-form{background:#fff;border-radius:2px;border:1px solid #1e1e1e;padding:11px}.wp-block-legacy-widget__edit-form .wp-block-legacy-widget__edit-form-title{color:#000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-weight:600;margin:0 0 12px}.wp-block-legacy-widget__edit-form .widget-inside{border:none;box-shadow:none;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.wp-block-legacy-widget__edit-form .widget-inside label{font-size:13px}.wp-block-legacy-widget__edit-form .widget-inside label+.widefat{margin-top:12px}.wp-block-legacy-widget__edit-form .widget.open{z-index:0}.wp-block-legacy-widget__edit-no-preview,.wp-block-legacy-widget__edit-preview{cursor:pointer}.wp-block-legacy-widget__edit-no-preview:hover:after,.wp-block-legacy-widget__edit-preview:hover:after{border-radius:2px;border:1px solid #949494;bottom:0;content:"";right:0;position:absolute;left:0;top:0}.wp-block-legacy-widget__edit-preview.is-offscreen{right:-9999px;position:absolute;top:0;width:100%}.wp-block-legacy-widget__edit-preview-iframe{overflow:hidden;width:100%}.wp-block-legacy-widget__edit-no-preview{background:#f0f0f0;padding:8px 12px;font-size:13px}.wp-block-legacy-widget__edit-no-preview h3{font-size:14px;font-weight:600;margin:4px 0}.wp-block-legacy-widget__edit-no-preview p{margin:4px 0}.wp-block-legacy-widget-inspector-card{padding:0 52px 16px 16px}.interface-complementary-area .wp-block-legacy-widget-inspector-card__name{margin:0 0 5px;font-weight:500}.is-selected .wp-block-legacy-widget__container{padding:8px 12px;min-height:50px}
|
|
|
@ -1 +0,0 @@
|
||||||
.wp-block-legacy-widget__edit-form{background:#fff;border-radius:2px;border:1px solid #1e1e1e;padding:11px}.wp-block-legacy-widget__edit-form .wp-block-legacy-widget__edit-form-title{color:#000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-weight:600;margin:0 0 12px}.wp-block-legacy-widget__edit-form .widget-inside{border:none;box-shadow:none;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.wp-block-legacy-widget__edit-form .widget-inside label{font-size:13px}.wp-block-legacy-widget__edit-form .widget-inside label+.widefat{margin-top:12px}.wp-block-legacy-widget__edit-form .widget.open{z-index:0}.wp-block-legacy-widget__edit-no-preview,.wp-block-legacy-widget__edit-preview{cursor:pointer}.wp-block-legacy-widget__edit-no-preview:hover:after,.wp-block-legacy-widget__edit-preview:hover:after{border-radius:2px;border:1px solid #949494;bottom:0;content:"";left:0;position:absolute;right:0;top:0}.wp-block-legacy-widget__edit-preview.is-offscreen{left:-9999px;position:absolute;top:0;width:100%}.wp-block-legacy-widget__edit-preview-iframe{overflow:hidden;width:100%}.wp-block-legacy-widget__edit-no-preview{background:#f0f0f0;padding:8px 12px;font-size:13px}.wp-block-legacy-widget__edit-no-preview h3{font-size:14px;font-weight:600;margin:4px 0}.wp-block-legacy-widget__edit-no-preview p{margin:4px 0}.wp-block-legacy-widget-inspector-card{padding:0 16px 16px 52px}.interface-complementary-area .wp-block-legacy-widget-inspector-card__name{margin:0 0 5px;font-weight:500}.is-selected .wp-block-legacy-widget__container{padding:8px 12px;min-height:50px}
|
|
|
@ -5,7 +5,7 @@
|
||||||
"category": "design",
|
"category": "design",
|
||||||
"description": "Displays the contents of a post or page.",
|
"description": "Displays the contents of a post or page.",
|
||||||
"textdomain": "default",
|
"textdomain": "default",
|
||||||
"usesContext": [ "postId", "postType" ],
|
"usesContext": [ "postId", "postType", "queryId" ],
|
||||||
"supports": {
|
"supports": {
|
||||||
"align": [ "wide", "full" ],
|
"align": [ "wide", "full" ],
|
||||||
"html": false,
|
"html": false,
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
"default": false
|
"default": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"usesContext": [ "postId", "postType" ],
|
"usesContext": [ "postId", "postType", "queryId" ],
|
||||||
"supports": {
|
"supports": {
|
||||||
"html": false,
|
"html": false,
|
||||||
"color": {
|
"color": {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"default": true
|
"default": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"usesContext": [ "postId", "postType" ],
|
"usesContext": [ "postId", "postType", "queryId" ],
|
||||||
"supports": {
|
"supports": {
|
||||||
"html": false,
|
"html": false,
|
||||||
"color": {
|
"color": {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"default": false
|
"default": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"usesContext": [ "postId", "postType" ],
|
"usesContext": [ "postId", "postType", "queryId" ],
|
||||||
"supports": {
|
"supports": {
|
||||||
"align": [ "left", "right", "center", "wide", "full" ],
|
"align": [ "left", "right", "center", "wide", "full" ],
|
||||||
"html": false
|
"html": false
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"category": "design",
|
"category": "design",
|
||||||
"description": "Displays the title of a post, page, or any other content-type.",
|
"description": "Displays the title of a post, page, or any other content-type.",
|
||||||
"textdomain": "default",
|
"textdomain": "default",
|
||||||
"usesContext": [ "postId", "postType" ],
|
"usesContext": [ "postId", "postType", "queryId" ],
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"textAlign": {
|
"textAlign": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|
|
@ -112,34 +112,32 @@
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-social-link {
|
.wp-block-social-link {
|
||||||
display: block;
|
display: block;
|
||||||
border-radius: 9999px;
|
border-radius: 9999px;
|
||||||
transition: transform 0.1s ease;
|
transition: transform 0.1s ease;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.wp-social-link {
|
.wp-block-social-link {
|
||||||
transition-duration: 0s;
|
transition-duration: 0s;
|
||||||
transition-delay: 0s;
|
transition-delay: 0s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.wp-social-link a {
|
.wp-block-social-link a {
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
transition: transform 0.1s ease;
|
transition: transform 0.1s ease;
|
||||||
}
|
}
|
||||||
.wp-social-link a,
|
.wp-block-social-link:hover {
|
||||||
.wp-social-link a:hover,
|
transform: scale(1.1);
|
||||||
.wp-social-link a:active,
|
}
|
||||||
.wp-social-link a:visited,
|
|
||||||
.wp-social-link svg {
|
.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor, .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:hover, .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:active, .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:visited,
|
||||||
|
.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor svg {
|
||||||
color: currentColor;
|
color: currentColor;
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
}
|
}
|
||||||
.wp-social-link:hover {
|
|
||||||
transform: scale(1.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link {
|
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link {
|
||||||
background-color: #f0f0f0;
|
background-color: #f0f0f0;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -112,34 +112,32 @@
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-social-link {
|
.wp-block-social-link {
|
||||||
display: block;
|
display: block;
|
||||||
border-radius: 9999px;
|
border-radius: 9999px;
|
||||||
transition: transform 0.1s ease;
|
transition: transform 0.1s ease;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.wp-social-link {
|
.wp-block-social-link {
|
||||||
transition-duration: 0s;
|
transition-duration: 0s;
|
||||||
transition-delay: 0s;
|
transition-delay: 0s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.wp-social-link a {
|
.wp-block-social-link a {
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
transition: transform 0.1s ease;
|
transition: transform 0.1s ease;
|
||||||
}
|
}
|
||||||
.wp-social-link a,
|
.wp-block-social-link:hover {
|
||||||
.wp-social-link a:hover,
|
transform: scale(1.1);
|
||||||
.wp-social-link a:active,
|
}
|
||||||
.wp-social-link a:visited,
|
|
||||||
.wp-social-link svg {
|
.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor, .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:hover, .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:active, .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:visited,
|
||||||
|
.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor svg {
|
||||||
color: currentColor;
|
color: currentColor;
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
}
|
}
|
||||||
.wp-social-link:hover {
|
|
||||||
transform: scale(1.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link {
|
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link {
|
||||||
background-color: #f0f0f0;
|
background-color: #f0f0f0;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -837,7 +837,10 @@ final class WP_Customize_Widgets {
|
||||||
if ( wp_use_widgets_block_editor() ) {
|
if ( wp_use_widgets_block_editor() ) {
|
||||||
$block_editor_context = new WP_Block_Editor_Context();
|
$block_editor_context = new WP_Block_Editor_Context();
|
||||||
|
|
||||||
$editor_settings = get_block_editor_settings( array(), $block_editor_context );
|
$editor_settings = get_block_editor_settings(
|
||||||
|
get_legacy_widget_block_editor_settings(),
|
||||||
|
$block_editor_context
|
||||||
|
);
|
||||||
|
|
||||||
wp_add_inline_script(
|
wp_add_inline_script(
|
||||||
'wp-customize-widgets',
|
'wp-customize-widgets',
|
||||||
|
|
|
@ -248,7 +248,7 @@ class WP_Theme_JSON_Resolver {
|
||||||
|
|
||||||
$config = self::read_json_file( __DIR__ . '/theme.json' );
|
$config = self::read_json_file( __DIR__ . '/theme.json' );
|
||||||
$config = self::translate( $config );
|
$config = self::translate( $config );
|
||||||
self::$core = new WP_Theme_JSON( $config );
|
self::$core = new WP_Theme_JSON( $config, 'core' );
|
||||||
|
|
||||||
return self::$core;
|
return self::$core;
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ class WP_Theme_JSON_Resolver {
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param array $settings Existing block editor settings.
|
* @param array $settings Existing block editor settings.
|
||||||
* Empty array by default.
|
* Empty array by default.
|
||||||
* @return WP_Theme_JSON
|
* @return WP_Theme_JSON
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -40,6 +40,12 @@ class WP_Theme_JSON {
|
||||||
*/
|
*/
|
||||||
const ROOT_BLOCK_SELECTOR = 'body';
|
const ROOT_BLOCK_SELECTOR = 'body';
|
||||||
|
|
||||||
|
const VALID_ORIGINS = array(
|
||||||
|
'core',
|
||||||
|
'theme',
|
||||||
|
'user',
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Presets are a set of values that serve
|
* Presets are a set of values that serve
|
||||||
* to bootstrap some styles: colors, font sizes, etc.
|
* to bootstrap some styles: colors, font sizes, etc.
|
||||||
|
@ -246,14 +252,31 @@ class WP_Theme_JSON {
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param array $theme_json A structure that follows the theme.json schema.
|
* @param array $theme_json A structure that follows the theme.json schema.
|
||||||
|
* @param string $origin What source of data this object represents. One of core, theme, or user. Default: theme.
|
||||||
*/
|
*/
|
||||||
public function __construct( $theme_json = array() ) {
|
public function __construct( $theme_json = array(), $origin = 'theme' ) {
|
||||||
|
if ( ! in_array( $origin, self::VALID_ORIGINS, true ) ) {
|
||||||
|
$origin = 'theme';
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! isset( $theme_json['version'] ) || self::LATEST_SCHEMA !== $theme_json['version'] ) {
|
if ( ! isset( $theme_json['version'] ) || self::LATEST_SCHEMA !== $theme_json['version'] ) {
|
||||||
$this->theme_json = array();
|
$this->theme_json = array();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->theme_json = self::sanitize( $theme_json );
|
$this->theme_json = self::sanitize( $theme_json );
|
||||||
|
|
||||||
|
// Internally, presets are keyed by origin.
|
||||||
|
$nodes = self::get_setting_nodes( $this->theme_json );
|
||||||
|
foreach ( $nodes as $node ) {
|
||||||
|
foreach ( self::PRESETS_METADATA as $preset ) {
|
||||||
|
$path = array_merge( $node['path'], $preset['path'] );
|
||||||
|
$preset = _wp_array_get( $this->theme_json, $path, null );
|
||||||
|
if ( null !== $preset ) {
|
||||||
|
_wp_array_set( $this->theme_json, $path, array( $origin => $preset ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -631,6 +654,32 @@ class WP_Theme_JSON {
|
||||||
return implode( ',', $new_selectors );
|
return implode( ',', $new_selectors );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Given an array of presets keyed by origin and the value key of the preset,
|
||||||
|
* it returns an array where each key is the preset slug and each value the preset value.
|
||||||
|
*
|
||||||
|
* @param array $preset_per_origin Array of presets keyed by origin.
|
||||||
|
* @param string $value_key The property of the preset that contains its value.
|
||||||
|
*
|
||||||
|
* @return array Array of presets where each key is a slug and each value is the preset value.
|
||||||
|
*/
|
||||||
|
private static function get_merged_preset_by_slug( $preset_per_origin, $value_key ) {
|
||||||
|
$result = array();
|
||||||
|
foreach ( self::VALID_ORIGINS as $origin ) {
|
||||||
|
if ( ! isset( $preset_per_origin[ $origin ] ) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
foreach ( $preset_per_origin[ $origin ] as $preset ) {
|
||||||
|
// We don't want to use kebabCase here,
|
||||||
|
// see https://github.com/WordPress/gutenberg/issues/32347
|
||||||
|
// However, we need to make sure the generated class or css variable
|
||||||
|
// doesn't contain spaces.
|
||||||
|
$result[ preg_replace( '/\s+/', '-', $preset['slug'] ) ] = $preset[ $value_key ];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a settings array, it returns the generated rulesets
|
* Given a settings array, it returns the generated rulesets
|
||||||
* for the preset classes.
|
* for the preset classes.
|
||||||
|
@ -651,19 +700,16 @@ class WP_Theme_JSON {
|
||||||
|
|
||||||
$stylesheet = '';
|
$stylesheet = '';
|
||||||
foreach ( self::PRESETS_METADATA as $preset ) {
|
foreach ( self::PRESETS_METADATA as $preset ) {
|
||||||
$values = _wp_array_get( $settings, $preset['path'], array() );
|
$preset_per_origin = _wp_array_get( $settings, $preset['path'], array() );
|
||||||
foreach ( $values as $value ) {
|
$preset_by_slug = self::get_merged_preset_by_slug( $preset_per_origin, $preset['value_key'] );
|
||||||
foreach ( $preset['classes'] as $class ) {
|
foreach ( $preset['classes'] as $class ) {
|
||||||
|
foreach ( $preset_by_slug as $slug => $value ) {
|
||||||
$stylesheet .= self::to_ruleset(
|
$stylesheet .= self::to_ruleset(
|
||||||
// We don't want to use kebabCase here,
|
self::append_to_selector( $selector, '.has-' . $slug . '-' . $class['class_suffix'] ),
|
||||||
// see https://github.com/WordPress/gutenberg/issues/32347
|
|
||||||
// However, we need to make sure the generated class
|
|
||||||
// doesn't contain spaces.
|
|
||||||
self::append_to_selector( $selector, '.has-' . preg_replace( '/\s+/', '-', $value['slug'] ) . '-' . $class['class_suffix'] ),
|
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'name' => $class['property_name'],
|
'name' => $class['property_name'],
|
||||||
'value' => $value[ $preset['value_key'] ] . ' !important',
|
'value' => $value . ' !important',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -695,11 +741,12 @@ class WP_Theme_JSON {
|
||||||
private static function compute_preset_vars( $settings ) {
|
private static function compute_preset_vars( $settings ) {
|
||||||
$declarations = array();
|
$declarations = array();
|
||||||
foreach ( self::PRESETS_METADATA as $preset ) {
|
foreach ( self::PRESETS_METADATA as $preset ) {
|
||||||
$values = _wp_array_get( $settings, $preset['path'], array() );
|
$preset_per_origin = _wp_array_get( $settings, $preset['path'], array() );
|
||||||
foreach ( $values as $value ) {
|
$preset_by_slug = self::get_merged_preset_by_slug( $preset_per_origin, $preset['value_key'] );
|
||||||
|
foreach ( $preset_by_slug as $slug => $value ) {
|
||||||
$declarations[] = array(
|
$declarations[] = array(
|
||||||
'name' => '--wp--preset--' . $preset['css_var_infix'] . '--' . $value['slug'],
|
'name' => '--wp--preset--' . $preset['css_var_infix'] . '--' . $slug,
|
||||||
'value' => $value[ $preset['value_key'] ],
|
'value' => $value,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1039,88 +1086,36 @@ class WP_Theme_JSON {
|
||||||
/**
|
/**
|
||||||
* Merge new incoming data.
|
* Merge new incoming data.
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
|
||||||
*
|
|
||||||
* @param WP_Theme_JSON $incoming Data to merge.
|
* @param WP_Theme_JSON $incoming Data to merge.
|
||||||
*/
|
*/
|
||||||
public function merge( $incoming, $update_or_remove = 'remove' ) {
|
public function merge( $incoming ) {
|
||||||
$incoming_data = $incoming->get_raw_data();
|
$incoming_data = $incoming->get_raw_data();
|
||||||
$existing_data = $this->theme_json;
|
$this->theme_json = array_replace_recursive( $this->theme_json, $incoming_data );
|
||||||
|
|
||||||
// The array_replace_recursive algorithm merges at the leaf level.
|
// The array_replace_recursive algorithm merges at the leaf level.
|
||||||
// For leaf values that are arrays it will use the numeric indexes for replacement.
|
// For leaf values that are arrays it will use the numeric indexes for replacement.
|
||||||
$this->theme_json = array_replace_recursive( $this->theme_json, $incoming_data );
|
// In those cases, we want to replace the existing with the incoming value, if it exists.
|
||||||
|
|
||||||
// There are a few cases in which we want to merge things differently
|
|
||||||
// from what array_replace_recursive does.
|
|
||||||
|
|
||||||
// Some incoming properties should replace the existing.
|
|
||||||
$to_replace = array();
|
$to_replace = array();
|
||||||
$to_replace[] = array( 'custom' );
|
$to_replace[] = array( 'custom' );
|
||||||
$to_replace[] = array( 'spacing', 'units' );
|
$to_replace[] = array( 'spacing', 'units' );
|
||||||
$to_replace[] = array( 'typography', 'fontSizes' );
|
$to_replace[] = array( 'color', 'duotone' );
|
||||||
$to_replace[] = array( 'typography', 'fontFamilies' );
|
foreach ( self::VALID_ORIGINS as $origin ) {
|
||||||
|
$to_replace[] = array( 'color', 'palette', $origin );
|
||||||
// Some others should be appended to the existing.
|
$to_replace[] = array( 'color', 'gradients', $origin );
|
||||||
// If the slug is the same than an existing element,
|
$to_replace[] = array( 'typography', 'fontSizes', $origin );
|
||||||
// the $update_or_remove param is used to decide
|
$to_replace[] = array( 'typography', 'fontFamilies', $origin );
|
||||||
// what to do with the existing element:
|
}
|
||||||
// either remove it and append the incoming,
|
|
||||||
// or update it with the incoming.
|
|
||||||
$to_append = array();
|
|
||||||
$to_append[] = array( 'color', 'duotone' );
|
|
||||||
$to_append[] = array( 'color', 'gradients' );
|
|
||||||
$to_append[] = array( 'color', 'palette' );
|
|
||||||
|
|
||||||
$nodes = self::get_setting_nodes( $this->theme_json );
|
$nodes = self::get_setting_nodes( $this->theme_json );
|
||||||
foreach ( $nodes as $metadata ) {
|
foreach ( $nodes as $metadata ) {
|
||||||
foreach ( $to_replace as $path_to_replace ) {
|
foreach ( $to_replace as $property_path ) {
|
||||||
$path = array_merge( $metadata['path'], $path_to_replace );
|
$path = array_merge( $metadata['path'], $property_path );
|
||||||
$node = _wp_array_get( $incoming_data, $path, array() );
|
$node = _wp_array_get( $incoming_data, $path, array() );
|
||||||
if ( ! empty( $node ) ) {
|
if ( ! empty( $node ) ) {
|
||||||
_wp_array_set( $this->theme_json, $path, $node );
|
_wp_array_set( $this->theme_json, $path, $node );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ( $to_append as $path_to_append ) {
|
|
||||||
$path = array_merge( $metadata['path'], $path_to_append );
|
|
||||||
$incoming_node = _wp_array_get( $incoming_data, $path, array() );
|
|
||||||
$existing_node = _wp_array_get( $existing_data, $path, array() );
|
|
||||||
|
|
||||||
if ( empty( $incoming_node ) && empty( $existing_node ) ) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$index_table = array();
|
|
||||||
$existing_slugs = array();
|
|
||||||
$merged = array();
|
|
||||||
foreach ( $existing_node as $key => $value ) {
|
|
||||||
$index_table[ $value['slug'] ] = $key;
|
|
||||||
$existing_slugs[] = $value['slug'];
|
|
||||||
$merged[ $key ] = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
$to_remove = array();
|
|
||||||
foreach ( $incoming_node as $value ) {
|
|
||||||
if ( ! in_array( $value['slug'], $existing_slugs, true ) ) {
|
|
||||||
$merged[] = $value;
|
|
||||||
} elseif ( 'update' === $update_or_remove ) {
|
|
||||||
$merged[ $index_table[ $value['slug'] ] ] = $value;
|
|
||||||
} else {
|
|
||||||
$merged[] = $value;
|
|
||||||
$to_remove[] = $index_table[ $value['slug'] ];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove the duplicated values and pack the sparsed array.
|
|
||||||
foreach ( $to_remove as $index ) {
|
|
||||||
unset( $merged[ $index ] );
|
|
||||||
}
|
|
||||||
$merged = array_values( $merged );
|
|
||||||
|
|
||||||
_wp_array_set( $this->theme_json, $path, $merged );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -323,10 +323,10 @@
|
||||||
left: 8px;
|
left: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-outline-mode:not(.is-typing) .block-editor-block-list__block.is-hovered {
|
.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-hovered {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
.is-outline-mode:not(.is-typing) .block-editor-block-list__block.is-hovered::after {
|
.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-hovered::after {
|
||||||
top: 1px;
|
top: 1px;
|
||||||
right: 1px;
|
right: 1px;
|
||||||
left: 1px;
|
left: 1px;
|
||||||
|
@ -334,10 +334,10 @@
|
||||||
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
}
|
}
|
||||||
.is-outline-mode:not(.is-typing) .block-editor-block-list__block.is-selected {
|
.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected {
|
||||||
cursor: unset;
|
cursor: unset;
|
||||||
}
|
}
|
||||||
.is-outline-mode:not(.is-typing) .block-editor-block-list__block.is-selected::after {
|
.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected::after {
|
||||||
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
||||||
top: 1px;
|
top: 1px;
|
||||||
right: 1px;
|
right: 1px;
|
||||||
|
@ -345,7 +345,7 @@
|
||||||
bottom: 1px;
|
bottom: 1px;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
}
|
}
|
||||||
.is-outline-mode:not(.is-typing) .block-editor-block-list__block.is-selected:focus::after {
|
.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected:focus::after {
|
||||||
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -721,6 +721,9 @@
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
.components-popover.block-editor-block-list__block-popover.is-insertion-point-visible {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
.is-dragging-components-draggable .components-popover.block-editor-block-list__block-popover {
|
.is-dragging-components-draggable .components-popover.block-editor-block-list__block-popover {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation: hide-during-dragging 1ms linear forwards;
|
animation: hide-during-dragging 1ms linear forwards;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -323,10 +323,10 @@
|
||||||
right: 8px;
|
right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-outline-mode:not(.is-typing) .block-editor-block-list__block.is-hovered {
|
.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-hovered {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
.is-outline-mode:not(.is-typing) .block-editor-block-list__block.is-hovered::after {
|
.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-hovered::after {
|
||||||
top: 1px;
|
top: 1px;
|
||||||
left: 1px;
|
left: 1px;
|
||||||
right: 1px;
|
right: 1px;
|
||||||
|
@ -334,10 +334,10 @@
|
||||||
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
}
|
}
|
||||||
.is-outline-mode:not(.is-typing) .block-editor-block-list__block.is-selected {
|
.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected {
|
||||||
cursor: unset;
|
cursor: unset;
|
||||||
}
|
}
|
||||||
.is-outline-mode:not(.is-typing) .block-editor-block-list__block.is-selected::after {
|
.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected::after {
|
||||||
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
||||||
top: 1px;
|
top: 1px;
|
||||||
left: 1px;
|
left: 1px;
|
||||||
|
@ -345,7 +345,7 @@
|
||||||
bottom: 1px;
|
bottom: 1px;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
}
|
}
|
||||||
.is-outline-mode:not(.is-typing) .block-editor-block-list__block.is-selected:focus::after {
|
.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected:focus::after {
|
||||||
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -721,6 +721,9 @@
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
.components-popover.block-editor-block-list__block-popover.is-insertion-point-visible {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
.is-dragging-components-draggable .components-popover.block-editor-block-list__block-popover {
|
.is-dragging-components-draggable .components-popover.block-editor-block-list__block-popover {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation: hide-during-dragging 1ms linear forwards;
|
animation: hide-during-dragging 1ms linear forwards;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1038,91 +1038,6 @@ figure.wp-block-image:not(.wp-block) {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-form {
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 2px;
|
|
||||||
border: 1px solid #1e1e1e;
|
|
||||||
padding: 11px;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-form .wp-block-legacy-widget__edit-form-title {
|
|
||||||
color: #000;
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
margin: 0 0 12px 0;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-form .widget-inside {
|
|
||||||
border: none;
|
|
||||||
box-shadow: none;
|
|
||||||
display: block;
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-form .widget-inside label {
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-form .widget-inside label + .widefat {
|
|
||||||
margin-top: 12px;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-form .widget.open {
|
|
||||||
z-index: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-preview,
|
|
||||||
.wp-block-legacy-widget__edit-no-preview {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-preview:hover::after,
|
|
||||||
.wp-block-legacy-widget__edit-no-preview:hover::after {
|
|
||||||
border-radius: 2px;
|
|
||||||
border: 1px solid #949494;
|
|
||||||
bottom: 0;
|
|
||||||
content: "";
|
|
||||||
right: 0;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-preview.is-offscreen {
|
|
||||||
right: -9999px;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-preview-iframe {
|
|
||||||
overflow: hidden;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-no-preview {
|
|
||||||
background: #f0f0f0;
|
|
||||||
padding: 8px 12px;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-no-preview h3 {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
margin: 4px 0;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-no-preview p {
|
|
||||||
margin: 4px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-legacy-widget-inspector-card {
|
|
||||||
padding: 0 52px 16px 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.interface-complementary-area .wp-block-legacy-widget-inspector-card__name {
|
|
||||||
margin: 0 0 5px;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.is-selected .wp-block-legacy-widget__container {
|
|
||||||
padding: 8px 12px;
|
|
||||||
min-height: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-media-text .__resizable_base__ {
|
.wp-block-media-text .__resizable_base__ {
|
||||||
grid-column: 1/span 2;
|
grid-column: 1/span 2;
|
||||||
grid-row: 2;
|
grid-row: 2;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1043,91 +1043,6 @@ figure.wp-block-image:not(.wp-block) {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-form {
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 2px;
|
|
||||||
border: 1px solid #1e1e1e;
|
|
||||||
padding: 11px;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-form .wp-block-legacy-widget__edit-form-title {
|
|
||||||
color: #000;
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
margin: 0 0 12px 0;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-form .widget-inside {
|
|
||||||
border: none;
|
|
||||||
box-shadow: none;
|
|
||||||
display: block;
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-form .widget-inside label {
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-form .widget-inside label + .widefat {
|
|
||||||
margin-top: 12px;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-form .widget.open {
|
|
||||||
z-index: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-preview,
|
|
||||||
.wp-block-legacy-widget__edit-no-preview {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-preview:hover::after,
|
|
||||||
.wp-block-legacy-widget__edit-no-preview:hover::after {
|
|
||||||
border-radius: 2px;
|
|
||||||
border: 1px solid #949494;
|
|
||||||
bottom: 0;
|
|
||||||
content: "";
|
|
||||||
left: 0;
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-preview.is-offscreen {
|
|
||||||
left: -9999px;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-preview-iframe {
|
|
||||||
overflow: hidden;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-no-preview {
|
|
||||||
background: #f0f0f0;
|
|
||||||
padding: 8px 12px;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-no-preview h3 {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
margin: 4px 0;
|
|
||||||
}
|
|
||||||
.wp-block-legacy-widget__edit-no-preview p {
|
|
||||||
margin: 4px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-legacy-widget-inspector-card {
|
|
||||||
padding: 0 16px 16px 52px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.interface-complementary-area .wp-block-legacy-widget-inspector-card__name {
|
|
||||||
margin: 0 0 5px;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.is-selected .wp-block-legacy-widget__container {
|
|
||||||
padding: 8px 12px;
|
|
||||||
min-height: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-media-text .__resizable_base__ {
|
.wp-block-media-text .__resizable_base__ {
|
||||||
grid-column: 1/span 2;
|
grid-column: 1/span 2;
|
||||||
grid-row: 2;
|
grid-row: 2;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2310,34 +2310,32 @@ p.has-text-color a {
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-social-link {
|
.wp-block-social-link {
|
||||||
display: block;
|
display: block;
|
||||||
border-radius: 9999px;
|
border-radius: 9999px;
|
||||||
transition: transform 0.1s ease;
|
transition: transform 0.1s ease;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.wp-social-link {
|
.wp-block-social-link {
|
||||||
transition-duration: 0s;
|
transition-duration: 0s;
|
||||||
transition-delay: 0s;
|
transition-delay: 0s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.wp-social-link a {
|
.wp-block-social-link a {
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
transition: transform 0.1s ease;
|
transition: transform 0.1s ease;
|
||||||
}
|
}
|
||||||
.wp-social-link a,
|
.wp-block-social-link:hover {
|
||||||
.wp-social-link a:hover,
|
transform: scale(1.1);
|
||||||
.wp-social-link a:active,
|
}
|
||||||
.wp-social-link a:visited,
|
|
||||||
.wp-social-link svg {
|
.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor, .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:hover, .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:active, .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:visited,
|
||||||
|
.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor svg {
|
||||||
color: currentColor;
|
color: currentColor;
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
}
|
}
|
||||||
.wp-social-link:hover {
|
|
||||||
transform: scale(1.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link {
|
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link {
|
||||||
background-color: #f0f0f0;
|
background-color: #f0f0f0;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2350,34 +2350,32 @@ p.has-text-color a {
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-social-link {
|
.wp-block-social-link {
|
||||||
display: block;
|
display: block;
|
||||||
border-radius: 9999px;
|
border-radius: 9999px;
|
||||||
transition: transform 0.1s ease;
|
transition: transform 0.1s ease;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.wp-social-link {
|
.wp-block-social-link {
|
||||||
transition-duration: 0s;
|
transition-duration: 0s;
|
||||||
transition-delay: 0s;
|
transition-delay: 0s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.wp-social-link a {
|
.wp-block-social-link a {
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
transition: transform 0.1s ease;
|
transition: transform 0.1s ease;
|
||||||
}
|
}
|
||||||
.wp-social-link a,
|
.wp-block-social-link:hover {
|
||||||
.wp-social-link a:hover,
|
transform: scale(1.1);
|
||||||
.wp-social-link a:active,
|
}
|
||||||
.wp-social-link a:visited,
|
|
||||||
.wp-social-link svg {
|
.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor, .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:hover, .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:active, .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:visited,
|
||||||
|
.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor svg {
|
||||||
color: currentColor;
|
color: currentColor;
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
}
|
}
|
||||||
.wp-social-link:hover {
|
|
||||||
transform: scale(1.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link {
|
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link {
|
||||||
background-color: #f0f0f0;
|
background-color: #f0f0f0;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1629,8 +1629,31 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
||||||
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -4px 0 0 var(--wp-admin-theme-color);
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -4px 0 0 var(--wp-admin-theme-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 782px) {
|
||||||
|
.edit-post-template__modal .components-base-control {
|
||||||
|
width: 320px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.edit-post-template__modal .components-modal__header {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.edit-post-template__modal .components-modal__content::before {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.edit-post-template__modal-actions {
|
.edit-post-template__modal-actions {
|
||||||
padding-top: 12px;
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edit-post-template-modal__tip {
|
||||||
|
padding: 16px 24px;
|
||||||
|
background: #f0f0f0;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
@media (min-width: 782px) {
|
||||||
|
.edit-post-template-modal__tip {
|
||||||
|
width: 240px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-post-template__actions button:not(:last-child) {
|
.edit-post-template__actions button:not(:last-child) {
|
||||||
|
@ -1760,8 +1783,9 @@ h2.edit-post-template-summary__title {
|
||||||
|
|
||||||
.edit-post-visual-editor__content-area {
|
.edit-post-visual-editor__content-area {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
min-height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-post-welcome-guide {
|
.edit-post-welcome-guide {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1633,8 +1633,31 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
||||||
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -4px 0 0 var(--wp-admin-theme-color);
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -4px 0 0 var(--wp-admin-theme-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 782px) {
|
||||||
|
.edit-post-template__modal .components-base-control {
|
||||||
|
width: 320px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.edit-post-template__modal .components-modal__header {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.edit-post-template__modal .components-modal__content::before {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.edit-post-template__modal-actions {
|
.edit-post-template__modal-actions {
|
||||||
padding-top: 12px;
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edit-post-template-modal__tip {
|
||||||
|
padding: 16px 24px;
|
||||||
|
background: #f0f0f0;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
@media (min-width: 782px) {
|
||||||
|
.edit-post-template-modal__tip {
|
||||||
|
width: 240px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-post-template__actions button:not(:last-child) {
|
.edit-post-template__actions button:not(:last-child) {
|
||||||
|
@ -1764,8 +1787,9 @@ h2.edit-post-template-summary__title {
|
||||||
|
|
||||||
.edit-post-visual-editor__content-area {
|
.edit-post-visual-editor__content-area {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
min-height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-post-welcome-guide {
|
.edit-post-welcome-guide {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -440,6 +440,18 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
||||||
.edit-widgets-header__actions {
|
.edit-widgets-header__actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
.edit-widgets-header__actions .components-button {
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
@media (min-width: 600px) {
|
||||||
|
.edit-widgets-header__actions .components-button {
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.edit-widgets-header__actions .edit-widgets-more-menu .components-button,
|
||||||
|
.edit-widgets-header__actions .interface-pinned-items .components-button {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.edit-widgets-header-toolbar {
|
.edit-widgets-header-toolbar {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -440,6 +440,18 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
||||||
.edit-widgets-header__actions {
|
.edit-widgets-header__actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
.edit-widgets-header__actions .components-button {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
@media (min-width: 600px) {
|
||||||
|
.edit-widgets-header__actions .components-button {
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.edit-widgets-header__actions .edit-widgets-more-menu .components-button,
|
||||||
|
.edit-widgets-header__actions .interface-pinned-items .components-button {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.edit-widgets-header-toolbar {
|
.edit-widgets-header-toolbar {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -68,6 +68,18 @@
|
||||||
/**
|
/**
|
||||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||||
*/
|
*/
|
||||||
|
:root {
|
||||||
|
--wp-admin-theme-color: #007cba;
|
||||||
|
--wp-admin-theme-color-darker-10: #006ba1;
|
||||||
|
--wp-admin-theme-color-darker-20: #005a87;
|
||||||
|
--wp-admin-border-width-focus: 2px;
|
||||||
|
}
|
||||||
|
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
||||||
|
:root {
|
||||||
|
--wp-admin-border-width-focus: 1.5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-form {
|
.wp-block-legacy-widget__edit-form {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
|
@ -127,8 +139,9 @@
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-no-preview {
|
.wp-block-legacy-widget__edit-no-preview {
|
||||||
background: #f0f0f0;
|
background: #f0f0f0;
|
||||||
padding: 8px 12px;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
padding: 8px 12px;
|
||||||
}
|
}
|
||||||
.wp-block-legacy-widget__edit-no-preview h3 {
|
.wp-block-legacy-widget__edit-no-preview h3 {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
|
@ -0,0 +1 @@
|
||||||
|
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-block-legacy-widget__edit-form{background:#fff;border-radius:2px;border:1px solid #1e1e1e;padding:11px}.wp-block-legacy-widget__edit-form .wp-block-legacy-widget__edit-form-title{color:#000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-weight:600;margin:0 0 12px}.wp-block-legacy-widget__edit-form .widget-inside{border:none;box-shadow:none;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.wp-block-legacy-widget__edit-form .widget-inside label{font-size:13px}.wp-block-legacy-widget__edit-form .widget-inside label+.widefat{margin-top:12px}.wp-block-legacy-widget__edit-form .widget.open{z-index:0}.wp-block-legacy-widget__edit-no-preview,.wp-block-legacy-widget__edit-preview{cursor:pointer}.wp-block-legacy-widget__edit-no-preview:hover:after,.wp-block-legacy-widget__edit-preview:hover:after{border-radius:2px;border:1px solid #949494;bottom:0;content:"";right:0;position:absolute;left:0;top:0}.wp-block-legacy-widget__edit-preview.is-offscreen{right:-9999px;position:absolute;top:0;width:100%}.wp-block-legacy-widget__edit-preview-iframe{overflow:hidden;width:100%}.wp-block-legacy-widget__edit-no-preview{background:#f0f0f0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;padding:8px 12px}.wp-block-legacy-widget__edit-no-preview h3{font-size:14px;font-weight:600;margin:4px 0}.wp-block-legacy-widget__edit-no-preview p{margin:4px 0}.wp-block-legacy-widget-inspector-card{padding:0 52px 16px 16px}.interface-complementary-area .wp-block-legacy-widget-inspector-card__name{margin:0 0 5px;font-weight:500}.is-selected .wp-block-legacy-widget__container{padding:8px 12px;min-height:50px}
|
|
@ -68,6 +68,18 @@
|
||||||
/**
|
/**
|
||||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||||
*/
|
*/
|
||||||
|
:root {
|
||||||
|
--wp-admin-theme-color: #007cba;
|
||||||
|
--wp-admin-theme-color-darker-10: #006ba1;
|
||||||
|
--wp-admin-theme-color-darker-20: #005a87;
|
||||||
|
--wp-admin-border-width-focus: 2px;
|
||||||
|
}
|
||||||
|
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
||||||
|
:root {
|
||||||
|
--wp-admin-border-width-focus: 1.5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-form {
|
.wp-block-legacy-widget__edit-form {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
|
@ -127,8 +139,9 @@
|
||||||
|
|
||||||
.wp-block-legacy-widget__edit-no-preview {
|
.wp-block-legacy-widget__edit-no-preview {
|
||||||
background: #f0f0f0;
|
background: #f0f0f0;
|
||||||
padding: 8px 12px;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
padding: 8px 12px;
|
||||||
}
|
}
|
||||||
.wp-block-legacy-widget__edit-no-preview h3 {
|
.wp-block-legacy-widget__edit-no-preview h3 {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
|
@ -0,0 +1 @@
|
||||||
|
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-block-legacy-widget__edit-form{background:#fff;border-radius:2px;border:1px solid #1e1e1e;padding:11px}.wp-block-legacy-widget__edit-form .wp-block-legacy-widget__edit-form-title{color:#000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-weight:600;margin:0 0 12px}.wp-block-legacy-widget__edit-form .widget-inside{border:none;box-shadow:none;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.wp-block-legacy-widget__edit-form .widget-inside label{font-size:13px}.wp-block-legacy-widget__edit-form .widget-inside label+.widefat{margin-top:12px}.wp-block-legacy-widget__edit-form .widget.open{z-index:0}.wp-block-legacy-widget__edit-no-preview,.wp-block-legacy-widget__edit-preview{cursor:pointer}.wp-block-legacy-widget__edit-no-preview:hover:after,.wp-block-legacy-widget__edit-preview:hover:after{border-radius:2px;border:1px solid #949494;bottom:0;content:"";left:0;position:absolute;right:0;top:0}.wp-block-legacy-widget__edit-preview.is-offscreen{left:-9999px;position:absolute;top:0;width:100%}.wp-block-legacy-widget__edit-preview-iframe{overflow:hidden;width:100%}.wp-block-legacy-widget__edit-no-preview{background:#f0f0f0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;padding:8px 12px}.wp-block-legacy-widget__edit-no-preview h3{font-size:14px;font-weight:600;margin:4px 0}.wp-block-legacy-widget__edit-no-preview p{margin:4px 0}.wp-block-legacy-widget-inspector-card{padding:0 16px 16px 52px}.interface-complementary-area .wp-block-legacy-widget-inspector-card__name{margin:0 0 5px;font-weight:500}.is-selected .wp-block-legacy-widget__container{padding:8px 12px;min-height:50px}
|
|
@ -7065,7 +7065,8 @@ __webpack_require__.d(__webpack_exports__, "__experimentalBlockVariationTransfor
|
||||||
__webpack_require__.d(__webpack_exports__, "BlockVerticalAlignmentToolbar", function() { return /* reexport */ BlockVerticalAlignmentToolbar; });
|
__webpack_require__.d(__webpack_exports__, "BlockVerticalAlignmentToolbar", function() { return /* reexport */ BlockVerticalAlignmentToolbar; });
|
||||||
__webpack_require__.d(__webpack_exports__, "BlockVerticalAlignmentControl", function() { return /* reexport */ BlockVerticalAlignmentControl; });
|
__webpack_require__.d(__webpack_exports__, "BlockVerticalAlignmentControl", function() { return /* reexport */ BlockVerticalAlignmentControl; });
|
||||||
__webpack_require__.d(__webpack_exports__, "__experimentalBorderStyleControl", function() { return /* reexport */ BorderStyleControl; });
|
__webpack_require__.d(__webpack_exports__, "__experimentalBorderStyleControl", function() { return /* reexport */ BorderStyleControl; });
|
||||||
__webpack_require__.d(__webpack_exports__, "ButtonBlockerAppender", function() { return /* reexport */ button_block_appender; });
|
__webpack_require__.d(__webpack_exports__, "ButtonBlockerAppender", function() { return /* reexport */ ButtonBlockerAppender; });
|
||||||
|
__webpack_require__.d(__webpack_exports__, "ButtonBlockAppender", function() { return /* reexport */ button_block_appender; });
|
||||||
__webpack_require__.d(__webpack_exports__, "ColorPalette", function() { return /* reexport */ color_palette; });
|
__webpack_require__.d(__webpack_exports__, "ColorPalette", function() { return /* reexport */ color_palette; });
|
||||||
__webpack_require__.d(__webpack_exports__, "ColorPaletteControl", function() { return /* reexport */ ColorPaletteControl; });
|
__webpack_require__.d(__webpack_exports__, "ColorPaletteControl", function() { return /* reexport */ ColorPaletteControl; });
|
||||||
__webpack_require__.d(__webpack_exports__, "ContrastChecker", function() { return /* reexport */ contrast_checker; });
|
__webpack_require__.d(__webpack_exports__, "ContrastChecker", function() { return /* reexport */ contrast_checker; });
|
||||||
|
@ -11493,6 +11494,13 @@ function actions_stopMultiSelect() {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function* actions_multiSelect(start, end) {
|
function* actions_multiSelect(start, end) {
|
||||||
|
const startBlockRootClientId = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockRootClientId', start);
|
||||||
|
const endBlockRootClientId = yield external_wp_data_["controls"].select(STORE_NAME, 'getBlockRootClientId', end); // Only allow block multi-selections at the same level.
|
||||||
|
|
||||||
|
if (startBlockRootClientId !== endBlockRootClientId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
yield {
|
yield {
|
||||||
type: 'MULTI_SELECT',
|
type: 'MULTI_SELECT',
|
||||||
start,
|
start,
|
||||||
|
@ -13515,18 +13523,11 @@ const deprecatedFlags = {
|
||||||
},
|
},
|
||||||
'spacing.customPadding': settings => settings.enableCustomSpacing
|
'spacing.customPadding': settings => settings.enableCustomSpacing
|
||||||
};
|
};
|
||||||
|
const PATHS_WITH_MERGE = {
|
||||||
const filterColorsFromCoreOrigin = (path, setting) => {
|
'color.gradients': true,
|
||||||
if (path !== 'color.palette' && path !== 'color.gradients') {
|
'color.palette': true,
|
||||||
return setting;
|
'typography.fontFamilies': true,
|
||||||
}
|
'typography.fontSizes': true
|
||||||
|
|
||||||
if (!Array.isArray(setting)) {
|
|
||||||
return setting;
|
|
||||||
}
|
|
||||||
|
|
||||||
const colors = setting.filter(color => (color === null || color === void 0 ? void 0 : color.origin) !== 'core');
|
|
||||||
return colors.length > 0 ? colors : setting;
|
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Hook that retrieves the editor setting.
|
* Hook that retrieves the editor setting.
|
||||||
|
@ -13542,7 +13543,6 @@ const filterColorsFromCoreOrigin = (path, setting) => {
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
function useSetting(path) {
|
function useSetting(path) {
|
||||||
const {
|
const {
|
||||||
name: blockName
|
name: blockName
|
||||||
|
@ -13558,14 +13558,20 @@ function useSetting(path) {
|
||||||
const experimentalFeaturesResult = (_get = Object(external_lodash_["get"])(settings, blockPath)) !== null && _get !== void 0 ? _get : Object(external_lodash_["get"])(settings, defaultsPath);
|
const experimentalFeaturesResult = (_get = Object(external_lodash_["get"])(settings, blockPath)) !== null && _get !== void 0 ? _get : Object(external_lodash_["get"])(settings, defaultsPath);
|
||||||
|
|
||||||
if (experimentalFeaturesResult !== undefined) {
|
if (experimentalFeaturesResult !== undefined) {
|
||||||
return filterColorsFromCoreOrigin(path, experimentalFeaturesResult);
|
if (PATHS_WITH_MERGE[path]) {
|
||||||
|
var _ref, _experimentalFeatures;
|
||||||
|
|
||||||
|
return (_ref = (_experimentalFeatures = experimentalFeaturesResult.user) !== null && _experimentalFeatures !== void 0 ? _experimentalFeatures : experimentalFeaturesResult.theme) !== null && _ref !== void 0 ? _ref : experimentalFeaturesResult.core;
|
||||||
|
}
|
||||||
|
|
||||||
|
return experimentalFeaturesResult;
|
||||||
} // 2 - Use deprecated settings, otherwise.
|
} // 2 - Use deprecated settings, otherwise.
|
||||||
|
|
||||||
|
|
||||||
const deprecatedSettingsValue = deprecatedFlags[path] ? deprecatedFlags[path](settings) : undefined;
|
const deprecatedSettingsValue = deprecatedFlags[path] ? deprecatedFlags[path](settings) : undefined;
|
||||||
|
|
||||||
if (deprecatedSettingsValue !== undefined) {
|
if (deprecatedSettingsValue !== undefined) {
|
||||||
return filterColorsFromCoreOrigin(path, deprecatedSettingsValue);
|
return deprecatedSettingsValue;
|
||||||
} // 3 - Fall back for typography.dropCap:
|
} // 3 - Fall back for typography.dropCap:
|
||||||
// This is only necessary to support typography.dropCap.
|
// This is only necessary to support typography.dropCap.
|
||||||
// when __experimentalFeatures are not present (core without plugin).
|
// when __experimentalFeatures are not present (core without plugin).
|
||||||
|
@ -19203,10 +19209,14 @@ function BlockTitle({
|
||||||
/**
|
/**
|
||||||
* Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb.
|
* Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb.
|
||||||
*
|
*
|
||||||
* @return {WPElement} Block Breadcrumb.
|
* @param {Object} props Component props.
|
||||||
|
* @param {string} props.rootLabelText Translated label for the root element of the breadcrumb trail.
|
||||||
|
* @return {WPElement} Block Breadcrumb.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function BlockBreadcrumb() {
|
function BlockBreadcrumb({
|
||||||
|
rootLabelText
|
||||||
|
}) {
|
||||||
const {
|
const {
|
||||||
selectBlock,
|
selectBlock,
|
||||||
clearSelectedBlock
|
clearSelectedBlock
|
||||||
|
@ -19228,6 +19238,8 @@ function BlockBreadcrumb() {
|
||||||
hasSelection: !!getSelectionStart().clientId
|
hasSelection: !!getSelectionStart().clientId
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const rootLabel = rootLabelText || Object(external_wp_i18n_["__"])('Document');
|
||||||
/*
|
/*
|
||||||
* Disable reason: The `list` ARIA role is redundant but
|
* Disable reason: The `list` ARIA role is redundant but
|
||||||
* Safari+VoiceOver won't announce the list otherwise.
|
* Safari+VoiceOver won't announce the list otherwise.
|
||||||
|
@ -19235,6 +19247,7 @@ function BlockBreadcrumb() {
|
||||||
|
|
||||||
/* eslint-disable jsx-a11y/no-redundant-roles */
|
/* eslint-disable jsx-a11y/no-redundant-roles */
|
||||||
|
|
||||||
|
|
||||||
return Object(external_wp_element_["createElement"])("ul", {
|
return Object(external_wp_element_["createElement"])("ul", {
|
||||||
className: "block-editor-block-breadcrumb",
|
className: "block-editor-block-breadcrumb",
|
||||||
role: "list",
|
role: "list",
|
||||||
|
@ -19246,7 +19259,7 @@ function BlockBreadcrumb() {
|
||||||
className: "block-editor-block-breadcrumb__button",
|
className: "block-editor-block-breadcrumb__button",
|
||||||
isTertiary: true,
|
isTertiary: true,
|
||||||
onClick: clearSelectedBlock
|
onClick: clearSelectedBlock
|
||||||
}, Object(external_wp_i18n_["__"])('Document')), !hasSelection && Object(external_wp_i18n_["__"])('Document')), parents.map(parentClientId => Object(external_wp_element_["createElement"])("li", {
|
}, rootLabel), !hasSelection && rootLabel), parents.map(parentClientId => Object(external_wp_element_["createElement"])("li", {
|
||||||
key: parentClientId
|
key: parentClientId
|
||||||
}, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
}, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
||||||
className: "block-editor-block-breadcrumb__button",
|
className: "block-editor-block-breadcrumb__button",
|
||||||
|
@ -20719,10 +20732,12 @@ function useBlockClassNames(clientId) {
|
||||||
getBlockName,
|
getBlockName,
|
||||||
getSettings,
|
getSettings,
|
||||||
hasSelectedInnerBlock,
|
hasSelectedInnerBlock,
|
||||||
|
isTyping,
|
||||||
__experimentalGetActiveBlockIdByBlockNames: getActiveBlockIdByBlockNames
|
__experimentalGetActiveBlockIdByBlockNames: getActiveBlockIdByBlockNames
|
||||||
} = select(store);
|
} = select(store);
|
||||||
const {
|
const {
|
||||||
__experimentalSpotlightEntityBlocks: spotlightEntityBlocks
|
__experimentalSpotlightEntityBlocks: spotlightEntityBlocks,
|
||||||
|
outlineMode
|
||||||
} = getSettings();
|
} = getSettings();
|
||||||
const isDragging = isBlockBeingDragged(clientId);
|
const isDragging = isBlockBeingDragged(clientId);
|
||||||
const isSelected = isBlockSelected(clientId);
|
const isSelected = isBlockSelected(clientId);
|
||||||
|
@ -20740,7 +20755,8 @@ function useBlockClassNames(clientId) {
|
||||||
'has-child-selected': isAncestorOfSelectedBlock,
|
'has-child-selected': isAncestorOfSelectedBlock,
|
||||||
'has-active-entity': activeEntityBlockId,
|
'has-active-entity': activeEntityBlockId,
|
||||||
// Determine if there is an active entity area to spotlight.
|
// Determine if there is an active entity area to spotlight.
|
||||||
'is-active-entity': activeEntityBlockId === clientId
|
'is-active-entity': activeEntityBlockId === clientId,
|
||||||
|
'remove-outline': isSelected && outlineMode && isTyping()
|
||||||
});
|
});
|
||||||
}, [clientId]);
|
}, [clientId]);
|
||||||
}
|
}
|
||||||
|
@ -23910,6 +23926,7 @@ function DefaultBlockAppender({
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal dependencies
|
* Internal dependencies
|
||||||
*/
|
*/
|
||||||
|
@ -23971,10 +23988,22 @@ function ButtonBlockAppender({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/button-block-appender/README.md
|
* Use `ButtonBlockAppender` instead.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
const ButtonBlockerAppender = Object(external_wp_element_["forwardRef"])((props, ref) => {
|
||||||
|
external_wp_deprecated_default()(`wp.blockEditor.ButtonBlockerAppender`, {
|
||||||
|
alternative: 'wp.blockEditor.ButtonBlockAppender'
|
||||||
|
});
|
||||||
|
return ButtonBlockAppender(props, ref);
|
||||||
|
});
|
||||||
|
/**
|
||||||
|
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/button-block-appender/README.md
|
||||||
|
*/
|
||||||
|
|
||||||
/* harmony default export */ var button_block_appender = (Object(external_wp_element_["forwardRef"])(ButtonBlockAppender));
|
/* harmony default export */ var button_block_appender = (Object(external_wp_element_["forwardRef"])(ButtonBlockAppender));
|
||||||
|
|
||||||
// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list-appender/index.js
|
// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list-appender/index.js
|
||||||
|
@ -24406,12 +24435,7 @@ function getNearestBlockIndex(elements, position, orientation) {
|
||||||
// If the user is dropping to the trailing edge of the block
|
// If the user is dropping to the trailing edge of the block
|
||||||
// add 1 to the index to represent dragging after.
|
// add 1 to the index to represent dragging after.
|
||||||
const isTrailingEdge = edge === 'bottom' || edge === 'right';
|
const isTrailingEdge = edge === 'bottom' || edge === 'right';
|
||||||
let offset = isTrailingEdge ? 1 : 0; // If the target is the dragged block itself and another 1 to
|
const offset = isTrailingEdge ? 1 : 0; // Update the currently known best candidate.
|
||||||
// index as the dragged block is set to `display: none` and
|
|
||||||
// should be skipped in the calculation.
|
|
||||||
|
|
||||||
const isTargetDraggedBlock = isTrailingEdge && elements[index + 1] && elements[index + 1].classList.contains('is-dragging');
|
|
||||||
offset += isTargetDraggedBlock ? 1 : 0; // Update the currently known best candidate.
|
|
||||||
|
|
||||||
candidateDistance = distance;
|
candidateDistance = distance;
|
||||||
candidateIndex = index + offset;
|
candidateIndex = index + offset;
|
||||||
|
@ -24438,32 +24462,28 @@ function useBlockDropZone({
|
||||||
rootClientId: targetRootClientId = ''
|
rootClientId: targetRootClientId = ''
|
||||||
} = {}) {
|
} = {}) {
|
||||||
const [targetBlockIndex, setTargetBlockIndex] = Object(external_wp_element_["useState"])(null);
|
const [targetBlockIndex, setTargetBlockIndex] = Object(external_wp_element_["useState"])(null);
|
||||||
const {
|
const isLockedAll = Object(external_wp_data_["useSelect"])(select => {
|
||||||
isLockedAll,
|
|
||||||
orientation
|
|
||||||
} = Object(external_wp_data_["useSelect"])(select => {
|
|
||||||
var _getBlockListSettings;
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
getBlockListSettings,
|
|
||||||
getTemplateLock
|
getTemplateLock
|
||||||
} = select(store);
|
} = select(store);
|
||||||
return {
|
return getTemplateLock(targetRootClientId) === 'all';
|
||||||
isLockedAll: getTemplateLock(targetRootClientId) === 'all',
|
|
||||||
orientation: (_getBlockListSettings = getBlockListSettings(targetRootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation
|
|
||||||
};
|
|
||||||
}, [targetRootClientId]);
|
}, [targetRootClientId]);
|
||||||
|
const {
|
||||||
|
getBlockListSettings
|
||||||
|
} = Object(external_wp_data_["useSelect"])(store);
|
||||||
const {
|
const {
|
||||||
showInsertionPoint,
|
showInsertionPoint,
|
||||||
hideInsertionPoint
|
hideInsertionPoint
|
||||||
} = Object(external_wp_data_["useDispatch"])(store);
|
} = Object(external_wp_data_["useDispatch"])(store);
|
||||||
const onBlockDrop = useOnBlockDrop(targetRootClientId, targetBlockIndex);
|
const onBlockDrop = useOnBlockDrop(targetRootClientId, targetBlockIndex);
|
||||||
const throttled = Object(external_wp_compose_["useThrottle"])(Object(external_wp_element_["useCallback"])((event, currentTarget) => {
|
const throttled = Object(external_wp_compose_["useThrottle"])(Object(external_wp_element_["useCallback"])((event, currentTarget) => {
|
||||||
|
var _getBlockListSettings;
|
||||||
|
|
||||||
const blockElements = Array.from(currentTarget.children);
|
const blockElements = Array.from(currentTarget.children);
|
||||||
const targetIndex = getNearestBlockIndex(blockElements, {
|
const targetIndex = getNearestBlockIndex(blockElements, {
|
||||||
x: event.clientX,
|
x: event.clientX,
|
||||||
y: event.clientY
|
y: event.clientY
|
||||||
}, orientation);
|
}, (_getBlockListSettings = getBlockListSettings(targetRootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation);
|
||||||
setTargetBlockIndex(targetIndex === undefined ? 0 : targetIndex);
|
setTargetBlockIndex(targetIndex === undefined ? 0 : targetIndex);
|
||||||
|
|
||||||
if (targetIndex !== null) {
|
if (targetIndex !== null) {
|
||||||
|
@ -24481,6 +24501,12 @@ function useBlockDropZone({
|
||||||
throttled(event, event.currentTarget);
|
throttled(event, event.currentTarget);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onDragLeave() {
|
||||||
|
throttled.cancel();
|
||||||
|
hideInsertionPoint();
|
||||||
|
setTargetBlockIndex(null);
|
||||||
|
},
|
||||||
|
|
||||||
onDragEnd() {
|
onDragEnd() {
|
||||||
throttled.cancel();
|
throttled.cancel();
|
||||||
hideInsertionPoint();
|
hideInsertionPoint();
|
||||||
|
@ -24560,7 +24586,6 @@ function InsertionPointPopover({
|
||||||
const ref = Object(external_wp_element_["useRef"])();
|
const ref = Object(external_wp_element_["useRef"])();
|
||||||
const {
|
const {
|
||||||
orientation,
|
orientation,
|
||||||
isHidden,
|
|
||||||
previousClientId,
|
previousClientId,
|
||||||
nextClientId,
|
nextClientId,
|
||||||
rootClientId,
|
rootClientId,
|
||||||
|
@ -24571,38 +24596,34 @@ function InsertionPointPopover({
|
||||||
const {
|
const {
|
||||||
getBlockOrder,
|
getBlockOrder,
|
||||||
getBlockListSettings,
|
getBlockListSettings,
|
||||||
getMultiSelectedBlockClientIds,
|
getBlockInsertionPoint,
|
||||||
getSelectedBlockClientId,
|
isBlockBeingDragged,
|
||||||
hasMultiSelection,
|
getPreviousBlockClientId,
|
||||||
getSettings,
|
getNextBlockClientId
|
||||||
getBlockInsertionPoint
|
|
||||||
} = select(store);
|
} = select(store);
|
||||||
const insertionPoint = getBlockInsertionPoint();
|
const insertionPoint = getBlockInsertionPoint();
|
||||||
const order = getBlockOrder(insertionPoint.rootClientId);
|
const order = getBlockOrder(insertionPoint.rootClientId);
|
||||||
const targetClientId = order[insertionPoint.index - 1];
|
|
||||||
const targetRootClientId = insertionPoint.rootClientId;
|
|
||||||
const blockOrder = getBlockOrder(targetRootClientId);
|
|
||||||
|
|
||||||
if (!blockOrder.length) {
|
if (!order.length) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const previous = targetClientId ? targetClientId : blockOrder[blockOrder.length - 1];
|
let _previousClientId = order[insertionPoint.index - 1];
|
||||||
const isLast = previous === blockOrder[blockOrder.length - 1];
|
let _nextClientId = order[insertionPoint.index];
|
||||||
const next = isLast ? null : blockOrder[blockOrder.indexOf(previous) + 1];
|
|
||||||
const {
|
while (isBlockBeingDragged(_previousClientId)) {
|
||||||
hasReducedUI
|
_previousClientId = getPreviousBlockClientId(_previousClientId);
|
||||||
} = getSettings();
|
}
|
||||||
const multiSelectedBlockClientIds = getMultiSelectedBlockClientIds();
|
|
||||||
const selectedBlockClientId = getSelectedBlockClientId();
|
while (isBlockBeingDragged(_nextClientId)) {
|
||||||
const blockOrientation = ((_getBlockListSettings = getBlockListSettings(targetRootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation) || 'vertical';
|
_nextClientId = getNextBlockClientId(_nextClientId);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
previousClientId: previous,
|
previousClientId: _previousClientId,
|
||||||
nextClientId: next,
|
nextClientId: _nextClientId,
|
||||||
isHidden: hasReducedUI || (hasMultiSelection() ? next && multiSelectedBlockClientIds.includes(next) : next && blockOrientation === 'vertical' && next === selectedBlockClientId),
|
orientation: ((_getBlockListSettings = getBlockListSettings(insertionPoint.rootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation) || 'vertical',
|
||||||
orientation: blockOrientation,
|
rootClientId: insertionPoint.rootClientId,
|
||||||
clientId: targetClientId,
|
|
||||||
rootClientId: targetRootClientId,
|
|
||||||
isInserterShown: insertionPoint === null || insertionPoint === void 0 ? void 0 : insertionPoint.__unstableWithInserter
|
isInserterShown: insertionPoint === null || insertionPoint === void 0 ? void 0 : insertionPoint.__unstableWithInserter
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
@ -24704,11 +24725,7 @@ function InsertionPointPopover({
|
||||||
// should serve the purpose of inserting blocks.
|
// should serve the purpose of inserting blocks.
|
||||||
|
|
||||||
|
|
||||||
const showInsertionPointInserter = !isHidden && nextElement && isInserterShown; // Show the indicator if the insertion point inserter is visible, or if
|
const showInsertionPointInserter = nextElement && isInserterShown;
|
||||||
// the `showInsertionPoint` state is `true`. The latter is generally true
|
|
||||||
// when hovering blocks for insertion in the block library.
|
|
||||||
|
|
||||||
const showInsertionPointIndicator = showInsertionPointInserter || !isHidden;
|
|
||||||
/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
|
/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
|
||||||
// While ideally it would be enough to capture the
|
// While ideally it would be enough to capture the
|
||||||
// bubbling focus event from the Inserter, due to the
|
// bubbling focus event from the Inserter, due to the
|
||||||
|
@ -24736,7 +24753,7 @@ function InsertionPointPopover({
|
||||||
'is-with-inserter': showInsertionPointInserter
|
'is-with-inserter': showInsertionPointInserter
|
||||||
}),
|
}),
|
||||||
style: style
|
style: style
|
||||||
}, showInsertionPointIndicator && Object(external_wp_element_["createElement"])("div", {
|
}, Object(external_wp_element_["createElement"])("div", {
|
||||||
className: "block-editor-block-list__insertion-point-indicator"
|
className: "block-editor-block-list__insertion-point-indicator"
|
||||||
}), showInsertionPointInserter && Object(external_wp_element_["createElement"])("div", {
|
}), showInsertionPointInserter && Object(external_wp_element_["createElement"])("div", {
|
||||||
className: classnames_default()('block-editor-block-list__insertion-point-inserter')
|
className: classnames_default()('block-editor-block-list__insertion-point-inserter')
|
||||||
|
@ -24761,11 +24778,7 @@ function InsertionPoint({
|
||||||
__unstableContentRef
|
__unstableContentRef
|
||||||
}) {
|
}) {
|
||||||
const isVisible = Object(external_wp_data_["useSelect"])(select => {
|
const isVisible = Object(external_wp_data_["useSelect"])(select => {
|
||||||
const {
|
return select(store).isBlockInsertionPointVisible();
|
||||||
isMultiSelecting,
|
|
||||||
isBlockInsertionPointVisible
|
|
||||||
} = select(store);
|
|
||||||
return isBlockInsertionPointVisible() && !isMultiSelecting();
|
|
||||||
}, []);
|
}, []);
|
||||||
return Object(external_wp_element_["createElement"])(InsertionPointOpenRef.Provider, {
|
return Object(external_wp_element_["createElement"])(InsertionPointOpenRef.Provider, {
|
||||||
value: Object(external_wp_element_["useRef"])(false)
|
value: Object(external_wp_element_["useRef"])(false)
|
||||||
|
@ -24790,18 +24803,24 @@ function InsertionPoint({
|
||||||
|
|
||||||
function useInBetweenInserter() {
|
function useInBetweenInserter() {
|
||||||
const openRef = Object(external_wp_element_["useContext"])(InsertionPointOpenRef);
|
const openRef = Object(external_wp_element_["useContext"])(InsertionPointOpenRef);
|
||||||
|
const hasReducedUI = Object(external_wp_data_["useSelect"])(select => select(store).getSettings().hasReducedUI, []);
|
||||||
const {
|
const {
|
||||||
getBlockListSettings,
|
getBlockListSettings,
|
||||||
getBlockRootClientId,
|
getBlockRootClientId,
|
||||||
getBlockIndex,
|
getBlockIndex,
|
||||||
isBlockInsertionPointVisible,
|
isBlockInsertionPointVisible,
|
||||||
isMultiSelecting
|
isMultiSelecting,
|
||||||
|
getSelectedBlockClientIds
|
||||||
} = Object(external_wp_data_["useSelect"])(store);
|
} = Object(external_wp_data_["useSelect"])(store);
|
||||||
const {
|
const {
|
||||||
showInsertionPoint,
|
showInsertionPoint,
|
||||||
hideInsertionPoint
|
hideInsertionPoint
|
||||||
} = Object(external_wp_data_["useDispatch"])(store);
|
} = Object(external_wp_data_["useDispatch"])(store);
|
||||||
return Object(external_wp_compose_["useRefEffect"])(node => {
|
return Object(external_wp_compose_["useRefEffect"])(node => {
|
||||||
|
if (hasReducedUI) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
function onMouseMove(event) {
|
function onMouseMove(event) {
|
||||||
var _getBlockListSettings;
|
var _getBlockListSettings;
|
||||||
|
|
||||||
|
@ -24855,6 +24874,12 @@ function useInBetweenInserter() {
|
||||||
|
|
||||||
if (!clientId) {
|
if (!clientId) {
|
||||||
return;
|
return;
|
||||||
|
} // Don't show the inserter when hovering above (conflicts with
|
||||||
|
// block toolbar) or inside selected block(s).
|
||||||
|
|
||||||
|
|
||||||
|
if (getSelectedBlockClientIds().includes(clientId)) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const elementRect = element.getBoundingClientRect();
|
const elementRect = element.getBoundingClientRect();
|
||||||
|
@ -24887,7 +24912,7 @@ function useInBetweenInserter() {
|
||||||
return () => {
|
return () => {
|
||||||
node.removeEventListener('mousemove', onMouseMove);
|
node.removeEventListener('mousemove', onMouseMove);
|
||||||
};
|
};
|
||||||
}, [openRef, getBlockListSettings, getBlockRootClientId, getBlockIndex, isBlockInsertionPointVisible, isMultiSelecting, showInsertionPoint, hideInsertionPoint]);
|
}, [openRef, getBlockListSettings, getBlockRootClientId, getBlockIndex, isBlockInsertionPointVisible, isMultiSelecting, showInsertionPoint, hideInsertionPoint, getSelectedBlockClientIds]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/pre-parse-patterns.js
|
// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/utils/pre-parse-patterns.js
|
||||||
|
@ -27872,6 +27897,21 @@ function BlockPopover({
|
||||||
hasFixedToolbar,
|
hasFixedToolbar,
|
||||||
lastClientId
|
lastClientId
|
||||||
} = Object(external_wp_data_["useSelect"])(block_popover_selector, []);
|
} = Object(external_wp_data_["useSelect"])(block_popover_selector, []);
|
||||||
|
const isInsertionPointVisible = Object(external_wp_data_["useSelect"])(select => {
|
||||||
|
const {
|
||||||
|
isBlockInsertionPointVisible,
|
||||||
|
getBlockInsertionPoint,
|
||||||
|
getBlockOrder
|
||||||
|
} = select(store);
|
||||||
|
|
||||||
|
if (!isBlockInsertionPointVisible()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const insertionPoint = getBlockInsertionPoint();
|
||||||
|
const order = getBlockOrder(insertionPoint.rootClientId);
|
||||||
|
return order[insertionPoint.index] === clientId;
|
||||||
|
}, [clientId]);
|
||||||
const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium');
|
const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium');
|
||||||
const [isToolbarForced, setIsToolbarForced] = Object(external_wp_element_["useState"])(false);
|
const [isToolbarForced, setIsToolbarForced] = Object(external_wp_element_["useState"])(false);
|
||||||
const [isInserterShown, setIsInserterShown] = Object(external_wp_element_["useState"])(false);
|
const [isInserterShown, setIsInserterShown] = Object(external_wp_element_["useState"])(false);
|
||||||
|
@ -27962,7 +28002,9 @@ function BlockPopover({
|
||||||
position: popoverPosition,
|
position: popoverPosition,
|
||||||
focusOnMount: false,
|
focusOnMount: false,
|
||||||
anchorRef: anchorRef,
|
anchorRef: anchorRef,
|
||||||
className: "block-editor-block-list__block-popover",
|
className: classnames_default()('block-editor-block-list__block-popover', {
|
||||||
|
'is-insertion-point-visible': isInsertionPointVisible
|
||||||
|
}),
|
||||||
__unstableStickyBoundaryElement: stickyBoundaryElement // Render in the old slot if needed for backward compatibility,
|
__unstableStickyBoundaryElement: stickyBoundaryElement // Render in the old slot if needed for backward compatibility,
|
||||||
// otherwise render in place (not in the the default popover slot).
|
// otherwise render in place (not in the the default popover slot).
|
||||||
,
|
,
|
||||||
|
@ -28216,13 +28258,11 @@ function Root({
|
||||||
}) {
|
}) {
|
||||||
const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium');
|
const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium');
|
||||||
const {
|
const {
|
||||||
isTyping,
|
|
||||||
isOutlineMode,
|
isOutlineMode,
|
||||||
isFocusMode,
|
isFocusMode,
|
||||||
isNavigationMode
|
isNavigationMode
|
||||||
} = Object(external_wp_data_["useSelect"])(select => {
|
} = Object(external_wp_data_["useSelect"])(select => {
|
||||||
const {
|
const {
|
||||||
isTyping: _isTyping,
|
|
||||||
getSettings,
|
getSettings,
|
||||||
isNavigationMode: _isNavigationMode
|
isNavigationMode: _isNavigationMode
|
||||||
} = select(store);
|
} = select(store);
|
||||||
|
@ -28231,7 +28271,6 @@ function Root({
|
||||||
focusMode
|
focusMode
|
||||||
} = getSettings();
|
} = getSettings();
|
||||||
return {
|
return {
|
||||||
isTyping: _isTyping(),
|
|
||||||
isOutlineMode: outlineMode,
|
isOutlineMode: outlineMode,
|
||||||
isFocusMode: focusMode,
|
isFocusMode: focusMode,
|
||||||
isNavigationMode: _isNavigationMode()
|
isNavigationMode: _isNavigationMode()
|
||||||
|
@ -28240,7 +28279,6 @@ function Root({
|
||||||
return Object(external_wp_element_["createElement"])("div", {
|
return Object(external_wp_element_["createElement"])("div", {
|
||||||
ref: Object(external_wp_compose_["useMergeRefs"])([useBlockSelectionClearer(), useBlockDropZone(), useInBetweenInserter()]),
|
ref: Object(external_wp_compose_["useMergeRefs"])([useBlockSelectionClearer(), useBlockDropZone(), useInBetweenInserter()]),
|
||||||
className: classnames_default()('block-editor-block-list__layout is-root-container', className, {
|
className: classnames_default()('block-editor-block-list__layout is-root-container', className, {
|
||||||
'is-typing': isTyping,
|
|
||||||
'is-outline-mode': isOutlineMode,
|
'is-outline-mode': isOutlineMode,
|
||||||
'is-focus-mode': isFocusMode && isLargeViewport,
|
'is-focus-mode': isFocusMode && isLargeViewport,
|
||||||
'is-navigate-mode': isNavigationMode
|
'is-navigate-mode': isNavigationMode
|
||||||
|
@ -28250,14 +28288,12 @@ function Root({
|
||||||
|
|
||||||
function BlockList({
|
function BlockList({
|
||||||
className,
|
className,
|
||||||
__experimentalLayout
|
...props
|
||||||
}) {
|
}) {
|
||||||
usePreParsePatterns();
|
usePreParsePatterns();
|
||||||
return Object(external_wp_element_["createElement"])(BlockToolsBackCompat, null, Object(external_wp_element_["createElement"])(Root, {
|
return Object(external_wp_element_["createElement"])(BlockToolsBackCompat, null, Object(external_wp_element_["createElement"])(Root, {
|
||||||
className: className
|
className: className
|
||||||
}, Object(external_wp_element_["createElement"])(BlockListItems, {
|
}, Object(external_wp_element_["createElement"])(BlockListItems, props)));
|
||||||
__experimentalLayout: __experimentalLayout
|
|
||||||
})));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Items({
|
function Items({
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1930,14 +1930,43 @@ function useDropZone({
|
||||||
const {
|
const {
|
||||||
ownerDocument
|
ownerDocument
|
||||||
} = element;
|
} = element;
|
||||||
|
/**
|
||||||
|
* Checks if an element is in the drop zone.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement|null} elementToCheck
|
||||||
|
*
|
||||||
|
* @return {boolean} True if in drop zone, false if not.
|
||||||
|
*/
|
||||||
|
|
||||||
function maybeDragStart(event) {
|
function isElementInZone(elementToCheck) {
|
||||||
|
if (!elementToCheck || !element.contains(elementToCheck)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
do {
|
||||||
|
if (elementToCheck.dataset.isDropZone) {
|
||||||
|
return elementToCheck === element;
|
||||||
|
}
|
||||||
|
} while (elementToCheck = elementToCheck.parentElement);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function maybeDragStart(
|
||||||
|
/** @type {DragEvent} */
|
||||||
|
event) {
|
||||||
if (isDragging) {
|
if (isDragging) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
isDragging = true;
|
isDragging = true;
|
||||||
ownerDocument.removeEventListener('dragenter', maybeDragStart);
|
ownerDocument.removeEventListener('dragenter', maybeDragStart); // Note that `dragend` doesn't fire consistently for file and
|
||||||
|
// HTML drag events where the drag origin is outside the browser
|
||||||
|
// window. In Firefox it may also not fire if the originating
|
||||||
|
// node is removed.
|
||||||
|
|
||||||
|
ownerDocument.addEventListener('dragend', maybeDragEnd);
|
||||||
|
ownerDocument.addEventListener('mousemove', maybeDragEnd);
|
||||||
|
|
||||||
if (onDragStartRef.current) {
|
if (onDragStartRef.current) {
|
||||||
onDragStartRef.current(event);
|
onDragStartRef.current(event);
|
||||||
|
@ -1976,7 +2005,7 @@ function useDropZone({
|
||||||
// leaving the drop zone, which means the `relatedTarget`
|
// leaving the drop zone, which means the `relatedTarget`
|
||||||
// (element that has been entered) should be outside the drop
|
// (element that has been entered) should be outside the drop
|
||||||
// zone.
|
// zone.
|
||||||
if (element.contains(event.relatedTarget)) {
|
if (isElementInZone(event.relatedTarget)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2014,32 +2043,30 @@ function useDropZone({
|
||||||
|
|
||||||
isDragging = false;
|
isDragging = false;
|
||||||
ownerDocument.addEventListener('dragenter', maybeDragStart);
|
ownerDocument.addEventListener('dragenter', maybeDragStart);
|
||||||
|
ownerDocument.removeEventListener('dragend', maybeDragEnd);
|
||||||
|
ownerDocument.removeEventListener('mousemove', maybeDragEnd);
|
||||||
|
|
||||||
if (onDragEndRef.current) {
|
if (onDragEndRef.current) {
|
||||||
onDragEndRef.current(event);
|
onDragEndRef.current(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
element.dataset.isDropZone = 'true';
|
||||||
element.addEventListener('drop', onDrop);
|
element.addEventListener('drop', onDrop);
|
||||||
element.addEventListener('dragenter', onDragEnter);
|
element.addEventListener('dragenter', onDragEnter);
|
||||||
element.addEventListener('dragover', onDragOver);
|
element.addEventListener('dragover', onDragOver);
|
||||||
element.addEventListener('dragleave', onDragLeave); // Note that `dragend` doesn't fire consistently for file and HTML
|
element.addEventListener('dragleave', onDragLeave); // The `dragstart` event doesn't fire if the drag started outside
|
||||||
// drag events where the drag origin is outside the browser window.
|
|
||||||
// In Firefox it may also not fire if the originating node is
|
|
||||||
// removed.
|
|
||||||
|
|
||||||
ownerDocument.addEventListener('dragend', maybeDragEnd);
|
|
||||||
ownerDocument.addEventListener('mouseup', maybeDragEnd); // The `dragstart` event doesn't fire if the drag started outside
|
|
||||||
// the document.
|
// the document.
|
||||||
|
|
||||||
ownerDocument.addEventListener('dragenter', maybeDragStart);
|
ownerDocument.addEventListener('dragenter', maybeDragStart);
|
||||||
return () => {
|
return () => {
|
||||||
|
delete element.dataset.isDropZone;
|
||||||
element.removeEventListener('drop', onDrop);
|
element.removeEventListener('drop', onDrop);
|
||||||
element.removeEventListener('dragenter', onDragEnter);
|
element.removeEventListener('dragenter', onDragEnter);
|
||||||
element.removeEventListener('dragover', onDragOver);
|
element.removeEventListener('dragover', onDragOver);
|
||||||
element.removeEventListener('dragleave', onDragLeave);
|
element.removeEventListener('dragleave', onDragLeave);
|
||||||
ownerDocument.removeEventListener('dragend', maybeDragEnd);
|
ownerDocument.removeEventListener('dragend', maybeDragEnd);
|
||||||
ownerDocument.removeEventListener('mouseup', maybeDragEnd);
|
ownerDocument.removeEventListener('mousemove', maybeDragEnd);
|
||||||
ownerDocument.addEventListener('dragenter', maybeDragStart);
|
ownerDocument.addEventListener('dragenter', maybeDragStart);
|
||||||
};
|
};
|
||||||
}, [isDisabled]);
|
}, [isDisabled]);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -619,6 +619,7 @@ __webpack_require__.d(build_module_selectors_namespaceObject, "getThemeSupports"
|
||||||
__webpack_require__.d(build_module_selectors_namespaceObject, "getEmbedPreview", function() { return getEmbedPreview; });
|
__webpack_require__.d(build_module_selectors_namespaceObject, "getEmbedPreview", function() { return getEmbedPreview; });
|
||||||
__webpack_require__.d(build_module_selectors_namespaceObject, "isPreviewEmbedFallback", function() { return isPreviewEmbedFallback; });
|
__webpack_require__.d(build_module_selectors_namespaceObject, "isPreviewEmbedFallback", function() { return isPreviewEmbedFallback; });
|
||||||
__webpack_require__.d(build_module_selectors_namespaceObject, "canUser", function() { return canUser; });
|
__webpack_require__.d(build_module_selectors_namespaceObject, "canUser", function() { return canUser; });
|
||||||
|
__webpack_require__.d(build_module_selectors_namespaceObject, "canUserEditEntityRecord", function() { return canUserEditEntityRecord; });
|
||||||
__webpack_require__.d(build_module_selectors_namespaceObject, "getAutosaves", function() { return getAutosaves; });
|
__webpack_require__.d(build_module_selectors_namespaceObject, "getAutosaves", function() { return getAutosaves; });
|
||||||
__webpack_require__.d(build_module_selectors_namespaceObject, "getAutosave", function() { return getAutosave; });
|
__webpack_require__.d(build_module_selectors_namespaceObject, "getAutosave", function() { return getAutosave; });
|
||||||
__webpack_require__.d(build_module_selectors_namespaceObject, "hasFetchedAutosaves", function() { return hasFetchedAutosaves; });
|
__webpack_require__.d(build_module_selectors_namespaceObject, "hasFetchedAutosaves", function() { return hasFetchedAutosaves; });
|
||||||
|
@ -639,6 +640,7 @@ __webpack_require__.d(resolvers_namespaceObject, "getCurrentTheme", function() {
|
||||||
__webpack_require__.d(resolvers_namespaceObject, "getThemeSupports", function() { return resolvers_getThemeSupports; });
|
__webpack_require__.d(resolvers_namespaceObject, "getThemeSupports", function() { return resolvers_getThemeSupports; });
|
||||||
__webpack_require__.d(resolvers_namespaceObject, "getEmbedPreview", function() { return resolvers_getEmbedPreview; });
|
__webpack_require__.d(resolvers_namespaceObject, "getEmbedPreview", function() { return resolvers_getEmbedPreview; });
|
||||||
__webpack_require__.d(resolvers_namespaceObject, "canUser", function() { return resolvers_canUser; });
|
__webpack_require__.d(resolvers_namespaceObject, "canUser", function() { return resolvers_canUser; });
|
||||||
|
__webpack_require__.d(resolvers_namespaceObject, "canUserEditEntityRecord", function() { return resolvers_canUserEditEntityRecord; });
|
||||||
__webpack_require__.d(resolvers_namespaceObject, "getAutosaves", function() { return resolvers_getAutosaves; });
|
__webpack_require__.d(resolvers_namespaceObject, "getAutosaves", function() { return resolvers_getAutosaves; });
|
||||||
__webpack_require__.d(resolvers_namespaceObject, "getAutosave", function() { return resolvers_getAutosave; });
|
__webpack_require__.d(resolvers_namespaceObject, "getAutosave", function() { return resolvers_getAutosave; });
|
||||||
__webpack_require__.d(resolvers_namespaceObject, "__experimentalGetTemplateForLink", function() { return resolvers_experimentalGetTemplateForLink; });
|
__webpack_require__.d(resolvers_namespaceObject, "__experimentalGetTemplateForLink", function() { return resolvers_experimentalGetTemplateForLink; });
|
||||||
|
@ -3852,6 +3854,28 @@ function canUser(state, action, resource, id) {
|
||||||
const key = Object(external_lodash_["compact"])([action, resource, id]).join('/');
|
const key = Object(external_lodash_["compact"])([action, resource, id]).join('/');
|
||||||
return Object(external_lodash_["get"])(state, ['userPermissions', key]);
|
return Object(external_lodash_["get"])(state, ['userPermissions', key]);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Returns whether the current user can edit the given entity.
|
||||||
|
*
|
||||||
|
* Calling this may trigger an OPTIONS request to the REST API via the
|
||||||
|
* `canUser()` resolver.
|
||||||
|
*
|
||||||
|
* https://developer.wordpress.org/rest-api/reference/
|
||||||
|
*
|
||||||
|
* @param {Object} state Data state.
|
||||||
|
* @param {string} kind Entity kind.
|
||||||
|
* @param {string} name Entity name.
|
||||||
|
* @param {number} key Record's key.
|
||||||
|
* @param {string} recordId Record's id.
|
||||||
|
* @return {boolean|undefined} Whether or not the user can edit,
|
||||||
|
* or `undefined` if the OPTIONS request is still being made.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function canUserEditEntityRecord(state, kind, name, key, recordId) {
|
||||||
|
const entity = getEntityRecord(state, kind, name, key);
|
||||||
|
const resource = (entity === null || entity === void 0 ? void 0 : entity.rest_base) || '';
|
||||||
|
return canUser(state, 'update', resource, recordId);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Returns the latest autosaves for the post.
|
* Returns the latest autosaves for the post.
|
||||||
*
|
*
|
||||||
|
@ -4297,6 +4321,21 @@ function* resolvers_canUser(action, resource, id) {
|
||||||
const isAllowed = Object(external_lodash_["includes"])(allowHeader, method);
|
const isAllowed = Object(external_lodash_["includes"])(allowHeader, method);
|
||||||
yield receiveUserPermission(key, isAllowed);
|
yield receiveUserPermission(key, isAllowed);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Checks whether the current user can perform the given action on the given
|
||||||
|
* REST resource.
|
||||||
|
*
|
||||||
|
* @param {string} kind Entity kind.
|
||||||
|
* @param {string} name Entity name.
|
||||||
|
* @param {number} key Record's key.
|
||||||
|
* @param {string} recordId Record's id.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function* resolvers_canUserEditEntityRecord(kind, name, key, recordId) {
|
||||||
|
const entity = yield external_wp_data_["controls"].select('core', 'getEntityRecord', kind, name, key);
|
||||||
|
const resource = (entity === null || entity === void 0 ? void 0 : entity.rest_base) || '';
|
||||||
|
yield resolvers_canUser('update', resource, recordId);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Request autosave data from the REST API.
|
* Request autosave data from the REST API.
|
||||||
*
|
*
|
||||||
|
@ -4505,9 +4544,12 @@ function useEntityId(kind, type) {
|
||||||
* @param {string} prop The property name.
|
* @param {string} prop The property name.
|
||||||
* @param {string} [_id] An entity ID to use instead of the context-provided one.
|
* @param {string} [_id] An entity ID to use instead of the context-provided one.
|
||||||
*
|
*
|
||||||
* @return {[*, Function]} A tuple where the first item is the
|
* @return {[*, Function, *]} An array where the first item is the
|
||||||
* property value and the second is the
|
* property value, the second is the
|
||||||
* setter.
|
* setter and the third is the full value
|
||||||
|
* object from REST API containing more
|
||||||
|
* information like `raw`, `rendered` and
|
||||||
|
* `protected` props.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function useEntityProp(kind, type, prop, _id) {
|
function useEntityProp(kind, type, prop, _id) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1498,7 +1498,9 @@ function SidebarBlockEditor({
|
||||||
isInserterOpened: isInserterOpened,
|
isInserterOpened: isInserterOpened,
|
||||||
setIsInserterOpened: setIsInserterOpened,
|
setIsInserterOpened: setIsInserterOpened,
|
||||||
isFixedToolbarActive: isFixedToolbarActive
|
isFixedToolbarActive: isFixedToolbarActive
|
||||||
}), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockTools"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockSelectionClearer"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["WritingFlow"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["ObserveTyping"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockList"], null))))), Object(external_wp_element_["createPortal"])( // This is a temporary hack to prevent button component inside <BlockInspector>
|
}), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockTools"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockSelectionClearer"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["WritingFlow"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["ObserveTyping"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockList"], {
|
||||||
|
renderAppender: external_wp_blockEditor_["ButtonBlockAppender"]
|
||||||
|
}))))), Object(external_wp_element_["createPortal"])( // This is a temporary hack to prevent button component inside <BlockInspector>
|
||||||
// from submitting form when type="button" is not specified.
|
// from submitting form when type="button" is not specified.
|
||||||
Object(external_wp_element_["createElement"])("form", {
|
Object(external_wp_element_["createElement"])("form", {
|
||||||
onSubmit: event => event.preventDefault()
|
onSubmit: event => event.preventDefault()
|
||||||
|
@ -2422,6 +2424,7 @@ function initialize(editorName, blockEditorSettings) {
|
||||||
const coreBlocks = Object(external_wp_blockLibrary_["__experimentalGetCoreBlocks"])().filter(block => !['core/more'].includes(block.name));
|
const coreBlocks = Object(external_wp_blockLibrary_["__experimentalGetCoreBlocks"])().filter(block => !['core/more'].includes(block.name));
|
||||||
|
|
||||||
Object(external_wp_blockLibrary_["registerCoreBlocks"])(coreBlocks);
|
Object(external_wp_blockLibrary_["registerCoreBlocks"])(coreBlocks);
|
||||||
|
Object(external_wp_widgets_["registerLegacyWidgetBlock"])();
|
||||||
|
|
||||||
if (false) {}
|
if (false) {}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3345,11 +3345,11 @@ function useSelect(_mapSelect, deps) {
|
||||||
errorMessage += `\nThe error may be correlated with this previous error:\n`;
|
errorMessage += `\nThe error may be correlated with this previous error:\n`;
|
||||||
errorMessage += `${latestMapOutputError.current.stack}\n\n`;
|
errorMessage += `${latestMapOutputError.current.stack}\n\n`;
|
||||||
errorMessage += 'Original stack trace:';
|
errorMessage += 'Original stack trace:';
|
||||||
throw new Error(errorMessage);
|
} // eslint-disable-next-line no-console
|
||||||
} else {
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.error(errorMessage);
|
console.error(errorMessage);
|
||||||
}
|
mapOutput = latestMapOutput.current;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3986,10 +3986,14 @@ function __spreadArrays() {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
function __spreadArray(to, from) {
|
function __spreadArray(to, from, pack) {
|
||||||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||||
to[j] = from[i];
|
if (ar || !(i in from)) {
|
||||||
return to;
|
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||||
|
ar[i] = from[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return to.concat(ar || from);
|
||||||
}
|
}
|
||||||
|
|
||||||
function __await(v) {
|
function __await(v) {
|
||||||
|
@ -5035,10 +5039,14 @@ function tslib_es6_spreadArrays() {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
function tslib_es6_spreadArray(to, from) {
|
function tslib_es6_spreadArray(to, from, pack) {
|
||||||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||||
to[j] = from[i];
|
if (ar || !(i in from)) {
|
||||||
return to;
|
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||||
|
ar[i] = from[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return to.concat(ar || from);
|
||||||
}
|
}
|
||||||
|
|
||||||
function tslib_es6_await(v) {
|
function tslib_es6_await(v) {
|
||||||
|
@ -6579,10 +6587,14 @@ function tslib_tslib_es6_spreadArrays() {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
function tslib_tslib_es6_spreadArray(to, from) {
|
function tslib_tslib_es6_spreadArray(to, from, pack) {
|
||||||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||||
to[j] = from[i];
|
if (ar || !(i in from)) {
|
||||||
return to;
|
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||||
|
ar[i] = from[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return to.concat(ar || from);
|
||||||
}
|
}
|
||||||
|
|
||||||
function tslib_tslib_es6_await(v) {
|
function tslib_tslib_es6_await(v) {
|
||||||
|
@ -13132,7 +13144,7 @@ function VisualEditor({
|
||||||
setIsEditingTemplate
|
setIsEditingTemplate
|
||||||
} = Object(external_wp_data_["useDispatch"])(store["a" /* store */]);
|
} = Object(external_wp_data_["useDispatch"])(store["a" /* store */]);
|
||||||
const desktopCanvasStyles = {
|
const desktopCanvasStyles = {
|
||||||
height: '100%',
|
minHeight: '100%',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
margin: 0,
|
margin: 0,
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
@ -16787,7 +16799,7 @@ function PostTemplateActions() {
|
||||||
isLink: true,
|
isLink: true,
|
||||||
onClick: () => setIsModalOpen(true)
|
onClick: () => setIsModalOpen(true)
|
||||||
}, Object(external_wp_i18n_["__"])('New'))), isModalOpen && Object(external_wp_element_["createElement"])(external_wp_components_["Modal"], {
|
}, Object(external_wp_i18n_["__"])('New'))), isModalOpen && Object(external_wp_element_["createElement"])(external_wp_components_["Modal"], {
|
||||||
title: Object(external_wp_i18n_["__"])('Create a custom template'),
|
title: Object(external_wp_i18n_["__"])('Create custom template'),
|
||||||
closeLabel: Object(external_wp_i18n_["__"])('Close'),
|
closeLabel: Object(external_wp_i18n_["__"])('Close'),
|
||||||
onRequestClose: () => {
|
onRequestClose: () => {
|
||||||
setIsModalOpen(false);
|
setIsModalOpen(false);
|
||||||
|
@ -16814,15 +16826,20 @@ function PostTemplateActions() {
|
||||||
|
|
||||||
setIsModalOpen(false);
|
setIsModalOpen(false);
|
||||||
}
|
}
|
||||||
}, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
|
}, Object(external_wp_element_["createElement"])(external_wp_components_["Flex"], {
|
||||||
|
align: "flex-start",
|
||||||
|
gap: 8
|
||||||
|
}, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
|
||||||
label: Object(external_wp_i18n_["__"])('Name'),
|
label: Object(external_wp_i18n_["__"])('Name'),
|
||||||
value: title,
|
value: title,
|
||||||
onChange: setTitle
|
onChange: setTitle,
|
||||||
}), Object(external_wp_element_["createElement"])(external_wp_components_["Flex"], {
|
help: Object(external_wp_i18n_["__"])('Describe the purpose of the template, e.g. "Full Width". Custom templates can be applied to any post or page.')
|
||||||
className: "edit-post-post-template__modal-actions",
|
}))), Object(external_wp_element_["createElement"])(external_wp_components_["Flex"], {
|
||||||
justify: "flex-end"
|
className: "edit-post-template__modal-actions",
|
||||||
|
justify: "flex-end",
|
||||||
|
expanded: false
|
||||||
}, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
}, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
||||||
isSecondary: true,
|
isTertiary: true,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
setIsModalOpen(false);
|
setIsModalOpen(false);
|
||||||
setTitle('');
|
setTitle('');
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -235,7 +235,8 @@ var external_lodash_ = __webpack_require__("YLtl");
|
||||||
const PREFERENCES_DEFAULTS = {
|
const PREFERENCES_DEFAULTS = {
|
||||||
features: {
|
features: {
|
||||||
fixedToolbar: false,
|
fixedToolbar: false,
|
||||||
welcomeGuide: true
|
welcomeGuide: true,
|
||||||
|
showBlockBreadcrumbs: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -777,11 +778,14 @@ function* saveWidgetArea(widgetAreaId) {
|
||||||
const widget = transformBlockToWidget(block, oldWidget); // We'll replace the null widgetId after save, but we track it here
|
const widget = transformBlockToWidget(block, oldWidget); // We'll replace the null widgetId after save, but we track it here
|
||||||
// since order is important.
|
// since order is important.
|
||||||
|
|
||||||
sidebarWidgetsIds.push(widgetId);
|
sidebarWidgetsIds.push(widgetId); // We need to check for the id in the widget object here, because a deleted
|
||||||
|
// and restored widget won't have this id.
|
||||||
|
|
||||||
if (widgetId) {
|
if (widget.id) {
|
||||||
yield dispatch('core', 'editEntityRecord', 'root', 'widget', widgetId, { ...widget,
|
yield dispatch('core', 'editEntityRecord', 'root', 'widget', widgetId, { ...widget,
|
||||||
sidebar: widgetAreaId
|
sidebar: widgetAreaId
|
||||||
|
}, {
|
||||||
|
undoIgnore: true
|
||||||
});
|
});
|
||||||
const hasEdits = yield controls_select('core', 'hasEditsForEntityRecord', 'root', 'widget', widgetId);
|
const hasEdits = yield controls_select('core', 'hasEditsForEntityRecord', 'root', 'widget', widgetId);
|
||||||
|
|
||||||
|
@ -824,10 +828,10 @@ function* saveWidgetArea(widgetAreaId) {
|
||||||
const {
|
const {
|
||||||
block,
|
block,
|
||||||
position
|
position
|
||||||
} = batchMeta[i];
|
} = batchMeta[i]; // Set __internalWidgetId on the block. This will be persisted to the
|
||||||
yield dispatch('core/block-editor', 'updateBlockAttributes', block.clientId, {
|
// store when we dispatch receiveEntityRecords( post ) below.
|
||||||
__internalWidgetId: widget.id
|
|
||||||
});
|
post.blocks[position].attributes.__internalWidgetId = widget.id;
|
||||||
const error = yield controls_select('core', 'getLastEntitySaveError', 'root', 'widget', widget.id);
|
const error = yield controls_select('core', 'getLastEntitySaveError', 'root', 'widget', widget.id);
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
|
@ -849,6 +853,8 @@ function* saveWidgetArea(widgetAreaId) {
|
||||||
|
|
||||||
yield dispatch('core', 'editEntityRecord', KIND, WIDGET_AREA_ENTITY_TYPE, widgetAreaId, {
|
yield dispatch('core', 'editEntityRecord', KIND, WIDGET_AREA_ENTITY_TYPE, widgetAreaId, {
|
||||||
widgets: sidebarWidgetsIds
|
widgets: sidebarWidgetsIds
|
||||||
|
}, {
|
||||||
|
undoIgnore: true
|
||||||
});
|
});
|
||||||
yield* trySaveWidgetArea(widgetAreaId);
|
yield* trySaveWidgetArea(widgetAreaId);
|
||||||
yield dispatch('core', 'receiveEntityRecords', KIND, POST_TYPE, post, undefined);
|
yield dispatch('core', 'receiveEntityRecords', KIND, POST_TYPE, post, undefined);
|
||||||
|
@ -1400,7 +1406,7 @@ function WidgetAreaInnerBlocks() {
|
||||||
onInput: onInput,
|
onInput: onInput,
|
||||||
onChange: onChange,
|
onChange: onChange,
|
||||||
templateLock: false,
|
templateLock: false,
|
||||||
renderAppender: external_wp_blockEditor_["InnerBlocks"].DefaultBlockAppender
|
renderAppender: external_wp_blockEditor_["InnerBlocks"].ButtonBlockAppender
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2560,6 +2566,12 @@ function MoreMenu() {
|
||||||
info: Object(external_wp_i18n_["__"])('Aids screen readers by stopping text caret from leaving blocks.'),
|
info: Object(external_wp_i18n_["__"])('Aids screen readers by stopping text caret from leaving blocks.'),
|
||||||
messageActivated: Object(external_wp_i18n_["__"])('Contain text cursor inside block activated'),
|
messageActivated: Object(external_wp_i18n_["__"])('Contain text cursor inside block activated'),
|
||||||
messageDeactivated: Object(external_wp_i18n_["__"])('Contain text cursor inside block deactivated')
|
messageDeactivated: Object(external_wp_i18n_["__"])('Contain text cursor inside block deactivated')
|
||||||
|
}), Object(external_wp_element_["createElement"])(FeatureToggle, {
|
||||||
|
feature: "showBlockBreadcrumbs",
|
||||||
|
label: Object(external_wp_i18n_["__"])('Display block breadcrumbs'),
|
||||||
|
info: Object(external_wp_i18n_["__"])('Shows block breadcrumbs at the bottom of the editor.'),
|
||||||
|
messageActivated: Object(external_wp_i18n_["__"])('Display block breadcrumbs activated'),
|
||||||
|
messageDeactivated: Object(external_wp_i18n_["__"])('Display block breadcrumbs deactivated')
|
||||||
})))), Object(external_wp_element_["createElement"])(KeyboardShortcutHelpModal, {
|
})))), Object(external_wp_element_["createElement"])(KeyboardShortcutHelpModal, {
|
||||||
isModalActive: isKeyboardShortcutsModalActive,
|
isModalActive: isKeyboardShortcutsModalActive,
|
||||||
toggleModal: toggleKeyboardShortcutsModal
|
toggleModal: toggleKeyboardShortcutsModal
|
||||||
|
@ -2826,7 +2838,10 @@ const interfaceLabels = {
|
||||||
body: Object(external_wp_i18n_["__"])('Widgets and blocks'),
|
body: Object(external_wp_i18n_["__"])('Widgets and blocks'),
|
||||||
|
|
||||||
/* translators: accessibility text for the widgets screen settings landmark region. */
|
/* translators: accessibility text for the widgets screen settings landmark region. */
|
||||||
sidebar: Object(external_wp_i18n_["__"])('Widgets settings')
|
sidebar: Object(external_wp_i18n_["__"])('Widgets settings'),
|
||||||
|
|
||||||
|
/* translators: accessibility text for the widgets screen footer landmark region. */
|
||||||
|
footer: Object(external_wp_i18n_["__"])('Widgets footer')
|
||||||
};
|
};
|
||||||
|
|
||||||
function Interface({
|
function Interface({
|
||||||
|
@ -2843,11 +2858,13 @@ function Interface({
|
||||||
insertionIndex
|
insertionIndex
|
||||||
} = use_widget_library_insertion_point();
|
} = use_widget_library_insertion_point();
|
||||||
const {
|
const {
|
||||||
|
hasBlockBreadCrumbsEnabled,
|
||||||
hasSidebarEnabled,
|
hasSidebarEnabled,
|
||||||
isInserterOpened
|
isInserterOpened
|
||||||
} = Object(external_wp_data_["useSelect"])(select => ({
|
} = Object(external_wp_data_["useSelect"])(select => ({
|
||||||
hasSidebarEnabled: !!select(build_module["g" /* store */]).getActiveComplementaryArea(store.name),
|
hasSidebarEnabled: !!select(build_module["g" /* store */]).getActiveComplementaryArea(store.name),
|
||||||
isInserterOpened: !!select(store).isInserterOpened()
|
isInserterOpened: !!select(store).isInserterOpened(),
|
||||||
|
hasBlockBreadCrumbsEnabled: select(store).__unstableIsFeatureActive('showBlockBreadcrumbs')
|
||||||
}), []); // Inserter and Sidebars are mutually exclusive
|
}), []); // Inserter and Sidebars are mutually exclusive
|
||||||
|
|
||||||
Object(external_wp_element_["useEffect"])(() => {
|
Object(external_wp_element_["useEffect"])(() => {
|
||||||
|
@ -2888,7 +2905,12 @@ function Interface({
|
||||||
}),
|
}),
|
||||||
content: Object(external_wp_element_["createElement"])(WidgetAreasBlockEditorContent, {
|
content: Object(external_wp_element_["createElement"])(WidgetAreasBlockEditorContent, {
|
||||||
blockEditorSettings: blockEditorSettings
|
blockEditorSettings: blockEditorSettings
|
||||||
})
|
}),
|
||||||
|
footer: hasBlockBreadCrumbsEnabled && !isMobileViewport && Object(external_wp_element_["createElement"])("div", {
|
||||||
|
className: "edit-widgets-layout__footer"
|
||||||
|
}, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockBreadcrumb"], {
|
||||||
|
rootLabelText: Object(external_wp_i18n_["__"])('Widgets')
|
||||||
|
}))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3119,6 +3141,7 @@ function initialize(id, settings) {
|
||||||
const coreBlocks = Object(external_wp_blockLibrary_["__experimentalGetCoreBlocks"])().filter(block => !['core/more'].includes(block.name));
|
const coreBlocks = Object(external_wp_blockLibrary_["__experimentalGetCoreBlocks"])().filter(block => !['core/more'].includes(block.name));
|
||||||
|
|
||||||
Object(external_wp_blockLibrary_["registerCoreBlocks"])(coreBlocks);
|
Object(external_wp_blockLibrary_["registerCoreBlocks"])(coreBlocks);
|
||||||
|
Object(external_wp_widgets_["registerLegacyWidgetBlock"])();
|
||||||
|
|
||||||
if (false) {}
|
if (false) {}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1553,15 +1553,18 @@ function wp_default_styles( $styles ) {
|
||||||
'list-reusable-blocks' => array( 'wp-components' ),
|
'list-reusable-blocks' => array( 'wp-components' ),
|
||||||
'reusable-blocks' => array( 'wp-components' ),
|
'reusable-blocks' => array( 'wp-components' ),
|
||||||
'nux' => array( 'wp-components' ),
|
'nux' => array( 'wp-components' ),
|
||||||
'edit-widgets' => array(
|
'widgets' => array(
|
||||||
'wp-components',
|
'wp-components',
|
||||||
|
),
|
||||||
|
'edit-widgets' => array(
|
||||||
|
'wp-widgets',
|
||||||
'wp-block-editor',
|
'wp-block-editor',
|
||||||
'wp-edit-blocks',
|
'wp-edit-blocks',
|
||||||
'wp-block-library',
|
'wp-block-library',
|
||||||
'wp-reusable-blocks',
|
'wp-reusable-blocks',
|
||||||
),
|
),
|
||||||
'customize-widgets' => array(
|
'customize-widgets' => array(
|
||||||
'wp-components',
|
'wp-widgets',
|
||||||
'wp-block-editor',
|
'wp-block-editor',
|
||||||
'wp-edit-blocks',
|
'wp-edit-blocks',
|
||||||
'wp-block-library',
|
'wp-block-library',
|
||||||
|
@ -1622,12 +1625,15 @@ function wp_default_styles( $styles ) {
|
||||||
'wp-block-library',
|
'wp-block-library',
|
||||||
'wp-block-directory',
|
'wp-block-directory',
|
||||||
'wp-components',
|
'wp-components',
|
||||||
|
'wp-customize-widgets',
|
||||||
'wp-edit-post',
|
'wp-edit-post',
|
||||||
|
'wp-edit-widgets',
|
||||||
'wp-editor',
|
'wp-editor',
|
||||||
'wp-format-library',
|
'wp-format-library',
|
||||||
'wp-list-reusable-blocks',
|
'wp-list-reusable-blocks',
|
||||||
'wp-reusable-blocks',
|
'wp-reusable-blocks',
|
||||||
'wp-nux',
|
'wp-nux',
|
||||||
|
'wp-widgets',
|
||||||
// Deprecated CSS.
|
// Deprecated CSS.
|
||||||
'deprecated-media',
|
'deprecated-media',
|
||||||
'farbtastic',
|
'farbtastic',
|
||||||
|
|
|
@ -76,10 +76,16 @@ function wp_filter_wp_template_unique_post_slug( $override_slug, $slug, $post_ID
|
||||||
*/
|
*/
|
||||||
function the_block_template_skip_link() {
|
function the_block_template_skip_link() {
|
||||||
|
|
||||||
// Early exit if not an FSE theme.
|
// Early exit if not a block theme.
|
||||||
if ( ! current_theme_supports( 'block-templates' ) ) {
|
if ( ! current_theme_supports( 'block-templates' ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Early exit if not a block template.
|
||||||
|
global $_wp_current_template_content;
|
||||||
|
if ( ! $_wp_current_template_content ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -137,7 +143,12 @@ function the_block_template_skip_link() {
|
||||||
|
|
||||||
// Get the site wrapper.
|
// Get the site wrapper.
|
||||||
// The skip-link will be injected in the beginning of it.
|
// The skip-link will be injected in the beginning of it.
|
||||||
parentEl = document.querySelector( '.wp-site-blocks' ) || document.body,
|
parentEl = document.querySelector( '.wp-site-blocks' );
|
||||||
|
|
||||||
|
// Early exit if the root element was not found.
|
||||||
|
if ( ! parentEl ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the skip-link target's ID, and generate one if it doesn't exist.
|
// Get the skip-link target's ID, and generate one if it doesn't exist.
|
||||||
skipLinkTargetID = skipLinkTarget.id;
|
skipLinkTargetID = skipLinkTarget.id;
|
||||||
|
|
|
@ -50,74 +50,62 @@
|
||||||
{
|
{
|
||||||
"name": "Vivid cyan blue to vivid purple",
|
"name": "Vivid cyan blue to vivid purple",
|
||||||
"gradient": "linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",
|
"gradient": "linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",
|
||||||
"slug": "vivid-cyan-blue-to-vivid-purple",
|
"slug": "vivid-cyan-blue-to-vivid-purple"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Light green cyan to vivid green cyan",
|
"name": "Light green cyan to vivid green cyan",
|
||||||
"gradient": "linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",
|
"gradient": "linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",
|
||||||
"slug": "light-green-cyan-to-vivid-green-cyan",
|
"slug": "light-green-cyan-to-vivid-green-cyan"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Luminous vivid amber to luminous vivid orange",
|
"name": "Luminous vivid amber to luminous vivid orange",
|
||||||
"gradient": "linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",
|
"gradient": "linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",
|
||||||
"slug": "luminous-vivid-amber-to-luminous-vivid-orange",
|
"slug": "luminous-vivid-amber-to-luminous-vivid-orange"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Luminous vivid orange to vivid red",
|
"name": "Luminous vivid orange to vivid red",
|
||||||
"gradient": "linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",
|
"gradient": "linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",
|
||||||
"slug": "luminous-vivid-orange-to-vivid-red",
|
"slug": "luminous-vivid-orange-to-vivid-red"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Very light gray to cyan bluish gray",
|
"name": "Very light gray to cyan bluish gray",
|
||||||
"gradient": "linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",
|
"gradient": "linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",
|
||||||
"slug": "very-light-gray-to-cyan-bluish-gray",
|
"slug": "very-light-gray-to-cyan-bluish-gray"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Cool to warm spectrum",
|
"name": "Cool to warm spectrum",
|
||||||
"gradient": "linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",
|
"gradient": "linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",
|
||||||
"slug": "cool-to-warm-spectrum",
|
"slug": "cool-to-warm-spectrum"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Blush light purple",
|
"name": "Blush light purple",
|
||||||
"gradient": "linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",
|
"gradient": "linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",
|
||||||
"slug": "blush-light-purple",
|
"slug": "blush-light-purple"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Blush bordeaux",
|
"name": "Blush bordeaux",
|
||||||
"gradient": "linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",
|
"gradient": "linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",
|
||||||
"slug": "blush-bordeaux",
|
"slug": "blush-bordeaux"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Luminous dusk",
|
"name": "Luminous dusk",
|
||||||
"gradient": "linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",
|
"gradient": "linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",
|
||||||
"slug": "luminous-dusk",
|
"slug": "luminous-dusk"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Pale ocean",
|
"name": "Pale ocean",
|
||||||
"gradient": "linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",
|
"gradient": "linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",
|
||||||
"slug": "pale-ocean",
|
"slug": "pale-ocean"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Electric grass",
|
"name": "Electric grass",
|
||||||
"gradient": "linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",
|
"gradient": "linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",
|
||||||
"slug": "electric-grass",
|
"slug": "electric-grass"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Midnight",
|
"name": "Midnight",
|
||||||
"gradient": "linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",
|
"gradient": "linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",
|
||||||
"slug": "midnight",
|
"slug": "midnight"
|
||||||
"origin": "core"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"link": false,
|
"link": false,
|
||||||
|
@ -125,74 +113,62 @@
|
||||||
{
|
{
|
||||||
"name": "Black",
|
"name": "Black",
|
||||||
"slug": "black",
|
"slug": "black",
|
||||||
"color": "#000000",
|
"color": "#000000"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Cyan bluish gray",
|
"name": "Cyan bluish gray",
|
||||||
"slug": "cyan-bluish-gray",
|
"slug": "cyan-bluish-gray",
|
||||||
"color": "#abb8c3",
|
"color": "#abb8c3"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "White",
|
"name": "White",
|
||||||
"slug": "white",
|
"slug": "white",
|
||||||
"color": "#ffffff",
|
"color": "#ffffff"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Pale pink",
|
"name": "Pale pink",
|
||||||
"slug": "pale-pink",
|
"slug": "pale-pink",
|
||||||
"color": "#f78da7",
|
"color": "#f78da7"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Vivid red",
|
"name": "Vivid red",
|
||||||
"slug": "vivid-red",
|
"slug": "vivid-red",
|
||||||
"color": "#cf2e2e",
|
"color": "#cf2e2e"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Luminous vivid orange",
|
"name": "Luminous vivid orange",
|
||||||
"slug": "luminous-vivid-orange",
|
"slug": "luminous-vivid-orange",
|
||||||
"color": "#ff6900",
|
"color": "#ff6900"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Luminous vivid amber",
|
"name": "Luminous vivid amber",
|
||||||
"slug": "luminous-vivid-amber",
|
"slug": "luminous-vivid-amber",
|
||||||
"color": "#fcb900",
|
"color": "#fcb900"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Light green cyan",
|
"name": "Light green cyan",
|
||||||
"slug": "light-green-cyan",
|
"slug": "light-green-cyan",
|
||||||
"color": "#7bdcb5",
|
"color": "#7bdcb5"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Vivid green cyan",
|
"name": "Vivid green cyan",
|
||||||
"slug": "vivid-green-cyan",
|
"slug": "vivid-green-cyan",
|
||||||
"color": "#00d084",
|
"color": "#00d084"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Pale cyan blue",
|
"name": "Pale cyan blue",
|
||||||
"slug": "pale-cyan-blue",
|
"slug": "pale-cyan-blue",
|
||||||
"color": "#8ed1fc",
|
"color": "#8ed1fc"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Vivid cyan blue",
|
"name": "Vivid cyan blue",
|
||||||
"slug": "vivid-cyan-blue",
|
"slug": "vivid-cyan-blue",
|
||||||
"color": "#0693e3",
|
"color": "#0693e3"
|
||||||
"origin": "core"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Vivid purple",
|
"name": "Vivid purple",
|
||||||
"slug": "vivid-purple",
|
"slug": "vivid-purple",
|
||||||
"color": "#9b51e0",
|
"color": "#9b51e0"
|
||||||
"origin": "core"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.8-beta1-51148';
|
$wp_version = '5.8-beta1-51149';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue