Editor: Update Packages with the latest bug fixes for 6.5 beta 2.
It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59197 Props youknowriad, get_dave. See #60315. Built from https://develop.svn.wordpress.org/trunk@57663 git-svn-id: http://core.svn.wordpress.org/trunk@57164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
63656c178b
commit
433fd94980
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -234,9 +234,6 @@
|
||||||
'link'
|
'link'
|
||||||
),
|
),
|
||||||
'textdomain' => 'default',
|
'textdomain' => 'default',
|
||||||
'usesContext' => array(
|
|
||||||
'pattern/overrides'
|
|
||||||
),
|
|
||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'tagName' => array(
|
'tagName' => array(
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
|
@ -2218,9 +2215,6 @@
|
||||||
'subtitle'
|
'subtitle'
|
||||||
),
|
),
|
||||||
'textdomain' => 'default',
|
'textdomain' => 'default',
|
||||||
'usesContext' => array(
|
|
||||||
'pattern/overrides'
|
|
||||||
),
|
|
||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'textAlign' => array(
|
'textAlign' => array(
|
||||||
'type' => 'string'
|
'type' => 'string'
|
||||||
|
@ -2369,8 +2363,7 @@
|
||||||
'usesContext' => array(
|
'usesContext' => array(
|
||||||
'allowResize',
|
'allowResize',
|
||||||
'imageCrop',
|
'imageCrop',
|
||||||
'fixedHeight',
|
'fixedHeight'
|
||||||
'pattern/overrides'
|
|
||||||
),
|
),
|
||||||
'description' => 'Insert an image to make a visual statement.',
|
'description' => 'Insert an image to make a visual statement.',
|
||||||
'keywords' => array(
|
'keywords' => array(
|
||||||
|
@ -3621,8 +3614,7 @@
|
||||||
),
|
),
|
||||||
'textdomain' => 'default',
|
'textdomain' => 'default',
|
||||||
'usesContext' => array(
|
'usesContext' => array(
|
||||||
'postId',
|
'postId'
|
||||||
'pattern/overrides'
|
|
||||||
),
|
),
|
||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'align' => array(
|
'align' => array(
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
"description": "Prompt visitors to take action with a button-style link.",
|
"description": "Prompt visitors to take action with a button-style link.",
|
||||||
"keywords": [ "link" ],
|
"keywords": [ "link" ],
|
||||||
"textdomain": "default",
|
"textdomain": "default",
|
||||||
"usesContext": [ "pattern/overrides" ],
|
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"tagName": {
|
"tagName": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|
|
@ -68,15 +68,30 @@ function render_block_core_footnotes( $attributes, $content, $block ) {
|
||||||
* @since 6.3.0
|
* @since 6.3.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_footnotes() {
|
function register_block_core_footnotes() {
|
||||||
$post_types = get_post_types(
|
register_block_type_from_metadata(
|
||||||
|
__DIR__ . '/footnotes',
|
||||||
array(
|
array(
|
||||||
'show_in_rest' => true,
|
'render_callback' => 'render_block_core_footnotes',
|
||||||
'public' => true,
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
add_action( 'init', 'register_block_core_footnotes' );
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers the footnotes meta field required for footnotes to work.
|
||||||
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*/
|
||||||
|
function register_block_core_footnotes_post_meta() {
|
||||||
|
$post_types = get_post_types( array( 'show_in_rest' => true ) );
|
||||||
foreach ( $post_types as $post_type ) {
|
foreach ( $post_types as $post_type ) {
|
||||||
// Only register the meta field if the post type supports the editor, custom fields, and revisions.
|
// Only register the meta field if the post type supports the editor, custom fields, and revisions.
|
||||||
if ( post_type_supports( $post_type, 'editor' ) && post_type_supports( $post_type, 'custom-fields' ) && post_type_supports( $post_type, 'revisions' ) ) {
|
if (
|
||||||
|
post_type_supports( $post_type, 'editor' ) &&
|
||||||
|
post_type_supports( $post_type, 'custom-fields' ) &&
|
||||||
|
post_type_supports( $post_type, 'revisions' )
|
||||||
|
) {
|
||||||
register_post_meta(
|
register_post_meta(
|
||||||
$post_type,
|
$post_type,
|
||||||
'footnotes',
|
'footnotes',
|
||||||
|
@ -89,14 +104,12 @@ function register_block_core_footnotes() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
register_block_type_from_metadata(
|
|
||||||
__DIR__ . '/footnotes',
|
|
||||||
array(
|
|
||||||
'render_callback' => 'render_block_core_footnotes',
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
add_action( 'init', 'register_block_core_footnotes' );
|
/**
|
||||||
|
* Most post types are registered at priority 10, so use priority 20 here in
|
||||||
|
* order to catch them.
|
||||||
|
*/
|
||||||
|
add_action( 'init', 'register_block_core_footnotes_post_meta', 20 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the footnotes field to the revisions display.
|
* Adds the footnotes field to the revisions display.
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
"description": "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",
|
"description": "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",
|
||||||
"keywords": [ "title", "subtitle" ],
|
"keywords": [ "title", "subtitle" ],
|
||||||
"textdomain": "default",
|
"textdomain": "default",
|
||||||
"usesContext": [ "pattern/overrides" ],
|
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"textAlign": {
|
"textAlign": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|
|
@ -4,12 +4,7 @@
|
||||||
"name": "core/image",
|
"name": "core/image",
|
||||||
"title": "Image",
|
"title": "Image",
|
||||||
"category": "media",
|
"category": "media",
|
||||||
"usesContext": [
|
"usesContext": [ "allowResize", "imageCrop", "fixedHeight" ],
|
||||||
"allowResize",
|
|
||||||
"imageCrop",
|
|
||||||
"fixedHeight",
|
|
||||||
"pattern/overrides"
|
|
||||||
],
|
|
||||||
"description": "Insert an image to make a visual statement.",
|
"description": "Insert an image to make a visual statement.",
|
||||||
"keywords": [ "img", "photo", "picture" ],
|
"keywords": [ "img", "photo", "picture" ],
|
||||||
"textdomain": "default",
|
"textdomain": "default",
|
||||||
|
|
|
@ -128,3 +128,7 @@ figure.wp-block-image:not(.wp-block){
|
||||||
padding-right:0;
|
padding-right:0;
|
||||||
width:36px;
|
width:36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wp-block-image__toolbar_content_textarea{
|
||||||
|
width:250px;
|
||||||
|
}
|
|
@ -1 +1 @@
|
||||||
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none!important}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image .block-bindings-media-placeholder-message,.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.wp-block-image.wp-block-image.is-selected .block-bindings-media-placeholder-message{opacity:1}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=right]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__aspect-ratio{align-items:center;display:flex;height:46px;margin-bottom:-8px}.wp-block-image__aspect-ratio .components-button{padding-left:0;padding-right:0;width:36px}
|
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none!important}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image .block-bindings-media-placeholder-message,.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.wp-block-image.wp-block-image.is-selected .block-bindings-media-placeholder-message{opacity:1}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=right]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__aspect-ratio{align-items:center;display:flex;height:46px;margin-bottom:-8px}.wp-block-image__aspect-ratio .components-button{padding-left:0;padding-right:0;width:36px}.wp-block-image__toolbar_content_textarea{width:250px}
|
|
@ -128,3 +128,7 @@ figure.wp-block-image:not(.wp-block){
|
||||||
padding-right:0;
|
padding-right:0;
|
||||||
width:36px;
|
width:36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wp-block-image__toolbar_content_textarea{
|
||||||
|
width:250px;
|
||||||
|
}
|
|
@ -1 +1 @@
|
||||||
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none!important}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image .block-bindings-media-placeholder-message,.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.wp-block-image.wp-block-image.is-selected .block-bindings-media-placeholder-message{opacity:1}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=right]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__aspect-ratio{align-items:center;display:flex;height:46px;margin-bottom:-8px}.wp-block-image__aspect-ratio .components-button{padding-left:0;padding-right:0;width:36px}
|
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none!important}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image .block-bindings-media-placeholder-message,.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.wp-block-image.wp-block-image.is-selected .block-bindings-media-placeholder-message{opacity:1}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=right]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__aspect-ratio{align-items:center;display:flex;height:46px;margin-bottom:-8px}.wp-block-image__aspect-ratio .components-button{padding-left:0;padding-right:0;width:36px}.wp-block-image__toolbar_content_textarea{width:250px}
|
|
@ -392,7 +392,6 @@ function block_core_navigation_link_build_variations() {
|
||||||
* Registers the navigation link block.
|
* Registers the navigation link block.
|
||||||
*
|
*
|
||||||
* @uses render_block_core_navigation_link()
|
* @uses render_block_core_navigation_link()
|
||||||
* @uses build_navigation_link_block_variations()
|
|
||||||
* @throws WP_Error An WP_Error exception parsing the block definition.
|
* @throws WP_Error An WP_Error exception parsing the block definition.
|
||||||
*/
|
*/
|
||||||
function register_block_core_navigation_link() {
|
function register_block_core_navigation_link() {
|
||||||
|
|
|
@ -218,7 +218,7 @@ class WP_Navigation_Block_Renderer {
|
||||||
// it encounters whitespace. This code strips it.
|
// it encounters whitespace. This code strips it.
|
||||||
$blocks = block_core_navigation_filter_out_empty_blocks( $parsed_blocks );
|
$blocks = block_core_navigation_filter_out_empty_blocks( $parsed_blocks );
|
||||||
|
|
||||||
if ( function_exists( 'get_hooked_block_markup' ) ) {
|
if ( function_exists( 'set_ignored_hooked_blocks_metadata' ) ) {
|
||||||
// Run Block Hooks algorithm to inject hooked blocks.
|
// Run Block Hooks algorithm to inject hooked blocks.
|
||||||
$markup = block_core_navigation_insert_hooked_blocks( $blocks, $navigation_post );
|
$markup = block_core_navigation_insert_hooked_blocks( $blocks, $navigation_post );
|
||||||
$root_nav_block = parse_blocks( $markup )[0];
|
$root_nav_block = parse_blocks( $markup )[0];
|
||||||
|
@ -390,25 +390,16 @@ class WP_Navigation_Block_Renderer {
|
||||||
$text_decoration = $attributes['style']['typography']['textDecoration'] ?? null;
|
$text_decoration = $attributes['style']['typography']['textDecoration'] ?? null;
|
||||||
$text_decoration_class = sprintf( 'has-text-decoration-%s', $text_decoration );
|
$text_decoration_class = sprintf( 'has-text-decoration-%s', $text_decoration );
|
||||||
|
|
||||||
// Sets the is-collapsed class when the navigation is set to always use the overlay.
|
|
||||||
// This saves us from needing to do this check in the view.js file (see the collapseNav function).
|
|
||||||
$is_collapsed_class = static::is_always_overlay( $attributes ) ? array( 'is-collapsed' ) : array();
|
|
||||||
|
|
||||||
$classes = array_merge(
|
$classes = array_merge(
|
||||||
$colors['css_classes'],
|
$colors['css_classes'],
|
||||||
$font_sizes['css_classes'],
|
$font_sizes['css_classes'],
|
||||||
$is_responsive_menu ? array( 'is-responsive' ) : array(),
|
$is_responsive_menu ? array( 'is-responsive' ) : array(),
|
||||||
$layout_class ? array( $layout_class ) : array(),
|
$layout_class ? array( $layout_class ) : array(),
|
||||||
$text_decoration ? array( $text_decoration_class ) : array(),
|
$text_decoration ? array( $text_decoration_class ) : array()
|
||||||
$is_collapsed_class
|
|
||||||
);
|
);
|
||||||
return implode( ' ', $classes );
|
return implode( ' ', $classes );
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function is_always_overlay( $attributes ) {
|
|
||||||
return isset( $attributes['overlayMenu'] ) && 'always' === $attributes['overlayMenu'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get styles for the navigation block.
|
* Get styles for the navigation block.
|
||||||
*
|
*
|
||||||
|
@ -435,12 +426,16 @@ class WP_Navigation_Block_Renderer {
|
||||||
$colors = block_core_navigation_build_css_colors( $attributes );
|
$colors = block_core_navigation_build_css_colors( $attributes );
|
||||||
$modal_unique_id = wp_unique_id( 'modal-' );
|
$modal_unique_id = wp_unique_id( 'modal-' );
|
||||||
|
|
||||||
|
$is_hidden_by_default = isset( $attributes['overlayMenu'] ) && 'always' === $attributes['overlayMenu'];
|
||||||
|
|
||||||
$responsive_container_classes = array(
|
$responsive_container_classes = array(
|
||||||
'wp-block-navigation__responsive-container',
|
'wp-block-navigation__responsive-container',
|
||||||
|
$is_hidden_by_default ? 'hidden-by-default' : '',
|
||||||
implode( ' ', $colors['overlay_css_classes'] ),
|
implode( ' ', $colors['overlay_css_classes'] ),
|
||||||
);
|
);
|
||||||
$open_button_classes = array(
|
$open_button_classes = array(
|
||||||
'wp-block-navigation__responsive-container-open',
|
'wp-block-navigation__responsive-container-open',
|
||||||
|
$is_hidden_by_default ? 'always-shown' : '',
|
||||||
);
|
);
|
||||||
|
|
||||||
$should_display_icon_label = isset( $attributes['hasIcon'] ) && true === $attributes['hasIcon'];
|
$should_display_icon_label = isset( $attributes['hasIcon'] ) && true === $attributes['hasIcon'];
|
||||||
|
@ -538,7 +533,7 @@ class WP_Navigation_Block_Renderer {
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( $is_responsive_menu ) {
|
if ( $is_responsive_menu ) {
|
||||||
$nav_element_directives = static::get_nav_element_directives( $is_interactive, $attributes );
|
$nav_element_directives = static::get_nav_element_directives( $is_interactive );
|
||||||
$wrapper_attributes .= ' ' . $nav_element_directives;
|
$wrapper_attributes .= ' ' . $nav_element_directives;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -552,7 +547,7 @@ class WP_Navigation_Block_Renderer {
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @return string the directives for the navigation element.
|
* @return string the directives for the navigation element.
|
||||||
*/
|
*/
|
||||||
private static function get_nav_element_directives( $is_interactive, $attributes ) {
|
private static function get_nav_element_directives( $is_interactive ) {
|
||||||
if ( ! $is_interactive ) {
|
if ( ! $is_interactive ) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -569,16 +564,6 @@ class WP_Navigation_Block_Renderer {
|
||||||
data-wp-interactive="core/navigation"'
|
data-wp-interactive="core/navigation"'
|
||||||
. $nav_element_context;
|
. $nav_element_context;
|
||||||
|
|
||||||
/*
|
|
||||||
* When the navigation's 'overlayMenu' attribute is set to 'always', JavaScript
|
|
||||||
* is not needed for collapsing the menu because the class is set manually.
|
|
||||||
*/
|
|
||||||
if ( ! static::is_always_overlay( $attributes ) ) {
|
|
||||||
$nav_element_directives .= 'data-wp-init="callbacks.initNav"';
|
|
||||||
$nav_element_directives .= ' '; // space separator
|
|
||||||
$nav_element_directives .= 'data-wp-class--is-collapsed="context.isCollapsed"';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $nav_element_directives;
|
return $nav_element_directives;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1024,7 +1009,7 @@ function block_core_navigation_get_fallback_blocks() {
|
||||||
// In this case default to the (Page List) fallback.
|
// In this case default to the (Page List) fallback.
|
||||||
$fallback_blocks = ! empty( $maybe_fallback ) ? $maybe_fallback : $fallback_blocks;
|
$fallback_blocks = ! empty( $maybe_fallback ) ? $maybe_fallback : $fallback_blocks;
|
||||||
|
|
||||||
if ( function_exists( 'get_hooked_block_markup' ) ) {
|
if ( function_exists( 'set_ignored_hooked_blocks_metadata' ) ) {
|
||||||
// Run Block Hooks algorithm to inject hooked blocks.
|
// Run Block Hooks algorithm to inject hooked blocks.
|
||||||
// We have to run it here because we need the post ID of the Navigation block to track ignored hooked blocks.
|
// We have to run it here because we need the post ID of the Navigation block to track ignored hooked blocks.
|
||||||
$markup = block_core_navigation_insert_hooked_blocks( $fallback_blocks, $navigation_post );
|
$markup = block_core_navigation_insert_hooked_blocks( $fallback_blocks, $navigation_post );
|
||||||
|
@ -1369,25 +1354,28 @@ function block_core_navigation_get_most_recently_published_navigation() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert hooked blocks into a Navigation block.
|
* Accepts the serialized markup of a block and its inner blocks, and returns serialized markup of the inner blocks.
|
||||||
*
|
*
|
||||||
* Given a Navigation block's inner blocks and its corresponding `wp_navigation` post object,
|
* @param string $serialized_block The serialized markup of a block and its inner blocks.
|
||||||
* this function inserts hooked blocks into it, and returns the serialized inner blocks in a
|
* @return string
|
||||||
* mock Navigation block wrapper.
|
*/
|
||||||
*
|
function block_core_navigation_remove_serialized_parent_block( $serialized_block ) {
|
||||||
* If there are any hooked blocks that need to be inserted as the Navigation block's first or last
|
$start = strpos( $serialized_block, '-->' ) + strlen( '-->' );
|
||||||
* children, the `wp_navigation` post's `_wp_ignored_hooked_blocks` meta is checked to see if any
|
$end = strrpos( $serialized_block, '<!--' );
|
||||||
* of those hooked blocks should be exempted from insertion.
|
return substr( $serialized_block, $start, $end - $start );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mock a parsed block for the Navigation block given its inner blocks and the `wp_navigation` post object.
|
||||||
|
* The `wp_navigation` post's `_wp_ignored_hooked_blocks` meta is queried to add the `metadata.ignoredHookedBlocks` attribute.
|
||||||
*
|
*
|
||||||
* @param array $inner_blocks Parsed inner blocks of a Navigation block.
|
* @param array $inner_blocks Parsed inner blocks of a Navigation block.
|
||||||
* @param WP_Post $post `wp_navigation` post object corresponding to the block.
|
* @param WP_Post $post `wp_navigation` post object corresponding to the block.
|
||||||
* @return string Serialized inner blocks in mock Navigation block wrapper, with hooked blocks inserted, if any.
|
*
|
||||||
|
* @return array the normalized parsed blocks.
|
||||||
*/
|
*/
|
||||||
function block_core_navigation_insert_hooked_blocks( $inner_blocks, $post ) {
|
function block_core_navigation_mock_parsed_block( $inner_blocks, $post ) {
|
||||||
$before_block_visitor = null;
|
$attributes = array();
|
||||||
$after_block_visitor = null;
|
|
||||||
$hooked_blocks = get_hooked_blocks();
|
|
||||||
$attributes = array();
|
|
||||||
|
|
||||||
if ( isset( $post->ID ) ) {
|
if ( isset( $post->ID ) ) {
|
||||||
$ignored_hooked_blocks = get_post_meta( $post->ID, '_wp_ignored_hooked_blocks', true );
|
$ignored_hooked_blocks = get_post_meta( $post->ID, '_wp_ignored_hooked_blocks', true );
|
||||||
|
@ -1405,15 +1393,62 @@ function block_core_navigation_insert_hooked_blocks( $inner_blocks, $post ) {
|
||||||
'innerBlocks' => $inner_blocks,
|
'innerBlocks' => $inner_blocks,
|
||||||
'innerContent' => array_fill( 0, count( $inner_blocks ), null ),
|
'innerContent' => array_fill( 0, count( $inner_blocks ), null ),
|
||||||
);
|
);
|
||||||
$before_block_visitor = null;
|
|
||||||
$after_block_visitor = null;
|
return $mock_anchor_parent_block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Insert hooked blocks into a Navigation block.
|
||||||
|
*
|
||||||
|
* Given a Navigation block's inner blocks and its corresponding `wp_navigation` post object,
|
||||||
|
* this function inserts hooked blocks into it, and returns the serialized inner blocks in a
|
||||||
|
* mock Navigation block wrapper.
|
||||||
|
*
|
||||||
|
* If there are any hooked blocks that need to be inserted as the Navigation block's first or last
|
||||||
|
* children, the `wp_navigation` post's `_wp_ignored_hooked_blocks` meta is checked to see if any
|
||||||
|
* of those hooked blocks should be exempted from insertion.
|
||||||
|
*
|
||||||
|
* @param array $inner_blocks Parsed inner blocks of a Navigation block.
|
||||||
|
* @param WP_Post $post `wp_navigation` post object corresponding to the block.
|
||||||
|
* @return string Serialized inner blocks in mock Navigation block wrapper, with hooked blocks inserted, if any.
|
||||||
|
*/
|
||||||
|
function block_core_navigation_insert_hooked_blocks( $inner_blocks, $post ) {
|
||||||
|
$mock_navigation_block = block_core_navigation_mock_parsed_block( $inner_blocks, $post );
|
||||||
|
$hooked_blocks = get_hooked_blocks();
|
||||||
|
$before_block_visitor = null;
|
||||||
|
$after_block_visitor = null;
|
||||||
|
|
||||||
if ( ! empty( $hooked_blocks ) || has_filter( 'hooked_block_types' ) ) {
|
if ( ! empty( $hooked_blocks ) || has_filter( 'hooked_block_types' ) ) {
|
||||||
$before_block_visitor = make_before_block_visitor( $hooked_blocks, $post );
|
$before_block_visitor = make_before_block_visitor( $hooked_blocks, $post, 'insert_hooked_blocks' );
|
||||||
$after_block_visitor = make_after_block_visitor( $hooked_blocks, $post );
|
$after_block_visitor = make_after_block_visitor( $hooked_blocks, $post, 'insert_hooked_blocks' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return traverse_and_serialize_block( $mock_anchor_parent_block, $before_block_visitor, $after_block_visitor );
|
return traverse_and_serialize_block( $mock_navigation_block, $before_block_visitor, $after_block_visitor );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Insert ignoredHookedBlocks meta into the Navigation block and its inner blocks.
|
||||||
|
*
|
||||||
|
* Given a Navigation block's inner blocks and its corresponding `wp_navigation` post object,
|
||||||
|
* this function inserts ignoredHookedBlocks meta into it, and returns the serialized inner blocks in a
|
||||||
|
* mock Navigation block wrapper.
|
||||||
|
*
|
||||||
|
* @param array $inner_blocks Parsed inner blocks of a Navigation block.
|
||||||
|
* @param WP_Post $post `wp_navigation` post object corresponding to the block.
|
||||||
|
* @return string Serialized inner blocks in mock Navigation block wrapper, with hooked blocks inserted, if any.
|
||||||
|
*/
|
||||||
|
function block_core_navigation_set_ignored_hooked_blocks_metadata( $inner_blocks, $post ) {
|
||||||
|
$mock_navigation_block = block_core_navigation_mock_parsed_block( $inner_blocks, $post );
|
||||||
|
$hooked_blocks = get_hooked_blocks();
|
||||||
|
$before_block_visitor = null;
|
||||||
|
$after_block_visitor = null;
|
||||||
|
|
||||||
|
if ( ! empty( $hooked_blocks ) || has_filter( 'hooked_block_types' ) ) {
|
||||||
|
$before_block_visitor = make_before_block_visitor( $hooked_blocks, $post, 'set_ignored_hooked_blocks_metadata' );
|
||||||
|
$after_block_visitor = make_after_block_visitor( $hooked_blocks, $post, 'set_ignored_hooked_blocks_metadata' );
|
||||||
|
}
|
||||||
|
|
||||||
|
return traverse_and_serialize_block( $mock_navigation_block, $before_block_visitor, $after_block_visitor );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1422,12 +1457,11 @@ function block_core_navigation_insert_hooked_blocks( $inner_blocks, $post ) {
|
||||||
* @param WP_Post $post Post object.
|
* @param WP_Post $post Post object.
|
||||||
*/
|
*/
|
||||||
function block_core_navigation_update_ignore_hooked_blocks_meta( $post ) {
|
function block_core_navigation_update_ignore_hooked_blocks_meta( $post ) {
|
||||||
// We run the Block Hooks mechanism so it will return the list of ignored hooked blocks
|
// We run the Block Hooks mechanism to inject the `metadata.ignoredHookedBlocks` attribute into
|
||||||
// in the mock root Navigation block's metadata attribute.
|
// all anchor blocks. For the root level, we create a mock Navigation and extract them from there.
|
||||||
// We ignore the rest of the returned `$markup`; `$post->post_content` already has the hooked
|
$blocks = parse_blocks( $post->post_content );
|
||||||
// blocks inserted, whereas `$markup` will have them inserted twice.
|
$markup = block_core_navigation_set_ignored_hooked_blocks_metadata( $blocks, $post );
|
||||||
$blocks = parse_blocks( $post->post_content );
|
|
||||||
$markup = block_core_navigation_insert_hooked_blocks( $blocks, $post );
|
|
||||||
$root_nav_block = parse_blocks( $markup )[0];
|
$root_nav_block = parse_blocks( $markup )[0];
|
||||||
$ignored_hooked_blocks = isset( $root_nav_block['attrs']['metadata']['ignoredHookedBlocks'] )
|
$ignored_hooked_blocks = isset( $root_nav_block['attrs']['metadata']['ignoredHookedBlocks'] )
|
||||||
? $root_nav_block['attrs']['metadata']['ignoredHookedBlocks']
|
? $root_nav_block['attrs']['metadata']['ignoredHookedBlocks']
|
||||||
|
@ -1441,6 +1475,15 @@ function block_core_navigation_update_ignore_hooked_blocks_meta( $post ) {
|
||||||
}
|
}
|
||||||
update_post_meta( $post->ID, '_wp_ignored_hooked_blocks', json_encode( $ignored_hooked_blocks ) );
|
update_post_meta( $post->ID, '_wp_ignored_hooked_blocks', json_encode( $ignored_hooked_blocks ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$serialized_inner_blocks = block_core_navigation_remove_serialized_parent_block( $markup );
|
||||||
|
|
||||||
|
wp_update_post(
|
||||||
|
array(
|
||||||
|
'ID' => $post->ID,
|
||||||
|
'post_content' => $serialized_inner_blocks,
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Before adding our filter, we verify if it's already added in Core.
|
// Before adding our filter, we verify if it's already added in Core.
|
||||||
|
@ -1450,7 +1493,7 @@ $rest_insert_wp_navigation_core_callback = 'block_core_navigation_' . 'update_ig
|
||||||
|
|
||||||
// Injection of hooked blocks into the Navigation block relies on some functions present in WP >= 6.5
|
// Injection of hooked blocks into the Navigation block relies on some functions present in WP >= 6.5
|
||||||
// that are not present in Gutenberg's WP 6.5 compatibility layer.
|
// that are not present in Gutenberg's WP 6.5 compatibility layer.
|
||||||
if ( function_exists( 'get_hooked_block_markup' ) && ! has_filter( 'rest_insert_wp_navigation', $rest_insert_wp_navigation_core_callback ) ) {
|
if ( function_exists( 'set_ignored_hooked_blocks_metadata' ) && ! has_filter( 'rest_insert_wp_navigation', $rest_insert_wp_navigation_core_callback ) ) {
|
||||||
add_action( 'rest_insert_wp_navigation', 'block_core_navigation_update_ignore_hooked_blocks_meta', 10, 3 );
|
add_action( 'rest_insert_wp_navigation', 'block_core_navigation_update_ignore_hooked_blocks_meta', 10, 3 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1470,9 +1513,7 @@ function block_core_navigation_insert_hooked_blocks_into_rest_response( $respons
|
||||||
$content = block_core_navigation_insert_hooked_blocks( $parsed_blocks, $post );
|
$content = block_core_navigation_insert_hooked_blocks( $parsed_blocks, $post );
|
||||||
|
|
||||||
// Remove mock Navigation block wrapper.
|
// Remove mock Navigation block wrapper.
|
||||||
$start = strpos( $content, '-->' ) + strlen( '-->' );
|
$content = block_core_navigation_remove_serialized_parent_block( $content );
|
||||||
$end = strrpos( $content, '<!--' );
|
|
||||||
$content = substr( $content, $start, $end - $start );
|
|
||||||
|
|
||||||
$response->data['content']['raw'] = $content;
|
$response->data['content']['raw'] = $content;
|
||||||
$response->data['content']['rendered'] = apply_filters( 'the_content', $content );
|
$response->data['content']['rendered'] = apply_filters( 'the_content', $content );
|
||||||
|
@ -1487,6 +1528,6 @@ $rest_prepare_wp_navigation_core_callback = 'block_core_navigation_' . 'insert_h
|
||||||
|
|
||||||
// Injection of hooked blocks into the Navigation block relies on some functions present in WP >= 6.5
|
// Injection of hooked blocks into the Navigation block relies on some functions present in WP >= 6.5
|
||||||
// that are not present in Gutenberg's WP 6.5 compatibility layer.
|
// that are not present in Gutenberg's WP 6.5 compatibility layer.
|
||||||
if ( function_exists( 'get_hooked_block_markup' ) && ! has_filter( 'rest_prepare_wp_navigation', $rest_prepare_wp_navigation_core_callback ) ) {
|
if ( function_exists( 'set_ignored_hooked_blocks_metadata' ) && ! has_filter( 'rest_prepare_wp_navigation', $rest_prepare_wp_navigation_core_callback ) ) {
|
||||||
add_filter( 'rest_prepare_wp_navigation', 'block_core_navigation_insert_hooked_blocks_into_rest_response', 10, 3 );
|
add_filter( 'rest_prepare_wp_navigation', 'block_core_navigation_insert_hooked_blocks_into_rest_response', 10, 3 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -277,8 +277,10 @@
|
||||||
min-height:1px;
|
min-height:1px;
|
||||||
min-width:1px;
|
min-width:1px;
|
||||||
}
|
}
|
||||||
.is-collapsed .wp-block-navigation__responsive-container:not(.is-menu-open) .components-button.wp-block-navigation__responsive-container-close{
|
@media (min-width:600px){
|
||||||
display:none;
|
.wp-block-navigation__responsive-container:not(.is-menu-open) .components-button.wp-block-navigation__responsive-container-close{
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-navigation__responsive-container.is-menu-open{
|
.wp-block-navigation__responsive-container.is-menu-open{
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -277,8 +277,10 @@
|
||||||
min-height:1px;
|
min-height:1px;
|
||||||
min-width:1px;
|
min-width:1px;
|
||||||
}
|
}
|
||||||
.is-collapsed .wp-block-navigation__responsive-container:not(.is-menu-open) .components-button.wp-block-navigation__responsive-container-close{
|
@media (min-width:600px){
|
||||||
display:none;
|
.wp-block-navigation__responsive-container:not(.is-menu-open) .components-button.wp-block-navigation__responsive-container-close{
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-navigation__responsive-container.is-menu-open{
|
.wp-block-navigation__responsive-container.is-menu-open{
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -347,18 +347,20 @@ button.wp-block-navigation-item__content{
|
||||||
left:auto;
|
left:auto;
|
||||||
right:auto;
|
right:auto;
|
||||||
}
|
}
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container:not(.is-menu-open){
|
@media (min-width:600px){
|
||||||
background-color:inherit;
|
.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open){
|
||||||
display:block;
|
background-color:inherit;
|
||||||
position:relative;
|
display:block;
|
||||||
width:100%;
|
position:relative;
|
||||||
z-index:auto;
|
width:100%;
|
||||||
}
|
z-index:auto;
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-close{
|
}
|
||||||
display:none;
|
.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) .wp-block-navigation__responsive-container-close{
|
||||||
}
|
display:none;
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{
|
}
|
||||||
right:0;
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{
|
||||||
|
right:0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{
|
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{
|
||||||
|
@ -400,8 +402,10 @@ button.wp-block-navigation-item__content{
|
||||||
font-size:inherit;
|
font-size:inherit;
|
||||||
font-weight:inherit;
|
font-weight:inherit;
|
||||||
}
|
}
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container-open{
|
@media (min-width:600px){
|
||||||
display:none;
|
.wp-block-navigation__responsive-container-open:not(.always-shown){
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-navigation__responsive-container-close{
|
.wp-block-navigation__responsive-container-close{
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -347,18 +347,20 @@ button.wp-block-navigation-item__content{
|
||||||
left:auto;
|
left:auto;
|
||||||
right:auto;
|
right:auto;
|
||||||
}
|
}
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container:not(.is-menu-open){
|
@media (min-width:600px){
|
||||||
background-color:inherit;
|
.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open){
|
||||||
display:block;
|
background-color:inherit;
|
||||||
position:relative;
|
display:block;
|
||||||
width:100%;
|
position:relative;
|
||||||
z-index:auto;
|
width:100%;
|
||||||
}
|
z-index:auto;
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-close{
|
}
|
||||||
display:none;
|
.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) .wp-block-navigation__responsive-container-close{
|
||||||
}
|
display:none;
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{
|
}
|
||||||
left:0;
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{
|
||||||
|
left:0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{
|
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{
|
||||||
|
@ -400,8 +402,10 @@ button.wp-block-navigation-item__content{
|
||||||
font-size:inherit;
|
font-size:inherit;
|
||||||
font-weight:inherit;
|
font-weight:inherit;
|
||||||
}
|
}
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container-open{
|
@media (min-width:600px){
|
||||||
display:none;
|
.wp-block-navigation__responsive-container-open:not(.always-shown){
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-navigation__responsive-container-close{
|
.wp-block-navigation__responsive-container-close{
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -29,35 +29,11 @@ var x = (y) => {
|
||||||
}
|
}
|
||||||
var y = (x) => (() => (x))
|
var y = (x) => (() => (x))
|
||||||
const interactivity_namespaceObject = x({ ["getContext"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getContext), ["getElement"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getElement), ["store"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.store) });
|
const interactivity_namespaceObject = x({ ["getContext"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getContext), ["getElement"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getElement), ["store"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.store) });
|
||||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/constants.js
|
|
||||||
const DEFAULT_BLOCK = {
|
|
||||||
name: 'core/navigation-link'
|
|
||||||
};
|
|
||||||
const PRIORITIZED_INSERTER_BLOCKS = (/* unused pure expression or super */ null && (['core/navigation-link/page', 'core/navigation-link']));
|
|
||||||
|
|
||||||
// These parameters must be kept aligned with those in
|
|
||||||
// lib/compat/wordpress-6.3/navigation-block-preloading.php
|
|
||||||
// and
|
|
||||||
// edit-site/src/components/sidebar-navigation-screen-navigation-menus/constants.js
|
|
||||||
const PRELOADED_NAVIGATION_MENUS_QUERY = {
|
|
||||||
per_page: 100,
|
|
||||||
status: ['publish', 'draft'],
|
|
||||||
order: 'desc',
|
|
||||||
orderby: 'date'
|
|
||||||
};
|
|
||||||
const SELECT_NAVIGATION_MENUS_ARGS = ['postType', 'wp_navigation', PRELOADED_NAVIGATION_MENUS_QUERY];
|
|
||||||
const NAVIGATION_MOBILE_COLLAPSE = '600px';
|
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/view.js
|
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/view.js
|
||||||
/**
|
/**
|
||||||
* WordPress dependencies
|
* WordPress dependencies
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Internal dependencies
|
|
||||||
*/
|
|
||||||
|
|
||||||
const focusableSelectors = ['a[href]', 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', 'select:not([disabled]):not([aria-hidden])', 'textarea:not([disabled]):not([aria-hidden])', 'button:not([disabled]):not([aria-hidden])', '[contenteditable]', '[tabindex]:not([tabindex^="-"])'];
|
const focusableSelectors = ['a[href]', 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', 'select:not([disabled]):not([aria-hidden])', 'textarea:not([disabled]):not([aria-hidden])', 'button:not([disabled]):not([aria-hidden])', '[contenteditable]', '[tabindex]:not([tabindex^="-"])'];
|
||||||
|
|
||||||
// This is a fix for Safari in iOS/iPadOS. Without it, Safari doesn't focus out
|
// This is a fix for Safari in iOS/iPadOS. Without it, Safari doesn't focus out
|
||||||
|
@ -226,24 +202,6 @@ const {
|
||||||
const focusableElements = ref.querySelectorAll(focusableSelectors);
|
const focusableElements = ref.querySelectorAll(focusableSelectors);
|
||||||
focusableElements?.[0]?.focus();
|
focusableElements?.[0]?.focus();
|
||||||
}
|
}
|
||||||
},
|
|
||||||
initNav() {
|
|
||||||
const context = (0,interactivity_namespaceObject.getContext)();
|
|
||||||
const mediaQuery = window.matchMedia(`(max-width: ${NAVIGATION_MOBILE_COLLAPSE})`);
|
|
||||||
|
|
||||||
// Run once to set the initial state.
|
|
||||||
context.isCollapsed = mediaQuery.matches;
|
|
||||||
function handleCollapse(event) {
|
|
||||||
context.isCollapsed = event.matches;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Run on resize to update the state.
|
|
||||||
mediaQuery.addEventListener('change', handleCollapse);
|
|
||||||
|
|
||||||
// Remove the listener when the component is unmounted.
|
|
||||||
return () => {
|
|
||||||
mediaQuery.removeEventListener('change', handleCollapse);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
import*as e from"@wordpress/interactivity";var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const n=(e=>{var n={};return t.d(n,e),n})({getContext:()=>e.getContext,getElement:()=>e.getElement,store:()=>e.store}),o=["a[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","[contenteditable]",'[tabindex]:not([tabindex^="-"])'];document.addEventListener("click",(()=>{}));const{state:l,actions:c}=(0,n.store)("core/navigation",{state:{get roleAttribute(){return"overlay"===(0,n.getContext)().type&&l.isMenuOpen?"dialog":null},get ariaModal(){return"overlay"===(0,n.getContext)().type&&l.isMenuOpen?"true":null},get ariaLabel(){const e=(0,n.getContext)();return"overlay"===e.type&&l.isMenuOpen?e.ariaLabel:null},get isMenuOpen(){return Object.values(l.menuOpenedBy).filter(Boolean).length>0},get menuOpenedBy(){const e=(0,n.getContext)();return"overlay"===e.type?e.overlayOpenedBy:e.submenuOpenedBy}},actions:{openMenuOnHover(){const{type:e,overlayOpenedBy:t}=(0,n.getContext)();"submenu"===e&&0===Object.values(t||{}).filter(Boolean).length&&c.openMenu("hover")},closeMenuOnHover(){c.closeMenu("hover")},openMenuOnClick(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)();e.previousFocus=t,c.openMenu("click")},closeMenuOnClick(){c.closeMenu("click"),c.closeMenu("focus")},openMenuOnFocus(){c.openMenu("focus")},toggleMenuOnClick(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)();window.document.activeElement!==t&&t.focus();const{menuOpenedBy:o}=l;o.click||o.focus?(c.closeMenu("click"),c.closeMenu("focus")):(e.previousFocus=t,c.openMenu("click"))},handleMenuKeydown(e){const{type:t,firstFocusableElement:o,lastFocusableElement:s}=(0,n.getContext)();if(l.menuOpenedBy.click){if("Escape"===e?.key)return c.closeMenu("click"),void c.closeMenu("focus");"overlay"===t&&"Tab"===e.key&&(e.shiftKey&&window.document.activeElement===o?(e.preventDefault(),s.focus()):e.shiftKey||window.document.activeElement!==s||(e.preventDefault(),o.focus()))}},handleMenuFocusout(e){const{modal:t}=(0,n.getContext)();(null===e.relatedTarget||!t?.contains(e.relatedTarget)&&e.target!==window.document.activeElement)&&(c.closeMenu("click"),c.closeMenu("focus"))},openMenu(e="click"){const{type:t}=(0,n.getContext)();l.menuOpenedBy[e]=!0,"overlay"===t&&document.documentElement.classList.add("has-modal-open")},closeMenu(e="click"){const t=(0,n.getContext)();l.menuOpenedBy[e]=!1,l.isMenuOpen||(t.modal?.contains(window.document.activeElement)&&t.previousFocus?.focus(),t.modal=null,t.previousFocus=null,"overlay"===t.type&&document.documentElement.classList.remove("has-modal-open"))}},callbacks:{initMenu(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)();if(l.isMenuOpen){const n=t.querySelectorAll(o);e.modal=t,e.firstFocusableElement=n[0],e.lastFocusableElement=n[n.length-1]}},focusFirstElement(){const{ref:e}=(0,n.getElement)();if(l.isMenuOpen){const t=e.querySelectorAll(o);t?.[0]?.focus()}},initNav(){const e=(0,n.getContext)(),t=window.matchMedia("(max-width: 600px)");function o(t){e.isCollapsed=t.matches}return e.isCollapsed=t.matches,t.addEventListener("change",o),()=>{t.removeEventListener("change",o)}}}},{lock:!0});
|
import*as e from"@wordpress/interactivity";var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const n=(e=>{var n={};return t.d(n,e),n})({getContext:()=>e.getContext,getElement:()=>e.getElement,store:()=>e.store}),o=["a[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","[contenteditable]",'[tabindex]:not([tabindex^="-"])'];document.addEventListener("click",(()=>{}));const{state:l,actions:c}=(0,n.store)("core/navigation",{state:{get roleAttribute(){return"overlay"===(0,n.getContext)().type&&l.isMenuOpen?"dialog":null},get ariaModal(){return"overlay"===(0,n.getContext)().type&&l.isMenuOpen?"true":null},get ariaLabel(){const e=(0,n.getContext)();return"overlay"===e.type&&l.isMenuOpen?e.ariaLabel:null},get isMenuOpen(){return Object.values(l.menuOpenedBy).filter(Boolean).length>0},get menuOpenedBy(){const e=(0,n.getContext)();return"overlay"===e.type?e.overlayOpenedBy:e.submenuOpenedBy}},actions:{openMenuOnHover(){const{type:e,overlayOpenedBy:t}=(0,n.getContext)();"submenu"===e&&0===Object.values(t||{}).filter(Boolean).length&&c.openMenu("hover")},closeMenuOnHover(){c.closeMenu("hover")},openMenuOnClick(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)();e.previousFocus=t,c.openMenu("click")},closeMenuOnClick(){c.closeMenu("click"),c.closeMenu("focus")},openMenuOnFocus(){c.openMenu("focus")},toggleMenuOnClick(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)();window.document.activeElement!==t&&t.focus();const{menuOpenedBy:o}=l;o.click||o.focus?(c.closeMenu("click"),c.closeMenu("focus")):(e.previousFocus=t,c.openMenu("click"))},handleMenuKeydown(e){const{type:t,firstFocusableElement:o,lastFocusableElement:u}=(0,n.getContext)();if(l.menuOpenedBy.click){if("Escape"===e?.key)return c.closeMenu("click"),void c.closeMenu("focus");"overlay"===t&&"Tab"===e.key&&(e.shiftKey&&window.document.activeElement===o?(e.preventDefault(),u.focus()):e.shiftKey||window.document.activeElement!==u||(e.preventDefault(),o.focus()))}},handleMenuFocusout(e){const{modal:t}=(0,n.getContext)();(null===e.relatedTarget||!t?.contains(e.relatedTarget)&&e.target!==window.document.activeElement)&&(c.closeMenu("click"),c.closeMenu("focus"))},openMenu(e="click"){const{type:t}=(0,n.getContext)();l.menuOpenedBy[e]=!0,"overlay"===t&&document.documentElement.classList.add("has-modal-open")},closeMenu(e="click"){const t=(0,n.getContext)();l.menuOpenedBy[e]=!1,l.isMenuOpen||(t.modal?.contains(window.document.activeElement)&&t.previousFocus?.focus(),t.modal=null,t.previousFocus=null,"overlay"===t.type&&document.documentElement.classList.remove("has-modal-open"))}},callbacks:{initMenu(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)();if(l.isMenuOpen){const n=t.querySelectorAll(o);e.modal=t,e.firstFocusableElement=n[0],e.lastFocusableElement=n[n.length-1]}},focusFirstElement(){const{ref:e}=(0,n.getElement)();if(l.isMenuOpen){const t=e.querySelectorAll(o);t?.[0]?.focus()}}}},{lock:!0});
|
|
@ -7,7 +7,7 @@
|
||||||
"description": "Start with the basic building block of all narrative.",
|
"description": "Start with the basic building block of all narrative.",
|
||||||
"keywords": [ "text" ],
|
"keywords": [ "text" ],
|
||||||
"textdomain": "default",
|
"textdomain": "default",
|
||||||
"usesContext": [ "postId", "pattern/overrides" ],
|
"usesContext": [ "postId" ],
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"align": {
|
"align": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|
|
@ -188,7 +188,7 @@ function render_block_core_search( $attributes ) {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$form_directives = '
|
$form_directives = '
|
||||||
data-wp-interactive=\'"core/search"\''
|
data-wp-interactive="core/search"'
|
||||||
. $form_context .
|
. $form_context .
|
||||||
'data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible"
|
'data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible"
|
||||||
data-wp-on--keydown="actions.handleSearchKeydown"
|
data-wp-on--keydown="actions.handleSearchKeydown"
|
||||||
|
|
|
@ -1271,6 +1271,10 @@ figure.wp-block-image:not(.wp-block){
|
||||||
width:36px;
|
width:36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wp-block-image__toolbar_content_textarea{
|
||||||
|
width:250px;
|
||||||
|
}
|
||||||
|
|
||||||
.wp-block-latest-posts{
|
.wp-block-latest-posts{
|
||||||
padding-right:2.5em;
|
padding-right:2.5em;
|
||||||
}
|
}
|
||||||
|
@ -1647,8 +1651,10 @@ figure.wp-block-image:not(.wp-block){
|
||||||
min-height:1px;
|
min-height:1px;
|
||||||
min-width:1px;
|
min-width:1px;
|
||||||
}
|
}
|
||||||
.is-collapsed .wp-block-navigation__responsive-container:not(.is-menu-open) .components-button.wp-block-navigation__responsive-container-close{
|
@media (min-width:600px){
|
||||||
display:none;
|
.wp-block-navigation__responsive-container:not(.is-menu-open) .components-button.wp-block-navigation__responsive-container-close{
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-navigation__responsive-container.is-menu-open{
|
.wp-block-navigation__responsive-container.is-menu-open{
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1269,6 +1269,10 @@ figure.wp-block-image:not(.wp-block){
|
||||||
width:36px;
|
width:36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wp-block-image__toolbar_content_textarea{
|
||||||
|
width:250px;
|
||||||
|
}
|
||||||
|
|
||||||
.wp-block-latest-posts{
|
.wp-block-latest-posts{
|
||||||
padding-left:2.5em;
|
padding-left:2.5em;
|
||||||
}
|
}
|
||||||
|
@ -1645,8 +1649,10 @@ figure.wp-block-image:not(.wp-block){
|
||||||
min-height:1px;
|
min-height:1px;
|
||||||
min-width:1px;
|
min-width:1px;
|
||||||
}
|
}
|
||||||
.is-collapsed .wp-block-navigation__responsive-container:not(.is-menu-open) .components-button.wp-block-navigation__responsive-container-close{
|
@media (min-width:600px){
|
||||||
display:none;
|
.wp-block-navigation__responsive-container:not(.is-menu-open) .components-button.wp-block-navigation__responsive-container-close{
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-navigation__responsive-container.is-menu-open{
|
.wp-block-navigation__responsive-container.is-menu-open{
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2027,18 +2027,20 @@ button.wp-block-navigation-item__content{
|
||||||
left:auto;
|
left:auto;
|
||||||
right:auto;
|
right:auto;
|
||||||
}
|
}
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container:not(.is-menu-open){
|
@media (min-width:600px){
|
||||||
background-color:inherit;
|
.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open){
|
||||||
display:block;
|
background-color:inherit;
|
||||||
position:relative;
|
display:block;
|
||||||
width:100%;
|
position:relative;
|
||||||
z-index:auto;
|
width:100%;
|
||||||
}
|
z-index:auto;
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-close{
|
}
|
||||||
display:none;
|
.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) .wp-block-navigation__responsive-container-close{
|
||||||
}
|
display:none;
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{
|
}
|
||||||
right:0;
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{
|
||||||
|
right:0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{
|
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{
|
||||||
|
@ -2080,8 +2082,10 @@ button.wp-block-navigation-item__content{
|
||||||
font-size:inherit;
|
font-size:inherit;
|
||||||
font-weight:inherit;
|
font-weight:inherit;
|
||||||
}
|
}
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container-open{
|
@media (min-width:600px){
|
||||||
display:none;
|
.wp-block-navigation__responsive-container-open:not(.always-shown){
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-navigation__responsive-container-close{
|
.wp-block-navigation__responsive-container-close{
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2027,18 +2027,20 @@ button.wp-block-navigation-item__content{
|
||||||
left:auto;
|
left:auto;
|
||||||
right:auto;
|
right:auto;
|
||||||
}
|
}
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container:not(.is-menu-open){
|
@media (min-width:600px){
|
||||||
background-color:inherit;
|
.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open){
|
||||||
display:block;
|
background-color:inherit;
|
||||||
position:relative;
|
display:block;
|
||||||
width:100%;
|
position:relative;
|
||||||
z-index:auto;
|
width:100%;
|
||||||
}
|
z-index:auto;
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-close{
|
}
|
||||||
display:none;
|
.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) .wp-block-navigation__responsive-container-close{
|
||||||
}
|
display:none;
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{
|
}
|
||||||
left:0;
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{
|
||||||
|
left:0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{
|
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{
|
||||||
|
@ -2080,8 +2082,10 @@ button.wp-block-navigation-item__content{
|
||||||
font-size:inherit;
|
font-size:inherit;
|
||||||
font-weight:inherit;
|
font-weight:inherit;
|
||||||
}
|
}
|
||||||
:not(.is-collapsed)>.wp-block-navigation__responsive-container-open{
|
@media (min-width:600px){
|
||||||
display:none;
|
.wp-block-navigation__responsive-container-open:not(.always-shown){
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-navigation__responsive-container-close{
|
.wp-block-navigation__responsive-container-close{
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1627,7 +1627,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
||||||
.edit-site-global-styles-screen-revisions__revision-item.is-selected:before{
|
.edit-site-global-styles-screen-revisions__revision-item.is-selected:before{
|
||||||
background:var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
|
background:var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
|
||||||
}
|
}
|
||||||
.edit-site-global-styles-screen-revisions__revision-item.is-selected .edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__revision-item.is-selected .edit-site-global-styles-screen-revisions__changes,.edit-site-global-styles-screen-revisions__revision-item.is-selected .edit-site-global-styles-screen-revisions__meta{
|
.edit-site-global-styles-screen-revisions__revision-item.is-selected .edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__revision-item.is-selected .edit-site-global-styles-screen-revisions__changes>li,.edit-site-global-styles-screen-revisions__revision-item.is-selected .edit-site-global-styles-screen-revisions__meta{
|
||||||
color:#1e1e1e;
|
color:#1e1e1e;
|
||||||
}
|
}
|
||||||
.edit-site-global-styles-screen-revisions__revision-item:after{
|
.edit-site-global-styles-screen-revisions__revision-item:after{
|
||||||
|
@ -1647,7 +1647,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
||||||
display:block;
|
display:block;
|
||||||
height:auto;
|
height:auto;
|
||||||
outline-offset:-2px;
|
outline-offset:-2px;
|
||||||
padding:12px 40px 8px 12px;
|
padding:12px 40px 4px 12px;
|
||||||
position:relative;
|
position:relative;
|
||||||
width:100%;
|
width:100%;
|
||||||
z-index:1;
|
z-index:1;
|
||||||
|
@ -1655,7 +1655,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
||||||
|
|
||||||
.edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__apply-button.is-primary{
|
.edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__apply-button.is-primary{
|
||||||
align-self:flex-start;
|
align-self:flex-start;
|
||||||
margin:0 40px 12px 12px;
|
margin:4px 40px 12px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__changes,.edit-site-global-styles-screen-revisions__meta{
|
.edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__changes,.edit-site-global-styles-screen-revisions__meta{
|
||||||
|
@ -1675,14 +1675,15 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
||||||
text-transform:uppercase;
|
text-transform:uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-site-global-styles-screen-revisions__changes,.edit-site-global-styles-screen-revisions__meta{
|
.edit-site-global-styles-screen-revisions__meta{
|
||||||
align-items:flex-start;
|
align-items:flex-start;
|
||||||
display:flex;
|
display:flex;
|
||||||
justify-content:start;
|
justify-content:start;
|
||||||
|
margin-bottom:4px;
|
||||||
text-align:right;
|
text-align:right;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
.edit-site-global-styles-screen-revisions__changes img,.edit-site-global-styles-screen-revisions__meta img{
|
.edit-site-global-styles-screen-revisions__meta img{
|
||||||
border-radius:100%;
|
border-radius:100%;
|
||||||
height:16px;
|
height:16px;
|
||||||
margin-left:8px;
|
margin-left:8px;
|
||||||
|
@ -1694,11 +1695,14 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-site-global-styles-screen-revisions__changes{
|
.edit-site-global-styles-screen-revisions__changes{
|
||||||
color:#1e1e1e;
|
|
||||||
line-height:1.4;
|
line-height:1.4;
|
||||||
margin-bottom:4px;
|
list-style:disc;
|
||||||
|
margin-right:12px;
|
||||||
text-align:right;
|
text-align:right;
|
||||||
}
|
}
|
||||||
|
.edit-site-global-styles-screen-revisions__changes li{
|
||||||
|
margin-bottom:4px;
|
||||||
|
}
|
||||||
|
|
||||||
.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination{
|
.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination{
|
||||||
gap:2px;
|
gap:2px;
|
||||||
|
@ -2648,7 +2652,6 @@ body.is-fullscreen-mode .edit-site-list-header{
|
||||||
}
|
}
|
||||||
.edit-site-change-status__content .edit-site-change-status__options label .components-text{
|
.edit-site-change-status__content .edit-site-change-status__options label .components-text{
|
||||||
display:block;
|
display:block;
|
||||||
margin-right:26px;
|
|
||||||
}
|
}
|
||||||
.edit-site-change-status__content .edit-site-change-status__password-legend{
|
.edit-site-change-status__content .edit-site-change-status__password-legend{
|
||||||
margin-bottom:8px;
|
margin-bottom:8px;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1627,7 +1627,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
||||||
.edit-site-global-styles-screen-revisions__revision-item.is-selected:before{
|
.edit-site-global-styles-screen-revisions__revision-item.is-selected:before{
|
||||||
background:var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
|
background:var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
|
||||||
}
|
}
|
||||||
.edit-site-global-styles-screen-revisions__revision-item.is-selected .edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__revision-item.is-selected .edit-site-global-styles-screen-revisions__changes,.edit-site-global-styles-screen-revisions__revision-item.is-selected .edit-site-global-styles-screen-revisions__meta{
|
.edit-site-global-styles-screen-revisions__revision-item.is-selected .edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__revision-item.is-selected .edit-site-global-styles-screen-revisions__changes>li,.edit-site-global-styles-screen-revisions__revision-item.is-selected .edit-site-global-styles-screen-revisions__meta{
|
||||||
color:#1e1e1e;
|
color:#1e1e1e;
|
||||||
}
|
}
|
||||||
.edit-site-global-styles-screen-revisions__revision-item:after{
|
.edit-site-global-styles-screen-revisions__revision-item:after{
|
||||||
|
@ -1647,7 +1647,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
||||||
display:block;
|
display:block;
|
||||||
height:auto;
|
height:auto;
|
||||||
outline-offset:-2px;
|
outline-offset:-2px;
|
||||||
padding:12px 12px 8px 40px;
|
padding:12px 12px 4px 40px;
|
||||||
position:relative;
|
position:relative;
|
||||||
width:100%;
|
width:100%;
|
||||||
z-index:1;
|
z-index:1;
|
||||||
|
@ -1655,7 +1655,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
||||||
|
|
||||||
.edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__apply-button.is-primary{
|
.edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__apply-button.is-primary{
|
||||||
align-self:flex-start;
|
align-self:flex-start;
|
||||||
margin:0 12px 12px 40px;
|
margin:4px 12px 12px 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__changes,.edit-site-global-styles-screen-revisions__meta{
|
.edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__changes,.edit-site-global-styles-screen-revisions__meta{
|
||||||
|
@ -1675,14 +1675,15 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
||||||
text-transform:uppercase;
|
text-transform:uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-site-global-styles-screen-revisions__changes,.edit-site-global-styles-screen-revisions__meta{
|
.edit-site-global-styles-screen-revisions__meta{
|
||||||
align-items:flex-start;
|
align-items:flex-start;
|
||||||
display:flex;
|
display:flex;
|
||||||
justify-content:start;
|
justify-content:start;
|
||||||
|
margin-bottom:4px;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
.edit-site-global-styles-screen-revisions__changes img,.edit-site-global-styles-screen-revisions__meta img{
|
.edit-site-global-styles-screen-revisions__meta img{
|
||||||
border-radius:100%;
|
border-radius:100%;
|
||||||
height:16px;
|
height:16px;
|
||||||
margin-right:8px;
|
margin-right:8px;
|
||||||
|
@ -1694,11 +1695,14 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-site-global-styles-screen-revisions__changes{
|
.edit-site-global-styles-screen-revisions__changes{
|
||||||
color:#1e1e1e;
|
|
||||||
line-height:1.4;
|
line-height:1.4;
|
||||||
margin-bottom:4px;
|
list-style:disc;
|
||||||
|
margin-left:12px;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
}
|
}
|
||||||
|
.edit-site-global-styles-screen-revisions__changes li{
|
||||||
|
margin-bottom:4px;
|
||||||
|
}
|
||||||
|
|
||||||
.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination{
|
.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination{
|
||||||
gap:2px;
|
gap:2px;
|
||||||
|
@ -2648,7 +2652,6 @@ body.is-fullscreen-mode .edit-site-list-header{
|
||||||
}
|
}
|
||||||
.edit-site-change-status__content .edit-site-change-status__options label .components-text{
|
.edit-site-change-status__content .edit-site-change-status__options label .components-text{
|
||||||
display:block;
|
display:block;
|
||||||
margin-left:26px;
|
|
||||||
}
|
}
|
||||||
.edit-site-change-status__content .edit-site-change-status__password-legend{
|
.edit-site-change-status__content .edit-site-change-status__password-legend{
|
||||||
margin-bottom:8px;
|
margin-bottom:8px;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -460,9 +460,14 @@
|
||||||
font-size:13px;
|
font-size:13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.entities-saved-states__change-summary{
|
.entities-saved-states__changes{
|
||||||
color:#757575;
|
color:#757575;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
|
list-style:disc;
|
||||||
|
margin:8px 16px 0;
|
||||||
|
}
|
||||||
|
.entities-saved-states__changes li{
|
||||||
|
margin-bottom:4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-error-boundary{
|
.editor-error-boundary{
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -460,9 +460,14 @@
|
||||||
font-size:13px;
|
font-size:13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.entities-saved-states__change-summary{
|
.entities-saved-states__changes{
|
||||||
color:#757575;
|
color:#757575;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
|
list-style:disc;
|
||||||
|
margin:8px 16px 0;
|
||||||
|
}
|
||||||
|
.entities-saved-states__changes li{
|
||||||
|
margin-bottom:4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-error-boundary{
|
.editor-error-boundary{
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -14109,6 +14109,11 @@ const privateRemoveBlocks = (clientIds, selectPrevious = true, forceRemove = fal
|
||||||
blockNamesForPrompt.add(blockName);
|
blockNamesForPrompt.add(blockName);
|
||||||
}
|
}
|
||||||
if (rules['bindings/core/pattern-overrides']) {
|
if (rules['bindings/core/pattern-overrides']) {
|
||||||
|
const parentPatternBlocks = select.getBlockParentsByBlockName(clientId, 'core/block');
|
||||||
|
// We only need to run this check when editing the original pattern, not pattern instances.
|
||||||
|
if (parentPatternBlocks?.length > 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const blockAttributes = select.getBlockAttributes(clientId);
|
const blockAttributes = select.getBlockAttributes(clientId);
|
||||||
if (blockAttributes?.metadata?.bindings && JSON.stringify(blockAttributes.metadata.bindings).includes('core/pattern-overrides')) {
|
if (blockAttributes?.metadata?.bindings && JSON.stringify(blockAttributes.metadata.bindings).includes('core/pattern-overrides')) {
|
||||||
blockNamesForPrompt.add(blockName);
|
blockNamesForPrompt.add(blockName);
|
||||||
|
@ -14573,6 +14578,18 @@ function mergeOrigins(value) {
|
||||||
}
|
}
|
||||||
const mergeCache = new WeakMap();
|
const mergeCache = new WeakMap();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For settings like `color.palette`, which have a value that is an object
|
||||||
|
* with `default`, `theme`, `custom`, with field values that are arrays of
|
||||||
|
* items, returns the one with the highest priority among these three arrays.
|
||||||
|
* @param {Object} value Object to extract from
|
||||||
|
* @return {Array} Array of items extracted from the three origins
|
||||||
|
*/
|
||||||
|
function overrideOrigins(value) {
|
||||||
|
var _ref, _value$custom;
|
||||||
|
return (_ref = (_value$custom = value.custom) !== null && _value$custom !== void 0 ? _value$custom : value.theme) !== null && _ref !== void 0 ? _ref : value.default;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For settings like `color.palette`, which have a value that is an object
|
* For settings like `color.palette`, which have a value that is an object
|
||||||
* with `default`, `theme`, `custom`, with field values that are arrays of
|
* with `default`, `theme`, `custom`, with field values that are arrays of
|
||||||
|
@ -14581,7 +14598,7 @@ const mergeCache = new WeakMap();
|
||||||
* @param {Object} value Object to check
|
* @param {Object} value Object to check
|
||||||
* @return {boolean} Whether the object has values in any of the three origins
|
* @return {boolean} Whether the object has values in any of the three origins
|
||||||
*/
|
*/
|
||||||
function hasMergedOrigins(value) {
|
function hasOriginValue(value) {
|
||||||
return ['default', 'theme', 'custom'].some(key => value?.[key]?.length);
|
return ['default', 'theme', 'custom'].some(key => value?.[key]?.length);
|
||||||
}
|
}
|
||||||
function getBlockSettings(state, clientId, ...paths) {
|
function getBlockSettings(state, clientId, ...paths) {
|
||||||
|
@ -14633,8 +14650,8 @@ function getBlockSettings(state, clientId, ...paths) {
|
||||||
|
|
||||||
// Return if the setting was found in either the block instance or the store.
|
// Return if the setting was found in either the block instance or the store.
|
||||||
if (result !== undefined) {
|
if (result !== undefined) {
|
||||||
if (external_wp_blocks_namespaceObject.__EXPERIMENTAL_PATHS_WITH_MERGE[normalizedPath]) {
|
if (external_wp_blocks_namespaceObject.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[normalizedPath]) {
|
||||||
return mergeOrigins(result);
|
return overrideOrigins(result);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -17918,7 +17935,7 @@ function useStyleOverride({
|
||||||
* @return {Object} Settings object.
|
* @return {Object} Settings object.
|
||||||
*/
|
*/
|
||||||
function useBlockSettings(name, parentLayout) {
|
function useBlockSettings(name, parentLayout) {
|
||||||
const [backgroundImage, backgroundSize, fontFamilies, fontSizes, customFontSize, fontStyle, fontWeight, lineHeight, textColumns, textDecoration, writingMode, textTransform, letterSpacing, padding, margin, blockGap, spacingSizes, units, aspectRatio, minHeight, layout, borderColor, borderRadius, borderStyle, borderWidth, customColorsEnabled, customColors, customDuotone, themeColors, defaultColors, defaultPalette, defaultDuotone, userDuotonePalette, themeDuotonePalette, defaultDuotonePalette, userGradientPalette, themeGradientPalette, defaultGradientPalette, defaultGradients, areCustomGradientsEnabled, isBackgroundEnabled, isLinkEnabled, isTextEnabled, isHeadingEnabled, isButtonEnabled, shadow] = use_settings_useSettings('background.backgroundImage', 'background.backgroundSize', 'typography.fontFamilies', 'typography.fontSizes', 'typography.customFontSize', 'typography.fontStyle', 'typography.fontWeight', 'typography.lineHeight', 'typography.textColumns', 'typography.textDecoration', 'typography.writingMode', 'typography.textTransform', 'typography.letterSpacing', 'spacing.padding', 'spacing.margin', 'spacing.blockGap', 'spacing.spacingSizes', 'spacing.units', 'dimensions.aspectRatio', 'dimensions.minHeight', 'layout', 'border.color', 'border.radius', 'border.style', 'border.width', 'color.custom', 'color.palette.custom', 'color.customDuotone', 'color.palette.theme', 'color.palette.default', 'color.defaultPalette', 'color.defaultDuotone', 'color.duotone.custom', 'color.duotone.theme', 'color.duotone.default', 'color.gradients.custom', 'color.gradients.theme', 'color.gradients.default', 'color.defaultGradients', 'color.customGradient', 'color.background', 'color.link', 'color.text', 'color.heading', 'color.button', 'shadow');
|
const [backgroundImage, backgroundSize, customFontFamilies, defaultFontFamilies, themeFontFamilies, customFontSizes, defaultFontSizes, themeFontSizes, customFontSize, fontStyle, fontWeight, lineHeight, textColumns, textDecoration, writingMode, textTransform, letterSpacing, padding, margin, blockGap, spacingSizes, units, aspectRatio, minHeight, layout, borderColor, borderRadius, borderStyle, borderWidth, customColorsEnabled, customColors, customDuotone, themeColors, defaultColors, defaultPalette, defaultDuotone, userDuotonePalette, themeDuotonePalette, defaultDuotonePalette, userGradientPalette, themeGradientPalette, defaultGradientPalette, defaultGradients, areCustomGradientsEnabled, isBackgroundEnabled, isLinkEnabled, isTextEnabled, isHeadingEnabled, isButtonEnabled, shadow] = use_settings_useSettings('background.backgroundImage', 'background.backgroundSize', 'typography.fontFamilies.custom', 'typography.fontFamilies.default', 'typography.fontFamilies.theme', 'typography.fontSizes.custom', 'typography.fontSizes.default', 'typography.fontSizes.theme', 'typography.customFontSize', 'typography.fontStyle', 'typography.fontWeight', 'typography.lineHeight', 'typography.textColumns', 'typography.textDecoration', 'typography.writingMode', 'typography.textTransform', 'typography.letterSpacing', 'spacing.padding', 'spacing.margin', 'spacing.blockGap', 'spacing.spacingSizes', 'spacing.units', 'dimensions.aspectRatio', 'dimensions.minHeight', 'layout', 'border.color', 'border.radius', 'border.style', 'border.width', 'color.custom', 'color.palette.custom', 'color.customDuotone', 'color.palette.theme', 'color.palette.default', 'color.defaultPalette', 'color.defaultDuotone', 'color.duotone.custom', 'color.duotone.theme', 'color.duotone.default', 'color.gradients.custom', 'color.gradients.theme', 'color.gradients.default', 'color.defaultGradients', 'color.customGradient', 'color.background', 'color.link', 'color.text', 'color.heading', 'color.button', 'shadow');
|
||||||
const rawSettings = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
const rawSettings = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||||
return {
|
return {
|
||||||
background: {
|
background: {
|
||||||
|
@ -17955,10 +17972,14 @@ function useBlockSettings(name, parentLayout) {
|
||||||
},
|
},
|
||||||
typography: {
|
typography: {
|
||||||
fontFamilies: {
|
fontFamilies: {
|
||||||
custom: fontFamilies
|
custom: customFontFamilies,
|
||||||
|
default: defaultFontFamilies,
|
||||||
|
theme: themeFontFamilies
|
||||||
},
|
},
|
||||||
fontSizes: {
|
fontSizes: {
|
||||||
custom: fontSizes
|
custom: customFontSizes,
|
||||||
|
default: defaultFontSizes,
|
||||||
|
theme: themeFontSizes
|
||||||
},
|
},
|
||||||
customFontSize,
|
customFontSize,
|
||||||
fontStyle,
|
fontStyle,
|
||||||
|
@ -17993,7 +18014,7 @@ function useBlockSettings(name, parentLayout) {
|
||||||
parentLayout,
|
parentLayout,
|
||||||
shadow
|
shadow
|
||||||
};
|
};
|
||||||
}, [backgroundImage, backgroundSize, fontFamilies, fontSizes, customFontSize, fontStyle, fontWeight, lineHeight, textColumns, textDecoration, textTransform, letterSpacing, writingMode, padding, margin, blockGap, spacingSizes, units, aspectRatio, minHeight, layout, parentLayout, borderColor, borderRadius, borderStyle, borderWidth, customColorsEnabled, customColors, customDuotone, themeColors, defaultColors, defaultPalette, defaultDuotone, userDuotonePalette, themeDuotonePalette, defaultDuotonePalette, userGradientPalette, themeGradientPalette, defaultGradientPalette, defaultGradients, areCustomGradientsEnabled, isBackgroundEnabled, isLinkEnabled, isTextEnabled, isHeadingEnabled, isButtonEnabled, shadow]);
|
}, [backgroundImage, backgroundSize, customFontFamilies, defaultFontFamilies, themeFontFamilies, customFontSizes, defaultFontSizes, themeFontSizes, customFontSize, fontStyle, fontWeight, lineHeight, textColumns, textDecoration, textTransform, letterSpacing, writingMode, padding, margin, blockGap, spacingSizes, units, aspectRatio, minHeight, layout, parentLayout, borderColor, borderRadius, borderStyle, borderWidth, customColorsEnabled, customColors, customDuotone, themeColors, defaultColors, defaultPalette, defaultDuotone, userDuotonePalette, themeDuotonePalette, defaultDuotonePalette, userGradientPalette, themeGradientPalette, defaultGradientPalette, defaultGradients, areCustomGradientsEnabled, isBackgroundEnabled, isLinkEnabled, isTextEnabled, isHeadingEnabled, isButtonEnabled, shadow]);
|
||||||
return useSettingsForBlockElement(rawSettings, name);
|
return useSettingsForBlockElement(rawSettings, name);
|
||||||
}
|
}
|
||||||
function createBlockEditFilter(features) {
|
function createBlockEditFilter(features) {
|
||||||
|
@ -25345,6 +25366,7 @@ function BorderPanel({
|
||||||
name,
|
name,
|
||||||
defaultControls = border_panel_DEFAULT_CONTROLS
|
defaultControls = border_panel_DEFAULT_CONTROLS
|
||||||
}) {
|
}) {
|
||||||
|
var _settings$shadow$pres, _overrideOrigins;
|
||||||
const colors = useColorsPerOrigin(settings);
|
const colors = useColorsPerOrigin(settings);
|
||||||
const decodeValue = (0,external_wp_element_namespaceObject.useCallback)(rawValue => getValueFromVariable({
|
const decodeValue = (0,external_wp_element_namespaceObject.useCallback)(rawValue => getValueFromVariable({
|
||||||
settings
|
settings
|
||||||
|
@ -25402,10 +25424,10 @@ function BorderPanel({
|
||||||
|
|
||||||
// Shadow
|
// Shadow
|
||||||
const shadow = decodeValue(inheritedValue?.shadow);
|
const shadow = decodeValue(inheritedValue?.shadow);
|
||||||
const shadowPresets = settings?.shadow?.presets;
|
const shadowPresets = (_settings$shadow$pres = settings?.shadow?.presets) !== null && _settings$shadow$pres !== void 0 ? _settings$shadow$pres : {};
|
||||||
const mergedShadowPresets = shadowPresets ? mergeOrigins(shadowPresets) : [];
|
const overriddenShadowPresets = (_overrideOrigins = overrideOrigins(shadowPresets)) !== null && _overrideOrigins !== void 0 ? _overrideOrigins : [];
|
||||||
const setShadow = newValue => {
|
const setShadow = newValue => {
|
||||||
const slug = mergedShadowPresets?.find(({
|
const slug = overriddenShadowPresets?.find(({
|
||||||
shadow: shadowName
|
shadow: shadowName
|
||||||
}) => shadowName === newValue)?.slug;
|
}) => shadowName === newValue)?.slug;
|
||||||
onChange(setImmutably(value, ['shadow'], slug ? `var:preset|shadow|${slug}` : newValue || undefined));
|
onChange(setImmutably(value, ['shadow'], slug ? `var:preset|shadow|${slug}` : newValue || undefined));
|
||||||
|
@ -27982,10 +28004,10 @@ function useHasTypographyPanel(settings) {
|
||||||
return hasFontFamily || hasLineHeight || hasFontAppearance || hasLetterSpacing || hasTextTransform || hasFontSize || hasTextDecoration || hasWritingMode || hasTextColumns;
|
return hasFontFamily || hasLineHeight || hasFontAppearance || hasLetterSpacing || hasTextTransform || hasFontSize || hasTextDecoration || hasWritingMode || hasTextColumns;
|
||||||
}
|
}
|
||||||
function useHasFontSizeControl(settings) {
|
function useHasFontSizeControl(settings) {
|
||||||
return hasMergedOrigins(settings?.typography?.fontSizes) || settings?.typography?.customFontSize;
|
return hasOriginValue(settings?.typography?.fontSizes) || settings?.typography?.customFontSize;
|
||||||
}
|
}
|
||||||
function useHasFontFamilyControl(settings) {
|
function useHasFontFamilyControl(settings) {
|
||||||
return hasMergedOrigins(settings?.typography?.fontFamilies);
|
return hasOriginValue(settings?.typography?.fontFamilies);
|
||||||
}
|
}
|
||||||
function useHasLineHeightControl(settings) {
|
function useHasLineHeightControl(settings) {
|
||||||
return settings?.typography?.lineHeight;
|
return settings?.typography?.lineHeight;
|
||||||
|
@ -28018,10 +28040,11 @@ function useHasTextColumnsControl(settings) {
|
||||||
return settings?.typography?.textColumns;
|
return settings?.typography?.textColumns;
|
||||||
}
|
}
|
||||||
function getUniqueFontSizesBySlug(settings) {
|
function getUniqueFontSizesBySlug(settings) {
|
||||||
const fontSizes = settings?.typography?.fontSizes;
|
var _settings$typography$, _overrideOrigins;
|
||||||
const mergedFontSizes = fontSizes ? mergeOrigins(fontSizes) : [];
|
const fontSizes = (_settings$typography$ = settings?.typography?.fontSizes) !== null && _settings$typography$ !== void 0 ? _settings$typography$ : {};
|
||||||
|
const overriddenFontSizes = (_overrideOrigins = overrideOrigins(fontSizes)) !== null && _overrideOrigins !== void 0 ? _overrideOrigins : [];
|
||||||
const uniqueSizes = [];
|
const uniqueSizes = [];
|
||||||
for (const currentSize of mergedFontSizes) {
|
for (const currentSize of overriddenFontSizes) {
|
||||||
if (!uniqueSizes.some(({
|
if (!uniqueSizes.some(({
|
||||||
slug
|
slug
|
||||||
}) => slug === currentSize.slug)) {
|
}) => slug === currentSize.slug)) {
|
||||||
|
@ -28068,13 +28091,14 @@ function TypographyPanel({
|
||||||
panelId,
|
panelId,
|
||||||
defaultControls = typography_panel_DEFAULT_CONTROLS
|
defaultControls = typography_panel_DEFAULT_CONTROLS
|
||||||
}) {
|
}) {
|
||||||
|
var _settings$typography$2;
|
||||||
const decodeValue = rawValue => getValueFromVariable({
|
const decodeValue = rawValue => getValueFromVariable({
|
||||||
settings
|
settings
|
||||||
}, '', rawValue);
|
}, '', rawValue);
|
||||||
|
|
||||||
// Font Family
|
// Font Family
|
||||||
const hasFontFamilyEnabled = useHasFontFamilyControl(settings);
|
const hasFontFamilyEnabled = useHasFontFamilyControl(settings);
|
||||||
const fontFamilies = settings?.typography?.fontFamilies;
|
const fontFamilies = (_settings$typography$2 = settings?.typography?.fontFamilies) !== null && _settings$typography$2 !== void 0 ? _settings$typography$2 : {};
|
||||||
const mergedFontFamilies = fontFamilies ? mergeOrigins(fontFamilies) : [];
|
const mergedFontFamilies = fontFamilies ? mergeOrigins(fontFamilies) : [];
|
||||||
const fontFamily = decodeValue(inheritedValue?.typography?.fontFamily);
|
const fontFamily = decodeValue(inheritedValue?.typography?.fontFamily);
|
||||||
const setFontFamily = newValue => {
|
const setFontFamily = newValue => {
|
||||||
|
@ -34227,23 +34251,6 @@ function shimAttributeSource(settings) {
|
||||||
}
|
}
|
||||||
(0,external_wp_hooks_namespaceObject.addFilter)('blocks.registerBlockType', 'core/editor/custom-sources-backwards-compatibility/shim-attribute-source', shimAttributeSource);
|
(0,external_wp_hooks_namespaceObject.addFilter)('blocks.registerBlockType', 'core/editor/custom-sources-backwards-compatibility/shim-attribute-source', shimAttributeSource);
|
||||||
|
|
||||||
// Add the context to all blocks.
|
|
||||||
(0,external_wp_hooks_namespaceObject.addFilter)('blocks.registerBlockType', 'core/block-bindings-ui', (settings, name) => {
|
|
||||||
if (!(name in BLOCK_BINDINGS_ALLOWED_BLOCKS)) {
|
|
||||||
return settings;
|
|
||||||
}
|
|
||||||
const contextItems = ['postId', 'postType', 'queryId'];
|
|
||||||
const usesContextArray = settings.usesContext;
|
|
||||||
const oldUsesContextArray = new Set(usesContextArray);
|
|
||||||
contextItems.forEach(item => {
|
|
||||||
if (!oldUsesContextArray.has(item)) {
|
|
||||||
usesContextArray.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
settings.usesContext = usesContextArray;
|
|
||||||
return settings;
|
|
||||||
});
|
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/use-border-props.js
|
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/use-border-props.js
|
||||||
/**
|
/**
|
||||||
* Internal dependencies
|
* Internal dependencies
|
||||||
|
@ -40499,13 +40506,16 @@ function Iframe({
|
||||||
src: src,
|
src: src,
|
||||||
title: (0,external_wp_i18n_namespaceObject.__)('Editor canvas'),
|
title: (0,external_wp_i18n_namespaceObject.__)('Editor canvas'),
|
||||||
onKeyDown: event => {
|
onKeyDown: event => {
|
||||||
|
if (props.onKeyDown) {
|
||||||
|
props.onKeyDown(event);
|
||||||
|
}
|
||||||
// If the event originates from inside the iframe, it means
|
// If the event originates from inside the iframe, it means
|
||||||
// it bubbled through the portal, but only with React
|
// it bubbled through the portal, but only with React
|
||||||
// events. We need to to bubble native events as well,
|
// events. We need to to bubble native events as well,
|
||||||
// though by doing so we also trigger another React event,
|
// though by doing so we also trigger another React event,
|
||||||
// so we need to stop the propagation of this event to avoid
|
// so we need to stop the propagation of this event to avoid
|
||||||
// duplication.
|
// duplication.
|
||||||
if (event.currentTarget.ownerDocument !== event.target.ownerDocument) {
|
else if (event.currentTarget.ownerDocument !== event.target.ownerDocument) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
bubbleEvent(event, window.KeyboardEvent, event.currentTarget);
|
bubbleEvent(event, window.KeyboardEvent, event.currentTarget);
|
||||||
}
|
}
|
||||||
|
@ -58939,6 +58949,7 @@ function useEnter(props) {
|
||||||
content: _value.text
|
content: _value.text
|
||||||
})]);
|
})]);
|
||||||
__unstableMarkAutomaticChange();
|
__unstableMarkAutomaticChange();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const {
|
const {
|
||||||
|
@ -63953,8 +63964,8 @@ const translationMap = {
|
||||||
h4: (0,external_wp_i18n_namespaceObject.__)('H4'),
|
h4: (0,external_wp_i18n_namespaceObject.__)('H4'),
|
||||||
h5: (0,external_wp_i18n_namespaceObject.__)('H5'),
|
h5: (0,external_wp_i18n_namespaceObject.__)('H5'),
|
||||||
h6: (0,external_wp_i18n_namespaceObject.__)('H6'),
|
h6: (0,external_wp_i18n_namespaceObject.__)('H6'),
|
||||||
'settings.color': (0,external_wp_i18n_namespaceObject.__)('Color settings'),
|
'settings.color': (0,external_wp_i18n_namespaceObject.__)('Color'),
|
||||||
'settings.typography': (0,external_wp_i18n_namespaceObject.__)('Typography settings'),
|
'settings.typography': (0,external_wp_i18n_namespaceObject.__)('Typography'),
|
||||||
'styles.color': (0,external_wp_i18n_namespaceObject.__)('Colors'),
|
'styles.color': (0,external_wp_i18n_namespaceObject.__)('Colors'),
|
||||||
'styles.spacing': (0,external_wp_i18n_namespaceObject.__)('Spacing'),
|
'styles.spacing': (0,external_wp_i18n_namespaceObject.__)('Spacing'),
|
||||||
'styles.typography': (0,external_wp_i18n_namespaceObject.__)('Typography')
|
'styles.typography': (0,external_wp_i18n_namespaceObject.__)('Typography')
|
||||||
|
@ -63983,10 +63994,7 @@ function getTranslation(key) {
|
||||||
return blockName || keyArray[1];
|
return blockName || keyArray[1];
|
||||||
}
|
}
|
||||||
if (keyArray?.[0] === 'elements') {
|
if (keyArray?.[0] === 'elements') {
|
||||||
const elementName = translationMap[keyArray[1]] || keyArray[1];
|
return translationMap[keyArray[1]] || keyArray[1];
|
||||||
return (0,external_wp_i18n_namespaceObject.sprintf)(
|
|
||||||
// translators: %s: element name, e.g., heading button, link, caption.
|
|
||||||
(0,external_wp_i18n_namespaceObject.__)('%s element'), elementName);
|
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
@ -64029,7 +64037,7 @@ function deepCompare(changedObject, originalObject, parentPath = '') {
|
||||||
*
|
*
|
||||||
* @param {Object} next The changed object to compare.
|
* @param {Object} next The changed object to compare.
|
||||||
* @param {Object} previous The original object to compare against.
|
* @param {Object} previous The original object to compare against.
|
||||||
* @return {string[]} An array of translated changes.
|
* @return {Array[]} A 2-dimensional array of tuples: [ "group", "translated change" ].
|
||||||
*/
|
*/
|
||||||
function getGlobalStylesChangelist(next, previous) {
|
function getGlobalStylesChangelist(next, previous) {
|
||||||
const cacheKey = JSON.stringify({
|
const cacheKey = JSON.stringify({
|
||||||
|
@ -64073,11 +64081,11 @@ function getGlobalStylesChangelist(next, previous) {
|
||||||
const result = [...new Set(changedValueTree)]
|
const result = [...new Set(changedValueTree)]
|
||||||
/*
|
/*
|
||||||
* Translate the keys.
|
* Translate the keys.
|
||||||
* Remove duplicate or empty translations.
|
* Remove empty translations.
|
||||||
*/.reduce((acc, curr) => {
|
*/.reduce((acc, curr) => {
|
||||||
const translation = getTranslation(curr);
|
const translation = getTranslation(curr);
|
||||||
if (translation && !acc.includes(translation)) {
|
if (translation) {
|
||||||
acc.push(translation);
|
acc.push([curr.split('.')[0], translation]);
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
}, []);
|
}, []);
|
||||||
|
@ -64086,30 +64094,69 @@ function getGlobalStylesChangelist(next, previous) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* From a getGlobalStylesChangelist() result, returns a truncated array of translated changes.
|
* From a getGlobalStylesChangelist() result, returns an array of translated global styles changes, grouped by type.
|
||||||
* Appends a translated string indicating the number of changes that were truncated.
|
* The types are 'blocks', 'elements', 'settings', and 'styles'.
|
||||||
*
|
*
|
||||||
* @param {Object} next The changed object to compare.
|
* @param {Object} next The changed object to compare.
|
||||||
* @param {Object} previous The original object to compare against.
|
* @param {Object} previous The original object to compare against.
|
||||||
* @param {{maxResults:number}} options Options. maxResults: results to return before truncating.
|
* @param {{maxResults:number}} options Options. maxResults: results to return before truncating.
|
||||||
* @return {string[]} An array of translated changes.
|
* @return {string[]} An array of translated changes.
|
||||||
*/
|
*/
|
||||||
function getGlobalStylesChanges(next, previous, options = {}) {
|
function getGlobalStylesChanges(next, previous, options = {}) {
|
||||||
const changes = getGlobalStylesChangelist(next, previous);
|
let changeList = getGlobalStylesChangelist(next, previous);
|
||||||
const changesLength = changes.length;
|
const changesLength = changeList.length;
|
||||||
const {
|
const {
|
||||||
maxResults
|
maxResults
|
||||||
} = options;
|
} = options;
|
||||||
|
if (changesLength) {
|
||||||
// Truncate to `n` results if necessary.
|
// Truncate to `n` results if necessary.
|
||||||
if (!!maxResults && changesLength && changesLength > maxResults) {
|
if (!!maxResults && changesLength > maxResults) {
|
||||||
const deleteCount = changesLength - maxResults;
|
changeList = changeList.slice(0, maxResults);
|
||||||
const andMoreText = (0,external_wp_i18n_namespaceObject.sprintf)(
|
}
|
||||||
// translators: %d: number of global styles changes that are not displayed in the UI.
|
return Object.entries(changeList.reduce((acc, curr) => {
|
||||||
(0,external_wp_i18n_namespaceObject._n)('…and %d more change', '…and %d more changes', deleteCount), deleteCount);
|
const group = acc[curr[0]] || [];
|
||||||
changes.splice(maxResults, deleteCount, andMoreText);
|
if (!group.includes(curr[1])) {
|
||||||
|
acc[curr[0]] = [...group, curr[1]];
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
}, {})).map(([key, changeValues]) => {
|
||||||
|
const changeValuesLength = changeValues.length;
|
||||||
|
const joinedChangesValue = changeValues.join((0,external_wp_i18n_namespaceObject.__)(', '));
|
||||||
|
switch (key) {
|
||||||
|
case 'blocks':
|
||||||
|
{
|
||||||
|
return (0,external_wp_i18n_namespaceObject.sprintf)(
|
||||||
|
// translators: %s: a list of block names separated by a comma.
|
||||||
|
(0,external_wp_i18n_namespaceObject._n)('%s block.', '%s blocks.', changeValuesLength), joinedChangesValue);
|
||||||
|
}
|
||||||
|
case 'elements':
|
||||||
|
{
|
||||||
|
return (0,external_wp_i18n_namespaceObject.sprintf)(
|
||||||
|
// translators: %s: a list of element names separated by a comma.
|
||||||
|
(0,external_wp_i18n_namespaceObject._n)('%s element.', '%s elements.', changeValuesLength), joinedChangesValue);
|
||||||
|
}
|
||||||
|
case 'settings':
|
||||||
|
{
|
||||||
|
return (0,external_wp_i18n_namespaceObject.sprintf)(
|
||||||
|
// translators: %s: a list of theme.json setting labels separated by a comma.
|
||||||
|
(0,external_wp_i18n_namespaceObject.__)('%s settings.'), joinedChangesValue);
|
||||||
|
}
|
||||||
|
case 'styles':
|
||||||
|
{
|
||||||
|
return (0,external_wp_i18n_namespaceObject.sprintf)(
|
||||||
|
// translators: %s: a list of theme.json top-level styles labels separated by a comma.
|
||||||
|
(0,external_wp_i18n_namespaceObject.__)('%s styles.'), joinedChangesValue);
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
return (0,external_wp_i18n_namespaceObject.sprintf)(
|
||||||
|
// translators: %s: a list of global styles changes separated by a comma.
|
||||||
|
(0,external_wp_i18n_namespaceObject.__)('%s.'), joinedChangesValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return changes;
|
return get_global_styles_changes_EMPTY_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/global-styles/index.js
|
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/global-styles/index.js
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5283,7 +5283,6 @@ const button_metadata = {
|
||||||
description: "Prompt visitors to take action with a button-style link.",
|
description: "Prompt visitors to take action with a button-style link.",
|
||||||
keywords: ["link"],
|
keywords: ["link"],
|
||||||
textdomain: "default",
|
textdomain: "default",
|
||||||
usesContext: ["pattern/overrides"],
|
|
||||||
attributes: {
|
attributes: {
|
||||||
tagName: {
|
tagName: {
|
||||||
type: "string",
|
type: "string",
|
||||||
|
@ -23928,7 +23927,6 @@ const heading_metadata = {
|
||||||
description: "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",
|
description: "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",
|
||||||
keywords: ["title", "subtitle"],
|
keywords: ["title", "subtitle"],
|
||||||
textdomain: "default",
|
textdomain: "default",
|
||||||
usesContext: ["pattern/overrides"],
|
|
||||||
attributes: {
|
attributes: {
|
||||||
textAlign: {
|
textAlign: {
|
||||||
type: "string"
|
type: "string"
|
||||||
|
@ -25634,6 +25632,7 @@ const TOOLSPANEL_DROPDOWNMENU_PROPS = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal dependencies
|
* Internal dependencies
|
||||||
*/
|
*/
|
||||||
|
@ -25772,6 +25771,7 @@ function image_Image({
|
||||||
const [externalBlob, setExternalBlob] = (0,external_wp_element_namespaceObject.useState)();
|
const [externalBlob, setExternalBlob] = (0,external_wp_element_namespaceObject.useState)();
|
||||||
const clientWidth = useClientWidth(containerRef, [align]);
|
const clientWidth = useClientWidth(containerRef, [align]);
|
||||||
const hasNonContentControls = blockEditingMode === 'default';
|
const hasNonContentControls = blockEditingMode === 'default';
|
||||||
|
const isContentOnlyMode = blockEditingMode === 'contentOnly';
|
||||||
const isResizable = allowResize && hasNonContentControls && !isWideAligned && isLargeViewport;
|
const isResizable = allowResize && hasNonContentControls && !isWideAligned && isLargeViewport;
|
||||||
const imageSizeOptions = imageSizes.filter(({
|
const imageSizeOptions = imageSizes.filter(({
|
||||||
slug
|
slug
|
||||||
|
@ -26033,7 +26033,71 @@ function image_Image({
|
||||||
onClick: uploadExternal,
|
onClick: uploadExternal,
|
||||||
icon: library_upload,
|
icon: library_upload,
|
||||||
label: (0,external_wp_i18n_namespaceObject.__)('Upload to Media Library')
|
label: (0,external_wp_i18n_namespaceObject.__)('Upload to Media Library')
|
||||||
}))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
|
}))), isContentOnlyMode &&
|
||||||
|
// Add some extra controls for content attributes when content only mode is active.
|
||||||
|
// With content only mode active, the inspector is hidden, so users need another way
|
||||||
|
// to edit these attributes.
|
||||||
|
(0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
|
||||||
|
group: "other"
|
||||||
|
}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, {
|
||||||
|
popoverProps: {
|
||||||
|
position: 'bottom right'
|
||||||
|
},
|
||||||
|
renderToggle: ({
|
||||||
|
isOpen,
|
||||||
|
onToggle
|
||||||
|
}) => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
|
||||||
|
onClick: onToggle,
|
||||||
|
"aria-haspopup": "true",
|
||||||
|
"aria-expanded": isOpen,
|
||||||
|
onKeyDown: event => {
|
||||||
|
if (!isOpen && event.keyCode === external_wp_keycodes_namespaceObject.DOWN) {
|
||||||
|
event.preventDefault();
|
||||||
|
onToggle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, (0,external_wp_i18n_namespaceObject._x)('Alt', 'Alternative text for an image. Block toolbar label, a low character count is preferred.')),
|
||||||
|
renderContent: () => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, {
|
||||||
|
className: "wp-block-image__toolbar_content_textarea",
|
||||||
|
label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'),
|
||||||
|
value: alt || '',
|
||||||
|
onChange: updateAlt,
|
||||||
|
disabled: lockAltControls,
|
||||||
|
help: lockAltControls ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Connected to a custom field')) : (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, {
|
||||||
|
href: "https://www.w3.org/WAI/tutorials/images/decision-tree"
|
||||||
|
}, (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')), (0,external_React_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')),
|
||||||
|
__nextHasNoMarginBottom: true
|
||||||
|
})
|
||||||
|
}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, {
|
||||||
|
popoverProps: {
|
||||||
|
position: 'bottom right'
|
||||||
|
},
|
||||||
|
renderToggle: ({
|
||||||
|
isOpen,
|
||||||
|
onToggle
|
||||||
|
}) => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
|
||||||
|
onClick: onToggle,
|
||||||
|
"aria-haspopup": "true",
|
||||||
|
"aria-expanded": isOpen,
|
||||||
|
onKeyDown: event => {
|
||||||
|
if (!isOpen && event.keyCode === external_wp_keycodes_namespaceObject.DOWN) {
|
||||||
|
event.preventDefault();
|
||||||
|
onToggle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, (0,external_wp_i18n_namespaceObject.__)('Title')),
|
||||||
|
renderContent: () => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
|
||||||
|
className: "wp-block-image__toolbar_content_textarea",
|
||||||
|
__nextHasNoMarginBottom: true,
|
||||||
|
label: (0,external_wp_i18n_namespaceObject.__)('Title attribute'),
|
||||||
|
value: title || '',
|
||||||
|
onChange: onSetTitle,
|
||||||
|
disabled: lockTitleControls,
|
||||||
|
help: lockTitleControls ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Connected to a custom field')) : (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Describe the role of this image on the page.'), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, {
|
||||||
|
href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute"
|
||||||
|
}, (0,external_wp_i18n_namespaceObject.__)('(Note: many devices and browsers do not display this text.)')))
|
||||||
|
})
|
||||||
|
})), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
|
||||||
label: (0,external_wp_i18n_namespaceObject.__)('Settings'),
|
label: (0,external_wp_i18n_namespaceObject.__)('Settings'),
|
||||||
resetAll: resetAll,
|
resetAll: resetAll,
|
||||||
dropdownMenuProps: TOOLSPANEL_DROPDOWNMENU_PROPS
|
dropdownMenuProps: TOOLSPANEL_DROPDOWNMENU_PROPS
|
||||||
|
@ -26048,7 +26112,7 @@ function image_Image({
|
||||||
label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'),
|
label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'),
|
||||||
value: alt || '',
|
value: alt || '',
|
||||||
onChange: updateAlt,
|
onChange: updateAlt,
|
||||||
disabled: lockAltControls,
|
readOnly: lockAltControls,
|
||||||
help: lockAltControls ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Connected to a custom field')) : (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, {
|
help: lockAltControls ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Connected to a custom field')) : (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, {
|
||||||
href: "https://www.w3.org/WAI/tutorials/images/decision-tree"
|
href: "https://www.w3.org/WAI/tutorials/images/decision-tree"
|
||||||
}, (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')), (0,external_React_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')),
|
}, (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')), (0,external_React_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')),
|
||||||
|
@ -26064,7 +26128,7 @@ function image_Image({
|
||||||
label: (0,external_wp_i18n_namespaceObject.__)('Title attribute'),
|
label: (0,external_wp_i18n_namespaceObject.__)('Title attribute'),
|
||||||
value: title || '',
|
value: title || '',
|
||||||
onChange: onSetTitle,
|
onChange: onSetTitle,
|
||||||
disabled: lockTitleControls,
|
readOnly: lockTitleControls,
|
||||||
help: lockTitleControls ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Connected to a custom field')) : (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Describe the role of this image on the page.'), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, {
|
help: lockTitleControls ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Connected to a custom field')) : (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Describe the role of this image on the page.'), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, {
|
||||||
href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute"
|
href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute"
|
||||||
}, (0,external_wp_i18n_namespaceObject.__)('(Note: many devices and browsers do not display this text.)')))
|
}, (0,external_wp_i18n_namespaceObject.__)('(Note: many devices and browsers do not display this text.)')))
|
||||||
|
@ -26889,7 +26953,7 @@ const image_metadata = {
|
||||||
name: "core/image",
|
name: "core/image",
|
||||||
title: "Image",
|
title: "Image",
|
||||||
category: "media",
|
category: "media",
|
||||||
usesContext: ["allowResize", "imageCrop", "fixedHeight", "pattern/overrides"],
|
usesContext: ["allowResize", "imageCrop", "fixedHeight"],
|
||||||
description: "Insert an image to make a visual statement.",
|
description: "Insert an image to make a visual statement.",
|
||||||
keywords: ["img", "photo", "picture"],
|
keywords: ["img", "photo", "picture"],
|
||||||
textdomain: "default",
|
textdomain: "default",
|
||||||
|
@ -32085,7 +32149,6 @@ const PRELOADED_NAVIGATION_MENUS_QUERY = {
|
||||||
orderby: 'date'
|
orderby: 'date'
|
||||||
};
|
};
|
||||||
const SELECT_NAVIGATION_MENUS_ARGS = ['postType', 'wp_navigation', PRELOADED_NAVIGATION_MENUS_QUERY];
|
const SELECT_NAVIGATION_MENUS_ARGS = ['postType', 'wp_navigation', PRELOADED_NAVIGATION_MENUS_QUERY];
|
||||||
const NAVIGATION_MOBILE_COLLAPSE = '600px';
|
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/use-navigation-menu.js
|
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/use-navigation-menu.js
|
||||||
/**
|
/**
|
||||||
|
@ -34470,7 +34533,6 @@ function AccessibleMenuDescription({
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function Navigation({
|
function Navigation({
|
||||||
|
@ -34639,8 +34701,6 @@ function Navigation({
|
||||||
const textDecoration = attributes.style?.typography?.textDecoration;
|
const textDecoration = attributes.style?.typography?.textDecoration;
|
||||||
const hasBlockOverlay = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).__unstableHasActiveBlockOverlayActive(clientId), [clientId]);
|
const hasBlockOverlay = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).__unstableHasActiveBlockOverlayActive(clientId), [clientId]);
|
||||||
const isResponsive = 'never' !== overlayMenu;
|
const isResponsive = 'never' !== overlayMenu;
|
||||||
const isMobileBreakPoint = (0,external_wp_compose_namespaceObject.useMediaQuery)(`(max-width: ${NAVIGATION_MOBILE_COLLAPSE})`);
|
|
||||||
const isCollapsed = 'mobile' === overlayMenu && isMobileBreakPoint || 'always' === overlayMenu;
|
|
||||||
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
|
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
|
||||||
ref: navRef,
|
ref: navRef,
|
||||||
className: classnames_default()(className, {
|
className: classnames_default()(className, {
|
||||||
|
@ -34651,7 +34711,6 @@ function Navigation({
|
||||||
'is-vertical': orientation === 'vertical',
|
'is-vertical': orientation === 'vertical',
|
||||||
'no-wrap': flexWrap === 'nowrap',
|
'no-wrap': flexWrap === 'nowrap',
|
||||||
'is-responsive': isResponsive,
|
'is-responsive': isResponsive,
|
||||||
'is-collapsed': isCollapsed,
|
|
||||||
'has-text-color': !!textColor.color || !!textColor?.class,
|
'has-text-color': !!textColor.color || !!textColor?.class,
|
||||||
[(0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor?.slug)]: !!textColor?.slug,
|
[(0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor?.slug)]: !!textColor?.slug,
|
||||||
'has-background': !!backgroundColor.color || backgroundColor.class,
|
'has-background': !!backgroundColor.color || backgroundColor.class,
|
||||||
|
@ -39004,7 +39063,7 @@ const {
|
||||||
description: "Start with the basic building block of all narrative.",
|
description: "Start with the basic building block of all narrative.",
|
||||||
keywords: ["text"],
|
keywords: ["text"],
|
||||||
textdomain: "default",
|
textdomain: "default",
|
||||||
usesContext: ["postId", "pattern/overrides"],
|
usesContext: ["postId"],
|
||||||
attributes: {
|
attributes: {
|
||||||
align: {
|
align: {
|
||||||
type: "string"
|
type: "string"
|
||||||
|
@ -39120,7 +39179,7 @@ const paragraph_metadata = {
|
||||||
description: "Start with the basic building block of all narrative.",
|
description: "Start with the basic building block of all narrative.",
|
||||||
keywords: ["text"],
|
keywords: ["text"],
|
||||||
textdomain: "default",
|
textdomain: "default",
|
||||||
usesContext: ["postId", "pattern/overrides"],
|
usesContext: ["postId"],
|
||||||
attributes: {
|
attributes: {
|
||||||
align: {
|
align: {
|
||||||
type: "string"
|
type: "string"
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5828,7 +5828,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
// EXPORTS
|
// EXPORTS
|
||||||
__webpack_require__.d(__webpack_exports__, {
|
__webpack_require__.d(__webpack_exports__, {
|
||||||
__EXPERIMENTAL_ELEMENTS: () => (/* reexport */ __EXPERIMENTAL_ELEMENTS),
|
__EXPERIMENTAL_ELEMENTS: () => (/* reexport */ __EXPERIMENTAL_ELEMENTS),
|
||||||
__EXPERIMENTAL_PATHS_WITH_MERGE: () => (/* reexport */ __EXPERIMENTAL_PATHS_WITH_MERGE),
|
__EXPERIMENTAL_PATHS_WITH_OVERRIDE: () => (/* reexport */ __EXPERIMENTAL_PATHS_WITH_OVERRIDE),
|
||||||
__EXPERIMENTAL_STYLE_PROPERTY: () => (/* reexport */ __EXPERIMENTAL_STYLE_PROPERTY),
|
__EXPERIMENTAL_STYLE_PROPERTY: () => (/* reexport */ __EXPERIMENTAL_STYLE_PROPERTY),
|
||||||
__experimentalCloneSanitizedBlock: () => (/* reexport */ __experimentalCloneSanitizedBlock),
|
__experimentalCloneSanitizedBlock: () => (/* reexport */ __experimentalCloneSanitizedBlock),
|
||||||
__experimentalGetAccessibleBlockLabel: () => (/* reexport */ getAccessibleBlockLabel),
|
__experimentalGetAccessibleBlockLabel: () => (/* reexport */ getAccessibleBlockLabel),
|
||||||
|
@ -6740,11 +6740,14 @@ const __EXPERIMENTAL_ELEMENTS = {
|
||||||
caption: '.wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption',
|
caption: '.wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption',
|
||||||
cite: 'cite'
|
cite: 'cite'
|
||||||
};
|
};
|
||||||
const __EXPERIMENTAL_PATHS_WITH_MERGE = {
|
|
||||||
|
// These paths may have three origins, custom, theme, and default,
|
||||||
|
// and are expected to override other origins with custom, theme,
|
||||||
|
// and default priority.
|
||||||
|
const __EXPERIMENTAL_PATHS_WITH_OVERRIDE = {
|
||||||
'color.duotone': true,
|
'color.duotone': true,
|
||||||
'color.gradients': true,
|
'color.gradients': true,
|
||||||
'color.palette': true,
|
'color.palette': true,
|
||||||
'typography.fontFamilies': true,
|
|
||||||
'typography.fontSizes': true,
|
'typography.fontSizes': true,
|
||||||
'spacing.spacingSizes': true
|
'spacing.spacingSizes': true
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6504,27 +6504,12 @@ const resolvers_getUserPatternCategories = () => async ({
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const resolvers_getNavigationFallbackId = () => async ({
|
const resolvers_getNavigationFallbackId = () => async ({
|
||||||
dispatch,
|
dispatch
|
||||||
select
|
|
||||||
}) => {
|
}) => {
|
||||||
const fallback = await external_wp_apiFetch_default()({
|
const fallback = await external_wp_apiFetch_default()({
|
||||||
path: (0,external_wp_url_namespaceObject.addQueryArgs)('/wp-block-editor/v1/navigation-fallback', {
|
path: (0,external_wp_url_namespaceObject.addQueryArgs)('/wp-block-editor/v1/navigation-fallback')
|
||||||
_embed: true
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
const record = fallback?._embedded?.self;
|
|
||||||
dispatch.receiveNavigationFallbackId(fallback?.id);
|
dispatch.receiveNavigationFallbackId(fallback?.id);
|
||||||
if (record) {
|
|
||||||
// If the fallback is already in the store, don't invalidate navigation queries.
|
|
||||||
// Otherwise, invalidate the cache for the scenario where there were no Navigation
|
|
||||||
// posts in the state and the fallback created one.
|
|
||||||
const existingFallbackEntityRecord = select.getEntityRecord('postType', 'wp_navigation', fallback?.id);
|
|
||||||
const invalidateNavigationQueries = !existingFallbackEntityRecord;
|
|
||||||
dispatch.receiveEntityRecords('postType', 'wp_navigation', record, undefined, invalidateNavigationQueries);
|
|
||||||
|
|
||||||
// Resolve to avoid further network requests.
|
|
||||||
dispatch.finishResolution('getEntityRecord', ['postType', 'wp_navigation', fallback?.id]);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
const resolvers_getDefaultTemplateId = query => async ({
|
const resolvers_getDefaultTemplateId = query => async ({
|
||||||
dispatch
|
dispatch
|
||||||
|
@ -7303,7 +7288,7 @@ function useEntityBlockEditor(kind, name, {
|
||||||
if (editedBlocks) {
|
if (editedBlocks) {
|
||||||
return editedBlocks;
|
return editedBlocks;
|
||||||
}
|
}
|
||||||
if (!content || typeof content === 'function') {
|
if (!content || typeof content !== 'string') {
|
||||||
return EMPTY_ARRAY;
|
return EMPTY_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -21301,7 +21301,7 @@ const DEFAULT_PAGE_BASE = {
|
||||||
};
|
};
|
||||||
const DEFAULT_VIEWS = {
|
const DEFAULT_VIEWS = {
|
||||||
page: [{
|
page: [{
|
||||||
title: (0,external_wp_i18n_namespaceObject._x)('All', 'pages'),
|
title: (0,external_wp_i18n_namespaceObject.__)('All pages'),
|
||||||
slug: 'all',
|
slug: 'all',
|
||||||
view: DEFAULT_PAGE_BASE
|
view: DEFAULT_PAGE_BASE
|
||||||
}, {
|
}, {
|
||||||
|
@ -21680,91 +21680,6 @@ function DataViewsSidebarContent() {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-pages-dataviews/index.js
|
|
||||||
|
|
||||||
/**
|
|
||||||
* WordPress dependencies
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Internal dependencies
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const sidebar_navigation_screen_pages_dataviews_PageItem = ({
|
|
||||||
postType = 'page',
|
|
||||||
postId,
|
|
||||||
...props
|
|
||||||
}) => {
|
|
||||||
const linkInfo = useLink({
|
|
||||||
postType,
|
|
||||||
postId
|
|
||||||
}, {
|
|
||||||
backPath: '/page'
|
|
||||||
});
|
|
||||||
return (0,external_React_.createElement)(SidebarNavigationItem, {
|
|
||||||
...linkInfo,
|
|
||||||
...props
|
|
||||||
});
|
|
||||||
};
|
|
||||||
function SidebarNavigationScreenPagesDataViews() {
|
|
||||||
const {
|
|
||||||
records: templateRecords
|
|
||||||
} = (0,external_wp_coreData_namespaceObject.useEntityRecords)('postType', constants_TEMPLATE_POST_TYPE, {
|
|
||||||
per_page: -1
|
|
||||||
});
|
|
||||||
const {
|
|
||||||
frontPage,
|
|
||||||
postsPage
|
|
||||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
|
||||||
const {
|
|
||||||
getEntityRecord
|
|
||||||
} = select(external_wp_coreData_namespaceObject.store);
|
|
||||||
const siteSettings = getEntityRecord('root', 'site');
|
|
||||||
return {
|
|
||||||
frontPage: siteSettings?.page_on_front,
|
|
||||||
postsPage: siteSettings?.page_for_posts
|
|
||||||
};
|
|
||||||
}, []);
|
|
||||||
const templates = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
|
||||||
if (!templateRecords) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
const isHomePageBlog = frontPage === postsPage;
|
|
||||||
const homeTemplate = templateRecords?.find(template => template.slug === 'front-page') || templateRecords?.find(template => template.slug === 'home') || templateRecords?.find(template => template.slug === 'index');
|
|
||||||
return [isHomePageBlog ? homeTemplate : null, ...templateRecords?.filter(({
|
|
||||||
slug
|
|
||||||
}) => ['404', 'search'].includes(slug))].filter(Boolean);
|
|
||||||
}, [templateRecords, frontPage, postsPage]);
|
|
||||||
return (0,external_React_.createElement)(SidebarNavigationScreen, {
|
|
||||||
title: (0,external_wp_i18n_namespaceObject.__)('Pages'),
|
|
||||||
description: (0,external_wp_i18n_namespaceObject.__)('Browse and manage pages.'),
|
|
||||||
content: (0,external_React_.createElement)(DataViewsSidebarContent, null),
|
|
||||||
backPath: "/page",
|
|
||||||
footer: (0,external_React_.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
|
|
||||||
spacing: 0
|
|
||||||
}, templates?.map(item => (0,external_React_.createElement)(sidebar_navigation_screen_pages_dataviews_PageItem, {
|
|
||||||
postType: constants_TEMPLATE_POST_TYPE,
|
|
||||||
postId: item.id,
|
|
||||||
key: item.id,
|
|
||||||
icon: library_layout,
|
|
||||||
withChevron: true
|
|
||||||
}, (0,external_React_.createElement)(external_wp_components_namespaceObject.__experimentalTruncate, {
|
|
||||||
numberOfLines: 1
|
|
||||||
}, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(item.title?.rendered || (0,external_wp_i18n_namespaceObject.__)('(no title)'))))))
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
;// CONCATENATED MODULE: external ["wp","dom"]
|
;// CONCATENATED MODULE: external ["wp","dom"]
|
||||||
const external_wp_dom_namespaceObject = window["wp"]["dom"];
|
const external_wp_dom_namespaceObject = window["wp"]["dom"];
|
||||||
;// CONCATENATED MODULE: external ["wp","escapeHtml"]
|
;// CONCATENATED MODULE: external ["wp","escapeHtml"]
|
||||||
|
@ -22155,6 +22070,7 @@ function SidebarNavigationScreenPage({
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal dependencies
|
* Internal dependencies
|
||||||
*/
|
*/
|
||||||
|
@ -22173,6 +22089,7 @@ function SidebarNavigationScreenPage({
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
useLocation: sidebar_useLocation
|
useLocation: sidebar_useLocation
|
||||||
} = unlock(external_wp_router_namespaceObject.privateApis);
|
} = unlock(external_wp_router_namespaceObject.privateApis);
|
||||||
|
@ -22199,7 +22116,10 @@ function SidebarScreens() {
|
||||||
path: "/page"
|
path: "/page"
|
||||||
}, (0,external_React_.createElement)(SidebarNavigationScreenPages, null)), (0,external_React_.createElement)(SidebarScreenWrapper, {
|
}, (0,external_React_.createElement)(SidebarNavigationScreenPages, null)), (0,external_React_.createElement)(SidebarScreenWrapper, {
|
||||||
path: "/pages"
|
path: "/pages"
|
||||||
}, (0,external_React_.createElement)(SidebarNavigationScreenPagesDataViews, null)), (0,external_React_.createElement)(SidebarScreenWrapper, {
|
}, (0,external_React_.createElement)(SidebarNavigationScreen, {
|
||||||
|
title: (0,external_wp_i18n_namespaceObject.__)('Pages'),
|
||||||
|
content: (0,external_React_.createElement)(DataViewsSidebarContent, null)
|
||||||
|
})), (0,external_React_.createElement)(SidebarScreenWrapper, {
|
||||||
path: "/page/:postId"
|
path: "/page/:postId"
|
||||||
}, (0,external_React_.createElement)(SidebarNavigationScreenPage, null)), (0,external_React_.createElement)(SidebarScreenWrapper, {
|
}, (0,external_React_.createElement)(SidebarNavigationScreenPage, null)), (0,external_React_.createElement)(SidebarScreenWrapper, {
|
||||||
path: "/:postType(wp_template)"
|
path: "/:postType(wp_template)"
|
||||||
|
@ -24752,8 +24672,8 @@ function usePageContentFocusCommands() {
|
||||||
if (currentPostType !== 'wp_template') {
|
if (currentPostType !== 'wp_template') {
|
||||||
commands.push({
|
commands.push({
|
||||||
name: 'core/switch-to-template-focus',
|
name: 'core/switch-to-template-focus',
|
||||||
/* translators: %1$s: template title */
|
label: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: template title */
|
||||||
label: (0,external_wp_i18n_namespaceObject.sprintf)('Edit template: %s', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title)),
|
(0,external_wp_i18n_namespaceObject.__)('Edit template: %s'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title)),
|
||||||
icon: library_layout,
|
icon: library_layout,
|
||||||
callback: ({
|
callback: ({
|
||||||
close
|
close
|
||||||
|
@ -24835,9 +24755,9 @@ function useManipulateDocumentCommands() {
|
||||||
}
|
}
|
||||||
const commands = [];
|
const commands = [];
|
||||||
if (isTemplateRevertable(template) && !isEditingPage) {
|
if (isTemplateRevertable(template) && !isEditingPage) {
|
||||||
const label = template.type === constants_TEMPLATE_POST_TYPE ? /* translators: %1$s: template title */
|
const label = template.type === constants_TEMPLATE_POST_TYPE ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: template title */
|
||||||
(0,external_wp_i18n_namespaceObject.sprintf)('Reset template: %s', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title)) : /* translators: %1$s: template part title */
|
(0,external_wp_i18n_namespaceObject.__)('Reset template: %s'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title)) : (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: template part title */
|
||||||
(0,external_wp_i18n_namespaceObject.sprintf)('Reset template part: %s', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title));
|
(0,external_wp_i18n_namespaceObject.__)('Reset template part: %s'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title));
|
||||||
commands.push({
|
commands.push({
|
||||||
name: 'core/reset-template',
|
name: 'core/reset-template',
|
||||||
label,
|
label,
|
||||||
|
@ -24851,9 +24771,9 @@ function useManipulateDocumentCommands() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (isTemplateRemovable(template) && !isEditingPage) {
|
if (isTemplateRemovable(template) && !isEditingPage) {
|
||||||
const label = template.type === constants_TEMPLATE_POST_TYPE ? /* translators: %1$s: template title */
|
const label = template.type === constants_TEMPLATE_POST_TYPE ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: template title */
|
||||||
(0,external_wp_i18n_namespaceObject.sprintf)('Delete template: %s', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title)) : /* translators: %1$s: template part title */
|
(0,external_wp_i18n_namespaceObject.__)('Delete template: %s'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title)) : (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: template part title */
|
||||||
(0,external_wp_i18n_namespaceObject.sprintf)('Delete template part: %s', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title));
|
(0,external_wp_i18n_namespaceObject.__)('Delete template part: %s'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title));
|
||||||
const path = template.type === constants_TEMPLATE_POST_TYPE ? '/wp_template' : '/wp_template_part/all';
|
const path = template.type === constants_TEMPLATE_POST_TYPE ? '/wp_template' : '/wp_template_part/all';
|
||||||
commands.push({
|
commands.push({
|
||||||
name: 'core/remove-template',
|
name: 'core/remove-template',
|
||||||
|
@ -26262,16 +26182,71 @@ function extractFontWeights(fontFaces) {
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Format the font family to use in the CSS font-family property of a CSS rule.
|
||||||
|
*
|
||||||
|
* The input can be a string with the font family name or a string with multiple font family names separated by commas.
|
||||||
|
* It follows the recommendations from the CSS Fonts Module Level 4.
|
||||||
|
* https://www.w3.org/TR/css-fonts-4/#font-family-prop
|
||||||
|
*
|
||||||
|
* @param {string} input - The font family.
|
||||||
|
* @return {string} The formatted font family.
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* formatFontFamily( "Open Sans, Font+Name, sans-serif" ) => '"Open Sans", "Font+Name", sans-serif'
|
||||||
|
* formatFontFamily( "'Open Sans', generic(kai), sans-serif" ) => '"Open Sans", sans-serif'
|
||||||
|
* formatFontFamily( "DotGothic16, Slabo 27px, serif" ) => '"DotGothic16","Slabo 27px",serif'
|
||||||
|
* formatFontFamily( "Mine's, Moe's Typography" ) => `"mine's","Moe's Typography"`
|
||||||
|
*/
|
||||||
function formatFontFamily(input) {
|
function formatFontFamily(input) {
|
||||||
return input.split(',').map(font => {
|
// Matches strings that are not exclusively alphabetic characters or hyphens, and do not exactly follow the pattern generic(alphabetic characters or hyphens).
|
||||||
font = font.trim(); // Remove any leading or trailing white spaces
|
const regex = /^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/;
|
||||||
// If the font doesn't start with quotes and contains a space, then wrap in quotes.
|
const output = input.trim();
|
||||||
// Check that string starts with a single or double quote and not a space
|
const formatItem = item => {
|
||||||
if (!(font.startsWith('"') || font.startsWith("'")) && font.indexOf(' ') !== -1) {
|
item = item.trim();
|
||||||
return `"${font}"`;
|
if (item.match(regex)) {
|
||||||
|
// removes leading and trailing quotes.
|
||||||
|
item = item.replace(/^["']|["']$/g, '');
|
||||||
|
return `"${item}"`;
|
||||||
}
|
}
|
||||||
return font; // Return font as is if no transformation is needed
|
return item;
|
||||||
}).join(', ');
|
};
|
||||||
|
if (output.includes(',')) {
|
||||||
|
return output.split(',').map(formatItem).filter(item => item !== '').join(', ');
|
||||||
|
}
|
||||||
|
return formatItem(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Format the font face name to use in the font-family property of a font face.
|
||||||
|
*
|
||||||
|
* The input can be a string with the font face name or a string with multiple font face names separated by commas.
|
||||||
|
* It removes the leading and trailing quotes from the font face name.
|
||||||
|
*
|
||||||
|
* @param {string} input - The font face name.
|
||||||
|
* @return {string} The formatted font face name.
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* formatFontFaceName("Open Sans") => "Open Sans"
|
||||||
|
* formatFontFaceName("'Open Sans', sans-serif") => "Open Sans"
|
||||||
|
* formatFontFaceName(", 'Open Sans', 'Helvetica Neue', sans-serif") => "Open Sans"
|
||||||
|
*/
|
||||||
|
function formatFontFaceName(input) {
|
||||||
|
let output = input.trim();
|
||||||
|
if (output.includes(',')) {
|
||||||
|
output = output.split(',')
|
||||||
|
// finds the first item that is not an empty string.
|
||||||
|
.find(item => item.trim() !== '').trim();
|
||||||
|
}
|
||||||
|
// removes leading and trailing quotes.
|
||||||
|
output = output.replace(/^["']|["']$/g, '');
|
||||||
|
|
||||||
|
// Firefox needs the font name to be wrapped in double quotes meanwhile other browsers don't.
|
||||||
|
if (window.navigator.userAgent.toLowerCase().includes('firefox')) {
|
||||||
|
output = `"${output}"`;
|
||||||
|
}
|
||||||
|
return output;
|
||||||
}
|
}
|
||||||
function getFamilyPreviewStyle(family) {
|
function getFamilyPreviewStyle(family) {
|
||||||
const style = {
|
const style = {
|
||||||
|
@ -26402,7 +26377,7 @@ async function loadFontFaceInBrowser(fontFace, source, addTo = 'all') {
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const newFont = new window.FontFace(formatFontFamily(fontFace.fontFamily), dataSource, {
|
const newFont = new window.FontFace(formatFontFaceName(fontFace.fontFamily), dataSource, {
|
||||||
style: fontFace.fontStyle,
|
style: fontFace.fontStyle,
|
||||||
weight: fontFace.fontWeight
|
weight: fontFace.fontWeight
|
||||||
});
|
});
|
||||||
|
@ -26895,7 +26870,7 @@ function FontLibraryProvider({
|
||||||
if (font.fontFace) {
|
if (font.fontFace) {
|
||||||
font.fontFace.forEach(face => {
|
font.fontFace.forEach(face => {
|
||||||
// Load font faces just in the iframe because they already are in the document.
|
// Load font faces just in the iframe because they already are in the document.
|
||||||
loadFontFaceInBrowser(face, getDisplaySrcFromFontFace(face.src), 'iframe');
|
loadFontFaceInBrowser(face, getDisplaySrcFromFontFace(face.src), 'all');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -31776,13 +31751,25 @@ var vmtx$1 = Object.freeze( { __proto__: null, vmtx: vmtx } );
|
||||||
/* eslint-enable */
|
/* eslint-enable */
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js
|
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js
|
||||||
|
/**
|
||||||
|
* WordPress dependencies
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal dependencies
|
||||||
|
*/
|
||||||
|
|
||||||
|
const {
|
||||||
|
kebabCase: make_families_from_faces_kebabCase
|
||||||
|
} = unlock(external_wp_components_namespaceObject.privateApis);
|
||||||
function makeFamiliesFromFaces(fontFaces) {
|
function makeFamiliesFromFaces(fontFaces) {
|
||||||
const fontFamiliesObject = fontFaces.reduce((acc, item) => {
|
const fontFamiliesObject = fontFaces.reduce((acc, item) => {
|
||||||
if (!acc[item.fontFamily]) {
|
if (!acc[item.fontFamily]) {
|
||||||
acc[item.fontFamily] = {
|
acc[item.fontFamily] = {
|
||||||
name: item.fontFamily,
|
name: item.fontFamily,
|
||||||
fontFamily: item.fontFamily,
|
fontFamily: item.fontFamily,
|
||||||
slug: item.fontFamily.replace(/\s+/g, '-').toLowerCase(),
|
slug: make_families_from_faces_kebabCase(item.fontFamily.toLowerCase()),
|
||||||
fontFace: []
|
fontFace: []
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -33022,14 +33009,15 @@ function ChangesSummary({
|
||||||
const changes = getGlobalStylesChanges(revision, previousRevision, {
|
const changes = getGlobalStylesChanges(revision, previousRevision, {
|
||||||
maxResults: 7
|
maxResults: 7
|
||||||
});
|
});
|
||||||
const changesLength = changes.length;
|
if (!changes.length) {
|
||||||
if (!changesLength) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (0,external_React_.createElement)("span", {
|
return (0,external_React_.createElement)("ul", {
|
||||||
"data-testid": "global-styles-revision-changes",
|
"data-testid": "global-styles-revision-changes",
|
||||||
className: "edit-site-global-styles-screen-revisions__changes"
|
className: "edit-site-global-styles-screen-revisions__changes"
|
||||||
}, changes.join(', '), ".");
|
}, changes.map(change => (0,external_React_.createElement)("li", {
|
||||||
|
key: change
|
||||||
|
}, change)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33152,6 +33140,7 @@ function RevisionsButtons({
|
||||||
className: "edit-site-global-styles-screen-revisions__applied-text"
|
className: "edit-site-global-styles-screen-revisions__applied-text"
|
||||||
}, (0,external_wp_i18n_namespaceObject.__)('These styles are already applied to your site.')) : (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
|
}, (0,external_wp_i18n_namespaceObject.__)('These styles are already applied to your site.')) : (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
|
||||||
disabled: areStylesEqual,
|
disabled: areStylesEqual,
|
||||||
|
size: "compact",
|
||||||
variant: "primary",
|
variant: "primary",
|
||||||
className: "edit-site-global-styles-screen-revisions__apply-button",
|
className: "edit-site-global-styles-screen-revisions__apply-button",
|
||||||
onClick: onApplyRevision
|
onClick: onApplyRevision
|
||||||
|
@ -42642,13 +42631,13 @@ function Media({
|
||||||
record: media
|
record: media
|
||||||
} = (0,external_wp_coreData_namespaceObject.useEntityRecord)('root', 'media', id);
|
} = (0,external_wp_coreData_namespaceObject.useEntityRecord)('root', 'media', id);
|
||||||
const currentSize = size.find(s => !!media?.media_details?.sizes[s]);
|
const currentSize = size.find(s => !!media?.media_details?.sizes[s]);
|
||||||
const mediaDetails = media?.media_details?.sizes[currentSize];
|
const mediaUrl = media?.media_details?.sizes[currentSize]?.source_url || media?.source_url;
|
||||||
if (!mediaDetails) {
|
if (!mediaUrl) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (0,external_React_.createElement)("img", {
|
return (0,external_React_.createElement)("img", {
|
||||||
...props,
|
...props,
|
||||||
src: mediaDetails.source_url,
|
src: mediaUrl,
|
||||||
alt: media.alt_text
|
alt: media.alt_text
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6607,9 +6607,11 @@ function GlobalStylesDescription({
|
||||||
const globalStylesChanges = getGlobalStylesChanges(currentEditorGlobalStyles, savedRecord, {
|
const globalStylesChanges = getGlobalStylesChanges(currentEditorGlobalStyles, savedRecord, {
|
||||||
maxResults: 10
|
maxResults: 10
|
||||||
});
|
});
|
||||||
return globalStylesChanges.length ? (0,external_React_.createElement)(external_wp_components_namespaceObject.PanelRow, {
|
return globalStylesChanges.length ? (0,external_React_.createElement)("ul", {
|
||||||
className: "entities-saved-states__change-summary"
|
className: "entities-saved-states__changes"
|
||||||
}, globalStylesChanges.join(', '), ".") : null;
|
}, globalStylesChanges.map(change => (0,external_React_.createElement)("li", {
|
||||||
|
key: change
|
||||||
|
}, change))) : null;
|
||||||
}
|
}
|
||||||
function EntityDescription({
|
function EntityDescription({
|
||||||
record,
|
record,
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -120,6 +120,7 @@ const PARTIAL_SYNCING_SUPPORTED_BLOCKS = {
|
||||||
rel: (0,external_wp_i18n_namespaceObject.__)('Link Relationship')
|
rel: (0,external_wp_i18n_namespaceObject.__)('Link Relationship')
|
||||||
},
|
},
|
||||||
'core/image': {
|
'core/image': {
|
||||||
|
id: (0,external_wp_i18n_namespaceObject.__)('Image ID'),
|
||||||
url: (0,external_wp_i18n_namespaceObject.__)('URL'),
|
url: (0,external_wp_i18n_namespaceObject.__)('URL'),
|
||||||
title: (0,external_wp_i18n_namespaceObject.__)('Title'),
|
title: (0,external_wp_i18n_namespaceObject.__)('Title'),
|
||||||
alt: (0,external_wp_i18n_namespaceObject.__)('Alt Text')
|
alt: (0,external_wp_i18n_namespaceObject.__)('Alt Text')
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.5-beta1-57662';
|
$wp_version = '6.5-beta1-57663';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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