@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.
Files changed (144) hide show
  1. package/build/accordion/block.json +1 -1
  2. package/build/accordion/edit.js +11 -9
  3. package/build/accordion/edit.js.map +2 -2
  4. package/build/accordion-heading/block.json +1 -1
  5. package/build/accordion-item/block.json +1 -1
  6. package/build/accordion-panel/block.json +1 -1
  7. package/build/buttons/transforms.js +1 -0
  8. package/build/buttons/transforms.js.map +2 -2
  9. package/build/code/transforms.js +2 -0
  10. package/build/code/transforms.js.map +2 -2
  11. package/build/home-link/block.json +2 -1
  12. package/build/image/view.js +4 -1
  13. package/build/image/view.js.map +2 -2
  14. package/build/math/edit.js +1 -0
  15. package/build/math/edit.js.map +2 -2
  16. package/build/navigation/edit/menu-inspector-controls.js +1 -1
  17. package/build/navigation/edit/menu-inspector-controls.js.map +2 -2
  18. package/build/navigation/menu-items-to-blocks.js +8 -3
  19. package/build/navigation/menu-items-to-blocks.js.map +2 -2
  20. package/build/navigation/view.js +2 -2
  21. package/build/navigation/view.js.map +2 -2
  22. package/build/navigation-link/edit.js +1 -1
  23. package/build/navigation-link/edit.js.map +2 -2
  24. package/build/navigation-link/shared/controls.js +16 -36
  25. package/build/navigation-link/shared/controls.js.map +2 -2
  26. package/build/navigation-link/shared/use-entity-binding.js +1 -1
  27. package/build/navigation-link/shared/use-entity-binding.js.map +2 -2
  28. package/build/navigation-submenu/edit.js +1 -1
  29. package/build/navigation-submenu/edit.js.map +2 -2
  30. package/build/post-date/block.json +1 -1
  31. package/build/post-date/edit.js +11 -5
  32. package/build/post-date/edit.js.map +3 -3
  33. package/build/post-date/variations.js +4 -7
  34. package/build/post-date/variations.js.map +2 -2
  35. package/build/post-template/edit.js +13 -1
  36. package/build/post-template/edit.js.map +2 -2
  37. package/build/query/index.js +11 -1
  38. package/build/query/index.js.map +2 -2
  39. package/build/query/variations.js +16 -11
  40. package/build/query/variations.js.map +2 -2
  41. package/build/search/view.js +4 -4
  42. package/build/search/view.js.map +2 -2
  43. package/build/terms-query/edit/inspector-controls/index.js +1 -1
  44. package/build/terms-query/edit/inspector-controls/index.js.map +2 -2
  45. package/build/terms-query/edit/inspector-controls/inherit-control.js +2 -4
  46. package/build/terms-query/edit/inspector-controls/inherit-control.js.map +2 -2
  47. package/build/utils/get-transformed-attributes.js +1 -10
  48. package/build/utils/get-transformed-attributes.js.map +2 -2
  49. package/build-module/accordion/block.json +1 -1
  50. package/build-module/accordion/edit.js +11 -9
  51. package/build-module/accordion/edit.js.map +2 -2
  52. package/build-module/accordion-heading/block.json +1 -1
  53. package/build-module/accordion-item/block.json +1 -1
  54. package/build-module/accordion-panel/block.json +1 -1
  55. package/build-module/buttons/transforms.js +1 -0
  56. package/build-module/buttons/transforms.js.map +2 -2
  57. package/build-module/code/transforms.js +2 -0
  58. package/build-module/code/transforms.js.map +2 -2
  59. package/build-module/home-link/block.json +2 -1
  60. package/build-module/image/view.js +4 -1
  61. package/build-module/image/view.js.map +2 -2
  62. package/build-module/math/edit.js +1 -0
  63. package/build-module/math/edit.js.map +2 -2
  64. package/build-module/navigation/edit/menu-inspector-controls.js +1 -1
  65. package/build-module/navigation/edit/menu-inspector-controls.js.map +2 -2
  66. package/build-module/navigation/menu-items-to-blocks.js +8 -3
  67. package/build-module/navigation/menu-items-to-blocks.js.map +2 -2
  68. package/build-module/navigation/view.js +2 -2
  69. package/build-module/navigation/view.js.map +2 -2
  70. package/build-module/navigation-link/edit.js +1 -1
  71. package/build-module/navigation-link/edit.js.map +2 -2
  72. package/build-module/navigation-link/shared/controls.js +17 -37
  73. package/build-module/navigation-link/shared/controls.js.map +2 -2
  74. package/build-module/navigation-link/shared/use-entity-binding.js +1 -1
  75. package/build-module/navigation-link/shared/use-entity-binding.js.map +2 -2
  76. package/build-module/navigation-submenu/edit.js +1 -1
  77. package/build-module/navigation-submenu/edit.js.map +2 -2
  78. package/build-module/post-date/block.json +1 -1
  79. package/build-module/post-date/edit.js +11 -5
  80. package/build-module/post-date/edit.js.map +2 -2
  81. package/build-module/post-date/variations.js +4 -7
  82. package/build-module/post-date/variations.js.map +2 -2
  83. package/build-module/post-template/edit.js +13 -1
  84. package/build-module/post-template/edit.js.map +2 -2
  85. package/build-module/query/index.js +11 -1
  86. package/build-module/query/index.js.map +2 -2
  87. package/build-module/query/variations.js +16 -11
  88. package/build-module/query/variations.js.map +2 -2
  89. package/build-module/search/view.js +4 -4
  90. package/build-module/search/view.js.map +2 -2
  91. package/build-module/terms-query/edit/inspector-controls/index.js +1 -1
  92. package/build-module/terms-query/edit/inspector-controls/index.js.map +2 -2
  93. package/build-module/terms-query/edit/inspector-controls/inherit-control.js +2 -4
  94. package/build-module/terms-query/edit/inspector-controls/inherit-control.js.map +2 -2
  95. package/build-module/utils/get-transformed-attributes.js +1 -10
  96. package/build-module/utils/get-transformed-attributes.js.map +2 -2
  97. package/build-style/editor-rtl.css +7 -2
  98. package/build-style/editor.css +8 -2
  99. package/build-style/math/editor-rtl.css +49 -0
  100. package/build-style/math/editor.css +50 -0
  101. package/build-style/navigation-link/editor-rtl.css +1 -1
  102. package/build-style/navigation-link/editor.css +1 -1
  103. package/build-style/video/editor-rtl.css +1 -1
  104. package/build-style/video/editor.css +1 -1
  105. package/package.json +37 -37
  106. package/src/accordion/block.json +1 -1
  107. package/src/accordion/edit.js +16 -16
  108. package/src/accordion-heading/block.json +1 -1
  109. package/src/accordion-item/block.json +1 -1
  110. package/src/accordion-panel/block.json +1 -1
  111. package/src/buttons/transforms.js +1 -0
  112. package/src/code/transforms.js +2 -0
  113. package/src/editor.scss +1 -0
  114. package/src/home-link/block.json +2 -1
  115. package/src/image/index.php +9 -9
  116. package/src/image/view.js +11 -1
  117. package/src/math/edit.js +1 -0
  118. package/src/math/editor.scss +7 -0
  119. package/src/navigation/edit/menu-inspector-controls.js +1 -1
  120. package/src/navigation/index.php +7 -7
  121. package/src/navigation/menu-items-to-blocks.js +12 -2
  122. package/src/navigation/test/menu-items-to-blocks.js +144 -0
  123. package/src/navigation/view.js +2 -2
  124. package/src/navigation-link/edit.js +1 -1
  125. package/src/navigation-link/editor.scss +1 -1
  126. package/src/navigation-link/shared/controls.js +18 -58
  127. package/src/navigation-link/shared/test/controls.js +9 -14
  128. package/src/navigation-link/shared/use-entity-binding.js +1 -1
  129. package/src/navigation-submenu/edit.js +1 -1
  130. package/src/post-date/block.json +1 -1
  131. package/src/post-date/edit.js +15 -10
  132. package/src/post-date/variations.js +2 -5
  133. package/src/post-template/edit.js +13 -1
  134. package/src/query/index.js +10 -0
  135. package/src/query/variations.js +17 -11
  136. package/src/query-pagination-next/index.php +1 -1
  137. package/src/query-pagination-previous/index.php +1 -1
  138. package/src/search/index.php +2 -2
  139. package/src/search/view.js +4 -4
  140. package/src/term-template/index.php +8 -2
  141. package/src/terms-query/edit/inspector-controls/index.js +2 -2
  142. package/src/terms-query/edit/inspector-controls/inherit-control.js +1 -3
  143. package/src/utils/get-transformed-attributes.js +5 -16
  144. 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\tif (\n\t\thasBlockSupport( newBlockType, 'className' ) &&\n\t\tattributes.className\n\t) {\n\t\ttransformedAttributes.className = attributes.className;\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\tconst transformedMetadata = [ 'noteId' ];\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// Handle metadata properties derived from block support.\n\t\tif ( hasBlockSupport( newBlockType, 'renaming', true ) ) {\n\t\t\ttransformedMetadata.push( 'name' );\n\t\t}\n\t\tif ( hasBlockSupport( newBlockType, 'blockVisibility', true ) ) {\n\t\t\ttransformedMetadata.push( 'blockVisibility' );\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;AAG/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;AACA,MACC,gBAAiB,cAAc,WAAY,KAC3C,WAAW,WACV;AACD,0BAAsB,YAAY,WAAW;AAAA,EAC9C;AAGA,MAAK,WAAW,UAAW;AAE1B,UAAM,sBAAsB,CAAE,QAAS;AAGvC,QAAK,kBAAmB;AACvB,0BAAoB,KAAM,MAAM,UAAW;AAAA,IAC5C;AAGA,QAAK,gBAAiB,cAAc,YAAY,IAAK,GAAI;AACxD,0BAAoB,KAAM,MAAO;AAAA,IAClC;AACA,QAAK,gBAAiB,cAAc,mBAAmB,IAAK,GAAI;AAC/D,0BAAoB,KAAM,iBAAkB;AAAA,IAC7C;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;",
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: 499;
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: 499;
2605
+ font-weight: 500;
2601
2606
  display: block;
2602
2607
  }
