@wordpress/block-editor 14.3.4 → 14.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/build/components/block-list/block.js +0 -3
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +1 -4
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js +9 -12
- package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +1 -1
- package/build/components/block-variation-picker/index.js +2 -4
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +3 -4
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/button-block-appender/index.js +2 -4
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +2 -4
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/global-styles/color-panel.js +2 -4
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +2 -4
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/shadow-panel-components.js +24 -29
- package/build/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build/components/iframe/index.js +6 -1
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/inserter/menu.js +3 -0
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +11 -8
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-popover-header/index.js +4 -8
- package/build/components/inspector-popover-header/index.js.map +1 -1
- package/build/components/link-control/index.js +4 -8
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/settings-drawer.js +2 -4
- package/build/components/link-control/settings-drawer.js.map +1 -1
- package/build/components/list-view/block-select-button.js +1 -4
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/media-placeholder/index.js +12 -24
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js +2 -4
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/tool-selector/index.js +7 -5
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/url-input/button.js +14 -16
- package/build/components/url-input/button.js.map +1 -1
- package/build/components/url-input/index.js +2 -4
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-resize-canvas/index.js +1 -2
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/hooks/grid-visualizer.js +13 -11
- package/build/hooks/grid-visualizer.js.map +1 -1
- package/build/hooks/layout-child.js +41 -3
- package/build/hooks/layout-child.js.map +1 -1
- package/build/layouts/flex.js +6 -38
- package/build/layouts/flex.js.map +1 -1
- package/build/private-apis.js +2 -0
- package/build/private-apis.js.map +1 -1
- package/build/utils/block-bindings.js +9 -6
- package/build/utils/block-bindings.js.map +1 -1
- package/build-module/components/block-list/block.js +0 -3
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +1 -4
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js +9 -12
- package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +2 -4
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +3 -4
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/button-block-appender/index.js +2 -4
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +2 -4
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +2 -4
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +2 -4
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.js +25 -30
- package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build-module/components/iframe/index.js +6 -1
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/inserter/menu.js +3 -0
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +12 -9
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js +4 -8
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/link-control/index.js +4 -8
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js +2 -4
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +2 -5
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +12 -24
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js +2 -4
- package/build-module/components/skip-to-selected-block/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js +7 -5
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/url-input/button.js +15 -17
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js +2 -4
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/use-resize-canvas/index.js +1 -2
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/hooks/grid-visualizer.js +13 -11
- package/build-module/hooks/grid-visualizer.js.map +1 -1
- package/build-module/hooks/layout-child.js +41 -3
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/layouts/flex.js +7 -39
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/private-apis.js +2 -0
- package/build-module/private-apis.js.map +1 -1
- package/build-module/utils/block-bindings.js +9 -6
- package/build-module/utils/block-bindings.js.map +1 -1
- package/build-style/content-rtl.css +6 -10
- package/build-style/content.css +6 -10
- package/build-style/style-rtl.css +27 -26
- package/build-style/style.css +27 -26
- package/package.json +5 -5
- package/src/components/block-inspector/style.scss +2 -0
- package/src/components/block-list/block.js +0 -3
- package/src/components/block-list/use-block-props/index.js +1 -2
- package/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js +19 -11
- package/src/components/block-tools/style.scss +5 -0
- package/src/components/block-variation-picker/index.js +1 -2
- package/src/components/block-variation-transforms/index.js +2 -2
- package/src/components/button-block-appender/content.scss +0 -5
- package/src/components/button-block-appender/index.js +1 -2
- package/src/components/colors-gradients/dropdown.js +1 -5
- package/src/components/global-styles/color-panel.js +1 -5
- package/src/components/global-styles/filters-panel.js +1 -2
- package/src/components/global-styles/shadow-panel-components.js +28 -33
- package/src/components/global-styles/style.scss +5 -0
- package/src/components/iframe/content.scss +7 -8
- package/src/components/iframe/index.js +7 -1
- package/src/components/iframe/style.scss +17 -0
- package/src/components/inserter/menu.js +5 -0
- package/src/components/inspector-controls-tabs/index.js +21 -20
- package/src/components/inspector-popover-header/index.js +2 -4
- package/src/components/inspector-popover-header/style.scss +0 -13
- package/src/components/link-control/index.js +2 -4
- package/src/components/link-control/settings-drawer.js +1 -2
- package/src/components/list-view/block-select-button.js +2 -5
- package/src/components/list-view/style.scss +18 -0
- package/src/components/media-placeholder/index.js +6 -12
- package/src/components/skip-to-selected-block/index.js +1 -2
- package/src/components/skip-to-selected-block/style.scss +0 -9
- package/src/components/tool-selector/index.js +6 -4
- package/src/components/url-input/button.js +16 -12
- package/src/components/url-input/index.js +1 -2
- package/src/components/url-input/style.scss +0 -6
- package/src/components/use-resize-canvas/index.js +1 -3
- package/src/hooks/grid-visualizer.js +23 -9
- package/src/hooks/layout-child.js +48 -3
- package/src/layouts/flex.js +10 -53
- package/src/private-apis.js +2 -0
- package/src/utils/block-bindings.js +9 -6
- package/src/utils/test/use-block-bindings-utils.js +174 -0
package/README.md
CHANGED
|
@@ -877,6 +877,10 @@ updateBlockBindings( { url: undefined } );
|
|
|
877
877
|
removeAllBlockBindings();
|
|
878
878
|
```
|
|
879
879
|
|
|
880
|
+
_Parameters_
|
|
881
|
+
|
|
882
|
+
- _clientId_ `?string`: Optional block client ID. If not set, it will use the current block client ID from the context.
|
|
883
|
+
|
|
880
884
|
_Returns_
|
|
881
885
|
|
|
882
886
|
- `?WPBlockBindingsUtils`: Object containing the block bindings utils.
|
|
@@ -555,7 +555,6 @@ function BlockListBlockProvider(props) {
|
|
|
555
555
|
mayDisplayParentControls: _hasBlockSupport(getBlockName(clientId), '__experimentalExposeControlsToChildren', false) && hasSelectedInnerBlock(clientId),
|
|
556
556
|
blockApiVersion: blockType?.apiVersion || 1,
|
|
557
557
|
blockTitle: match?.title || blockType?.title,
|
|
558
|
-
editorMode,
|
|
559
558
|
isSubtreeDisabled: blockEditingMode === 'disabled' && isBlockSubtreeDisabled(clientId),
|
|
560
559
|
hasOverlay: __unstableHasActiveBlockOverlayActive(clientId) && !isDragging(),
|
|
561
560
|
initialPosition: _isSelected && (editorMode === 'edit' || editorMode === 'zoom-out') // Don't recalculate the initialPosition when toggling in/out of zoom-out mode
|
|
@@ -589,7 +588,6 @@ function BlockListBlockProvider(props) {
|
|
|
589
588
|
themeSupportsLayout,
|
|
590
589
|
isTemporarilyEditingAsBlocks,
|
|
591
590
|
blockEditingMode,
|
|
592
|
-
editorMode,
|
|
593
591
|
mayDisplayControls,
|
|
594
592
|
mayDisplayParentControls,
|
|
595
593
|
index,
|
|
@@ -643,7 +641,6 @@ function BlockListBlockProvider(props) {
|
|
|
643
641
|
hasOverlay,
|
|
644
642
|
initialPosition,
|
|
645
643
|
blockEditingMode,
|
|
646
|
-
editorMode,
|
|
647
644
|
isHighlighted,
|
|
648
645
|
isMultiSelected,
|
|
649
646
|
isPartiallySelected,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_blocks","_components","_data","_compose","_dom","_blockEdit","_blockInvalidWarning","_blockCrashWarning","_blockCrashBoundary","_blockHtml","_useBlockProps","_store","_layout","_privateBlockContext","_lockUnlock","_jsxRuntime","isUnmodifiedBlockContent","unlock","blocksPrivateApis","mergeWrapperProps","propsA","propsB","newProps","hasOwnProperty","className","clsx","style","Block","children","isHtml","props","jsx","useBlockProps","__unstableIsHtml","BlockListBlock","block","__unstableBlockSource","mode","isLocked","canRemove","clientId","isSelected","isSelectionEnabled","__unstableLayoutClassNames","layoutClassNames","name","isValid","attributes","wrapperProps","setAttributes","onReplace","onInsertBlocksAfter","onMerge","toggleSelection","_wrapperProps","mayDisplayControls","mayDisplayParentControls","themeSupportsLayout","context","useContext","PrivateBlockContext","removeBlock","useDispatch","blockEditorStore","onRemove","useCallback","parentLayout","useLayout","blockEdit","default","insertBlocksAfter","undefined","mergeBlocks","__unstableParentLayout","Object","keys","length","blockEditingMode","isPreviewMode","blockType","getBlockType","getEditWrapperProps","isAligned","isSticky","includes","saveContent","serializeRawBlock","getSaveContent","jsxs","RawHTML","safeHTML","Fragment","display","apiVersion","dataAlign","restWrapperProps","updatedWrapperProps","Provider","value","fallback","applyWithDispatch","withDispatch","dispatch","ownProps","registry","updateBlockAttributes","insertBlocks","replaceBlocks","__unstableMarkLastChangeAsPersistent","moveBlocksToPosition","selectBlock","newAttributes","getMultiSelectedBlockClientIds","select","multiSelectedBlockClientIds","clientIds","onInsertBlocks","blocks","index","rootClientId","getBlockIndex","forward","getPreviousBlockClientId","getNextBlockClientId","getBlock","getBlockAttributes","getBlockName","getBlockOrder","getBlockRootClientId","canInsertBlockType","switchToDefaultOrRemove","defaultBlockName","getDefaultBlockName","replacement","switchToBlockType","isUnmodifiedDefaultBlock","nextBlockClientId","batch","moveFirstItemUp","_clientId","changeSelection","targetRootClientId","blockOrder","firstClientId","isUnmodifiedBlock","firstBlock","isFirstBlockContentUnmodified","canTransformToDefaultBlock","every","canLiftAndTransformToDefaultBlock","nextRootClientId","rootAttributes","previousRootAttributes","key","previousBlockClientId","previousRootClientId","indexToSelect","initialPosition","replacementBlocks","Array","isArray","selectionEnabled","compose","withFilters","BlockListBlockProvider","selectedProps","useSelect","isBlockSelected","getBlockMode","getTemplateLock","getBlockWithoutAttributes","canRemoveBlock","canMoveBlock","getSettings","getTemporarilyEditingAsBlocks","getBlockEditingMode","isFirstMultiSelectedBlock","hasSelectedInnerBlock","getBlocksByName","isBlockMultiSelected","isBlockSubtreeDisabled","isBlockHighlighted","__unstableIsFullySelected","__unstableSelectionHasUnmergeableBlock","isBlockBeingDragged","isDragging","hasBlockMovingClientId","__unstableHasActiveBlockOverlayActive","__unstableGetEditorMode","getSelectedBlocksInitialCaretPosition","blockWithoutAttributes","hasBlockSupport","_hasBlockSupport","getActiveBlockVariation","blocksStore","blockName","supportsLayout","__unstableIsPreviewMode","hasLightBlockWrapper","previewContext","isReusable","isReusableBlock","defaultClassName","getBlockDefaultClassName","blockTitle","title","_isSelected","canMove","match","isMultiSelected","checkDeep","isAncestorOfSelectedBlock","movingClientId","multiple","blocksWithSameName","isInvalid","editorMode","templateLock","isTemporarilyEditingAsBlocks","id","blockApiVersion","isSubtreeDisabled","hasOverlay","isHighlighted","isPartiallySelected","hasChildSelected","isBlockMovingMode","canInsertMovingBlock","isEditingDisabled","hasEditableOutline","originalBlockClientId","useMemo","privateContext","_default","exports","memo"],"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 {\n\tmemo,\n\tuseCallback,\n\tRawHTML,\n\tuseContext,\n\tuseMemo,\n} 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\tstore as blocksStore,\n\tprivateApis as blocksPrivateApis,\n} from '@wordpress/blocks';\nimport { withFilters } from '@wordpress/components';\nimport { withDispatch, useDispatch, 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\nconst { isUnmodifiedBlockContent } = unlock( blocksPrivateApis );\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\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\tconst { removeBlock } = useDispatch( blockEditorStore );\n\tconst onRemove = useCallback(\n\t\t() => removeBlock( clientId ),\n\t\t[ clientId, removeBlock ]\n\t);\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( newAttributes ) {\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 } = ownProps;\n\t\t\tconst clientIds = multiSelectedBlockClientIds.length\n\t\t\t\t? multiSelectedBlockClientIds\n\t\t\t\t: [ clientId ];\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\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}\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 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 {\n\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\tconst firstBlock = getBlock( firstClientId );\n\t\t\t\t\t\tconst isFirstBlockContentUnmodified =\n\t\t\t\t\t\t\tisUnmodifiedBlockContent( firstBlock );\n\t\t\t\t\t\tconst defaultBlockName = getDefaultBlockName();\n\t\t\t\t\t\tconst replacement = switchToBlockType(\n\t\t\t\t\t\t\tfirstBlock,\n\t\t\t\t\t\t\tdefaultBlockName\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst canTransformToDefaultBlock =\n\t\t\t\t\t\t\t!! replacement?.length &&\n\t\t\t\t\t\t\treplacement.every( ( block ) =>\n\t\t\t\t\t\t\t\tcanInsertBlockType( block.name, _clientId )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tisFirstBlockContentUnmodified &&\n\t\t\t\t\t\t\tcanTransformToDefaultBlock\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// Step 1: If the block is empty and can be transformed to the default block type.\n\t\t\t\t\t\t\treplaceBlocks(\n\t\t\t\t\t\t\t\tfirstClientId,\n\t\t\t\t\t\t\t\treplacement,\n\t\t\t\t\t\t\t\tchangeSelection\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tisFirstBlockContentUnmodified &&\n\t\t\t\t\t\t\tfirstBlock.name === defaultBlockName\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// Step 2: If the block is empty and is already the default block type.\n\t\t\t\t\t\t\tremoveBlock( firstClientId );\n\t\t\t\t\t\t\tconst nextBlockClientId =\n\t\t\t\t\t\t\t\tgetNextBlockClientId( clientId );\n\t\t\t\t\t\t\tif ( nextBlockClientId ) {\n\t\t\t\t\t\t\t\tselectBlock( nextBlockClientId );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\t\tfirstBlock.name,\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\t// Step 3: If the block can be moved up.\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 canLiftAndTransformToDefaultBlock =\n\t\t\t\t\t\t\t\t!! replacement?.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\n\t\t\t\t\t\t\tif ( canLiftAndTransformToDefaultBlock ) {\n\t\t\t\t\t\t\t\t// Step 4: If the block can be transformed to the default block type and moved up.\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\t// Step 5: Continue the default behavior.\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}\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\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\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\thasBlockMovingClientId,\n\t\t\t\tcanInsertBlockType,\n\t\t\t\t__unstableHasActiveBlockOverlayActive,\n\t\t\t\t__unstableGetEditorMode,\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, __unstableIsPreviewMode: isPreviewMode } =\n\t\t\t\tgetSettings();\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 movingClientId = hasBlockMovingClientId();\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\tconst editorMode = __unstableGetEditorMode();\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\ttemplateLock: getTemplateLock( 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\teditorMode,\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:\n\t\t\t\t\t_isSelected &&\n\t\t\t\t\t( editorMode === 'edit' || editorMode === 'zoom-out' ) // Don't recalculate the initialPosition when toggling in/out of zoom-out mode\n\t\t\t\t\t\t? getSelectedBlocksInitialCaretPosition()\n\t\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\tisBlockMovingMode: !! movingClientId,\n\t\t\t\tcanInsertMovingBlock:\n\t\t\t\t\tmovingClientId &&\n\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\tgetBlockName( movingClientId ),\n\t\t\t\t\t\trootClientId\n\t\t\t\t\t),\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\teditorMode,\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\tisBlockMovingMode,\n\t\tcanInsertMovingBlock,\n\t\ttemplateLock,\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\teditorMode,\n\t\tisHighlighted,\n\t\tisMultiSelected,\n\t\tisPartiallySelected,\n\t\tisReusable,\n\t\tisDragging,\n\t\thasChildSelected,\n\t\tisBlockMovingMode,\n\t\tcanInsertMovingBlock,\n\t\ttemplateLock,\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};\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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAOA,IAAAE,OAAA,GAAAF,OAAA;AAcA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAC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AmB;IACnBxB,UAAU;IACVf,UAAU;IACVwC,gBAAgB;IAChBC,iBAAiB;IACjBC,oBAAoB;IACpBV,YAAY;IACZW,iBAAiB;IACjBC,kBAAkB;IAClBX,4BAA4B;IAC5BhB,gBAAgB;IAChBnJ,kBAAkB;IAClBC,wBAAwB;IACxB8K,qBAAqB;IACrB7K;EACD,CAAC;;EAED;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA,oBACC,IAAA1C,WAAA,CAAAgB,GAAA,EAAClB,oBAAA,CAAA+C,mBAAmB,CAACqC,QAAQ;IAACC,KAAK,EAAGsI,cAAgB;IAAA5M,QAAA,eACrD,IAAAb,WAAA,CAAAgB,GAAA,EAACG,cAAc;MAAA,GACTJ,KAAK;MAKTO,IAAI;MACJK,kBAAkB;MAClBJ,QAAQ;MACRC,SAAS;MACTwK,OAAO;MACP;MACA;MACA;MACA;MACA5K,KAAK;MACLU,IAAI;MACJE,UAAU;MACVD,OAAO;MACPL;IAAU,CAEX;EAAC,CAC2B,CAAC;AAEjC;AAAC,IAAAgM,QAAA,GAAAC,OAAA,CAAArK,OAAA,GAEc,IAAAsK,aAAI,EAAEvE,sBAAuB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_blocks","_components","_data","_compose","_dom","_blockEdit","_blockInvalidWarning","_blockCrashWarning","_blockCrashBoundary","_blockHtml","_useBlockProps","_store","_layout","_privateBlockContext","_lockUnlock","_jsxRuntime","isUnmodifiedBlockContent","unlock","blocksPrivateApis","mergeWrapperProps","propsA","propsB","newProps","hasOwnProperty","className","clsx","style","Block","children","isHtml","props","jsx","useBlockProps","__unstableIsHtml","BlockListBlock","block","__unstableBlockSource","mode","isLocked","canRemove","clientId","isSelected","isSelectionEnabled","__unstableLayoutClassNames","layoutClassNames","name","isValid","attributes","wrapperProps","setAttributes","onReplace","onInsertBlocksAfter","onMerge","toggleSelection","_wrapperProps","mayDisplayControls","mayDisplayParentControls","themeSupportsLayout","context","useContext","PrivateBlockContext","removeBlock","useDispatch","blockEditorStore","onRemove","useCallback","parentLayout","useLayout","blockEdit","default","insertBlocksAfter","undefined","mergeBlocks","__unstableParentLayout","Object","keys","length","blockEditingMode","isPreviewMode","blockType","getBlockType","getEditWrapperProps","isAligned","isSticky","includes","saveContent","serializeRawBlock","getSaveContent","jsxs","RawHTML","safeHTML","Fragment","display","apiVersion","dataAlign","restWrapperProps","updatedWrapperProps","Provider","value","fallback","applyWithDispatch","withDispatch","dispatch","ownProps","registry","updateBlockAttributes","insertBlocks","replaceBlocks","__unstableMarkLastChangeAsPersistent","moveBlocksToPosition","selectBlock","newAttributes","getMultiSelectedBlockClientIds","select","multiSelectedBlockClientIds","clientIds","onInsertBlocks","blocks","index","rootClientId","getBlockIndex","forward","getPreviousBlockClientId","getNextBlockClientId","getBlock","getBlockAttributes","getBlockName","getBlockOrder","getBlockRootClientId","canInsertBlockType","switchToDefaultOrRemove","defaultBlockName","getDefaultBlockName","replacement","switchToBlockType","isUnmodifiedDefaultBlock","nextBlockClientId","batch","moveFirstItemUp","_clientId","changeSelection","targetRootClientId","blockOrder","firstClientId","isUnmodifiedBlock","firstBlock","isFirstBlockContentUnmodified","canTransformToDefaultBlock","every","canLiftAndTransformToDefaultBlock","nextRootClientId","rootAttributes","previousRootAttributes","key","previousBlockClientId","previousRootClientId","indexToSelect","initialPosition","replacementBlocks","Array","isArray","selectionEnabled","compose","withFilters","BlockListBlockProvider","selectedProps","useSelect","isBlockSelected","getBlockMode","getTemplateLock","getBlockWithoutAttributes","canRemoveBlock","canMoveBlock","getSettings","getTemporarilyEditingAsBlocks","getBlockEditingMode","isFirstMultiSelectedBlock","hasSelectedInnerBlock","getBlocksByName","isBlockMultiSelected","isBlockSubtreeDisabled","isBlockHighlighted","__unstableIsFullySelected","__unstableSelectionHasUnmergeableBlock","isBlockBeingDragged","isDragging","hasBlockMovingClientId","__unstableHasActiveBlockOverlayActive","__unstableGetEditorMode","getSelectedBlocksInitialCaretPosition","blockWithoutAttributes","hasBlockSupport","_hasBlockSupport","getActiveBlockVariation","blocksStore","blockName","supportsLayout","__unstableIsPreviewMode","hasLightBlockWrapper","previewContext","isReusable","isReusableBlock","defaultClassName","getBlockDefaultClassName","blockTitle","title","_isSelected","canMove","match","isMultiSelected","checkDeep","isAncestorOfSelectedBlock","movingClientId","multiple","blocksWithSameName","isInvalid","editorMode","templateLock","isTemporarilyEditingAsBlocks","id","blockApiVersion","isSubtreeDisabled","hasOverlay","isHighlighted","isPartiallySelected","hasChildSelected","isBlockMovingMode","canInsertMovingBlock","isEditingDisabled","hasEditableOutline","originalBlockClientId","useMemo","privateContext","_default","exports","memo"],"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 {\n\tmemo,\n\tuseCallback,\n\tRawHTML,\n\tuseContext,\n\tuseMemo,\n} 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\tstore as blocksStore,\n\tprivateApis as blocksPrivateApis,\n} from '@wordpress/blocks';\nimport { withFilters } from '@wordpress/components';\nimport { withDispatch, useDispatch, 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\nconst { isUnmodifiedBlockContent } = unlock( blocksPrivateApis );\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\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\tconst { removeBlock } = useDispatch( blockEditorStore );\n\tconst onRemove = useCallback(\n\t\t() => removeBlock( clientId ),\n\t\t[ clientId, removeBlock ]\n\t);\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( newAttributes ) {\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 } = ownProps;\n\t\t\tconst clientIds = multiSelectedBlockClientIds.length\n\t\t\t\t? multiSelectedBlockClientIds\n\t\t\t\t: [ clientId ];\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\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}\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 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 {\n\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\tconst firstBlock = getBlock( firstClientId );\n\t\t\t\t\t\tconst isFirstBlockContentUnmodified =\n\t\t\t\t\t\t\tisUnmodifiedBlockContent( firstBlock );\n\t\t\t\t\t\tconst defaultBlockName = getDefaultBlockName();\n\t\t\t\t\t\tconst replacement = switchToBlockType(\n\t\t\t\t\t\t\tfirstBlock,\n\t\t\t\t\t\t\tdefaultBlockName\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst canTransformToDefaultBlock =\n\t\t\t\t\t\t\t!! replacement?.length &&\n\t\t\t\t\t\t\treplacement.every( ( block ) =>\n\t\t\t\t\t\t\t\tcanInsertBlockType( block.name, _clientId )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tisFirstBlockContentUnmodified &&\n\t\t\t\t\t\t\tcanTransformToDefaultBlock\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// Step 1: If the block is empty and can be transformed to the default block type.\n\t\t\t\t\t\t\treplaceBlocks(\n\t\t\t\t\t\t\t\tfirstClientId,\n\t\t\t\t\t\t\t\treplacement,\n\t\t\t\t\t\t\t\tchangeSelection\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tisFirstBlockContentUnmodified &&\n\t\t\t\t\t\t\tfirstBlock.name === defaultBlockName\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// Step 2: If the block is empty and is already the default block type.\n\t\t\t\t\t\t\tremoveBlock( firstClientId );\n\t\t\t\t\t\t\tconst nextBlockClientId =\n\t\t\t\t\t\t\t\tgetNextBlockClientId( clientId );\n\t\t\t\t\t\t\tif ( nextBlockClientId ) {\n\t\t\t\t\t\t\t\tselectBlock( nextBlockClientId );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\t\tfirstBlock.name,\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\t// Step 3: If the block can be moved up.\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 canLiftAndTransformToDefaultBlock =\n\t\t\t\t\t\t\t\t!! replacement?.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\n\t\t\t\t\t\t\tif ( canLiftAndTransformToDefaultBlock ) {\n\t\t\t\t\t\t\t\t// Step 4: If the block can be transformed to the default block type and moved up.\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\t// Step 5: Continue the default behavior.\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}\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\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\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\thasBlockMovingClientId,\n\t\t\t\tcanInsertBlockType,\n\t\t\t\t__unstableHasActiveBlockOverlayActive,\n\t\t\t\t__unstableGetEditorMode,\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, __unstableIsPreviewMode: isPreviewMode } =\n\t\t\t\tgetSettings();\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 movingClientId = hasBlockMovingClientId();\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\tconst editorMode = __unstableGetEditorMode();\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\ttemplateLock: getTemplateLock( 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:\n\t\t\t\t\t_isSelected &&\n\t\t\t\t\t( editorMode === 'edit' || editorMode === 'zoom-out' ) // Don't recalculate the initialPosition when toggling in/out of zoom-out mode\n\t\t\t\t\t\t? getSelectedBlocksInitialCaretPosition()\n\t\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\tisBlockMovingMode: !! movingClientId,\n\t\t\t\tcanInsertMovingBlock:\n\t\t\t\t\tmovingClientId &&\n\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\tgetBlockName( movingClientId ),\n\t\t\t\t\t\trootClientId\n\t\t\t\t\t),\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\tisBlockMovingMode,\n\t\tcanInsertMovingBlock,\n\t\ttemplateLock,\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\tisBlockMovingMode,\n\t\tcanInsertMovingBlock,\n\t\ttemplateLock,\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};\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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAOA,IAAAE,OAAA,GAAAF,OAAA;AAcA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AAKA,IAAAO,UAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,oBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,kBAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,mBAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,UAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,cAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,O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KAAK,EAAGsI,cAAgB;IAAA5M,QAAA,eACrD,IAAAb,WAAA,CAAAgB,GAAA,EAACG,cAAc;MAAA,GACTJ,KAAK;MAKTO,IAAI;MACJK,kBAAkB;MAClBJ,QAAQ;MACRC,SAAS;MACTwK,OAAO;MACP;MACA;MACA;MACA;MACA5K,KAAK;MACLU,IAAI;MACJE,UAAU;MACVD,OAAO;MACPL;IAAU,CAEX;EAAC,CAC2B,CAAC;AAEjC;AAAC,IAAAgM,QAAA,GAAAC,OAAA,CAAArK,OAAA,GAEc,IAAAsK,aAAI,EAAEvE,sBAAuB,CAAC","ignoreList":[]}
|
|
@@ -92,7 +92,6 @@ function useBlockProps(props = {}, {
|
|
|
92
92
|
name,
|
|
93
93
|
blockApiVersion,
|
|
94
94
|
blockTitle,
|
|
95
|
-
editorMode,
|
|
96
95
|
isSelected,
|
|
97
96
|
isSubtreeDisabled,
|
|
98
97
|
hasOverlay,
|
|
@@ -122,9 +121,7 @@ function useBlockProps(props = {}, {
|
|
|
122
121
|
}), (0, _useBlockRefs.useBlockRefProvider)(clientId), (0, _useFocusHandler.useFocusHandler)(clientId), (0, _useSelectedBlockEventHandlers.useEventHandlers)({
|
|
123
122
|
clientId,
|
|
124
123
|
isSelected
|
|
125
|
-
}), (0, _useNavModeExit.useNavModeExit)(clientId), (0, _useZoomOutModeExit.useZoomOutModeExit)({
|
|
126
|
-
editorMode
|
|
127
|
-
}), (0, _useIsHovered.useIsHovered)({
|
|
124
|
+
}), (0, _useNavModeExit.useNavModeExit)(clientId), (0, _useZoomOutModeExit.useZoomOutModeExit)(), (0, _useIsHovered.useIsHovered)({
|
|
128
125
|
clientId
|
|
129
126
|
}), (0, _useIntersectionObserver.useIntersectionObserver)(), (0, _useMovingAnimation.default)({
|
|
130
127
|
triggerAnimationOnChange: index,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_i18n","_blocks","_compose","_warning","_useMovingAnimation","_privateBlockContext","_useFocusFirstElement","_useIsHovered","_context","_useFocusHandler","_useSelectedBlockEventHandlers","_useNavModeExit","_useZoomOutModeExit","_useBlockRefs","_useIntersectionObserver","_useScrollIntoView","_useFlashEditableBlocks","_useBindingsAttributes","useBlockProps","props","__unstableIsHtml","clientId","className","wrapperProps","isAligned","index","mode","name","blockApiVersion","blockTitle","editorMode","isSelected","isSubtreeDisabled","hasOverlay","initialPosition","blockEditingMode","isHighlighted","isMultiSelected","isPartiallySelected","isReusable","isDragging","hasChildSelected","isBlockMovingMode","canInsertMovingBlock","isEditingDisabled","hasEditableOutline","isTemporarilyEditingAsBlocks","defaultClassName","templateLock","useContext","PrivateBlockContext","blockLabel","sprintf","__","htmlSuffix","mergedRefs","useMergeRefs","ref","useFocusFirstElement","useBlockRefProvider","useFocusHandler","useEventHandlers","useNavModeExit","useZoomOutModeExit","useIsHovered","useIntersectionObserver","useMovingAnimation","triggerAnimationOnChange","useDisabled","isDisabled","useFlashEditableBlocks","isEnabled","useScrollIntoView","blockEditContext","useBlockEditContext","hasBlockBindings","blockBindingsKey","bindingsStyle","canBindBlock","globalThis","SCRIPT_DEBUG","warning","hasNegativeMargin","style","marginTop","charAt","marginBottom","marginLeft","marginRight","tabIndex","id","role","inert","undefined","clsx","save","getBlockProps"],"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 { useNavModeExit } from './use-nav-mode-exit';\nimport { useZoomOutModeExit } from './use-zoom-out-mode-exit';\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 '../../../hooks/use-bindings-attributes';\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\teditorMode,\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\tisBlockMovingMode,\n\t\tcanInsertMovingBlock,\n\t\tisEditingDisabled,\n\t\thasEditableOutline,\n\t\tisTemporarilyEditingAsBlocks,\n\t\tdefaultClassName,\n\t\ttemplateLock,\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 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\tuseNavModeExit( clientId ),\n\t\tuseZoomOutModeExit( { editorMode } ),\n\t\tuseIsHovered( { clientId } ),\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: name === 'core/block' || templateLock === 'contentOnly',\n\t\t} ),\n\t\tuseScrollIntoView( { isSelected } ),\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\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-block-moving-mode': isBlockMovingMode,\n\t\t\t\t'can-insert-moving-block': canInsertMovingBlock,\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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAN,sBAAA,CAAAC,OAAA;AAKA,IAAAM,mBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AACA,IAAAQ,qBAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AAIA,IAAAW,gBAAA,GAAAX,OAAA;AACA,IAAAY,8BAAA,GAAAZ,OAAA;AACA,IAAAa,eAAA,GAAAb,OAAA;AACA,IAAAc,mBAAA,GAAAd,OAAA;AACA,IAAAe,aAAA,GAAAf,OAAA;AACA,IAAAgB,wBAAA,GAAAhB,OAAA;AACA,IAAAiB,kBAAA,GAAAjB,OAAA;AACA,IAAAkB,uBAAA,GAAAlB,OAAA;AACA,IAAAmB,sBAAA,GAAAnB,OAAA;AAjCA;AACA;AACA;;AAGA;AACA;AACA;;AAOA;AACA;AACA;;AAmBA;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;AACO,SAASoB,aAAaA,CAAEC,KAAK,GAAG,CAAC,CAAC,EAAE;EAAEC;AAAiB,CAAC,GAAG,CAAC,CAAC,EAAG;EACtE,MAAM;IACLC,QAAQ;IACRC,SAAS;IACTC,YAAY,GAAG,CAAC,CAAC;IACjBC,SAAS;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AAGiC,UAAY,EAAC;IACxCqC,IAAI,EAAE,UAAU;IAChB,YAAY,EAAExC,UAAU;IACxB,YAAY,EAAE9B,QAAQ;IACtB,WAAW,EAAEM,IAAI;IACjB,YAAY,EAAEE,UAAU;IACxB+D,KAAK,EAAE5D,iBAAiB,GAAG,MAAM,GAAG6D,SAAS;IAC7CvE,SAAS,EAAE,IAAAwE,aAAI,EACd,gCAAgC,EAChC;MACC;MACA,UAAU,EAAE,CAAEtE,SAAS;MACvB,mBAAmB,EAAES,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,sBAAsB,EAAEC,iBAAiB;MACzC,yBAAyB,EAAEC,oBAAoB;MAC/C,qBAAqB,EAAEC,iBAAiB;MACxC,sBAAsB,EAAEC,kBAAkB;MAC1C,qBAAqB,EAAEqC,iBAAiB;MACxC,iDAAiD,EAChDpC;IACF,CAAC,EACDxB,SAAS,EACTH,KAAK,CAACG,SAAS,EACfC,YAAY,CAACD,SAAS,EACtByB,gBACD,CAAC;IACDoC,KAAK,EAAE;MAAE,GAAG5D,YAAY,CAAC4D,KAAK;MAAE,GAAGhE,KAAK,CAACgE,KAAK;MAAE,GAAGN;IAAc;EAClE,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA3D,aAAa,CAAC6E,IAAI,GAAGC,+BAAa","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_i18n","_blocks","_compose","_warning","_useMovingAnimation","_privateBlockContext","_useFocusFirstElement","_useIsHovered","_context","_useFocusHandler","_useSelectedBlockEventHandlers","_useNavModeExit","_useZoomOutModeExit","_useBlockRefs","_useIntersectionObserver","_useScrollIntoView","_useFlashEditableBlocks","_useBindingsAttributes","useBlockProps","props","__unstableIsHtml","clientId","className","wrapperProps","isAligned","index","mode","name","blockApiVersion","blockTitle","isSelected","isSubtreeDisabled","hasOverlay","initialPosition","blockEditingMode","isHighlighted","isMultiSelected","isPartiallySelected","isReusable","isDragging","hasChildSelected","isBlockMovingMode","canInsertMovingBlock","isEditingDisabled","hasEditableOutline","isTemporarilyEditingAsBlocks","defaultClassName","templateLock","useContext","PrivateBlockContext","blockLabel","sprintf","__","htmlSuffix","mergedRefs","useMergeRefs","ref","useFocusFirstElement","useBlockRefProvider","useFocusHandler","useEventHandlers","useNavModeExit","useZoomOutModeExit","useIsHovered","useIntersectionObserver","useMovingAnimation","triggerAnimationOnChange","useDisabled","isDisabled","useFlashEditableBlocks","isEnabled","useScrollIntoView","blockEditContext","useBlockEditContext","hasBlockBindings","blockBindingsKey","bindingsStyle","canBindBlock","globalThis","SCRIPT_DEBUG","warning","hasNegativeMargin","style","marginTop","charAt","marginBottom","marginLeft","marginRight","tabIndex","id","role","inert","undefined","clsx","save","getBlockProps"],"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 { useNavModeExit } from './use-nav-mode-exit';\nimport { useZoomOutModeExit } from './use-zoom-out-mode-exit';\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 '../../../hooks/use-bindings-attributes';\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\tisBlockMovingMode,\n\t\tcanInsertMovingBlock,\n\t\tisEditingDisabled,\n\t\thasEditableOutline,\n\t\tisTemporarilyEditingAsBlocks,\n\t\tdefaultClassName,\n\t\ttemplateLock,\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 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\tuseNavModeExit( clientId ),\n\t\tuseZoomOutModeExit(),\n\t\tuseIsHovered( { clientId } ),\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: name === 'core/block' || templateLock === 'contentOnly',\n\t\t} ),\n\t\tuseScrollIntoView( { isSelected } ),\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\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-block-moving-mode': isBlockMovingMode,\n\t\t\t\t'can-insert-moving-block': canInsertMovingBlock,\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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;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7CtE,SAAS,EAAE,IAAAuE,aAAI,EACd,gCAAgC,EAChC;MACC;MACA,UAAU,EAAE,CAAErE,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,sBAAsB,EAAEC,iBAAiB;MACzC,yBAAyB,EAAEC,oBAAoB;MAC/C,qBAAqB,EAAEC,iBAAiB;MACxC,sBAAsB,EAAEC,kBAAkB;MAC1C,qBAAqB,EAAEqC,iBAAiB;MACxC,iDAAiD,EAChDpC;IACF,CAAC,EACDvB,SAAS,EACTH,KAAK,CAACG,SAAS,EACfC,YAAY,CAACD,SAAS,EACtBwB,gBACD,CAAC;IACDoC,KAAK,EAAE;MAAE,GAAG3D,YAAY,CAAC2D,KAAK;MAAE,GAAG/D,KAAK,CAAC+D,KAAK;MAAE,GAAGN;IAAc;EAClE,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA1D,aAAa,CAAC4E,IAAI,GAAGC,+BAAa","ignoreList":[]}
|
|
@@ -18,27 +18,24 @@ var _lockUnlock = require("../../../lock-unlock");
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Allows Zoom Out mode to be exited by double clicking in the selected block.
|
|
21
|
-
*
|
|
22
|
-
* @param {string} clientId Block client ID.
|
|
23
21
|
*/
|
|
24
|
-
function useZoomOutModeExit({
|
|
25
|
-
editorMode
|
|
26
|
-
}) {
|
|
22
|
+
function useZoomOutModeExit() {
|
|
27
23
|
const {
|
|
28
24
|
getSettings,
|
|
29
|
-
isZoomOut
|
|
25
|
+
isZoomOut,
|
|
26
|
+
__unstableGetEditorMode
|
|
30
27
|
} = (0, _lockUnlock.unlock)((0, _data.useSelect)(_store.store));
|
|
31
28
|
const {
|
|
32
29
|
__unstableSetEditorMode,
|
|
33
30
|
resetZoomLevel
|
|
34
31
|
} = (0, _lockUnlock.unlock)((0, _data.useDispatch)(_store.store));
|
|
35
32
|
return (0, _compose.useRefEffect)(node => {
|
|
36
|
-
// In "compose" mode.
|
|
37
|
-
const composeMode = editorMode === 'zoom-out' && isZoomOut();
|
|
38
|
-
if (!composeMode) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
33
|
function onDoubleClick(event) {
|
|
34
|
+
// In "compose" mode.
|
|
35
|
+
const composeMode = __unstableGetEditorMode() === 'zoom-out' && isZoomOut();
|
|
36
|
+
if (!composeMode) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
42
39
|
if (!event.defaultPrevented) {
|
|
43
40
|
event.preventDefault();
|
|
44
41
|
const {
|
|
@@ -55,6 +52,6 @@ function useZoomOutModeExit({
|
|
|
55
52
|
return () => {
|
|
56
53
|
node.removeEventListener('dblclick', onDoubleClick);
|
|
57
54
|
};
|
|
58
|
-
}, [
|
|
55
|
+
}, [getSettings, __unstableSetEditorMode, __unstableGetEditorMode, isZoomOut, resetZoomLevel]);
|
|
59
56
|
}
|
|
60
57
|
//# sourceMappingURL=use-zoom-out-mode-exit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_compose","_store","_lockUnlock","useZoomOutModeExit","
|
|
1
|
+
{"version":3,"names":["_data","require","_compose","_store","_lockUnlock","useZoomOutModeExit","getSettings","isZoomOut","__unstableGetEditorMode","unlock","useSelect","blockEditorStore","__unstableSetEditorMode","resetZoomLevel","useDispatch","useRefEffect","node","onDoubleClick","event","composeMode","defaultPrevented","preventDefault","__experimentalSetIsInserterOpened","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\n/**\n * Allows Zoom Out mode to be exited by double clicking in the selected block.\n */\nexport function useZoomOutModeExit() {\n\tconst { getSettings, isZoomOut, __unstableGetEditorMode } = unlock(\n\t\tuseSelect( blockEditorStore )\n\t);\n\n\tconst { __unstableSetEditorMode, resetZoomLevel } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onDoubleClick( event ) {\n\t\t\t\t// In \"compose\" mode.\n\t\t\t\tconst composeMode =\n\t\t\t\t\t__unstableGetEditorMode() === 'zoom-out' && isZoomOut();\n\n\t\t\t\tif ( ! composeMode ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( ! event.defaultPrevented ) {\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\tconst { __experimentalSetIsInserterOpened } = getSettings();\n\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof __experimentalSetIsInserterOpened === 'function'\n\t\t\t\t\t) {\n\t\t\t\t\t\t__experimentalSetIsInserterOpened( false );\n\t\t\t\t\t}\n\t\t\t\t\t__unstableSetEditorMode( 'edit' );\n\t\t\t\t\tresetZoomLevel();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'dblclick', onDoubleClick );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'dblclick', onDoubleClick );\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tgetSettings,\n\t\t\t__unstableSetEditorMode,\n\t\t\t__unstableGetEditorMode,\n\t\t\tisZoomOut,\n\t\t\tresetZoomLevel,\n\t\t]\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;AACO,SAASI,kBAAkBA,CAAA,EAAG;EACpC,MAAM;IAAEC,WAAW;IAAEC,SAAS;IAAEC;EAAwB,CAAC,GAAG,IAAAC,kBAAM,EACjE,IAAAC,eAAS,EAAEC,YAAiB,CAC7B,CAAC;EAED,MAAM;IAAEC,uBAAuB;IAAEC;EAAe,CAAC,GAAG,IAAAJ,kBAAM,EACzD,IAAAK,iBAAW,EAAEH,YAAiB,CAC/B,CAAC;EAED,OAAO,IAAAI,qBAAY,EAChBC,IAAI,IAAM;IACX,SAASC,aAAaA,CAAEC,KAAK,EAAG;MAC/B;MACA,MAAMC,WAAW,GAChBX,uBAAuB,CAAC,CAAC,KAAK,UAAU,IAAID,SAAS,CAAC,CAAC;MAExD,IAAK,CAAEY,WAAW,EAAG;QACpB;MACD;MAEA,IAAK,CAAED,KAAK,CAACE,gBAAgB,EAAG;QAC/BF,KAAK,CAACG,cAAc,CAAC,CAAC;QAEtB,MAAM;UAAEC;QAAkC,CAAC,GAAGhB,WAAW,CAAC,CAAC;QAE3D,IACC,OAAOgB,iCAAiC,KAAK,UAAU,EACtD;UACDA,iCAAiC,CAAE,KAAM,CAAC;QAC3C;QACAV,uBAAuB,CAAE,MAAO,CAAC;QACjCC,cAAc,CAAC,CAAC;MACjB;IACD;IAEAG,IAAI,CAACO,gBAAgB,CAAE,UAAU,EAAEN,aAAc,CAAC;IAElD,OAAO,MAAM;MACZD,IAAI,CAACQ,mBAAmB,CAAE,UAAU,EAAEP,aAAc,CAAC;IACtD,CAAC;EACF,CAAC,EACD,CACCX,WAAW,EACXM,uBAAuB,EACvBJ,uBAAuB,EACvBD,SAAS,EACTM,cAAc,CAEhB,CAAC;AACF","ignoreList":[]}
|
|
@@ -54,10 +54,8 @@ function BlockVariationPicker({
|
|
|
54
54
|
}, variation.name))
|
|
55
55
|
}), allowSkip && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
56
56
|
className: "block-editor-block-variation-picker__skip",
|
|
57
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button
|
|
58
|
-
|
|
59
|
-
, {
|
|
60
|
-
__next40pxDefaultSize: false,
|
|
57
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
58
|
+
__next40pxDefaultSize: true,
|
|
61
59
|
variant: "link",
|
|
62
60
|
onClick: () => onSelect(),
|
|
63
61
|
children: (0, _i18n.__)('Skip')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_components","_icons","_jsxRuntime","BlockVariationPicker","icon","layout","label","__","instructions","variations","onSelect","allowSkip","classes","clsx","length","jsxs","Placeholder","className","children","jsx","role","map","variation","Button","__next40pxDefaultSize","variant","src","iconSize","onClick","description","title","name","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button, Placeholder } from '@wordpress/components';\nimport { layout } from '@wordpress/icons';\n\nfunction BlockVariationPicker( {\n\ticon = layout,\n\tlabel = __( 'Choose variation' ),\n\tinstructions = __( 'Select a variation to start with:' ),\n\tvariations,\n\tonSelect,\n\tallowSkip,\n} ) {\n\tconst classes = clsx( 'block-editor-block-variation-picker', {\n\t\t'has-many-variations': variations.length > 4,\n\t} );\n\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ icon }\n\t\t\tlabel={ label }\n\t\t\tinstructions={ instructions }\n\t\t\tclassName={ classes }\n\t\t>\n\t\t\t{ /*\n\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t */\n\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t<ul\n\t\t\t\tclassName=\"block-editor-block-variation-picker__variations\"\n\t\t\t\trole=\"list\"\n\t\t\t\taria-label={ __( 'Block variations' ) }\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<li key={ variation.name }>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\tvariation.icon && variation.icon.src\n\t\t\t\t\t\t\t\t\t? variation.icon.src\n\t\t\t\t\t\t\t\t\t: variation.icon\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonSize={ 48 }\n\t\t\t\t\t\t\tonClick={ () => onSelect( variation ) }\n\t\t\t\t\t\t\tclassName=\"block-editor-block-variation-picker__variation\"\n\t\t\t\t\t\t\tlabel={ variation.description || variation.title }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span className=\"block-editor-block-variation-picker__variation-label\">\n\t\t\t\t\t\t\t{ variation.title }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t{ allowSkip && (\n\t\t\t\t<div className=\"block-editor-block-variation-picker__skip\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_components","_icons","_jsxRuntime","BlockVariationPicker","icon","layout","label","__","instructions","variations","onSelect","allowSkip","classes","clsx","length","jsxs","Placeholder","className","children","jsx","role","map","variation","Button","__next40pxDefaultSize","variant","src","iconSize","onClick","description","title","name","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button, Placeholder } from '@wordpress/components';\nimport { layout } from '@wordpress/icons';\n\nfunction BlockVariationPicker( {\n\ticon = layout,\n\tlabel = __( 'Choose variation' ),\n\tinstructions = __( 'Select a variation to start with:' ),\n\tvariations,\n\tonSelect,\n\tallowSkip,\n} ) {\n\tconst classes = clsx( 'block-editor-block-variation-picker', {\n\t\t'has-many-variations': variations.length > 4,\n\t} );\n\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ icon }\n\t\t\tlabel={ label }\n\t\t\tinstructions={ instructions }\n\t\t\tclassName={ classes }\n\t\t>\n\t\t\t{ /*\n\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t */\n\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t<ul\n\t\t\t\tclassName=\"block-editor-block-variation-picker__variations\"\n\t\t\t\trole=\"list\"\n\t\t\t\taria-label={ __( 'Block variations' ) }\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<li key={ variation.name }>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\tvariation.icon && variation.icon.src\n\t\t\t\t\t\t\t\t\t? variation.icon.src\n\t\t\t\t\t\t\t\t\t: variation.icon\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonSize={ 48 }\n\t\t\t\t\t\t\tonClick={ () => onSelect( variation ) }\n\t\t\t\t\t\t\tclassName=\"block-editor-block-variation-picker__variation\"\n\t\t\t\t\t\t\tlabel={ variation.description || variation.title }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span className=\"block-editor-block-variation-picker__variation-label\">\n\t\t\t\t\t\t\t{ variation.title }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t{ allowSkip && (\n\t\t\t\t<div className=\"block-editor-block-variation-picker__skip\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\tonClick={ () => onSelect() }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</Placeholder>\n\t);\n}\n\nexport default BlockVariationPicker;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAA0C,IAAAI,WAAA,GAAAJ,OAAA;AAV1C;AACA;AACA;;AAGA;AACA;AACA;;AAKA,SAASK,oBAAoBA,CAAE;EAC9BC,IAAI,GAAGC,aAAM;EACbC,KAAK,GAAG,IAAAC,QAAE,EAAE,kBAAmB,CAAC;EAChCC,YAAY,GAAG,IAAAD,QAAE,EAAE,mCAAoC,CAAC;EACxDE,UAAU;EACVC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAMC,OAAO,GAAG,IAAAC,aAAI,EAAE,qCAAqC,EAAE;IAC5D,qBAAqB,EAAEJ,UAAU,CAACK,MAAM,GAAG;EAC5C,CAAE,CAAC;EAEH,oBACC,IAAAZ,WAAA,CAAAa,IAAA,EAACf,WAAA,CAAAgB,WAAW;IACXZ,IAAI,EAAGA,IAAM;IACbE,KAAK,EAAGA,KAAO;IACfE,YAAY,EAAGA,YAAc;IAC7BS,SAAS,EAAGL,OAAS;IAAAM,QAAA,gBAOrB,IAAAhB,WAAA,CAAAiB,GAAA;MACCF,SAAS,EAAC,iDAAiD;MAC3DG,IAAI,EAAC,MAAM;MACX,cAAa,IAAAb,QAAE,EAAE,kBAAmB,CAAG;MAAAW,QAAA,EAErCT,UAAU,CAACY,GAAG,CAAIC,SAAS,iBAC5B,IAAApB,WAAA,CAAAa,IAAA;QAAAG,QAAA,gBACC,IAAAhB,WAAA,CAAAiB,GAAA,EAACnB,WAAA,CAAAuB,MAAM;UACNC,qBAAqB;UACrBC,OAAO,EAAC,UAAU;UAClBrB,IAAI,EACHkB,SAAS,CAAClB,IAAI,IAAIkB,SAAS,CAAClB,IAAI,CAACsB,GAAG,GACjCJ,SAAS,CAAClB,IAAI,CAACsB,GAAG,GAClBJ,SAAS,CAAClB,IACb;UACDuB,QAAQ,EAAG,EAAI;UACfC,OAAO,EAAGA,CAAA,KAAMlB,QAAQ,CAAEY,SAAU,CAAG;UACvCL,SAAS,EAAC,gDAAgD;UAC1DX,KAAK,EAAGgB,SAAS,CAACO,WAAW,IAAIP,SAAS,CAACQ;QAAO,CAClD,CAAC,eACF,IAAA5B,WAAA,CAAAiB,GAAA;UAAMF,SAAS,EAAC,sDAAsD;UAAAC,QAAA,EACnEI,SAAS,CAACQ;QAAK,CACZ,CAAC;MAAA,GAhBER,SAAS,CAACS,IAiBhB,CACH;IAAC,CACA,CAAC,EAEHpB,SAAS,iBACV,IAAAT,WAAA,CAAAiB,GAAA;MAAKF,SAAS,EAAC,2CAA2C;MAAAC,QAAA,eACzD,IAAAhB,WAAA,CAAAiB,GAAA,EAACnB,WAAA,CAAAuB,MAAM;QACNC,qBAAqB;QACrBC,OAAO,EAAC,MAAM;QACdG,OAAO,EAAGA,CAAA,KAAMlB,QAAQ,CAAC,CAAG;QAAAQ,QAAA,EAE1B,IAAAX,QAAE,EAAE,MAAO;MAAC,CACP;IAAC,CACL,CACL;EAAA,CACW,CAAC;AAEhB;AAAC,IAAAyB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc/B,oBAAoB","ignoreList":[]}
|
|
@@ -34,10 +34,9 @@ function VariationsButtons({
|
|
|
34
34
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.VisuallyHidden, {
|
|
35
35
|
as: "legend",
|
|
36
36
|
children: (0, _i18n.__)('Transform to variation')
|
|
37
|
-
}), variations.map(variation => /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
__next40pxDefaultSize: false,
|
|
37
|
+
}), variations.map(variation => /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
38
|
+
__next40pxDefaultSize: true,
|
|
39
|
+
size: "compact",
|
|
41
40
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockIcon.default, {
|
|
42
41
|
icon: variation.icon,
|
|
43
42
|
showColors: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","_i18n","_components","_data","_element","_icons","_blockIcon","_interopRequireDefault","_store","_lockUnlock","_jsxRuntime","VariationsButtons","className","onSelectVariation","selectedValue","variations","jsxs","children","jsx","VisuallyHidden","as","__","map","variation","Button","__next40pxDefaultSize","icon","default","showColors","isPressed","name","label","title","sprintf","onClick","showTooltip","VariationsDropdown","selectOptions","description","value","info","DropdownMenu","text","popoverProps","position","chevronDown","toggleProps","iconPosition","MenuGroup","MenuItemsChoice","choices","onSelect","VariationsToggleGroupControl","__experimentalToggleGroupControl","hideLabelFromVision","onChange","__nextHasNoMarginBottom","__experimentalToggleGroupControlOptionIcon","__experimentalBlockVariationTransforms","blockClientId","updateBlockAttributes","useDispatch","blockEditorStore","activeBlockVariation","isContentOnly","useSelect","select","getActiveBlockVariation","getBlockVariations","blocksStore","getBlockName","getBlockAttributes","getBlockEditingMode","hasContentRoleAttribute","unlock","isContentBlock","hasUniqueIcons","useMemo","variationIcons","Set","forEach","add","src","size","length","variationName","find","attributes","baseClass","showButtons","ButtonComponent","Component","_default","exports"],"sources":["@wordpress/block-editor/src/components/block-variation-transforms/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItemsChoice,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction VariationsButtons( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<fieldset className={ className }>\n\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t{ __( 'Transform to variation' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t<Button\n\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\ticon={ <BlockIcon icon={ variation.icon } showColors /> }\n\t\t\t\t\tisPressed={ selectedValue === variation.name }\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t )\n\t\t\t\t\t}\n\t\t\t\t\tonClick={ () => onSelectVariation( variation.name ) }\n\t\t\t\t\taria-label={ variation.title }\n\t\t\t\t\tshowTooltip\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</fieldset>\n\t);\n}\n\nfunction VariationsDropdown( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\tconst selectOptions = variations.map(\n\t\t( { name, title, description } ) => ( {\n\t\t\tvalue: name,\n\t\t\tlabel: title,\n\t\t\tinfo: description,\n\t\t} )\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName={ className }\n\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\ttext={ __( 'Transform to variation' ) }\n\t\t\tpopoverProps={ {\n\t\t\t\tposition: 'bottom center',\n\t\t\t\tclassName: `${ className }__popover`,\n\t\t\t} }\n\t\t\ticon={ chevronDown }\n\t\t\ttoggleProps={ { iconPosition: 'right' } }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<div className={ `${ className }__container` }>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tchoices={ selectOptions }\n\t\t\t\t\t\t\tvalue={ selectedValue }\n\t\t\t\t\t\t\tonSelect={ onSelectVariation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction VariationsToggleGroupControl( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<div className={ className }>\n\t\t\t<ToggleGroupControl\n\t\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\t\tvalue={ selectedValue }\n\t\t\t\thideLabelFromVision\n\t\t\t\tonChange={ onSelectVariation }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t<BlockIcon icon={ variation.icon } showColors />\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ variation.name }\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ToggleGroupControl>\n\t\t</div>\n\t);\n}\n\nfunction __experimentalBlockVariationTransforms( { blockClientId } ) {\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { activeBlockVariation, variations, isContentOnly } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\n\t\t\tconst { getBlockName, getBlockAttributes, getBlockEditingMode } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst name = blockClientId && getBlockName( blockClientId );\n\n\t\t\tconst { hasContentRoleAttribute } = unlock( select( blocksStore ) );\n\t\t\tconst isContentBlock = hasContentRoleAttribute( name );\n\n\t\t\treturn {\n\t\t\t\tactiveBlockVariation: getActiveBlockVariation(\n\t\t\t\t\tname,\n\t\t\t\t\tgetBlockAttributes( blockClientId )\n\t\t\t\t),\n\t\t\t\tvariations: name && getBlockVariations( name, 'transform' ),\n\t\t\t\tisContentOnly:\n\t\t\t\t\tgetBlockEditingMode( blockClientId ) === 'contentOnly' &&\n\t\t\t\t\t! isContentBlock,\n\t\t\t};\n\t\t},\n\t\t[ blockClientId ]\n\t);\n\n\tconst selectedValue = activeBlockVariation?.name;\n\n\t// Check if each variation has a unique icon.\n\tconst hasUniqueIcons = useMemo( () => {\n\t\tconst variationIcons = new Set();\n\t\tif ( ! variations ) {\n\t\t\treturn false;\n\t\t}\n\t\tvariations.forEach( ( variation ) => {\n\t\t\tif ( variation.icon ) {\n\t\t\t\tvariationIcons.add( variation.icon?.src || variation.icon );\n\t\t\t}\n\t\t} );\n\t\treturn variationIcons.size === variations.length;\n\t}, [ variations ] );\n\n\tconst onSelectVariation = ( variationName ) => {\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\t...variations.find( ( { name } ) => name === variationName )\n\t\t\t\t.attributes,\n\t\t} );\n\t};\n\n\tif ( ! variations?.length || isContentOnly ) {\n\t\treturn null;\n\t}\n\n\tconst baseClass = 'block-editor-block-variation-transforms';\n\n\t// Show buttons if there are more than 5 variations because the ToggleGroupControl does not wrap\n\tconst showButtons = variations.length > 5;\n\n\tconst ButtonComponent = showButtons\n\t\t? VariationsButtons\n\t\t: VariationsToggleGroupControl;\n\n\tconst Component = hasUniqueIcons ? ButtonComponent : VariationsDropdown;\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={ baseClass }\n\t\t\tonSelectVariation={ onSelectVariation }\n\t\t\tselectedValue={ selectedValue }\n\t\t\tvariations={ variations }\n\t\t/>\n\t);\n}\n\nexport default __experimentalBlockVariationTransforms;\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AASA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,UAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAA2C,IAAAU,WAAA,GAAAV,OAAA;AAvB3C;AACA;AACA;;AAgBA;AACA;AACA;;AAKA,SAASW,iBAAiBA,CAAE;EAC3BC,SAAS;EACTC,iBAAiB;EACjBC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,oBACC,IAAAL,WAAA,CAAAM,IAAA;IAAUJ,SAAS,EAAGA,SAAW;IAAAK,QAAA,gBAChC,IAAAP,WAAA,CAAAQ,GAAA,EAAChB,WAAA,CAAAiB,cAAc;MAACC,EAAE,EAAC,QAAQ;MAAAH,QAAA,EACxB,IAAAI,QAAE,EAAE,wBAAyB;IAAC,CACjB,CAAC,EACfN,UAAU,CAACO,GAAG,CAAIC,SAAS,iBAC5B,IAAAb,WAAA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data","_element","_icons","_blockIcon","_interopRequireDefault","_store","_lockUnlock","_jsxRuntime","VariationsButtons","className","onSelectVariation","selectedValue","variations","jsxs","children","jsx","VisuallyHidden","as","__","map","variation","Button","__next40pxDefaultSize","size","icon","default","showColors","isPressed","name","label","title","sprintf","onClick","showTooltip","VariationsDropdown","selectOptions","description","value","info","DropdownMenu","text","popoverProps","position","chevronDown","toggleProps","iconPosition","MenuGroup","MenuItemsChoice","choices","onSelect","VariationsToggleGroupControl","__experimentalToggleGroupControl","hideLabelFromVision","onChange","__nextHasNoMarginBottom","__experimentalToggleGroupControlOptionIcon","__experimentalBlockVariationTransforms","blockClientId","updateBlockAttributes","useDispatch","blockEditorStore","activeBlockVariation","isContentOnly","useSelect","select","getActiveBlockVariation","getBlockVariations","blocksStore","getBlockName","getBlockAttributes","getBlockEditingMode","hasContentRoleAttribute","unlock","isContentBlock","hasUniqueIcons","useMemo","variationIcons","Set","forEach","add","src","length","variationName","find","attributes","baseClass","showButtons","ButtonComponent","Component","_default","exports"],"sources":["@wordpress/block-editor/src/components/block-variation-transforms/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItemsChoice,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction VariationsButtons( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<fieldset className={ className }>\n\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t{ __( 'Transform to variation' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\ticon={ <BlockIcon icon={ variation.icon } showColors /> }\n\t\t\t\t\tisPressed={ selectedValue === variation.name }\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t )\n\t\t\t\t\t}\n\t\t\t\t\tonClick={ () => onSelectVariation( variation.name ) }\n\t\t\t\t\taria-label={ variation.title }\n\t\t\t\t\tshowTooltip\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</fieldset>\n\t);\n}\n\nfunction VariationsDropdown( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\tconst selectOptions = variations.map(\n\t\t( { name, title, description } ) => ( {\n\t\t\tvalue: name,\n\t\t\tlabel: title,\n\t\t\tinfo: description,\n\t\t} )\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName={ className }\n\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\ttext={ __( 'Transform to variation' ) }\n\t\t\tpopoverProps={ {\n\t\t\t\tposition: 'bottom center',\n\t\t\t\tclassName: `${ className }__popover`,\n\t\t\t} }\n\t\t\ticon={ chevronDown }\n\t\t\ttoggleProps={ { iconPosition: 'right' } }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<div className={ `${ className }__container` }>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tchoices={ selectOptions }\n\t\t\t\t\t\t\tvalue={ selectedValue }\n\t\t\t\t\t\t\tonSelect={ onSelectVariation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction VariationsToggleGroupControl( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<div className={ className }>\n\t\t\t<ToggleGroupControl\n\t\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\t\tvalue={ selectedValue }\n\t\t\t\thideLabelFromVision\n\t\t\t\tonChange={ onSelectVariation }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t<BlockIcon icon={ variation.icon } showColors />\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ variation.name }\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ToggleGroupControl>\n\t\t</div>\n\t);\n}\n\nfunction __experimentalBlockVariationTransforms( { blockClientId } ) {\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { activeBlockVariation, variations, isContentOnly } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\n\t\t\tconst { getBlockName, getBlockAttributes, getBlockEditingMode } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst name = blockClientId && getBlockName( blockClientId );\n\n\t\t\tconst { hasContentRoleAttribute } = unlock( select( blocksStore ) );\n\t\t\tconst isContentBlock = hasContentRoleAttribute( name );\n\n\t\t\treturn {\n\t\t\t\tactiveBlockVariation: getActiveBlockVariation(\n\t\t\t\t\tname,\n\t\t\t\t\tgetBlockAttributes( blockClientId )\n\t\t\t\t),\n\t\t\t\tvariations: name && getBlockVariations( name, 'transform' ),\n\t\t\t\tisContentOnly:\n\t\t\t\t\tgetBlockEditingMode( blockClientId ) === 'contentOnly' &&\n\t\t\t\t\t! isContentBlock,\n\t\t\t};\n\t\t},\n\t\t[ blockClientId ]\n\t);\n\n\tconst selectedValue = activeBlockVariation?.name;\n\n\t// Check if each variation has a unique icon.\n\tconst hasUniqueIcons = useMemo( () => {\n\t\tconst variationIcons = new Set();\n\t\tif ( ! variations ) {\n\t\t\treturn false;\n\t\t}\n\t\tvariations.forEach( ( variation ) => {\n\t\t\tif ( variation.icon ) {\n\t\t\t\tvariationIcons.add( variation.icon?.src || variation.icon );\n\t\t\t}\n\t\t} );\n\t\treturn variationIcons.size === variations.length;\n\t}, [ variations ] );\n\n\tconst onSelectVariation = ( variationName ) => {\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\t...variations.find( ( { name } ) => name === variationName )\n\t\t\t\t.attributes,\n\t\t} );\n\t};\n\n\tif ( ! variations?.length || isContentOnly ) {\n\t\treturn null;\n\t}\n\n\tconst baseClass = 'block-editor-block-variation-transforms';\n\n\t// Show buttons if there are more than 5 variations because the ToggleGroupControl does not wrap\n\tconst showButtons = variations.length > 5;\n\n\tconst ButtonComponent = showButtons\n\t\t? VariationsButtons\n\t\t: VariationsToggleGroupControl;\n\n\tconst Component = hasUniqueIcons ? ButtonComponent : VariationsDropdown;\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={ baseClass }\n\t\t\tonSelectVariation={ onSelectVariation }\n\t\t\tselectedValue={ selectedValue }\n\t\t\tvariations={ variations }\n\t\t/>\n\t);\n}\n\nexport default __experimentalBlockVariationTransforms;\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AASA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,UAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAA2C,IAAAU,WAAA,GAAAV,OAAA;AAvB3C;AACA;AACA;;AAgBA;AACA;AACA;;AAKA,SAASW,iBAAiBA,CAAE;EAC3BC,SAAS;EACTC,iBAAiB;EACjBC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,oBACC,IAAAL,WAAA,CAAAM,IAAA;IAAUJ,SAAS,EAAGA,SAAW;IAAAK,QAAA,gBAChC,IAAAP,WAAA,CAAAQ,GAAA,EAAChB,WAAA,CAAAiB,cAAc;MAACC,EAAE,EAAC,QAAQ;MAAAH,QAAA,EACxB,IAAAI,QAAE,EAAE,wBAAyB;IAAC,CACjB,CAAC,EACfN,UAAU,CAACO,GAAG,CAAIC,SAAS,iBAC5B,IAAAb,WAAA,CAAAQ,GAAA,EAAChB,WAAA,CAAAsB,MAAM;MACNC,qBAAqB;MACrBC,IAAI,EAAC,SAAS;MAEdC,IAAI,eAAG,IAAAjB,WAAA,CAAAQ,GAAA,EAACZ,UAAA,CAAAsB,OAAS;QAACD,IAAI,EAAGJ,SAAS,CAACI,IAAM;QAACE,UAAU;MAAA,CAAE,CAAG;MACzDC,SAAS,EAAGhB,aAAa,KAAKS,SAAS,CAACQ,IAAM;MAC9CC,KAAK,EACJlB,aAAa,KAAKS,SAAS,CAACQ,IAAI,GAC7BR,SAAS,CAACU,KAAK,GACf,IAAA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C,EAAE,CAAErE,UAAU,CAAG,CAAC;EAEnB,MAAMF,iBAAiB,GAAKwE,aAAa,IAAM;IAC9CxB,qBAAqB,CAAED,aAAa,EAAE;MACrC,GAAG7C,UAAU,CAACuE,IAAI,CAAE,CAAE;QAAEvD;MAAK,CAAC,KAAMA,IAAI,KAAKsD,aAAc,CAAC,CAC1DE;IACH,CAAE,CAAC;EACJ,CAAC;EAED,IAAK,CAAExE,UAAU,EAAEqE,MAAM,IAAInB,aAAa,EAAG;IAC5C,OAAO,IAAI;EACZ;EAEA,MAAMuB,SAAS,GAAG,yCAAyC;;EAE3D;EACA,MAAMC,WAAW,GAAG1E,UAAU,CAACqE,MAAM,GAAG,CAAC;EAEzC,MAAMM,eAAe,GAAGD,WAAW,GAChC9E,iBAAiB,GACjB0C,4BAA4B;EAE/B,MAAMsC,SAAS,GAAGd,cAAc,GAAGa,eAAe,GAAGrD,kBAAkB;EAEvE,oBACC,IAAA3B,WAAA,CAAAQ,GAAA,EAACyE,SAAS;IACT/E,SAAS,EAAG4E,SAAW;IACvB3E,iBAAiB,EAAGA,iBAAmB;IACvCC,aAAa,EAAGA,aAAe;IAC/BC,UAAU,EAAGA;EAAY,CACzB,CAAC;AAEJ;AAAC,IAAA6E,QAAA,GAAAC,OAAA,CAAAjE,OAAA,GAEc+B,sCAAsC","ignoreList":[]}
|
|
@@ -56,10 +56,8 @@ function ButtonBlockAppender({
|
|
|
56
56
|
const label = hasSingleBlockType ? (0, _i18n.sprintf)(
|
|
57
57
|
// translators: %s: the name of the block when there is only one
|
|
58
58
|
(0, _i18n._x)('Add %s', 'directly add the only allowed block'), blockTitle) : (0, _i18n._x)('Add block', 'Generic label for block inserter button');
|
|
59
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button
|
|
60
|
-
|
|
61
|
-
, {
|
|
62
|
-
__next40pxDefaultSize: false,
|
|
59
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
60
|
+
__next40pxDefaultSize: true,
|
|
63
61
|
ref: mergedInserterButtonRef,
|
|
64
62
|
onFocus: onFocus,
|
|
65
63
|
tabIndex: tabIndex,
|