@wordpress/block-editor 12.24.0 → 12.25.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 +1 -1
- package/build/components/alignment-control/ui.js +3 -1
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/block-inspector/index.js +1 -1
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block.js +0 -9
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/index.js +4 -3
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js +1 -9
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +6 -6
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-refs.js +17 -46
- package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build/components/block-list/use-block-props/use-is-hovered.js +10 -14
- package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build/components/block-mover/index.native.js +3 -1
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +0 -25
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +3 -1
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/use-transformed-patterns.js +6 -2
- package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build/components/block-switcher/utils.js +15 -5
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-toolbar/use-has-block-toolbar.js +14 -9
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build/components/block-tools/index.js +3 -1
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +2 -5
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +5 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-variation-picker/index.js +3 -2
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +3 -1
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/floating-toolbar/index.native.js +9 -5
- package/build/components/floating-toolbar/index.native.js.map +1 -1
- package/build/components/global-styles/background-panel.js +1 -1
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +3 -1
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +16 -0
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +3 -2
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +23 -23
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +149 -132
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +45 -0
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/inner-blocks/index.js +16 -2
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js +12 -31
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +4 -0
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/category-tabs/index.js +56 -0
- package/build/components/inserter/category-tabs/index.js.map +1 -0
- package/build/components/inserter/media-tab/index.js +2 -2
- package/build/components/inserter/media-tab/index.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js +0 -25
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js +13 -3
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js +15 -29
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/menu.js +59 -69
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/tabs.js +6 -6
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/line-height-control/index.js +6 -2
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/link-control/search-item.js +9 -3
- package/build/components/link-control/search-item.js.map +1 -1
- package/build/components/list-view/block-select-button.js +5 -170
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +166 -14
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/index.js +1 -1
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/list-view/utils.js +3 -1
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.js +3 -3
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +3 -1
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/provider/block-refs-provider.js +3 -4
- package/build/components/provider/block-refs-provider.js.map +1 -1
- package/build/components/provider/use-block-sync.js +3 -12
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/rich-text/event-listeners/before-input-rules.js +93 -0
- package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
- package/build/components/rich-text/event-listeners/delete.js +58 -0
- package/build/components/rich-text/event-listeners/delete.js.map +1 -0
- package/build/components/rich-text/event-listeners/enter.js +98 -0
- package/build/components/rich-text/event-listeners/enter.js.map +1 -0
- package/build/components/rich-text/event-listeners/firefox-compat.js +36 -0
- package/build/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
- package/build/components/rich-text/event-listeners/index.js +44 -0
- package/build/components/rich-text/event-listeners/index.js.map +1 -0
- package/build/components/rich-text/event-listeners/input-events.js +22 -0
- package/build/components/rich-text/event-listeners/input-events.js.map +1 -0
- package/build/components/rich-text/event-listeners/input-rules.js +135 -0
- package/build/components/rich-text/event-listeners/input-rules.js.map +1 -0
- package/build/components/rich-text/event-listeners/insert-replacement-text.js +33 -0
- package/build/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
- package/build/components/rich-text/event-listeners/paste-handler.js +146 -0
- package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -0
- package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js +27 -0
- package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
- package/build/components/rich-text/event-listeners/shortcuts.js +22 -0
- package/build/components/rich-text/event-listeners/shortcuts.js.map +1 -0
- package/build/components/rich-text/event-listeners/undo-automatic-change.js +51 -0
- package/build/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
- package/build/components/rich-text/index.js +11 -31
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +13 -3
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/multiline.js +6 -2
- package/build/components/rich-text/multiline.js.map +1 -1
- package/build/components/rich-text/native/index.native.js +12 -0
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/rich-text/use-format-types.js +8 -4
- package/build/components/rich-text/use-format-types.js.map +1 -1
- package/build/components/segmented-text-control/index.js +62 -0
- package/build/components/segmented-text-control/index.js.map +1 -0
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/text-alignment-control/index.js +76 -0
- package/build/components/text-alignment-control/index.js.map +1 -0
- package/build/components/text-decoration-control/index.js +21 -25
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +18 -22
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/use-block-display-information/index.js +9 -3
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js +3 -1
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/writing-flow/use-drag-selection.js +3 -1
- package/build/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +3 -1
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/components/writing-mode-control/index.js +16 -20
- package/build/components/writing-mode-control/index.js.map +1 -1
- package/build/hooks/duotone.js +3 -1
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/utils.js +11 -6
- package/build/hooks/utils.js.map +1 -1
- package/build/private-apis.js +4 -2
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +32 -8
- package/build/store/actions.js.map +1 -1
- package/build/store/private-selectors.js +27 -6
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +11 -8
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +21 -7
- package/build/store/selectors.js.map +1 -1
- package/build/utils/object.js +17 -0
- package/build/utils/object.js.map +1 -1
- package/build/utils/order-inserter-block-items.js +6 -2
- package/build/utils/order-inserter-block-items.js.map +1 -1
- package/build/utils/pasting.js +6 -2
- package/build/utils/pasting.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +3 -1
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/block-inspector/index.js +1 -1
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block.js +0 -9
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/index.js +4 -3
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js +1 -9
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +6 -6
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-refs.js +19 -48
- package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-is-hovered.js +10 -14
- package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +3 -1
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +1 -26
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +3 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/use-transformed-patterns.js +6 -2
- package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build-module/components/block-switcher/utils.js +15 -5
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-toolbar/use-has-block-toolbar.js +14 -9
- package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build-module/components/block-tools/index.js +3 -1
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +2 -5
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +5 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +3 -2
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +3 -1
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/floating-toolbar/index.native.js +9 -5
- package/build-module/components/floating-toolbar/index.native.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +1 -1
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +3 -1
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +17 -1
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +3 -2
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +24 -24
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +149 -132
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +44 -0
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +16 -2
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +13 -32
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +4 -0
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/category-tabs/index.js +49 -0
- package/build-module/components/inserter/category-tabs/index.js.map +1 -0
- package/build-module/components/inserter/media-tab/index.js +1 -1
- package/build-module/components/inserter/media-tab/index.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +0 -24
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js +13 -3
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +17 -31
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/menu.js +61 -71
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/tabs.js +6 -6
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/line-height-control/index.js +6 -2
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/link-control/search-item.js +9 -3
- package/build-module/components/link-control/search-item.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +7 -172
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +167 -15
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/index.js +1 -1
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/list-view/utils.js +3 -1
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +3 -3
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +3 -1
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/provider/block-refs-provider.js +3 -4
- package/build-module/components/provider/block-refs-provider.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js +4 -13
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/before-input-rules.js +86 -0
- package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/delete.js +51 -0
- package/build-module/components/rich-text/event-listeners/delete.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/enter.js +92 -0
- package/build-module/components/rich-text/event-listeners/enter.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/firefox-compat.js +29 -0
- package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/index.js +36 -0
- package/build-module/components/rich-text/event-listeners/index.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/input-events.js +15 -0
- package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/input-rules.js +127 -0
- package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +27 -0
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/paste-handler.js +142 -0
- package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +21 -0
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/shortcuts.js +15 -0
- package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
- package/build-module/components/rich-text/index.js +12 -32
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +13 -3
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/multiline.js +6 -2
- package/build-module/components/rich-text/multiline.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +12 -0
- package/build-module/components/rich-text/native/index.native.js.map +1 -1
- package/build-module/components/rich-text/use-format-types.js +8 -4
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/segmented-text-control/index.js +55 -0
- package/build-module/components/segmented-text-control/index.js.map +1 -0
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/text-alignment-control/index.js +68 -0
- package/build-module/components/text-alignment-control/index.js.map +1 -0
- package/build-module/components/text-decoration-control/index.js +21 -25
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +18 -22
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/use-block-display-information/index.js +9 -3
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js +3 -1
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/writing-flow/use-drag-selection.js +3 -1
- package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +3 -1
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/components/writing-mode-control/index.js +16 -20
- package/build-module/components/writing-mode-control/index.js.map +1 -1
- package/build-module/hooks/duotone.js +3 -1
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/utils.js +11 -6
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/private-apis.js +4 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +32 -8
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-selectors.js +27 -5
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +11 -8
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +21 -7
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/object.js +16 -0
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/order-inserter-block-items.js +6 -2
- package/build-module/utils/order-inserter-block-items.js.map +1 -1
- package/build-module/utils/pasting.js +6 -2
- package/build-module/utils/pasting.js.map +1 -1
- package/build-style/content-rtl.css +41 -68
- package/build-style/content.css +41 -68
- package/build-style/style-rtl.css +100 -199
- package/build-style/style.css +100 -199
- package/package.json +31 -31
- package/src/components/alignment-control/ui.js +3 -1
- package/src/components/block-bindings-toolbar-indicator/style.scss +1 -4
- package/src/components/block-canvas/style.scss +1 -3
- package/src/components/block-draggable/test/helpers.native.js +8 -8
- package/src/components/block-inspector/index.js +1 -2
- package/src/components/block-list/block.js +2 -13
- package/src/components/block-list/content.scss +9 -1
- package/src/components/block-list/index.js +4 -4
- package/src/components/block-list/index.native.js +1 -6
- package/src/components/block-list/use-block-props/index.js +12 -4
- package/src/components/block-list/use-block-props/use-block-refs.js +17 -57
- package/src/components/block-list/use-block-props/use-is-hovered.js +11 -16
- package/src/components/block-mover/index.native.js +3 -1
- package/src/components/block-patterns-list/style.scss +1 -3
- package/src/components/block-preview/style.scss +13 -15
- package/src/components/block-settings-menu/block-settings-dropdown.js +1 -51
- package/src/components/block-switcher/pattern-transformations-menu.js +3 -1
- package/src/components/block-switcher/use-transformed-patterns.js +6 -2
- package/src/components/block-switcher/utils.js +14 -5
- package/src/components/block-toolbar/style.scss +8 -11
- package/src/components/block-toolbar/use-has-block-toolbar.js +21 -16
- package/src/components/block-tools/index.js +3 -1
- package/src/components/block-tools/use-show-block-tools.js +36 -48
- package/src/components/block-tools/zoom-out-mode-inserters.js +5 -1
- package/src/components/block-variation-picker/content.scss +22 -72
- package/src/components/block-variation-picker/index.js +3 -2
- package/src/components/block-variation-transforms/index.js +3 -1
- package/src/components/floating-toolbar/index.native.js +5 -2
- package/src/components/global-styles/background-panel.js +1 -3
- package/src/components/global-styles/color-panel.js +3 -1
- package/src/components/global-styles/dimensions-panel.js +18 -1
- package/src/components/global-styles/hooks.js +2 -0
- package/src/components/global-styles/test/utils.js +21 -0
- package/src/components/global-styles/typography-panel.js +27 -23
- package/src/components/global-styles/use-global-styles-output.js +211 -187
- package/src/components/global-styles/utils.js +55 -0
- package/src/components/inner-blocks/index.js +14 -1
- package/src/components/inserter/block-patterns-tab/index.js +15 -65
- package/src/components/inserter/block-types-tab.js +5 -0
- package/src/components/inserter/category-tabs/index.js +74 -0
- package/src/components/inserter/media-tab/index.js +1 -1
- package/src/components/inserter/media-tab/media-panel.js +0 -22
- package/src/components/inserter/media-tab/media-preview.js +15 -7
- package/src/components/inserter/media-tab/media-tab.js +44 -83
- package/src/components/inserter/menu.js +139 -117
- package/src/components/inserter/style.scss +90 -170
- package/src/components/inserter/tabs.js +5 -13
- package/src/components/line-height-control/index.js +6 -2
- package/src/components/link-control/search-item.js +9 -3
- package/src/components/list-view/block-select-button.js +73 -266
- package/src/components/list-view/block.js +218 -28
- package/src/components/list-view/index.js +1 -1
- package/src/components/list-view/style.scss +20 -28
- package/src/components/list-view/use-list-view-drop-zone.js +1 -1
- package/src/components/list-view/utils.js +3 -1
- package/src/components/media-placeholder/content.scss +0 -11
- package/src/components/media-placeholder/index.js +3 -3
- package/src/components/navigable-toolbar/index.js +3 -1
- package/src/components/provider/block-refs-provider.js +3 -8
- package/src/components/provider/test/use-block-sync.js +7 -0
- package/src/components/provider/use-block-sync.js +3 -20
- package/src/components/rich-text/event-listeners/before-input-rules.js +92 -0
- package/src/components/rich-text/event-listeners/delete.js +53 -0
- package/src/components/rich-text/event-listeners/enter.js +104 -0
- package/src/components/rich-text/event-listeners/firefox-compat.js +31 -0
- package/src/components/rich-text/event-listeners/index.js +56 -0
- package/src/components/rich-text/event-listeners/input-events.js +13 -0
- package/src/components/rich-text/event-listeners/input-rules.js +146 -0
- package/src/components/rich-text/event-listeners/insert-replacement-text.js +28 -0
- package/src/components/rich-text/event-listeners/paste-handler.js +169 -0
- package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +24 -0
- package/src/components/rich-text/event-listeners/shortcuts.js +13 -0
- package/src/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
- package/src/components/rich-text/index.js +7 -34
- package/src/components/rich-text/index.native.js +11 -0
- package/src/components/rich-text/multiline.js +6 -2
- package/src/components/rich-text/native/index.native.js +11 -0
- package/src/components/rich-text/use-format-types.js +6 -2
- package/src/components/segmented-text-control/index.js +63 -0
- package/src/components/{writing-mode-control → segmented-text-control}/style.scss +2 -5
- package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -1
- package/src/components/text-alignment-control/index.js +91 -0
- package/src/components/text-alignment-control/stories/index.story.js +39 -0
- package/src/components/text-decoration-control/index.js +20 -33
- package/src/components/text-transform-control/index.js +17 -30
- package/src/components/use-block-display-information/index.js +9 -3
- package/src/components/use-on-block-drop/index.js +3 -1
- package/src/components/writing-flow/use-drag-selection.js +3 -1
- package/src/components/writing-flow/use-tab-nav.js +3 -1
- package/src/components/writing-mode-control/index.js +15 -28
- package/src/hooks/duotone.js +3 -1
- package/src/hooks/utils.js +16 -2
- package/src/private-apis.js +4 -2
- package/src/store/actions.js +36 -12
- package/src/store/private-selectors.js +28 -4
- package/src/store/reducer.js +13 -23
- package/src/store/selectors.js +20 -7
- package/src/style.scss +1 -2
- package/src/utils/object.js +16 -0
- package/src/utils/order-inserter-block-items.js +6 -2
- package/src/utils/pasting.js +6 -2
- package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -54
- package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
- package/build/components/rich-text/use-before-input-rules.js +0 -98
- package/build/components/rich-text/use-before-input-rules.js.map +0 -1
- package/build/components/rich-text/use-delete.js +0 -64
- package/build/components/rich-text/use-delete.js.map +0 -1
- package/build/components/rich-text/use-enter.js +0 -109
- package/build/components/rich-text/use-enter.js.map +0 -1
- package/build/components/rich-text/use-firefox-compat.js +0 -44
- package/build/components/rich-text/use-firefox-compat.js.map +0 -1
- package/build/components/rich-text/use-input-events.js +0 -25
- package/build/components/rich-text/use-input-events.js.map +0 -1
- package/build/components/rich-text/use-input-rules.js +0 -139
- package/build/components/rich-text/use-input-rules.js.map +0 -1
- package/build/components/rich-text/use-insert-replacement-text.js +0 -38
- package/build/components/rich-text/use-insert-replacement-text.js.map +0 -1
- package/build/components/rich-text/use-paste-handler.js +0 -158
- package/build/components/rich-text/use-paste-handler.js.map +0 -1
- package/build/components/rich-text/use-remove-browser-shortcuts.js +0 -32
- package/build/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
- package/build/components/rich-text/use-shortcuts.js +0 -25
- package/build/components/rich-text/use-shortcuts.js.map +0 -1
- package/build/components/rich-text/use-undo-automatic-change.js +0 -53
- package/build/components/rich-text/use-undo-automatic-change.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -47
- package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
- package/build-module/components/rich-text/use-before-input-rules.js +0 -92
- package/build-module/components/rich-text/use-before-input-rules.js.map +0 -1
- package/build-module/components/rich-text/use-delete.js +0 -57
- package/build-module/components/rich-text/use-delete.js.map +0 -1
- package/build-module/components/rich-text/use-enter.js +0 -102
- package/build-module/components/rich-text/use-enter.js.map +0 -1
- package/build-module/components/rich-text/use-firefox-compat.js +0 -37
- package/build-module/components/rich-text/use-firefox-compat.js.map +0 -1
- package/build-module/components/rich-text/use-input-events.js +0 -18
- package/build-module/components/rich-text/use-input-events.js.map +0 -1
- package/build-module/components/rich-text/use-input-rules.js +0 -132
- package/build-module/components/rich-text/use-input-rules.js.map +0 -1
- package/build-module/components/rich-text/use-insert-replacement-text.js +0 -32
- package/build-module/components/rich-text/use-insert-replacement-text.js.map +0 -1
- package/build-module/components/rich-text/use-paste-handler.js +0 -152
- package/build-module/components/rich-text/use-paste-handler.js.map +0 -1
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js +0 -26
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
- package/build-module/components/rich-text/use-shortcuts.js +0 -18
- package/build-module/components/rich-text/use-shortcuts.js.map +0 -1
- package/build-module/components/rich-text/use-undo-automatic-change.js +0 -46
- package/build-module/components/rich-text/use-undo-automatic-change.js.map +0 -1
- package/src/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -55
- package/src/components/rich-text/use-before-input-rules.js +0 -99
- package/src/components/rich-text/use-delete.js +0 -59
- package/src/components/rich-text/use-enter.js +0 -110
- package/src/components/rich-text/use-firefox-compat.js +0 -39
- package/src/components/rich-text/use-input-events.js +0 -19
- package/src/components/rich-text/use-input-rules.js +0 -150
- package/src/components/rich-text/use-insert-replacement-text.js +0 -31
- package/src/components/rich-text/use-paste-handler.js +0 -180
- package/src/components/rich-text/use-remove-browser-shortcuts.js +0 -29
- package/src/components/rich-text/use-shortcuts.js +0 -19
- package/src/components/rich-text/use-undo-automatic-change.js +0 -46
- package/src/components/text-decoration-control/style.scss +0 -18
- package/src/components/text-transform-control/style.scss +0 -18
|
@@ -51,4 +51,20 @@ export const getValueFromObjectPath = (object, path, defaultValue) => {
|
|
|
51
51
|
});
|
|
52
52
|
return (_value = value) !== null && _value !== void 0 ? _value : defaultValue;
|
|
53
53
|
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Helper util to filter out objects with duplicate values for a given property.
|
|
57
|
+
*
|
|
58
|
+
* @param {Object[]} array Array of objects to filter.
|
|
59
|
+
* @param {string} property Property to filter unique values by.
|
|
60
|
+
*
|
|
61
|
+
* @return {Object[]} Array of objects with unique values for the specified property.
|
|
62
|
+
*/
|
|
63
|
+
export function uniqByProperty(array, property) {
|
|
64
|
+
const seen = new Set();
|
|
65
|
+
return array.filter(item => {
|
|
66
|
+
const value = item[property];
|
|
67
|
+
return seen.has(value) ? false : seen.add(value);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
54
70
|
//# sourceMappingURL=object.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["setImmutably","object","path","value","Array","isArray","leaf","pop","prev","key","lvl","getValueFromObjectPath","defaultValue","_value","arrayPath","split","forEach","fieldName"],"sources":["@wordpress/block-editor/src/utils/object.js"],"sourcesContent":["/**\n * Immutably sets a value inside an object. Like `lodash#set`, but returning a\n * new object. Treats nullish initial values as empty objects. Clones any\n * nested objects. Supports arrays, too.\n *\n * @param {Object} object Object to set a value in.\n * @param {number|string|Array} path Path in the object to modify.\n * @param {*} value New value to set.\n * @return {Object} Cloned object with the new value set.\n */\nexport function setImmutably( object, path, value ) {\n\t// Normalize path\n\tpath = Array.isArray( path ) ? [ ...path ] : [ path ];\n\n\t// Shallowly clone the base of the object\n\tobject = Array.isArray( object ) ? [ ...object ] : { ...object };\n\n\tconst leaf = path.pop();\n\n\t// Traverse object from root to leaf, shallowly cloning at each level\n\tlet prev = object;\n\tfor ( const key of path ) {\n\t\tconst lvl = prev[ key ];\n\t\tprev = prev[ key ] = Array.isArray( lvl ) ? [ ...lvl ] : { ...lvl };\n\t}\n\n\tprev[ leaf ] = value;\n\n\treturn object;\n}\n\n/**\n * Helper util to return a value from a certain path of the object.\n * Path is specified as either:\n * - a string of properties, separated by dots, for example: \"x.y\".\n * - an array of properties, for example `[ 'x', 'y' ]`.\n * You can also specify a default value in case the result is nullish.\n *\n * @param {Object} object Input object.\n * @param {string|Array} path Path to the object property.\n * @param {*} defaultValue Default value if the value at the specified path is nullish.\n * @return {*} Value of the object property at the specified path.\n */\nexport const getValueFromObjectPath = ( object, path, defaultValue ) => {\n\tconst arrayPath = Array.isArray( path ) ? path : path.split( '.' );\n\tlet value = object;\n\tarrayPath.forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value ?? defaultValue;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,YAAYA,CAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAG;EACnD;EACAD,IAAI,GAAGE,KAAK,CAACC,OAAO,CAAEH,IAAK,CAAC,GAAG,CAAE,GAAGA,IAAI,CAAE,GAAG,CAAEA,IAAI,CAAE;;EAErD;EACAD,MAAM,GAAGG,KAAK,CAACC,OAAO,CAAEJ,MAAO,CAAC,GAAG,CAAE,GAAGA,MAAM,CAAE,GAAG;IAAE,GAAGA;EAAO,CAAC;EAEhE,MAAMK,IAAI,GAAGJ,IAAI,CAACK,GAAG,CAAC,CAAC;;EAEvB;EACA,IAAIC,IAAI,GAAGP,MAAM;EACjB,KAAM,MAAMQ,GAAG,IAAIP,IAAI,EAAG;IACzB,MAAMQ,GAAG,GAAGF,IAAI,CAAEC,GAAG,CAAE;IACvBD,IAAI,GAAGA,IAAI,CAAEC,GAAG,CAAE,GAAGL,KAAK,CAACC,OAAO,CAAEK,GAAI,CAAC,GAAG,CAAE,GAAGA,GAAG,CAAE,GAAG;MAAE,GAAGA;IAAI,CAAC;EACpE;EAEAF,IAAI,CAAEF,IAAI,CAAE,GAAGH,KAAK;EAEpB,OAAOF,MAAM;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMU,sBAAsB,GAAGA,CAAEV,MAAM,EAAEC,IAAI,EAAEU,YAAY,KAAM;EAAA,IAAAC,MAAA;EACvE,MAAMC,SAAS,GAAGV,KAAK,CAACC,OAAO,CAAEH,IAAK,CAAC,GAAGA,IAAI,GAAGA,IAAI,CAACa,KAAK,CAAE,GAAI,CAAC;EAClE,IAAIZ,KAAK,GAAGF,MAAM;EAClBa,SAAS,CAACE,OAAO,CAAIC,SAAS,IAAM;IACnCd,KAAK,GAAGA,KAAK,GAAIc,SAAS,CAAE;EAC7B,CAAE,CAAC;EACH,QAAAJ,MAAA,GAAOV,KAAK,cAAAU,MAAA,cAAAA,MAAA,GAAID,YAAY;AAC7B,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["setImmutably","object","path","value","Array","isArray","leaf","pop","prev","key","lvl","getValueFromObjectPath","defaultValue","_value","arrayPath","split","forEach","fieldName","uniqByProperty","array","property","seen","Set","filter","item","has","add"],"sources":["@wordpress/block-editor/src/utils/object.js"],"sourcesContent":["/**\n * Immutably sets a value inside an object. Like `lodash#set`, but returning a\n * new object. Treats nullish initial values as empty objects. Clones any\n * nested objects. Supports arrays, too.\n *\n * @param {Object} object Object to set a value in.\n * @param {number|string|Array} path Path in the object to modify.\n * @param {*} value New value to set.\n * @return {Object} Cloned object with the new value set.\n */\nexport function setImmutably( object, path, value ) {\n\t// Normalize path\n\tpath = Array.isArray( path ) ? [ ...path ] : [ path ];\n\n\t// Shallowly clone the base of the object\n\tobject = Array.isArray( object ) ? [ ...object ] : { ...object };\n\n\tconst leaf = path.pop();\n\n\t// Traverse object from root to leaf, shallowly cloning at each level\n\tlet prev = object;\n\tfor ( const key of path ) {\n\t\tconst lvl = prev[ key ];\n\t\tprev = prev[ key ] = Array.isArray( lvl ) ? [ ...lvl ] : { ...lvl };\n\t}\n\n\tprev[ leaf ] = value;\n\n\treturn object;\n}\n\n/**\n * Helper util to return a value from a certain path of the object.\n * Path is specified as either:\n * - a string of properties, separated by dots, for example: \"x.y\".\n * - an array of properties, for example `[ 'x', 'y' ]`.\n * You can also specify a default value in case the result is nullish.\n *\n * @param {Object} object Input object.\n * @param {string|Array} path Path to the object property.\n * @param {*} defaultValue Default value if the value at the specified path is nullish.\n * @return {*} Value of the object property at the specified path.\n */\nexport const getValueFromObjectPath = ( object, path, defaultValue ) => {\n\tconst arrayPath = Array.isArray( path ) ? path : path.split( '.' );\n\tlet value = object;\n\tarrayPath.forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value ?? defaultValue;\n};\n\n/**\n * Helper util to filter out objects with duplicate values for a given property.\n *\n * @param {Object[]} array Array of objects to filter.\n * @param {string} property Property to filter unique values by.\n *\n * @return {Object[]} Array of objects with unique values for the specified property.\n */\nexport function uniqByProperty( array, property ) {\n\tconst seen = new Set();\n\treturn array.filter( ( item ) => {\n\t\tconst value = item[ property ];\n\t\treturn seen.has( value ) ? false : seen.add( value );\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,YAAYA,CAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAG;EACnD;EACAD,IAAI,GAAGE,KAAK,CAACC,OAAO,CAAEH,IAAK,CAAC,GAAG,CAAE,GAAGA,IAAI,CAAE,GAAG,CAAEA,IAAI,CAAE;;EAErD;EACAD,MAAM,GAAGG,KAAK,CAACC,OAAO,CAAEJ,MAAO,CAAC,GAAG,CAAE,GAAGA,MAAM,CAAE,GAAG;IAAE,GAAGA;EAAO,CAAC;EAEhE,MAAMK,IAAI,GAAGJ,IAAI,CAACK,GAAG,CAAC,CAAC;;EAEvB;EACA,IAAIC,IAAI,GAAGP,MAAM;EACjB,KAAM,MAAMQ,GAAG,IAAIP,IAAI,EAAG;IACzB,MAAMQ,GAAG,GAAGF,IAAI,CAAEC,GAAG,CAAE;IACvBD,IAAI,GAAGA,IAAI,CAAEC,GAAG,CAAE,GAAGL,KAAK,CAACC,OAAO,CAAEK,GAAI,CAAC,GAAG,CAAE,GAAGA,GAAG,CAAE,GAAG;MAAE,GAAGA;IAAI,CAAC;EACpE;EAEAF,IAAI,CAAEF,IAAI,CAAE,GAAGH,KAAK;EAEpB,OAAOF,MAAM;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMU,sBAAsB,GAAGA,CAAEV,MAAM,EAAEC,IAAI,EAAEU,YAAY,KAAM;EAAA,IAAAC,MAAA;EACvE,MAAMC,SAAS,GAAGV,KAAK,CAACC,OAAO,CAAEH,IAAK,CAAC,GAAGA,IAAI,GAAGA,IAAI,CAACa,KAAK,CAAE,GAAI,CAAC;EAClE,IAAIZ,KAAK,GAAGF,MAAM;EAClBa,SAAS,CAACE,OAAO,CAAIC,SAAS,IAAM;IACnCd,KAAK,GAAGA,KAAK,GAAIc,SAAS,CAAE;EAC7B,CAAE,CAAC;EACH,QAAAJ,MAAA,GAAOV,KAAK,cAAAU,MAAA,cAAAA,MAAA,GAAID,YAAY;AAC7B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,cAAcA,CAAEC,KAAK,EAAEC,QAAQ,EAAG;EACjD,MAAMC,IAAI,GAAG,IAAIC,GAAG,CAAC,CAAC;EACtB,OAAOH,KAAK,CAACI,MAAM,CAAIC,IAAI,IAAM;IAChC,MAAMrB,KAAK,GAAGqB,IAAI,CAAEJ,QAAQ,CAAE;IAC9B,OAAOC,IAAI,CAACI,GAAG,CAAEtB,KAAM,CAAC,GAAG,KAAK,GAAGkB,IAAI,CAACK,GAAG,CAAEvB,KAAM,CAAC;EACrD,CAAE,CAAC;AACJ","ignoreList":[]}
|
|
@@ -20,8 +20,12 @@ export const orderInserterBlockItems = (items, priority) => {
|
|
|
20
20
|
let aIndex = priority.indexOf(aName);
|
|
21
21
|
let bIndex = priority.indexOf(bName);
|
|
22
22
|
// All other block items should come after that.
|
|
23
|
-
if (aIndex < 0)
|
|
24
|
-
|
|
23
|
+
if (aIndex < 0) {
|
|
24
|
+
aIndex = priority.length;
|
|
25
|
+
}
|
|
26
|
+
if (bIndex < 0) {
|
|
27
|
+
bIndex = priority.length;
|
|
28
|
+
}
|
|
25
29
|
return aIndex - bIndex;
|
|
26
30
|
});
|
|
27
31
|
return items;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["orderInserterBlockItems","items","priority","sort","id","aName","bName","aIndex","indexOf","bIndex","length"],"sources":["@wordpress/block-editor/src/utils/order-inserter-block-items.js"],"sourcesContent":["/** @typedef {import('../store/selectors').WPEditorInserterItem} WPEditorInserterItem */\n\n/**\n * Helper function to order inserter block items according to a provided array of prioritized blocks.\n *\n * @param {WPEditorInserterItem[]} items The array of editor inserter block items to be sorted.\n * @param {string[]} priority The array of block names to be prioritized.\n * @return {WPEditorInserterItem[]} The sorted array of editor inserter block items.\n */\nexport const orderInserterBlockItems = ( items, priority ) => {\n\tif ( ! priority ) {\n\t\treturn items;\n\t}\n\n\titems.sort( ( { id: aName }, { id: bName } ) => {\n\t\t// Sort block items according to `priority`.\n\t\tlet aIndex = priority.indexOf( aName );\n\t\tlet bIndex = priority.indexOf( bName );\n\t\t// All other block items should come after that.\n\t\tif ( aIndex < 0 )
|
|
1
|
+
{"version":3,"names":["orderInserterBlockItems","items","priority","sort","id","aName","bName","aIndex","indexOf","bIndex","length"],"sources":["@wordpress/block-editor/src/utils/order-inserter-block-items.js"],"sourcesContent":["/** @typedef {import('../store/selectors').WPEditorInserterItem} WPEditorInserterItem */\n\n/**\n * Helper function to order inserter block items according to a provided array of prioritized blocks.\n *\n * @param {WPEditorInserterItem[]} items The array of editor inserter block items to be sorted.\n * @param {string[]} priority The array of block names to be prioritized.\n * @return {WPEditorInserterItem[]} The sorted array of editor inserter block items.\n */\nexport const orderInserterBlockItems = ( items, priority ) => {\n\tif ( ! priority ) {\n\t\treturn items;\n\t}\n\n\titems.sort( ( { id: aName }, { id: bName } ) => {\n\t\t// Sort block items according to `priority`.\n\t\tlet aIndex = priority.indexOf( aName );\n\t\tlet bIndex = priority.indexOf( bName );\n\t\t// All other block items should come after that.\n\t\tif ( aIndex < 0 ) {\n\t\t\taIndex = priority.length;\n\t\t}\n\t\tif ( bIndex < 0 ) {\n\t\t\tbIndex = priority.length;\n\t\t}\n\t\treturn aIndex - bIndex;\n\t} );\n\n\treturn items;\n};\n"],"mappings":"AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,uBAAuB,GAAGA,CAAEC,KAAK,EAAEC,QAAQ,KAAM;EAC7D,IAAK,CAAEA,QAAQ,EAAG;IACjB,OAAOD,KAAK;EACb;EAEAA,KAAK,CAACE,IAAI,CAAE,CAAE;IAAEC,EAAE,EAAEC;EAAM,CAAC,EAAE;IAAED,EAAE,EAAEE;EAAM,CAAC,KAAM;IAC/C;IACA,IAAIC,MAAM,GAAGL,QAAQ,CAACM,OAAO,CAAEH,KAAM,CAAC;IACtC,IAAII,MAAM,GAAGP,QAAQ,CAACM,OAAO,CAAEF,KAAM,CAAC;IACtC;IACA,IAAKC,MAAM,GAAG,CAAC,EAAG;MACjBA,MAAM,GAAGL,QAAQ,CAACQ,MAAM;IACzB;IACA,IAAKD,MAAM,GAAG,CAAC,EAAG;MACjBA,MAAM,GAAGP,QAAQ,CAACQ,MAAM;IACzB;IACA,OAAOH,MAAM,GAAGE,MAAM;EACvB,CAAE,CAAC;EAEH,OAAOR,KAAK;AACb,CAAC","ignoreList":[]}
|
|
@@ -108,7 +108,9 @@ export function shouldDismissPastedFiles(files, html /*, plainText */) {
|
|
|
108
108
|
// other elements found, like <figure>, but we assume that the user's
|
|
109
109
|
// intention is to paste the actual image file.
|
|
110
110
|
const IMAGE_TAG = /<\s*img\b/gi;
|
|
111
|
-
if (html.match(IMAGE_TAG)?.length !== 1)
|
|
111
|
+
if (html.match(IMAGE_TAG)?.length !== 1) {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
112
114
|
|
|
113
115
|
// Even when there is exactly one <img> tag in the HTML payload, we
|
|
114
116
|
// choose to weed out local images, i.e. those whose source starts with
|
|
@@ -117,7 +119,9 @@ export function shouldDismissPastedFiles(files, html /*, plainText */) {
|
|
|
117
119
|
// text and exactly one image, and pasting that content using Google
|
|
118
120
|
// Chrome.
|
|
119
121
|
const IMG_WITH_LOCAL_SRC = /<\s*img\b[^>]*\bsrc="file:\/\//i;
|
|
120
|
-
if (html.match(IMG_WITH_LOCAL_SRC))
|
|
122
|
+
if (html.match(IMG_WITH_LOCAL_SRC)) {
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
121
125
|
}
|
|
122
126
|
return false;
|
|
123
127
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getFilesFromDataTransfer","removeWindowsFragments","html","startStr","startIdx","indexOf","substring","length","endStr","endIdx","removeCharsetMetaTag","metaTag","startsWith","slice","getPasteEventData","clipboardData","plainText","getData","error1","error2","files","shouldDismissPastedFiles","type","IMAGE_TAG","match","IMG_WITH_LOCAL_SRC"],"sources":["@wordpress/block-editor/src/utils/pasting.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getFilesFromDataTransfer } from '@wordpress/dom';\n\n/**\n * Normalizes a given string of HTML to remove the Windows-specific \"Fragment\"\n * comments and any preceding and trailing content.\n *\n * @param {string} html the html to be normalized\n * @return {string} the normalized html\n */\nfunction removeWindowsFragments( html ) {\n\tconst startStr = '<!--StartFragment-->';\n\tconst startIdx = html.indexOf( startStr );\n\tif ( startIdx > -1 ) {\n\t\thtml = html.substring( startIdx + startStr.length );\n\t} else {\n\t\t// No point looking for EndFragment\n\t\treturn html;\n\t}\n\n\tconst endStr = '<!--EndFragment-->';\n\tconst endIdx = html.indexOf( endStr );\n\tif ( endIdx > -1 ) {\n\t\thtml = html.substring( 0, endIdx );\n\t}\n\n\treturn html;\n}\n\n/**\n * Removes the charset meta tag inserted by Chromium.\n * See:\n * - https://github.com/WordPress/gutenberg/issues/33585\n * - https://bugs.chromium.org/p/chromium/issues/detail?id=1264616#c4\n *\n * @param {string} html the html to be stripped of the meta tag.\n * @return {string} the cleaned html\n */\nfunction removeCharsetMetaTag( html ) {\n\tconst metaTag = `<meta charset='utf-8'>`;\n\n\tif ( html.startsWith( metaTag ) ) {\n\t\treturn html.slice( metaTag.length );\n\t}\n\n\treturn html;\n}\n\nexport function getPasteEventData( { clipboardData } ) {\n\tlet plainText = '';\n\tlet html = '';\n\n\t// IE11 only supports `Text` as an argument for `getData` and will\n\t// otherwise throw an invalid argument error, so we try the standard\n\t// arguments first, then fallback to `Text` if they fail.\n\ttry {\n\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\thtml = clipboardData.getData( 'text/html' );\n\t} catch ( error1 ) {\n\t\ttry {\n\t\t\thtml = clipboardData.getData( 'Text' );\n\t\t} catch ( error2 ) {\n\t\t\t// Some browsers like UC Browser paste plain text by default and\n\t\t\t// don't support clipboardData at all, so allow default\n\t\t\t// behaviour.\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Remove Windows-specific metadata appended within copied HTML text.\n\thtml = removeWindowsFragments( html );\n\n\t// Strip meta tag.\n\thtml = removeCharsetMetaTag( html );\n\n\tconst files = getFilesFromDataTransfer( clipboardData );\n\n\tif ( files.length && ! shouldDismissPastedFiles( files, html ) ) {\n\t\treturn { files };\n\t}\n\n\treturn { html, plainText, files: [] };\n}\n\n/**\n * Given a collection of DataTransfer files and HTML and plain text strings,\n * determine whether the files are to be dismissed in favor of the HTML.\n *\n * Certain office-type programs, like Microsoft Word or Apple Numbers,\n * will, upon copy, generate a screenshot of the content being copied and\n * attach it to the clipboard alongside the actual rich text that the user\n * sought to copy. In those cases, we should let Gutenberg handle the rich text\n * content and not the screenshot, since this allows Gutenberg to insert\n * meaningful blocks, like paragraphs, lists or even tables.\n *\n * @param {File[]} files File objects obtained from a paste event\n * @param {string} html HTML content obtained from a paste event\n * @return {boolean} True if the files should be dismissed\n */\nexport function shouldDismissPastedFiles( files, html /*, plainText */ ) {\n\t// The question is only relevant when there is actual HTML content and when\n\t// there is exactly one image file.\n\tif (\n\t\thtml &&\n\t\tfiles?.length === 1 &&\n\t\tfiles[ 0 ].type.indexOf( 'image/' ) === 0\n\t) {\n\t\t// A single <img> tag found in the HTML source suggests that the\n\t\t// content being pasted revolves around an image. Sometimes there are\n\t\t// other elements found, like <figure>, but we assume that the user's\n\t\t// intention is to paste the actual image file.\n\t\tconst IMAGE_TAG = /<\\s*img\\b/gi;\n\t\tif ( html.match( IMAGE_TAG )?.length !== 1 )
|
|
1
|
+
{"version":3,"names":["getFilesFromDataTransfer","removeWindowsFragments","html","startStr","startIdx","indexOf","substring","length","endStr","endIdx","removeCharsetMetaTag","metaTag","startsWith","slice","getPasteEventData","clipboardData","plainText","getData","error1","error2","files","shouldDismissPastedFiles","type","IMAGE_TAG","match","IMG_WITH_LOCAL_SRC"],"sources":["@wordpress/block-editor/src/utils/pasting.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getFilesFromDataTransfer } from '@wordpress/dom';\n\n/**\n * Normalizes a given string of HTML to remove the Windows-specific \"Fragment\"\n * comments and any preceding and trailing content.\n *\n * @param {string} html the html to be normalized\n * @return {string} the normalized html\n */\nfunction removeWindowsFragments( html ) {\n\tconst startStr = '<!--StartFragment-->';\n\tconst startIdx = html.indexOf( startStr );\n\tif ( startIdx > -1 ) {\n\t\thtml = html.substring( startIdx + startStr.length );\n\t} else {\n\t\t// No point looking for EndFragment\n\t\treturn html;\n\t}\n\n\tconst endStr = '<!--EndFragment-->';\n\tconst endIdx = html.indexOf( endStr );\n\tif ( endIdx > -1 ) {\n\t\thtml = html.substring( 0, endIdx );\n\t}\n\n\treturn html;\n}\n\n/**\n * Removes the charset meta tag inserted by Chromium.\n * See:\n * - https://github.com/WordPress/gutenberg/issues/33585\n * - https://bugs.chromium.org/p/chromium/issues/detail?id=1264616#c4\n *\n * @param {string} html the html to be stripped of the meta tag.\n * @return {string} the cleaned html\n */\nfunction removeCharsetMetaTag( html ) {\n\tconst metaTag = `<meta charset='utf-8'>`;\n\n\tif ( html.startsWith( metaTag ) ) {\n\t\treturn html.slice( metaTag.length );\n\t}\n\n\treturn html;\n}\n\nexport function getPasteEventData( { clipboardData } ) {\n\tlet plainText = '';\n\tlet html = '';\n\n\t// IE11 only supports `Text` as an argument for `getData` and will\n\t// otherwise throw an invalid argument error, so we try the standard\n\t// arguments first, then fallback to `Text` if they fail.\n\ttry {\n\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\thtml = clipboardData.getData( 'text/html' );\n\t} catch ( error1 ) {\n\t\ttry {\n\t\t\thtml = clipboardData.getData( 'Text' );\n\t\t} catch ( error2 ) {\n\t\t\t// Some browsers like UC Browser paste plain text by default and\n\t\t\t// don't support clipboardData at all, so allow default\n\t\t\t// behaviour.\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Remove Windows-specific metadata appended within copied HTML text.\n\thtml = removeWindowsFragments( html );\n\n\t// Strip meta tag.\n\thtml = removeCharsetMetaTag( html );\n\n\tconst files = getFilesFromDataTransfer( clipboardData );\n\n\tif ( files.length && ! shouldDismissPastedFiles( files, html ) ) {\n\t\treturn { files };\n\t}\n\n\treturn { html, plainText, files: [] };\n}\n\n/**\n * Given a collection of DataTransfer files and HTML and plain text strings,\n * determine whether the files are to be dismissed in favor of the HTML.\n *\n * Certain office-type programs, like Microsoft Word or Apple Numbers,\n * will, upon copy, generate a screenshot of the content being copied and\n * attach it to the clipboard alongside the actual rich text that the user\n * sought to copy. In those cases, we should let Gutenberg handle the rich text\n * content and not the screenshot, since this allows Gutenberg to insert\n * meaningful blocks, like paragraphs, lists or even tables.\n *\n * @param {File[]} files File objects obtained from a paste event\n * @param {string} html HTML content obtained from a paste event\n * @return {boolean} True if the files should be dismissed\n */\nexport function shouldDismissPastedFiles( files, html /*, plainText */ ) {\n\t// The question is only relevant when there is actual HTML content and when\n\t// there is exactly one image file.\n\tif (\n\t\thtml &&\n\t\tfiles?.length === 1 &&\n\t\tfiles[ 0 ].type.indexOf( 'image/' ) === 0\n\t) {\n\t\t// A single <img> tag found in the HTML source suggests that the\n\t\t// content being pasted revolves around an image. Sometimes there are\n\t\t// other elements found, like <figure>, but we assume that the user's\n\t\t// intention is to paste the actual image file.\n\t\tconst IMAGE_TAG = /<\\s*img\\b/gi;\n\t\tif ( html.match( IMAGE_TAG )?.length !== 1 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Even when there is exactly one <img> tag in the HTML payload, we\n\t\t// choose to weed out local images, i.e. those whose source starts with\n\t\t// \"file://\". These payloads occur in specific configurations, such as\n\t\t// when copying an entire document from Microsoft Word, that contains\n\t\t// text and exactly one image, and pasting that content using Google\n\t\t// Chrome.\n\t\tconst IMG_WITH_LOCAL_SRC = /<\\s*img\\b[^>]*\\bsrc=\"file:\\/\\//i;\n\t\tif ( html.match( IMG_WITH_LOCAL_SRC ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,wBAAwB,QAAQ,gBAAgB;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,sBAAsBA,CAAEC,IAAI,EAAG;EACvC,MAAMC,QAAQ,GAAG,sBAAsB;EACvC,MAAMC,QAAQ,GAAGF,IAAI,CAACG,OAAO,CAAEF,QAAS,CAAC;EACzC,IAAKC,QAAQ,GAAG,CAAC,CAAC,EAAG;IACpBF,IAAI,GAAGA,IAAI,CAACI,SAAS,CAAEF,QAAQ,GAAGD,QAAQ,CAACI,MAAO,CAAC;EACpD,CAAC,MAAM;IACN;IACA,OAAOL,IAAI;EACZ;EAEA,MAAMM,MAAM,GAAG,oBAAoB;EACnC,MAAMC,MAAM,GAAGP,IAAI,CAACG,OAAO,CAAEG,MAAO,CAAC;EACrC,IAAKC,MAAM,GAAG,CAAC,CAAC,EAAG;IAClBP,IAAI,GAAGA,IAAI,CAACI,SAAS,CAAE,CAAC,EAAEG,MAAO,CAAC;EACnC;EAEA,OAAOP,IAAI;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASQ,oBAAoBA,CAAER,IAAI,EAAG;EACrC,MAAMS,OAAO,GAAI,wBAAuB;EAExC,IAAKT,IAAI,CAACU,UAAU,CAAED,OAAQ,CAAC,EAAG;IACjC,OAAOT,IAAI,CAACW,KAAK,CAAEF,OAAO,CAACJ,MAAO,CAAC;EACpC;EAEA,OAAOL,IAAI;AACZ;AAEA,OAAO,SAASY,iBAAiBA,CAAE;EAAEC;AAAc,CAAC,EAAG;EACtD,IAAIC,SAAS,GAAG,EAAE;EAClB,IAAId,IAAI,GAAG,EAAE;;EAEb;EACA;EACA;EACA,IAAI;IACHc,SAAS,GAAGD,aAAa,CAACE,OAAO,CAAE,YAAa,CAAC;IACjDf,IAAI,GAAGa,aAAa,CAACE,OAAO,CAAE,WAAY,CAAC;EAC5C,CAAC,CAAC,OAAQC,MAAM,EAAG;IAClB,IAAI;MACHhB,IAAI,GAAGa,aAAa,CAACE,OAAO,CAAE,MAAO,CAAC;IACvC,CAAC,CAAC,OAAQE,MAAM,EAAG;MAClB;MACA;MACA;MACA;IACD;EACD;;EAEA;EACAjB,IAAI,GAAGD,sBAAsB,CAAEC,IAAK,CAAC;;EAErC;EACAA,IAAI,GAAGQ,oBAAoB,CAAER,IAAK,CAAC;EAEnC,MAAMkB,KAAK,GAAGpB,wBAAwB,CAAEe,aAAc,CAAC;EAEvD,IAAKK,KAAK,CAACb,MAAM,IAAI,CAAEc,wBAAwB,CAAED,KAAK,EAAElB,IAAK,CAAC,EAAG;IAChE,OAAO;MAAEkB;IAAM,CAAC;EACjB;EAEA,OAAO;IAAElB,IAAI;IAAEc,SAAS;IAAEI,KAAK,EAAE;EAAG,CAAC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAAED,KAAK,EAAElB,IAAI,CAAC,kBAAmB;EACxE;EACA;EACA,IACCA,IAAI,IACJkB,KAAK,EAAEb,MAAM,KAAK,CAAC,IACnBa,KAAK,CAAE,CAAC,CAAE,CAACE,IAAI,CAACjB,OAAO,CAAE,QAAS,CAAC,KAAK,CAAC,EACxC;IACD;IACA;IACA;IACA;IACA,MAAMkB,SAAS,GAAG,aAAa;IAC/B,IAAKrB,IAAI,CAACsB,KAAK,CAAED,SAAU,CAAC,EAAEhB,MAAM,KAAK,CAAC,EAAG;MAC5C,OAAO,IAAI;IACZ;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA,MAAMkB,kBAAkB,GAAG,iCAAiC;IAC5D,IAAKvB,IAAI,CAACsB,KAAK,CAAEC,kBAAmB,CAAC,EAAG;MACvC,OAAO,IAAI;IACZ;EACD;EAEA,OAAO,KAAK;AACb","ignoreList":[]}
|
|
@@ -255,6 +255,9 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
255
255
|
-webkit-user-select: none;
|
|
256
256
|
user-select: none;
|
|
257
257
|
}
|
|
258
|
+
.block-editor-block-list__layout .block-editor-block-list__block.has-negative-margin.is-selected, .block-editor-block-list__layout .block-editor-block-list__block.has-negative-margin.has-child-selected {
|
|
259
|
+
z-index: 20;
|
|
260
|
+
}
|
|
258
261
|
.block-editor-block-list__layout .block-editor-block-list__block .reusable-block-edit-panel * {
|
|
259
262
|
z-index: 1;
|
|
260
263
|
}
|
|
@@ -305,10 +308,10 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
305
308
|
float: none;
|
|
306
309
|
}
|
|
307
310
|
|
|
308
|
-
.is-outline-mode .block-editor-block-list__block
|
|
311
|
+
.is-outline-mode .block-editor-block-list__block.is-hovered {
|
|
309
312
|
cursor: default;
|
|
310
313
|
}
|
|
311
|
-
.is-outline-mode .block-editor-block-list__block
|
|
314
|
+
.is-outline-mode .block-editor-block-list__block.is-hovered::after {
|
|
312
315
|
content: "";
|
|
313
316
|
position: absolute;
|
|
314
317
|
pointer-events: none;
|
|
@@ -319,13 +322,13 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
319
322
|
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
|
320
323
|
border-radius: 1px;
|
|
321
324
|
}
|
|
322
|
-
.is-outline-mode .block-editor-block-list__block
|
|
325
|
+
.is-outline-mode .block-editor-block-list__block.is-selected {
|
|
323
326
|
cursor: default;
|
|
324
327
|
}
|
|
325
|
-
.is-outline-mode .block-editor-block-list__block
|
|
328
|
+
.is-outline-mode .block-editor-block-list__block.is-selected.rich-text {
|
|
326
329
|
cursor: unset;
|
|
327
330
|
}
|
|
328
|
-
.is-outline-mode .block-editor-block-list__block
|
|
331
|
+
.is-outline-mode .block-editor-block-list__block.is-selected::after {
|
|
329
332
|
content: "";
|
|
330
333
|
position: absolute;
|
|
331
334
|
pointer-events: none;
|
|
@@ -607,70 +610,48 @@ body.is-zoomed-out > .is-root-container > main {
|
|
|
607
610
|
display: none;
|
|
608
611
|
}
|
|
609
612
|
|
|
610
|
-
.block-editor-block-variation-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
flex-direction: column;
|
|
615
|
-
}
|
|
616
|
-
.block-editor-block-variation-picker.has-many-variations .components-placeholder__fieldset {
|
|
617
|
-
max-width: 90%;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations {
|
|
613
|
+
.block-editor-block-variation-picker__variations,
|
|
614
|
+
.block-editor-block-variation-picker__skip,
|
|
615
|
+
.wp-block-group-placeholder__variations {
|
|
616
|
+
list-style: none;
|
|
621
617
|
display: flex;
|
|
622
618
|
justify-content: flex-start;
|
|
623
619
|
flex-direction: row;
|
|
624
620
|
flex-wrap: wrap;
|
|
625
621
|
width: 100%;
|
|
626
|
-
margin: 16px 0;
|
|
627
622
|
padding: 0;
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations > li {
|
|
631
|
-
list-style: none;
|
|
632
|
-
margin: 8px 0 0 20px;
|
|
633
|
-
flex-shrink: 1;
|
|
634
|
-
width: 75px;
|
|
635
|
-
text-align: center;
|
|
636
|
-
}
|
|
637
|
-
.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations > li button {
|
|
638
|
-
display: inline-flex;
|
|
639
|
-
margin-left: 0;
|
|
640
|
-
}
|
|
641
|
-
.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations .block-editor-block-variation-picker__variation {
|
|
642
|
-
padding: 8px;
|
|
643
|
-
}
|
|
644
|
-
.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations .block-editor-block-variation-picker__variation-label {
|
|
645
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
623
|
+
margin: 0;
|
|
624
|
+
gap: 8px;
|
|
646
625
|
font-size: 12px;
|
|
647
|
-
display: block;
|
|
648
|
-
line-height: 1.4;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
.block-editor-block-variation-picker__variation {
|
|
652
|
-
width: 100%;
|
|
653
626
|
}
|
|
654
|
-
.block-editor-block-variation-
|
|
655
|
-
|
|
627
|
+
.block-editor-block-variation-picker__variations svg,
|
|
628
|
+
.block-editor-block-variation-picker__skip svg,
|
|
629
|
+
.wp-block-group-placeholder__variations svg {
|
|
630
|
+
fill: #ccc !important;
|
|
631
|
+
}
|
|
632
|
+
.block-editor-block-variation-picker__variations .components-button,
|
|
633
|
+
.block-editor-block-variation-picker__skip .components-button,
|
|
634
|
+
.wp-block-group-placeholder__variations .components-button {
|
|
635
|
+
padding: 4px;
|
|
636
|
+
}
|
|
637
|
+
.block-editor-block-variation-picker__variations .components-button:hover,
|
|
638
|
+
.block-editor-block-variation-picker__skip .components-button:hover,
|
|
639
|
+
.wp-block-group-placeholder__variations .components-button:hover {
|
|
640
|
+
background: none !important;
|
|
641
|
+
}
|
|
642
|
+
.block-editor-block-variation-picker__variations .components-button:hover svg,
|
|
643
|
+
.block-editor-block-variation-picker__skip .components-button:hover svg,
|
|
644
|
+
.wp-block-group-placeholder__variations .components-button:hover svg {
|
|
645
|
+
fill: var(--wp-admin-theme-color) !important;
|
|
646
|
+
}
|
|
647
|
+
.block-editor-block-variation-picker__variations > li,
|
|
648
|
+
.block-editor-block-variation-picker__skip > li,
|
|
649
|
+
.wp-block-group-placeholder__variations > li {
|
|
656
650
|
width: auto;
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
.block-editor-block-variation-picker__variation.components-button {
|
|
662
|
-
height: auto;
|
|
663
|
-
padding: 0;
|
|
664
|
-
}
|
|
665
|
-
.block-editor-block-variation-picker__variation::before {
|
|
666
|
-
content: "";
|
|
667
|
-
padding-bottom: 100%;
|
|
668
|
-
}
|
|
669
|
-
.block-editor-block-variation-picker__variation:first-child {
|
|
670
|
-
margin-right: 0;
|
|
671
|
-
}
|
|
672
|
-
.block-editor-block-variation-picker__variation:last-child {
|
|
673
|
-
margin-left: 0;
|
|
651
|
+
display: flex;
|
|
652
|
+
flex-direction: column;
|
|
653
|
+
align-items: center;
|
|
654
|
+
gap: 4px;
|
|
674
655
|
}
|
|
675
656
|
|
|
676
657
|
.block-editor-button-block-appender {
|
|
@@ -876,10 +857,6 @@ body.is-zoomed-out > .is-root-container > main {
|
|
|
876
857
|
z-index: 60;
|
|
877
858
|
}
|
|
878
859
|
|
|
879
|
-
.block-editor-media-placeholder__url-input-container .block-editor-media-placeholder__button {
|
|
880
|
-
margin-bottom: 0;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
860
|
.block-editor-media-placeholder__url-input-form {
|
|
884
861
|
display: flex;
|
|
885
862
|
}
|
|
@@ -901,10 +878,6 @@ body.is-zoomed-out > .is-root-container > main {
|
|
|
901
878
|
flex-shrink: 1;
|
|
902
879
|
}
|
|
903
880
|
|
|
904
|
-
.block-editor-media-placeholder__button {
|
|
905
|
-
margin-bottom: 0.5rem;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
881
|
.block-editor-media-placeholder__cancel-button.is-link {
|
|
909
882
|
margin: 1em;
|
|
910
883
|
display: block;
|
package/build-style/content.css
CHANGED
|
@@ -255,6 +255,9 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
255
255
|
-webkit-user-select: none;
|
|
256
256
|
user-select: none;
|
|
257
257
|
}
|
|
258
|
+
.block-editor-block-list__layout .block-editor-block-list__block.has-negative-margin.is-selected, .block-editor-block-list__layout .block-editor-block-list__block.has-negative-margin.has-child-selected {
|
|
259
|
+
z-index: 20;
|
|
260
|
+
}
|
|
258
261
|
.block-editor-block-list__layout .block-editor-block-list__block .reusable-block-edit-panel * {
|
|
259
262
|
z-index: 1;
|
|
260
263
|
}
|
|
@@ -305,10 +308,10 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
305
308
|
float: none;
|
|
306
309
|
}
|
|
307
310
|
|
|
308
|
-
.is-outline-mode .block-editor-block-list__block
|
|
311
|
+
.is-outline-mode .block-editor-block-list__block.is-hovered {
|
|
309
312
|
cursor: default;
|
|
310
313
|
}
|
|
311
|
-
.is-outline-mode .block-editor-block-list__block
|
|
314
|
+
.is-outline-mode .block-editor-block-list__block.is-hovered::after {
|
|
312
315
|
content: "";
|
|
313
316
|
position: absolute;
|
|
314
317
|
pointer-events: none;
|
|
@@ -319,13 +322,13 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
319
322
|
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
|
320
323
|
border-radius: 1px;
|
|
321
324
|
}
|
|
322
|
-
.is-outline-mode .block-editor-block-list__block
|
|
325
|
+
.is-outline-mode .block-editor-block-list__block.is-selected {
|
|
323
326
|
cursor: default;
|
|
324
327
|
}
|
|
325
|
-
.is-outline-mode .block-editor-block-list__block
|
|
328
|
+
.is-outline-mode .block-editor-block-list__block.is-selected.rich-text {
|
|
326
329
|
cursor: unset;
|
|
327
330
|
}
|
|
328
|
-
.is-outline-mode .block-editor-block-list__block
|
|
331
|
+
.is-outline-mode .block-editor-block-list__block.is-selected::after {
|
|
329
332
|
content: "";
|
|
330
333
|
position: absolute;
|
|
331
334
|
pointer-events: none;
|
|
@@ -607,70 +610,48 @@ body.is-zoomed-out > .is-root-container > main {
|
|
|
607
610
|
display: none;
|
|
608
611
|
}
|
|
609
612
|
|
|
610
|
-
.block-editor-block-variation-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
flex-direction: column;
|
|
615
|
-
}
|
|
616
|
-
.block-editor-block-variation-picker.has-many-variations .components-placeholder__fieldset {
|
|
617
|
-
max-width: 90%;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations {
|
|
613
|
+
.block-editor-block-variation-picker__variations,
|
|
614
|
+
.block-editor-block-variation-picker__skip,
|
|
615
|
+
.wp-block-group-placeholder__variations {
|
|
616
|
+
list-style: none;
|
|
621
617
|
display: flex;
|
|
622
618
|
justify-content: flex-start;
|
|
623
619
|
flex-direction: row;
|
|
624
620
|
flex-wrap: wrap;
|
|
625
621
|
width: 100%;
|
|
626
|
-
margin: 16px 0;
|
|
627
622
|
padding: 0;
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations > li {
|
|
631
|
-
list-style: none;
|
|
632
|
-
margin: 8px 20px 0 0;
|
|
633
|
-
flex-shrink: 1;
|
|
634
|
-
width: 75px;
|
|
635
|
-
text-align: center;
|
|
636
|
-
}
|
|
637
|
-
.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations > li button {
|
|
638
|
-
display: inline-flex;
|
|
639
|
-
margin-right: 0;
|
|
640
|
-
}
|
|
641
|
-
.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations .block-editor-block-variation-picker__variation {
|
|
642
|
-
padding: 8px;
|
|
643
|
-
}
|
|
644
|
-
.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations .block-editor-block-variation-picker__variation-label {
|
|
645
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
623
|
+
margin: 0;
|
|
624
|
+
gap: 8px;
|
|
646
625
|
font-size: 12px;
|
|
647
|
-
display: block;
|
|
648
|
-
line-height: 1.4;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
.block-editor-block-variation-picker__variation {
|
|
652
|
-
width: 100%;
|
|
653
626
|
}
|
|
654
|
-
.block-editor-block-variation-
|
|
655
|
-
|
|
627
|
+
.block-editor-block-variation-picker__variations svg,
|
|
628
|
+
.block-editor-block-variation-picker__skip svg,
|
|
629
|
+
.wp-block-group-placeholder__variations svg {
|
|
630
|
+
fill: #ccc !important;
|
|
631
|
+
}
|
|
632
|
+
.block-editor-block-variation-picker__variations .components-button,
|
|
633
|
+
.block-editor-block-variation-picker__skip .components-button,
|
|
634
|
+
.wp-block-group-placeholder__variations .components-button {
|
|
635
|
+
padding: 4px;
|
|
636
|
+
}
|
|
637
|
+
.block-editor-block-variation-picker__variations .components-button:hover,
|
|
638
|
+
.block-editor-block-variation-picker__skip .components-button:hover,
|
|
639
|
+
.wp-block-group-placeholder__variations .components-button:hover {
|
|
640
|
+
background: none !important;
|
|
641
|
+
}
|
|
642
|
+
.block-editor-block-variation-picker__variations .components-button:hover svg,
|
|
643
|
+
.block-editor-block-variation-picker__skip .components-button:hover svg,
|
|
644
|
+
.wp-block-group-placeholder__variations .components-button:hover svg {
|
|
645
|
+
fill: var(--wp-admin-theme-color) !important;
|
|
646
|
+
}
|
|
647
|
+
.block-editor-block-variation-picker__variations > li,
|
|
648
|
+
.block-editor-block-variation-picker__skip > li,
|
|
649
|
+
.wp-block-group-placeholder__variations > li {
|
|
656
650
|
width: auto;
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
.block-editor-block-variation-picker__variation.components-button {
|
|
662
|
-
height: auto;
|
|
663
|
-
padding: 0;
|
|
664
|
-
}
|
|
665
|
-
.block-editor-block-variation-picker__variation::before {
|
|
666
|
-
content: "";
|
|
667
|
-
padding-bottom: 100%;
|
|
668
|
-
}
|
|
669
|
-
.block-editor-block-variation-picker__variation:first-child {
|
|
670
|
-
margin-left: 0;
|
|
671
|
-
}
|
|
672
|
-
.block-editor-block-variation-picker__variation:last-child {
|
|
673
|
-
margin-right: 0;
|
|
651
|
+
display: flex;
|
|
652
|
+
flex-direction: column;
|
|
653
|
+
align-items: center;
|
|
654
|
+
gap: 4px;
|
|
674
655
|
}
|
|
675
656
|
|
|
676
657
|
.block-editor-button-block-appender {
|
|
@@ -876,10 +857,6 @@ body.is-zoomed-out > .is-root-container > main {
|
|
|
876
857
|
z-index: 60;
|
|
877
858
|
}
|
|
878
859
|
|
|
879
|
-
.block-editor-media-placeholder__url-input-container .block-editor-media-placeholder__button {
|
|
880
|
-
margin-bottom: 0;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
860
|
.block-editor-media-placeholder__url-input-form {
|
|
884
861
|
display: flex;
|
|
885
862
|
}
|
|
@@ -901,10 +878,6 @@ body.is-zoomed-out > .is-root-container > main {
|
|
|
901
878
|
flex-shrink: 1;
|
|
902
879
|
}
|
|
903
880
|
|
|
904
|
-
.block-editor-media-placeholder__button {
|
|
905
|
-
margin-bottom: 0.5rem;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
881
|
.block-editor-media-placeholder__cancel-button.is-link {
|
|
909
882
|
margin: 1em;
|
|
910
883
|
display: block;
|