@wordpress/block-editor 14.21.1-next.719a03cbe.0 → 15.0.1-next.46f643fa0.0

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 (124) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/components/block-list/use-block-props/index.js +1 -3
  3. package/build/components/block-list/use-block-props/index.js.map +1 -1
  4. package/build/components/block-list/use-block-props/use-is-hovered.js +8 -25
  5. package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  6. package/build/components/block-list/zoom-out-separator.js +0 -1
  7. package/build/components/block-list/zoom-out-separator.js.map +1 -1
  8. package/build/components/block-settings-menu/block-settings-dropdown.js +7 -4
  9. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  10. package/build/components/block-toolbar/index.js +6 -3
  11. package/build/components/block-toolbar/index.js.map +1 -1
  12. package/build/components/child-layout-control/index.js +53 -34
  13. package/build/components/child-layout-control/index.js.map +1 -1
  14. package/build/components/iframe/index.js +20 -15
  15. package/build/components/iframe/index.js.map +1 -1
  16. package/build/components/image-editor/use-save-image.js +49 -30
  17. package/build/components/image-editor/use-save-image.js.map +1 -1
  18. package/build/components/inserter-button/index.native.js +54 -64
  19. package/build/components/inserter-button/index.native.js.map +1 -1
  20. package/build/components/link-control/search-input.js +4 -2
  21. package/build/components/link-control/search-input.js.map +1 -1
  22. package/build/components/list-view/block.js +7 -5
  23. package/build/components/list-view/block.js.map +1 -1
  24. package/build/components/list-view/use-list-view-images.js +62 -30
  25. package/build/components/list-view/use-list-view-images.js.map +1 -1
  26. package/build/components/publish-date-time-picker/index.js +2 -1
  27. package/build/components/publish-date-time-picker/index.js.map +1 -1
  28. package/build/components/writing-flow/use-click-selection.js +3 -1
  29. package/build/components/writing-flow/use-click-selection.js.map +1 -1
  30. package/build/layouts/grid.js +2 -0
  31. package/build/layouts/grid.js.map +1 -1
  32. package/build/private-apis.js +2 -1
  33. package/build/private-apis.js.map +1 -1
  34. package/build/store/actions.js +12 -7
  35. package/build/store/actions.js.map +1 -1
  36. package/build/store/private-keys.js +2 -1
  37. package/build/store/private-keys.js.map +1 -1
  38. package/build/store/reducer.js +0 -18
  39. package/build/store/reducer.js.map +1 -1
  40. package/build/store/selectors.js +13 -9
  41. package/build/store/selectors.js.map +1 -1
  42. package/build/utils/block-bindings.js +2 -1
  43. package/build/utils/block-bindings.js.map +1 -1
  44. package/build-module/components/block-list/use-block-props/index.js +1 -3
  45. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  46. package/build-module/components/block-list/use-block-props/use-is-hovered.js +8 -26
  47. package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  48. package/build-module/components/block-list/zoom-out-separator.js +0 -1
  49. package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
  50. package/build-module/components/block-settings-menu/block-settings-dropdown.js +7 -4
  51. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  52. package/build-module/components/block-toolbar/index.js +6 -3
  53. package/build-module/components/block-toolbar/index.js.map +1 -1
  54. package/build-module/components/child-layout-control/index.js +54 -35
  55. package/build-module/components/child-layout-control/index.js.map +1 -1
  56. package/build-module/components/iframe/index.js +20 -15
  57. package/build-module/components/iframe/index.js.map +1 -1
  58. package/build-module/components/image-editor/use-save-image.js +50 -30
  59. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  60. package/build-module/components/inserter-button/index.native.js +55 -65
  61. package/build-module/components/inserter-button/index.native.js.map +1 -1
  62. package/build-module/components/link-control/search-input.js +4 -2
  63. package/build-module/components/link-control/search-input.js.map +1 -1
  64. package/build-module/components/list-view/block.js +8 -6
  65. package/build-module/components/list-view/block.js.map +1 -1
  66. package/build-module/components/list-view/use-list-view-images.js +62 -30
  67. package/build-module/components/list-view/use-list-view-images.js.map +1 -1
  68. package/build-module/components/publish-date-time-picker/index.js +2 -1
  69. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  70. package/build-module/components/writing-flow/use-click-selection.js +3 -1
  71. package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
  72. package/build-module/layouts/grid.js +2 -0
  73. package/build-module/layouts/grid.js.map +1 -1
  74. package/build-module/private-apis.js +3 -2
  75. package/build-module/private-apis.js.map +1 -1
  76. package/build-module/store/actions.js +12 -7
  77. package/build-module/store/actions.js.map +1 -1
  78. package/build-module/store/private-keys.js +1 -0
  79. package/build-module/store/private-keys.js.map +1 -1
  80. package/build-module/store/reducer.js +0 -17
  81. package/build-module/store/reducer.js.map +1 -1
  82. package/build-module/store/selectors.js +12 -9
  83. package/build-module/store/selectors.js.map +1 -1
  84. package/build-module/utils/block-bindings.js +2 -1
  85. package/build-module/utils/block-bindings.js.map +1 -1
  86. package/build-style/style-rtl.css +50 -26
  87. package/build-style/style.css +50 -26
  88. package/package.json +34 -34
  89. package/src/components/block-list/use-block-props/index.js +1 -1
  90. package/src/components/block-list/use-block-props/use-is-hovered.js +12 -26
  91. package/src/components/block-list/zoom-out-separator.js +0 -1
  92. package/src/components/block-lock/style.scss +10 -0
  93. package/src/components/block-settings-menu/block-settings-dropdown.js +4 -1
  94. package/src/components/block-toolbar/index.js +8 -2
  95. package/src/components/block-variation-transforms/style.scss +7 -0
  96. package/src/components/border-radius-control/style.scss +5 -0
  97. package/src/components/child-layout-control/index.js +66 -42
  98. package/src/components/colors-gradients/style.scss +5 -0
  99. package/src/components/grid/style.scss +3 -2
  100. package/src/components/iframe/index.js +25 -16
  101. package/src/components/image-editor/use-save-image.js +58 -31
  102. package/src/components/inserter/style.scss +1 -1
  103. package/src/components/inserter-button/index.native.js +69 -80
  104. package/src/components/inserter-list-item/style.scss +9 -6
  105. package/src/components/link-control/search-input.js +9 -2
  106. package/src/components/link-control/style.scss +7 -0
  107. package/src/components/link-control/test/index.js +44 -44
  108. package/src/components/list-view/block.js +10 -5
  109. package/src/components/list-view/style.scss +2 -20
  110. package/src/components/list-view/use-list-view-images.js +57 -36
  111. package/src/components/media-replace-flow/test/index.js +1 -1
  112. package/src/components/publish-date-time-picker/README.md +9 -0
  113. package/src/components/publish-date-time-picker/index.js +2 -1
  114. package/src/components/spacing-sizes-control/style.scss +5 -0
  115. package/src/components/writing-flow/use-click-selection.js +3 -1
  116. package/src/hooks/layout.scss +8 -0
  117. package/src/layouts/grid.js +2 -2
  118. package/src/private-apis.js +2 -0
  119. package/src/store/actions.js +15 -7
  120. package/src/store/private-keys.js +1 -0
  121. package/src/store/reducer.js +0 -18
  122. package/src/store/selectors.js +29 -31
  123. package/src/store/test/actions.js +15 -2
  124. package/src/utils/block-bindings.js +1 -0
