@wordpress/block-editor 16.2.0 → 17.0.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 +39 -0
- package/build/components/block-inspector/index.cjs +9 -6
- package/build/components/block-inspector/index.cjs.map +2 -2
- package/build/components/block-keyboard-shortcuts/index.cjs +201 -0
- package/build/components/block-keyboard-shortcuts/index.cjs.map +7 -0
- package/build/components/block-list/block.cjs +10 -3
- package/build/components/block-list/block.cjs.map +2 -2
- package/build/components/block-list/index.cjs +6 -1
- package/build/components/block-list/index.cjs.map +2 -2
- package/build/components/block-list/use-block-props/use-focus-first-element.cjs +4 -0
- package/build/components/block-list/use-block-props/use-focus-first-element.cjs.map +2 -2
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.cjs +6 -7
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.cjs.map +2 -2
- package/build/components/block-parent-selector/index.cjs +98 -29
- package/build/components/block-parent-selector/index.cjs.map +3 -3
- package/build/components/block-popover/inbetween.cjs +2 -2
- package/build/components/block-popover/inbetween.cjs.map +2 -2
- package/build/components/block-preview/index.cjs +0 -4
- package/build/components/block-preview/index.cjs.map +2 -2
- package/build/components/block-styles/index.cjs +77 -33
- package/build/components/block-styles/index.cjs.map +3 -3
- package/build/components/block-visibility/constants.cjs.map +2 -2
- package/build/components/child-layout-control/index.cjs.map +2 -2
- package/build/components/colors/with-colors.cjs +55 -71
- package/build/components/colors/with-colors.cjs.map +2 -2
- package/build/components/dimensions-tool/aspect-ratio-tool.cjs +4 -2
- package/build/components/dimensions-tool/aspect-ratio-tool.cjs.map +2 -2
- package/build/components/dimensions-tool/index.cjs +18 -16
- package/build/components/dimensions-tool/index.cjs.map +2 -2
- package/build/components/dimensions-tool/utils.cjs +61 -0
- package/build/components/dimensions-tool/utils.cjs.map +7 -0
- package/build/components/duotone-control/index.cjs +2 -0
- package/build/components/duotone-control/index.cjs.map +2 -2
- package/build/components/global-styles/advanced-panel.cjs.map +3 -3
- package/build/components/global-styles/border-panel.cjs +2 -5
- package/build/components/global-styles/border-panel.cjs.map +2 -2
- package/build/components/global-styles/color-panel.cjs +14 -2
- package/build/components/global-styles/color-panel.cjs.map +2 -2
- package/build/components/global-styles/dimensions-panel.cjs +9 -5
- package/build/components/global-styles/dimensions-panel.cjs.map +2 -2
- package/build/components/global-styles/filters-panel.cjs +12 -8
- package/build/components/global-styles/filters-panel.cjs.map +2 -2
- package/build/components/global-styles/shadow-panel-components.cjs +16 -11
- package/build/components/global-styles/shadow-panel-components.cjs.map +2 -2
- package/build/components/global-styles/utils.cjs +9 -0
- package/build/components/global-styles/utils.cjs.map +2 -2
- package/build/components/inner-blocks/index.cjs +5 -3
- package/build/components/inner-blocks/index.cjs.map +2 -2
- package/build/components/inserter/block-patterns-explorer/index.cjs +39 -22
- package/build/components/inserter/block-patterns-explorer/index.cjs.map +2 -2
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.cjs +21 -55
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.cjs.map +2 -2
- package/build/components/inserter/block-patterns-explorer/pattern-list.cjs +19 -44
- package/build/components/inserter/block-patterns-explorer/pattern-list.cjs.map +3 -3
- package/build/components/inserter/hooks/use-insertion-point.cjs +4 -4
- package/build/components/inserter/hooks/use-insertion-point.cjs.map +2 -2
- package/build/components/inserter/menu.cjs +18 -7
- package/build/components/inserter/menu.cjs.map +2 -2
- package/build/components/inserter/quick-inserter.cjs +30 -27
- package/build/components/inserter/quick-inserter.cjs.map +2 -2
- package/build/components/inspector-controls-tabs/styles-tab.cjs +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.cjs.map +2 -2
- package/build/components/list-view/index.cjs +31 -5
- package/build/components/list-view/index.cjs.map +3 -3
- package/build/components/list-view/utils.cjs +13 -1
- package/build/components/list-view/utils.cjs.map +2 -2
- package/build/components/media-placeholder/index.cjs +1 -1
- package/build/components/media-placeholder/index.cjs.map +3 -3
- package/build/components/provider/index.cjs +5 -1
- package/build/components/provider/index.cjs.map +3 -3
- package/build/components/publish-date-time-picker/index.cjs +3 -2
- package/build/components/publish-date-time-picker/index.cjs.map +2 -2
- package/build/components/rich-text/event-listeners/enter.cjs +46 -39
- package/build/components/rich-text/event-listeners/enter.cjs.map +2 -2
- package/build/components/rich-text/index.cjs +7 -5
- package/build/components/rich-text/index.cjs.map +2 -2
- package/build/components/rich-text/multiline.cjs +105 -70
- package/build/components/rich-text/multiline.cjs.map +3 -3
- package/build/components/url-input/index.cjs.map +2 -2
- package/build/components/writing-flow/use-input.cjs +65 -13
- package/build/components/writing-flow/use-input.cjs.map +3 -3
- package/build/hooks/border.cjs +25 -3
- package/build/hooks/border.cjs.map +2 -2
- package/build/hooks/dimensions.cjs +9 -2
- package/build/hooks/dimensions.cjs.map +2 -2
- package/build/hooks/duotone.cjs +4 -3
- package/build/hooks/duotone.cjs.map +2 -2
- package/build/hooks/gap.cjs +8 -2
- package/build/hooks/gap.cjs.map +2 -2
- package/build/hooks/layout-child.cjs +35 -13
- package/build/hooks/layout-child.cjs.map +2 -2
- package/build/hooks/layout.cjs +23 -1
- package/build/hooks/layout.cjs.map +2 -2
- package/build/hooks/states.cjs +7 -4
- package/build/hooks/states.cjs.map +2 -2
- package/build/layouts/constrained.cjs +8 -1
- package/build/layouts/constrained.cjs.map +2 -2
- package/build/layouts/flex.cjs +9 -0
- package/build/layouts/flex.cjs.map +2 -2
- package/build/layouts/flow.cjs +4 -1
- package/build/layouts/flow.cjs.map +2 -2
- package/build/layouts/grid.cjs +5 -1
- package/build/layouts/grid.cjs.map +2 -2
- package/build/private-apis.cjs +3 -1
- package/build/private-apis.cjs.map +2 -2
- package/build/store/actions.cjs +1 -1
- package/build/store/actions.cjs.map +2 -2
- package/build-module/components/block-inspector/index.mjs +9 -6
- package/build-module/components/block-inspector/index.mjs.map +2 -2
- package/build-module/components/block-keyboard-shortcuts/index.mjs +173 -0
- package/build-module/components/block-keyboard-shortcuts/index.mjs.map +7 -0
- package/build-module/components/block-list/block.mjs +10 -3
- package/build-module/components/block-list/block.mjs.map +2 -2
- package/build-module/components/block-list/index.mjs +6 -1
- package/build-module/components/block-list/index.mjs.map +2 -2
- package/build-module/components/block-list/use-block-props/use-focus-first-element.mjs +4 -0
- package/build-module/components/block-list/use-block-props/use-focus-first-element.mjs.map +2 -2
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.mjs +6 -7
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.mjs.map +2 -2
- package/build-module/components/block-parent-selector/index.mjs +101 -32
- package/build-module/components/block-parent-selector/index.mjs.map +2 -2
- package/build-module/components/block-popover/inbetween.mjs +2 -2
- package/build-module/components/block-popover/inbetween.mjs.map +2 -2
- package/build-module/components/block-preview/index.mjs +0 -4
- package/build-module/components/block-preview/index.mjs.map +2 -2
- package/build-module/components/block-styles/index.mjs +79 -35
- package/build-module/components/block-styles/index.mjs.map +2 -2
- package/build-module/components/block-visibility/constants.mjs.map +2 -2
- package/build-module/components/child-layout-control/index.mjs +5 -5
- package/build-module/components/child-layout-control/index.mjs.map +1 -1
- package/build-module/components/colors/with-colors.mjs +56 -72
- package/build-module/components/colors/with-colors.mjs.map +2 -2
- package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs +4 -2
- package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs.map +2 -2
- package/build-module/components/dimensions-tool/index.mjs +19 -17
- package/build-module/components/dimensions-tool/index.mjs.map +2 -2
- package/build-module/components/dimensions-tool/utils.mjs +35 -0
- package/build-module/components/dimensions-tool/utils.mjs.map +7 -0
- package/build-module/components/duotone-control/index.mjs +2 -0
- package/build-module/components/duotone-control/index.mjs.map +2 -2
- package/build-module/components/global-styles/advanced-panel.mjs +5 -2
- package/build-module/components/global-styles/advanced-panel.mjs.map +2 -2
- package/build-module/components/global-styles/border-panel.mjs +2 -5
- package/build-module/components/global-styles/border-panel.mjs.map +2 -2
- package/build-module/components/global-styles/color-panel.mjs +14 -2
- package/build-module/components/global-styles/color-panel.mjs.map +2 -2
- package/build-module/components/global-styles/dimensions-panel.mjs +9 -5
- package/build-module/components/global-styles/dimensions-panel.mjs.map +2 -2
- package/build-module/components/global-styles/filters-panel.mjs +16 -9
- package/build-module/components/global-styles/filters-panel.mjs.map +2 -2
- package/build-module/components/global-styles/shadow-panel-components.mjs +16 -11
- package/build-module/components/global-styles/shadow-panel-components.mjs.map +2 -2
- package/build-module/components/global-styles/utils.mjs +8 -0
- package/build-module/components/global-styles/utils.mjs.map +2 -2
- package/build-module/components/inner-blocks/index.mjs +5 -3
- package/build-module/components/inner-blocks/index.mjs.map +2 -2
- package/build-module/components/inserter/block-patterns-explorer/index.mjs +39 -22
- package/build-module/components/inserter/block-patterns-explorer/index.mjs.map +2 -2
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.mjs +22 -56
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.mjs.map +2 -2
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.mjs +20 -45
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.mjs.map +2 -2
- package/build-module/components/inserter/hooks/use-insertion-point.mjs +4 -4
- package/build-module/components/inserter/hooks/use-insertion-point.mjs.map +2 -2
- package/build-module/components/inserter/menu.mjs +19 -8
- package/build-module/components/inserter/menu.mjs.map +2 -2
- package/build-module/components/inserter/quick-inserter.mjs +30 -27
- package/build-module/components/inserter/quick-inserter.mjs.map +2 -2
- package/build-module/components/inspector-controls-tabs/styles-tab.mjs +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.mjs.map +2 -2
- package/build-module/components/list-view/index.mjs +32 -5
- package/build-module/components/list-view/index.mjs.map +3 -3
- package/build-module/components/list-view/utils.mjs +13 -1
- package/build-module/components/list-view/utils.mjs.map +2 -2
- package/build-module/components/media-placeholder/index.mjs +3 -3
- package/build-module/components/media-placeholder/index.mjs.map +2 -2
- package/build-module/components/provider/index.mjs +6 -2
- package/build-module/components/provider/index.mjs.map +2 -2
- package/build-module/components/publish-date-time-picker/index.mjs +3 -2
- package/build-module/components/publish-date-time-picker/index.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/enter.mjs +46 -39
- package/build-module/components/rich-text/event-listeners/enter.mjs.map +2 -2
- package/build-module/components/rich-text/index.mjs +7 -5
- package/build-module/components/rich-text/index.mjs.map +2 -2
- package/build-module/components/rich-text/multiline.mjs +112 -72
- package/build-module/components/rich-text/multiline.mjs.map +2 -2
- package/build-module/components/url-input/index.mjs +2 -2
- package/build-module/components/url-input/index.mjs.map +1 -1
- package/build-module/components/writing-flow/use-input.mjs +66 -14
- package/build-module/components/writing-flow/use-input.mjs.map +3 -3
- package/build-module/hooks/border.mjs +26 -8
- package/build-module/hooks/border.mjs.map +2 -2
- package/build-module/hooks/dimensions.mjs +9 -2
- package/build-module/hooks/dimensions.mjs.map +2 -2
- package/build-module/hooks/duotone.mjs +8 -4
- package/build-module/hooks/duotone.mjs.map +2 -2
- package/build-module/hooks/gap.mjs +6 -1
- package/build-module/hooks/gap.mjs.map +2 -2
- package/build-module/hooks/layout-child.mjs +36 -13
- package/build-module/hooks/layout-child.mjs.map +2 -2
- package/build-module/hooks/layout.mjs +22 -1
- package/build-module/hooks/layout.mjs.map +2 -2
- package/build-module/hooks/states.mjs +8 -5
- package/build-module/hooks/states.mjs.map +2 -2
- package/build-module/layouts/constrained.mjs +8 -1
- package/build-module/layouts/constrained.mjs.map +2 -2
- package/build-module/layouts/flex.mjs +9 -0
- package/build-module/layouts/flex.mjs.map +2 -2
- package/build-module/layouts/flow.mjs +4 -1
- package/build-module/layouts/flow.mjs.map +2 -2
- package/build-module/layouts/grid.mjs +5 -1
- package/build-module/layouts/grid.mjs.map +2 -2
- package/build-module/private-apis.mjs +3 -1
- package/build-module/private-apis.mjs.map +2 -2
- package/build-module/store/actions.mjs +1 -1
- package/build-module/store/actions.mjs.map +2 -2
- package/build-style/style-rtl.css +108 -71
- package/build-style/style.css +108 -71
- package/build-types/components/block-visibility/constants.d.ts +4 -3
- package/build-types/components/block-visibility/constants.d.ts.map +1 -1
- package/package.json +43 -43
- package/src/components/background-image-control/README.md +122 -0
- package/src/components/block-edit-visually-button/README.md +39 -0
- package/src/components/block-editing-mode/README.md +72 -0
- package/src/components/block-inspector/index.js +6 -6
- package/src/components/block-keyboard-shortcuts/index.js +256 -0
- package/src/components/block-list/block.js +7 -0
- package/src/components/block-list/index.js +7 -1
- package/src/components/block-list/use-block-props/use-focus-first-element.js +5 -0
- package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +6 -8
- package/src/components/block-parent-selector/index.js +111 -30
- package/src/components/block-popover/README.md +10 -3
- package/src/components/block-popover/inbetween.js +8 -2
- package/src/components/block-popover/stories/index.story.jsx +143 -0
- package/src/components/block-preview/index.js +0 -2
- package/src/components/block-styles/index.js +95 -43
- package/src/components/block-styles/style.scss +5 -34
- package/src/components/block-tools/style.scss +94 -0
- package/src/components/block-visibility/constants.ts +4 -3
- package/src/components/child-layout-control/index.js +5 -5
- package/src/components/color-palette/test/__snapshots__/control.js.snap +3 -29
- package/src/components/colors/test/with-colors.js +6 -7
- package/src/components/colors/with-colors.js +79 -105
- package/src/components/dimensions-tool/aspect-ratio-tool.js +16 -4
- package/src/components/dimensions-tool/index.js +34 -22
- package/src/components/dimensions-tool/test/index.js +166 -2
- package/src/components/dimensions-tool/test/utils.js +51 -0
- package/src/components/dimensions-tool/utils.js +67 -0
- package/src/components/duotone-control/index.js +2 -0
- package/src/components/duotone-control/test/index.js +100 -0
- package/src/components/global-styles/advanced-panel.js +5 -2
- package/src/components/global-styles/border-panel.js +11 -9
- package/src/components/global-styles/color-panel.js +13 -1
- package/src/components/global-styles/dimensions-panel.js +17 -5
- package/src/components/global-styles/filters-panel.js +24 -10
- package/src/components/global-styles/shadow-panel-components.js +38 -11
- package/src/components/global-styles/test/border-panel.js +230 -0
- package/src/components/global-styles/test/color-panel.js +24 -0
- package/src/components/global-styles/test/dimensions-panel.js +98 -7
- package/src/components/global-styles/test/filters-panel.js +84 -0
- package/src/components/global-styles/test/utils.js +30 -0
- package/src/components/global-styles/utils.js +23 -0
- package/src/components/inner-blocks/index.js +11 -2
- package/src/components/inner-blocks/stories/index.story.jsx +246 -0
- package/src/components/inserter/block-patterns-explorer/index.js +24 -11
- package/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +18 -56
- package/src/components/inserter/block-patterns-explorer/pattern-list.js +22 -47
- package/src/components/inserter/hooks/use-insertion-point.js +9 -4
- package/src/components/inserter/menu.js +23 -10
- package/src/components/inserter/quick-inserter.js +15 -13
- package/src/components/inserter/style.scss +44 -62
- package/src/components/inspector-controls-tabs/README.md +92 -0
- package/src/components/inspector-controls-tabs/styles-tab.js +1 -1
- package/src/components/link-control/test/index.js +5 -0
- package/src/components/list-view/index.js +50 -7
- package/src/components/list-view/utils.js +16 -1
- package/src/components/media-placeholder/index.js +9 -4
- package/src/components/plain-text/stories/index.story.jsx +3 -0
- package/src/components/provider/index.js +7 -1
- package/src/components/publish-date-time-picker/README.md +10 -0
- package/src/components/publish-date-time-picker/index.js +17 -14
- package/src/components/rich-text/event-listeners/enter.js +58 -45
- package/src/components/rich-text/index.js +9 -4
- package/src/components/rich-text/multiline.js +126 -86
- package/src/components/url-input/index.js +2 -2
- package/src/components/url-input/test/fixtures/validated-input-control-deprecation.js +27 -0
- package/src/components/url-input/test/index.js +5 -0
- package/src/components/url-popover/README.md +7 -0
- package/src/components/url-popover/stories/index.story.jsx +133 -47
- package/src/components/writing-flow/use-input.js +105 -15
- package/src/hooks/border.js +27 -8
- package/src/hooks/dimensions.js +8 -1
- package/src/hooks/duotone.js +23 -7
- package/src/hooks/gap.js +16 -0
- package/src/hooks/layout-child.js +41 -9
- package/src/hooks/layout.js +117 -71
- package/src/hooks/states.js +8 -5
- package/src/hooks/test/gap.js +31 -1
- package/src/hooks/test/layout-child.js +60 -1
- package/src/hooks/test/layout.js +27 -0
- package/src/layouts/constrained.js +9 -1
- package/src/layouts/flex.js +15 -0
- package/src/layouts/flow.js +4 -1
- package/src/layouts/grid.js +9 -1
- package/src/layouts/test/constrained.js +26 -0
- package/src/layouts/test/flow.js +26 -0
- package/src/layouts/test/grid.js +46 -0
- package/src/private-apis.js +2 -0
- package/src/store/actions.js +14 -1
- package/build/components/floating-toolbar/nav-up-icon.cjs +0 -52
- package/build/components/floating-toolbar/nav-up-icon.cjs.map +0 -7
- package/build/components/gradients/with-gradient.cjs +0 -36
- package/build/components/gradients/with-gradient.cjs.map +0 -7
- package/build/components/inserter-button/sparkles.cjs +0 -36
- package/build/components/inserter-button/sparkles.cjs.map +0 -7
- package/build-module/components/floating-toolbar/nav-up-icon.mjs +0 -31
- package/build-module/components/floating-toolbar/nav-up-icon.mjs.map +0 -7
- package/build-module/components/gradients/with-gradient.mjs +0 -11
- package/build-module/components/gradients/with-gradient.mjs.map +0 -7
- package/build-module/components/inserter-button/sparkles.mjs +0 -15
- package/build-module/components/inserter-button/sparkles.mjs.map +0 -7
- package/build-style/default-editor-styles-rtl.css +0 -68
- package/build-style/default-editor-styles.css +0 -68
- package/src/components/floating-toolbar/nav-up-icon.js +0 -22
- package/src/components/gradients/with-gradient.js +0 -9
- package/src/components/inserter-button/README.md +0 -62
- package/src/components/inserter-button/sparkles.js +0 -12
- package/src/default-editor-styles.scss +0 -25
package/src/hooks/test/gap.js
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
getGapCSSValue,
|
|
3
|
+
getGapBoxControlValueFromStyle,
|
|
4
|
+
isAxialBlockGapAllowed,
|
|
5
|
+
} from '../gap';
|
|
2
6
|
|
|
3
7
|
describe( 'gap', () => {
|
|
8
|
+
describe( 'isAxialBlockGapAllowed()', () => {
|
|
9
|
+
it( 'should allow axial block gap for Flex layouts', () => {
|
|
10
|
+
expect( isAxialBlockGapAllowed( { type: 'flex' } ) ).toBe( true );
|
|
11
|
+
} );
|
|
12
|
+
|
|
13
|
+
it( 'should allow axial block gap for Grid layouts', () => {
|
|
14
|
+
expect( isAxialBlockGapAllowed( { type: 'grid' } ) ).toBe( true );
|
|
15
|
+
} );
|
|
16
|
+
|
|
17
|
+
it( 'should not allow axial block gap for Flow layouts', () => {
|
|
18
|
+
expect( isAxialBlockGapAllowed( { type: 'flow' } ) ).toBe( false );
|
|
19
|
+
} );
|
|
20
|
+
|
|
21
|
+
it( 'should not allow axial block gap for Constrained layouts', () => {
|
|
22
|
+
expect( isAxialBlockGapAllowed( { type: 'constrained' } ) ).toBe(
|
|
23
|
+
false
|
|
24
|
+
);
|
|
25
|
+
} );
|
|
26
|
+
|
|
27
|
+
it( 'should use the default layout when the block has no layout attribute', () => {
|
|
28
|
+
expect(
|
|
29
|
+
isAxialBlockGapAllowed( undefined, { type: 'flex' } )
|
|
30
|
+
).toBe( true );
|
|
31
|
+
} );
|
|
32
|
+
} );
|
|
33
|
+
|
|
4
34
|
describe( 'getGapBoxControlValueFromStyle()', () => {
|
|
5
35
|
it( 'should return `null` if argument is falsey', () => {
|
|
6
36
|
expect( getGapBoxControlValueFromStyle( undefined ) ).toBeNull();
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
getChildLayoutStyleRules,
|
|
3
|
+
getChildLayoutStyles,
|
|
4
|
+
getResponsiveChildLayoutStyles,
|
|
5
|
+
getUpdatedChildLayoutStyle,
|
|
6
|
+
} from '../layout-child';
|
|
2
7
|
|
|
3
8
|
describe( 'layout child', () => {
|
|
4
9
|
describe( 'getChildLayoutStyleRules()', () => {
|
|
@@ -159,4 +164,58 @@ describe( 'layout child', () => {
|
|
|
159
164
|
] );
|
|
160
165
|
} );
|
|
161
166
|
} );
|
|
167
|
+
|
|
168
|
+
describe( 'getUpdatedChildLayoutStyle()', () => {
|
|
169
|
+
it( 'stores resizer changes in the selected viewport when no default child layout exists', () => {
|
|
170
|
+
const style = getUpdatedChildLayoutStyle(
|
|
171
|
+
undefined,
|
|
172
|
+
{
|
|
173
|
+
columnSpan: 2,
|
|
174
|
+
rowSpan: 1,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
viewport: '@mobile',
|
|
178
|
+
pseudo: 'default',
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
expect(
|
|
183
|
+
getChildLayoutStyles( {
|
|
184
|
+
selector: '.wp-container-content-test',
|
|
185
|
+
layout: style?.layout,
|
|
186
|
+
} )
|
|
187
|
+
).toBe( '' );
|
|
188
|
+
expect(
|
|
189
|
+
getResponsiveChildLayoutStyles( {
|
|
190
|
+
style,
|
|
191
|
+
selector: '.wp-container-content-test',
|
|
192
|
+
} )
|
|
193
|
+
).toBe(
|
|
194
|
+
'@media (width <= 480px){.wp-container-content-test {\n\t\tgrid-column: span 2; grid-row: span 1;\n\t}}'
|
|
195
|
+
);
|
|
196
|
+
} );
|
|
197
|
+
|
|
198
|
+
it( 'stores resizer changes in the selected viewport when a pseudo state is also selected', () => {
|
|
199
|
+
expect(
|
|
200
|
+
getUpdatedChildLayoutStyle(
|
|
201
|
+
undefined,
|
|
202
|
+
{
|
|
203
|
+
columnSpan: 2,
|
|
204
|
+
rowSpan: 1,
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
viewport: '@mobile',
|
|
208
|
+
pseudo: ':hover',
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
).toEqual( {
|
|
212
|
+
'@mobile': {
|
|
213
|
+
layout: {
|
|
214
|
+
columnSpan: 2,
|
|
215
|
+
rowSpan: 1,
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
} );
|
|
219
|
+
} );
|
|
220
|
+
} );
|
|
162
221
|
} );
|
package/src/hooks/test/layout.js
CHANGED
|
@@ -2,9 +2,36 @@ import {
|
|
|
2
2
|
getLayoutStateOverrides,
|
|
3
3
|
getResetLayout,
|
|
4
4
|
getResponsiveLayoutStyles,
|
|
5
|
+
hasLayoutPanelControls,
|
|
5
6
|
} from '../layout';
|
|
7
|
+
import { getLayoutType } from '../../layouts';
|
|
6
8
|
|
|
7
9
|
describe( 'layout', () => {
|
|
10
|
+
describe( 'hasLayoutPanelControls()', () => {
|
|
11
|
+
it( 'does not show the layout panel when every flex layout control is disabled', () => {
|
|
12
|
+
expect(
|
|
13
|
+
hasLayoutPanelControls( {
|
|
14
|
+
layoutType: getLayoutType( 'flex' ),
|
|
15
|
+
constrainedType: getLayoutType( 'constrained' ),
|
|
16
|
+
layoutBlockSupport: {
|
|
17
|
+
allowSwitching: false,
|
|
18
|
+
allowInheriting: false,
|
|
19
|
+
allowEditing: true,
|
|
20
|
+
allowOrientation: false,
|
|
21
|
+
allowJustification: false,
|
|
22
|
+
allowVerticalAlignment: false,
|
|
23
|
+
allowWrap: false,
|
|
24
|
+
allowSizingOnChildren: true,
|
|
25
|
+
default: { type: 'flex' },
|
|
26
|
+
},
|
|
27
|
+
showInheritToggle: false,
|
|
28
|
+
showLayoutTypeSwitcher: false,
|
|
29
|
+
displayControlsForLegacyLayouts: false,
|
|
30
|
+
} )
|
|
31
|
+
).toBe( false );
|
|
32
|
+
} );
|
|
33
|
+
} );
|
|
34
|
+
|
|
8
35
|
describe( 'getResetLayout()', () => {
|
|
9
36
|
it( 'should reset to variation layout defaults', () => {
|
|
10
37
|
const layout = getResetLayout(
|
|
@@ -29,6 +29,14 @@ const GLOBAL_WIDE_SIZE = 'var(--wp--style--global--wide-size, none)';
|
|
|
29
29
|
export default {
|
|
30
30
|
name: 'constrained',
|
|
31
31
|
label: __( 'Constrained' ),
|
|
32
|
+
hasInspectorControls( layoutBlockSupport = {} ) {
|
|
33
|
+
const {
|
|
34
|
+
allowJustification = true,
|
|
35
|
+
allowCustomContentAndWideSize = true,
|
|
36
|
+
} = layoutBlockSupport;
|
|
37
|
+
|
|
38
|
+
return allowJustification || allowCustomContentAndWideSize;
|
|
39
|
+
},
|
|
32
40
|
inspectorControls: function DefaultLayoutInspectorControls( {
|
|
33
41
|
layout,
|
|
34
42
|
onChange,
|
|
@@ -247,7 +255,7 @@ export default {
|
|
|
247
255
|
const hasViewportOverride = ( key ) =>
|
|
248
256
|
Object.hasOwn( viewportOverrides || {}, key );
|
|
249
257
|
const { contentSize, wideSize, justifyContent } = effectiveLayout;
|
|
250
|
-
const blockGapStyleValue =
|
|
258
|
+
const blockGapStyleValue = style?.spacing?.blockGap;
|
|
251
259
|
const hasBlockGapOverride =
|
|
252
260
|
! hasViewportOverrides ||
|
|
253
261
|
Object.hasOwn( style?.spacing || {}, 'blockGap' );
|
package/src/layouts/flex.js
CHANGED
|
@@ -88,6 +88,21 @@ const flexWrapOptions = [ 'wrap', 'nowrap' ];
|
|
|
88
88
|
export default {
|
|
89
89
|
name: 'flex',
|
|
90
90
|
label: __( 'Flex' ),
|
|
91
|
+
hasInspectorControls( layoutBlockSupport = {} ) {
|
|
92
|
+
const {
|
|
93
|
+
allowOrientation = true,
|
|
94
|
+
allowJustification = true,
|
|
95
|
+
allowVerticalAlignment = true,
|
|
96
|
+
allowWrap = true,
|
|
97
|
+
} = layoutBlockSupport;
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
allowOrientation ||
|
|
101
|
+
allowJustification ||
|
|
102
|
+
allowVerticalAlignment ||
|
|
103
|
+
allowWrap
|
|
104
|
+
);
|
|
105
|
+
},
|
|
91
106
|
inspectorControls: function FlexLayoutInspectorControls( {
|
|
92
107
|
layout = {},
|
|
93
108
|
onChange,
|
package/src/layouts/flow.js
CHANGED
|
@@ -7,6 +7,9 @@ import { LAYOUT_DEFINITIONS } from './definitions';
|
|
|
7
7
|
export default {
|
|
8
8
|
name: 'default',
|
|
9
9
|
label: __( 'Flow' ),
|
|
10
|
+
hasInspectorControls() {
|
|
11
|
+
return false;
|
|
12
|
+
},
|
|
10
13
|
inspectorControls: function DefaultLayoutInspectorControls() {
|
|
11
14
|
return null;
|
|
12
15
|
},
|
|
@@ -20,7 +23,7 @@ export default {
|
|
|
20
23
|
hasBlockGapSupport,
|
|
21
24
|
layoutDefinitions = LAYOUT_DEFINITIONS,
|
|
22
25
|
} ) {
|
|
23
|
-
const blockGapStyleValue =
|
|
26
|
+
const blockGapStyleValue = style?.spacing?.blockGap;
|
|
24
27
|
|
|
25
28
|
// If a block's block.json skips serialization for spacing or
|
|
26
29
|
// spacing.blockGap, don't apply the user-defined value to the styles.
|
package/src/layouts/grid.js
CHANGED
|
@@ -59,6 +59,9 @@ const units = [
|
|
|
59
59
|
export default {
|
|
60
60
|
name: 'grid',
|
|
61
61
|
label: __( 'Grid' ),
|
|
62
|
+
hasInspectorControls() {
|
|
63
|
+
return true;
|
|
64
|
+
},
|
|
62
65
|
inspectorControls: function GridLayoutInspectorControls( {
|
|
63
66
|
layout = {},
|
|
64
67
|
onChange,
|
|
@@ -273,7 +276,12 @@ export default {
|
|
|
273
276
|
minimumColumnWidth &&
|
|
274
277
|
columnCount > 0
|
|
275
278
|
) {
|
|
276
|
-
|
|
279
|
+
const blockGapBoxControlValue = blockGapValue
|
|
280
|
+
? getGapBoxControlValueFromStyle( style.spacing.blockGap )
|
|
281
|
+
: undefined;
|
|
282
|
+
let blockGapToUse =
|
|
283
|
+
getSpacingPresetCssVar( blockGapBoxControlValue?.left ) ||
|
|
284
|
+
fallbackGapValue;
|
|
277
285
|
// Ensure 0 values have a unit so they work in calc().
|
|
278
286
|
if ( blockGapToUse === '0' || blockGapToUse === 0 ) {
|
|
279
287
|
blockGapToUse = '0px';
|
|
@@ -35,6 +35,32 @@ describe( 'getLayoutStyle', () => {
|
|
|
35
35
|
expect( result ).toBe( expected );
|
|
36
36
|
} );
|
|
37
37
|
|
|
38
|
+
it( 'uses the vertical block gap when a constrained layout receives an axial gap', () => {
|
|
39
|
+
const result = constrained.getLayoutStyle( {
|
|
40
|
+
selector: '.my-container',
|
|
41
|
+
layout: {},
|
|
42
|
+
style: {
|
|
43
|
+
spacing: { blockGap: { top: '2rem', left: '3rem' } },
|
|
44
|
+
},
|
|
45
|
+
blockName: 'test-block',
|
|
46
|
+
hasBlockGapSupport: true,
|
|
47
|
+
layoutDefinitions: {
|
|
48
|
+
constrained: {
|
|
49
|
+
spacingStyles: [
|
|
50
|
+
{
|
|
51
|
+
selector: ' > * + *',
|
|
52
|
+
rules: { 'margin-block-start': null },
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
} );
|
|
58
|
+
|
|
59
|
+
expect( result ).toBe(
|
|
60
|
+
'.my-container > * + * { margin-block-start: 2rem; }'
|
|
61
|
+
);
|
|
62
|
+
} );
|
|
63
|
+
|
|
38
64
|
it( 'should reset constrained sizes when content width is unset in a viewport', () => {
|
|
39
65
|
const result = constrained.getLayoutStyle( {
|
|
40
66
|
selector: '.my-container',
|
package/src/layouts/test/flow.js
CHANGED
|
@@ -15,4 +15,30 @@ describe( 'getLayoutStyle', () => {
|
|
|
15
15
|
|
|
16
16
|
expect( result ).toBe( expected );
|
|
17
17
|
} );
|
|
18
|
+
|
|
19
|
+
it( 'uses the vertical block gap when a flow layout receives an axial gap', () => {
|
|
20
|
+
const result = flow.getLayoutStyle( {
|
|
21
|
+
selector: '.my-container',
|
|
22
|
+
layout: {},
|
|
23
|
+
style: {
|
|
24
|
+
spacing: { blockGap: { top: '2rem', left: '3rem' } },
|
|
25
|
+
},
|
|
26
|
+
blockName: 'test-block',
|
|
27
|
+
hasBlockGapSupport: true,
|
|
28
|
+
layoutDefinitions: {
|
|
29
|
+
default: {
|
|
30
|
+
spacingStyles: [
|
|
31
|
+
{
|
|
32
|
+
selector: ' > * + *',
|
|
33
|
+
rules: { 'margin-block-start': null },
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
} );
|
|
39
|
+
|
|
40
|
+
expect( result ).toBe(
|
|
41
|
+
'.my-container > * + * { margin-block-start: 2rem; }'
|
|
42
|
+
);
|
|
43
|
+
} );
|
|
18
44
|
} );
|
package/src/layouts/test/grid.js
CHANGED
|
@@ -91,6 +91,52 @@ describe( 'getLayoutStyle', () => {
|
|
|
91
91
|
layoutDefinitions: undefined,
|
|
92
92
|
} );
|
|
93
93
|
|
|
94
|
+
expect( result ).toBe( expected );
|
|
95
|
+
} );
|
|
96
|
+
it( 'should use the horizontal block gap to calculate responsive Grid column widths', () => {
|
|
97
|
+
const expected = `.my-container { grid-template-columns: repeat(auto-fill, minmax(max(min( 12rem, 100%), ( 100% - (3rem*2) ) / 3), 1fr)); container-type: inline-size; }.my-container { gap: 2rem 3rem; }`;
|
|
98
|
+
|
|
99
|
+
const result = grid.getLayoutStyle( {
|
|
100
|
+
selector: '.my-container',
|
|
101
|
+
layout: { minimumColumnWidth: '12rem', columnCount: 3 },
|
|
102
|
+
style: {
|
|
103
|
+
spacing: { blockGap: { top: '2rem', left: '3rem' } },
|
|
104
|
+
},
|
|
105
|
+
blockName: 'test-block',
|
|
106
|
+
hasBlockGapSupport: true,
|
|
107
|
+
layoutDefinitions: undefined,
|
|
108
|
+
} );
|
|
109
|
+
|
|
110
|
+
expect( result ).toBe( expected );
|
|
111
|
+
} );
|
|
112
|
+
it( 'should use the fallback gap when an axial value has no horizontal gap', () => {
|
|
113
|
+
const expected = `.my-container { grid-template-columns: repeat(auto-fill, minmax(max(min( 12rem, 100%), ( 100% - (1.2rem*2) ) / 3), 1fr)); container-type: inline-size; }.my-container { gap: 2rem 1.2rem; }`;
|
|
114
|
+
|
|
115
|
+
const result = grid.getLayoutStyle( {
|
|
116
|
+
selector: '.my-container',
|
|
117
|
+
layout: { minimumColumnWidth: '12rem', columnCount: 3 },
|
|
118
|
+
style: { spacing: { blockGap: { top: '2rem' } } },
|
|
119
|
+
blockName: 'test-block',
|
|
120
|
+
hasBlockGapSupport: true,
|
|
121
|
+
layoutDefinitions: undefined,
|
|
122
|
+
} );
|
|
123
|
+
|
|
124
|
+
expect( result ).toBe( expected );
|
|
125
|
+
} );
|
|
126
|
+
it( 'should preserve a zero horizontal gap in responsive Grid column widths', () => {
|
|
127
|
+
const expected = `.my-container { grid-template-columns: repeat(auto-fill, minmax(max(min( 12rem, 100%), ( 100% - (0px*2) ) / 3), 1fr)); container-type: inline-size; }.my-container { gap: 2rem 0; }`;
|
|
128
|
+
|
|
129
|
+
const result = grid.getLayoutStyle( {
|
|
130
|
+
selector: '.my-container',
|
|
131
|
+
layout: { minimumColumnWidth: '12rem', columnCount: 3 },
|
|
132
|
+
style: {
|
|
133
|
+
spacing: { blockGap: { top: '2rem', left: '0' } },
|
|
134
|
+
},
|
|
135
|
+
blockName: 'test-block',
|
|
136
|
+
hasBlockGapSupport: true,
|
|
137
|
+
layoutDefinitions: undefined,
|
|
138
|
+
} );
|
|
139
|
+
|
|
94
140
|
expect( result ).toBe( expected );
|
|
95
141
|
} );
|
|
96
142
|
} );
|
package/src/private-apis.js
CHANGED
|
@@ -81,6 +81,7 @@ import {
|
|
|
81
81
|
isHashLink,
|
|
82
82
|
isRelativePath,
|
|
83
83
|
} from './components/link-control/is-url-like';
|
|
84
|
+
import { isElementVisible } from './utils/dom';
|
|
84
85
|
|
|
85
86
|
const { getDuotoneFilter } = unlock( globalStylesEnginePrivateApis );
|
|
86
87
|
|
|
@@ -159,4 +160,5 @@ lock( privateApis, {
|
|
|
159
160
|
InnerContent,
|
|
160
161
|
useNativeUndo,
|
|
161
162
|
usesNativeUndo,
|
|
163
|
+
isElementVisible,
|
|
162
164
|
} );
|
package/src/store/actions.js
CHANGED
|
@@ -1371,7 +1371,20 @@ export const mergeBlocks =
|
|
|
1371
1371
|
return;
|
|
1372
1372
|
}
|
|
1373
1373
|
|
|
1374
|
-
|
|
1374
|
+
// An unmodified default block adds nothing to the merge. Neither
|
|
1375
|
+
// does an empty text block of a different type, where merging would
|
|
1376
|
+
// transform blockB into blockA's type instead (a paragraph deleted
|
|
1377
|
+
// into an empty heading became a heading), so remove blockA in both
|
|
1378
|
+
// cases. The merge function requirement keeps containers out: a
|
|
1379
|
+
// columns block has no content attributes, so it would otherwise
|
|
1380
|
+
// always count as empty and be removed on Backspace instead of
|
|
1381
|
+
// selected.
|
|
1382
|
+
if (
|
|
1383
|
+
isUnmodifiedDefaultBlock( blockA ) ||
|
|
1384
|
+
( !! blockAType.merge &&
|
|
1385
|
+
blockA.name !== blockB.name &&
|
|
1386
|
+
isUnmodifiedBlock( blockA, 'content' ) )
|
|
1387
|
+
) {
|
|
1375
1388
|
const isASelected = select.isBlockSelected( clientIdA );
|
|
1376
1389
|
|
|
1377
1390
|
if ( isASelected ) {
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// packages/block-editor/src/components/floating-toolbar/nav-up-icon.js
|
|
21
|
-
var nav_up_icon_exports = {};
|
|
22
|
-
__export(nav_up_icon_exports, {
|
|
23
|
-
default: () => nav_up_icon_default
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(nav_up_icon_exports);
|
|
26
|
-
var import_components = require("@wordpress/components");
|
|
27
|
-
var import_i18n = require("@wordpress/i18n");
|
|
28
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
var NavigateUp = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
30
|
-
import_components.SVG,
|
|
31
|
-
{
|
|
32
|
-
width: "24",
|
|
33
|
-
height: "24",
|
|
34
|
-
viewBox: "0 0 24 24",
|
|
35
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Path, { fill: "none", d: "M0 0h24v24H0V0z" }),
|
|
38
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
39
|
-
import_components.Path,
|
|
40
|
-
{
|
|
41
|
-
fill: "white",
|
|
42
|
-
fillRule: "evenodd",
|
|
43
|
-
clipRule: "evenodd",
|
|
44
|
-
d: "M17,11 z L15.58,12.42 L12,8.83 L12,18 L22,18 L22,20 L10,20 L10,8.83 L6.42,12.42 L5,11 L11,5 L17,11",
|
|
45
|
-
transform: (0, import_i18n.isRTL)() ? "scale(-1,1) translate(-24,0)" : void 0
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
var nav_up_icon_default = NavigateUp;
|
|
52
|
-
//# sourceMappingURL=nav-up-icon.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/floating-toolbar/nav-up-icon.js"],
|
|
4
|
-
"sourcesContent": ["import { SVG, Path } from '@wordpress/components';\nimport { isRTL } from '@wordpress/i18n';\n\nconst NavigateUp = () => (\n\t<SVG\n\t\twidth=\"24\"\n\t\theight=\"24\"\n\t\tviewBox=\"0 0 24 24\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t>\n\t\t<Path fill=\"none\" d=\"M0 0h24v24H0V0z\" />\n\t\t<Path\n\t\t\tfill=\"white\"\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M17,11 z L15.58,12.42 L12,8.83 L12,18 L22,18 L22,20 L10,20 L10,8.83 L6.42,12.42 L5,11 L11,5 L17,11\"\n\t\t\ttransform={ isRTL() ? 'scale(-1,1) translate(-24,0)' : undefined }\n\t\t/>\n\t</SVG>\n);\n\nexport default NavigateUp;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA0B;AAC1B,kBAAsB;AAGrB;AADD,IAAM,aAAa,MAClB;AAAA,EAAC;AAAA;AAAA,IACA,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,OAAM;AAAA,IAEN;AAAA,kDAAC,0BAAK,MAAK,QAAO,GAAE,mBAAkB;AAAA,MACtC;AAAA,QAAC;AAAA;AAAA,UACA,MAAK;AAAA,UACL,UAAS;AAAA,UACT,UAAS;AAAA,UACT,GAAE;AAAA,UACF,eAAY,mBAAM,IAAI,iCAAiC;AAAA;AAAA,MACxD;AAAA;AAAA;AACD;AAGD,IAAO,sBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// packages/block-editor/src/components/gradients/with-gradient.js
|
|
21
|
-
var with_gradient_exports = {};
|
|
22
|
-
__export(with_gradient_exports, {
|
|
23
|
-
withGradient: () => withGradient
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(with_gradient_exports);
|
|
26
|
-
var import_use_gradient = require("./use-gradient.cjs");
|
|
27
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
-
var withGradient = (WrappedComponent) => function WithGradient(props) {
|
|
29
|
-
const { gradientValue } = (0, import_use_gradient.__experimentalUseGradient)();
|
|
30
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WrappedComponent, { ...props, gradientValue });
|
|
31
|
-
};
|
|
32
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
-
0 && (module.exports = {
|
|
34
|
-
withGradient
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=with-gradient.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/gradients/with-gradient.js"],
|
|
4
|
-
"sourcesContent": ["import { __experimentalUseGradient } from './use-gradient';\n\nexport const withGradient = ( WrappedComponent ) =>\n\tfunction WithGradient( props ) {\n\t\tconst { gradientValue } = __experimentalUseGradient();\n\t\treturn (\n\t\t\t<WrappedComponent { ...props } gradientValue={ gradientValue } />\n\t\t);\n\t};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA0C;AAMvC;AAJI,IAAM,eAAe,CAAE,qBAC7B,SAAS,aAAc,OAAQ;AAC9B,QAAM,EAAE,cAAc,QAAI,+CAA0B;AACpD,SACC,4CAAC,oBAAmB,GAAG,OAAQ,eAAgC;AAEjE;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// packages/block-editor/src/components/inserter-button/sparkles.js
|
|
21
|
-
var sparkles_exports = {};
|
|
22
|
-
__export(sparkles_exports, {
|
|
23
|
-
default: () => sparkles_default
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(sparkles_exports);
|
|
26
|
-
var import_components = require("@wordpress/components");
|
|
27
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
-
var sparkles = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.SVG, { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
29
|
-
import_components.Path,
|
|
30
|
-
{
|
|
31
|
-
d: "M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z",
|
|
32
|
-
fill: "#F0C930"
|
|
33
|
-
}
|
|
34
|
-
) });
|
|
35
|
-
var sparkles_default = sparkles;
|
|
36
|
-
//# sourceMappingURL=sparkles.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/inserter-button/sparkles.js"],
|
|
4
|
-
"sourcesContent": ["import { SVG, Path } from '@wordpress/components';\n\nconst sparkles = (\n\t<SVG viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\td=\"M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z\"\n\t\t\tfill=\"#F0C930\"\n\t\t/>\n\t</SVG>\n);\n\nexport default sparkles;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA0B;AAIxB;AAFF,IAAM,WACL,4CAAC,yBAAI,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC1C;AAAA,EAAC;AAAA;AAAA,IACA,GAAE;AAAA,IACF,MAAK;AAAA;AACN,GACD;AAGD,IAAO,mBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// packages/block-editor/src/components/floating-toolbar/nav-up-icon.js
|
|
2
|
-
import { SVG, Path } from "@wordpress/components";
|
|
3
|
-
import { isRTL } from "@wordpress/i18n";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
var NavigateUp = () => /* @__PURE__ */ jsxs(
|
|
6
|
-
SVG,
|
|
7
|
-
{
|
|
8
|
-
width: "24",
|
|
9
|
-
height: "24",
|
|
10
|
-
viewBox: "0 0 24 24",
|
|
11
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
-
children: [
|
|
13
|
-
/* @__PURE__ */ jsx(Path, { fill: "none", d: "M0 0h24v24H0V0z" }),
|
|
14
|
-
/* @__PURE__ */ jsx(
|
|
15
|
-
Path,
|
|
16
|
-
{
|
|
17
|
-
fill: "white",
|
|
18
|
-
fillRule: "evenodd",
|
|
19
|
-
clipRule: "evenodd",
|
|
20
|
-
d: "M17,11 z L15.58,12.42 L12,8.83 L12,18 L22,18 L22,20 L10,20 L10,8.83 L6.42,12.42 L5,11 L11,5 L17,11",
|
|
21
|
-
transform: isRTL() ? "scale(-1,1) translate(-24,0)" : void 0
|
|
22
|
-
}
|
|
23
|
-
)
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
var nav_up_icon_default = NavigateUp;
|
|
28
|
-
export {
|
|
29
|
-
nav_up_icon_default as default
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=nav-up-icon.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/floating-toolbar/nav-up-icon.js"],
|
|
4
|
-
"sourcesContent": ["import { SVG, Path } from '@wordpress/components';\nimport { isRTL } from '@wordpress/i18n';\n\nconst NavigateUp = () => (\n\t<SVG\n\t\twidth=\"24\"\n\t\theight=\"24\"\n\t\tviewBox=\"0 0 24 24\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t>\n\t\t<Path fill=\"none\" d=\"M0 0h24v24H0V0z\" />\n\t\t<Path\n\t\t\tfill=\"white\"\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M17,11 z L15.58,12.42 L12,8.83 L12,18 L22,18 L22,20 L10,20 L10,8.83 L6.42,12.42 L5,11 L11,5 L17,11\"\n\t\t\ttransform={ isRTL() ? 'scale(-1,1) translate(-24,0)' : undefined }\n\t\t/>\n\t</SVG>\n);\n\nexport default NavigateUp;\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,KAAK,YAAY;AAC1B,SAAS,aAAa;AAGrB,SAMC,KAND;AADD,IAAM,aAAa,MAClB;AAAA,EAAC;AAAA;AAAA,IACA,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,OAAM;AAAA,IAEN;AAAA,0BAAC,QAAK,MAAK,QAAO,GAAE,mBAAkB;AAAA,MACtC;AAAA,QAAC;AAAA;AAAA,UACA,MAAK;AAAA,UACL,UAAS;AAAA,UACT,UAAS;AAAA,UACT,GAAE;AAAA,UACF,WAAY,MAAM,IAAI,iCAAiC;AAAA;AAAA,MACxD;AAAA;AAAA;AACD;AAGD,IAAO,sBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// packages/block-editor/src/components/gradients/with-gradient.js
|
|
2
|
-
import { __experimentalUseGradient } from "./use-gradient.mjs";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
var withGradient = (WrappedComponent) => function WithGradient(props) {
|
|
5
|
-
const { gradientValue } = __experimentalUseGradient();
|
|
6
|
-
return /* @__PURE__ */ jsx(WrappedComponent, { ...props, gradientValue });
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
withGradient
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=with-gradient.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/gradients/with-gradient.js"],
|
|
4
|
-
"sourcesContent": ["import { __experimentalUseGradient } from './use-gradient';\n\nexport const withGradient = ( WrappedComponent ) =>\n\tfunction WithGradient( props ) {\n\t\tconst { gradientValue } = __experimentalUseGradient();\n\t\treturn (\n\t\t\t<WrappedComponent { ...props } gradientValue={ gradientValue } />\n\t\t);\n\t};\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,iCAAiC;AAMvC;AAJI,IAAM,eAAe,CAAE,qBAC7B,SAAS,aAAc,OAAQ;AAC9B,QAAM,EAAE,cAAc,IAAI,0BAA0B;AACpD,SACC,oBAAC,oBAAmB,GAAG,OAAQ,eAAgC;AAEjE;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// packages/block-editor/src/components/inserter-button/sparkles.js
|
|
2
|
-
import { SVG, Path } from "@wordpress/components";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
var sparkles = /* @__PURE__ */ jsx(SVG, { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx(
|
|
5
|
-
Path,
|
|
6
|
-
{
|
|
7
|
-
d: "M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z",
|
|
8
|
-
fill: "#F0C930"
|
|
9
|
-
}
|
|
10
|
-
) });
|
|
11
|
-
var sparkles_default = sparkles;
|
|
12
|
-
export {
|
|
13
|
-
sparkles_default as default
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=sparkles.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/inserter-button/sparkles.js"],
|
|
4
|
-
"sourcesContent": ["import { SVG, Path } from '@wordpress/components';\n\nconst sparkles = (\n\t<SVG viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\td=\"M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z\"\n\t\t\tfill=\"#F0C930\"\n\t\t/>\n\t</SVG>\n);\n\nexport default sparkles;\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,KAAK,YAAY;AAIxB;AAFF,IAAM,WACL,oBAAC,OAAI,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC1C;AAAA,EAAC;AAAA;AAAA,IACA,GAAE;AAAA,IACF,MAAK;AAAA;AACN,GACD;AAGD,IAAO,mBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|