@wordpress/block-editor 17.1.0 → 17.2.1-next.v.202609171837.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 +32 -0
- package/README.md +214 -214
- package/build/autocompleters/block.cjs.map +2 -2
- package/build/components/alignment-control/ui.cjs.map +2 -2
- package/build/components/background-image-control/index.cjs +1 -1
- package/build/components/background-image-control/index.cjs.map +2 -2
- package/build/components/block-alignment-control/ui.cjs +21 -7
- package/build/components/block-alignment-control/ui.cjs.map +3 -3
- package/build/components/block-alignment-control/use-available-alignments.cjs +60 -13
- package/build/components/block-alignment-control/use-available-alignments.cjs.map +2 -2
- package/build/components/block-allowed-blocks/allowed-blocks-control.cjs.map +2 -2
- package/build/components/block-bindings/attribute-control.cjs +30 -30
- package/build/components/block-bindings/attribute-control.cjs.map +3 -3
- package/build/components/block-bindings/source-fields-list.cjs +27 -32
- package/build/components/block-bindings/source-fields-list.cjs.map +3 -3
- package/build/components/block-canvas/index.cjs.map +2 -2
- package/build/components/block-card/index.cjs +1 -2
- package/build/components/block-card/index.cjs.map +3 -3
- package/build/components/block-edit/edit.cjs.map +2 -2
- package/build/components/block-heading-level-dropdown/index.cjs.map +2 -2
- package/build/components/block-icon/index.cjs.map +2 -2
- package/build/components/block-inspector/edit-contents.cjs.map +2 -2
- package/build/components/block-inspector/index.cjs +27 -8
- package/build/components/block-inspector/index.cjs.map +3 -3
- package/build/components/block-keyboard-shortcuts/index.cjs.map +2 -2
- package/build/components/block-list/block-html.cjs +1 -12
- package/build/components/block-list/block-html.cjs.map +3 -3
- package/build/components/block-list/block.cjs +2 -4
- package/build/components/block-list/block.cjs.map +2 -2
- package/build/components/block-list/layout.cjs +1 -1
- package/build/components/block-list/layout.cjs.map +2 -2
- package/build/components/block-list/use-block-props/index.cjs.map +2 -2
- package/build/components/block-lock/modal.cjs +1 -3
- package/build/components/block-lock/modal.cjs.map +2 -2
- package/build/components/block-parent-selector/index.cjs +8 -5
- package/build/components/block-parent-selector/index.cjs.map +2 -2
- package/build/components/block-popover/index.cjs.map +2 -2
- package/build/components/block-rename/modal.cjs.map +2 -2
- package/build/components/block-settings-menu/block-settings-dropdown.cjs.map +2 -2
- package/build/components/block-styles/utils.cjs.map +2 -2
- package/build/components/block-switcher/index.cjs.map +2 -2
- package/build/components/block-toolbar/edit-section-button.cjs.map +2 -2
- package/build/components/block-toolbar/index.cjs +6 -4
- package/build/components/block-toolbar/index.cjs.map +2 -2
- package/build/components/block-toolbar/switch-section-style.cjs.map +2 -2
- package/build/components/block-variation-transforms/index.cjs +28 -18
- package/build/components/block-variation-transforms/index.cjs.map +3 -3
- package/build/components/block-visibility/modal.cjs.map +2 -2
- package/build/components/block-visibility/viewport-visibility-info.cjs.map +2 -2
- package/build/components/border-radius-control/index.cjs.map +2 -2
- package/build/components/color-palette/with-color-context.cjs.map +2 -2
- package/build/components/colors/with-colors.cjs.map +2 -2
- package/build/components/colors-gradients/control.cjs.map +2 -2
- package/build/components/contrast-checker/index.cjs.map +2 -2
- package/build/components/date-format-picker/index.cjs.map +2 -2
- package/build/components/dimensions-tool/aspect-ratio-tool.cjs.map +3 -3
- package/build/components/dimensions-tool/width-height-tool.cjs.map +2 -2
- package/build/components/font-sizes/with-font-sizes.cjs.map +2 -2
- package/build/components/global-styles/background-panel.cjs +1 -1
- package/build/components/global-styles/background-panel.cjs.map +2 -2
- package/build/components/global-styles/border-panel.cjs +1 -1
- package/build/components/global-styles/border-panel.cjs.map +2 -2
- package/build/components/global-styles/color-gradient-dropdown-item.cjs +1 -1
- package/build/components/global-styles/color-gradient-dropdown-item.cjs.map +2 -2
- package/build/components/global-styles/color-panel.cjs +1 -1
- package/build/components/global-styles/color-panel.cjs.map +2 -2
- package/build/components/global-styles/dimensions-panel.cjs +1 -1
- package/build/components/global-styles/dimensions-panel.cjs.map +2 -2
- package/build/components/global-styles/filters-panel.cjs +1 -1
- package/build/components/global-styles/filters-panel.cjs.map +2 -2
- package/build/components/global-styles/hooks.cjs +1 -0
- package/build/components/global-styles/hooks.cjs.map +2 -2
- package/build/components/global-styles/inheritance/index.cjs +3 -3
- package/build/components/global-styles/inheritance/index.cjs.map +2 -2
- package/build/components/global-styles/inherited-value-context.cjs +0 -5
- package/build/components/global-styles/inherited-value-context.cjs.map +2 -2
- package/build/components/global-styles/state-control-badges.cjs +0 -1
- package/build/components/global-styles/state-control-badges.cjs.map +2 -2
- package/build/components/global-styles/state-control.cjs +6 -4
- package/build/components/global-styles/state-control.cjs.map +2 -2
- package/build/components/global-styles/text-shadow-panel.cjs +254 -0
- package/build/components/global-styles/text-shadow-panel.cjs.map +7 -0
- package/build/components/global-styles/typography-panel.cjs +46 -5
- package/build/components/global-styles/typography-panel.cjs.map +2 -2
- package/build/components/global-styles/typography-utils.cjs.map +2 -2
- package/build/components/global-styles/utils.cjs.map +2 -2
- package/build/components/html-element-control/index.cjs.map +3 -3
- package/build/components/iframe/index.cjs.map +2 -2
- package/build/components/iframe/use-scale-canvas.cjs.map +2 -2
- package/build/components/image-size-control/index.cjs.map +3 -3
- package/build/components/inner-blocks/index.cjs +6 -1
- package/build/components/inner-blocks/index.cjs.map +2 -2
- package/build/components/inner-content/index.cjs.map +2 -2
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.cjs +4 -23
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.cjs.map +2 -2
- package/build/components/inserter/block-patterns-tab/utils.cjs +26 -0
- package/build/components/inserter/block-patterns-tab/utils.cjs.map +2 -2
- package/build/components/inserter/hooks/use-block-types-state.cjs.map +2 -2
- package/build/components/inserter/hooks/use-insertion-point.cjs.map +2 -2
- package/build/components/inserter/hooks/use-patterns-state.cjs.map +2 -2
- package/build/components/inserter/media-tab/media-panel.cjs.map +2 -2
- package/build/components/inserter/media-tab/media-preview.cjs.map +2 -2
- package/build/components/inserter-list-item/index.cjs.map +2 -2
- package/build/components/inspector-controls/list-view-content-popover.cjs.map +2 -2
- package/build/components/link-control/search-results.cjs.map +2 -2
- package/build/components/link-control/use-search-handler.cjs +3 -0
- package/build/components/link-control/use-search-handler.cjs.map +2 -2
- package/build/components/list-view/branch.cjs.map +2 -2
- package/build/components/list-view/drop-indicator.cjs.map +2 -2
- package/build/components/list-view/index.cjs.map +2 -2
- package/build/components/list-view/use-list-view-drop-zone.cjs.map +2 -2
- package/build/components/list-view/utils.cjs.map +2 -2
- package/build/components/media-replace-flow/index.cjs +4 -1
- package/build/components/media-replace-flow/index.cjs.map +2 -2
- package/build/components/plain-text/index.cjs +1 -2
- package/build/components/plain-text/index.cjs.map +3 -3
- package/build/components/preset-input-control/index.cjs.map +2 -2
- package/build/components/provider/index.cjs +3 -1
- package/build/components/provider/index.cjs.map +2 -2
- package/build/components/provider/use-block-sync.cjs.map +2 -2
- package/build/components/publish-date-time-picker/index.cjs.map +2 -2
- package/build/components/resizable-box-popover/index.cjs +1 -1
- package/build/components/resizable-box-popover/index.cjs.map +1 -1
- package/build/components/resolution-tool/index.cjs.map +3 -3
- package/build/components/rich-text/event-listeners/enter.cjs +8 -22
- package/build/components/rich-text/event-listeners/enter.cjs.map +2 -2
- package/build/components/rich-text/format-edit.cjs.map +2 -2
- package/build/components/rich-text/index.cjs +20 -0
- package/build/components/rich-text/index.cjs.map +2 -2
- package/build/components/rich-text/multiline.cjs +10 -2
- package/build/components/rich-text/multiline.cjs.map +2 -2
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.cjs.map +2 -2
- package/build/components/typewriter/index.cjs.map +2 -2
- package/build/components/use-block-commands/index.cjs.map +2 -2
- package/build/components/writing-flow/index.cjs +3 -0
- package/build/components/writing-flow/index.cjs.map +2 -2
- package/build/components/writing-flow/use-clipboard-handler.cjs.map +2 -2
- package/build/components/writing-flow/use-selection-observer.cjs +5 -3
- package/build/components/writing-flow/use-selection-observer.cjs.map +2 -2
- package/build/hooks/align.cjs +3 -5
- package/build/hooks/align.cjs.map +2 -2
- package/build/hooks/background.cjs.map +2 -2
- package/build/hooks/block-bindings.cjs.map +2 -2
- package/build/hooks/border.cjs.map +2 -2
- package/build/hooks/contrast-checker.cjs.map +2 -2
- package/build/hooks/dimensions.cjs.map +2 -2
- package/build/hooks/duotone.cjs.map +2 -2
- package/build/hooks/elements.cjs.map +2 -2
- package/build/hooks/fit-text.cjs.map +2 -2
- package/build/hooks/gap.cjs +2 -1
- package/build/hooks/gap.cjs.map +3 -3
- package/build/hooks/index.cjs +4 -2
- package/build/hooks/index.cjs.map +3 -3
- package/build/hooks/layout-child.cjs.map +2 -2
- package/build/hooks/layout.cjs +15 -14
- package/build/hooks/layout.cjs.map +3 -3
- package/build/hooks/position.cjs +3 -31
- package/build/hooks/position.cjs.map +2 -2
- package/build/hooks/states.cjs +3 -2
- package/build/hooks/states.cjs.map +2 -2
- package/build/hooks/text-shadow.cjs +100 -0
- package/build/hooks/text-shadow.cjs.map +7 -0
- package/build/hooks/typography.cjs +30 -6
- package/build/hooks/typography.cjs.map +2 -2
- package/build/hooks/utils.cjs +24 -2
- package/build/hooks/utils.cjs.map +2 -2
- package/build/layouts/grid.cjs.map +2 -2
- package/build/layouts/utils.cjs +7 -2
- package/build/layouts/utils.cjs.map +2 -2
- package/build/private-apis.cjs +9 -6
- package/build/private-apis.cjs.map +2 -2
- package/build/store/actions.cjs +26 -4
- package/build/store/actions.cjs.map +3 -3
- package/build/store/private-selectors.cjs.map +2 -2
- package/build/store/reducer.cjs.map +2 -2
- package/build/store/selectors.cjs.map +2 -2
- package/build/utils/get-font-styles-and-weights.cjs.map +2 -2
- package/build/utils/transform-styles/index.cjs.map +1 -1
- package/build-module/autocompleters/block.mjs.map +2 -2
- package/build-module/components/alignment-control/ui.mjs.map +2 -2
- package/build-module/components/background-image-control/index.mjs +2 -2
- package/build-module/components/background-image-control/index.mjs.map +2 -2
- package/build-module/components/block-alignment-control/ui.mjs +21 -7
- package/build-module/components/block-alignment-control/ui.mjs.map +2 -2
- package/build-module/components/block-alignment-control/use-available-alignments.mjs +56 -13
- package/build-module/components/block-alignment-control/use-available-alignments.mjs.map +2 -2
- package/build-module/components/block-allowed-blocks/allowed-blocks-control.mjs.map +2 -2
- package/build-module/components/block-bindings/attribute-control.mjs +31 -32
- package/build-module/components/block-bindings/attribute-control.mjs.map +2 -2
- package/build-module/components/block-bindings/source-fields-list.mjs +25 -30
- package/build-module/components/block-bindings/source-fields-list.mjs.map +2 -2
- package/build-module/components/block-canvas/index.mjs.map +2 -2
- package/build-module/components/block-card/index.mjs +3 -8
- package/build-module/components/block-card/index.mjs.map +2 -2
- package/build-module/components/block-edit/edit.mjs.map +2 -2
- package/build-module/components/block-heading-level-dropdown/index.mjs.map +2 -2
- package/build-module/components/block-icon/index.mjs.map +2 -2
- package/build-module/components/block-inspector/edit-contents.mjs.map +2 -2
- package/build-module/components/block-inspector/index.mjs +29 -10
- package/build-module/components/block-inspector/index.mjs.map +2 -2
- package/build-module/components/block-keyboard-shortcuts/index.mjs.map +2 -2
- package/build-module/components/block-list/block-html.mjs +1 -2
- package/build-module/components/block-list/block-html.mjs.map +2 -2
- package/build-module/components/block-list/block.mjs +2 -4
- package/build-module/components/block-list/block.mjs.map +2 -2
- package/build-module/components/block-list/layout.mjs +1 -1
- package/build-module/components/block-list/layout.mjs.map +2 -2
- package/build-module/components/block-list/use-block-props/index.mjs.map +2 -2
- package/build-module/components/block-lock/modal.mjs +1 -3
- package/build-module/components/block-lock/modal.mjs.map +2 -2
- package/build-module/components/block-parent-selector/index.mjs +8 -5
- package/build-module/components/block-parent-selector/index.mjs.map +2 -2
- package/build-module/components/block-popover/index.mjs.map +2 -2
- package/build-module/components/block-rename/modal.mjs.map +2 -2
- package/build-module/components/block-settings-menu/block-settings-dropdown.mjs.map +2 -2
- package/build-module/components/block-styles/utils.mjs.map +2 -2
- package/build-module/components/block-switcher/index.mjs.map +2 -2
- package/build-module/components/block-toolbar/edit-section-button.mjs.map +2 -2
- package/build-module/components/block-toolbar/index.mjs +6 -4
- package/build-module/components/block-toolbar/index.mjs.map +2 -2
- package/build-module/components/block-toolbar/switch-section-style.mjs.map +2 -2
- package/build-module/components/block-variation-transforms/index.mjs +30 -21
- package/build-module/components/block-variation-transforms/index.mjs.map +2 -2
- package/build-module/components/block-visibility/modal.mjs.map +2 -2
- package/build-module/components/block-visibility/viewport-visibility-info.mjs.map +2 -2
- package/build-module/components/border-radius-control/index.mjs.map +2 -2
- package/build-module/components/color-palette/with-color-context.mjs.map +2 -2
- package/build-module/components/colors/with-colors.mjs.map +2 -2
- package/build-module/components/colors-gradients/control.mjs.map +2 -2
- package/build-module/components/contrast-checker/index.mjs.map +2 -2
- package/build-module/components/date-format-picker/index.mjs.map +2 -2
- package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs +2 -2
- package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs.map +2 -2
- package/build-module/components/dimensions-tool/width-height-tool.mjs.map +2 -2
- package/build-module/components/font-sizes/with-font-sizes.mjs.map +2 -2
- package/build-module/components/global-styles/background-panel.mjs +2 -2
- package/build-module/components/global-styles/background-panel.mjs.map +2 -2
- package/build-module/components/global-styles/border-panel.mjs +2 -2
- package/build-module/components/global-styles/border-panel.mjs.map +2 -2
- package/build-module/components/global-styles/color-gradient-dropdown-item.mjs +2 -2
- package/build-module/components/global-styles/color-gradient-dropdown-item.mjs.map +2 -2
- package/build-module/components/global-styles/color-panel.mjs +2 -2
- package/build-module/components/global-styles/color-panel.mjs.map +2 -2
- package/build-module/components/global-styles/dimensions-panel.mjs +2 -2
- package/build-module/components/global-styles/dimensions-panel.mjs.map +2 -2
- package/build-module/components/global-styles/filters-panel.mjs +2 -2
- package/build-module/components/global-styles/filters-panel.mjs.map +2 -2
- package/build-module/components/global-styles/hooks.mjs +1 -0
- package/build-module/components/global-styles/hooks.mjs.map +2 -2
- package/build-module/components/global-styles/inheritance/index.mjs +2 -2
- package/build-module/components/global-styles/inheritance/index.mjs.map +2 -2
- package/build-module/components/global-styles/inherited-value-context.mjs +0 -5
- package/build-module/components/global-styles/inherited-value-context.mjs.map +2 -2
- package/build-module/components/global-styles/state-control-badges.mjs +0 -1
- package/build-module/components/global-styles/state-control-badges.mjs.map +2 -2
- package/build-module/components/global-styles/state-control.mjs +6 -4
- package/build-module/components/global-styles/state-control.mjs.map +2 -2
- package/build-module/components/global-styles/text-shadow-panel.mjs +224 -0
- package/build-module/components/global-styles/text-shadow-panel.mjs.map +7 -0
- package/build-module/components/global-styles/typography-panel.mjs +47 -6
- package/build-module/components/global-styles/typography-panel.mjs.map +2 -2
- package/build-module/components/global-styles/typography-utils.mjs.map +2 -2
- package/build-module/components/global-styles/utils.mjs.map +2 -2
- package/build-module/components/html-element-control/index.mjs +2 -2
- package/build-module/components/html-element-control/index.mjs.map +2 -2
- package/build-module/components/iframe/index.mjs.map +2 -2
- package/build-module/components/iframe/use-scale-canvas.mjs.map +2 -2
- package/build-module/components/image-size-control/index.mjs +2 -2
- package/build-module/components/image-size-control/index.mjs.map +2 -2
- package/build-module/components/inner-blocks/index.mjs +6 -1
- package/build-module/components/inner-blocks/index.mjs.map +2 -2
- package/build-module/components/inner-content/index.mjs.map +2 -2
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.mjs +6 -24
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.mjs.map +2 -2
- package/build-module/components/inserter/block-patterns-tab/utils.mjs +25 -0
- package/build-module/components/inserter/block-patterns-tab/utils.mjs.map +2 -2
- package/build-module/components/inserter/hooks/use-block-types-state.mjs.map +2 -2
- package/build-module/components/inserter/hooks/use-insertion-point.mjs.map +2 -2
- package/build-module/components/inserter/hooks/use-patterns-state.mjs.map +2 -2
- package/build-module/components/inserter/media-tab/media-panel.mjs.map +2 -2
- package/build-module/components/inserter/media-tab/media-preview.mjs.map +2 -2
- package/build-module/components/inserter-list-item/index.mjs.map +2 -2
- package/build-module/components/inspector-controls/list-view-content-popover.mjs.map +2 -2
- package/build-module/components/link-control/search-results.mjs.map +2 -2
- package/build-module/components/link-control/use-search-handler.mjs +3 -0
- package/build-module/components/link-control/use-search-handler.mjs.map +2 -2
- package/build-module/components/list-view/branch.mjs.map +2 -2
- package/build-module/components/list-view/drop-indicator.mjs.map +2 -2
- package/build-module/components/list-view/index.mjs.map +2 -2
- package/build-module/components/list-view/use-list-view-drop-zone.mjs.map +2 -2
- package/build-module/components/list-view/utils.mjs.map +2 -2
- package/build-module/components/media-replace-flow/index.mjs +4 -1
- package/build-module/components/media-replace-flow/index.mjs.map +2 -2
- package/build-module/components/plain-text/index.mjs +1 -2
- package/build-module/components/plain-text/index.mjs.map +2 -2
- package/build-module/components/preset-input-control/index.mjs.map +2 -2
- package/build-module/components/provider/index.mjs +3 -1
- package/build-module/components/provider/index.mjs.map +2 -2
- package/build-module/components/provider/use-block-sync.mjs.map +2 -2
- package/build-module/components/publish-date-time-picker/index.mjs.map +2 -2
- package/build-module/components/resizable-box-popover/index.mjs +1 -1
- package/build-module/components/resizable-box-popover/index.mjs.map +1 -1
- package/build-module/components/resolution-tool/index.mjs +2 -2
- package/build-module/components/resolution-tool/index.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/enter.mjs +8 -22
- package/build-module/components/rich-text/event-listeners/enter.mjs.map +2 -2
- package/build-module/components/rich-text/format-edit.mjs.map +2 -2
- package/build-module/components/rich-text/index.mjs +21 -0
- package/build-module/components/rich-text/index.mjs.map +2 -2
- package/build-module/components/rich-text/multiline.mjs +11 -3
- package/build-module/components/rich-text/multiline.mjs.map +2 -2
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.mjs.map +2 -2
- package/build-module/components/typewriter/index.mjs.map +2 -2
- package/build-module/components/use-block-commands/index.mjs.map +2 -2
- package/build-module/components/writing-flow/index.mjs +3 -0
- package/build-module/components/writing-flow/index.mjs.map +2 -2
- package/build-module/components/writing-flow/use-clipboard-handler.mjs.map +2 -2
- package/build-module/components/writing-flow/use-selection-observer.mjs +5 -3
- package/build-module/components/writing-flow/use-selection-observer.mjs.map +2 -2
- package/build-module/hooks/align.mjs +6 -6
- package/build-module/hooks/align.mjs.map +2 -2
- package/build-module/hooks/background.mjs.map +2 -2
- package/build-module/hooks/block-bindings.mjs.map +2 -2
- package/build-module/hooks/border.mjs.map +2 -2
- package/build-module/hooks/contrast-checker.mjs.map +2 -2
- package/build-module/hooks/dimensions.mjs.map +2 -2
- package/build-module/hooks/duotone.mjs.map +2 -2
- package/build-module/hooks/elements.mjs.map +2 -2
- package/build-module/hooks/fit-text.mjs.map +2 -2
- package/build-module/hooks/gap.mjs +2 -1
- package/build-module/hooks/gap.mjs.map +2 -2
- package/build-module/hooks/index.mjs +4 -2
- package/build-module/hooks/index.mjs.map +2 -2
- package/build-module/hooks/layout-child.mjs.map +2 -2
- package/build-module/hooks/layout.mjs +6 -5
- package/build-module/hooks/layout.mjs.map +2 -2
- package/build-module/hooks/position.mjs +5 -33
- package/build-module/hooks/position.mjs.map +2 -2
- package/build-module/hooks/states.mjs +3 -2
- package/build-module/hooks/states.mjs.map +2 -2
- package/build-module/hooks/text-shadow.mjs +65 -0
- package/build-module/hooks/text-shadow.mjs.map +7 -0
- package/build-module/hooks/typography.mjs +30 -6
- package/build-module/hooks/typography.mjs.map +2 -2
- package/build-module/hooks/utils.mjs +24 -2
- package/build-module/hooks/utils.mjs.map +2 -2
- package/build-module/layouts/grid.mjs.map +2 -2
- package/build-module/layouts/utils.mjs +5 -1
- package/build-module/layouts/utils.mjs.map +2 -2
- package/build-module/private-apis.mjs +6 -2
- package/build-module/private-apis.mjs.map +2 -2
- package/build-module/store/actions.mjs +28 -5
- package/build-module/store/actions.mjs.map +3 -3
- package/build-module/store/private-selectors.mjs.map +2 -2
- package/build-module/store/reducer.mjs.map +2 -2
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-module/utils/get-font-styles-and-weights.mjs.map +2 -2
- package/build-module/utils/transform-styles/index.mjs.map +1 -1
- package/build-style/content-rtl.css +7 -2
- package/build-style/content.css +7 -2
- package/build-style/style-rtl.css +90 -25
- package/build-style/style.css +92 -25
- package/package.json +42 -43
- package/src/autocompleters/block.jsx +4 -4
- package/src/components/alignment-control/ui.jsx +1 -1
- package/src/components/background-image-control/index.jsx +3 -3
- package/src/components/block-alignment-control/test/index.jsdom.test.jsx +267 -0
- package/src/components/block-alignment-control/ui.jsx +47 -9
- package/src/components/block-alignment-control/use-available-alignments.js +106 -20
- package/src/components/block-allowed-blocks/allowed-blocks-control.jsx +1 -1
- package/src/components/block-bindings/attribute-control.jsx +27 -29
- package/src/components/block-bindings/source-fields-list.jsx +22 -32
- package/src/components/block-bindings/test/attribute-control.jsdom.test.jsx +115 -0
- package/src/components/block-canvas/index.jsx +1 -1
- package/src/components/block-card/index.jsx +5 -11
- package/src/components/block-card/style.scss +1 -0
- package/src/components/block-edit/edit.jsx +1 -1
- package/src/components/block-heading-level-dropdown/index.jsx +1 -1
- package/src/components/block-icon/index.jsx +1 -1
- package/src/components/block-icon/test/index.browser.test.jsx +74 -0
- package/src/components/block-inspector/edit-contents.jsx +2 -2
- package/src/components/block-inspector/index.jsx +46 -15
- package/src/components/block-inspector/style.scss +16 -0
- package/src/components/block-keyboard-shortcuts/index.jsx +2 -2
- package/src/components/block-list/block-html.jsx +2 -3
- package/src/components/block-list/block.jsx +7 -5
- package/src/components/block-list/content.scss +3 -2
- package/src/components/block-list/layout.jsx +4 -1
- package/src/components/block-list/test/layout.jsdom.test.js +40 -0
- package/src/components/block-list/use-block-props/index.js +1 -1
- package/src/components/block-lock/modal.jsx +2 -3
- package/src/components/block-lock/style.scss +1 -1
- package/src/components/block-mover/style.scss +0 -13
- package/src/components/block-parent-selector/index.jsx +12 -6
- package/src/components/block-patterns-list/style.scss +1 -1
- package/src/components/block-popover/index.jsx +1 -1
- package/src/components/block-rename/modal.jsx +3 -3
- package/src/components/block-settings-menu/block-settings-dropdown.jsx +1 -1
- package/src/components/block-styles/utils.js +1 -1
- package/src/components/block-switcher/index.jsx +3 -3
- package/src/components/block-toolbar/edit-section-button.jsx +2 -2
- package/src/components/block-toolbar/index.jsx +8 -4
- package/src/components/block-toolbar/switch-section-style.jsx +1 -1
- package/src/components/block-variation-transforms/index.jsx +24 -23
- package/src/components/block-variation-transforms/test/index.jsdom.test.jsx +93 -0
- package/src/components/block-visibility/modal.jsx +7 -7
- package/src/components/block-visibility/style.scss +1 -1
- package/src/components/block-visibility/viewport-visibility-info.jsx +5 -7
- package/src/components/border-radius-control/index.jsx +2 -2
- package/src/components/border-radius-control/test/index.jsdom.test.jsx +0 -22
- package/src/components/border-radius-control/test/select.browser.test.js +30 -0
- package/src/components/color-palette/with-color-context.jsx +1 -1
- package/src/components/colors/with-colors.jsx +1 -1
- package/src/components/colors-gradients/control.jsx +2 -2
- package/src/components/colors-gradients/test/{control.jsdom.test.jsx → control.browser.test.jsx} +6 -9
- package/src/components/contrast-checker/index.jsx +2 -2
- package/src/components/date-format-picker/index.jsx +2 -2
- package/src/components/dimensions-tool/aspect-ratio-tool.jsx +4 -4
- package/src/components/dimensions-tool/test/index.jsdom.test.jsx +17 -11
- package/src/components/dimensions-tool/width-height-tool.jsx +2 -2
- package/src/components/font-sizes/with-font-sizes.jsx +2 -3
- package/src/components/global-styles/background-panel.jsx +2 -2
- package/src/components/global-styles/border-panel.jsx +2 -2
- package/src/components/global-styles/color-gradient-dropdown-item.jsx +3 -3
- package/src/components/global-styles/color-panel.jsx +3 -3
- package/src/components/global-styles/dimensions-panel.jsx +6 -6
- package/src/components/global-styles/filters-panel.jsx +2 -2
- package/src/components/global-styles/hooks.js +1 -0
- package/src/components/global-styles/inheritance/index.jsx +9 -6
- package/src/components/global-styles/inheritance/test/{index.jsdom.test.jsx → index.browser.test.jsx} +34 -28
- package/src/components/global-styles/inherited-value-context.js +1 -9
- package/src/components/global-styles/state-control-badges.jsx +0 -1
- package/src/components/global-styles/state-control.jsx +12 -3
- package/src/components/global-styles/style.scss +68 -0
- package/src/components/global-styles/test/{color-panel.jsdom.test.jsx → color-panel.browser.test.jsx} +53 -54
- package/src/components/global-styles/test/inherited-value-context-core.jsdom.test.js +17 -26
- package/src/components/global-styles/test/{typography-panel-core.jsdom.test.jsx → typography-panel-core.browser.test.jsx} +84 -39
- package/src/components/global-styles/test/{typography-panel.jsdom.test.jsx → typography-panel.browser.test.jsx} +80 -122
- package/src/components/global-styles/text-shadow-panel.tsx +257 -0
- package/src/components/global-styles/typography-panel.jsx +52 -13
- package/src/components/global-styles/typography-utils.js +2 -2
- package/src/components/global-styles/utils.js +1 -1
- package/src/components/html-element-control/index.jsx +2 -2
- package/src/components/iframe/index.jsx +1 -1
- package/src/components/iframe/use-scale-canvas.js +1 -1
- package/src/components/image-size-control/index.jsx +2 -2
- package/src/components/inner-blocks/index.jsx +9 -1
- package/src/components/inner-content/index.jsx +1 -1
- package/src/components/inserter/block-patterns-tab/use-pattern-categories.js +7 -33
- package/src/components/inserter/block-patterns-tab/utils.js +44 -0
- package/src/components/inserter/hooks/use-block-types-state.js +2 -2
- package/src/components/inserter/hooks/use-insertion-point.js +1 -1
- package/src/components/inserter/hooks/use-patterns-state.js +1 -1
- package/src/components/inserter/media-tab/media-panel.jsx +9 -9
- package/src/components/inserter/media-tab/media-preview.jsx +1 -1
- package/src/components/inserter-list-item/index.jsx +1 -1
- package/src/components/inserter-list-item/style.scss +2 -2
- package/src/components/inspector-controls/list-view-content-popover.jsx +1 -1
- package/src/components/link-control/search-results.jsx +1 -1
- package/src/components/link-control/style.scss +1 -1
- package/src/components/link-control/test/index.jsdom.test.jsx +38 -110
- package/src/components/link-control/test/keyboard-selection.browser.test.js +110 -0
- package/src/components/link-control/use-search-handler.js +8 -3
- package/src/components/list-view/branch.jsx +1 -1
- package/src/components/list-view/drop-indicator.jsx +3 -3
- package/src/components/list-view/index.jsx +1 -1
- package/src/components/list-view/style.scss +1 -9
- package/src/components/list-view/use-list-view-drop-zone.js +1 -1
- package/src/components/list-view/utils.js +1 -1
- package/src/components/media-replace-flow/index.jsx +4 -1
- package/src/components/navigable-toolbar/test/index.browser.test.js +6 -7
- package/src/components/plain-text/README.md +3 -2
- package/src/components/plain-text/content.scss +0 -1
- package/src/components/plain-text/index.jsx +2 -3
- package/src/components/plain-text/style.scss +4 -0
- package/src/components/preset-input-control/index.jsx +2 -2
- package/src/components/preset-input-control/test/index.jsdom.test.jsx +0 -56
- package/src/components/preset-input-control/test/interaction.browser.test.js +63 -0
- package/src/components/provider/index.jsx +5 -3
- package/src/components/provider/use-block-sync.js +5 -5
- package/src/components/publish-date-time-picker/index.jsx +1 -1
- package/src/components/resizable-box-popover/index.jsx +1 -1
- package/src/components/resolution-tool/index.jsx +2 -2
- package/src/components/responsive-block-control/style.scss +1 -2
- package/src/components/responsive-block-control/test/index.jsdom.test.jsx +2 -2
- package/src/components/rich-text/event-listeners/enter.js +16 -23
- package/src/components/rich-text/format-edit.jsx +1 -1
- package/src/components/rich-text/index.jsx +39 -2
- package/src/components/rich-text/multiline.jsx +11 -3
- package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -1
- package/src/components/spacing-sizes-control/test/index.jsdom.test.jsx +0 -21
- package/src/components/spacing-sizes-control/test/select.browser.test.js +58 -0
- package/src/components/typewriter/index.jsx +1 -1
- package/src/components/url-input/test/fixtures/validated-input-control-deprecation.js +1 -1
- package/src/components/use-block-commands/index.js +1 -1
- package/src/components/use-block-drop-zone/test/index.js +2 -2
- package/src/components/writing-flow/index.jsx +8 -0
- package/src/components/writing-flow/use-clipboard-handler.js +1 -1
- package/src/components/writing-flow/use-selection-observer.js +15 -6
- package/src/content.scss +1 -0
- package/src/hooks/align.jsx +22 -6
- package/src/hooks/background.jsx +1 -1
- package/src/hooks/block-bindings.jsx +1 -1
- package/src/hooks/block-hooks.scss +0 -6
- package/src/hooks/border.jsx +2 -2
- package/src/hooks/contrast-checker.js +1 -1
- package/src/hooks/dimensions.jsx +2 -2
- package/src/hooks/duotone.jsx +3 -3
- package/src/hooks/elements.jsx +3 -3
- package/src/hooks/fit-text.jsx +1 -1
- package/src/hooks/gap.js +2 -4
- package/src/hooks/index.js +3 -1
- package/src/hooks/layout-child.jsx +3 -4
- package/src/hooks/layout.jsx +17 -18
- package/src/hooks/position.jsx +5 -36
- package/src/hooks/states.jsx +6 -2
- package/src/hooks/test/layout.jsdom.test.js +44 -1
- package/src/hooks/text-shadow.ts +105 -0
- package/src/hooks/typography.jsx +58 -30
- package/src/hooks/utils.jsx +23 -1
- package/src/layouts/grid.jsx +2 -2
- package/src/layouts/test/flex.jsdom.test.jsx +4 -3
- package/src/layouts/test/utils.js +48 -1
- package/src/layouts/utils.js +19 -0
- package/src/private-apis.js +4 -0
- package/src/store/actions.js +50 -10
- package/src/store/private-selectors.js +5 -5
- package/src/store/reducer.js +6 -6
- package/src/store/selectors.js +3 -3
- package/src/store/test/actions.jsdom.test.js +60 -0
- package/src/style.scss +1 -0
- package/src/utils/get-font-styles-and-weights.ts +1 -1
- package/src/utils/transform-styles/index.ts +1 -1
- package/build/hooks/cross-origin-isolation.cjs +0 -56
- package/build/hooks/cross-origin-isolation.cjs.map +0 -7
- package/build-module/hooks/cross-origin-isolation.mjs +0 -54
- package/build-module/hooks/cross-origin-isolation.mjs.map +0 -7
- package/src/components/block-icon/test/__snapshots__/index.jsdom.test.jsx.snap +0 -27
- package/src/components/block-icon/test/index.jsdom.test.jsx +0 -67
- package/src/hooks/cross-origin-isolation.js +0 -73
- package/src/hooks/test/cross-origin-isolation.jsdom.test.js +0 -173
package/README.md
CHANGED
|
@@ -74,31 +74,31 @@ Unless you're [creating an editor](/docs/how-to-guides/platform/custom-block-edi
|
|
|
74
74
|
|
|
75
75
|
_Related_
|
|
76
76
|
|
|
77
|
-
-
|
|
77
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/alignment-control/README.md>
|
|
78
78
|
|
|
79
79
|
### AlignmentToolbar
|
|
80
80
|
|
|
81
81
|
_Related_
|
|
82
82
|
|
|
83
|
-
-
|
|
83
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/alignment-control/README.md>
|
|
84
84
|
|
|
85
85
|
### Autocomplete
|
|
86
86
|
|
|
87
87
|
_Related_
|
|
88
88
|
|
|
89
|
-
-
|
|
89
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/autocomplete/README.md>
|
|
90
90
|
|
|
91
91
|
### BlockAlignmentControl
|
|
92
92
|
|
|
93
93
|
_Related_
|
|
94
94
|
|
|
95
|
-
-
|
|
95
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-alignment-control/README.md>
|
|
96
96
|
|
|
97
97
|
### BlockAlignmentToolbar
|
|
98
98
|
|
|
99
99
|
_Related_
|
|
100
100
|
|
|
101
|
-
-
|
|
101
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-alignment-control/README.md>
|
|
102
102
|
|
|
103
103
|
### BlockBindingsAttributeControl
|
|
104
104
|
|
|
@@ -106,14 +106,14 @@ Renders a control for viewing and editing a block attribute binding.
|
|
|
106
106
|
|
|
107
107
|
_Parameters_
|
|
108
108
|
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
109
|
+
- _root0_ `Object`: Component props.
|
|
110
|
+
- _root0.attribute_ `string`: The block attribute name.
|
|
111
|
+
- _root0.binding_ `[Object]`: The current block binding.
|
|
112
|
+
- _root0.blockName_ `string`: The block type name.
|
|
113
113
|
|
|
114
114
|
_Returns_
|
|
115
115
|
|
|
116
|
-
-
|
|
116
|
+
- `Element`: The block attribute binding control.
|
|
117
117
|
|
|
118
118
|
### BlockBindingsSourceFieldsList
|
|
119
119
|
|
|
@@ -125,12 +125,12 @@ Block breadcrumb component, displaying the hierarchy of the current block select
|
|
|
125
125
|
|
|
126
126
|
_Parameters_
|
|
127
127
|
|
|
128
|
-
-
|
|
129
|
-
-
|
|
128
|
+
- _props_ `Object`: Component props.
|
|
129
|
+
- _props.rootLabelText_ `string`: Translated label for the root element of the breadcrumb trail.
|
|
130
130
|
|
|
131
131
|
_Returns_
|
|
132
132
|
|
|
133
|
-
-
|
|
133
|
+
- `Element`: Block Breadcrumb.
|
|
134
134
|
|
|
135
135
|
### BlockCanvas
|
|
136
136
|
|
|
@@ -155,14 +155,14 @@ function MyBlockEditor() {
|
|
|
155
155
|
|
|
156
156
|
_Parameters_
|
|
157
157
|
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
158
|
+
- _props_ `Object`: Component props.
|
|
159
|
+
- _props.height_ `string`: Canvas height, defaults to 300px.
|
|
160
|
+
- _props.styles_ `Array`: Content styles to inject into the iframe.
|
|
161
|
+
- _props.children_ `Element`: Content of the canvas, defaults to the BlockList component.
|
|
162
162
|
|
|
163
163
|
_Returns_
|
|
164
164
|
|
|
165
|
-
-
|
|
165
|
+
- `Element`: Block Breadcrumb.
|
|
166
166
|
|
|
167
167
|
### BlockColorsStyleSelector
|
|
168
168
|
|
|
@@ -174,11 +174,11 @@ Component which merges passed value with current consumed block context.
|
|
|
174
174
|
|
|
175
175
|
_Related_
|
|
176
176
|
|
|
177
|
-
-
|
|
177
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-context/README.md>
|
|
178
178
|
|
|
179
179
|
_Parameters_
|
|
180
180
|
|
|
181
|
-
-
|
|
181
|
+
- _props_ `BlockContextProviderProps`:
|
|
182
182
|
|
|
183
183
|
### BlockControls
|
|
184
184
|
|
|
@@ -204,13 +204,13 @@ Undocumented declaration.
|
|
|
204
204
|
|
|
205
205
|
_Related_
|
|
206
206
|
|
|
207
|
-
-
|
|
207
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-icon/README.md>
|
|
208
208
|
|
|
209
209
|
### BlockInspector
|
|
210
210
|
|
|
211
211
|
_Related_
|
|
212
212
|
|
|
213
|
-
-
|
|
213
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-inspector/README.md>
|
|
214
214
|
|
|
215
215
|
### BlockList
|
|
216
216
|
|
|
@@ -220,7 +220,7 @@ Undocumented declaration.
|
|
|
220
220
|
|
|
221
221
|
_Related_
|
|
222
222
|
|
|
223
|
-
-
|
|
223
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-mover/README.md>
|
|
224
224
|
|
|
225
225
|
### BlockNavigationDropdown
|
|
226
226
|
|
|
@@ -230,7 +230,7 @@ Undocumented declaration.
|
|
|
230
230
|
|
|
231
231
|
_Related_
|
|
232
232
|
|
|
233
|
-
-
|
|
233
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-popover/README.md>
|
|
234
234
|
|
|
235
235
|
### BlockPreview
|
|
236
236
|
|
|
@@ -238,17 +238,17 @@ BlockPreview renders a preview of a block or array of blocks.
|
|
|
238
238
|
|
|
239
239
|
_Related_
|
|
240
240
|
|
|
241
|
-
-
|
|
241
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-preview/README.md>
|
|
242
242
|
|
|
243
243
|
_Parameters_
|
|
244
244
|
|
|
245
|
-
-
|
|
246
|
-
-
|
|
247
|
-
-
|
|
245
|
+
- _preview_ `Object`: options for how the preview should be shown
|
|
246
|
+
- _preview.blocks_ `Array|Object`: A block instance (object) or an array of blocks to be previewed.
|
|
247
|
+
- _preview.viewportWidth_ `number`: Width of the preview container in pixels. Controls at what size the blocks will be rendered inside the preview. Default: 700.
|
|
248
248
|
|
|
249
249
|
_Returns_
|
|
250
250
|
|
|
251
|
-
-
|
|
251
|
+
- `Component`: The component to be rendered.
|
|
252
252
|
|
|
253
253
|
### BlockSelectionClearer
|
|
254
254
|
|
|
@@ -262,15 +262,15 @@ Undocumented declaration.
|
|
|
262
262
|
|
|
263
263
|
_Related_
|
|
264
264
|
|
|
265
|
-
-
|
|
265
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-settings-menu-controls/README.md>
|
|
266
266
|
|
|
267
267
|
_Parameters_
|
|
268
268
|
|
|
269
|
-
-
|
|
269
|
+
- _props_ `Object`: Fill props.
|
|
270
270
|
|
|
271
271
|
_Returns_
|
|
272
272
|
|
|
273
|
-
-
|
|
273
|
+
- `Element`: Element.
|
|
274
274
|
|
|
275
275
|
### BlockStyles
|
|
276
276
|
|
|
@@ -291,14 +291,14 @@ _Usage_
|
|
|
291
291
|
|
|
292
292
|
_Parameters_
|
|
293
293
|
|
|
294
|
-
-
|
|
295
|
-
-
|
|
296
|
-
-
|
|
297
|
-
-
|
|
294
|
+
- _props_ `Object`:
|
|
295
|
+
- _props.clientId_ `string`: Client ID of block.
|
|
296
|
+
- _props.maximumLength_ `number|undefined`: The maximum length that the block title string may be before truncated.
|
|
297
|
+
- _props.context_ `string|undefined`: The context to pass to `getBlockLabel`.
|
|
298
298
|
|
|
299
299
|
_Returns_
|
|
300
300
|
|
|
301
|
-
-
|
|
301
|
+
- `React.JSX.Element`: Block title.
|
|
302
302
|
|
|
303
303
|
### BlockToolbar
|
|
304
304
|
|
|
@@ -306,13 +306,13 @@ Renders the block toolbar.
|
|
|
306
306
|
|
|
307
307
|
_Related_
|
|
308
308
|
|
|
309
|
-
-
|
|
309
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-toolbar/README.md>
|
|
310
310
|
|
|
311
311
|
_Parameters_
|
|
312
312
|
|
|
313
|
-
-
|
|
314
|
-
-
|
|
315
|
-
-
|
|
313
|
+
- _props_ `Object`: Components props.
|
|
314
|
+
- _props.hideDragHandle_ `boolean`: Show or hide the Drag Handle for drag and drop functionality.
|
|
315
|
+
- _props.variant_ `string`: Style variant of the toolbar, also passed to the Dropdowns rendered from Block Toolbar Buttons.
|
|
316
316
|
|
|
317
317
|
### BlockTools
|
|
318
318
|
|
|
@@ -320,27 +320,27 @@ Renders block tools (the block toolbar, select/navigation mode toolbar, the inse
|
|
|
320
320
|
|
|
321
321
|
_Parameters_
|
|
322
322
|
|
|
323
|
-
-
|
|
324
|
-
-
|
|
325
|
-
-
|
|
323
|
+
- _$0_ `Object`: Props.
|
|
324
|
+
- _$0.children_ `Object`: The block content and style container.
|
|
325
|
+
- _$0.\_\_unstableContentRef_ `Object`: Ref holding the content scroll container.
|
|
326
326
|
|
|
327
327
|
### BlockVerticalAlignmentControl
|
|
328
328
|
|
|
329
329
|
_Related_
|
|
330
330
|
|
|
331
|
-
-
|
|
331
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-control/README.md>
|
|
332
332
|
|
|
333
333
|
### BlockVerticalAlignmentToolbar
|
|
334
334
|
|
|
335
335
|
_Related_
|
|
336
336
|
|
|
337
|
-
-
|
|
337
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-control/README.md>
|
|
338
338
|
|
|
339
339
|
### ButtonBlockAppender
|
|
340
340
|
|
|
341
341
|
_Related_
|
|
342
342
|
|
|
343
|
-
-
|
|
343
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/button-block-appender/README.md>
|
|
344
344
|
|
|
345
345
|
### ButtonBlockerAppender
|
|
346
346
|
|
|
@@ -360,7 +360,7 @@ Undocumented declaration.
|
|
|
360
360
|
|
|
361
361
|
_Related_
|
|
362
362
|
|
|
363
|
-
-
|
|
363
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/contrast-checker/README.md>
|
|
364
364
|
|
|
365
365
|
### CopyHandler
|
|
366
366
|
|
|
@@ -368,7 +368,7 @@ _Related_
|
|
|
368
368
|
|
|
369
369
|
_Parameters_
|
|
370
370
|
|
|
371
|
-
-
|
|
371
|
+
- _props_ `Object`:
|
|
372
372
|
|
|
373
373
|
### createCustomColorsHOC
|
|
374
374
|
|
|
@@ -393,11 +393,11 @@ export default compose(
|
|
|
393
393
|
|
|
394
394
|
_Parameters_
|
|
395
395
|
|
|
396
|
-
-
|
|
396
|
+
- _colorsArray_ `Array`: The array of color objects (name, slug, color, etc... ).
|
|
397
397
|
|
|
398
398
|
_Returns_
|
|
399
399
|
|
|
400
|
-
-
|
|
400
|
+
- `Function`: Higher-order component.
|
|
401
401
|
|
|
402
402
|
### DefaultBlockAppender
|
|
403
403
|
|
|
@@ -409,27 +409,27 @@ DimensionControl renders a linked unit control and range control for adjusting d
|
|
|
409
409
|
|
|
410
410
|
_Related_
|
|
411
411
|
|
|
412
|
-
-
|
|
412
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/dimension-control/README.md>
|
|
413
413
|
|
|
414
414
|
_Parameters_
|
|
415
415
|
|
|
416
|
-
-
|
|
417
|
-
-
|
|
418
|
-
-
|
|
419
|
-
-
|
|
420
|
-
-
|
|
421
|
-
-
|
|
422
|
-
-
|
|
416
|
+
- _props_ `Object`:
|
|
417
|
+
- _props.label_ `?string`: A label for the control.
|
|
418
|
+
- _props.onChange_ `( value: string ) => void`: Called when the dimension value changes.
|
|
419
|
+
- _props.value_ `string`: The current dimension value.
|
|
420
|
+
- _props.placeholder_ `?string`: Placeholder text for the custom-value input.
|
|
421
|
+
- _props.className_ `?string`: Additional CSS class on the wrapping fieldset.
|
|
422
|
+
- _props.dimensionSizes_ `?Object`: Optional dimension size presets. Falls back to settings from the store.
|
|
423
423
|
|
|
424
424
|
_Returns_
|
|
425
425
|
|
|
426
|
-
-
|
|
426
|
+
- `Component`: The component to be rendered.
|
|
427
427
|
|
|
428
428
|
### FontSizePicker
|
|
429
429
|
|
|
430
430
|
_Related_
|
|
431
431
|
|
|
432
|
-
-
|
|
432
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/font-sizes/README.md>
|
|
433
433
|
|
|
434
434
|
### getColorClassName
|
|
435
435
|
|
|
@@ -437,12 +437,12 @@ Returns a class based on the context a color is being used and its slug.
|
|
|
437
437
|
|
|
438
438
|
_Parameters_
|
|
439
439
|
|
|
440
|
-
-
|
|
441
|
-
-
|
|
440
|
+
- _colorContextName_ `string`: Context/place where color is being used e.g: background, text etc...
|
|
441
|
+
- _colorSlug_ `string`: Slug of the color.
|
|
442
442
|
|
|
443
443
|
_Returns_
|
|
444
444
|
|
|
445
|
-
-
|
|
445
|
+
- `?string`: String with the class corresponding to the color in the provided context. Returns undefined if either colorContextName or colorSlug are not provided.
|
|
446
446
|
|
|
447
447
|
### getColorObjectByAttributeValues
|
|
448
448
|
|
|
@@ -450,13 +450,13 @@ Provided an array of color objects as set by the theme or by the editor defaults
|
|
|
450
450
|
|
|
451
451
|
_Parameters_
|
|
452
452
|
|
|
453
|
-
-
|
|
454
|
-
-
|
|
455
|
-
-
|
|
453
|
+
- _colors_ `Array`: Array of color objects as set by the theme or by the editor defaults.
|
|
454
|
+
- _definedColor_ `?string`: A string containing the color slug.
|
|
455
|
+
- _customColor_ `?string`: A string containing the customColor value.
|
|
456
456
|
|
|
457
457
|
_Returns_
|
|
458
458
|
|
|
459
|
-
-
|
|
459
|
+
- `?Object`: If definedColor is passed and the name is found in colors, the color object exactly as set by the theme or editor defaults is returned. Otherwise, an object that just sets the color is defined.
|
|
460
460
|
|
|
461
461
|
### getColorObjectByColorValue
|
|
462
462
|
|
|
@@ -464,12 +464,12 @@ Provided an array of color objects as set by the theme or by the editor defaults
|
|
|
464
464
|
|
|
465
465
|
_Parameters_
|
|
466
466
|
|
|
467
|
-
-
|
|
468
|
-
-
|
|
467
|
+
- _colors_ `Array`: Array of color objects as set by the theme or by the editor defaults.
|
|
468
|
+
- _colorValue_ `?string`: A string containing the color value.
|
|
469
469
|
|
|
470
470
|
_Returns_
|
|
471
471
|
|
|
472
|
-
-
|
|
472
|
+
- `?Object`: Color object included in the colors array whose color property equals colorValue. Returns undefined if no color object matches this requirement.
|
|
473
473
|
|
|
474
474
|
### getComputedFluidTypographyValue
|
|
475
475
|
|
|
@@ -493,18 +493,18 @@ const fontSize = getComputedFluidTypographyValue( {
|
|
|
493
493
|
|
|
494
494
|
_Parameters_
|
|
495
495
|
|
|
496
|
-
-
|
|
497
|
-
-
|
|
498
|
-
-
|
|
499
|
-
-
|
|
500
|
-
-
|
|
501
|
-
-
|
|
502
|
-
-
|
|
503
|
-
-
|
|
496
|
+
- _args_ `Object`:
|
|
497
|
+
- _args.minimumViewportWidth_ `?string`: Minimum viewport size from which type will have fluidity. Optional if fontSize is specified.
|
|
498
|
+
- _args.maximumViewportWidth_ `?string`: Maximum size up to which type will have fluidity. Optional if fontSize is specified.
|
|
499
|
+
- _args.fontSize_ `[string|number]`: Size to derive maximumFontSize and minimumFontSize from, if necessary. Optional if minimumFontSize and maximumFontSize are specified.
|
|
500
|
+
- _args.maximumFontSize_ `?string`: Maximum font size for any clamp() calculation. Optional.
|
|
501
|
+
- _args.minimumFontSize_ `?string`: Minimum font size for any clamp() calculation. Optional.
|
|
502
|
+
- _args.scaleFactor_ `?number`: A scale factor to determine how fast a font scales within boundaries. Optional.
|
|
503
|
+
- _args.minimumFontSizeLimit_ `?string`: The smallest a calculated font size may be. Optional.
|
|
504
504
|
|
|
505
505
|
_Returns_
|
|
506
506
|
|
|
507
|
-
-
|
|
507
|
+
- `string|null`: A font-size value using clamp().
|
|
508
508
|
|
|
509
509
|
### getCustomValueFromPreset
|
|
510
510
|
|
|
@@ -512,12 +512,12 @@ Converts a spacing preset into a custom value.
|
|
|
512
512
|
|
|
513
513
|
_Parameters_
|
|
514
514
|
|
|
515
|
-
-
|
|
516
|
-
-
|
|
515
|
+
- _value_ `string`: Value to convert
|
|
516
|
+
- _spacingSizes_ `Array`: Array of the current spacing preset objects
|
|
517
517
|
|
|
518
518
|
_Returns_
|
|
519
519
|
|
|
520
|
-
-
|
|
520
|
+
- `string`: Mapping of the spacing preset to its equivalent custom value.
|
|
521
521
|
|
|
522
522
|
### getDimensionsClassesAndStyles
|
|
523
523
|
|
|
@@ -525,11 +525,11 @@ Provides the CSS class names and inline styles for a block's dimensions support
|
|
|
525
525
|
|
|
526
526
|
_Parameters_
|
|
527
527
|
|
|
528
|
-
-
|
|
528
|
+
- _attributes_ `Object`: Block attributes.
|
|
529
529
|
|
|
530
530
|
_Returns_
|
|
531
531
|
|
|
532
|
-
-
|
|
532
|
+
- `Object`: Dimensions block support derived CSS classes & styles.
|
|
533
533
|
|
|
534
534
|
### getFontSize
|
|
535
535
|
|
|
@@ -537,13 +537,13 @@ Returns the font size object based on an array of named font sizes and the named
|
|
|
537
537
|
|
|
538
538
|
_Parameters_
|
|
539
539
|
|
|
540
|
-
-
|
|
541
|
-
-
|
|
542
|
-
-
|
|
540
|
+
- _fontSizes_ `Array`: Array of font size objects containing at least the "name" and "size" values as properties.
|
|
541
|
+
- _fontSizeAttribute_ `?string`: Content of the font size attribute (slug).
|
|
542
|
+
- _customFontSizeAttribute_ `?number`: Contents of the custom font size attribute (value).
|
|
543
543
|
|
|
544
544
|
_Returns_
|
|
545
545
|
|
|
546
|
-
-
|
|
546
|
+
- `?Object`: If fontSizeAttribute is set and an equal slug is found in fontSizes it returns the font size object for that slug. Otherwise, an object with just the size value based on customFontSize is returned.
|
|
547
547
|
|
|
548
548
|
### getFontSizeClass
|
|
549
549
|
|
|
@@ -551,11 +551,11 @@ Returns a class based on fontSizeName.
|
|
|
551
551
|
|
|
552
552
|
_Parameters_
|
|
553
553
|
|
|
554
|
-
-
|
|
554
|
+
- _fontSizeSlug_ `string`: Slug of the fontSize.
|
|
555
555
|
|
|
556
556
|
_Returns_
|
|
557
557
|
|
|
558
|
-
-
|
|
558
|
+
- `string | undefined`: String with the class corresponding to the fontSize passed. The class is generated by appending 'has-' followed by fontSizeSlug in kebabCase and ending with '-font-size'.
|
|
559
559
|
|
|
560
560
|
### getFontSizeObjectByValue
|
|
561
561
|
|
|
@@ -563,12 +563,12 @@ Returns the corresponding font size object for a given value.
|
|
|
563
563
|
|
|
564
564
|
_Parameters_
|
|
565
565
|
|
|
566
|
-
-
|
|
567
|
-
-
|
|
566
|
+
- _fontSizes_ `Array`: Array of font size objects.
|
|
567
|
+
- _value_ `number`: Font size value.
|
|
568
568
|
|
|
569
569
|
_Returns_
|
|
570
570
|
|
|
571
|
-
-
|
|
571
|
+
- `Object`: Font size object.
|
|
572
572
|
|
|
573
573
|
### getGradientSlugByValue
|
|
574
574
|
|
|
@@ -576,12 +576,12 @@ Retrieves the gradient slug per slug.
|
|
|
576
576
|
|
|
577
577
|
_Parameters_
|
|
578
578
|
|
|
579
|
-
-
|
|
580
|
-
-
|
|
579
|
+
- _gradients_ `Array`: Gradient Palette
|
|
580
|
+
- _value_ `string`: Gradient value
|
|
581
581
|
|
|
582
582
|
_Returns_
|
|
583
583
|
|
|
584
|
-
-
|
|
584
|
+
- `string`: Gradient slug.
|
|
585
585
|
|
|
586
586
|
### getGradientValueBySlug
|
|
587
587
|
|
|
@@ -589,12 +589,12 @@ Retrieves the gradient value per slug.
|
|
|
589
589
|
|
|
590
590
|
_Parameters_
|
|
591
591
|
|
|
592
|
-
-
|
|
593
|
-
-
|
|
592
|
+
- _gradients_ `Array`: Gradient Palette
|
|
593
|
+
- _slug_ `string`: Gradient slug
|
|
594
594
|
|
|
595
595
|
_Returns_
|
|
596
596
|
|
|
597
|
-
-
|
|
597
|
+
- `string`: Gradient value.
|
|
598
598
|
|
|
599
599
|
### getPxFromCssUnit
|
|
600
600
|
|
|
@@ -604,7 +604,7 @@ This function was accidentally exposed for mobile/native usage.
|
|
|
604
604
|
|
|
605
605
|
_Returns_
|
|
606
606
|
|
|
607
|
-
-
|
|
607
|
+
- `string`: Empty string.
|
|
608
608
|
|
|
609
609
|
### getSpacingPresetCssVar
|
|
610
610
|
|
|
@@ -612,11 +612,11 @@ Converts a spacing preset into a custom value.
|
|
|
612
612
|
|
|
613
613
|
_Parameters_
|
|
614
614
|
|
|
615
|
-
-
|
|
615
|
+
- _value_ `string`: Value to convert.
|
|
616
616
|
|
|
617
617
|
_Returns_
|
|
618
618
|
|
|
619
|
-
-
|
|
619
|
+
- `string | undefined`: CSS var string for given spacing preset value.
|
|
620
620
|
|
|
621
621
|
### getTypographyClassesAndStyles
|
|
622
622
|
|
|
@@ -624,12 +624,12 @@ Provides the CSS class names and inline styles for a block's typography support
|
|
|
624
624
|
|
|
625
625
|
_Parameters_
|
|
626
626
|
|
|
627
|
-
-
|
|
628
|
-
-
|
|
627
|
+
- _attributes_ `Object`: Block attributes.
|
|
628
|
+
- _settings_ `Object|boolean`: Merged theme.json settings
|
|
629
629
|
|
|
630
630
|
_Returns_
|
|
631
631
|
|
|
632
|
-
-
|
|
632
|
+
- `Object`: Typography block support derived CSS classes & styles.
|
|
633
633
|
|
|
634
634
|
### HeadingLevelDropdown
|
|
635
635
|
|
|
@@ -637,11 +637,11 @@ Dropdown for selecting a heading level (1 through 6) or paragraph (0).
|
|
|
637
637
|
|
|
638
638
|
_Parameters_
|
|
639
639
|
|
|
640
|
-
-
|
|
640
|
+
- _props_ `WPHeadingLevelDropdownProps`: Component props.
|
|
641
641
|
|
|
642
642
|
_Returns_
|
|
643
643
|
|
|
644
|
-
-
|
|
644
|
+
- `ComponentType`: The toolbar.
|
|
645
645
|
|
|
646
646
|
### HeightControl
|
|
647
647
|
|
|
@@ -651,24 +651,24 @@ HeightControl renders a linked unit control and range control for adjusting the
|
|
|
651
651
|
|
|
652
652
|
_Related_
|
|
653
653
|
|
|
654
|
-
-
|
|
654
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/height-control/README.md>
|
|
655
655
|
|
|
656
656
|
_Parameters_
|
|
657
657
|
|
|
658
|
-
-
|
|
659
|
-
-
|
|
660
|
-
-
|
|
661
|
-
-
|
|
658
|
+
- _props_ `Object`:
|
|
659
|
+
- _props.label_ `?string`: A label for the control.
|
|
660
|
+
- _props.onChange_ `( value: string ) => void`: Called when the height changes.
|
|
661
|
+
- _props.value_ `string`: The current height value.
|
|
662
662
|
|
|
663
663
|
_Returns_
|
|
664
664
|
|
|
665
|
-
-
|
|
665
|
+
- `Component`: The component to be rendered.
|
|
666
666
|
|
|
667
667
|
### InnerBlocks
|
|
668
668
|
|
|
669
669
|
_Related_
|
|
670
670
|
|
|
671
|
-
-
|
|
671
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md>
|
|
672
672
|
|
|
673
673
|
### Inserter
|
|
674
674
|
|
|
@@ -682,7 +682,7 @@ Undocumented declaration.
|
|
|
682
682
|
|
|
683
683
|
_Related_
|
|
684
684
|
|
|
685
|
-
-
|
|
685
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inspector-controls/README.md>
|
|
686
686
|
|
|
687
687
|
### isValueSpacingPreset
|
|
688
688
|
|
|
@@ -690,29 +690,29 @@ Checks is given value is a spacing preset.
|
|
|
690
690
|
|
|
691
691
|
_Parameters_
|
|
692
692
|
|
|
693
|
-
-
|
|
693
|
+
- _value_ `string`: Value to check
|
|
694
694
|
|
|
695
695
|
_Returns_
|
|
696
696
|
|
|
697
|
-
-
|
|
697
|
+
- `boolean`: Return true if value is string in format var:preset|spacing|.
|
|
698
698
|
|
|
699
699
|
### JustifyContentControl
|
|
700
700
|
|
|
701
701
|
_Related_
|
|
702
702
|
|
|
703
|
-
-
|
|
703
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/justify-content-control/README.md>
|
|
704
704
|
|
|
705
705
|
### JustifyToolbar
|
|
706
706
|
|
|
707
707
|
_Related_
|
|
708
708
|
|
|
709
|
-
-
|
|
709
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/justify-content-control/README.md>
|
|
710
710
|
|
|
711
711
|
### LineHeightControl
|
|
712
712
|
|
|
713
713
|
_Related_
|
|
714
714
|
|
|
715
|
-
-
|
|
715
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/line-height-control/README.md>
|
|
716
716
|
|
|
717
717
|
### LinkControl
|
|
718
718
|
|
|
@@ -757,31 +757,31 @@ Pre-populate the search input with a default value:
|
|
|
757
757
|
|
|
758
758
|
_Parameters_
|
|
759
759
|
|
|
760
|
-
-
|
|
760
|
+
- _props_ `WPLinkControlProps`: Component props.
|
|
761
761
|
|
|
762
762
|
### MediaPlaceholder
|
|
763
763
|
|
|
764
764
|
_Related_
|
|
765
765
|
|
|
766
|
-
-
|
|
766
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-placeholder/README.md>
|
|
767
767
|
|
|
768
768
|
### MediaReplaceFlow
|
|
769
769
|
|
|
770
770
|
_Related_
|
|
771
771
|
|
|
772
|
-
-
|
|
772
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-replace-flow/README.md>
|
|
773
773
|
|
|
774
774
|
### MediaUpload
|
|
775
775
|
|
|
776
776
|
_Related_
|
|
777
777
|
|
|
778
|
-
-
|
|
778
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-upload/README.md>
|
|
779
779
|
|
|
780
780
|
### MediaUploadCheck
|
|
781
781
|
|
|
782
782
|
_Related_
|
|
783
783
|
|
|
784
|
-
-
|
|
784
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-upload/README.md>
|
|
785
785
|
|
|
786
786
|
### MultiSelectScrollIntoView
|
|
787
787
|
|
|
@@ -797,7 +797,7 @@ Undocumented declaration.
|
|
|
797
797
|
|
|
798
798
|
_Related_
|
|
799
799
|
|
|
800
|
-
-
|
|
800
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/observe-typing/README.md>
|
|
801
801
|
|
|
802
802
|
### PanelColorSettings
|
|
803
803
|
|
|
@@ -809,7 +809,7 @@ Render an auto-growing textarea allow users to fill any textual content.
|
|
|
809
809
|
|
|
810
810
|
_Related_
|
|
811
811
|
|
|
812
|
-
-
|
|
812
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/plain-text/README.md>
|
|
813
813
|
|
|
814
814
|
_Usage_
|
|
815
815
|
|
|
@@ -840,14 +840,14 @@ registerBlockType( 'my-plugin/example-block', {
|
|
|
840
840
|
|
|
841
841
|
_Parameters_
|
|
842
842
|
|
|
843
|
-
-
|
|
844
|
-
-
|
|
845
|
-
-
|
|
846
|
-
-
|
|
843
|
+
- _props_ `Object`: Component props.
|
|
844
|
+
- _props.value_ `string`: String value of the textarea.
|
|
845
|
+
- _props.onChange_ `Function`: Function called when the text value changes.
|
|
846
|
+
- _props.ref_ `[Object]`: The component forwards the `ref` property to the `textarea` element.
|
|
847
847
|
|
|
848
848
|
_Returns_
|
|
849
849
|
|
|
850
|
-
-
|
|
850
|
+
- `Element`: Plain text component
|
|
851
851
|
|
|
852
852
|
### privateApis
|
|
853
853
|
|
|
@@ -861,20 +861,20 @@ Wrap block content with this provider and provide the same `uniqueId` prop as us
|
|
|
861
861
|
|
|
862
862
|
_Parameters_
|
|
863
863
|
|
|
864
|
-
-
|
|
865
|
-
-
|
|
866
|
-
-
|
|
867
|
-
-
|
|
864
|
+
- _props_ `Object`:
|
|
865
|
+
- _props.uniqueId_ `*`: Any value that acts as a unique identifier for a block instance.
|
|
866
|
+
- _props.blockName_ `string`: Optional block name.
|
|
867
|
+
- _props.children_ `React.JSX.Element`: React children.
|
|
868
868
|
|
|
869
869
|
_Returns_
|
|
870
870
|
|
|
871
|
-
-
|
|
871
|
+
- `React.JSX.Element`: A React element.
|
|
872
872
|
|
|
873
873
|
### RichText
|
|
874
874
|
|
|
875
875
|
_Related_
|
|
876
876
|
|
|
877
|
-
-
|
|
877
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md>
|
|
878
878
|
|
|
879
879
|
### RichTextShortcut
|
|
880
880
|
|
|
@@ -890,39 +890,39 @@ The default editor settings
|
|
|
890
890
|
|
|
891
891
|
_Type Definition_
|
|
892
892
|
|
|
893
|
-
-
|
|
893
|
+
- _SETTINGS_DEFAULT_ `Object`
|
|
894
894
|
|
|
895
895
|
_Properties_
|
|
896
896
|
|
|
897
|
-
-
|
|
898
|
-
-
|
|
899
|
-
-
|
|
900
|
-
-
|
|
901
|
-
-
|
|
902
|
-
-
|
|
903
|
-
-
|
|
904
|
-
-
|
|
905
|
-
-
|
|
906
|
-
-
|
|
907
|
-
-
|
|
908
|
-
-
|
|
909
|
-
-
|
|
910
|
-
-
|
|
911
|
-
-
|
|
912
|
-
-
|
|
913
|
-
-
|
|
914
|
-
-
|
|
915
|
-
-
|
|
916
|
-
-
|
|
917
|
-
-
|
|
918
|
-
-
|
|
919
|
-
-
|
|
897
|
+
- _alignWide_ `boolean`: Enable/Disable Wide/Full Alignments
|
|
898
|
+
- _supportsLayout_ `boolean`: Enable/disable layouts support in container blocks.
|
|
899
|
+
- _imageEditing_ `boolean`: Image Editing settings set to false to disable.
|
|
900
|
+
- _imageSizes_ `Array`: Available image sizes
|
|
901
|
+
- _maxWidth_ `number`: Max width to constraint resizing
|
|
902
|
+
- _allowedBlockTypes_ `boolean|Array`: Allowed block types
|
|
903
|
+
- _hasFixedToolbar_ `boolean`: Whether or not the editor toolbar is fixed
|
|
904
|
+
- _distractionFree_ `boolean`: Whether or not the editor UI is distraction free
|
|
905
|
+
- _focusMode_ `boolean`: Whether the focus mode is enabled or not
|
|
906
|
+
- _styles_ `Array`: Editor Styles
|
|
907
|
+
- _keepCaretInsideBlock_ `boolean`: Whether caret should move between blocks in edit mode
|
|
908
|
+
- _bodyPlaceholder_ `string`: Empty post placeholder
|
|
909
|
+
- _titlePlaceholder_ `string`: Empty title placeholder
|
|
910
|
+
- _canLockBlocks_ `boolean`: Whether the user can manage Block Lock state
|
|
911
|
+
- _codeEditingEnabled_ `boolean`: Whether or not the user can switch to the code editor
|
|
912
|
+
- _blockStatesEditingEnabled_ `boolean`: Whether or not block style states editing is enabled
|
|
913
|
+
- _generateAnchors_ `boolean`: Enable/Disable auto anchor generation for Heading blocks
|
|
914
|
+
- _enableOpenverseMediaCategory_ `boolean`: Enable/Disable the Openverse media category in the inserter.
|
|
915
|
+
- _clearBlockSelection_ `boolean`: Whether the block editor should clear selection on mousedown when a block is not clicked.
|
|
916
|
+
- _\_\_experimentalCanUserUseUnfilteredHTML_ `boolean`: Whether the user should be able to use unfiltered HTML or the HTML should be filtered e.g., to remove elements considered insecure like iframes.
|
|
917
|
+
- _\_\_experimentalBlockDirectory_ `boolean`: Whether the user has enabled the Block Directory
|
|
918
|
+
- _\_\_experimentalBlockPatterns_ `Array`: Array of objects representing the block patterns
|
|
919
|
+
- _\_\_experimentalBlockPatternCategories_ `Array`: Array of objects representing the block pattern categories
|
|
920
920
|
|
|
921
921
|
### SkipToSelectedBlock
|
|
922
922
|
|
|
923
923
|
_Related_
|
|
924
924
|
|
|
925
|
-
-
|
|
925
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/skip-to-selected-block/README.md>
|
|
926
926
|
|
|
927
927
|
### store
|
|
928
928
|
|
|
@@ -930,7 +930,7 @@ Store definition for the block editor namespace.
|
|
|
930
930
|
|
|
931
931
|
_Related_
|
|
932
932
|
|
|
933
|
-
-
|
|
933
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore>
|
|
934
934
|
|
|
935
935
|
### storeConfig
|
|
936
936
|
|
|
@@ -938,7 +938,7 @@ Block editor data store configuration.
|
|
|
938
938
|
|
|
939
939
|
_Related_
|
|
940
940
|
|
|
941
|
-
-
|
|
941
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore>
|
|
942
942
|
|
|
943
943
|
### ToolSelector
|
|
944
944
|
|
|
@@ -950,13 +950,13 @@ Applies a series of CSS rule transforms to wrap selectors inside a given class a
|
|
|
950
950
|
|
|
951
951
|
_Parameters_
|
|
952
952
|
|
|
953
|
-
-
|
|
954
|
-
-
|
|
955
|
-
-
|
|
953
|
+
- _styles_ `EditorStyle[]`: CSS rules.
|
|
954
|
+
- _wrapperSelector_ Wrapper selector.
|
|
955
|
+
- _transformOptions_ `TransformOptions`: Additional options for style transformation.
|
|
956
956
|
|
|
957
957
|
_Returns_
|
|
958
958
|
|
|
959
|
-
-
|
|
959
|
+
- converted rules.
|
|
960
960
|
|
|
961
961
|
### Typewriter
|
|
962
962
|
|
|
@@ -968,23 +968,23 @@ Text field for entering a URL, with an autocomplete list of matching posts, page
|
|
|
968
968
|
|
|
969
969
|
_Related_
|
|
970
970
|
|
|
971
|
-
-
|
|
971
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-input/README.md>
|
|
972
972
|
|
|
973
973
|
_Parameters_
|
|
974
974
|
|
|
975
|
-
-
|
|
975
|
+
- _props_ `Object`: Component props.
|
|
976
976
|
|
|
977
977
|
### URLInputButton
|
|
978
978
|
|
|
979
979
|
_Related_
|
|
980
980
|
|
|
981
|
-
-
|
|
981
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-input/README.md>
|
|
982
982
|
|
|
983
983
|
### URLPopover
|
|
984
984
|
|
|
985
985
|
_Related_
|
|
986
986
|
|
|
987
|
-
-
|
|
987
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-popover/README.md>
|
|
988
988
|
|
|
989
989
|
### useBlockBindingsUtils
|
|
990
990
|
|
|
@@ -992,8 +992,8 @@ Retrieves the existing utils needed to update the block `bindings` metadata. The
|
|
|
992
992
|
|
|
993
993
|
It contains the following utils:
|
|
994
994
|
|
|
995
|
-
-
|
|
996
|
-
-
|
|
995
|
+
- `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`.
|
|
996
|
+
- `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute.
|
|
997
997
|
|
|
998
998
|
_Usage_
|
|
999
999
|
|
|
@@ -1026,11 +1026,11 @@ removeAllBlockBindings();
|
|
|
1026
1026
|
|
|
1027
1027
|
_Parameters_
|
|
1028
1028
|
|
|
1029
|
-
-
|
|
1029
|
+
- _clientId_ `?string`: Optional block client ID. If not set, it will use the current block client ID from the context.
|
|
1030
1030
|
|
|
1031
1031
|
_Returns_
|
|
1032
1032
|
|
|
1033
|
-
-
|
|
1033
|
+
- `?WPBlockBindingsUtils`: Object containing the block bindings utils.
|
|
1034
1034
|
|
|
1035
1035
|
_Changelog_
|
|
1036
1036
|
|
|
@@ -1048,11 +1048,11 @@ If for any reason a block variation match cannot be found, the returned informat
|
|
|
1048
1048
|
|
|
1049
1049
|
_Parameters_
|
|
1050
1050
|
|
|
1051
|
-
-
|
|
1051
|
+
- _clientId_ `string`: Block's client id.
|
|
1052
1052
|
|
|
1053
1053
|
_Returns_
|
|
1054
1054
|
|
|
1055
|
-
-
|
|
1055
|
+
- `?WPBlockDisplayInformation`: Block's display information, or `null` when the block or its type not found.
|
|
1056
1056
|
|
|
1057
1057
|
### useBlockEditContext
|
|
1058
1058
|
|
|
@@ -1060,7 +1060,7 @@ The `useBlockEditContext` hook provides information about the block this hook is
|
|
|
1060
1060
|
|
|
1061
1061
|
_Returns_
|
|
1062
1062
|
|
|
1063
|
-
-
|
|
1063
|
+
- `Object`: Block edit context
|
|
1064
1064
|
|
|
1065
1065
|
### useBlockEditingMode
|
|
1066
1066
|
|
|
@@ -1077,11 +1077,11 @@ function MyBlock( { attributes, setAttributes } ) {
|
|
|
1077
1077
|
|
|
1078
1078
|
`mode` can be one of three options:
|
|
1079
1079
|
|
|
1080
|
-
-
|
|
1081
|
-
|
|
1082
|
-
-
|
|
1083
|
-
|
|
1084
|
-
-
|
|
1080
|
+
- `'disabled'`: Prevents editing the block entirely, i.e. it cannot be
|
|
1081
|
+
selected.
|
|
1082
|
+
- `'contentOnly'`: Hides all non-content UI, e.g. auxiliary controls in the
|
|
1083
|
+
toolbar, the block movers, block settings.
|
|
1084
|
+
- `'default'`: Allows editing the block as normal.
|
|
1085
1085
|
|
|
1086
1086
|
The mode is inherited by all of the block's inner blocks, unless they have
|
|
1087
1087
|
their own mode.
|
|
@@ -1090,11 +1090,11 @@ If called outside of a block context, the mode is applied to all blocks.
|
|
|
1090
1090
|
|
|
1091
1091
|
_Parameters_
|
|
1092
1092
|
|
|
1093
|
-
-
|
|
1093
|
+
- _mode_ `?BlockEditingMode`: The editing mode to apply. If undefined, the current editing mode is not changed.
|
|
1094
1094
|
|
|
1095
1095
|
_Returns_
|
|
1096
1096
|
|
|
1097
|
-
-
|
|
1097
|
+
- `BlockEditingMode`: The current editing mode.
|
|
1098
1098
|
|
|
1099
1099
|
### useBlockProps
|
|
1100
1100
|
|
|
@@ -1122,13 +1122,13 @@ export default function Edit() {
|
|
|
1122
1122
|
|
|
1123
1123
|
_Parameters_
|
|
1124
1124
|
|
|
1125
|
-
-
|
|
1126
|
-
-
|
|
1127
|
-
-
|
|
1125
|
+
- _props_ `Object`: Optional. Props to pass to the element. Must contain the ref if one is defined.
|
|
1126
|
+
- _options_ `Object`: Options for internal use only.
|
|
1127
|
+
- _options.\_\_unstableIsHtml_ `boolean`:
|
|
1128
1128
|
|
|
1129
1129
|
_Returns_
|
|
1130
1130
|
|
|
1131
|
-
-
|
|
1131
|
+
- `Object`: Props to pass to the element to mark as a block.
|
|
1132
1132
|
|
|
1133
1133
|
### useCachedTruthy
|
|
1134
1134
|
|
|
@@ -1136,11 +1136,11 @@ Keeps an up-to-date copy of the passed value and returns it. If value becomes fa
|
|
|
1136
1136
|
|
|
1137
1137
|
_Parameters_
|
|
1138
1138
|
|
|
1139
|
-
-
|
|
1139
|
+
- _value_ `any`:
|
|
1140
1140
|
|
|
1141
1141
|
_Returns_
|
|
1142
1142
|
|
|
1143
|
-
-
|
|
1143
|
+
- `any`: value
|
|
1144
1144
|
|
|
1145
1145
|
### useHasRecursion
|
|
1146
1146
|
|
|
@@ -1150,12 +1150,12 @@ Use this with the `RecursionProvider` component, using the same `uniqueId` value
|
|
|
1150
1150
|
|
|
1151
1151
|
_Parameters_
|
|
1152
1152
|
|
|
1153
|
-
-
|
|
1154
|
-
-
|
|
1153
|
+
- _uniqueId_ `*`: Any value that acts as a unique identifier for a block instance.
|
|
1154
|
+
- _blockName_ `string`: Optional block name.
|
|
1155
1155
|
|
|
1156
1156
|
_Returns_
|
|
1157
1157
|
|
|
1158
|
-
-
|
|
1158
|
+
- `boolean`: A boolean describing whether the provided id has already been rendered.
|
|
1159
1159
|
|
|
1160
1160
|
### useInnerBlocksProps
|
|
1161
1161
|
|
|
@@ -1163,12 +1163,12 @@ This hook is used to lightly mark an element as an inner blocks wrapper element.
|
|
|
1163
1163
|
|
|
1164
1164
|
_Related_
|
|
1165
1165
|
|
|
1166
|
-
-
|
|
1166
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md>
|
|
1167
1167
|
|
|
1168
1168
|
_Parameters_
|
|
1169
1169
|
|
|
1170
|
-
-
|
|
1171
|
-
-
|
|
1170
|
+
- _props_ `Object`: Optional. Props to pass to the element. Must contain the ref if one is defined.
|
|
1171
|
+
- _options_ `Object`: Optional. Inner blocks options.
|
|
1172
1172
|
|
|
1173
1173
|
### useSetting
|
|
1174
1174
|
|
|
@@ -1186,11 +1186,11 @@ const isEnabled = useSetting( 'typography.dropCap' );
|
|
|
1186
1186
|
|
|
1187
1187
|
_Parameters_
|
|
1188
1188
|
|
|
1189
|
-
-
|
|
1189
|
+
- _path_ `string`: The path to the setting.
|
|
1190
1190
|
|
|
1191
1191
|
_Returns_
|
|
1192
1192
|
|
|
1193
|
-
-
|
|
1193
|
+
- `any`: Returns the value defined for the setting.
|
|
1194
1194
|
|
|
1195
1195
|
### useSettings
|
|
1196
1196
|
|
|
@@ -1206,11 +1206,11 @@ const [ fixed, sticky ] = useSettings( 'position.fixed', 'position.sticky' );
|
|
|
1206
1206
|
|
|
1207
1207
|
_Parameters_
|
|
1208
1208
|
|
|
1209
|
-
-
|
|
1209
|
+
- _paths_ `string[]`: The paths to the settings.
|
|
1210
1210
|
|
|
1211
1211
|
_Returns_
|
|
1212
1212
|
|
|
1213
|
-
-
|
|
1213
|
+
- `any[]`: Returns the values defined for the settings.
|
|
1214
1214
|
|
|
1215
1215
|
### useStyleOverride
|
|
1216
1216
|
|
|
@@ -1218,15 +1218,15 @@ Override a block editor settings style. Leave the ID blank to create a new style
|
|
|
1218
1218
|
|
|
1219
1219
|
_Parameters_
|
|
1220
1220
|
|
|
1221
|
-
-
|
|
1222
|
-
-
|
|
1223
|
-
-
|
|
1221
|
+
- _override_ `Object`: Override object.
|
|
1222
|
+
- _override.id_ `?string`: Id of the style override, leave blank to create a new style.
|
|
1223
|
+
- _override.css_ `string`: CSS to apply.
|
|
1224
1224
|
|
|
1225
1225
|
### Warning
|
|
1226
1226
|
|
|
1227
1227
|
_Related_
|
|
1228
1228
|
|
|
1229
|
-
-
|
|
1229
|
+
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/warning/README.md>
|
|
1230
1230
|
|
|
1231
1231
|
### withColorContext
|
|
1232
1232
|
|
|
@@ -1249,11 +1249,11 @@ export default compose(
|
|
|
1249
1249
|
|
|
1250
1250
|
_Parameters_
|
|
1251
1251
|
|
|
1252
|
-
-
|
|
1252
|
+
- _colorTypes_ `...(Object|string)`: The arguments can be strings or objects. If the argument is an object, it should contain the color attribute name as key and the color context as value. If the argument is a string the value should be the color attribute name, the color context is computed by applying a kebab case transform to the value. Color context represents the context/place where the color is going to be used. The class name of the color is generated using 'has' followed by the color name and ending with the color context all in kebab case e.g: has-green-background-color.
|
|
1253
1253
|
|
|
1254
1254
|
_Returns_
|
|
1255
1255
|
|
|
1256
|
-
-
|
|
1256
|
+
- `Function`: Higher-order component.
|
|
1257
1257
|
|
|
1258
1258
|
### withFontSizes
|
|
1259
1259
|
|
|
@@ -1261,11 +1261,11 @@ Higher-order component, which handles font size logic for class generation, font
|
|
|
1261
1261
|
|
|
1262
1262
|
_Parameters_
|
|
1263
1263
|
|
|
1264
|
-
-
|
|
1264
|
+
- _fontSizeNames_ `...(Object|string)`: The arguments should all be strings. Each string contains the font size attribute name e.g: 'fontSize'.
|
|
1265
1265
|
|
|
1266
1266
|
_Returns_
|
|
1267
1267
|
|
|
1268
|
-
-
|
|
1268
|
+
- `Function`: Higher-order component.
|
|
1269
1269
|
|
|
1270
1270
|
### WritingFlow
|
|
1271
1271
|
|
|
@@ -1273,8 +1273,8 @@ Handles selection and navigation across blocks. This component should be wrapped
|
|
|
1273
1273
|
|
|
1274
1274
|
_Parameters_
|
|
1275
1275
|
|
|
1276
|
-
-
|
|
1277
|
-
-
|
|
1276
|
+
- _props_ `Object`: Component properties.
|
|
1277
|
+
- _props.children_ `Element`: Children to be rendered.
|
|
1278
1278
|
|
|
1279
1279
|
<!-- END TOKEN(Autogenerated API docs) -->
|
|
1280
1280
|
|