@wordpress/block-editor 12.21.0 → 12.23.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 +4 -0
- package/README.md +4 -0
- package/build/components/block-actions/index.js +2 -4
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.js +5 -5
- package/build/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.native.js +5 -4
- package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build/components/block-list/block-crash-boundary.native.js +49 -0
- package/build/components/block-list/block-crash-boundary.native.js.map +1 -0
- package/build/components/block-list/block-crash-warning.native.js +24 -0
- package/build/components/block-list/block-crash-warning.native.js.map +1 -0
- package/build/components/block-list/block.js +11 -3
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +7 -2
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-mover/button.js +4 -1
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js +5 -1
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-patterns-list/index.js +4 -1
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-settings/container.native.js +2 -1
- package/build/components/block-settings/container.native.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +36 -32
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +1 -3
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-switcher/index.js +4 -3
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-toolbar/index.js +8 -5
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/shuffle.js +19 -10
- package/build/components/block-toolbar/shuffle.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +48 -8
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/index.js +14 -2
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/child-layout-control/index.js +108 -11
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js +11 -0
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/global-styles/advanced-panel.js +9 -2
- package/build/components/global-styles/advanced-panel.js.map +1 -1
- package/build/components/global-styles/background-panel.js +444 -0
- package/build/components/global-styles/background-panel.js.map +1 -0
- package/build/components/global-styles/color-panel.js +2 -1
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +8 -33
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/get-global-styles-changes.js +3 -0
- package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build/components/global-styles/hooks.js +1 -1
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/index.js +13 -0
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +16 -15
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +2 -3
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/iframe/index.js +43 -34
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/index.js +3 -6
- package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js +3 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +5 -0
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build/components/inserter/library.js +2 -0
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/menu.js +11 -11
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +1 -1
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/search-items.js +36 -15
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inserter/search-results.js +2 -3
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/tabs.js +1 -2
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js +36 -0
- package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -0
- package/build/components/keyboard-shortcuts/index.js +11 -0
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/list-view/block-select-button.js +18 -12
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +4 -11
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/index.js +17 -2
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/use-list-view-collapse-items.js +47 -0
- package/build/components/list-view/use-list-view-collapse-items.js.map +1 -0
- package/build/components/list-view/utils.js +5 -3
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/rich-text/index.js +14 -11
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +17 -11
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/native/get-format-colors.native.js +1 -1
- package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build/components/rich-text/native/index.native.js +2 -2
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/rich-text/with-deprecations.js +0 -3
- package/build/components/rich-text/with-deprecations.js.map +1 -1
- package/build/components/spacing-sizes-control/sides-dropdown/index.js +1 -1
- package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +50 -36
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/use-block-display-information/index.js +4 -6
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/components/use-moving-animation/index.js +4 -0
- package/build/components/use-moving-animation/index.js.map +1 -1
- package/build/components/warning/index.native.js +9 -4
- package/build/components/warning/index.native.js.map +1 -1
- package/build/hooks/anchor.js +9 -10
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/background.js +85 -402
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/index.js +9 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/layout-child.js +28 -6
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/layout.js +21 -10
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/position.js +1 -1
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/use-zoom-out.js +47 -0
- package/build/hooks/use-zoom-out.js.map +1 -0
- package/build/index.js +7 -0
- package/build/index.js.map +1 -1
- package/build/private-apis.js +6 -1
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +5 -1
- package/build/private-apis.native.js.map +1 -1
- package/build/store/private-actions.js +13 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-keys.js +2 -1
- package/build/store/private-keys.js.map +1 -1
- package/build/store/private-selectors.js +24 -3
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +53 -26
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +34 -32
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +7 -1
- package/build/store/utils.js.map +1 -1
- package/build/utils/transform-styles/index.js +2 -1
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build-module/components/block-actions/index.js +2 -4
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.js +5 -5
- package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.native.js +5 -4
- package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build-module/components/block-list/block-crash-boundary.native.js +42 -0
- package/build-module/components/block-list/block-crash-boundary.native.js.map +1 -0
- package/build-module/components/block-list/block-crash-warning.native.js +15 -0
- package/build-module/components/block-list/block-crash-warning.native.js.map +1 -0
- package/build-module/components/block-list/block.js +11 -3
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +7 -2
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-mover/button.js +4 -1
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +5 -1
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +4 -1
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-settings/container.native.js +3 -2
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +37 -33
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +1 -3
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-switcher/index.js +4 -3
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +8 -5
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/shuffle.js +19 -10
- package/build-module/components/block-toolbar/shuffle.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +50 -10
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/index.js +14 -2
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +109 -12
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +12 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/global-styles/advanced-panel.js +9 -2
- package/build-module/components/global-styles/advanced-panel.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +430 -0
- package/build-module/components/global-styles/background-panel.js.map +1 -0
- package/build-module/components/global-styles/color-panel.js +2 -1
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +9 -34
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/get-global-styles-changes.js +3 -0
- package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +1 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/index.js +1 -0
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +17 -16
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +1 -2
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/iframe/index.js +43 -34
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/index.js +3 -6
- package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +3 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +5 -0
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build-module/components/inserter/library.js +2 -0
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/menu.js +11 -11
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/search-items.js +33 -15
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inserter/search-results.js +2 -3
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/tabs.js +1 -2
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js +28 -0
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -0
- package/build-module/components/keyboard-shortcuts/index.js +11 -0
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +19 -13
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +6 -13
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/index.js +17 -2
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/use-list-view-collapse-items.js +40 -0
- package/build-module/components/list-view/use-list-view-collapse-items.js.map +1 -0
- package/build-module/components/list-view/utils.js +2 -1
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/rich-text/index.js +15 -12
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +16 -11
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/native/get-format-colors.native.js +1 -1
- package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +2 -2
- package/build-module/components/rich-text/native/index.native.js.map +1 -1
- package/build-module/components/rich-text/with-deprecations.js +0 -3
- package/build-module/components/rich-text/with-deprecations.js.map +1 -1
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +1 -1
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +50 -36
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/use-block-display-information/index.js +5 -7
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/components/use-moving-animation/index.js +4 -0
- package/build-module/components/use-moving-animation/index.js.map +1 -1
- package/build-module/components/warning/index.native.js +9 -4
- package/build-module/components/warning/index.native.js.map +1 -1
- package/build-module/hooks/anchor.js +10 -11
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/background.js +82 -397
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/index.js +3 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/layout-child.js +28 -6
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/layout.js +21 -10
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/position.js +1 -1
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +41 -0
- package/build-module/hooks/use-zoom-out.js.map +1 -0
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/private-apis.js +7 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +5 -1
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/private-actions.js +12 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-keys.js +1 -0
- package/build-module/store/private-keys.js.map +1 -1
- package/build-module/store/private-selectors.js +22 -4
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +52 -26
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +35 -33
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +6 -1
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +2 -1
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-style/content-rtl.css +18 -1
- package/build-style/content.css +18 -1
- package/build-style/style-rtl.css +92 -99
- package/build-style/style.css +92 -99
- package/package.json +31 -31
- package/src/components/block-actions/index.js +2 -8
- package/src/components/block-bindings-toolbar-indicator/style.scss +10 -8
- package/src/components/block-heading-level-dropdown/README.md +5 -5
- package/src/components/block-heading-level-dropdown/index.js +5 -5
- package/src/components/block-heading-level-dropdown/index.native.js +5 -4
- package/src/components/block-list/block-crash-boundary.native.js +43 -0
- package/src/components/block-list/block-crash-warning.native.js +19 -0
- package/src/components/block-list/block.js +19 -3
- package/src/components/block-list/block.native.js +14 -7
- package/src/components/block-list/content.scss +16 -0
- package/src/components/block-mover/button.js +4 -1
- package/src/components/block-mover/index.js +8 -1
- package/src/components/block-patterns-list/index.js +22 -17
- package/src/components/block-preview/style.scss +28 -0
- package/src/components/block-settings/container.native.js +5 -1
- package/src/components/block-settings-menu/block-settings-dropdown.js +49 -58
- package/src/components/block-settings-menu-controls/README.md +0 -9
- package/src/components/block-settings-menu-controls/index.js +1 -6
- package/src/components/block-switcher/index.js +5 -3
- package/src/components/block-switcher/style.scss +1 -1
- package/src/components/block-toolbar/index.js +25 -20
- package/src/components/block-toolbar/shuffle.js +20 -14
- package/src/components/block-toolbar/style.scss +1 -1
- package/src/components/block-toolbar/test/index.native.js +1 -7
- package/src/components/block-tools/block-selection-button.js +66 -9
- package/src/components/block-tools/index.js +18 -1
- package/src/components/button-block-appender/content.scss +5 -1
- package/src/components/child-layout-control/index.js +147 -35
- package/src/components/convert-to-group-buttons/toolbar.js +13 -1
- package/src/components/default-block-appender/content.scss +2 -2
- package/src/components/global-styles/advanced-panel.js +8 -2
- package/src/components/global-styles/background-panel.js +591 -0
- package/src/components/global-styles/color-panel.js +2 -1
- package/src/components/global-styles/dimensions-panel.js +9 -34
- package/src/components/global-styles/get-global-styles-changes.js +3 -0
- package/src/components/global-styles/hooks.js +1 -0
- package/src/components/global-styles/index.js +4 -0
- package/src/components/global-styles/style.scss +78 -1
- package/src/{hooks/test/background.js → components/global-styles/test/background-panel.js} +36 -1
- package/src/components/global-styles/test/get-global-styles-changes.js +22 -3
- package/src/components/global-styles/test/use-global-styles-output.js +40 -9
- package/src/components/global-styles/use-global-styles-output.js +30 -17
- package/src/components/global-styles/utils.js +1 -18
- package/src/components/iframe/index.js +79 -53
- package/src/components/inserter/block-patterns-explorer/index.js +2 -9
- package/src/components/inserter/block-patterns-explorer/pattern-list.js +7 -1
- package/src/components/inserter/block-patterns-tab/index.js +1 -0
- package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +5 -0
- package/src/components/inserter/library.js +4 -0
- package/src/components/inserter/menu.js +12 -11
- package/src/components/inserter/mobile-tab-navigation.js +1 -1
- package/src/components/inserter/search-items.js +37 -15
- package/src/components/inserter/search-results.js +1 -2
- package/src/components/inserter/style.scss +6 -12
- package/src/components/inserter/tabs.js +1 -2
- package/src/components/inspector-controls-tabs/advanced-controls-panel.native.js +31 -0
- package/src/components/keyboard-shortcuts/index.js +11 -0
- package/src/components/link-control/style.scss +0 -5
- package/src/components/list-view/block-select-button.js +15 -19
- package/src/components/list-view/block.js +12 -21
- package/src/components/list-view/index.js +18 -1
- package/src/components/list-view/style.scss +38 -28
- package/src/components/list-view/use-list-view-collapse-items.js +33 -0
- package/src/components/list-view/utils.js +4 -1
- package/src/components/rich-text/README.md +6 -0
- package/src/components/rich-text/index.js +30 -13
- package/src/components/rich-text/index.native.js +14 -11
- package/src/components/rich-text/native/get-format-colors.native.js +1 -1
- package/src/components/rich-text/native/index.native.js +2 -2
- package/src/components/rich-text/with-deprecations.js +0 -3
- package/src/components/spacing-sizes-control/sides-dropdown/index.js +1 -1
- package/src/components/url-popover/image-url-input-ui.js +68 -51
- package/src/components/use-block-display-information/index.js +8 -10
- package/src/components/use-moving-animation/index.js +1 -0
- package/src/components/warning/index.native.js +19 -15
- package/src/hooks/anchor.js +43 -61
- package/src/hooks/background.js +100 -516
- package/src/hooks/index.js +3 -0
- package/src/hooks/layout-child.js +44 -8
- package/src/hooks/layout.js +22 -18
- package/src/hooks/position.js +1 -1
- package/src/hooks/test/__snapshots__/anchor.native.js.snap +7 -0
- package/src/hooks/test/anchor.native.js +32 -0
- package/src/hooks/use-zoom-out.js +36 -0
- package/src/index.js +1 -0
- package/src/private-apis.js +13 -1
- package/src/private-apis.native.js +4 -0
- package/src/store/private-actions.js +12 -0
- package/src/store/private-keys.js +1 -0
- package/src/store/private-selectors.js +54 -27
- package/src/store/reducer.js +63 -41
- package/src/store/selectors.js +195 -180
- package/src/store/test/private-actions.js +10 -0
- package/src/store/test/private-selectors.js +13 -0
- package/src/store/test/reducer.js +26 -0
- package/src/store/test/selectors.js +90 -199
- package/src/store/utils.js +13 -0
- package/src/style.scss +0 -2
- package/src/utils/transform-styles/index.js +2 -1
- package/tsconfig.json +1 -0
- package/build/utils/calculate-scale.js +0 -17
- package/build/utils/calculate-scale.js.map +0 -1
- package/build-module/utils/calculate-scale.js +0 -11
- package/build-module/utils/calculate-scale.js.map +0 -1
- package/src/hooks/anchor.scss +0 -4
- package/src/hooks/background.scss +0 -75
- package/src/utils/calculate-scale.js +0 -20
|
@@ -6,8 +6,8 @@ import classnames from 'classnames';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { dragHandle } from '@wordpress/icons';
|
|
10
|
-
import { Button, Flex, FlexItem } from '@wordpress/components';
|
|
9
|
+
import { dragHandle, trash } from '@wordpress/icons';
|
|
10
|
+
import { Button, Flex, FlexItem, ToolbarButton } from '@wordpress/components';
|
|
11
11
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
12
12
|
import { useEffect, useRef } from '@wordpress/element';
|
|
13
13
|
import {
|
|
@@ -60,6 +60,9 @@ function BlockSelectionButton( { clientId, rootClientId } ) {
|
|
|
60
60
|
hasBlockMovingClientId,
|
|
61
61
|
getBlockListSettings,
|
|
62
62
|
__unstableGetEditorMode,
|
|
63
|
+
getNextBlockClientId,
|
|
64
|
+
getPreviousBlockClientId,
|
|
65
|
+
canRemoveBlock,
|
|
63
66
|
} = select( blockEditorStore );
|
|
64
67
|
const { getActiveBlockVariation, getBlockType } =
|
|
65
68
|
select( blocksStore );
|
|
@@ -69,6 +72,26 @@ function BlockSelectionButton( { clientId, rootClientId } ) {
|
|
|
69
72
|
const orientation =
|
|
70
73
|
getBlockListSettings( rootClientId )?.orientation;
|
|
71
74
|
const match = getActiveBlockVariation( name, attributes );
|
|
75
|
+
const isBlockTemplatePart =
|
|
76
|
+
blockType?.name === 'core/template-part';
|
|
77
|
+
|
|
78
|
+
let isNextBlockTemplatePart = false;
|
|
79
|
+
const nextClientId = getNextBlockClientId();
|
|
80
|
+
if ( nextClientId ) {
|
|
81
|
+
const { name: nextName } = getBlock( nextClientId );
|
|
82
|
+
const nextBlockType = getBlockType( nextName );
|
|
83
|
+
isNextBlockTemplatePart =
|
|
84
|
+
nextBlockType?.name === 'core/template-part';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
let isPrevBlockTemplatePart = false;
|
|
88
|
+
const prevClientId = getPreviousBlockClientId();
|
|
89
|
+
if ( prevClientId ) {
|
|
90
|
+
const { name: prevName } = getBlock( prevClientId );
|
|
91
|
+
const prevBlockType = getBlockType( prevName );
|
|
92
|
+
isPrevBlockTemplatePart =
|
|
93
|
+
prevBlockType?.name === 'core/template-part';
|
|
94
|
+
}
|
|
72
95
|
|
|
73
96
|
return {
|
|
74
97
|
blockMovingMode: hasBlockMovingClientId(),
|
|
@@ -80,20 +103,34 @@ function BlockSelectionButton( { clientId, rootClientId } ) {
|
|
|
80
103
|
index + 1,
|
|
81
104
|
orientation
|
|
82
105
|
),
|
|
106
|
+
isBlockTemplatePart,
|
|
107
|
+
isNextBlockTemplatePart,
|
|
108
|
+
isPrevBlockTemplatePart,
|
|
109
|
+
canRemove: canRemoveBlock( clientId, rootClientId ),
|
|
83
110
|
};
|
|
84
111
|
},
|
|
85
112
|
[ clientId, rootClientId ]
|
|
86
113
|
);
|
|
87
|
-
const {
|
|
114
|
+
const {
|
|
115
|
+
label,
|
|
116
|
+
icon,
|
|
117
|
+
blockMovingMode,
|
|
118
|
+
editorMode,
|
|
119
|
+
isBlockTemplatePart,
|
|
120
|
+
isNextBlockTemplatePart,
|
|
121
|
+
isPrevBlockTemplatePart,
|
|
122
|
+
canRemove,
|
|
123
|
+
} = selected;
|
|
88
124
|
const { setNavigationMode, removeBlock } = useDispatch( blockEditorStore );
|
|
89
125
|
const ref = useRef();
|
|
90
126
|
|
|
91
127
|
// Focus the breadcrumb in navigation mode.
|
|
92
128
|
useEffect( () => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
129
|
+
if ( editorMode === 'navigation' ) {
|
|
130
|
+
ref.current.focus();
|
|
131
|
+
speak( label );
|
|
132
|
+
}
|
|
133
|
+
}, [ label, editorMode ] );
|
|
97
134
|
const blockElement = useBlockElement( clientId );
|
|
98
135
|
|
|
99
136
|
const {
|
|
@@ -252,8 +289,17 @@ function BlockSelectionButton( { clientId, rootClientId } ) {
|
|
|
252
289
|
<BlockIcon icon={ icon } showColors />
|
|
253
290
|
</FlexItem>
|
|
254
291
|
<FlexItem>
|
|
255
|
-
{ editorMode === 'zoom-out' && (
|
|
256
|
-
<BlockMover
|
|
292
|
+
{ editorMode === 'zoom-out' && ! isBlockTemplatePart && (
|
|
293
|
+
<BlockMover
|
|
294
|
+
clientIds={ [ clientId ] }
|
|
295
|
+
hideDragHandle
|
|
296
|
+
isBlockMoverUpButtonDisabled={
|
|
297
|
+
isPrevBlockTemplatePart
|
|
298
|
+
}
|
|
299
|
+
isBlockMoverDownButtonDisabled={
|
|
300
|
+
isNextBlockTemplatePart
|
|
301
|
+
}
|
|
302
|
+
/>
|
|
257
303
|
) }
|
|
258
304
|
{ editorMode === 'navigation' && (
|
|
259
305
|
<BlockDraggable clientIds={ [ clientId ] }>
|
|
@@ -275,6 +321,17 @@ function BlockSelectionButton( { clientId, rootClientId } ) {
|
|
|
275
321
|
{ editorMode === 'zoom-out' && (
|
|
276
322
|
<Shuffle clientId={ clientId } as={ Button } />
|
|
277
323
|
) }
|
|
324
|
+
{ canRemove &&
|
|
325
|
+
editorMode === 'zoom-out' &&
|
|
326
|
+
! isBlockTemplatePart && (
|
|
327
|
+
<ToolbarButton
|
|
328
|
+
icon={ trash }
|
|
329
|
+
label="Delete"
|
|
330
|
+
onClick={ () => {
|
|
331
|
+
removeBlock( clientId );
|
|
332
|
+
} }
|
|
333
|
+
/>
|
|
334
|
+
) }
|
|
278
335
|
<FlexItem>
|
|
279
336
|
<Button
|
|
280
337
|
ref={ ref }
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
|
+
import { isTextField } from '@wordpress/dom';
|
|
5
6
|
import { Popover } from '@wordpress/components';
|
|
6
7
|
import { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';
|
|
7
8
|
import { useRef } from '@wordpress/element';
|
|
@@ -20,6 +21,7 @@ import { store as blockEditorStore } from '../../store';
|
|
|
20
21
|
import usePopoverScroll from '../block-popover/use-popover-scroll';
|
|
21
22
|
import ZoomOutModeInserters from './zoom-out-mode-inserters';
|
|
22
23
|
import { useShowBlockTools } from './use-show-block-tools';
|
|
24
|
+
import { unlock } from '../../lock-unlock';
|
|
23
25
|
|
|
24
26
|
function selector( select ) {
|
|
25
27
|
const {
|
|
@@ -79,7 +81,8 @@ export default function BlockTools( {
|
|
|
79
81
|
selectBlock,
|
|
80
82
|
moveBlocksUp,
|
|
81
83
|
moveBlocksDown,
|
|
82
|
-
|
|
84
|
+
expandBlock,
|
|
85
|
+
} = unlock( useDispatch( blockEditorStore ) );
|
|
83
86
|
|
|
84
87
|
function onKeyDown( event ) {
|
|
85
88
|
if ( event.defaultPrevented ) return;
|
|
@@ -140,6 +143,20 @@ export default function BlockTools( {
|
|
|
140
143
|
// In effect, to the user this feels like deselecting the multi-selection.
|
|
141
144
|
selectBlock( clientIds[ 0 ] );
|
|
142
145
|
}
|
|
146
|
+
} else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) {
|
|
147
|
+
// If focus is currently within a text field, such as a rich text block or other editable field,
|
|
148
|
+
// skip collapsing the list view, and allow the keyboard shortcut to be handled by the text field.
|
|
149
|
+
// This condition checks for both the active element and the active element within an iframed editor.
|
|
150
|
+
if (
|
|
151
|
+
isTextField( event.target ) ||
|
|
152
|
+
isTextField(
|
|
153
|
+
event.target?.contentWindow?.document?.activeElement
|
|
154
|
+
)
|
|
155
|
+
) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
event.preventDefault();
|
|
159
|
+
expandBlock( clientId );
|
|
143
160
|
}
|
|
144
161
|
}
|
|
145
162
|
|
|
@@ -7,6 +7,10 @@ import {
|
|
|
7
7
|
__experimentalUnitControl as UnitControl,
|
|
8
8
|
__experimentalInputControl as InputControl,
|
|
9
9
|
__experimentalHStack as HStack,
|
|
10
|
+
__experimentalVStack as VStack,
|
|
11
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
12
|
+
Flex,
|
|
13
|
+
FlexItem,
|
|
10
14
|
} from '@wordpress/components';
|
|
11
15
|
import { __ } from '@wordpress/i18n';
|
|
12
16
|
import { useEffect } from '@wordpress/element';
|
|
@@ -28,25 +32,62 @@ function helpText( selfStretch, parentLayout ) {
|
|
|
28
32
|
/**
|
|
29
33
|
* Form to edit the child layout value.
|
|
30
34
|
*
|
|
31
|
-
* @param {Object} props
|
|
32
|
-
* @param {Object} props.value
|
|
33
|
-
* @param {Function} props.onChange
|
|
34
|
-
* @param {Object} props.parentLayout
|
|
35
|
+
* @param {Object} props Props.
|
|
36
|
+
* @param {Object} props.value The child layout value.
|
|
37
|
+
* @param {Function} props.onChange Function to update the child layout value.
|
|
38
|
+
* @param {Object} props.parentLayout The parent layout value.
|
|
35
39
|
*
|
|
40
|
+
* @param {boolean} props.isShownByDefault
|
|
41
|
+
* @param {string} props.panelId
|
|
36
42
|
* @return {Element} child layout edit element.
|
|
37
43
|
*/
|
|
38
44
|
export default function ChildLayoutControl( {
|
|
39
45
|
value: childLayout = {},
|
|
40
46
|
onChange,
|
|
41
47
|
parentLayout,
|
|
48
|
+
isShownByDefault,
|
|
49
|
+
panelId,
|
|
42
50
|
} ) {
|
|
43
|
-
const {
|
|
51
|
+
const {
|
|
52
|
+
selfStretch,
|
|
53
|
+
flexSize,
|
|
54
|
+
columnStart,
|
|
55
|
+
rowStart,
|
|
56
|
+
columnSpan,
|
|
57
|
+
rowSpan,
|
|
58
|
+
} = childLayout;
|
|
44
59
|
const {
|
|
45
60
|
type: parentType,
|
|
46
61
|
default: { type: defaultParentType = 'default' } = {},
|
|
62
|
+
orientation = 'horizontal',
|
|
47
63
|
} = parentLayout ?? {};
|
|
48
64
|
const parentLayoutType = parentType || defaultParentType;
|
|
49
65
|
|
|
66
|
+
const hasFlexValue = () => !! selfStretch;
|
|
67
|
+
const flexResetLabel =
|
|
68
|
+
orientation === 'horizontal' ? __( 'Width' ) : __( 'Height' );
|
|
69
|
+
const resetFlex = () => {
|
|
70
|
+
onChange( {
|
|
71
|
+
selfStretch: undefined,
|
|
72
|
+
flexSize: undefined,
|
|
73
|
+
} );
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const hasStartValue = () => !! columnStart || !! rowStart;
|
|
77
|
+
const hasSpanValue = () => !! columnSpan || !! rowSpan;
|
|
78
|
+
const resetGridStarts = () => {
|
|
79
|
+
onChange( {
|
|
80
|
+
columnStart: undefined,
|
|
81
|
+
rowStart: undefined,
|
|
82
|
+
} );
|
|
83
|
+
};
|
|
84
|
+
const resetGridSpans = () => {
|
|
85
|
+
onChange( {
|
|
86
|
+
columnSpan: undefined,
|
|
87
|
+
rowSpan: undefined,
|
|
88
|
+
} );
|
|
89
|
+
};
|
|
90
|
+
|
|
50
91
|
useEffect( () => {
|
|
51
92
|
if ( selfStretch === 'fixed' && ! flexSize ) {
|
|
52
93
|
onChange( {
|
|
@@ -59,7 +100,15 @@ export default function ChildLayoutControl( {
|
|
|
59
100
|
return (
|
|
60
101
|
<>
|
|
61
102
|
{ parentLayoutType === 'flex' && (
|
|
62
|
-
|
|
103
|
+
<VStack
|
|
104
|
+
as={ ToolsPanelItem }
|
|
105
|
+
spacing={ 2 }
|
|
106
|
+
hasValue={ hasFlexValue }
|
|
107
|
+
label={ flexResetLabel }
|
|
108
|
+
onDeselect={ resetFlex }
|
|
109
|
+
isShownByDefault={ isShownByDefault }
|
|
110
|
+
panelId={ panelId }
|
|
111
|
+
>
|
|
63
112
|
<ToggleGroupControl
|
|
64
113
|
__nextHasNoMarginBottom
|
|
65
114
|
size={ '__unstable-large' }
|
|
@@ -104,37 +153,100 @@ export default function ChildLayoutControl( {
|
|
|
104
153
|
value={ flexSize }
|
|
105
154
|
/>
|
|
106
155
|
) }
|
|
107
|
-
|
|
156
|
+
</VStack>
|
|
108
157
|
) }
|
|
109
158
|
{ parentLayoutType === 'grid' && (
|
|
110
|
-
|
|
111
|
-
<
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
159
|
+
<>
|
|
160
|
+
<HStack
|
|
161
|
+
as={ ToolsPanelItem }
|
|
162
|
+
hasValue={ hasSpanValue }
|
|
163
|
+
label={ __( 'Grid span' ) }
|
|
164
|
+
onDeselect={ resetGridSpans }
|
|
165
|
+
isShownByDefault={ isShownByDefault }
|
|
166
|
+
panelId={ panelId }
|
|
167
|
+
>
|
|
168
|
+
<InputControl
|
|
169
|
+
size={ '__unstable-large' }
|
|
170
|
+
label={ __( 'Column span' ) }
|
|
171
|
+
type="number"
|
|
172
|
+
onChange={ ( value ) => {
|
|
173
|
+
onChange( {
|
|
174
|
+
columnStart,
|
|
175
|
+
rowStart,
|
|
176
|
+
rowSpan,
|
|
177
|
+
columnSpan: value,
|
|
178
|
+
} );
|
|
179
|
+
} }
|
|
180
|
+
value={ columnSpan }
|
|
181
|
+
min={ 1 }
|
|
182
|
+
/>
|
|
183
|
+
<InputControl
|
|
184
|
+
size={ '__unstable-large' }
|
|
185
|
+
label={ __( 'Row span' ) }
|
|
186
|
+
type="number"
|
|
187
|
+
onChange={ ( value ) => {
|
|
188
|
+
onChange( {
|
|
189
|
+
columnStart,
|
|
190
|
+
rowStart,
|
|
191
|
+
columnSpan,
|
|
192
|
+
rowSpan: value,
|
|
193
|
+
} );
|
|
194
|
+
} }
|
|
195
|
+
value={ rowSpan }
|
|
196
|
+
min={ 1 }
|
|
197
|
+
/>
|
|
198
|
+
</HStack>
|
|
199
|
+
{ window.__experimentalEnableGridInteractivity && (
|
|
200
|
+
// Use Flex with an explicit width on the FlexItem instead of HStack to
|
|
201
|
+
// work around an issue in webkit where inputs with a max attribute are
|
|
202
|
+
// sized incorrectly.
|
|
203
|
+
<Flex
|
|
204
|
+
as={ ToolsPanelItem }
|
|
205
|
+
hasValue={ hasStartValue }
|
|
206
|
+
label={ __( 'Grid placement' ) }
|
|
207
|
+
onDeselect={ resetGridStarts }
|
|
208
|
+
isShownByDefault={ false }
|
|
209
|
+
panelId={ panelId }
|
|
210
|
+
>
|
|
211
|
+
<FlexItem style={ { width: '50%' } }>
|
|
212
|
+
<InputControl
|
|
213
|
+
size={ '__unstable-large' }
|
|
214
|
+
label={ __( 'Column' ) }
|
|
215
|
+
type="number"
|
|
216
|
+
onChange={ ( value ) => {
|
|
217
|
+
onChange( {
|
|
218
|
+
columnStart: value,
|
|
219
|
+
rowStart,
|
|
220
|
+
columnSpan,
|
|
221
|
+
rowSpan,
|
|
222
|
+
} );
|
|
223
|
+
} }
|
|
224
|
+
value={ columnStart }
|
|
225
|
+
min={ 1 }
|
|
226
|
+
max={ parentLayout?.columnCount }
|
|
227
|
+
/>
|
|
228
|
+
</FlexItem>
|
|
229
|
+
<FlexItem style={ { width: '50%' } }>
|
|
230
|
+
<InputControl
|
|
231
|
+
size={ '__unstable-large' }
|
|
232
|
+
label={ __( 'Row' ) }
|
|
233
|
+
type="number"
|
|
234
|
+
onChange={ ( value ) => {
|
|
235
|
+
onChange( {
|
|
236
|
+
columnStart,
|
|
237
|
+
rowStart: value,
|
|
238
|
+
columnSpan,
|
|
239
|
+
rowSpan,
|
|
240
|
+
} );
|
|
241
|
+
} }
|
|
242
|
+
value={ rowStart }
|
|
243
|
+
min={ 1 }
|
|
244
|
+
max={ parentLayout?.columnCount }
|
|
245
|
+
/>
|
|
246
|
+
</FlexItem>
|
|
247
|
+
</Flex>
|
|
248
|
+
) }
|
|
249
|
+
</>
|
|
138
250
|
) }
|
|
139
251
|
</>
|
|
140
252
|
);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
5
5
|
import { switchToBlockType, store as blocksStore } from '@wordpress/blocks';
|
|
6
6
|
import { ToolbarButton, ToolbarGroup } from '@wordpress/components';
|
|
7
|
-
import { group, row, stack } from '@wordpress/icons';
|
|
7
|
+
import { group, row, stack, grid } from '@wordpress/icons';
|
|
8
8
|
import { _x } from '@wordpress/i18n';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -17,6 +17,7 @@ const layouts = {
|
|
|
17
17
|
group: { type: 'constrained' },
|
|
18
18
|
row: { type: 'flex', flexWrap: 'nowrap' },
|
|
19
19
|
stack: { type: 'flex', orientation: 'vertical' },
|
|
20
|
+
grid: { type: 'grid' },
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
function BlockGroupToolbar() {
|
|
@@ -60,6 +61,7 @@ function BlockGroupToolbar() {
|
|
|
60
61
|
|
|
61
62
|
const onConvertToRow = () => onConvertToGroup( 'row' );
|
|
62
63
|
const onConvertToStack = () => onConvertToGroup( 'stack' );
|
|
64
|
+
const onConvertToGrid = () => onConvertToGroup( 'grid' );
|
|
63
65
|
|
|
64
66
|
// Don't render the button if the current selection cannot be grouped.
|
|
65
67
|
// A good example is selecting multiple button blocks within a Buttons block:
|
|
@@ -75,6 +77,9 @@ function BlockGroupToolbar() {
|
|
|
75
77
|
const canInsertStack = !! variations.find(
|
|
76
78
|
( { name } ) => name === 'group-stack'
|
|
77
79
|
);
|
|
80
|
+
const canInsertGrid = !! variations.find(
|
|
81
|
+
( { name } ) => name === 'group-grid'
|
|
82
|
+
);
|
|
78
83
|
|
|
79
84
|
return (
|
|
80
85
|
<ToolbarGroup>
|
|
@@ -97,6 +102,13 @@ function BlockGroupToolbar() {
|
|
|
97
102
|
onClick={ onConvertToStack }
|
|
98
103
|
/>
|
|
99
104
|
) }
|
|
105
|
+
{ canInsertGrid && (
|
|
106
|
+
<ToolbarButton
|
|
107
|
+
icon={ grid }
|
|
108
|
+
label={ _x( 'Grid', 'verb' ) }
|
|
109
|
+
onClick={ onConvertToGrid }
|
|
110
|
+
/>
|
|
111
|
+
) }
|
|
100
112
|
</ToolbarGroup>
|
|
101
113
|
);
|
|
102
114
|
}
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
height: $button-size-small;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
// @todo
|
|
104
|
+
// @todo these are currently two separate components. Since we're now
|
|
105
105
|
// treating them the same, one or both can be retired.
|
|
106
106
|
.block-editor-inserter__toggle.components-button.has-icon,
|
|
107
107
|
.block-list-appender__toggle {
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
|
|
135
135
|
// These could be avoided by employing a :not(:only-child) on the parent,
|
|
136
136
|
// but this should be more performant.
|
|
137
|
-
// @todo
|
|
137
|
+
// @todo These styles can almost certainly be refactored away we refactor
|
|
138
138
|
// the markup and classes of the component itself. The rules provide some
|
|
139
139
|
// baseline styles for when the block is the only one inside.
|
|
140
140
|
&:only-child {
|
|
@@ -28,9 +28,12 @@ export default function AdvancedPanel( {
|
|
|
28
28
|
css: newValue,
|
|
29
29
|
} );
|
|
30
30
|
if ( cssError ) {
|
|
31
|
+
// Check if the new value is valid CSS, and pass a wrapping selector
|
|
32
|
+
// to ensure that `transformStyles` validates the CSS. Note that the
|
|
33
|
+
// wrapping selector here is not used in the actual output of any styles.
|
|
31
34
|
const [ transformed ] = transformStyles(
|
|
32
35
|
[ { css: newValue } ],
|
|
33
|
-
'.
|
|
36
|
+
'.for-validation-only'
|
|
34
37
|
);
|
|
35
38
|
if ( transformed ) {
|
|
36
39
|
setCSSError( null );
|
|
@@ -43,9 +46,12 @@ export default function AdvancedPanel( {
|
|
|
43
46
|
return;
|
|
44
47
|
}
|
|
45
48
|
|
|
49
|
+
// Check if the new value is valid CSS, and pass a wrapping selector
|
|
50
|
+
// to ensure that `transformStyles` validates the CSS. Note that the
|
|
51
|
+
// wrapping selector here is not used in the actual output of any styles.
|
|
46
52
|
const [ transformed ] = transformStyles(
|
|
47
53
|
[ { css: event.target.value } ],
|
|
48
|
-
'.
|
|
54
|
+
'.for-validation-only'
|
|
49
55
|
);
|
|
50
56
|
|
|
51
57
|
setCSSError(
|