@wordpress/block-editor 7.0.1 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +47 -4
- package/build/components/autocomplete/index.js +1 -1
- package/build/components/autocomplete/index.js.map +1 -1
- package/build/components/block-actions/index.js +8 -4
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-control/ui.js +61 -14
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/use-available-alignments.js +25 -3
- package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build/components/block-content-overlay/index.js +2 -4
- package/build/components/block-content-overlay/index.js.map +1 -1
- package/build/components/block-controls/fill.js +6 -6
- package/build/components/block-controls/fill.js.map +1 -1
- package/build/components/block-controls/groups.js +3 -1
- package/build/components/block-controls/groups.js.map +1 -1
- package/build/components/block-controls/hook.js +57 -0
- package/build/components/block-controls/hook.js.map +1 -0
- package/build/components/block-edit/context.js +6 -5
- package/build/components/block-edit/context.js.map +1 -1
- package/build/components/block-edit/edit.js +1 -1
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-icon/index.js +5 -1
- package/build/components/block-icon/index.js.map +1 -1
- package/build/components/block-icon/index.native.js +13 -9
- package/build/components/block-icon/index.native.js.map +1 -1
- package/build/components/block-inspector/index.js +14 -7
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block-html.js +5 -0
- package/build/components/block-list/block-html.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js +31 -12
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block-selection-button.native.js +4 -4
- package/build/components/block-list/block-selection-button.native.js.map +1 -1
- package/build/components/block-list/block.js +15 -9
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +6 -7
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/grid-item.native.js +68 -0
- package/build/components/block-list/grid-item.native.js.map +1 -0
- package/build/components/block-list/index.js +19 -15
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js +13 -9
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +6 -6
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-custom-class-name.js +4 -6
- package/build/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-default-class-name.js +1 -1
- package/build/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
- package/build/components/block-list/use-block-props/use-multi-selection.js +21 -6
- package/build/components/block-list/use-block-props/use-multi-selection.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +9 -1
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list-appender/index.js +9 -1
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-mover/index.js +4 -4
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-mover/index.native.js +4 -4
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-navigation/dropdown.js +0 -1
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-patterns-list/index.js +1 -8
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-preview/auto.js +42 -14
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-settings/container.native.js +5 -2
- package/build/components/block-settings/container.native.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +26 -5
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +10 -3
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-styles/index.js +5 -1
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/preview.native.js +2 -2
- package/build/components/block-styles/preview.native.js.map +1 -1
- package/build/components/block-switcher/block-styles-menu.js +1 -1
- package/build/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build/components/block-switcher/index.js +10 -3
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-title/index.js +3 -2
- package/build/components/block-title/index.js.map +1 -1
- package/build/components/block-toolbar/index.js +3 -0
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-tools/block-contextual-toolbar.js +1 -1
- package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build/components/block-tools/block-popover.js +8 -7
- package/build/components/block-tools/block-popover.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +2 -4
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/index.js +4 -1
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +96 -7
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-types-list/index.native.js +3 -2
- package/build/components/block-types-list/index.native.js.map +1 -1
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/utils.js +17 -8
- package/build/components/border-radius-control/utils.js.map +1 -1
- package/build/components/colors/utils.js +11 -3
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors-gradients/control.js +22 -57
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +83 -7
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/contrast-checker/index.js +18 -12
- package/build/components/contrast-checker/index.js.map +1 -1
- package/build/components/copy-handler/index.js +9 -3
- package/build/components/copy-handler/index.js.map +1 -1
- package/build/components/default-block-appender/index.js +2 -2
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/duotone-control/index.js +41 -39
- package/build/components/duotone-control/index.js.map +1 -1
- package/build/components/editor-styles/index.js +9 -3
- package/build/components/editor-styles/index.js.map +1 -1
- package/build/components/font-appearance-control/index.js +44 -12
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/font-sizes/index.native.js +24 -0
- package/build/components/font-sizes/index.native.js.map +1 -1
- package/build/components/iframe/index.js +46 -63
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js +126 -0
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -0
- package/build/components/image-editor/constants.js +16 -0
- package/build/components/image-editor/constants.js.map +1 -0
- package/build/components/image-editor/context.js +59 -0
- package/build/components/image-editor/context.js.map +1 -0
- package/build/components/image-editor/cropper.js +83 -0
- package/build/components/image-editor/cropper.js.map +1 -0
- package/build/components/image-editor/form-controls.js +36 -0
- package/build/components/image-editor/form-controls.js.map +1 -0
- package/build/components/image-editor/index.js +60 -0
- package/build/components/image-editor/index.js.map +1 -0
- package/build/components/image-editor/rotation-button.js +37 -0
- package/build/components/image-editor/rotation-button.js.map +1 -0
- package/build/components/image-editor/use-save-image.js +84 -0
- package/build/components/image-editor/use-save-image.js.map +1 -0
- package/build/components/image-editor/use-transform-image.js +135 -0
- package/build/components/image-editor/use-transform-image.js.map +1 -0
- package/build/components/image-editor/zoom-dropdown.js +55 -0
- package/build/components/image-editor/zoom-dropdown.js.map +1 -0
- package/build/components/image-size-control/use-dimension-handler.js +14 -3
- package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
- package/build/components/index.js +42 -37
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js +12 -7
- package/build/components/index.native.js.map +1 -1
- package/build/components/inner-blocks/button-block-appender.js +11 -1
- package/build/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build/components/inner-blocks/index.js +28 -10
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js +42 -4
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +24 -13
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/explorer.js +62 -0
- package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -0
- package/build/components/inserter/block-patterns-explorer/patterns-list.js +111 -0
- package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -0
- package/build/components/inserter/block-patterns-explorer/sidebar.js +78 -0
- package/build/components/inserter/block-patterns-explorer/sidebar.js.map +1 -0
- package/build/components/inserter/block-patterns-tab.js +74 -35
- package/build/components/inserter/block-patterns-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js +3 -6
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/hooks/use-block-type-impressions.native.js +4 -7
- package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build/components/inserter/hooks/use-clipboard-block.native.js +5 -4
- package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build/components/inserter/index.js +12 -4
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/index.native.js +1 -7
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/library.js +2 -0
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/menu.js +2 -1
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/menu.native.js +18 -17
- package/build/components/inserter/menu.native.js.map +1 -1
- package/build/components/inserter/pattern-panel.js +19 -10
- package/build/components/inserter/pattern-panel.js.map +1 -1
- package/build/components/inserter/preview-panel.js +1 -1
- package/build/components/inserter/preview-panel.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/inserter/reusable-blocks-tab.native.js +5 -6
- package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build/components/inserter/search-results.native.js +9 -2
- package/build/components/inserter/search-results.native.js.map +1 -1
- package/build/components/inserter/tabs.native.js +1 -4
- package/build/components/inserter/tabs.native.js.map +1 -1
- package/build/components/inserter/utils.native.js +44 -0
- package/build/components/inserter/utils.native.js.map +1 -0
- package/build/components/inspector-controls/block-support-slot-container.js +28 -0
- package/build/components/inspector-controls/block-support-slot-container.js.map +1 -0
- package/build/components/inspector-controls/block-support-tools-panel.js +78 -0
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -0
- package/build/components/inspector-controls/fill.js +64 -0
- package/build/components/inspector-controls/fill.js.map +1 -0
- package/build/components/inspector-controls/{index.native.js → fill.native.js} +20 -19
- package/build/components/inspector-controls/fill.native.js.map +1 -0
- package/build/components/inspector-controls/groups.js +25 -0
- package/build/components/inspector-controls/groups.js.map +1 -0
- package/build/components/inspector-controls/index.js +22 -20
- package/build/components/inspector-controls/index.js.map +1 -1
- package/build/components/inspector-controls/slot.js +67 -0
- package/build/components/inspector-controls/slot.js.map +1 -0
- package/build/components/inspector-controls/slot.native.js +38 -0
- package/build/components/inspector-controls/slot.native.js.map +1 -0
- package/build/components/letter-spacing-control/index.js +9 -6
- package/build/components/letter-spacing-control/index.js.map +1 -1
- package/build/components/line-height-control/index.native.js +39 -0
- package/build/components/line-height-control/index.native.js.map +1 -0
- package/build/components/link-control/index.js +93 -34
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/link-preview.js +45 -15
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/link-control/search-input.js +25 -7
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/list-view/block-contents.js +1 -20
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block.js +54 -69
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +102 -76
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/index.js +53 -23
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/leaf.js +2 -2
- package/build/components/list-view/leaf.js.map +1 -1
- package/build/components/list-view/list-item.js +3 -2
- package/build/components/list-view/list-item.js.map +1 -1
- package/build/components/list-view/use-list-view-client-ids.js +13 -54
- package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build/components/media-placeholder/index.js +35 -21
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-placeholder/index.native.js +2 -1
- package/build/components/media-placeholder/index.native.js.map +1 -1
- package/build/components/media-replace-flow/index.js +5 -3
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +1 -4
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/observe-typing/index.js +1 -1
- package/build/components/observe-typing/index.js.map +1 -1
- package/build/components/plain-text/index.native.js +30 -1
- package/build/components/plain-text/index.native.js.map +1 -1
- package/build/components/rich-text/embed-handler-picker.native.js +66 -0
- package/build/components/rich-text/embed-handler-picker.native.js.map +1 -0
- package/build/components/rich-text/format-edit.js +28 -2
- package/build/components/rich-text/format-edit.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.js +32 -11
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/index.js +29 -7
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +43 -5
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/input-event.js +25 -24
- package/build/components/rich-text/input-event.js.map +1 -1
- package/build/components/rich-text/shortcut.js +23 -9
- package/build/components/rich-text/shortcut.js.map +1 -1
- package/build/components/rich-text/use-input-events.js +27 -0
- package/build/components/rich-text/use-input-events.js.map +1 -0
- package/build/components/rich-text/use-paste-handler.js +45 -10
- package/build/components/rich-text/use-paste-handler.js.map +1 -1
- package/build/components/rich-text/use-shortcuts.js +27 -0
- package/build/components/rich-text/use-shortcuts.js.map +1 -0
- package/build/components/rich-text/utils.js +22 -0
- package/build/components/rich-text/utils.js.map +1 -1
- package/build/components/typewriter/index.js +1 -1
- package/build/components/typewriter/index.js.map +1 -1
- package/build/components/url-input/index.js +25 -11
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-display-block-controls/index.js +5 -7
- package/build/components/use-display-block-controls/index.js.map +1 -1
- package/build/components/use-moving-animation/index.js +13 -10
- package/build/components/use-moving-animation/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js +2 -1
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/use-resize-canvas/index.js +2 -13
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/components/use-setting/index.js +49 -14
- package/build/components/use-setting/index.js.map +1 -1
- package/build/components/writing-flow/use-multi-selection.js +6 -0
- package/build/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +18 -3
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/align.js +14 -14
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/anchor.js +4 -2
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/border-color.js +9 -5
- package/build/hooks/border-color.js.map +1 -1
- package/build/hooks/border.js +5 -5
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color-panel.js +5 -2
- package/build/hooks/color-panel.js.map +1 -1
- package/build/hooks/color.js +6 -4
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/compat.js +23 -0
- package/build/hooks/compat.js.map +1 -0
- package/build/hooks/custom-class-name.js +3 -1
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/dimensions.js +63 -28
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/duotone.js +63 -18
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-appearance.js +49 -6
- package/build/hooks/font-appearance.js.map +1 -1
- package/build/hooks/font-family.js +123 -32
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js +51 -9
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/gap.js +163 -0
- package/build/hooks/gap.js.map +1 -0
- package/build/hooks/index.js +12 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js +10 -0
- package/build/hooks/index.native.js.map +1 -1
- package/build/hooks/layout.js +47 -30
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/letter-spacing.js +45 -8
- package/build/hooks/letter-spacing.js.map +1 -1
- package/build/hooks/line-height.js +45 -8
- package/build/hooks/line-height.js.map +1 -1
- package/build/hooks/lock.js +43 -0
- package/build/hooks/lock.js.map +1 -0
- package/build/hooks/margin.js +6 -3
- package/build/hooks/margin.js.map +1 -1
- package/build/hooks/padding.js +6 -3
- package/build/hooks/padding.js.map +1 -1
- package/build/hooks/style.js +39 -11
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/text-decoration.js +42 -6
- package/build/hooks/text-decoration.js.map +1 -1
- package/build/hooks/text-transform.js +42 -6
- package/build/hooks/text-transform.js.map +1 -1
- package/build/hooks/typography.js +109 -9
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/typography.native.js +60 -0
- package/build/hooks/typography.native.js.map +1 -0
- package/build/hooks/use-cached-truthy.js +29 -0
- package/build/hooks/use-cached-truthy.js.map +1 -0
- package/build/index.js +7 -0
- package/build/index.js.map +1 -1
- package/build/layouts/flex.js +215 -11
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/flow.js +99 -6
- package/build/layouts/flow.js.map +1 -1
- package/build/store/actions.js +331 -266
- package/build/store/actions.js.map +1 -1
- package/build/store/defaults.js +2 -0
- package/build/store/defaults.js.map +1 -1
- package/build/store/defaults.native.js +16 -1
- package/build/store/defaults.native.js.map +1 -1
- package/build/store/index.js +1 -3
- package/build/store/index.js.map +1 -1
- package/build/store/reducer.js +165 -114
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +203 -115
- package/build/store/selectors.js.map +1 -1
- package/build/utils/index.js +10 -1
- package/build/utils/index.js.map +1 -1
- package/build/utils/parse-css-unit-to-px.js +295 -0
- package/build/utils/parse-css-unit-to-px.js.map +1 -0
- package/build/utils/transform-styles/transforms/wrap.js +16 -0
- package/build/utils/transform-styles/transforms/wrap.js.map +1 -1
- package/build-module/components/autocomplete/index.js +2 -2
- package/build-module/components/autocomplete/index.js.map +1 -1
- package/build-module/components/block-actions/index.js +8 -4
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js +64 -17
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js +25 -3
- package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build-module/components/block-content-overlay/index.js +2 -4
- package/build-module/components/block-content-overlay/index.js.map +1 -1
- package/build-module/components/block-controls/fill.js +6 -5
- package/build-module/components/block-controls/fill.js.map +1 -1
- package/build-module/components/block-controls/groups.js +3 -1
- package/build-module/components/block-controls/groups.js.map +1 -1
- package/build-module/components/block-controls/hook.js +42 -0
- package/build-module/components/block-controls/hook.js.map +1 -0
- package/build-module/components/block-edit/context.js +4 -4
- package/build-module/components/block-edit/context.js.map +1 -1
- package/build-module/components/block-edit/edit.js +1 -1
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-icon/index.js +5 -1
- package/build-module/components/block-icon/index.js.map +1 -1
- package/build-module/components/block-icon/index.native.js +14 -9
- package/build-module/components/block-icon/index.native.js.map +1 -1
- package/build-module/components/block-inspector/index.js +12 -6
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block-html.js +5 -0
- package/build-module/components/block-list/block-html.js.map +1 -1
- package/build-module/components/block-list/block-list-item.native.js +30 -12
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-selection-button.native.js +3 -4
- package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
- package/build-module/components/block-list/block.js +16 -10
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +6 -7
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/grid-item.native.js +57 -0
- package/build-module/components/block-list/grid-item.native.js.map +1 -0
- package/build-module/components/block-list/index.js +17 -14
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js +13 -9
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +7 -7
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js +5 -7
- package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-default-class-name.js +2 -2
- package/build-module/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-multi-selection.js +21 -6
- package/build-module/components/block-list/use-block-props/use-multi-selection.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +9 -1
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list-appender/index.js +9 -1
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-mover/index.js +4 -4
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +4 -4
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js +0 -1
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +1 -6
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-preview/auto.js +40 -16
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-settings/container.native.js +6 -3
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +28 -7
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +10 -3
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/index.js +5 -1
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/preview.native.js +2 -2
- package/build-module/components/block-styles/preview.native.js.map +1 -1
- package/build-module/components/block-switcher/block-styles-menu.js +1 -1
- package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build-module/components/block-switcher/index.js +10 -3
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-title/index.js +3 -2
- package/build-module/components/block-title/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +3 -0
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-tools/block-contextual-toolbar.js +1 -1
- package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build-module/components/block-tools/block-popover.js +9 -8
- package/build-module/components/block-tools/block-popover.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +2 -4
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/index.js +4 -1
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +96 -8
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js +3 -2
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/utils.js +16 -9
- package/build-module/components/border-radius-control/utils.js.map +1 -1
- package/build-module/components/colors/utils.js +9 -3
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +26 -63
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +84 -7
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build-module/components/contrast-checker/index.js +13 -10
- package/build-module/components/contrast-checker/index.js.map +1 -1
- package/build-module/components/copy-handler/index.js +9 -3
- package/build-module/components/copy-handler/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js +2 -2
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/duotone-control/index.js +43 -39
- package/build-module/components/duotone-control/index.js.map +1 -1
- package/build-module/components/editor-styles/index.js +7 -3
- package/build-module/components/editor-styles/index.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +40 -12
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/font-sizes/index.native.js +3 -1
- package/build-module/components/font-sizes/index.native.js.map +1 -1
- package/build-module/components/iframe/index.js +47 -65
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +115 -0
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -0
- package/build-module/components/image-editor/constants.js +7 -0
- package/build-module/components/image-editor/constants.js.map +1 -0
- package/build-module/components/image-editor/context.js +44 -0
- package/build-module/components/image-editor/context.js.map +1 -0
- package/build-module/components/image-editor/cropper.js +69 -0
- package/build-module/components/image-editor/cropper.js.map +1 -0
- package/build-module/components/image-editor/form-controls.js +26 -0
- package/build-module/components/image-editor/form-controls.js.map +1 -0
- package/build-module/components/image-editor/index.js +37 -0
- package/build-module/components/image-editor/index.js.map +1 -0
- package/build-module/components/image-editor/rotation-button.js +26 -0
- package/build-module/components/image-editor/rotation-button.js.map +1 -0
- package/build-module/components/image-editor/use-save-image.js +70 -0
- package/build-module/components/image-editor/use-save-image.js.map +1 -0
- package/build-module/components/image-editor/use-transform-image.js +127 -0
- package/build-module/components/image-editor/use-transform-image.js.map +1 -0
- package/build-module/components/image-editor/zoom-dropdown.js +43 -0
- package/build-module/components/image-editor/zoom-dropdown.js.map +1 -0
- package/build-module/components/image-size-control/use-dimension-handler.js +13 -2
- package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
- package/build-module/components/index.js +5 -6
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js +2 -3
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/button-block-appender.js +10 -1
- package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +29 -11
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js +41 -5
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +24 -13
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/explorer.js +50 -0
- package/build-module/components/inserter/block-patterns-explorer/explorer.js.map +1 -0
- package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +92 -0
- package/build-module/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -0
- package/build-module/components/inserter/block-patterns-explorer/sidebar.js +69 -0
- package/build-module/components/inserter/block-patterns-explorer/sidebar.js.map +1 -0
- package/build-module/components/inserter/block-patterns-tab.js +75 -36
- package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js +2 -5
- package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +4 -7
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-clipboard-block.native.js +5 -4
- package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build-module/components/inserter/index.js +12 -4
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/index.native.js +1 -7
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/library.js +2 -0
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/menu.js +2 -1
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/menu.native.js +17 -17
- package/build-module/components/inserter/menu.native.js.map +1 -1
- package/build-module/components/inserter/pattern-panel.js +21 -13
- package/build-module/components/inserter/pattern-panel.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js +1 -1
- package/build-module/components/inserter/preview-panel.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/inserter/reusable-blocks-tab.native.js +4 -5
- package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build-module/components/inserter/search-results.native.js +8 -2
- package/build-module/components/inserter/search-results.native.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js +1 -4
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inserter/utils.native.js +35 -0
- package/build-module/components/inserter/utils.native.js.map +1 -0
- package/build-module/components/inspector-controls/block-support-slot-container.js +18 -0
- package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -0
- package/build-module/components/inspector-controls/block-support-tools-panel.js +67 -0
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -0
- package/build-module/components/inspector-controls/fill.js +50 -0
- package/build-module/components/inspector-controls/fill.js.map +1 -0
- package/build-module/components/inspector-controls/{index.native.js → fill.native.js} +16 -18
- package/build-module/components/inspector-controls/fill.native.js.map +1 -0
- package/build-module/components/inspector-controls/groups.js +16 -0
- package/build-module/components/inspector-controls/groups.js.map +1 -0
- package/build-module/components/inspector-controls/index.js +16 -17
- package/build-module/components/inspector-controls/index.js.map +1 -1
- package/build-module/components/inspector-controls/slot.js +52 -0
- package/build-module/components/inspector-controls/slot.js.map +1 -0
- package/build-module/components/inspector-controls/slot.native.js +27 -0
- package/build-module/components/inspector-controls/slot.native.js.map +1 -0
- package/build-module/components/letter-spacing-control/index.js +9 -6
- package/build-module/components/letter-spacing-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.native.js +29 -0
- package/build-module/components/line-height-control/index.native.js.map +1 -0
- package/build-module/components/link-control/index.js +93 -35
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +46 -17
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/link-control/search-input.js +24 -7
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +1 -18
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block.js +56 -71
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +102 -78
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/index.js +55 -27
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/leaf.js +2 -2
- package/build-module/components/list-view/leaf.js.map +1 -1
- package/build-module/components/list-view/list-item.js +3 -2
- package/build-module/components/list-view/list-item.js.map +1 -1
- package/build-module/components/list-view/use-list-view-client-ids.js +13 -54
- package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +35 -21
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.native.js +2 -1
- package/build-module/components/media-placeholder/index.native.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +5 -3
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +1 -4
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/observe-typing/index.js +1 -1
- package/build-module/components/observe-typing/index.js.map +1 -1
- package/build-module/components/plain-text/index.native.js +29 -2
- package/build-module/components/plain-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js +54 -0
- package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -0
- package/build-module/components/rich-text/format-edit.js +28 -3
- package/build-module/components/rich-text/format-edit.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js +29 -11
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +22 -6
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +43 -6
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/input-event.js +24 -22
- package/build-module/components/rich-text/input-event.js.map +1 -1
- package/build-module/components/rich-text/shortcut.js +22 -9
- package/build-module/components/rich-text/shortcut.js.map +1 -1
- package/build-module/components/rich-text/use-input-events.js +19 -0
- package/build-module/components/rich-text/use-input-events.js.map +1 -0
- package/build-module/components/rich-text/use-paste-handler.js +44 -10
- package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
- package/build-module/components/rich-text/use-shortcuts.js +19 -0
- package/build-module/components/rich-text/use-shortcuts.js.map +1 -0
- package/build-module/components/rich-text/utils.js +20 -0
- package/build-module/components/rich-text/utils.js.map +1 -1
- package/build-module/components/typewriter/index.js +1 -1
- package/build-module/components/typewriter/index.js.map +1 -1
- package/build-module/components/url-input/index.js +25 -11
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/use-display-block-controls/index.js +5 -7
- package/build-module/components/use-display-block-controls/index.js.map +1 -1
- package/build-module/components/use-moving-animation/index.js +13 -10
- package/build-module/components/use-moving-animation/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js +3 -2
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/use-resize-canvas/index.js +2 -10
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/components/use-setting/index.js +48 -14
- package/build-module/components/use-setting/index.js.map +1 -1
- package/build-module/components/writing-flow/use-multi-selection.js +6 -0
- package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +18 -3
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/align.js +15 -15
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/anchor.js +5 -3
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/border-color.js +10 -5
- package/build-module/hooks/border-color.js.map +1 -1
- package/build-module/hooks/border.js +5 -5
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color-panel.js +6 -3
- package/build-module/hooks/color-panel.js.map +1 -1
- package/build-module/hooks/color.js +6 -4
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/compat.js +20 -0
- package/build-module/hooks/compat.js.map +1 -0
- package/build-module/hooks/custom-class-name.js +4 -2
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/dimensions.js +57 -26
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js +62 -18
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-appearance.js +45 -6
- package/build-module/hooks/font-appearance.js.map +1 -1
- package/build-module/hooks/font-family.js +117 -33
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js +47 -9
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/gap.js +140 -0
- package/build-module/hooks/gap.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/index.native.js +2 -0
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/hooks/layout.js +47 -30
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/letter-spacing.js +41 -8
- package/build-module/hooks/letter-spacing.js.map +1 -1
- package/build-module/hooks/line-height.js +41 -8
- package/build-module/hooks/line-height.js.map +1 -1
- package/build-module/hooks/lock.js +33 -0
- package/build-module/hooks/lock.js.map +1 -0
- package/build-module/hooks/margin.js +7 -4
- package/build-module/hooks/margin.js.map +1 -1
- package/build-module/hooks/padding.js +7 -4
- package/build-module/hooks/padding.js.map +1 -1
- package/build-module/hooks/style.js +39 -11
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/text-decoration.js +38 -6
- package/build-module/hooks/text-decoration.js.map +1 -1
- package/build-module/hooks/text-transform.js +38 -6
- package/build-module/hooks/text-transform.js.map +1 -1
- package/build-module/hooks/typography.js +118 -19
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/typography.native.js +41 -0
- package/build-module/hooks/typography.native.js.map +1 -0
- package/build-module/hooks/use-cached-truthy.js +21 -0
- package/build-module/hooks/use-cached-truthy.js.map +1 -0
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/layouts/flex.js +210 -12
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/flow.js +99 -7
- package/build-module/layouts/flow.js.map +1 -1
- package/build-module/store/actions.js +294 -242
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/defaults.js +2 -0
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/defaults.native.js +15 -1
- package/build-module/store/defaults.native.js.map +1 -1
- package/build-module/store/index.js +1 -2
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/reducer.js +167 -115
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +189 -104
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/index.js +1 -0
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/parse-css-unit-to-px.js +285 -0
- package/build-module/utils/parse-css-unit-to-px.js.map +1 -0
- package/build-module/utils/transform-styles/transforms/wrap.js +16 -0
- package/build-module/utils/transform-styles/transforms/wrap.js.map +1 -1
- package/build-style/default-editor-styles-rtl.css +114 -0
- package/build-style/default-editor-styles.css +114 -0
- package/build-style/style-rtl.css +292 -181
- package/build-style/style.css +292 -181
- package/build-types/components/block-context/index.d.ts +1 -1
- package/build-types/components/block-context/index.d.ts.map +1 -1
- package/package.json +28 -27
- package/src/components/autocomplete/index.js +5 -2
- package/src/components/block-actions/index.js +9 -5
- package/src/components/block-alignment-control/style.scss +5 -0
- package/src/components/block-alignment-control/test/__snapshots__/index.js.snap +15 -1
- package/src/components/block-alignment-control/test/index.native.js +37 -0
- package/src/components/block-alignment-control/ui.js +98 -27
- package/src/components/block-alignment-control/use-available-alignments.js +31 -10
- package/src/components/block-content-overlay/index.js +3 -6
- package/src/components/block-content-overlay/style.scss +9 -21
- package/src/components/block-controls/fill.js +7 -4
- package/src/components/block-controls/groups.js +2 -0
- package/src/components/block-controls/hook.js +44 -0
- package/src/components/block-draggable/style.scss +19 -4
- package/src/components/block-edit/context.js +4 -3
- package/src/components/block-edit/edit.js +1 -4
- package/src/components/block-icon/index.js +4 -1
- package/src/components/block-icon/index.native.js +11 -12
- package/src/components/block-inspector/index.js +19 -9
- package/src/components/block-list/block-html.js +5 -0
- package/src/components/block-list/block-list-item.native.js +34 -11
- package/src/components/block-list/block-list-item.native.scss +4 -0
- package/src/components/block-list/block-selection-button.native.js +8 -5
- package/src/components/block-list/block.js +13 -9
- package/src/components/block-list/block.native.js +7 -5
- package/src/components/block-list/grid-item.native.js +58 -0
- package/src/components/block-list/index.js +33 -27
- package/src/components/block-list/index.native.js +10 -4
- package/src/components/block-list/style.native.scss +0 -1
- package/src/components/block-list/style.scss +15 -0
- package/src/components/block-list/use-block-props/index.js +4 -7
- package/src/components/block-list/use-block-props/use-block-custom-class-name.js +5 -7
- package/src/components/block-list/use-block-props/use-block-default-class-name.js +2 -8
- package/src/components/block-list/use-block-props/use-multi-selection.js +30 -4
- package/src/components/block-list/use-in-between-inserter.js +9 -0
- package/src/components/block-list-appender/index.js +8 -0
- package/src/components/block-mover/index.js +4 -4
- package/src/components/block-mover/index.native.js +4 -4
- package/src/components/block-mover/test/__snapshots__/index.native.js.snap +10 -6
- package/src/components/block-mover/test/index.native.js +26 -28
- package/src/components/block-navigation/dropdown.js +0 -1
- package/src/components/block-patterns-list/index.js +1 -8
- package/src/components/block-patterns-list/style.scss +22 -12
- package/src/components/block-preview/README.md +1 -1
- package/src/components/block-preview/auto.js +36 -18
- package/src/components/block-preview/style.scss +0 -20
- package/src/components/block-settings/container.native.js +7 -0
- package/src/components/block-settings-menu/block-settings-dropdown.js +26 -13
- package/src/components/block-settings-menu-controls/index.js +9 -6
- package/src/components/block-styles/index.js +6 -1
- package/src/components/block-styles/preview.native.js +2 -2
- package/src/components/block-switcher/block-styles-menu.js +1 -1
- package/src/components/block-switcher/index.js +7 -3
- package/src/components/block-switcher/test/__snapshots__/index.js.snap +1 -1
- package/src/components/block-switcher/test/index.js +3 -0
- package/src/components/block-title/index.js +5 -2
- package/src/components/block-toolbar/index.js +4 -0
- package/src/components/block-tools/block-contextual-toolbar.js +7 -5
- package/src/components/block-tools/block-popover.js +8 -8
- package/src/components/block-tools/block-selection-button.js +2 -4
- package/src/components/block-tools/index.js +5 -2
- package/src/components/block-tools/insertion-point.js +97 -9
- package/src/components/block-tools/style.scss +4 -35
- package/src/components/block-types-list/index.native.js +8 -2
- package/src/components/block-types-list/style.scss +0 -3
- package/src/components/block-variation-picker/README.md +47 -14
- package/src/components/block-variation-picker/style.native.scss +4 -0
- package/src/components/border-radius-control/index.js +1 -0
- package/src/components/border-radius-control/test/utils.js +216 -0
- package/src/components/border-radius-control/utils.js +18 -10
- package/src/components/color-palette/test/__snapshots__/control.js.snap +128 -71
- package/src/components/colors/test/utils.js +41 -0
- package/src/components/colors/utils.js +9 -5
- package/src/components/colors-gradients/control.js +70 -110
- package/src/components/colors-gradients/panel-color-gradient-settings.js +79 -7
- package/src/components/colors-gradients/style.scss +10 -18
- package/src/components/colors-gradients/test/control.js +41 -66
- package/src/components/contrast-checker/index.js +14 -10
- package/src/components/copy-handler/index.js +6 -1
- package/src/components/default-block-appender/index.js +2 -2
- package/src/components/default-block-appender/test/__snapshots__/index.js.snap +3 -3
- package/src/components/duotone-control/index.js +49 -41
- package/src/components/duotone-control/style.scss +27 -12
- package/src/components/editor-styles/index.js +8 -4
- package/src/components/font-appearance-control/index.js +62 -24
- package/src/components/font-appearance-control/style.scss +1 -1
- package/src/components/font-sizes/index.native.js +7 -1
- package/src/components/iframe/index.js +64 -75
- package/src/components/image-editor/aspect-ratio-dropdown.js +129 -0
- package/src/components/image-editor/constants.js +6 -0
- package/src/components/image-editor/context.js +56 -0
- package/src/components/image-editor/cropper.js +74 -0
- package/src/components/image-editor/form-controls.js +22 -0
- package/src/components/image-editor/index.js +52 -0
- package/src/components/image-editor/rotation-button.js +24 -0
- package/src/components/image-editor/use-save-image.js +97 -0
- package/src/components/image-editor/use-transform-image.js +162 -0
- package/src/components/image-editor/zoom-dropdown.js +40 -0
- package/src/components/image-size-control/use-dimension-handler.js +18 -1
- package/src/components/index.js +10 -8
- package/src/components/index.native.js +5 -3
- package/src/components/inner-blocks/button-block-appender.js +9 -0
- package/src/components/inner-blocks/index.js +43 -14
- package/src/components/inner-blocks/index.native.js +48 -4
- package/src/components/inner-blocks/use-nested-settings-update.js +26 -11
- package/src/components/inserter/block-patterns-explorer/explorer.js +50 -0
- package/src/components/inserter/block-patterns-explorer/patterns-list.js +122 -0
- package/src/components/inserter/block-patterns-explorer/sidebar.js +73 -0
- package/src/components/inserter/block-patterns-tab.js +107 -73
- package/src/components/inserter/block-types-tab.native.js +3 -6
- package/src/components/inserter/hooks/use-block-type-impressions.native.js +14 -21
- package/src/components/inserter/hooks/use-clipboard-block.native.js +3 -2
- package/src/components/inserter/index.js +15 -3
- package/src/components/inserter/index.native.js +2 -19
- package/src/components/inserter/library.js +2 -0
- package/src/components/inserter/menu.js +4 -1
- package/src/components/inserter/menu.native.js +18 -15
- package/src/components/inserter/pattern-panel.js +33 -16
- package/src/components/inserter/preview-panel.js +1 -1
- package/src/components/inserter/quick-inserter.js +1 -1
- package/src/components/inserter/reusable-blocks-tab.native.js +4 -6
- package/src/components/inserter/search-results.native.js +8 -1
- package/src/components/inserter/style.native.scss +8 -5
- package/src/components/inserter/style.scss +80 -16
- package/src/components/inserter/tabs.native.js +1 -7
- package/src/components/inserter/test/block-types-tab.native.js +3 -2
- package/src/components/inserter/test/fixtures/index.native.js +12 -0
- package/src/components/inserter/utils.native.js +35 -0
- package/src/components/inserter-list-item/style.scss +4 -2
- package/src/components/inspector-controls/README.md +43 -198
- package/src/components/inspector-controls/block-support-slot-container.js +10 -0
- package/src/components/inspector-controls/block-support-tools-panel.js +60 -0
- package/src/components/inspector-controls/fill.js +53 -0
- package/src/components/inspector-controls/{index.native.js → fill.native.js} +14 -14
- package/src/components/inspector-controls/groups.js +22 -0
- package/src/components/inspector-controls/index.js +16 -18
- package/src/components/inspector-controls/slot.js +45 -0
- package/src/components/inspector-controls/slot.native.js +22 -0
- package/src/components/letter-spacing-control/index.js +12 -6
- package/src/components/line-height-control/index.native.js +25 -0
- package/src/components/link-control/README.md +47 -14
- package/src/components/link-control/index.js +102 -31
- package/src/components/link-control/link-preview.js +53 -20
- package/src/components/link-control/search-input.js +21 -7
- package/src/components/link-control/style.scss +66 -19
- package/src/components/link-control/test/index.js +311 -4
- package/src/components/list-view/block-contents.js +17 -38
- package/src/components/list-view/block.js +73 -84
- package/src/components/list-view/branch.js +123 -94
- package/src/components/list-view/index.js +95 -37
- package/src/components/list-view/leaf.js +2 -2
- package/src/components/list-view/list-item.js +5 -4
- package/src/components/list-view/style.scss +70 -33
- package/src/components/list-view/use-list-view-client-ids.js +9 -68
- package/src/components/media-placeholder/README.md +9 -0
- package/src/components/media-placeholder/index.js +31 -20
- package/src/components/media-placeholder/index.native.js +2 -1
- package/src/components/media-placeholder/style.scss +2 -0
- package/src/components/media-replace-flow/README.md +7 -0
- package/src/components/media-replace-flow/index.js +4 -1
- package/src/components/media-replace-flow/style.scss +11 -12
- package/src/components/media-upload/README.md +1 -1
- package/src/components/navigable-toolbar/index.js +1 -4
- package/src/components/observe-typing/index.js +3 -2
- package/src/components/plain-text/index.native.js +26 -4
- package/src/components/rich-text/embed-handler-picker.native.js +68 -0
- package/src/components/rich-text/format-edit.js +36 -2
- package/src/components/rich-text/format-toolbar/index.js +25 -6
- package/src/components/rich-text/index.js +38 -12
- package/src/components/rich-text/index.native.js +37 -4
- package/src/components/rich-text/input-event.js +21 -20
- package/src/components/rich-text/shortcut.js +24 -9
- package/src/components/rich-text/style.scss +7 -5
- package/src/components/rich-text/use-input-events.js +19 -0
- package/src/components/rich-text/use-paste-handler.js +47 -12
- package/src/components/rich-text/use-shortcuts.js +19 -0
- package/src/components/rich-text/utils.js +16 -0
- package/src/components/skip-to-selected-block/README.md +39 -0
- package/src/components/tool-selector/style.scss +5 -5
- package/src/components/typewriter/index.js +3 -2
- package/src/components/url-input/index.js +26 -10
- package/src/components/use-display-block-controls/index.js +7 -10
- package/src/components/use-moving-animation/index.js +9 -8
- package/src/components/use-on-block-drop/index.js +5 -1
- package/src/components/use-resize-canvas/index.js +2 -17
- package/src/components/use-setting/index.js +48 -16
- package/src/components/writing-flow/use-multi-selection.js +6 -0
- package/src/components/writing-flow/use-tab-nav.js +21 -11
- package/src/default-editor-styles.scss +24 -0
- package/src/hooks/align.js +28 -20
- package/src/hooks/anchor.js +5 -5
- package/src/hooks/border-color.js +12 -1
- package/src/hooks/border.js +8 -11
- package/src/hooks/color-panel.js +4 -1
- package/src/hooks/color.js +11 -4
- package/src/hooks/compat.js +23 -0
- package/src/hooks/custom-class-name.js +3 -3
- package/src/hooks/dimensions.js +94 -50
- package/src/hooks/duotone.js +70 -21
- package/src/hooks/font-appearance.js +38 -7
- package/src/hooks/font-family.js +129 -33
- package/src/hooks/font-size.js +42 -6
- package/src/hooks/gap.js +146 -0
- package/src/hooks/index.js +3 -0
- package/src/hooks/index.native.js +2 -0
- package/src/hooks/layout.js +82 -56
- package/src/hooks/layout.scss +8 -0
- package/src/hooks/letter-spacing.js +37 -8
- package/src/hooks/line-height.js +37 -9
- package/src/hooks/lock.js +34 -0
- package/src/hooks/margin.js +13 -3
- package/src/hooks/padding.js +13 -3
- package/src/hooks/style.js +57 -18
- package/src/hooks/test/style.js +4 -0
- package/src/hooks/text-decoration.js +34 -6
- package/src/hooks/text-transform.js +34 -6
- package/src/hooks/typography.js +167 -21
- package/src/hooks/typography.native.js +64 -0
- package/src/hooks/typography.scss +16 -0
- package/src/hooks/use-cached-truthy.js +20 -0
- package/src/index.js +1 -0
- package/src/layouts/flex.js +237 -14
- package/src/layouts/flow.js +81 -14
- package/src/store/actions.js +248 -378
- package/src/store/defaults.js +2 -0
- package/src/store/defaults.native.js +15 -0
- package/src/store/index.js +1 -2
- package/src/store/reducer.js +248 -145
- package/src/store/selectors.js +212 -158
- package/src/store/test/actions.js +407 -705
- package/src/store/test/reducer.js +184 -146
- package/src/store/test/selectors.js +197 -177
- package/src/style.scss +2 -15
- package/src/utils/index.js +1 -0
- package/src/utils/parse-css-unit-to-px.js +272 -0
- package/src/utils/test/parse-css-unit-to-px.js +166 -0
- package/src/utils/transform-styles/transforms/test/wrap.js +1 -1
- package/src/utils/transform-styles/transforms/wrap.js +16 -0
- package/tsconfig.tsbuildinfo +1 -466
- package/build/components/block-list/head.js +0 -27
- package/build/components/block-list/head.js.map +0 -1
- package/build/components/duotone-control/duotone-picker-popover.js +0 -44
- package/build/components/duotone-control/duotone-picker-popover.js.map +0 -1
- package/build/components/inspector-advanced-controls/index.js +0 -46
- package/build/components/inspector-advanced-controls/index.js.map +0 -1
- package/build/components/inspector-controls/index.native.js.map +0 -1
- package/build/components/list-view/block-slot.js +0 -121
- package/build/components/list-view/block-slot.js.map +0 -1
- package/build/components/list-view/editor.js +0 -35
- package/build/components/list-view/editor.js.map +0 -1
- package/build/components/text-decoration-and-transform/index.js +0 -39
- package/build/components/text-decoration-and-transform/index.js.map +0 -1
- package/build/components/use-simulated-media-query/index.js +0 -137
- package/build/components/use-simulated-media-query/index.js.map +0 -1
- package/build/store/controls.js +0 -44
- package/build/store/controls.js.map +0 -1
- package/build-module/components/block-list/head.js +0 -19
- package/build-module/components/block-list/head.js.map +0 -1
- package/build-module/components/duotone-control/duotone-picker-popover.js +0 -35
- package/build-module/components/duotone-control/duotone-picker-popover.js.map +0 -1
- package/build-module/components/inspector-advanced-controls/index.js +0 -36
- package/build-module/components/inspector-advanced-controls/index.js.map +0 -1
- package/build-module/components/inspector-controls/index.native.js.map +0 -1
- package/build-module/components/list-view/block-slot.js +0 -96
- package/build-module/components/list-view/block-slot.js.map +0 -1
- package/build-module/components/list-view/editor.js +0 -25
- package/build-module/components/list-view/editor.js.map +0 -1
- package/build-module/components/text-decoration-and-transform/index.js +0 -30
- package/build-module/components/text-decoration-and-transform/index.js.map +0 -1
- package/build-module/components/use-simulated-media-query/index.js +0 -126
- package/build-module/components/use-simulated-media-query/index.js.map +0 -1
- package/build-module/store/controls.js +0 -32
- package/build-module/store/controls.js.map +0 -1
- package/src/components/block-list/head.js +0 -18
- package/src/components/duotone-control/duotone-picker-popover.js +0 -36
- package/src/components/inspector-advanced-controls/README.md +0 -72
- package/src/components/inspector-advanced-controls/index.js +0 -32
- package/src/components/list-view/block-slot.js +0 -120
- package/src/components/list-view/editor.js +0 -29
- package/src/components/text-decoration-and-transform/index.js +0 -36
- package/src/components/text-decoration-and-transform/style.scss +0 -3
- package/src/components/use-simulated-media-query/index.js +0 -144
- package/src/store/controls.js +0 -39
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/list-view/block-slot.js"],"names":["classnames","getBlockType","Fill","Slot","VisuallyHidden","useInstanceId","useSelect","Children","cloneElement","forwardRef","useContext","__","BlockIcon","BlockListBlockContext","ListViewBlockSelectButton","getBlockPositionDescription","store","blockEditorStore","ListViewExpander","getSlotName","clientId","ListViewBlockSlot","props","ref","block","name","select","getBlockName","instanceId","fills","length","className","isSelected","position","siblingBlockCount","level","tabIndex","onFocus","onToggleExpanded","blockType","descriptionId","blockPositionDescription","forwardedFillProps","icon","map","fill","ListViewBlockFill"],"mappings":"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","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { Fill, Slot, VisuallyHidden } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tChildren,\n\tcloneElement,\n\tforwardRef,\n\tuseContext,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { BlockListBlockContext } from '../block-list/block';\nimport ListViewBlockSelectButton from './block-select-button';\nimport { getBlockPositionDescription } from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport ListViewExpander from './expander';\n\nconst getSlotName = ( clientId ) => `ListViewBlock-${ clientId }`;\n\nfunction ListViewBlockSlot( props, ref ) {\n\tconst { clientId } = props.block;\n\tconst { name } = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlockName( clientId ),\n\t\t[ clientId ]\n\t);\n\tconst instanceId = useInstanceId( ListViewBlockSlot );\n\n\treturn (\n\t\t<Slot name={ getSlotName( clientId ) }>\n\t\t\t{ ( fills ) => {\n\t\t\t\tif ( ! fills.length ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<ListViewBlockSelectButton ref={ ref } { ...props } />\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst {\n\t\t\t\t\tclassName,\n\t\t\t\t\tisSelected,\n\t\t\t\t\tposition,\n\t\t\t\t\tsiblingBlockCount,\n\t\t\t\t\tlevel,\n\t\t\t\t\ttabIndex,\n\t\t\t\t\tonFocus,\n\t\t\t\t\tonToggleExpanded,\n\t\t\t\t} = props;\n\n\t\t\t\tconst blockType = getBlockType( name );\n\t\t\t\tconst descriptionId = `list-view-block-slot__${ instanceId }`;\n\t\t\t\tconst blockPositionDescription = getBlockPositionDescription(\n\t\t\t\t\tposition,\n\t\t\t\t\tsiblingBlockCount,\n\t\t\t\t\tlevel\n\t\t\t\t);\n\n\t\t\t\tconst forwardedFillProps = {\n\t\t\t\t\t// Ensure that the component in the slot can receive\n\t\t\t\t\t// keyboard navigation.\n\t\t\t\t\ttabIndex,\n\t\t\t\t\tonFocus,\n\t\t\t\t\tref,\n\t\t\t\t\t// Give the element rendered in the slot a description\n\t\t\t\t\t// that describes its position.\n\t\t\t\t\t'aria-describedby': descriptionId,\n\t\t\t\t};\n\n\t\t\t\treturn (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'block-editor-list-view-block-slot',\n\t\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ListViewExpander onClick={ onToggleExpanded } />\n\t\t\t\t\t\t\t<BlockIcon icon={ blockType.icon } showColors />\n\t\t\t\t\t\t\t{ Children.map( fills, ( fill ) =>\n\t\t\t\t\t\t\t\tcloneElement( fill, {\n\t\t\t\t\t\t\t\t\t...fill.props,\n\t\t\t\t\t\t\t\t\t...forwardedFillProps,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t\t\t\t{ __( '(selected block)' ) }\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-slot__description\"\n\t\t\t\t\t\t\t\tid={ descriptionId }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ blockPositionDescription }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t);\n\t\t\t} }\n\t\t</Slot>\n\t);\n}\n\nexport default forwardRef( ListViewBlockSlot );\n\nexport const ListViewBlockFill = ( props ) => {\n\tconst { clientId } = useContext( BlockListBlockContext );\n\treturn <Fill { ...props } name={ getSlotName( clientId ) } />;\n};\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* WordPress dependencies
|
|
5
|
-
*/
|
|
6
|
-
import { __ } from '@wordpress/i18n';
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { RichText } from '../';
|
|
12
|
-
import { ListViewBlockFill } from './block-slot';
|
|
13
|
-
export default function ListViewEditor({
|
|
14
|
-
value,
|
|
15
|
-
onChange
|
|
16
|
-
}) {
|
|
17
|
-
return createElement(ListViewBlockFill, null, createElement(RichText, {
|
|
18
|
-
value: value,
|
|
19
|
-
onChange: onChange,
|
|
20
|
-
placeholder: __('Navigation item'),
|
|
21
|
-
withoutInteractiveFormatting: true,
|
|
22
|
-
allowedFormats: ['core/bold', 'core/italic', 'core/image', 'core/strikethrough']
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=editor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/list-view/editor.js"],"names":["__","RichText","ListViewBlockFill","ListViewEditor","value","onChange"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA;;AACA,SAASC,QAAT,QAAyB,KAAzB;AACA,SAASC,iBAAT,QAAkC,cAAlC;AAEA,eAAe,SAASC,cAAT,CAAyB;AAAEC,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAAzB,EAA+C;AAC7D,SACC,cAAC,iBAAD,QACC,cAAC,QAAD;AACC,IAAA,KAAK,EAAGD,KADT;AAEC,IAAA,QAAQ,EAAGC,QAFZ;AAGC,IAAA,WAAW,EAAGL,EAAE,CAAE,iBAAF,CAHjB;AAIC,IAAA,4BAA4B,MAJ7B;AAKC,IAAA,cAAc,EAAG,CAChB,WADgB,EAEhB,aAFgB,EAGhB,YAHgB,EAIhB,oBAJgB;AALlB,IADD,CADD;AAgBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { RichText } from '../';\nimport { ListViewBlockFill } from './block-slot';\n\nexport default function ListViewEditor( { value, onChange } ) {\n\treturn (\n\t\t<ListViewBlockFill>\n\t\t\t<RichText\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tplaceholder={ __( 'Navigation item' ) }\n\t\t\t\twithoutInteractiveFormatting\n\t\t\t\tallowedFormats={ [\n\t\t\t\t\t'core/bold',\n\t\t\t\t\t'core/italic',\n\t\t\t\t\t'core/image',\n\t\t\t\t\t'core/strikethrough',\n\t\t\t\t] }\n\t\t\t/>\n\t\t</ListViewBlockFill>\n\t);\n}\n"]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Internal dependencies
|
|
5
|
-
*/
|
|
6
|
-
import { TextDecorationEdit, useIsTextDecorationDisabled } from '../../hooks/text-decoration';
|
|
7
|
-
import { TextTransformEdit, useIsTextTransformDisabled } from '../../hooks/text-transform';
|
|
8
|
-
/**
|
|
9
|
-
* Handles grouping related text decoration and text transform edit components
|
|
10
|
-
* so they can be laid out in a more flexible manner within the Typography
|
|
11
|
-
* InspectorControls panel.
|
|
12
|
-
*
|
|
13
|
-
* @param {Object} props Block props to be passed on to individual controls.
|
|
14
|
-
*
|
|
15
|
-
* @return {WPElement} Component containing text decoration or transform controls.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
export default function TextDecorationAndTransformEdit(props) {
|
|
19
|
-
const decorationAvailable = !useIsTextDecorationDisabled(props);
|
|
20
|
-
const transformAvailable = !useIsTextTransformDisabled(props);
|
|
21
|
-
|
|
22
|
-
if (!decorationAvailable && !transformAvailable) {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return createElement("div", {
|
|
27
|
-
className: "block-editor-text-decoration-and-transform"
|
|
28
|
-
}, decorationAvailable && createElement(TextDecorationEdit, props), transformAvailable && createElement(TextTransformEdit, props));
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/text-decoration-and-transform/index.js"],"names":["TextDecorationEdit","useIsTextDecorationDisabled","TextTransformEdit","useIsTextTransformDisabled","TextDecorationAndTransformEdit","props","decorationAvailable","transformAvailable"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,kBADD,EAECC,2BAFD,QAGO,6BAHP;AAIA,SACCC,iBADD,EAECC,0BAFD,QAGO,4BAHP;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASC,8BAAT,CAAyCC,KAAzC,EAAiD;AAC/D,QAAMC,mBAAmB,GAAG,CAAEL,2BAA2B,CAAEI,KAAF,CAAzD;AACA,QAAME,kBAAkB,GAAG,CAAEJ,0BAA0B,CAAEE,KAAF,CAAvD;;AAEA,MAAK,CAAEC,mBAAF,IAAyB,CAAEC,kBAAhC,EAAqD;AACpD,WAAO,IAAP;AACA;;AAED,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGD,mBAAmB,IAAI,cAAC,kBAAD,EAAyBD,KAAzB,CAD1B,EAEGE,kBAAkB,IAAI,cAAC,iBAAD,EAAwBF,KAAxB,CAFzB,CADD;AAMA","sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tTextDecorationEdit,\n\tuseIsTextDecorationDisabled,\n} from '../../hooks/text-decoration';\nimport {\n\tTextTransformEdit,\n\tuseIsTextTransformDisabled,\n} from '../../hooks/text-transform';\n\n/**\n * Handles grouping related text decoration and text transform edit components\n * so they can be laid out in a more flexible manner within the Typography\n * InspectorControls panel.\n *\n * @param {Object} props Block props to be passed on to individual controls.\n *\n * @return {WPElement} Component containing text decoration or transform controls.\n */\nexport default function TextDecorationAndTransformEdit( props ) {\n\tconst decorationAvailable = ! useIsTextDecorationDisabled( props );\n\tconst transformAvailable = ! useIsTextTransformDisabled( props );\n\n\tif ( ! decorationAvailable && ! transformAvailable ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className=\"block-editor-text-decoration-and-transform\">\n\t\t\t{ decorationAvailable && <TextDecorationEdit { ...props } /> }\n\t\t\t{ transformAvailable && <TextTransformEdit { ...props } /> }\n\t\t</div>\n\t);\n}\n"]}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { filter } from 'lodash';
|
|
5
|
-
import { match } from 'css-mediaquery';
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { useEffect } from '@wordpress/element';
|
|
11
|
-
import { getProtocol, getAuthority } from '@wordpress/url';
|
|
12
|
-
const ENABLED_MEDIA_QUERY = '(min-width:0px)';
|
|
13
|
-
const DISABLED_MEDIA_QUERY = '(min-width:999999px)';
|
|
14
|
-
const VALID_MEDIA_QUERY_REGEX = /\((min|max)-width:[^\(]*?\)/g;
|
|
15
|
-
|
|
16
|
-
function getStyleSheetsThatMatchHostname() {
|
|
17
|
-
var _window$document$styl, _window, _window$document;
|
|
18
|
-
|
|
19
|
-
if (typeof window === 'undefined') {
|
|
20
|
-
return [];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return filter((_window$document$styl = (_window = window) === null || _window === void 0 ? void 0 : (_window$document = _window.document) === null || _window$document === void 0 ? void 0 : _window$document.styleSheets) !== null && _window$document$styl !== void 0 ? _window$document$styl : [], styleSheet => {
|
|
24
|
-
if (!styleSheet.href) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return getProtocol(styleSheet.href) === window.location.protocol && getAuthority(styleSheet.href) === window.location.host;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function isReplaceableMediaRule(rule) {
|
|
33
|
-
if (!rule.media) {
|
|
34
|
-
return false;
|
|
35
|
-
} // Need to use "media.mediaText" instead of "conditionText" for IE support.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return !!rule.media.mediaText.match(VALID_MEDIA_QUERY_REGEX);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function replaceRule(styleSheet, newRuleText, index) {
|
|
42
|
-
styleSheet.deleteRule(index);
|
|
43
|
-
styleSheet.insertRule(newRuleText, index);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function replaceMediaQueryWithWidthEvaluation(ruleText, widthValue) {
|
|
47
|
-
return ruleText.replace(VALID_MEDIA_QUERY_REGEX, matchedSubstring => {
|
|
48
|
-
if (match(matchedSubstring, {
|
|
49
|
-
type: 'screen',
|
|
50
|
-
width: widthValue
|
|
51
|
-
})) {
|
|
52
|
-
return ENABLED_MEDIA_QUERY;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return DISABLED_MEDIA_QUERY;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Function that manipulates media queries from stylesheets to simulate a given
|
|
60
|
-
* viewport width.
|
|
61
|
-
*
|
|
62
|
-
* @param {string} marker CSS selector string defining start and end of
|
|
63
|
-
* manipulable styles.
|
|
64
|
-
* @param {number?} width Viewport width to simulate. If provided null, the
|
|
65
|
-
* stylesheets will not be modified.
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
export default function useSimulatedMediaQuery(marker, width) {
|
|
70
|
-
useEffect(() => {
|
|
71
|
-
if (!width) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
const styleSheets = getStyleSheetsThatMatchHostname();
|
|
76
|
-
const originalStyles = [];
|
|
77
|
-
styleSheets.forEach((styleSheet, styleSheetIndex) => {
|
|
78
|
-
let relevantSection = false;
|
|
79
|
-
|
|
80
|
-
for (let ruleIndex = 0; ruleIndex < styleSheet.cssRules.length; ++ruleIndex) {
|
|
81
|
-
const rule = styleSheet.cssRules[ruleIndex];
|
|
82
|
-
|
|
83
|
-
if (rule.type !== window.CSSRule.STYLE_RULE && rule.type !== window.CSSRule.MEDIA_RULE) {
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (!relevantSection && !!rule.cssText.match(new RegExp(`#start-${marker}`))) {
|
|
88
|
-
relevantSection = true;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (relevantSection && !!rule.cssText.match(new RegExp(`#end-${marker}`))) {
|
|
92
|
-
relevantSection = false;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (!relevantSection || !isReplaceableMediaRule(rule)) {
|
|
96
|
-
continue;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const ruleText = rule.cssText;
|
|
100
|
-
|
|
101
|
-
if (!originalStyles[styleSheetIndex]) {
|
|
102
|
-
originalStyles[styleSheetIndex] = [];
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
originalStyles[styleSheetIndex][ruleIndex] = ruleText;
|
|
106
|
-
replaceRule(styleSheet, replaceMediaQueryWithWidthEvaluation(ruleText, width), ruleIndex);
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
return () => {
|
|
110
|
-
originalStyles.forEach((rulesCollection, styleSheetIndex) => {
|
|
111
|
-
if (!rulesCollection) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
for (let ruleIndex = 0; ruleIndex < rulesCollection.length; ++ruleIndex) {
|
|
116
|
-
const originalRuleText = rulesCollection[ruleIndex];
|
|
117
|
-
|
|
118
|
-
if (originalRuleText) {
|
|
119
|
-
replaceRule(styleSheets[styleSheetIndex], originalRuleText, ruleIndex);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
}, [width]);
|
|
125
|
-
}
|
|
126
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/use-simulated-media-query/index.js"],"names":["filter","match","useEffect","getProtocol","getAuthority","ENABLED_MEDIA_QUERY","DISABLED_MEDIA_QUERY","VALID_MEDIA_QUERY_REGEX","getStyleSheetsThatMatchHostname","window","document","styleSheets","styleSheet","href","location","protocol","host","isReplaceableMediaRule","rule","media","mediaText","replaceRule","newRuleText","index","deleteRule","insertRule","replaceMediaQueryWithWidthEvaluation","ruleText","widthValue","replace","matchedSubstring","type","width","useSimulatedMediaQuery","marker","originalStyles","forEach","styleSheetIndex","relevantSection","ruleIndex","cssRules","length","CSSRule","STYLE_RULE","MEDIA_RULE","cssText","RegExp","rulesCollection","originalRuleText"],"mappings":"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","sourcesContent":["/**\n * External dependencies\n */\nimport { filter } from 'lodash';\nimport { match } from 'css-mediaquery';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { getProtocol, getAuthority } from '@wordpress/url';\n\nconst ENABLED_MEDIA_QUERY = '(min-width:0px)';\nconst DISABLED_MEDIA_QUERY = '(min-width:999999px)';\n\nconst VALID_MEDIA_QUERY_REGEX = /\\((min|max)-width:[^\\(]*?\\)/g;\n\nfunction getStyleSheetsThatMatchHostname() {\n\tif ( typeof window === 'undefined' ) {\n\t\treturn [];\n\t}\n\n\treturn filter( window?.document?.styleSheets ?? [], ( styleSheet ) => {\n\t\tif ( ! styleSheet.href ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn (\n\t\t\tgetProtocol( styleSheet.href ) === window.location.protocol &&\n\t\t\tgetAuthority( styleSheet.href ) === window.location.host\n\t\t);\n\t} );\n}\n\nfunction isReplaceableMediaRule( rule ) {\n\tif ( ! rule.media ) {\n\t\treturn false;\n\t}\n\t// Need to use \"media.mediaText\" instead of \"conditionText\" for IE support.\n\treturn !! rule.media.mediaText.match( VALID_MEDIA_QUERY_REGEX );\n}\n\nfunction replaceRule( styleSheet, newRuleText, index ) {\n\tstyleSheet.deleteRule( index );\n\tstyleSheet.insertRule( newRuleText, index );\n}\n\nfunction replaceMediaQueryWithWidthEvaluation( ruleText, widthValue ) {\n\treturn ruleText.replace( VALID_MEDIA_QUERY_REGEX, ( matchedSubstring ) => {\n\t\tif (\n\t\t\tmatch( matchedSubstring, {\n\t\t\t\ttype: 'screen',\n\t\t\t\twidth: widthValue,\n\t\t\t} )\n\t\t) {\n\t\t\treturn ENABLED_MEDIA_QUERY;\n\t\t}\n\t\treturn DISABLED_MEDIA_QUERY;\n\t} );\n}\n\n/**\n * Function that manipulates media queries from stylesheets to simulate a given\n * viewport width.\n *\n * @param {string} marker CSS selector string defining start and end of\n * manipulable styles.\n * @param {number?} width Viewport width to simulate. If provided null, the\n * stylesheets will not be modified.\n */\nexport default function useSimulatedMediaQuery( marker, width ) {\n\tuseEffect( () => {\n\t\tif ( ! width ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst styleSheets = getStyleSheetsThatMatchHostname();\n\t\tconst originalStyles = [];\n\t\tstyleSheets.forEach( ( styleSheet, styleSheetIndex ) => {\n\t\t\tlet relevantSection = false;\n\t\t\tfor (\n\t\t\t\tlet ruleIndex = 0;\n\t\t\t\truleIndex < styleSheet.cssRules.length;\n\t\t\t\t++ruleIndex\n\t\t\t) {\n\t\t\t\tconst rule = styleSheet.cssRules[ ruleIndex ];\n\t\t\t\tif (\n\t\t\t\t\trule.type !== window.CSSRule.STYLE_RULE &&\n\t\t\t\t\trule.type !== window.CSSRule.MEDIA_RULE\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t! relevantSection &&\n\t\t\t\t\t!! rule.cssText.match( new RegExp( `#start-${ marker }` ) )\n\t\t\t\t) {\n\t\t\t\t\trelevantSection = true;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trelevantSection &&\n\t\t\t\t\t!! rule.cssText.match( new RegExp( `#end-${ marker }` ) )\n\t\t\t\t) {\n\t\t\t\t\trelevantSection = false;\n\t\t\t\t}\n\n\t\t\t\tif ( ! relevantSection || ! isReplaceableMediaRule( rule ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst ruleText = rule.cssText;\n\t\t\t\tif ( ! originalStyles[ styleSheetIndex ] ) {\n\t\t\t\t\toriginalStyles[ styleSheetIndex ] = [];\n\t\t\t\t}\n\t\t\t\toriginalStyles[ styleSheetIndex ][ ruleIndex ] = ruleText;\n\t\t\t\treplaceRule(\n\t\t\t\t\tstyleSheet,\n\t\t\t\t\treplaceMediaQueryWithWidthEvaluation( ruleText, width ),\n\t\t\t\t\truleIndex\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t\treturn () => {\n\t\t\toriginalStyles.forEach( ( rulesCollection, styleSheetIndex ) => {\n\t\t\t\tif ( ! rulesCollection ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfor (\n\t\t\t\t\tlet ruleIndex = 0;\n\t\t\t\t\truleIndex < rulesCollection.length;\n\t\t\t\t\t++ruleIndex\n\t\t\t\t) {\n\t\t\t\t\tconst originalRuleText = rulesCollection[ ruleIndex ];\n\t\t\t\t\tif ( originalRuleText ) {\n\t\t\t\t\t\treplaceRule(\n\t\t\t\t\t\t\tstyleSheets[ styleSheetIndex ],\n\t\t\t\t\t\t\toriginalRuleText,\n\t\t\t\t\t\t\truleIndex\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}, [ width ] );\n}\n"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { createRegistryControl } from '@wordpress/data';
|
|
5
|
-
/**
|
|
6
|
-
* Internal dependencies
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { store as blockEditorStore } from '../store';
|
|
10
|
-
export const __unstableMarkAutomaticChangeFinalControl = function () {
|
|
11
|
-
return {
|
|
12
|
-
type: 'MARK_AUTOMATIC_CHANGE_FINAL_CONTROL'
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
const controls = {
|
|
16
|
-
SLEEP({
|
|
17
|
-
duration
|
|
18
|
-
}) {
|
|
19
|
-
return new Promise(resolve => {
|
|
20
|
-
setTimeout(resolve, duration);
|
|
21
|
-
});
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
MARK_AUTOMATIC_CHANGE_FINAL_CONTROL: createRegistryControl(registry => () => {
|
|
25
|
-
const {
|
|
26
|
-
requestIdleCallback = callback => setTimeout(callback, 100)
|
|
27
|
-
} = window;
|
|
28
|
-
requestIdleCallback(() => registry.dispatch(blockEditorStore).__unstableMarkAutomaticChangeFinal());
|
|
29
|
-
})
|
|
30
|
-
};
|
|
31
|
-
export default controls;
|
|
32
|
-
//# sourceMappingURL=controls.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/store/controls.js"],"names":["createRegistryControl","store","blockEditorStore","__unstableMarkAutomaticChangeFinalControl","type","controls","SLEEP","duration","Promise","resolve","setTimeout","MARK_AUTOMATIC_CHANGE_FINAL_CONTROL","registry","requestIdleCallback","callback","window","dispatch","__unstableMarkAutomaticChangeFinal"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,qBAAT,QAAsC,iBAAtC;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,gBAAlB,QAA0C,UAA1C;AAEA,OAAO,MAAMC,yCAAyC,GAAG,YAAY;AACpE,SAAO;AACNC,IAAAA,IAAI,EAAE;AADA,GAAP;AAGA,CAJM;AAMP,MAAMC,QAAQ,GAAG;AAChBC,EAAAA,KAAK,CAAE;AAAEC,IAAAA;AAAF,GAAF,EAAiB;AACrB,WAAO,IAAIC,OAAJ,CAAeC,OAAF,IAAe;AAClCC,MAAAA,UAAU,CAAED,OAAF,EAAWF,QAAX,CAAV;AACA,KAFM,CAAP;AAGA,GALe;;AAOhBI,EAAAA,mCAAmC,EAAEX,qBAAqB,CACvDY,QAAF,IAAgB,MAAM;AACrB,UAAM;AACLC,MAAAA,mBAAmB,GAAKC,QAAF,IACrBJ,UAAU,CAAEI,QAAF,EAAY,GAAZ;AAFN,QAGFC,MAHJ;AAIAF,IAAAA,mBAAmB,CAAE,MACpBD,QAAQ,CACNI,QADF,CACYd,gBADZ,EAEEe,kCAFF,EADkB,CAAnB;AAKA,GAXwD;AAP1C,CAAjB;AAsBA,eAAeZ,QAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createRegistryControl } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\n\nexport const __unstableMarkAutomaticChangeFinalControl = function () {\n\treturn {\n\t\ttype: 'MARK_AUTOMATIC_CHANGE_FINAL_CONTROL',\n\t};\n};\n\nconst controls = {\n\tSLEEP( { duration } ) {\n\t\treturn new Promise( ( resolve ) => {\n\t\t\tsetTimeout( resolve, duration );\n\t\t} );\n\t},\n\n\tMARK_AUTOMATIC_CHANGE_FINAL_CONTROL: createRegistryControl(\n\t\t( registry ) => () => {\n\t\t\tconst {\n\t\t\t\trequestIdleCallback = ( callback ) =>\n\t\t\t\t\tsetTimeout( callback, 100 ),\n\t\t\t} = window;\n\t\t\trequestIdleCallback( () =>\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( blockEditorStore )\n\t\t\t\t\t.__unstableMarkAutomaticChangeFinal()\n\t\t\t);\n\t\t}\n\t),\n};\n\nexport default controls;\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { createContext, useState } from '@wordpress/element';
|
|
5
|
-
|
|
6
|
-
const context = createContext();
|
|
7
|
-
|
|
8
|
-
export function Head( { children } ) {
|
|
9
|
-
const [ element, setElement ] = useState();
|
|
10
|
-
return (
|
|
11
|
-
<context.Provider value={ element }>
|
|
12
|
-
<div ref={ setElement } />
|
|
13
|
-
{ children }
|
|
14
|
-
</context.Provider>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
Head.context = context;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { Popover, MenuGroup, DuotonePicker } from '@wordpress/components';
|
|
5
|
-
import { __ } from '@wordpress/i18n';
|
|
6
|
-
|
|
7
|
-
function DuotonePickerPopover( {
|
|
8
|
-
value,
|
|
9
|
-
onChange,
|
|
10
|
-
onToggle,
|
|
11
|
-
duotonePalette,
|
|
12
|
-
colorPalette,
|
|
13
|
-
disableCustomColors,
|
|
14
|
-
disableCustomDuotone,
|
|
15
|
-
} ) {
|
|
16
|
-
return (
|
|
17
|
-
<Popover
|
|
18
|
-
className="block-editor-duotone-control__popover"
|
|
19
|
-
headerTitle={ __( 'Duotone' ) }
|
|
20
|
-
onFocusOutside={ onToggle }
|
|
21
|
-
>
|
|
22
|
-
<MenuGroup label={ __( 'Duotone' ) }>
|
|
23
|
-
<DuotonePicker
|
|
24
|
-
colorPalette={ colorPalette }
|
|
25
|
-
duotonePalette={ duotonePalette }
|
|
26
|
-
disableCustomColors={ disableCustomColors }
|
|
27
|
-
disableCustomDuotone={ disableCustomDuotone }
|
|
28
|
-
value={ value }
|
|
29
|
-
onChange={ onChange }
|
|
30
|
-
/>
|
|
31
|
-
</MenuGroup>
|
|
32
|
-
</Popover>
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export default DuotonePickerPopover;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# InspectorAdvancedControls
|
|
2
|
-
|
|
3
|
-
<img src="https://user-images.githubusercontent.com/150562/94028603-df90bf00-fdb3-11ea-9e6f-eb15c5631d85.png" width="280" alt="inspector-advanced-controls">
|
|
4
|
-
|
|
5
|
-
Inspector Advanced Controls appear under the _Advanced_ panel of a block's [InspectorControls](https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inspector-controls/README.md) -- that is, they appear as a specific set of controls within a block's settings panels. As the name suggests, `InspectorAdvancedControls` is meant for controls that most users aren't meant to interact with most of the time, such as adding an HTML anchor or custom CSS classes to a block.
|
|
6
|
-
|
|
7
|
-
## Usage
|
|
8
|
-
|
|
9
|
-
{% codetabs %}
|
|
10
|
-
{% ESNext %}
|
|
11
|
-
|
|
12
|
-
```js
|
|
13
|
-
const {
|
|
14
|
-
TextControl,
|
|
15
|
-
} = wp.components;
|
|
16
|
-
const {
|
|
17
|
-
InspectorControls,
|
|
18
|
-
InspectorAdvancedControls,
|
|
19
|
-
} = wp.editor;
|
|
20
|
-
|
|
21
|
-
function MyBlockEdit( { attributes, setAttributes } ) {
|
|
22
|
-
return (
|
|
23
|
-
<>
|
|
24
|
-
<div>
|
|
25
|
-
{ /* Block markup goes here */ }
|
|
26
|
-
</div
|
|
27
|
-
<InspectorControls>
|
|
28
|
-
{ /* Regular control goes here */
|
|
29
|
-
</InspectorControls>
|
|
30
|
-
<InspectorAdvancedControls>
|
|
31
|
-
<TextControl
|
|
32
|
-
label="HTML anchor"
|
|
33
|
-
value={ attributes.anchor }
|
|
34
|
-
onChange={ ( nextValue ) => {
|
|
35
|
-
setAttributes( {
|
|
36
|
-
anchor: nextValue,
|
|
37
|
-
} );
|
|
38
|
-
} }
|
|
39
|
-
/>
|
|
40
|
-
</InspectorAdvancedControls>
|
|
41
|
-
</>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
{% ES5 %}
|
|
47
|
-
|
|
48
|
-
```js
|
|
49
|
-
var el = wp.element.createElement,
|
|
50
|
-
Fragment = wp.element.Fragment,
|
|
51
|
-
InspectorControls = wp.editor.InspectorControls,
|
|
52
|
-
InspectorAdvancedControlsControls = wp.editor.InspectorAdvancedControls,
|
|
53
|
-
TextControl = wp.components.TextControl,
|
|
54
|
-
|
|
55
|
-
function MyBlockEdit( props ) {
|
|
56
|
-
return el( Fragment, null,
|
|
57
|
-
el( 'div', null, /* Block markup goes here */ null ),
|
|
58
|
-
el( InspectorControls, null, /* Regular control goes here */ null ),
|
|
59
|
-
el( InspectorAdvancedControls, null,
|
|
60
|
-
el( TextControl, {
|
|
61
|
-
label: 'HTML anchor',
|
|
62
|
-
value: props.attributes.anchor,
|
|
63
|
-
onChange: function( nextValue ) {
|
|
64
|
-
props.setAttributes( { anchor: nextValue } );
|
|
65
|
-
}
|
|
66
|
-
} )
|
|
67
|
-
)
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
{% end %}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import {
|
|
5
|
-
createSlotFill,
|
|
6
|
-
__experimentalStyleProvider as StyleProvider,
|
|
7
|
-
} from '@wordpress/components';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Internal dependencies
|
|
11
|
-
*/
|
|
12
|
-
import { useBlockEditContext } from '../block-edit/context';
|
|
13
|
-
|
|
14
|
-
const name = 'InspectorAdvancedControls';
|
|
15
|
-
const { Fill, Slot } = createSlotFill( name );
|
|
16
|
-
|
|
17
|
-
function InspectorAdvancedControls( { children } ) {
|
|
18
|
-
const { isSelected } = useBlockEditContext();
|
|
19
|
-
return isSelected ? (
|
|
20
|
-
<StyleProvider document={ document }>
|
|
21
|
-
<Fill>{ children }</Fill>
|
|
22
|
-
</StyleProvider>
|
|
23
|
-
) : null;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
InspectorAdvancedControls.slotName = name;
|
|
27
|
-
InspectorAdvancedControls.Slot = Slot;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inspector-advanced-controls/README.md
|
|
31
|
-
*/
|
|
32
|
-
export default InspectorAdvancedControls;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import classnames from 'classnames';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
|
-
import { getBlockType } from '@wordpress/blocks';
|
|
10
|
-
import { Fill, Slot, VisuallyHidden } from '@wordpress/components';
|
|
11
|
-
import { useInstanceId } from '@wordpress/compose';
|
|
12
|
-
import { useSelect } from '@wordpress/data';
|
|
13
|
-
import {
|
|
14
|
-
Children,
|
|
15
|
-
cloneElement,
|
|
16
|
-
forwardRef,
|
|
17
|
-
useContext,
|
|
18
|
-
} from '@wordpress/element';
|
|
19
|
-
import { __ } from '@wordpress/i18n';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Internal dependencies
|
|
23
|
-
*/
|
|
24
|
-
import BlockIcon from '../block-icon';
|
|
25
|
-
import { BlockListBlockContext } from '../block-list/block';
|
|
26
|
-
import ListViewBlockSelectButton from './block-select-button';
|
|
27
|
-
import { getBlockPositionDescription } from './utils';
|
|
28
|
-
import { store as blockEditorStore } from '../../store';
|
|
29
|
-
import ListViewExpander from './expander';
|
|
30
|
-
|
|
31
|
-
const getSlotName = ( clientId ) => `ListViewBlock-${ clientId }`;
|
|
32
|
-
|
|
33
|
-
function ListViewBlockSlot( props, ref ) {
|
|
34
|
-
const { clientId } = props.block;
|
|
35
|
-
const { name } = useSelect(
|
|
36
|
-
( select ) => select( blockEditorStore ).getBlockName( clientId ),
|
|
37
|
-
[ clientId ]
|
|
38
|
-
);
|
|
39
|
-
const instanceId = useInstanceId( ListViewBlockSlot );
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<Slot name={ getSlotName( clientId ) }>
|
|
43
|
-
{ ( fills ) => {
|
|
44
|
-
if ( ! fills.length ) {
|
|
45
|
-
return (
|
|
46
|
-
<ListViewBlockSelectButton ref={ ref } { ...props } />
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const {
|
|
51
|
-
className,
|
|
52
|
-
isSelected,
|
|
53
|
-
position,
|
|
54
|
-
siblingBlockCount,
|
|
55
|
-
level,
|
|
56
|
-
tabIndex,
|
|
57
|
-
onFocus,
|
|
58
|
-
onToggleExpanded,
|
|
59
|
-
} = props;
|
|
60
|
-
|
|
61
|
-
const blockType = getBlockType( name );
|
|
62
|
-
const descriptionId = `list-view-block-slot__${ instanceId }`;
|
|
63
|
-
const blockPositionDescription = getBlockPositionDescription(
|
|
64
|
-
position,
|
|
65
|
-
siblingBlockCount,
|
|
66
|
-
level
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
const forwardedFillProps = {
|
|
70
|
-
// Ensure that the component in the slot can receive
|
|
71
|
-
// keyboard navigation.
|
|
72
|
-
tabIndex,
|
|
73
|
-
onFocus,
|
|
74
|
-
ref,
|
|
75
|
-
// Give the element rendered in the slot a description
|
|
76
|
-
// that describes its position.
|
|
77
|
-
'aria-describedby': descriptionId,
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<>
|
|
82
|
-
<div
|
|
83
|
-
className={ classnames(
|
|
84
|
-
'block-editor-list-view-block-slot',
|
|
85
|
-
className
|
|
86
|
-
) }
|
|
87
|
-
>
|
|
88
|
-
<ListViewExpander onClick={ onToggleExpanded } />
|
|
89
|
-
<BlockIcon icon={ blockType.icon } showColors />
|
|
90
|
-
{ Children.map( fills, ( fill ) =>
|
|
91
|
-
cloneElement( fill, {
|
|
92
|
-
...fill.props,
|
|
93
|
-
...forwardedFillProps,
|
|
94
|
-
} )
|
|
95
|
-
) }
|
|
96
|
-
{ isSelected && (
|
|
97
|
-
<VisuallyHidden>
|
|
98
|
-
{ __( '(selected block)' ) }
|
|
99
|
-
</VisuallyHidden>
|
|
100
|
-
) }
|
|
101
|
-
<div
|
|
102
|
-
className="block-editor-list-view-block-slot__description"
|
|
103
|
-
id={ descriptionId }
|
|
104
|
-
>
|
|
105
|
-
{ blockPositionDescription }
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
</>
|
|
109
|
-
);
|
|
110
|
-
} }
|
|
111
|
-
</Slot>
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export default forwardRef( ListViewBlockSlot );
|
|
116
|
-
|
|
117
|
-
export const ListViewBlockFill = ( props ) => {
|
|
118
|
-
const { clientId } = useContext( BlockListBlockContext );
|
|
119
|
-
return <Fill { ...props } name={ getSlotName( clientId ) } />;
|
|
120
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { __ } from '@wordpress/i18n';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
|
-
import { RichText } from '../';
|
|
10
|
-
import { ListViewBlockFill } from './block-slot';
|
|
11
|
-
|
|
12
|
-
export default function ListViewEditor( { value, onChange } ) {
|
|
13
|
-
return (
|
|
14
|
-
<ListViewBlockFill>
|
|
15
|
-
<RichText
|
|
16
|
-
value={ value }
|
|
17
|
-
onChange={ onChange }
|
|
18
|
-
placeholder={ __( 'Navigation item' ) }
|
|
19
|
-
withoutInteractiveFormatting
|
|
20
|
-
allowedFormats={ [
|
|
21
|
-
'core/bold',
|
|
22
|
-
'core/italic',
|
|
23
|
-
'core/image',
|
|
24
|
-
'core/strikethrough',
|
|
25
|
-
] }
|
|
26
|
-
/>
|
|
27
|
-
</ListViewBlockFill>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal dependencies
|
|
3
|
-
*/
|
|
4
|
-
import {
|
|
5
|
-
TextDecorationEdit,
|
|
6
|
-
useIsTextDecorationDisabled,
|
|
7
|
-
} from '../../hooks/text-decoration';
|
|
8
|
-
import {
|
|
9
|
-
TextTransformEdit,
|
|
10
|
-
useIsTextTransformDisabled,
|
|
11
|
-
} from '../../hooks/text-transform';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Handles grouping related text decoration and text transform edit components
|
|
15
|
-
* so they can be laid out in a more flexible manner within the Typography
|
|
16
|
-
* InspectorControls panel.
|
|
17
|
-
*
|
|
18
|
-
* @param {Object} props Block props to be passed on to individual controls.
|
|
19
|
-
*
|
|
20
|
-
* @return {WPElement} Component containing text decoration or transform controls.
|
|
21
|
-
*/
|
|
22
|
-
export default function TextDecorationAndTransformEdit( props ) {
|
|
23
|
-
const decorationAvailable = ! useIsTextDecorationDisabled( props );
|
|
24
|
-
const transformAvailable = ! useIsTextTransformDisabled( props );
|
|
25
|
-
|
|
26
|
-
if ( ! decorationAvailable && ! transformAvailable ) {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<div className="block-editor-text-decoration-and-transform">
|
|
32
|
-
{ decorationAvailable && <TextDecorationEdit { ...props } /> }
|
|
33
|
-
{ transformAvailable && <TextTransformEdit { ...props } /> }
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
36
|
-
}
|