2603
2608
 
@@ -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: 499;
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: 499;
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
+ }
@@ -122,7 +122,7 @@
122
122
  .link-control-transform__subheading {
123
123
  font-size: 11px;
124
124
  text-transform: uppercase;
125
- font-weight: 499;
125
+ font-weight: 500;
126
126
  color: #1e1e1e;
127
127
  margin-bottom: 1.5em;
128
128
  }
@@ -122,7 +122,7 @@
122
122
  .link-control-transform__subheading {
123
123
  font-size: 11px;
124
124
  text-transform: uppercase;
125
- font-weight: 499;
125
+ font-weight: 500;
126
126
  color: #1e1e1e;
127
127
  margin-bottom: 1.5em;
128
128
  }
@@ -79,7 +79,7 @@
79
79
  color: #757575;
80
80
  text-transform: uppercase;
81
81
  font-size: 11px;
82
- font-weight: 499;
82
+ font-weight: 500;
83
83
  display: block;
84
84
  }
85
85
 
@@ -79,7 +79,7 @@
79
79
  color: #757575;
80
80
  text-transform: uppercase;
81
81
  font-size: 11px;
82
- font-weight: 499;
82
+ font-weight: 500;
83
83
  display: block;
84
84
  }
85
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "9.33.2-next.36001005c.0",
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-next.36001005c.0",
85
- "@wordpress/api-fetch": "^7.33.1-next.36001005c.0",
86
- "@wordpress/autop": "^4.33.1-next.36001005c.0",
87
- "@wordpress/base-styles": "^6.10.1-next.36001005c.0",
88
- "@wordpress/blob": "^4.33.1-next.36001005c.0",
89
- "@wordpress/block-editor": "^15.6.1-next.36001005c.0",
90
- "@wordpress/blocks": "^15.6.1-next.36001005c.0",
91
- "@wordpress/components": "^30.7.1-next.36001005c.0",
92
- "@wordpress/compose": "^7.33.1-next.36001005c.0",
93
- "@wordpress/core-data": "^7.33.1-next.36001005c.0",
94
- "@wordpress/data": "^10.33.1-next.36001005c.0",
95
- "@wordpress/date": "^5.33.1-next.36001005c.0",
96
- "@wordpress/deprecated": "^4.33.1-next.36001005c.0",
97
- "@wordpress/dom": "^4.33.1-next.36001005c.0",
98
- "@wordpress/element": "^6.33.1-next.36001005c.0",
99
- "@wordpress/escape-html": "^3.33.1-next.36001005c.0",
100
- "@wordpress/hooks": "^4.33.1-next.36001005c.0",
101
- "@wordpress/html-entities": "^4.33.1-next.36001005c.0",
102
- "@wordpress/i18n": "^6.6.1-next.36001005c.0",
103
- "@wordpress/icons": "^11.0.1-next.36001005c.0",
104
- "@wordpress/interactivity": "^6.33.1-next.36001005c.0",
105
- "@wordpress/interactivity-router": "^2.33.1-next.36001005c.0",
106
- "@wordpress/keyboard-shortcuts": "^5.33.1-next.36001005c.0",
107
- "@wordpress/keycodes": "^4.33.1-next.36001005c.0",
108
- "@wordpress/latex-to-mathml": "^1.1.1-next.36001005c.0",
109
- "@wordpress/notices": "^5.33.1-next.36001005c.0",
110
- "@wordpress/patterns": "^2.33.1-next.36001005c.0",
111
- "@wordpress/primitives": "^4.33.1-next.36001005c.0",
112
- "@wordpress/private-apis": "^1.33.1-next.36001005c.0",
113
- "@wordpress/reusable-blocks": "^5.33.1-next.36001005c.0",
114
- "@wordpress/rich-text": "^7.33.1-next.36001005c.0",
115
- "@wordpress/server-side-render": "^6.9.1-next.36001005c.0",
116
- "@wordpress/url": "^4.33.1-next.36001005c.0",
117
- "@wordpress/viewport": "^6.33.1-next.36001005c.0",
118
- "@wordpress/wordcount": "^4.33.1-next.36001005c.0",
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": "b73a8a22e779c59efb8f911e32b681652f237d60"
136
+ "gitHead": "5f84bafdec1bed05247c1080c12f6a237951b862"
137
137
  }
