@wordpress/block-editor 12.12.2-next.f8d8eceb.0 → 12.14.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 +3 -1
- package/build/components/block-heading-level-dropdown/index.js +1 -1
- package/build/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build/components/block-list/index.js +2 -9
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list-appender/index.js +16 -3
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js +6 -4
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-styles/index.js +0 -8
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +18 -14
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-tools/back-compat.js +2 -2
- package/build/components/block-tools/back-compat.js.map +1 -1
- package/build/components/block-tools/block-contextual-toolbar.js +11 -81
- package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build/components/block-tools/empty-block-inserter.js +56 -0
- package/build/components/block-tools/empty-block-inserter.js.map +1 -0
- package/build/components/block-tools/index.js +48 -9
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/selected-block-tools.js +113 -0
- package/build/components/block-tools/selected-block-tools.js.map +1 -0
- package/build/components/block-tools/use-selected-block-tool-props.js +56 -0
- package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -0
- package/build/components/editable-text/index.js +1 -2
- package/build/components/editable-text/index.js.map +1 -1
- package/build/components/iframe/index.js +4 -3
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/{explorer.js → index.js} +7 -7
- package/build/components/inserter/block-patterns-explorer/index.js.map +1 -0
- package/build/components/inserter/block-patterns-explorer/{sidebar.js → pattern-explorer-sidebar.js} +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -0
- package/build/components/inserter/block-patterns-explorer/{patterns-list.js → pattern-list.js} +4 -4
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -0
- package/build/components/inserter/block-patterns-tab/index.js +75 -0
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -0
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +48 -0
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -0
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +108 -0
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -0
- package/build/components/inserter/{block-patterns-filter.js → block-patterns-tab/patterns-filter.js} +18 -34
- package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -0
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +55 -0
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -0
- package/build/components/inserter/block-patterns-tab/utils.js +70 -0
- package/build/components/inserter/block-patterns-tab/utils.js.map +1 -0
- package/build/components/inserter/media-tab/media-list.js +9 -5
- package/build/components/inserter/media-tab/media-list.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js +15 -12
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/menu.js +3 -4
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/link-control/index.js +6 -5
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/list-view/block-select-button.js +39 -0
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +16 -3
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/index.js +3 -2
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +69 -18
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/provider/use-block-sync.js +1 -14
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/resizable-box-popover/index.js +1 -1
- package/build/components/resizable-box-popover/index.js.map +1 -1
- package/build/components/rich-text/index.js +0 -1
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +3 -1
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/native/format-edit.js +45 -0
- package/build/components/rich-text/native/format-edit.js.map +1 -0
- package/build/components/rich-text/native/get-format-colors.native.js +41 -0
- package/build/components/rich-text/native/get-format-colors.native.js.map +1 -0
- package/build/components/rich-text/native/index.js +9 -0
- package/build/components/rich-text/native/index.js.map +1 -0
- package/build/components/rich-text/native/index.native.js +1158 -0
- package/build/components/rich-text/native/index.native.js.map +1 -0
- package/build/components/rich-text/native/toolbar-button-with-options.native.js +58 -0
- package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -0
- package/build/components/rich-text/native/use-format-types.js +111 -0
- package/build/components/rich-text/native/use-format-types.js.map +1 -0
- package/build/components/rich-text/use-paste-handler.js +2 -5
- package/build/components/rich-text/use-paste-handler.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +2 -1
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +7 -3
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/align.js +10 -10
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/align.native.js +2 -2
- package/build/hooks/align.native.js.map +1 -1
- package/build/hooks/anchor.js +7 -6
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/background.js +16 -4
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/block-hooks.js +7 -8
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-rename-ui.js +7 -5
- package/build/hooks/block-rename-ui.js.map +1 -1
- package/build/hooks/content-lock-ui.js +5 -5
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/custom-class-name.js +8 -7
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/custom-fields.js +4 -4
- package/build/hooks/custom-fields.js.map +1 -1
- package/build/hooks/duotone.js +14 -22
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/layout.js +90 -86
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/position.js +10 -9
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/style.js +10 -13
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/utils.js +30 -0
- package/build/hooks/utils.js.map +1 -1
- package/build/private-apis.js +3 -0
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +30 -37
- package/build/store/actions.js.map +1 -1
- package/build/store/reducer.js +18 -0
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +16 -13
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.js +1 -1
- package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build-module/components/block-list/index.js +3 -10
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.js +16 -3
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +7 -5
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-styles/index.js +0 -8
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +17 -13
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-tools/back-compat.js +1 -1
- package/build-module/components/block-tools/back-compat.js.map +1 -1
- package/build-module/components/block-tools/block-contextual-toolbar.js +11 -80
- package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build-module/components/block-tools/empty-block-inserter.js +48 -0
- package/build-module/components/block-tools/empty-block-inserter.js.map +1 -0
- package/build-module/components/block-tools/index.js +48 -9
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/selected-block-tools.js +105 -0
- package/build-module/components/block-tools/selected-block-tools.js.map +1 -0
- package/build-module/components/block-tools/use-selected-block-tool-props.js +50 -0
- package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -0
- package/build-module/components/editable-text/index.js +1 -2
- package/build-module/components/editable-text/index.js.map +1 -1
- package/build-module/components/iframe/index.js +4 -3
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/{explorer.js → index.js} +5 -5
- package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -0
- package/build-module/components/inserter/block-patterns-explorer/{sidebar.js → pattern-explorer-sidebar.js} +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -0
- package/build-module/components/inserter/block-patterns-explorer/{patterns-list.js → pattern-list.js} +2 -2
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -0
- package/build-module/components/inserter/block-patterns-tab/index.js +66 -0
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -0
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +42 -0
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -0
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +100 -0
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -0
- package/build-module/components/inserter/{block-patterns-filter.js → block-patterns-tab/patterns-filter.js} +7 -20
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -0
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +47 -0
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -0
- package/build-module/components/inserter/block-patterns-tab/utils.js +58 -0
- package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -0
- package/build-module/components/inserter/media-tab/media-list.js +9 -5
- package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js +15 -12
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/menu.js +4 -3
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/link-control/index.js +7 -6
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +39 -0
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +16 -3
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/index.js +3 -2
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +69 -17
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js +1 -14
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/resizable-box-popover/index.js +1 -1
- package/build-module/components/resizable-box-popover/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +0 -1
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +3 -1
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/native/format-edit.js +38 -0
- package/build-module/components/rich-text/native/format-edit.js.map +1 -0
- package/build-module/components/rich-text/native/get-format-colors.native.js +34 -0
- package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -0
- package/build-module/components/rich-text/native/index.js +2 -0
- package/build-module/components/rich-text/native/index.js.map +1 -0
- package/build-module/components/rich-text/native/index.native.js +1148 -0
- package/build-module/components/rich-text/native/index.native.js.map +1 -0
- package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +51 -0
- package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -0
- package/build-module/components/rich-text/native/use-format-types.js +104 -0
- package/build-module/components/rich-text/native/use-format-types.js.map +1 -0
- package/build-module/components/rich-text/use-paste-handler.js +2 -5
- package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +2 -1
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +7 -3
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/align.js +8 -8
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/align.native.js +2 -2
- package/build-module/hooks/align.native.js.map +1 -1
- package/build-module/hooks/anchor.js +5 -4
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/background.js +17 -5
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/block-hooks.js +5 -6
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-rename-ui.js +5 -3
- package/build-module/hooks/block-rename-ui.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +3 -3
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/custom-class-name.js +6 -5
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/custom-fields.js +4 -4
- package/build-module/hooks/custom-fields.js.map +1 -1
- package/build-module/hooks/duotone.js +15 -23
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/layout.js +90 -86
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/position.js +11 -10
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/style.js +10 -13
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/utils.js +30 -1
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/private-apis.js +4 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +29 -37
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/reducer.js +17 -0
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +15 -13
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +16 -15
- package/build-style/style.css +16 -15
- package/package.json +31 -31
- package/src/components/block-heading-level-dropdown/index.js +1 -1
- package/src/components/block-list/index.js +4 -18
- package/src/components/block-list-appender/index.js +20 -4
- package/src/components/block-quick-navigation/index.js +11 -5
- package/src/components/block-styles/index.js +0 -10
- package/src/components/block-switcher/pattern-transformations-menu.js +20 -14
- package/src/components/block-toolbar/style.scss +8 -0
- package/src/components/block-tools/back-compat.js +1 -1
- package/src/components/block-tools/block-contextual-toolbar.js +11 -134
- package/src/components/block-tools/empty-block-inserter.js +56 -0
- package/src/components/block-tools/index.js +72 -16
- package/src/components/block-tools/selected-block-tools.js +127 -0
- package/src/components/block-tools/style.scss +0 -10
- package/src/components/block-tools/use-selected-block-tool-props.js +66 -0
- package/src/components/editable-text/index.js +1 -8
- package/src/components/iframe/index.js +4 -3
- package/src/components/inserter/block-patterns-explorer/{explorer.js → index.js} +4 -4
- package/src/components/inserter/block-patterns-explorer/{patterns-list.js → pattern-list.js} +4 -1
- package/src/components/inserter/block-patterns-tab/index.js +118 -0
- package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +48 -0
- package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +175 -0
- package/src/components/inserter/{block-patterns-filter.js → block-patterns-tab/patterns-filter.js} +15 -21
- package/src/components/inserter/block-patterns-tab/use-pattern-categories.js +96 -0
- package/src/components/inserter/block-patterns-tab/utils.js +76 -0
- package/src/components/inserter/media-tab/media-list.js +7 -7
- package/src/components/inserter/media-tab/media-preview.js +27 -22
- package/src/components/inserter/menu.js +4 -5
- package/src/components/link-control/README.md +2 -2
- package/src/components/link-control/index.js +15 -6
- package/src/components/link-control/style.scss +8 -5
- package/src/components/list-view/block-select-button.js +44 -1
- package/src/components/list-view/block.js +11 -11
- package/src/components/list-view/index.js +2 -0
- package/src/components/media-replace-flow/style.scss +2 -2
- package/src/components/navigable-toolbar/index.js +71 -25
- package/src/components/plain-text/README.md +3 -3
- package/src/components/provider/use-block-sync.js +2 -21
- package/src/components/resizable-box-popover/index.js +1 -1
- package/src/components/rich-text/README.md +9 -8
- package/src/components/rich-text/index.js +0 -1
- package/src/components/rich-text/index.native.js +3 -1
- package/src/components/rich-text/native/format-edit.js +44 -0
- package/src/components/rich-text/native/get-format-colors.native.js +54 -0
- package/src/components/rich-text/native/index.js +1 -0
- package/src/components/rich-text/native/index.native.js +1363 -0
- package/src/components/rich-text/native/style.native.scss +28 -0
- package/src/components/rich-text/native/test/__snapshots__/index.native.js.snap +79 -0
- package/src/components/rich-text/native/test/index.native.js +278 -0
- package/src/components/rich-text/native/test/performance/rich-text.native.js +44 -0
- package/src/components/rich-text/native/toolbar-button-with-options.native.js +61 -0
- package/src/components/rich-text/native/use-format-types.js +146 -0
- package/src/components/rich-text/use-paste-handler.js +1 -6
- package/src/components/url-popover/image-url-input-ui.js +1 -0
- package/src/components/writing-flow/use-tab-nav.js +8 -3
- package/src/hooks/align.js +8 -8
- package/src/hooks/align.native.js +2 -2
- package/src/hooks/anchor.js +21 -23
- package/src/hooks/background.js +28 -6
- package/src/hooks/block-hooks.js +20 -16
- package/src/hooks/block-rename-ui.js +6 -4
- package/src/hooks/content-lock-ui.js +3 -3
- package/src/hooks/custom-class-name.js +7 -6
- package/src/hooks/custom-fields.js +5 -5
- package/src/hooks/duotone.js +29 -38
- package/src/hooks/layout.js +114 -105
- package/src/hooks/position.js +8 -21
- package/src/hooks/style.js +17 -31
- package/src/hooks/test/align.js +4 -4
- package/src/hooks/utils.js +33 -1
- package/src/private-apis.js +4 -1
- package/src/store/actions.js +26 -72
- package/src/store/reducer.js +19 -0
- package/src/store/selectors.js +13 -19
- package/build/components/block-tools/selected-block-popover.js +0 -221
- package/build/components/block-tools/selected-block-popover.js.map +0 -1
- package/build/components/inserter/block-patterns-explorer/explorer.js.map +0 -1
- package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +0 -1
- package/build/components/inserter/block-patterns-explorer/sidebar.js.map +0 -1
- package/build/components/inserter/block-patterns-filter.js.map +0 -1
- package/build/components/inserter/block-patterns-tab.js +0 -270
- package/build/components/inserter/block-patterns-tab.js.map +0 -1
- package/build/store/utils.js +0 -22
- package/build/store/utils.js.map +0 -1
- package/build-module/components/block-tools/selected-block-popover.js +0 -213
- package/build-module/components/block-tools/selected-block-popover.js.map +0 -1
- package/build-module/components/inserter/block-patterns-explorer/explorer.js.map +0 -1
- package/build-module/components/inserter/block-patterns-explorer/patterns-list.js.map +0 -1
- package/build-module/components/inserter/block-patterns-explorer/sidebar.js.map +0 -1
- package/build-module/components/inserter/block-patterns-filter.js.map +0 -1
- package/build-module/components/inserter/block-patterns-tab.js +0 -254
- package/build-module/components/inserter/block-patterns-tab.js.map +0 -1
- package/build-module/store/utils.js +0 -16
- package/build-module/store/utils.js.map +0 -1
- package/src/components/block-tools/selected-block-popover.js +0 -265
- package/src/components/inserter/block-patterns-tab.js +0 -448
- package/src/store/utils.js +0 -12
- /package/src/components/inserter/block-patterns-explorer/{sidebar.js → pattern-explorer-sidebar.js} +0 -0
package/src/hooks/align.js
CHANGED
|
@@ -98,8 +98,8 @@ export function addAttribute( settings ) {
|
|
|
98
98
|
...settings.attributes,
|
|
99
99
|
align: {
|
|
100
100
|
type: 'string',
|
|
101
|
-
// Allow for '' since it is used by updateAlignment function
|
|
102
|
-
// in
|
|
101
|
+
// Allow for '' since it is used by the `updateAlignment` function
|
|
102
|
+
// in toolbar controls for special cases with defined default values.
|
|
103
103
|
enum: [ ...ALL_ALIGNMENTS, '' ],
|
|
104
104
|
},
|
|
105
105
|
};
|
|
@@ -115,7 +115,7 @@ function BlockEditAlignmentToolbarControls( {
|
|
|
115
115
|
} ) {
|
|
116
116
|
// Compute the block valid alignments by taking into account,
|
|
117
117
|
// if the theme supports wide alignments or not and the layout's
|
|
118
|
-
//
|
|
118
|
+
// available alignments. We do that for conditionally rendering
|
|
119
119
|
// Slot.
|
|
120
120
|
const blockAllowedAlignments = getValidAlignments(
|
|
121
121
|
getBlockSupport( blockName, 'align' ),
|
|
@@ -160,7 +160,7 @@ function BlockEditAlignmentToolbarControls( {
|
|
|
160
160
|
*
|
|
161
161
|
* @return {Function} Wrapped component.
|
|
162
162
|
*/
|
|
163
|
-
export const
|
|
163
|
+
export const withAlignmentControls = createHigherOrderComponent(
|
|
164
164
|
( BlockEdit ) => ( props ) => {
|
|
165
165
|
const hasAlignmentSupport = hasBlockSupport(
|
|
166
166
|
props.name,
|
|
@@ -181,7 +181,7 @@ export const withToolbarControls = createHigherOrderComponent(
|
|
|
181
181
|
</>
|
|
182
182
|
);
|
|
183
183
|
},
|
|
184
|
-
'
|
|
184
|
+
'withAlignmentControls'
|
|
185
185
|
);
|
|
186
186
|
|
|
187
187
|
function BlockListBlockWithDataAlign( { block: BlockListBlock, props } ) {
|
|
@@ -257,7 +257,7 @@ export function addAssignedAlign( props, blockType, attributes ) {
|
|
|
257
257
|
|
|
258
258
|
addFilter(
|
|
259
259
|
'blocks.registerBlockType',
|
|
260
|
-
'core/align/addAttribute',
|
|
260
|
+
'core/editor/align/addAttribute',
|
|
261
261
|
addAttribute
|
|
262
262
|
);
|
|
263
263
|
addFilter(
|
|
@@ -268,10 +268,10 @@ addFilter(
|
|
|
268
268
|
addFilter(
|
|
269
269
|
'editor.BlockEdit',
|
|
270
270
|
'core/editor/align/with-toolbar-controls',
|
|
271
|
-
|
|
271
|
+
withAlignmentControls
|
|
272
272
|
);
|
|
273
273
|
addFilter(
|
|
274
274
|
'blocks.getSaveContent.extraProps',
|
|
275
|
-
'core/align/addAssignedAlign',
|
|
275
|
+
'core/editor/align/addAssignedAlign',
|
|
276
276
|
addAssignedAlign
|
|
277
277
|
);
|
|
@@ -36,8 +36,8 @@ addFilter(
|
|
|
36
36
|
...settings.attributes,
|
|
37
37
|
align: {
|
|
38
38
|
type: 'string',
|
|
39
|
-
// Allow for '' since it is used by updateAlignment function
|
|
40
|
-
// in
|
|
39
|
+
// Allow for '' since it is used by the `updateAlignment` function
|
|
40
|
+
// in toolbar controls for special cases with defined default values.
|
|
41
41
|
enum: [ ...ALIGNMENTS, '' ],
|
|
42
42
|
},
|
|
43
43
|
};
|
package/src/hooks/anchor.js
CHANGED
|
@@ -59,6 +59,7 @@ function BlockEditAnchorControl( { blockName, attributes, setAttributes } ) {
|
|
|
59
59
|
const textControl = (
|
|
60
60
|
<TextControl
|
|
61
61
|
__nextHasNoMarginBottom
|
|
62
|
+
__next40pxDefaultSize
|
|
62
63
|
className="html-anchor-control"
|
|
63
64
|
label={ __( 'HTML anchor' ) }
|
|
64
65
|
help={
|
|
@@ -123,26 +124,23 @@ function BlockEditAnchorControl( { blockName, attributes, setAttributes } ) {
|
|
|
123
124
|
*
|
|
124
125
|
* @return {Component} Wrapped component.
|
|
125
126
|
*/
|
|
126
|
-
export const
|
|
127
|
-
(
|
|
128
|
-
return (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
'withInspectorControl'
|
|
145
|
-
);
|
|
127
|
+
export const withAnchorControls = createHigherOrderComponent( ( BlockEdit ) => {
|
|
128
|
+
return ( props ) => {
|
|
129
|
+
return (
|
|
130
|
+
<>
|
|
131
|
+
<BlockEdit { ...props } />
|
|
132
|
+
{ props.isSelected &&
|
|
133
|
+
hasBlockSupport( props.name, 'anchor' ) && (
|
|
134
|
+
<BlockEditAnchorControl
|
|
135
|
+
blockName={ props.name }
|
|
136
|
+
attributes={ props.attributes }
|
|
137
|
+
setAttributes={ props.setAttributes }
|
|
138
|
+
/>
|
|
139
|
+
) }
|
|
140
|
+
</>
|
|
141
|
+
);
|
|
142
|
+
};
|
|
143
|
+
}, 'withAnchorControls' );
|
|
146
144
|
|
|
147
145
|
/**
|
|
148
146
|
* Override props assigned to save component to inject anchor ID, if block
|
|
@@ -166,11 +164,11 @@ export function addSaveProps( extraProps, blockType, attributes ) {
|
|
|
166
164
|
addFilter( 'blocks.registerBlockType', 'core/anchor/attribute', addAttribute );
|
|
167
165
|
addFilter(
|
|
168
166
|
'editor.BlockEdit',
|
|
169
|
-
'core/editor/anchor/with-inspector-
|
|
170
|
-
|
|
167
|
+
'core/editor/anchor/with-inspector-controls',
|
|
168
|
+
withAnchorControls
|
|
171
169
|
);
|
|
172
170
|
addFilter(
|
|
173
171
|
'blocks.getSaveContent.extraProps',
|
|
174
|
-
'core/anchor/save-props',
|
|
172
|
+
'core/editor/anchor/save-props',
|
|
175
173
|
addSaveProps
|
|
176
174
|
);
|
package/src/hooks/background.js
CHANGED
|
@@ -8,6 +8,7 @@ import classnames from 'classnames';
|
|
|
8
8
|
*/
|
|
9
9
|
import { isBlobURL } from '@wordpress/blob';
|
|
10
10
|
import { getBlockSupport } from '@wordpress/blocks';
|
|
11
|
+
import { focus } from '@wordpress/dom';
|
|
11
12
|
import {
|
|
12
13
|
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
13
14
|
DropZone,
|
|
@@ -19,7 +20,7 @@ import {
|
|
|
19
20
|
__experimentalTruncate as Truncate,
|
|
20
21
|
} from '@wordpress/components';
|
|
21
22
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
22
|
-
import { Platform, useCallback } from '@wordpress/element';
|
|
23
|
+
import { Platform, useCallback, useRef } from '@wordpress/element';
|
|
23
24
|
import { __, sprintf } from '@wordpress/i18n';
|
|
24
25
|
import { store as noticesStore } from '@wordpress/notices';
|
|
25
26
|
import { getFilename } from '@wordpress/url';
|
|
@@ -150,6 +151,8 @@ function BackgroundImagePanelItem( props ) {
|
|
|
150
151
|
const { id, title, url } =
|
|
151
152
|
attributes.style?.background?.backgroundImage || {};
|
|
152
153
|
|
|
154
|
+
const replaceContainerRef = useRef();
|
|
155
|
+
|
|
153
156
|
const { mediaUpload } = useSelect( ( select ) => {
|
|
154
157
|
return {
|
|
155
158
|
mediaUpload: select( blockEditorStore ).getSettings().mediaUpload,
|
|
@@ -241,17 +244,22 @@ function BackgroundImagePanelItem( props ) {
|
|
|
241
244
|
};
|
|
242
245
|
}, [] );
|
|
243
246
|
|
|
247
|
+
const hasValue = hasBackgroundImageValue( props );
|
|
248
|
+
|
|
244
249
|
return (
|
|
245
250
|
<ToolsPanelItem
|
|
246
251
|
className="single-column"
|
|
247
|
-
hasValue={ () =>
|
|
252
|
+
hasValue={ () => hasValue }
|
|
248
253
|
label={ __( 'Background image' ) }
|
|
249
254
|
onDeselect={ () => resetBackgroundImage( props ) }
|
|
250
255
|
isShownByDefault={ true }
|
|
251
256
|
resetAllFilter={ resetAllFilter }
|
|
252
257
|
panelId={ clientId }
|
|
253
258
|
>
|
|
254
|
-
<div
|
|
259
|
+
<div
|
|
260
|
+
className="block-editor-hooks__background__inspector-media-replace-container"
|
|
261
|
+
ref={ replaceContainerRef }
|
|
262
|
+
>
|
|
255
263
|
<MediaReplaceFlow
|
|
256
264
|
mediaId={ id }
|
|
257
265
|
mediaURL={ url }
|
|
@@ -267,9 +275,23 @@ function BackgroundImagePanelItem( props ) {
|
|
|
267
275
|
}
|
|
268
276
|
variant="secondary"
|
|
269
277
|
>
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
278
|
+
{ hasValue && (
|
|
279
|
+
<MenuItem
|
|
280
|
+
onClick={ () => {
|
|
281
|
+
const [ toggleButton ] = focus.tabbable.find(
|
|
282
|
+
replaceContainerRef.current
|
|
283
|
+
);
|
|
284
|
+
// Focus the toggle button and close the dropdown menu.
|
|
285
|
+
// This ensures similar behaviour as to selecting an image, where the dropdown is
|
|
286
|
+
// closed and focus is redirected to the dropdown toggle button.
|
|
287
|
+
toggleButton?.focus();
|
|
288
|
+
toggleButton?.click();
|
|
289
|
+
resetBackgroundImage( props );
|
|
290
|
+
} }
|
|
291
|
+
>
|
|
292
|
+
{ __( 'Reset ' ) }
|
|
293
|
+
</MenuItem>
|
|
294
|
+
) }
|
|
273
295
|
</MediaReplaceFlow>
|
|
274
296
|
<DropZone
|
|
275
297
|
onFilesDrop={ onFilesDrop }
|
package/src/hooks/block-hooks.js
CHANGED
|
@@ -235,23 +235,27 @@ function BlockHooksControl( props ) {
|
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
export const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
238
|
+
export const withBlockHooksControls = createHigherOrderComponent(
|
|
239
|
+
( BlockEdit ) => {
|
|
240
|
+
return ( props ) => {
|
|
241
|
+
return (
|
|
242
|
+
<>
|
|
243
|
+
<BlockEdit key="edit" { ...props } />
|
|
244
|
+
{ props.isSelected && (
|
|
245
|
+
<BlockHooksControl
|
|
246
|
+
blockName={ props.name }
|
|
247
|
+
clientId={ props.clientId }
|
|
248
|
+
/>
|
|
249
|
+
) }
|
|
250
|
+
</>
|
|
251
|
+
);
|
|
252
|
+
};
|
|
253
|
+
},
|
|
254
|
+
'withBlockHooksControls'
|
|
255
|
+
);
|
|
252
256
|
|
|
253
257
|
addFilter(
|
|
254
258
|
'editor.BlockEdit',
|
|
255
|
-
'core/block-hooks/with-inspector-
|
|
256
|
-
|
|
259
|
+
'core/editor/block-hooks/with-inspector-controls',
|
|
260
|
+
withBlockHooksControls
|
|
257
261
|
);
|
|
@@ -92,6 +92,7 @@ function RenameModal( { blockName, originalBlockName, onClose, onSave } ) {
|
|
|
92
92
|
<VStack spacing="3">
|
|
93
93
|
<TextControl
|
|
94
94
|
__nextHasNoMarginBottom
|
|
95
|
+
__next40pxDefaultSize
|
|
95
96
|
value={ editedBlockName }
|
|
96
97
|
label={ __( 'Block name' ) }
|
|
97
98
|
hideLabelFromVision={ true }
|
|
@@ -130,6 +131,7 @@ function BlockRenameControl( props ) {
|
|
|
130
131
|
<InspectorControls group="advanced">
|
|
131
132
|
<TextControl
|
|
132
133
|
__nextHasNoMarginBottom
|
|
134
|
+
__next40pxDefaultSize
|
|
133
135
|
label={ __( 'Block name' ) }
|
|
134
136
|
value={ customName || '' }
|
|
135
137
|
onChange={ onChange }
|
|
@@ -187,7 +189,7 @@ function BlockRenameControl( props ) {
|
|
|
187
189
|
);
|
|
188
190
|
}
|
|
189
191
|
|
|
190
|
-
export const
|
|
192
|
+
export const withBlockRenameControls = createHigherOrderComponent(
|
|
191
193
|
( BlockEdit ) => ( props ) => {
|
|
192
194
|
const { clientId, name, attributes, setAttributes, isSelected } = props;
|
|
193
195
|
|
|
@@ -216,11 +218,11 @@ export const withBlockRenameControl = createHigherOrderComponent(
|
|
|
216
218
|
</>
|
|
217
219
|
);
|
|
218
220
|
},
|
|
219
|
-
'
|
|
221
|
+
'withBlockRenameControls'
|
|
220
222
|
);
|
|
221
223
|
|
|
222
224
|
addFilter(
|
|
223
225
|
'editor.BlockEdit',
|
|
224
|
-
'core/block-rename-ui/with-block-rename-
|
|
225
|
-
|
|
226
|
+
'core/block-rename-ui/with-block-rename-controls',
|
|
227
|
+
withBlockRenameControls
|
|
226
228
|
);
|
|
@@ -37,7 +37,7 @@ function StopEditingAsBlocksOnOutsideSelect( {
|
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export const
|
|
40
|
+
export const withContentLockControls = createHigherOrderComponent(
|
|
41
41
|
( BlockEdit ) => ( props ) => {
|
|
42
42
|
const { getBlockListSettings, getSettings } =
|
|
43
43
|
useSelect( blockEditorStore );
|
|
@@ -155,11 +155,11 @@ export const withBlockControls = createHigherOrderComponent(
|
|
|
155
155
|
</>
|
|
156
156
|
);
|
|
157
157
|
},
|
|
158
|
-
'
|
|
158
|
+
'withContentLockControls'
|
|
159
159
|
);
|
|
160
160
|
|
|
161
161
|
addFilter(
|
|
162
162
|
'editor.BlockEdit',
|
|
163
163
|
'core/content-lock-ui/with-block-controls',
|
|
164
|
-
|
|
164
|
+
withContentLockControls
|
|
165
165
|
);
|
|
@@ -49,6 +49,7 @@ function CustomClassNameControls( { attributes, setAttributes } ) {
|
|
|
49
49
|
<InspectorControls group="advanced">
|
|
50
50
|
<TextControl
|
|
51
51
|
__nextHasNoMarginBottom
|
|
52
|
+
__next40pxDefaultSize
|
|
52
53
|
autoComplete="off"
|
|
53
54
|
label={ __( 'Additional CSS class(es)' ) }
|
|
54
55
|
value={ attributes.className || '' }
|
|
@@ -72,7 +73,7 @@ function CustomClassNameControls( { attributes, setAttributes } ) {
|
|
|
72
73
|
*
|
|
73
74
|
* @return {Component} Wrapped component.
|
|
74
75
|
*/
|
|
75
|
-
export const
|
|
76
|
+
export const withCustomClassNameControls = createHigherOrderComponent(
|
|
76
77
|
( BlockEdit ) => {
|
|
77
78
|
return ( props ) => {
|
|
78
79
|
const hasCustomClassName = hasBlockSupport(
|
|
@@ -94,7 +95,7 @@ export const withInspectorControl = createHigherOrderComponent(
|
|
|
94
95
|
);
|
|
95
96
|
};
|
|
96
97
|
},
|
|
97
|
-
'
|
|
98
|
+
'withCustomClassNameControls'
|
|
98
99
|
);
|
|
99
100
|
|
|
100
101
|
/**
|
|
@@ -163,17 +164,17 @@ export function addTransforms( result, source, index, results ) {
|
|
|
163
164
|
|
|
164
165
|
addFilter(
|
|
165
166
|
'blocks.registerBlockType',
|
|
166
|
-
'core/custom-class-name/attribute',
|
|
167
|
+
'core/editor/custom-class-name/attribute',
|
|
167
168
|
addAttribute
|
|
168
169
|
);
|
|
169
170
|
addFilter(
|
|
170
171
|
'editor.BlockEdit',
|
|
171
|
-
'core/editor/custom-class-name/with-inspector-
|
|
172
|
-
|
|
172
|
+
'core/editor/custom-class-name/with-inspector-controls',
|
|
173
|
+
withCustomClassNameControls
|
|
173
174
|
);
|
|
174
175
|
addFilter(
|
|
175
176
|
'blocks.getSaveContent.extraProps',
|
|
176
|
-
'core/custom-class-name/save-props',
|
|
177
|
+
'core/editor/custom-class-name/save-props',
|
|
177
178
|
addSaveProps
|
|
178
179
|
);
|
|
179
180
|
|
|
@@ -44,7 +44,7 @@ function addAttribute( settings ) {
|
|
|
44
44
|
*
|
|
45
45
|
* @return {Component} Wrapped component.
|
|
46
46
|
*/
|
|
47
|
-
const
|
|
47
|
+
const withCustomFieldsControls = createHigherOrderComponent( ( BlockEdit ) => {
|
|
48
48
|
return ( props ) => {
|
|
49
49
|
const blockEditingMode = useBlockEditingMode();
|
|
50
50
|
const hasCustomFieldsSupport = hasBlockSupport(
|
|
@@ -123,17 +123,17 @@ const withInspectorControl = createHigherOrderComponent( ( BlockEdit ) => {
|
|
|
123
123
|
|
|
124
124
|
return <BlockEdit { ...props } />;
|
|
125
125
|
};
|
|
126
|
-
}, '
|
|
126
|
+
}, 'withCustomFieldsControls' );
|
|
127
127
|
|
|
128
128
|
if ( window.__experimentalConnections ) {
|
|
129
129
|
addFilter(
|
|
130
130
|
'blocks.registerBlockType',
|
|
131
|
-
'core/connections/attribute',
|
|
131
|
+
'core/editor/connections/attribute',
|
|
132
132
|
addAttribute
|
|
133
133
|
);
|
|
134
134
|
addFilter(
|
|
135
135
|
'editor.BlockEdit',
|
|
136
|
-
'core/connections/with-inspector-
|
|
137
|
-
|
|
136
|
+
'core/editor/connections/with-inspector-controls',
|
|
137
|
+
withCustomFieldsControls
|
|
138
138
|
);
|
|
139
139
|
}
|
package/src/hooks/duotone.js
CHANGED
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
import { createHigherOrderComponent, useInstanceId } from '@wordpress/compose';
|
|
17
17
|
import { addFilter } from '@wordpress/hooks';
|
|
18
18
|
import { useMemo, useEffect } from '@wordpress/element';
|
|
19
|
-
import { useDispatch } from '@wordpress/data';
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
21
|
* Internal dependencies
|
|
@@ -34,12 +33,10 @@ import {
|
|
|
34
33
|
} from '../components/duotone/utils';
|
|
35
34
|
import { getBlockCSSSelector } from '../components/global-styles/get-block-css-selector';
|
|
36
35
|
import { scopeSelector } from '../components/global-styles/utils';
|
|
37
|
-
import { useBlockSettings } from './utils';
|
|
36
|
+
import { useBlockSettings, useStyleOverride } from './utils';
|
|
38
37
|
import { default as StylesFiltersPanel } from '../components/global-styles/filters-panel';
|
|
39
38
|
import { useBlockEditingMode } from '../components/block-editing-mode';
|
|
40
39
|
import { __unstableUseBlockElement as useBlockElement } from '../components/block-list/use-block-props/use-block-refs';
|
|
41
|
-
import { store as blockEditorStore } from '../store';
|
|
42
|
-
import { unlock } from '../lock-unlock';
|
|
43
40
|
|
|
44
41
|
const EMPTY_ARRAY = [];
|
|
45
42
|
|
|
@@ -102,6 +99,7 @@ function DuotonePanel( { attributes, setAttributes, name } ) {
|
|
|
102
99
|
const style = attributes?.style;
|
|
103
100
|
const duotoneStyle = style?.color?.duotone;
|
|
104
101
|
const settings = useBlockSettings( name );
|
|
102
|
+
const blockEditingMode = useBlockEditingMode();
|
|
105
103
|
|
|
106
104
|
const duotonePalette = useMultiOriginPresets( {
|
|
107
105
|
presetSetting: 'color.duotone',
|
|
@@ -124,6 +122,10 @@ function DuotonePanel( { attributes, setAttributes, name } ) {
|
|
|
124
122
|
return null;
|
|
125
123
|
}
|
|
126
124
|
|
|
125
|
+
if ( blockEditingMode !== 'default' ) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
|
|
127
129
|
const duotonePresetOrColors = ! Array.isArray( duotoneStyle )
|
|
128
130
|
? getColorsFromDuotonePreset( duotoneStyle, duotonePalette )
|
|
129
131
|
: duotoneStyle;
|
|
@@ -219,17 +221,13 @@ const withDuotoneControls = createHigherOrderComponent(
|
|
|
219
221
|
'filter.duotone'
|
|
220
222
|
);
|
|
221
223
|
|
|
222
|
-
const blockEditingMode = useBlockEditingMode();
|
|
223
|
-
|
|
224
224
|
// CAUTION: code added before this line will be executed
|
|
225
225
|
// for all blocks, not just those that support duotone. Code added
|
|
226
226
|
// above this line should be carefully evaluated for its impact on
|
|
227
227
|
// performance.
|
|
228
228
|
return (
|
|
229
229
|
<>
|
|
230
|
-
{ hasDuotoneSupport &&
|
|
231
|
-
<DuotonePanel { ...props } />
|
|
232
|
-
) }
|
|
230
|
+
{ hasDuotoneSupport && <DuotonePanel { ...props } /> }
|
|
233
231
|
<BlockEdit { ...props } />
|
|
234
232
|
</>
|
|
235
233
|
);
|
|
@@ -290,8 +288,27 @@ function DuotoneStyles( {
|
|
|
290
288
|
|
|
291
289
|
const isValidFilter = Array.isArray( colors ) || colors === 'unset';
|
|
292
290
|
|
|
293
|
-
|
|
294
|
-
|
|
291
|
+
useStyleOverride(
|
|
292
|
+
isValidFilter
|
|
293
|
+
? {
|
|
294
|
+
css:
|
|
295
|
+
colors !== 'unset'
|
|
296
|
+
? getDuotoneStylesheet( selector, filterId )
|
|
297
|
+
: getDuotoneUnsetStylesheet( selector ),
|
|
298
|
+
__unstableType: 'presets',
|
|
299
|
+
}
|
|
300
|
+
: undefined
|
|
301
|
+
);
|
|
302
|
+
useStyleOverride(
|
|
303
|
+
isValidFilter
|
|
304
|
+
? {
|
|
305
|
+
assets:
|
|
306
|
+
colors !== 'unset'
|
|
307
|
+
? getDuotoneFilter( filterId, colors )
|
|
308
|
+
: '',
|
|
309
|
+
__unstableType: 'svgs',
|
|
310
|
+
}
|
|
311
|
+
: undefined
|
|
295
312
|
);
|
|
296
313
|
|
|
297
314
|
const blockElement = useBlockElement( clientId );
|
|
@@ -299,19 +316,6 @@ function DuotoneStyles( {
|
|
|
299
316
|
useEffect( () => {
|
|
300
317
|
if ( ! isValidFilter ) return;
|
|
301
318
|
|
|
302
|
-
setStyleOverride( filterId, {
|
|
303
|
-
css:
|
|
304
|
-
colors !== 'unset'
|
|
305
|
-
? getDuotoneStylesheet( selector, filterId )
|
|
306
|
-
: getDuotoneUnsetStylesheet( selector ),
|
|
307
|
-
__unstableType: 'presets',
|
|
308
|
-
} );
|
|
309
|
-
setStyleOverride( `duotone-${ filterId }`, {
|
|
310
|
-
assets:
|
|
311
|
-
colors !== 'unset' ? getDuotoneFilter( filterId, colors ) : '',
|
|
312
|
-
__unstableType: 'svgs',
|
|
313
|
-
} );
|
|
314
|
-
|
|
315
319
|
// Safari does not always update the duotone filter when the duotone colors
|
|
316
320
|
// are changed. When using Safari, force the block element to be repainted by
|
|
317
321
|
// the browser to ensure any changes are reflected visually. This logic matches
|
|
@@ -328,20 +332,7 @@ function DuotoneStyles( {
|
|
|
328
332
|
blockElement.offsetHeight;
|
|
329
333
|
blockElement.style.display = display;
|
|
330
334
|
}
|
|
331
|
-
|
|
332
|
-
return () => {
|
|
333
|
-
deleteStyleOverride( filterId );
|
|
334
|
-
deleteStyleOverride( `duotone-${ filterId }` );
|
|
335
|
-
};
|
|
336
|
-
}, [
|
|
337
|
-
isValidFilter,
|
|
338
|
-
blockElement,
|
|
339
|
-
colors,
|
|
340
|
-
selector,
|
|
341
|
-
filterId,
|
|
342
|
-
setStyleOverride,
|
|
343
|
-
deleteStyleOverride,
|
|
344
|
-
] );
|
|
335
|
+
}, [ isValidFilter, blockElement ] );
|
|
345
336
|
|
|
346
337
|
return null;
|
|
347
338
|
}
|