@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","justifyLeft","justifyCenter","justifyRight","justifySpaceBetween","justifyStretch","arrowRight","arrowDown","Button","ToggleControl","Flex","FlexItem","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","appendSelectors","getBlockGapCSS","getGapCSSValue","BlockControls","JustifyContentControl","BlockVerticalAlignmentControl","shouldSkipSerialization","LAYOUT_DEFINITIONS","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","justifyContentMap","left","right","center","alignItemsMap","stretch","verticalAlignmentMap","top","bottom","flexWrapOptions","name","label","inspectorControls","FlexLayoutInspectorControls","layout","onChange","layoutBlockSupport","allowOrientation","children","FlexLayoutJustifyContentControl","OrientationControl","FlexWrapControl","toolBarControls","FlexLayoutToolbarControls","allowSwitching","allowVerticalAlignment","group","__experimentalShareWithChildBlocks","isToolbar","FlexLayoutVerticalAlignmentControl","getLayoutStyle","selector","style","blockName","hasBlockGapSupport","layoutDefinitions","orientation","blockGapValue","spacing","blockGap","undefined","justifyContent","flexWrap","includes","verticalAlignment","alignItems","output","rules","push","length","join","getOrientation","getAlignments","defaultVerticalAlignment","onVerticalAlignmentChange","value","controls","verticalAlignmentOptions","className","map","icon","__next40pxDefaultSize","isPressed","onClick","POPOVER_PROPS","placement","onJustificationChange","allowedControls","popoverProps","justificationOptions","__nextHasNoMarginBottom","checked","newVerticalAlignment","newJustification"],"sources":["@wordpress/block-editor/src/layouts/flex.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tjustifyLeft,\n\tjustifyCenter,\n\tjustifyRight,\n\tjustifySpaceBetween,\n\tjustifyStretch,\n\tarrowRight,\n\tarrowDown,\n} from '@wordpress/icons';\nimport {\n\tButton,\n\tToggleControl,\n\tFlex,\n\tFlexItem,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { appendSelectors, getBlockGapCSS } from './utils';\nimport { getGapCSSValue } from '../hooks/gap';\nimport {\n\tBlockControls,\n\tJustifyContentControl,\n\tBlockVerticalAlignmentControl,\n} from '../components';\nimport { shouldSkipSerialization } from '../hooks/utils';\nimport { LAYOUT_DEFINITIONS } from './definitions';\n\n// Used with the default, horizontal flex orientation.\nconst justifyContentMap = {\n\tleft: 'flex-start',\n\tright: 'flex-end',\n\tcenter: 'center',\n\t'space-between': 'space-between',\n};\n\n// Used with the vertical (column) flex orientation.\nconst alignItemsMap = {\n\tleft: 'flex-start',\n\tright: 'flex-end',\n\tcenter: 'center',\n\tstretch: 'stretch',\n};\n\nconst verticalAlignmentMap = {\n\ttop: 'flex-start',\n\tcenter: 'center',\n\tbottom: 'flex-end',\n\tstretch: 'stretch',\n\t'space-between': 'space-between',\n};\n\nconst flexWrapOptions = [ 'wrap', 'nowrap' ];\n\nexport default {\n\tname: 'flex',\n\tlabel: __( 'Flex' ),\n\tinspectorControls: function FlexLayoutInspectorControls( {\n\t\tlayout = {},\n\t\tonChange,\n\t\tlayoutBlockSupport = {},\n\t} ) {\n\t\tconst { allowOrientation = true } = layoutBlockSupport;\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Flex>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<FlexLayoutJustifyContentControl\n\t\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t{ allowOrientation && (\n\t\t\t\t\t\t\t<OrientationControl\n\t\t\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t\t<FlexWrapControl layout={ layout } onChange={ onChange } />\n\t\t\t</>\n\t\t);\n\t},\n\ttoolBarControls: function FlexLayoutToolbarControls( {\n\t\tlayout = {},\n\t\tonChange,\n\t\tlayoutBlockSupport,\n\t} ) {\n\t\tif ( layoutBlockSupport?.allowSwitching ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst { allowVerticalAlignment = true } = layoutBlockSupport;\n\t\treturn (\n\t\t\t<BlockControls group=\"block\" __experimentalShareWithChildBlocks>\n\t\t\t\t<FlexLayoutJustifyContentControl\n\t\t\t\t\tlayout={ layout }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tisToolbar\n\t\t\t\t/>\n\t\t\t\t{ allowVerticalAlignment && (\n\t\t\t\t\t<FlexLayoutVerticalAlignmentControl\n\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisToolbar\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockControls>\n\t\t);\n\t},\n\tgetLayoutStyle: function getLayoutStyle( {\n\t\tselector,\n\t\tlayout,\n\t\tstyle,\n\t\tblockName,\n\t\thasBlockGapSupport,\n\t\tlayoutDefinitions = LAYOUT_DEFINITIONS,\n\t} ) {\n\t\tconst { orientation = 'horizontal' } = layout;\n\n\t\t// If a block's block.json skips serialization for spacing or spacing.blockGap,\n\t\t// don't apply the user-defined value to the styles.\n\t\tconst blockGapValue =\n\t\t\tstyle?.spacing?.blockGap &&\n\t\t\t! shouldSkipSerialization( blockName, 'spacing', 'blockGap' )\n\t\t\t\t? getGapCSSValue( style?.spacing?.blockGap, '0.5em' )\n\t\t\t\t: undefined;\n\t\tconst justifyContent = justifyContentMap[ layout.justifyContent ];\n\t\tconst flexWrap = flexWrapOptions.includes( layout.flexWrap )\n\t\t\t? layout.flexWrap\n\t\t\t: 'wrap';\n\t\tconst verticalAlignment =\n\t\t\tverticalAlignmentMap[ layout.verticalAlignment ];\n\t\tconst alignItems =\n\t\t\talignItemsMap[ layout.justifyContent ] || alignItemsMap.left;\n\n\t\tlet output = '';\n\t\tconst rules = [];\n\n\t\tif ( flexWrap && flexWrap !== 'wrap' ) {\n\t\t\trules.push( `flex-wrap: ${ flexWrap }` );\n\t\t}\n\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\tif ( verticalAlignment ) {\n\t\t\t\trules.push( `align-items: ${ verticalAlignment }` );\n\t\t\t}\n\t\t\tif ( justifyContent ) {\n\t\t\t\trules.push( `justify-content: ${ justifyContent }` );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( verticalAlignment ) {\n\t\t\t\trules.push( `justify-content: ${ verticalAlignment }` );\n\t\t\t}\n\t\t\trules.push( 'flex-direction: column' );\n\t\t\trules.push( `align-items: ${ alignItems }` );\n\t\t}\n\n\t\tif ( rules.length ) {\n\t\t\toutput = `${ appendSelectors( selector ) } {\n\t\t\t\t${ rules.join( '; ' ) };\n\t\t\t}`;\n\t\t}\n\n\t\t// Output blockGap styles based on rules contained in layout definitions in theme.json.\n\t\tif ( hasBlockGapSupport && blockGapValue ) {\n\t\t\toutput += getBlockGapCSS(\n\t\t\t\tselector,\n\t\t\t\tlayoutDefinitions,\n\t\t\t\t'flex',\n\t\t\t\tblockGapValue\n\t\t\t);\n\t\t}\n\t\treturn output;\n\t},\n\tgetOrientation( layout ) {\n\t\tconst { orientation = 'horizontal' } = layout;\n\t\treturn orientation;\n\t},\n\tgetAlignments() {\n\t\treturn [];\n\t},\n};\n\nfunction FlexLayoutVerticalAlignmentControl( {\n\tlayout,\n\tonChange,\n\tisToolbar = false,\n} ) {\n\tconst { orientation = 'horizontal' } = layout;\n\n\tconst defaultVerticalAlignment =\n\t\torientation === 'horizontal'\n\t\t\t? verticalAlignmentMap.center\n\t\t\t: verticalAlignmentMap.top;\n\n\tconst { verticalAlignment = defaultVerticalAlignment } = layout;\n\n\tconst onVerticalAlignmentChange = ( value ) => {\n\t\tonChange( {\n\t\t\t...layout,\n\t\t\tverticalAlignment: value,\n\t\t} );\n\t};\n\tif ( isToolbar ) {\n\t\treturn (\n\t\t\t<BlockVerticalAlignmentControl\n\t\t\t\tonChange={ onVerticalAlignmentChange }\n\t\t\t\tvalue={ verticalAlignment }\n\t\t\t\tcontrols={\n\t\t\t\t\torientation === 'horizontal'\n\t\t\t\t\t\t? [ 'top', 'center', 'bottom', 'stretch' ]\n\t\t\t\t\t\t: [ 'top', 'center', 'bottom', 'space-between' ]\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst verticalAlignmentOptions = [\n\t\t{\n\t\t\tvalue: 'flex-start',\n\t\t\tlabel: __( 'Align items top' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'center',\n\t\t\tlabel: __( 'Align items center' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'flex-end',\n\t\t\tlabel: __( 'Align items bottom' ),\n\t\t},\n\t];\n\n\treturn (\n\t\t<fieldset className=\"block-editor-hooks__flex-layout-vertical-alignment-control\">\n\t\t\t<legend>{ __( 'Vertical alignment' ) }</legend>\n\t\t\t<div>\n\t\t\t\t{ verticalAlignmentOptions.map( ( value, icon, label ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tisPressed={ verticalAlignment === value }\n\t\t\t\t\t\t\tonClick={ () => onVerticalAlignmentChange( value ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n}\n\nconst POPOVER_PROPS = {\n\tplacement: 'bottom-start',\n};\n\nfunction FlexLayoutJustifyContentControl( {\n\tlayout,\n\tonChange,\n\tisToolbar = false,\n} ) {\n\tconst { justifyContent = 'left', orientation = 'horizontal' } = layout;\n\tconst onJustificationChange = ( value ) => {\n\t\tonChange( {\n\t\t\t...layout,\n\t\t\tjustifyContent: value,\n\t\t} );\n\t};\n\tconst allowedControls = [ 'left', 'center', 'right' ];\n\tif ( orientation === 'horizontal' ) {\n\t\tallowedControls.push( 'space-between' );\n\t} else {\n\t\tallowedControls.push( 'stretch' );\n\t}\n\tif ( isToolbar ) {\n\t\treturn (\n\t\t\t<JustifyContentControl\n\t\t\t\tallowedControls={ allowedControls }\n\t\t\t\tvalue={ justifyContent }\n\t\t\t\tonChange={ onJustificationChange }\n\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst justificationOptions = [\n\t\t{\n\t\t\tvalue: 'left',\n\t\t\ticon: justifyLeft,\n\t\t\tlabel: __( 'Justify items left' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'center',\n\t\t\ticon: justifyCenter,\n\t\t\tlabel: __( 'Justify items center' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'right',\n\t\t\ticon: justifyRight,\n\t\t\tlabel: __( 'Justify items right' ),\n\t\t},\n\t];\n\tif ( orientation === 'horizontal' ) {\n\t\tjustificationOptions.push( {\n\t\t\tvalue: 'space-between',\n\t\t\ticon: justifySpaceBetween,\n\t\t\tlabel: __( 'Space between items' ),\n\t\t} );\n\t} else {\n\t\tjustificationOptions.push( {\n\t\t\tvalue: 'stretch',\n\t\t\ticon: justifyStretch,\n\t\t\tlabel: __( 'Stretch items' ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Justification' ) }\n\t\t\tvalue={ justifyContent }\n\t\t\tonChange={ onJustificationChange }\n\t\t\tclassName=\"block-editor-hooks__flex-layout-justification-controls\"\n\t\t>\n\t\t\t{ justificationOptions.map( ( { value, icon, label } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ToggleGroupControl>\n\t);\n}\n\nfunction FlexWrapControl( { layout, onChange } ) {\n\tconst { flexWrap = 'wrap' } = layout;\n\treturn (\n\t\t<ToggleControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Allow to wrap to multiple lines' ) }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\tonChange( {\n\t\t\t\t\t...layout,\n\t\t\t\t\tflexWrap: value ? 'wrap' : 'nowrap',\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tchecked={ flexWrap === 'wrap' }\n\t\t/>\n\t);\n}\n\nfunction OrientationControl( { layout, onChange } ) {\n\tconst {\n\t\torientation = 'horizontal',\n\t\tverticalAlignment,\n\t\tjustifyContent,\n\t} = layout;\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"block-editor-hooks__flex-layout-orientation-controls\"\n\t\t\tlabel={ __( 'Orientation' ) }\n\t\t\tvalue={ orientation }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\t// Make sure the vertical alignment and justification are compatible with the new orientation.\n\t\t\t\tlet newVerticalAlignment = verticalAlignment;\n\t\t\t\tlet newJustification = justifyContent;\n\t\t\t\tif ( value === 'horizontal' ) {\n\t\t\t\t\tif ( verticalAlignment === 'space-between' ) {\n\t\t\t\t\t\tnewVerticalAlignment = 'center';\n\t\t\t\t\t}\n\t\t\t\t\tif ( justifyContent === 'stretch' ) {\n\t\t\t\t\t\tnewJustification = 'left';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( verticalAlignment === 'stretch' ) {\n\t\t\t\t\t\tnewVerticalAlignment = 'top';\n\t\t\t\t\t}\n\t\t\t\t\tif ( justifyContent === 'space-between' ) {\n\t\t\t\t\t\tnewJustification = 'left';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn onChange( {\n\t\t\t\t\t...layout,\n\t\t\t\t\torientation: value,\n\t\t\t\t\tverticalAlignment: newVerticalAlignment,\n\t\t\t\t\tjustifyContent: newJustification,\n\t\t\t\t} );\n\t\t\t} }\n\t\t>\n\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\ticon={ arrowRight }\n\t\t\t\tvalue=\"horizontal\"\n\t\t\t\tlabel={ __( 'Horizontal' ) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\ticon={ arrowDown }\n\t\t\t\tvalue=\"vertical\"\n\t\t\t\tlabel={ __( 'Vertical' ) }\n\t\t\t/>\n\t\t</ToggleGroupControl>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,mBAAmB,EACnBC,cAAc,EACdC,UAAU,EACVC,SAAS,QACH,kBAAkB;AACzB,SACCC,MAAM,EACNC,aAAa,EACbC,IAAI,EACJC,QAAQ,EACRC,gCAAgC,IAAIC,kBAAkB,EACtDC,0CAA0C,IAAIC,4BAA4B,QACpE,uBAAuB;;AAE9B;AACA;AACA;AACA,SAASC,eAAe,EAAEC,cAAc,QAAQ,SAAS;AACzD,SAASC,cAAc,QAAQ,cAAc;AAC7C,SACCC,aAAa,EACbC,qBAAqB,EACrBC,6BAA6B,QACvB,eAAe;AACtB,SAASC,uBAAuB,QAAQ,gBAAgB;AACxD,SAASC,kBAAkB,QAAQ,eAAe;;AAElD;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AACA,MAAMC,iBAAiB,GAAG;EACzBC,IAAI,EAAE,YAAY;EAClBC,KAAK,EAAE,UAAU;EACjBC,MAAM,EAAE,QAAQ;EAChB,eAAe,EAAE;AAClB,CAAC;;AAED;AACA,MAAMC,aAAa,GAAG;EACrBH,IAAI,EAAE,YAAY;EAClBC,KAAK,EAAE,UAAU;EACjBC,MAAM,EAAE,QAAQ;EAChBE,OAAO,EAAE;AACV,CAA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AAA,CAACV,4BAA4B;MAC5B2E,IAAI,EAAGpF,UAAY;MACnB+E,KAAK,EAAC,YAAY;MAClB5C,KAAK,EAAGzC,EAAE,CAAE,YAAa;IAAG,CAC5B,CAAC,eACFyB,IAAA,CAACV,4BAA4B;MAC5B2E,IAAI,EAAGnF,SAAW;MAClB8E,KAAK,EAAC,UAAU;MAChB5C,KAAK,EAAGzC,EAAE,CAAE,UAAW;IAAG,CAC1B,CAAC;EAAA,CACiB,CAAC;AAEvB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["__","justifyLeft","justifyCenter","justifyRight","justifySpaceBetween","justifyStretch","arrowRight","arrowDown","ToggleControl","Flex","FlexItem","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","appendSelectors","getBlockGapCSS","getGapCSSValue","BlockControls","JustifyContentControl","BlockVerticalAlignmentControl","shouldSkipSerialization","LAYOUT_DEFINITIONS","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","justifyContentMap","left","right","center","alignItemsMap","stretch","verticalAlignmentMap","top","bottom","flexWrapOptions","name","label","inspectorControls","FlexLayoutInspectorControls","layout","onChange","layoutBlockSupport","allowOrientation","children","FlexLayoutJustifyContentControl","OrientationControl","FlexWrapControl","toolBarControls","FlexLayoutToolbarControls","allowSwitching","allowVerticalAlignment","group","__experimentalShareWithChildBlocks","isToolbar","FlexLayoutVerticalAlignmentControl","getLayoutStyle","selector","style","blockName","hasBlockGapSupport","layoutDefinitions","orientation","blockGapValue","spacing","blockGap","undefined","justifyContent","flexWrap","includes","verticalAlignment","alignItems","output","rules","push","length","join","getOrientation","getAlignments","defaultVerticalAlignment","onVerticalAlignmentChange","value","controls","POPOVER_PROPS","placement","onJustificationChange","allowedControls","popoverProps","justificationOptions","icon","__next40pxDefaultSize","__nextHasNoMarginBottom","className","map","checked","newVerticalAlignment","newJustification"],"sources":["@wordpress/block-editor/src/layouts/flex.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tjustifyLeft,\n\tjustifyCenter,\n\tjustifyRight,\n\tjustifySpaceBetween,\n\tjustifyStretch,\n\tarrowRight,\n\tarrowDown,\n} from '@wordpress/icons';\nimport {\n\tToggleControl,\n\tFlex,\n\tFlexItem,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { appendSelectors, getBlockGapCSS } from './utils';\nimport { getGapCSSValue } from '../hooks/gap';\nimport {\n\tBlockControls,\n\tJustifyContentControl,\n\tBlockVerticalAlignmentControl,\n} from '../components';\nimport { shouldSkipSerialization } from '../hooks/utils';\nimport { LAYOUT_DEFINITIONS } from './definitions';\n\n// Used with the default, horizontal flex orientation.\nconst justifyContentMap = {\n\tleft: 'flex-start',\n\tright: 'flex-end',\n\tcenter: 'center',\n\t'space-between': 'space-between',\n};\n\n// Used with the vertical (column) flex orientation.\nconst alignItemsMap = {\n\tleft: 'flex-start',\n\tright: 'flex-end',\n\tcenter: 'center',\n\tstretch: 'stretch',\n};\n\nconst verticalAlignmentMap = {\n\ttop: 'flex-start',\n\tcenter: 'center',\n\tbottom: 'flex-end',\n\tstretch: 'stretch',\n\t'space-between': 'space-between',\n};\n\nconst flexWrapOptions = [ 'wrap', 'nowrap' ];\n\nexport default {\n\tname: 'flex',\n\tlabel: __( 'Flex' ),\n\tinspectorControls: function FlexLayoutInspectorControls( {\n\t\tlayout = {},\n\t\tonChange,\n\t\tlayoutBlockSupport = {},\n\t} ) {\n\t\tconst { allowOrientation = true } = layoutBlockSupport;\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Flex>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<FlexLayoutJustifyContentControl\n\t\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t{ allowOrientation && (\n\t\t\t\t\t\t\t<OrientationControl\n\t\t\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t\t<FlexWrapControl layout={ layout } onChange={ onChange } />\n\t\t\t</>\n\t\t);\n\t},\n\ttoolBarControls: function FlexLayoutToolbarControls( {\n\t\tlayout = {},\n\t\tonChange,\n\t\tlayoutBlockSupport,\n\t} ) {\n\t\tif ( layoutBlockSupport?.allowSwitching ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst { allowVerticalAlignment = true } = layoutBlockSupport;\n\t\treturn (\n\t\t\t<BlockControls group=\"block\" __experimentalShareWithChildBlocks>\n\t\t\t\t<FlexLayoutJustifyContentControl\n\t\t\t\t\tlayout={ layout }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tisToolbar\n\t\t\t\t/>\n\t\t\t\t{ allowVerticalAlignment && (\n\t\t\t\t\t<FlexLayoutVerticalAlignmentControl\n\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockControls>\n\t\t);\n\t},\n\tgetLayoutStyle: function getLayoutStyle( {\n\t\tselector,\n\t\tlayout,\n\t\tstyle,\n\t\tblockName,\n\t\thasBlockGapSupport,\n\t\tlayoutDefinitions = LAYOUT_DEFINITIONS,\n\t} ) {\n\t\tconst { orientation = 'horizontal' } = layout;\n\n\t\t// If a block's block.json skips serialization for spacing or spacing.blockGap,\n\t\t// don't apply the user-defined value to the styles.\n\t\tconst blockGapValue =\n\t\t\tstyle?.spacing?.blockGap &&\n\t\t\t! shouldSkipSerialization( blockName, 'spacing', 'blockGap' )\n\t\t\t\t? getGapCSSValue( style?.spacing?.blockGap, '0.5em' )\n\t\t\t\t: undefined;\n\t\tconst justifyContent = justifyContentMap[ layout.justifyContent ];\n\t\tconst flexWrap = flexWrapOptions.includes( layout.flexWrap )\n\t\t\t? layout.flexWrap\n\t\t\t: 'wrap';\n\t\tconst verticalAlignment =\n\t\t\tverticalAlignmentMap[ layout.verticalAlignment ];\n\t\tconst alignItems =\n\t\t\talignItemsMap[ layout.justifyContent ] || alignItemsMap.left;\n\n\t\tlet output = '';\n\t\tconst rules = [];\n\n\t\tif ( flexWrap && flexWrap !== 'wrap' ) {\n\t\t\trules.push( `flex-wrap: ${ flexWrap }` );\n\t\t}\n\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\tif ( verticalAlignment ) {\n\t\t\t\trules.push( `align-items: ${ verticalAlignment }` );\n\t\t\t}\n\t\t\tif ( justifyContent ) {\n\t\t\t\trules.push( `justify-content: ${ justifyContent }` );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( verticalAlignment ) {\n\t\t\t\trules.push( `justify-content: ${ verticalAlignment }` );\n\t\t\t}\n\t\t\trules.push( 'flex-direction: column' );\n\t\t\trules.push( `align-items: ${ alignItems }` );\n\t\t}\n\n\t\tif ( rules.length ) {\n\t\t\toutput = `${ appendSelectors( selector ) } {\n\t\t\t\t${ rules.join( '; ' ) };\n\t\t\t}`;\n\t\t}\n\n\t\t// Output blockGap styles based on rules contained in layout definitions in theme.json.\n\t\tif ( hasBlockGapSupport && blockGapValue ) {\n\t\t\toutput += getBlockGapCSS(\n\t\t\t\tselector,\n\t\t\t\tlayoutDefinitions,\n\t\t\t\t'flex',\n\t\t\t\tblockGapValue\n\t\t\t);\n\t\t}\n\t\treturn output;\n\t},\n\tgetOrientation( layout ) {\n\t\tconst { orientation = 'horizontal' } = layout;\n\t\treturn orientation;\n\t},\n\tgetAlignments() {\n\t\treturn [];\n\t},\n};\n\nfunction FlexLayoutVerticalAlignmentControl( { layout, onChange } ) {\n\tconst { orientation = 'horizontal' } = layout;\n\n\tconst defaultVerticalAlignment =\n\t\torientation === 'horizontal'\n\t\t\t? verticalAlignmentMap.center\n\t\t\t: verticalAlignmentMap.top;\n\n\tconst { verticalAlignment = defaultVerticalAlignment } = layout;\n\n\tconst onVerticalAlignmentChange = ( value ) => {\n\t\tonChange( {\n\t\t\t...layout,\n\t\t\tverticalAlignment: value,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<BlockVerticalAlignmentControl\n\t\t\tonChange={ onVerticalAlignmentChange }\n\t\t\tvalue={ verticalAlignment }\n\t\t\tcontrols={\n\t\t\t\torientation === 'horizontal'\n\t\t\t\t\t? [ 'top', 'center', 'bottom', 'stretch' ]\n\t\t\t\t\t: [ 'top', 'center', 'bottom', 'space-between' ]\n\t\t\t}\n\t\t/>\n\t);\n}\n\nconst POPOVER_PROPS = {\n\tplacement: 'bottom-start',\n};\n\nfunction FlexLayoutJustifyContentControl( {\n\tlayout,\n\tonChange,\n\tisToolbar = false,\n} ) {\n\tconst { justifyContent = 'left', orientation = 'horizontal' } = layout;\n\tconst onJustificationChange = ( value ) => {\n\t\tonChange( {\n\t\t\t...layout,\n\t\t\tjustifyContent: value,\n\t\t} );\n\t};\n\tconst allowedControls = [ 'left', 'center', 'right' ];\n\tif ( orientation === 'horizontal' ) {\n\t\tallowedControls.push( 'space-between' );\n\t} else {\n\t\tallowedControls.push( 'stretch' );\n\t}\n\tif ( isToolbar ) {\n\t\treturn (\n\t\t\t<JustifyContentControl\n\t\t\t\tallowedControls={ allowedControls }\n\t\t\t\tvalue={ justifyContent }\n\t\t\t\tonChange={ onJustificationChange }\n\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst justificationOptions = [\n\t\t{\n\t\t\tvalue: 'left',\n\t\t\ticon: justifyLeft,\n\t\t\tlabel: __( 'Justify items left' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'center',\n\t\t\ticon: justifyCenter,\n\t\t\tlabel: __( 'Justify items center' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'right',\n\t\t\ticon: justifyRight,\n\t\t\tlabel: __( 'Justify items right' ),\n\t\t},\n\t];\n\tif ( orientation === 'horizontal' ) {\n\t\tjustificationOptions.push( {\n\t\t\tvalue: 'space-between',\n\t\t\ticon: justifySpaceBetween,\n\t\t\tlabel: __( 'Space between items' ),\n\t\t} );\n\t} else {\n\t\tjustificationOptions.push( {\n\t\t\tvalue: 'stretch',\n\t\t\ticon: justifyStretch,\n\t\t\tlabel: __( 'Stretch items' ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Justification' ) }\n\t\t\tvalue={ justifyContent }\n\t\t\tonChange={ onJustificationChange }\n\t\t\tclassName=\"block-editor-hooks__flex-layout-justification-controls\"\n\t\t>\n\t\t\t{ justificationOptions.map( ( { value, icon, label } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ToggleGroupControl>\n\t);\n}\n\nfunction FlexWrapControl( { layout, onChange } ) {\n\tconst { flexWrap = 'wrap' } = layout;\n\treturn (\n\t\t<ToggleControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Allow to wrap to multiple lines' ) }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\tonChange( {\n\t\t\t\t\t...layout,\n\t\t\t\t\tflexWrap: value ? 'wrap' : 'nowrap',\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tchecked={ flexWrap === 'wrap' }\n\t\t/>\n\t);\n}\n\nfunction OrientationControl( { layout, onChange } ) {\n\tconst {\n\t\torientation = 'horizontal',\n\t\tverticalAlignment,\n\t\tjustifyContent,\n\t} = layout;\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"block-editor-hooks__flex-layout-orientation-controls\"\n\t\t\tlabel={ __( 'Orientation' ) }\n\t\t\tvalue={ orientation }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\t// Make sure the vertical alignment and justification are compatible with the new orientation.\n\t\t\t\tlet newVerticalAlignment = verticalAlignment;\n\t\t\t\tlet newJustification = justifyContent;\n\t\t\t\tif ( value === 'horizontal' ) {\n\t\t\t\t\tif ( verticalAlignment === 'space-between' ) {\n\t\t\t\t\t\tnewVerticalAlignment = 'center';\n\t\t\t\t\t}\n\t\t\t\t\tif ( justifyContent === 'stretch' ) {\n\t\t\t\t\t\tnewJustification = 'left';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( verticalAlignment === 'stretch' ) {\n\t\t\t\t\t\tnewVerticalAlignment = 'top';\n\t\t\t\t\t}\n\t\t\t\t\tif ( justifyContent === 'space-between' ) {\n\t\t\t\t\t\tnewJustification = 'left';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn onChange( {\n\t\t\t\t\t...layout,\n\t\t\t\t\torientation: value,\n\t\t\t\t\tverticalAlignment: newVerticalAlignment,\n\t\t\t\t\tjustifyContent: newJustification,\n\t\t\t\t} );\n\t\t\t} }\n\t\t>\n\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\ticon={ arrowRight }\n\t\t\t\tvalue=\"horizontal\"\n\t\t\t\tlabel={ __( 'Horizontal' ) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\ticon={ arrowDown }\n\t\t\t\tvalue=\"vertical\"\n\t\t\t\tlabel={ __( 'Vertical' ) }\n\t\t\t/>\n\t\t</ToggleGroupControl>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,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AAA,CAACV,4BAA4B;MAC5B8E,IAAI,EAAGrF,SAAW;MAClB6E,KAAK,EAAC,UAAU;MAChB5C,KAAK,EAAGxC,EAAE,CAAE,UAAW;IAAG,CAC1B,CAAC;EAAA,CACiB,CAAC;AAEvB","ignoreList":[]}
|
|
@@ -23,6 +23,7 @@ import { usesContextKey } from './components/rich-text/format-edit';
|
|
|
23
23
|
import { ExperimentalBlockCanvas } from './components/block-canvas';
|
|
24
24
|
import { getDuotoneFilter } from './components/duotone/utils';
|
|
25
25
|
import { useFlashEditableBlocks } from './components/use-flash-editable-blocks';
|
|
26
|
+
import { useZoomOutModeExit } from './components/block-list/use-block-props/use-zoom-out-mode-exit';
|
|
26
27
|
import { selectBlockPatternsKey, reusableBlocksSelectKey, globalStylesDataKey, globalStylesLinksDataKey, sectionRootClientIdKey } from './store/private-keys';
|
|
27
28
|
import { requiresWrapperOnCopy } from './components/writing-flow/utils';
|
|
28
29
|
import { PrivateRichText } from './components/rich-text/';
|
|
@@ -63,6 +64,7 @@ lock(privateApis, {
|
|
|
63
64
|
TextAlignmentControl,
|
|
64
65
|
usesContextKey,
|
|
65
66
|
useFlashEditableBlocks,
|
|
67
|
+
useZoomOutModeExit,
|
|
66
68
|
globalStylesDataKey,
|
|
67
69
|
globalStylesLinksDataKey,
|
|
68
70
|
selectBlockPatternsKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["globalStyles","ExperimentalBlockEditorProvider","lock","getRichTextValues","ResizableBoxPopover","default","PrivateQuickInserter","extractWords","getNormalizedSearchTerms","normalizeString","PrivateListView","BlockInfo","useHasBlockToolbar","cleanEmptyObject","BlockQuickNavigation","LayoutStyle","BlockRemovalWarningModal","setBackgroundStyleDefaults","useLayoutClasses","useLayoutStyles","__unstableBlockStyleVariationOverridesWithConfig","DimensionsTool","ResolutionTool","TextAlignmentControl","usesContextKey","ExperimentalBlockCanvas","getDuotoneFilter","useFlashEditableBlocks","selectBlockPatternsKey","reusableBlocksSelectKey","globalStylesDataKey","globalStylesLinksDataKey","sectionRootClientIdKey","requiresWrapperOnCopy","PrivateRichText","PrivateBlockPopover","PrivateInserterLibrary","PrivatePublishDateTimePicker","useSpacingSizes","useBlockDisplayTitle","TabbedSidebar","privateApis"],"sources":["@wordpress/block-editor/src/private-apis.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport * as globalStyles from './components/global-styles';\nimport { ExperimentalBlockEditorProvider } from './components/provider';\nimport { lock } from './lock-unlock';\nimport { getRichTextValues } from './components/rich-text/get-rich-text-values';\nimport ResizableBoxPopover from './components/resizable-box-popover';\nimport { default as PrivateQuickInserter } from './components/inserter/quick-inserter';\nimport {\n\textractWords,\n\tgetNormalizedSearchTerms,\n\tnormalizeString,\n} from './components/inserter/search-items';\nimport { PrivateListView } from './components/list-view';\nimport BlockInfo from './components/block-info-slot-fill';\nimport { useHasBlockToolbar } from './components/block-toolbar/use-has-block-toolbar';\nimport { cleanEmptyObject } from './hooks/utils';\nimport BlockQuickNavigation from './components/block-quick-navigation';\nimport { LayoutStyle } from './components/block-list/layout';\nimport { BlockRemovalWarningModal } from './components/block-removal-warning-modal';\nimport {\n\tsetBackgroundStyleDefaults,\n\tuseLayoutClasses,\n\tuseLayoutStyles,\n\t__unstableBlockStyleVariationOverridesWithConfig,\n} from './hooks';\nimport DimensionsTool from './components/dimensions-tool';\nimport ResolutionTool from './components/resolution-tool';\nimport TextAlignmentControl from './components/text-alignment-control';\nimport { usesContextKey } from './components/rich-text/format-edit';\nimport { ExperimentalBlockCanvas } from './components/block-canvas';\nimport { getDuotoneFilter } from './components/duotone/utils';\nimport { useFlashEditableBlocks } from './components/use-flash-editable-blocks';\nimport {\n\tselectBlockPatternsKey,\n\treusableBlocksSelectKey,\n\tglobalStylesDataKey,\n\tglobalStylesLinksDataKey,\n\tsectionRootClientIdKey,\n} from './store/private-keys';\nimport { requiresWrapperOnCopy } from './components/writing-flow/utils';\nimport { PrivateRichText } from './components/rich-text/';\nimport { PrivateBlockPopover } from './components/block-popover';\nimport { PrivateInserterLibrary } from './components/inserter/library';\nimport { PrivatePublishDateTimePicker } from './components/publish-date-time-picker';\nimport useSpacingSizes from './components/spacing-sizes-control/hooks/use-spacing-sizes';\nimport useBlockDisplayTitle from './components/block-title/use-block-display-title';\nimport TabbedSidebar from './components/tabbed-sidebar';\n\n/**\n * Private @wordpress/block-editor APIs.\n */\nexport const privateApis = {};\nlock( privateApis, {\n\t...globalStyles,\n\tExperimentalBlockCanvas,\n\tExperimentalBlockEditorProvider,\n\tgetDuotoneFilter,\n\tgetRichTextValues,\n\tPrivateQuickInserter,\n\textractWords,\n\tgetNormalizedSearchTerms,\n\tnormalizeString,\n\tPrivateListView,\n\tResizableBoxPopover,\n\tBlockInfo,\n\tuseHasBlockToolbar,\n\tcleanEmptyObject,\n\tBlockQuickNavigation,\n\tLayoutStyle,\n\tBlockRemovalWarningModal,\n\tuseLayoutClasses,\n\tuseLayoutStyles,\n\tDimensionsTool,\n\tResolutionTool,\n\tTabbedSidebar,\n\tTextAlignmentControl,\n\tusesContextKey,\n\tuseFlashEditableBlocks,\n\tglobalStylesDataKey,\n\tglobalStylesLinksDataKey,\n\tselectBlockPatternsKey,\n\trequiresWrapperOnCopy,\n\tPrivateRichText,\n\tPrivateInserterLibrary,\n\treusableBlocksSelectKey,\n\tPrivateBlockPopover,\n\tPrivatePublishDateTimePicker,\n\tuseSpacingSizes,\n\tuseBlockDisplayTitle,\n\t__unstableBlockStyleVariationOverridesWithConfig,\n\tsetBackgroundStyleDefaults,\n\tsectionRootClientIdKey,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,YAAY,MAAM,4BAA4B;AAC1D,SAASC,+BAA+B,QAAQ,uBAAuB;AACvE,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,iBAAiB,QAAQ,6CAA6C;AAC/E,OAAOC,mBAAmB,MAAM,oCAAoC;AACpE,SAASC,OAAO,IAAIC,oBAAoB,QAAQ,sCAAsC;AACtF,SACCC,YAAY,EACZC,wBAAwB,EACxBC,eAAe,QACT,oCAAoC;AAC3C,SAASC,eAAe,QAAQ,wBAAwB;AACxD,OAAOC,SAAS,MAAM,mCAAmC;AACzD,SAASC,kBAAkB,QAAQ,kDAAkD;AACrF,SAASC,gBAAgB,QAAQ,eAAe;AAChD,OAAOC,oBAAoB,MAAM,qCAAqC;AACtE,SAASC,WAAW,QAAQ,gCAAgC;AAC5D,SAASC,wBAAwB,QAAQ,0CAA0C;AACnF,SACCC,0BAA0B,EAC1BC,gBAAgB,EAChBC,eAAe,EACfC,gDAAgD,QAC1C,SAAS;AAChB,OAAOC,cAAc,MAAM,8BAA8B;AACzD,OAAOC,cAAc,MAAM,8BAA8B;AACzD,OAAOC,oBAAoB,MAAM,qCAAqC;AACtE,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SACCC,sBAAsB,EACtBC,uBAAuB,EACvBC,mBAAmB,EACnBC,wBAAwB,EACxBC,sBAAsB,QAChB,sBAAsB;AAC7B,SAASC,qBAAqB,QAAQ,iCAAiC;AACvE,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,sBAAsB,QAAQ,+BAA+B;AACtE,SAASC,4BAA4B,QAAQ,uCAAuC;AACpF,OAAOC,eAAe,MAAM,4DAA4D;AACxF,OAAOC,oBAAoB,MAAM,kDAAkD;AACnF,OAAOC,aAAa,MAAM,6BAA6B;;AAEvD;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["globalStyles","ExperimentalBlockEditorProvider","lock","getRichTextValues","ResizableBoxPopover","default","PrivateQuickInserter","extractWords","getNormalizedSearchTerms","normalizeString","PrivateListView","BlockInfo","useHasBlockToolbar","cleanEmptyObject","BlockQuickNavigation","LayoutStyle","BlockRemovalWarningModal","setBackgroundStyleDefaults","useLayoutClasses","useLayoutStyles","__unstableBlockStyleVariationOverridesWithConfig","DimensionsTool","ResolutionTool","TextAlignmentControl","usesContextKey","ExperimentalBlockCanvas","getDuotoneFilter","useFlashEditableBlocks","useZoomOutModeExit","selectBlockPatternsKey","reusableBlocksSelectKey","globalStylesDataKey","globalStylesLinksDataKey","sectionRootClientIdKey","requiresWrapperOnCopy","PrivateRichText","PrivateBlockPopover","PrivateInserterLibrary","PrivatePublishDateTimePicker","useSpacingSizes","useBlockDisplayTitle","TabbedSidebar","privateApis"],"sources":["@wordpress/block-editor/src/private-apis.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport * as globalStyles from './components/global-styles';\nimport { ExperimentalBlockEditorProvider } from './components/provider';\nimport { lock } from './lock-unlock';\nimport { getRichTextValues } from './components/rich-text/get-rich-text-values';\nimport ResizableBoxPopover from './components/resizable-box-popover';\nimport { default as PrivateQuickInserter } from './components/inserter/quick-inserter';\nimport {\n\textractWords,\n\tgetNormalizedSearchTerms,\n\tnormalizeString,\n} from './components/inserter/search-items';\nimport { PrivateListView } from './components/list-view';\nimport BlockInfo from './components/block-info-slot-fill';\nimport { useHasBlockToolbar } from './components/block-toolbar/use-has-block-toolbar';\nimport { cleanEmptyObject } from './hooks/utils';\nimport BlockQuickNavigation from './components/block-quick-navigation';\nimport { LayoutStyle } from './components/block-list/layout';\nimport { BlockRemovalWarningModal } from './components/block-removal-warning-modal';\nimport {\n\tsetBackgroundStyleDefaults,\n\tuseLayoutClasses,\n\tuseLayoutStyles,\n\t__unstableBlockStyleVariationOverridesWithConfig,\n} from './hooks';\nimport DimensionsTool from './components/dimensions-tool';\nimport ResolutionTool from './components/resolution-tool';\nimport TextAlignmentControl from './components/text-alignment-control';\nimport { usesContextKey } from './components/rich-text/format-edit';\nimport { ExperimentalBlockCanvas } from './components/block-canvas';\nimport { getDuotoneFilter } from './components/duotone/utils';\nimport { useFlashEditableBlocks } from './components/use-flash-editable-blocks';\nimport { useZoomOutModeExit } from './components/block-list/use-block-props/use-zoom-out-mode-exit';\nimport {\n\tselectBlockPatternsKey,\n\treusableBlocksSelectKey,\n\tglobalStylesDataKey,\n\tglobalStylesLinksDataKey,\n\tsectionRootClientIdKey,\n} from './store/private-keys';\nimport { requiresWrapperOnCopy } from './components/writing-flow/utils';\nimport { PrivateRichText } from './components/rich-text/';\nimport { PrivateBlockPopover } from './components/block-popover';\nimport { PrivateInserterLibrary } from './components/inserter/library';\nimport { PrivatePublishDateTimePicker } from './components/publish-date-time-picker';\nimport useSpacingSizes from './components/spacing-sizes-control/hooks/use-spacing-sizes';\nimport useBlockDisplayTitle from './components/block-title/use-block-display-title';\nimport TabbedSidebar from './components/tabbed-sidebar';\n\n/**\n * Private @wordpress/block-editor APIs.\n */\nexport const privateApis = {};\nlock( privateApis, {\n\t...globalStyles,\n\tExperimentalBlockCanvas,\n\tExperimentalBlockEditorProvider,\n\tgetDuotoneFilter,\n\tgetRichTextValues,\n\tPrivateQuickInserter,\n\textractWords,\n\tgetNormalizedSearchTerms,\n\tnormalizeString,\n\tPrivateListView,\n\tResizableBoxPopover,\n\tBlockInfo,\n\tuseHasBlockToolbar,\n\tcleanEmptyObject,\n\tBlockQuickNavigation,\n\tLayoutStyle,\n\tBlockRemovalWarningModal,\n\tuseLayoutClasses,\n\tuseLayoutStyles,\n\tDimensionsTool,\n\tResolutionTool,\n\tTabbedSidebar,\n\tTextAlignmentControl,\n\tusesContextKey,\n\tuseFlashEditableBlocks,\n\tuseZoomOutModeExit,\n\tglobalStylesDataKey,\n\tglobalStylesLinksDataKey,\n\tselectBlockPatternsKey,\n\trequiresWrapperOnCopy,\n\tPrivateRichText,\n\tPrivateInserterLibrary,\n\treusableBlocksSelectKey,\n\tPrivateBlockPopover,\n\tPrivatePublishDateTimePicker,\n\tuseSpacingSizes,\n\tuseBlockDisplayTitle,\n\t__unstableBlockStyleVariationOverridesWithConfig,\n\tsetBackgroundStyleD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pF,OAAOC,eAAe,MAAM,4DAA4D;AACxF,OAAOC,oBAAoB,MAAM,kDAAkD;AACnF,OAAOC,aAAa,MAAM,6BAA6B;;AAEvD;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,CAAC,CAAC;AAC7BxC,IAAI,CAAEwC,WAAW,EAAE;EAClB,GAAG1C,YAAY;EACfyB,uBAAuB;EACvBxB,+BAA+B;EAC/ByB,gBAAgB;EAChBvB,iBAAiB;EACjBG,oBAAoB;EACpBC,YAAY;EACZC,wBAAwB;EACxBC,eAAe;EACfC,eAAe;EACfN,mBAAmB;EACnBO,SAAS;EACTC,kBAAkB;EAClBC,gBAAgB;EAChBC,oBAAoB;EACpBC,WAAW;EACXC,wBAAwB;EACxBE,gBAAgB;EAChBC,eAAe;EACfE,cAAc;EACdC,cAAc;EACdmB,aAAa;EACblB,oBAAoB;EACpBC,cAAc;EACdG,sBAAsB;EACtBC,kBAAkB;EAClBG,mBAAmB;EACnBC,wBAAwB;EACxBH,sBAAsB;EACtBK,qBAAqB;EACrBC,eAAe;EACfE,sBAAsB;EACtBP,uBAAuB;EACvBM,mBAAmB;EACnBE,4BAA4B;EAC5BC,eAAe;EACfC,oBAAoB;EACpBpB,gDAAgD;EAChDH,0BAA0B;EAC1BgB;AACD,CAAE,CAAC","ignoreList":[]}
|
|
@@ -29,6 +29,8 @@ function isObjectEmpty(object) {
|
|
|
29
29
|
* - `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`.
|
|
30
30
|
* - `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute.
|
|
31
31
|
*
|
|
32
|
+
* @param {?string} clientId Optional block client ID. If not set, it will use the current block client ID from the context.
|
|
33
|
+
*
|
|
32
34
|
* @return {?WPBlockBindingsUtils} Object containing the block bindings utils.
|
|
33
35
|
*
|
|
34
36
|
* @example
|
|
@@ -59,10 +61,11 @@ function isObjectEmpty(object) {
|
|
|
59
61
|
* removeAllBlockBindings();
|
|
60
62
|
* ```
|
|
61
63
|
*/
|
|
62
|
-
export function useBlockBindingsUtils() {
|
|
64
|
+
export function useBlockBindingsUtils(clientId) {
|
|
63
65
|
const {
|
|
64
|
-
clientId
|
|
66
|
+
clientId: contextClientId
|
|
65
67
|
} = useBlockEditContext();
|
|
68
|
+
const blockClientId = clientId || contextClientId;
|
|
66
69
|
const {
|
|
67
70
|
updateBlockAttributes
|
|
68
71
|
} = useDispatch(blockEditorStore);
|
|
@@ -105,7 +108,7 @@ export function useBlockBindingsUtils() {
|
|
|
105
108
|
bindings: currentBindings,
|
|
106
109
|
...metadata
|
|
107
110
|
} = {}
|
|
108
|
-
} = getBlockAttributes(
|
|
111
|
+
} = getBlockAttributes(blockClientId);
|
|
109
112
|
const newBindings = {
|
|
110
113
|
...currentBindings
|
|
111
114
|
};
|
|
@@ -123,7 +126,7 @@ export function useBlockBindingsUtils() {
|
|
|
123
126
|
if (isObjectEmpty(newMetadata.bindings)) {
|
|
124
127
|
delete newMetadata.bindings;
|
|
125
128
|
}
|
|
126
|
-
updateBlockAttributes(
|
|
129
|
+
updateBlockAttributes(blockClientId, {
|
|
127
130
|
metadata: isObjectEmpty(newMetadata) ? undefined : newMetadata
|
|
128
131
|
});
|
|
129
132
|
};
|
|
@@ -145,8 +148,8 @@ export function useBlockBindingsUtils() {
|
|
|
145
148
|
bindings,
|
|
146
149
|
...metadata
|
|
147
150
|
} = {}
|
|
148
|
-
} = getBlockAttributes(
|
|
149
|
-
updateBlockAttributes(
|
|
151
|
+
} = getBlockAttributes(blockClientId);
|
|
152
|
+
updateBlockAttributes(blockClientId, {
|
|
150
153
|
metadata: isObjectEmpty(metadata) ? undefined : metadata
|
|
151
154
|
});
|
|
152
155
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useDispatch","useRegistry","store","blockEditorStore","useBlockEditContext","isObjectEmpty","object","Object","keys","length","useBlockBindingsUtils","clientId","updateBlockAttributes","getBlockAttributes","select","updateBlockBindings","bindings","metadata","currentBindings","newBindings","entries","forEach","attribute","binding","newMetadata","undefined","removeAllBlockBindings"],"sources":["@wordpress/block-editor/src/utils/block-bindings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { useBlockEditContext } from '../components/block-edit';\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Contains utils to update the block `bindings` metadata.\n *\n * @typedef {Object} WPBlockBindingsUtils\n *\n * @property {Function} updateBlockBindings Updates the value of the bindings connected to block attributes.\n * @property {Function} removeAllBlockBindings Removes the bindings property of the `metadata` attribute.\n */\n\n/**\n * Retrieves the existing utils needed to update the block `bindings` metadata.\n * They can be used to create, modify, or remove connections from the existing block attributes.\n *\n * It contains the following utils:\n * - `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`.\n * - `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute.\n *\n * @return {?WPBlockBindingsUtils} Object containing the block bindings utils.\n *\n * @example\n * ```js\n * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n * const { updateBlockBindings, removeAllBlockBindings } = useBlockBindingsUtils();\n *\n * // Update url and alt attributes.\n * updateBlockBindings( {\n * url: {\n * source: 'core/post-meta',\n * args: {\n * key: 'url_custom_field',\n * },\n * },\n * alt: {\n * source: 'core/post-meta',\n * args: {\n * key: 'text_custom_field',\n * },\n * },\n * } );\n *\n * // Remove binding from url attribute.\n * updateBlockBindings( { url: undefined } );\n *\n * // Remove bindings from all attributes.\n * removeAllBlockBindings();\n * ```\n */\nexport function useBlockBindingsUtils() {\n\tconst { clientId } = useBlockEditContext();\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { getBlockAttributes } = useRegistry().select( blockEditorStore );\n\n\t/**\n\t * Updates the value of the bindings connected to block attributes.\n\t * It removes the binding when the new value is `undefined`.\n\t *\n\t * @param {Object} bindings Bindings including the attributes to update and the new object.\n\t * @param {string} bindings.source The source name to connect to.\n\t * @param {Object} [bindings.args] Object containing the arguments needed by the source.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { updateBlockBindings } = useBlockBindingsUtils();\n\t * updateBlockBindings( {\n\t * url: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'url_custom_field',\n\t * },\n\t * \t },\n\t * alt: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'text_custom_field',\n\t * },\n\t * \t }\n\t * } );\n\t * ```\n\t */\n\tconst updateBlockBindings = ( bindings ) => {\n\t\tconst { metadata: { bindings: currentBindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes(
|
|
1
|
+
{"version":3,"names":["useDispatch","useRegistry","store","blockEditorStore","useBlockEditContext","isObjectEmpty","object","Object","keys","length","useBlockBindingsUtils","clientId","contextClientId","blockClientId","updateBlockAttributes","getBlockAttributes","select","updateBlockBindings","bindings","metadata","currentBindings","newBindings","entries","forEach","attribute","binding","newMetadata","undefined","removeAllBlockBindings"],"sources":["@wordpress/block-editor/src/utils/block-bindings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { useBlockEditContext } from '../components/block-edit';\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Contains utils to update the block `bindings` metadata.\n *\n * @typedef {Object} WPBlockBindingsUtils\n *\n * @property {Function} updateBlockBindings Updates the value of the bindings connected to block attributes.\n * @property {Function} removeAllBlockBindings Removes the bindings property of the `metadata` attribute.\n */\n\n/**\n * Retrieves the existing utils needed to update the block `bindings` metadata.\n * They can be used to create, modify, or remove connections from the existing block attributes.\n *\n * It contains the following utils:\n * - `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`.\n * - `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute.\n *\n * @param {?string} clientId Optional block client ID. If not set, it will use the current block client ID from the context.\n *\n * @return {?WPBlockBindingsUtils} Object containing the block bindings utils.\n *\n * @example\n * ```js\n * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n * const { updateBlockBindings, removeAllBlockBindings } = useBlockBindingsUtils();\n *\n * // Update url and alt attributes.\n * updateBlockBindings( {\n * url: {\n * source: 'core/post-meta',\n * args: {\n * key: 'url_custom_field',\n * },\n * },\n * alt: {\n * source: 'core/post-meta',\n * args: {\n * key: 'text_custom_field',\n * },\n * },\n * } );\n *\n * // Remove binding from url attribute.\n * updateBlockBindings( { url: undefined } );\n *\n * // Remove bindings from all attributes.\n * removeAllBlockBindings();\n * ```\n */\nexport function useBlockBindingsUtils( clientId ) {\n\tconst { clientId: contextClientId } = useBlockEditContext();\n\tconst blockClientId = clientId || contextClientId;\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { getBlockAttributes } = useRegistry().select( blockEditorStore );\n\n\t/**\n\t * Updates the value of the bindings connected to block attributes.\n\t * It removes the binding when the new value is `undefined`.\n\t *\n\t * @param {Object} bindings Bindings including the attributes to update and the new object.\n\t * @param {string} bindings.source The source name to connect to.\n\t * @param {Object} [bindings.args] Object containing the arguments needed by the source.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { updateBlockBindings } = useBlockBindingsUtils();\n\t * updateBlockBindings( {\n\t * url: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'url_custom_field',\n\t * },\n\t * \t },\n\t * alt: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'text_custom_field',\n\t * },\n\t * \t }\n\t * } );\n\t * ```\n\t */\n\tconst updateBlockBindings = ( bindings ) => {\n\t\tconst { metadata: { bindings: currentBindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( blockClientId );\n\t\tconst newBindings = { ...currentBindings };\n\n\t\tObject.entries( bindings ).forEach( ( [ attribute, binding ] ) => {\n\t\t\tif ( ! binding && newBindings[ attribute ] ) {\n\t\t\t\tdelete newBindings[ attribute ];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnewBindings[ attribute ] = binding;\n\t\t} );\n\n\t\tconst newMetadata = {\n\t\t\t...metadata,\n\t\t\tbindings: newBindings,\n\t\t};\n\n\t\tif ( isObjectEmpty( newMetadata.bindings ) ) {\n\t\t\tdelete newMetadata.bindings;\n\t\t}\n\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\tmetadata: isObjectEmpty( newMetadata ) ? undefined : newMetadata,\n\t\t} );\n\t};\n\n\t/**\n\t * Removes the bindings property of the `metadata` attribute.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { removeAllBlockBindings } = useBlockBindingsUtils();\n\t * removeAllBlockBindings();\n\t * ```\n\t */\n\tconst removeAllBlockBindings = () => {\n\t\tconst { metadata: { bindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( blockClientId );\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\tmetadata: isObjectEmpty( metadata ) ? undefined : metadata,\n\t\t} );\n\t};\n\n\treturn { updateBlockBindings, removeAllBlockBindings };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,iBAAiB;;AAE1D;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AACpD,SAASC,mBAAmB,QAAQ,0BAA0B;AAE9D,SAASC,aAAaA,CAAEC,MAAM,EAAG;EAChC,OAAO,CAAEA,MAAM,IAAIC,MAAM,CAACC,IAAI,CAAEF,MAAO,CAAC,CAACG,MAAM,KAAK,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA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,EAAEG;IACX,CAAC;IAED,IAAKhB,aAAa,CAAEqB,WAAW,CAACR,QAAS,CAAC,EAAG;MAC5C,OAAOQ,WAAW,CAACR,QAAQ;IAC5B;IAEAJ,qBAAqB,CAAED,aAAa,EAAE;MACrCM,QAAQ,EAAEd,aAAa,CAAEqB,WAAY,CAAC,GAAGC,SAAS,GAAGD;IACtD,CAAE,CAAC;EACJ,CAAC;;EAED;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAME,sBAAsB,GAAGA,CAAA,KAAM;IACpC,MAAM;MAAET,QAAQ,EAAE;QAAED,QAAQ;QAAE,GAAGC;MAAS,CAAC,GAAG,CAAC;IAAE,CAAC,GACjDJ,kBAAkB,CAAEF,aAAc,CAAC;IACpCC,qBAAqB,CAAED,aAAa,EAAE;MACrCM,QAAQ,EAAEd,aAAa,CAAEc,QAAS,CAAC,GAAGQ,SAAS,GAAGR;IACnD,CAAE,CAAC;EACJ,CAAC;EAED,OAAO;IAAEF,mBAAmB;IAAEW;EAAuB,CAAC;AACvD","ignoreList":[]}
|
|
@@ -631,9 +631,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
631
631
|
color: #1e1e1e;
|
|
632
632
|
box-shadow: inset 0 0 0 1px #1e1e1e;
|
|
633
633
|
}
|
|
634
|
-
.block-editor-button-block-appender.components-button.components-button {
|
|
635
|
-
padding: 12px;
|
|
636
|
-
}
|
|
637
634
|
.is-dark-theme .block-editor-button-block-appender {
|
|
638
635
|
color: rgba(255, 255, 255, 0.65);
|
|
639
636
|
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
|
|
@@ -803,6 +800,7 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
803
800
|
|
|
804
801
|
.block-editor-iframe__body {
|
|
805
802
|
position: relative;
|
|
803
|
+
border: 0.01px solid transparent;
|
|
806
804
|
}
|
|
807
805
|
|
|
808
806
|
.block-editor-iframe__container {
|
|
@@ -823,9 +821,8 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
823
821
|
}
|
|
824
822
|
|
|
825
823
|
.block-editor-iframe__html {
|
|
826
|
-
border: 0 solid #ddd;
|
|
827
824
|
transform-origin: top center;
|
|
828
|
-
transition: all 0.
|
|
825
|
+
transition: all 0.4s cubic-bezier(0.46, 0.03, 0.52, 0.96);
|
|
829
826
|
}
|
|
830
827
|
@media (prefers-reduced-motion: reduce) {
|
|
831
828
|
.block-editor-iframe__html {
|
|
@@ -837,13 +834,12 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
837
834
|
.block-editor-iframe__html.is-zoomed-out {
|
|
838
835
|
transform: scale(var(--wp-block-editor-iframe-zoom-out-scale));
|
|
839
836
|
background-color: #ddd;
|
|
840
|
-
|
|
841
|
-
|
|
837
|
+
margin-bottom: calc(-1 * calc(calc(var(--wp-block-editor-iframe-zoom-out-content-height) * (1 - var(--wp-block-editor-iframe-zoom-out-scale))) + calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)) + 2px));
|
|
838
|
+
padding-top: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
839
|
+
padding-bottom: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
842
840
|
}
|
|
843
841
|
.block-editor-iframe__html.is-zoomed-out body {
|
|
844
|
-
min-height: calc((var(--wp-block-editor-iframe-zoom-out-inner-height) - calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size))) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
845
|
-
display: flex;
|
|
846
|
-
flex-direction: column;
|
|
842
|
+
min-height: calc((var(--wp-block-editor-iframe-zoom-out-inner-height) - calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale))) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
847
843
|
}
|
|
848
844
|
.block-editor-iframe__html.is-zoomed-out body > .is-root-container:not(.wp-block-post-content) {
|
|
849
845
|
flex: 1;
|
package/build-style/content.css
CHANGED
|
@@ -631,9 +631,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
631
631
|
color: #1e1e1e;
|
|
632
632
|
box-shadow: inset 0 0 0 1px #1e1e1e;
|
|
633
633
|
}
|
|
634
|
-
.block-editor-button-block-appender.components-button.components-button {
|
|
635
|
-
padding: 12px;
|
|
636
|
-
}
|
|
637
634
|
.is-dark-theme .block-editor-button-block-appender {
|
|
638
635
|
color: rgba(255, 255, 255, 0.65);
|
|
639
636
|
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
|
|
@@ -803,6 +800,7 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
803
800
|
|
|
804
801
|
.block-editor-iframe__body {
|
|
805
802
|
position: relative;
|
|
803
|
+
border: 0.01px solid transparent;
|
|
806
804
|
}
|
|
807
805
|
|
|
808
806
|
.block-editor-iframe__container {
|
|
@@ -823,9 +821,8 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
823
821
|
}
|
|
824
822
|
|
|
825
823
|
.block-editor-iframe__html {
|
|
826
|
-
border: 0 solid #ddd;
|
|
827
824
|
transform-origin: top center;
|
|
828
|
-
transition: all 0.
|
|
825
|
+
transition: all 0.4s cubic-bezier(0.46, 0.03, 0.52, 0.96);
|
|
829
826
|
}
|
|
830
827
|
@media (prefers-reduced-motion: reduce) {
|
|
831
828
|
.block-editor-iframe__html {
|
|
@@ -837,13 +834,12 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
837
834
|
.block-editor-iframe__html.is-zoomed-out {
|
|
838
835
|
transform: scale(var(--wp-block-editor-iframe-zoom-out-scale));
|
|
839
836
|
background-color: #ddd;
|
|
840
|
-
|
|
841
|
-
|
|
837
|
+
margin-bottom: calc(-1 * calc(calc(var(--wp-block-editor-iframe-zoom-out-content-height) * (1 - var(--wp-block-editor-iframe-zoom-out-scale))) + calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)) + 2px));
|
|
838
|
+
padding-top: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
839
|
+
padding-bottom: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
842
840
|
}
|
|
843
841
|
.block-editor-iframe__html.is-zoomed-out body {
|
|
844
|
-
min-height: calc((var(--wp-block-editor-iframe-zoom-out-inner-height) - calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size))) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
845
|
-
display: flex;
|
|
846
|
-
flex-direction: column;
|
|
842
|
+
min-height: calc((var(--wp-block-editor-iframe-zoom-out-inner-height) - calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale))) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
847
843
|
}
|
|
848
844
|
.block-editor-iframe__html.is-zoomed-out body > .is-root-container:not(.wp-block-post-content) {
|
|
849
845
|
flex: 1;
|
|
@@ -270,7 +270,7 @@ iframe[name=editor-canvas] {
|
|
|
270
270
|
height: 100%;
|
|
271
271
|
display: block;
|
|
272
272
|
background-color: transparent;
|
|
273
|
-
transition: all 0.
|
|
273
|
+
transition: all 0.4s cubic-bezier(0.46, 0.03, 0.52, 0.96);
|
|
274
274
|
}
|
|
275
275
|
@media (prefers-reduced-motion: reduce) {
|
|
276
276
|
iframe[name=editor-canvas] {
|
|
@@ -339,6 +339,8 @@ iframe[name=editor-canvas] {
|
|
|
339
339
|
|
|
340
340
|
.block-editor-block-inspector__tab-item {
|
|
341
341
|
flex: 1 1 0px;
|
|
342
|
+
display: flex;
|
|
343
|
+
justify-content: center;
|
|
342
344
|
}
|
|
343
345
|
|
|
344
346
|
/**
|
|
@@ -562,6 +564,9 @@ iframe[name=editor-canvas] {
|
|
|
562
564
|
background: none;
|
|
563
565
|
border: none;
|
|
564
566
|
}
|
|
567
|
+
.zoom-out-toolbar .zoom-out-toolbar-button {
|
|
568
|
+
height: 40px;
|
|
569
|
+
}
|
|
565
570
|
|
|
566
571
|
.block-editor-block-tools__zoom-out-mode-inserter-button {
|
|
567
572
|
visibility: hidden;
|
|
@@ -1668,10 +1673,14 @@ iframe[name=editor-canvas] {
|
|
|
1668
1673
|
}
|
|
1669
1674
|
|
|
1670
1675
|
.block-editor-global-styles__shadow-indicator {
|
|
1676
|
+
appearance: none;
|
|
1677
|
+
background: none;
|
|
1671
1678
|
color: #2f2f2f;
|
|
1672
1679
|
border: #e0e0e0 1px solid;
|
|
1673
1680
|
border-radius: 2px;
|
|
1674
1681
|
cursor: pointer;
|
|
1682
|
+
display: inline-flex;
|
|
1683
|
+
align-items: center;
|
|
1675
1684
|
padding: 0;
|
|
1676
1685
|
height: 26px;
|
|
1677
1686
|
width: 26px;
|
|
@@ -2036,17 +2045,6 @@ iframe[name=editor-canvas] {
|
|
|
2036
2045
|
margin-bottom: 16px;
|
|
2037
2046
|
}
|
|
2038
2047
|
|
|
2039
|
-
[class].block-editor-inspector-popover-header__action {
|
|
2040
|
-
height: 24px;
|
|
2041
|
-
}
|
|
2042
|
-
[class].block-editor-inspector-popover-header__action.has-icon {
|
|
2043
|
-
min-width: 24px;
|
|
2044
|
-
padding: 0;
|
|
2045
|
-
}
|
|
2046
|
-
[class].block-editor-inspector-popover-header__action:not(.has-icon) {
|
|
2047
|
-
text-decoration: underline;
|
|
2048
|
-
}
|
|
2049
|
-
|
|
2050
2048
|
.items-justified-left {
|
|
2051
2049
|
justify-content: flex-start;
|
|
2052
2050
|
}
|
|
@@ -2432,6 +2430,14 @@ iframe[name=editor-canvas] {
|
|
|
2432
2430
|
.block-editor-list-view-leaf .block-editor-list-view-block-select-button:hover {
|
|
2433
2431
|
color: var(--wp-admin-theme-color);
|
|
2434
2432
|
}
|
|
2433
|
+
.block-editor-list-view-leaf .block-editor-list-view-block-select-button svg {
|
|
2434
|
+
fill: currentColor;
|
|
2435
|
+
}
|
|
2436
|
+
@media (forced-colors: active) {
|
|
2437
|
+
.block-editor-list-view-leaf .block-editor-list-view-block-select-button svg {
|
|
2438
|
+
fill: CanvasText;
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2435
2441
|
.is-dragging-components-draggable .block-editor-list-view-leaf:not(.is-selected) .block-editor-list-view-block-select-button:hover {
|
|
2436
2442
|
color: inherit;
|
|
2437
2443
|
}
|
|
@@ -2574,6 +2580,15 @@ iframe[name=editor-canvas] {
|
|
|
2574
2580
|
text-align: right;
|
|
2575
2581
|
position: relative;
|
|
2576
2582
|
white-space: nowrap;
|
|
2583
|
+
border-radius: 2px;
|
|
2584
|
+
box-sizing: border-box;
|
|
2585
|
+
color: inherit;
|
|
2586
|
+
font-family: inherit;
|
|
2587
|
+
font-size: 13px;
|
|
2588
|
+
font-weight: 400;
|
|
2589
|
+
margin: 0;
|
|
2590
|
+
text-decoration: none;
|
|
2591
|
+
transition: box-shadow 0.1s linear;
|
|
2577
2592
|
}
|
|
2578
2593
|
.block-editor-list-view-leaf .block-editor-list-view-block-contents.is-dropping-before::before {
|
|
2579
2594
|
content: "";
|
|
@@ -3077,18 +3092,9 @@ iframe[name=editor-canvas] {
|
|
|
3077
3092
|
top: -9999em;
|
|
3078
3093
|
}
|
|
3079
3094
|
.block-editor-skip-to-selected-block:focus {
|
|
3080
|
-
height: auto;
|
|
3081
|
-
width: auto;
|
|
3082
|
-
display: block;
|
|
3083
3095
|
font-size: 14px;
|
|
3084
3096
|
font-weight: 600;
|
|
3085
|
-
padding: 15px 23px 14px;
|
|
3086
3097
|
background: #f1f1f1;
|
|
3087
|
-
color: var(--wp-admin-theme-color);
|
|
3088
|
-
line-height: normal;
|
|
3089
|
-
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
|
|
3090
|
-
text-decoration: none;
|
|
3091
|
-
outline: none;
|
|
3092
3098
|
z-index: 100000;
|
|
3093
3099
|
}
|
|
3094
3100
|
|
|
@@ -3252,11 +3258,6 @@ iframe[name=editor-canvas] {
|
|
|
3252
3258
|
min-width: 0;
|
|
3253
3259
|
align-items: flex-start;
|
|
3254
3260
|
}
|
|
3255
|
-
.block-editor-url-input__button-modal-line .components-button {
|
|
3256
|
-
flex-shrink: 0;
|
|
3257
|
-
width: 36px;
|
|
3258
|
-
height: 36px;
|
|
3259
|
-
}
|
|
3260
3261
|
|
|
3261
3262
|
.block-editor-url-popover__additional-controls {
|
|
3262
3263
|
border-top: 1px solid #1e1e1e;
|
package/build-style/style.css
CHANGED
|
@@ -270,7 +270,7 @@ iframe[name=editor-canvas] {
|
|
|
270
270
|
height: 100%;
|
|
271
271
|
display: block;
|
|
272
272
|
background-color: transparent;
|
|
273
|
-
transition: all 0.
|
|
273
|
+
transition: all 0.4s cubic-bezier(0.46, 0.03, 0.52, 0.96);
|
|
274
274
|
}
|
|
275
275
|
@media (prefers-reduced-motion: reduce) {
|
|
276
276
|
iframe[name=editor-canvas] {
|
|
@@ -339,6 +339,8 @@ iframe[name=editor-canvas] {
|
|
|
339
339
|
|
|
340
340
|
.block-editor-block-inspector__tab-item {
|
|
341
341
|
flex: 1 1 0px;
|
|
342
|
+
display: flex;
|
|
343
|
+
justify-content: center;
|
|
342
344
|
}
|
|
343
345
|
|
|
344
346
|
/**
|
|
@@ -562,6 +564,9 @@ iframe[name=editor-canvas] {
|
|
|
562
564
|
background: none;
|
|
563
565
|
border: none;
|
|
564
566
|
}
|
|
567
|
+
.zoom-out-toolbar .zoom-out-toolbar-button {
|
|
568
|
+
height: 40px;
|
|
569
|
+
}
|
|
565
570
|
|
|
566
571
|
.block-editor-block-tools__zoom-out-mode-inserter-button {
|
|
567
572
|
visibility: hidden;
|
|
@@ -1668,10 +1673,14 @@ iframe[name=editor-canvas] {
|
|
|
1668
1673
|
}
|
|
1669
1674
|
|
|
1670
1675
|
.block-editor-global-styles__shadow-indicator {
|
|
1676
|
+
appearance: none;
|
|
1677
|
+
background: none;
|
|
1671
1678
|
color: #2f2f2f;
|
|
1672
1679
|
border: #e0e0e0 1px solid;
|
|
1673
1680
|
border-radius: 2px;
|
|
1674
1681
|
cursor: pointer;
|
|
1682
|
+
display: inline-flex;
|
|
1683
|
+
align-items: center;
|
|
1675
1684
|
padding: 0;
|
|
1676
1685
|
height: 26px;
|
|
1677
1686
|
width: 26px;
|
|
@@ -2037,17 +2046,6 @@ iframe[name=editor-canvas] {
|
|
|
2037
2046
|
margin-bottom: 16px;
|
|
2038
2047
|
}
|
|
2039
2048
|
|
|
2040
|
-
[class].block-editor-inspector-popover-header__action {
|
|
2041
|
-
height: 24px;
|
|
2042
|
-
}
|
|
2043
|
-
[class].block-editor-inspector-popover-header__action.has-icon {
|
|
2044
|
-
min-width: 24px;
|
|
2045
|
-
padding: 0;
|
|
2046
|
-
}
|
|
2047
|
-
[class].block-editor-inspector-popover-header__action:not(.has-icon) {
|
|
2048
|
-
text-decoration: underline;
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
2049
|
.items-justified-left {
|
|
2052
2050
|
justify-content: flex-start;
|
|
2053
2051
|
}
|
|
@@ -2433,6 +2431,14 @@ iframe[name=editor-canvas] {
|
|
|
2433
2431
|
.block-editor-list-view-leaf .block-editor-list-view-block-select-button:hover {
|
|
2434
2432
|
color: var(--wp-admin-theme-color);
|
|
2435
2433
|
}
|
|
2434
|
+
.block-editor-list-view-leaf .block-editor-list-view-block-select-button svg {
|
|
2435
|
+
fill: currentColor;
|
|
2436
|
+
}
|
|
2437
|
+
@media (forced-colors: active) {
|
|
2438
|
+
.block-editor-list-view-leaf .block-editor-list-view-block-select-button svg {
|
|
2439
|
+
fill: CanvasText;
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2436
2442
|
.is-dragging-components-draggable .block-editor-list-view-leaf:not(.is-selected) .block-editor-list-view-block-select-button:hover {
|
|
2437
2443
|
color: inherit;
|
|
2438
2444
|
}
|
|
@@ -2575,6 +2581,15 @@ iframe[name=editor-canvas] {
|
|
|
2575
2581
|
text-align: left;
|
|
2576
2582
|
position: relative;
|
|
2577
2583
|
white-space: nowrap;
|
|
2584
|
+
border-radius: 2px;
|
|
2585
|
+
box-sizing: border-box;
|
|
2586
|
+
color: inherit;
|
|
2587
|
+
font-family: inherit;
|
|
2588
|
+
font-size: 13px;
|
|
2589
|
+
font-weight: 400;
|
|
2590
|
+
margin: 0;
|
|
2591
|
+
text-decoration: none;
|
|
2592
|
+
transition: box-shadow 0.1s linear;
|
|
2578
2593
|
}
|
|
2579
2594
|
.block-editor-list-view-leaf .block-editor-list-view-block-contents.is-dropping-before::before {
|
|
2580
2595
|
content: "";
|
|
@@ -3078,18 +3093,9 @@ iframe[name=editor-canvas] {
|
|
|
3078
3093
|
top: -9999em;
|
|
3079
3094
|
}
|
|
3080
3095
|
.block-editor-skip-to-selected-block:focus {
|
|
3081
|
-
height: auto;
|
|
3082
|
-
width: auto;
|
|
3083
|
-
display: block;
|
|
3084
3096
|
font-size: 14px;
|
|
3085
3097
|
font-weight: 600;
|
|
3086
|
-
padding: 15px 23px 14px;
|
|
3087
3098
|
background: #f1f1f1;
|
|
3088
|
-
color: var(--wp-admin-theme-color);
|
|
3089
|
-
line-height: normal;
|
|
3090
|
-
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
|
|
3091
|
-
text-decoration: none;
|
|
3092
|
-
outline: none;
|
|
3093
3099
|
z-index: 100000;
|
|
3094
3100
|
}
|
|
3095
3101
|
|
|
@@ -3253,11 +3259,6 @@ iframe[name=editor-canvas] {
|
|
|
3253
3259
|
min-width: 0;
|
|
3254
3260
|
align-items: flex-start;
|
|
3255
3261
|
}
|
|
3256
|
-
.block-editor-url-input__button-modal-line .components-button {
|
|
3257
|
-
flex-shrink: 0;
|
|
3258
|
-
width: 36px;
|
|
3259
|
-
height: 36px;
|
|
3260
|
-
}
|
|
3261
3262
|
|
|
3262
3263
|
.block-editor-url-popover__additional-controls {
|
|
3263
3264
|
border-top: 1px solid #1e1e1e;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.6",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@wordpress/blob": "^4.8.1",
|
|
42
42
|
"@wordpress/block-serialization-default-parser": "^5.8.1",
|
|
43
43
|
"@wordpress/blocks": "^13.8.4",
|
|
44
|
-
"@wordpress/commands": "^1.8.
|
|
45
|
-
"@wordpress/components": "^28.8.
|
|
44
|
+
"@wordpress/commands": "^1.8.6",
|
|
45
|
+
"@wordpress/components": "^28.8.6",
|
|
46
46
|
"@wordpress/compose": "^7.8.3",
|
|
47
47
|
"@wordpress/data": "^10.8.3",
|
|
48
48
|
"@wordpress/date": "^5.8.2",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@wordpress/keyboard-shortcuts": "^5.8.3",
|
|
59
59
|
"@wordpress/keycodes": "^4.8.2",
|
|
60
60
|
"@wordpress/notices": "^5.8.3",
|
|
61
|
-
"@wordpress/preferences": "^4.8.
|
|
61
|
+
"@wordpress/preferences": "^4.8.6",
|
|
62
62
|
"@wordpress/private-apis": "^1.8.1",
|
|
63
63
|
"@wordpress/rich-text": "^7.8.3",
|
|
64
64
|
"@wordpress/style-engine": "^2.8.1",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "b7af02f8431034ee19cdc33dd105d21705823eed"
|
|
92
92
|
}
|