@wordpress/block-editor 15.8.1-next.dc3f6d3c1.0 → 15.9.1-next.6deb34194.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +12 -0
- package/build/components/block-alignment-matrix-control/index.js +1 -8
- package/build/components/block-alignment-matrix-control/index.js.map +2 -2
- package/build/components/block-bindings/attribute-control.js +172 -0
- package/build/components/block-bindings/attribute-control.js.map +7 -0
- package/build/components/block-bindings/index.js +47 -0
- package/build/components/block-bindings/index.js.map +7 -0
- package/build/components/block-bindings/source-fields-list.js +135 -0
- package/build/components/block-bindings/source-fields-list.js.map +7 -0
- package/build/components/block-bindings/use-block-bindings-utils.js +66 -0
- package/build/components/block-bindings/use-block-bindings-utils.js.map +7 -0
- package/build/components/block-edit/edit.js +1 -3
- package/build/components/block-edit/edit.js.map +2 -2
- package/build/components/block-list/index.js +2 -1
- package/build/components/block-list/index.js.map +2 -2
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +27 -5
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +2 -2
- package/build/components/block-lock/modal.js +5 -5
- package/build/components/block-lock/modal.js.map +2 -2
- package/build/components/block-lock/use-block-lock.js +10 -13
- package/build/components/block-lock/use-block-lock.js.map +2 -2
- package/build/components/block-settings-menu-controls/index.js +1 -1
- package/build/components/block-settings-menu-controls/index.js.map +2 -2
- package/build/components/block-styles/preview-panel.js +3 -5
- package/build/components/block-styles/preview-panel.js.map +2 -2
- package/build/components/block-styles/use-styles-for-block.js +2 -2
- package/build/components/block-styles/use-styles-for-block.js.map +2 -2
- package/build/components/block-toolbar/index.js +1 -8
- package/build/components/block-toolbar/index.js.map +3 -3
- package/build/components/block-tools/index.js +56 -45
- package/build/components/block-tools/index.js.map +3 -3
- package/build/components/block-visibility/toolbar.js +1 -1
- package/build/components/block-visibility/toolbar.js.map +1 -1
- package/build/components/content-only-controls/fields-dropdown-menu.js +66 -0
- package/build/components/content-only-controls/fields-dropdown-menu.js.map +7 -0
- package/build/components/content-only-controls/index.js +202 -44
- package/build/components/content-only-controls/index.js.map +3 -3
- package/build/components/content-only-controls/link/index.js +92 -103
- package/build/components/content-only-controls/link/index.js.map +3 -3
- package/build/components/content-only-controls/media/index.js +134 -134
- package/build/components/content-only-controls/media/index.js.map +3 -3
- package/build/components/content-only-controls/rich-text/index.js +66 -74
- package/build/components/content-only-controls/rich-text/index.js.map +3 -3
- package/build/components/dimensions-tool/width-height-tool.js +4 -16
- package/build/components/dimensions-tool/width-height-tool.js.map +3 -3
- package/build/components/font-family/index.js +1 -15
- package/build/components/font-family/index.js.map +2 -2
- package/build/components/global-styles/dimensions-panel.js +35 -2
- package/build/components/global-styles/dimensions-panel.js.map +2 -2
- package/build/components/global-styles/hooks.js +1 -1
- package/build/components/global-styles/hooks.js.map +2 -2
- package/build/components/global-styles/typography-panel.js +1 -2
- package/build/components/global-styles/typography-panel.js.map +2 -2
- package/build/components/image-editor/cropper.js +3 -34
- package/build/components/image-editor/cropper.js.map +3 -3
- package/build/components/image-editor/index.js +9 -3
- package/build/components/image-editor/index.js.map +2 -2
- package/build/components/image-editor/use-transform-image.js +62 -32
- package/build/components/image-editor/use-transform-image.js.map +2 -2
- package/build/components/image-editor/zoom-dropdown.js +2 -2
- package/build/components/image-editor/zoom-dropdown.js.map +2 -2
- package/build/components/index.js +10 -3
- package/build/components/index.js.map +2 -2
- package/build/components/inserter-draggable-blocks/index.js +8 -4
- package/build/components/inserter-draggable-blocks/index.js.map +2 -2
- package/build/components/inspector-controls-tabs/content-tab.js +3 -2
- package/build/components/inspector-controls-tabs/content-tab.js.map +2 -2
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +1 -1
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +2 -2
- package/build/components/link-control/index.js +15 -7
- package/build/components/link-control/index.js.map +2 -2
- package/build/components/list-view/block-select-button.js +3 -11
- package/build/components/list-view/block-select-button.js.map +2 -2
- package/build/components/list-view/block.js +9 -7
- package/build/components/list-view/block.js.map +2 -2
- package/build/components/media-placeholder/index.js +17 -4
- package/build/components/media-placeholder/index.js.map +2 -2
- package/build/components/media-placeholder/utils.js +60 -0
- package/build/components/media-placeholder/utils.js.map +7 -0
- package/build/components/media-replace-flow/index.js +20 -3
- package/build/components/media-replace-flow/index.js.map +2 -2
- package/build/components/tool-selector/index.js +46 -0
- package/build/components/tool-selector/index.js.map +7 -0
- package/build/components/use-block-commands/index.js +1 -1
- package/build/components/use-block-commands/index.js.map +2 -2
- package/build/components/use-block-drop-zone/index.js +1 -5
- package/build/components/use-block-drop-zone/index.js.map +2 -2
- package/build/hooks/block-bindings.js +22 -260
- package/build/hooks/block-bindings.js.map +3 -3
- package/build/hooks/dimensions.js +3 -3
- package/build/hooks/dimensions.js.map +2 -2
- package/build/hooks/metadata.js +1 -1
- package/build/hooks/metadata.js.map +2 -2
- package/build/hooks/utils.js +5 -1
- package/build/hooks/utils.js.map +2 -2
- package/build/layouts/grid.js +23 -28
- package/build/layouts/grid.js.map +2 -2
- package/build/store/private-selectors.js +43 -3
- package/build/store/private-selectors.js.map +2 -2
- package/build/store/reducer.js +2 -1
- package/build/store/reducer.js.map +2 -2
- package/build/store/selectors.js +6 -4
- package/build/store/selectors.js.map +2 -2
- package/build/utils/block-bindings.js +2 -44
- package/build/utils/block-bindings.js.map +3 -3
- package/build/utils/index.js +2 -5
- package/build/utils/index.js.map +2 -2
- package/build-module/components/block-alignment-matrix-control/index.js +1 -8
- package/build-module/components/block-alignment-matrix-control/index.js.map +2 -2
- package/build-module/components/block-bindings/attribute-control.js +150 -0
- package/build-module/components/block-bindings/attribute-control.js.map +7 -0
- package/build-module/components/block-bindings/index.js +10 -0
- package/build-module/components/block-bindings/index.js.map +7 -0
- package/build-module/components/block-bindings/source-fields-list.js +104 -0
- package/build-module/components/block-bindings/source-fields-list.js.map +7 -0
- package/build-module/components/block-bindings/use-block-bindings-utils.js +45 -0
- package/build-module/components/block-bindings/use-block-bindings-utils.js.map +7 -0
- package/build-module/components/block-edit/edit.js +1 -3
- package/build-module/components/block-edit/edit.js.map +2 -2
- package/build-module/components/block-list/index.js +2 -1
- package/build-module/components/block-list/index.js.map +2 -2
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +27 -5
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +2 -2
- package/build-module/components/block-lock/modal.js +5 -5
- package/build-module/components/block-lock/modal.js.map +2 -2
- package/build-module/components/block-lock/use-block-lock.js +10 -13
- package/build-module/components/block-lock/use-block-lock.js.map +2 -2
- package/build-module/components/block-settings-menu-controls/index.js +1 -1
- package/build-module/components/block-settings-menu-controls/index.js.map +2 -2
- package/build-module/components/block-styles/preview-panel.js +3 -5
- package/build-module/components/block-styles/preview-panel.js.map +2 -2
- package/build-module/components/block-styles/use-styles-for-block.js +2 -2
- package/build-module/components/block-styles/use-styles-for-block.js.map +2 -2
- package/build-module/components/block-toolbar/index.js +1 -8
- package/build-module/components/block-toolbar/index.js.map +2 -2
- package/build-module/components/block-tools/index.js +56 -45
- package/build-module/components/block-tools/index.js.map +2 -2
- package/build-module/components/block-visibility/toolbar.js +1 -1
- package/build-module/components/block-visibility/toolbar.js.map +1 -1
- package/build-module/components/content-only-controls/fields-dropdown-menu.js +45 -0
- package/build-module/components/content-only-controls/fields-dropdown-menu.js.map +7 -0
- package/build-module/components/content-only-controls/index.js +206 -46
- package/build-module/components/content-only-controls/index.js.map +2 -2
- package/build-module/components/content-only-controls/link/index.js +92 -104
- package/build-module/components/content-only-controls/link/index.js.map +2 -2
- package/build-module/components/content-only-controls/media/index.js +134 -135
- package/build-module/components/content-only-controls/media/index.js.map +2 -2
- package/build-module/components/content-only-controls/rich-text/index.js +68 -81
- package/build-module/components/content-only-controls/rich-text/index.js.map +2 -2
- package/build-module/components/dimensions-tool/width-height-tool.js +4 -6
- package/build-module/components/dimensions-tool/width-height-tool.js.map +2 -2
- package/build-module/components/font-family/index.js +1 -15
- package/build-module/components/font-family/index.js.map +2 -2
- package/build-module/components/global-styles/dimensions-panel.js +35 -2
- package/build-module/components/global-styles/dimensions-panel.js.map +2 -2
- package/build-module/components/global-styles/hooks.js +1 -1
- package/build-module/components/global-styles/hooks.js.map +2 -2
- package/build-module/components/global-styles/typography-panel.js +1 -2
- package/build-module/components/global-styles/typography-panel.js.map +2 -2
- package/build-module/components/image-editor/cropper.js +3 -34
- package/build-module/components/image-editor/cropper.js.map +2 -2
- package/build-module/components/image-editor/index.js +9 -3
- package/build-module/components/image-editor/index.js.map +2 -2
- package/build-module/components/image-editor/use-transform-image.js +63 -33
- package/build-module/components/image-editor/use-transform-image.js.map +2 -2
- package/build-module/components/image-editor/zoom-dropdown.js +2 -2
- package/build-module/components/image-editor/zoom-dropdown.js.map +2 -2
- package/build-module/components/index.js +74 -66
- package/build-module/components/index.js.map +2 -2
- package/build-module/components/inserter-draggable-blocks/index.js +8 -4
- package/build-module/components/inserter-draggable-blocks/index.js.map +2 -2
- package/build-module/components/inspector-controls-tabs/content-tab.js +3 -2
- package/build-module/components/inspector-controls-tabs/content-tab.js.map +2 -2
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +1 -1
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +2 -2
- package/build-module/components/link-control/index.js +16 -8
- package/build-module/components/link-control/index.js.map +2 -2
- package/build-module/components/list-view/block-select-button.js +3 -11
- package/build-module/components/list-view/block-select-button.js.map +2 -2
- package/build-module/components/list-view/block.js +9 -7
- package/build-module/components/list-view/block.js.map +2 -2
- package/build-module/components/media-placeholder/index.js +18 -5
- package/build-module/components/media-placeholder/index.js.map +2 -2
- package/build-module/components/media-placeholder/utils.js +35 -0
- package/build-module/components/media-placeholder/utils.js.map +7 -0
- package/build-module/components/media-replace-flow/index.js +20 -3
- package/build-module/components/media-replace-flow/index.js.map +2 -2
- package/build-module/components/tool-selector/index.js +15 -0
- package/build-module/components/tool-selector/index.js.map +7 -0
- package/build-module/components/use-block-commands/index.js +1 -1
- package/build-module/components/use-block-commands/index.js.map +2 -2
- package/build-module/components/use-block-drop-zone/index.js +1 -5
- package/build-module/components/use-block-drop-zone/index.js.map +2 -2
- package/build-module/hooks/block-bindings.js +27 -270
- package/build-module/hooks/block-bindings.js.map +2 -2
- package/build-module/hooks/dimensions.js +3 -3
- package/build-module/hooks/dimensions.js.map +2 -2
- package/build-module/hooks/metadata.js +1 -1
- package/build-module/hooks/metadata.js.map +2 -2
- package/build-module/hooks/utils.js +5 -1
- package/build-module/hooks/utils.js.map +2 -2
- package/build-module/layouts/grid.js +23 -28
- package/build-module/layouts/grid.js.map +2 -2
- package/build-module/store/private-selectors.js +39 -3
- package/build-module/store/private-selectors.js.map +2 -2
- package/build-module/store/reducer.js +2 -1
- package/build-module/store/reducer.js.map +2 -2
- package/build-module/store/selectors.js +6 -4
- package/build-module/store/selectors.js.map +2 -2
- package/build-module/utils/block-bindings.js +1 -42
- package/build-module/utils/block-bindings.js.map +2 -2
- package/build-module/utils/index.js +1 -3
- package/build-module/utils/index.js.map +2 -2
- package/build-style/content-rtl.css +3 -0
- package/build-style/content.css +3 -0
- package/build-style/style-rtl.css +20 -11
- package/build-style/style.css +20 -11
- package/package.json +39 -39
- package/src/components/block-alignment-matrix-control/index.js +1 -5
- package/src/components/block-bindings/attribute-control.js +174 -0
- package/src/components/block-bindings/index.js +6 -0
- package/src/components/block-bindings/source-fields-list.js +130 -0
- package/src/components/block-bindings/use-block-bindings-utils.js +156 -0
- package/src/components/block-edit/edit.js +1 -3
- package/src/components/block-list/content.scss +5 -0
- package/src/components/block-list/index.js +3 -1
- package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +34 -3
- package/src/components/block-lock/modal.js +6 -5
- package/src/components/block-lock/use-block-lock.js +10 -14
- package/src/components/block-patterns-list/stories/{index.story.js → index.story.jsx} +3 -1
- package/src/components/block-settings-menu-controls/index.js +1 -1
- package/src/components/block-styles/preview-panel.js +3 -5
- package/src/components/block-styles/use-styles-for-block.js +2 -2
- package/src/components/block-toolbar/index.js +1 -6
- package/src/components/block-toolbar/style.scss +6 -6
- package/src/components/block-tools/index.js +15 -2
- package/src/components/block-tools/style.scss +4 -0
- package/src/components/block-visibility/toolbar.js +1 -1
- package/src/components/content-only-controls/fields-dropdown-menu.js +53 -0
- package/src/components/content-only-controls/index.js +289 -50
- package/src/components/content-only-controls/link/index.js +62 -57
- package/src/components/content-only-controls/media/index.js +177 -156
- package/src/components/content-only-controls/rich-text/index.js +31 -44
- package/src/components/content-only-controls/styles.scss +10 -1
- package/src/components/dimensions-tool/width-height-tool.js +6 -13
- package/src/components/font-family/README.md +0 -9
- package/src/components/font-family/index.js +1 -16
- package/src/components/font-family/stories/{index.story.js → index.story.jsx} +0 -1
- package/src/components/global-styles/dimensions-panel.js +36 -0
- package/src/components/global-styles/hooks.js +1 -1
- package/src/components/global-styles/typography-panel.js +0 -1
- package/src/components/image-editor/cropper.js +3 -32
- package/src/components/image-editor/index.js +34 -29
- package/src/components/image-editor/use-transform-image.js +80 -34
- package/src/components/image-editor/zoom-dropdown.js +2 -2
- package/src/components/index.js +9 -1
- package/src/components/inserter/style.scss +1 -1
- package/src/components/inserter-draggable-blocks/index.js +19 -8
- package/src/components/inspector-controls-tabs/content-tab.js +6 -2
- package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +1 -5
- package/src/components/link-control/index.js +36 -12
- package/src/components/list-view/block-select-button.js +22 -30
- package/src/components/list-view/block.js +9 -7
- package/src/components/media-placeholder/index.js +20 -5
- package/src/components/media-placeholder/test/get-computed-accept-attribute.js +164 -0
- package/src/components/media-placeholder/utils.js +65 -0
- package/src/components/media-replace-flow/index.js +22 -3
- package/src/components/tool-selector/index.js +19 -0
- package/src/components/use-block-commands/index.js +1 -1
- package/src/components/use-block-drop-zone/index.js +1 -5
- package/src/hooks/block-bindings.js +27 -347
- package/src/hooks/dimensions.js +8 -3
- package/src/hooks/metadata.js +1 -1
- package/src/hooks/test/metadata.js +1 -1
- package/src/hooks/utils.js +4 -0
- package/src/layouts/grid.js +40 -72
- package/src/layouts/test/grid.js +14 -0
- package/src/store/private-selectors.js +123 -6
- package/src/store/reducer.js +3 -0
- package/src/store/selectors.js +6 -4
- package/src/store/test/private-selectors.js +242 -0
- package/src/store/test/reducer.js +17 -7
- package/src/style.scss +0 -1
- package/src/utils/block-bindings.js +0 -157
- package/src/utils/index.js +0 -1
- package/tsconfig.json +2 -0
- package/build/components/block-toolbar/block-name-context.js +0 -30
- package/build/components/block-toolbar/block-name-context.js.map +0 -7
- package/build/components/content-only-controls/plain-text/index.js +0 -68
- package/build/components/content-only-controls/plain-text/index.js.map +0 -7
- package/build-module/components/block-toolbar/block-name-context.js +0 -9
- package/build-module/components/block-toolbar/block-name-context.js.map +0 -7
- package/build-module/components/content-only-controls/plain-text/index.js +0 -50
- package/build-module/components/content-only-controls/plain-text/index.js.map +0 -7
- package/src/components/block-toolbar/block-name-context.js +0 -9
- package/src/components/content-only-controls/plain-text/index.js +0 -49
- package/src/components/font-family/style.scss +0 -7
- /package/src/components/alignment-control/stories/{aliginment-toolbar.story.js → aliginment-toolbar.story.jsx} +0 -0
- /package/src/components/alignment-control/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/block-alignment-matrix-control/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/{utils → components/block-bindings}/test/use-block-bindings-utils.js +0 -0
- /package/src/components/block-draggable/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/block-heading-level-dropdown/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/block-mover/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/block-title/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/border-radius-control/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/date-format-picker/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/dimensions-tool/stories/{aspect-ratio-tool.story.js → aspect-ratio-tool.story.jsx} +0 -0
- /package/src/components/dimensions-tool/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/dimensions-tool/stories/{scale-tool.story.js → scale-tool.story.jsx} +0 -0
- /package/src/components/dimensions-tool/stories/{width-height-tool.story.js → width-height-tool.story.jsx} +0 -0
- /package/src/components/height-control/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/inserter/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/line-height-control/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/plain-text/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/resolution-tool/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/tabbed-sidebar/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/text-alignment-control/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/text-decoration-control/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/text-transform-control/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/unit-control/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/url-popover/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/warning/stories/{index.story.js → index.story.jsx} +0 -0
- /package/src/components/writing-mode-control/stories/{index.story.js → index.story.jsx} +0 -0
|
@@ -18,8 +18,6 @@ import { useSettings } from '../use-settings';
|
|
|
18
18
|
export default function FontFamilyControl( {
|
|
19
19
|
/** Start opting into the larger default height that will become the default size in a future version. */
|
|
20
20
|
__next40pxDefaultSize = false,
|
|
21
|
-
/** Start opting into the new margin-free styles that will become the default in a future version. */
|
|
22
|
-
__nextHasNoMarginBottom = false,
|
|
23
21
|
value = '',
|
|
24
22
|
onChange,
|
|
25
23
|
fontFamilies,
|
|
@@ -47,17 +45,6 @@ export default function FontFamilyControl( {
|
|
|
47
45
|
} ) ),
|
|
48
46
|
];
|
|
49
47
|
|
|
50
|
-
if ( ! __nextHasNoMarginBottom ) {
|
|
51
|
-
deprecated(
|
|
52
|
-
'Bottom margin styles for wp.blockEditor.FontFamilyControl',
|
|
53
|
-
{
|
|
54
|
-
since: '6.7',
|
|
55
|
-
version: '7.0',
|
|
56
|
-
hint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version',
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
48
|
if (
|
|
62
49
|
! __next40pxDefaultSize &&
|
|
63
50
|
( props.size === undefined || props.size === 'default' )
|
|
@@ -82,9 +69,7 @@ export default function FontFamilyControl( {
|
|
|
82
69
|
value={ selectedValue }
|
|
83
70
|
onChange={ ( { selectedItem } ) => onChange( selectedItem.key ) }
|
|
84
71
|
options={ options }
|
|
85
|
-
className={ clsx( 'block-editor-font-family-control', className
|
|
86
|
-
'is-next-has-no-margin-bottom': __nextHasNoMarginBottom,
|
|
87
|
-
} ) }
|
|
72
|
+
className={ clsx( 'block-editor-font-family-control', className ) }
|
|
88
73
|
{ ...props }
|
|
89
74
|
/>
|
|
90
75
|
);
|
|
@@ -39,6 +39,7 @@ export function useHasDimensionsPanel( settings ) {
|
|
|
39
39
|
const hasMargin = useHasMargin( settings );
|
|
40
40
|
const hasGap = useHasGap( settings );
|
|
41
41
|
const hasMinHeight = useHasMinHeight( settings );
|
|
42
|
+
const hasWidth = useHasWidth( settings );
|
|
42
43
|
const hasAspectRatio = useHasAspectRatio( settings );
|
|
43
44
|
const hasChildLayout = useHasChildLayout( settings );
|
|
44
45
|
|
|
@@ -50,6 +51,7 @@ export function useHasDimensionsPanel( settings ) {
|
|
|
50
51
|
hasMargin ||
|
|
51
52
|
hasGap ||
|
|
52
53
|
hasMinHeight ||
|
|
54
|
+
hasWidth ||
|
|
53
55
|
hasAspectRatio ||
|
|
54
56
|
hasChildLayout )
|
|
55
57
|
);
|
|
@@ -79,6 +81,10 @@ function useHasMinHeight( settings ) {
|
|
|
79
81
|
return settings?.dimensions?.minHeight;
|
|
80
82
|
}
|
|
81
83
|
|
|
84
|
+
function useHasWidth( settings ) {
|
|
85
|
+
return settings?.dimensions?.width;
|
|
86
|
+
}
|
|
87
|
+
|
|
82
88
|
function useHasAspectRatio( settings ) {
|
|
83
89
|
return settings?.dimensions?.aspectRatio;
|
|
84
90
|
}
|
|
@@ -206,6 +212,7 @@ const DEFAULT_CONTROLS = {
|
|
|
206
212
|
margin: true,
|
|
207
213
|
blockGap: true,
|
|
208
214
|
minHeight: true,
|
|
215
|
+
width: true,
|
|
209
216
|
aspectRatio: true,
|
|
210
217
|
childLayout: true,
|
|
211
218
|
};
|
|
@@ -384,6 +391,17 @@ export default function DimensionsPanel( {
|
|
|
384
391
|
};
|
|
385
392
|
const hasMinHeightValue = () => !! value?.dimensions?.minHeight;
|
|
386
393
|
|
|
394
|
+
// Width
|
|
395
|
+
const showWidthControl = useHasWidth( settings );
|
|
396
|
+
const widthValue = decodeValue( inheritedValue?.dimensions?.width );
|
|
397
|
+
const setWidthValue = ( newValue ) => {
|
|
398
|
+
onChange( setImmutably( value, [ 'dimensions', 'width' ], newValue ) );
|
|
399
|
+
};
|
|
400
|
+
const resetWidthValue = () => {
|
|
401
|
+
setWidthValue( undefined );
|
|
402
|
+
};
|
|
403
|
+
const hasWidthValue = () => !! value?.dimensions?.width;
|
|
404
|
+
|
|
387
405
|
// Aspect Ratio
|
|
388
406
|
const showAspectRatioControl = useHasAspectRatio( settings );
|
|
389
407
|
const aspectRatioValue = decodeValue(
|
|
@@ -439,6 +457,7 @@ export default function DimensionsPanel( {
|
|
|
439
457
|
...previousValue?.dimensions,
|
|
440
458
|
minHeight: undefined,
|
|
441
459
|
aspectRatio: undefined,
|
|
460
|
+
width: undefined,
|
|
442
461
|
},
|
|
443
462
|
};
|
|
444
463
|
}, [] );
|
|
@@ -688,6 +707,23 @@ export default function DimensionsPanel( {
|
|
|
688
707
|
/>
|
|
689
708
|
</ToolsPanelItem>
|
|
690
709
|
) }
|
|
710
|
+
{ showWidthControl && (
|
|
711
|
+
<ToolsPanelItem
|
|
712
|
+
hasValue={ hasWidthValue }
|
|
713
|
+
label={ __( 'Width' ) }
|
|
714
|
+
onDeselect={ resetWidthValue }
|
|
715
|
+
isShownByDefault={
|
|
716
|
+
defaultControls.width ?? DEFAULT_CONTROLS.width
|
|
717
|
+
}
|
|
718
|
+
panelId={ panelId }
|
|
719
|
+
>
|
|
720
|
+
<HeightControl
|
|
721
|
+
label={ __( 'Width' ) }
|
|
722
|
+
value={ widthValue }
|
|
723
|
+
onChange={ setWidthValue }
|
|
724
|
+
/>
|
|
725
|
+
</ToolsPanelItem>
|
|
726
|
+
) }
|
|
691
727
|
{ showAspectRatioControl && (
|
|
692
728
|
<AspectRatioTool
|
|
693
729
|
hasValue={ hasAspectRatioValue }
|
|
@@ -152,7 +152,7 @@ export function useSettingsForBlockElement(
|
|
|
152
152
|
}
|
|
153
153
|
} );
|
|
154
154
|
|
|
155
|
-
[ 'aspectRatio', 'minHeight' ].forEach( ( key ) => {
|
|
155
|
+
[ 'aspectRatio', 'minHeight', 'width' ].forEach( ( key ) => {
|
|
156
156
|
if ( ! supportedStyles.includes( key ) ) {
|
|
157
157
|
updatedSettings.dimensions = {
|
|
158
158
|
...updatedSettings.dimensions,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import Cropper from 'react-easy-crop';
|
|
5
4
|
import clsx from 'clsx';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -9,12 +8,11 @@ import clsx from 'clsx';
|
|
|
9
8
|
*/
|
|
10
9
|
import { Spinner } from '@wordpress/components';
|
|
11
10
|
import { useResizeObserver } from '@wordpress/compose';
|
|
11
|
+
import { ImageCropper as ImageCropperComponent } from '@wordpress/image-cropper';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Internal dependencies
|
|
15
15
|
*/
|
|
16
|
-
import { MIN_ZOOM, MAX_ZOOM } from './constants';
|
|
17
|
-
|
|
18
16
|
import { useImageEditingContext } from './context';
|
|
19
17
|
|
|
20
18
|
export default function ImageCropper( {
|
|
@@ -25,17 +23,7 @@ export default function ImageCropper( {
|
|
|
25
23
|
naturalWidth,
|
|
26
24
|
borderProps,
|
|
27
25
|
} ) {
|
|
28
|
-
const {
|
|
29
|
-
isInProgress,
|
|
30
|
-
editedUrl,
|
|
31
|
-
position,
|
|
32
|
-
zoom,
|
|
33
|
-
aspect,
|
|
34
|
-
setPosition,
|
|
35
|
-
setCrop,
|
|
36
|
-
setZoom,
|
|
37
|
-
rotation,
|
|
38
|
-
} = useImageEditingContext();
|
|
26
|
+
const { isInProgress, editedUrl, rotation } = useImageEditingContext();
|
|
39
27
|
const [ contentResizeListener, { width: clientWidth } ] =
|
|
40
28
|
useResizeObserver();
|
|
41
29
|
|
|
@@ -60,24 +48,7 @@ export default function ImageCropper( {
|
|
|
60
48
|
height: editedHeight,
|
|
61
49
|
} }
|
|
62
50
|
>
|
|
63
|
-
<
|
|
64
|
-
image={ editedUrl || url }
|
|
65
|
-
disabled={ isInProgress }
|
|
66
|
-
minZoom={ MIN_ZOOM / 100 }
|
|
67
|
-
maxZoom={ MAX_ZOOM / 100 }
|
|
68
|
-
crop={ position }
|
|
69
|
-
zoom={ zoom / 100 }
|
|
70
|
-
aspect={ aspect }
|
|
71
|
-
onCropChange={ ( pos ) => {
|
|
72
|
-
setPosition( pos );
|
|
73
|
-
} }
|
|
74
|
-
onCropComplete={ ( newCropPercent ) => {
|
|
75
|
-
setCrop( newCropPercent );
|
|
76
|
-
} }
|
|
77
|
-
onZoomChange={ ( newZoom ) => {
|
|
78
|
-
setZoom( newZoom * 100 );
|
|
79
|
-
} }
|
|
80
|
-
/>
|
|
51
|
+
<ImageCropperComponent src={ editedUrl || url } />
|
|
81
52
|
{ isInProgress && <Spinner /> }
|
|
82
53
|
</div>
|
|
83
54
|
);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { ToolbarGroup, ToolbarItem } from '@wordpress/components';
|
|
5
|
+
import { ImageCropperProvider } from '@wordpress/image-cropper';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Internal dependencies
|
|
@@ -26,36 +27,40 @@ export default function ImageEditor( {
|
|
|
26
27
|
borderProps,
|
|
27
28
|
} ) {
|
|
28
29
|
return (
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
naturalWidth={ naturalWidth }
|
|
33
|
-
naturalHeight={ naturalHeight }
|
|
34
|
-
onSaveImage={ onSaveImage }
|
|
35
|
-
onFinishEditing={ onFinishEditing }
|
|
36
|
-
>
|
|
37
|
-
<Cropper
|
|
38
|
-
borderProps={ borderProps }
|
|
30
|
+
<ImageCropperProvider>
|
|
31
|
+
<ImageEditingProvider
|
|
32
|
+
id={ id }
|
|
39
33
|
url={ url }
|
|
40
|
-
width={ width }
|
|
41
|
-
height={ height }
|
|
42
|
-
naturalHeight={ naturalHeight }
|
|
43
34
|
naturalWidth={ naturalWidth }
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
35
|
+
naturalHeight={ naturalHeight }
|
|
36
|
+
onSaveImage={ onSaveImage }
|
|
37
|
+
onFinishEditing={ onFinishEditing }
|
|
38
|
+
>
|
|
39
|
+
<Cropper
|
|
40
|
+
borderProps={ borderProps }
|
|
41
|
+
url={ url }
|
|
42
|
+
width={ width }
|
|
43
|
+
height={ height }
|
|
44
|
+
naturalHeight={ naturalHeight }
|
|
45
|
+
naturalWidth={ naturalWidth }
|
|
46
|
+
/>
|
|
47
|
+
<BlockControls>
|
|
48
|
+
<ToolbarGroup>
|
|
49
|
+
<ZoomDropdown />
|
|
50
|
+
<ToolbarItem>
|
|
51
|
+
{ ( toggleProps ) => (
|
|
52
|
+
<AspectRatioDropdown
|
|
53
|
+
toggleProps={ toggleProps }
|
|
54
|
+
/>
|
|
55
|
+
) }
|
|
56
|
+
</ToolbarItem>
|
|
57
|
+
<RotationButton />
|
|
58
|
+
</ToolbarGroup>
|
|
59
|
+
<ToolbarGroup>
|
|
60
|
+
<FormControls />
|
|
61
|
+
</ToolbarGroup>
|
|
62
|
+
</BlockControls>
|
|
63
|
+
</ImageEditingProvider>
|
|
64
|
+
</ImageCropperProvider>
|
|
60
65
|
);
|
|
61
66
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { useCallback, useMemo, useState } from '@wordpress/element';
|
|
4
|
+
import { useCallback, useEffect, useMemo, useState } from '@wordpress/element';
|
|
5
5
|
import { applyFilters } from '@wordpress/hooks';
|
|
6
|
+
import { useImageCropper } from '@wordpress/image-cropper';
|
|
6
7
|
|
|
7
8
|
export default function useTransformImage( {
|
|
8
9
|
url,
|
|
@@ -10,30 +11,63 @@ export default function useTransformImage( {
|
|
|
10
11
|
naturalHeight,
|
|
11
12
|
} ) {
|
|
12
13
|
const [ editedUrl, setEditedUrl ] = useState();
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
const { cropperState, setCropperState } = useImageCropper();
|
|
15
|
+
const { zoom, aspectRatio, crop, croppedArea } = cropperState;
|
|
16
|
+
|
|
17
|
+
const setZoom = useCallback(
|
|
18
|
+
( newZoom ) => {
|
|
19
|
+
setCropperState( { zoom: newZoom } );
|
|
20
|
+
},
|
|
21
|
+
[ setCropperState ]
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
const setAspectRatio = useCallback(
|
|
25
|
+
( newAspect ) => {
|
|
26
|
+
setCropperState( { aspectRatio: newAspect } );
|
|
27
|
+
},
|
|
28
|
+
[ setCropperState ]
|
|
29
|
+
);
|
|
19
30
|
|
|
31
|
+
const defaultAspect = naturalWidth / naturalHeight;
|
|
32
|
+
const rotatedAspect = naturalHeight / naturalWidth;
|
|
33
|
+
|
|
34
|
+
// Initialize aspect ratio on mount or when defaultAspect changes
|
|
35
|
+
useEffect( () => {
|
|
36
|
+
setAspectRatio( defaultAspect );
|
|
37
|
+
}, [] ); // eslint-disable-line react-hooks/exhaustive-deps
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* rotateClockwise rotates the image by 90° clockwise by drawing the original image onto a canvas with rotation applied,
|
|
41
|
+
* then saves it as a new blob URL (editedUrl).
|
|
42
|
+
* This creates a new rotated image file, bypassing the image-cropper’s CSS transform rotation.
|
|
43
|
+
* It's a bespoke solution to ensure that the rotated image fills the content width.
|
|
44
|
+
*/
|
|
45
|
+
const [ internalRotation, setInternalRotation ] = useState( 0 );
|
|
20
46
|
const rotateClockwise = useCallback( () => {
|
|
21
|
-
const angle = (
|
|
47
|
+
const angle = ( internalRotation + 90 ) % 360;
|
|
22
48
|
|
|
23
49
|
let naturalAspectRatio = defaultAspect;
|
|
50
|
+
const isDefaultAspect =
|
|
51
|
+
defaultAspect === aspectRatio || rotatedAspect === aspectRatio;
|
|
52
|
+
const shouldResetAspect = zoom !== 1 || ! isDefaultAspect;
|
|
24
53
|
|
|
25
|
-
if (
|
|
54
|
+
if ( internalRotation % 180 === 90 ) {
|
|
26
55
|
naturalAspectRatio = 1 / defaultAspect;
|
|
27
56
|
}
|
|
28
57
|
|
|
29
58
|
if ( angle === 0 ) {
|
|
30
59
|
setEditedUrl();
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
60
|
+
setInternalRotation( angle );
|
|
61
|
+
const newAspectRatio = shouldResetAspect
|
|
62
|
+
? aspectRatio
|
|
63
|
+
: defaultAspect;
|
|
64
|
+
setCropperState( {
|
|
65
|
+
aspectRatio: newAspectRatio,
|
|
66
|
+
crop: {
|
|
67
|
+
x: -( crop.y * naturalAspectRatio ),
|
|
68
|
+
y: crop.x * naturalAspectRatio,
|
|
69
|
+
},
|
|
70
|
+
} );
|
|
37
71
|
return;
|
|
38
72
|
}
|
|
39
73
|
|
|
@@ -67,12 +101,17 @@ export default function useTransformImage( {
|
|
|
67
101
|
|
|
68
102
|
canvas.toBlob( ( blob ) => {
|
|
69
103
|
setEditedUrl( URL.createObjectURL( blob ) );
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
104
|
+
setInternalRotation( angle );
|
|
105
|
+
const newAspectRatio = shouldResetAspect
|
|
106
|
+
? aspectRatio
|
|
107
|
+
: canvas.width / canvas.height;
|
|
108
|
+
setCropperState( {
|
|
109
|
+
aspectRatio: newAspectRatio,
|
|
110
|
+
crop: {
|
|
111
|
+
x: -( crop.y * naturalAspectRatio ),
|
|
112
|
+
y: crop.x * naturalAspectRatio,
|
|
113
|
+
},
|
|
114
|
+
} );
|
|
76
115
|
} );
|
|
77
116
|
}
|
|
78
117
|
|
|
@@ -88,33 +127,40 @@ export default function useTransformImage( {
|
|
|
88
127
|
if ( typeof imgCrossOrigin === 'string' ) {
|
|
89
128
|
el.crossOrigin = imgCrossOrigin;
|
|
90
129
|
}
|
|
91
|
-
}, [
|
|
130
|
+
}, [
|
|
131
|
+
internalRotation,
|
|
132
|
+
defaultAspect,
|
|
133
|
+
url,
|
|
134
|
+
setCropperState,
|
|
135
|
+
crop,
|
|
136
|
+
zoom,
|
|
137
|
+
aspectRatio,
|
|
138
|
+
rotatedAspect,
|
|
139
|
+
setInternalRotation,
|
|
140
|
+
] );
|
|
92
141
|
|
|
93
142
|
return useMemo(
|
|
94
143
|
() => ( {
|
|
95
144
|
editedUrl,
|
|
96
145
|
setEditedUrl,
|
|
97
|
-
crop,
|
|
98
|
-
setCrop,
|
|
99
|
-
position,
|
|
100
|
-
setPosition,
|
|
146
|
+
crop: croppedArea,
|
|
101
147
|
zoom,
|
|
102
148
|
setZoom,
|
|
103
|
-
rotation,
|
|
104
|
-
setRotation,
|
|
149
|
+
rotation: internalRotation,
|
|
105
150
|
rotateClockwise,
|
|
106
|
-
aspect,
|
|
107
|
-
setAspect,
|
|
151
|
+
aspect: aspectRatio,
|
|
152
|
+
setAspect: setAspectRatio,
|
|
108
153
|
defaultAspect,
|
|
109
154
|
} ),
|
|
110
155
|
[
|
|
111
156
|
editedUrl,
|
|
112
|
-
|
|
113
|
-
position,
|
|
157
|
+
croppedArea,
|
|
114
158
|
zoom,
|
|
115
|
-
|
|
159
|
+
setZoom,
|
|
160
|
+
internalRotation,
|
|
116
161
|
rotateClockwise,
|
|
117
|
-
|
|
162
|
+
aspectRatio,
|
|
163
|
+
setAspectRatio,
|
|
118
164
|
defaultAspect,
|
|
119
165
|
]
|
|
120
166
|
);
|
|
@@ -39,8 +39,8 @@ export default function ZoomDropdown() {
|
|
|
39
39
|
label={ __( 'Zoom' ) }
|
|
40
40
|
min={ MIN_ZOOM }
|
|
41
41
|
max={ MAX_ZOOM }
|
|
42
|
-
value={ Math.round( zoom ) }
|
|
43
|
-
onChange={ setZoom }
|
|
42
|
+
value={ Math.round( zoom * 100 ) }
|
|
43
|
+
onChange={ ( newZoom ) => setZoom( newZoom / 100 ) }
|
|
44
44
|
/>
|
|
45
45
|
</DropdownContentWrapper>
|
|
46
46
|
) }
|
package/src/components/index.js
CHANGED
|
@@ -11,6 +11,11 @@ export {
|
|
|
11
11
|
BlockAlignmentControl,
|
|
12
12
|
BlockAlignmentToolbar,
|
|
13
13
|
} from './block-alignment-control';
|
|
14
|
+
export {
|
|
15
|
+
BlockBindingsAttributeControl,
|
|
16
|
+
BlockBindingsSourceFieldsList,
|
|
17
|
+
useBlockBindingsUtils,
|
|
18
|
+
} from './block-bindings';
|
|
14
19
|
export { default as __experimentalBlockFullHeightAligmentControl } from './block-full-height-alignment-control';
|
|
15
20
|
export { default as __experimentalBlockAlignmentMatrixControl } from './block-alignment-matrix-control';
|
|
16
21
|
export { default as BlockBreadcrumb } from './block-breadcrumb';
|
|
@@ -107,7 +112,6 @@ export {
|
|
|
107
112
|
|
|
108
113
|
export { default as __unstableBlockSettingsMenuFirstItem } from './block-settings-menu/block-settings-menu-first-item';
|
|
109
114
|
export { default as __unstableBlockToolbarLastItem } from './block-toolbar/block-toolbar-last-item';
|
|
110
|
-
export { default as __unstableBlockNameContext } from './block-toolbar/block-name-context';
|
|
111
115
|
export { default as __unstableInserterMenuExtension } from './inserter-menu-extension';
|
|
112
116
|
export { default as __experimentalPreviewOptions } from './preview-options';
|
|
113
117
|
export { default as __experimentalUseResizeCanvas } from './use-resize-canvas';
|
|
@@ -172,3 +176,7 @@ export { useBlockEditingMode } from './block-editing-mode';
|
|
|
172
176
|
export { default as BlockEditorProvider } from './provider';
|
|
173
177
|
export { useSettings, useSetting } from './use-settings';
|
|
174
178
|
export { useBlockCommands } from './use-block-commands';
|
|
179
|
+
|
|
180
|
+
// This component is no longer used in Gutenberg,
|
|
181
|
+
// but kept for backwards compatibility.
|
|
182
|
+
export { default as ToolSelector } from './tool-selector';
|
|
@@ -383,7 +383,7 @@ $block-inserter-tabs-height: 44px;
|
|
|
383
383
|
left: 0;
|
|
384
384
|
bottom: 0;
|
|
385
385
|
width: $sidebar-width;
|
|
386
|
-
padding: $grid-unit-30 $grid-unit-
|
|
386
|
+
padding: $grid-unit-30 $grid-unit-30 $grid-unit-30;
|
|
387
387
|
overflow-x: visible;
|
|
388
388
|
overflow-y: auto;
|
|
389
389
|
|
|
@@ -21,14 +21,15 @@ const InserterDraggableBlocks = ( {
|
|
|
21
21
|
children,
|
|
22
22
|
pattern,
|
|
23
23
|
} ) => {
|
|
24
|
+
const blockName = blocks.length === 1 ? blocks[ 0 ].name : undefined;
|
|
24
25
|
const blockTypeIcon = useSelect(
|
|
25
26
|
( select ) => {
|
|
26
|
-
const { getBlockType } = select( blocksStore );
|
|
27
27
|
return (
|
|
28
|
-
|
|
28
|
+
blockName &&
|
|
29
|
+
select( blocksStore ).getBlockType( blockName )?.icon
|
|
29
30
|
);
|
|
30
31
|
},
|
|
31
|
-
[
|
|
32
|
+
[ blockName ]
|
|
32
33
|
);
|
|
33
34
|
|
|
34
35
|
const { startDragging, stopDragging } = unlock(
|
|
@@ -57,13 +58,23 @@ const InserterDraggableBlocks = ( {
|
|
|
57
58
|
transferData={ { type: 'inserter', blocks: draggableBlocks } }
|
|
58
59
|
onDragStart={ ( event ) => {
|
|
59
60
|
startDragging();
|
|
61
|
+
const addedTypes = new Set();
|
|
60
62
|
for ( const block of draggableBlocks ) {
|
|
61
63
|
const type = `wp-block:${ block.name }`;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
/*
|
|
65
|
+
* Only add each block type once to avoid DataTransferItemList::add `NotSupportedError`
|
|
66
|
+
* when patterns contain multiple blocks of the same type.
|
|
67
|
+
*/
|
|
68
|
+
if ( ! addedTypes.has( type ) ) {
|
|
69
|
+
/*
|
|
70
|
+
* This will fill in the dataTransfer.types array so that
|
|
71
|
+
* the drop zone can check if the draggable is eligible.
|
|
72
|
+
* Unfortuantely, on drag start, we don't have access to the
|
|
73
|
+
* actual data, only the data keys/types.
|
|
74
|
+
*/
|
|
75
|
+
event.dataTransfer.items.add( '', type );
|
|
76
|
+
addedTypes.add( type );
|
|
77
|
+
}
|
|
67
78
|
}
|
|
68
79
|
} }
|
|
69
80
|
onDragEnd={ () => {
|
|
@@ -15,14 +15,18 @@ const ContentTab = ( { rootClientId, contentClientIds } ) => {
|
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
const shouldShowContentOnlyControls =
|
|
19
|
+
window?.__experimentalContentOnlyPatternInsertion &&
|
|
20
|
+
window?.__experimentalContentOnlyInspectorFields;
|
|
21
|
+
|
|
18
22
|
return (
|
|
19
23
|
<>
|
|
20
|
-
{ !
|
|
24
|
+
{ ! shouldShowContentOnlyControls && (
|
|
21
25
|
<PanelBody title={ __( 'Content' ) }>
|
|
22
26
|
<BlockQuickNavigation clientIds={ contentClientIds } />
|
|
23
27
|
</PanelBody>
|
|
24
28
|
) }
|
|
25
|
-
{
|
|
29
|
+
{ shouldShowContentOnlyControls && (
|
|
26
30
|
<ContentOnlyControls rootClientId={ rootClientId } />
|
|
27
31
|
) }
|
|
28
32
|
</>
|
|
@@ -99,11 +99,7 @@ export default function useInspectorControlsTabs(
|
|
|
99
99
|
tabs.push( TAB_SETTINGS );
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
if (
|
|
103
|
-
hasBlockStyles ||
|
|
104
|
-
hasStyleFills ||
|
|
105
|
-
window?.__experimentalContentOnlyPatternInsertion
|
|
106
|
-
) {
|
|
102
|
+
if ( hasBlockStyles || hasStyleFills ) {
|
|
107
103
|
tabs.push( TAB_STYLES );
|
|
108
104
|
}
|
|
109
105
|
|