@wordpress/block-library 7.5.0 → 7.8.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 +10 -0
- package/README.md +3 -2
- package/babel-plugin.js +154 -0
- package/build/audio/edit.js +1 -1
- package/build/audio/edit.js.map +1 -1
- package/build/audio/index.js +6 -1
- package/build/audio/index.js.map +1 -1
- package/build/avatar/hooks.js +2 -2
- package/build/avatar/hooks.js.map +1 -1
- package/build/block/edit.js +10 -9
- package/build/block/edit.js.map +1 -1
- package/build/block/edit.native.js.map +1 -1
- package/build/button/deprecated.js +175 -35
- package/build/button/deprecated.js.map +1 -1
- package/build/button/edit.js +1 -1
- package/build/button/edit.js.map +1 -1
- package/build/button/edit.native.js.map +1 -1
- package/build/button/index.js +25 -1
- package/build/button/index.js.map +1 -1
- package/build/button/save.js +1 -1
- package/build/button/save.js.map +1 -1
- package/build/buttons/deprecated.js.map +1 -1
- package/build/buttons/edit.js.map +1 -1
- package/build/buttons/edit.native.js.map +1 -1
- package/build/categories/edit.js +1 -1
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +1 -1
- package/build/column/deprecated.js.map +1 -1
- package/build/column/edit.js.map +1 -1
- package/build/column/edit.native.js.map +1 -1
- package/build/columns/deprecated.js.map +1 -1
- package/build/columns/edit.js +1 -1
- package/build/columns/edit.js.map +1 -1
- package/build/columns/edit.native.js +1 -1
- package/build/columns/edit.native.js.map +1 -1
- package/build/columns/index.js +3 -1
- package/build/columns/index.js.map +1 -1
- package/build/columns/utils.js +1 -1
- package/build/columns/utils.js.map +1 -1
- package/build/comment-author-avatar/index.js +1 -0
- package/build/comment-author-avatar/index.js.map +1 -1
- package/build/comment-author-name/edit.js +4 -2
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-date/edit.js +1 -1
- package/build/comment-date/edit.js.map +1 -1
- package/build/comments-title/deprecated.js +110 -0
- package/build/comments-title/deprecated.js.map +1 -0
- package/build/comments-title/edit.js +35 -37
- package/build/comments-title/edit.js.map +1 -1
- package/build/comments-title/index.js +5 -8
- package/build/comments-title/index.js.map +1 -1
- package/build/cover/controls.native.js +2 -3
- package/build/cover/controls.native.js.map +1 -1
- package/build/cover/deprecated.js +212 -207
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/block-controls.js +108 -0
- package/build/cover/edit/block-controls.js.map +1 -0
- package/build/cover/edit/cover-placeholder.js +49 -0
- package/build/cover/edit/cover-placeholder.js.map +1 -0
- package/build/cover/edit/index.js +336 -0
- package/build/cover/edit/index.js.map +1 -0
- package/build/cover/edit/inspector-controls.js +252 -0
- package/build/cover/edit/inspector-controls.js.map +1 -0
- package/build/cover/edit/resizable-cover.js +67 -0
- package/build/cover/edit/resizable-cover.js.map +1 -0
- package/build/cover/{use-cover-is-dark.js → edit/use-cover-is-dark.js} +0 -0
- package/build/cover/edit/use-cover-is-dark.js.map +1 -0
- package/build/cover/edit.native.js +0 -1
- package/build/cover/edit.native.js.map +1 -1
- package/build/cover/focal-point-settings-button.native.js.map +1 -1
- package/build/cover/save.js +18 -5
- package/build/cover/save.js.map +1 -1
- package/build/cover/shared.js +15 -9
- package/build/cover/shared.js.map +1 -1
- package/build/cover/transforms.js.map +1 -1
- package/build/embed/deprecated.js +6 -1
- package/build/embed/deprecated.js.map +1 -1
- package/build/embed/edit.js.map +1 -1
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/embed-controls.native.js.map +1 -1
- package/build/embed/embed-preview.js +1 -1
- package/build/embed/embed-preview.js.map +1 -1
- package/build/embed/index.js +6 -1
- package/build/embed/index.js.map +1 -1
- package/build/embed/transforms.js +6 -1
- package/build/embed/transforms.js.map +1 -1
- package/build/embed/util.js +6 -1
- package/build/embed/util.js.map +1 -1
- package/build/file/edit.js +1 -1
- package/build/file/edit.js.map +1 -1
- package/build/file/edit.native.js +0 -1
- package/build/file/edit.native.js.map +1 -1
- package/build/file/index.js.map +1 -1
- package/build/file/save.js +9 -1
- package/build/file/save.js.map +1 -1
- package/build/gallery/edit.js +3 -2
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js +1 -1
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/gap-styles.js +14 -4
- package/build/gallery/gap-styles.js.map +1 -1
- package/build/gallery/index.js +1 -1
- package/build/gallery/index.js.map +1 -1
- package/build/gallery/shared.js +29 -12
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/use-get-media.js +2 -1
- package/build/gallery/use-get-media.js.map +1 -1
- package/build/gallery/use-short-code-transform.js +19 -18
- package/build/gallery/use-short-code-transform.js.map +1 -1
- package/build/gallery/v1/edit.js.map +1 -1
- package/build/gallery/v1/gallery-image.js.map +1 -1
- package/build/gallery/v1/gallery-image.native.js.map +1 -1
- package/build/gallery/v1/gallery.js +1 -1
- package/build/gallery/v1/gallery.js.map +1 -1
- package/build/heading/autogenerate-anchors.js +7 -2
- package/build/heading/autogenerate-anchors.js.map +1 -1
- package/build/heading/deprecated.js.map +1 -1
- package/build/heading/edit.js +6 -2
- package/build/heading/edit.js.map +1 -1
- package/build/heading/index.js +1 -0
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +1 -0
- package/build/heading/transforms.js.map +1 -1
- package/build/image/deprecated.js.map +1 -1
- package/build/image/edit.js +5 -56
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +56 -4
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +4 -14
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +5 -0
- package/build/image/index.js.map +1 -1
- package/build/image/transforms.js.map +1 -1
- package/build/image/utils.js +2 -1
- package/build/image/utils.js.map +1 -1
- package/build/index.js +46 -10
- package/build/index.js.map +1 -1
- package/build/is-block-metadata-experimental.js +18 -0
- package/build/is-block-metadata-experimental.js.map +1 -0
- package/build/latest-comments/edit.js.map +1 -1
- package/build/latest-posts/edit.js +31 -5
- package/build/latest-posts/edit.js.map +1 -1
- package/build/latest-posts/edit.native.js.map +1 -1
- package/build/list/index.js.map +1 -1
- package/build/list/transforms.js +6 -0
- package/build/list/transforms.js.map +1 -1
- package/build/list/v2/edit.js +2 -1
- package/build/list/v2/edit.js.map +1 -1
- package/build/list/v2/migrate.js +1 -0
- package/build/list/v2/migrate.js.map +1 -1
- package/build/list/v2/transforms.js +46 -9
- package/build/list/v2/transforms.js.map +1 -1
- package/build/list-item/edit.js +7 -9
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/hooks/index.js +24 -0
- package/build/list-item/hooks/index.js.map +1 -1
- package/build/list-item/hooks/use-backspace.js +59 -0
- package/build/list-item/hooks/use-backspace.js.map +1 -0
- package/build/list-item/hooks/use-enter.js +6 -9
- package/build/list-item/hooks/use-enter.js.map +1 -1
- package/build/list-item/hooks/use-indent-list-item.js +33 -39
- package/build/list-item/hooks/use-indent-list-item.js.map +1 -1
- package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build/list-item/hooks/use-space.js +54 -0
- package/build/list-item/hooks/use-space.js.map +1 -0
- package/build/list-item/hooks/use-split.js +44 -0
- package/build/list-item/hooks/use-split.js.map +1 -0
- package/build/list-item/index.js +1 -0
- package/build/list-item/index.js.map +1 -1
- package/build/list-item/utils.js +1 -1
- package/build/list-item/utils.js.map +1 -1
- package/build/media-text/deprecated.js +5 -3
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/edit.native.js +2 -1
- package/build/media-text/edit.native.js.map +1 -1
- package/build/media-text/media-container.js +3 -3
- package/build/media-text/media-container.js.map +1 -1
- package/build/media-text/media-container.native.js +2 -4
- package/build/media-text/media-container.native.js.map +1 -1
- package/build/media-text/save.js +3 -1
- package/build/media-text/save.js.map +1 -1
- package/build/media-text/transforms.js +137 -8
- package/build/media-text/transforms.js.map +1 -1
- package/build/missing/edit.native.js.map +1 -1
- package/build/navigation/deprecated.js.map +1 -1
- package/build/navigation/edit/index.js +86 -81
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +1 -5
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build/navigation/use-navigation-entities.js +3 -3
- package/build/navigation/use-navigation-entities.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +130 -38
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation/use-template-part-area-label.js +4 -1
- package/build/navigation/use-template-part-area-label.js.map +1 -1
- package/build/navigation-link/edit.js +44 -12
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/fallback-variations.js +1 -1
- package/build/navigation-link/fallback-variations.js.map +1 -1
- package/build/navigation-link/hooks.js +1 -1
- package/build/navigation-link/hooks.js.map +1 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/convert-to-links-modal.js +1 -1
- package/build/page-list/convert-to-links-modal.js.map +1 -1
- package/build/page-list/edit.js +1 -1
- package/build/page-list/edit.js.map +1 -1
- package/build/paragraph/deprecated.js +1 -1
- package/build/paragraph/deprecated.js.map +1 -1
- package/build/pattern/edit.js.map +1 -1
- package/build/post-author/edit.js +1 -1
- package/build/post-author/edit.js.map +1 -1
- package/build/post-author-name/index.js +4 -0
- package/build/post-author-name/index.js.map +1 -1
- package/build/post-author-name/transforms.js +41 -0
- package/build/post-author-name/transforms.js.map +1 -0
- package/build/post-comment/index.js +1 -0
- package/build/post-comment/index.js.map +1 -1
- package/build/post-comments/edit.js +34 -16
- package/build/post-comments/edit.js.map +1 -1
- package/build/post-comments-count/index.js +1 -0
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-form/form.js +12 -2
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-comments-link/index.js +1 -0
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/edit.js.map +1 -1
- package/build/post-date/edit.js +13 -7
- package/build/post-date/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +11 -25
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-navigation-link/index.js +4 -0
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-template/edit.js +7 -2
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js +11 -2
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/hooks.js +33 -0
- package/build/post-terms/hooks.js.map +1 -0
- package/build/post-terms/index.js +12 -5
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/index.js +1 -1
- package/build/post-title/index.js.map +1 -1
- package/build/pullquote/deprecated.js.map +1 -1
- package/build/pullquote/edit.js +1 -1
- package/build/pullquote/edit.js.map +1 -1
- package/build/pullquote/edit.native.js +1 -1
- package/build/pullquote/edit.native.js.map +1 -1
- package/build/query/edit/index.js +5 -1
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +26 -17
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/parent-control.js +148 -0
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -0
- package/build/query/edit/inspector-controls/sticky-control.js +41 -0
- package/build/query/edit/inspector-controls/sticky-control.js.map +1 -0
- package/build/query/edit/query-toolbar.js +16 -2
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/query/index.js +2 -1
- package/build/query/index.js.map +1 -1
- package/build/query/utils.js +28 -2
- package/build/query/utils.js.map +1 -1
- package/build/query-title/index.js +1 -1
- package/build/query-title/index.js.map +1 -1
- package/build/query-title/variations.js +1 -1
- package/build/query-title/variations.js.map +1 -1
- package/build/quote/edit.js +3 -2
- package/build/quote/edit.js.map +1 -1
- package/build/quote/v2/edit.js +1 -1
- package/build/quote/v2/edit.js.map +1 -1
- package/build/search/edit.js +2 -1
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js.map +1 -1
- package/build/search/index.js +4 -0
- package/build/search/index.js.map +1 -1
- package/build/separator/use-deprecated-opacity.js.map +1 -1
- package/build/shortcode/edit.native.js +16 -13
- package/build/shortcode/edit.native.js.map +1 -1
- package/build/site-logo/edit.js +4 -13
- package/build/site-logo/edit.js.map +1 -1
- package/build/social-links/deprecated.js.map +1 -1
- package/build/social-links/edit.js +2 -2
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/edit.native.js.map +1 -1
- package/build/spacer/controls.js.map +1 -1
- package/build/table/deprecated.js.map +1 -1
- package/build/table/edit.js +15 -2
- package/build/table/edit.js.map +1 -1
- package/build/table/index.js +6 -1
- package/build/table/index.js.map +1 -1
- package/build/table/state.js.map +1 -1
- package/build/table-of-contents/edit.js +145 -65
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/table-of-contents/index.js +13 -3
- package/build/table-of-contents/index.js.map +1 -1
- package/build/table-of-contents/list.js +16 -9
- package/build/table-of-contents/list.js.map +1 -1
- package/build/table-of-contents/save.js +40 -0
- package/build/table-of-contents/save.js.map +1 -0
- package/build/table-of-contents/utils.js +11 -77
- package/build/table-of-contents/utils.js.map +1 -1
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +4 -1
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/index.js +7 -3
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +3 -8
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build/template-part/edit/utils/hooks.js +4 -1
- package/build/template-part/edit/utils/hooks.js.map +1 -1
- package/build/transformationCategories.native.js.map +1 -1
- package/build/video/edit-common-settings.js.map +1 -1
- package/build/video/edit.js +1 -1
- package/build/video/edit.js.map +1 -1
- package/build/video/edit.native.js +43 -0
- package/build/video/edit.native.js.map +1 -1
- package/build/video/index.js +6 -1
- package/build/video/index.js.map +1 -1
- package/build-module/audio/edit.js +2 -2
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/index.js +6 -1
- package/build-module/audio/index.js.map +1 -1
- package/build-module/avatar/hooks.js +2 -2
- package/build-module/avatar/hooks.js.map +1 -1
- package/build-module/block/edit.js +11 -10
- package/build-module/block/edit.js.map +1 -1
- package/build-module/block/edit.native.js.map +1 -1
- package/build-module/button/deprecated.js +175 -35
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/edit.js +2 -2
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/button/index.js +25 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/save.js +2 -2
- package/build-module/button/save.js.map +1 -1
- package/build-module/buttons/deprecated.js.map +1 -1
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/buttons/edit.native.js.map +1 -1
- package/build-module/categories/edit.js +1 -1
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +1 -1
- package/build-module/column/deprecated.js.map +1 -1
- package/build-module/column/edit.js.map +1 -1
- package/build-module/column/edit.native.js.map +1 -1
- package/build-module/columns/deprecated.js.map +1 -1
- package/build-module/columns/edit.js +2 -2
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +2 -2
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/columns/index.js +3 -1
- package/build-module/columns/index.js.map +1 -1
- package/build-module/columns/utils.js +2 -2
- package/build-module/columns/utils.js.map +1 -1
- package/build-module/comment-author-avatar/index.js +1 -0
- package/build-module/comment-author-avatar/index.js.map +1 -1
- package/build-module/comment-author-name/edit.js +4 -2
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-date/edit.js +1 -1
- package/build-module/comment-date/edit.js.map +1 -1
- package/build-module/comments-title/deprecated.js +102 -0
- package/build-module/comments-title/deprecated.js.map +1 -0
- package/build-module/comments-title/edit.js +38 -40
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/comments-title/index.js +4 -8
- package/build-module/comments-title/index.js.map +1 -1
- package/build-module/cover/controls.native.js +2 -3
- package/build-module/cover/controls.native.js.map +1 -1
- package/build-module/cover/deprecated.js +206 -198
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/block-controls.js +99 -0
- package/build-module/cover/edit/block-controls.js.map +1 -0
- package/build-module/cover/edit/cover-placeholder.js +38 -0
- package/build-module/cover/edit/cover-placeholder.js.map +1 -0
- package/build-module/cover/edit/index.js +310 -0
- package/build-module/cover/edit/index.js.map +1 -0
- package/build-module/cover/edit/inspector-controls.js +240 -0
- package/build-module/cover/edit/inspector-controls.js.map +1 -0
- package/build-module/cover/edit/resizable-cover.js +55 -0
- package/build-module/cover/edit/resizable-cover.js.map +1 -0
- package/build-module/cover/{use-cover-is-dark.js → edit/use-cover-is-dark.js} +0 -0
- package/build-module/cover/edit/use-cover-is-dark.js.map +1 -0
- package/build-module/cover/edit.native.js +0 -1
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/focal-point-settings-button.native.js.map +1 -1
- package/build-module/cover/save.js +19 -6
- package/build-module/cover/save.js.map +1 -1
- package/build-module/cover/shared.js +11 -5
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/cover/transforms.js.map +1 -1
- package/build-module/embed/deprecated.js +6 -1
- package/build-module/embed/deprecated.js.map +1 -1
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-controls.native.js.map +1 -1
- package/build-module/embed/embed-preview.js +2 -2
- package/build-module/embed/embed-preview.js.map +1 -1
- package/build-module/embed/index.js +6 -1
- package/build-module/embed/index.js.map +1 -1
- package/build-module/embed/transforms.js +6 -1
- package/build-module/embed/transforms.js.map +1 -1
- package/build-module/embed/util.js +6 -1
- package/build-module/embed/util.js.map +1 -1
- package/build-module/file/edit.js +2 -2
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/edit.native.js +0 -1
- package/build-module/file/edit.native.js.map +1 -1
- package/build-module/file/index.js.map +1 -1
- package/build-module/file/save.js +7 -2
- package/build-module/file/save.js.map +1 -1
- package/build-module/gallery/edit.js +4 -3
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.js +2 -2
- package/build-module/gallery/gallery.js.map +1 -1
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/gap-styles.js +14 -4
- package/build-module/gallery/gap-styles.js.map +1 -1
- package/build-module/gallery/index.js +1 -1
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/gallery/shared.js +27 -10
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/use-get-media.js +2 -1
- package/build-module/gallery/use-get-media.js.map +1 -1
- package/build-module/gallery/use-short-code-transform.js +19 -18
- package/build-module/gallery/use-short-code-transform.js.map +1 -1
- package/build-module/gallery/v1/edit.js.map +1 -1
- package/build-module/gallery/v1/gallery-image.js.map +1 -1
- package/build-module/gallery/v1/gallery-image.native.js.map +1 -1
- package/build-module/gallery/v1/gallery.js +2 -2
- package/build-module/gallery/v1/gallery.js.map +1 -1
- package/build-module/heading/autogenerate-anchors.js +5 -2
- package/build-module/heading/autogenerate-anchors.js.map +1 -1
- package/build-module/heading/deprecated.js.map +1 -1
- package/build-module/heading/edit.js +6 -2
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/index.js +1 -0
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +1 -0
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/edit.js +4 -52
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +57 -6
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +6 -16
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +5 -0
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/image/utils.js +2 -2
- package/build-module/image/utils.js.map +1 -1
- package/build-module/index.js +42 -10
- package/build-module/index.js.map +1 -1
- package/build-module/is-block-metadata-experimental.js +16 -0
- package/build-module/is-block-metadata-experimental.js.map +1 -0
- package/build-module/latest-comments/edit.js.map +1 -1
- package/build-module/latest-posts/edit.js +31 -7
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/latest-posts/edit.native.js.map +1 -1
- package/build-module/list/index.js.map +1 -1
- package/build-module/list/transforms.js +6 -0
- package/build-module/list/transforms.js.map +1 -1
- package/build-module/list/v2/edit.js +2 -1
- package/build-module/list/v2/edit.js.map +1 -1
- package/build-module/list/v2/migrate.js +1 -3
- package/build-module/list/v2/migrate.js.map +1 -1
- package/build-module/list/v2/transforms.js +46 -9
- package/build-module/list/v2/transforms.js.map +1 -1
- package/build-module/list-item/edit.js +8 -9
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/hooks/index.js +3 -0
- package/build-module/list-item/hooks/index.js.map +1 -1
- package/build-module/list-item/hooks/use-backspace.js +44 -0
- package/build-module/list-item/hooks/use-backspace.js.map +1 -0
- package/build-module/list-item/hooks/use-enter.js +6 -9
- package/build-module/list-item/hooks/use-enter.js.map +1 -1
- package/build-module/list-item/hooks/use-indent-list-item.js +33 -38
- package/build-module/list-item/hooks/use-indent-list-item.js.map +1 -1
- package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build-module/list-item/hooks/use-space.js +40 -0
- package/build-module/list-item/hooks/use-space.js.map +1 -0
- package/build-module/list-item/hooks/use-split.js +33 -0
- package/build-module/list-item/hooks/use-split.js.map +1 -0
- package/build-module/list-item/index.js +1 -0
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/list-item/utils.js +1 -1
- package/build-module/list-item/utils.js.map +1 -1
- package/build-module/media-text/deprecated.js +3 -1
- package/build-module/media-text/deprecated.js.map +1 -1
- package/build-module/media-text/edit.native.js +2 -1
- package/build-module/media-text/edit.native.js.map +1 -1
- package/build-module/media-text/media-container.js +3 -1
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/media-container.native.js +2 -4
- package/build-module/media-text/media-container.native.js.map +1 -1
- package/build-module/media-text/save.js +4 -1
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/media-text/transforms.js +137 -8
- package/build-module/media-text/transforms.js.map +1 -1
- package/build-module/missing/edit.native.js.map +1 -1
- package/build-module/navigation/deprecated.js.map +1 -1
- package/build-module/navigation/edit/index.js +87 -82
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +2 -6
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build-module/navigation/use-navigation-entities.js +1 -1
- package/build-module/navigation/use-navigation-entities.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +130 -38
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation/use-template-part-area-label.js +4 -1
- package/build-module/navigation/use-template-part-area-label.js.map +1 -1
- package/build-module/navigation-link/edit.js +44 -13
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/fallback-variations.js +1 -1
- package/build-module/navigation-link/fallback-variations.js.map +1 -1
- package/build-module/navigation-link/hooks.js +2 -2
- package/build-module/navigation-link/hooks.js.map +1 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/convert-to-links-modal.js +1 -1
- package/build-module/page-list/convert-to-links-modal.js.map +1 -1
- package/build-module/page-list/edit.js +1 -1
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/paragraph/deprecated.js +2 -2
- package/build-module/paragraph/deprecated.js.map +1 -1
- package/build-module/pattern/edit.js.map +1 -1
- package/build-module/post-author/edit.js +1 -1
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-author-name/index.js +3 -0
- package/build-module/post-author-name/index.js.map +1 -1
- package/build-module/post-author-name/transforms.js +32 -0
- package/build-module/post-author-name/transforms.js.map +1 -0
- package/build-module/post-comment/index.js +1 -0
- package/build-module/post-comment/index.js.map +1 -1
- package/build-module/post-comments/edit.js +35 -16
- package/build-module/post-comments/edit.js.map +1 -1
- package/build-module/post-comments-count/index.js +1 -0
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-form/form.js +8 -2
- package/build-module/post-comments-form/form.js.map +1 -1
- package/build-module/post-comments-link/index.js +1 -0
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-date/edit.js +15 -9
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-featured-image/edit.js +11 -24
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-navigation-link/index.js +4 -0
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-template/edit.js +7 -2
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +10 -3
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/hooks.js +25 -0
- package/build-module/post-terms/hooks.js.map +1 -0
- package/build-module/post-terms/index.js +10 -8
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/index.js +1 -1
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/pullquote/deprecated.js.map +1 -1
- package/build-module/pullquote/edit.js +2 -2
- package/build-module/pullquote/edit.js.map +1 -1
- package/build-module/pullquote/edit.native.js +2 -2
- package/build-module/pullquote/edit.native.js.map +1 -1
- package/build-module/query/edit/index.js +5 -1
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +24 -17
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/parent-control.js +135 -0
- package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/sticky-control.js +31 -0
- package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -0
- package/build-module/query/edit/query-toolbar.js +14 -2
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query/index.js +2 -1
- package/build-module/query/index.js.map +1 -1
- package/build-module/query/utils.js +21 -0
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query-title/index.js +1 -1
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/query-title/variations.js +2 -2
- package/build-module/query-title/variations.js.map +1 -1
- package/build-module/quote/edit.js +4 -3
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/quote/v2/edit.js +2 -2
- package/build-module/quote/v2/edit.js.map +1 -1
- package/build-module/search/edit.js +3 -2
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/search/index.js +4 -0
- package/build-module/search/index.js.map +1 -1
- package/build-module/separator/use-deprecated-opacity.js.map +1 -1
- package/build-module/shortcode/edit.native.js +17 -13
- package/build-module/shortcode/edit.native.js.map +1 -1
- package/build-module/site-logo/edit.js +4 -12
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/social-links/deprecated.js.map +1 -1
- package/build-module/social-links/edit.js +2 -2
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/edit.native.js.map +1 -1
- package/build-module/spacer/controls.js.map +1 -1
- package/build-module/table/deprecated.js.map +1 -1
- package/build-module/table/edit.js +17 -4
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/index.js +6 -1
- package/build-module/table/index.js.map +1 -1
- package/build-module/table/state.js.map +1 -1
- package/build-module/table-of-contents/edit.js +144 -68
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/table-of-contents/index.js +12 -3
- package/build-module/table-of-contents/index.js.map +1 -1
- package/build-module/table-of-contents/list.js +18 -10
- package/build-module/table-of-contents/list.js.map +1 -1
- package/build-module/table-of-contents/save.js +28 -0
- package/build-module/table-of-contents/save.js.map +1 -0
- package/build-module/table-of-contents/utils.js +11 -73
- package/build-module/table-of-contents/utils.js.map +1 -1
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +4 -1
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js +8 -4
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +4 -9
- package/build-module/template-part/edit/inner-blocks.js.map +1 -1
- package/build-module/template-part/edit/utils/hooks.js +4 -1
- package/build-module/template-part/edit/utils/hooks.js.map +1 -1
- package/build-module/transformationCategories.native.js.map +1 -1
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-module/video/edit.js +2 -2
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/edit.native.js +42 -1
- package/build-module/video/edit.native.js.map +1 -1
- package/build-module/video/index.js +6 -1
- package/build-module/video/index.js.map +1 -1
- package/build-style/audio/style-rtl.css +0 -3
- package/build-style/audio/style.css +0 -3
- package/build-style/button/style-rtl.css +0 -5
- package/build-style/button/style.css +0 -5
- package/build-style/common-rtl.css +1 -3
- package/build-style/common.css +1 -3
- package/build-style/cover/editor-rtl.css +11 -0
- package/build-style/cover/editor.css +11 -0
- package/build-style/cover/style-rtl.css +33 -25
- package/build-style/cover/style.css +33 -25
- package/build-style/editor-rtl.css +15 -45
- package/build-style/editor.css +15 -45
- package/build-style/embed/style-rtl.css +0 -1
- package/build-style/embed/style.css +0 -1
- package/build-style/file/style-rtl.css +9 -7
- package/build-style/file/style.css +9 -7
- package/build-style/gallery/style-rtl.css +2 -4
- package/build-style/gallery/style.css +2 -4
- package/build-style/image/editor-rtl.css +1 -1
- package/build-style/image/editor.css +1 -1
- package/build-style/image/style-rtl.css +0 -3
- package/build-style/image/style.css +0 -3
- package/build-style/post-comments/style-rtl.css +22 -0
- package/build-style/post-comments/style.css +22 -0
- package/build-style/post-comments-form/style-rtl.css +1 -3
- package/build-style/post-comments-form/style.css +1 -3
- package/build-style/post-featured-image/editor-rtl.css +0 -27
- package/build-style/post-featured-image/editor.css +0 -27
- package/build-style/search/style-rtl.css +4 -4
- package/build-style/search/style.css +4 -4
- package/build-style/separator/editor-rtl.css +1 -0
- package/build-style/separator/editor.css +1 -0
- package/build-style/site-logo/editor-rtl.css +0 -12
- package/build-style/site-logo/editor.css +0 -12
- package/build-style/site-logo/style-rtl.css +4 -0
- package/build-style/site-logo/style.css +4 -0
- package/build-style/style-rtl.css +77 -64
- package/build-style/style.css +77 -64
- package/build-style/table/style-rtl.css +0 -1
- package/build-style/table/style.css +0 -1
- package/build-style/video/editor-rtl.css +2 -5
- package/build-style/video/editor.css +2 -5
- package/build-style/video/style-rtl.css +1 -5
- package/build-style/video/style.css +1 -5
- package/build-types/table-of-contents/list.d.ts +12 -0
- package/build-types/table-of-contents/list.d.ts.map +1 -0
- package/build-types/table-of-contents/utils.d.ts +24 -0
- package/build-types/table-of-contents/utils.d.ts.map +1 -0
- package/package.json +32 -30
- package/src/audio/block.json +6 -1
- package/src/audio/edit.js +4 -2
- package/src/audio/index.js +1 -2
- package/src/audio/style.scss +0 -2
- package/src/avatar/block.json +0 -1
- package/src/avatar/hooks.js +9 -6
- package/src/avatar/index.php +2 -2
- package/src/block/edit.js +43 -48
- package/src/block/edit.native.js +12 -16
- package/src/block/test/edit.native.js +6 -9
- package/src/button/block.json +25 -1
- package/src/button/deprecated.js +145 -36
- package/src/button/edit.js +7 -11
- package/src/button/edit.native.js +2 -3
- package/src/button/save.js +5 -11
- package/src/button/style.scss +0 -5
- package/src/buttons/deprecated.js +4 -6
- package/src/buttons/edit.js +3 -3
- package/src/buttons/edit.native.js +7 -11
- package/src/buttons/test/__snapshots__/edit.native.js.snap +1 -1
- package/src/buttons/test/edit.native.js +1 -1
- package/src/categories/block.json +1 -1
- package/src/categories/edit.js +1 -1
- package/src/column/deprecated.js +2 -1
- package/src/column/edit.js +2 -3
- package/src/column/edit.native.js +2 -2
- package/src/columns/block.json +3 -1
- package/src/columns/deprecated.js +4 -2
- package/src/columns/edit.js +6 -7
- package/src/columns/edit.native.js +12 -16
- package/src/columns/index.js +1 -2
- package/src/columns/utils.js +5 -3
- package/src/comment-author-avatar/block.json +1 -0
- package/src/comment-author-name/edit.js +2 -2
- package/src/comment-date/edit.js +1 -1
- package/src/comments-title/block.json +0 -6
- package/src/comments-title/deprecated.js +34 -0
- package/src/comments-title/edit.js +44 -100
- package/src/comments-title/index.js +3 -1
- package/src/comments-title/index.php +41 -23
- package/src/cover/controls.native.js +3 -6
- package/src/cover/deprecated.js +237 -195
- package/src/cover/edit/block-controls.js +110 -0
- package/src/cover/edit/cover-placeholder.js +39 -0
- package/src/cover/edit/index.js +396 -0
- package/src/cover/edit/inspector-controls.js +317 -0
- package/src/cover/edit/resizable-cover.js +55 -0
- package/src/cover/{use-cover-is-dark.js → edit/use-cover-is-dark.js} +0 -0
- package/src/cover/edit.native.js +8 -14
- package/src/cover/editor.scss +14 -1
- package/src/cover/focal-point-settings-button.native.js +1 -1
- package/src/cover/index.php +20 -37
- package/src/cover/save.js +28 -16
- package/src/cover/shared.js +5 -3
- package/src/cover/style.scss +27 -22
- package/src/cover/test/block-controls.js +62 -0
- package/src/cover/test/edit.native.js +4 -7
- package/src/cover/transforms.js +2 -7
- package/src/embed/block.json +6 -1
- package/src/embed/edit.js +38 -40
- package/src/embed/edit.native.js +46 -49
- package/src/embed/embed-controls.native.js +2 -3
- package/src/embed/embed-preview.js +4 -2
- package/src/embed/style.scss +0 -1
- package/src/embed/test/index.native.js +24 -50
- package/src/file/edit.js +7 -5
- package/src/file/edit.native.js +14 -26
- package/src/file/index.js +1 -2
- package/src/file/save.js +14 -2
- package/src/file/style.scss +15 -14
- package/src/gallery/block.json +1 -1
- package/src/gallery/edit.js +10 -7
- package/src/gallery/gallery.js +2 -2
- package/src/gallery/gallery.native.js +2 -4
- package/src/gallery/gap-styles.js +21 -6
- package/src/gallery/index.js +2 -4
- package/src/gallery/index.php +23 -12
- package/src/gallery/shared.js +25 -11
- package/src/gallery/test/index.native.js +18 -34
- package/src/gallery/use-get-media.js +2 -1
- package/src/gallery/use-short-code-transform.js +19 -16
- package/src/gallery/v1/edit.js +15 -20
- package/src/gallery/v1/gallery-image.js +6 -11
- package/src/gallery/v1/gallery-image.native.js +8 -17
- package/src/gallery/v1/gallery.js +2 -2
- package/src/heading/autogenerate-anchors.js +8 -5
- package/src/heading/block.json +1 -0
- package/src/heading/deprecated.js +6 -21
- package/src/heading/edit.js +7 -5
- package/src/image/block.json +5 -0
- package/src/image/deprecated.js +6 -29
- package/src/image/edit.js +0 -44
- package/src/image/edit.native.js +74 -25
- package/src/image/editor.scss +1 -1
- package/src/image/image.js +41 -51
- package/src/image/style.scss +0 -2
- package/src/image/styles.native.scss +11 -0
- package/src/image/test/edit.native.js +7 -7
- package/src/image/transforms.js +4 -3
- package/src/image/utils.js +2 -2
- package/src/index.js +51 -28
- package/src/is-block-metadata-experimental.js +19 -0
- package/src/latest-comments/edit.js +2 -6
- package/src/latest-posts/edit.js +33 -9
- package/src/latest-posts/edit.native.js +10 -15
- package/src/latest-posts/index.php +12 -6
- package/src/list/index.js +1 -2
- package/src/list/test/migrate.js +1 -2
- package/src/list/transforms.js +7 -0
- package/src/list/v2/edit.js +7 -9
- package/src/list/v2/migrate.js +1 -1
- package/src/list/v2/transforms.js +35 -0
- package/src/list-item/block.json +2 -1
- package/src/list-item/edit.js +17 -10
- package/src/list-item/hooks/index.js +3 -0
- package/src/list-item/hooks/use-backspace.js +51 -0
- package/src/list-item/hooks/use-enter.js +8 -16
- package/src/list-item/hooks/use-indent-list-item.js +49 -63
- package/src/list-item/hooks/use-outdent-list-item.js +2 -3
- package/src/list-item/hooks/use-space.js +47 -0
- package/src/list-item/hooks/use-split.js +33 -0
- package/src/list-item/utils.js +1 -1
- package/src/media-text/deprecated.js +6 -3
- package/src/media-text/edit.native.js +5 -6
- package/src/media-text/media-container.js +1 -1
- package/src/media-text/media-container.native.js +8 -13
- package/src/media-text/save.js +2 -1
- package/src/media-text/transforms.js +154 -0
- package/src/missing/edit.native.js +2 -3
- package/src/missing/test/edit-integration.native.js +2 -3
- package/src/missing/test/edit.native.js +6 -9
- package/src/navigation/deprecated.js +2 -5
- package/src/navigation/edit/index.js +195 -201
- package/src/navigation/edit/inner-blocks.js +1 -8
- package/src/navigation/edit/navigation-menu-delete-control.js +2 -3
- package/src/navigation/edit/unsaved-inner-blocks.js +31 -30
- package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +2 -3
- package/src/navigation/index.php +40 -0
- package/src/navigation/test/use-navigation-menu.js +236 -0
- package/src/navigation/use-navigation-entities.js +12 -14
- package/src/navigation/use-navigation-menu.js +152 -82
- package/src/navigation/use-template-part-area-label.js +8 -7
- package/src/navigation-link/edit.js +59 -25
- package/src/navigation-link/fallback-variations.js +1 -1
- package/src/navigation-link/hooks.js +2 -2
- package/src/navigation-link/test/__snapshots__/hooks.js.snap +4 -4
- package/src/navigation-link/test/edit.js +2 -24
- package/src/navigation-submenu/edit.js +10 -20
- package/src/page-list/convert-to-links-modal.js +52 -55
- package/src/page-list/edit.js +7 -10
- package/src/page-list/test/convert-to-links-modal.js +6 -12
- package/src/paragraph/deprecated.js +2 -2
- package/src/pattern/edit.js +2 -4
- package/src/post-author/edit.js +26 -25
- package/src/post-author/index.php +3 -2
- package/src/post-author-name/block.json +1 -0
- package/src/post-author-name/index.js +2 -0
- package/src/post-author-name/index.php +1 -1
- package/src/post-author-name/transforms.js +25 -0
- package/src/post-comment/block.json +1 -0
- package/src/post-comments/edit.js +54 -22
- package/src/post-comments/index.php +1 -1
- package/src/post-comments/style.scss +26 -0
- package/src/post-comments-count/block.json +1 -0
- package/src/post-comments-form/form.js +12 -5
- package/src/post-comments-form/index.php +1 -1
- package/src/post-comments-form/style.scss +1 -4
- package/src/post-comments-link/block.json +1 -0
- package/src/post-content/edit.js +2 -3
- package/src/post-date/edit.js +4 -3
- package/src/post-featured-image/edit.js +15 -31
- package/src/post-featured-image/editor.scss +0 -29
- package/src/post-navigation-link/block.json +4 -0
- package/src/post-template/edit.js +5 -0
- package/src/post-template/index.php +30 -0
- package/src/post-terms/edit.js +19 -0
- package/src/post-terms/hooks.js +27 -0
- package/src/post-terms/index.js +14 -7
- package/src/post-terms/index.php +40 -2
- package/src/post-title/index.js +1 -1
- package/src/pullquote/deprecated.js +2 -1
- package/src/pullquote/edit.js +2 -2
- package/src/pullquote/edit.native.js +2 -2
- package/src/query/block.json +2 -1
- package/src/query/edit/index.js +10 -10
- package/src/query/edit/inspector-controls/index.js +25 -11
- package/src/query/edit/inspector-controls/parent-control.js +132 -0
- package/src/query/edit/inspector-controls/sticky-control.js +25 -0
- package/src/query/edit/query-toolbar.js +25 -5
- package/src/query/utils.js +22 -0
- package/src/query-pagination/index.php +0 -1
- package/src/query-title/index.js +1 -1
- package/src/query-title/variations.js +2 -2
- package/src/quote/edit.js +5 -2
- package/src/quote/v2/edit.js +8 -8
- package/src/quote/v2/test/migrate.js +1 -2
- package/src/search/block.json +4 -0
- package/src/search/edit.js +10 -13
- package/src/search/edit.native.js +4 -6
- package/src/search/index.php +29 -16
- package/src/search/style.scss +2 -1
- package/src/separator/editor.scss +1 -0
- package/src/separator/use-deprecated-opacity.js +2 -4
- package/src/shortcode/edit.native.js +30 -15
- package/src/shortcode/style.native.scss +11 -4
- package/src/shortcode/test/__snapshots__/edit.native.js.snap +9 -0
- package/src/shortcode/test/edit.native.js +55 -40
- package/src/site-logo/edit.js +4 -18
- package/src/site-logo/editor.scss +0 -14
- package/src/site-logo/style.scss +6 -0
- package/src/social-links/deprecated.js +4 -2
- package/src/social-links/edit.js +11 -10
- package/src/social-links/edit.native.js +3 -5
- package/src/spacer/controls.js +2 -3
- package/src/spacer/test/index.native.js +10 -21
- package/src/table/block.json +6 -1
- package/src/table/deprecated.js +4 -8
- package/src/table/edit.js +19 -4
- package/src/table/state.js +2 -4
- package/src/table/style.scss +0 -1
- package/src/table-of-contents/block.json +9 -2
- package/src/table-of-contents/edit.js +166 -77
- package/src/table-of-contents/index.js +2 -0
- package/src/table-of-contents/list.tsx +46 -0
- package/src/table-of-contents/save.js +25 -0
- package/src/table-of-contents/utils.ts +71 -0
- package/src/tag-cloud/block.json +1 -1
- package/src/tag-cloud/edit.js +4 -7
- package/src/template-part/edit/advanced-controls.js +4 -4
- package/src/template-part/edit/index.js +31 -25
- package/src/template-part/edit/inner-blocks.js +2 -10
- package/src/template-part/edit/utils/hooks.js +8 -7
- package/src/transformationCategories.native.js +3 -3
- package/src/video/block.json +6 -1
- package/src/video/edit-common-settings.js +2 -8
- package/src/video/edit.js +4 -2
- package/src/video/edit.native.js +38 -16
- package/src/video/editor.scss +3 -6
- package/src/video/index.js +1 -2
- package/src/video/style.scss +0 -2
- package/test/babel-plugin.js +67 -0
- package/tsconfig.json +11 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/build/cover/edit.js +0 -598
- package/build/cover/edit.js.map +0 -1
- package/build/cover/use-cover-is-dark.js.map +0 -1
- package/build/post-terms/variations.js +0 -37
- package/build/post-terms/variations.js.map +0 -1
- package/build-module/cover/edit.js +0 -575
- package/build-module/cover/edit.js.map +0 -1
- package/build-module/cover/use-cover-is-dark.js.map +0 -1
- package/build-module/post-terms/variations.js +0 -27
- package/build-module/post-terms/variations.js.map +0 -1
- package/src/cover/edit.js +0 -757
- package/src/post-terms/variations.js +0 -28
- package/src/table-of-contents/index.php +0 -346
- package/src/table-of-contents/list.js +0 -28
- package/src/table-of-contents/utils.js +0 -126
package/src/image/edit.js
CHANGED
|
@@ -85,20 +85,6 @@ function hasDefaultSize( image, defaultSize ) {
|
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
/**
|
|
89
|
-
* Checks if a media attachment object has been "destroyed",
|
|
90
|
-
* that is, removed from the media library. The core Media Library
|
|
91
|
-
* adds a `destroyed` property to a deleted attachment object in the media collection.
|
|
92
|
-
*
|
|
93
|
-
* @param {number} id The attachment id.
|
|
94
|
-
*
|
|
95
|
-
* @return {boolean} Whether the image has been destroyed.
|
|
96
|
-
*/
|
|
97
|
-
export function isMediaDestroyed( id ) {
|
|
98
|
-
const attachment = window?.wp?.media?.attachment( id ) || {};
|
|
99
|
-
return attachment.destroyed;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
88
|
export function ImageEdit( {
|
|
103
89
|
attributes,
|
|
104
90
|
setAttributes,
|
|
@@ -139,33 +125,6 @@ export function ImageEdit( {
|
|
|
139
125
|
return pick( getSettings(), [ 'imageDefaultSize', 'mediaUpload' ] );
|
|
140
126
|
}, [] );
|
|
141
127
|
|
|
142
|
-
// A callback passed to MediaUpload,
|
|
143
|
-
// fired when the media modal closes.
|
|
144
|
-
function onCloseModal() {
|
|
145
|
-
if ( isMediaDestroyed( attributes?.id ) ) {
|
|
146
|
-
setAttributes( {
|
|
147
|
-
url: undefined,
|
|
148
|
-
id: undefined,
|
|
149
|
-
} );
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/*
|
|
154
|
-
Runs an error callback if the image does not load.
|
|
155
|
-
If the error callback is triggered, we infer that that image
|
|
156
|
-
has been deleted.
|
|
157
|
-
*/
|
|
158
|
-
function onImageError( isReplaced = false ) {
|
|
159
|
-
// If the image block was not replaced with an embed,
|
|
160
|
-
// clear the attributes and trigger the placeholder.
|
|
161
|
-
if ( ! isReplaced ) {
|
|
162
|
-
setAttributes( {
|
|
163
|
-
url: undefined,
|
|
164
|
-
id: undefined,
|
|
165
|
-
} );
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
128
|
function onUploadError( message ) {
|
|
170
129
|
noticeOperations.removeAllNotices();
|
|
171
130
|
noticeOperations.createErrorNotice( message );
|
|
@@ -364,8 +323,6 @@ export function ImageEdit( {
|
|
|
364
323
|
containerRef={ ref }
|
|
365
324
|
context={ context }
|
|
366
325
|
clientId={ clientId }
|
|
367
|
-
onCloseModal={ onCloseModal }
|
|
368
|
-
onImageLoadError={ onImageError }
|
|
369
326
|
/>
|
|
370
327
|
) }
|
|
371
328
|
{ ! url && (
|
|
@@ -382,7 +339,6 @@ export function ImageEdit( {
|
|
|
382
339
|
onSelectURL={ onSelectURL }
|
|
383
340
|
notices={ noticeUI }
|
|
384
341
|
onError={ onUploadError }
|
|
385
|
-
onClose={ onCloseModal }
|
|
386
342
|
accept="image/*"
|
|
387
343
|
allowedTypes={ ALLOWED_MEDIA_TYPES }
|
|
388
344
|
value={ { id, src } }
|
package/src/image/edit.native.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ActivityIndicator,
|
|
6
|
+
Image as RNImage,
|
|
7
|
+
TouchableWithoutFeedback,
|
|
8
|
+
View,
|
|
9
|
+
} from 'react-native';
|
|
5
10
|
import { useRoute } from '@react-navigation/native';
|
|
6
11
|
|
|
7
12
|
/**
|
|
@@ -45,7 +50,7 @@ import {
|
|
|
45
50
|
blockSettingsScreens,
|
|
46
51
|
} from '@wordpress/block-editor';
|
|
47
52
|
import { __, _x, sprintf } from '@wordpress/i18n';
|
|
48
|
-
import { getProtocol, hasQueryArg } from '@wordpress/url';
|
|
53
|
+
import { getProtocol, hasQueryArg, isURL } from '@wordpress/url';
|
|
49
54
|
import { doAction, hasAction } from '@wordpress/hooks';
|
|
50
55
|
import { compose, withPreferredColorScheme } from '@wordpress/compose';
|
|
51
56
|
import { withSelect, withDispatch } from '@wordpress/data';
|
|
@@ -57,6 +62,7 @@ import {
|
|
|
57
62
|
} from '@wordpress/icons';
|
|
58
63
|
import { store as coreStore } from '@wordpress/core-data';
|
|
59
64
|
import { store as editPostStore } from '@wordpress/edit-post';
|
|
65
|
+
import { store as noticesStore } from '@wordpress/notices';
|
|
60
66
|
|
|
61
67
|
/**
|
|
62
68
|
* Internal dependencies
|
|
@@ -190,16 +196,13 @@ export class ImageEdit extends Component {
|
|
|
190
196
|
|
|
191
197
|
this.replacedFeaturedImage = false;
|
|
192
198
|
|
|
193
|
-
this.finishMediaUploadWithSuccess =
|
|
194
|
-
this
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
this
|
|
198
|
-
);
|
|
199
|
+
this.finishMediaUploadWithSuccess =
|
|
200
|
+
this.finishMediaUploadWithSuccess.bind( this );
|
|
201
|
+
this.finishMediaUploadWithFailure =
|
|
202
|
+
this.finishMediaUploadWithFailure.bind( this );
|
|
199
203
|
this.mediaUploadStateReset = this.mediaUploadStateReset.bind( this );
|
|
200
|
-
this.onSelectMediaUploadOption =
|
|
201
|
-
this
|
|
202
|
-
);
|
|
204
|
+
this.onSelectMediaUploadOption =
|
|
205
|
+
this.onSelectMediaUploadOption.bind( this );
|
|
203
206
|
this.updateMediaProgress = this.updateMediaProgress.bind( this );
|
|
204
207
|
this.updateImageURL = this.updateImageURL.bind( this );
|
|
205
208
|
this.onSetNewTab = this.onSetNewTab.bind( this );
|
|
@@ -207,10 +210,10 @@ export class ImageEdit extends Component {
|
|
|
207
210
|
this.onImagePressed = this.onImagePressed.bind( this );
|
|
208
211
|
this.onSetFeatured = this.onSetFeatured.bind( this );
|
|
209
212
|
this.onFocusCaption = this.onFocusCaption.bind( this );
|
|
213
|
+
this.onSelectURL = this.onSelectURL.bind( this );
|
|
210
214
|
this.updateAlignment = this.updateAlignment.bind( this );
|
|
211
|
-
this.accessibilityLabelCreator =
|
|
212
|
-
this
|
|
213
|
-
);
|
|
215
|
+
this.accessibilityLabelCreator =
|
|
216
|
+
this.accessibilityLabelCreator.bind( this );
|
|
214
217
|
this.setMappedAttributes = this.setMappedAttributes.bind( this );
|
|
215
218
|
this.onSizeChangeValue = this.onSizeChangeValue.bind( this );
|
|
216
219
|
}
|
|
@@ -263,12 +266,8 @@ export class ImageEdit extends Component {
|
|
|
263
266
|
}
|
|
264
267
|
|
|
265
268
|
componentDidUpdate( previousProps ) {
|
|
266
|
-
const {
|
|
267
|
-
|
|
268
|
-
attributes,
|
|
269
|
-
setAttributes,
|
|
270
|
-
featuredImageId,
|
|
271
|
-
} = this.props;
|
|
269
|
+
const { image, attributes, setAttributes, featuredImageId } =
|
|
270
|
+
this.props;
|
|
272
271
|
if ( ! previousProps.image && image ) {
|
|
273
272
|
const url =
|
|
274
273
|
getUrlForSlug( image, attributes?.sizeSlug ) ||
|
|
@@ -461,6 +460,42 @@ export class ImageEdit extends Component {
|
|
|
461
460
|
} );
|
|
462
461
|
}
|
|
463
462
|
|
|
463
|
+
onSelectURL( newURL ) {
|
|
464
|
+
const { createErrorNotice, imageDefaultSize, setAttributes } =
|
|
465
|
+
this.props;
|
|
466
|
+
|
|
467
|
+
if ( isURL( newURL ) ) {
|
|
468
|
+
this.setState( {
|
|
469
|
+
isFetchingImage: true,
|
|
470
|
+
} );
|
|
471
|
+
|
|
472
|
+
// Use RN's Image.getSize to determine if URL is a valid image
|
|
473
|
+
RNImage.getSize(
|
|
474
|
+
newURL,
|
|
475
|
+
() => {
|
|
476
|
+
setAttributes( {
|
|
477
|
+
url: newURL,
|
|
478
|
+
id: undefined,
|
|
479
|
+
width: undefined,
|
|
480
|
+
height: undefined,
|
|
481
|
+
sizeSlug: imageDefaultSize,
|
|
482
|
+
} );
|
|
483
|
+
this.setState( {
|
|
484
|
+
isFetchingImage: false,
|
|
485
|
+
} );
|
|
486
|
+
},
|
|
487
|
+
() => {
|
|
488
|
+
createErrorNotice( __( 'Image file not found.' ) );
|
|
489
|
+
this.setState( {
|
|
490
|
+
isFetchingImage: false,
|
|
491
|
+
} );
|
|
492
|
+
}
|
|
493
|
+
);
|
|
494
|
+
} else {
|
|
495
|
+
createErrorNotice( __( 'Invalid URL.' ) );
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
464
499
|
onFocusCaption() {
|
|
465
500
|
if ( this.props.onFocus ) {
|
|
466
501
|
this.props.onFocus();
|
|
@@ -484,6 +519,14 @@ export class ImageEdit extends Component {
|
|
|
484
519
|
);
|
|
485
520
|
}
|
|
486
521
|
|
|
522
|
+
showLoadingIndicator() {
|
|
523
|
+
return (
|
|
524
|
+
<View style={ styles.image__loading }>
|
|
525
|
+
<ActivityIndicator animating />
|
|
526
|
+
</View>
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
|
|
487
530
|
getWidth() {
|
|
488
531
|
const { attributes } = this.props;
|
|
489
532
|
const { align, width } = attributes;
|
|
@@ -611,7 +654,7 @@ export class ImageEdit extends Component {
|
|
|
611
654
|
}
|
|
612
655
|
|
|
613
656
|
render() {
|
|
614
|
-
const { isCaptionSelected } = this.state;
|
|
657
|
+
const { isCaptionSelected, isFetchingImage } = this.state;
|
|
615
658
|
const {
|
|
616
659
|
attributes,
|
|
617
660
|
isSelected,
|
|
@@ -713,9 +756,11 @@ export class ImageEdit extends Component {
|
|
|
713
756
|
if ( ! url ) {
|
|
714
757
|
return (
|
|
715
758
|
<View style={ styles.content }>
|
|
759
|
+
{ isFetchingImage && this.showLoadingIndicator() }
|
|
716
760
|
<MediaPlaceholder
|
|
717
761
|
allowedTypes={ [ MEDIA_TYPE_IMAGE ] }
|
|
718
762
|
onSelect={ this.onSelectMediaUploadOption }
|
|
763
|
+
onSelectURL={ this.onSelectURL }
|
|
719
764
|
icon={ this.getPlaceholderIcon() }
|
|
720
765
|
onFocus={ this.props.onFocus }
|
|
721
766
|
autoOpenMediaUpload={
|
|
@@ -757,7 +802,6 @@ export class ImageEdit extends Component {
|
|
|
757
802
|
<TouchableWithoutFeedback
|
|
758
803
|
accessible={ ! isSelected }
|
|
759
804
|
onPress={ this.onImagePressed }
|
|
760
|
-
onLongPress={ openMediaOptions }
|
|
761
805
|
disabled={ ! isSelected }
|
|
762
806
|
>
|
|
763
807
|
<View style={ styles.content }>
|
|
@@ -785,6 +829,8 @@ export class ImageEdit extends Component {
|
|
|
785
829
|
} ) => {
|
|
786
830
|
return (
|
|
787
831
|
<View style={ imageContainerStyles }>
|
|
832
|
+
{ isFetchingImage &&
|
|
833
|
+
this.showLoadingIndicator() }
|
|
788
834
|
<Image
|
|
789
835
|
align={
|
|
790
836
|
align && alignToFlex[ align ]
|
|
@@ -837,6 +883,7 @@ export class ImageEdit extends Component {
|
|
|
837
883
|
allowedTypes={ [ MEDIA_TYPE_IMAGE ] }
|
|
838
884
|
isReplacingMedia={ true }
|
|
839
885
|
onSelect={ this.onSelectMediaUploadOption }
|
|
886
|
+
onSelectURL={ this.onSelectURL }
|
|
840
887
|
render={ ( { open, getMediaOptions } ) => {
|
|
841
888
|
return getImageComponent( open, getMediaOptions );
|
|
842
889
|
} }
|
|
@@ -848,9 +895,8 @@ export class ImageEdit extends Component {
|
|
|
848
895
|
export default compose( [
|
|
849
896
|
withSelect( ( select, props ) => {
|
|
850
897
|
const { getMedia } = select( coreStore );
|
|
851
|
-
const { getSettings, wasBlockJustInserted } =
|
|
852
|
-
blockEditorStore
|
|
853
|
-
);
|
|
898
|
+
const { getSettings, wasBlockJustInserted } =
|
|
899
|
+
select( blockEditorStore );
|
|
854
900
|
const { getEditedPostAttribute } = select( 'core/editor' );
|
|
855
901
|
const {
|
|
856
902
|
attributes: { id, url },
|
|
@@ -882,7 +928,10 @@ export default compose( [
|
|
|
882
928
|
};
|
|
883
929
|
} ),
|
|
884
930
|
withDispatch( ( dispatch ) => {
|
|
931
|
+
const { createErrorNotice } = dispatch( noticesStore );
|
|
932
|
+
|
|
885
933
|
return {
|
|
934
|
+
createErrorNotice,
|
|
886
935
|
closeSettingsBottomSheet() {
|
|
887
936
|
dispatch( editPostStore ).closeGeneralSidebar();
|
|
888
937
|
},
|
package/src/image/editor.scss
CHANGED
package/src/image/image.js
CHANGED
|
@@ -33,7 +33,11 @@ import {
|
|
|
33
33
|
import { useEffect, useMemo, useState, useRef } from '@wordpress/element';
|
|
34
34
|
import { __, sprintf, isRTL } from '@wordpress/i18n';
|
|
35
35
|
import { getFilename } from '@wordpress/url';
|
|
36
|
-
import {
|
|
36
|
+
import {
|
|
37
|
+
createBlock,
|
|
38
|
+
getDefaultBlockName,
|
|
39
|
+
switchToBlockType,
|
|
40
|
+
} from '@wordpress/blocks';
|
|
37
41
|
import { crop, overlayText, upload } from '@wordpress/icons';
|
|
38
42
|
import { store as noticesStore } from '@wordpress/notices';
|
|
39
43
|
import { store as coreStore } from '@wordpress/core-data';
|
|
@@ -43,7 +47,7 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
43
47
|
*/
|
|
44
48
|
import { createUpgradedEmbedBlock } from '../embed/util';
|
|
45
49
|
import useClientWidth from './use-client-width';
|
|
46
|
-
import { isExternalImage
|
|
50
|
+
import { isExternalImage } from './edit';
|
|
47
51
|
|
|
48
52
|
/**
|
|
49
53
|
* Module constants
|
|
@@ -72,14 +76,12 @@ export default function Image( {
|
|
|
72
76
|
isSelected,
|
|
73
77
|
insertBlocksAfter,
|
|
74
78
|
onReplace,
|
|
75
|
-
onCloseModal,
|
|
76
79
|
onSelectImage,
|
|
77
80
|
onSelectURL,
|
|
78
81
|
onUploadError,
|
|
79
82
|
containerRef,
|
|
80
83
|
context,
|
|
81
84
|
clientId,
|
|
82
|
-
onImageLoadError,
|
|
83
85
|
} ) {
|
|
84
86
|
const imageRef = useRef();
|
|
85
87
|
const captionRef = useRef();
|
|
@@ -90,9 +92,8 @@ export default function Image( {
|
|
|
90
92
|
const { image, multiImageSelection } = useSelect(
|
|
91
93
|
( select ) => {
|
|
92
94
|
const { getMedia } = select( coreStore );
|
|
93
|
-
const { getMultiSelectedBlockClientIds, getBlockName } =
|
|
94
|
-
blockEditorStore
|
|
95
|
-
);
|
|
95
|
+
const { getMultiSelectedBlockClientIds, getBlockName } =
|
|
96
|
+
select( blockEditorStore );
|
|
96
97
|
const multiSelectedClientIds = getMultiSelectedBlockClientIds();
|
|
97
98
|
return {
|
|
98
99
|
image:
|
|
@@ -109,42 +110,36 @@ export default function Image( {
|
|
|
109
110
|
},
|
|
110
111
|
[ id, isSelected ]
|
|
111
112
|
);
|
|
112
|
-
const {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
getBlockRootClientId
|
|
122
|
-
getSettings,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
),
|
|
140
|
-
};
|
|
141
|
-
},
|
|
142
|
-
[ clientId ]
|
|
143
|
-
);
|
|
113
|
+
const { canInsertCover, imageEditing, imageSizes, maxWidth, mediaUpload } =
|
|
114
|
+
useSelect(
|
|
115
|
+
( select ) => {
|
|
116
|
+
const {
|
|
117
|
+
getBlockRootClientId,
|
|
118
|
+
getSettings,
|
|
119
|
+
canInsertBlockType,
|
|
120
|
+
} = select( blockEditorStore );
|
|
121
|
+
|
|
122
|
+
const rootClientId = getBlockRootClientId( clientId );
|
|
123
|
+
const settings = pick( getSettings(), [
|
|
124
|
+
'imageEditing',
|
|
125
|
+
'imageSizes',
|
|
126
|
+
'maxWidth',
|
|
127
|
+
'mediaUpload',
|
|
128
|
+
] );
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
...settings,
|
|
132
|
+
canInsertCover: canInsertBlockType(
|
|
133
|
+
'core/cover',
|
|
134
|
+
rootClientId
|
|
135
|
+
),
|
|
136
|
+
};
|
|
137
|
+
},
|
|
138
|
+
[ clientId ]
|
|
139
|
+
);
|
|
144
140
|
const { replaceBlocks, toggleSelection } = useDispatch( blockEditorStore );
|
|
145
|
-
const { createErrorNotice, createSuccessNotice } =
|
|
146
|
-
noticesStore
|
|
147
|
-
);
|
|
141
|
+
const { createErrorNotice, createSuccessNotice } =
|
|
142
|
+
useDispatch( noticesStore );
|
|
148
143
|
const isLargeViewport = useViewportMatch( 'medium' );
|
|
149
144
|
const isWideAligned = includes( [ 'wide', 'full' ], align );
|
|
150
145
|
const [
|
|
@@ -221,13 +216,10 @@ export default function Image( {
|
|
|
221
216
|
// Check if there's an embed block that handles this URL, e.g., instagram URL.
|
|
222
217
|
// See: https://github.com/WordPress/gutenberg/pull/11472
|
|
223
218
|
const embedBlock = createUpgradedEmbedBlock( { attributes: { url } } );
|
|
224
|
-
const shouldReplace = undefined !== embedBlock;
|
|
225
219
|
|
|
226
|
-
if (
|
|
220
|
+
if ( undefined !== embedBlock ) {
|
|
227
221
|
onReplace( embedBlock );
|
|
228
222
|
}
|
|
229
|
-
|
|
230
|
-
onImageLoadError( shouldReplace );
|
|
231
223
|
}
|
|
232
224
|
|
|
233
225
|
function onSetHref( props ) {
|
|
@@ -299,9 +291,6 @@ export default function Image( {
|
|
|
299
291
|
if ( ! isSelected ) {
|
|
300
292
|
setIsEditingImage( false );
|
|
301
293
|
}
|
|
302
|
-
if ( isSelected && isMediaDestroyed( id ) ) {
|
|
303
|
-
onImageLoadError();
|
|
304
|
-
}
|
|
305
294
|
}, [ isSelected ] );
|
|
306
295
|
|
|
307
296
|
const canEditImage = id && naturalWidth && naturalHeight && imageEditing;
|
|
@@ -365,7 +354,6 @@ export default function Image( {
|
|
|
365
354
|
onSelect={ onSelectImage }
|
|
366
355
|
onSelectURL={ onSelectURL }
|
|
367
356
|
onError={ onUploadError }
|
|
368
|
-
onCloseModal={ onCloseModal }
|
|
369
357
|
/>
|
|
370
358
|
</BlockControls>
|
|
371
359
|
) }
|
|
@@ -598,7 +586,9 @@ export default function Image( {
|
|
|
598
586
|
}
|
|
599
587
|
inlineToolbar
|
|
600
588
|
__unstableOnSplitAtEnd={ () =>
|
|
601
|
-
insertBlocksAfter(
|
|
589
|
+
insertBlocksAfter(
|
|
590
|
+
createBlock( getDefaultBlockName() )
|
|
591
|
+
)
|
|
602
592
|
}
|
|
603
593
|
/>
|
|
604
594
|
) }
|
package/src/image/style.scss
CHANGED
|
@@ -57,3 +57,14 @@
|
|
|
57
57
|
.removeFeaturedButton {
|
|
58
58
|
color: $alert-red;
|
|
59
59
|
}
|
|
60
|
+
|
|
61
|
+
.image__loading {
|
|
62
|
+
align-items: center;
|
|
63
|
+
background-color: rgba(10, 10, 10, 0.5);
|
|
64
|
+
flex: 1;
|
|
65
|
+
height: 100%;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
position: absolute;
|
|
68
|
+
width: 100%;
|
|
69
|
+
z-index: 1;
|
|
70
|
+
}
|
|
@@ -87,7 +87,7 @@ describe( 'Image Block', () => {
|
|
|
87
87
|
|
|
88
88
|
fireEvent.press( screen.getByA11yLabel( /Image Block/ ) );
|
|
89
89
|
// Awaiting navigation event seemingly required due to React Navigation bug
|
|
90
|
-
// https://
|
|
90
|
+
// https://github.com/react-navigation/react-navigation/issues/9701
|
|
91
91
|
await act( () =>
|
|
92
92
|
fireEvent.press( screen.getByA11yLabel( 'Open Settings' ) )
|
|
93
93
|
);
|
|
@@ -113,7 +113,7 @@ describe( 'Image Block', () => {
|
|
|
113
113
|
|
|
114
114
|
fireEvent.press( screen.getByA11yLabel( /Image Block/ ) );
|
|
115
115
|
// Awaiting navigation event seemingly required due to React Navigation bug
|
|
116
|
-
// https://
|
|
116
|
+
// https://github.com/react-navigation/react-navigation/issues/9701
|
|
117
117
|
await act( () =>
|
|
118
118
|
fireEvent.press( screen.getByA11yLabel( 'Open Settings' ) )
|
|
119
119
|
);
|
|
@@ -139,7 +139,7 @@ describe( 'Image Block', () => {
|
|
|
139
139
|
|
|
140
140
|
fireEvent.press( screen.getByA11yLabel( /Image Block/ ) );
|
|
141
141
|
// Awaiting navigation event seemingly required due to React Navigation bug
|
|
142
|
-
// https://
|
|
142
|
+
// https://github.com/react-navigation/react-navigation/issues/9701
|
|
143
143
|
await act( () =>
|
|
144
144
|
fireEvent.press( screen.getByA11yLabel( 'Open Settings' ) )
|
|
145
145
|
);
|
|
@@ -172,7 +172,7 @@ describe( 'Image Block', () => {
|
|
|
172
172
|
|
|
173
173
|
fireEvent.press( screen.getByA11yLabel( /Image Block/ ) );
|
|
174
174
|
// Awaiting navigation event seemingly required due to React Navigation bug
|
|
175
|
-
// https://
|
|
175
|
+
// https://github.com/react-navigation/react-navigation/issues/9701
|
|
176
176
|
await act( () =>
|
|
177
177
|
fireEvent.press( screen.getByA11yLabel( 'Open Settings' ) )
|
|
178
178
|
);
|
|
@@ -212,7 +212,7 @@ describe( 'Image Block', () => {
|
|
|
212
212
|
|
|
213
213
|
fireEvent.press( screen.getByA11yLabel( /Image Block/ ) );
|
|
214
214
|
// Awaiting navigation event seemingly required due to React Navigation bug
|
|
215
|
-
// https://
|
|
215
|
+
// https://github.com/react-navigation/react-navigation/issues/9701
|
|
216
216
|
await act( () =>
|
|
217
217
|
fireEvent.press( screen.getByA11yLabel( 'Open Settings' ) )
|
|
218
218
|
);
|
|
@@ -239,7 +239,7 @@ describe( 'Image Block', () => {
|
|
|
239
239
|
|
|
240
240
|
const settingsButton = screen.getByA11yLabel( 'Open Settings' );
|
|
241
241
|
// Awaiting navigation event seemingly required due to React Navigation bug
|
|
242
|
-
// https://
|
|
242
|
+
// https://github.com/react-navigation/react-navigation/issues/9701
|
|
243
243
|
await act( () => fireEvent.press( settingsButton ) );
|
|
244
244
|
|
|
245
245
|
const linkTargetButton = screen.getByText( 'Open in new tab' );
|
|
@@ -270,7 +270,7 @@ describe( 'Image Block', () => {
|
|
|
270
270
|
|
|
271
271
|
const settingsButton = screen.getByA11yLabel( 'Open Settings' );
|
|
272
272
|
// Awaiting navigation event seemingly required due to React Navigation bug
|
|
273
|
-
// https://
|
|
273
|
+
// https://github.com/react-navigation/react-navigation/issues/9701
|
|
274
274
|
await act( () => fireEvent.press( settingsButton ) );
|
|
275
275
|
|
|
276
276
|
const linkTargetButton = screen.getByText( 'Open in new tab' );
|
package/src/image/transforms.js
CHANGED
|
@@ -90,9 +90,10 @@ const transforms = {
|
|
|
90
90
|
node.className +
|
|
91
91
|
' ' +
|
|
92
92
|
node.querySelector( 'img' ).className;
|
|
93
|
-
const alignMatches =
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
const alignMatches =
|
|
94
|
+
/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(
|
|
95
|
+
className
|
|
96
|
+
);
|
|
96
97
|
const anchor = node.id === '' ? undefined : node.id;
|
|
97
98
|
const align = alignMatches ? alignMatches[ 1 ] : undefined;
|
|
98
99
|
const idMatches = /(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(
|
package/src/image/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { isEmpty,
|
|
4
|
+
import { isEmpty, get } from 'lodash';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
@@ -13,7 +13,7 @@ export function removeNewTabRel( currentRel ) {
|
|
|
13
13
|
|
|
14
14
|
if ( currentRel !== undefined && ! isEmpty( newRel ) ) {
|
|
15
15
|
if ( ! isEmpty( newRel ) ) {
|
|
16
|
-
|
|
16
|
+
NEW_TAB_REL.forEach( ( relVal ) => {
|
|
17
17
|
const regExp = new RegExp( '\\b' + relVal + '\\b', 'gi' );
|
|
18
18
|
newRel = newRel.replace( regExp, '' );
|
|
19
19
|
} );
|