@@ -4,7 +4,7 @@
4
4
  "name": "core/accordion",
5
5
  "title": "Accordion",
6
6
  "category": "design",
7
- "description": "Displays a group of accordion headings and associated expandable content.",
7
+ "description": "Displays a foldable layout that groups content in collapsible sections.",
8
8
  "example": {},
9
9
  "supports": {
10
10
  "anchor": true,
@@ -102,22 +102,22 @@ export default function Edit( {
102
102
  return (
103
103
  <>
104
104
  { isSingleSelected && ! isContentOnlyMode && (
105
- <BlockControls>
106
- <ToolbarGroup>
107
- <HeadingLevelDropdown
108
- value={ headingLevel }
109
- options={ levelOptions }
110
- onChange={ updateHeadingLevel }
111
- />
112
- </ToolbarGroup>
113
- </BlockControls>
114
- ) }
115
- { isSingleSelected && (
116
- <BlockControls group="other">
117
- <ToolbarButton onClick={ addAccordionItemBlock }>
118
- { __( 'Add' ) }
119
- </ToolbarButton>
120
- </BlockControls>
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": "Displays an accordion heading.",
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": "Displays a section of content in an accordion, including a heading and expandable content.",
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": "Displays an accordion panel.",
7
+ "description": "Contains the hidden or revealed content beneath the heading.",
8
8
  "parent": [ "core/accordion-item" ],
9
9
  "supports": {
10
10
  "html": false,
@@ -47,6 +47,7 @@ const transforms = {
47
47
  const url = link?.getAttribute( 'href' );
48
48
  // Create singular button in the buttons block.
49
49
  return createBlock( 'core/button', {
50
+ ...attributes,
50
51
  ...getTransformedAttributes(
51
52
  attributes,
52
53
  'core/button',
@@ -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 *;
@@ -9,7 +9,8 @@
9
9
  "textdomain": "default",
10
10
  "attributes": {
11
11
  "label": {
12
- "type": "string"
12
+ "type": "string",
13
+ "role": "content"
13
14
  }
14
15
  },
15
16
  "usesContext": [
@@ -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-async--load', 'callbacks.setButtonStyles' );
254
- $processor->set_attribute( 'data-wp-on-async-window--resize', 'callbacks.setButtonStyles' );
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-async--click', 'actions.showLightbox' );
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-async--click="actions.showLightbox"
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-async--touchstart="actions.handleTouchStart"
327
+ data-wp-on--touchstart="actions.handleTouchStart"
328
328
  data-wp-on--touchmove="actions.handleTouchMove"
329
- data-wp-on-async--touchend="actions.handleTouchEnd"
330
- data-wp-on-async--click="actions.hideLightbox"
331
- data-wp-on-async-window--resize="callbacks.setOverlayStyles"
332
- data-wp-on-async-window--scroll="actions.handleScroll"
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 } );
@@ -0,0 +1,7 @@
1
+ @use "@wordpress/base-styles/variables" as *;
2
+
3
+ .wp-block-math__textarea-control textarea {
4
+ font-family: $font-family-mono;
5
+ /*rtl:ignore*/
6
+ direction: ltr;
7
+ }
@@ -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 );
@@ -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-async--click="actions.openMenuOnClick"
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-async--focusout="actions.handleMenuFocusout"
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-async--click="actions.closeMenuOnClick"
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-async--mouseenter', 'actions.openMenuOnHover' );
834
- $tags->set_attribute( 'data-wp-on-async--mouseleave', 'actions.closeMenuOnHover' );
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-async--click', 'actions.toggleMenuOnClick' );
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-async--focus', 'actions.openMenuOnFocus' );
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: menuItemTypeField?.replace( '_', '-' ) || 'custom',
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
- 'custom' !== object && {
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 && {