mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-21 15:01:32 +01:00
Editor: Update packages for 6.7 Beta 1.
Syncs `@wordpress/*` packages to the `wp-6.7` npm tag. See #61906. Built from https://develop.svn.wordpress.org/trunk@59119 git-svn-id: http://core.svn.wordpress.org/trunk@58515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b7d4ca5298
commit
cf877c686b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
<?php return array('interactivity/index.min.js' => array('dependencies' => array(), 'version' => '2d6d1fdbcb3fda39c768', 'type' => 'module'), 'interactivity/debug.min.js' => array('dependencies' => array(), 'version' => '1ccc67b05c275e51a8f8', 'type' => 'module'), 'interactivity-router/index.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '64645ef3cd2d32860d7d', 'type' => 'module'), 'a11y/index.min.js' => array('dependencies' => array(), 'version' => 'b7d06936b8bc23cff2ad', 'type' => 'module'), 'block-library/file/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'fdc2f6842e015af83140', 'type' => 'module'), 'block-library/image/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'acfec7b3c0be4a859b31', 'type' => 'module'), 'block-library/navigation/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '8ff192874fc8910a284c', 'type' => 'module'), 'block-library/query/view.min.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => 'f4c91c89fa5271f3dad9', 'type' => 'module'), 'block-library/search/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '2a73400a693958f604de', 'type' => 'module'));
|
||||
<?php return array('interactivity/index.min.js' => array('dependencies' => array(), 'version' => '2d6d1fdbcb3fda39c768', 'type' => 'module'), 'interactivity/debug.min.js' => array('dependencies' => array(), 'version' => '1ccc67b05c275e51a8f8', 'type' => 'module'), 'interactivity-router/index.min.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/a11y', 'import' => 'dynamic')), 'version' => 'f01b88335afcef3dfc5d', 'type' => 'module'), 'a11y/index.min.js' => array('dependencies' => array(), 'version' => 'b7d06936b8bc23cff2ad', 'type' => 'module'), 'block-library/file/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'fdc2f6842e015af83140', 'type' => 'module'), 'block-library/image/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'acfec7b3c0be4a859b31', 'type' => 'module'), 'block-library/navigation/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '8ff192874fc8910a284c', 'type' => 'module'), 'block-library/query/view.min.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => 'f4c91c89fa5271f3dad9', 'type' => 'module'), 'block-library/search/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '2a73400a693958f604de', 'type' => 'module'));
|
||||
|
@ -1 +1 @@
|
||||
<?php return array('interactivity/index.js' => array('dependencies' => array(), 'version' => 'ff86b5988014bd364de8', 'type' => 'module'), 'interactivity/debug.js' => array('dependencies' => array(), 'version' => 'd05372e68bd7a4cb0676', 'type' => 'module'), 'interactivity-router/index.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'd76e562ff4609c2ae7fc', 'type' => 'module'), 'a11y/index.js' => array('dependencies' => array(), 'version' => 'b3a7f46c0ef4f3484886', 'type' => 'module'), 'block-library/file/view.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'b0cd471b6fde34702d88', 'type' => 'module'), 'block-library/image/view.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'e1ce544dd878f3a09f70', 'type' => 'module'), 'block-library/navigation/view.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '9510985aedc1f8e088f3', 'type' => 'module'), 'block-library/query/view.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => '8e6f28f734f3c306b648', 'type' => 'module'), 'block-library/search/view.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'acdb7febda1392ad28de', 'type' => 'module'));
|
||||
<?php return array('interactivity/index.js' => array('dependencies' => array(), 'version' => 'ff86b5988014bd364de8', 'type' => 'module'), 'interactivity/debug.js' => array('dependencies' => array(), 'version' => 'd05372e68bd7a4cb0676', 'type' => 'module'), 'interactivity-router/index.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/a11y', 'import' => 'dynamic')), 'version' => '4b36f376cc3aab08acca', 'type' => 'module'), 'a11y/index.js' => array('dependencies' => array(), 'version' => 'b3a7f46c0ef4f3484886', 'type' => 'module'), 'block-library/file/view.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'b0cd471b6fde34702d88', 'type' => 'module'), 'block-library/image/view.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'e1ce544dd878f3a09f70', 'type' => 'module'), 'block-library/navigation/view.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '9510985aedc1f8e088f3', 'type' => 'module'), 'block-library/query/view.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => '8e6f28f734f3c306b648', 'type' => 'module'), 'block-library/search/view.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'acdb7febda1392ad28de', 'type' => 'module'));
|
||||
|
@ -10,24 +10,24 @@
|
||||
"attributes": {
|
||||
"blob": {
|
||||
"type": "string",
|
||||
"__experimentalRole": "local"
|
||||
"role": "local"
|
||||
},
|
||||
"src": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": "audio",
|
||||
"attribute": "src",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"caption": {
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "figcaption",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"id": {
|
||||
"type": "number",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"autoplay": {
|
||||
"type": "boolean",
|
||||
|
@ -72,24 +72,24 @@
|
||||
'attributes' => array(
|
||||
'blob' => array(
|
||||
'type' => 'string',
|
||||
'__experimentalRole' => 'local'
|
||||
'role' => 'local'
|
||||
),
|
||||
'src' => array(
|
||||
'type' => 'string',
|
||||
'source' => 'attribute',
|
||||
'selector' => 'audio',
|
||||
'attribute' => 'src',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'caption' => array(
|
||||
'type' => 'rich-text',
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'figcaption',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'id' => array(
|
||||
'type' => 'number',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'autoplay' => array(
|
||||
'type' => 'boolean',
|
||||
@ -265,34 +265,34 @@
|
||||
'source' => 'attribute',
|
||||
'selector' => 'a',
|
||||
'attribute' => 'href',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'title' => array(
|
||||
'type' => 'string',
|
||||
'source' => 'attribute',
|
||||
'selector' => 'a,button',
|
||||
'attribute' => 'title',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'text' => array(
|
||||
'type' => 'rich-text',
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'a,button',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'linkTarget' => array(
|
||||
'type' => 'string',
|
||||
'source' => 'attribute',
|
||||
'selector' => 'a',
|
||||
'attribute' => 'target',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'rel' => array(
|
||||
'type' => 'string',
|
||||
'source' => 'attribute',
|
||||
'selector' => 'a',
|
||||
'attribute' => 'rel',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'placeholder' => array(
|
||||
'type' => 'string'
|
||||
@ -555,7 +555,7 @@
|
||||
),
|
||||
'label' => array(
|
||||
'type' => 'string',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'showLabel' => array(
|
||||
'type' => 'boolean',
|
||||
@ -1849,21 +1849,21 @@
|
||||
'attributes' => array(
|
||||
'url' => array(
|
||||
'type' => 'string',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'caption' => array(
|
||||
'type' => 'rich-text',
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'figcaption',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'type' => array(
|
||||
'type' => 'string',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'providerNameSlug' => array(
|
||||
'type' => 'string',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'allowResponsive' => array(
|
||||
'type' => 'boolean',
|
||||
@ -1872,12 +1872,12 @@
|
||||
'responsive' => array(
|
||||
'type' => 'boolean',
|
||||
'default' => false,
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'previewable' => array(
|
||||
'type' => 'boolean',
|
||||
'default' => true,
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
)
|
||||
),
|
||||
'supports' => array(
|
||||
@ -1911,7 +1911,7 @@
|
||||
),
|
||||
'blob' => array(
|
||||
'type' => 'string',
|
||||
'__experimentalRole' => 'local'
|
||||
'role' => 'local'
|
||||
),
|
||||
'href' => array(
|
||||
'type' => 'string'
|
||||
@ -2395,7 +2395,7 @@
|
||||
'type' => 'rich-text',
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'h1,h2,h3,h4,h5,h6',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'level' => array(
|
||||
'type' => 'number',
|
||||
@ -2563,14 +2563,14 @@
|
||||
'attributes' => array(
|
||||
'blob' => array(
|
||||
'type' => 'string',
|
||||
'__experimentalRole' => 'local'
|
||||
'role' => 'local'
|
||||
),
|
||||
'url' => array(
|
||||
'type' => 'string',
|
||||
'source' => 'attribute',
|
||||
'selector' => 'img',
|
||||
'attribute' => 'src',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'alt' => array(
|
||||
'type' => 'string',
|
||||
@ -2578,13 +2578,13 @@
|
||||
'selector' => 'img',
|
||||
'attribute' => 'alt',
|
||||
'default' => '',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'caption' => array(
|
||||
'type' => 'rich-text',
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'figcaption',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'lightbox' => array(
|
||||
'type' => 'object',
|
||||
@ -2597,14 +2597,14 @@
|
||||
'source' => 'attribute',
|
||||
'selector' => 'img',
|
||||
'attribute' => 'title',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'href' => array(
|
||||
'type' => 'string',
|
||||
'source' => 'attribute',
|
||||
'selector' => 'figure > a',
|
||||
'attribute' => 'href',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'rel' => array(
|
||||
'type' => 'string',
|
||||
@ -2620,7 +2620,7 @@
|
||||
),
|
||||
'id' => array(
|
||||
'type' => 'number',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'width' => array(
|
||||
'type' => 'string'
|
||||
@ -2945,7 +2945,7 @@
|
||||
'ordered' => array(
|
||||
'type' => 'boolean',
|
||||
'default' => false,
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'values' => array(
|
||||
'type' => 'string',
|
||||
@ -2957,7 +2957,7 @@
|
||||
'ul'
|
||||
),
|
||||
'default' => '',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'type' => array(
|
||||
'type' => 'string'
|
||||
@ -3045,7 +3045,7 @@
|
||||
'type' => 'rich-text',
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'li',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
)
|
||||
),
|
||||
'supports' => array(
|
||||
@ -3186,7 +3186,7 @@
|
||||
'selector' => 'figure img',
|
||||
'attribute' => 'alt',
|
||||
'default' => '',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'mediaPosition' => array(
|
||||
'type' => 'string',
|
||||
@ -3194,14 +3194,14 @@
|
||||
),
|
||||
'mediaId' => array(
|
||||
'type' => 'number',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'mediaUrl' => array(
|
||||
'type' => 'string',
|
||||
'source' => 'attribute',
|
||||
'selector' => 'figure video,figure img',
|
||||
'attribute' => 'src',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'mediaLink' => array(
|
||||
'type' => 'string'
|
||||
@ -3220,7 +3220,7 @@
|
||||
'source' => 'attribute',
|
||||
'selector' => 'figure a',
|
||||
'attribute' => 'href',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'rel' => array(
|
||||
'type' => 'string',
|
||||
@ -3236,7 +3236,7 @@
|
||||
),
|
||||
'mediaType' => array(
|
||||
'type' => 'string',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'mediaWidth' => array(
|
||||
'type' => 'number',
|
||||
@ -3893,7 +3893,7 @@
|
||||
'type' => 'rich-text',
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'p',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'dropCap' => array(
|
||||
'type' => 'boolean',
|
||||
@ -4920,7 +4920,7 @@
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'pre',
|
||||
'__unstablePreserveWhiteSpace' => true,
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
)
|
||||
),
|
||||
'supports' => array(
|
||||
@ -4980,13 +4980,13 @@
|
||||
'type' => 'rich-text',
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'p',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'citation' => array(
|
||||
'type' => 'rich-text',
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'cite',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'textAlign' => array(
|
||||
'type' => 'string'
|
||||
@ -5499,13 +5499,13 @@
|
||||
'selector' => 'blockquote',
|
||||
'multiline' => 'p',
|
||||
'default' => '',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'citation' => array(
|
||||
'type' => 'rich-text',
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'cite',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'textAlign' => array(
|
||||
'type' => 'string'
|
||||
@ -5729,7 +5729,7 @@
|
||||
'attributes' => array(
|
||||
'label' => array(
|
||||
'type' => 'string',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'showLabel' => array(
|
||||
'type' => 'boolean',
|
||||
@ -5738,7 +5738,7 @@
|
||||
'placeholder' => array(
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'width' => array(
|
||||
'type' => 'number'
|
||||
@ -5748,7 +5748,7 @@
|
||||
),
|
||||
'buttonText' => array(
|
||||
'type' => 'string',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'buttonPosition' => array(
|
||||
'type' => 'string',
|
||||
@ -6818,7 +6818,7 @@
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'pre',
|
||||
'__unstablePreserveWhiteSpace' => true,
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'textAlign' => array(
|
||||
'type' => 'string'
|
||||
@ -6904,7 +6904,7 @@
|
||||
'type' => 'rich-text',
|
||||
'source' => 'rich-text',
|
||||
'selector' => 'figcaption',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'controls' => array(
|
||||
'type' => 'boolean',
|
||||
@ -6915,7 +6915,7 @@
|
||||
),
|
||||
'id' => array(
|
||||
'type' => 'number',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'loop' => array(
|
||||
'type' => 'boolean',
|
||||
@ -6944,14 +6944,14 @@
|
||||
),
|
||||
'blob' => array(
|
||||
'type' => 'string',
|
||||
'__experimentalRole' => 'local'
|
||||
'role' => 'local'
|
||||
),
|
||||
'src' => array(
|
||||
'type' => 'string',
|
||||
'source' => 'attribute',
|
||||
'selector' => 'video',
|
||||
'attribute' => 'src',
|
||||
'__experimentalRole' => 'content'
|
||||
'role' => 'content'
|
||||
),
|
||||
'playsInline' => array(
|
||||
'type' => 'boolean',
|
||||
@ -6960,7 +6960,7 @@
|
||||
'attribute' => 'playsinline'
|
||||
),
|
||||
'tracks' => array(
|
||||
'__experimentalRole' => 'content',
|
||||
'role' => 'content',
|
||||
'type' => 'array',
|
||||
'items' => array(
|
||||
'type' => 'object'
|
||||
|
@ -26,34 +26,34 @@
|
||||
"source": "attribute",
|
||||
"selector": "a",
|
||||
"attribute": "href",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": "a,button",
|
||||
"attribute": "title",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"text": {
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "a,button",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"linkTarget": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": "a",
|
||||
"attribute": "target",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"rel": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": "a",
|
||||
"attribute": "rel",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"placeholder": {
|
||||
"type": "string"
|
||||
|
@ -34,7 +34,7 @@
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"showLabel": {
|
||||
"type": "boolean",
|
||||
|
@ -9,21 +9,21 @@
|
||||
"attributes": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"caption": {
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "figcaption",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"providerNameSlug": {
|
||||
"type": "string",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"allowResponsive": {
|
||||
"type": "boolean",
|
||||
@ -32,12 +32,12 @@
|
||||
"responsive": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"previewable": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
|
@ -13,7 +13,7 @@
|
||||
},
|
||||
"blob": {
|
||||
"type": "string",
|
||||
"__experimentalRole": "local"
|
||||
"role": "local"
|
||||
},
|
||||
"href": {
|
||||
"type": "string"
|
||||
|
@ -15,7 +15,7 @@
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "h1,h2,h3,h4,h5,h6",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"level": {
|
||||
"type": "number",
|
||||
|
@ -11,14 +11,14 @@
|
||||
"attributes": {
|
||||
"blob": {
|
||||
"type": "string",
|
||||
"__experimentalRole": "local"
|
||||
"role": "local"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": "img",
|
||||
"attribute": "src",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"alt": {
|
||||
"type": "string",
|
||||
@ -26,13 +26,13 @@
|
||||
"selector": "img",
|
||||
"attribute": "alt",
|
||||
"default": "",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"caption": {
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "figcaption",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"lightbox": {
|
||||
"type": "object",
|
||||
@ -45,14 +45,14 @@
|
||||
"source": "attribute",
|
||||
"selector": "img",
|
||||
"attribute": "title",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"href": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": "figure > a",
|
||||
"attribute": "href",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"rel": {
|
||||
"type": "string",
|
||||
@ -68,7 +68,7 @@
|
||||
},
|
||||
"id": {
|
||||
"type": "number",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"width": {
|
||||
"type": "string"
|
||||
|
@ -16,7 +16,7 @@
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "li",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
|
@ -12,7 +12,7 @@
|
||||
"ordered": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"values": {
|
||||
"type": "string",
|
||||
@ -21,7 +21,7 @@
|
||||
"multiline": "li",
|
||||
"__unstableMultilineWrapperTags": [ "ol", "ul" ],
|
||||
"default": "",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
|
@ -18,7 +18,7 @@
|
||||
"selector": "figure img",
|
||||
"attribute": "alt",
|
||||
"default": "",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"mediaPosition": {
|
||||
"type": "string",
|
||||
@ -26,14 +26,14 @@
|
||||
},
|
||||
"mediaId": {
|
||||
"type": "number",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"mediaUrl": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": "figure video,figure img",
|
||||
"attribute": "src",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"mediaLink": {
|
||||
"type": "string"
|
||||
@ -52,7 +52,7 @@
|
||||
"source": "attribute",
|
||||
"selector": "figure a",
|
||||
"attribute": "href",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"rel": {
|
||||
"type": "string",
|
||||
@ -68,7 +68,7 @@
|
||||
},
|
||||
"mediaType": {
|
||||
"type": "string",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"mediaWidth": {
|
||||
"type": "number",
|
||||
|
@ -1499,9 +1499,15 @@ function block_core_navigation_mock_parsed_block( $inner_blocks, $post ) {
|
||||
*/
|
||||
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 ( function_exists( 'apply_block_hooks_to_content' ) ) {
|
||||
$mock_navigation_block_markup = serialize_block( $mock_navigation_block );
|
||||
return apply_block_hooks_to_content( $mock_navigation_block_markup, $post, 'insert_hooked_blocks' );
|
||||
}
|
||||
|
||||
$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, 'insert_hooked_blocks' );
|
||||
|
@ -15,7 +15,7 @@
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "p",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"dropCap": {
|
||||
"type": "boolean",
|
||||
|
@ -12,7 +12,7 @@
|
||||
"source": "rich-text",
|
||||
"selector": "pre",
|
||||
"__unstablePreserveWhiteSpace": true,
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
|
@ -11,13 +11,13 @@
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "p",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"citation": {
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "cite",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"textAlign": {
|
||||
"type": "string"
|
||||
|
@ -14,13 +14,13 @@
|
||||
"selector": "blockquote",
|
||||
"multiline": "p",
|
||||
"default": "",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"citation": {
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "cite",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"textAlign": {
|
||||
"type": "string"
|
||||
|
@ -10,7 +10,7 @@
|
||||
"attributes": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"showLabel": {
|
||||
"type": "boolean",
|
||||
@ -19,7 +19,7 @@
|
||||
"placeholder": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"width": {
|
||||
"type": "number"
|
||||
@ -29,7 +29,7 @@
|
||||
},
|
||||
"buttonText": {
|
||||
"type": "string",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"buttonPosition": {
|
||||
"type": "string",
|
||||
|
@ -13,7 +13,7 @@
|
||||
"source": "rich-text",
|
||||
"selector": "pre",
|
||||
"__unstablePreserveWhiteSpace": true,
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"textAlign": {
|
||||
"type": "string"
|
||||
|
@ -18,7 +18,7 @@
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "figcaption",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"controls": {
|
||||
"type": "boolean",
|
||||
@ -29,7 +29,7 @@
|
||||
},
|
||||
"id": {
|
||||
"type": "number",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"loop": {
|
||||
"type": "boolean",
|
||||
@ -58,14 +58,14 @@
|
||||
},
|
||||
"blob": {
|
||||
"type": "string",
|
||||
"__experimentalRole": "local"
|
||||
"role": "local"
|
||||
},
|
||||
"src": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": "video",
|
||||
"attribute": "src",
|
||||
"__experimentalRole": "content"
|
||||
"role": "content"
|
||||
},
|
||||
"playsInline": {
|
||||
"type": "boolean",
|
||||
@ -74,7 +74,7 @@
|
||||
"attribute": "playsinline"
|
||||
},
|
||||
"tracks": {
|
||||
"__experimentalRole": "content",
|
||||
"role": "content",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object"
|
||||
|
@ -111,6 +111,9 @@
|
||||
right:0;
|
||||
top:0;
|
||||
}
|
||||
.is-installing .block-directory-downloadable-block-list-item__icon{
|
||||
margin-left:22px;
|
||||
}
|
||||
|
||||
.block-directory-block-ratings{
|
||||
display:block;
|
||||
|
@ -1 +1 @@
|
||||
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,161;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px;--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color)}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.block-directory-block-ratings>span{display:flex}.block-directory-block-ratings svg{fill:#1e1e1e;margin-right:-4px}.block-directory-block-ratings .block-directory-block-ratings__star-empty{fill:#ccc}.block-directory-compact-list{list-style:none;margin:0}.block-directory-compact-list__item{align-items:center;display:flex;flex-direction:row;margin-bottom:16px}.block-directory-compact-list__item:last-child{margin-bottom:0}.block-directory-compact-list__item-details{margin-right:8px}.block-directory-compact-list__item-title{font-weight:500}.block-directory-compact-list__item-author{color:#757575;font-size:11px}.block-directory-downloadable-block-icon{border:1px solid #ddd;height:54px;min-width:54px;vertical-align:middle;width:54px}.block-directory-downloadable-block-list-item{display:grid;grid-template-columns:auto 1fr;height:auto;padding:12px;position:relative;text-align:right;width:100%}.block-directory-downloadable-block-list-item:hover{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.block-directory-downloadable-block-list-item.is-busy{background:#0000}.block-directory-downloadable-block-list-item.is-busy .block-directory-downloadable-block-list-item__author{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.block-directory-downloadable-block-list-item:disabled,.block-directory-downloadable-block-list-item[aria-disabled]{opacity:1}.block-directory-downloadable-block-list-item__icon{align-self:flex-start;margin-left:16px;position:relative}.block-directory-downloadable-block-list-item__icon .block-directory-downloadable-block-list-item__spinner{align-items:center;background:#ffffffbf;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.block-directory-block-ratings{display:block;margin-top:4px}.block-directory-downloadable-block-list-item__details{color:#1e1e1e}.block-directory-downloadable-block-list-item__title{display:block;font-weight:600}.block-directory-downloadable-block-list-item__author{display:block;font-weight:400;margin-top:4px}.block-directory-downloadable-block-list-item__desc{display:block;margin-top:8px}.block-directory-downloadable-block-notice{color:#cc1818;margin:8px 0 0}.block-directory-downloadable-block-notice__content{margin-bottom:8px;padding-left:12px}.block-directory-downloadable-blocks-panel{padding:16px}.block-directory-downloadable-blocks-panel.has-blocks-loading{color:#757575;font-style:normal;margin:112px 0;padding:0;text-align:center}.block-directory-downloadable-blocks-panel.has-blocks-loading .components-spinner{float:inherit}.block-directory-downloadable-blocks-panel__no-local{color:#757575;margin:48px 0;padding:0 64px;text-align:center}.block-directory-downloadable-blocks-panel__title{font-size:14px;margin:0 0 4px}.block-directory-downloadable-blocks-panel__description{margin-top:0}.block-directory-downloadable-blocks-panel button{margin-top:4px}.installed-blocks-pre-publish-panel__copy{margin-top:0}
|
||||
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,161;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px;--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color)}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.block-directory-block-ratings>span{display:flex}.block-directory-block-ratings svg{fill:#1e1e1e;margin-right:-4px}.block-directory-block-ratings .block-directory-block-ratings__star-empty{fill:#ccc}.block-directory-compact-list{list-style:none;margin:0}.block-directory-compact-list__item{align-items:center;display:flex;flex-direction:row;margin-bottom:16px}.block-directory-compact-list__item:last-child{margin-bottom:0}.block-directory-compact-list__item-details{margin-right:8px}.block-directory-compact-list__item-title{font-weight:500}.block-directory-compact-list__item-author{color:#757575;font-size:11px}.block-directory-downloadable-block-icon{border:1px solid #ddd;height:54px;min-width:54px;vertical-align:middle;width:54px}.block-directory-downloadable-block-list-item{display:grid;grid-template-columns:auto 1fr;height:auto;padding:12px;position:relative;text-align:right;width:100%}.block-directory-downloadable-block-list-item:hover{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.block-directory-downloadable-block-list-item.is-busy{background:#0000}.block-directory-downloadable-block-list-item.is-busy .block-directory-downloadable-block-list-item__author{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.block-directory-downloadable-block-list-item:disabled,.block-directory-downloadable-block-list-item[aria-disabled]{opacity:1}.block-directory-downloadable-block-list-item__icon{align-self:flex-start;margin-left:16px;position:relative}.block-directory-downloadable-block-list-item__icon .block-directory-downloadable-block-list-item__spinner{align-items:center;background:#ffffffbf;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.is-installing .block-directory-downloadable-block-list-item__icon{margin-left:22px}.block-directory-block-ratings{display:block;margin-top:4px}.block-directory-downloadable-block-list-item__details{color:#1e1e1e}.block-directory-downloadable-block-list-item__title{display:block;font-weight:600}.block-directory-downloadable-block-list-item__author{display:block;font-weight:400;margin-top:4px}.block-directory-downloadable-block-list-item__desc{display:block;margin-top:8px}.block-directory-downloadable-block-notice{color:#cc1818;margin:8px 0 0}.block-directory-downloadable-block-notice__content{margin-bottom:8px;padding-left:12px}.block-directory-downloadable-blocks-panel{padding:16px}.block-directory-downloadable-blocks-panel.has-blocks-loading{color:#757575;font-style:normal;margin:112px 0;padding:0;text-align:center}.block-directory-downloadable-blocks-panel.has-blocks-loading .components-spinner{float:inherit}.block-directory-downloadable-blocks-panel__no-local{color:#757575;margin:48px 0;padding:0 64px;text-align:center}.block-directory-downloadable-blocks-panel__title{font-size:14px;margin:0 0 4px}.block-directory-downloadable-blocks-panel__description{margin-top:0}.block-directory-downloadable-blocks-panel button{margin-top:4px}.installed-blocks-pre-publish-panel__copy{margin-top:0}
|
@ -111,6 +111,9 @@
|
||||
right:0;
|
||||
top:0;
|
||||
}
|
||||
.is-installing .block-directory-downloadable-block-list-item__icon{
|
||||
margin-right:22px;
|
||||
}
|
||||
|
||||
.block-directory-block-ratings{
|
||||
display:block;
|
||||
|
@ -1 +1 @@
|
||||
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,161;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px;--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color)}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.block-directory-block-ratings>span{display:flex}.block-directory-block-ratings svg{fill:#1e1e1e;margin-left:-4px}.block-directory-block-ratings .block-directory-block-ratings__star-empty{fill:#ccc}.block-directory-compact-list{list-style:none;margin:0}.block-directory-compact-list__item{align-items:center;display:flex;flex-direction:row;margin-bottom:16px}.block-directory-compact-list__item:last-child{margin-bottom:0}.block-directory-compact-list__item-details{margin-left:8px}.block-directory-compact-list__item-title{font-weight:500}.block-directory-compact-list__item-author{color:#757575;font-size:11px}.block-directory-downloadable-block-icon{border:1px solid #ddd;height:54px;min-width:54px;vertical-align:middle;width:54px}.block-directory-downloadable-block-list-item{display:grid;grid-template-columns:auto 1fr;height:auto;padding:12px;position:relative;text-align:left;width:100%}.block-directory-downloadable-block-list-item:hover{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.block-directory-downloadable-block-list-item.is-busy{background:#0000}.block-directory-downloadable-block-list-item.is-busy .block-directory-downloadable-block-list-item__author{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.block-directory-downloadable-block-list-item:disabled,.block-directory-downloadable-block-list-item[aria-disabled]{opacity:1}.block-directory-downloadable-block-list-item__icon{align-self:flex-start;margin-right:16px;position:relative}.block-directory-downloadable-block-list-item__icon .block-directory-downloadable-block-list-item__spinner{align-items:center;background:#ffffffbf;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.block-directory-block-ratings{display:block;margin-top:4px}.block-directory-downloadable-block-list-item__details{color:#1e1e1e}.block-directory-downloadable-block-list-item__title{display:block;font-weight:600}.block-directory-downloadable-block-list-item__author{display:block;font-weight:400;margin-top:4px}.block-directory-downloadable-block-list-item__desc{display:block;margin-top:8px}.block-directory-downloadable-block-notice{color:#cc1818;margin:8px 0 0}.block-directory-downloadable-block-notice__content{margin-bottom:8px;padding-right:12px}.block-directory-downloadable-blocks-panel{padding:16px}.block-directory-downloadable-blocks-panel.has-blocks-loading{color:#757575;font-style:normal;margin:112px 0;padding:0;text-align:center}.block-directory-downloadable-blocks-panel.has-blocks-loading .components-spinner{float:inherit}.block-directory-downloadable-blocks-panel__no-local{color:#757575;margin:48px 0;padding:0 64px;text-align:center}.block-directory-downloadable-blocks-panel__title{font-size:14px;margin:0 0 4px}.block-directory-downloadable-blocks-panel__description{margin-top:0}.block-directory-downloadable-blocks-panel button{margin-top:4px}.installed-blocks-pre-publish-panel__copy{margin-top:0}
|
||||
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,161;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px;--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color)}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.block-directory-block-ratings>span{display:flex}.block-directory-block-ratings svg{fill:#1e1e1e;margin-left:-4px}.block-directory-block-ratings .block-directory-block-ratings__star-empty{fill:#ccc}.block-directory-compact-list{list-style:none;margin:0}.block-directory-compact-list__item{align-items:center;display:flex;flex-direction:row;margin-bottom:16px}.block-directory-compact-list__item:last-child{margin-bottom:0}.block-directory-compact-list__item-details{margin-left:8px}.block-directory-compact-list__item-title{font-weight:500}.block-directory-compact-list__item-author{color:#757575;font-size:11px}.block-directory-downloadable-block-icon{border:1px solid #ddd;height:54px;min-width:54px;vertical-align:middle;width:54px}.block-directory-downloadable-block-list-item{display:grid;grid-template-columns:auto 1fr;height:auto;padding:12px;position:relative;text-align:left;width:100%}.block-directory-downloadable-block-list-item:hover{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.block-directory-downloadable-block-list-item.is-busy{background:#0000}.block-directory-downloadable-block-list-item.is-busy .block-directory-downloadable-block-list-item__author{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.block-directory-downloadable-block-list-item:disabled,.block-directory-downloadable-block-list-item[aria-disabled]{opacity:1}.block-directory-downloadable-block-list-item__icon{align-self:flex-start;margin-right:16px;position:relative}.block-directory-downloadable-block-list-item__icon .block-directory-downloadable-block-list-item__spinner{align-items:center;background:#ffffffbf;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.is-installing .block-directory-downloadable-block-list-item__icon{margin-right:22px}.block-directory-block-ratings{display:block;margin-top:4px}.block-directory-downloadable-block-list-item__details{color:#1e1e1e}.block-directory-downloadable-block-list-item__title{display:block;font-weight:600}.block-directory-downloadable-block-list-item__author{display:block;font-weight:400;margin-top:4px}.block-directory-downloadable-block-list-item__desc{display:block;margin-top:8px}.block-directory-downloadable-block-notice{color:#cc1818;margin:8px 0 0}.block-directory-downloadable-block-notice__content{margin-bottom:8px;padding-right:12px}.block-directory-downloadable-blocks-panel{padding:16px}.block-directory-downloadable-blocks-panel.has-blocks-loading{color:#757575;font-style:normal;margin:112px 0;padding:0;text-align:center}.block-directory-downloadable-blocks-panel.has-blocks-loading .components-spinner{float:inherit}.block-directory-downloadable-blocks-panel__no-local{color:#757575;margin:48px 0;padding:0 64px;text-align:center}.block-directory-downloadable-blocks-panel__title{font-size:14px;margin:0 0 4px}.block-directory-downloadable-blocks-panel__description{margin-top:0}.block-directory-downloadable-blocks-panel button{margin-top:4px}.installed-blocks-pre-publish-panel__copy{margin-top:0}
|
@ -360,11 +360,21 @@
|
||||
}
|
||||
|
||||
.block-editor-block-list__zoom-out-separator{
|
||||
align-items:center;
|
||||
background:#ddd;
|
||||
color:#000;
|
||||
display:flex;
|
||||
font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
|
||||
font-size:13px;
|
||||
font-weight:400;
|
||||
justify-content:center;
|
||||
margin-left:-1px;
|
||||
margin-right:-1px;
|
||||
transition:background-color .3s ease;
|
||||
}
|
||||
.is-zoomed-out .block-editor-block-list__zoom-out-separator{
|
||||
font-size:calc(13px*(2 - var(--wp-block-editor-iframe-zoom-out-scale)));
|
||||
}
|
||||
.block-editor-block-list__zoom-out-separator.is-dragged-over{
|
||||
background:#ccc;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
10
wp-includes/css/dist/block-editor/content.css
vendored
10
wp-includes/css/dist/block-editor/content.css
vendored
@ -360,11 +360,21 @@
|
||||
}
|
||||
|
||||
.block-editor-block-list__zoom-out-separator{
|
||||
align-items:center;
|
||||
background:#ddd;
|
||||
color:#000;
|
||||
display:flex;
|
||||
font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
|
||||
font-size:13px;
|
||||
font-weight:400;
|
||||
justify-content:center;
|
||||
margin-left:-1px;
|
||||
margin-right:-1px;
|
||||
transition:background-color .3s ease;
|
||||
}
|
||||
.is-zoomed-out .block-editor-block-list__zoom-out-separator{
|
||||
font-size:calc(13px*(2 - var(--wp-block-editor-iframe-zoom-out-scale)));
|
||||
}
|
||||
.block-editor-block-list__zoom-out-separator.is-dragged-over{
|
||||
background:#ccc;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -3222,6 +3222,10 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span{
|
||||
margin-bottom:-1px;
|
||||
margin-top:-1px;
|
||||
}
|
||||
.block-editor-block-toolbar.is-connected .block-editor-block-switcher .components-button:before{
|
||||
background:color-mix(in srgb, var(--wp-block-synced-color) 10%, #0000);
|
||||
border-radius:2px;
|
||||
}
|
||||
.block-editor-block-toolbar.is-connected .block-editor-block-switcher .components-button .block-editor-block-icon,.block-editor-block-toolbar.is-connected .components-toolbar-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors,.block-editor-block-toolbar.is-synced .block-editor-block-switcher .components-button .block-editor-block-icon,.block-editor-block-toolbar.is-synced .components-toolbar-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors{
|
||||
color:var(--wp-block-synced-color);
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
4
wp-includes/css/dist/block-editor/style.css
vendored
4
wp-includes/css/dist/block-editor/style.css
vendored
@ -3222,6 +3222,10 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span{
|
||||
margin-bottom:-1px;
|
||||
margin-top:-1px;
|
||||
}
|
||||
.block-editor-block-toolbar.is-connected .block-editor-block-switcher .components-button:before{
|
||||
background:color-mix(in srgb, var(--wp-block-synced-color) 10%, #0000);
|
||||
border-radius:2px;
|
||||
}
|
||||
.block-editor-block-toolbar.is-connected .block-editor-block-switcher .components-button .block-editor-block-icon,.block-editor-block-toolbar.is-connected .components-toolbar-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors,.block-editor-block-toolbar.is-synced .block-editor-block-switcher .components-button .block-editor-block-icon,.block-editor-block-toolbar.is-synced .components-toolbar-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors{
|
||||
color:var(--wp-block-synced-color);
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
14
wp-includes/css/dist/edit-site/style-rtl.css
vendored
14
wp-includes/css/dist/edit-site/style-rtl.css
vendored
@ -2010,6 +2010,9 @@ ul.dataviews-view-list{
|
||||
top:0;
|
||||
width:60px;
|
||||
}
|
||||
.edit-site-editor__back-icon svg{
|
||||
fill:currentColor;
|
||||
}
|
||||
.edit-site-editor__back-icon.has-site-icon{
|
||||
-webkit-backdrop-filter:saturate(180%) blur(15px);
|
||||
backdrop-filter:saturate(180%) blur(15px);
|
||||
@ -2318,7 +2321,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle){
|
||||
overflow-y:auto;
|
||||
}
|
||||
|
||||
@keyframes _hzed3_slide-from-right{
|
||||
@keyframes _anvff_slide-from-right{
|
||||
0%{
|
||||
opacity:0;
|
||||
transform:translateX(-50px);
|
||||
@ -2328,7 +2331,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle){
|
||||
transform:none;
|
||||
}
|
||||
}
|
||||
@keyframes _hzed3_slide-from-left{
|
||||
@keyframes _anvff_slide-from-left{
|
||||
0%{
|
||||
opacity:0;
|
||||
transform:translateX(50px);
|
||||
@ -2384,10 +2387,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle){
|
||||
}
|
||||
}
|
||||
.edit-site-sidebar__screen-wrapper.slide-from-left{
|
||||
animation-name:_hzed3_slide-from-left;
|
||||
animation-name:_anvff_slide-from-left;
|
||||
}
|
||||
.edit-site-sidebar__screen-wrapper.slide-from-right{
|
||||
animation-name:_hzed3_slide-from-right;
|
||||
animation-name:_anvff_slide-from-right;
|
||||
}
|
||||
|
||||
.edit-site-sidebar-button{
|
||||
@ -2642,9 +2645,6 @@ html.canvas-mode-edit-transition::view-transition-group(toggle){
|
||||
.edit-site-sidebar-dataviews-dataview-item .edit-site-sidebar-dataviews-dataview-item__dropdown-menu{
|
||||
min-width:auto;
|
||||
}
|
||||
.edit-site-sidebar-dataviews-dataview-item .edit-site-sidebar-navigation-item.with-suffix{
|
||||
padding-left:8px;
|
||||
}
|
||||
.edit-site-sidebar-dataviews-dataview-item:focus,.edit-site-sidebar-dataviews-dataview-item:hover,.edit-site-sidebar-dataviews-dataview-item[aria-current]{
|
||||
background:#2f2f2f;
|
||||
color:#e0e0e0;
|
||||
|
File diff suppressed because one or more lines are too long
14
wp-includes/css/dist/edit-site/style.css
vendored
14
wp-includes/css/dist/edit-site/style.css
vendored
@ -2010,6 +2010,9 @@ ul.dataviews-view-list{
|
||||
top:0;
|
||||
width:60px;
|
||||
}
|
||||
.edit-site-editor__back-icon svg{
|
||||
fill:currentColor;
|
||||
}
|
||||
.edit-site-editor__back-icon.has-site-icon{
|
||||
-webkit-backdrop-filter:saturate(180%) blur(15px);
|
||||
backdrop-filter:saturate(180%) blur(15px);
|
||||
@ -2318,7 +2321,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle){
|
||||
overflow-y:auto;
|
||||
}
|
||||
|
||||
@keyframes _hzed3_slide-from-right{
|
||||
@keyframes _anvff_slide-from-right{
|
||||
0%{
|
||||
opacity:0;
|
||||
transform:translateX(50px);
|
||||
@ -2328,7 +2331,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle){
|
||||
transform:none;
|
||||
}
|
||||
}
|
||||
@keyframes _hzed3_slide-from-left{
|
||||
@keyframes _anvff_slide-from-left{
|
||||
0%{
|
||||
opacity:0;
|
||||
transform:translateX(-50px);
|
||||
@ -2384,10 +2387,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle){
|
||||
}
|
||||
}
|
||||
.edit-site-sidebar__screen-wrapper.slide-from-left{
|
||||
animation-name:_hzed3_slide-from-left;
|
||||
animation-name:_anvff_slide-from-left;
|
||||
}
|
||||
.edit-site-sidebar__screen-wrapper.slide-from-right{
|
||||
animation-name:_hzed3_slide-from-right;
|
||||
animation-name:_anvff_slide-from-right;
|
||||
}
|
||||
|
||||
.edit-site-sidebar-button{
|
||||
@ -2642,9 +2645,6 @@ html.canvas-mode-edit-transition::view-transition-group(toggle){
|
||||
.edit-site-sidebar-dataviews-dataview-item .edit-site-sidebar-dataviews-dataview-item__dropdown-menu{
|
||||
min-width:auto;
|
||||
}
|
||||
.edit-site-sidebar-dataviews-dataview-item .edit-site-sidebar-navigation-item.with-suffix{
|
||||
padding-right:8px;
|
||||
}
|
||||
.edit-site-sidebar-dataviews-dataview-item:focus,.edit-site-sidebar-dataviews-dataview-item:hover,.edit-site-sidebar-dataviews-dataview-item[aria-current]{
|
||||
background:#2f2f2f;
|
||||
color:#e0e0e0;
|
||||
|
2
wp-includes/css/dist/edit-site/style.min.css
vendored
2
wp-includes/css/dist/edit-site/style.min.css
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/css/dist/editor/style-rtl.css
vendored
4
wp-includes/css/dist/editor/style-rtl.css
vendored
@ -888,8 +888,8 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
border-bottom:1px solid #ddd;
|
||||
box-sizing:border-box;
|
||||
height:60px;
|
||||
padding-left:8px;
|
||||
padding-right:8px;
|
||||
padding-left:16px;
|
||||
padding-right:16px;
|
||||
}
|
||||
|
||||
.entities-saved-states__text-prompt{
|
||||
|
File diff suppressed because one or more lines are too long
4
wp-includes/css/dist/editor/style.css
vendored
4
wp-includes/css/dist/editor/style.css
vendored
@ -888,8 +888,8 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
border-bottom:1px solid #ddd;
|
||||
box-sizing:border-box;
|
||||
height:60px;
|
||||
padding-left:8px;
|
||||
padding-right:8px;
|
||||
padding-left:16px;
|
||||
padding-right:16px;
|
||||
}
|
||||
|
||||
.entities-saved-states__text-prompt{
|
||||
|
2
wp-includes/css/dist/editor/style.min.css
vendored
2
wp-includes/css/dist/editor/style.min.css
vendored
File diff suppressed because one or more lines are too long
794
wp-includes/js/dist/block-editor.js
vendored
794
wp-includes/js/dist/block-editor.js
vendored
File diff suppressed because it is too large
Load Diff
4
wp-includes/js/dist/block-editor.min.js
vendored
4
wp-includes/js/dist/block-editor.min.js
vendored
File diff suppressed because one or more lines are too long
249
wp-includes/js/dist/block-library.js
vendored
249
wp-includes/js/dist/block-library.js
vendored
@ -2685,21 +2685,21 @@ const util_metadata = {
|
||||
attributes: {
|
||||
url: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
caption: {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "figcaption",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
type: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
providerNameSlug: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
allowResponsive: {
|
||||
type: "boolean",
|
||||
@ -2708,12 +2708,12 @@ const util_metadata = {
|
||||
responsive: {
|
||||
type: "boolean",
|
||||
"default": false,
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
previewable: {
|
||||
type: "boolean",
|
||||
"default": true,
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
}
|
||||
},
|
||||
supports: {
|
||||
@ -3581,24 +3581,24 @@ const audio_metadata = {
|
||||
attributes: {
|
||||
blob: {
|
||||
type: "string",
|
||||
__experimentalRole: "local"
|
||||
role: "local"
|
||||
},
|
||||
src: {
|
||||
type: "string",
|
||||
source: "attribute",
|
||||
selector: "audio",
|
||||
attribute: "src",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
caption: {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "figcaption",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
id: {
|
||||
type: "number",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
autoplay: {
|
||||
type: "boolean",
|
||||
@ -5040,6 +5040,7 @@ function ButtonEdit(props) {
|
||||
const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes);
|
||||
const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
|
||||
const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
|
||||
const registry = (0,external_wp_data_namespaceObject.useRegistry)();
|
||||
const ref = (0,external_wp_element_namespaceObject.useRef)();
|
||||
const richTextRef = (0,external_wp_element_namespaceObject.useRef)();
|
||||
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
|
||||
@ -5091,7 +5092,7 @@ function ButtonEdit(props) {
|
||||
const blockBindingsSource = unlock(select(external_wp_blocks_namespaceObject.store)).getBlockBindingsSource(metadata?.bindings?.url?.source);
|
||||
return {
|
||||
lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({
|
||||
select,
|
||||
registry,
|
||||
context,
|
||||
args: metadata?.bindings?.url?.args
|
||||
})
|
||||
@ -5317,34 +5318,34 @@ const button_metadata = {
|
||||
source: "attribute",
|
||||
selector: "a",
|
||||
attribute: "href",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
title: {
|
||||
type: "string",
|
||||
source: "attribute",
|
||||
selector: "a,button",
|
||||
attribute: "title",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
text: {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "a,button",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
linkTarget: {
|
||||
type: "string",
|
||||
source: "attribute",
|
||||
selector: "a",
|
||||
attribute: "target",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
rel: {
|
||||
type: "string",
|
||||
source: "attribute",
|
||||
selector: "a",
|
||||
attribute: "rel",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
placeholder: {
|
||||
type: "string"
|
||||
@ -6435,7 +6436,7 @@ const categories_metadata = {
|
||||
},
|
||||
label: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
showLabel: {
|
||||
type: "boolean",
|
||||
@ -16882,21 +16883,21 @@ const transforms_metadata = {
|
||||
attributes: {
|
||||
url: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
caption: {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "figcaption",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
type: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
providerNameSlug: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
allowResponsive: {
|
||||
type: "boolean",
|
||||
@ -16905,12 +16906,12 @@ const transforms_metadata = {
|
||||
responsive: {
|
||||
type: "boolean",
|
||||
"default": false,
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
previewable: {
|
||||
type: "boolean",
|
||||
"default": true,
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
}
|
||||
},
|
||||
supports: {
|
||||
@ -17385,21 +17386,21 @@ const embed_deprecated_metadata = {
|
||||
attributes: {
|
||||
url: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
caption: {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "figcaption",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
type: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
providerNameSlug: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
allowResponsive: {
|
||||
type: "boolean",
|
||||
@ -17408,12 +17409,12 @@ const embed_deprecated_metadata = {
|
||||
responsive: {
|
||||
type: "boolean",
|
||||
"default": false,
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
previewable: {
|
||||
type: "boolean",
|
||||
"default": true,
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
}
|
||||
},
|
||||
supports: {
|
||||
@ -17520,21 +17521,21 @@ const embed_metadata = {
|
||||
attributes: {
|
||||
url: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
caption: {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "figcaption",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
type: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
providerNameSlug: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
allowResponsive: {
|
||||
type: "boolean",
|
||||
@ -17543,12 +17544,12 @@ const embed_metadata = {
|
||||
responsive: {
|
||||
type: "boolean",
|
||||
"default": false,
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
previewable: {
|
||||
type: "boolean",
|
||||
"default": true,
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
}
|
||||
},
|
||||
supports: {
|
||||
@ -18612,7 +18613,7 @@ const file_metadata = {
|
||||
},
|
||||
blob: {
|
||||
type: "string",
|
||||
__experimentalRole: "local"
|
||||
role: "local"
|
||||
},
|
||||
href: {
|
||||
type: "string"
|
||||
@ -19128,7 +19129,7 @@ const form_input_deprecated_v2 = {
|
||||
default: 'Label',
|
||||
selector: '.wp-block-form-input__label-content',
|
||||
source: 'html',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
inlineLabel: {
|
||||
type: 'boolean',
|
||||
@ -19146,7 +19147,7 @@ const form_input_deprecated_v2 = {
|
||||
selector: '.wp-block-form-input__input',
|
||||
source: 'attribute',
|
||||
attribute: 'placeholder',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
value: {
|
||||
type: 'string',
|
||||
@ -19243,7 +19244,7 @@ const form_input_deprecated_v1 = {
|
||||
default: 'Label',
|
||||
selector: '.wp-block-form-input__label-content',
|
||||
source: 'html',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
inlineLabel: {
|
||||
type: 'boolean',
|
||||
@ -19261,7 +19262,7 @@ const form_input_deprecated_v1 = {
|
||||
selector: '.wp-block-form-input__input',
|
||||
source: 'attribute',
|
||||
attribute: 'placeholder',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
value: {
|
||||
type: 'string',
|
||||
@ -19689,7 +19690,7 @@ const form_input_metadata = {
|
||||
"default": "Label",
|
||||
selector: ".wp-block-form-input__label-content",
|
||||
source: "rich-text",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
inlineLabel: {
|
||||
type: "boolean",
|
||||
@ -19707,7 +19708,7 @@ const form_input_metadata = {
|
||||
selector: ".wp-block-form-input__input",
|
||||
source: "attribute",
|
||||
attribute: "placeholder",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
value: {
|
||||
type: "string",
|
||||
@ -23702,7 +23703,7 @@ const heading_deprecated_v5 = {
|
||||
source: 'html',
|
||||
selector: 'h1,h2,h3,h4,h5,h6',
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
level: {
|
||||
type: 'number',
|
||||
@ -24116,7 +24117,7 @@ const heading_metadata = {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "h1,h2,h3,h4,h5,h6",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
level: {
|
||||
type: "number",
|
||||
@ -25211,7 +25212,7 @@ const image_deprecated_v6 = {
|
||||
source: 'attribute',
|
||||
selector: 'img',
|
||||
attribute: 'src',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
alt: {
|
||||
type: 'string',
|
||||
@ -25219,27 +25220,27 @@ const image_deprecated_v6 = {
|
||||
selector: 'img',
|
||||
attribute: 'alt',
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
caption: {
|
||||
type: 'string',
|
||||
source: 'html',
|
||||
selector: 'figcaption',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
title: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'img',
|
||||
attribute: 'title',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
href: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'figure > a',
|
||||
attribute: 'href',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
rel: {
|
||||
type: 'string',
|
||||
@ -25255,7 +25256,7 @@ const image_deprecated_v6 = {
|
||||
},
|
||||
id: {
|
||||
type: 'number',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
width: {
|
||||
type: 'number'
|
||||
@ -25397,7 +25398,7 @@ const image_deprecated_v7 = {
|
||||
source: 'attribute',
|
||||
selector: 'img',
|
||||
attribute: 'src',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
alt: {
|
||||
type: 'string',
|
||||
@ -25405,27 +25406,27 @@ const image_deprecated_v7 = {
|
||||
selector: 'img',
|
||||
attribute: 'alt',
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
caption: {
|
||||
type: 'string',
|
||||
source: 'html',
|
||||
selector: 'figcaption',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
title: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'img',
|
||||
attribute: 'title',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
href: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'figure > a',
|
||||
attribute: 'href',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
rel: {
|
||||
type: 'string',
|
||||
@ -25441,7 +25442,7 @@ const image_deprecated_v7 = {
|
||||
},
|
||||
id: {
|
||||
type: 'number',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
width: {
|
||||
type: 'number'
|
||||
@ -25580,7 +25581,7 @@ const deprecated_v8 = {
|
||||
source: 'attribute',
|
||||
selector: 'img',
|
||||
attribute: 'src',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
alt: {
|
||||
type: 'string',
|
||||
@ -25588,27 +25589,27 @@ const deprecated_v8 = {
|
||||
selector: 'img',
|
||||
attribute: 'alt',
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
caption: {
|
||||
type: 'string',
|
||||
source: 'html',
|
||||
selector: 'figcaption',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
title: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'img',
|
||||
attribute: 'title',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
href: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'figure > a',
|
||||
attribute: 'href',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
rel: {
|
||||
type: 'string',
|
||||
@ -25624,7 +25625,7 @@ const deprecated_v8 = {
|
||||
},
|
||||
id: {
|
||||
type: 'number',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
width: {
|
||||
type: 'string'
|
||||
@ -25943,6 +25944,7 @@ function image_Image({
|
||||
// The only supported unit is px, so we can parseInt to strip the px here.
|
||||
const numericWidth = width ? parseInt(width, 10) : undefined;
|
||||
const numericHeight = height ? parseInt(height, 10) : undefined;
|
||||
const registry = (0,external_wp_data_namespaceObject.useRegistry)();
|
||||
const imageRef = (0,external_wp_element_namespaceObject.useRef)();
|
||||
const {
|
||||
allowResize = true
|
||||
@ -26265,7 +26267,7 @@ function image_Image({
|
||||
const titleBindingSource = getBlockBindingsSource(titleBinding?.source);
|
||||
return {
|
||||
lockUrlControls: !!urlBinding && !urlBindingSource?.canUserEditValue?.({
|
||||
select,
|
||||
registry,
|
||||
context,
|
||||
args: urlBinding?.args
|
||||
}),
|
||||
@ -26278,14 +26280,14 @@ function image_Image({
|
||||
// This is a temporary solution until we support overriding the caption on the frontend.
|
||||
hasParentPattern,
|
||||
lockAltControls: !!altBinding && !altBindingSource?.canUserEditValue?.({
|
||||
select,
|
||||
registry,
|
||||
context,
|
||||
args: altBinding?.args
|
||||
}),
|
||||
lockAltControlsMessage: altBindingSource?.label ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Label of the bindings source. */
|
||||
(0,external_wp_i18n_namespaceObject.__)('Connected to %s'), altBindingSource.label) : (0,external_wp_i18n_namespaceObject.__)('Connected to dynamic data'),
|
||||
lockTitleControls: !!titleBinding && !titleBindingSource?.canUserEditValue?.({
|
||||
select,
|
||||
registry,
|
||||
context,
|
||||
args: titleBinding?.args
|
||||
}),
|
||||
@ -26798,6 +26800,7 @@ function ImageEdit({
|
||||
metadata
|
||||
} = attributes;
|
||||
const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(attributes.blob);
|
||||
const registry = (0,external_wp_data_namespaceObject.useRegistry)();
|
||||
const containerRef = (0,external_wp_element_namespaceObject.useRef)();
|
||||
// Only observe the max width from the parent container when the parent layout is not flex nor grid.
|
||||
// This won't work for them because the container width changes with the image.
|
||||
@ -27026,7 +27029,7 @@ function ImageEdit({
|
||||
const blockBindingsSource = unlock(select(external_wp_blocks_namespaceObject.store)).getBlockBindingsSource(metadata?.bindings?.url?.source);
|
||||
return {
|
||||
lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({
|
||||
select,
|
||||
registry,
|
||||
context,
|
||||
args: metadata?.bindings?.url?.args
|
||||
}),
|
||||
@ -27383,14 +27386,14 @@ const image_metadata = {
|
||||
attributes: {
|
||||
blob: {
|
||||
type: "string",
|
||||
__experimentalRole: "local"
|
||||
role: "local"
|
||||
},
|
||||
url: {
|
||||
type: "string",
|
||||
source: "attribute",
|
||||
selector: "img",
|
||||
attribute: "src",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
alt: {
|
||||
type: "string",
|
||||
@ -27398,13 +27401,13 @@ const image_metadata = {
|
||||
selector: "img",
|
||||
attribute: "alt",
|
||||
"default": "",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
caption: {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "figcaption",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
lightbox: {
|
||||
type: "object",
|
||||
@ -27417,14 +27420,14 @@ const image_metadata = {
|
||||
source: "attribute",
|
||||
selector: "img",
|
||||
attribute: "title",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
href: {
|
||||
type: "string",
|
||||
source: "attribute",
|
||||
selector: "figure > a",
|
||||
attribute: "href",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
rel: {
|
||||
type: "string",
|
||||
@ -27440,7 +27443,7 @@ const image_metadata = {
|
||||
},
|
||||
id: {
|
||||
type: "number",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
width: {
|
||||
type: "string"
|
||||
@ -28723,7 +28726,7 @@ const v0 = {
|
||||
ordered: {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
values: {
|
||||
type: 'string',
|
||||
@ -28732,7 +28735,7 @@ const v0 = {
|
||||
multiline: 'li',
|
||||
__unstableMultilineWrapperTags: ['ol', 'ul'],
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
type: {
|
||||
type: 'string'
|
||||
@ -28797,7 +28800,7 @@ const list_deprecated_v1 = {
|
||||
ordered: {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
values: {
|
||||
type: 'string',
|
||||
@ -28806,7 +28809,7 @@ const list_deprecated_v1 = {
|
||||
multiline: 'li',
|
||||
__unstableMultilineWrapperTags: ['ol', 'ul'],
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
type: {
|
||||
type: 'string'
|
||||
@ -28880,7 +28883,7 @@ const list_deprecated_v2 = {
|
||||
ordered: {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
values: {
|
||||
type: 'string',
|
||||
@ -28889,7 +28892,7 @@ const list_deprecated_v2 = {
|
||||
multiline: 'li',
|
||||
__unstableMultilineWrapperTags: ['ol', 'ul'],
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
type: {
|
||||
type: 'string'
|
||||
@ -28973,7 +28976,7 @@ const list_deprecated_v3 = {
|
||||
ordered: {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
values: {
|
||||
type: 'string',
|
||||
@ -28982,7 +28985,7 @@ const list_deprecated_v3 = {
|
||||
multiline: 'li',
|
||||
__unstableMultilineWrapperTags: ['ol', 'ul'],
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
type: {
|
||||
type: 'string'
|
||||
@ -29600,7 +29603,7 @@ const list_metadata = {
|
||||
ordered: {
|
||||
type: "boolean",
|
||||
"default": false,
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
values: {
|
||||
type: "string",
|
||||
@ -29609,7 +29612,7 @@ const list_metadata = {
|
||||
multiline: "li",
|
||||
__unstableMultilineWrapperTags: ["ol", "ul"],
|
||||
"default": "",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
type: {
|
||||
type: "string"
|
||||
@ -30327,7 +30330,7 @@ const list_item_metadata = {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "li",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
}
|
||||
},
|
||||
supports: {
|
||||
@ -30743,29 +30746,29 @@ const v6Attributes = {
|
||||
selector: 'figure img',
|
||||
attribute: 'alt',
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
mediaId: {
|
||||
type: 'number',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
mediaUrl: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'figure video,figure img',
|
||||
attribute: 'src',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
href: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'figure a',
|
||||
attribute: 'href',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
mediaType: {
|
||||
type: 'string',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
}
|
||||
};
|
||||
const v7Attributes = {
|
||||
@ -32548,7 +32551,7 @@ const media_text_metadata = {
|
||||
selector: "figure img",
|
||||
attribute: "alt",
|
||||
"default": "",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
mediaPosition: {
|
||||
type: "string",
|
||||
@ -32556,14 +32559,14 @@ const media_text_metadata = {
|
||||
},
|
||||
mediaId: {
|
||||
type: "number",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
mediaUrl: {
|
||||
type: "string",
|
||||
source: "attribute",
|
||||
selector: "figure video,figure img",
|
||||
attribute: "src",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
mediaLink: {
|
||||
type: "string"
|
||||
@ -32582,7 +32585,7 @@ const media_text_metadata = {
|
||||
source: "attribute",
|
||||
selector: "figure a",
|
||||
attribute: "href",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
rel: {
|
||||
type: "string",
|
||||
@ -32598,7 +32601,7 @@ const media_text_metadata = {
|
||||
},
|
||||
mediaType: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
mediaWidth: {
|
||||
type: "number",
|
||||
@ -40460,7 +40463,7 @@ const {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "p",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
dropCap: {
|
||||
type: "boolean",
|
||||
@ -40582,7 +40585,7 @@ const paragraph_metadata = {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "p",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
dropCap: {
|
||||
type: "boolean",
|
||||
@ -45439,7 +45442,7 @@ const preformatted_metadata = {
|
||||
source: "rich-text",
|
||||
selector: "pre",
|
||||
__unstablePreserveWhiteSpace: true,
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
}
|
||||
},
|
||||
supports: {
|
||||
@ -45603,14 +45606,14 @@ const pullquote_deprecated_v5 = {
|
||||
source: 'html',
|
||||
selector: 'blockquote',
|
||||
multiline: 'p',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
citation: {
|
||||
type: 'string',
|
||||
source: 'html',
|
||||
selector: 'cite',
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
textAlign: {
|
||||
type: 'string'
|
||||
@ -46350,13 +46353,13 @@ const pullquote_metadata = {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "p",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
citation: {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "cite",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
textAlign: {
|
||||
type: "string"
|
||||
@ -47490,7 +47493,7 @@ function FormatControls({
|
||||
}, []);
|
||||
const formats = POST_FORMATS.filter(item => supportedFormats.includes(item.value));
|
||||
const values = normalizedFormats.map(name => formats.find(item => item.value === name)?.label).filter(Boolean);
|
||||
const suggestions = formats.filter(item => !format.includes(item.value)).map(item => item.label);
|
||||
const suggestions = formats.filter(item => !normalizedFormats.includes(item.value)).map(item => item.label);
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FormTokenField, {
|
||||
label: (0,external_wp_i18n_namespaceObject.__)('Formats'),
|
||||
value: values,
|
||||
@ -50495,14 +50498,14 @@ const quote_deprecated_v4 = {
|
||||
selector: 'blockquote',
|
||||
multiline: 'p',
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
citation: {
|
||||
type: 'string',
|
||||
source: 'html',
|
||||
selector: 'cite',
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
align: {
|
||||
type: 'string'
|
||||
@ -50570,14 +50573,14 @@ const quote_deprecated_v3 = {
|
||||
selector: 'blockquote',
|
||||
multiline: 'p',
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
citation: {
|
||||
type: 'string',
|
||||
source: 'html',
|
||||
selector: 'cite',
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
align: {
|
||||
type: 'string'
|
||||
@ -51128,13 +51131,13 @@ const quote_metadata = {
|
||||
selector: "blockquote",
|
||||
multiline: "p",
|
||||
"default": "",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
citation: {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "cite",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
textAlign: {
|
||||
type: "string"
|
||||
@ -52723,7 +52726,7 @@ const search_metadata = {
|
||||
attributes: {
|
||||
label: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
showLabel: {
|
||||
type: "boolean",
|
||||
@ -52732,7 +52735,7 @@ const search_metadata = {
|
||||
placeholder: {
|
||||
type: "string",
|
||||
"default": "",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
width: {
|
||||
type: "number"
|
||||
@ -52742,7 +52745,7 @@ const search_metadata = {
|
||||
},
|
||||
buttonText: {
|
||||
type: "string",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
buttonPosition: {
|
||||
type: "string",
|
||||
@ -62448,7 +62451,7 @@ const verse_deprecated_v2 = {
|
||||
selector: 'pre',
|
||||
default: '',
|
||||
__unstablePreserveWhiteSpace: true,
|
||||
__experimentalRole: 'content'
|
||||
role: 'content'
|
||||
},
|
||||
textAlign: {
|
||||
type: 'string'
|
||||
@ -62648,7 +62651,7 @@ const verse_metadata = {
|
||||
source: "rich-text",
|
||||
selector: "pre",
|
||||
__unstablePreserveWhiteSpace: true,
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
textAlign: {
|
||||
type: "string"
|
||||
@ -62800,7 +62803,7 @@ const video_deprecated_metadata = {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "figcaption",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
controls: {
|
||||
type: "boolean",
|
||||
@ -62811,7 +62814,7 @@ const video_deprecated_metadata = {
|
||||
},
|
||||
id: {
|
||||
type: "number",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
loop: {
|
||||
type: "boolean",
|
||||
@ -62840,14 +62843,14 @@ const video_deprecated_metadata = {
|
||||
},
|
||||
blob: {
|
||||
type: "string",
|
||||
__experimentalRole: "local"
|
||||
role: "local"
|
||||
},
|
||||
src: {
|
||||
type: "string",
|
||||
source: "attribute",
|
||||
selector: "video",
|
||||
attribute: "src",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
playsInline: {
|
||||
type: "boolean",
|
||||
@ -62856,7 +62859,7 @@ const video_deprecated_metadata = {
|
||||
attribute: "playsinline"
|
||||
},
|
||||
tracks: {
|
||||
__experimentalRole: "content",
|
||||
role: "content",
|
||||
type: "array",
|
||||
items: {
|
||||
type: "object"
|
||||
@ -63770,7 +63773,7 @@ const video_metadata = {
|
||||
type: "rich-text",
|
||||
source: "rich-text",
|
||||
selector: "figcaption",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
controls: {
|
||||
type: "boolean",
|
||||
@ -63781,7 +63784,7 @@ const video_metadata = {
|
||||
},
|
||||
id: {
|
||||
type: "number",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
loop: {
|
||||
type: "boolean",
|
||||
@ -63810,14 +63813,14 @@ const video_metadata = {
|
||||
},
|
||||
blob: {
|
||||
type: "string",
|
||||
__experimentalRole: "local"
|
||||
role: "local"
|
||||
},
|
||||
src: {
|
||||
type: "string",
|
||||
source: "attribute",
|
||||
selector: "video",
|
||||
attribute: "src",
|
||||
__experimentalRole: "content"
|
||||
role: "content"
|
||||
},
|
||||
playsInline: {
|
||||
type: "boolean",
|
||||
@ -63826,7 +63829,7 @@ const video_metadata = {
|
||||
attribute: "playsinline"
|
||||
},
|
||||
tracks: {
|
||||
__experimentalRole: "content",
|
||||
role: "content",
|
||||
type: "array",
|
||||
items: {
|
||||
type: "object"
|
||||
|
4
wp-includes/js/dist/block-library.min.js
vendored
4
wp-includes/js/dist/block-library.min.js
vendored
File diff suppressed because one or more lines are too long
481
wp-includes/js/dist/blocks.js
vendored
481
wp-includes/js/dist/blocks.js
vendored
@ -5845,6 +5845,7 @@ __webpack_require__.d(__webpack_exports__, {
|
||||
doBlocksMatchTemplate: () => (/* reexport */ doBlocksMatchTemplate),
|
||||
findTransform: () => (/* reexport */ findTransform),
|
||||
getBlockAttributes: () => (/* reexport */ getBlockAttributes),
|
||||
getBlockAttributesNamesByRole: () => (/* reexport */ getBlockAttributesNamesByRole),
|
||||
getBlockContent: () => (/* reexport */ getBlockInnerHTML),
|
||||
getBlockDefaultClassName: () => (/* reexport */ getBlockDefaultClassName),
|
||||
getBlockFromExample: () => (/* reexport */ getBlockFromExample),
|
||||
@ -5903,6 +5904,18 @@ __webpack_require__.d(__webpack_exports__, {
|
||||
withBlockContentContext: () => (/* reexport */ withBlockContentContext)
|
||||
});
|
||||
|
||||
// NAMESPACE OBJECT: ./node_modules/@wordpress/blocks/build-module/store/private-selectors.js
|
||||
var private_selectors_namespaceObject = {};
|
||||
__webpack_require__.r(private_selectors_namespaceObject);
|
||||
__webpack_require__.d(private_selectors_namespaceObject, {
|
||||
getAllBlockBindingsSources: () => (getAllBlockBindingsSources),
|
||||
getBlockBindingsSource: () => (private_selectors_getBlockBindingsSource),
|
||||
getBootstrappedBlockType: () => (getBootstrappedBlockType),
|
||||
getSupportedStyles: () => (getSupportedStyles),
|
||||
getUnprocessedBlockTypes: () => (getUnprocessedBlockTypes),
|
||||
hasContentRoleAttribute: () => (hasContentRoleAttribute)
|
||||
});
|
||||
|
||||
// NAMESPACE OBJECT: ./node_modules/@wordpress/blocks/build-module/store/selectors.js
|
||||
var selectors_namespaceObject = {};
|
||||
__webpack_require__.r(selectors_namespaceObject);
|
||||
@ -5928,17 +5941,6 @@ __webpack_require__.d(selectors_namespaceObject, {
|
||||
isMatchingSearchTerm: () => (isMatchingSearchTerm)
|
||||
});
|
||||
|
||||
// NAMESPACE OBJECT: ./node_modules/@wordpress/blocks/build-module/store/private-selectors.js
|
||||
var private_selectors_namespaceObject = {};
|
||||
__webpack_require__.r(private_selectors_namespaceObject);
|
||||
__webpack_require__.d(private_selectors_namespaceObject, {
|
||||
getAllBlockBindingsSources: () => (getAllBlockBindingsSources),
|
||||
getBlockBindingsSource: () => (private_selectors_getBlockBindingsSource),
|
||||
getBootstrappedBlockType: () => (getBootstrappedBlockType),
|
||||
getSupportedStyles: () => (getSupportedStyles),
|
||||
getUnprocessedBlockTypes: () => (getUnprocessedBlockTypes)
|
||||
});
|
||||
|
||||
// NAMESPACE OBJECT: ./node_modules/@wordpress/blocks/build-module/store/actions.js
|
||||
var actions_namespaceObject = {};
|
||||
__webpack_require__.r(actions_namespaceObject);
|
||||
@ -6481,6 +6483,9 @@ const external_wp_element_namespaceObject = window["wp"]["element"];
|
||||
const external_wp_dom_namespaceObject = window["wp"]["dom"];
|
||||
;// CONCATENATED MODULE: external ["wp","richText"]
|
||||
const external_wp_richText_namespaceObject = window["wp"]["richText"];
|
||||
;// CONCATENATED MODULE: external ["wp","deprecated"]
|
||||
const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
|
||||
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/constants.js
|
||||
const BLOCK_ICON_DEFAULT = 'block-default';
|
||||
|
||||
@ -7677,6 +7682,7 @@ function getBlockBindingsSources() {
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
@ -7692,6 +7698,30 @@ k([names, a11y]);
|
||||
*/
|
||||
const ICON_COLORS = ['#191e23', '#f8f9f9'];
|
||||
|
||||
/**
|
||||
* Determines whether the block's attribute is equal to the default attribute
|
||||
* which means the attribute is unmodified.
|
||||
* @param {Object} attributeDefinition The attribute's definition of the block type.
|
||||
* @param {*} value The attribute's value.
|
||||
* @return {boolean} Whether the attribute is unmodified.
|
||||
*/
|
||||
function isUnmodifiedAttribute(attributeDefinition, value) {
|
||||
// Every attribute that has a default must match the default.
|
||||
if (attributeDefinition.hasOwnProperty('default')) {
|
||||
return value === attributeDefinition.default;
|
||||
}
|
||||
|
||||
// The rich text type is a bit different from the rest because it
|
||||
// has an implicit default value of an empty RichTextData instance,
|
||||
// so check the length of the value.
|
||||
if (attributeDefinition.type === 'rich-text') {
|
||||
return !value?.length;
|
||||
}
|
||||
|
||||
// Every attribute that doesn't have a default should be undefined.
|
||||
return value === undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the block's attributes are equal to the default attributes
|
||||
* which means the block is unmodified.
|
||||
@ -7704,21 +7734,7 @@ function isUnmodifiedBlock(block) {
|
||||
var _getBlockType$attribu;
|
||||
return Object.entries((_getBlockType$attribu = getBlockType(block.name)?.attributes) !== null && _getBlockType$attribu !== void 0 ? _getBlockType$attribu : {}).every(([key, definition]) => {
|
||||
const value = block.attributes[key];
|
||||
|
||||
// Every attribute that has a default must match the default.
|
||||
if (definition.hasOwnProperty('default')) {
|
||||
return value === definition.default;
|
||||
}
|
||||
|
||||
// The rich text type is a bit different from the rest because it
|
||||
// has an implicit default value of an empty RichTextData instance,
|
||||
// so check the length of the value.
|
||||
if (definition.type === 'rich-text') {
|
||||
return !value?.length;
|
||||
}
|
||||
|
||||
// Every attribute that doesn't have a default should be undefined.
|
||||
return value === undefined;
|
||||
return isUnmodifiedAttribute(definition, value);
|
||||
});
|
||||
}
|
||||
|
||||
@ -7734,6 +7750,29 @@ function isUnmodifiedDefaultBlock(block) {
|
||||
return block.name === getDefaultBlockName() && isUnmodifiedBlock(block);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the block content is unmodified. A block content is
|
||||
* considered unmodified if all the attributes that have a role of 'content'
|
||||
* are equal to the default attributes (or undefined).
|
||||
* If the block does not have any attributes with a role of 'content', it
|
||||
* will be considered unmodified if all the attributes are equal to the default
|
||||
* attributes (or undefined).
|
||||
*
|
||||
* @param {WPBlock} block Block Object
|
||||
* @return {boolean} Whether the block content is unmodified.
|
||||
*/
|
||||
function isUnmodifiedBlockContent(block) {
|
||||
const contentAttributes = getBlockAttributesNamesByRole(block.name, 'content');
|
||||
if (contentAttributes.length === 0) {
|
||||
return isUnmodifiedBlock(block);
|
||||
}
|
||||
return contentAttributes.every(key => {
|
||||
const definition = getBlockType(block.name)?.attributes[key];
|
||||
const value = block.attributes[key];
|
||||
return isUnmodifiedAttribute(definition, value);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that checks if the parameter is a valid icon.
|
||||
*
|
||||
@ -7931,7 +7970,7 @@ function __experimentalSanitizeBlockAttributes(name, attributes) {
|
||||
*
|
||||
* @return {string[]} The attribute names that have the provided role.
|
||||
*/
|
||||
function __experimentalGetBlockAttributesNamesByRole(name, role) {
|
||||
function getBlockAttributesNamesByRole(name, role) {
|
||||
const attributes = getBlockType(name)?.attributes;
|
||||
if (!attributes) {
|
||||
return [];
|
||||
@ -7940,8 +7979,31 @@ function __experimentalGetBlockAttributesNamesByRole(name, role) {
|
||||
if (!role) {
|
||||
return attributesNames;
|
||||
}
|
||||
return attributesNames.filter(attributeName => attributes[attributeName]?.__experimentalRole === role);
|
||||
return attributesNames.filter(attributeName => {
|
||||
const attribute = attributes[attributeName];
|
||||
if (attribute?.role === role) {
|
||||
return true;
|
||||
}
|
||||
if (attribute?.__experimentalRole === role) {
|
||||
external_wp_deprecated_default()('__experimentalRole attribute', {
|
||||
since: '6.7',
|
||||
version: '6.8',
|
||||
alternative: 'role attribute',
|
||||
hint: `Check the block.json of the ${name} block.`
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
const __experimentalGetBlockAttributesNamesByRole = (...args) => {
|
||||
external_wp_deprecated_default()('__experimentalGetBlockAttributesNamesByRole', {
|
||||
since: '6.7',
|
||||
version: '6.8',
|
||||
alternative: 'getBlockAttributesNamesByRole'
|
||||
});
|
||||
return getBlockAttributesNamesByRole(...args);
|
||||
};
|
||||
|
||||
/**
|
||||
* Return a new object with the specified keys omitted.
|
||||
@ -8304,7 +8366,8 @@ function blockBindingsSources(state = {}, action) {
|
||||
usesContext: getMergedUsesContext(state[action.name]?.usesContext, action.usesContext),
|
||||
getValues: action.getValues,
|
||||
setValues: action.setValues,
|
||||
canUserEditValue: action.canUserEditValue,
|
||||
// Only set `canUserEditValue` if `setValues` is also defined.
|
||||
canUserEditValue: action.setValues && action.canUserEditValue,
|
||||
getFieldsList: action.getFieldsList
|
||||
}
|
||||
};
|
||||
@ -8388,6 +8451,183 @@ function matchesAttributes(blockAttributes, variationAttributes) {
|
||||
return blockAttributes === variationAttributes;
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/private-selectors.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
const ROOT_BLOCK_SUPPORTS = ['background', 'backgroundColor', 'color', 'linkColor', 'captionColor', 'buttonColor', 'headingColor', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'lineHeight', 'padding', 'contentSize', 'wideSize', 'blockGap', 'textDecoration', 'textTransform', 'letterSpacing'];
|
||||
|
||||
/**
|
||||
* Filters the list of supported styles for a given element.
|
||||
*
|
||||
* @param {string[]} blockSupports list of supported styles.
|
||||
* @param {string|undefined} name block name.
|
||||
* @param {string|undefined} element element name.
|
||||
*
|
||||
* @return {string[]} filtered list of supported styles.
|
||||
*/
|
||||
function filterElementBlockSupports(blockSupports, name, element) {
|
||||
return blockSupports.filter(support => {
|
||||
if (support === 'fontSize' && element === 'heading') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// This is only available for links
|
||||
if (support === 'textDecoration' && !name && element !== 'link') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// This is only available for heading, button, caption and text
|
||||
if (support === 'textTransform' && !name && !(['heading', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(element) || element === 'button' || element === 'caption' || element === 'text')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// This is only available for heading, button, caption and text
|
||||
if (support === 'letterSpacing' && !name && !(['heading', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(element) || element === 'button' || element === 'caption' || element === 'text')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Text columns is only available for blocks.
|
||||
if (support === 'textColumns' && !name) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of supported styles for a given block name and element.
|
||||
*/
|
||||
const getSupportedStyles = (0,external_wp_data_namespaceObject.createSelector)((state, name, element) => {
|
||||
if (!name) {
|
||||
return filterElementBlockSupports(ROOT_BLOCK_SUPPORTS, name, element);
|
||||
}
|
||||
const blockType = selectors_getBlockType(state, name);
|
||||
if (!blockType) {
|
||||
return [];
|
||||
}
|
||||
const supportKeys = [];
|
||||
|
||||
// Check for blockGap support.
|
||||
// Block spacing support doesn't map directly to a single style property, so needs to be handled separately.
|
||||
if (blockType?.supports?.spacing?.blockGap) {
|
||||
supportKeys.push('blockGap');
|
||||
}
|
||||
|
||||
// check for shadow support
|
||||
if (blockType?.supports?.shadow) {
|
||||
supportKeys.push('shadow');
|
||||
}
|
||||
Object.keys(__EXPERIMENTAL_STYLE_PROPERTY).forEach(styleName => {
|
||||
if (!__EXPERIMENTAL_STYLE_PROPERTY[styleName].support) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Opting out means that, for certain support keys like background color,
|
||||
// blocks have to explicitly set the support value false. If the key is
|
||||
// unset, we still enable it.
|
||||
if (__EXPERIMENTAL_STYLE_PROPERTY[styleName].requiresOptOut) {
|
||||
if (__EXPERIMENTAL_STYLE_PROPERTY[styleName].support[0] in blockType.supports && getValueFromObjectPath(blockType.supports, __EXPERIMENTAL_STYLE_PROPERTY[styleName].support) !== false) {
|
||||
supportKeys.push(styleName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (getValueFromObjectPath(blockType.supports, __EXPERIMENTAL_STYLE_PROPERTY[styleName].support, false)) {
|
||||
supportKeys.push(styleName);
|
||||
}
|
||||
});
|
||||
return filterElementBlockSupports(supportKeys, name, element);
|
||||
}, (state, name) => [state.blockTypes[name]]);
|
||||
|
||||
/**
|
||||
* Returns the bootstrapped block type metadata for a give block name.
|
||||
*
|
||||
* @param {Object} state Data state.
|
||||
* @param {string} name Block name.
|
||||
*
|
||||
* @return {Object} Bootstrapped block type metadata for a block.
|
||||
*/
|
||||
function getBootstrappedBlockType(state, name) {
|
||||
return state.bootstrappedBlockTypes[name];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the unprocessed (before applying the `registerBlockType` filter)
|
||||
* block type settings as passed during block registration.
|
||||
*
|
||||
* @param {Object} state Data state.
|
||||
*
|
||||
* @return {Array} Unprocessed block type settings for all blocks.
|
||||
*/
|
||||
function getUnprocessedBlockTypes(state) {
|
||||
return state.unprocessedBlockTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the block bindings sources registered.
|
||||
*
|
||||
* @param {Object} state Data state.
|
||||
*
|
||||
* @return {Object} All the registered sources and their properties.
|
||||
*/
|
||||
function getAllBlockBindingsSources(state) {
|
||||
return state.blockBindingsSources;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a specific block bindings source.
|
||||
*
|
||||
* @param {Object} state Data state.
|
||||
* @param {string} sourceName Name of the source to get.
|
||||
*
|
||||
* @return {Object} The specific block binding source and its properties.
|
||||
*/
|
||||
function private_selectors_getBlockBindingsSource(state, sourceName) {
|
||||
return state.blockBindingsSources[sourceName];
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if any of the block type's attributes have
|
||||
* the content role attribute.
|
||||
*
|
||||
* @param {Object} state Data state.
|
||||
* @param {string} blockTypeName Block type name.
|
||||
* @return {boolean} Whether block type has content role attribute.
|
||||
*/
|
||||
const hasContentRoleAttribute = (state, blockTypeName) => {
|
||||
const blockType = selectors_getBlockType(state, blockTypeName);
|
||||
if (!blockType) {
|
||||
return false;
|
||||
}
|
||||
return Object.values(blockType.attributes).some(({
|
||||
role,
|
||||
__experimentalRole
|
||||
}) => {
|
||||
if (role === 'content') {
|
||||
return true;
|
||||
}
|
||||
if (__experimentalRole === 'content') {
|
||||
external_wp_deprecated_default()('__experimentalRole attribute', {
|
||||
since: '6.7',
|
||||
version: '6.8',
|
||||
alternative: 'role attribute',
|
||||
hint: `Check the block.json of the ${blockTypeName} block.`
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/selectors.js
|
||||
/**
|
||||
* External dependencies
|
||||
@ -8400,11 +8640,13 @@ function matchesAttributes(blockAttributes, variationAttributes) {
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/** @typedef {import('../api/registration').WPBlockVariation} WPBlockVariation */
|
||||
/** @typedef {import('../api/registration').WPBlockVariationScope} WPBlockVariationScope */
|
||||
/** @typedef {import('./reducer').WPBlockCategory} WPBlockCategory */
|
||||
@ -9161,168 +9403,15 @@ const selectors_hasChildBlocksWithInserterSupport = (state, blockName) => {
|
||||
return selectors_hasBlockSupport(state, childBlockName, 'inserter', true);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* DO-NOT-USE in production.
|
||||
* This selector is created for internal/experimental only usage and may be
|
||||
* removed anytime without any warning, causing breakage on any plugin or theme invoking it.
|
||||
*/
|
||||
const __experimentalHasContentRoleAttribute = (0,external_wp_data_namespaceObject.createSelector)((state, blockTypeName) => {
|
||||
const blockType = selectors_getBlockType(state, blockTypeName);
|
||||
if (!blockType) {
|
||||
return false;
|
||||
}
|
||||
return Object.entries(blockType.attributes).some(([, {
|
||||
__experimentalRole
|
||||
}]) => __experimentalRole === 'content');
|
||||
}, (state, blockTypeName) => [state.blockTypes[blockTypeName]?.attributes]);
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/private-selectors.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
const ROOT_BLOCK_SUPPORTS = ['background', 'backgroundColor', 'color', 'linkColor', 'captionColor', 'buttonColor', 'headingColor', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'lineHeight', 'padding', 'contentSize', 'wideSize', 'blockGap', 'textDecoration', 'textTransform', 'letterSpacing'];
|
||||
|
||||
/**
|
||||
* Filters the list of supported styles for a given element.
|
||||
*
|
||||
* @param {string[]} blockSupports list of supported styles.
|
||||
* @param {string|undefined} name block name.
|
||||
* @param {string|undefined} element element name.
|
||||
*
|
||||
* @return {string[]} filtered list of supported styles.
|
||||
*/
|
||||
function filterElementBlockSupports(blockSupports, name, element) {
|
||||
return blockSupports.filter(support => {
|
||||
if (support === 'fontSize' && element === 'heading') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// This is only available for links
|
||||
if (support === 'textDecoration' && !name && element !== 'link') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// This is only available for heading, button, caption and text
|
||||
if (support === 'textTransform' && !name && !(['heading', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(element) || element === 'button' || element === 'caption' || element === 'text')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// This is only available for heading, button, caption and text
|
||||
if (support === 'letterSpacing' && !name && !(['heading', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(element) || element === 'button' || element === 'caption' || element === 'text')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Text columns is only available for blocks.
|
||||
if (support === 'textColumns' && !name) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
const __experimentalHasContentRoleAttribute = (...args) => {
|
||||
external_wp_deprecated_default()('__experimentalHasContentRoleAttribute', {
|
||||
since: '6.7',
|
||||
version: '6.8',
|
||||
hint: 'This is a private selector.'
|
||||
});
|
||||
}
|
||||
return hasContentRoleAttribute(...args);
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the list of supported styles for a given block name and element.
|
||||
*/
|
||||
const getSupportedStyles = (0,external_wp_data_namespaceObject.createSelector)((state, name, element) => {
|
||||
if (!name) {
|
||||
return filterElementBlockSupports(ROOT_BLOCK_SUPPORTS, name, element);
|
||||
}
|
||||
const blockType = selectors_getBlockType(state, name);
|
||||
if (!blockType) {
|
||||
return [];
|
||||
}
|
||||
const supportKeys = [];
|
||||
|
||||
// Check for blockGap support.
|
||||
// Block spacing support doesn't map directly to a single style property, so needs to be handled separately.
|
||||
if (blockType?.supports?.spacing?.blockGap) {
|
||||
supportKeys.push('blockGap');
|
||||
}
|
||||
|
||||
// check for shadow support
|
||||
if (blockType?.supports?.shadow) {
|
||||
supportKeys.push('shadow');
|
||||
}
|
||||
Object.keys(__EXPERIMENTAL_STYLE_PROPERTY).forEach(styleName => {
|
||||
if (!__EXPERIMENTAL_STYLE_PROPERTY[styleName].support) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Opting out means that, for certain support keys like background color,
|
||||
// blocks have to explicitly set the support value false. If the key is
|
||||
// unset, we still enable it.
|
||||
if (__EXPERIMENTAL_STYLE_PROPERTY[styleName].requiresOptOut) {
|
||||
if (__EXPERIMENTAL_STYLE_PROPERTY[styleName].support[0] in blockType.supports && getValueFromObjectPath(blockType.supports, __EXPERIMENTAL_STYLE_PROPERTY[styleName].support) !== false) {
|
||||
supportKeys.push(styleName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (getValueFromObjectPath(blockType.supports, __EXPERIMENTAL_STYLE_PROPERTY[styleName].support, false)) {
|
||||
supportKeys.push(styleName);
|
||||
}
|
||||
});
|
||||
return filterElementBlockSupports(supportKeys, name, element);
|
||||
}, (state, name) => [state.blockTypes[name]]);
|
||||
|
||||
/**
|
||||
* Returns the bootstrapped block type metadata for a give block name.
|
||||
*
|
||||
* @param {Object} state Data state.
|
||||
* @param {string} name Block name.
|
||||
*
|
||||
* @return {Object} Bootstrapped block type metadata for a block.
|
||||
*/
|
||||
function getBootstrappedBlockType(state, name) {
|
||||
return state.bootstrappedBlockTypes[name];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the unprocessed (before applying the `registerBlockType` filter)
|
||||
* block type settings as passed during block registration.
|
||||
*
|
||||
* @param {Object} state Data state.
|
||||
*
|
||||
* @return {Array} Unprocessed block type settings for all blocks.
|
||||
*/
|
||||
function getUnprocessedBlockTypes(state) {
|
||||
return state.unprocessedBlockTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the block bindings sources registered.
|
||||
*
|
||||
* @param {Object} state Data state.
|
||||
*
|
||||
* @return {Object} All the registered sources and their properties.
|
||||
*/
|
||||
function getAllBlockBindingsSources(state) {
|
||||
return state.blockBindingsSources;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a specific block bindings source.
|
||||
*
|
||||
* @param {Object} state Data state.
|
||||
* @param {string} sourceName Name of the source to get.
|
||||
*
|
||||
* @return {Object} The specific block binding source and its properties.
|
||||
*/
|
||||
function private_selectors_getBlockBindingsSource(state, sourceName) {
|
||||
return state.blockBindingsSources[sourceName];
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","deprecated"]
|
||||
const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
|
||||
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
|
||||
;// CONCATENATED MODULE: ./node_modules/is-plain-object/dist/is-plain-object.mjs
|
||||
/*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
@ -10557,6 +10646,7 @@ const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
@ -10757,7 +10847,16 @@ function getCommentAttributes(blockType, attributes) {
|
||||
}
|
||||
|
||||
// Ignore all local attributes
|
||||
if (attributeSchema.role === 'local') {
|
||||
return accumulator;
|
||||
}
|
||||
if (attributeSchema.__experimentalRole === 'local') {
|
||||
external_wp_deprecated_default()('__experimentalRole attribute', {
|
||||
since: '6.7',
|
||||
version: '6.8',
|
||||
alternative: 'role attribute',
|
||||
hint: `Check the block.json of the ${blockType?.name} block.`
|
||||
});
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
@ -15667,6 +15766,7 @@ function synchronizeBlocksWithTemplate(blocks = [], template) {
|
||||
|
||||
|
||||
|
||||
|
||||
// The blocktype is the most important concept within the block API. It defines
|
||||
// all aspects of the block configuration and its interfaces, including `edit`
|
||||
// and `save`. The transforms specification allows converting one blocktype to
|
||||
@ -15768,7 +15868,8 @@ lock(privateApis, {
|
||||
registerBlockBindingsSource: registerBlockBindingsSource,
|
||||
unregisterBlockBindingsSource: unregisterBlockBindingsSource,
|
||||
getBlockBindingsSource: getBlockBindingsSource,
|
||||
getBlockBindingsSources: getBlockBindingsSources
|
||||
getBlockBindingsSources: getBlockBindingsSources,
|
||||
isUnmodifiedBlockContent: isUnmodifiedBlockContent
|
||||
});
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/deprecated.js
|
||||
|
8
wp-includes/js/dist/blocks.min.js
vendored
8
wp-includes/js/dist/blocks.min.js
vendored
File diff suppressed because one or more lines are too long
300
wp-includes/js/dist/components.js
vendored
300
wp-includes/js/dist/components.js
vendored
@ -58283,6 +58283,7 @@ function Guide({
|
||||
className: "components-guide__finish-button",
|
||||
variant: "primary",
|
||||
onClick: onFinish,
|
||||
__next40pxDefaultSize: true,
|
||||
children: finishButtonText
|
||||
})]
|
||||
})]
|
||||
@ -60706,8 +60707,7 @@ function goTo(state, path, options = {}) {
|
||||
focusSelectors
|
||||
} = state;
|
||||
const currentLocation = {
|
||||
...state.currentLocation,
|
||||
isInitial: false
|
||||
...state.currentLocation
|
||||
};
|
||||
const {
|
||||
// Default assignments
|
||||
@ -60752,6 +60752,7 @@ function goTo(state, path, options = {}) {
|
||||
return {
|
||||
currentLocation: {
|
||||
...restOptions,
|
||||
isInitial: false,
|
||||
path,
|
||||
isBack,
|
||||
hasRestoredFocus: false,
|
||||
@ -60767,8 +60768,7 @@ function goToParent(state, options = {}) {
|
||||
focusSelectors
|
||||
} = state;
|
||||
const currentLocation = {
|
||||
...state.currentLocation,
|
||||
isInitial: false
|
||||
...state.currentLocation
|
||||
};
|
||||
const currentPath = currentLocation.path;
|
||||
if (currentPath === undefined) {
|
||||
@ -66746,20 +66746,27 @@ const ConnectedToolsPanelHeader = contextConnect(component_ToolsPanelHeader, 'To
|
||||
|
||||
|
||||
const DEFAULT_COLUMNS = 2;
|
||||
function emptyMenuItems() {
|
||||
return {
|
||||
default: {},
|
||||
optional: {}
|
||||
};
|
||||
}
|
||||
function emptyState() {
|
||||
return {
|
||||
panelItems: [],
|
||||
menuItemOrder: [],
|
||||
menuItems: emptyMenuItems()
|
||||
};
|
||||
}
|
||||
const generateMenuItems = ({
|
||||
panelItems,
|
||||
shouldReset,
|
||||
currentMenuItems,
|
||||
menuItemOrder
|
||||
}) => {
|
||||
const newMenuItems = {
|
||||
default: {},
|
||||
optional: {}
|
||||
};
|
||||
const menuItems = {
|
||||
default: {},
|
||||
optional: {}
|
||||
};
|
||||
const newMenuItems = emptyMenuItems();
|
||||
const menuItems = emptyMenuItems();
|
||||
panelItems.forEach(({
|
||||
hasValue,
|
||||
isShownByDefault,
|
||||
@ -66798,7 +66805,128 @@ const generateMenuItems = ({
|
||||
});
|
||||
return menuItems;
|
||||
};
|
||||
const isMenuItemTypeEmpty = obj => obj && Object.keys(obj).length === 0;
|
||||
function panelItemsReducer(panelItems, action) {
|
||||
switch (action.type) {
|
||||
case 'REGISTER_PANEL':
|
||||
{
|
||||
const newItems = [...panelItems];
|
||||
// If an item with this label has already been registered, remove it
|
||||
// first. This can happen when an item is moved between the default
|
||||
// and optional groups.
|
||||
const existingIndex = newItems.findIndex(oldItem => oldItem.label === action.item.label);
|
||||
if (existingIndex !== -1) {
|
||||
newItems.splice(existingIndex, 1);
|
||||
}
|
||||
newItems.push(action.item);
|
||||
return newItems;
|
||||
}
|
||||
case 'UNREGISTER_PANEL':
|
||||
{
|
||||
const index = panelItems.findIndex(item => item.label === action.label);
|
||||
if (index !== -1) {
|
||||
const newItems = [...panelItems];
|
||||
newItems.splice(index, 1);
|
||||
return newItems;
|
||||
}
|
||||
return panelItems;
|
||||
}
|
||||
default:
|
||||
return panelItems;
|
||||
}
|
||||
}
|
||||
function menuItemOrderReducer(menuItemOrder, action) {
|
||||
switch (action.type) {
|
||||
case 'REGISTER_PANEL':
|
||||
{
|
||||
// Track the initial order of item registration. This is used for
|
||||
// maintaining menu item order later.
|
||||
if (menuItemOrder.includes(action.item.label)) {
|
||||
return menuItemOrder;
|
||||
}
|
||||
return [...menuItemOrder, action.item.label];
|
||||
}
|
||||
default:
|
||||
return menuItemOrder;
|
||||
}
|
||||
}
|
||||
function menuItemsReducer(state, action) {
|
||||
switch (action.type) {
|
||||
case 'REGISTER_PANEL':
|
||||
case 'UNREGISTER_PANEL':
|
||||
// generate new menu items from original `menuItems` and updated `panelItems` and `menuItemOrder`
|
||||
return generateMenuItems({
|
||||
currentMenuItems: state.menuItems,
|
||||
panelItems: state.panelItems,
|
||||
menuItemOrder: state.menuItemOrder,
|
||||
shouldReset: false
|
||||
});
|
||||
case 'RESET_ALL':
|
||||
return generateMenuItems({
|
||||
panelItems: state.panelItems,
|
||||
menuItemOrder: state.menuItemOrder,
|
||||
shouldReset: true
|
||||
});
|
||||
case 'UPDATE_VALUE':
|
||||
{
|
||||
const oldValue = state.menuItems[action.group][action.label];
|
||||
if (action.value === oldValue) {
|
||||
return state.menuItems;
|
||||
}
|
||||
return {
|
||||
...state.menuItems,
|
||||
[action.group]: {
|
||||
...state.menuItems[action.group],
|
||||
[action.label]: action.value
|
||||
}
|
||||
};
|
||||
}
|
||||
case 'TOGGLE_VALUE':
|
||||
{
|
||||
const currentItem = state.panelItems.find(item => item.label === action.label);
|
||||
if (!currentItem) {
|
||||
return state.menuItems;
|
||||
}
|
||||
const menuGroup = currentItem.isShownByDefault ? 'default' : 'optional';
|
||||
const newMenuItems = {
|
||||
...state.menuItems,
|
||||
[menuGroup]: {
|
||||
...state.menuItems[menuGroup],
|
||||
[action.label]: !state.menuItems[menuGroup][action.label]
|
||||
}
|
||||
};
|
||||
return newMenuItems;
|
||||
}
|
||||
default:
|
||||
return state.menuItems;
|
||||
}
|
||||
}
|
||||
function panelReducer(state, action) {
|
||||
const panelItems = panelItemsReducer(state.panelItems, action);
|
||||
const menuItemOrder = menuItemOrderReducer(state.menuItemOrder, action);
|
||||
// `menuItemsReducer` is a bit unusual because it generates new state from original `menuItems`
|
||||
// and the updated `panelItems` and `menuItemOrder`.
|
||||
const menuItems = menuItemsReducer({
|
||||
panelItems,
|
||||
menuItemOrder,
|
||||
menuItems: state.menuItems
|
||||
}, action);
|
||||
return {
|
||||
panelItems,
|
||||
menuItemOrder,
|
||||
menuItems
|
||||
};
|
||||
}
|
||||
function resetAllFiltersReducer(filters, action) {
|
||||
switch (action.type) {
|
||||
case 'REGISTER':
|
||||
return [...filters, action.filter];
|
||||
case 'UNREGISTER':
|
||||
return filters.filter(f => f !== action.filter);
|
||||
default:
|
||||
return filters;
|
||||
}
|
||||
}
|
||||
const isMenuItemTypeEmpty = obj => Object.keys(obj).length === 0;
|
||||
function useToolsPanel(props) {
|
||||
const {
|
||||
className,
|
||||
@ -66825,32 +66953,18 @@ function useToolsPanel(props) {
|
||||
}, [wasResetting]);
|
||||
|
||||
// Allow panel items to register themselves.
|
||||
const [panelItems, setPanelItems] = (0,external_wp_element_namespaceObject.useState)([]);
|
||||
const [menuItemOrder, setMenuItemOrder] = (0,external_wp_element_namespaceObject.useState)([]);
|
||||
const [resetAllFilters, setResetAllFilters] = (0,external_wp_element_namespaceObject.useState)([]);
|
||||
const [{
|
||||
panelItems,
|
||||
menuItems
|
||||
}, panelDispatch] = (0,external_wp_element_namespaceObject.useReducer)(panelReducer, undefined, emptyState);
|
||||
const [resetAllFilters, dispatchResetAllFilters] = (0,external_wp_element_namespaceObject.useReducer)(resetAllFiltersReducer, []);
|
||||
const registerPanelItem = (0,external_wp_element_namespaceObject.useCallback)(item => {
|
||||
// Add item to panel items.
|
||||
setPanelItems(items => {
|
||||
const newItems = [...items];
|
||||
// If an item with this label has already been registered, remove it
|
||||
// first. This can happen when an item is moved between the default
|
||||
// and optional groups.
|
||||
const existingIndex = newItems.findIndex(oldItem => oldItem.label === item.label);
|
||||
if (existingIndex !== -1) {
|
||||
newItems.splice(existingIndex, 1);
|
||||
}
|
||||
return [...newItems, item];
|
||||
panelDispatch({
|
||||
type: 'REGISTER_PANEL',
|
||||
item
|
||||
});
|
||||
|
||||
// Track the initial order of item registration. This is used for
|
||||
// maintaining menu item order later.
|
||||
setMenuItemOrder(items => {
|
||||
if (items.includes(item.label)) {
|
||||
return items;
|
||||
}
|
||||
return [...items, item.label];
|
||||
});
|
||||
}, [setPanelItems, setMenuItemOrder]);
|
||||
}, []);
|
||||
|
||||
// Panels need to deregister on unmount to avoid orphans in menu state.
|
||||
// This is an issue when panel items are being injected via SlotFills.
|
||||
@ -66859,96 +66973,58 @@ function useToolsPanel(props) {
|
||||
// controls, e.g. both panels have a "padding" control, the
|
||||
// deregistration of the first panel doesn't occur until after the
|
||||
// registration of the next.
|
||||
setPanelItems(items => {
|
||||
const newItems = [...items];
|
||||
const index = newItems.findIndex(item => item.label === label);
|
||||
if (index !== -1) {
|
||||
newItems.splice(index, 1);
|
||||
}
|
||||
return newItems;
|
||||
panelDispatch({
|
||||
type: 'UNREGISTER_PANEL',
|
||||
label
|
||||
});
|
||||
}, [setPanelItems]);
|
||||
const registerResetAllFilter = (0,external_wp_element_namespaceObject.useCallback)(newFilter => {
|
||||
setResetAllFilters(filters => {
|
||||
return [...filters, newFilter];
|
||||
}, []);
|
||||
const registerResetAllFilter = (0,external_wp_element_namespaceObject.useCallback)(filter => {
|
||||
dispatchResetAllFilters({
|
||||
type: 'REGISTER',
|
||||
filter
|
||||
});
|
||||
}, [setResetAllFilters]);
|
||||
const deregisterResetAllFilter = (0,external_wp_element_namespaceObject.useCallback)(filterToRemove => {
|
||||
setResetAllFilters(filters => {
|
||||
return filters.filter(filter => filter !== filterToRemove);
|
||||
}, []);
|
||||
const deregisterResetAllFilter = (0,external_wp_element_namespaceObject.useCallback)(filter => {
|
||||
dispatchResetAllFilters({
|
||||
type: 'UNREGISTER',
|
||||
filter
|
||||
});
|
||||
}, [setResetAllFilters]);
|
||||
|
||||
// Manage and share display state of menu items representing child controls.
|
||||
const [menuItems, setMenuItems] = (0,external_wp_element_namespaceObject.useState)({
|
||||
default: {},
|
||||
optional: {}
|
||||
});
|
||||
|
||||
// Setup menuItems state as panel items register themselves.
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
setMenuItems(prevState => {
|
||||
const items = generateMenuItems({
|
||||
panelItems,
|
||||
shouldReset: false,
|
||||
currentMenuItems: prevState,
|
||||
menuItemOrder
|
||||
});
|
||||
return items;
|
||||
});
|
||||
}, [panelItems, setMenuItems, menuItemOrder]);
|
||||
}, []);
|
||||
|
||||
// Updates the status of the panel’s menu items. For default items the
|
||||
// value represents whether it differs from the default and for optional
|
||||
// items whether the item is shown.
|
||||
const flagItemCustomization = (0,external_wp_element_namespaceObject.useCallback)((value, label, group = 'default') => {
|
||||
setMenuItems(items => {
|
||||
const newState = {
|
||||
...items,
|
||||
[group]: {
|
||||
...items[group],
|
||||
[label]: value
|
||||
}
|
||||
};
|
||||
return newState;
|
||||
panelDispatch({
|
||||
type: 'UPDATE_VALUE',
|
||||
group,
|
||||
label,
|
||||
value
|
||||
});
|
||||
}, [setMenuItems]);
|
||||
}, []);
|
||||
|
||||
// Whether all optional menu items are hidden or not must be tracked
|
||||
// in order to later determine if the panel display is empty and handle
|
||||
// conditional display of a plus icon to indicate the presence of further
|
||||
// menu items.
|
||||
const [areAllOptionalControlsHidden, setAreAllOptionalControlsHidden] = (0,external_wp_element_namespaceObject.useState)(false);
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
if (isMenuItemTypeEmpty(menuItems?.default) && !isMenuItemTypeEmpty(menuItems?.optional)) {
|
||||
const allControlsHidden = !Object.entries(menuItems.optional).some(([, isSelected]) => isSelected);
|
||||
setAreAllOptionalControlsHidden(allControlsHidden);
|
||||
}
|
||||
}, [menuItems, setAreAllOptionalControlsHidden]);
|
||||
const areAllOptionalControlsHidden = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
return isMenuItemTypeEmpty(menuItems.default) && !isMenuItemTypeEmpty(menuItems.optional) && Object.values(menuItems.optional).every(isSelected => !isSelected);
|
||||
}, [menuItems]);
|
||||
const cx = useCx();
|
||||
const classes = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
const wrapperStyle = hasInnerWrapper && ToolsPanelWithInnerWrapper(DEFAULT_COLUMNS);
|
||||
const emptyStyle = isMenuItemTypeEmpty(menuItems?.default) && areAllOptionalControlsHidden && ToolsPanelHiddenInnerWrapper;
|
||||
const emptyStyle = areAllOptionalControlsHidden && ToolsPanelHiddenInnerWrapper;
|
||||
return cx(ToolsPanel(DEFAULT_COLUMNS), wrapperStyle, emptyStyle, className);
|
||||
}, [areAllOptionalControlsHidden, className, cx, hasInnerWrapper, menuItems]);
|
||||
}, [areAllOptionalControlsHidden, className, cx, hasInnerWrapper]);
|
||||
|
||||
// Toggle the checked state of a menu item which is then used to determine
|
||||
// display of the item within the panel.
|
||||
const toggleItem = (0,external_wp_element_namespaceObject.useCallback)(label => {
|
||||
const currentItem = panelItems.find(item => item.label === label);
|
||||
if (!currentItem) {
|
||||
return;
|
||||
}
|
||||
const menuGroup = currentItem.isShownByDefault ? 'default' : 'optional';
|
||||
const newMenuItems = {
|
||||
...menuItems,
|
||||
[menuGroup]: {
|
||||
...menuItems[menuGroup],
|
||||
[label]: !menuItems[menuGroup][label]
|
||||
}
|
||||
};
|
||||
setMenuItems(newMenuItems);
|
||||
}, [menuItems, panelItems, setMenuItems]);
|
||||
panelDispatch({
|
||||
type: 'TOGGLE_VALUE',
|
||||
label
|
||||
});
|
||||
}, []);
|
||||
|
||||
// Resets display of children and executes resetAll callback if available.
|
||||
const resetAllItems = (0,external_wp_element_namespaceObject.useCallback)(() => {
|
||||
@ -66958,30 +67034,28 @@ function useToolsPanel(props) {
|
||||
}
|
||||
|
||||
// Turn off display of all non-default items.
|
||||
const resetMenuItems = generateMenuItems({
|
||||
panelItems,
|
||||
menuItemOrder,
|
||||
shouldReset: true
|
||||
panelDispatch({
|
||||
type: 'RESET_ALL'
|
||||
});
|
||||
setMenuItems(resetMenuItems);
|
||||
}, [panelItems, resetAllFilters, resetAll, setMenuItems, menuItemOrder]);
|
||||
}, [resetAllFilters, resetAll]);
|
||||
|
||||
// Assist ItemGroup styling when there are potentially hidden placeholder
|
||||
// items by identifying first & last items that are toggled on for display.
|
||||
const getFirstVisibleItemLabel = items => {
|
||||
const optionalItems = menuItems.optional || {};
|
||||
const firstItem = items.find(item => item.isShownByDefault || !!optionalItems[item.label]);
|
||||
const firstItem = items.find(item => item.isShownByDefault || optionalItems[item.label]);
|
||||
return firstItem?.label;
|
||||
};
|
||||
const firstDisplayedItem = getFirstVisibleItemLabel(panelItems);
|
||||
const lastDisplayedItem = getFirstVisibleItemLabel([...panelItems].reverse());
|
||||
const hasMenuItems = panelItems.length > 0;
|
||||
const panelContext = (0,external_wp_element_namespaceObject.useMemo)(() => ({
|
||||
areAllOptionalControlsHidden,
|
||||
deregisterPanelItem,
|
||||
deregisterResetAllFilter,
|
||||
firstDisplayedItem,
|
||||
flagItemCustomization,
|
||||
hasMenuItems: !!panelItems.length,
|
||||
hasMenuItems,
|
||||
isResetting: isResettingRef.current,
|
||||
lastDisplayedItem,
|
||||
menuItems,
|
||||
@ -66991,7 +67065,7 @@ function useToolsPanel(props) {
|
||||
shouldRenderPlaceholderItems,
|
||||
__experimentalFirstVisibleItemClass,
|
||||
__experimentalLastVisibleItemClass
|
||||
}), [areAllOptionalControlsHidden, deregisterPanelItem, deregisterResetAllFilter, firstDisplayedItem, flagItemCustomization, lastDisplayedItem, menuItems, panelId, panelItems, registerResetAllFilter, registerPanelItem, shouldRenderPlaceholderItems, __experimentalFirstVisibleItemClass, __experimentalLastVisibleItemClass]);
|
||||
}), [areAllOptionalControlsHidden, deregisterPanelItem, deregisterResetAllFilter, firstDisplayedItem, flagItemCustomization, lastDisplayedItem, menuItems, panelId, hasMenuItems, registerResetAllFilter, registerPanelItem, shouldRenderPlaceholderItems, __experimentalFirstVisibleItemClass, __experimentalLastVisibleItemClass]);
|
||||
return {
|
||||
...otherProps,
|
||||
headingLevel,
|
||||
|
6
wp-includes/js/dist/components.min.js
vendored
6
wp-includes/js/dist/components.min.js
vendored
File diff suppressed because one or more lines are too long
15
wp-includes/js/dist/dom.js
vendored
15
wp-includes/js/dist/dom.js
vendored
@ -1314,6 +1314,13 @@ function placeCaretAtEdge(container, isReverse, x) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!container.isContentEditable) {
|
||||
return;
|
||||
}
|
||||
const range = scrollIfNoRange(container, isReverse, () => getRange(container, isReverse, x));
|
||||
if (!range) {
|
||||
return;
|
||||
}
|
||||
const {
|
||||
ownerDocument
|
||||
} = container;
|
||||
@ -1323,14 +1330,6 @@ function placeCaretAtEdge(container, isReverse, x) {
|
||||
assertIsDefined(defaultView, 'defaultView');
|
||||
const selection = defaultView.getSelection();
|
||||
assertIsDefined(selection, 'selection');
|
||||
if (!container.isContentEditable) {
|
||||
selection.removeAllRanges();
|
||||
return;
|
||||
}
|
||||
const range = scrollIfNoRange(container, isReverse, () => getRange(container, isReverse, x));
|
||||
if (!range) {
|
||||
return;
|
||||
}
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
}
|
||||
|
2
wp-includes/js/dist/dom.min.js
vendored
2
wp-includes/js/dist/dom.min.js
vendored
File diff suppressed because one or more lines are too long
36
wp-includes/js/dist/edit-post.js
vendored
36
wp-includes/js/dist/edit-post.js
vendored
@ -1006,15 +1006,11 @@ const initializeMetaBoxes = () => ({
|
||||
actions_metaBoxesInitialized = true;
|
||||
|
||||
// Save metaboxes on save completion, except for autosaves.
|
||||
(0,external_wp_hooks_namespaceObject.addFilter)('editor.__unstableSavePost', 'core/edit-post/save-metaboxes', (previous, options) => previous.then(() => {
|
||||
if (options.isAutosave) {
|
||||
return;
|
||||
(0,external_wp_hooks_namespaceObject.addAction)('editor.savePost', 'core/edit-post/save-metaboxes', async options => {
|
||||
if (!options.isAutosave && select.hasMetaBoxes()) {
|
||||
await dispatch.requestMetaBoxUpdates();
|
||||
}
|
||||
if (!select.hasMetaBoxes()) {
|
||||
return;
|
||||
}
|
||||
return dispatch.requestMetaBoxUpdates();
|
||||
}));
|
||||
});
|
||||
dispatch({
|
||||
type: 'META_BOXES_INITIALIZED'
|
||||
});
|
||||
@ -3086,10 +3082,14 @@ function Layout({
|
||||
createErrorNotice
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
|
||||
const {
|
||||
currentPost,
|
||||
currentPost: {
|
||||
postId: currentPostId,
|
||||
postType: currentPostType
|
||||
},
|
||||
onNavigateToEntityRecord,
|
||||
onNavigateToPreviousEntityRecord
|
||||
} = useNavigateToEntityRecord(initialPostId, initialPostType, 'post-only');
|
||||
const isEditingTemplate = currentPostType === 'wp_template';
|
||||
const {
|
||||
mode,
|
||||
isFullscreenActive,
|
||||
@ -3099,7 +3099,6 @@ function Layout({
|
||||
isDistractionFree,
|
||||
showMetaBoxes,
|
||||
hasHistory,
|
||||
isEditingTemplate,
|
||||
isWelcomeGuideVisible,
|
||||
templateId
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
@ -3116,7 +3115,7 @@ function Layout({
|
||||
getPostType
|
||||
} = select(external_wp_coreData_namespaceObject.store);
|
||||
const supportsTemplateMode = settings.supportsTemplateMode;
|
||||
const isViewable = (_getPostType$viewable = getPostType(currentPost.postType)?.viewable) !== null && _getPostType$viewable !== void 0 ? _getPostType$viewable : false;
|
||||
const isViewable = (_getPostType$viewable = getPostType(currentPostType)?.viewable) !== null && _getPostType$viewable !== void 0 ? _getPostType$viewable : false;
|
||||
const canViewTemplate = canUser('read', {
|
||||
kind: 'postType',
|
||||
name: 'wp_template'
|
||||
@ -3128,12 +3127,11 @@ function Layout({
|
||||
hasBlockSelected: !!select(external_wp_blockEditor_namespaceObject.store).getBlockSelectionStart(),
|
||||
showIconLabels: get('core', 'showIconLabels'),
|
||||
isDistractionFree: get('core', 'distractionFree'),
|
||||
showMetaBoxes: select(external_wp_editor_namespaceObject.store).getRenderingMode() === 'post-only',
|
||||
isEditingTemplate: select(external_wp_editor_namespaceObject.store).getCurrentPostType() === 'wp_template',
|
||||
showMetaBoxes: !DESIGN_POST_TYPES.includes(currentPostType) && select(external_wp_editor_namespaceObject.store).getRenderingMode() === 'post-only',
|
||||
isWelcomeGuideVisible: isFeatureActive('welcomeGuide'),
|
||||
templateId: supportsTemplateMode && isViewable && canViewTemplate && currentPost.postType !== 'wp_template' ? getEditedPostTemplateId() : null
|
||||
templateId: supportsTemplateMode && isViewable && canViewTemplate && !isEditingTemplate ? getEditedPostTemplateId() : null
|
||||
};
|
||||
}, [settings.supportsTemplateMode, currentPost.postType]);
|
||||
}, [currentPostType, isEditingTemplate, settings.supportsTemplateMode]);
|
||||
|
||||
// Set the right context for the command palette
|
||||
const commandContext = hasBlockSelected ? 'block-selection-edit' : 'entity-edit';
|
||||
@ -3209,12 +3207,12 @@ function Layout({
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SlotFillProvider, {
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_editor_namespaceObject.ErrorBoundary, {
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_commands_namespaceObject.CommandMenu, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuide, {
|
||||
postType: currentPost.postType
|
||||
postType: currentPostType
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Editor, {
|
||||
settings: editorSettings,
|
||||
initialEdits: initialEdits,
|
||||
postType: currentPost.postType,
|
||||
postId: currentPost.postId,
|
||||
postType: currentPostType,
|
||||
postId: currentPostId,
|
||||
templateId: templateId,
|
||||
className: className,
|
||||
styles: styles,
|
||||
@ -3226,7 +3224,7 @@ function Layout({
|
||||
,
|
||||
autoFocus: !isWelcomeGuideVisible,
|
||||
onActionPerformed: onActionPerformed,
|
||||
extraSidebarPanels: !isEditingTemplate && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxes, {
|
||||
extraSidebarPanels: showMetaBoxes && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxes, {
|
||||
location: "side"
|
||||
}),
|
||||
extraContent: !isDistractionFree && showMetaBoxes && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxesMain, {
|
||||
|
2
wp-includes/js/dist/edit-post.min.js
vendored
2
wp-includes/js/dist/edit-post.min.js
vendored
File diff suppressed because one or more lines are too long
884
wp-includes/js/dist/edit-site.js
vendored
884
wp-includes/js/dist/edit-site.js
vendored
@ -10428,22 +10428,22 @@ function Icon({
|
||||
}
|
||||
/* harmony default export */ const build_module_icon = ((0,external_wp_element_namespaceObject.forwardRef)(Icon));
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/home-button.js
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/arrow-up-left.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
const homeButton = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
|
||||
const arrowUpLeft = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
|
||||
width: "24",
|
||||
height: "24",
|
||||
fill: "none",
|
||||
xmlns: "http://www.w3.org/2000/svg",
|
||||
viewBox: "0 0 24 24",
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
|
||||
fillRule: "evenodd",
|
||||
clipRule: "evenodd",
|
||||
d: "M4.25 7A2.75 2.75 0 0 1 7 4.25h10A2.75 2.75 0 0 1 19.75 7v10A2.75 2.75 0 0 1 17 19.75H7A2.75 2.75 0 0 1 4.25 17V7ZM7 5.75c-.69 0-1.25.56-1.25 1.25v10c0 .69.56 1.25 1.25 1.25h10c.69 0 1.25-.56 1.25-1.25V7c0-.69-.56-1.25-1.25-1.25H7Z"
|
||||
d: "M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z"
|
||||
})
|
||||
});
|
||||
/* harmony default export */ const home_button = (homeButton);
|
||||
/* harmony default export */ const arrow_up_left = (arrowUpLeft);
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/image.js
|
||||
|
||||
@ -12786,6 +12786,338 @@ function TypographyElements() {
|
||||
}
|
||||
/* harmony default export */ const typography_elements = (TypographyElements);
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/preview-typography.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
const StylesPreviewTypography = ({
|
||||
variation,
|
||||
isFocused,
|
||||
withHoverView
|
||||
}) => {
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreviewIframe, {
|
||||
label: variation.title,
|
||||
isFocused: isFocused,
|
||||
withHoverView: withHoverView,
|
||||
children: ({
|
||||
ratio,
|
||||
key
|
||||
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
|
||||
spacing: 10 * ratio,
|
||||
justify: "center",
|
||||
style: {
|
||||
height: '100%',
|
||||
overflow: 'hidden'
|
||||
},
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreviewTypography, {
|
||||
variation: variation,
|
||||
fontSize: 85 * ratio
|
||||
})
|
||||
}, key)
|
||||
});
|
||||
};
|
||||
/* harmony default export */ const preview_typography = (StylesPreviewTypography);
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js
|
||||
/* wp:polyfill */
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
const {
|
||||
GlobalStylesContext: use_theme_style_variations_by_property_GlobalStylesContext,
|
||||
areGlobalStyleConfigsEqual
|
||||
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
|
||||
const {
|
||||
mergeBaseAndUserConfigs: use_theme_style_variations_by_property_mergeBaseAndUserConfigs
|
||||
} = unlock(external_wp_editor_namespaceObject.privateApis);
|
||||
|
||||
/**
|
||||
* Removes all instances of properties from an object.
|
||||
*
|
||||
* @param {Object} object The object to remove the properties from.
|
||||
* @param {string[]} properties The properties to remove.
|
||||
* @return {Object} The modified object.
|
||||
*/
|
||||
function removePropertiesFromObject(object, properties) {
|
||||
if (!properties?.length) {
|
||||
return object;
|
||||
}
|
||||
if (typeof object !== 'object' || !object || !Object.keys(object).length) {
|
||||
return object;
|
||||
}
|
||||
for (const key in object) {
|
||||
if (properties.includes(key)) {
|
||||
delete object[key];
|
||||
} else if (typeof object[key] === 'object') {
|
||||
removePropertiesFromObject(object[key], properties);
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether a style variation is empty.
|
||||
*
|
||||
* @param {Object} variation A style variation object.
|
||||
* @param {string} variation.title The title of the variation.
|
||||
* @param {Object} variation.settings The settings of the variation.
|
||||
* @param {Object} variation.styles The styles of the variation.
|
||||
* @return {boolean} Whether the variation is empty.
|
||||
*/
|
||||
function hasThemeVariation({
|
||||
title,
|
||||
settings,
|
||||
styles
|
||||
}) {
|
||||
return title === (0,external_wp_i18n_namespaceObject.__)('Default') ||
|
||||
// Always preserve the default variation.
|
||||
Object.keys(settings).length > 0 || Object.keys(styles).length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the current theme style variations that contain only the specified properties
|
||||
* and merges them with the user config.
|
||||
*
|
||||
* @param {string[]} properties The properties to filter by.
|
||||
* @return {Object[]|*} The merged object.
|
||||
*/
|
||||
function useCurrentMergeThemeStyleVariationsWithUserConfig(properties = []) {
|
||||
const {
|
||||
variationsFromTheme
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const _variationsFromTheme = select(external_wp_coreData_namespaceObject.store).__experimentalGetCurrentThemeGlobalStylesVariations();
|
||||
return {
|
||||
variationsFromTheme: _variationsFromTheme || []
|
||||
};
|
||||
}, []);
|
||||
const {
|
||||
user: userVariation
|
||||
} = (0,external_wp_element_namespaceObject.useContext)(use_theme_style_variations_by_property_GlobalStylesContext);
|
||||
const propertiesAsString = properties.toString();
|
||||
return (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
const clonedUserVariation = structuredClone(userVariation);
|
||||
|
||||
// Get user variation and remove the settings for the given property.
|
||||
const userVariationWithoutProperties = removePropertiesFromObject(clonedUserVariation, properties);
|
||||
userVariationWithoutProperties.title = (0,external_wp_i18n_namespaceObject.__)('Default');
|
||||
const variationsWithPropertiesAndBase = variationsFromTheme.filter(variation => {
|
||||
return isVariationWithProperties(variation, properties);
|
||||
}).map(variation => {
|
||||
return use_theme_style_variations_by_property_mergeBaseAndUserConfigs(userVariationWithoutProperties, variation);
|
||||
});
|
||||
const variationsByProperties = [userVariationWithoutProperties, ...variationsWithPropertiesAndBase];
|
||||
|
||||
/*
|
||||
* Filter out variations with no settings or styles.
|
||||
*/
|
||||
return variationsByProperties?.length ? variationsByProperties.filter(hasThemeVariation) : [];
|
||||
}, [propertiesAsString, userVariation, variationsFromTheme]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new object, with properties specified in `properties` array.,
|
||||
* maintain the original object tree structure.
|
||||
* The function is recursive, so it will perform a deep search for the given properties.
|
||||
* E.g., the function will return `{ a: { b: { c: { test: 1 } } } }` if the properties are `[ 'test' ]`.
|
||||
*
|
||||
* @param {Object} object The object to filter
|
||||
* @param {string[]} properties The properties to filter by
|
||||
* @return {Object} The merged object.
|
||||
*/
|
||||
const filterObjectByProperties = (object, properties) => {
|
||||
if (!object || !properties?.length) {
|
||||
return {};
|
||||
}
|
||||
const newObject = {};
|
||||
Object.keys(object).forEach(key => {
|
||||
if (properties.includes(key)) {
|
||||
newObject[key] = object[key];
|
||||
} else if (typeof object[key] === 'object') {
|
||||
const newFilter = filterObjectByProperties(object[key], properties);
|
||||
if (Object.keys(newFilter).length) {
|
||||
newObject[key] = newFilter;
|
||||
}
|
||||
}
|
||||
});
|
||||
return newObject;
|
||||
};
|
||||
|
||||
/**
|
||||
* Compares a style variation to the same variation filtered by the specified properties.
|
||||
* Returns true if the variation contains only the properties specified.
|
||||
*
|
||||
* @param {Object} variation The variation to compare.
|
||||
* @param {string[]} properties The properties to compare.
|
||||
* @return {boolean} Whether the variation contains only the specified properties.
|
||||
*/
|
||||
function isVariationWithProperties(variation, properties) {
|
||||
const variationWithProperties = filterObjectByProperties(structuredClone(variation), properties);
|
||||
return areGlobalStyleConfigsEqual(variationWithProperties, variation);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/variations/variation.js
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
const {
|
||||
mergeBaseAndUserConfigs: variation_mergeBaseAndUserConfigs
|
||||
} = unlock(external_wp_editor_namespaceObject.privateApis);
|
||||
const {
|
||||
GlobalStylesContext: variation_GlobalStylesContext,
|
||||
areGlobalStyleConfigsEqual: variation_areGlobalStyleConfigsEqual
|
||||
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
|
||||
function Variation({
|
||||
variation,
|
||||
children,
|
||||
isPill,
|
||||
properties,
|
||||
showTooltip
|
||||
}) {
|
||||
const [isFocused, setIsFocused] = (0,external_wp_element_namespaceObject.useState)(false);
|
||||
const {
|
||||
base,
|
||||
user,
|
||||
setUserConfig
|
||||
} = (0,external_wp_element_namespaceObject.useContext)(variation_GlobalStylesContext);
|
||||
const context = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
let merged = variation_mergeBaseAndUserConfigs(base, variation);
|
||||
if (properties) {
|
||||
merged = filterObjectByProperties(merged, properties);
|
||||
}
|
||||
return {
|
||||
user: variation,
|
||||
base,
|
||||
merged,
|
||||
setUserConfig: () => {}
|
||||
};
|
||||
}, [variation, base, properties]);
|
||||
const selectVariation = () => setUserConfig(variation);
|
||||
const selectOnEnter = event => {
|
||||
if (event.keyCode === external_wp_keycodes_namespaceObject.ENTER) {
|
||||
event.preventDefault();
|
||||
selectVariation();
|
||||
}
|
||||
};
|
||||
const isActive = (0,external_wp_element_namespaceObject.useMemo)(() => variation_areGlobalStyleConfigsEqual(user, variation), [user, variation]);
|
||||
let label = variation?.title;
|
||||
if (variation?.description) {
|
||||
label = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %1$s: variation title. %2$s variation description. */
|
||||
(0,external_wp_i18n_namespaceObject.__)('%1$s (%2$s)'), variation?.title, variation?.description);
|
||||
}
|
||||
const content = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
|
||||
className: dist_clsx('edit-site-global-styles-variations_item', {
|
||||
'is-active': isActive
|
||||
}),
|
||||
role: "button",
|
||||
onClick: selectVariation,
|
||||
onKeyDown: selectOnEnter,
|
||||
tabIndex: "0",
|
||||
"aria-label": label,
|
||||
"aria-current": isActive,
|
||||
onFocus: () => setIsFocused(true),
|
||||
onBlur: () => setIsFocused(false),
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
|
||||
className: dist_clsx('edit-site-global-styles-variations_item-preview', {
|
||||
'is-pill': isPill
|
||||
}),
|
||||
children: children(isFocused)
|
||||
})
|
||||
});
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(variation_GlobalStylesContext.Provider, {
|
||||
value: context,
|
||||
children: showTooltip ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, {
|
||||
text: variation?.title,
|
||||
children: content
|
||||
}) : content
|
||||
});
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/variations/variations-typography.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function TypographyVariations({
|
||||
title,
|
||||
gap = 2
|
||||
}) {
|
||||
const propertiesToFilter = ['typography'];
|
||||
const typographyVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter);
|
||||
|
||||
// Return null if there is only one variation (the default).
|
||||
if (typographyVariations?.length <= 1) {
|
||||
return null;
|
||||
}
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
|
||||
spacing: 3,
|
||||
children: [title && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
|
||||
level: 3,
|
||||
children: title
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalGrid, {
|
||||
columns: 3,
|
||||
gap: gap,
|
||||
className: "edit-site-global-styles-style-variations-container",
|
||||
children: typographyVariations.map((variation, index) => {
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Variation, {
|
||||
variation: variation,
|
||||
properties: propertiesToFilter,
|
||||
showTooltip: true,
|
||||
children: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(preview_typography, {
|
||||
variation: variation
|
||||
})
|
||||
}, index);
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-sizes/font-sizes-count.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
@ -13696,245 +14028,6 @@ function FontLibraryProvider({
|
||||
}
|
||||
/* harmony default export */ const context = (FontLibraryProvider);
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js
|
||||
/* wp:polyfill */
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
const {
|
||||
GlobalStylesContext: use_theme_style_variations_by_property_GlobalStylesContext,
|
||||
areGlobalStyleConfigsEqual
|
||||
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
|
||||
const {
|
||||
mergeBaseAndUserConfigs: use_theme_style_variations_by_property_mergeBaseAndUserConfigs
|
||||
} = unlock(external_wp_editor_namespaceObject.privateApis);
|
||||
|
||||
/**
|
||||
* Removes all instances of properties from an object.
|
||||
*
|
||||
* @param {Object} object The object to remove the properties from.
|
||||
* @param {string[]} properties The properties to remove.
|
||||
* @return {Object} The modified object.
|
||||
*/
|
||||
function removePropertiesFromObject(object, properties) {
|
||||
if (!properties?.length) {
|
||||
return object;
|
||||
}
|
||||
if (typeof object !== 'object' || !object || !Object.keys(object).length) {
|
||||
return object;
|
||||
}
|
||||
for (const key in object) {
|
||||
if (properties.includes(key)) {
|
||||
delete object[key];
|
||||
} else if (typeof object[key] === 'object') {
|
||||
removePropertiesFromObject(object[key], properties);
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether a style variation is empty.
|
||||
*
|
||||
* @param {Object} variation A style variation object.
|
||||
* @param {string} variation.title The title of the variation.
|
||||
* @param {Object} variation.settings The settings of the variation.
|
||||
* @param {Object} variation.styles The styles of the variation.
|
||||
* @return {boolean} Whether the variation is empty.
|
||||
*/
|
||||
function hasThemeVariation({
|
||||
title,
|
||||
settings,
|
||||
styles
|
||||
}) {
|
||||
return title === (0,external_wp_i18n_namespaceObject.__)('Default') ||
|
||||
// Always preserve the default variation.
|
||||
Object.keys(settings).length > 0 || Object.keys(styles).length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the current theme style variations that contain only the specified properties
|
||||
* and merges them with the user config.
|
||||
*
|
||||
* @param {string[]} properties The properties to filter by.
|
||||
* @return {Object[]|*} The merged object.
|
||||
*/
|
||||
function useCurrentMergeThemeStyleVariationsWithUserConfig(properties = []) {
|
||||
const {
|
||||
variationsFromTheme
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const _variationsFromTheme = select(external_wp_coreData_namespaceObject.store).__experimentalGetCurrentThemeGlobalStylesVariations();
|
||||
return {
|
||||
variationsFromTheme: _variationsFromTheme || []
|
||||
};
|
||||
}, []);
|
||||
const {
|
||||
user: userVariation
|
||||
} = (0,external_wp_element_namespaceObject.useContext)(use_theme_style_variations_by_property_GlobalStylesContext);
|
||||
const propertiesAsString = properties.toString();
|
||||
return (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
const clonedUserVariation = structuredClone(userVariation);
|
||||
|
||||
// Get user variation and remove the settings for the given property.
|
||||
const userVariationWithoutProperties = removePropertiesFromObject(clonedUserVariation, properties);
|
||||
userVariationWithoutProperties.title = (0,external_wp_i18n_namespaceObject.__)('Default');
|
||||
const variationsWithPropertiesAndBase = variationsFromTheme.filter(variation => {
|
||||
return isVariationWithProperties(variation, properties);
|
||||
}).map(variation => {
|
||||
return use_theme_style_variations_by_property_mergeBaseAndUserConfigs(userVariationWithoutProperties, variation);
|
||||
});
|
||||
const variationsByProperties = [userVariationWithoutProperties, ...variationsWithPropertiesAndBase];
|
||||
|
||||
/*
|
||||
* Filter out variations with no settings or styles.
|
||||
*/
|
||||
return variationsByProperties?.length ? variationsByProperties.filter(hasThemeVariation) : [];
|
||||
}, [propertiesAsString, userVariation, variationsFromTheme]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new object, with properties specified in `properties` array.,
|
||||
* maintain the original object tree structure.
|
||||
* The function is recursive, so it will perform a deep search for the given properties.
|
||||
* E.g., the function will return `{ a: { b: { c: { test: 1 } } } }` if the properties are `[ 'test' ]`.
|
||||
*
|
||||
* @param {Object} object The object to filter
|
||||
* @param {string[]} properties The properties to filter by
|
||||
* @return {Object} The merged object.
|
||||
*/
|
||||
const filterObjectByProperties = (object, properties) => {
|
||||
if (!object || !properties?.length) {
|
||||
return {};
|
||||
}
|
||||
const newObject = {};
|
||||
Object.keys(object).forEach(key => {
|
||||
if (properties.includes(key)) {
|
||||
newObject[key] = object[key];
|
||||
} else if (typeof object[key] === 'object') {
|
||||
const newFilter = filterObjectByProperties(object[key], properties);
|
||||
if (Object.keys(newFilter).length) {
|
||||
newObject[key] = newFilter;
|
||||
}
|
||||
}
|
||||
});
|
||||
return newObject;
|
||||
};
|
||||
|
||||
/**
|
||||
* Compares a style variation to the same variation filtered by the specified properties.
|
||||
* Returns true if the variation contains only the properties specified.
|
||||
*
|
||||
* @param {Object} variation The variation to compare.
|
||||
* @param {string[]} properties The properties to compare.
|
||||
* @return {boolean} Whether the variation contains only the specified properties.
|
||||
*/
|
||||
function isVariationWithProperties(variation, properties) {
|
||||
const variationWithProperties = filterObjectByProperties(structuredClone(variation), properties);
|
||||
return areGlobalStyleConfigsEqual(variationWithProperties, variation);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/typeset-button.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const {
|
||||
GlobalStylesContext: typeset_button_GlobalStylesContext
|
||||
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
|
||||
const {
|
||||
mergeBaseAndUserConfigs: typeset_button_mergeBaseAndUserConfigs
|
||||
} = unlock(external_wp_editor_namespaceObject.privateApis);
|
||||
function TypesetButton() {
|
||||
const propertiesToFilter = ['typography'];
|
||||
const typographyVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter);
|
||||
const hasTypographyVariations = typographyVariations?.length > 1;
|
||||
const {
|
||||
base,
|
||||
user: userConfig
|
||||
} = (0,external_wp_element_namespaceObject.useContext)(typeset_button_GlobalStylesContext);
|
||||
const config = typeset_button_mergeBaseAndUserConfigs(base, userConfig);
|
||||
const allFontFamilies = getFontFamilies(config);
|
||||
const hasFonts = allFontFamilies.filter(font => font !== null).length > 0;
|
||||
const variations = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
return select(external_wp_coreData_namespaceObject.store).__experimentalGetCurrentThemeGlobalStylesVariations();
|
||||
}, []);
|
||||
const userTypographyConfig = filterObjectByProperties(userConfig, 'typography');
|
||||
const title = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
if (Object.keys(userTypographyConfig).length === 0) {
|
||||
return (0,external_wp_i18n_namespaceObject.__)('Default');
|
||||
}
|
||||
const activeVariation = variations?.find(variation => {
|
||||
return JSON.stringify(filterObjectByProperties(variation, 'typography')) === JSON.stringify(userTypographyConfig);
|
||||
});
|
||||
if (activeVariation) {
|
||||
return activeVariation.title;
|
||||
}
|
||||
return allFontFamilies.map(font => font?.name).join(', ');
|
||||
}, [allFontFamilies, userTypographyConfig, variations]);
|
||||
return hasTypographyVariations && hasFonts && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
|
||||
spacing: 2,
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
|
||||
justify: "space-between",
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
|
||||
level: 3,
|
||||
children: (0,external_wp_i18n_namespaceObject.__)('Typeset')
|
||||
})
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
|
||||
isBordered: true,
|
||||
isSeparated: true,
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationButtonAsItem, {
|
||||
path: "/typography/typeset",
|
||||
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Typeset'),
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
|
||||
direction: "row",
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
|
||||
children: title
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
|
||||
icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_left : chevron_right
|
||||
})]
|
||||
})
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
/* harmony default export */ const typeset_button = (({
|
||||
...props
|
||||
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(context, {
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TypesetButton, {
|
||||
...props
|
||||
})
|
||||
}));
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/font-library-modal/font-demo.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
@ -19377,11 +19470,10 @@ function FontFamilies() {
|
||||
defaultTabId: modalTabOpen
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
|
||||
spacing: 4,
|
||||
children: [themeFonts.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
|
||||
children: [[...themeFonts, ...customFonts].length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
|
||||
level: 3,
|
||||
children: /* translators: Heading for a list of fonts provided by the theme. */
|
||||
(0,external_wp_i18n_namespaceObject._x)('Theme', 'font source')
|
||||
children: (0,external_wp_i18n_namespaceObject.__)('Fonts')
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
|
||||
size: "large",
|
||||
isBordered: true,
|
||||
@ -19390,19 +19482,6 @@ function FontFamilies() {
|
||||
font: font
|
||||
}, font.slug))
|
||||
})]
|
||||
}), customFonts.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
|
||||
level: 3,
|
||||
children: /* translators: Heading for a list of fonts installed by the user. */
|
||||
(0,external_wp_i18n_namespaceObject._x)('Custom', 'font source')
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
|
||||
size: "large",
|
||||
isBordered: true,
|
||||
isSeparated: true,
|
||||
children: customFonts.map(font => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_family_item, {
|
||||
font: font
|
||||
}, font.slug))
|
||||
})]
|
||||
}), !hasFonts && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
|
||||
level: 3,
|
||||
@ -19456,237 +19535,20 @@ function ScreenTypography() {
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
|
||||
title: (0,external_wp_i18n_namespaceObject.__)('Typography'),
|
||||
description: (0,external_wp_i18n_namespaceObject.__)('Typography styles and the application of those styles on site elements.')
|
||||
description: (0,external_wp_i18n_namespaceObject.__)('Available fonts, typographic styles, and the application of those styles.')
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
|
||||
className: "edit-site-global-styles-screen",
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
|
||||
spacing: 7,
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(typeset_button, {}), fontLibraryEnabled && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_families, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(typography_elements, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_sizes_count, {})]
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TypographyVariations, {
|
||||
title: (0,external_wp_i18n_namespaceObject.__)('Typesets')
|
||||
}), fontLibraryEnabled && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_families, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(typography_elements, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_sizes_count, {})]
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
/* harmony default export */ const screen_typography = (ScreenTypography);
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/preview-typography.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
const StylesPreviewTypography = ({
|
||||
variation,
|
||||
isFocused,
|
||||
withHoverView
|
||||
}) => {
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreviewIframe, {
|
||||
label: variation.title,
|
||||
isFocused: isFocused,
|
||||
withHoverView: withHoverView,
|
||||
children: ({
|
||||
ratio,
|
||||
key
|
||||
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
|
||||
spacing: 10 * ratio,
|
||||
justify: "center",
|
||||
style: {
|
||||
height: '100%',
|
||||
overflow: 'hidden'
|
||||
},
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreviewTypography, {
|
||||
variation: variation,
|
||||
fontSize: 85 * ratio
|
||||
})
|
||||
}, key)
|
||||
});
|
||||
};
|
||||
/* harmony default export */ const preview_typography = (StylesPreviewTypography);
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/variations/variation.js
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
const {
|
||||
mergeBaseAndUserConfigs: variation_mergeBaseAndUserConfigs
|
||||
} = unlock(external_wp_editor_namespaceObject.privateApis);
|
||||
const {
|
||||
GlobalStylesContext: variation_GlobalStylesContext,
|
||||
areGlobalStyleConfigsEqual: variation_areGlobalStyleConfigsEqual
|
||||
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
|
||||
function Variation({
|
||||
variation,
|
||||
children,
|
||||
isPill,
|
||||
properties,
|
||||
showTooltip
|
||||
}) {
|
||||
const [isFocused, setIsFocused] = (0,external_wp_element_namespaceObject.useState)(false);
|
||||
const {
|
||||
base,
|
||||
user,
|
||||
setUserConfig
|
||||
} = (0,external_wp_element_namespaceObject.useContext)(variation_GlobalStylesContext);
|
||||
const context = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
let merged = variation_mergeBaseAndUserConfigs(base, variation);
|
||||
if (properties) {
|
||||
merged = filterObjectByProperties(merged, properties);
|
||||
}
|
||||
return {
|
||||
user: variation,
|
||||
base,
|
||||
merged,
|
||||
setUserConfig: () => {}
|
||||
};
|
||||
}, [variation, base, properties]);
|
||||
const selectVariation = () => setUserConfig(variation);
|
||||
const selectOnEnter = event => {
|
||||
if (event.keyCode === external_wp_keycodes_namespaceObject.ENTER) {
|
||||
event.preventDefault();
|
||||
selectVariation();
|
||||
}
|
||||
};
|
||||
const isActive = (0,external_wp_element_namespaceObject.useMemo)(() => variation_areGlobalStyleConfigsEqual(user, variation), [user, variation]);
|
||||
let label = variation?.title;
|
||||
if (variation?.description) {
|
||||
label = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %1$s: variation title. %2$s variation description. */
|
||||
(0,external_wp_i18n_namespaceObject.__)('%1$s (%2$s)'), variation?.title, variation?.description);
|
||||
}
|
||||
const content = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
|
||||
className: dist_clsx('edit-site-global-styles-variations_item', {
|
||||
'is-active': isActive
|
||||
}),
|
||||
role: "button",
|
||||
onClick: selectVariation,
|
||||
onKeyDown: selectOnEnter,
|
||||
tabIndex: "0",
|
||||
"aria-label": label,
|
||||
"aria-current": isActive,
|
||||
onFocus: () => setIsFocused(true),
|
||||
onBlur: () => setIsFocused(false),
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
|
||||
className: dist_clsx('edit-site-global-styles-variations_item-preview', {
|
||||
'is-pill': isPill
|
||||
}),
|
||||
children: children(isFocused)
|
||||
})
|
||||
});
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(variation_GlobalStylesContext.Provider, {
|
||||
value: context,
|
||||
children: showTooltip ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, {
|
||||
text: variation?.title,
|
||||
children: content
|
||||
}) : content
|
||||
});
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/variations/variations-typography.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function TypographyVariations({
|
||||
title,
|
||||
gap = 2
|
||||
}) {
|
||||
const propertiesToFilter = ['typography'];
|
||||
const typographyVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter);
|
||||
|
||||
// Return null if there is only one variation (the default).
|
||||
if (typographyVariations?.length <= 1) {
|
||||
return null;
|
||||
}
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
|
||||
spacing: 3,
|
||||
children: [title && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(subtitle, {
|
||||
level: 3,
|
||||
children: title
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalGrid, {
|
||||
columns: 3,
|
||||
gap: gap,
|
||||
className: "edit-site-global-styles-style-variations-container",
|
||||
children: typographyVariations.map((variation, index) => {
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Variation, {
|
||||
variation: variation,
|
||||
properties: propertiesToFilter,
|
||||
showTooltip: true,
|
||||
children: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(preview_typography, {
|
||||
variation: variation
|
||||
})
|
||||
}, index);
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-typeset.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function ScreenTypeset() {
|
||||
const fontLibraryEnabled = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_editor_namespaceObject.store).getEditorSettings().fontLibraryEnabled, []);
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
|
||||
title: (0,external_wp_i18n_namespaceObject.__)('Typesets'),
|
||||
description: (0,external_wp_i18n_namespaceObject.__)('Fonts and typographic styling applied across the site.')
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
|
||||
className: "edit-site-global-styles-screen",
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
|
||||
spacing: 7,
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TypographyVariations, {}), fontLibraryEnabled && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_families, {})]
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
/* harmony default export */ const screen_typeset = (ScreenTypeset);
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/typography-panel.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
@ -23475,7 +23337,6 @@ function ScreenRevisions() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const SLOT_FILL_NAME = 'GlobalStylesMenu';
|
||||
@ -23720,9 +23581,6 @@ function GlobalStylesUI() {
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
|
||||
path: "/typography/font-sizes/:origin/:slug",
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_size, {})
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
|
||||
path: "/typography/typeset",
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_typeset, {})
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GlobalStylesNavigationScreen, {
|
||||
path: "/typography/text",
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(screen_typography_element, {
|
||||
@ -24517,7 +24375,7 @@ function EditSiteEditor({
|
||||
}),
|
||||
variants: toggleHomeIconVariants,
|
||||
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
|
||||
icon: home_button
|
||||
icon: arrow_up_left
|
||||
})
|
||||
})]
|
||||
})
|
||||
@ -33731,47 +33589,6 @@ const DEFAULT_POST_BASE = {
|
||||
fields: ['title', 'author', 'status'],
|
||||
layout: defaultLayouts[LAYOUT_LIST].layout
|
||||
};
|
||||
function useDefaultViewsWithItemCounts({
|
||||
postType
|
||||
}) {
|
||||
const defaultViews = useDefaultViews({
|
||||
postType
|
||||
});
|
||||
const {
|
||||
records,
|
||||
totalItems
|
||||
} = (0,external_wp_coreData_namespaceObject.useEntityRecords)('postType', postType, {
|
||||
per_page: -1,
|
||||
status: ['any', 'trash']
|
||||
});
|
||||
return (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
if (!defaultViews) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// If there are no records, return the default views with no counts.
|
||||
if (!records) {
|
||||
return defaultViews;
|
||||
}
|
||||
const counts = {
|
||||
drafts: records.filter(record => record.status === 'draft').length,
|
||||
future: records.filter(record => record.status === 'future').length,
|
||||
pending: records.filter(record => record.status === 'pending').length,
|
||||
private: records.filter(record => record.status === 'private').length,
|
||||
published: records.filter(record => record.status === 'publish').length,
|
||||
trash: records.filter(record => record.status === 'trash').length
|
||||
};
|
||||
|
||||
// All items excluding trashed items as per the default "all" status query.
|
||||
counts.all = totalItems ? totalItems - counts.trash : 0;
|
||||
|
||||
// Filter out views with > 0 item counts.
|
||||
return defaultViews.map(_view => {
|
||||
_view.count = counts[_view.slug];
|
||||
return _view;
|
||||
});
|
||||
}, [defaultViews, records, totalItems]);
|
||||
}
|
||||
function useDefaultViews({
|
||||
postType
|
||||
}) {
|
||||
@ -40178,8 +39995,7 @@ function DataViewItem({
|
||||
icon,
|
||||
isActive,
|
||||
isCustom,
|
||||
suffix,
|
||||
navigationItemSuffix
|
||||
suffix
|
||||
}) {
|
||||
const {
|
||||
params: {
|
||||
@ -40205,7 +40021,6 @@ function DataViewItem({
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarNavigationItem, {
|
||||
icon: iconToUse,
|
||||
...linkInfo,
|
||||
suffix: navigationItemSuffix,
|
||||
"aria-current": isActive ? 'true' : undefined,
|
||||
children: title
|
||||
}), suffix]
|
||||
@ -40908,7 +40723,7 @@ function DataViewsSidebarContent() {
|
||||
isCustom = 'false'
|
||||
}
|
||||
} = sidebar_dataviews_useLocation();
|
||||
const defaultViews = useDefaultViewsWithItemCounts({
|
||||
const defaultViews = useDefaultViews({
|
||||
postType
|
||||
});
|
||||
if (!postType) {
|
||||
@ -40922,9 +40737,6 @@ function DataViewsSidebarContent() {
|
||||
slug: dataview.slug,
|
||||
title: dataview.title,
|
||||
icon: dataview.icon,
|
||||
navigationItemSuffix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
|
||||
children: dataview.count
|
||||
}),
|
||||
type: dataview.view.type,
|
||||
isActive: !isCustomBoolean && dataview.slug === activeView,
|
||||
isCustom: false
|
||||
|
2
wp-includes/js/dist/edit-site.min.js
vendored
2
wp-includes/js/dist/edit-site.min.js
vendored
File diff suppressed because one or more lines are too long
185
wp-includes/js/dist/editor.js
vendored
185
wp-includes/js/dist/editor.js
vendored
@ -4413,7 +4413,7 @@ const savePost = (options = {}) => async ({
|
||||
});
|
||||
}
|
||||
const previousRecord = select.getCurrentPost();
|
||||
const edits = {
|
||||
let edits = {
|
||||
id: previousRecord.id,
|
||||
...registry.select(external_wp_coreData_namespaceObject.store).getEntityRecordNonTransientEdits('postType', previousRecord.type, previousRecord.id),
|
||||
content
|
||||
@ -4424,7 +4424,7 @@ const savePost = (options = {}) => async ({
|
||||
});
|
||||
let error = false;
|
||||
try {
|
||||
error = await (0,external_wp_hooks_namespaceObject.applyFilters)('editor.__unstablePreSavePost', Promise.resolve(false), options);
|
||||
edits = await (0,external_wp_hooks_namespaceObject.applyFiltersAsync)('editor.preSavePost', edits, options);
|
||||
} catch (err) {
|
||||
error = err;
|
||||
}
|
||||
@ -4438,10 +4438,21 @@ const savePost = (options = {}) => async ({
|
||||
if (!error) {
|
||||
error = registry.select(external_wp_coreData_namespaceObject.store).getLastEntitySaveError('postType', previousRecord.type, previousRecord.id);
|
||||
}
|
||||
|
||||
// Run the hook with legacy unstable name for backward compatibility
|
||||
if (!error) {
|
||||
await (0,external_wp_hooks_namespaceObject.applyFilters)('editor.__unstableSavePost', Promise.resolve(), options).catch(err => {
|
||||
try {
|
||||
await (0,external_wp_hooks_namespaceObject.applyFilters)('editor.__unstableSavePost', Promise.resolve(), options);
|
||||
} catch (err) {
|
||||
error = err;
|
||||
});
|
||||
}
|
||||
}
|
||||
if (!error) {
|
||||
try {
|
||||
await (0,external_wp_hooks_namespaceObject.doActionAsync)('editor.savePost', options);
|
||||
} catch (err) {
|
||||
error = err;
|
||||
}
|
||||
}
|
||||
dispatch({
|
||||
type: 'REQUEST_POST_UPDATE_FINISH',
|
||||
@ -11563,10 +11574,18 @@ function EntitiesSavedStatesExtensible({
|
||||
className: "entities-saved-states__panel-header",
|
||||
gap: 2,
|
||||
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
|
||||
isBlock: true,
|
||||
as: external_wp_components_namespaceObject.Button,
|
||||
variant: "secondary",
|
||||
size: "compact",
|
||||
onClick: dismissPanel,
|
||||
children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
|
||||
isBlock: true,
|
||||
as: external_wp_components_namespaceObject.Button,
|
||||
ref: saveButtonRef,
|
||||
variant: "primary",
|
||||
size: "compact",
|
||||
disabled: !saveEnabled,
|
||||
accessibleWhenDisabled: true,
|
||||
onClick: () => saveDirtyEntities({
|
||||
@ -11577,12 +11596,6 @@ function EntitiesSavedStatesExtensible({
|
||||
}),
|
||||
className: "editor-entities-saved-states__save-button",
|
||||
children: saveLabel
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
|
||||
isBlock: true,
|
||||
as: external_wp_components_namespaceObject.Button,
|
||||
variant: "secondary",
|
||||
onClick: dismissPanel,
|
||||
children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
|
||||
})]
|
||||
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
|
||||
className: "entities-saved-states__text-prompt",
|
||||
@ -18782,8 +18795,8 @@ function Image({
|
||||
scale: 0
|
||||
},
|
||||
style: {
|
||||
width: '36px',
|
||||
height: '36px',
|
||||
width: '32px',
|
||||
height: '32px',
|
||||
objectFit: 'cover',
|
||||
borderRadius: '2px',
|
||||
cursor: 'pointer'
|
||||
@ -18911,7 +18924,7 @@ function MaybeUploadMediaPanel() {
|
||||
}, block.clientId);
|
||||
})
|
||||
}), isUploading || isAnimating ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
|
||||
__next40pxDefaultSize: true,
|
||||
size: "compact",
|
||||
variant: "primary",
|
||||
onClick: uploadImages,
|
||||
children: (0,external_wp_i18n_namespaceObject.__)('Upload')
|
||||
@ -24565,20 +24578,16 @@ const ExperimentalEditorProvider = with_registry_provider(({
|
||||
const postContext = {};
|
||||
// If it is a template, try to inherit the post type from the slug.
|
||||
if (post.type === 'wp_template') {
|
||||
if (!post.is_custom) {
|
||||
const [kind] = post.slug.split('-');
|
||||
switch (kind) {
|
||||
case 'page':
|
||||
postContext.postType = 'page';
|
||||
break;
|
||||
case 'single':
|
||||
// Infer the post type from the slug.
|
||||
const postTypesSlugs = postTypes?.map(entity => entity.slug) || [];
|
||||
const match = post.slug.match(`^single-(${postTypesSlugs.join('|')})(?:-.+)?$`);
|
||||
if (match) {
|
||||
postContext.postType = match[1];
|
||||
}
|
||||
break;
|
||||
if (post.slug === 'page') {
|
||||
postContext.postType = 'page';
|
||||
} else if (post.slug === 'single') {
|
||||
postContext.postType = 'post';
|
||||
} else if (post.slug.split('-')[0] === 'single') {
|
||||
// If the slug is single-{postType}, infer the post type from the slug.
|
||||
const postTypesSlugs = postTypes?.map(entity => entity.slug) || [];
|
||||
const match = post.slug.match(`^single-(${postTypesSlugs.join('|')})(?:-.+)?$`);
|
||||
if (match) {
|
||||
postContext.postType = match[1];
|
||||
}
|
||||
}
|
||||
} else if (!NON_CONTEXTUAL_POST_TYPES.includes(rootLevelPost.type) || shouldRenderTemplate) {
|
||||
@ -25992,6 +26001,7 @@ const tablet = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ext
|
||||
|
||||
|
||||
|
||||
|
||||
function PreviewDropdown({
|
||||
forceIsAutosaveable,
|
||||
disabled
|
||||
@ -26030,9 +26040,13 @@ function PreviewDropdown({
|
||||
const {
|
||||
__unstableSetEditorMode
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
|
||||
const {
|
||||
resetZoomLevel
|
||||
} = unlock((0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store));
|
||||
const handleDevicePreviewChange = newDeviceType => {
|
||||
setDeviceType(newDeviceType);
|
||||
__unstableSetEditorMode('edit');
|
||||
resetZoomLevel();
|
||||
};
|
||||
const isMobile = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
|
||||
if (isMobile) {
|
||||
@ -26159,6 +26173,7 @@ const square = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ext
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
@ -26166,9 +26181,11 @@ const square = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ext
|
||||
|
||||
const ZoomOutToggle = () => {
|
||||
const {
|
||||
isZoomOut
|
||||
isZoomOut,
|
||||
showIconLabels
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => ({
|
||||
isZoomOut: unlock(select(external_wp_blockEditor_namespaceObject.store)).isZoomOut()
|
||||
isZoomOut: unlock(select(external_wp_blockEditor_namespaceObject.store)).isZoomOut(),
|
||||
showIconLabels: select(external_wp_preferences_namespaceObject.store).get('core', 'showIconLabels')
|
||||
}));
|
||||
const {
|
||||
resetZoomLevel,
|
||||
@ -26188,7 +26205,8 @@ const ZoomOutToggle = () => {
|
||||
icon: library_square,
|
||||
label: (0,external_wp_i18n_namespaceObject.__)('Toggle Zoom Out'),
|
||||
isPressed: isZoomOut,
|
||||
size: "compact"
|
||||
size: "compact",
|
||||
showTooltip: !showIconLabels
|
||||
});
|
||||
};
|
||||
/* harmony default export */ const zoom_out_toggle = (ZoomOutToggle);
|
||||
@ -29938,21 +29956,61 @@ const CONTENT = 'content';
|
||||
*/
|
||||
|
||||
|
||||
function getMetadata(registry, context, registeredFields) {
|
||||
let metaFields = {};
|
||||
const type = registry.select(store_store).getCurrentPostType();
|
||||
|
||||
/**
|
||||
* Gets a list of post meta fields with their values and labels
|
||||
* to be consumed in the needed callbacks.
|
||||
* If the value is not available based on context, like in templates,
|
||||
* it falls back to the default value, label, or key.
|
||||
*
|
||||
* @param {Object} registry The registry context exposed through `useRegistry`.
|
||||
* @param {Object} context The context provided.
|
||||
* @return {Object} List of post meta fields with their value and label.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
* {
|
||||
* field_1_key: {
|
||||
* label: 'Field 1 Label',
|
||||
* value: 'Field 1 Value',
|
||||
* },
|
||||
* field_2_key: {
|
||||
* label: 'Field 2 Label',
|
||||
* value: 'Field 2 Value',
|
||||
* },
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
function getPostMetaFields(registry, context) {
|
||||
const {
|
||||
getEditedEntityRecord
|
||||
} = registry.select(external_wp_coreData_namespaceObject.store);
|
||||
const {
|
||||
getRegisteredPostMeta
|
||||
} = unlock(registry.select(external_wp_coreData_namespaceObject.store));
|
||||
let entityMetaValues;
|
||||
// Try to get the current entity meta values.
|
||||
if (context?.postType && context?.postId) {
|
||||
metaFields = getEditedEntityRecord('postType', context?.postType, context?.postId).meta;
|
||||
} else if (type === 'wp_template') {
|
||||
// Populate the `metaFields` object with the default values.
|
||||
Object.entries(registeredFields || {}).forEach(([key, props]) => {
|
||||
if (props.default) {
|
||||
metaFields[key] = props.default;
|
||||
}
|
||||
});
|
||||
entityMetaValues = getEditedEntityRecord('postType', context?.postType, context?.postId).meta;
|
||||
}
|
||||
const registeredFields = getRegisteredPostMeta(context?.postType);
|
||||
const metaFields = {};
|
||||
Object.entries(registeredFields || {}).forEach(([key, props]) => {
|
||||
// Don't include footnotes or private fields.
|
||||
if (key !== 'footnotes' && key.charAt(0) !== '_') {
|
||||
var _entityMetaValues$key;
|
||||
metaFields[key] = {
|
||||
label: props.title || key,
|
||||
value: // When using the entity value, an empty string IS a valid value.
|
||||
(_entityMetaValues$key = entityMetaValues?.[key]) !== null && _entityMetaValues$key !== void 0 ? _entityMetaValues$key :
|
||||
// When using the default, an empty string IS NOT a valid value.
|
||||
props.default || undefined
|
||||
};
|
||||
}
|
||||
});
|
||||
if (!Object.keys(metaFields || {}).length) {
|
||||
return null;
|
||||
}
|
||||
return metaFields;
|
||||
}
|
||||
@ -29963,17 +30021,17 @@ function getMetadata(registry, context, registeredFields) {
|
||||
context,
|
||||
bindings
|
||||
}) {
|
||||
const {
|
||||
getRegisteredPostMeta
|
||||
} = unlock(registry.select(external_wp_coreData_namespaceObject.store));
|
||||
const registeredFields = getRegisteredPostMeta(context?.postType);
|
||||
const metaFields = getMetadata(registry, context, registeredFields);
|
||||
const metaFields = getPostMetaFields(registry, context);
|
||||
const newValues = {};
|
||||
for (const [attributeName, source] of Object.entries(bindings)) {
|
||||
var _ref, _metaFields$metaKey;
|
||||
var _ref;
|
||||
// Use the value, the field label, or the field key.
|
||||
const metaKey = source.args.key;
|
||||
newValues[attributeName] = (_ref = (_metaFields$metaKey = metaFields?.[metaKey]) !== null && _metaFields$metaKey !== void 0 ? _metaFields$metaKey : registeredFields?.[metaKey]?.title) !== null && _ref !== void 0 ? _ref : metaKey;
|
||||
const fieldKey = source.args.key;
|
||||
const {
|
||||
value: fieldValue,
|
||||
label: fieldLabel
|
||||
} = metaFields?.[fieldKey] || {};
|
||||
newValues[attributeName] = (_ref = fieldValue !== null && fieldValue !== void 0 ? fieldValue : fieldLabel) !== null && _ref !== void 0 ? _ref : fieldKey;
|
||||
}
|
||||
return newValues;
|
||||
},
|
||||
@ -29994,7 +30052,7 @@ function getMetadata(registry, context, registeredFields) {
|
||||
});
|
||||
},
|
||||
canUserEditValue({
|
||||
select,
|
||||
registry,
|
||||
context,
|
||||
args
|
||||
}) {
|
||||
@ -30002,27 +30060,25 @@ function getMetadata(registry, context, registeredFields) {
|
||||
if (context?.query || context?.queryId) {
|
||||
return false;
|
||||
}
|
||||
const postType = context?.postType || select(store_store).getCurrentPostType();
|
||||
const postType = context?.postType || registry.select(store_store).getCurrentPostType();
|
||||
|
||||
// Check that editing is happening in the post editor and not a template.
|
||||
if (postType === 'wp_template') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check that the custom field is not protected and available in the REST API.
|
||||
const fieldValue = getPostMetaFields(registry, context)?.[args.key]?.value;
|
||||
// Empty string or `false` could be a valid value, so we need to check if the field value is undefined.
|
||||
const fieldValue = select(external_wp_coreData_namespaceObject.store).getEntityRecord('postType', postType, context?.postId)?.meta?.[args.key];
|
||||
if (fieldValue === undefined) {
|
||||
return false;
|
||||
}
|
||||
// Check that custom fields metabox is not enabled.
|
||||
const areCustomFieldsEnabled = select(store_store).getEditorSettings().enableCustomFields;
|
||||
const areCustomFieldsEnabled = registry.select(store_store).getEditorSettings().enableCustomFields;
|
||||
if (areCustomFieldsEnabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check that the user has the capability to edit post meta.
|
||||
const canUserEdit = select(external_wp_coreData_namespaceObject.store).canUser('update', {
|
||||
const canUserEdit = registry.select(external_wp_coreData_namespaceObject.store).canUser('update', {
|
||||
kind: 'postType',
|
||||
name: context?.postType,
|
||||
id: context?.postId
|
||||
@ -30036,22 +30092,7 @@ function getMetadata(registry, context, registeredFields) {
|
||||
registry,
|
||||
context
|
||||
}) {
|
||||
const {
|
||||
getRegisteredPostMeta
|
||||
} = unlock(registry.select(external_wp_coreData_namespaceObject.store));
|
||||
const registeredFields = getRegisteredPostMeta(context?.postType);
|
||||
const metaFields = getMetadata(registry, context, registeredFields);
|
||||
if (!metaFields || !Object.keys(metaFields).length) {
|
||||
return null;
|
||||
}
|
||||
return Object.fromEntries(Object.entries(metaFields)
|
||||
// Remove footnotes or private keys from the list of fields.
|
||||
.filter(([key]) => key !== 'footnotes' && key.charAt(0) !== '_')
|
||||
// Return object with label and value.
|
||||
.map(([key, value]) => [key, {
|
||||
label: registeredFields?.[key]?.title || key,
|
||||
value
|
||||
}]));
|
||||
return getPostMetaFields(registry, context);
|
||||
}
|
||||
});
|
||||
|
||||
|
4
wp-includes/js/dist/editor.min.js
vendored
4
wp-includes/js/dist/editor.min.js
vendored
File diff suppressed because one or more lines are too long
80
wp-includes/js/dist/hooks.js
vendored
80
wp-includes/js/dist/hooks.js
vendored
@ -43,6 +43,7 @@ __webpack_require__.d(__webpack_exports__, {
|
||||
addAction: () => (/* binding */ addAction),
|
||||
addFilter: () => (/* binding */ addFilter),
|
||||
applyFilters: () => (/* binding */ applyFilters),
|
||||
applyFiltersAsync: () => (/* binding */ applyFiltersAsync),
|
||||
createHooks: () => (/* reexport */ build_module_createHooks),
|
||||
currentAction: () => (/* binding */ currentAction),
|
||||
currentFilter: () => (/* binding */ currentFilter),
|
||||
@ -50,6 +51,7 @@ __webpack_require__.d(__webpack_exports__, {
|
||||
didAction: () => (/* binding */ didAction),
|
||||
didFilter: () => (/* binding */ didFilter),
|
||||
doAction: () => (/* binding */ doAction),
|
||||
doActionAsync: () => (/* binding */ doActionAsync),
|
||||
doingAction: () => (/* binding */ doingAction),
|
||||
doingFilter: () => (/* binding */ doingFilter),
|
||||
filters: () => (/* binding */ filters),
|
||||
@ -330,15 +332,15 @@ function createHasHook(hooks, storeKey) {
|
||||
* registered to a hook of the specified type, optionally returning the final
|
||||
* value of the call chain.
|
||||
*
|
||||
* @param {import('.').Hooks} hooks Hooks instance.
|
||||
* @param {import('.').Hooks} hooks Hooks instance.
|
||||
* @param {import('.').StoreKey} storeKey
|
||||
* @param {boolean} [returnFirstArg=false] Whether each hook callback is expected to
|
||||
* return its first argument.
|
||||
* @param {boolean} returnFirstArg Whether each hook callback is expected to return its first argument.
|
||||
* @param {boolean} async Whether the hook callback should be run asynchronously
|
||||
*
|
||||
* @return {(hookName:string, ...args: unknown[]) => undefined|unknown} Function that runs hook callbacks.
|
||||
*/
|
||||
function createRunHook(hooks, storeKey, returnFirstArg = false) {
|
||||
return function runHooks(hookName, ...args) {
|
||||
function createRunHook(hooks, storeKey, returnFirstArg, async) {
|
||||
return function runHook(hookName, ...args) {
|
||||
const hooksStore = hooks[storeKey];
|
||||
if (!hooksStore[hookName]) {
|
||||
hooksStore[hookName] = {
|
||||
@ -358,20 +360,41 @@ function createRunHook(hooks, storeKey, returnFirstArg = false) {
|
||||
name: hookName,
|
||||
currentIndex: 0
|
||||
};
|
||||
hooksStore.__current.push(hookInfo);
|
||||
while (hookInfo.currentIndex < handlers.length) {
|
||||
const handler = handlers[hookInfo.currentIndex];
|
||||
const result = handler.callback.apply(null, args);
|
||||
if (returnFirstArg) {
|
||||
args[0] = result;
|
||||
async function asyncRunner() {
|
||||
try {
|
||||
hooksStore.__current.add(hookInfo);
|
||||
let result = returnFirstArg ? args[0] : undefined;
|
||||
while (hookInfo.currentIndex < handlers.length) {
|
||||
const handler = handlers[hookInfo.currentIndex];
|
||||
result = await handler.callback.apply(null, args);
|
||||
if (returnFirstArg) {
|
||||
args[0] = result;
|
||||
}
|
||||
hookInfo.currentIndex++;
|
||||
}
|
||||
return returnFirstArg ? result : undefined;
|
||||
} finally {
|
||||
hooksStore.__current.delete(hookInfo);
|
||||
}
|
||||
hookInfo.currentIndex++;
|
||||
}
|
||||
hooksStore.__current.pop();
|
||||
if (returnFirstArg) {
|
||||
return args[0];
|
||||
function syncRunner() {
|
||||
try {
|
||||
hooksStore.__current.add(hookInfo);
|
||||
let result = returnFirstArg ? args[0] : undefined;
|
||||
while (hookInfo.currentIndex < handlers.length) {
|
||||
const handler = handlers[hookInfo.currentIndex];
|
||||
result = handler.callback.apply(null, args);
|
||||
if (returnFirstArg) {
|
||||
args[0] = result;
|
||||
}
|
||||
hookInfo.currentIndex++;
|
||||
}
|
||||
return returnFirstArg ? result : undefined;
|
||||
} finally {
|
||||
hooksStore.__current.delete(hookInfo);
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
return (async ? asyncRunner : syncRunner)();
|
||||
};
|
||||
}
|
||||
/* harmony default export */ const build_module_createRunHook = (createRunHook);
|
||||
@ -389,9 +412,10 @@ function createRunHook(hooks, storeKey, returnFirstArg = false) {
|
||||
*/
|
||||
function createCurrentHook(hooks, storeKey) {
|
||||
return function currentHook() {
|
||||
var _hooksStore$__current;
|
||||
var _currentArray$at$name;
|
||||
const hooksStore = hooks[storeKey];
|
||||
return (_hooksStore$__current = hooksStore.__current[hooksStore.__current.length - 1]?.name) !== null && _hooksStore$__current !== void 0 ? _hooksStore$__current : null;
|
||||
const currentArray = Array.from(hooksStore.__current);
|
||||
return (_currentArray$at$name = currentArray.at(-1)?.name) !== null && _currentArray$at$name !== void 0 ? _currentArray$at$name : null;
|
||||
};
|
||||
}
|
||||
/* harmony default export */ const build_module_createCurrentHook = (createCurrentHook);
|
||||
@ -423,11 +447,11 @@ function createDoingHook(hooks, storeKey) {
|
||||
|
||||
// If the hookName was not passed, check for any current hook.
|
||||
if ('undefined' === typeof hookName) {
|
||||
return 'undefined' !== typeof hooksStore.__current[0];
|
||||
return hooksStore.__current.size > 0;
|
||||
}
|
||||
|
||||
// Return the __current hook.
|
||||
return hooksStore.__current[0] ? hookName === hooksStore.__current[0].name : false;
|
||||
// Find if the `hookName` hook is in `__current`.
|
||||
return Array.from(hooksStore.__current).some(hook => hook.name === hookName);
|
||||
};
|
||||
}
|
||||
/* harmony default export */ const build_module_createDoingHook = (createDoingHook);
|
||||
@ -491,11 +515,11 @@ class _Hooks {
|
||||
constructor() {
|
||||
/** @type {import('.').Store} actions */
|
||||
this.actions = Object.create(null);
|
||||
this.actions.__current = [];
|
||||
this.actions.__current = new Set();
|
||||
|
||||
/** @type {import('.').Store} filters */
|
||||
this.filters = Object.create(null);
|
||||
this.filters.__current = [];
|
||||
this.filters.__current = new Set();
|
||||
this.addAction = build_module_createAddHook(this, 'actions');
|
||||
this.addFilter = build_module_createAddHook(this, 'filters');
|
||||
this.removeAction = build_module_createRemoveHook(this, 'actions');
|
||||
@ -504,8 +528,10 @@ class _Hooks {
|
||||
this.hasFilter = build_module_createHasHook(this, 'filters');
|
||||
this.removeAllActions = build_module_createRemoveHook(this, 'actions', true);
|
||||
this.removeAllFilters = build_module_createRemoveHook(this, 'filters', true);
|
||||
this.doAction = build_module_createRunHook(this, 'actions');
|
||||
this.applyFilters = build_module_createRunHook(this, 'filters', true);
|
||||
this.doAction = build_module_createRunHook(this, 'actions', false, false);
|
||||
this.doActionAsync = build_module_createRunHook(this, 'actions', false, true);
|
||||
this.applyFilters = build_module_createRunHook(this, 'filters', true, false);
|
||||
this.applyFiltersAsync = build_module_createRunHook(this, 'filters', true, true);
|
||||
this.currentAction = build_module_createCurrentHook(this, 'actions');
|
||||
this.currentFilter = build_module_createCurrentHook(this, 'filters');
|
||||
this.doingAction = build_module_createDoingHook(this, 'actions');
|
||||
@ -555,7 +581,7 @@ function createHooks() {
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Record<string, Hook> & {__current: Current[]}} Store
|
||||
* @typedef {Record<string, Hook> & {__current: Set<Current>}} Store
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -577,7 +603,9 @@ const {
|
||||
removeAllActions,
|
||||
removeAllFilters,
|
||||
doAction,
|
||||
doActionAsync,
|
||||
applyFilters,
|
||||
applyFiltersAsync,
|
||||
currentAction,
|
||||
currentFilter,
|
||||
doingAction,
|
||||
|
2
wp-includes/js/dist/hooks.min.js
vendored
2
wp-includes/js/dist/hooks.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! This file is auto-generated */
|
||||
(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{actions:()=>S,addAction:()=>m,addFilter:()=>p,applyFilters:()=>k,createHooks:()=>h,currentAction:()=>w,currentFilter:()=>I,defaultHooks:()=>f,didAction:()=>O,didFilter:()=>j,doAction:()=>b,doingAction:()=>x,doingFilter:()=>T,filters:()=>z,hasAction:()=>v,hasFilter:()=>y,removeAction:()=>A,removeAllActions:()=>F,removeAllFilters:()=>g,removeFilter:()=>_});const n=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};const r=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};const o=function(t,e){return function(o,i,s,c=10){const l=t[e];if(!r(o))return;if(!n(i))return;if("function"!=typeof s)return void console.error("The hook callback must be a function.");if("number"!=typeof c)return void console.error("If specified, the hook priority must be a number.");const u={callback:s,priority:c,namespace:i};if(l[o]){const t=l[o].handlers;let e;for(e=t.length;e>0&&!(c>=t[e-1].priority);e--);e===t.length?t[e]=u:t.splice(e,0,u),l.__current.forEach((t=>{t.name===o&&t.currentIndex>=e&&t.currentIndex++}))}else l[o]={handlers:[u],runs:0};"hookAdded"!==o&&t.doAction("hookAdded",o,i,s,c)}};const i=function(t,e,o=!1){return function(i,s){const c=t[e];if(!r(i))return;if(!o&&!n(s))return;if(!c[i])return 0;let l=0;if(o)l=c[i].handlers.length,c[i]={runs:c[i].runs,handlers:[]};else{const t=c[i].handlers;for(let e=t.length-1;e>=0;e--)t[e].namespace===s&&(t.splice(e,1),l++,c.__current.forEach((t=>{t.name===i&&t.currentIndex>=e&&t.currentIndex--})))}return"hookRemoved"!==i&&t.doAction("hookRemoved",i,s),l}};const s=function(t,e){return function(n,r){const o=t[e];return void 0!==r?n in o&&o[n].handlers.some((t=>t.namespace===r)):n in o}};const c=function(t,e,n=!1){return function(r,...o){const i=t[e];i[r]||(i[r]={handlers:[],runs:0}),i[r].runs++;const s=i[r].handlers;if(!s||!s.length)return n?o[0]:void 0;const c={name:r,currentIndex:0};for(i.__current.push(c);c.currentIndex<s.length;){const t=s[c.currentIndex].callback.apply(null,o);n&&(o[0]=t),c.currentIndex++}return i.__current.pop(),n?o[0]:void 0}};const l=function(t,e){return function(){var n;const r=t[e];return null!==(n=r.__current[r.__current.length-1]?.name)&&void 0!==n?n:null}};const u=function(t,e){return function(n){const r=t[e];return void 0===n?void 0!==r.__current[0]:!!r.__current[0]&&n===r.__current[0].name}};const a=function(t,e){return function(n){const o=t[e];if(r(n))return o[n]&&o[n].runs?o[n].runs:0}};class d{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=o(this,"actions"),this.addFilter=o(this,"filters"),this.removeAction=i(this,"actions"),this.removeFilter=i(this,"filters"),this.hasAction=s(this,"actions"),this.hasFilter=s(this,"filters"),this.removeAllActions=i(this,"actions",!0),this.removeAllFilters=i(this,"filters",!0),this.doAction=c(this,"actions"),this.applyFilters=c(this,"filters",!0),this.currentAction=l(this,"actions"),this.currentFilter=l(this,"filters"),this.doingAction=u(this,"actions"),this.doingFilter=u(this,"filters"),this.didAction=a(this,"actions"),this.didFilter=a(this,"filters")}}const h=function(){return new d},f=h(),{addAction:m,addFilter:p,removeAction:A,removeFilter:_,hasAction:v,hasFilter:y,removeAllActions:F,removeAllFilters:g,doAction:b,applyFilters:k,currentAction:w,currentFilter:I,doingAction:x,doingFilter:T,didAction:O,didFilter:j,actions:S,filters:z}=f;(window.wp=window.wp||{}).hooks=e})();
|
||||
(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{actions:()=>P,addAction:()=>A,addFilter:()=>m,applyFilters:()=>w,applyFiltersAsync:()=>I,createHooks:()=>h,currentAction:()=>x,currentFilter:()=>T,defaultHooks:()=>f,didAction:()=>j,didFilter:()=>z,doAction:()=>g,doActionAsync:()=>k,doingAction:()=>O,doingFilter:()=>S,filters:()=>Z,hasAction:()=>_,hasFilter:()=>v,removeAction:()=>p,removeAllActions:()=>F,removeAllFilters:()=>b,removeFilter:()=>y});const n=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};const r=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};const o=function(t,e){return function(o,i,s,c=10){const l=t[e];if(!r(o))return;if(!n(i))return;if("function"!=typeof s)return void console.error("The hook callback must be a function.");if("number"!=typeof c)return void console.error("If specified, the hook priority must be a number.");const a={callback:s,priority:c,namespace:i};if(l[o]){const t=l[o].handlers;let e;for(e=t.length;e>0&&!(c>=t[e-1].priority);e--);e===t.length?t[e]=a:t.splice(e,0,a),l.__current.forEach((t=>{t.name===o&&t.currentIndex>=e&&t.currentIndex++}))}else l[o]={handlers:[a],runs:0};"hookAdded"!==o&&t.doAction("hookAdded",o,i,s,c)}};const i=function(t,e,o=!1){return function(i,s){const c=t[e];if(!r(i))return;if(!o&&!n(s))return;if(!c[i])return 0;let l=0;if(o)l=c[i].handlers.length,c[i]={runs:c[i].runs,handlers:[]};else{const t=c[i].handlers;for(let e=t.length-1;e>=0;e--)t[e].namespace===s&&(t.splice(e,1),l++,c.__current.forEach((t=>{t.name===i&&t.currentIndex>=e&&t.currentIndex--})))}return"hookRemoved"!==i&&t.doAction("hookRemoved",i,s),l}};const s=function(t,e){return function(n,r){const o=t[e];return void 0!==r?n in o&&o[n].handlers.some((t=>t.namespace===r)):n in o}};const c=function(t,e,n,r){return function(o,...i){const s=t[e];s[o]||(s[o]={handlers:[],runs:0}),s[o].runs++;const c=s[o].handlers;if(!c||!c.length)return n?i[0]:void 0;const l={name:o,currentIndex:0};return(r?async function(){try{s.__current.add(l);let t=n?i[0]:void 0;for(;l.currentIndex<c.length;){const e=c[l.currentIndex];t=await e.callback.apply(null,i),n&&(i[0]=t),l.currentIndex++}return n?t:void 0}finally{s.__current.delete(l)}}:function(){try{s.__current.add(l);let t=n?i[0]:void 0;for(;l.currentIndex<c.length;){t=c[l.currentIndex].callback.apply(null,i),n&&(i[0]=t),l.currentIndex++}return n?t:void 0}finally{s.__current.delete(l)}})()}};const l=function(t,e){return function(){var n;const r=t[e],o=Array.from(r.__current);return null!==(n=o.at(-1)?.name)&&void 0!==n?n:null}};const a=function(t,e){return function(n){const r=t[e];return void 0===n?r.__current.size>0:Array.from(r.__current).some((t=>t.name===n))}};const u=function(t,e){return function(n){const o=t[e];if(r(n))return o[n]&&o[n].runs?o[n].runs:0}};class d{constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=o(this,"actions"),this.addFilter=o(this,"filters"),this.removeAction=i(this,"actions"),this.removeFilter=i(this,"filters"),this.hasAction=s(this,"actions"),this.hasFilter=s(this,"filters"),this.removeAllActions=i(this,"actions",!0),this.removeAllFilters=i(this,"filters",!0),this.doAction=c(this,"actions",!1,!1),this.doActionAsync=c(this,"actions",!1,!0),this.applyFilters=c(this,"filters",!0,!1),this.applyFiltersAsync=c(this,"filters",!0,!0),this.currentAction=l(this,"actions"),this.currentFilter=l(this,"filters"),this.doingAction=a(this,"actions"),this.doingFilter=a(this,"filters"),this.didAction=u(this,"actions"),this.didFilter=u(this,"filters")}}const h=function(){return new d},f=h(),{addAction:A,addFilter:m,removeAction:p,removeFilter:y,hasAction:_,hasFilter:v,removeAllActions:F,removeAllFilters:b,doAction:g,doActionAsync:k,applyFilters:w,applyFiltersAsync:I,currentAction:x,currentFilter:T,doingAction:O,doingFilter:S,didAction:j,didFilter:z,actions:P,filters:Z}=f;(window.wp=window.wp||{}).hooks=e})();
|
30
wp-includes/js/dist/rich-text.js
vendored
30
wp-includes/js/dist/rich-text.js
vendored
@ -3057,23 +3057,12 @@ function useBoundaryStyle({
|
||||
/* harmony default export */ const copy_handler = (props => element => {
|
||||
function onCopy(event) {
|
||||
const {
|
||||
record,
|
||||
createRecord,
|
||||
handleChange
|
||||
record
|
||||
} = props.current;
|
||||
const {
|
||||
ownerDocument
|
||||
} = element;
|
||||
const {
|
||||
defaultView
|
||||
} = ownerDocument;
|
||||
const {
|
||||
anchorNode,
|
||||
focusNode,
|
||||
isCollapsed
|
||||
} = defaultView.getSelection();
|
||||
const containsSelection = element.contains(anchorNode) && element.contains(focusNode);
|
||||
if (isCollapsed || !containsSelection) {
|
||||
if (isCollapsed(record.current) || !element.contains(ownerDocument.activeElement)) {
|
||||
return;
|
||||
}
|
||||
const selectedRecord = slice(record.current);
|
||||
@ -3086,7 +3075,7 @@ function useBoundaryStyle({
|
||||
event.clipboardData.setData('rich-text', 'true');
|
||||
event.preventDefault();
|
||||
if (event.type === 'cut') {
|
||||
handleChange(remove_remove(createRecord()));
|
||||
ownerDocument.execCommand('delete');
|
||||
}
|
||||
}
|
||||
const {
|
||||
@ -3458,12 +3447,12 @@ function fixPlaceholderSelection(defaultView) {
|
||||
if (element.contentEditable !== 'true') {
|
||||
return;
|
||||
}
|
||||
const {
|
||||
anchorNode,
|
||||
focusNode
|
||||
} = defaultView.getSelection();
|
||||
const containsSelection = element.contains(anchorNode) && element.contains(focusNode) && ownerDocument.activeElement.contains(element);
|
||||
if (!containsSelection) {
|
||||
|
||||
// Ensure the active element is the rich text element.
|
||||
if (ownerDocument.activeElement !== element) {
|
||||
// If it is not, we can stop listening for selection changes. We
|
||||
// resume listening when the element is focused.
|
||||
ownerDocument.removeEventListener('selectionchange', handleSelectionChange);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3585,7 +3574,6 @@ function fixPlaceholderSelection(defaultView) {
|
||||
element.removeEventListener('compositionstart', onCompositionStart);
|
||||
element.removeEventListener('compositionend', onCompositionEnd);
|
||||
element.removeEventListener('focus', onFocus);
|
||||
ownerDocument.removeEventListener('selectionchange', handleSelectionChange);
|
||||
};
|
||||
});
|
||||
|
||||
|
2
wp-includes/js/dist/rich-text.min.js
vendored
2
wp-includes/js/dist/rich-text.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,38 @@
|
||||
import * as __WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__ from "@wordpress/interactivity";
|
||||
/******/ // The require scope
|
||||
/******/ var __webpack_require__ = {};
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ 317:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = import("@wordpress/a11y");;
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
@ -22,6 +54,8 @@ import * as __WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__ from "
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
||||
(() => {
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
@ -201,8 +235,7 @@ const {
|
||||
url: window.location.href,
|
||||
navigation: {
|
||||
hasStarted: false,
|
||||
hasFinished: false,
|
||||
message: ''
|
||||
hasFinished: false
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
@ -351,27 +384,33 @@ function a11ySpeak(messageKey) {
|
||||
} catch {}
|
||||
} else {
|
||||
// Fallback to localized strings from Interactivity API state.
|
||||
// @todo This block is for Core < 6.7.0. Remove when support is dropped.
|
||||
|
||||
// @ts-expect-error
|
||||
if (state.navigation.texts?.loading) {
|
||||
// @ts-expect-error
|
||||
navigationTexts.loading = state.navigation.texts.loading;
|
||||
}
|
||||
// @ts-expect-error
|
||||
if (state.navigation.texts?.loaded) {
|
||||
// @ts-expect-error
|
||||
navigationTexts.loaded = state.navigation.texts.loaded;
|
||||
}
|
||||
}
|
||||
}
|
||||
const message = navigationTexts[messageKey];
|
||||
if (false) {} else {
|
||||
state.navigation.message =
|
||||
// Announce that the page has been loaded. If the message is the
|
||||
// same, we use a no-break space similar to the @wordpress/a11y
|
||||
// package: https://github.com/WordPress/gutenberg/blob/c395242b8e6ee20f8b06c199e4fc2920d7018af1/packages/a11y/src/filter-message.js#L20-L26
|
||||
message + (state.navigation.message === message ? '\u00A0' : '');
|
||||
}
|
||||
Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 317)).then(({
|
||||
speak
|
||||
}) => speak(message),
|
||||
// Ignore failures to load the a11y module.
|
||||
() => {});
|
||||
}
|
||||
|
||||
// Add click and prefetch to all links.
|
||||
if (false) {}
|
||||
|
||||
})();
|
||||
|
||||
var __webpack_exports__actions = __webpack_exports__.o;
|
||||
var __webpack_exports__state = __webpack_exports__.w;
|
||||
export { __webpack_exports__actions as actions, __webpack_exports__state as state };
|
||||
|
@ -1 +1 @@
|
||||
import*as e from"@wordpress/interactivity";var t={d:(e,o)=>{for(var i in o)t.o(o,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:o[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},o={};t.d(o,{o:()=>P,w:()=>x});const i=(e=>{var o={};return t.d(o,e),o})({getConfig:()=>e.getConfig,privateApis:()=>e.privateApis,store:()=>e.store});var n;const{directivePrefix:a,getRegionRootFragment:r,initialVdom:s,toVdom:d,render:l,parseServerData:c,populateServerData:g,batch:w}=(0,i.privateApis)("I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress."),u=null!==(n=(0,i.getConfig)("core/router").navigationMode)&&void 0!==n?n:"regionBased",h=new Map,m=(new Map,e=>{const t=new URL(e,window.location.href);return t.pathname+t.search}),p=async(e,{vdom:t}={})=>{const o={body:void 0};if("regionBased"===u){const i=`data-${a}-router-region`;e.querySelectorAll(`[${i}]`).forEach((e=>{const n=e.getAttribute(i);o[n]=t?.has(e)?t.get(e):d(e)}))}const i=e.querySelector("title")?.innerText,n=c(e);return{regions:o,head:undefined,title:i,initialData:n}},f=e=>{w((()=>{if("regionBased"===u){g(e.initialData);const t=`data-${a}-router-region`;document.querySelectorAll(`[${t}]`).forEach((o=>{const i=o.getAttribute(t),n=r(o);l(e.regions[i],n)}))}e.title&&(document.title=e.title)}))},v=e=>(window.location.assign(e),new Promise((()=>{})));window.addEventListener("popstate",(async()=>{const e=m(window.location.href),t=h.has(e)&&await h.get(e);t?(f(t),x.url=window.location.href):window.location.reload()})),h.set(m(window.location.href),Promise.resolve(p(document,{vdom:s})));let y="",S=!1;const b={loading:"Loading page, please wait.",loaded:"Page Loaded."},{state:x,actions:P}=(0,i.store)("core/router",{state:{url:window.location.href,navigation:{hasStarted:!1,hasFinished:!1,message:""}},actions:{*navigate(e,t={}){const{clientNavigationDisabled:o}=(0,i.getConfig)();o&&(yield v(e));const n=m(e),{navigation:a}=x,{loadingAnimation:r=!0,screenReaderAnnouncement:s=!0,timeout:d=1e4}=t;y=e,P.prefetch(n,t);const l=new Promise((e=>setTimeout(e,d))),c=setTimeout((()=>{y===e&&(r&&(a.hasStarted=!0,a.hasFinished=!1),s&&A("loading"))}),400),g=yield Promise.race([h.get(n),l]);if(clearTimeout(c),y===e)if(g&&!g.initialData?.config?.["core/router"]?.clientNavigationDisabled){yield f(g),window.history[t.replace?"replaceState":"pushState"]({},"",e),x.url=e,r&&(a.hasStarted=!1,a.hasFinished=!0),s&&A("loaded");const{hash:o}=new URL(e,window.location.href);o&&document.querySelector(o)?.scrollIntoView()}else yield v(e)},prefetch(e,t={}){const{clientNavigationDisabled:o}=(0,i.getConfig)();if(o)return;const n=m(e);!t.force&&h.has(n)||h.set(n,(async(e,{html:t})=>{try{if(!t){const o=await window.fetch(e);if(200!==o.status)return!1;t=await o.text()}const o=(new window.DOMParser).parseFromString(t,"text/html");return p(o)}catch(e){return!1}})(n,{html:t.html}))}}});function A(e){if(!S){S=!0;const e=document.getElementById("wp-script-module-data-@wordpress/interactivity-router")?.textContent;if(e)try{const t=JSON.parse(e);"string"==typeof t?.i18n?.loading&&(b.loading=t.i18n.loading),"string"==typeof t?.i18n?.loaded&&(b.loaded=t.i18n.loaded)}catch{}else x.navigation.texts?.loading&&(b.loading=x.navigation.texts.loading),x.navigation.texts?.loaded&&(b.loaded=x.navigation.texts.loaded)}const t=b[e];x.navigation.message=t+(x.navigation.message===t?" ":"")}var D=o.o,C=o.w;export{D as actions,C as state};
|
||||
import*as e from"@wordpress/interactivity";var t={317:e=>{e.exports=import("@wordpress/a11y")}},o={};function i(e){var n=o[e];if(void 0!==n)return n.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,i),a.exports}i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};(()=>{i.d(n,{o:()=>P,w:()=>S});const t=(e=>{var t={};return i.d(t,e),t})({getConfig:()=>e.getConfig,privateApis:()=>e.privateApis,store:()=>e.store});var o;const{directivePrefix:a,getRegionRootFragment:r,initialVdom:s,toVdom:d,render:l,parseServerData:c,populateServerData:g,batch:p}=(0,t.privateApis)("I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress."),u=null!==(o=(0,t.getConfig)("core/router").navigationMode)&&void 0!==o?o:"regionBased",w=new Map,h=(new Map,e=>{const t=new URL(e,window.location.href);return t.pathname+t.search}),f=async(e,{vdom:t}={})=>{const o={body:void 0};if("regionBased"===u){const i=`data-${a}-router-region`;e.querySelectorAll(`[${i}]`).forEach((e=>{const n=e.getAttribute(i);o[n]=t?.has(e)?t.get(e):d(e)}))}const i=e.querySelector("title")?.innerText,n=c(e);return{regions:o,head:undefined,title:i,initialData:n}},v=e=>{p((()=>{if("regionBased"===u){g(e.initialData);const t=`data-${a}-router-region`;document.querySelectorAll(`[${t}]`).forEach((o=>{const i=o.getAttribute(t),n=r(o);l(e.regions[i],n)}))}e.title&&(document.title=e.title)}))},m=e=>(window.location.assign(e),new Promise((()=>{})));window.addEventListener("popstate",(async()=>{const e=h(window.location.href),t=w.has(e)&&await w.get(e);t?(v(t),S.url=window.location.href):window.location.reload()})),w.set(h(window.location.href),Promise.resolve(f(document,{vdom:s})));let y="",x=!1;const b={loading:"Loading page, please wait.",loaded:"Page Loaded."},{state:S,actions:P}=(0,t.store)("core/router",{state:{url:window.location.href,navigation:{hasStarted:!1,hasFinished:!1}},actions:{*navigate(e,o={}){const{clientNavigationDisabled:i}=(0,t.getConfig)();i&&(yield m(e));const n=h(e),{navigation:a}=S,{loadingAnimation:r=!0,screenReaderAnnouncement:s=!0,timeout:d=1e4}=o;y=e,P.prefetch(n,o);const l=new Promise((e=>setTimeout(e,d))),c=setTimeout((()=>{y===e&&(r&&(a.hasStarted=!0,a.hasFinished=!1),s&&A("loading"))}),400),g=yield Promise.race([w.get(n),l]);if(clearTimeout(c),y===e)if(g&&!g.initialData?.config?.["core/router"]?.clientNavigationDisabled){yield v(g),window.history[o.replace?"replaceState":"pushState"]({},"",e),S.url=e,r&&(a.hasStarted=!1,a.hasFinished=!0),s&&A("loaded");const{hash:t}=new URL(e,window.location.href);t&&document.querySelector(t)?.scrollIntoView()}else yield m(e)},prefetch(e,o={}){const{clientNavigationDisabled:i}=(0,t.getConfig)();if(i)return;const n=h(e);!o.force&&w.has(n)||w.set(n,(async(e,{html:t})=>{try{if(!t){const o=await window.fetch(e);if(200!==o.status)return!1;t=await o.text()}const o=(new window.DOMParser).parseFromString(t,"text/html");return f(o)}catch(e){return!1}})(n,{html:o.html}))}}});function A(e){if(!x){x=!0;const e=document.getElementById("wp-script-module-data-@wordpress/interactivity-router")?.textContent;if(e)try{const t=JSON.parse(e);"string"==typeof t?.i18n?.loading&&(b.loading=t.i18n.loading),"string"==typeof t?.i18n?.loaded&&(b.loaded=t.i18n.loaded)}catch{}else S.navigation.texts?.loading&&(b.loading=S.navigation.texts.loading),S.navigation.texts?.loaded&&(b.loaded=S.navigation.texts.loaded)}const t=b[e];Promise.resolve().then(i.bind(i,317)).then((({speak:e})=>e(t)),(()=>{}))}})();var a=n.o,r=n.w;export{a as actions,r as state};
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-alpha-59118';
|
||||
$wp_version = '6.7-alpha-59119';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user