@wordpress/block-editor 12.16.1-next.79a6196f.0 → 12.18.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 +6 -0
- package/README.md +32 -0
- package/build/components/block-draggable/index.js +11 -3
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-edit/context.js +3 -1
- package/build/components/block-edit/context.js.map +1 -1
- package/build/components/block-edit/index.js +4 -2
- package/build/components/block-edit/index.js.map +1 -1
- package/build/components/block-editing-mode/index.js +6 -3
- package/build/components/block-editing-mode/index.js.map +1 -1
- package/build/components/block-inspector/index.js +5 -2
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block.js +4 -3
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +9 -5
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/index.js +30 -4
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/private-block-context.js +1 -1
- package/build/components/block-list/private-block-context.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +1 -1
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-popover/inbetween.js +15 -3
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-preview/auto.js +1 -1
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-removal-warning-modal/index.js +3 -2
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +2 -4
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js +12 -1
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/index.js +119 -90
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +10 -3
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js +7 -1
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/global-styles/border-panel.js +5 -14
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/effects-panel.js +7 -1
- package/build/components/global-styles/effects-panel.js.map +1 -1
- package/build/components/iframe/get-compatibility-styles.js +99 -0
- package/build/components/iframe/get-compatibility-styles.js.map +1 -0
- package/build/components/iframe/index.js +2 -3
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/index.js +16 -2
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js +16 -2
- package/build/components/index.native.js.map +1 -1
- package/build/components/inspector-controls/groups.js +2 -0
- package/build/components/inspector-controls/groups.js.map +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js +3 -0
- package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +3 -2
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build/components/link-control/link-preview.js +30 -26
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/link-control/search-input.js +1 -9
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/list-view/block-contents.js +3 -1
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block.js +10 -1
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +29 -8
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/drop-indicator.js +100 -32
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/list-view/index.js +52 -4
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/leaf.js +2 -2
- package/build/components/list-view/leaf.js.map +1 -1
- package/build/components/list-view/use-list-view-block-indexes.js +30 -0
- package/build/components/list-view/use-list-view-block-indexes.js.map +1 -0
- package/build/components/list-view/use-list-view-drop-zone.js +56 -5
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/list-view/utils.js +92 -0
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/provider/index.js +1 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/recursion-provider/index.js +21 -0
- package/build/components/recursion-provider/index.js.map +1 -1
- package/build/components/rich-text/index.js +30 -6
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/native/index.native.js +9 -9
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +30 -7
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js +50 -8
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/hooks/block-hooks.js +5 -14
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/content-lock-ui.js +17 -42
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/effects.js +66 -0
- package/build/hooks/effects.js.map +1 -0
- package/build/hooks/index.js +14 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js +13 -0
- package/build/hooks/index.native.js.map +1 -1
- package/build/hooks/style.js +6 -2
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/supports.js +2 -1
- package/build/hooks/supports.js.map +1 -1
- package/build/hooks/typography.native.js +2 -2
- package/build/hooks/typography.native.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +115 -0
- package/build/hooks/use-bindings-attributes.js.map +1 -0
- package/build/hooks/use-shadow-props.js +46 -0
- package/build/hooks/use-shadow-props.js.map +1 -0
- package/build/hooks/utils.js +7 -6
- package/build/hooks/utils.js.map +1 -1
- package/build/index.js +14 -0
- package/build/index.js.map +1 -1
- package/build/store/actions.js +10 -6
- package/build/store/actions.js.map +1 -1
- package/build/store/index.js +2 -0
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +37 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +60 -9
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +44 -3
- package/build/store/reducer.js.map +1 -1
- package/build/store/resolvers.js +27 -0
- package/build/store/resolvers.js.map +1 -0
- package/build/store/selectors.js +94 -56
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +5 -26
- package/build/store/utils.js.map +1 -1
- package/build/utils/index.js +0 -16
- package/build/utils/index.js.map +1 -1
- package/build/utils/math.js +13 -0
- package/build/utils/math.js.map +1 -1
- package/build/utils/transform-styles/index.js +37 -27
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build-module/components/block-draggable/index.js +11 -3
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-edit/context.js +1 -0
- package/build-module/components/block-edit/context.js.map +1 -1
- package/build-module/components/block-edit/index.js +5 -3
- package/build-module/components/block-edit/index.js.map +1 -1
- package/build-module/components/block-editing-mode/index.js +7 -4
- package/build-module/components/block-editing-mode/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +5 -2
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block.js +6 -5
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +11 -7
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.js +31 -5
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/private-block-context.js +1 -1
- package/build-module/components/block-list/private-block-context.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js +15 -3
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-preview/auto.js +3 -3
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js +3 -2
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +2 -4
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js +12 -1
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/index.js +116 -86
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +10 -3
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js +7 -1
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +5 -14
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/effects-panel.js +7 -1
- package/build-module/components/global-styles/effects-panel.js.map +1 -1
- package/build-module/components/iframe/get-compatibility-styles.js +93 -0
- package/build-module/components/iframe/get-compatibility-styles.js.map +1 -0
- package/build-module/components/iframe/index.js +2 -3
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/index.js +1 -1
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js +1 -1
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inspector-controls/groups.js +2 -0
- package/build-module/components/inspector-controls/groups.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js +3 -0
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +3 -2
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +32 -28
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/link-control/search-input.js +1 -8
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +3 -1
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block.js +10 -1
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +30 -9
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js +99 -32
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/index.js +54 -6
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/leaf.js +2 -2
- package/build-module/components/list-view/leaf.js.map +1 -1
- package/build-module/components/list-view/use-list-view-block-indexes.js +23 -0
- package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -0
- package/build-module/components/list-view/use-list-view-drop-zone.js +58 -7
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/list-view/utils.js +91 -0
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/provider/index.js +1 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/recursion-provider/index.js +17 -0
- package/build-module/components/recursion-provider/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +30 -6
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +9 -9
- package/build-module/components/rich-text/native/index.native.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +31 -8
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js +51 -9
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/hooks/block-hooks.js +5 -14
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +19 -43
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/effects.js +51 -0
- package/build-module/hooks/effects.js.map +1 -0
- package/build-module/hooks/index.js +2 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/index.native.js +1 -0
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/hooks/style.js +6 -2
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/supports.js +2 -1
- package/build-module/hooks/supports.js.map +1 -1
- package/build-module/hooks/typography.native.js +2 -2
- package/build-module/hooks/typography.native.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +112 -0
- package/build-module/hooks/use-bindings-attributes.js.map +1 -0
- package/build-module/hooks/use-shadow-props.js +39 -0
- package/build-module/hooks/use-shadow-props.js.map +1 -0
- package/build-module/hooks/utils.js +9 -8
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/store/actions.js +10 -6
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/index.js +2 -0
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +35 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +53 -8
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +43 -3
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/resolvers.js +20 -0
- package/build-module/store/resolvers.js.map +1 -0
- package/build-module/store/selectors.js +89 -52
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +3 -23
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/index.js +0 -1
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/math.js +12 -0
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +36 -27
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-style/content-rtl.css +33 -16
- package/build-style/content.css +33 -16
- package/build-style/default-editor-styles-rtl.css +1 -1
- package/build-style/default-editor-styles.css +1 -1
- package/build-style/style-rtl.css +169 -114
- package/build-style/style.css +169 -114
- package/package.json +31 -31
- package/src/components/block-canvas/style.scss +8 -1
- package/src/components/block-draggable/index.js +16 -5
- package/src/components/block-edit/context.js +1 -0
- package/src/components/block-edit/index.js +4 -0
- package/src/components/block-editing-mode/index.js +12 -7
- package/src/components/block-inspector/index.js +5 -2
- package/src/components/block-list/block.js +5 -4
- package/src/components/block-list/block.native.js +13 -3
- package/src/components/block-list/content.scss +34 -5
- package/src/components/block-list/index.js +52 -16
- package/src/components/block-list/private-block-context.js +1 -1
- package/src/components/block-list/use-in-between-inserter.js +1 -2
- package/src/components/block-popover/inbetween.js +22 -2
- package/src/components/block-preview/auto.js +3 -3
- package/src/components/block-removal-warning-modal/index.js +3 -2
- package/src/components/block-settings-menu/block-settings-dropdown.js +2 -7
- package/src/components/block-switcher/block-transformations-menu.js +18 -1
- package/src/components/block-switcher/index.js +133 -111
- package/src/components/block-switcher/style.scss +6 -4
- package/src/components/block-switcher/test/index.js +113 -230
- package/src/components/block-toolbar/style.scss +22 -18
- package/src/components/block-tools/insertion-point.js +15 -2
- package/src/components/block-tools/style.scss +8 -7
- package/src/components/font-sizes/fluid-utils.js +8 -2
- package/src/components/font-sizes/test/fluid-utils.js +9 -0
- package/src/components/global-styles/border-panel.js +7 -17
- package/src/components/global-styles/effects-panel.js +16 -1
- package/src/components/iframe/get-compatibility-styles.js +120 -0
- package/src/components/iframe/index.js +2 -3
- package/src/components/index.js +4 -2
- package/src/components/index.native.js +4 -2
- package/src/components/inspector-controls/groups.js +2 -0
- package/src/components/inspector-controls-tabs/styles-tab.js +1 -0
- package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +2 -0
- package/src/components/link-control/link-preview.js +31 -55
- package/src/components/link-control/search-input.js +1 -9
- package/src/components/link-control/style.scss +31 -85
- package/src/components/link-control/test/index.js +2 -1
- package/src/components/list-view/block-contents.js +5 -1
- package/src/components/list-view/block.js +9 -0
- package/src/components/list-view/branch.js +30 -10
- package/src/components/list-view/drop-indicator.js +139 -46
- package/src/components/list-view/index.js +74 -3
- package/src/components/list-view/leaf.js +2 -2
- package/src/components/list-view/style.scss +102 -13
- package/src/components/list-view/test/use-list-view-drop-zone.js +4 -0
- package/src/components/list-view/test/utils.js +218 -1
- package/src/components/list-view/use-list-view-block-indexes.js +29 -0
- package/src/components/list-view/use-list-view-drop-zone.js +78 -6
- package/src/components/list-view/utils.js +116 -0
- package/src/components/provider/index.js +3 -1
- package/src/components/recursion-provider/README.md +2 -2
- package/src/components/recursion-provider/index.js +17 -0
- package/src/components/rich-text/index.js +48 -10
- package/src/components/rich-text/native/index.native.js +10 -10
- package/src/components/use-block-drop-zone/index.js +60 -19
- package/src/components/use-block-drop-zone/test/index.js +32 -61
- package/src/components/use-on-block-drop/index.js +92 -11
- package/src/hooks/block-hooks.js +5 -17
- package/src/hooks/content-lock-ui.js +15 -55
- package/src/hooks/effects.js +57 -0
- package/src/hooks/index.js +2 -0
- package/src/hooks/index.native.js +1 -0
- package/src/hooks/style.js +8 -0
- package/src/hooks/supports.js +2 -0
- package/src/hooks/test/effects.js +39 -0
- package/src/hooks/typography.native.js +2 -2
- package/src/hooks/use-bindings-attributes.js +148 -0
- package/src/hooks/use-shadow-props.js +37 -0
- package/src/hooks/utils.js +10 -6
- package/src/index.js +2 -0
- package/src/store/actions.js +9 -4
- package/src/store/index.js +2 -0
- package/src/store/private-actions.js +32 -0
- package/src/store/private-selectors.js +78 -21
- package/src/store/reducer.js +49 -2
- package/src/store/resolvers.js +17 -0
- package/src/store/selectors.js +169 -161
- package/src/store/test/registry-selectors.js +431 -0
- package/src/store/test/selectors.js +14 -400
- package/src/store/utils.js +10 -33
- package/src/style.scss +0 -1
- package/src/utils/index.js +0 -1
- package/src/utils/math.js +12 -0
- package/src/utils/transform-styles/index.js +52 -37
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/iframe/use-compatibility-styles.js +0 -100
- package/build/components/iframe/use-compatibility-styles.js.map +0 -1
- package/build/utils/block-variation-transforms.js +0 -42
- package/build/utils/block-variation-transforms.js.map +0 -1
- package/build-module/components/iframe/use-compatibility-styles.js +0 -94
- package/build-module/components/iframe/use-compatibility-styles.js.map +0 -1
- package/build-module/utils/block-variation-transforms.js +0 -35
- package/build-module/utils/block-variation-transforms.js.map +0 -1
- package/src/components/block-switcher/test/__snapshots__/index.js.snap +0 -116
- package/src/components/contrast-checker/style.scss +0 -3
- package/src/components/iframe/use-compatibility-styles.js +0 -122
- package/src/utils/block-variation-transforms.js +0 -38
- package/src/utils/test/block-variation-transforms.js +0 -94
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { INSERTER_PATTERN_TYPES } from '../components/inserter/block-patterns-tab/utils';
|
|
5
|
-
const EMPTY_ARRAY = [];
|
|
6
|
-
export function getUserPatterns(state) {
|
|
7
|
-
var _state$settings$__exp, _state$settings$__exp2;
|
|
8
|
-
const userPatterns = (_state$settings$__exp = state?.settings?.__experimentalReusableBlocks) !== null && _state$settings$__exp !== void 0 ? _state$settings$__exp : EMPTY_ARRAY;
|
|
9
|
-
const userPatternCategories = (_state$settings$__exp2 = state?.settings?.__experimentalUserPatternCategories) !== null && _state$settings$__exp2 !== void 0 ? _state$settings$__exp2 : [];
|
|
10
|
-
const categories = new Map();
|
|
11
|
-
userPatternCategories.forEach(userCategory => categories.set(userCategory.id, userCategory));
|
|
12
|
-
return userPatterns.map(userPattern => {
|
|
13
|
-
return {
|
|
14
|
-
name: `core/block/${userPattern.id}`,
|
|
15
|
-
id: userPattern.id,
|
|
16
|
-
type: INSERTER_PATTERN_TYPES.user,
|
|
17
|
-
title: userPattern.title.raw,
|
|
18
|
-
categories: userPattern.wp_pattern_category.map(catId => categories && categories.get(catId) ? categories.get(catId).slug : catId),
|
|
19
|
-
content: userPattern.content.raw,
|
|
20
|
-
syncStatus: userPattern.wp_pattern_sync_status
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
1
|
export const checkAllowList = (list, item, defaultResult = null) => {
|
|
25
2
|
if (typeof list === 'boolean') {
|
|
26
3
|
return list;
|
|
@@ -53,4 +30,7 @@ export const checkAllowListRecursive = (blocks, allowedBlockTypes) => {
|
|
|
53
30
|
}
|
|
54
31
|
return true;
|
|
55
32
|
};
|
|
33
|
+
export const getAllPatternsDependants = state => {
|
|
34
|
+
return [state.settings.__experimentalBlockPatterns, state.settings.__experimentalUserPatternCategories, state.settings.__experimentalReusableBlocks, state.settings.__experimentalFetchBlockPatterns, state.blockPatterns];
|
|
35
|
+
};
|
|
56
36
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["checkAllowList","list","item","defaultResult","Array","isArray","includes","checkAllowListRecursive","blocks","allowedBlockTypes","blocksQueue","length","block","shift","isAllowed","name","blockName","innerBlocks","forEach","innerBlock","push","getAllPatternsDependants","state","settings","__experimentalBlockPatterns","__experimentalUserPatternCategories","__experimentalReusableBlocks","__experimentalFetchBlockPatterns","blockPatterns"],"sources":["@wordpress/block-editor/src/store/utils.js"],"sourcesContent":["export const checkAllowList = ( list, item, defaultResult = null ) => {\n\tif ( typeof list === 'boolean' ) {\n\t\treturn list;\n\t}\n\tif ( Array.isArray( list ) ) {\n\t\t// TODO: when there is a canonical way to detect that we are editing a post\n\t\t// the following check should be changed to something like:\n\t\t// if ( list.includes( 'core/post-content' ) && getEditorMode() === 'post-content' && item === null )\n\t\tif ( list.includes( 'core/post-content' ) && item === null ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn list.includes( item );\n\t}\n\treturn defaultResult;\n};\n\nexport const checkAllowListRecursive = ( blocks, allowedBlockTypes ) => {\n\tif ( typeof allowedBlockTypes === 'boolean' ) {\n\t\treturn allowedBlockTypes;\n\t}\n\n\tconst blocksQueue = [ ...blocks ];\n\twhile ( blocksQueue.length > 0 ) {\n\t\tconst block = blocksQueue.shift();\n\n\t\tconst isAllowed = checkAllowList(\n\t\t\tallowedBlockTypes,\n\t\t\tblock.name || block.blockName,\n\t\t\ttrue\n\t\t);\n\t\tif ( ! isAllowed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tblock.innerBlocks?.forEach( ( innerBlock ) => {\n\t\t\tblocksQueue.push( innerBlock );\n\t\t} );\n\t}\n\n\treturn true;\n};\n\nexport const getAllPatternsDependants = ( state ) => {\n\treturn [\n\t\tstate.settings.__experimentalBlockPatterns,\n\t\tstate.settings.__experimentalUserPatternCategories,\n\t\tstate.settings.__experimentalReusableBlocks,\n\t\tstate.settings.__experimentalFetchBlockPatterns,\n\t\tstate.blockPatterns,\n\t];\n};\n"],"mappings":"AAAA,OAAO,MAAMA,cAAc,GAAGA,CAAEC,IAAI,EAAEC,IAAI,EAAEC,aAAa,GAAG,IAAI,KAAM;EACrE,IAAK,OAAOF,IAAI,KAAK,SAAS,EAAG;IAChC,OAAOA,IAAI;EACZ;EACA,IAAKG,KAAK,CAACC,OAAO,CAAEJ,IAAK,CAAC,EAAG;IAC5B;IACA;IACA;IACA,IAAKA,IAAI,CAACK,QAAQ,CAAE,mBAAoB,CAAC,IAAIJ,IAAI,KAAK,IAAI,EAAG;MAC5D,OAAO,IAAI;IACZ;IACA,OAAOD,IAAI,CAACK,QAAQ,CAAEJ,IAAK,CAAC;EAC7B;EACA,OAAOC,aAAa;AACrB,CAAC;AAED,OAAO,MAAMI,uBAAuB,GAAGA,CAAEC,MAAM,EAAEC,iBAAiB,KAAM;EACvE,IAAK,OAAOA,iBAAiB,KAAK,SAAS,EAAG;IAC7C,OAAOA,iBAAiB;EACzB;EAEA,MAAMC,WAAW,GAAG,CAAE,GAAGF,MAAM,CAAE;EACjC,OAAQE,WAAW,CAACC,MAAM,GAAG,CAAC,EAAG;IAChC,MAAMC,KAAK,GAAGF,WAAW,CAACG,KAAK,CAAC,CAAC;IAEjC,MAAMC,SAAS,GAAGd,cAAc,CAC/BS,iBAAiB,EACjBG,KAAK,CAACG,IAAI,IAAIH,KAAK,CAACI,SAAS,EAC7B,IACD,CAAC;IACD,IAAK,CAAEF,SAAS,EAAG;MAClB,OAAO,KAAK;IACb;IAEAF,KAAK,CAACK,WAAW,EAAEC,OAAO,CAAIC,UAAU,IAAM;MAC7CT,WAAW,CAACU,IAAI,CAAED,UAAW,CAAC;IAC/B,CAAE,CAAC;EACJ;EAEA,OAAO,IAAI;AACZ,CAAC;AAED,OAAO,MAAME,wBAAwB,GAAKC,KAAK,IAAM;EACpD,OAAO,CACNA,KAAK,CAACC,QAAQ,CAACC,2BAA2B,EAC1CF,KAAK,CAACC,QAAQ,CAACE,mCAAmC,EAClDH,KAAK,CAACC,QAAQ,CAACG,4BAA4B,EAC3CJ,KAAK,CAACC,QAAQ,CAACI,gCAAgC,EAC/CL,KAAK,CAACM,aAAa,CACnB;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","transformStyles","getPxFromCssUnit"],"sources":["@wordpress/block-editor/src/utils/index.js"],"sourcesContent":["export { default as transformStyles } from './transform-styles';\nexport
|
|
1
|
+
{"version":3,"names":["default","transformStyles","getPxFromCssUnit"],"sources":["@wordpress/block-editor/src/utils/index.js"],"sourcesContent":["export { default as transformStyles } from './transform-styles';\nexport { default as getPxFromCssUnit } from './get-px-from-css-unit';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,eAAe,QAAQ,oBAAoB;AAC/D,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,wBAAwB"}
|
|
@@ -90,4 +90,16 @@ export function getDistanceToNearestEdge(point, rect, allowedEdges = ['top', 'bo
|
|
|
90
90
|
export function isPointContainedByRect(point, rect) {
|
|
91
91
|
return rect.left <= point.x && rect.right >= point.x && rect.top <= point.y && rect.bottom >= point.y;
|
|
92
92
|
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Is the point within the top and bottom boundaries of the rectangle.
|
|
96
|
+
*
|
|
97
|
+
* @param {WPPoint} point The point.
|
|
98
|
+
* @param {DOMRect} rect The rectangle.
|
|
99
|
+
*
|
|
100
|
+
* @return {boolean} True if the point is within top and bottom of rectangle, false otherwise.
|
|
101
|
+
*/
|
|
102
|
+
export function isPointWithinTopAndBottomBoundariesOfRect(point, rect) {
|
|
103
|
+
return rect.top <= point.y && rect.bottom >= point.y;
|
|
104
|
+
}
|
|
93
105
|
//# sourceMappingURL=math.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getDistanceFromPointToEdge","point","rect","edge","isHorizontal","x","y","pointLateralPosition","pointForwardPosition","edgeStart","left","top","edgeEnd","right","bottom","edgeForwardPosition","edgeLateralPosition","Math","sqrt","getDistanceToNearestEdge","allowedEdges","candidateDistance","candidateEdge","forEach","distance","undefined","isPointContainedByRect"],"sources":["@wordpress/block-editor/src/utils/math.js"],"sourcesContent":["/**\n * A string representing the name of an edge.\n *\n * @typedef {'top'|'right'|'bottom'|'left'} WPEdgeName\n */\n\n/**\n * @typedef {Object} WPPoint\n * @property {number} x The horizontal position.\n * @property {number} y The vertical position.\n */\n\n/**\n * Given a point, a DOMRect and the name of an edge, returns the distance to\n * that edge of the rect.\n *\n * This function works for edges that are horizontal or vertical (e.g. not\n * rotated), the following terms are used so that the function works in both\n * orientations:\n *\n * - Forward, meaning the axis running horizontally when an edge is vertical\n * and vertically when an edge is horizontal.\n * - Lateral, meaning the axis running vertically when an edge is vertical\n * and horizontally when an edge is horizontal.\n *\n * @param {WPPoint} point The point to measure distance from.\n * @param {DOMRect} rect A DOM Rect containing edge positions.\n * @param {WPEdgeName} edge The edge to measure to.\n */\nexport function getDistanceFromPointToEdge( point, rect, edge ) {\n\tconst isHorizontal = edge === 'top' || edge === 'bottom';\n\tconst { x, y } = point;\n\tconst pointLateralPosition = isHorizontal ? x : y;\n\tconst pointForwardPosition = isHorizontal ? y : x;\n\tconst edgeStart = isHorizontal ? rect.left : rect.top;\n\tconst edgeEnd = isHorizontal ? rect.right : rect.bottom;\n\tconst edgeForwardPosition = rect[ edge ];\n\n\t// Measure the straight line distance to the edge of the rect, when the\n\t// point is adjacent to the edge.\n\t// Else, if the point is positioned diagonally to the edge of the rect,\n\t// measure diagonally to the nearest corner that the edge meets.\n\tlet edgeLateralPosition;\n\tif (\n\t\tpointLateralPosition >= edgeStart &&\n\t\tpointLateralPosition <= edgeEnd\n\t) {\n\t\tedgeLateralPosition = pointLateralPosition;\n\t} else if ( pointLateralPosition < edgeEnd ) {\n\t\tedgeLateralPosition = edgeStart;\n\t} else {\n\t\tedgeLateralPosition = edgeEnd;\n\t}\n\n\treturn Math.sqrt(\n\t\t( pointLateralPosition - edgeLateralPosition ) ** 2 +\n\t\t\t( pointForwardPosition - edgeForwardPosition ) ** 2\n\t);\n}\n\n/**\n * Given a point, a DOMRect and a list of allowed edges returns the name of and\n * distance to the nearest edge.\n *\n * @param {WPPoint} point The point to measure distance from.\n * @param {DOMRect} rect A DOM Rect containing edge positions.\n * @param {WPEdgeName[]} allowedEdges A list of the edges included in the\n * calculation. Defaults to all edges.\n *\n * @return {[number, string]} An array where the first value is the distance\n * and a second is the edge name.\n */\nexport function getDistanceToNearestEdge(\n\tpoint,\n\trect,\n\tallowedEdges = [ 'top', 'bottom', 'left', 'right' ]\n) {\n\tlet candidateDistance;\n\tlet candidateEdge;\n\n\tallowedEdges.forEach( ( edge ) => {\n\t\tconst distance = getDistanceFromPointToEdge( point, rect, edge );\n\n\t\tif ( candidateDistance === undefined || distance < candidateDistance ) {\n\t\t\tcandidateDistance = distance;\n\t\t\tcandidateEdge = edge;\n\t\t}\n\t} );\n\n\treturn [ candidateDistance, candidateEdge ];\n}\n\n/**\n * Is the point contained by the rectangle.\n *\n * @param {WPPoint} point The point.\n * @param {DOMRect} rect The rectangle.\n *\n * @return {boolean} True if the point is contained by the rectangle, false otherwise.\n */\nexport function isPointContainedByRect( point, rect ) {\n\treturn (\n\t\trect.left <= point.x &&\n\t\trect.right >= point.x &&\n\t\trect.top <= point.y &&\n\t\trect.bottom >= point.y\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,0BAA0BA,CAAEC,KAAK,EAAEC,IAAI,EAAEC,IAAI,EAAG;EAC/D,MAAMC,YAAY,GAAGD,IAAI,KAAK,KAAK,IAAIA,IAAI,KAAK,QAAQ;EACxD,MAAM;IAAEE,CAAC;IAAEC;EAAE,CAAC,GAAGL,KAAK;EACtB,MAAMM,oBAAoB,GAAGH,YAAY,GAAGC,CAAC,GAAGC,CAAC;EACjD,MAAME,oBAAoB,GAAGJ,YAAY,GAAGE,CAAC,GAAGD,CAAC;EACjD,MAAMI,SAAS,GAAGL,YAAY,GAAGF,IAAI,CAACQ,IAAI,GAAGR,IAAI,CAACS,GAAG;EACrD,MAAMC,OAAO,GAAGR,YAAY,GAAGF,IAAI,CAACW,KAAK,GAAGX,IAAI,CAACY,MAAM;EACvD,MAAMC,mBAAmB,GAAGb,IAAI,CAAEC,IAAI,CAAE;;EAExC;EACA;EACA;EACA;EACA,IAAIa,mBAAmB;EACvB,IACCT,oBAAoB,IAAIE,SAAS,IACjCF,oBAAoB,IAAIK,OAAO,EAC9B;IACDI,mBAAmB,GAAGT,oBAAoB;EAC3C,CAAC,MAAM,IAAKA,oBAAoB,GAAGK,OAAO,EAAG;IAC5CI,mBAAmB,GAAGP,SAAS;EAChC,CAAC,MAAM;IACNO,mBAAmB,GAAGJ,OAAO;EAC9B;EAEA,OAAOK,IAAI,CAACC,IAAI,CACf,CAAEX,oBAAoB,GAAGS,mBAAmB,KAAM,CAAC,GAClD,CAAER,oBAAoB,GAAGO,mBAAmB,KAAM,CACpD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,wBAAwBA,CACvClB,KAAK,EACLC,IAAI,EACJkB,YAAY,GAAG,CAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAE,EAClD;EACD,IAAIC,iBAAiB;EACrB,IAAIC,aAAa;EAEjBF,YAAY,CAACG,OAAO,CAAIpB,IAAI,IAAM;IACjC,MAAMqB,QAAQ,GAAGxB,0BAA0B,CAAEC,KAAK,EAAEC,IAAI,EAAEC,IAAK,CAAC;IAEhE,IAAKkB,iBAAiB,KAAKI,SAAS,IAAID,QAAQ,GAAGH,iBAAiB,EAAG;MACtEA,iBAAiB,GAAGG,QAAQ;MAC5BF,aAAa,GAAGnB,IAAI;IACrB;EACD,CAAE,CAAC;EAEH,OAAO,CAAEkB,iBAAiB,EAAEC,aAAa,CAAE;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,sBAAsBA,CAAEzB,KAAK,EAAEC,IAAI,EAAG;EACrD,OACCA,IAAI,CAACQ,IAAI,IAAIT,KAAK,CAACI,CAAC,IACpBH,IAAI,CAACW,KAAK,IAAIZ,KAAK,CAACI,CAAC,IACrBH,IAAI,CAACS,GAAG,IAAIV,KAAK,CAACK,CAAC,IACnBJ,IAAI,CAACY,MAAM,IAAIb,KAAK,CAACK,CAAC;AAExB"}
|
|
1
|
+
{"version":3,"names":["getDistanceFromPointToEdge","point","rect","edge","isHorizontal","x","y","pointLateralPosition","pointForwardPosition","edgeStart","left","top","edgeEnd","right","bottom","edgeForwardPosition","edgeLateralPosition","Math","sqrt","getDistanceToNearestEdge","allowedEdges","candidateDistance","candidateEdge","forEach","distance","undefined","isPointContainedByRect","isPointWithinTopAndBottomBoundariesOfRect"],"sources":["@wordpress/block-editor/src/utils/math.js"],"sourcesContent":["/**\n * A string representing the name of an edge.\n *\n * @typedef {'top'|'right'|'bottom'|'left'} WPEdgeName\n */\n\n/**\n * @typedef {Object} WPPoint\n * @property {number} x The horizontal position.\n * @property {number} y The vertical position.\n */\n\n/**\n * Given a point, a DOMRect and the name of an edge, returns the distance to\n * that edge of the rect.\n *\n * This function works for edges that are horizontal or vertical (e.g. not\n * rotated), the following terms are used so that the function works in both\n * orientations:\n *\n * - Forward, meaning the axis running horizontally when an edge is vertical\n * and vertically when an edge is horizontal.\n * - Lateral, meaning the axis running vertically when an edge is vertical\n * and horizontally when an edge is horizontal.\n *\n * @param {WPPoint} point The point to measure distance from.\n * @param {DOMRect} rect A DOM Rect containing edge positions.\n * @param {WPEdgeName} edge The edge to measure to.\n */\nexport function getDistanceFromPointToEdge( point, rect, edge ) {\n\tconst isHorizontal = edge === 'top' || edge === 'bottom';\n\tconst { x, y } = point;\n\tconst pointLateralPosition = isHorizontal ? x : y;\n\tconst pointForwardPosition = isHorizontal ? y : x;\n\tconst edgeStart = isHorizontal ? rect.left : rect.top;\n\tconst edgeEnd = isHorizontal ? rect.right : rect.bottom;\n\tconst edgeForwardPosition = rect[ edge ];\n\n\t// Measure the straight line distance to the edge of the rect, when the\n\t// point is adjacent to the edge.\n\t// Else, if the point is positioned diagonally to the edge of the rect,\n\t// measure diagonally to the nearest corner that the edge meets.\n\tlet edgeLateralPosition;\n\tif (\n\t\tpointLateralPosition >= edgeStart &&\n\t\tpointLateralPosition <= edgeEnd\n\t) {\n\t\tedgeLateralPosition = pointLateralPosition;\n\t} else if ( pointLateralPosition < edgeEnd ) {\n\t\tedgeLateralPosition = edgeStart;\n\t} else {\n\t\tedgeLateralPosition = edgeEnd;\n\t}\n\n\treturn Math.sqrt(\n\t\t( pointLateralPosition - edgeLateralPosition ) ** 2 +\n\t\t\t( pointForwardPosition - edgeForwardPosition ) ** 2\n\t);\n}\n\n/**\n * Given a point, a DOMRect and a list of allowed edges returns the name of and\n * distance to the nearest edge.\n *\n * @param {WPPoint} point The point to measure distance from.\n * @param {DOMRect} rect A DOM Rect containing edge positions.\n * @param {WPEdgeName[]} allowedEdges A list of the edges included in the\n * calculation. Defaults to all edges.\n *\n * @return {[number, string]} An array where the first value is the distance\n * and a second is the edge name.\n */\nexport function getDistanceToNearestEdge(\n\tpoint,\n\trect,\n\tallowedEdges = [ 'top', 'bottom', 'left', 'right' ]\n) {\n\tlet candidateDistance;\n\tlet candidateEdge;\n\n\tallowedEdges.forEach( ( edge ) => {\n\t\tconst distance = getDistanceFromPointToEdge( point, rect, edge );\n\n\t\tif ( candidateDistance === undefined || distance < candidateDistance ) {\n\t\t\tcandidateDistance = distance;\n\t\t\tcandidateEdge = edge;\n\t\t}\n\t} );\n\n\treturn [ candidateDistance, candidateEdge ];\n}\n\n/**\n * Is the point contained by the rectangle.\n *\n * @param {WPPoint} point The point.\n * @param {DOMRect} rect The rectangle.\n *\n * @return {boolean} True if the point is contained by the rectangle, false otherwise.\n */\nexport function isPointContainedByRect( point, rect ) {\n\treturn (\n\t\trect.left <= point.x &&\n\t\trect.right >= point.x &&\n\t\trect.top <= point.y &&\n\t\trect.bottom >= point.y\n\t);\n}\n\n/**\n * Is the point within the top and bottom boundaries of the rectangle.\n *\n * @param {WPPoint} point The point.\n * @param {DOMRect} rect The rectangle.\n *\n * @return {boolean} True if the point is within top and bottom of rectangle, false otherwise.\n */\nexport function isPointWithinTopAndBottomBoundariesOfRect( point, rect ) {\n\treturn rect.top <= point.y && rect.bottom >= point.y;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,0BAA0BA,CAAEC,KAAK,EAAEC,IAAI,EAAEC,IAAI,EAAG;EAC/D,MAAMC,YAAY,GAAGD,IAAI,KAAK,KAAK,IAAIA,IAAI,KAAK,QAAQ;EACxD,MAAM;IAAEE,CAAC;IAAEC;EAAE,CAAC,GAAGL,KAAK;EACtB,MAAMM,oBAAoB,GAAGH,YAAY,GAAGC,CAAC,GAAGC,CAAC;EACjD,MAAME,oBAAoB,GAAGJ,YAAY,GAAGE,CAAC,GAAGD,CAAC;EACjD,MAAMI,SAAS,GAAGL,YAAY,GAAGF,IAAI,CAACQ,IAAI,GAAGR,IAAI,CAACS,GAAG;EACrD,MAAMC,OAAO,GAAGR,YAAY,GAAGF,IAAI,CAACW,KAAK,GAAGX,IAAI,CAACY,MAAM;EACvD,MAAMC,mBAAmB,GAAGb,IAAI,CAAEC,IAAI,CAAE;;EAExC;EACA;EACA;EACA;EACA,IAAIa,mBAAmB;EACvB,IACCT,oBAAoB,IAAIE,SAAS,IACjCF,oBAAoB,IAAIK,OAAO,EAC9B;IACDI,mBAAmB,GAAGT,oBAAoB;EAC3C,CAAC,MAAM,IAAKA,oBAAoB,GAAGK,OAAO,EAAG;IAC5CI,mBAAmB,GAAGP,SAAS;EAChC,CAAC,MAAM;IACNO,mBAAmB,GAAGJ,OAAO;EAC9B;EAEA,OAAOK,IAAI,CAACC,IAAI,CACf,CAAEX,oBAAoB,GAAGS,mBAAmB,KAAM,CAAC,GAClD,CAAER,oBAAoB,GAAGO,mBAAmB,KAAM,CACpD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,wBAAwBA,CACvClB,KAAK,EACLC,IAAI,EACJkB,YAAY,GAAG,CAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAE,EAClD;EACD,IAAIC,iBAAiB;EACrB,IAAIC,aAAa;EAEjBF,YAAY,CAACG,OAAO,CAAIpB,IAAI,IAAM;IACjC,MAAMqB,QAAQ,GAAGxB,0BAA0B,CAAEC,KAAK,EAAEC,IAAI,EAAEC,IAAK,CAAC;IAEhE,IAAKkB,iBAAiB,KAAKI,SAAS,IAAID,QAAQ,GAAGH,iBAAiB,EAAG;MACtEA,iBAAiB,GAAGG,QAAQ;MAC5BF,aAAa,GAAGnB,IAAI;IACrB;EACD,CAAE,CAAC;EAEH,OAAO,CAAEkB,iBAAiB,EAAEC,aAAa,CAAE;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,sBAAsBA,CAAEzB,KAAK,EAAEC,IAAI,EAAG;EACrD,OACCA,IAAI,CAACQ,IAAI,IAAIT,KAAK,CAACI,CAAC,IACpBH,IAAI,CAACW,KAAK,IAAIZ,KAAK,CAACI,CAAC,IACrBH,IAAI,CAACS,GAAG,IAAIV,KAAK,CAACK,CAAC,IACnBJ,IAAI,CAACY,MAAM,IAAIb,KAAK,CAACK,CAAC;AAExB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASqB,yCAAyCA,CAAE1B,KAAK,EAAEC,IAAI,EAAG;EACxE,OAAOA,IAAI,CAACS,GAAG,IAAIV,KAAK,CAACK,CAAC,IAAIJ,IAAI,CAACY,MAAM,IAAIb,KAAK,CAACK,CAAC;AACrD"}
|
|
@@ -4,6 +4,36 @@
|
|
|
4
4
|
import postcss, { CssSyntaxError } from 'postcss';
|
|
5
5
|
import wrap from 'postcss-prefixwrap';
|
|
6
6
|
import rebaseUrl from 'postcss-urlrebase';
|
|
7
|
+
const transformStylesCache = new WeakMap();
|
|
8
|
+
function transformStyle({
|
|
9
|
+
css,
|
|
10
|
+
ignoredSelectors = [],
|
|
11
|
+
baseURL
|
|
12
|
+
}, wrapperSelector = '') {
|
|
13
|
+
// When there is no wrapper selector or base URL, there is no need
|
|
14
|
+
// to transform the CSS. This is most cases because in the default
|
|
15
|
+
// iframed editor, no wrapping is needed, and not many styles
|
|
16
|
+
// provide a base URL.
|
|
17
|
+
if (!wrapperSelector && !baseURL) {
|
|
18
|
+
return css;
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
return postcss([wrapperSelector && wrap(wrapperSelector, {
|
|
22
|
+
ignoredSelectors: [...ignoredSelectors, wrapperSelector]
|
|
23
|
+
}), baseURL && rebaseUrl({
|
|
24
|
+
rootUrl: baseURL
|
|
25
|
+
})].filter(Boolean)).process(css, {}).css; // use sync PostCSS API
|
|
26
|
+
} catch (error) {
|
|
27
|
+
if (error instanceof CssSyntaxError) {
|
|
28
|
+
// eslint-disable-next-line no-console
|
|
29
|
+
console.warn('wp.blockEditor.transformStyles Failed to transform CSS.', error.message + '\n' + error.showSourceCode(false));
|
|
30
|
+
} else {
|
|
31
|
+
// eslint-disable-next-line no-console
|
|
32
|
+
console.warn('wp.blockEditor.transformStyles Failed to transform CSS.', error);
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
7
37
|
|
|
8
38
|
/**
|
|
9
39
|
* Applies a series of CSS rule transforms to wrap selectors inside a given class and/or rewrite URLs depending on the parameters passed.
|
|
@@ -18,34 +48,13 @@ import rebaseUrl from 'postcss-urlrebase';
|
|
|
18
48
|
* @return {Array} converted rules.
|
|
19
49
|
*/
|
|
20
50
|
const transformStyles = (styles, wrapperSelector = '') => {
|
|
21
|
-
return styles.map(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
baseURL
|
|
25
|
-
}) => {
|
|
26
|
-
// When there is no wrapper selector or base URL, there is no need
|
|
27
|
-
// to transform the CSS. This is most cases because in the default
|
|
28
|
-
// iframed editor, no wrapping is needed, and not many styles
|
|
29
|
-
// provide a base URL.
|
|
30
|
-
if (!wrapperSelector && !baseURL) {
|
|
31
|
-
return css;
|
|
32
|
-
}
|
|
33
|
-
try {
|
|
34
|
-
return postcss([wrapperSelector && wrap(wrapperSelector, {
|
|
35
|
-
ignoredSelectors: [...ignoredSelectors, wrapperSelector]
|
|
36
|
-
}), baseURL && rebaseUrl({
|
|
37
|
-
rootUrl: baseURL
|
|
38
|
-
})].filter(Boolean)).process(css, {}).css; // use sync PostCSS API
|
|
39
|
-
} catch (error) {
|
|
40
|
-
if (error instanceof CssSyntaxError) {
|
|
41
|
-
// eslint-disable-next-line no-console
|
|
42
|
-
console.warn('wp.blockEditor.transformStyles Failed to transform CSS.', error.message + '\n' + error.showSourceCode(false));
|
|
43
|
-
} else {
|
|
44
|
-
// eslint-disable-next-line no-console
|
|
45
|
-
console.warn('wp.blockEditor.transformStyles Failed to transform CSS.', error);
|
|
46
|
-
}
|
|
47
|
-
return null;
|
|
51
|
+
return styles.map(style => {
|
|
52
|
+
if (transformStylesCache.has(style)) {
|
|
53
|
+
return transformStylesCache.get(style);
|
|
48
54
|
}
|
|
55
|
+
const transformedStyle = transformStyle(style, wrapperSelector);
|
|
56
|
+
transformStylesCache.set(style, transformedStyle);
|
|
57
|
+
return transformedStyle;
|
|
49
58
|
});
|
|
50
59
|
};
|
|
51
60
|
export default transformStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["postcss","CssSyntaxError","wrap","rebaseUrl","
|
|
1
|
+
{"version":3,"names":["postcss","CssSyntaxError","wrap","rebaseUrl","transformStylesCache","WeakMap","transformStyle","css","ignoredSelectors","baseURL","wrapperSelector","rootUrl","filter","Boolean","process","error","console","warn","message","showSourceCode","transformStyles","styles","map","style","has","get","transformedStyle","set"],"sources":["@wordpress/block-editor/src/utils/transform-styles/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport postcss, { CssSyntaxError } from 'postcss';\nimport wrap from 'postcss-prefixwrap';\nimport rebaseUrl from 'postcss-urlrebase';\n\nconst transformStylesCache = new WeakMap();\n\nfunction transformStyle(\n\t{ css, ignoredSelectors = [], baseURL },\n\twrapperSelector = ''\n) {\n\t// When there is no wrapper selector or base URL, there is no need\n\t// to transform the CSS. This is most cases because in the default\n\t// iframed editor, no wrapping is needed, and not many styles\n\t// provide a base URL.\n\tif ( ! wrapperSelector && ! baseURL ) {\n\t\treturn css;\n\t}\n\n\ttry {\n\t\treturn postcss(\n\t\t\t[\n\t\t\t\twrapperSelector &&\n\t\t\t\t\twrap( wrapperSelector, {\n\t\t\t\t\t\tignoredSelectors: [\n\t\t\t\t\t\t\t...ignoredSelectors,\n\t\t\t\t\t\t\twrapperSelector,\n\t\t\t\t\t\t],\n\t\t\t\t\t} ),\n\t\t\t\tbaseURL && rebaseUrl( { rootUrl: baseURL } ),\n\t\t\t].filter( Boolean )\n\t\t).process( css, {} ).css; // use sync PostCSS API\n\t} catch ( error ) {\n\t\tif ( error instanceof CssSyntaxError ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(\n\t\t\t\t'wp.blockEditor.transformStyles Failed to transform CSS.',\n\t\t\t\terror.message + '\\n' + error.showSourceCode( false )\n\t\t\t);\n\t\t} else {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(\n\t\t\t\t'wp.blockEditor.transformStyles Failed to transform CSS.',\n\t\t\t\terror\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\n/**\n * Applies a series of CSS rule transforms to wrap selectors inside a given class and/or rewrite URLs depending on the parameters passed.\n *\n * @typedef {Object} EditorStyle\n * @property {string} css the CSS block(s), as a single string.\n * @property {?string} baseURL the base URL to be used as the reference when rewritting urls.\n * @property {?string[]} ignoredSelectors the selectors not to wrap.\n *\n * @param {EditorStyle[]} styles CSS rules.\n * @param {string} wrapperSelector Wrapper selector.\n * @return {Array} converted rules.\n */\nconst transformStyles = ( styles, wrapperSelector = '' ) => {\n\treturn styles.map( ( style ) => {\n\t\tif ( transformStylesCache.has( style ) ) {\n\t\t\treturn transformStylesCache.get( style );\n\t\t}\n\n\t\tconst transformedStyle = transformStyle( style, wrapperSelector );\n\t\ttransformStylesCache.set( style, transformedStyle );\n\t\treturn transformedStyle;\n\t} );\n};\n\nexport default transformStyles;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,OAAO,IAAIC,cAAc,QAAQ,SAAS;AACjD,OAAOC,IAAI,MAAM,oBAAoB;AACrC,OAAOC,SAAS,MAAM,mBAAmB;AAEzC,MAAMC,oBAAoB,GAAG,IAAIC,OAAO,CAAC,CAAC;AAE1C,SAASC,cAAcA,CACtB;EAAEC,GAAG;EAAEC,gBAAgB,GAAG,EAAE;EAAEC;AAAQ,CAAC,EACvCC,eAAe,GAAG,EAAE,EACnB;EACD;EACA;EACA;EACA;EACA,IAAK,CAAEA,eAAe,IAAI,CAAED,OAAO,EAAG;IACrC,OAAOF,GAAG;EACX;EAEA,IAAI;IACH,OAAOP,OAAO,CACb,CACCU,eAAe,IACdR,IAAI,CAAEQ,eAAe,EAAE;MACtBF,gBAAgB,EAAE,CACjB,GAAGA,gBAAgB,EACnBE,eAAe;IAEjB,CAAE,CAAC,EACJD,OAAO,IAAIN,SAAS,CAAE;MAAEQ,OAAO,EAAEF;IAAQ,CAAE,CAAC,CAC5C,CAACG,MAAM,CAAEC,OAAQ,CACnB,CAAC,CAACC,OAAO,CAAEP,GAAG,EAAE,CAAC,CAAE,CAAC,CAACA,GAAG,CAAC,CAAC;EAC3B,CAAC,CAAC,OAAQQ,KAAK,EAAG;IACjB,IAAKA,KAAK,YAAYd,cAAc,EAAG;MACtC;MACAe,OAAO,CAACC,IAAI,CACX,yDAAyD,EACzDF,KAAK,CAACG,OAAO,GAAG,IAAI,GAAGH,KAAK,CAACI,cAAc,CAAE,KAAM,CACpD,CAAC;IACF,CAAC,MAAM;MACN;MACAH,OAAO,CAACC,IAAI,CACX,yDAAyD,EACzDF,KACD,CAAC;IACF;IAEA,OAAO,IAAI;EACZ;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,eAAe,GAAGA,CAAEC,MAAM,EAAEX,eAAe,GAAG,EAAE,KAAM;EAC3D,OAAOW,MAAM,CAACC,GAAG,CAAIC,KAAK,IAAM;IAC/B,IAAKnB,oBAAoB,CAACoB,GAAG,CAAED,KAAM,CAAC,EAAG;MACxC,OAAOnB,oBAAoB,CAACqB,GAAG,CAAEF,KAAM,CAAC;IACzC;IAEA,MAAMG,gBAAgB,GAAGpB,cAAc,CAAEiB,KAAK,EAAEb,eAAgB,CAAC;IACjEN,oBAAoB,CAACuB,GAAG,CAAEJ,KAAK,EAAEG,gBAAiB,CAAC;IACnD,OAAOA,gBAAgB;EACxB,CAAE,CAAC;AACJ,CAAC;AAED,eAAeN,eAAe"}
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
--wp-block-synced-color: #7a00df;
|
|
98
98
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
99
99
|
}
|
|
100
|
-
@media (
|
|
100
|
+
@media (min-resolution: 192dpi) {
|
|
101
101
|
:root {
|
|
102
102
|
--wp-admin-border-width-focus: 1.5px;
|
|
103
103
|
}
|
|
@@ -183,12 +183,12 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
183
183
|
}
|
|
184
184
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted,
|
|
185
185
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected,
|
|
186
|
-
.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus {
|
|
186
|
+
.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable=true]):focus {
|
|
187
187
|
outline: none;
|
|
188
188
|
}
|
|
189
189
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after,
|
|
190
190
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
191
|
-
.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus::after {
|
|
191
|
+
.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable=true]):focus::after {
|
|
192
192
|
content: "";
|
|
193
193
|
position: absolute;
|
|
194
194
|
z-index: 1;
|
|
@@ -203,7 +203,7 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
203
203
|
}
|
|
204
204
|
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after,
|
|
205
205
|
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
206
|
-
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus::after {
|
|
206
|
+
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable=true]):focus::after {
|
|
207
207
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) #fff;
|
|
208
208
|
}
|
|
209
209
|
.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected::after {
|
|
@@ -264,10 +264,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
264
264
|
margin: 0 0 12px 0;
|
|
265
265
|
width: 100%;
|
|
266
266
|
}
|
|
267
|
-
.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui .components-notice {
|
|
268
|
-
margin-right: 0;
|
|
269
|
-
margin-left: 0;
|
|
270
|
-
}
|
|
271
267
|
.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui .components-notice .components-notice__content {
|
|
272
268
|
font-size: 13px;
|
|
273
269
|
}
|
|
@@ -340,6 +336,27 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
340
336
|
border-radius: 2px;
|
|
341
337
|
}
|
|
342
338
|
|
|
339
|
+
.is-template-locked:hover .block-editor-block-list__block.is-editing-disabled > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected)::after, .is-template-locked:hover:has(> .block-editor-block-list__block.is-editing-disabled) > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected)::after,
|
|
340
|
+
.block-editor-block-list__block:hover .block-editor-block-list__block.is-editing-disabled > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected)::after,
|
|
341
|
+
.block-editor-block-list__block:hover:has(> .block-editor-block-list__block.is-editing-disabled) > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected)::after {
|
|
342
|
+
content: "";
|
|
343
|
+
border-style: dotted;
|
|
344
|
+
position: absolute;
|
|
345
|
+
pointer-events: none;
|
|
346
|
+
top: 1px;
|
|
347
|
+
right: 1px;
|
|
348
|
+
left: 1px;
|
|
349
|
+
bottom: 1px;
|
|
350
|
+
border: 1px dotted var(--wp-admin-theme-color);
|
|
351
|
+
border-radius: 1px;
|
|
352
|
+
}
|
|
353
|
+
.is-template-locked:hover .block-editor-block-list__block.is-editing-disabled > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected).is-hovered::after, .is-template-locked:hover:has(> .block-editor-block-list__block.is-editing-disabled) > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected).is-hovered::after,
|
|
354
|
+
.block-editor-block-list__block:hover .block-editor-block-list__block.is-editing-disabled > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected).is-hovered::after,
|
|
355
|
+
.block-editor-block-list__block:hover:has(> .block-editor-block-list__block.is-editing-disabled) > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected).is-hovered::after {
|
|
356
|
+
background: rgba(var(--wp-admin-theme-color--rgb), 0.1);
|
|
357
|
+
border: none;
|
|
358
|
+
}
|
|
359
|
+
|
|
343
360
|
.is-focus-mode .block-editor-block-list__block:not(.has-child-selected) {
|
|
344
361
|
opacity: 0.2;
|
|
345
362
|
transition: opacity 0.1s linear;
|
|
@@ -948,7 +965,7 @@ body.admin-color-light {
|
|
|
948
965
|
--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;
|
|
949
966
|
--wp-admin-border-width-focus: 2px;
|
|
950
967
|
}
|
|
951
|
-
@media (
|
|
968
|
+
@media (min-resolution: 192dpi) {
|
|
952
969
|
body.admin-color-light {
|
|
953
970
|
--wp-admin-border-width-focus: 1.5px;
|
|
954
971
|
}
|
|
@@ -963,7 +980,7 @@ body.admin-color-modern {
|
|
|
963
980
|
--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;
|
|
964
981
|
--wp-admin-border-width-focus: 2px;
|
|
965
982
|
}
|
|
966
|
-
@media (
|
|
983
|
+
@media (min-resolution: 192dpi) {
|
|
967
984
|
body.admin-color-modern {
|
|
968
985
|
--wp-admin-border-width-focus: 1.5px;
|
|
969
986
|
}
|
|
@@ -978,7 +995,7 @@ body.admin-color-blue {
|
|
|
978
995
|
--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;
|
|
979
996
|
--wp-admin-border-width-focus: 2px;
|
|
980
997
|
}
|
|
981
|
-
@media (
|
|
998
|
+
@media (min-resolution: 192dpi) {
|
|
982
999
|
body.admin-color-blue {
|
|
983
1000
|
--wp-admin-border-width-focus: 1.5px;
|
|
984
1001
|
}
|
|
@@ -993,7 +1010,7 @@ body.admin-color-coffee {
|
|
|
993
1010
|
--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;
|
|
994
1011
|
--wp-admin-border-width-focus: 2px;
|
|
995
1012
|
}
|
|
996
|
-
@media (
|
|
1013
|
+
@media (min-resolution: 192dpi) {
|
|
997
1014
|
body.admin-color-coffee {
|
|
998
1015
|
--wp-admin-border-width-focus: 1.5px;
|
|
999
1016
|
}
|
|
@@ -1008,7 +1025,7 @@ body.admin-color-ectoplasm {
|
|
|
1008
1025
|
--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;
|
|
1009
1026
|
--wp-admin-border-width-focus: 2px;
|
|
1010
1027
|
}
|
|
1011
|
-
@media (
|
|
1028
|
+
@media (min-resolution: 192dpi) {
|
|
1012
1029
|
body.admin-color-ectoplasm {
|
|
1013
1030
|
--wp-admin-border-width-focus: 1.5px;
|
|
1014
1031
|
}
|
|
@@ -1023,7 +1040,7 @@ body.admin-color-midnight {
|
|
|
1023
1040
|
--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;
|
|
1024
1041
|
--wp-admin-border-width-focus: 2px;
|
|
1025
1042
|
}
|
|
1026
|
-
@media (
|
|
1043
|
+
@media (min-resolution: 192dpi) {
|
|
1027
1044
|
body.admin-color-midnight {
|
|
1028
1045
|
--wp-admin-border-width-focus: 1.5px;
|
|
1029
1046
|
}
|
|
@@ -1038,7 +1055,7 @@ body.admin-color-ocean {
|
|
|
1038
1055
|
--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;
|
|
1039
1056
|
--wp-admin-border-width-focus: 2px;
|
|
1040
1057
|
}
|
|
1041
|
-
@media (
|
|
1058
|
+
@media (min-resolution: 192dpi) {
|
|
1042
1059
|
body.admin-color-ocean {
|
|
1043
1060
|
--wp-admin-border-width-focus: 1.5px;
|
|
1044
1061
|
}
|
|
@@ -1053,7 +1070,7 @@ body.admin-color-sunrise {
|
|
|
1053
1070
|
--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;
|
|
1054
1071
|
--wp-admin-border-width-focus: 2px;
|
|
1055
1072
|
}
|
|
1056
|
-
@media (
|
|
1073
|
+
@media (min-resolution: 192dpi) {
|
|
1057
1074
|
body.admin-color-sunrise {
|
|
1058
1075
|
--wp-admin-border-width-focus: 1.5px;
|
|
1059
1076
|
}
|
package/build-style/content.css
CHANGED
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
--wp-block-synced-color: #7a00df;
|
|
98
98
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
99
99
|
}
|
|
100
|
-
@media (
|
|
100
|
+
@media (min-resolution: 192dpi) {
|
|
101
101
|
:root {
|
|
102
102
|
--wp-admin-border-width-focus: 1.5px;
|
|
103
103
|
}
|
|
@@ -183,12 +183,12 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
183
183
|
}
|
|
184
184
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted,
|
|
185
185
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected,
|
|
186
|
-
.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus {
|
|
186
|
+
.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable=true]):focus {
|
|
187
187
|
outline: none;
|
|
188
188
|
}
|
|
189
189
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after,
|
|
190
190
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
191
|
-
.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus::after {
|
|
191
|
+
.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable=true]):focus::after {
|
|
192
192
|
content: "";
|
|
193
193
|
position: absolute;
|
|
194
194
|
z-index: 1;
|
|
@@ -203,7 +203,7 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
203
203
|
}
|
|
204
204
|
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after,
|
|
205
205
|
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
206
|
-
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus::after {
|
|
206
|
+
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable=true]):focus::after {
|
|
207
207
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) #fff;
|
|
208
208
|
}
|
|
209
209
|
.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected::after {
|
|
@@ -264,10 +264,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
264
264
|
margin: 0 0 12px 0;
|
|
265
265
|
width: 100%;
|
|
266
266
|
}
|
|
267
|
-
.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui .components-notice {
|
|
268
|
-
margin-left: 0;
|
|
269
|
-
margin-right: 0;
|
|
270
|
-
}
|
|
271
267
|
.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui .components-notice .components-notice__content {
|
|
272
268
|
font-size: 13px;
|
|
273
269
|
}
|
|
@@ -340,6 +336,27 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
340
336
|
border-radius: 2px;
|
|
341
337
|
}
|
|
342
338
|
|
|
339
|
+
.is-template-locked:hover .block-editor-block-list__block.is-editing-disabled > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected)::after, .is-template-locked:hover:has(> .block-editor-block-list__block.is-editing-disabled) > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected)::after,
|
|
340
|
+
.block-editor-block-list__block:hover .block-editor-block-list__block.is-editing-disabled > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected)::after,
|
|
341
|
+
.block-editor-block-list__block:hover:has(> .block-editor-block-list__block.is-editing-disabled) > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected)::after {
|
|
342
|
+
content: "";
|
|
343
|
+
border-style: dotted;
|
|
344
|
+
position: absolute;
|
|
345
|
+
pointer-events: none;
|
|
346
|
+
top: 1px;
|
|
347
|
+
left: 1px;
|
|
348
|
+
right: 1px;
|
|
349
|
+
bottom: 1px;
|
|
350
|
+
border: 1px dotted var(--wp-admin-theme-color);
|
|
351
|
+
border-radius: 1px;
|
|
352
|
+
}
|
|
353
|
+
.is-template-locked:hover .block-editor-block-list__block.is-editing-disabled > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected).is-hovered::after, .is-template-locked:hover:has(> .block-editor-block-list__block.is-editing-disabled) > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected).is-hovered::after,
|
|
354
|
+
.block-editor-block-list__block:hover .block-editor-block-list__block.is-editing-disabled > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected).is-hovered::after,
|
|
355
|
+
.block-editor-block-list__block:hover:has(> .block-editor-block-list__block.is-editing-disabled) > .block-editor-block-list__block:not(.is-editing-disabled):not(.is-selected):not(.has-child-selected).is-hovered::after {
|
|
356
|
+
background: rgba(var(--wp-admin-theme-color--rgb), 0.1);
|
|
357
|
+
border: none;
|
|
358
|
+
}
|
|
359
|
+
|
|
343
360
|
.is-focus-mode .block-editor-block-list__block:not(.has-child-selected) {
|
|
344
361
|
opacity: 0.2;
|
|
345
362
|
transition: opacity 0.1s linear;
|
|
@@ -948,7 +965,7 @@ body.admin-color-light {
|
|
|
948
965
|
--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;
|
|
949
966
|
--wp-admin-border-width-focus: 2px;
|
|
950
967
|
}
|
|
951
|
-
@media (
|
|
968
|
+
@media (min-resolution: 192dpi) {
|
|
952
969
|
body.admin-color-light {
|
|
953
970
|
--wp-admin-border-width-focus: 1.5px;
|
|
954
971
|
}
|
|
@@ -963,7 +980,7 @@ body.admin-color-modern {
|
|
|
963
980
|
--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;
|
|
964
981
|
--wp-admin-border-width-focus: 2px;
|
|
965
982
|
}
|
|
966
|
-
@media (
|
|
983
|
+
@media (min-resolution: 192dpi) {
|
|
967
984
|
body.admin-color-modern {
|
|
968
985
|
--wp-admin-border-width-focus: 1.5px;
|
|
969
986
|
}
|
|
@@ -978,7 +995,7 @@ body.admin-color-blue {
|
|
|
978
995
|
--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;
|
|
979
996
|
--wp-admin-border-width-focus: 2px;
|
|
980
997
|
}
|
|
981
|
-
@media (
|
|
998
|
+
@media (min-resolution: 192dpi) {
|
|
982
999
|
body.admin-color-blue {
|
|
983
1000
|
--wp-admin-border-width-focus: 1.5px;
|
|
984
1001
|
}
|
|
@@ -993,7 +1010,7 @@ body.admin-color-coffee {
|
|
|
993
1010
|
--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;
|
|
994
1011
|
--wp-admin-border-width-focus: 2px;
|
|
995
1012
|
}
|
|
996
|
-
@media (
|
|
1013
|
+
@media (min-resolution: 192dpi) {
|
|
997
1014
|
body.admin-color-coffee {
|
|
998
1015
|
--wp-admin-border-width-focus: 1.5px;
|
|
999
1016
|
}
|
|
@@ -1008,7 +1025,7 @@ body.admin-color-ectoplasm {
|
|
|
1008
1025
|
--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;
|
|
1009
1026
|
--wp-admin-border-width-focus: 2px;
|
|
1010
1027
|
}
|
|
1011
|
-
@media (
|
|
1028
|
+
@media (min-resolution: 192dpi) {
|
|
1012
1029
|
body.admin-color-ectoplasm {
|
|
1013
1030
|
--wp-admin-border-width-focus: 1.5px;
|
|
1014
1031
|
}
|
|
@@ -1023,7 +1040,7 @@ body.admin-color-midnight {
|
|
|
1023
1040
|
--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;
|
|
1024
1041
|
--wp-admin-border-width-focus: 2px;
|
|
1025
1042
|
}
|
|
1026
|
-
@media (
|
|
1043
|
+
@media (min-resolution: 192dpi) {
|
|
1027
1044
|
body.admin-color-midnight {
|
|
1028
1045
|
--wp-admin-border-width-focus: 1.5px;
|
|
1029
1046
|
}
|
|
@@ -1038,7 +1055,7 @@ body.admin-color-ocean {
|
|
|
1038
1055
|
--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;
|
|
1039
1056
|
--wp-admin-border-width-focus: 2px;
|
|
1040
1057
|
}
|
|
1041
|
-
@media (
|
|
1058
|
+
@media (min-resolution: 192dpi) {
|
|
1042
1059
|
body.admin-color-ocean {
|
|
1043
1060
|
--wp-admin-border-width-focus: 1.5px;
|
|
1044
1061
|
}
|
|
@@ -1053,7 +1070,7 @@ body.admin-color-sunrise {
|
|
|
1053
1070
|
--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;
|
|
1054
1071
|
--wp-admin-border-width-focus: 2px;
|
|
1055
1072
|
}
|
|
1056
|
-
@media (
|
|
1073
|
+
@media (min-resolution: 192dpi) {
|
|
1057
1074
|
body.admin-color-sunrise {
|
|
1058
1075
|
--wp-admin-border-width-focus: 1.5px;
|
|
1059
1076
|
}
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
--wp-block-synced-color: #7a00df;
|
|
98
98
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
99
99
|
}
|
|
100
|
-
@media (
|
|
100
|
+
@media (min-resolution: 192dpi) {
|
|
101
101
|
:root {
|
|
102
102
|
--wp-admin-border-width-focus: 1.5px;
|
|
103
103
|
}
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
--wp-block-synced-color: #7a00df;
|
|
98
98
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
99
99
|
}
|
|
100
|
-
@media (
|
|
100
|
+
@media (min-resolution: 192dpi) {
|
|
101
101
|
:root {
|
|
102
102
|
--wp-admin-border-width-focus: 1.5px;
|
|
103
103
|
}
|