@@ -14,7 +14,8 @@ const BLOCK_BINDINGS_ALLOWED_BLOCKS = {
14
14
  'core/paragraph': ['content'],
15
15
  'core/heading': ['content'],
16
16
  'core/image': ['id', 'url', 'title', 'alt'],
17
- 'core/button': ['url', 'text', 'linkTarget', 'rel']
17
+ 'core/button': ['url', 'text', 'linkTarget', 'rel'],
18
+ 'core/post-date': ['datetime']
18
19
  };
19
20
 
20
21
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["useDispatch","useRegistry","store","blockEditorStore","useBlockEditContext","DEFAULT_ATTRIBUTE","PATTERN_OVERRIDES_SOURCE","BLOCK_BINDINGS_ALLOWED_BLOCKS","isObjectEmpty","object","Object","keys","length","canBindBlock","blockName","canBindAttribute","attributeName","includes","getBindableAttributes","hasPatternOverridesDefaultBinding","bindings","source","replacePatternOverridesDefaultBinding","supportedAttributes","bindingsWithDefaults","bindingSource","useBlockBindingsUtils","clientId","contextClientId","blockClientId","updateBlockAttributes","getBlockAttributes","select","updateBlockBindings","metadata","currentBindings","newBindings","entries","forEach","attribute","binding","newMetadata","undefined","removeAllBlockBindings"],"sources":["@wordpress/block-editor/src/utils/block-bindings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { useBlockEditContext } from '../components/block-edit';\n\nconst DEFAULT_ATTRIBUTE = '__default';\nconst PATTERN_OVERRIDES_SOURCE = 'core/pattern-overrides';\nconst BLOCK_BINDINGS_ALLOWED_BLOCKS = {\n\t'core/paragraph': [ 'content' ],\n\t'core/heading': [ 'content' ],\n\t'core/image': [ 'id', 'url', 'title', 'alt' ],\n\t'core/button': [ 'url', 'text', 'linkTarget', 'rel' ],\n};\n\n/**\n * Checks if the given object is empty.\n *\n * @param {?Object} object The object to check.\n *\n * @return {boolean} Whether the object is empty.\n */\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Based on the given block name, checks if it is possible to bind the block.\n *\n * @param {string} blockName The name of the block.\n *\n * @return {boolean} Whether it is possible to bind the block to sources.\n */\nexport function canBindBlock( blockName ) {\n\treturn blockName in BLOCK_BINDINGS_ALLOWED_BLOCKS;\n}\n\n/**\n * Based on the given block name and attribute name, checks if it is possible to bind the block attribute.\n *\n * @param {string} blockName The name of the block.\n * @param {string} attributeName The name of attribute.\n *\n * @return {boolean} Whether it is possible to bind the block attribute.\n */\nexport function canBindAttribute( blockName, attributeName ) {\n\treturn (\n\t\tcanBindBlock( blockName ) &&\n\t\tBLOCK_BINDINGS_ALLOWED_BLOCKS[ blockName ].includes( attributeName )\n\t);\n}\n\n/**\n * Gets the bindable attributes for a given block.\n *\n * @param {string} blockName The name of the block.\n *\n * @return {string[]} The bindable attributes for the block.\n */\nexport function getBindableAttributes( blockName ) {\n\treturn BLOCK_BINDINGS_ALLOWED_BLOCKS[ blockName ];\n}\n\n/**\n * Checks if the block has the `__default` binding for pattern overrides.\n *\n * @param {?Record<string, object>} bindings A block's bindings from the metadata attribute.\n *\n * @return {boolean} Whether the block has the `__default` binding for pattern overrides.\n */\nexport function hasPatternOverridesDefaultBinding( bindings ) {\n\treturn bindings?.[ DEFAULT_ATTRIBUTE ]?.source === PATTERN_OVERRIDES_SOURCE;\n}\n\n/**\n * Returns the bindings with the `__default` binding for pattern overrides\n * replaced with the full-set of supported attributes. e.g.:\n *\n * - bindings passed in: `{ __default: { source: 'core/pattern-overrides' } }`\n * - bindings returned: `{ content: { source: 'core/pattern-overrides' } }`\n *\n * @param {string} blockName The block name (e.g. 'core/paragraph').\n * @param {?Record<string, object>} bindings A block's bindings from the metadata attribute.\n *\n * @return {Object} The bindings with default replaced for pattern overrides.\n */\nexport function replacePatternOverridesDefaultBinding( blockName, bindings ) {\n\t// The `__default` binding currently only works for pattern overrides.\n\tif ( hasPatternOverridesDefaultBinding( bindings ) ) {\n\t\tconst supportedAttributes = BLOCK_BINDINGS_ALLOWED_BLOCKS[ blockName ];\n\t\tconst bindingsWithDefaults = {};\n\t\tfor ( const attributeName of supportedAttributes ) {\n\t\t\t// If the block has mixed binding sources, retain any non pattern override bindings.\n\t\t\tconst bindingSource = bindings[ attributeName ]\n\t\t\t\t? bindings[ attributeName ]\n\t\t\t\t: { source: PATTERN_OVERRIDES_SOURCE };\n\t\t\tbindingsWithDefaults[ attributeName ] = bindingSource;\n\t\t}\n\n\t\treturn bindingsWithDefaults;\n\t}\n\n\treturn bindings;\n}\n\n/**\n * Contains utils to update the block `bindings` metadata.\n *\n * @typedef {Object} WPBlockBindingsUtils\n *\n * @property {Function} updateBlockBindings Updates the value of the bindings connected to block attributes.\n * @property {Function} removeAllBlockBindings Removes the bindings property of the `metadata` attribute.\n */\n\n/**\n * Retrieves the existing utils needed to update the block `bindings` metadata.\n * They can be used to create, modify, or remove connections from the existing block attributes.\n *\n * It contains the following utils:\n * - `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`.\n * - `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute.\n *\n * @since 6.7.0 Introduced in WordPress core.\n *\n * @param {?string} clientId Optional block client ID. If not set, it will use the current block client ID from the context.\n *\n * @return {?WPBlockBindingsUtils} Object containing the block bindings utils.\n *\n * @example\n * ```js\n * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n * const { updateBlockBindings, removeAllBlockBindings } = useBlockBindingsUtils();\n *\n * // Update url and alt attributes.\n * updateBlockBindings( {\n * url: {\n * source: 'core/post-meta',\n * args: {\n * key: 'url_custom_field',\n * },\n * },\n * alt: {\n * source: 'core/post-meta',\n * args: {\n * key: 'text_custom_field',\n * },\n * },\n * } );\n *\n * // Remove binding from url attribute.\n * updateBlockBindings( { url: undefined } );\n *\n * // Remove bindings from all attributes.\n * removeAllBlockBindings();\n * ```\n */\nexport function useBlockBindingsUtils( clientId ) {\n\tconst { clientId: contextClientId } = useBlockEditContext();\n\tconst blockClientId = clientId || contextClientId;\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { getBlockAttributes } = useRegistry().select( blockEditorStore );\n\n\t/**\n\t * Updates the value of the bindings connected to block attributes.\n\t * It removes the binding when the new value is `undefined`.\n\t *\n\t * @param {Object} bindings Bindings including the attributes to update and the new object.\n\t * @param {string} bindings.source The source name to connect to.\n\t * @param {Object} [bindings.args] Object containing the arguments needed by the source.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { updateBlockBindings } = useBlockBindingsUtils();\n\t * updateBlockBindings( {\n\t * url: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'url_custom_field',\n\t * },\n\t * \t },\n\t * alt: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'text_custom_field',\n\t * },\n\t * \t }\n\t * } );\n\t * ```\n\t */\n\tconst updateBlockBindings = ( bindings ) => {\n\t\tconst { metadata: { bindings: currentBindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( blockClientId );\n\t\tconst newBindings = { ...currentBindings };\n\n\t\tObject.entries( bindings ).forEach( ( [ attribute, binding ] ) => {\n\t\t\tif ( ! binding && newBindings[ attribute ] ) {\n\t\t\t\tdelete newBindings[ attribute ];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnewBindings[ attribute ] = binding;\n\t\t} );\n\n\t\tconst newMetadata = {\n\t\t\t...metadata,\n\t\t\tbindings: newBindings,\n\t\t};\n\n\t\tif ( isObjectEmpty( newMetadata.bindings ) ) {\n\t\t\tdelete newMetadata.bindings;\n\t\t}\n\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\tmetadata: isObjectEmpty( newMetadata ) ? undefined : newMetadata,\n\t\t} );\n\t};\n\n\t/**\n\t * Removes the bindings property of the `metadata` attribute.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { removeAllBlockBindings } = useBlockBindingsUtils();\n\t * removeAllBlockBindings();\n\t * ```\n\t */\n\tconst removeAllBlockBindings = () => {\n\t\tconst { metadata: { bindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( blockClientId );\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\tmetadata: isObjectEmpty( metadata ) ? undefined : metadata,\n\t\t} );\n\t};\n\n\treturn { updateBlockBindings, removeAllBlockBindings };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,iBAAiB;;AAE1D;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AACpD,SAASC,mBAAmB,QAAQ,0BAA0B;AAE9D,MAAMC,iBAAiB,GAAG,WAAW;AACrC,MAAMC,wBAAwB,GAAG,wBAAwB;AACzD,MAAMC,6BAA6B,GAAG;EACrC,gBAAgB,EAAE,CAAE,SAAS,CAAE;EAC/B,cAAc,EAAE,CAAE,SAAS,CAAE;EAC7B,YAAY,EAAE,CAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAE;EAC7C,aAAa,EAAE,CAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK;AACpD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,aAAaA,CAAEC,MAAM,EAAG;EAChC,OAAO,CAAEA,MAAM,IAAIC,MAAM,CAACC,IAAI,CAAEF,MAAO,CAAC,CA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CAAE,CAAC;IAEH,MAAMC,WAAW,GAAG;MACnB,GAAGP,QAAQ;MACXd,QAAQ,EAAEgB;IACX,CAAC;IAED,IAAK5B,aAAa,CAAEiC,WAAW,CAACrB,QAAS,CAAC,EAAG;MAC5C,OAAOqB,WAAW,CAACrB,QAAQ;IAC5B;IAEAU,qBAAqB,CAAED,aAAa,EAAE;MACrCK,QAAQ,EAAE1B,aAAa,CAAEiC,WAAY,CAAC,GAAGC,SAAS,GAAGD;IACtD,CAAE,CAAC;EACJ,CAAC;;EAED;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAME,sBAAsB,GAAGA,CAAA,KAAM;IACpC,MAAM;MAAET,QAAQ,EAAE;QAAEd,QAAQ;QAAE,GAAGc;MAAS,CAAC,GAAG,CAAC;IAAE,CAAC,GACjDH,kBAAkB,CAAEF,aAAc,CAAC;IACpCC,qBAAqB,CAAED,aAAa,EAAE;MACrCK,QAAQ,EAAE1B,aAAa,CAAE0B,QAAS,CAAC,GAAGQ,SAAS,GAAGR;IACnD,CAAE,CAAC;EACJ,CAAC;EAED,OAAO;IAAED,mBAAmB;IAAEU;EAAuB,CAAC;AACvD","ignoreList":[]}
1
+ {"version":3,"names":["useDispatch","useRegistry","store","blockEditorStore","useBlockEditContext","DEFAULT_ATTRIBUTE","PATTERN_OVERRIDES_SOURCE","BLOCK_BINDINGS_ALLOWED_BLOCKS","isObjectEmpty","object","Object","keys","length","canBindBlock","blockName","canBindAttribute","attributeName","includes","getBindableAttributes","hasPatternOverridesDefaultBinding","bindings","source","replacePatternOverridesDefaultBinding","supportedAttributes","bindingsWithDefaults","bindingSource","useBlockBindingsUtils","clientId","contextClientId","blockClientId","updateBlockAttributes","getBlockAttributes","select","updateBlockBindings","metadata","currentBindings","newBindings","entries","forEach","attribute","binding","newMetadata","undefined","removeAllBlockBindings"],"sources":["@wordpress/block-editor/src/utils/block-bindings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { useBlockEditContext } from '../components/block-edit';\n\nconst DEFAULT_ATTRIBUTE = '__default';\nconst PATTERN_OVERRIDES_SOURCE = 'core/pattern-overrides';\nconst BLOCK_BINDINGS_ALLOWED_BLOCKS = {\n\t'core/paragraph': [ 'content' ],\n\t'core/heading': [ 'content' ],\n\t'core/image': [ 'id', 'url', 'title', 'alt' ],\n\t'core/button': [ 'url', 'text', 'linkTarget', 'rel' ],\n\t'core/post-date': [ 'datetime' ],\n};\n\n/**\n * Checks if the given object is empty.\n *\n * @param {?Object} object The object to check.\n *\n * @return {boolean} Whether the object is empty.\n */\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Based on the given block name, checks if it is possible to bind the block.\n *\n * @param {string} blockName The name of the block.\n *\n * @return {boolean} Whether it is possible to bind the block to sources.\n */\nexport function canBindBlock( blockName ) {\n\treturn blockName in BLOCK_BINDINGS_ALLOWED_BLOCKS;\n}\n\n/**\n * Based on the given block name and attribute name, checks if it is possible to bind the block attribute.\n *\n * @param {string} blockName The name of the block.\n * @param {string} attributeName The name of attribute.\n *\n * @return {boolean} Whether it is possible to bind the block attribute.\n */\nexport function canBindAttribute( blockName, attributeName ) {\n\treturn (\n\t\tcanBindBlock( blockName ) &&\n\t\tBLOCK_BINDINGS_ALLOWED_BLOCKS[ blockName ].includes( attributeName )\n\t);\n}\n\n/**\n * Gets the bindable attributes for a given block.\n *\n * @param {string} blockName The name of the block.\n *\n * @return {string[]} The bindable attributes for the block.\n */\nexport function getBindableAttributes( blockName ) {\n\treturn BLOCK_BINDINGS_ALLOWED_BLOCKS[ blockName ];\n}\n\n/**\n * Checks if the block has the `__default` binding for pattern overrides.\n *\n * @param {?Record<string, object>} bindings A block's bindings from the metadata attribute.\n *\n * @return {boolean} Whether the block has the `__default` binding for pattern overrides.\n */\nexport function hasPatternOverridesDefaultBinding( bindings ) {\n\treturn bindings?.[ DEFAULT_ATTRIBUTE ]?.source === PATTERN_OVERRIDES_SOURCE;\n}\n\n/**\n * Returns the bindings with the `__default` binding for pattern overrides\n * replaced with the full-set of supported attributes. e.g.:\n *\n * - bindings passed in: `{ __default: { source: 'core/pattern-overrides' } }`\n * - bindings returned: `{ content: { source: 'core/pattern-overrides' } }`\n *\n * @param {string} blockName The block name (e.g. 'core/paragraph').\n * @param {?Record<string, object>} bindings A block's bindings from the metadata attribute.\n *\n * @return {Object} The bindings with default replaced for pattern overrides.\n */\nexport function replacePatternOverridesDefaultBinding( blockName, bindings ) {\n\t// The `__default` binding currently only works for pattern overrides.\n\tif ( hasPatternOverridesDefaultBinding( bindings ) ) {\n\t\tconst supportedAttributes = BLOCK_BINDINGS_ALLOWED_BLOCKS[ blockName ];\n\t\tconst bindingsWithDefaults = {};\n\t\tfor ( const attributeName of supportedAttributes ) {\n\t\t\t// If the block has mixed binding sources, retain any non pattern override bindings.\n\t\t\tconst bindingSource = bindings[ attributeName ]\n\t\t\t\t? bindings[ attributeName ]\n\t\t\t\t: { source: PATTERN_OVERRIDES_SOURCE };\n\t\t\tbindingsWithDefaults[ attributeName ] = bindingSource;\n\t\t}\n\n\t\treturn bindingsWithDefaults;\n\t}\n\n\treturn bindings;\n}\n\n/**\n * Contains utils to update the block `bindings` metadata.\n *\n * @typedef {Object} WPBlockBindingsUtils\n *\n * @property {Function} updateBlockBindings Updates the value of the bindings connected to block attributes.\n * @property {Function} removeAllBlockBindings Removes the bindings property of the `metadata` attribute.\n */\n\n/**\n * Retrieves the existing utils needed to update the block `bindings` metadata.\n * They can be used to create, modify, or remove connections from the existing block attributes.\n *\n * It contains the following utils:\n * - `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`.\n * - `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute.\n *\n * @since 6.7.0 Introduced in WordPress core.\n *\n * @param {?string} clientId Optional block client ID. If not set, it will use the current block client ID from the context.\n *\n * @return {?WPBlockBindingsUtils} Object containing the block bindings utils.\n *\n * @example\n * ```js\n * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n * const { updateBlockBindings, removeAllBlockBindings } = useBlockBindingsUtils();\n *\n * // Update url and alt attributes.\n * updateBlockBindings( {\n * url: {\n * source: 'core/post-meta',\n * args: {\n * key: 'url_custom_field',\n * },\n * },\n * alt: {\n * source: 'core/post-meta',\n * args: {\n * key: 'text_custom_field',\n * },\n * },\n * } );\n *\n * // Remove binding from url attribute.\n * updateBlockBindings( { url: undefined } );\n *\n * // Remove bindings from all attributes.\n * removeAllBlockBindings();\n * ```\n */\nexport function useBlockBindingsUtils( clientId ) {\n\tconst { clientId: contextClientId } = useBlockEditContext();\n\tconst blockClientId = clientId || contextClientId;\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { getBlockAttributes } = useRegistry().select( blockEditorStore );\n\n\t/**\n\t * Updates the value of the bindings connected to block attributes.\n\t * It removes the binding when the new value is `undefined`.\n\t *\n\t * @param {Object} bindings Bindings including the attributes to update and the new object.\n\t * @param {string} bindings.source The source name to connect to.\n\t * @param {Object} [bindings.args] Object containing the arguments needed by the source.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { updateBlockBindings } = useBlockBindingsUtils();\n\t * updateBlockBindings( {\n\t * url: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'url_custom_field',\n\t * },\n\t * \t },\n\t * alt: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'text_custom_field',\n\t * },\n\t * \t }\n\t * } );\n\t * ```\n\t */\n\tconst updateBlockBindings = ( bindings ) => {\n\t\tconst { metadata: { bindings: currentBindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( blockClientId );\n\t\tconst newBindings = { ...currentBindings };\n\n\t\tObject.entries( bindings ).forEach( ( [ attribute, binding ] ) => {\n\t\t\tif ( ! binding && newBindings[ attribute ] ) {\n\t\t\t\tdelete newBindings[ attribute ];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnewBindings[ attribute ] = binding;\n\t\t} );\n\n\t\tconst newMetadata = {\n\t\t\t...metadata,\n\t\t\tbindings: newBindings,\n\t\t};\n\n\t\tif ( isObjectEmpty( newMetadata.bindings ) ) {\n\t\t\tdelete newMetadata.bindings;\n\t\t}\n\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\tmetadata: isObjectEmpty( newMetadata ) ? undefined : newMetadata,\n\t\t} );\n\t};\n\n\t/**\n\t * Removes the bindings property of the `metadata` attribute.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { removeAllBlockBindings } = useBlockBindingsUtils();\n\t * removeAllBlockBindings();\n\t * ```\n\t */\n\tconst removeAllBlockBindings = () => {\n\t\tconst { metadata: { bindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( blockClientId );\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\tmetadata: isObjectEmpty( metadata ) ? undefined : metadata,\n\t\t} );\n\t};\n\n\treturn { updateBlockBindings, removeAllBlockBindings };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,iBAAiB;;AAE1D;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AACpD,SAASC,mBAAmB,QAAQ,0BAA0B;AAE9D,MAAMC,iBAAiB,GAAG,WAAW;AACrC,MAAMC,wBAAwB,GAAG,wBAAwB;AACzD,MAAMC,6BAA6B,GAAG;EACrC,gBAAgB,EAAE,CAAE,SAAS,CAAE;EAC/B,cAAc,EAAE,CAAE,SAAS,CAAE;EAC7B,YAAY,EAAE,CAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAE;EAC7C,aAAa,EAAE,CAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,CAAE;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AEC,OAAO,CAAE,KAAM;MACjE,IAAK,CAAEA,OAAO,IAAIJ,WAAW,CAAEG,SAAS,CAAE,EAAG;QAC5C,OAAOH,WAAW,CAAEG,SAAS,CAAE;QAC/B;MACD;MACAH,WAAW,CAAEG,SAAS,CAAE,GAAGC,OAAO;IACnC,CAAE,CAAC;IAEH,MAAMC,WAAW,GAAG;MACnB,GAAGP,QAAQ;MACXd,QAAQ,EAAEgB;IACX,CAAC;IAED,IAAK5B,aAAa,CAAEiC,WAAW,CAACrB,QAAS,CAAC,EAAG;MAC5C,OAAOqB,WAAW,CAACrB,QAAQ;IAC5B;IAEAU,qBAAqB,CAAED,aAAa,EAAE;MACrCK,QAAQ,EAAE1B,aAAa,CAAEiC,WAAY,CAAC,GAAGC,SAAS,GAAGD;IACtD,CAAE,CAAC;EACJ,CAAC;;EAED;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAME,sBAAsB,GAAGA,CAAA,KAAM;IACpC,MAAM;MAAET,QAAQ,EAAE;QAAEd,QAAQ;QAAE,GAAGc;MAAS,CAAC,GAAG,CAAC;IAAE,CAAC,GACjDH,kBAAkB,CAAEF,aAAc,CAAC;IACpCC,qBAAqB,CAAED,aAAa,EAAE;MACrCK,QAAQ,EAAE1B,aAAa,CAAE0B,QAAS,CAAC,GAAGQ,SAAS,GAAGR;IACnD,CAAE,CAAC;EACJ,CAAC;EAED,OAAO;IAAED,mBAAmB;IAAEU;EAAuB,CAAC;AACvD","ignoreList":[]}
@@ -666,12 +666,20 @@ iframe[name=editor-canvas] {
666
666
  z-index: 1000001;
667
667
  }
668
668
 
669
+ .block-editor-block-lock-modal__options {
670
+ border: 0;
671
+ padding: 0;
672
+ margin: 0;
673
+ }
674
+
669
675
  .block-editor-block-lock-modal__options legend {
670
676
  margin-bottom: 16px;
671
677
  padding: 0;
672
678
  }
673
679
 
674
680
  .block-editor-block-lock-modal__checklist {
681
+ list-style: none;
682
+ padding: 0;
675
683
  margin: 0;
676
684
  }
677
685
 
@@ -1528,7 +1536,7 @@ iframe[name=editor-canvas] {
1528
1536
  width: 100%;
1529
1537
  }
1530
1538
  .block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar {
1531
- height: 60px;
1539
+ height: 64px;
1532
1540
  box-sizing: border-box;
1533
1541
  padding: 16px;
1534
1542
  width: 100%;
@@ -1612,6 +1620,12 @@ iframe[name=editor-canvas] {
1612
1620
  width: 100%;
1613
1621
  }
1614
1622
 
1623
+ .block-editor-block-variation-transforms:where(fieldset) {
1624
+ border: 0;
1625
+ padding: 0;
1626
+ margin: 0;
1627
+ }
1628
+
1615
1629
  .block-editor-block-variation-transforms {
1616
1630
  padding: 0 52px 16px 16px;
1617
1631
  width: 100%;
@@ -1646,6 +1660,9 @@ iframe[name=editor-canvas] {
1646
1660
  }
1647
1661
 
1648
1662
  .components-border-radius-control {
1663
+ border: 0;
1664
+ padding: 0;
1665
+ margin: 0;
1649
1666
  margin-bottom: 12px;
1650
1667
  }
1651
1668
  .components-border-radius-control legend {
@@ -1686,6 +1703,9 @@ iframe[name=editor-canvas] {
1686
1703
  }
1687
1704
 
1688
1705
  .block-editor-color-gradient-control__fieldset {
1706
+ border: 0;
1707
+ padding: 0;
1708
+ margin: 0;
1689
1709
  min-width: 0;
1690
1710
  }
1691
1711
 
@@ -2090,7 +2110,7 @@ iframe[name=editor-canvas] {
2090
2110
  .editor-collapsible-block-toolbar .block-editor-grid-item-mover__move-vertical-button-container {
2091
2111
  height: 40px;
2092
2112
  position: relative;
2093
- top: -5px;
2113
+ top: -4px;
2094
2114
  }
2095
2115
  }
2096
2116
 
@@ -2216,18 +2236,18 @@ iframe[name=editor-canvas] {
2216
2236
  transition: all 0.05s ease-in-out;
2217
2237
  }
2218
2238
  }
2219
- .components-button.block-editor-block-types-list__item:disabled {
2239
+ .components-button.block-editor-block-types-list__item:disabled, .components-button.block-editor-block-types-list__item[aria-disabled=true] {
2220
2240
  opacity: 0.6;
2221
2241
  cursor: default;
2222
2242
  }
2223
- .components-button.block-editor-block-types-list__item:not(:disabled):hover .block-editor-block-types-list__item-title {
2243
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover .block-editor-block-types-list__item-title {
2224
2244
  color: var(--wp-admin-theme-color) !important;
2225
2245
  filter: brightness(0.95);
2226
2246
  }
2227
- .components-button.block-editor-block-types-list__item:not(:disabled):hover svg {
2247
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover svg {
2228
2248
  color: var(--wp-admin-theme-color) !important;
2229
2249
  }
2230
- .components-button.block-editor-block-types-list__item:not(:disabled):hover::after {
2250
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover::after {
2231
2251
  content: "";
2232
2252
  position: absolute;
2233
2253
  top: 0;
@@ -2239,15 +2259,15 @@ iframe[name=editor-canvas] {
2239
2259
  background: var(--wp-admin-theme-color);
2240
2260
  pointer-events: none;
2241
2261
  }
2242
- .components-button.block-editor-block-types-list__item:not(:disabled):focus {
2243
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2244
- }
2245
- .components-button.block-editor-block-types-list__item:not(:disabled).is-active {
2262
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]).is-active {
2246
2263
  color: #fff;
2247
2264
  background: #1e1e1e;
2248
2265
  outline: 2px solid transparent;
2249
2266
  outline-offset: -2px;
2250
2267
  }
2268
+ .components-button.block-editor-block-types-list__item:not(:disabled):focus {
2269
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2270
+ }
2251
2271
 
2252
2272
  .block-editor-block-types-list__item-icon {
2253
2273
  padding: 12px 20px;
@@ -2579,6 +2599,12 @@ iframe[name=editor-canvas] {
2579
2599
  position: relative;
2580
2600
  }
2581
2601
 
2602
+ .block-editor-link-control__settings {
2603
+ border: 0;
2604
+ padding: 0;
2605
+ margin: 0;
2606
+ }
2607
+
2582
2608
  .block-editor-link-control__setting {
2583
2609
  margin-bottom: 0;
2584
2610
  flex: 1;
@@ -2692,7 +2718,7 @@ iframe[name=editor-canvas] {
2692
2718
  color: var(--wp-block-synced-color);
2693
2719
  }
2694
2720
  .block-editor-list-view-leaf.is-synced:not(.is-selected) .block-editor-list-view-block-contents:focus::after {
2695
- box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
2721
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
2696
2722
  }
2697
2723
  .block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents, .block-editor-list-view-leaf.is-selected .components-button.has-icon {
2698
2724
  color: #fff;
@@ -2880,7 +2906,7 @@ iframe[name=editor-canvas] {
2880
2906
  .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,
2881
2907
  .block-editor-list-view-leaf .block-editor-list-view-block__mover-cell {
2882
2908
  line-height: 0;
2883
- width: 36px;
2909
+ width: 28px;
2884
2910
  vertical-align: middle;
2885
2911
  }
2886
2912
  .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell > *,
@@ -2893,20 +2919,6 @@ iframe[name=editor-canvas] {
2893
2919
  .block-editor-list-view-leaf .block-editor-list-view-block__mover-cell.is-visible > * {
2894
2920
  opacity: 1;
2895
2921
  }
2896
- .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,
2897
- .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell .components-button.has-icon,
2898
- .block-editor-list-view-leaf .block-editor-list-view-block__mover-cell,
2899
- .block-editor-list-view-leaf .block-editor-list-view-block__mover-cell .components-button.has-icon {
2900
- width: 24px;
2901
- min-width: 24px;
2902
- padding: 0;
2903
- }
2904
- .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell {
2905
- padding-left: 4px;
2906
- }
2907
- .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell .components-button.has-icon {
2908
- height: 24px;
2909
- }
2910
2922
  .block-editor-list-view-leaf .block-editor-list-view-block__mover-cell-alignment-wrapper {
2911
2923
  display: flex;
2912
2924
  height: 100%;
@@ -3632,6 +3644,13 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
3632
3644
  margin-bottom: 8px;
3633
3645
  }
3634
3646
 
3647
+ .block-editor-hooks__grid-layout-columns-and-rows-controls,
3648
+ .block-editor-hooks__grid-layout-minimum-width-control {
3649
+ border: 0;
3650
+ padding: 0;
3651
+ margin: 0;
3652
+ }
3653
+
3635
3654
  .block-editor__spacing-visualizer {
3636
3655
  position: absolute;
3637
3656
  top: 0;
@@ -4475,6 +4494,11 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
4475
4494
  }
4476
4495
  }
4477
4496
 
4497
+ .spacing-sizes-control {
4498
+ border: 0;
4499
+ padding: 0;
4500
+ margin: 0;
4501
+ }
4478
4502
  .spacing-sizes-control .spacing-sizes-control__custom-value-input,
4479
4503
  .spacing-sizes-control .spacing-sizes-control__label {
4480
4504
  margin-bottom: 0;
@@ -666,12 +666,20 @@ iframe[name=editor-canvas] {
666
666
  z-index: 1000001;
667
667
  }
668
668
 
669
+ .block-editor-block-lock-modal__options {
670
+ border: 0;
671
+ padding: 0;
672
+ margin: 0;
673
+ }
674
+
669
675
  .block-editor-block-lock-modal__options legend {
670
676
  margin-bottom: 16px;
671
677
  padding: 0;
672
678
  }
673
679
 
674
680
  .block-editor-block-lock-modal__checklist {
681
+ list-style: none;
682
+ padding: 0;
675
683
  margin: 0;
676
684
  }
677
685
 
@@ -1528,7 +1536,7 @@ iframe[name=editor-canvas] {
1528
1536
  width: 100%;
1529
1537
  }
1530
1538
  .block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar {
1531
- height: 60px;
1539
+ height: 64px;
1532
1540
  box-sizing: border-box;
1533
1541
  padding: 16px;
1534
1542
  width: 100%;
@@ -1612,6 +1620,12 @@ iframe[name=editor-canvas] {
1612
1620
  width: 100%;
1613
1621
  }
1614
1622
 
1623
+ .block-editor-block-variation-transforms:where(fieldset) {
1624
+ border: 0;
1625
+ padding: 0;
1626
+ margin: 0;
1627
+ }
1628
+
1615
1629
  .block-editor-block-variation-transforms {
1616
1630
  padding: 0 16px 16px 52px;
1617
1631
  width: 100%;
@@ -1646,6 +1660,9 @@ iframe[name=editor-canvas] {
1646
1660
  }
1647
1661
 
1648
1662
  .components-border-radius-control {
1663
+ border: 0;
1664
+ padding: 0;
1665
+ margin: 0;
1649
1666
  margin-bottom: 12px;
1650
1667
  }
1651
1668
  .components-border-radius-control legend {
@@ -1686,6 +1703,9 @@ iframe[name=editor-canvas] {
1686
1703
  }
1687
1704
 
1688
1705
  .block-editor-color-gradient-control__fieldset {
1706
+ border: 0;
1707
+ padding: 0;
1708
+ margin: 0;
1689
1709
  min-width: 0;
1690
1710
  }
1691
1711
 
@@ -2091,7 +2111,7 @@ iframe[name=editor-canvas] {
2091
2111
  .editor-collapsible-block-toolbar .block-editor-grid-item-mover__move-vertical-button-container {
2092
2112
  height: 40px;
2093
2113
  position: relative;
2094
- top: -5px;
2114
+ top: -4px;
2095
2115
  }
2096
2116
  }
2097
2117
 
@@ -2217,18 +2237,18 @@ iframe[name=editor-canvas] {
2217
2237
  transition: all 0.05s ease-in-out;
2218
2238
  }
2219
2239
  }
2220
- .components-button.block-editor-block-types-list__item:disabled {
2240
+ .components-button.block-editor-block-types-list__item:disabled, .components-button.block-editor-block-types-list__item[aria-disabled=true] {
2221
2241
  opacity: 0.6;
2222
2242
  cursor: default;
2223
2243
  }
2224
- .components-button.block-editor-block-types-list__item:not(:disabled):hover .block-editor-block-types-list__item-title {
2244
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover .block-editor-block-types-list__item-title {
2225
2245
  color: var(--wp-admin-theme-color) !important;
2226
2246
  filter: brightness(0.95);
2227
2247
  }
2228
- .components-button.block-editor-block-types-list__item:not(:disabled):hover svg {
2248
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover svg {
2229
2249
  color: var(--wp-admin-theme-color) !important;
2230
2250
  }
2231
- .components-button.block-editor-block-types-list__item:not(:disabled):hover::after {
2251
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover::after {
2232
2252
  content: "";
2233
2253
  position: absolute;
2234
2254
  top: 0;
@@ -2240,15 +2260,15 @@ iframe[name=editor-canvas] {
2240
2260
  background: var(--wp-admin-theme-color);
2241
2261
  pointer-events: none;
2242
2262
  }
2243
- .components-button.block-editor-block-types-list__item:not(:disabled):focus {
2244
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2245
- }
2246
- .components-button.block-editor-block-types-list__item:not(:disabled).is-active {
2263
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]).is-active {
2247
2264
  color: #fff;
2248
2265
  background: #1e1e1e;
2249
2266
  outline: 2px solid transparent;
2250
2267
  outline-offset: -2px;
2251
2268
  }
2269
+ .components-button.block-editor-block-types-list__item:not(:disabled):focus {
2270
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2271
+ }
2252
2272
 
2253
2273
  .block-editor-block-types-list__item-icon {
2254
2274
  padding: 12px 20px;
@@ -2580,6 +2600,12 @@ iframe[name=editor-canvas] {
2580
2600
  position: relative;
2581
2601
  }
2582
2602
 
2603
+ .block-editor-link-control__settings {
2604
+ border: 0;
2605
+ padding: 0;
2606
+ margin: 0;
2607
+ }
2608
+
2583
2609
  .block-editor-link-control__setting {
2584
2610
  margin-bottom: 0;
2585
2611
  flex: 1;
@@ -2693,7 +2719,7 @@ iframe[name=editor-canvas] {
2693
2719
  color: var(--wp-block-synced-color);
2694
2720
  }
2695
2721
  .block-editor-list-view-leaf.is-synced:not(.is-selected) .block-editor-list-view-block-contents:focus::after {
2696
- box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
2722
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
2697
2723
  }
2698
2724
  .block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents, .block-editor-list-view-leaf.is-selected .components-button.has-icon {
2699
2725
  color: #fff;
@@ -2881,7 +2907,7 @@ iframe[name=editor-canvas] {
2881
2907
  .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,
2882
2908
  .block-editor-list-view-leaf .block-editor-list-view-block__mover-cell {
2883
2909
  line-height: 0;
2884
- width: 36px;
2910
+ width: 28px;
2885
2911
  vertical-align: middle;
2886
2912
  }
2887
2913
  .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell > *,
@@ -2894,20 +2920,6 @@ iframe[name=editor-canvas] {
2894
2920
  .block-editor-list-view-leaf .block-editor-list-view-block__mover-cell.is-visible > * {
2895
2921
  opacity: 1;
2896
2922
  }
2897
- .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,
2898
- .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell .components-button.has-icon,
2899
- .block-editor-list-view-leaf .block-editor-list-view-block__mover-cell,
2900
- .block-editor-list-view-leaf .block-editor-list-view-block__mover-cell .components-button.has-icon {
2901
- width: 24px;
2902
- min-width: 24px;
2903
- padding: 0;
2904
- }
2905
- .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell {
2906
- padding-right: 4px;
2907
- }
2908
- .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell .components-button.has-icon {
2909
- height: 24px;
2910
- }
2911
2923
  .block-editor-list-view-leaf .block-editor-list-view-block__mover-cell-alignment-wrapper {
2912
2924
  display: flex;
2913
2925
  height: 100%;
@@ -3634,6 +3646,13 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
3634
3646
  margin-bottom: 8px;
3635
3647
  }
3636
3648
 
3649
+ .block-editor-hooks__grid-layout-columns-and-rows-controls,
3650
+ .block-editor-hooks__grid-layout-minimum-width-control {
3651
+ border: 0;
3652
+ padding: 0;
3653
+ margin: 0;
3654
+ }
3655
+
3637
3656
  .block-editor__spacing-visualizer {
3638
3657
  position: absolute;
3639
3658
  top: 0;
@@ -4477,6 +4496,11 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
4477
4496
  }
4478
4497
  }
4479
4498
 
4499
+ .spacing-sizes-control {
4500
+ border: 0;
4501
+ padding: 0;
4502
+ margin: 0;
4503
+ }
4480
4504
  .spacing-sizes-control .spacing-sizes-control__custom-value-input,
4481
4505
  .spacing-sizes-control .spacing-sizes-control__label {
4482
4506
  margin-bottom: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-editor",
3
- "version": "14.21.1-next.719a03cbe.0",
3
+ "version": "15.0.1-next.46f643fa0.0",
4
4
  "description": "Generic block editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -37,38 +37,38 @@
37
37
  "@emotion/react": "^11.7.1",
38
38
  "@emotion/styled": "^11.6.0",
39
39
  "@react-spring/web": "^9.4.5",
40
- "@wordpress/a11y": "^4.26.1-next.719a03cbe.0",
41
- "@wordpress/api-fetch": "^7.26.1-next.719a03cbe.0",
42
- "@wordpress/blob": "^4.26.1-next.719a03cbe.0",
43
- "@wordpress/block-serialization-default-parser": "^5.26.1-next.719a03cbe.0",
44
- "@wordpress/blocks": "^14.15.1-next.719a03cbe.0",
45
- "@wordpress/commands": "^1.26.1-next.719a03cbe.0",
46
- "@wordpress/components": "^29.13.1-next.719a03cbe.0",
47
- "@wordpress/compose": "^7.26.1-next.719a03cbe.0",
48
- "@wordpress/data": "^10.26.1-next.719a03cbe.0",
49
- "@wordpress/date": "^5.26.1-next.719a03cbe.0",
50
- "@wordpress/deprecated": "^4.26.1-next.719a03cbe.0",
51
- "@wordpress/dom": "^4.26.1-next.719a03cbe.0",
52
- "@wordpress/element": "^6.26.1-next.719a03cbe.0",
53
- "@wordpress/escape-html": "^3.26.1-next.719a03cbe.0",
54
- "@wordpress/hooks": "^4.26.1-next.719a03cbe.0",
55
- "@wordpress/html-entities": "^4.26.1-next.719a03cbe.0",
56
- "@wordpress/i18n": "^6.0.1-next.719a03cbe.0",
57
- "@wordpress/icons": "^10.26.2-next.719a03cbe.0",
58
- "@wordpress/is-shallow-equal": "^5.26.1-next.719a03cbe.0",
59
- "@wordpress/keyboard-shortcuts": "^5.26.1-next.719a03cbe.0",
60
- "@wordpress/keycodes": "^4.26.1-next.719a03cbe.0",
61
- "@wordpress/notices": "^5.26.1-next.719a03cbe.0",
62
- "@wordpress/preferences": "^4.26.1-next.719a03cbe.0",
63
- "@wordpress/priority-queue": "^3.26.1-next.719a03cbe.0",
64
- "@wordpress/private-apis": "^1.26.1-next.719a03cbe.0",
65
- "@wordpress/rich-text": "^7.26.1-next.719a03cbe.0",
66
- "@wordpress/style-engine": "^2.26.1-next.719a03cbe.0",
67
- "@wordpress/token-list": "^3.26.1-next.719a03cbe.0",
68
- "@wordpress/upload-media": "^0.11.1-next.719a03cbe.0",
69
- "@wordpress/url": "^4.26.1-next.719a03cbe.0",
70
- "@wordpress/warning": "^3.26.1-next.719a03cbe.0",
71
- "@wordpress/wordcount": "^4.26.1-next.719a03cbe.0",
40
+ "@wordpress/a11y": "^4.27.1-next.46f643fa0.0",
41
+ "@wordpress/api-fetch": "^7.27.1-next.46f643fa0.0",
42
+ "@wordpress/blob": "^4.27.1-next.46f643fa0.0",
43
+ "@wordpress/block-serialization-default-parser": "^5.27.1-next.46f643fa0.0",
44
+ "@wordpress/blocks": "^15.0.1-next.46f643fa0.0",
45
+ "@wordpress/commands": "^1.27.1-next.46f643fa0.0",
46
+ "@wordpress/components": "^30.1.1-next.46f643fa0.0",
47
+ "@wordpress/compose": "^7.27.1-next.46f643fa0.0",
48
+ "@wordpress/data": "^10.27.1-next.46f643fa0.0",
49
+ "@wordpress/date": "^5.27.1-next.46f643fa0.0",
50
+ "@wordpress/deprecated": "^4.27.1-next.46f643fa0.0",
51
+ "@wordpress/dom": "^4.27.1-next.46f643fa0.0",
52
+ "@wordpress/element": "^6.27.1-next.46f643fa0.0",
53
+ "@wordpress/escape-html": "^3.27.1-next.46f643fa0.0",
54
+ "@wordpress/hooks": "^4.27.1-next.46f643fa0.0",
55
+ "@wordpress/html-entities": "^4.27.1-next.46f643fa0.0",
56
+ "@wordpress/i18n": "^6.0.1-next.46f643fa0.0",
57
+ "@wordpress/icons": "^10.27.2-next.46f643fa0.0",
58
+ "@wordpress/is-shallow-equal": "^5.27.1-next.46f643fa0.0",
59
+ "@wordpress/keyboard-shortcuts": "^5.27.1-next.46f643fa0.0",
60
+ "@wordpress/keycodes": "^4.27.1-next.46f643fa0.0",
61
+ "@wordpress/notices": "^5.27.1-next.46f643fa0.0",
62
+ "@wordpress/preferences": "^4.27.1-next.46f643fa0.0",
63
+ "@wordpress/priority-queue": "^3.27.1-next.46f643fa0.0",
64
+ "@wordpress/private-apis": "^1.27.1-next.46f643fa0.0",
65
+ "@wordpress/rich-text": "^7.27.1-next.46f643fa0.0",
66
+ "@wordpress/style-engine": "^2.27.1-next.46f643fa0.0",
67
+ "@wordpress/token-list": "^3.27.1-next.46f643fa0.0",
68
+ "@wordpress/upload-media": "^0.12.1-next.46f643fa0.0",
69
+ "@wordpress/url": "^4.27.1-next.46f643fa0.0",
70
+ "@wordpress/warning": "^3.27.1-next.46f643fa0.0",
71
+ "@wordpress/wordcount": "^4.27.1-next.46f643fa0.0",
72
72
  "change-case": "^4.1.2",
73
73
  "clsx": "^2.1.1",
74
74
  "colord": "^2.7.0",
@@ -91,5 +91,5 @@
91
91
  "publishConfig": {
92
92
  "access": "public"
93
93
  },
94
- "gitHead": "5e146e949c2765411a8310bcc2641a88d036a6d9"
94
+ "gitHead": "17e600e091675c5e3d809adfea23ac456bbeae19"
95
95
  }
@@ -114,7 +114,7 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
114
114
  useBlockRefProvider( clientId ),
115
115
  useFocusHandler( clientId ),
116
116
  useEventHandlers( { clientId, isSelected } ),
117
- useIsHovered( { clientId } ),
117
+ useIsHovered(),
118
118
  useIntersectionObserver(),
119
119
  useMovingAnimation( { triggerAnimationOnChange: index, clientId } ),
120
120
  useDisabled( { isDisabled: ! hasOverlay } ),
@@ -2,37 +2,24 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { useRefEffect } from '@wordpress/compose';
5
- import { useDispatch } from '@wordpress/data';
6
5
 
7
- /**
8
- * Internal dependencies
9
- */
10
- import { store as blockEditorStore } from '../../../store';
6
+ function listener( event ) {
7
+ if ( event.defaultPrevented ) {
8
+ return;
9
+ }
10
+
11
+ event.preventDefault();
12
+ event.currentTarget.classList.toggle(
13
+ 'is-hovered',
14
+ event.type === 'mouseover'
15
+ );
16
+ }
11
17
 
12
18
  /*
13
19
  * Adds `is-hovered` class when the block is hovered and in navigation or
14
20
  * outline mode.
15
21
  */
16
- export function useIsHovered( { clientId } ) {
17
- const { hoverBlock } = useDispatch( blockEditorStore );
18
-
19
- function listener( event ) {
20
- if ( event.defaultPrevented ) {
21
- return;
22
- }
23
-
24
- const action = event.type === 'mouseover' ? 'add' : 'remove';
25
-
26
- event.preventDefault();
27
- event.currentTarget.classList[ action ]( 'is-hovered' );
28
-
29
- if ( action === 'add' ) {
30
- hoverBlock( clientId );
31
- } else {
32
- hoverBlock( null );
33
- }
34
- }
35
-
22
+ export function useIsHovered() {
36
23
  return useRefEffect( ( node ) => {
37
24
  node.addEventListener( 'mouseout', listener );
38
25
  node.addEventListener( 'mouseover', listener );
@@ -43,7 +30,6 @@ export function useIsHovered( { clientId } ) {
43
30
 
44
31
  // Remove class in case it lingers.
45
32
  node.classList.remove( 'is-hovered' );
46
- hoverBlock( null );
47
33
  };
48
34
  }, [] );
49
35
  }
@@ -49,7 +49,6 @@ export function ZoomOutSeparator( {
49
49
  return {
50
50
  sectionRootClientId: root,
51
51
  sectionClientIds: sectionRootClientIds,
52
- blockOrder: getBlockOrder( root ),
53
52
  insertionPoint: getInsertionPoint(),
54
53
  blockInsertionPoint: getBlockInsertionPoint(),
55
54
  blockInsertionPointVisible: isBlockInsertionPointVisible(),
@@ -2,12 +2,22 @@
2
2
  z-index: z-index(".block-editor-block-lock-modal");
3
3
  }
4
4
 
5
+ .block-editor-block-lock-modal__options {
6
+ // Reset `fieldset` browser defaults.
7
+ border: 0;
8
+ padding: 0;
9
+ margin: 0;
10
+ }
11
+
5
12
  .block-editor-block-lock-modal__options legend {
6
13
  margin-bottom: $grid-unit-20;
7
14
  padding: 0;
8
15
  }
9
16
 
10
17
  .block-editor-block-lock-modal__checklist {
18
+ // Reset `ul` browser defaults.
19
+ list-style: none;
20
+ padding: 0;
11
21
  margin: 0;
12
22
  }
13
23
 
@@ -88,6 +88,7 @@ export function BlockSettingsDropdown( {
88
88
  selectedBlockClientIds,
89
89
  openedBlockSettingsMenu,
90
90
  isContentOnly,
91
+ isZoomOut,
91
92
  } = useSelect(
92
93
  ( select ) => {
93
94
  const {
@@ -98,6 +99,7 @@ export function BlockSettingsDropdown( {
98
99
  getBlockAttributes,
99
100
  getOpenedBlockSettingsMenu,
100
101
  getBlockEditingMode,
102
+ isZoomOut: _isZoomOut,
101
103
  } = unlock( select( blockEditorStore ) );
102
104
 
103
105
  const { getActiveBlockVariation } = select( blocksStore );
@@ -122,6 +124,7 @@ export function BlockSettingsDropdown( {
122
124
  openedBlockSettingsMenu: getOpenedBlockSettingsMenu(),
123
125
  isContentOnly:
124
126
  getBlockEditingMode( firstBlockClientId ) === 'contentOnly',
127
+ isZoomOut: _isZoomOut(),
125
128
  };
126
129
  },
127
130
  [ firstBlockClientId ]
@@ -301,7 +304,7 @@ export function BlockSettingsDropdown( {
301
304
  { __( 'Duplicate' ) }
302
305
  </MenuItem>
303
306
  ) }
304
- { canInsertBlock && ! isContentOnly && (
307
+ { canInsertBlock && ! isZoomOut && (
305
308
  <>
306
309
  <MenuItem
307
310
  onClick={ pipe(