@wordpress/block-editor 15.4.1-next.f56bd8138.0 → 15.5.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 (106) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/background-image-control/index.js +51 -24
  3. package/build/components/background-image-control/index.js.map +1 -1
  4. package/build/components/block-edit/edit.js +13 -5
  5. package/build/components/block-edit/edit.js.map +1 -1
  6. package/build/components/block-list/block.js +14 -4
  7. package/build/components/block-list/block.js.map +1 -1
  8. package/build/components/block-list/use-block-props/index.js +5 -4
  9. package/build/components/block-list/use-block-props/index.js.map +1 -1
  10. package/build/components/block-settings-menu-controls/index.js +10 -2
  11. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  12. package/build/components/block-toolbar/index.js +5 -0
  13. package/build/components/block-toolbar/index.js.map +1 -1
  14. package/build/components/block-visibility/index.js +21 -0
  15. package/build/components/block-visibility/index.js.map +1 -0
  16. package/build/components/block-visibility/menu-item.js +52 -0
  17. package/build/components/block-visibility/menu-item.js.map +1 -0
  18. package/build/components/block-visibility/toolbar.js +88 -0
  19. package/build/components/block-visibility/toolbar.js.map +1 -0
  20. package/build/components/inspector-controls-tabs/index.js +23 -0
  21. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  22. package/build/components/link-control/index.js +1 -1
  23. package/build/components/link-control/index.js.map +1 -1
  24. package/build/components/list-view/block-select-button.js +23 -4
  25. package/build/components/list-view/block-select-button.js.map +1 -1
  26. package/build/components/list-view/block.js +9 -3
  27. package/build/components/list-view/block.js.map +1 -1
  28. package/build/components/rich-text/index.js +4 -2
  29. package/build/components/rich-text/index.js.map +1 -1
  30. package/build/components/use-block-drop-zone/index.js +5 -1
  31. package/build/components/use-block-drop-zone/index.js.map +1 -1
  32. package/build/hooks/block-bindings.js +9 -4
  33. package/build/hooks/block-bindings.js.map +1 -1
  34. package/build/store/private-selectors.js +19 -1
  35. package/build/store/private-selectors.js.map +1 -1
  36. package/build/store/reducer.js +1 -5
  37. package/build/store/reducer.js.map +1 -1
  38. package/build/utils/block-bindings.js +3 -48
  39. package/build/utils/block-bindings.js.map +1 -1
  40. package/build-module/components/background-image-control/index.js +52 -25
  41. package/build-module/components/background-image-control/index.js.map +1 -1
  42. package/build-module/components/block-edit/edit.js +14 -6
  43. package/build-module/components/block-edit/edit.js.map +1 -1
  44. package/build-module/components/block-list/block.js +14 -4
  45. package/build-module/components/block-list/block.js.map +1 -1
  46. package/build-module/components/block-list/use-block-props/index.js +5 -4
  47. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  48. package/build-module/components/block-settings-menu-controls/index.js +10 -2
  49. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  50. package/build-module/components/block-toolbar/index.js +5 -0
  51. package/build-module/components/block-toolbar/index.js.map +1 -1
  52. package/build-module/components/block-visibility/index.js +3 -0
  53. package/build-module/components/block-visibility/index.js.map +1 -0
  54. package/build-module/components/block-visibility/menu-item.js +45 -0
  55. package/build-module/components/block-visibility/menu-item.js.map +1 -0
  56. package/build-module/components/block-visibility/toolbar.js +81 -0
  57. package/build-module/components/block-visibility/toolbar.js.map +1 -0
  58. package/build-module/components/inspector-controls-tabs/index.js +23 -0
  59. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  60. package/build-module/components/link-control/index.js +1 -1
  61. package/build-module/components/link-control/index.js.map +1 -1
  62. package/build-module/components/list-view/block-select-button.js +24 -5
  63. package/build-module/components/list-view/block-select-button.js.map +1 -1
  64. package/build-module/components/list-view/block.js +9 -3
  65. package/build-module/components/list-view/block.js.map +1 -1
  66. package/build-module/components/rich-text/index.js +4 -2
  67. package/build-module/components/rich-text/index.js.map +1 -1
  68. package/build-module/components/use-block-drop-zone/index.js +6 -2
  69. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  70. package/build-module/hooks/block-bindings.js +10 -5
  71. package/build-module/hooks/block-bindings.js.map +1 -1
  72. package/build-module/store/private-selectors.js +18 -1
  73. package/build-module/store/private-selectors.js.map +1 -1
  74. package/build-module/store/reducer.js +1 -5
  75. package/build-module/store/reducer.js.map +1 -1
  76. package/build-module/utils/block-bindings.js +3 -45
  77. package/build-module/utils/block-bindings.js.map +1 -1
  78. package/build-style/content-rtl.css +13 -0
  79. package/build-style/content.css +13 -0
  80. package/build-style/style-rtl.css +27 -0
  81. package/build-style/style.css +27 -0
  82. package/package.json +34 -34
  83. package/src/components/background-image-control/index.js +54 -27
  84. package/src/components/background-image-control/style.scss +28 -0
  85. package/src/components/block-edit/edit.js +23 -5
  86. package/src/components/block-list/block.js +16 -0
  87. package/src/components/block-list/content.scss +19 -0
  88. package/src/components/block-list/use-block-props/index.js +9 -9
  89. package/src/components/block-settings-menu-controls/index.js +21 -1
  90. package/src/components/block-toolbar/index.js +9 -0
  91. package/src/components/block-visibility/index.js +2 -0
  92. package/src/components/block-visibility/menu-item.js +53 -0
  93. package/src/components/block-visibility/toolbar.js +88 -0
  94. package/src/components/inspector-controls-tabs/index.js +33 -1
  95. package/src/components/link-control/index.js +1 -1
  96. package/src/components/link-control/test/index.js +4 -4
  97. package/src/components/list-view/block-select-button.js +32 -9
  98. package/src/components/list-view/block.js +24 -14
  99. package/src/components/list-view/style.scss +1 -0
  100. package/src/components/media-replace-flow/test/index.js +1 -1
  101. package/src/components/rich-text/index.js +6 -2
  102. package/src/components/use-block-drop-zone/index.js +14 -1
  103. package/src/hooks/block-bindings.js +49 -43
  104. package/src/store/private-selectors.js +21 -1
  105. package/src/store/reducer.js +1 -6
  106. package/src/utils/block-bindings.js +6 -48
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","getBlockDefaultClassName","getBlockType","hasBlockSupport","store","blocksStore","withFilters","useRegistry","useSelect","useCallback","useContext","useMemo","BlockContext","isURLLike","canBindAttribute","hasPatternOverridesDefaultBinding","replacePatternOverridesDefaultBinding","unlock","jsx","_jsx","DEFAULT_BLOCK_CONTEXT","Edit","props","name","blockType","Component","edit","save","EditWithFilters","EditWithGeneratedProps","clientId","attributes","setAttributes","registry","blockContext","registeredSources","select","getAllBlockBindingsSources","blockBindings","context","hasPatternOverrides","computedContext","usesContext","Object","fromEntries","entries","filter","key","includes","metadata","bindings","values","forEach","binding","source","computedAttributes","attributesFromSources","blockBindingsBySource","Map","attributeName","sourceName","args","sourceArgs","set","get","size","getValues","keys","attr","label","value","setBoundAttributes","nextAttributes","batch","keptAttributes","newValue","setValues","dispatch","hasParentPattern","length","caption","href","apiVersion","generatedClassName","className"],"sources":["@wordpress/block-editor/src/components/block-edit/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetBlockDefaultClassName,\n\tgetBlockType,\n\thasBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { withFilters } from '@wordpress/components';\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { useCallback, useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockContext from '../block-context';\nimport isURLLike from '../link-control/is-url-like';\nimport {\n\tcanBindAttribute,\n\thasPatternOverridesDefaultBinding,\n\treplacePatternOverridesDefaultBinding,\n} from '../../utils/block-bindings';\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Default value used for blocks which do not define their own context needs,\n * used to guarantee that a block's `context` prop will always be an object. It\n * is assigned as a constant since it is always expected to be an empty object,\n * and in order to avoid unnecessary React reconciliations of a changing object.\n *\n * @type {{}}\n */\nconst DEFAULT_BLOCK_CONTEXT = {};\n\nconst Edit = ( props ) => {\n\tconst { name } = props;\n\tconst blockType = getBlockType( name );\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\t// `edit` and `save` are functions or components describing the markup\n\t// with which a block is displayed. If `blockType` is valid, assign\n\t// them preferentially as the render value for the block.\n\tconst Component = blockType.edit || blockType.save;\n\n\treturn <Component { ...props } />;\n};\n\nconst EditWithFilters = withFilters( 'editor.BlockEdit' )( Edit );\n\nconst EditWithGeneratedProps = ( props ) => {\n\tconst { name, clientId, attributes, setAttributes } = props;\n\tconst registry = useRegistry();\n\tconst blockType = getBlockType( name );\n\tconst blockContext = useContext( BlockContext );\n\tconst registeredSources = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( blocksStore ) ).getAllBlockBindingsSources(),\n\t\t[]\n\t);\n\n\tconst { blockBindings, context, hasPatternOverrides } = useMemo( () => {\n\t\t// Assign context values using the block type's declared context needs.\n\t\tconst computedContext = blockType?.usesContext\n\t\t\t? Object.fromEntries(\n\t\t\t\t\tObject.entries( blockContext ).filter( ( [ key ] ) =>\n\t\t\t\t\t\tblockType.usesContext.includes( key )\n\t\t\t\t\t)\n\t\t\t )\n\t\t\t: DEFAULT_BLOCK_CONTEXT;\n\t\t// Add context requested by Block Bindings sources.\n\t\tif ( attributes?.metadata?.bindings ) {\n\t\t\tObject.values( attributes?.metadata?.bindings || {} ).forEach(\n\t\t\t\t( binding ) => {\n\t\t\t\t\tregisteredSources[ binding?.source ]?.usesContext?.forEach(\n\t\t\t\t\t\t( key ) => {\n\t\t\t\t\t\t\tcomputedContext[ key ] = blockContext[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\treturn {\n\t\t\tblockBindings: replacePatternOverridesDefaultBinding(\n\t\t\t\tname,\n\t\t\t\tattributes?.metadata?.bindings\n\t\t\t),\n\t\t\tcontext: computedContext,\n\t\t\thasPatternOverrides: hasPatternOverridesDefaultBinding(\n\t\t\t\tattributes?.metadata?.bindings\n\t\t\t),\n\t\t};\n\t}, [\n\t\tname,\n\t\tblockType?.usesContext,\n\t\tblockContext,\n\t\tattributes?.metadata?.bindings,\n\t\tregisteredSources,\n\t] );\n\n\tconst computedAttributes = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! blockBindings ) {\n\t\t\t\treturn attributes;\n\t\t\t}\n\n\t\t\tconst attributesFromSources = {};\n\t\t\tconst blockBindingsBySource = new Map();\n\n\t\t\tfor ( const [ attributeName, binding ] of Object.entries(\n\t\t\t\tblockBindings\n\t\t\t) ) {\n\t\t\t\tconst { source: sourceName, args: sourceArgs } = binding;\n\t\t\t\tconst source = registeredSources[ sourceName ];\n\t\t\t\tif ( ! source || ! canBindAttribute( name, attributeName ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tblockBindingsBySource.set( source, {\n\t\t\t\t\t...blockBindingsBySource.get( source ),\n\t\t\t\t\t[ attributeName ]: {\n\t\t\t\t\t\targs: sourceArgs,\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( blockBindingsBySource.size ) {\n\t\t\t\tfor ( const [ source, bindings ] of blockBindingsBySource ) {\n\t\t\t\t\t// Get values in batch if the source supports it.\n\t\t\t\t\tlet values = {};\n\t\t\t\t\tif ( ! source.getValues ) {\n\t\t\t\t\t\tObject.keys( bindings ).forEach( ( attr ) => {\n\t\t\t\t\t\t\t// Default to the the source label when `getValues` doesn't exist.\n\t\t\t\t\t\t\tvalues[ attr ] = source.label;\n\t\t\t\t\t\t} );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalues = source.getValues( {\n\t\t\t\t\t\t\tselect,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\tbindings,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( const [ attributeName, value ] of Object.entries(\n\t\t\t\t\t\tvalues\n\t\t\t\t\t) ) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tattributeName === 'url' &&\n\t\t\t\t\t\t\t( ! value || ! isURLLike( value ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// Return null if value is not a valid URL.\n\t\t\t\t\t\t\tattributesFromSources[ attributeName ] = null;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tattributesFromSources[ attributeName ] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\t...attributesFromSources,\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tattributes,\n\t\t\tblockBindings,\n\t\t\tclientId,\n\t\t\tcontext,\n\t\t\tname,\n\t\t\tregisteredSources,\n\t\t]\n\t);\n\n\tconst setBoundAttributes = useCallback(\n\t\t( nextAttributes ) => {\n\t\t\tif ( ! blockBindings ) {\n\t\t\t\tsetAttributes( nextAttributes );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tregistry.batch( () => {\n\t\t\t\tconst keptAttributes = { ...nextAttributes };\n\t\t\t\tconst blockBindingsBySource = new Map();\n\n\t\t\t\t// Loop only over the updated attributes to avoid modifying the bound ones that haven't changed.\n\t\t\t\tfor ( const [ attributeName, newValue ] of Object.entries(\n\t\t\t\t\tkeptAttributes\n\t\t\t\t) ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t! blockBindings[ attributeName ] ||\n\t\t\t\t\t\t! canBindAttribute( name, attributeName )\n\t\t\t\t\t) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst binding = blockBindings[ attributeName ];\n\t\t\t\t\tconst source = registeredSources[ binding?.source ];\n\t\t\t\t\tif ( ! source?.setValues ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tblockBindingsBySource.set( source, {\n\t\t\t\t\t\t...blockBindingsBySource.get( source ),\n\t\t\t\t\t\t[ attributeName ]: {\n\t\t\t\t\t\t\targs: binding.args,\n\t\t\t\t\t\t\tnewValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t\t\tdelete keptAttributes[ attributeName ];\n\t\t\t\t}\n\n\t\t\t\tif ( blockBindingsBySource.size ) {\n\t\t\t\t\tfor ( const [\n\t\t\t\t\t\tsource,\n\t\t\t\t\t\tbindings,\n\t\t\t\t\t] of blockBindingsBySource ) {\n\t\t\t\t\t\tsource.setValues( {\n\t\t\t\t\t\t\tselect: registry.select,\n\t\t\t\t\t\t\tdispatch: registry.dispatch,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\tbindings,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst hasParentPattern = !! context[ 'pattern/overrides' ];\n\n\t\t\t\tif (\n\t\t\t\t\t// Don't update non-connected attributes if the block is using pattern overrides\n\t\t\t\t\t// and the editing is happening while overriding the pattern (not editing the original).\n\t\t\t\t\t! ( hasPatternOverrides && hasParentPattern ) &&\n\t\t\t\t\tObject.keys( keptAttributes ).length\n\t\t\t\t) {\n\t\t\t\t\t// Don't update caption and href until they are supported.\n\t\t\t\t\tif ( hasPatternOverrides ) {\n\t\t\t\t\t\tdelete keptAttributes.caption;\n\t\t\t\t\t\tdelete keptAttributes.href;\n\t\t\t\t\t}\n\t\t\t\t\tsetAttributes( keptAttributes );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\t[\n\t\t\tblockBindings,\n\t\t\tclientId,\n\t\t\tcontext,\n\t\t\thasPatternOverrides,\n\t\t\tsetAttributes,\n\t\t\tregisteredSources,\n\t\t\tname,\n\t\t\tregistry,\n\t\t]\n\t);\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\tif ( blockType.apiVersion > 1 ) {\n\t\treturn (\n\t\t\t<EditWithFilters\n\t\t\t\t{ ...props }\n\t\t\t\tattributes={ computedAttributes }\n\t\t\t\tcontext={ context }\n\t\t\t\tsetAttributes={ setBoundAttributes }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// Generate a class name for the block's editable form.\n\tconst generatedClassName = hasBlockSupport( blockType, 'className', true )\n\t\t? getBlockDefaultClassName( name )\n\t\t: null;\n\tconst className = clsx(\n\t\tgeneratedClassName,\n\t\tattributes?.className,\n\t\tprops.className\n\t);\n\n\treturn (\n\t\t<EditWithFilters\n\t\t\t{ ...props }\n\t\t\tattributes={ computedAttributes }\n\t\t\tclassName={ className }\n\t\t\tcontext={ context }\n\t\t\tsetAttributes={ setBoundAttributes }\n\t\t/>\n\t);\n};\n\nexport default EditWithGeneratedProps;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,wBAAwB,EACxBC,YAAY,EACZC,eAAe,EACfC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,WAAW,QAAQ,uBAAuB;AACnD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,WAAW,EAAEC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;;AAErE;AACA;AACA;AACA,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,SAAS,MAAM,6BAA6B;AACnD,SACCC,gBAAgB,EAChBC,iCAAiC,EACjCC,qCAAqC,QAC/B,4BAA4B;AACnC,SAASC,MAAM,QAAQ,mBAAmB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,SAAAC,GAAA,IAAAC,IAAA;AAQA,MAAMC,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAMC,IAAI,GAAKC,KAAK,IAAM;EACzB,MAAM;IAAEC;EAAK,CAAC,GAAGD,KAAK;EACtB,MAAME,SAAS,GAAGtB,YAAY,CAAEqB,IAAK,CAAC;EAEtC,IAAK,CAAEC,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;;EAEA;EACA;EACA;EACA,MAAMC,SAAS,GAAGD,SAAS,CAACE,IAAI,IAAIF,SAAS,CAACG,IAAI;EAElD,oBAAOR,IAAA,CAACM,SAAS;IAAA,GAAMH;EAAK,CAAI,CAAC;AAClC,CAAC;AAED,MAAMM,eAAe,GAAGtB,WAAW,CAAE,kBAAmB,CAAC,CAAEe,IAAK,CAAC;AAEjE,MAAMQ,sBAAsB,GAAKP,KAAK,IAAM;EAC3C,MAAM;IAAEC,IAAI;IAAEO,QAAQ;IAAEC,UAA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AAS,CAAC0D,UAAU,GAAG,CAAC,EAAG;IAC/B,oBACC/D,IAAA,CAACS,eAAe;MAAA,GACVN,KAAK;MACVS,UAAU,EAAGwB,kBAAoB;MACjChB,OAAO,EAAGA,OAAS;MACnBP,aAAa,EAAGuC;IAAoB,CACpC,CAAC;EAEJ;;EAEA;EACA,MAAMY,kBAAkB,GAAGhF,eAAe,CAAEqB,SAAS,EAAE,WAAW,EAAE,IAAK,CAAC,GACvEvB,wBAAwB,CAAEsB,IAAK,CAAC,GAChC,IAAI;EACP,MAAM6D,SAAS,GAAGpF,IAAI,CACrBmF,kBAAkB,EAClBpD,UAAU,EAAEqD,SAAS,EACrB9D,KAAK,CAAC8D,SACP,CAAC;EAED,oBACCjE,IAAA,CAACS,eAAe;IAAA,GACVN,KAAK;IACVS,UAAU,EAAGwB,kBAAoB;IACjC6B,SAAS,EAAGA,SAAW;IACvB7C,OAAO,EAAGA,OAAS;IACnBP,aAAa,EAAGuC;EAAoB,CACpC,CAAC;AAEJ,CAAC;AAED,eAAe1C,sBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["clsx","getBlockDefaultClassName","getBlockType","hasBlockSupport","store","blocksStore","withFilters","useRegistry","useSelect","useCallback","useContext","useMemo","BlockContext","isURLLike","hasPatternOverridesDefaultBinding","replacePatternOverridesDefaultBinding","blockEditorStore","unlock","jsx","_jsx","DEFAULT_BLOCK_CONTEXT","Edit","props","name","blockType","Component","edit","save","EditWithFilters","EMPTY_ARRAY","EditWithGeneratedProps","clientId","attributes","setAttributes","registry","blockContext","registeredSources","select","getAllBlockBindingsSources","bindableAttributes","__experimentalBlockBindingsSupportedAttributes","getSettings","blockBindings","context","hasPatternOverrides","computedContext","usesContext","Object","fromEntries","entries","filter","key","includes","metadata","bindings","values","forEach","binding","source","computedAttributes","attributesFromSources","blockBindingsBySource","Map","attributeName","sourceName","args","sourceArgs","set","get","size","getValues","keys","attr","label","value","setBoundAttributes","nextAttributes","batch","keptAttributes","newValue","setValues","dispatch","hasParentPattern","length","caption","href","apiVersion","generatedClassName","className"],"sources":["@wordpress/block-editor/src/components/block-edit/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetBlockDefaultClassName,\n\tgetBlockType,\n\thasBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { withFilters } from '@wordpress/components';\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { useCallback, useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockContext from '../block-context';\nimport isURLLike from '../link-control/is-url-like';\nimport {\n\thasPatternOverridesDefaultBinding,\n\treplacePatternOverridesDefaultBinding,\n} from '../../utils/block-bindings';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Default value used for blocks which do not define their own context needs,\n * used to guarantee that a block's `context` prop will always be an object. It\n * is assigned as a constant since it is always expected to be an empty object,\n * and in order to avoid unnecessary React reconciliations of a changing object.\n *\n * @type {{}}\n */\nconst DEFAULT_BLOCK_CONTEXT = {};\n\nconst Edit = ( props ) => {\n\tconst { name } = props;\n\tconst blockType = getBlockType( name );\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\t// `edit` and `save` are functions or components describing the markup\n\t// with which a block is displayed. If `blockType` is valid, assign\n\t// them preferentially as the render value for the block.\n\tconst Component = blockType.edit || blockType.save;\n\n\treturn <Component { ...props } />;\n};\n\nconst EditWithFilters = withFilters( 'editor.BlockEdit' )( Edit );\n\nconst EMPTY_ARRAY = [];\n\nconst EditWithGeneratedProps = ( props ) => {\n\tconst { name, clientId, attributes, setAttributes } = props;\n\tconst registry = useRegistry();\n\tconst blockType = getBlockType( name );\n\tconst blockContext = useContext( BlockContext );\n\tconst registeredSources = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( blocksStore ) ).getAllBlockBindingsSources(),\n\t\t[]\n\t);\n\tconst bindableAttributes = useSelect(\n\t\t( select ) => {\n\t\t\tconst { __experimentalBlockBindingsSupportedAttributes } =\n\t\t\t\tselect( blockEditorStore ).getSettings();\n\t\t\treturn (\n\t\t\t\t__experimentalBlockBindingsSupportedAttributes?.[ name ] ||\n\t\t\t\tEMPTY_ARRAY\n\t\t\t);\n\t\t},\n\t\t[ name ]\n\t);\n\n\tconst { blockBindings, context, hasPatternOverrides } = useMemo( () => {\n\t\t// Assign context values using the block type's declared context needs.\n\t\tconst computedContext = blockType?.usesContext\n\t\t\t? Object.fromEntries(\n\t\t\t\t\tObject.entries( blockContext ).filter( ( [ key ] ) =>\n\t\t\t\t\t\tblockType.usesContext.includes( key )\n\t\t\t\t\t)\n\t\t\t )\n\t\t\t: DEFAULT_BLOCK_CONTEXT;\n\t\t// Add context requested by Block Bindings sources.\n\t\tif ( attributes?.metadata?.bindings ) {\n\t\t\tObject.values( attributes?.metadata?.bindings || {} ).forEach(\n\t\t\t\t( binding ) => {\n\t\t\t\t\tregisteredSources[ binding?.source ]?.usesContext?.forEach(\n\t\t\t\t\t\t( key ) => {\n\t\t\t\t\t\t\tcomputedContext[ key ] = blockContext[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\treturn {\n\t\t\tblockBindings: replacePatternOverridesDefaultBinding(\n\t\t\t\tattributes?.metadata?.bindings,\n\t\t\t\tbindableAttributes\n\t\t\t),\n\t\t\tcontext: computedContext,\n\t\t\thasPatternOverrides: hasPatternOverridesDefaultBinding(\n\t\t\t\tattributes?.metadata?.bindings\n\t\t\t),\n\t\t};\n\t}, [\n\t\tname,\n\t\tblockType?.usesContext,\n\t\tblockContext,\n\t\tattributes?.metadata?.bindings,\n\t\tregisteredSources,\n\t] );\n\n\tconst computedAttributes = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! blockBindings ) {\n\t\t\t\treturn attributes;\n\t\t\t}\n\n\t\t\tconst attributesFromSources = {};\n\t\t\tconst blockBindingsBySource = new Map();\n\n\t\t\tfor ( const [ attributeName, binding ] of Object.entries(\n\t\t\t\tblockBindings\n\t\t\t) ) {\n\t\t\t\tconst { source: sourceName, args: sourceArgs } = binding;\n\t\t\t\tconst source = registeredSources[ sourceName ];\n\t\t\t\tif (\n\t\t\t\t\t! source ||\n\t\t\t\t\t! bindableAttributes.includes( attributeName )\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tblockBindingsBySource.set( source, {\n\t\t\t\t\t...blockBindingsBySource.get( source ),\n\t\t\t\t\t[ attributeName ]: {\n\t\t\t\t\t\targs: sourceArgs,\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( blockBindingsBySource.size ) {\n\t\t\t\tfor ( const [ source, bindings ] of blockBindingsBySource ) {\n\t\t\t\t\t// Get values in batch if the source supports it.\n\t\t\t\t\tlet values = {};\n\t\t\t\t\tif ( ! source.getValues ) {\n\t\t\t\t\t\tObject.keys( bindings ).forEach( ( attr ) => {\n\t\t\t\t\t\t\t// Default to the the source label when `getValues` doesn't exist.\n\t\t\t\t\t\t\tvalues[ attr ] = source.label;\n\t\t\t\t\t\t} );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalues = source.getValues( {\n\t\t\t\t\t\t\tselect,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\tbindings,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( const [ attributeName, value ] of Object.entries(\n\t\t\t\t\t\tvalues\n\t\t\t\t\t) ) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tattributeName === 'url' &&\n\t\t\t\t\t\t\t( ! value || ! isURLLike( value ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// Return null if value is not a valid URL.\n\t\t\t\t\t\t\tattributesFromSources[ attributeName ] = null;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tattributesFromSources[ attributeName ] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\t...attributesFromSources,\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tattributes,\n\t\t\tbindableAttributes,\n\t\t\tblockBindings,\n\t\t\tclientId,\n\t\t\tcontext,\n\t\t\tname,\n\t\t\tregisteredSources,\n\t\t]\n\t);\n\n\tconst setBoundAttributes = useCallback(\n\t\t( nextAttributes ) => {\n\t\t\tif ( ! blockBindings ) {\n\t\t\t\tsetAttributes( nextAttributes );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tregistry.batch( () => {\n\t\t\t\tconst keptAttributes = { ...nextAttributes };\n\t\t\t\tconst blockBindingsBySource = new Map();\n\n\t\t\t\t// Loop only over the updated attributes to avoid modifying the bound ones that haven't changed.\n\t\t\t\tfor ( const [ attributeName, newValue ] of Object.entries(\n\t\t\t\t\tkeptAttributes\n\t\t\t\t) ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t! blockBindings[ attributeName ] ||\n\t\t\t\t\t\t! bindableAttributes.includes( attributeName )\n\t\t\t\t\t) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst binding = blockBindings[ attributeName ];\n\t\t\t\t\tconst source = registeredSources[ binding?.source ];\n\t\t\t\t\tif ( ! source?.setValues ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tblockBindingsBySource.set( source, {\n\t\t\t\t\t\t...blockBindingsBySource.get( source ),\n\t\t\t\t\t\t[ attributeName ]: {\n\t\t\t\t\t\t\targs: binding.args,\n\t\t\t\t\t\t\tnewValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t\t\tdelete keptAttributes[ attributeName ];\n\t\t\t\t}\n\n\t\t\t\tif ( blockBindingsBySource.size ) {\n\t\t\t\t\tfor ( const [\n\t\t\t\t\t\tsource,\n\t\t\t\t\t\tbindings,\n\t\t\t\t\t] of blockBindingsBySource ) {\n\t\t\t\t\t\tsource.setValues( {\n\t\t\t\t\t\t\tselect: registry.select,\n\t\t\t\t\t\t\tdispatch: registry.dispatch,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\tbindings,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst hasParentPattern = !! context[ 'pattern/overrides' ];\n\n\t\t\t\tif (\n\t\t\t\t\t// Don't update non-connected attributes if the block is using pattern overrides\n\t\t\t\t\t// and the editing is happening while overriding the pattern (not editing the original).\n\t\t\t\t\t! ( hasPatternOverrides && hasParentPattern ) &&\n\t\t\t\t\tObject.keys( keptAttributes ).length\n\t\t\t\t) {\n\t\t\t\t\t// Don't update caption and href until they are supported.\n\t\t\t\t\tif ( hasPatternOverrides ) {\n\t\t\t\t\t\tdelete keptAttributes.caption;\n\t\t\t\t\t\tdelete keptAttributes.href;\n\t\t\t\t\t}\n\t\t\t\t\tsetAttributes( keptAttributes );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\t[\n\t\t\tbindableAttributes,\n\t\t\tblockBindings,\n\t\t\tclientId,\n\t\t\tcontext,\n\t\t\thasPatternOverrides,\n\t\t\tsetAttributes,\n\t\t\tregisteredSources,\n\t\t\tname,\n\t\t\tregistry,\n\t\t]\n\t);\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\tif ( blockType.apiVersion > 1 ) {\n\t\treturn (\n\t\t\t<EditWithFilters\n\t\t\t\t{ ...props }\n\t\t\t\tattributes={ computedAttributes }\n\t\t\t\tcontext={ context }\n\t\t\t\tsetAttributes={ setBoundAttributes }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// Generate a class name for the block's editable form.\n\tconst generatedClassName = hasBlockSupport( blockType, 'className', true )\n\t\t? getBlockDefaultClassName( name )\n\t\t: null;\n\tconst className = clsx(\n\t\tgeneratedClassName,\n\t\tattributes?.className,\n\t\tprops.className\n\t);\n\n\treturn (\n\t\t<EditWithFilters\n\t\t\t{ ...props }\n\t\t\tattributes={ computedAttributes }\n\t\t\tclassName={ className }\n\t\t\tcontext={ context }\n\t\t\tsetAttributes={ setBoundAttributes }\n\t\t/>\n\t);\n};\n\nexport default EditWithGeneratedProps;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,wBAAwB,EACxBC,YAAY,EACZC,eAAe,EACfC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,WAAW,QAAQ,uBAAuB;AACnD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,WAAW,EAAEC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;;AAErE;AACA;AACA;AACA,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,SAAS,MAAM,6BAA6B;AACnD,SACCC,iCAAiC,EACjCC,qCAAqC,QAC/B,4BAA4B;AACnC,SAASX,KAAK,IAAIY,gBAAgB,QAAQ,aAAa;AACvD,SAASC,MAAM,QAAQ,mBAAmB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,SAAAC,GAAA,IAAAC,IAAA;AAQA,MAAMC,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAMC,IAAI,GAAKC,KAAK,IAAM;EACzB,MAAM;IAAEC;EAAK,CAAC,GAAGD,KAAK;EACtB,MAAME,SAAS,GAAGtB,YAAY,CAAEqB,IAAK,CAAC;EAEtC,IAAK,CAAEC,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;;EAEA;EACA;EACA;EACA,MAAMC,SAAS,GAAGD,SAAS,CAACE,IAAI,IAAIF,SAAS,CAACG,IAAI;EAElD,oBAAOR,IAAA,CAACM,SAAS;IAAA,GAAMH;EAAK,CAAI,CAAC;AAClC,CAAC;AAED,MAAMM,eAAe,GAAGtB,WAAW,CAAE,kBAAm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C,MAAM,CAACwB,IAAI,CAAEO,cAAe,CAAC,CAACK,MAAM,EACnC;QACD;QACA,IAAKvC,mBAAmB,EAAG;UAC1B,OAAOkC,cAAc,CAACM,OAAO;UAC7B,OAAON,cAAc,CAACO,IAAI;QAC3B;QACApD,aAAa,CAAE6C,cAAe,CAAC;MAChC;IACD,CAAE,CAAC;EACJ,CAAC,EACD,CACCvC,kBAAkB,EAClBG,aAAa,EACbX,QAAQ,EACRY,OAAO,EACPC,mBAAmB,EACnBX,aAAa,EACbG,iBAAiB,EACjBb,IAAI,EACJW,QAAQ,CAEV,CAAC;EAED,IAAK,CAAEV,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,IAAKA,SAAS,CAAC8D,UAAU,GAAG,CAAC,EAAG;IAC/B,oBACCnE,IAAA,CAACS,eAAe;MAAA,GACVN,KAAK;MACVU,UAAU,EAAG2B,kBAAoB;MACjChB,OAAO,EAAGA,OAAS;MACnBV,aAAa,EAAG0C;IAAoB,CACpC,CAAC;EAEJ;;EAEA;EACA,MAAMY,kBAAkB,GAAGpF,eAAe,CAAEqB,SAAS,EAAE,WAAW,EAAE,IAAK,CAAC,GACvEvB,wBAAwB,CAAEsB,IAAK,CAAC,GAChC,IAAI;EACP,MAAMiE,SAAS,GAAGxF,IAAI,CACrBuF,kBAAkB,EAClBvD,UAAU,EAAEwD,SAAS,EACrBlE,KAAK,CAACkE,SACP,CAAC;EAED,oBACCrE,IAAA,CAACS,eAAe;IAAA,GACVN,KAAK;IACVU,UAAU,EAAG2B,kBAAoB;IACjC6B,SAAS,EAAGA,SAAW;IACvB7C,OAAO,EAAGA,OAAS;IACnBV,aAAa,EAAG0C;EAAoB,CACpC,CAAC;AAEJ,CAAC;AAED,eAAe7C,sBAAsB","ignoreList":[]}
@@ -496,7 +496,8 @@ function BlockListBlockProvider(props) {
496
496
  isReusable: isReusableBlock(blockType),
497
497
  className: hasLightBlockWrapper ? attributes.className : undefined,
498
498
  defaultClassName: hasLightBlockWrapper ? getBlockDefaultClassName(blockName) : undefined,
499
- blockTitle: blockType?.title
499
+ blockTitle: blockType?.title,
500
+ isBlockHidden: attributes?.metadata?.blockVisibility === false
500
501
  };
501
502
 
502
503
  // When in preview mode, we can avoid a lot of selection and
@@ -504,6 +505,9 @@ function BlockListBlockProvider(props) {
504
505
  if (isPreviewMode) {
505
506
  return previewContext;
506
507
  }
508
+ const {
509
+ isBlockHidden: _isBlockHidden
510
+ } = unlock(select(blockEditorStore));
507
511
  const _isSelected = isBlockSelected(clientId);
508
512
  const canRemove = canRemoveBlock(clientId);
509
513
  const canMove = canMoveBlock(clientId);
@@ -543,7 +547,8 @@ function BlockListBlockProvider(props) {
543
547
  hasChildSelected: isAncestorOfSelectedBlock,
544
548
  isEditingDisabled: blockEditingMode === 'disabled',
545
549
  hasEditableOutline: blockEditingMode !== 'disabled' && getBlockEditingMode(rootClientId) === 'disabled',
546
- originalBlockClientId: isInvalid ? blocksWithSameName[0] : false
550
+ originalBlockClientId: isInvalid ? blocksWithSameName[0] : false,
551
+ isBlockHidden: _isBlockHidden(clientId)
547
552
  };
548
553
  }, [clientId, rootClientId]);
