@wordpress/block-editor 13.2.0 → 13.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +0 -1
- package/build/components/block-breadcrumb/index.js +12 -1
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-lock/toolbar.js +0 -1
- package/build/components/block-lock/toolbar.js.map +1 -1
- package/build/components/block-mover/button.js +1 -1
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js +1 -1
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.js +2 -2
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-patterns-paging/index.js +5 -7
- package/build/components/block-patterns-paging/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js +20 -17
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-rename/modal.js +4 -12
- package/build/components/block-rename/modal.js.map +1 -1
- package/build/components/block-toolbar/shuffle.js +1 -0
- package/build/components/block-toolbar/shuffle.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +7 -58
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js +9 -2
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build/components/block-tools/index.js +14 -1
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +4 -2
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +5 -4
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-tools/zoom-out-popover.js +57 -0
- package/build/components/block-tools/zoom-out-popover.js.map +1 -0
- package/build/components/block-tools/zoom-out-toolbar.js +138 -0
- package/build/components/block-tools/zoom-out-toolbar.js.map +1 -0
- package/build/components/button-block-appender/index.js +3 -1
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/child-layout-control/index.js +26 -18
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/date-format-picker/index.js +10 -1
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/dimensions-tool/index.js +6 -4
- package/build/components/dimensions-tool/index.js.map +1 -1
- package/build/components/font-appearance-control/index.js +26 -61
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/global-styles/background-panel.js +178 -116
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js +2 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +2 -1
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +2 -1
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +2 -1
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +8 -0
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/image-settings-panel.js +2 -1
- package/build/components/global-styles/image-settings-panel.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +50 -12
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-utils.js +50 -0
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +23 -8
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +17 -7
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/grid/grid-item-movers.js +11 -14
- package/build/components/grid/grid-item-movers.js.map +1 -1
- package/build/components/grid/grid-item-resizer.js +2 -2
- package/build/components/grid/grid-item-resizer.js.map +1 -1
- package/build/components/grid/grid-visualizer.js +116 -36
- package/build/components/grid/grid-visualizer.js.map +1 -1
- package/build/components/grid/use-grid-layout-sync.js +29 -22
- package/build/components/grid/use-grid-layout-sync.js.map +1 -1
- package/build/components/inner-blocks/index.js +1 -1
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +1 -19
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build/components/inserter/menu.js +26 -4
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +2 -1
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js +2 -1
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/link-control/link-preview.js +1 -1
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/media-placeholder/index.js +19 -23
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +3 -1
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +5 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/tabbed-sidebar/index.js +66 -0
- package/build/components/tabbed-sidebar/index.js.map +1 -0
- package/build/components/url-popover/index.js +3 -0
- package/build/components/url-popover/index.js.map +1 -1
- package/build/hooks/background.js +26 -4
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/block-hooks.js +11 -17
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-style-variation.js +169 -4
- package/build/hooks/block-style-variation.js.map +1 -1
- package/build/hooks/duotone.js +16 -11
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/grid-visualizer.js +65 -0
- package/build/hooks/grid-visualizer.js.map +1 -0
- package/build/hooks/index.js +15 -2
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/layout-child.js +39 -22
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/position.js +2 -9
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +16 -6
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/utils.js +2 -0
- package/build/hooks/utils.js.map +1 -1
- package/build/layouts/constrained.js +44 -2
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/grid.js +90 -51
- package/build/layouts/grid.js.map +1 -1
- package/build/private-apis.js +6 -1
- package/build/private-apis.js.map +1 -1
- package/build/store/defaults.js +0 -2
- package/build/store/defaults.js.map +1 -1
- package/build/store/defaults.native.js +0 -3
- package/build/store/defaults.native.js.map +1 -1
- package/build/store/private-keys.js +2 -1
- package/build/store/private-keys.js.map +1 -1
- package/build/utils/format-font-style.js +45 -0
- package/build/utils/format-font-style.js.map +1 -0
- package/build/utils/format-font-weight.js +68 -0
- package/build/utils/format-font-weight.js.map +1 -0
- package/build/utils/get-editor-region.js +34 -0
- package/build/utils/get-editor-region.js.map +1 -0
- package/build/utils/get-font-styles-and-weights.js +167 -0
- package/build/utils/get-font-styles-and-weights.js.map +1 -0
- package/build/utils/pasting.js +5 -13
- package/build/utils/pasting.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +12 -1
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-lock/toolbar.js +0 -1
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-mover/button.js +1 -1
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +1 -1
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js +2 -2
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-patterns-paging/index.js +5 -7
- package/build-module/components/block-patterns-paging/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +20 -17
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-rename/modal.js +5 -13
- package/build-module/components/block-rename/modal.js.map +1 -1
- package/build-module/components/block-toolbar/shuffle.js +1 -0
- package/build-module/components/block-toolbar/shuffle.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +10 -61
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js +9 -2
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build-module/components/block-tools/index.js +14 -1
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +4 -2
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +5 -4
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-popover.js +48 -0
- package/build-module/components/block-tools/zoom-out-popover.js.map +1 -0
- package/build-module/components/block-tools/zoom-out-toolbar.js +131 -0
- package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -0
- package/build-module/components/button-block-appender/index.js +3 -1
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +27 -19
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +11 -3
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/dimensions-tool/index.js +6 -4
- package/build-module/components/dimensions-tool/index.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +28 -63
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +181 -119
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +3 -2
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +3 -2
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +3 -2
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +3 -2
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +8 -0
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/image-settings-panel.js +3 -2
- package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +52 -14
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js +48 -0
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +23 -8
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +15 -6
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/grid/grid-item-movers.js +11 -14
- package/build-module/components/grid/grid-item-movers.js.map +1 -1
- package/build-module/components/grid/grid-item-resizer.js +2 -2
- package/build-module/components/grid/grid-item-resizer.js.map +1 -1
- package/build-module/components/grid/grid-visualizer.js +117 -37
- package/build-module/components/grid/grid-visualizer.js.map +1 -1
- package/build-module/components/grid/use-grid-layout-sync.js +29 -22
- package/build-module/components/grid/use-grid-layout-sync.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +1 -1
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +1 -19
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build-module/components/inserter/menu.js +26 -4
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +2 -1
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js +3 -2
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +1 -1
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +19 -23
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +3 -1
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +5 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/tabbed-sidebar/index.js +60 -0
- package/build-module/components/tabbed-sidebar/index.js.map +1 -0
- package/build-module/components/url-popover/index.js +3 -0
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/hooks/background.js +26 -4
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/block-hooks.js +11 -17
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-style-variation.js +168 -4
- package/build-module/hooks/block-style-variation.js.map +1 -1
- package/build-module/hooks/duotone.js +16 -11
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/grid-visualizer.js +64 -0
- package/build-module/hooks/grid-visualizer.js.map +1 -0
- package/build-module/hooks/index.js +3 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/layout-child.js +39 -22
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/position.js +2 -9
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +16 -6
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/utils.js +2 -0
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/layouts/constrained.js +44 -2
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/grid.js +90 -51
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/private-apis.js +8 -3
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/defaults.js +0 -2
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/defaults.native.js +0 -3
- package/build-module/store/defaults.native.js.map +1 -1
- package/build-module/store/private-keys.js +1 -0
- package/build-module/store/private-keys.js.map +1 -1
- package/build-module/utils/format-font-style.js +39 -0
- package/build-module/utils/format-font-style.js.map +1 -0
- package/build-module/utils/format-font-weight.js +62 -0
- package/build-module/utils/format-font-weight.js.map +1 -0
- package/build-module/utils/get-editor-region.js +28 -0
- package/build-module/utils/get-editor-region.js.map +1 -0
- package/build-module/utils/get-font-styles-and-weights.js +160 -0
- package/build-module/utils/get-font-styles-and-weights.js.map +1 -0
- package/build-module/utils/pasting.js +5 -13
- package/build-module/utils/pasting.js.map +1 -1
- package/build-style/content-rtl.css +1 -0
- package/build-style/content.css +1 -0
- package/build-style/style-rtl.css +207 -96
- package/build-style/style.css +207 -96
- package/package.json +32 -32
- package/src/components/block-breadcrumb/index.js +16 -1
- package/src/components/block-lock/toolbar.js +0 -1
- package/src/components/block-mover/button.js +1 -1
- package/src/components/block-mover/index.js +1 -1
- package/src/components/block-pattern-setup/setup-toolbar.js +2 -2
- package/src/components/block-patterns-paging/index.js +8 -11
- package/src/components/block-patterns-paging/style.scss +18 -0
- package/src/components/block-quick-navigation/index.js +21 -28
- package/src/components/block-rename/modal.js +2 -8
- package/src/components/block-switcher/test/index.js +6 -6
- package/src/components/block-toolbar/shuffle.js +1 -0
- package/src/components/block-toolbar/style.scss +1 -11
- package/src/components/block-tools/block-selection-button.js +11 -83
- package/src/components/block-tools/block-toolbar-breadcrumb.js +9 -4
- package/src/components/block-tools/index.js +21 -1
- package/src/components/block-tools/style.scss +15 -0
- package/src/components/block-tools/use-show-block-tools.js +14 -6
- package/src/components/block-tools/zoom-out-mode-inserters.js +5 -4
- package/src/components/block-tools/zoom-out-popover.js +49 -0
- package/src/components/block-tools/zoom-out-toolbar.js +140 -0
- package/src/components/button-block-appender/index.js +2 -1
- package/src/components/child-layout-control/index.js +41 -23
- package/src/components/date-format-picker/index.js +10 -1
- package/src/components/date-format-picker/style.scss +0 -9
- package/src/components/dimensions-tool/index.js +97 -89
- package/src/components/font-appearance-control/index.js +29 -83
- package/src/components/font-appearance-control/style.scss +3 -5
- package/src/components/global-styles/background-panel.js +249 -170
- package/src/components/global-styles/border-panel.js +3 -2
- package/src/components/global-styles/color-panel.js +3 -2
- package/src/components/global-styles/dimensions-panel.js +3 -2
- package/src/components/global-styles/filters-panel.js +3 -2
- package/src/components/global-styles/hooks.js +9 -0
- package/src/components/global-styles/image-settings-panel.js +3 -2
- package/src/components/global-styles/style.scss +105 -20
- package/src/components/global-styles/test/typography-utils.js +269 -0
- package/src/components/global-styles/typography-panel.js +49 -12
- package/src/components/global-styles/typography-utils.js +63 -0
- package/src/components/global-styles/use-global-styles-output.js +23 -8
- package/src/components/global-styles/utils.js +17 -6
- package/src/components/grid/grid-item-movers.js +11 -27
- package/src/components/grid/grid-item-resizer.js +3 -2
- package/src/components/grid/grid-visualizer.js +171 -54
- package/src/components/grid/style.scss +43 -8
- package/src/components/grid/use-grid-layout-sync.js +31 -28
- package/src/components/iframe/content.scss +1 -0
- package/src/components/inner-blocks/index.js +2 -1
- package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +1 -16
- package/src/components/inserter/menu.js +47 -13
- package/src/components/inserter/quick-inserter.js +6 -1
- package/src/components/inserter/style.scss +1 -49
- package/src/components/inspector-controls/block-support-tools-panel.js +3 -3
- package/src/components/link-control/link-preview.js +1 -1
- package/src/components/media-placeholder/index.js +22 -32
- package/src/components/navigable-toolbar/index.js +3 -1
- package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +6 -1
- package/src/components/tabbed-sidebar/README.md +76 -0
- package/src/components/tabbed-sidebar/index.js +70 -0
- package/src/components/tabbed-sidebar/style.scss +53 -0
- package/src/components/url-popover/index.js +3 -0
- package/src/hooks/background.js +25 -10
- package/src/hooks/block-hooks.js +9 -16
- package/src/hooks/block-style-variation.js +202 -3
- package/src/hooks/duotone.js +16 -12
- package/src/hooks/grid-visualizer.js +64 -0
- package/src/hooks/index.js +3 -0
- package/src/hooks/layout-child.js +53 -37
- package/src/hooks/position.js +3 -10
- package/src/hooks/test/get-variation-styles-with-ref-values.js +91 -0
- package/src/hooks/use-bindings-attributes.js +18 -4
- package/src/hooks/utils.js +2 -0
- package/src/layouts/constrained.js +43 -2
- package/src/layouts/grid.js +146 -51
- package/src/private-apis.js +12 -1
- package/src/store/defaults.js +0 -2
- package/src/store/defaults.native.js +0 -3
- package/src/store/private-keys.js +1 -0
- package/src/style.scss +1 -1
- package/src/utils/format-font-style.js +40 -0
- package/src/utils/format-font-weight.js +63 -0
- package/src/utils/get-editor-region.js +31 -0
- package/src/utils/get-font-styles-and-weights.js +191 -0
- package/src/utils/pasting.js +5 -12
- package/src/utils/test/format-font-style.js +34 -0
- package/src/utils/test/format-font-weight.js +66 -0
- package/src/utils/test/get-font-styles-and-weights.js +513 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/src/hooks/position.scss +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getBlockSupport","memo","useMemo","useEffect","useId","useState","useDispatch","useRegistry","createHigherOrderComponent","addFilter","useBlockEditContext","mayDisplayControlsKey","mayDisplayParentControlsKey","useSettings","useSettingsForBlockElement","getValueFromObjectPath","setImmutably","store","blockEditorStore","unlock","clsx","jsx","_jsx","cleanEmptyObject","object","Array","isArray","cleanedNestedObjects","Object","entries","map","key","value","filter","undefined","length","fromEntries","transformStyles","activeSupports","migrationPaths","result","source","index","results","values","every","isActive","innerBlocks","referenceBlockAttributes","attributes","returnBlock","forEach","support","path","styleValue","shouldSkipSerialization","blockNameOrType","featureSet","feature","skipSerialization","__experimentalSkipSerialization","includes","pendingStyleOverrides","WeakMap","useStyleOverride","id","css","assets","__unstableType","clientId","setStyleOverride","deleteStyleOverride","registry","fallbackId","_id","override","get","set","push","window","queueMicrotask","batch","args","isPending","find","currentId","useBlockSettings","name","parentLayout","backgroundImage","backgroundSize","customFontFamilies","defaultFontFamilies","themeFontFamilies","defaultFontSizesEnabled","customFontSizes","defaultFontSizes","themeFontSizes","customFontSize","fontStyle","fontWeight","lineHeight","textAlign","textColumns","textDecoration","writingMode","textTransform","letterSpacing","padding","margin","blockGap","defaultSpacingSizesEnabled","customSpacingSize","userSpacingSizes","defaultSpacingSizes","themeSpacingSizes","units","aspectRatio","minHeight","layout","borderColor","borderRadius","borderStyle","borderWidth","customColorsEnabled","customColors","customDuotone","themeColors","defaultColors","defaultPalette","defaultDuotone","userDuotonePalette","themeDuotonePalette","defaultDuotonePalette","userGradientPalette","themeGradientPalette","defaultGradientPalette","defaultGradients","areCustomGradientsEnabled","isBackgroundEnabled","isLinkEnabled","isTextEnabled","isHeadingEnabled","isButtonEnabled","shadow","rawSettings","background","color","palette","custom","theme","default","gradients","duotone","customGradient","link","heading","button","text","typography","fontFamilies","fontSizes","spacing","spacingSizes","border","radius","style","width","dimensions","createBlockEditFilter","features","settings","Edit","edit","withBlockEditHooks","OriginalBlockEdit","props","context","i","hasSupport","attributeKeys","shareWithChildBlocks","shouldDisplayControls","neededProps","isSelected","setAttributes","__unstableParentLayout","BlockProps","useBlockProps","setAllWrapperProps","wrapperProps","setWrapperProps","next","prev","nextAll","BlockPropsPure","createBlockListBlockFilter","withBlockListBlockHooks","BlockListBlock","allWrapperProps","fill","isMatch","keys","Boolean","reduce","acc","className","createBlockSaveFilter","extraPropsFromHooks","accu","addSaveProps","neededAttributes","hasOwnProperty"],"sources":["@wordpress/block-editor/src/hooks/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { memo, useMemo, useEffect, useId, useState } from '@wordpress/element';\nimport { useDispatch, useRegistry } from '@wordpress/data';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseBlockEditContext,\n\tmayDisplayControlsKey,\n\tmayDisplayParentControlsKey,\n} from '../components/block-edit/context';\nimport { useSettings } from '../components';\nimport { useSettingsForBlockElement } from '../components/global-styles/hooks';\nimport { getValueFromObjectPath, setImmutably } from '../utils/object';\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Removed falsy values from nested object.\n *\n * @param {*} object\n * @return {*} Object cleaned from falsy values\n */\nexport const cleanEmptyObject = ( object ) => {\n\tif (\n\t\tobject === null ||\n\t\ttypeof object !== 'object' ||\n\t\tArray.isArray( object )\n\t) {\n\t\treturn object;\n\t}\n\n\tconst cleanedNestedObjects = Object.entries( object )\n\t\t.map( ( [ key, value ] ) => [ key, cleanEmptyObject( value ) ] )\n\t\t.filter( ( [ , value ] ) => value !== undefined );\n\treturn ! cleanedNestedObjects.length\n\t\t? undefined\n\t\t: Object.fromEntries( cleanedNestedObjects );\n};\n\nexport function transformStyles(\n\tactiveSupports,\n\tmigrationPaths,\n\tresult,\n\tsource,\n\tindex,\n\tresults\n) {\n\t// If there are no active supports return early.\n\tif (\n\t\tObject.values( activeSupports ?? {} ).every(\n\t\t\t( isActive ) => ! isActive\n\t\t)\n\t) {\n\t\treturn result;\n\t}\n\t// If the condition verifies we are probably in the presence of a wrapping transform\n\t// e.g: nesting paragraphs in a group or columns and in that case the styles should not be transformed.\n\tif ( results.length === 1 && result.innerBlocks.length === source.length ) {\n\t\treturn result;\n\t}\n\t// For cases where we have a transform from one block to multiple blocks\n\t// or multiple blocks to one block we apply the styles of the first source block\n\t// to the result(s).\n\tlet referenceBlockAttributes = source[ 0 ]?.attributes;\n\t// If we are in presence of transform between more than one block in the source\n\t// that has more than one block in the result\n\t// we apply the styles on source N to the result N,\n\t// if source N does not exists we do nothing.\n\tif ( results.length > 1 && source.length > 1 ) {\n\t\tif ( source[ index ] ) {\n\t\t\treferenceBlockAttributes = source[ index ]?.attributes;\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n\tlet returnBlock = result;\n\tObject.entries( activeSupports ).forEach( ( [ support, isActive ] ) => {\n\t\tif ( isActive ) {\n\t\t\tmigrationPaths[ support ].forEach( ( path ) => {\n\t\t\t\tconst styleValue = getValueFromObjectPath(\n\t\t\t\t\treferenceBlockAttributes,\n\t\t\t\t\tpath\n\t\t\t\t);\n\t\t\t\tif ( styleValue ) {\n\t\t\t\t\treturnBlock = {\n\t\t\t\t\t\t...returnBlock,\n\t\t\t\t\t\tattributes: setImmutably(\n\t\t\t\t\t\t\treturnBlock.attributes,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tstyleValue\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\treturn returnBlock;\n}\n\n/**\n * Check whether serialization of specific block support feature or set should\n * be skipped.\n *\n * @param {string|Object} blockNameOrType Block name or block type object.\n * @param {string} featureSet Name of block support feature set.\n * @param {string} feature Name of the individual feature to check.\n *\n * @return {boolean} Whether serialization should occur.\n */\nexport function shouldSkipSerialization(\n\tblockNameOrType,\n\tfeatureSet,\n\tfeature\n) {\n\tconst support = getBlockSupport( blockNameOrType, featureSet );\n\tconst skipSerialization = support?.__experimentalSkipSerialization;\n\n\tif ( Array.isArray( skipSerialization ) ) {\n\t\treturn skipSerialization.includes( feature );\n\t}\n\n\treturn skipSerialization;\n}\n\nconst pendingStyleOverrides = new WeakMap();\n\nexport function useStyleOverride( {\n\tid,\n\tcss,\n\tassets,\n\t__unstableType,\n\tclientId,\n} = {} ) {\n\tconst { setStyleOverride, deleteStyleOverride } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst registry = useRegistry();\n\tconst fallbackId = useId();\n\tuseEffect( () => {\n\t\t// Unmount if there is CSS and assets are empty.\n\t\tif ( ! css && ! assets ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst _id = id || fallbackId;\n\t\tconst override = {\n\t\t\tid,\n\t\t\tcss,\n\t\t\tassets,\n\t\t\t__unstableType,\n\t\t\tclientId,\n\t\t};\n\t\t// Batch updates to style overrides to avoid triggering cascading renders\n\t\t// for each style override block included in a tree and optimize initial render.\n\t\tif ( ! pendingStyleOverrides.get( registry ) ) {\n\t\t\tpendingStyleOverrides.set( registry, [] );\n\t\t}\n\t\tpendingStyleOverrides.get( registry ).push( [ _id, override ] );\n\t\twindow.queueMicrotask( () => {\n\t\t\tif ( pendingStyleOverrides.get( registry )?.length ) {\n\t\t\t\tregistry.batch( () => {\n\t\t\t\t\tpendingStyleOverrides.get( registry ).forEach( ( args ) => {\n\t\t\t\t\t\tsetStyleOverride( ...args );\n\t\t\t\t\t} );\n\t\t\t\t\tpendingStyleOverrides.set( registry, [] );\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tconst isPending = pendingStyleOverrides\n\t\t\t\t.get( registry )\n\t\t\t\t?.find( ( [ currentId ] ) => currentId === _id );\n\t\t\tif ( isPending ) {\n\t\t\t\tpendingStyleOverrides.set(\n\t\t\t\t\tregistry,\n\t\t\t\t\tpendingStyleOverrides\n\t\t\t\t\t\t.get( registry )\n\t\t\t\t\t\t.filter( ( [ currentId ] ) => currentId !== _id )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tdeleteStyleOverride( _id );\n\t\t\t}\n\t\t};\n\t}, [\n\t\tid,\n\t\tcss,\n\t\tclientId,\n\t\tassets,\n\t\t__unstableType,\n\t\tfallbackId,\n\t\tsetStyleOverride,\n\t\tdeleteStyleOverride,\n\t\tregistry,\n\t] );\n}\n\n/**\n * Based on the block and its context, returns an object of all the block settings.\n * This object can be passed as a prop to all the Styles UI components\n * (TypographyPanel, DimensionsPanel...).\n *\n * @param {string} name Block name.\n * @param {*} parentLayout Parent layout.\n *\n * @return {Object} Settings object.\n */\nexport function useBlockSettings( name, parentLayout ) {\n\tconst [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tcustomFontFamilies,\n\t\tdefaultFontFamilies,\n\t\tthemeFontFamilies,\n\t\tdefaultFontSizesEnabled,\n\t\tcustomFontSizes,\n\t\tdefaultFontSizes,\n\t\tthemeFontSizes,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextAlign,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\twritingMode,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tdefaultSpacingSizesEnabled,\n\t\tcustomSpacingSize,\n\t\tuserSpacingSizes,\n\t\tdefaultSpacingSizes,\n\t\tthemeSpacingSizes,\n\t\tunits,\n\t\taspectRatio,\n\t\tminHeight,\n\t\tlayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] = useSettings(\n\t\t'background.backgroundImage',\n\t\t'background.backgroundSize',\n\t\t'typography.fontFamilies.custom',\n\t\t'typography.fontFamilies.default',\n\t\t'typography.fontFamilies.theme',\n\t\t'typography.defaultFontSizes',\n\t\t'typography.fontSizes.custom',\n\t\t'typography.fontSizes.default',\n\t\t'typography.fontSizes.theme',\n\t\t'typography.customFontSize',\n\t\t'typography.fontStyle',\n\t\t'typography.fontWeight',\n\t\t'typography.lineHeight',\n\t\t'typography.textAlign',\n\t\t'typography.textColumns',\n\t\t'typography.textDecoration',\n\t\t'typography.writingMode',\n\t\t'typography.textTransform',\n\t\t'typography.letterSpacing',\n\t\t'spacing.padding',\n\t\t'spacing.margin',\n\t\t'spacing.blockGap',\n\t\t'spacing.defaultSpacingSizes',\n\t\t'spacing.customSpacingSize',\n\t\t'spacing.spacingSizes.custom',\n\t\t'spacing.spacingSizes.default',\n\t\t'spacing.spacingSizes.theme',\n\t\t'spacing.units',\n\t\t'dimensions.aspectRatio',\n\t\t'dimensions.minHeight',\n\t\t'layout',\n\t\t'border.color',\n\t\t'border.radius',\n\t\t'border.style',\n\t\t'border.width',\n\t\t'color.custom',\n\t\t'color.palette.custom',\n\t\t'color.customDuotone',\n\t\t'color.palette.theme',\n\t\t'color.palette.default',\n\t\t'color.defaultPalette',\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default',\n\t\t'color.gradients.custom',\n\t\t'color.gradients.theme',\n\t\t'color.gradients.default',\n\t\t'color.defaultGradients',\n\t\t'color.customGradient',\n\t\t'color.background',\n\t\t'color.link',\n\t\t'color.text',\n\t\t'color.heading',\n\t\t'color.button',\n\t\t'shadow'\n\t);\n\n\tconst rawSettings = useMemo( () => {\n\t\treturn {\n\t\t\tbackground: {\n\t\t\t\tbackgroundImage,\n\t\t\t\tbackgroundSize,\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\tpalette: {\n\t\t\t\t\tcustom: customColors,\n\t\t\t\t\ttheme: themeColors,\n\t\t\t\t\tdefault: defaultColors,\n\t\t\t\t},\n\t\t\t\tgradients: {\n\t\t\t\t\tcustom: userGradientPalette,\n\t\t\t\t\ttheme: themeGradientPalette,\n\t\t\t\t\tdefault: defaultGradientPalette,\n\t\t\t\t},\n\t\t\t\tduotone: {\n\t\t\t\t\tcustom: userDuotonePalette,\n\t\t\t\t\ttheme: themeDuotonePalette,\n\t\t\t\t\tdefault: defaultDuotonePalette,\n\t\t\t\t},\n\t\t\t\tdefaultGradients,\n\t\t\t\tdefaultPalette,\n\t\t\t\tdefaultDuotone,\n\t\t\t\tcustom: customColorsEnabled,\n\t\t\t\tcustomGradient: areCustomGradientsEnabled,\n\t\t\t\tcustomDuotone,\n\t\t\t\tbackground: isBackgroundEnabled,\n\t\t\t\tlink: isLinkEnabled,\n\t\t\t\theading: isHeadingEnabled,\n\t\t\t\tbutton: isButtonEnabled,\n\t\t\t\ttext: isTextEnabled,\n\t\t\t},\n\t\t\ttypography: {\n\t\t\t\tfontFamilies: {\n\t\t\t\t\tcustom: customFontFamilies,\n\t\t\t\t\tdefault: defaultFontFamilies,\n\t\t\t\t\ttheme: themeFontFamilies,\n\t\t\t\t},\n\t\t\t\tfontSizes: {\n\t\t\t\t\tcustom: customFontSizes,\n\t\t\t\t\tdefault: defaultFontSizes,\n\t\t\t\t\ttheme: themeFontSizes,\n\t\t\t\t},\n\t\t\t\tcustomFontSize,\n\t\t\t\tdefaultFontSizes: defaultFontSizesEnabled,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tlineHeight,\n\t\t\t\ttextAlign,\n\t\t\t\ttextColumns,\n\t\t\t\ttextDecoration,\n\t\t\t\ttextTransform,\n\t\t\t\tletterSpacing,\n\t\t\t\twritingMode,\n\t\t\t},\n\t\t\tspacing: {\n\t\t\t\tspacingSizes: {\n\t\t\t\t\tcustom: userSpacingSizes,\n\t\t\t\t\tdefault: defaultSpacingSizes,\n\t\t\t\t\ttheme: themeSpacingSizes,\n\t\t\t\t},\n\t\t\t\tcustomSpacingSize,\n\t\t\t\tdefaultSpacingSizes: defaultSpacingSizesEnabled,\n\t\t\t\tpadding,\n\t\t\t\tmargin,\n\t\t\t\tblockGap,\n\t\t\t\tunits,\n\t\t\t},\n\t\t\tborder: {\n\t\t\t\tcolor: borderColor,\n\t\t\t\tradius: borderRadius,\n\t\t\t\tstyle: borderStyle,\n\t\t\t\twidth: borderWidth,\n\t\t\t},\n\t\t\tdimensions: {\n\t\t\t\taspectRatio,\n\t\t\t\tminHeight,\n\t\t\t},\n\t\t\tlayout,\n\t\t\tparentLayout,\n\t\t\tshadow,\n\t\t};\n\t}, [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tcustomFontFamilies,\n\t\tdefaultFontFamilies,\n\t\tthemeFontFamilies,\n\t\tdefaultFontSizesEnabled,\n\t\tcustomFontSizes,\n\t\tdefaultFontSizes,\n\t\tthemeFontSizes,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextAlign,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\twritingMode,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tdefaultSpacingSizesEnabled,\n\t\tcustomSpacingSize,\n\t\tuserSpacingSizes,\n\t\tdefaultSpacingSizes,\n\t\tthemeSpacingSizes,\n\t\tunits,\n\t\taspectRatio,\n\t\tminHeight,\n\t\tlayout,\n\t\tparentLayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] );\n\n\treturn useSettingsForBlockElement( rawSettings, name );\n}\n\nexport function createBlockEditFilter( features ) {\n\t// We don't want block controls to re-render when typing inside a block.\n\t// `memo` will prevent re-renders unless props change, so only pass the\n\t// needed props and not the whole attributes object.\n\tfeatures = features.map( ( settings ) => {\n\t\treturn { ...settings, Edit: memo( settings.edit ) };\n\t} );\n\tconst withBlockEditHooks = createHigherOrderComponent(\n\t\t( OriginalBlockEdit ) => ( props ) => {\n\t\t\tconst context = useBlockEditContext();\n\t\t\t// CAUTION: code added before this line will be executed for all\n\t\t\t// blocks, not just those that support the feature! Code added\n\t\t\t// above this line should be carefully evaluated for its impact on\n\t\t\t// performance.\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tEdit,\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tshareWithChildBlocks,\n\t\t\t\t\t} = feature;\n\t\t\t\t\tconst shouldDisplayControls =\n\t\t\t\t\t\tcontext[ mayDisplayControlsKey ] ||\n\t\t\t\t\t\t( context[ mayDisplayParentControlsKey ] &&\n\t\t\t\t\t\t\tshareWithChildBlocks );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! shouldDisplayControls ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Edit\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\tisSelected={ props.isSelected }\n\t\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\t\tsetAttributes={ props.setAttributes }\n\t\t\t\t\t\t\t__unstableParentLayout={\n\t\t\t\t\t\t\t\tprops.__unstableParentLayout\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<OriginalBlockEdit key=\"edit\" { ...props } />,\n\t\t\t];\n\t\t},\n\t\t'withBlockEditHooks'\n\t);\n\taddFilter( 'editor.BlockEdit', 'core/editor/hooks', withBlockEditHooks );\n}\n\nfunction BlockProps( { index, useBlockProps, setAllWrapperProps, ...props } ) {\n\tconst wrapperProps = useBlockProps( props );\n\tconst setWrapperProps = ( next ) =>\n\t\tsetAllWrapperProps( ( prev ) => {\n\t\t\tconst nextAll = [ ...prev ];\n\t\t\tnextAll[ index ] = next;\n\t\t\treturn nextAll;\n\t\t} );\n\t// Setting state after every render is fine because this component is\n\t// pure and will only re-render when needed props change.\n\tuseEffect( () => {\n\t\t// We could shallow compare the props, but since this component only\n\t\t// changes when needed attributes change, the benefit is probably small.\n\t\tsetWrapperProps( wrapperProps );\n\t\treturn () => {\n\t\t\tsetWrapperProps( undefined );\n\t\t};\n\t} );\n\treturn null;\n}\n\nconst BlockPropsPure = memo( BlockProps );\n\nexport function createBlockListBlockFilter( features ) {\n\tconst withBlockListBlockHooks = createHigherOrderComponent(\n\t\t( BlockListBlock ) => ( props ) => {\n\t\t\tconst [ allWrapperProps, setAllWrapperProps ] = useState(\n\t\t\t\tArray( features.length ).fill( undefined )\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tuseBlockProps,\n\t\t\t\t\t\tisMatch,\n\t\t\t\t\t} = feature;\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t\t\t// set.\n\t\t\t\t\t\t! Object.keys( neededProps ).length ||\n\t\t\t\t\t\t! hasSupport( props.name ) ||\n\t\t\t\t\t\t( isMatch && ! isMatch( neededProps ) )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<BlockPropsPure\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tindex={ i }\n\t\t\t\t\t\t\tuseBlockProps={ useBlockProps }\n\t\t\t\t\t\t\t// This component is pure, so we must pass a stable\n\t\t\t\t\t\t\t// function reference.\n\t\t\t\t\t\t\tsetAllWrapperProps={ setAllWrapperProps }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<BlockListBlock\n\t\t\t\t\tkey=\"edit\"\n\t\t\t\t\t{ ...props }\n\t\t\t\t\twrapperProps={ allWrapperProps\n\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t.reduce( ( acc, wrapperProps ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t\t\t...wrapperProps,\n\t\t\t\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t\t\t\tacc.className,\n\t\t\t\t\t\t\t\t\twrapperProps.className\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t...acc.style,\n\t\t\t\t\t\t\t\t\t...wrapperProps.style,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}, props.wrapperProps || {} ) }\n\t\t\t\t/>,\n\t\t\t];\n\t\t},\n\t\t'withBlockListBlockHooks'\n\t);\n\taddFilter(\n\t\t'editor.BlockListBlock',\n\t\t'core/editor/hooks',\n\t\twithBlockListBlockHooks\n\t);\n}\n\nexport function createBlockSaveFilter( features ) {\n\tfunction extraPropsFromHooks( props, name, attributes ) {\n\t\treturn features.reduce( ( accu, feature ) => {\n\t\t\tconst { hasSupport, attributeKeys = [], addSaveProps } = feature;\n\n\t\t\tconst neededAttributes = {};\n\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\tif ( attributes[ key ] ) {\n\t\t\t\t\tneededAttributes[ key ] = attributes[ key ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t// set.\n\t\t\t\t! Object.keys( neededAttributes ).length ||\n\t\t\t\t! hasSupport( name )\n\t\t\t) {\n\t\t\t\treturn accu;\n\t\t\t}\n\n\t\t\treturn addSaveProps( accu, name, neededAttributes );\n\t\t}, props );\n\t}\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\textraPropsFromHooks,\n\t\t0\n\t);\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\t( props ) => {\n\t\t\t// Previously we had a filter deleting the className if it was an empty\n\t\t\t// string. That filter is no longer running, so now we need to delete it\n\t\t\t// here.\n\t\t\tif ( props.hasOwnProperty( 'className' ) && ! props.className ) {\n\t\t\t\tdelete props.className;\n\t\t\t}\n\n\t\t\treturn props;\n\t\t}\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,mBAAmB;AACnD,SAASC,IAAI,EAAEC,OAAO,EAAEC,SAAS,EAAEC,KAAK,EAAEC,QAAQ,QAAQ,oBAAoB;AAC9E,SAASC,WAAW,EAAEC,WAAW,QAAQ,iBAAiB;AAC1D,SAASC,0BAA0B,QAAQ,oBAAoB;AAC/D,SAASC,SAAS,QAAQ,kBAAkB;;AAE5C;AACA;AACA;AACA,SACCC,mBAAmB,EACnBC,qBAAqB,EACrBC,2BAA2B,QACrB,kCAAkC;AACzC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,0BAA0B,QAAQ,mCAAmC;AAC9E,SAASC,sBAAsB,EAAEC,YAAY,QAAQ,iBAAiB;AACtE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AACpD,SAASC,MAAM,QAAQ,gBAAgB;AACvC;AAC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AAK,EAAEzF,IAAI,EAAEtC,UAAU,EAAG;IACvD,OAAOyH,QAAQ,CAACkC,MAAM,CAAE,CAAEK,IAAI,EAAEvJ,OAAO,KAAM;MAC5C,MAAM;QAAEyH,UAAU;QAAEC,aAAa,GAAG,EAAE;QAAE8B;MAAa,CAAC,GAAGxJ,OAAO;MAEhE,MAAMyJ,gBAAgB,GAAG,CAAC,CAAC;MAC3B,KAAM,MAAMpL,GAAG,IAAIqJ,aAAa,EAAG;QAClC,IAAKnI,UAAU,CAAElB,GAAG,CAAE,EAAG;UACxBoL,gBAAgB,CAAEpL,GAAG,CAAE,GAAGkB,UAAU,CAAElB,GAAG,CAAE;QAC5C;MACD;MAEA;MACC;MACA;MACA,CAAEH,MAAM,CAAC8K,IAAI,CAAES,gBAAiB,CAAC,CAAChL,MAAM,IACxC,CAAEgJ,UAAU,CAAE5F,IAAK,CAAC,EACnB;QACD,OAAO0H,IAAI;MACZ;MAEA,OAAOC,YAAY,CAAED,IAAI,EAAE1H,IAAI,EAAE4H,gBAAiB,CAAC;IACpD,CAAC,EAAEnC,KAAM,CAAC;EACX;EACAvK,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACnBuM,mBAAmB,EACnB,CACD,CAAC;EACDvM,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACjBuK,KAAK,IAAM;IACZ;IACA;IACA;IACA,IAAKA,KAAK,CAACoC,cAAc,CAAE,WAAY,CAAC,IAAI,CAAEpC,KAAK,CAAC8B,SAAS,EAAG;MAC/D,OAAO9B,KAAK,CAAC8B,SAAS;IACvB;IAEA,OAAO9B,KAAK;EACb,CACD,CAAC;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["getBlockSupport","memo","useMemo","useEffect","useId","useState","useDispatch","useRegistry","createHigherOrderComponent","addFilter","useBlockEditContext","mayDisplayControlsKey","mayDisplayParentControlsKey","useSettings","useSettingsForBlockElement","getValueFromObjectPath","setImmutably","store","blockEditorStore","unlock","clsx","jsx","_jsx","cleanEmptyObject","object","Array","isArray","cleanedNestedObjects","Object","entries","map","key","value","filter","undefined","length","fromEntries","transformStyles","activeSupports","migrationPaths","result","source","index","results","values","every","isActive","innerBlocks","referenceBlockAttributes","attributes","returnBlock","forEach","support","path","styleValue","shouldSkipSerialization","blockNameOrType","featureSet","feature","skipSerialization","__experimentalSkipSerialization","includes","pendingStyleOverrides","WeakMap","useStyleOverride","id","css","assets","__unstableType","variation","clientId","setStyleOverride","deleteStyleOverride","registry","fallbackId","_id","override","get","set","push","window","queueMicrotask","batch","args","isPending","find","currentId","useBlockSettings","name","parentLayout","backgroundImage","backgroundSize","customFontFamilies","defaultFontFamilies","themeFontFamilies","defaultFontSizesEnabled","customFontSizes","defaultFontSizes","themeFontSizes","customFontSize","fontStyle","fontWeight","lineHeight","textAlign","textColumns","textDecoration","writingMode","textTransform","letterSpacing","padding","margin","blockGap","defaultSpacingSizesEnabled","customSpacingSize","userSpacingSizes","defaultSpacingSizes","themeSpacingSizes","units","aspectRatio","minHeight","layout","borderColor","borderRadius","borderStyle","borderWidth","customColorsEnabled","customColors","customDuotone","themeColors","defaultColors","defaultPalette","defaultDuotone","userDuotonePalette","themeDuotonePalette","defaultDuotonePalette","userGradientPalette","themeGradientPalette","defaultGradientPalette","defaultGradients","areCustomGradientsEnabled","isBackgroundEnabled","isLinkEnabled","isTextEnabled","isHeadingEnabled","isButtonEnabled","shadow","rawSettings","background","color","palette","custom","theme","default","gradients","duotone","customGradient","link","heading","button","text","typography","fontFamilies","fontSizes","spacing","spacingSizes","border","radius","style","width","dimensions","createBlockEditFilter","features","settings","Edit","edit","withBlockEditHooks","OriginalBlockEdit","props","context","i","hasSupport","attributeKeys","shareWithChildBlocks","shouldDisplayControls","neededProps","isSelected","setAttributes","__unstableParentLayout","BlockProps","useBlockProps","setAllWrapperProps","wrapperProps","setWrapperProps","next","prev","nextAll","BlockPropsPure","createBlockListBlockFilter","withBlockListBlockHooks","BlockListBlock","allWrapperProps","fill","isMatch","keys","Boolean","reduce","acc","className","createBlockSaveFilter","extraPropsFromHooks","accu","addSaveProps","neededAttributes","hasOwnProperty"],"sources":["@wordpress/block-editor/src/hooks/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { memo, useMemo, useEffect, useId, useState } from '@wordpress/element';\nimport { useDispatch, useRegistry } from '@wordpress/data';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseBlockEditContext,\n\tmayDisplayControlsKey,\n\tmayDisplayParentControlsKey,\n} from '../components/block-edit/context';\nimport { useSettings } from '../components';\nimport { useSettingsForBlockElement } from '../components/global-styles/hooks';\nimport { getValueFromObjectPath, setImmutably } from '../utils/object';\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Removed falsy values from nested object.\n *\n * @param {*} object\n * @return {*} Object cleaned from falsy values\n */\nexport const cleanEmptyObject = ( object ) => {\n\tif (\n\t\tobject === null ||\n\t\ttypeof object !== 'object' ||\n\t\tArray.isArray( object )\n\t) {\n\t\treturn object;\n\t}\n\n\tconst cleanedNestedObjects = Object.entries( object )\n\t\t.map( ( [ key, value ] ) => [ key, cleanEmptyObject( value ) ] )\n\t\t.filter( ( [ , value ] ) => value !== undefined );\n\treturn ! cleanedNestedObjects.length\n\t\t? undefined\n\t\t: Object.fromEntries( cleanedNestedObjects );\n};\n\nexport function transformStyles(\n\tactiveSupports,\n\tmigrationPaths,\n\tresult,\n\tsource,\n\tindex,\n\tresults\n) {\n\t// If there are no active supports return early.\n\tif (\n\t\tObject.values( activeSupports ?? {} ).every(\n\t\t\t( isActive ) => ! isActive\n\t\t)\n\t) {\n\t\treturn result;\n\t}\n\t// If the condition verifies we are probably in the presence of a wrapping transform\n\t// e.g: nesting paragraphs in a group or columns and in that case the styles should not be transformed.\n\tif ( results.length === 1 && result.innerBlocks.length === source.length ) {\n\t\treturn result;\n\t}\n\t// For cases where we have a transform from one block to multiple blocks\n\t// or multiple blocks to one block we apply the styles of the first source block\n\t// to the result(s).\n\tlet referenceBlockAttributes = source[ 0 ]?.attributes;\n\t// If we are in presence of transform between more than one block in the source\n\t// that has more than one block in the result\n\t// we apply the styles on source N to the result N,\n\t// if source N does not exists we do nothing.\n\tif ( results.length > 1 && source.length > 1 ) {\n\t\tif ( source[ index ] ) {\n\t\t\treferenceBlockAttributes = source[ index ]?.attributes;\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n\tlet returnBlock = result;\n\tObject.entries( activeSupports ).forEach( ( [ support, isActive ] ) => {\n\t\tif ( isActive ) {\n\t\t\tmigrationPaths[ support ].forEach( ( path ) => {\n\t\t\t\tconst styleValue = getValueFromObjectPath(\n\t\t\t\t\treferenceBlockAttributes,\n\t\t\t\t\tpath\n\t\t\t\t);\n\t\t\t\tif ( styleValue ) {\n\t\t\t\t\treturnBlock = {\n\t\t\t\t\t\t...returnBlock,\n\t\t\t\t\t\tattributes: setImmutably(\n\t\t\t\t\t\t\treturnBlock.attributes,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tstyleValue\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\treturn returnBlock;\n}\n\n/**\n * Check whether serialization of specific block support feature or set should\n * be skipped.\n *\n * @param {string|Object} blockNameOrType Block name or block type object.\n * @param {string} featureSet Name of block support feature set.\n * @param {string} feature Name of the individual feature to check.\n *\n * @return {boolean} Whether serialization should occur.\n */\nexport function shouldSkipSerialization(\n\tblockNameOrType,\n\tfeatureSet,\n\tfeature\n) {\n\tconst support = getBlockSupport( blockNameOrType, featureSet );\n\tconst skipSerialization = support?.__experimentalSkipSerialization;\n\n\tif ( Array.isArray( skipSerialization ) ) {\n\t\treturn skipSerialization.includes( feature );\n\t}\n\n\treturn skipSerialization;\n}\n\nconst pendingStyleOverrides = new WeakMap();\n\nexport function useStyleOverride( {\n\tid,\n\tcss,\n\tassets,\n\t__unstableType,\n\tvariation,\n\tclientId,\n} = {} ) {\n\tconst { setStyleOverride, deleteStyleOverride } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst registry = useRegistry();\n\tconst fallbackId = useId();\n\tuseEffect( () => {\n\t\t// Unmount if there is CSS and assets are empty.\n\t\tif ( ! css && ! assets ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst _id = id || fallbackId;\n\t\tconst override = {\n\t\t\tid,\n\t\t\tcss,\n\t\t\tassets,\n\t\t\t__unstableType,\n\t\t\tvariation,\n\t\t\tclientId,\n\t\t};\n\t\t// Batch updates to style overrides to avoid triggering cascading renders\n\t\t// for each style override block included in a tree and optimize initial render.\n\t\tif ( ! pendingStyleOverrides.get( registry ) ) {\n\t\t\tpendingStyleOverrides.set( registry, [] );\n\t\t}\n\t\tpendingStyleOverrides.get( registry ).push( [ _id, override ] );\n\t\twindow.queueMicrotask( () => {\n\t\t\tif ( pendingStyleOverrides.get( registry )?.length ) {\n\t\t\t\tregistry.batch( () => {\n\t\t\t\t\tpendingStyleOverrides.get( registry ).forEach( ( args ) => {\n\t\t\t\t\t\tsetStyleOverride( ...args );\n\t\t\t\t\t} );\n\t\t\t\t\tpendingStyleOverrides.set( registry, [] );\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tconst isPending = pendingStyleOverrides\n\t\t\t\t.get( registry )\n\t\t\t\t?.find( ( [ currentId ] ) => currentId === _id );\n\t\t\tif ( isPending ) {\n\t\t\t\tpendingStyleOverrides.set(\n\t\t\t\t\tregistry,\n\t\t\t\t\tpendingStyleOverrides\n\t\t\t\t\t\t.get( registry )\n\t\t\t\t\t\t.filter( ( [ currentId ] ) => currentId !== _id )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tdeleteStyleOverride( _id );\n\t\t\t}\n\t\t};\n\t}, [\n\t\tid,\n\t\tcss,\n\t\tclientId,\n\t\tassets,\n\t\t__unstableType,\n\t\tfallbackId,\n\t\tsetStyleOverride,\n\t\tdeleteStyleOverride,\n\t\tregistry,\n\t] );\n}\n\n/**\n * Based on the block and its context, returns an object of all the block settings.\n * This object can be passed as a prop to all the Styles UI components\n * (TypographyPanel, DimensionsPanel...).\n *\n * @param {string} name Block name.\n * @param {*} parentLayout Parent layout.\n *\n * @return {Object} Settings object.\n */\nexport function useBlockSettings( name, parentLayout ) {\n\tconst [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tcustomFontFamilies,\n\t\tdefaultFontFamilies,\n\t\tthemeFontFamilies,\n\t\tdefaultFontSizesEnabled,\n\t\tcustomFontSizes,\n\t\tdefaultFontSizes,\n\t\tthemeFontSizes,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextAlign,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\twritingMode,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tdefaultSpacingSizesEnabled,\n\t\tcustomSpacingSize,\n\t\tuserSpacingSizes,\n\t\tdefaultSpacingSizes,\n\t\tthemeSpacingSizes,\n\t\tunits,\n\t\taspectRatio,\n\t\tminHeight,\n\t\tlayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] = useSettings(\n\t\t'background.backgroundImage',\n\t\t'background.backgroundSize',\n\t\t'typography.fontFamilies.custom',\n\t\t'typography.fontFamilies.default',\n\t\t'typography.fontFamilies.theme',\n\t\t'typography.defaultFontSizes',\n\t\t'typography.fontSizes.custom',\n\t\t'typography.fontSizes.default',\n\t\t'typography.fontSizes.theme',\n\t\t'typography.customFontSize',\n\t\t'typography.fontStyle',\n\t\t'typography.fontWeight',\n\t\t'typography.lineHeight',\n\t\t'typography.textAlign',\n\t\t'typography.textColumns',\n\t\t'typography.textDecoration',\n\t\t'typography.writingMode',\n\t\t'typography.textTransform',\n\t\t'typography.letterSpacing',\n\t\t'spacing.padding',\n\t\t'spacing.margin',\n\t\t'spacing.blockGap',\n\t\t'spacing.defaultSpacingSizes',\n\t\t'spacing.customSpacingSize',\n\t\t'spacing.spacingSizes.custom',\n\t\t'spacing.spacingSizes.default',\n\t\t'spacing.spacingSizes.theme',\n\t\t'spacing.units',\n\t\t'dimensions.aspectRatio',\n\t\t'dimensions.minHeight',\n\t\t'layout',\n\t\t'border.color',\n\t\t'border.radius',\n\t\t'border.style',\n\t\t'border.width',\n\t\t'color.custom',\n\t\t'color.palette.custom',\n\t\t'color.customDuotone',\n\t\t'color.palette.theme',\n\t\t'color.palette.default',\n\t\t'color.defaultPalette',\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default',\n\t\t'color.gradients.custom',\n\t\t'color.gradients.theme',\n\t\t'color.gradients.default',\n\t\t'color.defaultGradients',\n\t\t'color.customGradient',\n\t\t'color.background',\n\t\t'color.link',\n\t\t'color.text',\n\t\t'color.heading',\n\t\t'color.button',\n\t\t'shadow'\n\t);\n\n\tconst rawSettings = useMemo( () => {\n\t\treturn {\n\t\t\tbackground: {\n\t\t\t\tbackgroundImage,\n\t\t\t\tbackgroundSize,\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\tpalette: {\n\t\t\t\t\tcustom: customColors,\n\t\t\t\t\ttheme: themeColors,\n\t\t\t\t\tdefault: defaultColors,\n\t\t\t\t},\n\t\t\t\tgradients: {\n\t\t\t\t\tcustom: userGradientPalette,\n\t\t\t\t\ttheme: themeGradientPalette,\n\t\t\t\t\tdefault: defaultGradientPalette,\n\t\t\t\t},\n\t\t\t\tduotone: {\n\t\t\t\t\tcustom: userDuotonePalette,\n\t\t\t\t\ttheme: themeDuotonePalette,\n\t\t\t\t\tdefault: defaultDuotonePalette,\n\t\t\t\t},\n\t\t\t\tdefaultGradients,\n\t\t\t\tdefaultPalette,\n\t\t\t\tdefaultDuotone,\n\t\t\t\tcustom: customColorsEnabled,\n\t\t\t\tcustomGradient: areCustomGradientsEnabled,\n\t\t\t\tcustomDuotone,\n\t\t\t\tbackground: isBackgroundEnabled,\n\t\t\t\tlink: isLinkEnabled,\n\t\t\t\theading: isHeadingEnabled,\n\t\t\t\tbutton: isButtonEnabled,\n\t\t\t\ttext: isTextEnabled,\n\t\t\t},\n\t\t\ttypography: {\n\t\t\t\tfontFamilies: {\n\t\t\t\t\tcustom: customFontFamilies,\n\t\t\t\t\tdefault: defaultFontFamilies,\n\t\t\t\t\ttheme: themeFontFamilies,\n\t\t\t\t},\n\t\t\t\tfontSizes: {\n\t\t\t\t\tcustom: customFontSizes,\n\t\t\t\t\tdefault: defaultFontSizes,\n\t\t\t\t\ttheme: themeFontSizes,\n\t\t\t\t},\n\t\t\t\tcustomFontSize,\n\t\t\t\tdefaultFontSizes: defaultFontSizesEnabled,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tlineHeight,\n\t\t\t\ttextAlign,\n\t\t\t\ttextColumns,\n\t\t\t\ttextDecoration,\n\t\t\t\ttextTransform,\n\t\t\t\tletterSpacing,\n\t\t\t\twritingMode,\n\t\t\t},\n\t\t\tspacing: {\n\t\t\t\tspacingSizes: {\n\t\t\t\t\tcustom: userSpacingSizes,\n\t\t\t\t\tdefault: defaultSpacingSizes,\n\t\t\t\t\ttheme: themeSpacingSizes,\n\t\t\t\t},\n\t\t\t\tcustomSpacingSize,\n\t\t\t\tdefaultSpacingSizes: defaultSpacingSizesEnabled,\n\t\t\t\tpadding,\n\t\t\t\tmargin,\n\t\t\t\tblockGap,\n\t\t\t\tunits,\n\t\t\t},\n\t\t\tborder: {\n\t\t\t\tcolor: borderColor,\n\t\t\t\tradius: borderRadius,\n\t\t\t\tstyle: borderStyle,\n\t\t\t\twidth: borderWidth,\n\t\t\t},\n\t\t\tdimensions: {\n\t\t\t\taspectRatio,\n\t\t\t\tminHeight,\n\t\t\t},\n\t\t\tlayout,\n\t\t\tparentLayout,\n\t\t\tshadow,\n\t\t};\n\t}, [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tcustomFontFamilies,\n\t\tdefaultFontFamilies,\n\t\tthemeFontFamilies,\n\t\tdefaultFontSizesEnabled,\n\t\tcustomFontSizes,\n\t\tdefaultFontSizes,\n\t\tthemeFontSizes,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextAlign,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\twritingMode,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tdefaultSpacingSizesEnabled,\n\t\tcustomSpacingSize,\n\t\tuserSpacingSizes,\n\t\tdefaultSpacingSizes,\n\t\tthemeSpacingSizes,\n\t\tunits,\n\t\taspectRatio,\n\t\tminHeight,\n\t\tlayout,\n\t\tparentLayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] );\n\n\treturn useSettingsForBlockElement( rawSettings, name );\n}\n\nexport function createBlockEditFilter( features ) {\n\t// We don't want block controls to re-render when typing inside a block.\n\t// `memo` will prevent re-renders unless props change, so only pass the\n\t// needed props and not the whole attributes object.\n\tfeatures = features.map( ( settings ) => {\n\t\treturn { ...settings, Edit: memo( settings.edit ) };\n\t} );\n\tconst withBlockEditHooks = createHigherOrderComponent(\n\t\t( OriginalBlockEdit ) => ( props ) => {\n\t\t\tconst context = useBlockEditContext();\n\t\t\t// CAUTION: code added before this line will be executed for all\n\t\t\t// blocks, not just those that support the feature! Code added\n\t\t\t// above this line should be carefully evaluated for its impact on\n\t\t\t// performance.\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tEdit,\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tshareWithChildBlocks,\n\t\t\t\t\t} = feature;\n\t\t\t\t\tconst shouldDisplayControls =\n\t\t\t\t\t\tcontext[ mayDisplayControlsKey ] ||\n\t\t\t\t\t\t( context[ mayDisplayParentControlsKey ] &&\n\t\t\t\t\t\t\tshareWithChildBlocks );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! shouldDisplayControls ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Edit\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\tisSelected={ props.isSelected }\n\t\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\t\tsetAttributes={ props.setAttributes }\n\t\t\t\t\t\t\t__unstableParentLayout={\n\t\t\t\t\t\t\t\tprops.__unstableParentLayout\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<OriginalBlockEdit key=\"edit\" { ...props } />,\n\t\t\t];\n\t\t},\n\t\t'withBlockEditHooks'\n\t);\n\taddFilter( 'editor.BlockEdit', 'core/editor/hooks', withBlockEditHooks );\n}\n\nfunction BlockProps( { index, useBlockProps, setAllWrapperProps, ...props } ) {\n\tconst wrapperProps = useBlockProps( props );\n\tconst setWrapperProps = ( next ) =>\n\t\tsetAllWrapperProps( ( prev ) => {\n\t\t\tconst nextAll = [ ...prev ];\n\t\t\tnextAll[ index ] = next;\n\t\t\treturn nextAll;\n\t\t} );\n\t// Setting state after every render is fine because this component is\n\t// pure and will only re-render when needed props change.\n\tuseEffect( () => {\n\t\t// We could shallow compare the props, but since this component only\n\t\t// changes when needed attributes change, the benefit is probably small.\n\t\tsetWrapperProps( wrapperProps );\n\t\treturn () => {\n\t\t\tsetWrapperProps( undefined );\n\t\t};\n\t} );\n\treturn null;\n}\n\nconst BlockPropsPure = memo( BlockProps );\n\nexport function createBlockListBlockFilter( features ) {\n\tconst withBlockListBlockHooks = createHigherOrderComponent(\n\t\t( BlockListBlock ) => ( props ) => {\n\t\t\tconst [ allWrapperProps, setAllWrapperProps ] = useState(\n\t\t\t\tArray( features.length ).fill( undefined )\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tuseBlockProps,\n\t\t\t\t\t\tisMatch,\n\t\t\t\t\t} = feature;\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t\t\t// set.\n\t\t\t\t\t\t! Object.keys( neededProps ).length ||\n\t\t\t\t\t\t! hasSupport( props.name ) ||\n\t\t\t\t\t\t( isMatch && ! isMatch( neededProps ) )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<BlockPropsPure\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tindex={ i }\n\t\t\t\t\t\t\tuseBlockProps={ useBlockProps }\n\t\t\t\t\t\t\t// This component is pure, so we must pass a stable\n\t\t\t\t\t\t\t// function reference.\n\t\t\t\t\t\t\tsetAllWrapperProps={ setAllWrapperProps }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<BlockListBlock\n\t\t\t\t\tkey=\"edit\"\n\t\t\t\t\t{ ...props }\n\t\t\t\t\twrapperProps={ allWrapperProps\n\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t.reduce( ( acc, wrapperProps ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t\t\t...wrapperProps,\n\t\t\t\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t\t\t\tacc.className,\n\t\t\t\t\t\t\t\t\twrapperProps.className\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t...acc.style,\n\t\t\t\t\t\t\t\t\t...wrapperProps.style,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}, props.wrapperProps || {} ) }\n\t\t\t\t/>,\n\t\t\t];\n\t\t},\n\t\t'withBlockListBlockHooks'\n\t);\n\taddFilter(\n\t\t'editor.BlockListBlock',\n\t\t'core/editor/hooks',\n\t\twithBlockListBlockHooks\n\t);\n}\n\nexport function createBlockSaveFilter( features ) {\n\tfunction extraPropsFromHooks( props, name, attributes ) {\n\t\treturn features.reduce( ( accu, feature ) => {\n\t\t\tconst { hasSupport, attributeKeys = [], addSaveProps } = feature;\n\n\t\t\tconst neededAttributes = {};\n\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\tif ( attributes[ key ] ) {\n\t\t\t\t\tneededAttributes[ key ] = attributes[ key ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t// set.\n\t\t\t\t! Object.keys( neededAttributes ).length ||\n\t\t\t\t! hasSupport( name )\n\t\t\t) {\n\t\t\t\treturn accu;\n\t\t\t}\n\n\t\t\treturn addSaveProps( accu, name, neededAttributes );\n\t\t}, props );\n\t}\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\textraPropsFromHooks,\n\t\t0\n\t);\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\t( props ) => {\n\t\t\t// Previously we had a filter deleting the className if it was an empty\n\t\t\t// string. That filter is no longer running, so now we need to delete it\n\t\t\t// here.\n\t\t\tif ( props.hasOwnProperty( 'className' ) && ! props.className ) {\n\t\t\t\tdelete props.className;\n\t\t\t}\n\n\t\t\treturn props;\n\t\t}\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,mBAAmB;AACnD,SAASC,IAAI,EAAEC,OAAO,EAAEC,SAAS,EAAEC,KAAK,EAAEC,QAAQ,QAAQ,oBAAoB;AAC9E,SAASC,WAAW,EAAEC,WAAW,QAAQ,iBAAiB;AAC1D,SAASC,0BAA0B,QAAQ,oBAAoB;AAC/D,SAASC,SAAS,QAAQ,kBAAkB;;AAE5C;AACA;AACA;AACA,SACCC,mBAAmB,EACnBC,qBAAqB,EACrBC,2BAA2B,QACrB,kCAAkC;AACzC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,0BAA0B,QAAQ,mCAAmC;AAC9E,SAASC,sBAAsB,EAAEC,YAAY,QAAQ,iBAAiB;AACtE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AACpD,SAASC,MAAM,QAAQ,gBAAgB;AACvC;AACA;AACA;AACA,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;AALA,SAAAC,GAAA,IAAAC,IAAA;AAMA,OAAO,MAAMC,gBAAgB,GAAKC,MAAM,IAAM;EAC7C,IACCA,MAAM,KAAK,IAAI,IACf,OAAOA,MAAM,KAAK,QAAQ,IAC1BC,KAAK,CAACC,OAAO,CAAEF,MAAO,CAAC,EACtB;IACD,OAAOA,MAAM;EACd;EAEA,MAAMG,oBAAoB,GAAGC,MAAM,CAACC,OAAO,CAAEL,MAAO,CAAC,CACnDM,GAAG,CAAE,CAAE,CAAEC,GAAG,EAAEC,KAAK,CAAE,KAAM,CAAED,GAAG,EAAER,gBAAgB,CAAES,KAAM,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;MACC;MACA;MACA,CAAEH,MAAM,CAAC+K,IAAI,CAAES,gBAAiB,CAAC,CAACjL,MAAM,IACxC,CAAEiJ,UAAU,CAAE5F,IAAK,CAAC,EACnB;QACD,OAAO0H,IAAI;MACZ;MAEA,OAAOC,YAAY,CAAED,IAAI,EAAE1H,IAAI,EAAE4H,gBAAiB,CAAC;IACpD,CAAC,EAAEnC,KAAM,CAAC;EACX;EACAxK,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACnBwM,mBAAmB,EACnB,CACD,CAAC;EACDxM,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACjBwK,KAAK,IAAM;IACZ;IACA;IACA;IACA,IAAKA,KAAK,CAACoC,cAAc,CAAE,WAAY,CAAC,IAAI,CAAEpC,KAAK,CAAC8B,SAAS,EAAG;MAC/D,OAAO9B,KAAK,CAAC8B,SAAS;IACvB;IAEA,OAAO9B,KAAK;EACb,CACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -12,6 +12,7 @@ import { getCSSRules } from '@wordpress/style-engine';
|
|
|
12
12
|
import { useSettings } from '../components/use-settings';
|
|
13
13
|
import { appendSelectors, getBlockGapCSS, getAlignmentsInfo } from './utils';
|
|
14
14
|
import { getGapCSSValue } from '../hooks/gap';
|
|
15
|
+
import { BlockControls, JustifyContentControl } from '../components';
|
|
15
16
|
import { shouldSkipSerialization } from '../hooks/utils';
|
|
16
17
|
import { LAYOUT_DEFINITIONS } from './definitions';
|
|
17
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -123,8 +124,25 @@ export default {
|
|
|
123
124
|
})]
|
|
124
125
|
});
|
|
125
126
|
},
|
|
126
|
-
toolBarControls: function DefaultLayoutToolbarControls(
|
|
127
|
-
|
|
127
|
+
toolBarControls: function DefaultLayoutToolbarControls({
|
|
128
|
+
layout = {},
|
|
129
|
+
onChange,
|
|
130
|
+
layoutBlockSupport
|
|
131
|
+
}) {
|
|
132
|
+
const {
|
|
133
|
+
allowJustification = true
|
|
134
|
+
} = layoutBlockSupport;
|
|
135
|
+
if (!allowJustification) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
return /*#__PURE__*/_jsx(BlockControls, {
|
|
139
|
+
group: "block",
|
|
140
|
+
__experimentalShareWithChildBlocks: true,
|
|
141
|
+
children: /*#__PURE__*/_jsx(DefaultLayoutJustifyContentControl, {
|
|
142
|
+
layout: layout,
|
|
143
|
+
onChange: onChange
|
|
144
|
+
})
|
|
145
|
+
});
|
|
128
146
|
},
|
|
129
147
|
getLayoutStyle: function getLayoutStyle({
|
|
130
148
|
selector,
|
|
@@ -245,4 +263,28 @@ export default {
|
|
|
245
263
|
return alignments;
|
|
246
264
|
}
|
|
247
265
|
};
|
|
266
|
+
const POPOVER_PROPS = {
|
|
267
|
+
placement: 'bottom-start'
|
|
268
|
+
};
|
|
269
|
+
function DefaultLayoutJustifyContentControl({
|
|
270
|
+
layout,
|
|
271
|
+
onChange
|
|
272
|
+
}) {
|
|
273
|
+
const {
|
|
274
|
+
justifyContent = 'center'
|
|
275
|
+
} = layout;
|
|
276
|
+
const onJustificationChange = value => {
|
|
277
|
+
onChange({
|
|
278
|
+
...layout,
|
|
279
|
+
justifyContent: value
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
const allowedControls = ['left', 'center', 'right'];
|
|
283
|
+
return /*#__PURE__*/_jsx(JustifyContentControl, {
|
|
284
|
+
allowedControls: allowedControls,
|
|
285
|
+
value: justifyContent,
|
|
286
|
+
onChange: onJustificationChange,
|
|
287
|
+
popoverProps: POPOVER_PROPS
|
|
288
|
+
});
|
|
289
|
+
}
|
|
248
290
|
//# sourceMappingURL=constrained.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__experimentalUseCustomUnits","useCustomUnits","__experimentalUnitControl","UnitControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","__","Icon","positionCenter","stretchWide","justifyLeft","justifyCenter","justifyRight","getCSSRules","useSettings","appendSelectors","getBlockGapCSS","getAlignmentsInfo","getGapCSSValue","shouldSkipSerialization","LAYOUT_DEFINITIONS","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","name","label","inspectorControls","DefaultLayoutInspectorControls","layout","onChange","layoutBlockSupport","wideSize","contentSize","justifyContent","allowJustification","allowCustomContentAndWideSize","onJustificationChange","value","justificationOptions","icon","availableUnits","units","children","className","labelPosition","__unstableInputWidth","nextWidth","parseFloat","__nextHasNoMarginBottom","map","toolBarControls","DefaultLayoutToolbarControls","getLayoutStyle","selector","style","blockName","hasBlockGapSupport","layoutDefinitions","blockGapStyleValue","spacing","blockGap","blockGapValue","top","marginLeft","marginRight","output","padding","paddingValues","forEach","rule","key","getOrientation","getAlignments","alignmentInfo","alignments","undefined","includes","unshift","alignment","info","wide","none"],"sources":["@wordpress/block-editor/src/layouts/constrained.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tIcon,\n\tpositionCenter,\n\tstretchWide,\n\tjustifyLeft,\n\tjustifyCenter,\n\tjustifyRight,\n} from '@wordpress/icons';\nimport { getCSSRules } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport { useSettings } from '../components/use-settings';\nimport { appendSelectors, getBlockGapCSS, getAlignmentsInfo } from './utils';\nimport { getGapCSSValue } from '../hooks/gap';\nimport { shouldSkipSerialization } from '../hooks/utils';\nimport { LAYOUT_DEFINITIONS } from './definitions';\n\nexport default {\n\tname: 'constrained',\n\tlabel: __( 'Constrained' ),\n\tinspectorControls: function DefaultLayoutInspectorControls( {\n\t\tlayout,\n\t\tonChange,\n\t\tlayoutBlockSupport = {},\n\t} ) {\n\t\tconst { wideSize, contentSize, justifyContent = 'center' } = layout;\n\t\tconst {\n\t\t\tallowJustification = true,\n\t\t\tallowCustomContentAndWideSize = true,\n\t\t} = layoutBlockSupport;\n\t\tconst onJustificationChange = ( value ) => {\n\t\t\tonChange( {\n\t\t\t\t...layout,\n\t\t\t\tjustifyContent: value,\n\t\t\t} );\n\t\t};\n\t\tconst justificationOptions = [\n\t\t\t{\n\t\t\t\tvalue: 'left',\n\t\t\t\ticon: justifyLeft,\n\t\t\t\tlabel: __( 'Justify items left' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'center',\n\t\t\t\ticon: justifyCenter,\n\t\t\t\tlabel: __( 'Justify items center' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'right',\n\t\t\t\ticon: justifyRight,\n\t\t\t\tlabel: __( 'Justify items right' ),\n\t\t\t},\n\t\t];\n\t\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\t\tconst units = useCustomUnits( {\n\t\t\tavailableUnits: availableUnits || [ '%', 'px', 'em', 'rem', 'vw' ],\n\t\t} );\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ allowCustomContentAndWideSize && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"block-editor-hooks__layout-controls\">\n\t\t\t\t\t\t\t<div className=\"block-editor-hooks__layout-controls-unit\">\n\t\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-hooks__layout-controls-unit-input\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Content' ) }\n\t\t\t\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\t\t\tvalue={ contentSize || wideSize || '' }\n\t\t\t\t\t\t\t\t\tonChange={ ( nextWidth ) => {\n\t\t\t\t\t\t\t\t\t\tnextWidth =\n\t\t\t\t\t\t\t\t\t\t\t0 > parseFloat( nextWidth )\n\t\t\t\t\t\t\t\t\t\t\t\t? '0'\n\t\t\t\t\t\t\t\t\t\t\t\t: nextWidth;\n\t\t\t\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\t\t\t\t...layout,\n\t\t\t\t\t\t\t\t\t\t\tcontentSize: nextWidth,\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Icon icon={ positionCenter } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"block-editor-hooks__layout-controls-unit\">\n\t\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-hooks__layout-controls-unit-input\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Wide' ) }\n\t\t\t\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\t\t\tvalue={ wideSize || contentSize || '' }\n\t\t\t\t\t\t\t\t\tonChange={ ( nextWidth ) => {\n\t\t\t\t\t\t\t\t\t\tnextWidth =\n\t\t\t\t\t\t\t\t\t\t\t0 > parseFloat( nextWidth )\n\t\t\t\t\t\t\t\t\t\t\t\t? '0'\n\t\t\t\t\t\t\t\t\t\t\t\t: nextWidth;\n\t\t\t\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\t\t\t\t...layout,\n\t\t\t\t\t\t\t\t\t\t\twideSize: nextWidth,\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Icon icon={ stretchWide } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<p className=\"block-editor-hooks__layout-controls-helptext\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Customize the width for all elements that are assigned to the center or wide columns.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t{ allowJustification && (\n\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Justification' ) }\n\t\t\t\t\t\tvalue={ justifyContent }\n\t\t\t\t\t\tonChange={ onJustificationChange }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ justificationOptions.map(\n\t\t\t\t\t\t\t( { value, icon, label } ) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t},\n\ttoolBarControls: function DefaultLayoutToolbarControls() {\n\t\treturn null;\n\t},\n\tgetLayoutStyle: function getLayoutStyle( {\n\t\tselector,\n\t\tlayout = {},\n\t\tstyle,\n\t\tblockName,\n\t\thasBlockGapSupport,\n\t\tlayoutDefinitions = LAYOUT_DEFINITIONS,\n\t} ) {\n\t\tconst { contentSize, wideSize, justifyContent } = layout;\n\t\tconst blockGapStyleValue = getGapCSSValue( style?.spacing?.blockGap );\n\n\t\t// If a block's block.json skips serialization for spacing or\n\t\t// spacing.blockGap, don't apply the user-defined value to the styles.\n\t\tlet blockGapValue = '';\n\t\tif ( ! shouldSkipSerialization( blockName, 'spacing', 'blockGap' ) ) {\n\t\t\t// If an object is provided only use the 'top' value for this kind of gap.\n\t\t\tif ( blockGapStyleValue?.top ) {\n\t\t\t\tblockGapValue = getGapCSSValue( blockGapStyleValue?.top );\n\t\t\t} else if ( typeof blockGapStyleValue === 'string' ) {\n\t\t\t\tblockGapValue = getGapCSSValue( blockGapStyleValue );\n\t\t\t}\n\t\t}\n\n\t\tconst marginLeft =\n\t\t\tjustifyContent === 'left' ? '0 !important' : 'auto !important';\n\t\tconst marginRight =\n\t\t\tjustifyContent === 'right' ? '0 !important' : 'auto !important';\n\n\t\tlet output =\n\t\t\t!! contentSize || !! wideSize\n\t\t\t\t? `\n\t\t\t\t\t${ appendSelectors(\n\t\t\t\t\t\tselector,\n\t\t\t\t\t\t'> :where(:not(.alignleft):not(.alignright):not(.alignfull))'\n\t\t\t\t\t) } {\n\t\t\t\t\t\tmax-width: ${ contentSize ?? wideSize };\n\t\t\t\t\t\tmargin-left: ${ marginLeft };\n\t\t\t\t\t\tmargin-right: ${ marginRight };\n\t\t\t\t\t}\n\t\t\t\t\t${ appendSelectors( selector, '> .alignwide' ) } {\n\t\t\t\t\t\tmax-width: ${ wideSize ?? contentSize };\n\t\t\t\t\t}\n\t\t\t\t\t${ appendSelectors( selector, '> .alignfull' ) } {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`\n\t\t\t\t: '';\n\n\t\tif ( justifyContent === 'left' ) {\n\t\t\toutput += `${ appendSelectors(\n\t\t\t\tselector,\n\t\t\t\t'> :where(:not(.alignleft):not(.alignright):not(.alignfull))'\n\t\t\t) }\n\t\t\t{ margin-left: ${ marginLeft }; }`;\n\t\t} else if ( justifyContent === 'right' ) {\n\t\t\toutput += `${ appendSelectors(\n\t\t\t\tselector,\n\t\t\t\t'> :where(:not(.alignleft):not(.alignright):not(.alignfull))'\n\t\t\t) }\n\t\t\t{ margin-right: ${ marginRight }; }`;\n\t\t}\n\n\t\t// If there is custom padding, add negative margins for alignfull blocks.\n\t\tif ( style?.spacing?.padding ) {\n\t\t\t// The style object might be storing a preset so we need to make sure we get a usable value.\n\t\t\tconst paddingValues = getCSSRules( style );\n\t\t\tpaddingValues.forEach( ( rule ) => {\n\t\t\t\tif ( rule.key === 'paddingRight' ) {\n\t\t\t\t\toutput += `\n\t\t\t\t\t${ appendSelectors( selector, '> .alignfull' ) } {\n\t\t\t\t\t\tmargin-right: calc(${ rule.value } * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`;\n\t\t\t\t} else if ( rule.key === 'paddingLeft' ) {\n\t\t\t\t\toutput += `\n\t\t\t\t\t${ appendSelectors( selector, '> .alignfull' ) } {\n\t\t\t\t\t\tmargin-left: calc(${ rule.value } * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`;\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Output blockGap styles based on rules contained in layout definitions in theme.json.\n\t\tif ( hasBlockGapSupport && blockGapValue ) {\n\t\t\toutput += getBlockGapCSS(\n\t\t\t\tselector,\n\t\t\t\tlayoutDefinitions,\n\t\t\t\t'constrained',\n\t\t\t\tblockGapValue\n\t\t\t);\n\t\t}\n\t\treturn output;\n\t},\n\tgetOrientation() {\n\t\treturn 'vertical';\n\t},\n\tgetAlignments( layout ) {\n\t\tconst alignmentInfo = getAlignmentsInfo( layout );\n\t\tif ( layout.alignments !== undefined ) {\n\t\t\tif ( ! layout.alignments.includes( 'none' ) ) {\n\t\t\t\tlayout.alignments.unshift( 'none' );\n\t\t\t}\n\t\t\treturn layout.alignments.map( ( alignment ) => ( {\n\t\t\t\tname: alignment,\n\t\t\t\tinfo: alignmentInfo[ alignment ],\n\t\t\t} ) );\n\t\t}\n\t\tconst { contentSize, wideSize } = layout;\n\n\t\tconst alignments = [\n\t\t\t{ name: 'left' },\n\t\t\t{ name: 'center' },\n\t\t\t{ name: 'right' },\n\t\t];\n\n\t\tif ( contentSize ) {\n\t\t\talignments.unshift( { name: 'full' } );\n\t\t}\n\n\t\tif ( wideSize ) {\n\t\t\talignments.unshift( { name: 'wide', info: alignmentInfo.wide } );\n\t\t}\n\n\t\talignments.unshift( { name: 'none', info: alignm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M,EAAG;IACvB,MAAM6C,aAAa,GAAG3D,iBAAiB,CAAEc,MAAO,CAAC;IACjD,IAAKA,MAAM,CAAC8C,UAAU,KAAKC,SAAS,EAAG;MACtC,IAAK,CAAE/C,MAAM,CAAC8C,UAAU,CAACE,QAAQ,CAAE,MAAO,CAAC,EAAG;QAC7ChD,MAAM,CAAC8C,UAAU,CAACG,OAAO,CAAE,MAAO,CAAC;MACpC;MACA,OAAOjD,MAAM,CAAC8C,UAAU,CAACzB,GAAG,CAAI6B,SAAS,KAAQ;QAChDtD,IAAI,EAAEsD,SAAS;QACfC,IAAI,EAAEN,aAAa,CAAEK,SAAS;MAC/B,CAAC,CAAG,CAAC;IACN;IACA,MAAM;MAAE9C,WAAW;MAAED;IAAS,CAAC,GAAGH,MAAM;IAExC,MAAM8C,UAAU,GAAG,CAClB;MAAElD,IAAI,EAAE;IAAO,CAAC,EAChB;MAAEA,IAAI,EAAE;IAAS,CAAC,EAClB;MAAEA,IAAI,EAAE;IAAQ,CAAC,CACjB;IAED,IAAKQ,WAAW,EAAG;MAClB0C,UAAU,CAACG,OAAO,CAAE;QAAErD,IAAI,EAAE;MAAO,CAAE,CAAC;IACvC;IAEA,IAAKO,QAAQ,EAAG;MACf2C,UAAU,CAACG,OAAO,CAAE;QAAErD,IAAI,EAAE,MAAM;QAAEuD,IAAI,EAAEN,aAAa,CAACO;MAAK,CAAE,CAAC;IACjE;IAEAN,UAAU,CAACG,OAAO,CAAE;MAAErD,IAAI,EAAE,MAAM;MAAEuD,IAAI,EAAEN,aAAa,CAACQ;IAAK,CAAE,CAAC;IAEhE,OAAOP,UAAU;EAClB;AACD,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["__experimentalUseCustomUnits","useCustomUnits","__experimentalUnitControl","UnitControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","__","Icon","positionCenter","stretchWide","justifyLeft","justifyCenter","justifyRight","getCSSRules","useSettings","appendSelectors","getBlockGapCSS","getAlignmentsInfo","getGapCSSValue","BlockControls","JustifyContentControl","shouldSkipSerialization","LAYOUT_DEFINITIONS","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","name","label","inspectorControls","DefaultLayoutInspectorControls","layout","onChange","layoutBlockSupport","wideSize","contentSize","justifyContent","allowJustification","allowCustomContentAndWideSize","onJustificationChange","value","justificationOptions","icon","availableUnits","units","children","className","labelPosition","__unstableInputWidth","nextWidth","parseFloat","__nextHasNoMarginBottom","map","toolBarControls","DefaultLayoutToolbarControls","group","__experimentalShareWithChildBlocks","DefaultLayoutJustifyContentControl","getLayoutStyle","selector","style","blockName","hasBlockGapSupport","layoutDefinitions","blockGapStyleValue","spacing","blockGap","blockGapValue","top","marginLeft","marginRight","output","padding","paddingValues","forEach","rule","key","getOrientation","getAlignments","alignmentInfo","alignments","undefined","includes","unshift","alignment","info","wide","none","POPOVER_PROPS","placement","allowedControls","popoverProps"],"sources":["@wordpress/block-editor/src/layouts/constrained.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tIcon,\n\tpositionCenter,\n\tstretchWide,\n\tjustifyLeft,\n\tjustifyCenter,\n\tjustifyRight,\n} from '@wordpress/icons';\nimport { getCSSRules } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport { useSettings } from '../components/use-settings';\nimport { appendSelectors, getBlockGapCSS, getAlignmentsInfo } from './utils';\nimport { getGapCSSValue } from '../hooks/gap';\nimport { BlockControls, JustifyContentControl } from '../components';\nimport { shouldSkipSerialization } from '../hooks/utils';\nimport { LAYOUT_DEFINITIONS } from './definitions';\n\nexport default {\n\tname: 'constrained',\n\tlabel: __( 'Constrained' ),\n\tinspectorControls: function DefaultLayoutInspectorControls( {\n\t\tlayout,\n\t\tonChange,\n\t\tlayoutBlockSupport = {},\n\t} ) {\n\t\tconst { wideSize, contentSize, justifyContent = 'center' } = layout;\n\t\tconst {\n\t\t\tallowJustification = true,\n\t\t\tallowCustomContentAndWideSize = true,\n\t\t} = layoutBlockSupport;\n\t\tconst onJustificationChange = ( value ) => {\n\t\t\tonChange( {\n\t\t\t\t...layout,\n\t\t\t\tjustifyContent: value,\n\t\t\t} );\n\t\t};\n\t\tconst justificationOptions = [\n\t\t\t{\n\t\t\t\tvalue: 'left',\n\t\t\t\ticon: justifyLeft,\n\t\t\t\tlabel: __( 'Justify items left' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'center',\n\t\t\t\ticon: justifyCenter,\n\t\t\t\tlabel: __( 'Justify items center' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'right',\n\t\t\t\ticon: justifyRight,\n\t\t\t\tlabel: __( 'Justify items right' ),\n\t\t\t},\n\t\t];\n\t\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\t\tconst units = useCustomUnits( {\n\t\t\tavailableUnits: availableUnits || [ '%', 'px', 'em', 'rem', 'vw' ],\n\t\t} );\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ allowCustomContentAndWideSize && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"block-editor-hooks__layout-controls\">\n\t\t\t\t\t\t\t<div className=\"block-editor-hooks__layout-controls-unit\">\n\t\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-hooks__layout-controls-unit-input\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Content' ) }\n\t\t\t\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\t\t\tvalue={ contentSize || wideSize || '' }\n\t\t\t\t\t\t\t\t\tonChange={ ( nextWidth ) => {\n\t\t\t\t\t\t\t\t\t\tnextWidth =\n\t\t\t\t\t\t\t\t\t\t\t0 > parseFloat( nextWidth )\n\t\t\t\t\t\t\t\t\t\t\t\t? '0'\n\t\t\t\t\t\t\t\t\t\t\t\t: nextWidth;\n\t\t\t\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\t\t\t\t...layout,\n\t\t\t\t\t\t\t\t\t\t\tcontentSize: nextWidth,\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Icon icon={ positionCenter } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"block-editor-hooks__layout-controls-unit\">\n\t\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-hooks__layout-controls-unit-input\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Wide' ) }\n\t\t\t\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\t\t\tvalue={ wideSize || contentSize || '' }\n\t\t\t\t\t\t\t\t\tonChange={ ( nextWidth ) => {\n\t\t\t\t\t\t\t\t\t\tnextWidth =\n\t\t\t\t\t\t\t\t\t\t\t0 > parseFloat( nextWidth )\n\t\t\t\t\t\t\t\t\t\t\t\t? '0'\n\t\t\t\t\t\t\t\t\t\t\t\t: nextWidth;\n\t\t\t\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\t\t\t\t...layout,\n\t\t\t\t\t\t\t\t\t\t\twideSize: nextWidth,\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Icon icon={ stretchWide } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<p className=\"block-editor-hooks__layout-controls-helptext\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Customize the width for all elements that are assigned to the center or wide columns.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t{ allowJustification && (\n\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Justification' ) }\n\t\t\t\t\t\tvalue={ justifyContent }\n\t\t\t\t\t\tonChange={ onJustificationChange }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ justificationOptions.map(\n\t\t\t\t\t\t\t( { value, icon, label } ) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t},\n\ttoolBarControls: function DefaultLayoutToolbarControls( {\n\t\tlayout = {},\n\t\tonChange,\n\t\tlayoutBlockSupport,\n\t} ) {\n\t\tconst { allowJustification = true } = layoutBlockSupport;\n\n\t\tif ( ! allowJustification ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<BlockControls group=\"block\" __experimentalShareWithChildBlocks>\n\t\t\t\t<DefaultLayoutJustifyContentControl\n\t\t\t\t\tlayout={ layout }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t);\n\t},\n\tgetLayoutStyle: function getLayoutStyle( {\n\t\tselector,\n\t\tlayout = {},\n\t\tstyle,\n\t\tblockName,\n\t\thasBlockGapSupport,\n\t\tlayoutDefinitions = LAYOUT_DEFINITIONS,\n\t} ) {\n\t\tconst { contentSize, wideSize, justifyContent } = layout;\n\t\tconst blockGapStyleValue = getGapCSSValue( style?.spacing?.blockGap );\n\n\t\t// If a block's block.json skips serialization for spacing or\n\t\t// spacing.blockGap, don't apply the user-defined value to the styles.\n\t\tlet blockGapValue = '';\n\t\tif ( ! shouldSkipSerialization( blockName, 'spacing', 'blockGap' ) ) {\n\t\t\t// If an object is provided only use the 'top' value for this kind of gap.\n\t\t\tif ( blockGapStyleValue?.top ) {\n\t\t\t\tblockGapValue = getGapCSSValue( blockGapStyleValue?.top );\n\t\t\t} else if ( typeof blockGapStyleValue === 'string' ) {\n\t\t\t\tblockGapValue = getGapCSSValue( blockGapStyleValue );\n\t\t\t}\n\t\t}\n\n\t\tconst marginLeft =\n\t\t\tjustifyContent === 'left' ? '0 !important' : 'auto !important';\n\t\tconst marginRight =\n\t\t\tjustifyContent === 'right' ? '0 !important' : 'auto !important';\n\n\t\tlet output =\n\t\t\t!! contentSize || !! wideSize\n\t\t\t\t? `\n\t\t\t\t\t${ appendSelectors(\n\t\t\t\t\t\tselector,\n\t\t\t\t\t\t'> :where(:not(.alignleft):not(.alignright):not(.alignfull))'\n\t\t\t\t\t) } {\n\t\t\t\t\t\tmax-width: ${ contentSize ?? wideSize };\n\t\t\t\t\t\tmargin-left: ${ marginLeft };\n\t\t\t\t\t\tmargin-right: ${ marginRight };\n\t\t\t\t\t}\n\t\t\t\t\t${ appendSelectors( selector, '> .alignwide' ) } {\n\t\t\t\t\t\tmax-width: ${ wideSize ?? contentSize };\n\t\t\t\t\t}\n\t\t\t\t\t${ appendSelectors( selector, '> .alignfull' ) } {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`\n\t\t\t\t: '';\n\n\t\tif ( justifyContent === 'left' ) {\n\t\t\toutput += `${ appendSelectors(\n\t\t\t\tselector,\n\t\t\t\t'> :where(:not(.alignleft):not(.alignright):not(.alignfull))'\n\t\t\t) }\n\t\t\t{ margin-left: ${ marginLeft }; }`;\n\t\t} else if ( justifyContent === 'right' ) {\n\t\t\toutput += `${ appendSelectors(\n\t\t\t\tselector,\n\t\t\t\t'> :where(:not(.alignleft):not(.alignright):not(.alignfull))'\n\t\t\t) }\n\t\t\t{ margin-right: ${ marginRight }; }`;\n\t\t}\n\n\t\t// If there is custom padding, add negative margins for alignfull blocks.\n\t\tif ( style?.spacing?.padding ) {\n\t\t\t// The style object might be storing a preset so we need to make sure we get a usable value.\n\t\t\tconst paddingValues = getCSSRules( style );\n\t\t\tpaddingValues.forEach( ( rule ) => {\n\t\t\t\tif ( rule.key === 'paddingRight' ) {\n\t\t\t\t\toutput += `\n\t\t\t\t\t${ appendSelectors( selector, '> .alignfull' ) } {\n\t\t\t\t\t\tmargin-right: calc(${ rule.value } * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`;\n\t\t\t\t} else if ( rule.key === 'paddingLeft' ) {\n\t\t\t\t\toutput += `\n\t\t\t\t\t${ appendSelectors( selector, '> .alignfull' ) } {\n\t\t\t\t\t\tmargin-left: calc(${ rule.value } * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`;\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Output blockGap styles based on rules contained in layout definitions in theme.json.\n\t\tif ( hasBlockGapSupport && blockGapValue ) {\n\t\t\toutput += getBlockGapCSS(\n\t\t\t\tselector,\n\t\t\t\tlayoutDefinitions,\n\t\t\t\t'constrained',\n\t\t\t\tblockGapValue\n\t\t\t);\n\t\t}\n\t\treturn output;\n\t},\n\tgetOrientation() {\n\t\treturn 'vertical';\n\t},\n\tgetAlignments( layout ) {\n\t\tconst alignmentInfo = getAlignmentsInfo( layout );\n\t\tif ( layout.alignments !== undefined ) {\n\t\t\tif ( ! layout.alignments.includes( 'none' ) ) {\n\t\t\t\tlayout.alignments.unshift( 'none' );\n\t\t\t}\n\t\t\treturn layout.alignments.map( ( alignment ) => ( {\n\t\t\t\tname: alignment,\n\t\t\t\tinfo: alignmentInfo[ alignment ],\n\t\t\t} ) );\n\t\t}\n\t\tconst { contentSize, wideSize } = layout;\n\n\t\tconst alignments = [\n\t\t\t{ name: 'left' },\n\t\t\t{ name: 'center' },\n\t\t\t{ name: 'right' },\n\t\t];\n\n\t\tif ( contentSize ) {\n\t\t\talignments.unshift( { name: 'full' } );\n\t\t}\n\n\t\tif ( wideSize ) {\n\t\t\talignments.unshift( { name: 'wide', info: alignmentInfo.wide } );\n\t\t}\n\n\t\talignments.unshift( { name: 'none', info: alignmentInfo.none } );\n\n\t\treturn alignments;\n\t},\n};\n\nconst POPOVER_PROPS = {\n\tplacement: 'bottom-start',\n};\n\nfunction DefaultLayoutJustifyContentControl( { layout, onChange } ) {\n\tconst { justifyContent = 'center' } = layout;\n\tconst onJustificationChange = ( value ) => {\n\t\tonChange( {\n\t\t\t...layout,\n\t\t\tjustifyContent: value,\n\t\t} );\n\t};\n\tconst allowedControls = [ 'left', 'center', 'right' ];\n\n\treturn (\n\t\t<JustifyContentControl\n\t\t\tallowedControls={ allowedControls }\n\t\t\tvalue={ justifyContent }\n\t\t\tonChange={ onJustificationChange }\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,4BAA4B,IAAIC,cAAc,EAC9CC,yBAAyB,IAAIC,WAAW,EACxCC,gCAAgC,IAAIC,kBAAkB,EACtDC,0CAA0C,IAAIC,4BAA4B,QACpE,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,IAAI,EACJC,cAAc,EACdC,WAAW,EACXC,WAAW,EACXC,aAAa,EACbC,YAAY,QACN,kBAAkB;AACzB,SAASC,WAAW,QAAQ,yBAAyB;;AAErD;AACA;AACA;AACA,SAASC,WAAW,QAAQ,4BAA4B;AACxD,SAASC,eAAe,EAAEC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MACT,GAAGD,MAAM;MACTK,cAAc,EAAEI;IACjB,CAAE,CAAC;EACJ,CAAC;EACD,MAAMkD,eAAe,GAAG,CAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAE;EAErD,oBACCpE,IAAA,CAACJ,qBAAqB;IACrBwE,eAAe,EAAGA,eAAiB;IACnClD,KAAK,EAAGJ,cAAgB;IACxBJ,QAAQ,EAAGO,qBAAuB;IAClCoD,YAAY,EAAGH;EAAe,CAC9B,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -12,7 +12,6 @@ import { appendSelectors, getBlockGapCSS } from './utils';
|
|
|
12
12
|
import { getGapCSSValue } from '../hooks/gap';
|
|
13
13
|
import { shouldSkipSerialization } from '../hooks/utils';
|
|
14
14
|
import { LAYOUT_DEFINITIONS } from './definitions';
|
|
15
|
-
import { GridVisualizer, useGridLayoutSync } from '../components/grid';
|
|
16
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
16
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -70,30 +69,27 @@ export default {
|
|
|
70
69
|
const {
|
|
71
70
|
allowSizingOnChildren = false
|
|
72
71
|
} = layoutBlockSupport;
|
|
72
|
+
|
|
73
|
+
// In the experiment we want to also show column control in Auto mode, and
|
|
74
|
+
// the minimum width control in Manual mode.
|
|
75
|
+
const showColumnsControl = window.__experimentalEnableGridInteractivity || layout?.columnCount;
|
|
76
|
+
const showMinWidthControl = window.__experimentalEnableGridInteractivity || !layout?.columnCount;
|
|
73
77
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
74
78
|
children: [/*#__PURE__*/_jsx(GridLayoutTypeControl, {
|
|
75
79
|
layout: layout,
|
|
76
80
|
onChange: onChange
|
|
77
|
-
}),
|
|
81
|
+
}), showColumnsControl && /*#__PURE__*/_jsx(GridLayoutColumnsAndRowsControl, {
|
|
78
82
|
layout: layout,
|
|
79
83
|
onChange: onChange,
|
|
80
84
|
allowSizingOnChildren: allowSizingOnChildren
|
|
81
|
-
})
|
|
85
|
+
}), showMinWidthControl && /*#__PURE__*/_jsx(GridLayoutMinimumWidthControl, {
|
|
82
86
|
layout: layout,
|
|
83
87
|
onChange: onChange
|
|
84
88
|
})]
|
|
85
89
|
});
|
|
86
90
|
},
|
|
87
|
-
toolBarControls: function GridLayoutToolbarControls({
|
|
88
|
-
|
|
89
|
-
}) {
|
|
90
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
91
|
-
children: [window.__experimentalEnableGridInteractivity && /*#__PURE__*/_jsx(GridLayoutSync, {
|
|
92
|
-
clientId: clientId
|
|
93
|
-
}), /*#__PURE__*/_jsx(GridVisualizer, {
|
|
94
|
-
clientId: clientId
|
|
95
|
-
})]
|
|
96
|
-
});
|
|
91
|
+
toolBarControls: function GridLayoutToolbarControls() {
|
|
92
|
+
return null;
|
|
97
93
|
},
|
|
98
94
|
getLayoutStyle: function getLayoutStyle({
|
|
99
95
|
selector,
|
|
@@ -104,23 +100,43 @@ export default {
|
|
|
104
100
|
layoutDefinitions = LAYOUT_DEFINITIONS
|
|
105
101
|
}) {
|
|
106
102
|
const {
|
|
107
|
-
minimumColumnWidth =
|
|
103
|
+
minimumColumnWidth = null,
|
|
108
104
|
columnCount = null,
|
|
109
105
|
rowCount = null
|
|
110
106
|
} = layout;
|
|
111
107
|
|
|
108
|
+
// Check that the grid layout attributes are of the correct type, so that we don't accidentally
|
|
109
|
+
// write code that stores a string attribute instead of a number.
|
|
110
|
+
if (process.env.NODE_ENV === 'development') {
|
|
111
|
+
if (minimumColumnWidth && typeof minimumColumnWidth !== 'string') {
|
|
112
|
+
throw new Error('minimumColumnWidth must be a string');
|
|
113
|
+
}
|
|
114
|
+
if (columnCount && typeof columnCount !== 'number') {
|
|
115
|
+
throw new Error('columnCount must be a number');
|
|
116
|
+
}
|
|
117
|
+
if (rowCount && typeof rowCount !== 'number') {
|
|
118
|
+
throw new Error('rowCount must be a number');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
112
122
|
// If a block's block.json skips serialization for spacing or spacing.blockGap,
|
|
113
123
|
// don't apply the user-defined value to the styles.
|
|
114
124
|
const blockGapValue = style?.spacing?.blockGap && !shouldSkipSerialization(blockName, 'spacing', 'blockGap') ? getGapCSSValue(style?.spacing?.blockGap, '0.5em') : undefined;
|
|
115
125
|
let output = '';
|
|
116
126
|
const rules = [];
|
|
117
|
-
if (columnCount) {
|
|
127
|
+
if (minimumColumnWidth && columnCount > 0) {
|
|
128
|
+
const maxValue = `max(${minimumColumnWidth}, ( 100% - (${blockGapValue || '1.2rem'}*${columnCount - 1}) ) / ${columnCount})`;
|
|
129
|
+
rules.push(`grid-template-columns: repeat(auto-fill, minmax(${maxValue}, 1fr))`, `container-type: inline-size`);
|
|
130
|
+
if (rowCount) {
|
|
131
|
+
rules.push(`grid-template-rows: repeat(${rowCount}, minmax(1rem, auto))`);
|
|
132
|
+
}
|
|
133
|
+
} else if (columnCount) {
|
|
118
134
|
rules.push(`grid-template-columns: repeat(${columnCount}, minmax(0, 1fr))`);
|
|
119
135
|
if (rowCount) {
|
|
120
|
-
rules.push(`grid-template-rows: repeat(${rowCount}, minmax(
|
|
136
|
+
rules.push(`grid-template-rows: repeat(${rowCount}, minmax(1rem, auto))`);
|
|
121
137
|
}
|
|
122
|
-
} else
|
|
123
|
-
rules.push(`grid-template-columns: repeat(auto-fill, minmax(min(${minimumColumnWidth}, 100%), 1fr))`, 'container-type: inline-size');
|
|
138
|
+
} else {
|
|
139
|
+
rules.push(`grid-template-columns: repeat(auto-fill, minmax(min(${minimumColumnWidth || '12rem'}, 100%), 1fr))`, 'container-type: inline-size');
|
|
124
140
|
}
|
|
125
141
|
if (rules.length) {
|
|
126
142
|
// Reason to disable: the extra line breaks added by prettier mess with the unit tests.
|
|
@@ -148,9 +164,13 @@ function GridLayoutMinimumWidthControl({
|
|
|
148
164
|
onChange
|
|
149
165
|
}) {
|
|
150
166
|
const {
|
|
151
|
-
minimumColumnWidth
|
|
167
|
+
minimumColumnWidth,
|
|
168
|
+
columnCount,
|
|
169
|
+
isManualPlacement
|
|
152
170
|
} = layout;
|
|
153
|
-
const
|
|
171
|
+
const defaultValue = isManualPlacement || columnCount ? null : '12rem';
|
|
172
|
+
const value = minimumColumnWidth || defaultValue;
|
|
173
|
+
const [quantity, unit = 'rem'] = parseQuantityAndUnitFromRawValue(value);
|
|
154
174
|
const handleSliderChange = next => {
|
|
155
175
|
onChange({
|
|
156
176
|
...layout,
|
|
@@ -188,7 +208,7 @@ function GridLayoutMinimumWidthControl({
|
|
|
188
208
|
onChange: newValue => {
|
|
189
209
|
onChange({
|
|
190
210
|
...layout,
|
|
191
|
-
minimumColumnWidth: newValue
|
|
211
|
+
minimumColumnWidth: newValue === '' ? undefined : newValue
|
|
192
212
|
});
|
|
193
213
|
},
|
|
194
214
|
onUnitChange: handleUnitChange,
|
|
@@ -202,7 +222,7 @@ function GridLayoutMinimumWidthControl({
|
|
|
202
222
|
isBlock: true,
|
|
203
223
|
children: /*#__PURE__*/_jsx(RangeControl, {
|
|
204
224
|
onChange: handleSliderChange,
|
|
205
|
-
value: quantity,
|
|
225
|
+
value: quantity || 0,
|
|
206
226
|
min: 0,
|
|
207
227
|
max: RANGE_CONTROL_MAX_VALUES[unit] || 600,
|
|
208
228
|
withInputField: false,
|
|
@@ -220,61 +240,76 @@ function GridLayoutColumnsAndRowsControl({
|
|
|
220
240
|
onChange,
|
|
221
241
|
allowSizingOnChildren
|
|
222
242
|
}) {
|
|
243
|
+
// If the grid interactivity experiment is enabled, allow unsetting the column count.
|
|
244
|
+
const defaultColumnCount = window.__experimentalEnableGridInteractivity ? undefined : 3;
|
|
223
245
|
const {
|
|
224
|
-
columnCount =
|
|
225
|
-
rowCount
|
|
246
|
+
columnCount = defaultColumnCount,
|
|
247
|
+
rowCount,
|
|
248
|
+
isManualPlacement
|
|
226
249
|
} = layout;
|
|
227
250
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
228
|
-
children: /*#__PURE__*/
|
|
229
|
-
children: /*#__PURE__*/
|
|
251
|
+
children: /*#__PURE__*/_jsxs("fieldset", {
|
|
252
|
+
children: [(!window.__experimentalEnableGridInteractivity || !isManualPlacement) && /*#__PURE__*/_jsx(BaseControl.VisualLabel, {
|
|
253
|
+
as: "legend",
|
|
254
|
+
children: __('Columns')
|
|
255
|
+
}), /*#__PURE__*/_jsxs(Flex, {
|
|
230
256
|
gap: 4,
|
|
231
257
|
children: [/*#__PURE__*/_jsx(FlexItem, {
|
|
232
258
|
isBlock: true,
|
|
233
259
|
children: /*#__PURE__*/_jsx(NumberControl, {
|
|
234
260
|
size: "__unstable-large",
|
|
235
261
|
onChange: value => {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
262
|
+
if (window.__experimentalEnableGridInteractivity) {
|
|
263
|
+
// Allow unsetting the column count when in auto mode.
|
|
264
|
+
const defaultNewColumnCount = isManualPlacement ? 1 : undefined;
|
|
265
|
+
const newColumnCount = value === '' ? defaultNewColumnCount : parseInt(value, 10);
|
|
266
|
+
onChange({
|
|
267
|
+
...layout,
|
|
268
|
+
columnCount: newColumnCount
|
|
269
|
+
});
|
|
270
|
+
} else {
|
|
271
|
+
// Don't allow unsetting the column count.
|
|
272
|
+
const newColumnCount = value === '' ? 1 : parseInt(value, 10);
|
|
273
|
+
onChange({
|
|
274
|
+
...layout,
|
|
275
|
+
columnCount: newColumnCount
|
|
276
|
+
});
|
|
277
|
+
}
|
|
245
278
|
},
|
|
246
279
|
value: columnCount,
|
|
247
|
-
min:
|
|
248
|
-
label: __('Columns')
|
|
280
|
+
min: 0,
|
|
281
|
+
label: __('Columns'),
|
|
282
|
+
hideLabelFromVision: !window.__experimentalEnableGridInteractivity || !isManualPlacement
|
|
249
283
|
})
|
|
250
284
|
}), /*#__PURE__*/_jsx(FlexItem, {
|
|
251
285
|
isBlock: true,
|
|
252
|
-
children: window.__experimentalEnableGridInteractivity && allowSizingOnChildren ? /*#__PURE__*/_jsx(NumberControl, {
|
|
286
|
+
children: window.__experimentalEnableGridInteractivity && allowSizingOnChildren && isManualPlacement ? /*#__PURE__*/_jsx(NumberControl, {
|
|
253
287
|
size: "__unstable-large",
|
|
254
288
|
onChange: value => {
|
|
289
|
+
// Don't allow unsetting the row count.
|
|
290
|
+
const newRowCount = value === '' ? 1 : parseInt(value, 10);
|
|
255
291
|
onChange({
|
|
256
292
|
...layout,
|
|
257
|
-
rowCount:
|
|
293
|
+
rowCount: newRowCount
|
|
258
294
|
});
|
|
259
295
|
},
|
|
260
296
|
value: rowCount,
|
|
261
|
-
min:
|
|
297
|
+
min: 0,
|
|
262
298
|
label: __('Rows')
|
|
263
299
|
}) : /*#__PURE__*/_jsx(RangeControl, {
|
|
264
|
-
value:
|
|
265
|
-
,
|
|
300
|
+
value: columnCount !== null && columnCount !== void 0 ? columnCount : 0,
|
|
266
301
|
onChange: value => onChange({
|
|
267
302
|
...layout,
|
|
268
303
|
columnCount: value
|
|
269
304
|
}),
|
|
270
|
-
min:
|
|
305
|
+
min: 0,
|
|
271
306
|
max: 16,
|
|
272
307
|
withInputField: false,
|
|
273
308
|
label: __('Columns'),
|
|
274
309
|
hideLabelFromVision: true
|
|
275
310
|
})
|
|
276
311
|
})]
|
|
277
|
-
})
|
|
312
|
+
})]
|
|
278
313
|
})
|
|
279
314
|
});
|
|
280
315
|
}
|
|
@@ -286,7 +321,9 @@ function GridLayoutTypeControl({
|
|
|
286
321
|
}) {
|
|
287
322
|
const {
|
|
288
323
|
columnCount,
|
|
289
|
-
|
|
324
|
+
rowCount,
|
|
325
|
+
minimumColumnWidth,
|
|
326
|
+
isManualPlacement
|
|
290
327
|
} = layout;
|
|
291
328
|
|
|
292
329
|
/**
|
|
@@ -294,27 +331,32 @@ function GridLayoutTypeControl({
|
|
|
294
331
|
* previous type so we can switch back without loss.
|
|
295
332
|
*/
|
|
296
333
|
const [tempColumnCount, setTempColumnCount] = useState(columnCount || 3);
|
|
334
|
+
const [tempRowCount, setTempRowCount] = useState(rowCount);
|
|
297
335
|
const [tempMinimumColumnWidth, setTempMinimumColumnWidth] = useState(minimumColumnWidth || '12rem');
|
|
298
|
-
const
|
|
336
|
+
const gridPlacement = isManualPlacement || !!columnCount && !window.__experimentalEnableGridInteractivity ? 'manual' : 'auto';
|
|
299
337
|
const onChangeType = value => {
|
|
300
338
|
if (value === 'manual') {
|
|
301
339
|
setTempMinimumColumnWidth(minimumColumnWidth || '12rem');
|
|
302
340
|
} else {
|
|
303
341
|
setTempColumnCount(columnCount || 3);
|
|
342
|
+
setTempRowCount(rowCount);
|
|
304
343
|
}
|
|
305
344
|
onChange({
|
|
306
345
|
...layout,
|
|
307
346
|
columnCount: value === 'manual' ? tempColumnCount : null,
|
|
347
|
+
rowCount: value === 'manual' && window.__experimentalEnableGridInteractivity ? tempRowCount : undefined,
|
|
348
|
+
isManualPlacement: value === 'manual' && window.__experimentalEnableGridInteractivity ? true : undefined,
|
|
308
349
|
minimumColumnWidth: value === 'auto' ? tempMinimumColumnWidth : null
|
|
309
350
|
});
|
|
310
351
|
};
|
|
352
|
+
const helpText = gridPlacement === 'manual' ? __('Grid items can be manually placed in any position on the grid.') : __('Grid items are placed automatically depending on their order.');
|
|
311
353
|
return /*#__PURE__*/_jsxs(ToggleGroupControl, {
|
|
312
354
|
__nextHasNoMarginBottom: true,
|
|
313
355
|
label: __('Grid item position'),
|
|
314
|
-
value:
|
|
356
|
+
value: gridPlacement,
|
|
315
357
|
onChange: onChangeType,
|
|
316
358
|
isBlock: true,
|
|
317
|
-
help:
|
|
359
|
+
help: window.__experimentalEnableGridInteractivity ? helpText : undefined,
|
|
318
360
|
children: [/*#__PURE__*/_jsx(ToggleGroupControlOption, {
|
|
319
361
|
value: "auto",
|
|
320
362
|
label: __('Auto')
|
|
@@ -324,7 +366,4 @@ function GridLayoutTypeControl({
|
|
|
324
366
|
}, "manual")]
|
|
325
367
|
});
|
|
326
368
|
}
|
|
327
|
-
function GridLayoutSync(props) {
|
|
328
|
-
useGridLayoutSync(props);
|
|
329
|
-
}
|
|
330
369
|
//# sourceMappingURL=grid.js.map
|