@wordpress/block-library 9.33.1 → 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 (117) 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/menu-items-to-blocks.js +8 -3
  17. package/build/navigation/menu-items-to-blocks.js.map +2 -2
  18. package/build/navigation/view.js +2 -2
  19. package/build/navigation/view.js.map +2 -2
  20. package/build/post-date/block.json +1 -1
  21. package/build/post-date/deprecated.js +1 -1
  22. package/build/post-date/deprecated.js.map +2 -2
  23. package/build/post-date/edit.js +11 -5
  24. package/build/post-date/edit.js.map +3 -3
  25. package/build/post-date/variations.js +4 -7
  26. package/build/post-date/variations.js.map +2 -2
  27. package/build/post-template/edit.js +13 -1
  28. package/build/post-template/edit.js.map +2 -2
  29. package/build/query/index.js +11 -1
  30. package/build/query/index.js.map +2 -2
  31. package/build/query/variations.js +16 -11
  32. package/build/query/variations.js.map +2 -2
  33. package/build/search/view.js +4 -4
  34. package/build/search/view.js.map +2 -2
  35. package/build/terms-query/edit/inspector-controls/index.js +1 -1
  36. package/build/terms-query/edit/inspector-controls/index.js.map +2 -2
  37. package/build/terms-query/edit/inspector-controls/inherit-control.js +2 -4
  38. package/build/terms-query/edit/inspector-controls/inherit-control.js.map +2 -2
  39. package/build/utils/get-transformed-attributes.js +1 -10
  40. package/build/utils/get-transformed-attributes.js.map +2 -2
  41. package/build-module/accordion/block.json +1 -1
  42. package/build-module/accordion/edit.js +11 -9
  43. package/build-module/accordion/edit.js.map +2 -2
  44. package/build-module/accordion-heading/block.json +1 -1
  45. package/build-module/accordion-item/block.json +1 -1
  46. package/build-module/accordion-panel/block.json +1 -1
  47. package/build-module/buttons/transforms.js +1 -0
  48. package/build-module/buttons/transforms.js.map +2 -2
  49. package/build-module/code/transforms.js +2 -0
  50. package/build-module/code/transforms.js.map +2 -2
  51. package/build-module/home-link/block.json +2 -1
  52. package/build-module/image/view.js +4 -1
  53. package/build-module/image/view.js.map +2 -2
  54. package/build-module/math/edit.js +1 -0
  55. package/build-module/math/edit.js.map +2 -2
  56. package/build-module/navigation/menu-items-to-blocks.js +8 -3
  57. package/build-module/navigation/menu-items-to-blocks.js.map +2 -2
  58. package/build-module/navigation/view.js +2 -2
  59. package/build-module/navigation/view.js.map +2 -2
  60. package/build-module/post-date/block.json +1 -1
  61. package/build-module/post-date/deprecated.js +1 -1
  62. package/build-module/post-date/deprecated.js.map +2 -2
  63. package/build-module/post-date/edit.js +11 -5
  64. package/build-module/post-date/edit.js.map +2 -2
  65. package/build-module/post-date/variations.js +4 -7
  66. package/build-module/post-date/variations.js.map +2 -2
  67. package/build-module/post-template/edit.js +13 -1
  68. package/build-module/post-template/edit.js.map +2 -2
  69. package/build-module/query/index.js +11 -1
  70. package/build-module/query/index.js.map +2 -2
  71. package/build-module/query/variations.js +16 -11
  72. package/build-module/query/variations.js.map +2 -2
  73. package/build-module/search/view.js +4 -4
  74. package/build-module/search/view.js.map +2 -2
  75. package/build-module/terms-query/edit/inspector-controls/index.js +1 -1
  76. package/build-module/terms-query/edit/inspector-controls/index.js.map +2 -2
  77. package/build-module/terms-query/edit/inspector-controls/inherit-control.js +2 -4
  78. package/build-module/terms-query/edit/inspector-controls/inherit-control.js.map +2 -2
  79. package/build-module/utils/get-transformed-attributes.js +1 -10
  80. package/build-module/utils/get-transformed-attributes.js.map +2 -2
  81. package/build-style/editor-rtl.css +5 -0
  82. package/build-style/editor.css +6 -0
  83. package/build-style/math/editor-rtl.css +49 -0
  84. package/build-style/math/editor.css +50 -0
  85. package/package.json +37 -37
  86. package/src/accordion/block.json +1 -1
  87. package/src/accordion/edit.js +16 -16
  88. package/src/accordion-heading/block.json +1 -1
  89. package/src/accordion-item/block.json +1 -1
  90. package/src/accordion-panel/block.json +1 -1
  91. package/src/buttons/transforms.js +1 -0
  92. package/src/code/transforms.js +2 -0
  93. package/src/editor.scss +1 -0
  94. package/src/home-link/block.json +2 -1
  95. package/src/image/index.php +9 -9
  96. package/src/image/view.js +11 -1
  97. package/src/math/edit.js +1 -0
  98. package/src/math/editor.scss +7 -0
  99. package/src/navigation/index.php +7 -7
  100. package/src/navigation/menu-items-to-blocks.js +12 -2
  101. package/src/navigation/test/menu-items-to-blocks.js +144 -0
  102. package/src/navigation/view.js +2 -2
  103. package/src/post-date/block.json +1 -1
  104. package/src/post-date/deprecated.js +5 -1
  105. package/src/post-date/edit.js +15 -10
  106. package/src/post-date/variations.js +2 -5
  107. package/src/post-template/edit.js +13 -1
  108. package/src/query/index.js +10 -0
  109. package/src/query/variations.js +17 -11
  110. package/src/query-pagination-next/index.php +1 -1
  111. package/src/query-pagination-previous/index.php +1 -1
  112. package/src/search/index.php +2 -2
  113. package/src/search/view.js +4 -4
  114. package/src/term-template/index.php +8 -2
  115. package/src/terms-query/edit/inspector-controls/index.js +2 -2
  116. package/src/terms-query/edit/inspector-controls/inherit-control.js +1 -3
  117. package/src/utils/get-transformed-attributes.js +5 -16
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/terms-query/edit/inspector-controls/index.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { InspectorControls } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelDropdownMenuProps } from '../../../utils/hooks';\nimport { usePublicTaxonomies } from '../../utils';\nimport TaxonomyControl from './taxonomy-control';\nimport OrderControl from './order-control';\nimport EmptyTermsControl from './empty-terms-control';\nimport NestedTermsControl from './nested-terms-control';\nimport InheritControl from './inherit-control';\nimport MaxTermsControl from './max-terms-control';\nimport AdvancedControls from './advanced-controls';\nimport IncludeControl from './include-control';\n\nexport default function TermsQueryInspectorControls( {\n\tattributes,\n\tsetQuery,\n\tsetAttributes,\n\tclientId,\n\ttemplateSlug,\n} ) {\n\tconst { termQuery, tagName: TagName } = attributes;\n\tconst {\n\t\ttaxonomy,\n\t\torderBy,\n\t\torder,\n\t\thideEmpty,\n\t\tinherit,\n\t\tshowNested,\n\t\tperPage,\n\t\tinclude,\n\t} = termQuery;\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst taxonomies = usePublicTaxonomies();\n\n\tconst isTaxonomyHierarchical = taxonomies.find(\n\t\t( _taxonomy ) => _taxonomy.slug === taxonomy\n\t)?.hierarchical;\n\tconst inheritQuery = !! inherit;\n\t// Display the inherit control when we're in a taxonomy-related\n\t// template (category, tag, or custom taxonomy).\n\tconst displayInheritControl =\n\t\t[ 'taxonomy', 'category', 'tag', 'archive' ].includes( templateSlug ) ||\n\t\ttemplateSlug?.startsWith( 'taxonomy-' ) ||\n\t\ttemplateSlug?.startsWith( 'category-' ) ||\n\t\ttemplateSlug?.startsWith( 'tag-' );\n\t// Only display the showNested control if the taxonomy is hierarchical and not inheriting.\n\tconst displayShowNestedControl = isTaxonomyHierarchical && ! inheritQuery;\n\tconst hasIncludeFilter = !! include?.length;\n\n\t// Labels shared between ToolsPanelItem and its child control.\n\tconst queryTypeControlLabel = __( 'Query type' );\n\tconst taxonomyControlLabel = __( 'Taxonomy' );\n\tconst orderByControlLabel = __( 'Order by' );\n\tconst emptyTermsControlLabel = __( 'Show empty terms' );\n\tconst nestedTermsControlLabel = __( 'Show nested terms' );\n\tconst maxTermsControlLabel = __( 'Max terms' );\n\tconst includeControlLabel = __( 'Selected terms' );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\ttermQuery: {\n\t\t\t\t\t\t\t\ttaxonomy: 'category',\n\t\t\t\t\t\t\t\torder: 'asc',\n\t\t\t\t\t\t\t\torderBy: 'name',\n\t\t\t\t\t\t\t\tinclude: [],\n\t\t\t\t\t\t\t\thideEmpty: true,\n\t\t\t\t\t\t\t\tshowNested: false,\n\t\t\t\t\t\t\t\tinherit: false,\n\t\t\t\t\t\t\t\tperPage: 10,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t{ displayInheritControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => inherit !== false }\n\t\t\t\t\t\t\tlabel={ queryTypeControlLabel }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { inherit: false } ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<InheritControl\n\t\t\t\t\t\t\t\tlabel={ queryTypeControlLabel }\n\t\t\t\t\t\t\t\tvalue={ inherit }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! inheritQuery && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => taxonomy !== 'category' }\n\t\t\t\t\t\t\tlabel={ taxonomyControlLabel }\n\t\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\t\tsetQuery( { taxonomy: 'category' } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TaxonomyControl\n\t\t\t\t\t\t\t\tlabel={ taxonomyControlLabel }\n\t\t\t\t\t\t\t\tvalue={ taxonomy }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\t// We also need to reset the include filter when changing taxonomy.\n\t\t\t\t\t\t\t\t\tsetQuery( { taxonomy: value, include: [] } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => orderBy !== 'name' || order !== 'asc' }\n\t\t\t\t\t\tlabel={ orderByControlLabel }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetQuery( { orderBy: 'name', order: 'asc' } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<OrderControl\n\t\t\t\t\t\t\tlabel={ orderByControlLabel }\n\t\t\t\t\t\t\t{ ...{ orderBy, order } }\n\t\t\t\t\t\t\tonChange={ ( newOrderBy, newOrder ) => {\n\t\t\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\t\t\torderBy: newOrderBy,\n\t\t\t\t\t\t\t\t\torder: newOrder,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tdisabled={ hasIncludeFilter }\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\thasIncludeFilter\n\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t'When specific terms are selected, the order is based on their selection order.'\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t{ ! inheritQuery && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! include?.length }\n\t\t\t\t\t\t\tlabel={ includeControlLabel }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\t\t\tinclude: [],\n\t\t\t\t\t\t\t\t\torderBy: 'name',\n\t\t\t\t\t\t\t\t\torder: 'asc',\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<IncludeControl\n\t\t\t\t\t\t\t\tlabel={ includeControlLabel }\n\t\t\t\t\t\t\t\ttaxonomy={ taxonomy }\n\t\t\t\t\t\t\t\tvalue={ include }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetQuery( { include: value } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => hideEmpty !== true }\n\t\t\t\t\t\tlabel={ emptyTermsControlLabel }\n\t\t\t\t\t\tonDeselect={ () => setQuery( { hideEmpty: true } ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<EmptyTermsControl\n\t\t\t\t\t\t\tlabel={ emptyTermsControlLabel }\n\t\t\t\t\t\t\tvalue={ hideEmpty }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetQuery( { hideEmpty: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t{ displayShowNestedControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => showNested !== false }\n\t\t\t\t\t\t\tlabel={ nestedTermsControlLabel }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetQuery( { showNested: false } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<NestedTermsControl\n\t\t\t\t\t\t\t\tlabel={ nestedTermsControlLabel }\n\t\t\t\t\t\t\t\tvalue={ showNested }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetQuery( { showNested: value } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={ hasIncludeFilter }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\thasIncludeFilter\n\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t'When specific terms are selected, only those are displayed.'\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => perPage !== 10 }\n\t\t\t\t\t\tlabel={ maxTermsControlLabel }\n\t\t\t\t\t\tonDeselect={ () => setQuery( { perPage: 10 } ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<MaxTermsControl\n\t\t\t\t\t\t\tlabel={ maxTermsControlLabel }\n\t\t\t\t\t\t\tvalue={ perPage }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetQuery( { perPage: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t\t<AdvancedControls\n\t\t\t\tTagName={ TagName }\n\t\t\t\tsetAttributes={ setAttributes }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kBACA,OAAQ;AAAA,kBACR,OAAQ;AAAA,kBACR,UAAW,CAAE,UACZ,SAAU,EAAE,YAAY,MAAM,CAAE;AAAA,kBAEjC,UAAW;AAAA,kBACX,MACC,mBACG;AAAA,oBACA;AAAA,kBACA,IACA;AAAA;AAAA,cAEL;AAAA;AAAA,UACD;AAAA,UAED;AAAA,YAAC;AAAA;AAAA,cACA,UAAW,MAAM,YAAY;AAAA,cAC7B,OAAQ;AAAA,cACR,YAAa,MAAM,SAAU,EAAE,SAAS,GAAG,CAAE;AAAA,cAC7C,kBAAgB;AAAA,cAEhB;AAAA,gBAAC;AAAA;AAAA,kBACA,OAAQ;AAAA,kBACR,OAAQ;AAAA,kBACR,UAAW,CAAE,UACZ,SAAU,EAAE,SAAS,MAAM,CAAE;AAAA;AAAA,cAE/B;AAAA;AAAA,UACD;AAAA;AAAA;AAAA,IACD,GACD;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACD;AAAA,KACD;AAEF;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { InspectorControls } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelDropdownMenuProps } from '../../../utils/hooks';\nimport { usePublicTaxonomies } from '../../utils';\nimport TaxonomyControl from './taxonomy-control';\nimport OrderControl from './order-control';\nimport EmptyTermsControl from './empty-terms-control';\nimport NestedTermsControl from './nested-terms-control';\nimport InheritControl from './inherit-control';\nimport MaxTermsControl from './max-terms-control';\nimport AdvancedControls from './advanced-controls';\nimport IncludeControl from './include-control';\n\nexport default function TermsQueryInspectorControls( {\n\tattributes,\n\tsetQuery,\n\tsetAttributes,\n\tclientId,\n\ttemplateSlug,\n} ) {\n\tconst { termQuery, tagName: TagName } = attributes;\n\tconst {\n\t\ttaxonomy,\n\t\torderBy,\n\t\torder,\n\t\thideEmpty,\n\t\tinherit,\n\t\tshowNested,\n\t\tperPage,\n\t\tinclude,\n\t} = termQuery;\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst taxonomies = usePublicTaxonomies();\n\n\tconst isTaxonomyHierarchical = taxonomies.find(\n\t\t( _taxonomy ) => _taxonomy.slug === taxonomy\n\t)?.hierarchical;\n\tconst inheritQuery = !! inherit;\n\t// Display the inherit control when we're in a taxonomy-related\n\t// template (category, tag, or custom taxonomy).\n\tconst displayInheritControl =\n\t\t[ 'taxonomy', 'category', 'tag', 'archive' ].includes( templateSlug ) ||\n\t\ttemplateSlug?.startsWith( 'taxonomy-' ) ||\n\t\ttemplateSlug?.startsWith( 'category-' ) ||\n\t\ttemplateSlug?.startsWith( 'tag-' );\n\t// Display the showNested control if the taxonomy is hierarchical.\n\tconst displayShowNestedControl = isTaxonomyHierarchical;\n\tconst hasIncludeFilter = !! include?.length;\n\n\t// Labels shared between ToolsPanelItem and its child control.\n\tconst queryTypeControlLabel = __( 'Query type' );\n\tconst taxonomyControlLabel = __( 'Taxonomy' );\n\tconst orderByControlLabel = __( 'Order by' );\n\tconst emptyTermsControlLabel = __( 'Show empty terms' );\n\tconst nestedTermsControlLabel = __( 'Show nested terms' );\n\tconst maxTermsControlLabel = __( 'Max terms' );\n\tconst includeControlLabel = __( 'Selected terms' );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\ttermQuery: {\n\t\t\t\t\t\t\t\ttaxonomy: 'category',\n\t\t\t\t\t\t\t\torder: 'asc',\n\t\t\t\t\t\t\t\torderBy: 'name',\n\t\t\t\t\t\t\t\tinclude: [],\n\t\t\t\t\t\t\t\thideEmpty: true,\n\t\t\t\t\t\t\t\tshowNested: false,\n\t\t\t\t\t\t\t\tinherit: false,\n\t\t\t\t\t\t\t\tperPage: 10,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t{ displayInheritControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => inherit !== false }\n\t\t\t\t\t\t\tlabel={ queryTypeControlLabel }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { inherit: false } ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<InheritControl\n\t\t\t\t\t\t\t\tlabel={ queryTypeControlLabel }\n\t\t\t\t\t\t\t\tvalue={ inherit }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! inheritQuery && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => taxonomy !== 'category' }\n\t\t\t\t\t\t\tlabel={ taxonomyControlLabel }\n\t\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\t\tsetQuery( { taxonomy: 'category' } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TaxonomyControl\n\t\t\t\t\t\t\t\tlabel={ taxonomyControlLabel }\n\t\t\t\t\t\t\t\tvalue={ taxonomy }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\t// We also need to reset the include filter when changing taxonomy.\n\t\t\t\t\t\t\t\t\tsetQuery( { taxonomy: value, include: [] } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => orderBy !== 'name' || order !== 'asc' }\n\t\t\t\t\t\tlabel={ orderByControlLabel }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetQuery( { orderBy: 'name', order: 'asc' } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<OrderControl\n\t\t\t\t\t\t\tlabel={ orderByControlLabel }\n\t\t\t\t\t\t\t{ ...{ orderBy, order } }\n\t\t\t\t\t\t\tonChange={ ( newOrderBy, newOrder ) => {\n\t\t\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\t\t\torderBy: newOrderBy,\n\t\t\t\t\t\t\t\t\torder: newOrder,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tdisabled={ hasIncludeFilter }\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\thasIncludeFilter\n\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t'When specific terms are selected, the order is based on their selection order.'\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t{ ! inheritQuery && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! include?.length }\n\t\t\t\t\t\t\tlabel={ includeControlLabel }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\t\t\tinclude: [],\n\t\t\t\t\t\t\t\t\torderBy: 'name',\n\t\t\t\t\t\t\t\t\torder: 'asc',\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<IncludeControl\n\t\t\t\t\t\t\t\tlabel={ includeControlLabel }\n\t\t\t\t\t\t\t\ttaxonomy={ taxonomy }\n\t\t\t\t\t\t\t\tvalue={ include }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetQuery( { include: value } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => hideEmpty !== true }\n\t\t\t\t\t\tlabel={ emptyTermsControlLabel }\n\t\t\t\t\t\tonDeselect={ () => setQuery( { hideEmpty: true } ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<EmptyTermsControl\n\t\t\t\t\t\t\tlabel={ emptyTermsControlLabel }\n\t\t\t\t\t\t\tvalue={ hideEmpty }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetQuery( { hideEmpty: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t{ displayShowNestedControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => showNested !== false }\n\t\t\t\t\t\t\tlabel={ nestedTermsControlLabel }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetQuery( { showNested: false } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<NestedTermsControl\n\t\t\t\t\t\t\t\tlabel={ nestedTermsControlLabel }\n\t\t\t\t\t\t\t\tvalue={ showNested }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetQuery( { showNested: value } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={ hasIncludeFilter }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\thasIncludeFilter\n\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t'When specific terms are selected, only those are displayed.'\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => perPage !== 10 }\n\t\t\t\t\t\tlabel={ maxTermsControlLabel }\n\t\t\t\t\t\tonDeselect={ () => setQuery( { perPage: 10 } ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<MaxTermsControl\n\t\t\t\t\t\t\tlabel={ maxTermsControlLabel }\n\t\t\t\t\t\t\tvalue={ perPage }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetQuery( { perPage: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t\t<AdvancedControls\n\t\t\t\tTagName={ TagName }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tclientId={ clientId }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],
5
+ "mappings": "AAuEE,mBA2BK,KAzBH,YAFF;AApEF,SAAS,UAAU;AACnB;AAAA,EACC,4BAA4B;AAAA,EAC5B,gCAAgC;AAAA,OAC1B;AACP,SAAS,yBAAyB;AAKlC,SAAS,sCAAsC;AAC/C,SAAS,2BAA2B;AACpC,OAAO,qBAAqB;AAC5B,OAAO,kBAAkB;AACzB,OAAO,uBAAuB;AAC9B,OAAO,wBAAwB;AAC/B,OAAO,oBAAoB;AAC3B,OAAO,qBAAqB;AAC5B,OAAO,sBAAsB;AAC7B,OAAO,oBAAoB;AAEZ,SA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AAW,CAAE,UACZ,SAAU,EAAE,SAAS,MAAM,CAAE;AAAA;AAAA,cAE/B;AAAA;AAAA,UACD;AAAA;AAAA;AAAA,IACD,GACD;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACD;AAAA,KACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -14,13 +14,11 @@ function InheritControl({ value, onChange, label }) {
14
14
  isBlock: true,
15
15
  onChange: (newValue) => {
16
16
  onChange({
17
- inherit: newValue === "default",
18
- // When enabling inherit, hierarchical is not supported.
19
- ...newValue === "default" ? { showNested: false } : {}
17
+ inherit: newValue === "default"
20
18
  });
21
19
  },
22
20
  help: value ? __(
23
- "Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows direct children of the current term. For non-hierarchical taxonomies, shows all terms."
21
+ "Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows children of the current term. For non-hierarchical taxonomies, shows all terms."
24
22
  ) : __("Display terms based on specific criteria."),
25
23
  value: value ? "default" : "custom",
26
24
  children: [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/terms-query/edit/inspector-controls/inherit-control.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function InheritControl( { value, onChange, label } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ label }\n\t\t\tisBlock\n\t\t\tonChange={ ( newValue ) => {\n\t\t\t\tonChange( {\n\t\t\t\t\tinherit: newValue === 'default',\n\t\t\t\t\t// When enabling inherit, hierarchical is not supported.\n\t\t\t\t\t...( newValue === 'default' ? { showNested: false } : {} ),\n\t\t\t\t} );\n\t\t\t} }\n\t\t\thelp={\n\t\t\t\tvalue\n\t\t\t\t\t? __(\n\t\t\t\t\t\t\t'Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows direct children of the current term. For non-hierarchical taxonomies, shows all terms.'\n\t\t\t\t\t )\n\t\t\t\t\t: __( 'Display terms based on specific criteria.' )\n\t\t\t}\n\t\t\tvalue={ value ? 'default' : 'custom' }\n\t\t>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"default\"\n\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption value=\"custom\" label={ __( 'Custom' ) } />\n\t\t</ToggleGroupControl>\n\t);\n}\n"],
5
- "mappings": "AAWE,SAqBC,KArBD;AARF;AAAA,EACC,oCAAoC;AAAA,EACpC,0CAA0C;AAAA,OACpC;AACP,SAAS,UAAU;AAEJ,SAAR,eAAiC,EAAE,OAAO,UAAU,MAAM,GAAI;AACpE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,uBAAqB;AAAA,MACrB,yBAAuB;AAAA,MACvB;AAAA,MACA,SAAO;AAAA,MACP,UAAW,CAAE,aAAc;AAC1B,iBAAU;AAAA,UACT,SAAS,aAAa;AAAA;AAAA,UAEtB,GAAK,aAAa,YAAY,EAAE,YAAY,MAAM,IAAI,CAAC;AAAA,QACxD,CAAE;AAAA,MACH;AAAA,MACA,MACC,QACG;AAAA,QACA;AAAA,MACA,IACA,GAAI,2CAA4C;AAAA,MAEpD,OAAQ,QAAQ,YAAY;AAAA,MAE5B;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,OAAM;AAAA,YACN,OAAQ,GAAI,SAAU;AAAA;AAAA,QACvB;AAAA,QACA,oBAAC,4BAAyB,OAAM,UAAS,OAAQ,GAAI,QAAS,GAAI;AAAA;AAAA;AAAA,EACnE;AAEF;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function InheritControl( { value, onChange, label } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ label }\n\t\t\tisBlock\n\t\t\tonChange={ ( newValue ) => {\n\t\t\t\tonChange( {\n\t\t\t\t\tinherit: newValue === 'default',\n\t\t\t\t} );\n\t\t\t} }\n\t\t\thelp={\n\t\t\t\tvalue\n\t\t\t\t\t? __(\n\t\t\t\t\t\t\t'Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows children of the current term. For non-hierarchical taxonomies, shows all terms.'\n\t\t\t\t\t )\n\t\t\t\t\t: __( 'Display terms based on specific criteria.' )\n\t\t\t}\n\t\t\tvalue={ value ? 'default' : 'custom' }\n\t\t>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"default\"\n\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption value=\"custom\" label={ __( 'Custom' ) } />\n\t\t</ToggleGroupControl>\n\t);\n}\n"],
5
+ "mappings": "AAWE,SAmBC,KAnBD;AARF;AAAA,EACC,oCAAoC;AAAA,EACpC,0CAA0C;AAAA,OACpC;AACP,SAAS,UAAU;AAEJ,SAAR,eAAiC,EAAE,OAAO,UAAU,MAAM,GAAI;AACpE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,uBAAqB;AAAA,MACrB,yBAAuB;AAAA,MACvB;AAAA,MACA,SAAO;AAAA,MACP,UAAW,CAAE,aAAc;AAC1B,iBAAU;AAAA,UACT,SAAS,aAAa;AAAA,QACvB,CAAE;AAAA,MACH;AAAA,MACA,MACC,QACG;AAAA,QACA;AAAA,MACA,IACA,GAAI,2CAA4C;AAAA,MAEpD,OAAQ,QAAQ,YAAY;AAAA,MAE5B;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,OAAM;AAAA,YACN,OAAQ,GAAI,SAAU;AAAA;AAAA,QACvB;AAAA,QACA,oBAAC,4BAAyB,OAAM,UAAS,OAAQ,GAAI,QAAS,GAAI;AAAA;AAAA;AAAA,EACnE;AAEF;",
6
6
  "names": []
7
7
  }
@@ -17,20 +17,11 @@ function getTransformedAttributes(attributes, newBlockName, bindingsCallback = n
17
17
  if (hasBlockSupport(newBlockType, "ariaLabel") && attributes.ariaLabel) {
18
18
  transformedAttributes.ariaLabel = attributes.ariaLabel;
19
19
  }
20
- if (hasBlockSupport(newBlockType, "className") && attributes.className) {
21
- transformedAttributes.className = attributes.className;
22
- }
23
20
  if (attributes.metadata) {
24
- const transformedMetadata = ["noteId"];
21
+ const transformedMetadata = [];
25
22
  if (bindingsCallback) {
26
23
  transformedMetadata.push("id", "bindings");
27
24
  }
28
- if (hasBlockSupport(newBlockType, "renaming", true)) {
29
- transformedMetadata.push("name");
30
- }
31
- if (hasBlockSupport(newBlockType, "blockVisibility", true)) {
32
- transformedMetadata.push("blockVisibility");
33
- }
34
25
  if (transformedMetadata.length > 0) {
35
26
  const newMetadata = Object.entries(attributes.metadata).reduce(
36
27
  (obj, [prop, value]) => {
@@ -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
  }
@@ -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
  }
@@ -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.1",
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.0",
85
- "@wordpress/api-fetch": "^7.33.0",
86
- "@wordpress/autop": "^4.33.0",
87
- "@wordpress/base-styles": "^6.9.0",
88
- "@wordpress/blob": "^4.33.0",
89
- "@wordpress/block-editor": "^15.6.0",
90
- "@wordpress/blocks": "^15.6.0",
91
- "@wordpress/components": "^30.6.0",
92
- "@wordpress/compose": "^7.33.0",
93
- "@wordpress/core-data": "^7.33.0",
94
- "@wordpress/data": "^10.33.0",
95
- "@wordpress/date": "^5.33.0",
96
- "@wordpress/deprecated": "^4.33.0",
97
- "@wordpress/dom": "^4.33.0",
98
- "@wordpress/element": "^6.33.0",
99
- "@wordpress/escape-html": "^3.33.0",
100
- "@wordpress/hooks": "^4.33.0",
101
- "@wordpress/html-entities": "^4.33.0",
102
- "@wordpress/i18n": "^6.6.0",
103
- "@wordpress/icons": "^11.0.0",
104
- "@wordpress/interactivity": "^6.33.0",
105
- "@wordpress/interactivity-router": "^2.33.0",
106
- "@wordpress/keyboard-shortcuts": "^5.33.0",
107
- "@wordpress/keycodes": "^4.33.0",
108
- "@wordpress/latex-to-mathml": "^1.1.0",
109
- "@wordpress/notices": "^5.33.0",
110
- "@wordpress/patterns": "^2.33.0",
111
- "@wordpress/primitives": "^4.33.0",
112
- "@wordpress/private-apis": "^1.33.0",
113
- "@wordpress/reusable-blocks": "^5.33.0",
114
- "@wordpress/rich-text": "^7.33.0",
115
- "@wordpress/server-side-render": "^6.9.0",
116
- "@wordpress/url": "^4.33.0",
117
- "@wordpress/viewport": "^6.33.0",
118
- "@wordpress/wordcount": "^4.33.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": "0eca9b157f332afd4d1a53c62bd862ae9a159c57"
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
+ }