549
554
  const {
@@ -582,7 +587,8 @@ function BlockListBlockProvider(props) {
582
587
  hasEditableOutline,
583
588
  className,
584
589
  defaultClassName,
585
- originalBlockClientId
590
+ originalBlockClientId,
591
+ isBlockHidden
586
592
  } = selectedProps;
587
593
 
588
594
  // Users of the editor.BlockListBlock filter used to be able to
@@ -629,8 +635,12 @@ function BlockListBlockProvider(props) {
629
635
  mayDisplayParentControls,
630
636
  originalBlockClientId,
631
637
  themeSupportsLayout,
632
- canMove
638
+ canMove,
639
+ isBlockHidden
633
640
  };
641
+ if (isBlockHidden && !isSelected && !isMultiSelected && !hasChildSelected) {
642
+ return null;
643
+ }
634
644
 
635
645
  // Here we separate between the props passed to BlockListBlock and any other
636
646
  // information we selected for internal use. BlockListBlock is a filtered
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","memo","RawHTML","useContext","useMemo","getBlockType","getSaveContent","isUnmodifiedDefaultBlock","serializeRawBlock","switchToBlockType","getDefaultBlockName","isUnmodifiedBlock","isReusableBlock","getBlockDefaultClassName","hasBlockSupport","createBlock","store","blocksStore","withFilters","withDispatch","useSelect","compose","safeHTML","BlockEdit","BlockInvalidWarning","BlockCrashWarning","BlockCrashBoundary","BlockHtml","useBlockProps","blockEditorStore","useLayout","PrivateBlockContext","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","mergeWrapperProps","propsA","propsB","newProps","hasOwnProperty","className","style","Block","children","isHtml","props","__unstableIsHtml","BlockListBlock","block","__unstableBlockSource","mode","isLocked","canRemove","clientId","isSelected","isSelectionEnabled","__unstableLayoutClassNames","layoutClassNames","name","isValid","attributes","wrapperProps","setAttributes","onReplace","onRemove","onInsertBlocksAfter","onMerge","toggleSelection","_wrapperProps","mayDisplayControls","mayDisplayParentControls","themeSupportsLayout","context","parentLayout","blockEdit","insertBlocksAfter","undefined","mergeBlocks","__unstableParentLayout","Object","keys","length","blockEditingMode","isPreviewMode","blockType","getEditWrapperProps","isAligned","isSticky","includes","saveContent","display","apiVersion","dataAlign","restWrapperProps","updatedWrapperProps","Provider","value","fallback","applyWithDispatch","dispatch","ownProps","registry","updateBlockAttributes","insertBlocks","replaceBlocks","__unstableMarkLastChangeAsPersistent","moveBlocksToPosition","removeBlock","selectBlock","nextAttributes","getMultiSelectedBlockClientIds","select","multiSelectedBlockClientIds","clientIds","newAttributes","onInsertBlocks","blocks","index","rootClientId","getBlockIndex","forward","getPreviousBlockClientId","getNextBlockClientId","getBlock","getBlockAttributes","getBlockName","getBlockOrder","getBlockRootClientId","canInsertBlockType","switchToDefaultOrRemove","defaultBlockName","defaultBlockType","replacement","nextBlockClientId","batch","merge","moveFirstItemUp","_clientId","changeSelection","wrapperBlockName","wrapperBlockType","isTextualWrapper","category","targetRootClientId","blockOrder","firstClientId","every","nextRootClientId","rootAttributes","previousRootAttributes","key","previousBlockClientId","previousRootClientId","indexToSelect","initialPosition","replacementBlocks","Array","isArray","selectionEnabled","BlockListBlockProvider","selectedProps","isBlockSelected","getBlockMode","getTemplateLock","isSectionBlock","_isSectionBlock","getBlockWithoutAttributes","canRemoveBlock","canMoveBlock","getSettings","getTemporarilyEditingAsBlocks","getBlockEditingMode","isFirstMultiSelectedBlock","hasSelectedInnerBlock","getBlocksByName","isBlockMultiSelected","isBlockSubtreeDisabled","isBlockHighlighted","__unstableIsFullySelected","__unstableSelectionHasUnmergeableBlock","isBlockBeingDragged","isDragging","__unstableHasActiveBlockOverlayActive","getSelectedBlocksInitialCaretPosition","blockWithoutAttributes","_hasBlockSupport","getActiveBlockVariation","blockName","supportsLayout","hasLightBlockWrapper","previewContext","isReusable","defaultClassName","blockTitle","title","_isSelected","canMove","match","isMultiSelected","checkDeep","isAncestorOfSelectedBlock","multiple","blocksWithSameName","isInvalid","isTemporarilyEditingAsBlocks","id","blockApiVersion","isSubtreeDisabled","hasOverlay","isHighlighted","isPartiallySelected","hasChildSelected","isEditingDisabled","hasEditableOutline","originalBlockClientId","privateContext"],"sources":["@wordpress/block-editor/src/components/block-list/block.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { memo, RawHTML, useContext, useMemo } from '@wordpress/element';\nimport {\n\tgetBlockType,\n\tgetSaveContent,\n\tisUnmodifiedDefaultBlock,\n\tserializeRawBlock,\n\tswitchToBlockType,\n\tgetDefaultBlockName,\n\tisUnmodifiedBlock,\n\tisReusableBlock,\n\tgetBlockDefaultClassName,\n\thasBlockSupport,\n\tcreateBlock,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { withFilters } from '@wordpress/components';\nimport { withDispatch, useSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport BlockEdit from '../block-edit';\nimport BlockInvalidWarning from './block-invalid-warning';\nimport BlockCrashWarning from './block-crash-warning';\nimport BlockCrashBoundary from './block-crash-boundary';\nimport BlockHtml from './block-html';\nimport { useBlockProps } from './use-block-props';\nimport { store as blockEditorStore } from '../../store';\nimport { useLayout } from './layout';\nimport { PrivateBlockContext } from './private-block-context';\n\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Merges wrapper props with special handling for classNames and styles.\n *\n * @param {Object} propsA\n * @param {Object} propsB\n *\n * @return {Object} Merged props.\n */\nfunction mergeWrapperProps( propsA, propsB ) {\n\tconst newProps = {\n\t\t...propsA,\n\t\t...propsB,\n\t};\n\n\t// May be set to undefined, so check if the property is set!\n\tif (\n\t\tpropsA?.hasOwnProperty( 'className' ) &&\n\t\tpropsB?.hasOwnProperty( 'className' )\n\t) {\n\t\tnewProps.className = clsx( propsA.className, propsB.className );\n\t}\n\n\tif (\n\t\tpropsA?.hasOwnProperty( 'style' ) &&\n\t\tpropsB?.hasOwnProperty( 'style' )\n\t) {\n\t\tnewProps.style = { ...propsA.style, ...propsB.style };\n\t}\n\n\treturn newProps;\n}\n\nfunction Block( { children, isHtml, ...props } ) {\n\treturn (\n\t\t<div { ...useBlockProps( props, { __unstableIsHtml: isHtml } ) }>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nfunction BlockListBlock( {\n\tblock: { __unstableBlockSource },\n\tmode,\n\tisLocked,\n\tcanRemove,\n\tclientId,\n\tisSelected,\n\tisSelectionEnabled,\n\tclassName,\n\t__unstableLayoutClassNames: layoutClassNames,\n\tname,\n\tisValid,\n\tattributes,\n\twrapperProps,\n\tsetAttributes,\n\tonReplace,\n\tonRemove,\n\tonInsertBlocksAfter,\n\tonMerge,\n\ttoggleSelection,\n} ) {\n\tconst {\n\t\tmayDisplayControls,\n\t\tmayDisplayParentControls,\n\t\tthemeSupportsLayout,\n\t\t...context\n\t} = useContext( PrivateBlockContext );\n\n\tconst parentLayout = useLayout() || {};\n\n\t// We wrap the BlockEdit component in a div that hides it when editing in\n\t// HTML mode. This allows us to render all of the ancillary pieces\n\t// (InspectorControls, etc.) which are inside `BlockEdit` but not\n\t// `BlockHTML`, even in HTML mode.\n\tlet blockEdit = (\n\t\t<BlockEdit\n\t\t\tname={ name }\n\t\t\tisSelected={ isSelected }\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tinsertBlocksAfter={ isLocked ? undefined : onInsertBlocksAfter }\n\t\t\tonReplace={ canRemove ? onReplace : undefined }\n\t\t\tonRemove={ canRemove ? onRemove : undefined }\n\t\t\tmergeBlocks={ canRemove ? onMerge : undefined }\n\t\t\tclientId={ clientId }\n\t\t\tisSelectionEnabled={ isSelectionEnabled }\n\t\t\ttoggleSelection={ toggleSelection }\n\t\t\t__unstableLayoutClassNames={ layoutClassNames }\n\t\t\t__unstableParentLayout={\n\t\t\t\tObject.keys( parentLayout ).length ? parentLayout : undefined\n\t\t\t}\n\t\t\tmayDisplayControls={ mayDisplayControls }\n\t\t\tmayDisplayParentControls={ mayDisplayParentControls }\n\t\t\tblockEditingMode={ context.blockEditingMode }\n\t\t\tisPreviewMode={ context.isPreviewMode }\n\t\t/>\n\t);\n\n\tconst blockType = getBlockType( name );\n\n\t// Determine whether the block has props to apply to the wrapper.\n\tif ( blockType?.getEditWrapperProps ) {\n\t\twrapperProps = mergeWrapperProps(\n\t\t\twrapperProps,\n\t\t\tblockType.getEditWrapperProps( attributes )\n\t\t);\n\t}\n\n\tconst isAligned =\n\t\twrapperProps &&\n\t\t!! wrapperProps[ 'data-align' ] &&\n\t\t! themeSupportsLayout;\n\n\t// Support for sticky position in classic themes with alignment wrappers.\n\n\tconst isSticky = className?.includes( 'is-position-sticky' );\n\n\t// For aligned blocks, provide a wrapper element so the block can be\n\t// positioned relative to the block column.\n\t// This is only kept for classic themes that don't support layout\n\t// Historically we used to rely on extra divs and data-align to\n\t// provide the alignments styles in the editor.\n\t// Due to the differences between frontend and backend, we migrated\n\t// to the layout feature, and we're now aligning the markup of frontend\n\t// and backend.\n\tif ( isAligned ) {\n\t\tblockEdit = (\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'wp-block', isSticky && className ) }\n\t\t\t\tdata-align={ wrapperProps[ 'data-align' ] }\n\t\t\t>\n\t\t\t\t{ blockEdit }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tlet block;\n\n\tif ( ! isValid ) {\n\t\tconst saveContent = __unstableBlockSource\n\t\t\t? serializeRawBlock( __unstableBlockSource )\n\t\t\t: getSaveContent( blockType, attributes );\n\n\t\tblock = (\n\t\t\t<Block className=\"has-warning\">\n\t\t\t\t<BlockInvalidWarning clientId={ clientId } />\n\t\t\t\t<RawHTML>{ safeHTML( saveContent ) }</RawHTML>\n\t\t\t</Block>\n\t\t);\n\t} else if ( mode === 'html' ) {\n\t\t// Render blockEdit so the inspector controls don't disappear.\n\t\t// See #8969.\n\t\tblock = (\n\t\t\t<>\n\t\t\t\t<div style={ { display: 'none' } }>{ blockEdit }</div>\n\t\t\t\t<Block isHtml>\n\t\t\t\t\t<BlockHtml clientId={ clientId } />\n\t\t\t\t</Block>\n\t\t\t</>\n\t\t);\n\t} else if ( blockType?.apiVersion > 1 ) {\n\t\tblock = blockEdit;\n\t} else {\n\t\tblock = <Block>{ blockEdit }</Block>;\n\t}\n\n\tconst { 'data-align': dataAlign, ...restWrapperProps } = wrapperProps ?? {};\n\tconst updatedWrapperProps = {\n\t\t...restWrapperProps,\n\t\tclassName: clsx(\n\t\t\trestWrapperProps.className,\n\t\t\tdataAlign && themeSupportsLayout && `align${ dataAlign }`,\n\t\t\t! ( dataAlign && isSticky ) && className\n\t\t),\n\t};\n\n\t// We set a new context with the adjusted and filtered wrapperProps (through\n\t// `editor.BlockListBlock`), which the `BlockListBlockProvider` did not have\n\t// access to.\n\t// Note that the context value doesn't have to be memoized in this case\n\t// because when it changes, this component will be re-rendered anyway, and\n\t// none of the consumers (BlockListBlock and useBlockProps) are memoized or\n\t// \"pure\". This is different from the public BlockEditContext, where\n\t// consumers might be memoized or \"pure\".\n\treturn (\n\t\t<PrivateBlockContext.Provider\n\t\t\tvalue={ {\n\t\t\t\twrapperProps: updatedWrapperProps,\n\t\t\t\tisAligned,\n\t\t\t\t...context,\n\t\t\t} }\n\t\t>\n\t\t\t<BlockCrashBoundary\n\t\t\t\tfallback={\n\t\t\t\t\t<Block className=\"has-warning\">\n\t\t\t\t\t\t<BlockCrashWarning />\n\t\t\t\t\t</Block>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ block }\n\t\t\t</BlockCrashBoundary>\n\t\t</PrivateBlockContext.Provider>\n\t);\n}\n\nconst applyWithDispatch = withDispatch( ( dispatch, ownProps, registry ) => {\n\tconst {\n\t\tupdateBlockAttributes,\n\t\tinsertBlocks,\n\t\tmergeBlocks,\n\t\treplaceBlocks,\n\t\ttoggleSelection,\n\t\t__unstableMarkLastChangeAsPersistent,\n\t\tmoveBlocksToPosition,\n\t\tremoveBlock,\n\t\tselectBlock,\n\t} = dispatch( blockEditorStore );\n\n\t// Do not add new properties here, use `useDispatch` instead to avoid\n\t// leaking new props to the public API (editor.BlockListBlock filter).\n\treturn {\n\t\tsetAttributes( nextAttributes ) {\n\t\t\tconst { getMultiSelectedBlockClientIds } =\n\t\t\t\tregistry.select( blockEditorStore );\n\t\t\tconst multiSelectedBlockClientIds =\n\t\t\t\tgetMultiSelectedBlockClientIds();\n\t\t\tconst { clientId, attributes } = ownProps;\n\t\t\tconst clientIds = multiSelectedBlockClientIds.length\n\t\t\t\t? multiSelectedBlockClientIds\n\t\t\t\t: [ clientId ];\n\t\t\tconst newAttributes =\n\t\t\t\ttypeof nextAttributes === 'function'\n\t\t\t\t\t? nextAttributes( attributes )\n\t\t\t\t\t: nextAttributes;\n\n\t\t\tupdateBlockAttributes( clientIds, newAttributes );\n\t\t},\n\t\tonInsertBlocks( blocks, index ) {\n\t\t\tconst { rootClientId } = ownProps;\n\t\t\tinsertBlocks( blocks, index, rootClientId );\n\t\t},\n\t\tonInsertBlocksAfter( blocks ) {\n\t\t\tconst { clientId, rootClientId } = ownProps;\n\t\t\tconst { getBlockIndex } = registry.select( blockEditorStore );\n\t\t\tconst index = getBlockIndex( clientId );\n\t\t\tinsertBlocks( blocks, index + 1, rootClientId );\n\t\t},\n\t\tonMerge( forward ) {\n\t\t\tconst { clientId, rootClientId } = ownProps;\n\t\t\tconst {\n\t\t\t\tgetPreviousBlockClientId,\n\t\t\t\tgetNextBlockClientId,\n\t\t\t\tgetBlock,\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockOrder,\n\t\t\t\tgetBlockIndex,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tcanInsertBlockType,\n\t\t\t} = registry.select( blockEditorStore );\n\n\t\t\tfunction switchToDefaultOrRemove() {\n\t\t\t\tconst block = getBlock( clientId );\n\t\t\t\tconst defaultBlockName = getDefaultBlockName();\n\t\t\t\tconst defaultBlockType = getBlockType( defaultBlockName );\n\t\t\t\tif ( getBlockName( clientId ) !== defaultBlockName ) {\n\t\t\t\t\tconst replacement = switchToBlockType(\n\t\t\t\t\t\tblock,\n\t\t\t\t\t\tdefaultBlockName\n\t\t\t\t\t);\n\t\t\t\t\tif ( replacement && replacement.length ) {\n\t\t\t\t\t\treplaceBlocks( clientId, replacement );\n\t\t\t\t\t}\n\t\t\t\t} else if ( isUnmodifiedDefaultBlock( block ) ) {\n\t\t\t\t\tconst nextBlockClientId = getNextBlockClientId( clientId );\n\t\t\t\t\tif ( nextBlockClientId ) {\n\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t\tselectBlock( nextBlockClientId );\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} else if ( defaultBlockType.merge ) {\n\t\t\t\t\tconst attributes = defaultBlockType.merge(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\tblock.attributes\n\t\t\t\t\t);\n\t\t\t\t\treplaceBlocks(\n\t\t\t\t\t\t[ clientId ],\n\t\t\t\t\t\t[ createBlock( defaultBlockName, attributes ) ]\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Moves the block with clientId up one level. If the block type\n\t\t\t * cannot be inserted at the new location, it will be attempted to\n\t\t\t * convert to the default block type.\n\t\t\t *\n\t\t\t * @param {string} _clientId The block to move.\n\t\t\t * @param {boolean} changeSelection Whether to change the selection\n\t\t\t * to the moved block.\n\t\t\t */\n\t\t\tfunction moveFirstItemUp( _clientId, changeSelection = true ) {\n\t\t\t\tconst wrapperBlockName = getBlockName( _clientId );\n\t\t\t\tconst wrapperBlockType = getBlockType( wrapperBlockName );\n\t\t\t\tconst isTextualWrapper = wrapperBlockType.category === 'text';\n\t\t\t\tconst targetRootClientId = getBlockRootClientId( _clientId );\n\t\t\t\tconst blockOrder = getBlockOrder( _clientId );\n\t\t\t\tconst [ firstClientId ] = blockOrder;\n\n\t\t\t\tif (\n\t\t\t\t\tblockOrder.length === 1 &&\n\t\t\t\t\tisUnmodifiedBlock( getBlock( firstClientId ) )\n\t\t\t\t) {\n\t\t\t\t\tremoveBlock( _clientId );\n\t\t\t\t} else if ( isTextualWrapper ) {\n\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\t\tgetBlockName( firstClientId ),\n\t\t\t\t\t\t\t\ttargetRootClientId\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\t\t\t\t[ firstClientId ],\n\t\t\t\t\t\t\t\t_clientId,\n\t\t\t\t\t\t\t\ttargetRootClientId,\n\t\t\t\t\t\t\t\tgetBlockIndex( _clientId )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst replacement = switchToBlockType(\n\t\t\t\t\t\t\t\tgetBlock( firstClientId ),\n\t\t\t\t\t\t\t\tgetDefaultBlockName()\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\treplacement &&\n\t\t\t\t\t\t\t\treplacement.length &&\n\t\t\t\t\t\t\t\treplacement.every( ( block ) =>\n\t\t\t\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\t\t\t\tblock.name,\n\t\t\t\t\t\t\t\t\t\ttargetRootClientId\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tinsertBlocks(\n\t\t\t\t\t\t\t\t\treplacement,\n\t\t\t\t\t\t\t\t\tgetBlockIndex( _clientId ),\n\t\t\t\t\t\t\t\t\ttargetRootClientId,\n\t\t\t\t\t\t\t\t\tchangeSelection\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tremoveBlock( firstClientId, false );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tswitchToDefaultOrRemove();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! getBlockOrder( _clientId ).length &&\n\t\t\t\t\t\t\tisUnmodifiedBlock( getBlock( _clientId ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tremoveBlock( _clientId, false );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tswitchToDefaultOrRemove();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For `Delete` or forward merge, we should do the exact same thing\n\t\t\t// as `Backspace`, but from the other block.\n\t\t\tif ( forward ) {\n\t\t\t\tif ( rootClientId ) {\n\t\t\t\t\tconst nextRootClientId =\n\t\t\t\t\t\tgetNextBlockClientId( rootClientId );\n\n\t\t\t\t\tif ( nextRootClientId ) {\n\t\t\t\t\t\t// If there is a block that follows with the same parent\n\t\t\t\t\t\t// block name and the same attributes, merge the inner\n\t\t\t\t\t\t// blocks.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tgetBlockName( rootClientId ) ===\n\t\t\t\t\t\t\tgetBlockName( nextRootClientId )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tconst rootAttributes =\n\t\t\t\t\t\t\t\tgetBlockAttributes( rootClientId );\n\t\t\t\t\t\t\tconst previousRootAttributes =\n\t\t\t\t\t\t\t\tgetBlockAttributes( nextRootClientId );\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tObject.keys( rootAttributes ).every(\n\t\t\t\t\t\t\t\t\t( key ) =>\n\t\t\t\t\t\t\t\t\t\trootAttributes[ key ] ===\n\t\t\t\t\t\t\t\t\t\tpreviousRootAttributes[ key ]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\t\t\t\t\t\tgetBlockOrder( nextRootClientId ),\n\t\t\t\t\t\t\t\t\t\tnextRootClientId,\n\t\t\t\t\t\t\t\t\t\trootClientId\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tremoveBlock( nextRootClientId, false );\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmergeBlocks( rootClientId, nextRootClientId );\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst nextBlockClientId = getNextBlockClientId( clientId );\n\n\t\t\t\tif ( ! nextBlockClientId ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( getBlockOrder( nextBlockClientId ).length ) {\n\t\t\t\t\tmoveFirstItemUp( nextBlockClientId, false );\n\t\t\t\t} else {\n\t\t\t\t\tmergeBlocks( clientId, nextBlockClientId );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst previousBlockClientId =\n\t\t\t\t\tgetPreviousBlockClientId( clientId );\n\n\t\t\t\tif ( previousBlockClientId ) {\n\t\t\t\t\tmergeBlocks( previousBlockClientId, clientId );\n\t\t\t\t} else if ( rootClientId ) {\n\t\t\t\t\tconst previousRootClientId =\n\t\t\t\t\t\tgetPreviousBlockClientId( rootClientId );\n\n\t\t\t\t\t// If there is a preceding block with the same parent block\n\t\t\t\t\t// name and the same attributes, merge the inner blocks.\n\t\t\t\t\tif (\n\t\t\t\t\t\tpreviousRootClientId &&\n\t\t\t\t\t\tgetBlockName( rootClientId ) ===\n\t\t\t\t\t\t\tgetBlockName( previousRootClientId )\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst rootAttributes =\n\t\t\t\t\t\t\tgetBlockAttributes( rootClientId );\n\t\t\t\t\t\tconst previousRootAttributes =\n\t\t\t\t\t\t\tgetBlockAttributes( previousRootClientId );\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tObject.keys( rootAttributes ).every(\n\t\t\t\t\t\t\t\t( key ) =>\n\t\t\t\t\t\t\t\t\trootAttributes[ key ] ===\n\t\t\t\t\t\t\t\t\tpreviousRootAttributes[ key ]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\t\t\t\t\tgetBlockOrder( rootClientId ),\n\t\t\t\t\t\t\t\t\trootClientId,\n\t\t\t\t\t\t\t\t\tpreviousRootClientId\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tremoveBlock( rootClientId, false );\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tmoveFirstItemUp( rootClientId );\n\t\t\t\t} else {\n\t\t\t\t\tswitchToDefaultOrRemove();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tonReplace( blocks, indexToSelect, initialPosition ) {\n\t\t\tif (\n\t\t\t\tblocks.length &&\n\t\t\t\t! isUnmodifiedDefaultBlock( blocks[ blocks.length - 1 ] )\n\t\t\t) {\n\t\t\t\t__unstableMarkLastChangeAsPersistent();\n\t\t\t}\n\t\t\t//Unsynced patterns are nested in an array so we need to flatten them.\n\t\t\tconst replacementBlocks =\n\t\t\t\tblocks?.length === 1 && Array.isArray( blocks[ 0 ] )\n\t\t\t\t\t? blocks[ 0 ]\n\t\t\t\t\t: blocks;\n\t\t\treplaceBlocks(\n\t\t\t\t[ ownProps.clientId ],\n\t\t\t\treplacementBlocks,\n\t\t\t\tindexToSelect,\n\t\t\t\tinitialPosition\n\t\t\t);\n\t\t},\n\t\tonRemove() {\n\t\t\tremoveBlock( ownProps.clientId );\n\t\t},\n\t\ttoggleSelection( selectionEnabled ) {\n\t\t\ttoggleSelection( selectionEnabled );\n\t\t},\n\t};\n} );\n\n// This component is used by the BlockListBlockProvider component below. It will\n// add the props necessary for the `editor.BlockListBlock` filters.\nBlockListBlock = compose(\n\tapplyWithDispatch,\n\twithFilters( 'editor.BlockListBlock' )\n)( BlockListBlock );\n\n// This component provides all the information we need through a single store\n// subscription (useSelect mapping). Only the necessary props are passed down\n// to the BlockListBlock component, which is a filtered component, so these\n// props are public API. To avoid adding to the public API, we use a private\n// context to pass the rest of the information to the filtered BlockListBlock\n// component, and useBlockProps.\nfunction BlockListBlockProvider( props ) {\n\tconst { clientId, rootClientId } = props;\n\tconst selectedProps = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tisBlockSelected,\n\t\t\t\tgetBlockMode,\n\t\t\t\tisSelectionEnabled,\n\t\t\t\tgetTemplateLock,\n\t\t\t\tisSectionBlock: _isSectionBlock,\n\t\t\t\tgetBlockWithoutAttributes,\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tcanRemoveBlock,\n\t\t\t\tcanMoveBlock,\n\n\t\t\t\tgetSettings,\n\t\t\t\tgetTemporarilyEditingAsBlocks,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t\tgetBlockName,\n\t\t\t\tisFirstMultiSelectedBlock,\n\t\t\t\tgetMultiSelectedBlockClientIds,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t\tgetBlocksByName,\n\n\t\t\t\tgetBlockIndex,\n\t\t\t\tisBlockMultiSelected,\n\t\t\t\tisBlockSubtreeDisabled,\n\t\t\t\tisBlockHighlighted,\n\t\t\t\t__unstableIsFullySelected,\n\t\t\t\t__unstableSelectionHasUnmergeableBlock,\n\t\t\t\tisBlockBeingDragged,\n\t\t\t\tisDragging,\n\t\t\t\t__unstableHasActiveBlockOverlayActive,\n\t\t\t\tgetSelectedBlocksInitialCaretPosition,\n\t\t\t} = unlock( select( blockEditorStore ) );\n\t\t\tconst blockWithoutAttributes =\n\t\t\t\tgetBlockWithoutAttributes( clientId );\n\n\t\t\t// This is a temporary fix.\n\t\t\t// This function should never be called when a block is not\n\t\t\t// present in the state. It happens now because the order in\n\t\t\t// withSelect rendering is not correct.\n\t\t\tif ( ! blockWithoutAttributes ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\thasBlockSupport: _hasBlockSupport,\n\t\t\t\tgetActiveBlockVariation,\n\t\t\t} = select( blocksStore );\n\t\t\tconst attributes = getBlockAttributes( clientId );\n\t\t\tconst { name: blockName, isValid } = blockWithoutAttributes;\n\t\t\tconst blockType = getBlockType( blockName );\n\t\t\tconst { supportsLayout, isPreviewMode } = getSettings();\n\t\t\tconst hasLightBlockWrapper = blockType?.apiVersion > 1;\n\t\t\tconst previewContext = {\n\t\t\t\tisPreviewMode,\n\t\t\t\tblockWithoutAttributes,\n\t\t\t\tname: blockName,\n\t\t\t\tattributes,\n\t\t\t\tisValid,\n\t\t\t\tthemeSupportsLayout: supportsLayout,\n\t\t\t\tindex: getBlockIndex( clientId ),\n\t\t\t\tisReusable: isReusableBlock( blockType ),\n\t\t\t\tclassName: hasLightBlockWrapper\n\t\t\t\t\t? attributes.className\n\t\t\t\t\t: undefined,\n\t\t\t\tdefaultClassName: hasLightBlockWrapper\n\t\t\t\t\t? getBlockDefaultClassName( blockName )\n\t\t\t\t\t: undefined,\n\t\t\t\tblockTitle: blockType?.title,\n\t\t\t};\n\n\t\t\t// When in preview mode, we can avoid a lot of selection and\n\t\t\t// editing related selectors.\n\t\t\tif ( isPreviewMode ) {\n\t\t\t\treturn previewContext;\n\t\t\t}\n\n\t\t\tconst _isSelected = isBlockSelected( clientId );\n\t\t\tconst canRemove = canRemoveBlock( clientId );\n\t\t\tconst canMove = canMoveBlock( clientId );\n\t\t\tconst match = getActiveBlockVariation( blockName, attributes );\n\t\t\tconst isMultiSelected = isBlockMultiSelected( clientId );\n\t\t\tconst checkDeep = true;\n\t\t\tconst isAncestorOfSelectedBlock = hasSelectedInnerBlock(\n\t\t\t\tclientId,\n\t\t\t\tcheckDeep\n\t\t\t);\n\t\t\tconst blockEditingMode = getBlockEditingMode( clientId );\n\n\t\t\tconst multiple = hasBlockSupport( blockName, 'multiple', true );\n\n\t\t\t// For block types with `multiple` support, there is no \"original\n\t\t\t// block\" to be found in the content, as the block itself is valid.\n\t\t\tconst blocksWithSameName = multiple\n\t\t\t\t? []\n\t\t\t\t: getBlocksByName( blockName );\n\t\t\tconst isInvalid =\n\t\t\t\tblocksWithSameName.length &&\n\t\t\t\tblocksWithSameName[ 0 ] !== clientId;\n\n\t\t\treturn {\n\t\t\t\t...previewContext,\n\t\t\t\tmode: getBlockMode( clientId ),\n\t\t\t\tisSelectionEnabled: isSelectionEnabled(),\n\t\t\t\tisLocked: !! getTemplateLock( rootClientId ),\n\t\t\t\tisSectionBlock: _isSectionBlock( clientId ),\n\t\t\t\tcanRemove,\n\t\t\t\tcanMove,\n\t\t\t\tisSelected: _isSelected,\n\t\t\t\tisTemporarilyEditingAsBlocks:\n\t\t\t\t\tgetTemporarilyEditingAsBlocks() === clientId,\n\t\t\t\tblockEditingMode,\n\t\t\t\tmayDisplayControls:\n\t\t\t\t\t_isSelected ||\n\t\t\t\t\t( isFirstMultiSelectedBlock( clientId ) &&\n\t\t\t\t\t\tgetMultiSelectedBlockClientIds().every(\n\t\t\t\t\t\t\t( id ) => getBlockName( id ) === blockName\n\t\t\t\t\t\t) ),\n\t\t\t\tmayDisplayParentControls:\n\t\t\t\t\t_hasBlockSupport(\n\t\t\t\t\t\tgetBlockName( clientId ),\n\t\t\t\t\t\t'__experimentalExposeControlsToChildren',\n\t\t\t\t\t\tfalse\n\t\t\t\t\t) && hasSelectedInnerBlock( clientId ),\n\t\t\t\tblockApiVersion: blockType?.apiVersion || 1,\n\t\t\t\tblockTitle: match?.title || blockType?.title,\n\t\t\t\tisSubtreeDisabled:\n\t\t\t\t\tblockEditingMode === 'disabled' &&\n\t\t\t\t\tisBlockSubtreeDisabled( clientId ),\n\t\t\t\thasOverlay:\n\t\t\t\t\t__unstableHasActiveBlockOverlayActive( clientId ) &&\n\t\t\t\t\t! isDragging(),\n\t\t\t\tinitialPosition: _isSelected\n\t\t\t\t\t? getSelectedBlocksInitialCaretPosition()\n\t\t\t\t\t: undefined,\n\t\t\t\tisHighlighted: isBlockHighlighted( clientId ),\n\t\t\t\tisMultiSelected,\n\t\t\t\tisPartiallySelected:\n\t\t\t\t\tisMultiSelected &&\n\t\t\t\t\t! __unstableIsFullySelected() &&\n\t\t\t\t\t! __unstableSelectionHasUnmergeableBlock(),\n\t\t\t\tisDragging: isBlockBeingDragged( clientId ),\n\t\t\t\thasChildSelected: isAncestorOfSelectedBlock,\n\t\t\t\tisEditingDisabled: blockEditingMode === 'disabled',\n\t\t\t\thasEditableOutline:\n\t\t\t\t\tblockEditingMode !== 'disabled' &&\n\t\t\t\t\tgetBlockEditingMode( rootClientId ) === 'disabled',\n\t\t\t\toriginalBlockClientId: isInvalid\n\t\t\t\t\t? blocksWithSameName[ 0 ]\n\t\t\t\t\t: false,\n\t\t\t};\n\t\t},\n\t\t[ clientId, rootClientId ]\n\t);\n\n\tconst {\n\t\tisPreviewMode,\n\t\t// Fill values that end up as a public API and may not be defined in\n\t\t// preview mode.\n\t\tmode = 'visual',\n\t\tisSelectionEnabled = false,\n\t\tisLocked = false,\n\t\tcanRemove = false,\n\t\tcanMove = false,\n\t\tblockWithoutAttributes,\n\t\tname,\n\t\tattributes,\n\t\tisValid,\n\t\tisSelected = false,\n\t\tthemeSupportsLayout,\n\t\tisTemporarilyEditingAsBlocks,\n\t\tblockEditingMode,\n\t\tmayDisplayControls,\n\t\tmayDisplayParentControls,\n\t\tindex,\n\t\tblockApiVersion,\n\t\tblockTitle,\n\t\tisSubtreeDisabled,\n\t\thasOverlay,\n\t\tinitialPosition,\n\t\tisHighlighted,\n\t\tisMultiSelected,\n\t\tisPartiallySelected,\n\t\tisReusable,\n\t\tisDragging,\n\t\thasChildSelected,\n\t\tisSectionBlock,\n\t\tisEditingDisabled,\n\t\thasEditableOutline,\n\t\tclassName,\n\t\tdefaultClassName,\n\t\toriginalBlockClientId,\n\t} = selectedProps;\n\n\t// Users of the editor.BlockListBlock filter used to be able to\n\t// access the block prop.\n\t// Ideally these blocks would rely on the clientId prop only.\n\t// This is kept for backward compatibility reasons.\n\tconst block = useMemo(\n\t\t() => ( { ...blockWithoutAttributes, attributes } ),\n\t\t[ blockWithoutAttributes, attributes ]\n\t);\n\n\t// Block is sometimes not mounted at the right time, causing it be\n\t// undefined see issue for more info\n\t// https://github.com/WordPress/gutenberg/issues/17013\n\tif ( ! selectedProps ) {\n\t\treturn null;\n\t}\n\n\tconst privateContext = {\n\t\tisPreviewMode,\n\t\tclientId,\n\t\tclassName,\n\t\tindex,\n\t\tmode,\n\t\tname,\n\t\tblockApiVersion,\n\t\tblockTitle,\n\t\tisSelected,\n\t\tisSubtreeDisabled,\n\t\thasOverlay,\n\t\tinitialPosition,\n\t\tblockEditingMode,\n\t\tisHighlighted,\n\t\tisMultiSelected,\n\t\tisPartiallySelected,\n\t\tisReusable,\n\t\tisDragging,\n\t\thasChildSelected,\n\t\tisSectionBlock,\n\t\tisEditingDisabled,\n\t\thasEditableOutline,\n\t\tisTemporarilyEditingAsBlocks,\n\t\tdefaultClassName,\n\t\tmayDisplayControls,\n\t\tmayDisplayParentControls,\n\t\toriginalBlockClientId,\n\t\tthemeSupportsLayout,\n\t\tcanMove,\n\t};\n\n\t// Here we separate between the props passed to BlockListBlock and any other\n\t// information we selected for internal use. BlockListBlock is a filtered\n\t// component and thus ALL the props are PUBLIC API.\n\n\t// Note that the context value doesn't have to be memoized in this case\n\t// because when it changes, this component will be re-rendered anyway, and\n\t// none of the consumers (BlockListBlock and useBlockProps) are memoized or\n\t// \"pure\". This is different from the public BlockEditContext, where\n\t// consumers might be memoized or \"pure\".\n\treturn (\n\t\t<PrivateBlockContext.Provider value={ privateContext }>\n\t\t\t<BlockListBlock\n\t\t\t\t{ ...props }\n\t\t\t\t// WARNING: all the following props are public API (through the\n\t\t\t\t// editor.BlockListBlock filter) and normally nothing new should\n\t\t\t\t// be added to it.\n\t\t\t\t{ ...{\n\t\t\t\t\tmode,\n\t\t\t\t\tisSelectionEnabled,\n\t\t\t\t\tisLocked,\n\t\t\t\t\tcanRemove,\n\t\t\t\t\tcanMove,\n\t\t\t\t\t// Users of the editor.BlockListBlock filter used to be able\n\t\t\t\t\t// to access the block prop. Ideally these blocks would rely\n\t\t\t\t\t// on the clientId prop only. This is kept for backward\n\t\t\t\t\t// compatibility reasons.\n\t\t\t\t\tblock,\n\t\t\t\t\tname,\n\t\t\t\t\tattributes,\n\t\t\t\t\tisValid,\n\t\t\t\t\tisSelected,\n\t\t\t\t} }\n\t\t\t/>\n\t\t</PrivateBlockContext.Provider>\n\t);\n}\n\nexport default memo( BlockListBlockProvider );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,IAAI,EAAEC,OAAO,EAAEC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;AACvE,SACCC,YAAY,EACZC,cAAc,EACdC,wBAAwB,EACxBC,iBAAiB,EACjBC,iBAAiB,EACjBC,mBAAmB,EACnBC,iBAAi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,QAAQ;IACRb,SAAS;IACT6E,KAAK;IACLnE,IAAI;IACJQ,IAAI;IACJoJ,eAAe;IACfb,UAAU;IACV3I,UAAU;IACVyJ,iBAAiB;IACjBC,UAAU;IACVtD,eAAe;IACfxE,gBAAgB;IAChB+H,aAAa;IACbX,eAAe;IACfY,mBAAmB;IACnBnB,UAAU;IACVV,UAAU;IACV8B,gBAAgB;IAChB/C,cAAc;IACdgD,iBAAiB;IACjBC,kBAAkB;IAClBT,4BAA4B;IAC5BZ,gBAAgB;IAChB3H,kBAAkB;IAClBC,wBAAwB;IACxBgJ,qBAAqB;IACrB/I,mBAAmB;IACnB6H;EACD,CAAC;;EAED;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA,oBACCtK,IAAA,CAACH,mBAAmB,CAACoE,QAAQ;IAACC,KAAK,EAAGuH,cAAgB;IAAA5K,QAAA,eACrDb,IAAA,CAACiB,cAAc;MAAA,GACTF,KAAK;MAKTK,IAAI;MACJK,kBAAkB;MAClBJ,QAAQ;MACRC,SAAS;MACTgJ,OAAO;MACP;MACA;MACA;MACA;MACApJ,KAAK;MACLU,IAAI;MACJE,UAAU;MACVD,OAAO;MACPL;IAAU,CAEX;EAAC,CAC2B,CAAC;AAEjC;AAEA,eAAezD,IAAI,CAAEkK,sBAAuB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["clsx","memo","RawHTML","useContext","useMemo","getBlockType","getSaveContent","isUnmodifiedDefaultBlock","serializeRawBlock","switchToBlockType","getDefaultBlockName","isUnmodifiedBlock","isReusableBlock","getBlockDefaultClassName","hasBlockSupport","createBlock","store","blocksStore","withFilters","withDispatch","useSelect","compose","safeHTML","BlockEdit","BlockInvalidWarning","BlockCrashWarning","BlockCrashBoundary","BlockHtml","useBlockProps","blockEditorStore","useLayout","PrivateBlockContext","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","mergeWrapperProps","propsA","propsB","newProps","hasOwnProperty","className","style","Block","children","isHtml","props","__unstableIsHtml","BlockListBlock","block","__unstableBlockSource","mode","isLocked","canRemove","clientId","isSelected","isSelectionEnabled","__unstableLayoutClassNames","layoutClassNames","name","isValid","attributes","wrapperProps","setAttributes","onReplace","onRemove","onInsertBlocksAfter","onMerge","toggleSelection","_wrapperProps","mayDisplayControls","mayDisplayParentControls","themeSupportsLayout","context","parentLayout","blockEdit","insertBlocksAfter","undefined","mergeBlocks","__unstableParentLayout","Object","keys","length","blockEditingMode","isPreviewMode","blockType","getEditWrapperProps","isAligned","isSticky","includes","saveContent","display","apiVersion","dataAlign","restWrapperProps","updatedWrapperProps","Provider","value","fallback","applyWithDispatch","dispatch","ownProps","registry","updateBlockAttributes","insertBlocks","replaceBlocks","__unstableMarkLastChangeAsPersistent","moveBlocksToPosition","removeBlock","selectBlock","nextAttributes","getMultiSelectedBlockClientIds","select","multiSelectedBlockClientIds","clientIds","newAttributes","onInsertBlocks","blocks","index","rootClientId","getBlockIndex","forward","getPreviousBlockClientId","getNextBlockClientId","getBlock","getBlockAttributes","getBlockName","getBlockOrder","getBlockRootClientId","canInsertBlockType","switchToDefaultOrRemove","defaultBlockName","defaultBlockType","replacement","nextBlockClientId","batch","merge","moveFirstItemUp","_clientId","changeSelection","wrapperBlockName","wrapperBlockType","isTextualWrapper","category","targetRootClientId","blockOrder","firstClientId","every","nextRootClientId","rootAttributes","previousRootAttributes","key","previousBlockClientId","previousRootClientId","indexToSelect","initialPosition","replacementBlocks","Array","isArray","selectionEnabled","BlockListBlockProvider","selectedProps","isBlockSelected","getBlockMode","getTemplateLock","isSectionBlock","_isSectionBlock","getBlockWithoutAttributes","canRemoveBlock","canMoveBlock","getSettings","getTemporarilyEditingAsBlocks","getBlockEditingMode","isFirstMultiSelectedBlock","hasSelectedInnerBlock","getBlocksByName","isBlockMultiSelected","isBlockSubtreeDisabled","isBlockHighlighted","__unstableIsFullySelected","__unstableSelectionHasUnmergeableBlock","isBlockBeingDragged","isDragging","__unstableHasActiveBlockOverlayActive","getSelectedBlocksInitialCaretPosition","blockWithoutAttributes","_hasBlockSupport","getActiveBlockVariation","blockName","supportsLayout","hasLightBlockWrapper","previewContext","isReusable","defaultClassName","blockTitle","title","isBlockHidden","metadata","blockVisibility","_isBlockHidden","_isSelected","canMove","match","isMultiSelected","checkDeep","isAncestorOfSelectedBlock","multiple","blocksWithSameName","isInvalid","isTemporarilyEditingAsBlocks","id","blockApiVersion","isSubtreeDisabled","hasOverlay","isHighlighted","isPartiallySelected","hasChildSelected","isEditingDisabled","hasEditableOutline","originalBlockClientId","privateContext"],"sources":["@wordpress/block-editor/src/components/block-list/block.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { memo, RawHTML, useContext, useMemo } from '@wordpress/element';\nimport {\n\tgetBlockType,\n\tgetSaveContent,\n\tisUnmodifiedDefaultBlock,\n\tserializeRawBlock,\n\tswitchToBlockType,\n\tgetDefaultBlockName,\n\tisUnmodifiedBlock,\n\tisReusableBlock,\n\tgetBlockDefaultClassName,\n\thasBlockSupport,\n\tcreateBlock,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { withFilters } from '@wordpress/components';\nimport { withDispatch, useSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport BlockEdit from '../block-edit';\nimport BlockInvalidWarning from './block-invalid-warning';\nimport BlockCrashWarning from './block-crash-warning';\nimport BlockCrashBoundary from './block-crash-boundary';\nimport BlockHtml from './block-html';\nimport { useBlockProps } from './use-block-props';\nimport { store as blockEditorStore } from '../../store';\nimport { useLayout } from './layout';\nimport { PrivateBlockContext } from './private-block-context';\n\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Merges wrapper props with special handling for classNames and styles.\n *\n * @param {Object} propsA\n * @param {Object} propsB\n *\n * @return {Object} Merged props.\n */\nfunction mergeWrapperProps( propsA, propsB ) {\n\tconst newProps = {\n\t\t...propsA,\n\t\t...propsB,\n\t};\n\n\t// May be set to undefined, so check if the property is set!\n\tif (\n\t\tpropsA?.hasOwnProperty( 'className' ) &&\n\t\tpropsB?.hasOwnProperty( 'className' )\n\t) {\n\t\tnewProps.className = clsx( propsA.className, propsB.className );\n\t}\n\n\tif (\n\t\tpropsA?.hasOwnProperty( 'style' ) &&\n\t\tpropsB?.hasOwnProperty( 'style' )\n\t) {\n\t\tnewProps.style = { ...propsA.style, ...propsB.style };\n\t}\n\n\treturn newProps;\n}\n\nfunction Block( { children, isHtml, ...props } ) {\n\treturn (\n\t\t<div { ...useBlockProps( props, { __unstableIsHtml: isHtml } ) }>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nfunction BlockListBlock( {\n\tblock: { __unstableBlockSource },\n\tmode,\n\tisLocked,\n\tcanRemove,\n\tclientId,\n\tisSelected,\n\tisSelectionEnabled,\n\tclassName,\n\t__unstableLayoutClassNames: layoutClassNames,\n\tname,\n\tisValid,\n\tattributes,\n\twrapperProps,\n\tsetAttributes,\n\tonReplace,\n\tonRemove,\n\tonInsertBlocksAfter,\n\tonMerge,\n\ttoggleSelection,\n} ) {\n\tconst {\n\t\tmayDisplayControls,\n\t\tmayDisplayParentControls,\n\t\tthemeSupportsLayout,\n\t\t...context\n\t} = useContext( PrivateBlockContext );\n\n\tconst parentLayout = useLayout() || {};\n\n\t// We wrap the BlockEdit component in a div that hides it when editing in\n\t// HTML mode. This allows us to render all of the ancillary pieces\n\t// (InspectorControls, etc.) which are inside `BlockEdit` but not\n\t// `BlockHTML`, even in HTML mode.\n\tlet blockEdit = (\n\t\t<BlockEdit\n\t\t\tname={ name }\n\t\t\tisSelected={ isSelected }\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tinsertBlocksAfter={ isLocked ? undefined : onInsertBlocksAfter }\n\t\t\tonReplace={ canRemove ? onReplace : undefined }\n\t\t\tonRemove={ canRemove ? onRemove : undefined }\n\t\t\tmergeBlocks={ canRemove ? onMerge : undefined }\n\t\t\tclientId={ clientId }\n\t\t\tisSelectionEnabled={ isSelectionEnabled }\n\t\t\ttoggleSelection={ toggleSelection }\n\t\t\t__unstableLayoutClassNames={ layoutClassNames }\n\t\t\t__unstableParentLayout={\n\t\t\t\tObject.keys( parentLayout ).length ? parentLayout : undefined\n\t\t\t}\n\t\t\tmayDisplayControls={ mayDisplayControls }\n\t\t\tmayDisplayParentControls={ mayDisplayParentControls }\n\t\t\tblockEditingMode={ context.blockEditingMode }\n\t\t\tisPreviewMode={ context.isPreviewMode }\n\t\t/>\n\t);\n\n\tconst blockType = getBlockType( name );\n\n\t// Determine whether the block has props to apply to the wrapper.\n\tif ( blockType?.getEditWrapperProps ) {\n\t\twrapperProps = mergeWrapperProps(\n\t\t\twrapperProps,\n\t\t\tblockType.getEditWrapperProps( attributes )\n\t\t);\n\t}\n\n\tconst isAligned =\n\t\twrapperProps &&\n\t\t!! wrapperProps[ 'data-align' ] &&\n\t\t! themeSupportsLayout;\n\n\t// Support for sticky position in classic themes with alignment wrappers.\n\n\tconst isSticky = className?.includes( 'is-position-sticky' );\n\n\t// For aligned blocks, provide a wrapper element so the block can be\n\t// positioned relative to the block column.\n\t// This is only kept for classic themes that don't support layout\n\t// Historically we used to rely on extra divs and data-align to\n\t// provide the alignments styles in the editor.\n\t// Due to the differences between frontend and backend, we migrated\n\t// to the layout feature, and we're now aligning the markup of frontend\n\t// and backend.\n\tif ( isAligned ) {\n\t\tblockEdit = (\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'wp-block', isSticky && className ) }\n\t\t\t\tdata-align={ wrapperProps[ 'data-align' ] }\n\t\t\t>\n\t\t\t\t{ blockEdit }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tlet block;\n\n\tif ( ! isValid ) {\n\t\tconst saveContent = __unstableBlockSource\n\t\t\t? serializeRawBlock( __unstableBlockSource )\n\t\t\t: getSaveContent( blockType, attributes );\n\n\t\tblock = (\n\t\t\t<Block className=\"has-warning\">\n\t\t\t\t<BlockInvalidWarning clientId={ clientId } />\n\t\t\t\t<RawHTML>{ safeHTML( saveContent ) }</RawHTML>\n\t\t\t</Block>\n\t\t);\n\t} else if ( mode === 'html' ) {\n\t\t// Render blockEdit so the inspector controls don't disappear.\n\t\t// See #8969.\n\t\tblock = (\n\t\t\t<>\n\t\t\t\t<div style={ { display: 'none' } }>{ blockEdit }</div>\n\t\t\t\t<Block isHtml>\n\t\t\t\t\t<BlockHtml clientId={ clientId } />\n\t\t\t\t</Block>\n\t\t\t</>\n\t\t);\n\t} else if ( blockType?.apiVersion > 1 ) {\n\t\tblock = blockEdit;\n\t} else {\n\t\tblock = <Block>{ blockEdit }</Block>;\n\t}\n\n\tconst { 'data-align': dataAlign, ...restWrapperProps } = wrapperProps ?? {};\n\tconst updatedWrapperProps = {\n\t\t...restWrapperProps,\n\t\tclassName: clsx(\n\t\t\trestWrapperProps.className,\n\t\t\tdataAlign && themeSupportsLayout && `align${ dataAlign }`,\n\t\t\t! ( dataAlign && isSticky ) && className\n\t\t),\n\t};\n\n\t// We set a new context with the adjusted and filtered wrapperProps (through\n\t// `editor.BlockListBlock`), which the `BlockListBlockProvider` did not have\n\t// access to.\n\t// Note that the context value doesn't have to be memoized in this case\n\t// because when it changes, this component will be re-rendered anyway, and\n\t// none of the consumers (BlockListBlock and useBlockProps) are memoized or\n\t// \"pure\". This is different from the public BlockEditContext, where\n\t// consumers might be memoized or \"pure\".\n\treturn (\n\t\t<PrivateBlockContext.Provider\n\t\t\tvalue={ {\n\t\t\t\twrapperProps: updatedWrapperProps,\n\t\t\t\tisAligned,\n\t\t\t\t...context,\n\t\t\t} }\n\t\t>\n\t\t\t<BlockCrashBoundary\n\t\t\t\tfallback={\n\t\t\t\t\t<Block className=\"has-warning\">\n\t\t\t\t\t\t<BlockCrashWarning />\n\t\t\t\t\t</Block>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ block }\n\t\t\t</BlockCrashBoundary>\n\t\t</PrivateBlockContext.Provider>\n\t);\n}\n\nconst applyWithDispatch = withDispatch( ( dispatch, ownProps, registry ) => {\n\tconst {\n\t\tupdateBlockAttributes,\n\t\tinsertBlocks,\n\t\tmergeBlocks,\n\t\treplaceBlocks,\n\t\ttoggleSelection,\n\t\t__unstableMarkLastChangeAsPersistent,\n\t\tmoveBlocksToPosition,\n\t\tremoveBlock,\n\t\tselectBlock,\n\t} = dispatch( blockEditorStore );\n\n\t// Do not add new properties here, use `useDispatch` instead to avoid\n\t// leaking new props to the public API (editor.BlockListBlock filter).\n\treturn {\n\t\tsetAttributes( nextAttributes ) {\n\t\t\tconst { getMultiSelectedBlockClientIds } =\n\t\t\t\tregistry.select( blockEditorStore );\n\t\t\tconst multiSelectedBlockClientIds =\n\t\t\t\tgetMultiSelectedBlockClientIds();\n\t\t\tconst { clientId, attributes } = ownProps;\n\t\t\tconst clientIds = multiSelectedBlockClientIds.length\n\t\t\t\t? multiSelectedBlockClientIds\n\t\t\t\t: [ clientId ];\n\t\t\tconst newAttributes =\n\t\t\t\ttypeof nextAttributes === 'function'\n\t\t\t\t\t? nextAttributes( attributes )\n\t\t\t\t\t: nextAttributes;\n\n\t\t\tupdateBlockAttributes( clientIds, newAttributes );\n\t\t},\n\t\tonInsertBlocks( blocks, index ) {\n\t\t\tconst { rootClientId } = ownProps;\n\t\t\tinsertBlocks( blocks, index, rootClientId );\n\t\t},\n\t\tonInsertBlocksAfter( blocks ) {\n\t\t\tconst { clientId, rootClientId } = ownProps;\n\t\t\tconst { getBlockIndex } = registry.select( blockEditorStore );\n\t\t\tconst index = getBlockIndex( clientId );\n\t\t\tinsertBlocks( blocks, index + 1, rootClientId );\n\t\t},\n\t\tonMerge( forward ) {\n\t\t\tconst { clientId, rootClientId } = ownProps;\n\t\t\tconst {\n\t\t\t\tgetPreviousBlockClientId,\n\t\t\t\tgetNextBlockClientId,\n\t\t\t\tgetBlock,\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockOrder,\n\t\t\t\tgetBlockIndex,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tcanInsertBlockType,\n\t\t\t} = registry.select( blockEditorStore );\n\n\t\t\tfunction switchToDefaultOrRemove() {\n\t\t\t\tconst block = getBlock( clientId );\n\t\t\t\tconst defaultBlockName = getDefaultBlockName();\n\t\t\t\tconst defaultBlockType = getBlockType( defaultBlockName );\n\t\t\t\tif ( getBlockName( clientId ) !== defaultBlockName ) {\n\t\t\t\t\tconst replacement = switchToBlockType(\n\t\t\t\t\t\tblock,\n\t\t\t\t\t\tdefaultBlockName\n\t\t\t\t\t);\n\t\t\t\t\tif ( replacement && replacement.length ) {\n\t\t\t\t\t\treplaceBlocks( clientId, replacement );\n\t\t\t\t\t}\n\t\t\t\t} else if ( isUnmodifiedDefaultBlock( block ) ) {\n\t\t\t\t\tconst nextBlockClientId = getNextBlockClientId( clientId );\n\t\t\t\t\tif ( nextBlockClientId ) {\n\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t\tselectBlock( nextBlockClientId );\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} else if ( defaultBlockType.merge ) {\n\t\t\t\t\tconst attributes = defaultBlockType.merge(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\tblock.attributes\n\t\t\t\t\t);\n\t\t\t\t\treplaceBlocks(\n\t\t\t\t\t\t[ clientId ],\n\t\t\t\t\t\t[ createBlock( defaultBlockName, attributes ) ]\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Moves the block with clientId up one level. If the block type\n\t\t\t * cannot be inserted at the new location, it will be attempted to\n\t\t\t * convert to the default block type.\n\t\t\t *\n\t\t\t * @param {string} _clientId The block to move.\n\t\t\t * @param {boolean} changeSelection Whether to change the selection\n\t\t\t * to the moved block.\n\t\t\t */\n\t\t\tfunction moveFirstItemUp( _clientId, changeSelection = true ) {\n\t\t\t\tconst wrapperBlockName = getBlockName( _clientId );\n\t\t\t\tconst wrapperBlockType = getBlockType( wrapperBlockName );\n\t\t\t\tconst isTextualWrapper = wrapperBlockType.category === 'text';\n\t\t\t\tconst targetRootClientId = getBlockRootClientId( _clientId );\n\t\t\t\tconst blockOrder = getBlockOrder( _clientId );\n\t\t\t\tconst [ firstClientId ] = blockOrder;\n\n\t\t\t\tif (\n\t\t\t\t\tblockOrder.length === 1 &&\n\t\t\t\t\tisUnmodifiedBlock( getBlock( firstClientId ) )\n\t\t\t\t) {\n\t\t\t\t\tremoveBlock( _clientId );\n\t\t\t\t} else if ( isTextualWrapper ) {\n\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\t\tgetBlockName( firstClientId ),\n\t\t\t\t\t\t\t\ttargetRootClientId\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\t\t\t\t[ firstClientId ],\n\t\t\t\t\t\t\t\t_clientId,\n\t\t\t\t\t\t\t\ttargetRootClientId,\n\t\t\t\t\t\t\t\tgetBlockIndex( _clientId )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst replacement = switchToBlockType(\n\t\t\t\t\t\t\t\tgetBlock( firstClientId ),\n\t\t\t\t\t\t\t\tgetDefaultBlockName()\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\treplacement &&\n\t\t\t\t\t\t\t\treplacement.length &&\n\t\t\t\t\t\t\t\treplacement.every( ( block ) =>\n\t\t\t\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\t\t\t\tblock.name,\n\t\t\t\t\t\t\t\t\t\ttargetRootClientId\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tinsertBlocks(\n\t\t\t\t\t\t\t\t\treplacement,\n\t\t\t\t\t\t\t\t\tgetBlockIndex( _clientId ),\n\t\t\t\t\t\t\t\t\ttargetRootClientId,\n\t\t\t\t\t\t\t\t\tchangeSelection\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tremoveBlock( firstClientId, false );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tswitchToDefaultOrRemove();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! getBlockOrder( _clientId ).length &&\n\t\t\t\t\t\t\tisUnmodifiedBlock( getBlock( _clientId ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tremoveBlock( _clientId, false );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tswitchToDefaultOrRemove();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For `Delete` or forward merge, we should do the exact same thing\n\t\t\t// as `Backspace`, but from the other block.\n\t\t\tif ( forward ) {\n\t\t\t\tif ( rootClientId ) {\n\t\t\t\t\tconst nextRootClientId =\n\t\t\t\t\t\tgetNextBlockClientId( rootClientId );\n\n\t\t\t\t\tif ( nextRootClientId ) {\n\t\t\t\t\t\t// If there is a block that follows with the same parent\n\t\t\t\t\t\t// block name and the same attributes, merge the inner\n\t\t\t\t\t\t// blocks.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tgetBlockName( rootClientId ) ===\n\t\t\t\t\t\t\tgetBlockName( nextRootClientId )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tconst rootAttributes =\n\t\t\t\t\t\t\t\tgetBlockAttributes( rootClientId );\n\t\t\t\t\t\t\tconst previousRootAttributes =\n\t\t\t\t\t\t\t\tgetBlockAttributes( nextRootClientId );\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tObject.keys( rootAttributes ).every(\n\t\t\t\t\t\t\t\t\t( key ) =>\n\t\t\t\t\t\t\t\t\t\trootAttributes[ key ] ===\n\t\t\t\t\t\t\t\t\t\tpreviousRootAttributes[ key ]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\t\t\t\t\t\tgetBlockOrder( nextRootClientId ),\n\t\t\t\t\t\t\t\t\t\tnextRootClientId,\n\t\t\t\t\t\t\t\t\t\trootClientId\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tremoveBlock( nextRootClientId, false );\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmergeBlocks( rootClientId, nextRootClientId );\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst nextBlockClientId = getNextBlockClientId( clientId );\n\n\t\t\t\tif ( ! nextBlockClientId ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( getBlockOrder( nextBlockClientId ).length ) {\n\t\t\t\t\tmoveFirstItemUp( nextBlockClientId, false );\n\t\t\t\t} else {\n\t\t\t\t\tmergeBlocks( clientId, nextBlockClientId );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst previousBlockClientId =\n\t\t\t\t\tgetPreviousBlockClientId( clientId );\n\n\t\t\t\tif ( previousBlockClientId ) {\n\t\t\t\t\tmergeBlocks( previousBlockClientId, clientId );\n\t\t\t\t} else if ( rootClientId ) {\n\t\t\t\t\tconst previousRootClientId =\n\t\t\t\t\t\tgetPreviousBlockClientId( rootClientId );\n\n\t\t\t\t\t// If there is a preceding block with the same parent block\n\t\t\t\t\t// name and the same attributes, merge the inner blocks.\n\t\t\t\t\tif (\n\t\t\t\t\t\tpreviousRootClientId &&\n\t\t\t\t\t\tgetBlockName( rootClientId ) ===\n\t\t\t\t\t\t\tgetBlockName( previousRootClientId )\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst rootAttributes =\n\t\t\t\t\t\t\tgetBlockAttributes( rootClientId );\n\t\t\t\t\t\tconst previousRootAttributes =\n\t\t\t\t\t\t\tgetBlockAttributes( previousRootClientId );\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tObject.keys( rootAttributes ).every(\n\t\t\t\t\t\t\t\t( key ) =>\n\t\t\t\t\t\t\t\t\trootAttributes[ key ] ===\n\t\t\t\t\t\t\t\t\tpreviousRootAttributes[ key ]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\t\t\t\t\tgetBlockOrder( rootClientId ),\n\t\t\t\t\t\t\t\t\trootClientId,\n\t\t\t\t\t\t\t\t\tpreviousRootClientId\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tremoveBlock( rootClientId, false );\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tmoveFirstItemUp( rootClientId );\n\t\t\t\t} else {\n\t\t\t\t\tswitchToDefaultOrRemove();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tonReplace( blocks, indexToSelect, initialPosition ) {\n\t\t\tif (\n\t\t\t\tblocks.length &&\n\t\t\t\t! isUnmodifiedDefaultBlock( blocks[ blocks.length - 1 ] )\n\t\t\t) {\n\t\t\t\t__unstableMarkLastChangeAsPersistent();\n\t\t\t}\n\t\t\t//Unsynced patterns are nested in an array so we need to flatten them.\n\t\t\tconst replacementBlocks =\n\t\t\t\tblocks?.length === 1 && Array.isArray( blocks[ 0 ] )\n\t\t\t\t\t? blocks[ 0 ]\n\t\t\t\t\t: blocks;\n\t\t\treplaceBlocks(\n\t\t\t\t[ ownProps.clientId ],\n\t\t\t\treplacementBlocks,\n\t\t\t\tindexToSelect,\n\t\t\t\tinitialPosition\n\t\t\t);\n\t\t},\n\t\tonRemove() {\n\t\t\tremoveBlock( ownProps.clientId );\n\t\t},\n\t\ttoggleSelection( selectionEnabled ) {\n\t\t\ttoggleSelection( selectionEnabled );\n\t\t},\n\t};\n} );\n\n// This component is used by the BlockListBlockProvider component below. It will\n// add the props necessary for the `editor.BlockListBlock` filters.\nBlockListBlock = compose(\n\tapplyWithDispatch,\n\twithFilters( 'editor.BlockListBlock' )\n)( BlockListBlock );\n\n// This component provides all the information we need through a single store\n// subscription (useSelect mapping). Only the necessary props are passed down\n// to the BlockListBlock component, which is a filtered component, so these\n// props are public API. To avoid adding to the public API, we use a private\n// context to pass the rest of the information to the filtered BlockListBlock\n// component, and useBlockProps.\nfunction BlockListBlockProvider( props ) {\n\tconst { clientId, rootClientId } = props;\n\tconst selectedProps = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tisBlockSelected,\n\t\t\t\tgetBlockMode,\n\t\t\t\tisSelectionEnabled,\n\t\t\t\tgetTemplateLock,\n\t\t\t\tisSectionBlock: _isSectionBlock,\n\t\t\t\tgetBlockWithoutAttributes,\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tcanRemoveBlock,\n\t\t\t\tcanMoveBlock,\n\n\t\t\t\tgetSettings,\n\t\t\t\tgetTemporarilyEditingAsBlocks,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t\tgetBlockName,\n\t\t\t\tisFirstMultiSelectedBlock,\n\t\t\t\tgetMultiSelectedBlockClientIds,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t\tgetBlocksByName,\n\n\t\t\t\tgetBlockIndex,\n\t\t\t\tisBlockMultiSelected,\n\t\t\t\tisBlockSubtreeDisabled,\n\t\t\t\tisBlockHighlighted,\n\t\t\t\t__unstableIsFullySelected,\n\t\t\t\t__unstableSelectionHasUnmergeableBlock,\n\t\t\t\tisBlockBeingDragged,\n\t\t\t\tisDragging,\n\t\t\t\t__unstableHasActiveBlockOverlayActive,\n\t\t\t\tgetSelectedBlocksInitialCaretPosition,\n\t\t\t} = unlock( select( blockEditorStore ) );\n\t\t\tconst blockWithoutAttributes =\n\t\t\t\tgetBlockWithoutAttributes( clientId );\n\n\t\t\t// This is a temporary fix.\n\t\t\t// This function should never be called when a block is not\n\t\t\t// present in the state. It happens now because the order in\n\t\t\t// withSelect rendering is not correct.\n\t\t\tif ( ! blockWithoutAttributes ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\thasBlockSupport: _hasBlockSupport,\n\t\t\t\tgetActiveBlockVariation,\n\t\t\t} = select( blocksStore );\n\t\t\tconst attributes = getBlockAttributes( clientId );\n\t\t\tconst { name: blockName, isValid } = blockWithoutAttributes;\n\t\t\tconst blockType = getBlockType( blockName );\n\t\t\tconst { supportsLayout, isPreviewMode } = getSettings();\n\t\t\tconst hasLightBlockWrapper = blockType?.apiVersion > 1;\n\t\t\tconst previewContext = {\n\t\t\t\tisPreviewMode,\n\t\t\t\tblockWithoutAttributes,\n\t\t\t\tname: blockName,\n\t\t\t\tattributes,\n\t\t\t\tisValid,\n\t\t\t\tthemeSupportsLayout: supportsLayout,\n\t\t\t\tindex: getBlockIndex( clientId ),\n\t\t\t\tisReusable: isReusableBlock( blockType ),\n\t\t\t\tclassName: hasLightBlockWrapper\n\t\t\t\t\t? attributes.className\n\t\t\t\t\t: undefined,\n\t\t\t\tdefaultClassName: hasLightBlockWrapper\n\t\t\t\t\t? getBlockDefaultClassName( blockName )\n\t\t\t\t\t: undefined,\n\t\t\t\tblockTitle: blockType?.title,\n\t\t\t\tisBlockHidden: attributes?.metadata?.blockVisibility === false,\n\t\t\t};\n\n\t\t\t// When in preview mode, we can avoid a lot of selection and\n\t\t\t// editing related selectors.\n\t\t\tif ( isPreviewMode ) {\n\t\t\t\treturn previewContext;\n\t\t\t}\n\n\t\t\tconst { isBlockHidden: _isBlockHidden } = unlock(\n\t\t\t\tselect( blockEditorStore )\n\t\t\t);\n\t\t\tconst _isSelected = isBlockSelected( clientId );\n\t\t\tconst canRemove = canRemoveBlock( clientId );\n\t\t\tconst canMove = canMoveBlock( clientId );\n\t\t\tconst match = getActiveBlockVariation( blockName, attributes );\n\t\t\tconst isMultiSelected = isBlockMultiSelected( clientId );\n\t\t\tconst checkDeep = true;\n\t\t\tconst isAncestorOfSelectedBlock = hasSelectedInnerBlock(\n\t\t\t\tclientId,\n\t\t\t\tcheckDeep\n\t\t\t);\n\t\t\tconst blockEditingMode = getBlockEditingMode( clientId );\n\n\t\t\tconst multiple = hasBlockSupport( blockName, 'multiple', true );\n\n\t\t\t// For block types with `multiple` support, there is no \"original\n\t\t\t// block\" to be found in the content, as the block itself is valid.\n\t\t\tconst blocksWithSameName = multiple\n\t\t\t\t? []\n\t\t\t\t: getBlocksByName( blockName );\n\t\t\tconst isInvalid =\n\t\t\t\tblocksWithSameName.length &&\n\t\t\t\tblocksWithSameName[ 0 ] !== clientId;\n\n\t\t\treturn {\n\t\t\t\t...previewContext,\n\t\t\t\tmode: getBlockMode( clientId ),\n\t\t\t\tisSelectionEnabled: isSelectionEnabled(),\n\t\t\t\tisLocked: !! getTemplateLock( rootClientId ),\n\t\t\t\tisSectionBlock: _isSectionBlock( clientId ),\n\t\t\t\tcanRemove,\n\t\t\t\tcanMove,\n\t\t\t\tisSelected: _isSelected,\n\t\t\t\tisTemporarilyEditingAsBlocks:\n\t\t\t\t\tgetTemporarilyEditingAsBlocks() === clientId,\n\t\t\t\tblockEditingMode,\n\t\t\t\tmayDisplayControls:\n\t\t\t\t\t_isSelected ||\n\t\t\t\t\t( isFirstMultiSelectedBlock( clientId ) &&\n\t\t\t\t\t\tgetMultiSelectedBlockClientIds().every(\n\t\t\t\t\t\t\t( id ) => getBlockName( id ) === blockName\n\t\t\t\t\t\t) ),\n\t\t\t\tmayDisplayParentControls:\n\t\t\t\t\t_hasBlockSupport(\n\t\t\t\t\t\tgetBlockName( clientId ),\n\t\t\t\t\t\t'__experimentalExposeControlsToChildren',\n\t\t\t\t\t\tfalse\n\t\t\t\t\t) && hasSelectedInnerBlock( clientId ),\n\t\t\t\tblockApiVersion: blockType?.apiVersion || 1,\n\t\t\t\tblockTitle: match?.title || blockType?.title,\n\t\t\t\tisSubtreeDisabled:\n\t\t\t\t\tblockEditingMode === 'disabled' &&\n\t\t\t\t\tisBlockSubtreeDisabled( clientId ),\n\t\t\t\thasOverlay:\n\t\t\t\t\t__unstableHasActiveBlockOverlayActive( clientId ) &&\n\t\t\t\t\t! isDragging(),\n\t\t\t\tinitialPosition: _isSelected\n\t\t\t\t\t? getSelectedBlocksInitialCaretPosition()\n\t\t\t\t\t: undefined,\n\t\t\t\tisHighlighted: isBlockHighlighted( clientId ),\n\t\t\t\tisMultiSelected,\n\t\t\t\tisPartiallySelected:\n\t\t\t\t\tisMultiSelected &&\n\t\t\t\t\t! __unstableIsFullySelected() &&\n\t\t\t\t\t! __unstableSelectionHasUnmergeableBlock(),\n\t\t\t\tisDragging: isBlockBeingDragged( clientId ),\n\t\t\t\thasChildSelected: isAncestorOfSelectedBlock,\n\t\t\t\tisEditingDisabled: blockEditingMode === 'disabled',\n\t\t\t\thasEditableOutline:\n\t\t\t\t\tblockEditingMode !== 'disabled' &&\n\t\t\t\t\tgetBlockEditingMode( rootClientId ) === 'disabled',\n\t\t\t\toriginalBlockClientId: isInvalid\n\t\t\t\t\t? blocksWithSameName[ 0 ]\n\t\t\t\t\t: false,\n\t\t\t\tisBlockHidden: _isBlockHidden( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, rootClientId ]\n\t);\n\n\tconst {\n\t\tisPreviewMode,\n\t\t// Fill values that end up as a public API and may not be defined in\n\t\t// preview mode.\n\t\tmode = 'visual',\n\t\tisSelectionEnabled = false,\n\t\tisLocked = false,\n\t\tcanRemove = false,\n\t\tcanMove = false,\n\t\tblockWithoutAttributes,\n\t\tname,\n\t\tattributes,\n\t\tisValid,\n\t\tisSelected = false,\n\t\tthemeSupportsLayout,\n\t\tisTemporarilyEditingAsBlocks,\n\t\tblockEditingMode,\n\t\tmayDisplayControls,\n\t\tmayDisplayParentControls,\n\t\tindex,\n\t\tblockApiVersion,\n\t\tblockTitle,\n\t\tisSubtreeDisabled,\n\t\thasOverlay,\n\t\tinitialPosition,\n\t\tisHighlighted,\n\t\tisMultiSelected,\n\t\tisPartiallySelected,\n\t\tisReusable,\n\t\tisDragging,\n\t\thasChildSelected,\n\t\tisSectionBlock,\n\t\tisEditingDisabled,\n\t\thasEditableOutline,\n\t\tclassName,\n\t\tdefaultClassName,\n\t\toriginalBlockClientId,\n\t\tisBlockHidden,\n\t} = selectedProps;\n\n\t// Users of the editor.BlockListBlock filter used to be able to\n\t// access the block prop.\n\t// Ideally these blocks would rely on the clientId prop only.\n\t// This is kept for backward compatibility reasons.\n\tconst block = useMemo(\n\t\t() => ( { ...blockWithoutAttributes, attributes } ),\n\t\t[ blockWithoutAttributes, attributes ]\n\t);\n\n\t// Block is sometimes not mounted at the right time, causing it be\n\t// undefined see issue for more info\n\t// https://github.com/WordPress/gutenberg/issues/17013\n\tif ( ! selectedProps ) {\n\t\treturn null;\n\t}\n\n\tconst privateContext = {\n\t\tisPreviewMode,\n\t\tclientId,\n\t\tclassName,\n\t\tindex,\n\t\tmode,\n\t\tname,\n\t\tblockApiVersion,\n\t\tblockTitle,\n\t\tisSelected,\n\t\tisSubtreeDisabled,\n\t\thasOverlay,\n\t\tinitialPosition,\n\t\tblockEditingMode,\n\t\tisHighlighted,\n\t\tisMultiSelected,\n\t\tisPartiallySelected,\n\t\tisReusable,\n\t\tisDragging,\n\t\thasChildSelected,\n\t\tisSectionBlock,\n\t\tisEditingDisabled,\n\t\thasEditableOutline,\n\t\tisTemporarilyEditingAsBlocks,\n\t\tdefaultClassName,\n\t\tmayDisplayControls,\n\t\tmayDisplayParentControls,\n\t\toriginalBlockClientId,\n\t\tthemeSupportsLayout,\n\t\tcanMove,\n\t\tisBlockHidden,\n\t};\n\n\tif (\n\t\tisBlockHidden &&\n\t\t! isSelected &&\n\t\t! isMultiSelected &&\n\t\t! hasChildSelected\n\t) {\n\t\treturn null;\n\t}\n\n\t// Here we separate between the props passed to BlockListBlock and any other\n\t// information we selected for internal use. BlockListBlock is a filtered\n\t// component and thus ALL the props are PUBLIC API.\n\n\t// Note that the context value doesn't have to be memoized in this case\n\t// because when it changes, this component will be re-rendered anyway, and\n\t// none of the consumers (BlockListBlock and useBlockProps) are memoized or\n\t// \"pure\". This is different from the public BlockEditContext, where\n\t// consumers might be memoized or \"pure\".\n\treturn (\n\t\t<PrivateBlockContext.Provider value={ privateContext }>\n\t\t\t<BlockListBlock\n\t\t\t\t{ ...props }\n\t\t\t\t// WARNING: all the following props are public API (through the\n\t\t\t\t// editor.BlockListBlock filter) and normally nothing new should\n\t\t\t\t// be added to it.\n\t\t\t\t{ ...{\n\t\t\t\t\tmode,\n\t\t\t\t\tisSelectionEnabled,\n\t\t\t\t\tisLocked,\n\t\t\t\t\tcanRemove,\n\t\t\t\t\tcanMove,\n\t\t\t\t\t// Users of the editor.BlockListBlock filter used to be able\n\t\t\t\t\t// to access the block prop. Ideally these blocks would rely\n\t\t\t\t\t// on the clientId prop only. This is kept for backward\n\t\t\t\t\t// compatibility reasons.\n\t\t\t\t\tblock,\n\t\t\t\t\tname,\n\t\t\t\t\tattributes,\n\t\t\t\t\tisValid,\n\t\t\t\t\tisSelected,\n\t\t\t\t} }\n\t\t\t/>\n\t\t</PrivateBlockContext.Provider>\n\t);\n}\n\nexport default memo( BlockListBlockProvider );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,IAAI,EAAEC,OAAO,EAAEC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;AACvE,SACCC,YAAY,EACZC,cAAc,EACdC,wBAAwB,EACxBC,iBAAiB,EACjBC,iBAAiB,EACjBC,mBAAmB,EACnBC,iBAAiB,EACjBC,eAAe,EACfC,wBAAwB,EACxB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GAAGwL,sBAAsB;IAAE5H;EAAW,CAAC,CAAE,EACnD,CAAE4H,sBAAsB,EAAE5H,UAAU,CACrC,CAAC;;EAED;EACA;EACA;EACA,IAAK,CAAEoG,aAAa,EAAG;IACtB,OAAO,IAAI;EACZ;EAEA,MAAM2D,cAAc,GAAG;IACtBxI,aAAa;IACb9B,QAAQ;IACRb,SAAS;IACT6E,KAAK;IACLnE,IAAI;IACJQ,IAAI;IACJwJ,eAAe;IACfjB,UAAU;IACV3I,UAAU;IACV6J,iBAAiB;IACjBC,UAAU;IACV1D,eAAe;IACfxE,gBAAgB;IAChBmI,aAAa;IACbX,eAAe;IACfY,mBAAmB;IACnBvB,UAAU;IACVV,UAAU;IACVkC,gBAAgB;IAChBnD,cAAc;IACdoD,iBAAiB;IACjBC,kBAAkB;IAClBT,4BAA4B;IAC5BhB,gBAAgB;IAChB3H,kBAAkB;IAClBC,wBAAwB;IACxBoJ,qBAAqB;IACrBnJ,mBAAmB;IACnBiI,OAAO;IACPL;EACD,CAAC;EAED,IACCA,aAAa,IACb,CAAE7I,UAAU,IACZ,CAAEoJ,eAAe,IACjB,CAAEa,gBAAgB,EACjB;IACD,OAAO,IAAI;EACZ;;EAEA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA,oBACCzL,IAAA,CAACH,mBAAmB,CAACoE,QAAQ;IAACC,KAAK,EAAG2H,cAAgB;IAAAhL,QAAA,eACrDb,IAAA,CAACiB,cAAc;MAAA,GACTF,KAAK;MAKTK,IAAI;MACJK,kBAAkB;MAClBJ,QAAQ;MACRC,SAAS;MACToJ,OAAO;MACP;MACA;MACA;MACA;MACAxJ,KAAK;MACLU,IAAI;MACJE,UAAU;MACVD,OAAO;MACPL;IAAU,CAEX;EAAC,CAC2B,CAAC;AAEjC;AAEA,eAAezD,IAAI,CAAEkK,sBAAuB,CAAC","ignoreList":[]}
@@ -26,7 +26,6 @@ import { useBlockRefProvider } from './use-block-refs';
26
26
  import { useIntersectionObserver } from './use-intersection-observer';
27
27
  import { useScrollIntoView } from './use-scroll-into-view';
28
28
  import { useFlashEditableBlocks } from '../../use-flash-editable-blocks';
29
- import { canBindBlock } from '../../../utils/block-bindings';
30
29
  import { useFirefoxDraggableCompatibility } from './use-firefox-draggable-compatibility';
31
30
 
32
31
  /**
@@ -100,7 +99,8 @@ export function useBlockProps(props = {}, {
100
99
  isTemporarilyEditingAsBlocks,
101
100
  defaultClassName,
102
101
  isSectionBlock,
103
- canMove
102
+ canMove,
103
+ isBlockHidden
104
104
  } = useContext(PrivateBlockContext);
105
105
 
106
106
  // translators: %s: Type of block (i.e. Text, Image etc)
@@ -126,7 +126,7 @@ export function useBlockProps(props = {}, {
126
126
  }), canMove ? ffDragRef : undefined]);
127
127
  const blockEditContext = useBlockEditContext();
128
128
  const hasBlockBindings = !!blockEditContext[blockBindingsKey];
129
- const bindingsStyle = hasBlockBindings && canBindBlock(name) ? {
129
+ const bindingsStyle = hasBlockBindings ? {
130
130
  '--wp-admin-theme-color': 'var(--wp-block-synced-color)',
131
131
  '--wp-admin-theme-color--rgb': 'var(--wp-block-synced-color--rgb)'
132
132
  } : {};
@@ -166,7 +166,8 @@ export function useBlockProps(props = {}, {
166
166
  'is-editing-disabled': isEditingDisabled,
167
167
  'has-editable-outline': hasEditableOutline,
168
168
  'has-negative-margin': hasNegativeMargin,
169
- 'is-content-locked-temporarily-editing-as-blocks': isTemporarilyEditingAsBlocks
169
+ 'is-content-locked-temporarily-editing-as-blocks': isTemporarilyEditingAsBlocks,
170
+ 'is-block-hidden': isBlockHidden
170
171
  }, className, props.className, wrapperProps.className, defaultClassName),
171
172
  style: {
172
173
  ...wrapperProps.style,
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useContext","__","sprintf","__unstableGetBlockProps","getBlockProps","useMergeRefs","useDisabled","warning","useMovingAnimation","PrivateBlockContext","useFocusFirstElement","useIsHovered","blockBindingsKey","useBlockEditContext","useFocusHandler","useEventHandlers","useBlockRefProvider","useIntersectionObserver","useScrollIntoView","useFlashEditableBlocks","canBindBlock","useFirefoxDraggableCompatibility","useBlockProps","props","__unstableIsHtml","clientId","className","wrapperProps","isAligned","index","mode","name","blockApiVersion","blockTitle","isSelected","isSubtreeDisabled","hasOverlay","initialPosition","blockEditingMode","isHighlighted","isMultiSelected","isPartiallySelected","isReusable","isDragging","hasChildSelected","isEditingDisabled","hasEditableOutline","isTemporarilyEditingAsBlocks","defaultClassName","isSectionBlock","canMove","blockLabel","htmlSuffix","ffDragRef","mergedRefs","ref","triggerAnimationOnChange","isDisabled","isEnabled","undefined","blockEditContext","hasBlockBindings","bindingsStyle","globalThis","SCRIPT_DEBUG","hasNegativeMargin","style","marginTop","charAt","marginBottom","marginLeft","marginRight","tabIndex","draggable","id","role","inert","save"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { __unstableGetBlockProps as getBlockProps } from '@wordpress/blocks';\nimport { useMergeRefs, useDisabled } from '@wordpress/compose';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport useMovingAnimation from '../../use-moving-animation';\nimport { PrivateBlockContext } from '../private-block-context';\nimport { useFocusFirstElement } from './use-focus-first-element';\nimport { useIsHovered } from './use-is-hovered';\nimport {\n\tblockBindingsKey,\n\tuseBlockEditContext,\n} from '../../block-edit/context';\nimport { useFocusHandler } from './use-focus-handler';\nimport { useEventHandlers } from './use-selected-block-event-handlers';\nimport { useBlockRefProvider } from './use-block-refs';\nimport { useIntersectionObserver } from './use-intersection-observer';\nimport { useScrollIntoView } from './use-scroll-into-view';\nimport { useFlashEditableBlocks } from '../../use-flash-editable-blocks';\nimport { canBindBlock } from '../../../utils/block-bindings';\nimport { useFirefoxDraggableCompatibility } from './use-firefox-draggable-compatibility';\n\n/**\n * This hook is used to lightly mark an element as a block element. The element\n * should be the outermost element of a block. Call this hook and pass the\n * returned props to the element to mark as a block. If you define a ref for the\n * element, it is important to pass the ref to this hook, which the hook in turn\n * will pass to the component through the props it returns. Optionally, you can\n * also pass any other props through this hook, and they will be merged and\n * returned.\n *\n * Use of this hook on the outermost element of a block is required if using API >= v2.\n *\n * @example\n * ```js\n * import { useBlockProps } from '@wordpress/block-editor';\n *\n * export default function Edit() {\n *\n * const blockProps = useBlockProps( {\n * className: 'my-custom-class',\n * style: {\n * color: '#222222',\n * backgroundColor: '#eeeeee'\n * }\n * } )\n *\n * return (\n *\t <div { ...blockProps }>\n *\n * </div>\n * )\n * }\n *\n * ```\n *\n *\n * @param {Object} props Optional. Props to pass to the element. Must contain\n * the ref if one is defined.\n * @param {Object} options Options for internal use only.\n * @param {boolean} options.__unstableIsHtml\n *\n * @return {Object} Props to pass to the element to mark as a block.\n */\nexport function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {\n\tconst {\n\t\tclientId,\n\t\tclassName,\n\t\twrapperProps = {},\n\t\tisAligned,\n\t\tindex,\n\t\tmode,\n\t\tname,\n\t\tblockApiVersion,\n\t\tblockTitle,\n\t\tisSelected,\n\t\tisSubtreeDisabled,\n\t\thasOverlay,\n\t\tinitialPosition,\n\t\tblockEditingMode,\n\t\tisHighlighted,\n\t\tisMultiSelected,\n\t\tisPartiallySelected,\n\t\tisReusable,\n\t\tisDragging,\n\t\thasChildSelected,\n\t\tisEditingDisabled,\n\t\thasEditableOutline,\n\t\tisTemporarilyEditingAsBlocks,\n\t\tdefaultClassName,\n\t\tisSectionBlock,\n\t\tcanMove,\n\t} = useContext( PrivateBlockContext );\n\n\t// translators: %s: Type of block (i.e. Text, Image etc)\n\tconst blockLabel = sprintf( __( 'Block: %s' ), blockTitle );\n\tconst htmlSuffix = mode === 'html' && ! __unstableIsHtml ? '-visual' : '';\n\tconst ffDragRef = useFirefoxDraggableCompatibility();\n\tconst mergedRefs = useMergeRefs( [\n\t\tprops.ref,\n\t\tuseFocusFirstElement( { clientId, initialPosition } ),\n\t\tuseBlockRefProvider( clientId ),\n\t\tuseFocusHandler( clientId ),\n\t\tuseEventHandlers( { clientId, isSelected } ),\n\t\tuseIsHovered(),\n\t\tuseIntersectionObserver(),\n\t\tuseMovingAnimation( { triggerAnimationOnChange: index, clientId } ),\n\t\tuseDisabled( { isDisabled: ! hasOverlay } ),\n\t\tuseFlashEditableBlocks( {\n\t\t\tclientId,\n\t\t\tisEnabled: isSectionBlock,\n\t\t} ),\n\t\tuseScrollIntoView( { isSelected } ),\n\t\tcanMove ? ffDragRef : undefined,\n\t] );\n\n\tconst blockEditContext = useBlockEditContext();\n\tconst hasBlockBindings = !! blockEditContext[ blockBindingsKey ];\n\tconst bindingsStyle =\n\t\thasBlockBindings && canBindBlock( name )\n\t\t\t? {\n\t\t\t\t\t'--wp-admin-theme-color': 'var(--wp-block-synced-color)',\n\t\t\t\t\t'--wp-admin-theme-color--rgb':\n\t\t\t\t\t\t'var(--wp-block-synced-color--rgb)',\n\t\t\t }\n\t\t\t: {};\n\n\t// Ensures it warns only inside the `edit` implementation for the block.\n\tif ( blockApiVersion < 2 && clientId === blockEditContext.clientId ) {\n\t\twarning(\n\t\t\t`Block type \"${ name }\" must support API version 2 or higher to work correctly with \"useBlockProps\" method.`\n\t\t);\n\t}\n\n\tlet hasNegativeMargin = false;\n\tif (\n\t\twrapperProps?.style?.marginTop?.charAt( 0 ) === '-' ||\n\t\twrapperProps?.style?.marginBottom?.charAt( 0 ) === '-' ||\n\t\twrapperProps?.style?.marginLeft?.charAt( 0 ) === '-' ||\n\t\twrapperProps?.style?.marginRight?.charAt( 0 ) === '-'\n\t) {\n\t\thasNegativeMargin = true;\n\t}\n\n\treturn {\n\t\ttabIndex: blockEditingMode === 'disabled' ? -1 : 0,\n\t\tdraggable: canMove && ! hasChildSelected ? true : undefined,\n\t\t...wrapperProps,\n\t\t...props,\n\t\tref: mergedRefs,\n\t\tid: `block-${ clientId }${ htmlSuffix }`,\n\t\trole: 'document',\n\t\t'aria-label': blockLabel,\n\t\t'data-block': clientId,\n\t\t'data-type': name,\n\t\t'data-title': blockTitle,\n\t\tinert: isSubtreeDisabled ? 'true' : undefined,\n\t\tclassName: clsx(\n\t\t\t'block-editor-block-list__block',\n\t\t\t{\n\t\t\t\t// The wp-block className is important for editor styles.\n\t\t\t\t'wp-block': ! isAligned,\n\t\t\t\t'has-block-overlay': hasOverlay,\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-highlighted': isHighlighted,\n\t\t\t\t'is-multi-selected': isMultiSelected,\n\t\t\t\t'is-partially-selected': isPartiallySelected,\n\t\t\t\t'is-reusable': isReusable,\n\t\t\t\t'is-dragging': isDragging,\n\t\t\t\t'has-child-selected': hasChildSelected,\n\t\t\t\t'is-editing-disabled': isEditingDisabled,\n\t\t\t\t'has-editable-outline': hasEditableOutline,\n\t\t\t\t'has-negative-margin': hasNegativeMargin,\n\t\t\t\t'is-content-locked-temporarily-editing-as-blocks':\n\t\t\t\t\tisTemporarilyEditingAsBlocks,\n\t\t\t},\n\t\t\tclassName,\n\t\t\tprops.className,\n\t\t\twrapperProps.className,\n\t\t\tdefaultClassName\n\t\t),\n\t\tstyle: { ...wrapperProps.style, ...props.style, ...bindingsStyle },\n\t};\n}\n\n/**\n * Call within a save function to get the props for the block wrapper.\n *\n * @param {Object} props Optional. Props to pass to the element.\n */\nuseBlockProps.save = getBlockProps;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,uBAAuB,IAAIC,aAAa,QAAQ,mBAAmB;AAC5E,SAASC,YAAY,EAAEC,WAAW,QAAQ,oBAAoB;AAC9D,OAAOC,OAAO,MAAM,oBAAoB;;AAExC;AACA;AACA;AACA,OAAOC,kBAAkB,MAAM,4BAA4B;AAC3D,SAASC,mBAAmB,QAAQ,0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AAsB,EAAEC,kBAAkB;MAC1C,qBAAqB,EAAEmB,iBAAiB;MACxC,iDAAiD,EAChDlB;IACF,CAAC,EACDrB,SAAS,EACTH,KAAK,CAACG,SAAS,EACfC,YAAY,CAACD,SAAS,EACtBsB,gBACD,CAAC;IACDkB,KAAK,EAAE;MAAE,GAAGvC,YAAY,CAACuC,KAAK;MAAE,GAAG3C,KAAK,CAAC2C,KAAK;MAAE,GAAGJ;IAAc;EAClE,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACAxC,aAAa,CAACuD,IAAI,GAAGzE,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useContext","__","sprintf","__unstableGetBlockProps","getBlockProps","useMergeRefs","useDisabled","warning","useMovingAnimation","PrivateBlockContext","useFocusFirstElement","useIsHovered","blockBindingsKey","useBlockEditContext","useFocusHandler","useEventHandlers","useBlockRefProvider","useIntersectionObserver","useScrollIntoView","useFlashEditableBlocks","useFirefoxDraggableCompatibility","useBlockProps","props","__unstableIsHtml","clientId","className","wrapperProps","isAligned","index","mode","name","blockApiVersion","blockTitle","isSelected","isSubtreeDisabled","hasOverlay","initialPosition","blockEditingMode","isHighlighted","isMultiSelected","isPartiallySelected","isReusable","isDragging","hasChildSelected","isEditingDisabled","hasEditableOutline","isTemporarilyEditingAsBlocks","defaultClassName","isSectionBlock","canMove","isBlockHidden","blockLabel","htmlSuffix","ffDragRef","mergedRefs","ref","triggerAnimationOnChange","isDisabled","isEnabled","undefined","blockEditContext","hasBlockBindings","bindingsStyle","globalThis","SCRIPT_DEBUG","hasNegativeMargin","style","marginTop","charAt","marginBottom","marginLeft","marginRight","tabIndex","draggable","id","role","inert","save"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { __unstableGetBlockProps as getBlockProps } from '@wordpress/blocks';\nimport { useMergeRefs, useDisabled } from '@wordpress/compose';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport useMovingAnimation from '../../use-moving-animation';\nimport { PrivateBlockContext } from '../private-block-context';\nimport { useFocusFirstElement } from './use-focus-first-element';\nimport { useIsHovered } from './use-is-hovered';\nimport {\n\tblockBindingsKey,\n\tuseBlockEditContext,\n} from '../../block-edit/context';\nimport { useFocusHandler } from './use-focus-handler';\nimport { useEventHandlers } from './use-selected-block-event-handlers';\nimport { useBlockRefProvider } from './use-block-refs';\nimport { useIntersectionObserver } from './use-intersection-observer';\nimport { useScrollIntoView } from './use-scroll-into-view';\nimport { useFlashEditableBlocks } from '../../use-flash-editable-blocks';\nimport { useFirefoxDraggableCompatibility } from './use-firefox-draggable-compatibility';\n\n/**\n * This hook is used to lightly mark an element as a block element. The element\n * should be the outermost element of a block. Call this hook and pass the\n * returned props to the element to mark as a block. If you define a ref for the\n * element, it is important to pass the ref to this hook, which the hook in turn\n * will pass to the component through the props it returns. Optionally, you can\n * also pass any other props through this hook, and they will be merged and\n * returned.\n *\n * Use of this hook on the outermost element of a block is required if using API >= v2.\n *\n * @example\n * ```js\n * import { useBlockProps } from '@wordpress/block-editor';\n *\n * export default function Edit() {\n *\n * const blockProps = useBlockProps( {\n * className: 'my-custom-class',\n * style: {\n * color: '#222222',\n * backgroundColor: '#eeeeee'\n * }\n * } )\n *\n * return (\n *\t <div { ...blockProps }>\n *\n * </div>\n * )\n * }\n *\n * ```\n *\n *\n * @param {Object} props Optional. Props to pass to the element. Must contain\n * the ref if one is defined.\n * @param {Object} options Options for internal use only.\n * @param {boolean} options.__unstableIsHtml\n *\n * @return {Object} Props to pass to the element to mark as a block.\n */\nexport function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {\n\tconst {\n\t\tclientId,\n\t\tclassName,\n\t\twrapperProps = {},\n\t\tisAligned,\n\t\tindex,\n\t\tmode,\n\t\tname,\n\t\tblockApiVersion,\n\t\tblockTitle,\n\t\tisSelected,\n\t\tisSubtreeDisabled,\n\t\thasOverlay,\n\t\tinitialPosition,\n\t\tblockEditingMode,\n\t\tisHighlighted,\n\t\tisMultiSelected,\n\t\tisPartiallySelected,\n\t\tisReusable,\n\t\tisDragging,\n\t\thasChildSelected,\n\t\tisEditingDisabled,\n\t\thasEditableOutline,\n\t\tisTemporarilyEditingAsBlocks,\n\t\tdefaultClassName,\n\t\tisSectionBlock,\n\t\tcanMove,\n\t\tisBlockHidden,\n\t} = useContext( PrivateBlockContext );\n\n\t// translators: %s: Type of block (i.e. Text, Image etc)\n\tconst blockLabel = sprintf( __( 'Block: %s' ), blockTitle );\n\tconst htmlSuffix = mode === 'html' && ! __unstableIsHtml ? '-visual' : '';\n\tconst ffDragRef = useFirefoxDraggableCompatibility();\n\tconst mergedRefs = useMergeRefs( [\n\t\tprops.ref,\n\t\tuseFocusFirstElement( { clientId, initialPosition } ),\n\t\tuseBlockRefProvider( clientId ),\n\t\tuseFocusHandler( clientId ),\n\t\tuseEventHandlers( { clientId, isSelected } ),\n\t\tuseIsHovered(),\n\t\tuseIntersectionObserver(),\n\t\tuseMovingAnimation( { triggerAnimationOnChange: index, clientId } ),\n\t\tuseDisabled( { isDisabled: ! hasOverlay } ),\n\t\tuseFlashEditableBlocks( {\n\t\t\tclientId,\n\t\t\tisEnabled: isSectionBlock,\n\t\t} ),\n\t\tuseScrollIntoView( { isSelected } ),\n\t\tcanMove ? ffDragRef : undefined,\n\t] );\n\n\tconst blockEditContext = useBlockEditContext();\n\tconst hasBlockBindings = !! blockEditContext[ blockBindingsKey ];\n\tconst bindingsStyle = hasBlockBindings\n\t\t? {\n\t\t\t\t'--wp-admin-theme-color': 'var(--wp-block-synced-color)',\n\t\t\t\t'--wp-admin-theme-color--rgb':\n\t\t\t\t\t'var(--wp-block-synced-color--rgb)',\n\t\t }\n\t\t: {};\n\n\t// Ensures it warns only inside the `edit` implementation for the block.\n\tif ( blockApiVersion < 2 && clientId === blockEditContext.clientId ) {\n\t\twarning(\n\t\t\t`Block type \"${ name }\" must support API version 2 or higher to work correctly with \"useBlockProps\" method.`\n\t\t);\n\t}\n\n\tlet hasNegativeMargin = false;\n\tif (\n\t\twrapperProps?.style?.marginTop?.charAt( 0 ) === '-' ||\n\t\twrapperProps?.style?.marginBottom?.charAt( 0 ) === '-' ||\n\t\twrapperProps?.style?.marginLeft?.charAt( 0 ) === '-' ||\n\t\twrapperProps?.style?.marginRight?.charAt( 0 ) === '-'\n\t) {\n\t\thasNegativeMargin = true;\n\t}\n\n\treturn {\n\t\ttabIndex: blockEditingMode === 'disabled' ? -1 : 0,\n\t\tdraggable: canMove && ! hasChildSelected ? true : undefined,\n\t\t...wrapperProps,\n\t\t...props,\n\t\tref: mergedRefs,\n\t\tid: `block-${ clientId }${ htmlSuffix }`,\n\t\trole: 'document',\n\t\t'aria-label': blockLabel,\n\t\t'data-block': clientId,\n\t\t'data-type': name,\n\t\t'data-title': blockTitle,\n\t\tinert: isSubtreeDisabled ? 'true' : undefined,\n\t\tclassName: clsx(\n\t\t\t'block-editor-block-list__block',\n\t\t\t{\n\t\t\t\t// The wp-block className is important for editor styles.\n\t\t\t\t'wp-block': ! isAligned,\n\t\t\t\t'has-block-overlay': hasOverlay,\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-highlighted': isHighlighted,\n\t\t\t\t'is-multi-selected': isMultiSelected,\n\t\t\t\t'is-partially-selected': isPartiallySelected,\n\t\t\t\t'is-reusable': isReusable,\n\t\t\t\t'is-dragging': isDragging,\n\t\t\t\t'has-child-selected': hasChildSelected,\n\t\t\t\t'is-editing-disabled': isEditingDisabled,\n\t\t\t\t'has-editable-outline': hasEditableOutline,\n\t\t\t\t'has-negative-margin': hasNegativeMargin,\n\t\t\t\t'is-content-locked-temporarily-editing-as-blocks':\n\t\t\t\t\tisTemporarilyEditingAsBlocks,\n\t\t\t\t'is-block-hidden': isBlockHidden,\n\t\t\t},\n\t\t\tclassName,\n\t\t\tprops.className,\n\t\t\twrapperProps.className,\n\t\t\tdefaultClassName\n\t\t),\n\t\tstyle: { ...wrapperProps.style, ...props.style, ...bindingsStyle },\n\t};\n}\n\n/**\n * Call within a save function to get the props for the block wrapper.\n *\n * @param {Object} props Optional. Props to pass to the element.\n */\nuseBlockProps.save = getBlockProps;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,uBAAuB,IAAIC,aAAa,QAAQ,mBAAmB;AAC5E,SAASC,YAAY,EAAEC,WAAW,QAAQ,oBAAoB;AAC9D,OAAOC,OAAO,MAAM,oBAAoB;;AAExC;AACA;AACA;AACA,OAAOC,kBAAkB,MAAM,4BAA4B;AAC3D,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9D,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SACCC,gBAAgB,EAChBC,mBAAmB,QACb,0BAA0B;AACjC,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,gBAAgB,QAAQ,qCAAqC;AACtE,SAASC,mBAAmB,QAAQ,kBAAkB;AACtD,SAASC,uBAAuB,QAAQ,6BAA6B;AACrE,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,sBAAsB,QAAQ,iCAAiC;AACxE,SAASC,gCAAgC,QAAQ,uCAAuC;;AAExF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAEC,KAAK,GAAG,CAAC,CAAC,EAAE;EAAEC;AAAiB,CAAC,GAAG,CAA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AAY,EAAExB,UAAU;IACxB,YAAY,EAAE3B,QAAQ;IACtB,WAAW,EAAEM,IAAI;IACjB,YAAY,EAAEE,UAAU;IACxB4C,KAAK,EAAE1C,iBAAiB,GAAG,MAAM,GAAGyB,SAAS;IAC7ClC,SAAS,EAAE1B,IAAI,CACd,gCAAgC,EAChC;MACC;MACA,UAAU,EAAE,CAAE4B,SAAS;MACvB,mBAAmB,EAAEQ,UAAU;MAC/B,aAAa,EAAEF,UAAU;MACzB,gBAAgB,EAAEK,aAAa;MAC/B,mBAAmB,EAAEC,eAAe;MACpC,uBAAuB,EAAEC,mBAAmB;MAC5C,aAAa,EAAEC,UAAU;MACzB,aAAa,EAAEC,UAAU;MACzB,oBAAoB,EAAEC,gBAAgB;MACtC,qBAAqB,EAAEC,iBAAiB;MACxC,sBAAsB,EAAEC,kBAAkB;MAC1C,qBAAqB,EAAEoB,iBAAiB;MACxC,iDAAiD,EAChDnB,4BAA4B;MAC7B,iBAAiB,EAAEI;IACpB,CAAC,EACDzB,SAAS,EACTH,KAAK,CAACG,SAAS,EACfC,YAAY,CAACD,SAAS,EACtBsB,gBACD,CAAC;IACDmB,KAAK,EAAE;MAAE,GAAGxC,YAAY,CAACwC,KAAK;MAAE,GAAG5C,KAAK,CAAC4C,KAAK;MAAE,GAAGJ;IAAc;EAClE,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACAzC,aAAa,CAACwD,IAAI,GAAGzE,aAAa","ignoreList":[]}
@@ -2,6 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { createSlotFill, MenuGroup, __experimentalStyleProvider as StyleProvider } from '@wordpress/components';
5
+ import { hasBlockSupport } from '@wordpress/blocks';
5
6
  import { useSelect } from '@wordpress/data';
6
7
 
7
8
  /**
@@ -13,6 +14,7 @@ import { store as blockEditorStore } from '../../store';
13
14
  import BlockModeToggle from '../block-settings-menu/block-mode-toggle';
14
15
  import { ModifyContentLockMenuItem } from '../content-lock';
15
16
  import { BlockRenameControl, useBlockRename } from '../block-rename';
17
+ import { BlockVisibilityMenuItem } from '../block-visibility';
16
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
19
  const {
18
20
  Fill,
@@ -25,9 +27,11 @@ const BlockSettingsMenuControlsSlot = ({
25
27
  const {
26
28
  selectedBlocks,
27
29
  selectedClientIds,
28
- isContentOnly
30
+ isContentOnly,
31
+ canToggleSelectedBlocksVisibility
29
32
  } = useSelect(select => {
30
33
  const {
34
+ getBlocksByClientId,
31
35
  getBlockNamesByClientId,
32
36
  getSelectedBlockClientIds,
33
37
  getBlockEditingMode
@@ -36,7 +40,8 @@ const BlockSettingsMenuControlsSlot = ({
36
40
  return {
37
41
  selectedBlocks: getBlockNamesByClientId(ids),
38
42
  selectedClientIds: ids,
39
- isContentOnly: getBlockEditingMode(ids[0]) === 'contentOnly'
43
+ isContentOnly: getBlockEditingMode(ids[0]) === 'contentOnly',
44
+ canToggleSelectedBlocksVisibility: getBlocksByClientId(ids).every(block => hasBlockSupport(block.name, 'blockVisibility', true))
40
45
  };
41
46
  }, [clientIds]);
42
47
  const {
@@ -47,6 +52,7 @@ const BlockSettingsMenuControlsSlot = ({
47
52
  } = useBlockRename(selectedBlocks[0]);
48
53
  const showLockButton = selectedClientIds.length === 1 && canLock && !isContentOnly;
49
54
  const showRenameButton = selectedClientIds.length === 1 && canRename && !isContentOnly;
55
+ const showVisibilityButton = canToggleSelectedBlocksVisibility && !isContentOnly;
50
56
 
51
57
  // Check if current selection of blocks is Groupable or Ungroupable
52
58
  // and pass this props down to ConvertToGroupButton.
@@ -74,6 +80,8 @@ const BlockSettingsMenuControlsSlot = ({
74
80
  clientId: selectedClientIds[0]
75
81
  }), showRenameButton && /*#__PURE__*/_jsx(BlockRenameControl, {
76
82
  clientId: selectedClientIds[0]
83
+ }), showVisibilityButton && /*#__PURE__*/_jsx(BlockVisibilityMenuItem, {
84
+ clientIds: selectedClientIds
77
85
  }), fills, selectedClientIds.length === 1 && /*#__PURE__*/_jsx(ModifyContentLockMenuItem, {
78
86
  clientId: selectedClientIds[0],
79
87
  onClose: fillProps?.onClose
@@ -1 +1 @@
1
- {"version":3,"names":["createSlotFill","MenuGroup","__experimentalStyleProvider","StyleProvider","useSelect","useConvertToGroupButtonProps","ConvertToGroupButton","BlockLockMenuItem","useBlockLock","store","blockEditorStore","BlockModeToggle","ModifyContentLockMenuItem","BlockRenameControl","useBlockRename","jsx","_jsx","jsxs","_jsxs","Fill","Slot","BlockSettingsMenuControlsSlot","fillProps","clientIds","selectedBlocks","selectedClientIds","isContentOnly","select","getBlockNamesByClientId","getSelectedBlockClientIds","getBlockEditingMode","ids","canLock","canRename","showLockButton","length","showRenameButton","convertToGroupButtonProps","isGroupable","isUngroupable","showConvertToGroupButton","children","fills","onClose","clientId","count","firstBlockClientId","onToggle","BlockSettingsMenuControls","props","document"],"sources":["@wordpress/block-editor/src/components/block-settings-menu-controls/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateSlotFill,\n\tMenuGroup,\n\t__experimentalStyleProvider as StyleProvider,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseConvertToGroupButtonProps,\n\tConvertToGroupButton,\n} from '../convert-to-group-buttons';\nimport { BlockLockMenuItem, useBlockLock } from '../block-lock';\nimport { store as blockEditorStore } from '../../store';\nimport BlockModeToggle from '../block-settings-menu/block-mode-toggle';\nimport { ModifyContentLockMenuItem } from '../content-lock';\nimport { BlockRenameControl, useBlockRename } from '../block-rename';\n\nconst { Fill, Slot } = createSlotFill( 'BlockSettingsMenuControls' );\n\nconst BlockSettingsMenuControlsSlot = ( { fillProps, clientIds = null } ) => {\n\tconst { selectedBlocks, selectedClientIds, isContentOnly } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockNamesByClientId,\n\t\t\t\tgetSelectedBlockClientIds,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst ids =\n\t\t\t\tclientIds !== null ? clientIds : getSelectedBlockClientIds();\n\t\t\treturn {\n\t\t\t\tselectedBlocks: getBlockNamesByClientId( ids ),\n\t\t\t\tselectedClientIds: ids,\n\t\t\t\tisContentOnly:\n\t\t\t\t\tgetBlockEditingMode( ids[ 0 ] ) === 'contentOnly',\n\t\t\t};\n\t\t},\n\t\t[ clientIds ]\n\t);\n\n\tconst { canLock } = useBlockLock( selectedClientIds[ 0 ] );\n\tconst { canRename } = useBlockRename( selectedBlocks[ 0 ] );\n\tconst showLockButton =\n\t\tselectedClientIds.length === 1 && canLock && ! isContentOnly;\n\tconst showRenameButton =\n\t\tselectedClientIds.length === 1 && canRename && ! isContentOnly;\n\n\t// Check if current selection of blocks is Groupable or Ungroupable\n\t// and pass this props down to ConvertToGroupButton.\n\tconst convertToGroupButtonProps =\n\t\tuseConvertToGroupButtonProps( selectedClientIds );\n\tconst { isGroupable, isUngroupable } = convertToGroupButtonProps;\n\tconst showConvertToGroupButton =\n\t\t( isGroupable || isUngroupable ) && ! isContentOnly;\n\n\treturn (\n\t\t<Slot\n\t\t\tfillProps={ {\n\t\t\t\t...fillProps,\n\t\t\t\tselectedBlocks,\n\t\t\t\tselectedClientIds,\n\t\t\t} }\n\t\t>\n\t\t\t{ ( fills ) => {\n\t\t\t\tif (\n\t\t\t\t\t! fills?.length > 0 &&\n\t\t\t\t\t! showConvertToGroupButton &&\n\t\t\t\t\t! showLockButton\n\t\t\t\t) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t{ showConvertToGroupButton && (\n\t\t\t\t\t\t\t<ConvertToGroupButton\n\t\t\t\t\t\t\t\t{ ...convertToGroupButtonProps }\n\t\t\t\t\t\t\t\tonClose={ fillProps?.onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showLockButton && (\n\t\t\t\t\t\t\t<BlockLockMenuItem\n\t\t\t\t\t\t\t\tclientId={ selectedClientIds[ 0 ] }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showRenameButton && (\n\t\t\t\t\t\t\t<BlockRenameControl\n\t\t\t\t\t\t\t\tclientId={ selectedClientIds[ 0 ] }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t{ selectedClientIds.length === 1 && (\n\t\t\t\t\t\t\t<ModifyContentLockMenuItem\n\t\t\t\t\t\t\t\tclientId={ selectedClientIds[ 0 ] }\n\t\t\t\t\t\t\t\tonClose={ fillProps?.onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ fillProps?.count === 1 && ! isContentOnly && (\n\t\t\t\t\t\t\t<BlockModeToggle\n\t\t\t\t\t\t\t\tclientId={ fillProps?.firstBlockClientId }\n\t\t\t\t\t\t\t\tonToggle={ fillProps?.onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t);\n\t\t\t} }\n\t\t</Slot>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-settings-menu-controls/README.md\n *\n * @param {Object} props Fill props.\n * @return {Element} Element.\n */\nfunction BlockSettingsMenuControls( { ...props } ) {\n\treturn (\n\t\t<StyleProvider document={ document }>\n\t\t\t<Fill { ...props } />\n\t\t</StyleProvider>\n\t);\n}\n\nBlockSettingsMenuControls.Slot = BlockSettingsMenuControlsSlot;\n\nexport default BlockSettingsMenuControls;\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,SAAS,EACTC,2BAA2B,IAAIC,aAAa,QACtC,uBAAuB;AAC9B,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SACCC,4BAA4B,EAC5BC,oBAAoB,QACd,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,QAAQ,EAAGzB,SAAS,EAAEqB;QAAS,CAC/B,CACD;MAAA,CACS,CAAC;IAEd;EAAC,CACI,CAAC;AAET,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,yBAAyBA,CAAE;EAAE,GAAGC;AAAM,CAAC,EAAG;EAClD,oBACCjC,IAAA,CAACb,aAAa;IAAC+C,QAAQ,EAAGA,QAAU;IAAAT,QAAA,eACnCzB,IAAA,CAACG,IAAI;MAAA,GAAM8B;IAAK,CAAI;EAAC,CACP,CAAC;AAElB;AAEAD,yBAAyB,CAAC5B,IAAI,GAAGC,6BAA6B;AAE9D,eAAe2B,yBAAyB","ignoreList":[]}
1
+ {"version":3,"names":["createSlotFill","MenuGroup","__experimentalStyleProvider","StyleProvider","hasBlockSupport","useSelect","useConvertToGroupButtonProps","ConvertToGroupButton","BlockLockMenuItem","useBlockLock","store","blockEditorStore","BlockModeToggle","ModifyContentLockMenuItem","BlockRenameControl","useBlockRename","BlockVisibilityMenuItem","jsx","_jsx","jsxs","_jsxs","Fill","Slot","BlockSettingsMenuControlsSlot","fillProps","clientIds","selectedBlocks","selectedClientIds","isContentOnly","canToggleSelectedBlocksVisibility","select","getBlocksByClientId","getBlockNamesByClientId","getSelectedBlockClientIds","getBlockEditingMode","ids","every","block","name","canLock","canRename","showLockButton","length","showRenameButton","showVisibilityButton","convertToGroupButtonProps","isGroupable","isUngroupable","showConvertToGroupButton","children","fills","onClose","clientId","count","firstBlockClientId","onToggle","BlockSettingsMenuControls","props","document"],"sources":["@wordpress/block-editor/src/components/block-settings-menu-controls/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateSlotFill,\n\tMenuGroup,\n\t__experimentalStyleProvider as StyleProvider,\n} from '@wordpress/components';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseConvertToGroupButtonProps,\n\tConvertToGroupButton,\n} from '../convert-to-group-buttons';\nimport { BlockLockMenuItem, useBlockLock } from '../block-lock';\nimport { store as blockEditorStore } from '../../store';\nimport BlockModeToggle from '../block-settings-menu/block-mode-toggle';\nimport { ModifyContentLockMenuItem } from '../content-lock';\nimport { BlockRenameControl, useBlockRename } from '../block-rename';\nimport { BlockVisibilityMenuItem } from '../block-visibility';\n\nconst { Fill, Slot } = createSlotFill( 'BlockSettingsMenuControls' );\n\nconst BlockSettingsMenuControlsSlot = ( { fillProps, clientIds = null } ) => {\n\tconst {\n\t\tselectedBlocks,\n\t\tselectedClientIds,\n\t\tisContentOnly,\n\t\tcanToggleSelectedBlocksVisibility,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlocksByClientId,\n\t\t\t\tgetBlockNamesByClientId,\n\t\t\t\tgetSelectedBlockClientIds,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst ids =\n\t\t\t\tclientIds !== null ? clientIds : getSelectedBlockClientIds();\n\t\t\treturn {\n\t\t\t\tselectedBlocks: getBlockNamesByClientId( ids ),\n\t\t\t\tselectedClientIds: ids,\n\t\t\t\tisContentOnly:\n\t\t\t\t\tgetBlockEditingMode( ids[ 0 ] ) === 'contentOnly',\n\t\t\t\tcanToggleSelectedBlocksVisibility: getBlocksByClientId(\n\t\t\t\t\tids\n\t\t\t\t).every( ( block ) =>\n\t\t\t\t\thasBlockSupport( block.name, 'blockVisibility', true )\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientIds ]\n\t);\n\n\tconst { canLock } = useBlockLock( selectedClientIds[ 0 ] );\n\tconst { canRename } = useBlockRename( selectedBlocks[ 0 ] );\n\tconst showLockButton =\n\t\tselectedClientIds.length === 1 && canLock && ! isContentOnly;\n\tconst showRenameButton =\n\t\tselectedClientIds.length === 1 && canRename && ! isContentOnly;\n\tconst showVisibilityButton =\n\t\tcanToggleSelectedBlocksVisibility && ! isContentOnly;\n\n\t// Check if current selection of blocks is Groupable or Ungroupable\n\t// and pass this props down to ConvertToGroupButton.\n\tconst convertToGroupButtonProps =\n\t\tuseConvertToGroupButtonProps( selectedClientIds );\n\tconst { isGroupable, isUngroupable } = convertToGroupButtonProps;\n\tconst showConvertToGroupButton =\n\t\t( isGroupable || isUngroupable ) && ! isContentOnly;\n\n\treturn (\n\t\t<Slot\n\t\t\tfillProps={ {\n\t\t\t\t...fillProps,\n\t\t\t\tselectedBlocks,\n\t\t\t\tselectedClientIds,\n\t\t\t} }\n\t\t>\n\t\t\t{ ( fills ) => {\n\t\t\t\tif (\n\t\t\t\t\t! fills?.length > 0 &&\n\t\t\t\t\t! showConvertToGroupButton &&\n\t\t\t\t\t! showLockButton\n\t\t\t\t) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t{ showConvertToGroupButton && (\n\t\t\t\t\t\t\t<ConvertToGroupButton\n\t\t\t\t\t\t\t\t{ ...convertToGroupButtonProps }\n\t\t\t\t\t\t\t\tonClose={ fillProps?.onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showLockButton && (\n\t\t\t\t\t\t\t<BlockLockMenuItem\n\t\t\t\t\t\t\t\tclientId={ selectedClientIds[ 0 ] }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showRenameButton && (\n\t\t\t\t\t\t\t<BlockRenameControl\n\t\t\t\t\t\t\t\tclientId={ selectedClientIds[ 0 ] }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showVisibilityButton && (\n\t\t\t\t\t\t\t<BlockVisibilityMenuItem\n\t\t\t\t\t\t\t\tclientIds={ selectedClientIds }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t{ selectedClientIds.length === 1 && (\n\t\t\t\t\t\t\t<ModifyContentLockMenuItem\n\t\t\t\t\t\t\t\tclientId={ selectedClientIds[ 0 ] }\n\t\t\t\t\t\t\t\tonClose={ fillProps?.onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ fillProps?.count === 1 && ! isContentOnly && (\n\t\t\t\t\t\t\t<BlockModeToggle\n\t\t\t\t\t\t\t\tclientId={ fillProps?.firstBlockClientId }\n\t\t\t\t\t\t\t\tonToggle={ fillProps?.onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t);\n\t\t\t} }\n\t\t</Slot>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-settings-menu-controls/README.md\n *\n * @param {Object} props Fill props.\n * @return {Element} Element.\n */\nfunction BlockSettingsMenuControls( { ...props } ) {\n\treturn (\n\t\t<StyleProvider document={ document }>\n\t\t\t<Fill { ...props } />\n\t\t</StyleProvider>\n\t);\n}\n\nBlockSettingsMenuControls.Slot = BlockSettingsMenuControlsSlot;\n\nexport default BlockSettingsMenuControls;\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,SAAS,EACTC,2BAA2B,IAAIC,aAAa,QACtC,uBAAuB;AAC9B,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SACCC,4BAA4B,EAC5BC,oBAAoB,QACd,6BAA6B;AACpC,SAASC,iBAAiB,EAAEC,YAAY,QAAQ,eAAe;AAC/D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,eAAe,MAAM,0CAA0C;AACtE,SAASC,yBAAyB,QAAQ,iBAAiB;AAC3D,SAASC,kBAAkB,EAAEC,cAAc,QAAQ,iBAAiB;AACpE,SAASC,uBAAuB,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EA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