@wordpress/block-library 9.33.2-next.36001005c.0 → 9.33.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/accordion/block.json +1 -1
- package/build/accordion/edit.js +11 -9
- package/build/accordion/edit.js.map +2 -2
- package/build/accordion-heading/block.json +1 -1
- package/build/accordion-item/block.json +1 -1
- package/build/accordion-panel/block.json +1 -1
- package/build/buttons/transforms.js +1 -0
- package/build/buttons/transforms.js.map +2 -2
- package/build/code/transforms.js +2 -0
- package/build/code/transforms.js.map +2 -2
- package/build/home-link/block.json +2 -1
- package/build/image/view.js +4 -1
- package/build/image/view.js.map +2 -2
- package/build/math/edit.js +1 -0
- package/build/math/edit.js.map +2 -2
- package/build/navigation/edit/menu-inspector-controls.js +1 -1
- package/build/navigation/edit/menu-inspector-controls.js.map +2 -2
- package/build/navigation/menu-items-to-blocks.js +8 -3
- package/build/navigation/menu-items-to-blocks.js.map +2 -2
- package/build/navigation/view.js +2 -2
- package/build/navigation/view.js.map +2 -2
- package/build/navigation-link/edit.js +1 -1
- package/build/navigation-link/edit.js.map +2 -2
- package/build/navigation-link/shared/controls.js +16 -36
- package/build/navigation-link/shared/controls.js.map +2 -2
- package/build/navigation-link/shared/use-entity-binding.js +1 -1
- package/build/navigation-link/shared/use-entity-binding.js.map +2 -2
- package/build/navigation-submenu/edit.js +1 -1
- package/build/navigation-submenu/edit.js.map +2 -2
- package/build/post-date/block.json +1 -1
- package/build/post-date/edit.js +11 -5
- package/build/post-date/edit.js.map +3 -3
- package/build/post-date/variations.js +4 -7
- package/build/post-date/variations.js.map +2 -2
- package/build/post-template/edit.js +13 -1
- package/build/post-template/edit.js.map +2 -2
- package/build/query/index.js +11 -1
- package/build/query/index.js.map +2 -2
- package/build/query/variations.js +16 -11
- package/build/query/variations.js.map +2 -2
- package/build/search/view.js +4 -4
- package/build/search/view.js.map +2 -2
- package/build/terms-query/edit/inspector-controls/index.js +1 -1
- package/build/terms-query/edit/inspector-controls/index.js.map +2 -2
- package/build/terms-query/edit/inspector-controls/inherit-control.js +2 -4
- package/build/terms-query/edit/inspector-controls/inherit-control.js.map +2 -2
- package/build/utils/get-transformed-attributes.js +1 -10
- package/build/utils/get-transformed-attributes.js.map +2 -2
- package/build-module/accordion/block.json +1 -1
- package/build-module/accordion/edit.js +11 -9
- package/build-module/accordion/edit.js.map +2 -2
- package/build-module/accordion-heading/block.json +1 -1
- package/build-module/accordion-item/block.json +1 -1
- package/build-module/accordion-panel/block.json +1 -1
- package/build-module/buttons/transforms.js +1 -0
- package/build-module/buttons/transforms.js.map +2 -2
- package/build-module/code/transforms.js +2 -0
- package/build-module/code/transforms.js.map +2 -2
- package/build-module/home-link/block.json +2 -1
- package/build-module/image/view.js +4 -1
- package/build-module/image/view.js.map +2 -2
- package/build-module/math/edit.js +1 -0
- package/build-module/math/edit.js.map +2 -2
- package/build-module/navigation/edit/menu-inspector-controls.js +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js.map +2 -2
- package/build-module/navigation/menu-items-to-blocks.js +8 -3
- package/build-module/navigation/menu-items-to-blocks.js.map +2 -2
- package/build-module/navigation/view.js +2 -2
- package/build-module/navigation/view.js.map +2 -2
- package/build-module/navigation-link/edit.js +1 -1
- package/build-module/navigation-link/edit.js.map +2 -2
- package/build-module/navigation-link/shared/controls.js +17 -37
- package/build-module/navigation-link/shared/controls.js.map +2 -2
- package/build-module/navigation-link/shared/use-entity-binding.js +1 -1
- package/build-module/navigation-link/shared/use-entity-binding.js.map +2 -2
- package/build-module/navigation-submenu/edit.js +1 -1
- package/build-module/navigation-submenu/edit.js.map +2 -2
- package/build-module/post-date/block.json +1 -1
- package/build-module/post-date/edit.js +11 -5
- package/build-module/post-date/edit.js.map +2 -2
- package/build-module/post-date/variations.js +4 -7
- package/build-module/post-date/variations.js.map +2 -2
- package/build-module/post-template/edit.js +13 -1
- package/build-module/post-template/edit.js.map +2 -2
- package/build-module/query/index.js +11 -1
- package/build-module/query/index.js.map +2 -2
- package/build-module/query/variations.js +16 -11
- package/build-module/query/variations.js.map +2 -2
- package/build-module/search/view.js +4 -4
- package/build-module/search/view.js.map +2 -2
- package/build-module/terms-query/edit/inspector-controls/index.js +1 -1
- package/build-module/terms-query/edit/inspector-controls/index.js.map +2 -2
- package/build-module/terms-query/edit/inspector-controls/inherit-control.js +2 -4
- package/build-module/terms-query/edit/inspector-controls/inherit-control.js.map +2 -2
- package/build-module/utils/get-transformed-attributes.js +1 -10
- package/build-module/utils/get-transformed-attributes.js.map +2 -2
- package/build-style/editor-rtl.css +7 -2
- package/build-style/editor.css +8 -2
- package/build-style/math/editor-rtl.css +49 -0
- package/build-style/math/editor.css +50 -0
- package/build-style/navigation-link/editor-rtl.css +1 -1
- package/build-style/navigation-link/editor.css +1 -1
- package/build-style/video/editor-rtl.css +1 -1
- package/build-style/video/editor.css +1 -1
- package/package.json +37 -37
- package/src/accordion/block.json +1 -1
- package/src/accordion/edit.js +16 -16
- package/src/accordion-heading/block.json +1 -1
- package/src/accordion-item/block.json +1 -1
- package/src/accordion-panel/block.json +1 -1
- package/src/buttons/transforms.js +1 -0
- package/src/code/transforms.js +2 -0
- package/src/editor.scss +1 -0
- package/src/home-link/block.json +2 -1
- package/src/image/index.php +9 -9
- package/src/image/view.js +11 -1
- package/src/math/edit.js +1 -0
- package/src/math/editor.scss +7 -0
- package/src/navigation/edit/menu-inspector-controls.js +1 -1
- package/src/navigation/index.php +7 -7
- package/src/navigation/menu-items-to-blocks.js +12 -2
- package/src/navigation/test/menu-items-to-blocks.js +144 -0
- package/src/navigation/view.js +2 -2
- package/src/navigation-link/edit.js +1 -1
- package/src/navigation-link/editor.scss +1 -1
- package/src/navigation-link/shared/controls.js +18 -58
- package/src/navigation-link/shared/test/controls.js +9 -14
- package/src/navigation-link/shared/use-entity-binding.js +1 -1
- package/src/navigation-submenu/edit.js +1 -1
- package/src/post-date/block.json +1 -1
- package/src/post-date/edit.js +15 -10
- package/src/post-date/variations.js +2 -5
- package/src/post-template/edit.js +13 -1
- package/src/query/index.js +10 -0
- package/src/query/variations.js +17 -11
- package/src/query-pagination-next/index.php +1 -1
- package/src/query-pagination-previous/index.php +1 -1
- package/src/search/index.php +2 -2
- package/src/search/view.js +4 -4
- package/src/term-template/index.php +8 -2
- package/src/terms-query/edit/inspector-controls/index.js +2 -2
- package/src/terms-query/edit/inspector-controls/inherit-control.js +1 -3
- package/src/utils/get-transformed-attributes.js +5 -16
- package/src/video/editor.scss +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/get-transformed-attributes.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { getBlockType, hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Transform block support attributes and metadata during block transforms.\n *\n * @param {Object} attributes Original attributes from the block being transformed.\n * @param {string} newBlockName Name of the target block after transformation.\n * @param {Function} bindingsCallback Optional callback to transform the `bindings` property object.\n * @return {Object} New attributes object with preserved block support attributes and metadata.\n */\nexport function getTransformedAttributes(\n\tattributes,\n\tnewBlockName,\n\tbindingsCallback = null\n) {\n\tif ( ! attributes ) {\n\t\treturn undefined;\n\t}\n\n\tconst newBlockType = getBlockType( newBlockName );\n\tif ( ! newBlockType ) {\n\t\treturn undefined;\n\t}\n\n\tconst transformedAttributes = {};\n\n\t// Handle attributes derived from block support.\n\tif (\n\t\thasBlockSupport( newBlockType, 'allowedBlocks' ) &&\n\t\tattributes.allowedBlocks\n\t) {\n\t\ttransformedAttributes.allowedBlocks = attributes.allowedBlocks;\n\t}\n\tif ( hasBlockSupport( newBlockType, 'anchor' ) && attributes.anchor ) {\n\t\ttransformedAttributes.anchor = attributes.anchor;\n\t}\n\tif (\n\t\thasBlockSupport( newBlockType, 'ariaLabel' ) &&\n\t\tattributes.ariaLabel\n\t) {\n\t\ttransformedAttributes.ariaLabel = attributes.ariaLabel;\n\t}\n\
|
|
5
|
-
"mappings": "AAGA,SAAS,cAAc,uBAAuB;AAUvC,SAAS,yBACf,YACA,cACA,mBAAmB,MAClB;AACD,MAAK,CAAE,YAAa;AACnB,WAAO;AAAA,EACR;AAEA,QAAM,eAAe,aAAc,YAAa;AAChD,MAAK,CAAE,cAAe;AACrB,WAAO;AAAA,EACR;AAEA,QAAM,wBAAwB,CAAC;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { getBlockType, hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Transform block support attributes and metadata during block transforms.\n *\n * @param {Object} attributes Original attributes from the block being transformed.\n * @param {string} newBlockName Name of the target block after transformation.\n * @param {Function} bindingsCallback Optional callback to transform the `bindings` property object.\n * @return {Object} New attributes object with preserved block support attributes and metadata.\n */\nexport function getTransformedAttributes(\n\tattributes,\n\tnewBlockName,\n\tbindingsCallback = null\n) {\n\tif ( ! attributes ) {\n\t\treturn undefined;\n\t}\n\n\tconst newBlockType = getBlockType( newBlockName );\n\tif ( ! newBlockType ) {\n\t\treturn undefined;\n\t}\n\n\tconst transformedAttributes = {};\n\n\t// Handle attributes derived from block support. The custom class name\n\t// attribute is handled in the `core/customClassName/addTransforms` hook.\n\tif (\n\t\thasBlockSupport( newBlockType, 'allowedBlocks' ) &&\n\t\tattributes.allowedBlocks\n\t) {\n\t\ttransformedAttributes.allowedBlocks = attributes.allowedBlocks;\n\t}\n\tif ( hasBlockSupport( newBlockType, 'anchor' ) && attributes.anchor ) {\n\t\ttransformedAttributes.anchor = attributes.anchor;\n\t}\n\tif (\n\t\thasBlockSupport( newBlockType, 'ariaLabel' ) &&\n\t\tattributes.ariaLabel\n\t) {\n\t\ttransformedAttributes.ariaLabel = attributes.ariaLabel;\n\t}\n\n\t// Handle metadata transformation.\n\tif ( attributes.metadata ) {\n\t\t// The metadata properties that should be preserved after the transform.\n\t\t// The noteId, name, and blockVisibility properties are separately handled\n\t\t// in the `core/metadata/addTransforms` hook.\n\t\tconst transformedMetadata = [];\n\n\t\t// If there is a transform bindings callback, add the `id` and `bindings` properties.\n\t\tif ( bindingsCallback ) {\n\t\t\ttransformedMetadata.push( 'id', 'bindings' );\n\t\t}\n\n\t\t// Only process metadata if there are supported properties.\n\t\tif ( transformedMetadata.length > 0 ) {\n\t\t\tconst newMetadata = Object.entries( attributes.metadata ).reduce(\n\t\t\t\t( obj, [ prop, value ] ) => {\n\t\t\t\t\t// If prop is not supported, don't add it to the new metadata object.\n\t\t\t\t\tif ( ! transformedMetadata.includes( prop ) ) {\n\t\t\t\t\t\treturn obj;\n\t\t\t\t\t}\n\t\t\t\t\tobj[ prop ] =\n\t\t\t\t\t\tprop === 'bindings' ? bindingsCallback( value ) : value;\n\t\t\t\t\treturn obj;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t);\n\n\t\t\t// Only add metadata if object is not empty.\n\t\t\tif ( Object.keys( newMetadata ).length > 0 ) {\n\t\t\t\ttransformedAttributes.metadata = newMetadata;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( Object.keys( transformedAttributes ).length === 0 ) {\n\t\treturn undefined;\n\t}\n\n\treturn transformedAttributes;\n}\n"],
|
|
5
|
+
"mappings": "AAGA,SAAS,cAAc,uBAAuB;AAUvC,SAAS,yBACf,YACA,cACA,mBAAmB,MAClB;AACD,MAAK,CAAE,YAAa;AACnB,WAAO;AAAA,EACR;AAEA,QAAM,eAAe,aAAc,YAAa;AAChD,MAAK,CAAE,cAAe;AACrB,WAAO;AAAA,EACR;AAEA,QAAM,wBAAwB,CAAC;AAI/B,MACC,gBAAiB,cAAc,eAAgB,KAC/C,WAAW,eACV;AACD,0BAAsB,gBAAgB,WAAW;AAAA,EAClD;AACA,MAAK,gBAAiB,cAAc,QAAS,KAAK,WAAW,QAAS;AACrE,0BAAsB,SAAS,WAAW;AAAA,EAC3C;AACA,MACC,gBAAiB,cAAc,WAAY,KAC3C,WAAW,WACV;AACD,0BAAsB,YAAY,WAAW;AAAA,EAC9C;AAGA,MAAK,WAAW,UAAW;AAI1B,UAAM,sBAAsB,CAAC;AAG7B,QAAK,kBAAmB;AACvB,0BAAoB,KAAM,MAAM,UAAW;AAAA,IAC5C;AAGA,QAAK,oBAAoB,SAAS,GAAI;AACrC,YAAM,cAAc,OAAO,QAAS,WAAW,QAAS,EAAE;AAAA,QACzD,CAAE,KAAK,CAAE,MAAM,KAAM,MAAO;AAE3B,cAAK,CAAE,oBAAoB,SAAU,IAAK,GAAI;AAC7C,mBAAO;AAAA,UACR;AACA,cAAK,IAAK,IACT,SAAS,aAAa,iBAAkB,KAAM,IAAI;AACnD,iBAAO;AAAA,QACR;AAAA,QACA,CAAC;AAAA,MACF;AAGA,UAAK,OAAO,KAAM,WAAY,EAAE,SAAS,GAAI;AAC5C,8BAAsB,WAAW;AAAA,MAClC;AAAA,IACD;AAAA,EACD;AAEA,MAAK,OAAO,KAAM,qBAAsB,EAAE,WAAW,GAAI;AACxD,WAAO;AAAA,EACR;AAEA,SAAO;AACR;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1284,6 +1284,11 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
1284
1284
|
padding-right: 0;
|
|
1285
1285
|
}
|
|
1286
1286
|
|
|
1287
|
+
.wp-block-math__textarea-control textarea {
|
|
1288
|
+
font-family: Menlo, Consolas, monaco, monospace;
|
|
1289
|
+
direction: ltr;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1287
1292
|
.wp-block-media-text__media {
|
|
1288
1293
|
position: relative;
|
|
1289
1294
|
}
|
|
@@ -1950,7 +1955,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
1950
1955
|
.link-control-transform__subheading {
|
|
1951
1956
|
font-size: 11px;
|
|
1952
1957
|
text-transform: uppercase;
|
|
1953
|
-
font-weight:
|
|
1958
|
+
font-weight: 500;
|
|
1954
1959
|
color: #1e1e1e;
|
|
1955
1960
|
margin-bottom: 1.5em;
|
|
1956
1961
|
}
|
|
@@ -2597,7 +2602,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2597
2602
|
color: #757575;
|
|
2598
2603
|
text-transform: uppercase;
|
|
2599
2604
|
font-size: 11px;
|
|
2600
|
-
font-weight:
|
|
2605
|
+
font-weight: 500;
|
|
2601
2606
|
display: block;
|
|
2602
2607
|
}
|
|
2603
2608
|
|
package/build-style/editor.css
CHANGED
|
@@ -1291,6 +1291,12 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
1291
1291
|
padding-left: 0;
|
|
1292
1292
|
}
|
|
1293
1293
|
|
|
1294
|
+
.wp-block-math__textarea-control textarea {
|
|
1295
|
+
font-family: Menlo, Consolas, monaco, monospace;
|
|
1296
|
+
/*rtl:ignore*/
|
|
1297
|
+
direction: ltr;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1294
1300
|
.wp-block-media-text__media {
|
|
1295
1301
|
position: relative;
|
|
1296
1302
|
}
|
|
@@ -1957,7 +1963,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
1957
1963
|
.link-control-transform__subheading {
|
|
1958
1964
|
font-size: 11px;
|
|
1959
1965
|
text-transform: uppercase;
|
|
1960
|
-
font-weight:
|
|
1966
|
+
font-weight: 500;
|
|
1961
1967
|
color: #1e1e1e;
|
|
1962
1968
|
margin-bottom: 1.5em;
|
|
1963
1969
|
}
|
|
@@ -2604,7 +2610,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2604
2610
|
color: #757575;
|
|
2605
2611
|
text-transform: uppercase;
|
|
2606
2612
|
font-size: 11px;
|
|
2607
|
-
font-weight:
|
|
2613
|
+
font-weight: 500;
|
|
2608
2614
|
display: block;
|
|
2609
2615
|
}
|
|
2610
2616
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SCSS Variables.
|
|
3
|
+
*
|
|
4
|
+
* Please use variables from this sheet to ensure consistency across the UI.
|
|
5
|
+
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
6
|
+
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Colors
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Fonts & basic variables.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Typography
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Grid System.
|
|
19
|
+
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Radius scale.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Elevation scale.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Dimensions.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Mobile specific styles
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Editor styles.
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* Block & Editor UI.
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Block paddings.
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* React Native specific.
|
|
44
|
+
* These variables do not appear to be used anywhere else.
|
|
45
|
+
*/
|
|
46
|
+
.wp-block-math__textarea-control textarea {
|
|
47
|
+
font-family: Menlo, Consolas, monaco, monospace;
|
|
48
|
+
direction: ltr;
|
|
49
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SCSS Variables.
|
|
3
|
+
*
|
|
4
|
+
* Please use variables from this sheet to ensure consistency across the UI.
|
|
5
|
+
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
6
|
+
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Colors
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Fonts & basic variables.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Typography
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Grid System.
|
|
19
|
+
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Radius scale.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Elevation scale.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Dimensions.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Mobile specific styles
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Editor styles.
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* Block & Editor UI.
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Block paddings.
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* React Native specific.
|
|
44
|
+
* These variables do not appear to be used anywhere else.
|
|
45
|
+
*/
|
|
46
|
+
.wp-block-math__textarea-control textarea {
|
|
47
|
+
font-family: Menlo, Consolas, monaco, monospace;
|
|
48
|
+
/*rtl:ignore*/
|
|
49
|
+
direction: ltr;
|
|
50
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.33.2
|
|
3
|
+
"version": "9.33.2",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -81,41 +81,41 @@
|
|
|
81
81
|
"{src,build,build-module}/*/init.js"
|
|
82
82
|
],
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@wordpress/a11y": "^4.33.1
|
|
85
|
-
"@wordpress/api-fetch": "^7.33.1
|
|
86
|
-
"@wordpress/autop": "^4.33.1
|
|
87
|
-
"@wordpress/base-styles": "^6.
|
|
88
|
-
"@wordpress/blob": "^4.33.1
|
|
89
|
-
"@wordpress/block-editor": "^15.6.1
|
|
90
|
-
"@wordpress/blocks": "^15.6.1
|
|
91
|
-
"@wordpress/components": "^30.
|
|
92
|
-
"@wordpress/compose": "^7.33.1
|
|
93
|
-
"@wordpress/core-data": "^7.33.1
|
|
94
|
-
"@wordpress/data": "^10.33.1
|
|
95
|
-
"@wordpress/date": "^5.33.1
|
|
96
|
-
"@wordpress/deprecated": "^4.33.1
|
|
97
|
-
"@wordpress/dom": "^4.33.1
|
|
98
|
-
"@wordpress/element": "^6.33.1
|
|
99
|
-
"@wordpress/escape-html": "^3.33.1
|
|
100
|
-
"@wordpress/hooks": "^4.33.1
|
|
101
|
-
"@wordpress/html-entities": "^4.33.1
|
|
102
|
-
"@wordpress/i18n": "^6.6.1
|
|
103
|
-
"@wordpress/icons": "^11.0.1
|
|
104
|
-
"@wordpress/interactivity": "^6.33.1
|
|
105
|
-
"@wordpress/interactivity-router": "^2.33.1
|
|
106
|
-
"@wordpress/keyboard-shortcuts": "^5.33.1
|
|
107
|
-
"@wordpress/keycodes": "^4.33.1
|
|
108
|
-
"@wordpress/latex-to-mathml": "^1.1.1
|
|
109
|
-
"@wordpress/notices": "^5.33.1
|
|
110
|
-
"@wordpress/patterns": "^2.33.1
|
|
111
|
-
"@wordpress/primitives": "^4.33.1
|
|
112
|
-
"@wordpress/private-apis": "^1.33.1
|
|
113
|
-
"@wordpress/reusable-blocks": "^5.33.1
|
|
114
|
-
"@wordpress/rich-text": "^7.33.1
|
|
115
|
-
"@wordpress/server-side-render": "^6.9.1
|
|
116
|
-
"@wordpress/url": "^4.33.1
|
|
117
|
-
"@wordpress/viewport": "^6.33.1
|
|
118
|
-
"@wordpress/wordcount": "^4.33.1
|
|
84
|
+
"@wordpress/a11y": "^4.33.1",
|
|
85
|
+
"@wordpress/api-fetch": "^7.33.1",
|
|
86
|
+
"@wordpress/autop": "^4.33.1",
|
|
87
|
+
"@wordpress/base-styles": "^6.9.1",
|
|
88
|
+
"@wordpress/blob": "^4.33.1",
|
|
89
|
+
"@wordpress/block-editor": "^15.6.1",
|
|
90
|
+
"@wordpress/blocks": "^15.6.1",
|
|
91
|
+
"@wordpress/components": "^30.6.1",
|
|
92
|
+
"@wordpress/compose": "^7.33.1",
|
|
93
|
+
"@wordpress/core-data": "^7.33.1",
|
|
94
|
+
"@wordpress/data": "^10.33.1",
|
|
95
|
+
"@wordpress/date": "^5.33.1",
|
|
96
|
+
"@wordpress/deprecated": "^4.33.1",
|
|
97
|
+
"@wordpress/dom": "^4.33.1",
|
|
98
|
+
"@wordpress/element": "^6.33.1",
|
|
99
|
+
"@wordpress/escape-html": "^3.33.1",
|
|
100
|
+
"@wordpress/hooks": "^4.33.1",
|
|
101
|
+
"@wordpress/html-entities": "^4.33.1",
|
|
102
|
+
"@wordpress/i18n": "^6.6.1",
|
|
103
|
+
"@wordpress/icons": "^11.0.1",
|
|
104
|
+
"@wordpress/interactivity": "^6.33.1",
|
|
105
|
+
"@wordpress/interactivity-router": "^2.33.1",
|
|
106
|
+
"@wordpress/keyboard-shortcuts": "^5.33.1",
|
|
107
|
+
"@wordpress/keycodes": "^4.33.1",
|
|
108
|
+
"@wordpress/latex-to-mathml": "^1.1.1",
|
|
109
|
+
"@wordpress/notices": "^5.33.1",
|
|
110
|
+
"@wordpress/patterns": "^2.33.1",
|
|
111
|
+
"@wordpress/primitives": "^4.33.1",
|
|
112
|
+
"@wordpress/private-apis": "^1.33.1",
|
|
113
|
+
"@wordpress/reusable-blocks": "^5.33.1",
|
|
114
|
+
"@wordpress/rich-text": "^7.33.1",
|
|
115
|
+
"@wordpress/server-side-render": "^6.9.1",
|
|
116
|
+
"@wordpress/url": "^4.33.1",
|
|
117
|
+
"@wordpress/viewport": "^6.33.1",
|
|
118
|
+
"@wordpress/wordcount": "^4.33.1",
|
|
119
119
|
"change-case": "^4.1.2",
|
|
120
120
|
"clsx": "^2.1.1",
|
|
121
121
|
"colord": "^2.7.0",
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
"publishConfig": {
|
|
134
134
|
"access": "public"
|
|
135
135
|
},
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "5f84bafdec1bed05247c1080c12f6a237951b862"
|
|
137
137
|
}
|
package/src/accordion/block.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "core/accordion",
|
|
5
5
|
"title": "Accordion",
|
|
6
6
|
"category": "design",
|
|
7
|
-
"description": "Displays a
|
|
7
|
+
"description": "Displays a foldable layout that groups content in collapsible sections.",
|
|
8
8
|
"example": {},
|
|
9
9
|
"supports": {
|
|
10
10
|
"anchor": true,
|
package/src/accordion/edit.js
CHANGED
|
@@ -102,22 +102,22 @@ export default function Edit( {
|
|
|
102
102
|
return (
|
|
103
103
|
<>
|
|
104
104
|
{ isSingleSelected && ! isContentOnlyMode && (
|
|
105
|
-
|
|
106
|
-
<
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
</
|
|
120
|
-
|
|
105
|
+
<>
|
|
106
|
+
<BlockControls>
|
|
107
|
+
<ToolbarGroup>
|
|
108
|
+
<HeadingLevelDropdown
|
|
109
|
+
value={ headingLevel }
|
|
110
|
+
options={ levelOptions }
|
|
111
|
+
onChange={ updateHeadingLevel }
|
|
112
|
+
/>
|
|
113
|
+
</ToolbarGroup>
|
|
114
|
+
</BlockControls>
|
|
115
|
+
<BlockControls group="other">
|
|
116
|
+
<ToolbarButton onClick={ addAccordionItemBlock }>
|
|
117
|
+
{ __( 'Add' ) }
|
|
118
|
+
</ToolbarButton>
|
|
119
|
+
</BlockControls>
|
|
120
|
+
</>
|
|
121
121
|
) }
|
|
122
122
|
<InspectorControls key="setting">
|
|
123
123
|
<ToolsPanel
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "core/accordion-heading",
|
|
5
5
|
"title": "Accordion Heading",
|
|
6
6
|
"category": "design",
|
|
7
|
-
"description": "
|
|
7
|
+
"description": "Toggles the accordion panel.",
|
|
8
8
|
"parent": [ "core/accordion-item" ],
|
|
9
9
|
"usesContext": [
|
|
10
10
|
"core/accordion-icon-position",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "core/accordion-item",
|
|
5
5
|
"title": "Accordion Item",
|
|
6
6
|
"category": "design",
|
|
7
|
-
"description": "
|
|
7
|
+
"description": "Wraps the heading and panel in one unit.",
|
|
8
8
|
"parent": [ "core/accordion" ],
|
|
9
9
|
"allowedBlocks": [ "core/accordion-heading", "core/accordion-panel" ],
|
|
10
10
|
"supports": {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "core/accordion-panel",
|
|
5
5
|
"title": "Accordion Panel",
|
|
6
6
|
"category": "design",
|
|
7
|
-
"description": "
|
|
7
|
+
"description": "Contains the hidden or revealed content beneath the heading.",
|
|
8
8
|
"parent": [ "core/accordion-item" ],
|
|
9
9
|
"supports": {
|
|
10
10
|
"html": false,
|
package/src/code/transforms.js
CHANGED
|
@@ -22,6 +22,7 @@ const transforms = {
|
|
|
22
22
|
transform: ( attributes ) => {
|
|
23
23
|
const { content } = attributes;
|
|
24
24
|
return createBlock( 'core/code', {
|
|
25
|
+
...attributes,
|
|
25
26
|
...getTransformedAttributes( attributes, 'core/code' ),
|
|
26
27
|
content,
|
|
27
28
|
} );
|
|
@@ -33,6 +34,7 @@ const transforms = {
|
|
|
33
34
|
transform: ( attributes ) => {
|
|
34
35
|
const { content: text } = attributes;
|
|
35
36
|
return createBlock( 'core/code', {
|
|
37
|
+
...attributes,
|
|
36
38
|
...getTransformedAttributes( attributes, 'core/code' ),
|
|
37
39
|
// The HTML is plain text (with plain line breaks), so
|
|
38
40
|
// convert it to rich text.
|
package/src/editor.scss
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
@use "./html/editor.scss" as *;
|
|
25
25
|
@use "./image/editor.scss" as *;
|
|
26
26
|
@use "./latest-posts/editor.scss" as *;
|
|
27
|
+
@use "./math/editor.scss" as *;
|
|
27
28
|
@use "./media-text/editor.scss" as *;
|
|
28
29
|
@use "./more/editor.scss" as *;
|
|
29
30
|
@use "./navigation/editor.scss" as *;
|
package/src/home-link/block.json
CHANGED
package/src/image/index.php
CHANGED
|
@@ -250,12 +250,12 @@ function block_core_image_render_lightbox( $block_content, $block ) {
|
|
|
250
250
|
// Image.
|
|
251
251
|
$processor->next_tag( 'img' );
|
|
252
252
|
$processor->set_attribute( 'data-wp-init', 'callbacks.setButtonStyles' );
|
|
253
|
-
$processor->set_attribute( 'data-wp-on
|
|
254
|
-
$processor->set_attribute( 'data-wp-on-
|
|
253
|
+
$processor->set_attribute( 'data-wp-on--load', 'callbacks.setButtonStyles' );
|
|
254
|
+
$processor->set_attribute( 'data-wp-on-window--resize', 'callbacks.setButtonStyles' );
|
|
255
255
|
// Sets an event callback on the `img` because the `figure` element can also
|
|
256
256
|
// contain a caption, and we don't want to trigger the lightbox when the
|
|
257
257
|
// caption is clicked.
|
|
258
|
-
$processor->set_attribute( 'data-wp-on
|
|
258
|
+
$processor->set_attribute( 'data-wp-on--click', 'actions.showLightbox' );
|
|
259
259
|
$processor->set_attribute( 'data-wp-class--hide', 'state.isContentHidden' );
|
|
260
260
|
$processor->set_attribute( 'data-wp-class--show', 'state.isContentVisible' );
|
|
261
261
|
|
|
@@ -273,7 +273,7 @@ function block_core_image_render_lightbox( $block_content, $block ) {
|
|
|
273
273
|
aria-haspopup="dialog"
|
|
274
274
|
aria-label="' . esc_attr( $aria_label ) . '"
|
|
275
275
|
data-wp-init="callbacks.initTriggerButton"
|
|
276
|
-
data-wp-on
|
|
276
|
+
data-wp-on--click="actions.showLightbox"
|
|
277
277
|
data-wp-style--right="state.imageButtonRight"
|
|
278
278
|
data-wp-style--top="state.imageButtonTop"
|
|
279
279
|
>
|
|
@@ -324,12 +324,12 @@ function block_core_image_print_lightbox_overlay() {
|
|
|
324
324
|
data-wp-class--show-closing-animation="state.overlayOpened"
|
|
325
325
|
data-wp-watch="callbacks.setOverlayFocus"
|
|
326
326
|
data-wp-on--keydown="actions.handleKeydown"
|
|
327
|
-
data-wp-on
|
|
327
|
+
data-wp-on--touchstart="actions.handleTouchStart"
|
|
328
328
|
data-wp-on--touchmove="actions.handleTouchMove"
|
|
329
|
-
data-wp-on
|
|
330
|
-
data-wp-on
|
|
331
|
-
data-wp-on-
|
|
332
|
-
data-wp-on-
|
|
329
|
+
data-wp-on--touchend="actions.handleTouchEnd"
|
|
330
|
+
data-wp-on--click="actions.hideLightbox"
|
|
331
|
+
data-wp-on-window--resize="callbacks.setOverlayStyles"
|
|
332
|
+
data-wp-on-window--scroll="actions.handleScroll"
|
|
333
333
|
data-wp-bind--style="state.overlayStyles"
|
|
334
334
|
tabindex="-1"
|
|
335
335
|
>
|
package/src/image/view.js
CHANGED
|
@@ -356,9 +356,19 @@ const { state, actions, callbacks } = store(
|
|
|
356
356
|
`;
|
|
357
357
|
},
|
|
358
358
|
setButtonStyles() {
|
|
359
|
-
const { imageId } = getContext();
|
|
360
359
|
const { ref } = getElement();
|
|
361
360
|
|
|
361
|
+
// This guard prevents errors in images with the `srcset`
|
|
362
|
+
// attribute, which can dispatch `load` events even after DOM
|
|
363
|
+
// removal. Preact doesn't automatically clean up `load` event
|
|
364
|
+
// listeners on unmounted `img` elements (see
|
|
365
|
+
// https://github.com/preactjs/preact/issues/3141).
|
|
366
|
+
if ( ! ref ) {
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
const { imageId } = getContext();
|
|
371
|
+
|
|
362
372
|
state.metadata[ imageId ].imageRef = ref;
|
|
363
373
|
state.metadata[ imageId ].currentSrc = ref.currentSrc;
|
|
364
374
|
|
package/src/math/edit.js
CHANGED
|
@@ -82,6 +82,7 @@ export default function MathEdit( { attributes, setAttributes, isSelected } ) {
|
|
|
82
82
|
label={ __( 'LaTeX math syntax' ) }
|
|
83
83
|
hideLabelFromVision
|
|
84
84
|
value={ latex }
|
|
85
|
+
className="wp-block-math__textarea-control"
|
|
85
86
|
onChange={ ( newLatex ) => {
|
|
86
87
|
if ( ! latexToMathML ) {
|
|
87
88
|
setAttributes( { latex: newLatex } );
|
|
@@ -124,7 +124,7 @@ function AdditionalBlockContent( { block, insertedBlock, setInsertedBlock } ) {
|
|
|
124
124
|
if ( isEntityLink ) {
|
|
125
125
|
createBinding( updatedAttributes );
|
|
126
126
|
} else {
|
|
127
|
-
clearBinding();
|
|
127
|
+
clearBinding( updatedAttributes );
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
setInsertedBlock( null );
|
package/src/navigation/index.php
CHANGED
|
@@ -497,7 +497,7 @@ class WP_Navigation_Block_Renderer {
|
|
|
497
497
|
$close_button_directives = '';
|
|
498
498
|
if ( $is_interactive ) {
|
|
499
499
|
$open_button_directives = '
|
|
500
|
-
data-wp-on
|
|
500
|
+
data-wp-on--click="actions.openMenuOnClick"
|
|
501
501
|
data-wp-on--keydown="actions.handleMenuKeydown"
|
|
502
502
|
';
|
|
503
503
|
$responsive_container_directives = '
|
|
@@ -505,7 +505,7 @@ class WP_Navigation_Block_Renderer {
|
|
|
505
505
|
data-wp-class--is-menu-open="state.isMenuOpen"
|
|
506
506
|
data-wp-watch="callbacks.initMenu"
|
|
507
507
|
data-wp-on--keydown="actions.handleMenuKeydown"
|
|
508
|
-
data-wp-on
|
|
508
|
+
data-wp-on--focusout="actions.handleMenuFocusout"
|
|
509
509
|
tabindex="-1"
|
|
510
510
|
';
|
|
511
511
|
$responsive_dialog_directives = '
|
|
@@ -514,7 +514,7 @@ class WP_Navigation_Block_Renderer {
|
|
|
514
514
|
data-wp-bind--role="state.roleAttribute"
|
|
515
515
|
';
|
|
516
516
|
$close_button_directives = '
|
|
517
|
-
data-wp-on
|
|
517
|
+
data-wp-on--click="actions.closeMenuOnClick"
|
|
518
518
|
';
|
|
519
519
|
$responsive_container_content_directives = '
|
|
520
520
|
data-wp-watch="callbacks.focusFirstElement"
|
|
@@ -830,8 +830,8 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
|
|
|
830
830
|
$tags->set_attribute( 'tabindex', '-1' );
|
|
831
831
|
|
|
832
832
|
if ( ! isset( $block_attributes['openSubmenusOnClick'] ) || false === $block_attributes['openSubmenusOnClick'] ) {
|
|
833
|
-
$tags->set_attribute( 'data-wp-on
|
|
834
|
-
$tags->set_attribute( 'data-wp-on
|
|
833
|
+
$tags->set_attribute( 'data-wp-on--mouseenter', 'actions.openMenuOnHover' );
|
|
834
|
+
$tags->set_attribute( 'data-wp-on--mouseleave', 'actions.closeMenuOnHover' );
|
|
835
835
|
}
|
|
836
836
|
|
|
837
837
|
// Add directives to the toggle submenu button.
|
|
@@ -841,7 +841,7 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
|
|
|
841
841
|
'class_name' => 'wp-block-navigation-submenu__toggle',
|
|
842
842
|
)
|
|
843
843
|
) ) {
|
|
844
|
-
$tags->set_attribute( 'data-wp-on
|
|
844
|
+
$tags->set_attribute( 'data-wp-on--click', 'actions.toggleMenuOnClick' );
|
|
845
845
|
$tags->set_attribute( 'data-wp-bind--aria-expanded', 'state.isMenuOpen' );
|
|
846
846
|
// The `aria-expanded` attribute for SSR is already added in the submenu block.
|
|
847
847
|
}
|
|
@@ -852,7 +852,7 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
|
|
|
852
852
|
'class_name' => 'wp-block-navigation__submenu-container',
|
|
853
853
|
)
|
|
854
854
|
) ) {
|
|
855
|
-
$tags->set_attribute( 'data-wp-on
|
|
855
|
+
$tags->set_attribute( 'data-wp-on--focus', 'actions.openMenuOnFocus' );
|
|
856
856
|
}
|
|
857
857
|
|
|
858
858
|
// Iterate through subitems if exist.
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
import { createBlock, parse } from '@wordpress/blocks';
|
|
5
5
|
import { applyFilters } from '@wordpress/hooks';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Internal dependencies
|
|
9
|
+
*/
|
|
10
|
+
import { buildNavigationLinkEntityBinding } from '../navigation-link/shared/use-entity-binding';
|
|
11
|
+
|
|
7
12
|
/**
|
|
8
13
|
* Convert a flat menu item structure to a nested blocks structure.
|
|
9
14
|
*
|
|
@@ -145,12 +150,14 @@ function menuItemToBlockAttributes(
|
|
|
145
150
|
object = 'tag';
|
|
146
151
|
}
|
|
147
152
|
|
|
153
|
+
const inferredKind = menuItemTypeField?.replace( '_', '-' ) || 'custom';
|
|
154
|
+
|
|
148
155
|
return {
|
|
149
156
|
label: menuItemTitleField?.rendered || '',
|
|
150
157
|
...( object?.length && {
|
|
151
158
|
type: object,
|
|
152
159
|
} ),
|
|
153
|
-
kind:
|
|
160
|
+
kind: inferredKind,
|
|
154
161
|
url: url || '',
|
|
155
162
|
...( xfn?.length &&
|
|
156
163
|
xfn.join( ' ' ).trim() && {
|
|
@@ -165,8 +172,11 @@ function menuItemToBlockAttributes(
|
|
|
165
172
|
title: attr_title,
|
|
166
173
|
} ),
|
|
167
174
|
...( object_id &&
|
|
168
|
-
'
|
|
175
|
+
( inferredKind === 'post-type' || inferredKind === 'taxonomy' ) && {
|
|
169
176
|
id: object_id,
|
|
177
|
+
metadata: {
|
|
178
|
+
bindings: buildNavigationLinkEntityBinding( inferredKind ),
|
|
179
|
+
},
|
|
170
180
|
} ),
|
|
171
181
|
/* eslint-enable camelcase */
|
|
172
182
|
...( description?.length && {
|