@wordpress/block-library 8.19.2 → 8.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/archives/edit.js +8 -8
- package/build/archives/edit.js.map +1 -1
- package/build/audio/deprecated.js +3 -3
- package/build/audio/deprecated.js.map +1 -1
- package/build/audio/edit.js +17 -16
- package/build/audio/edit.js.map +1 -1
- package/build/audio/edit.native.js +15 -14
- package/build/audio/edit.native.js.map +1 -1
- package/build/audio/save.js +4 -4
- package/build/audio/save.js.map +1 -1
- package/build/avatar/edit.js +19 -19
- package/build/avatar/edit.js.map +1 -1
- package/build/avatar/user-control.js +3 -2
- package/build/avatar/user-control.js.map +1 -1
- package/build/block/edit-title.native.js +8 -8
- package/build/block/edit-title.native.js.map +1 -1
- package/build/block/edit.js +11 -10
- package/build/block/edit.js.map +1 -1
- package/build/block/edit.native.js +17 -16
- package/build/block/edit.native.js.map +1 -1
- package/build/button/color-background.native.js +3 -3
- package/build/button/color-background.native.js.map +1 -1
- package/build/button/constants.js +13 -0
- package/build/button/constants.js.map +1 -0
- package/build/button/deprecated.js +19 -19
- package/build/button/deprecated.js.map +1 -1
- package/build/button/edit.js +42 -44
- package/build/button/edit.js.map +1 -1
- package/build/button/edit.native.js +15 -14
- package/build/button/edit.native.js.map +1 -1
- package/build/button/get-updated-link-attributes.js +54 -0
- package/build/button/get-updated-link-attributes.js.map +1 -0
- package/build/button/save.js +3 -3
- package/build/button/save.js.map +1 -1
- package/build/buttons/deprecated.js +4 -4
- package/build/buttons/deprecated.js.map +1 -1
- package/build/buttons/edit.js +2 -2
- package/build/buttons/edit.js.map +1 -1
- package/build/buttons/edit.native.js +7 -6
- package/build/buttons/edit.native.js.map +1 -1
- package/build/buttons/save.js +2 -2
- package/build/buttons/save.js.map +1 -1
- package/build/calendar/edit.js +6 -6
- package/build/calendar/edit.js.map +1 -1
- package/build/categories/edit.js +17 -17
- package/build/categories/edit.js.map +1 -1
- package/build/code/edit.js +3 -3
- package/build/code/edit.js.map +1 -1
- package/build/code/edit.native.js +2 -2
- package/build/code/edit.native.js.map +1 -1
- package/build/code/save.js +3 -3
- package/build/code/save.js.map +1 -1
- package/build/column/column-preview.native.js +4 -4
- package/build/column/column-preview.native.js.map +1 -1
- package/build/column/deprecated.js +3 -3
- package/build/column/deprecated.js.map +1 -1
- package/build/column/edit.js +5 -5
- package/build/column/edit.js.map +1 -1
- package/build/column/edit.native.js +14 -13
- package/build/column/edit.native.js.map +1 -1
- package/build/column/save.js +2 -2
- package/build/column/save.js.map +1 -1
- package/build/columns/deprecated.js +7 -7
- package/build/columns/deprecated.js.map +1 -1
- package/build/columns/edit.js +9 -9
- package/build/columns/edit.js.map +1 -1
- package/build/columns/edit.native.js +15 -14
- package/build/columns/edit.native.js.map +1 -1
- package/build/columns/save.js +2 -2
- package/build/columns/save.js.map +1 -1
- package/build/columns/variations.js +13 -13
- package/build/columns/variations.js.map +1 -1
- package/build/comment-author-avatar/edit.js +6 -6
- package/build/comment-author-avatar/edit.js.map +1 -1
- package/build/comment-author-name/edit.js +8 -8
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-content/edit.js +8 -7
- package/build/comment-content/edit.js.map +1 -1
- package/build/comment-date/edit.js +8 -8
- package/build/comment-date/edit.js.map +1 -1
- package/build/comment-edit-link/edit.js +7 -7
- package/build/comment-edit-link/edit.js.map +1 -1
- package/build/comment-reply-link/edit.js +5 -5
- package/build/comment-reply-link/edit.js.map +1 -1
- package/build/comment-template/edit.js +14 -13
- package/build/comment-template/edit.js.map +1 -1
- package/build/comment-template/save.js +2 -2
- package/build/comment-template/save.js.map +1 -1
- package/build/comments/deprecated.js +3 -3
- package/build/comments/deprecated.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +3 -3
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments/edit/comments-legacy.js +7 -7
- package/build/comments/edit/comments-legacy.js.map +1 -1
- package/build/comments/edit/index.js +4 -4
- package/build/comments/edit/index.js.map +1 -1
- package/build/comments/edit/placeholder.js +34 -33
- package/build/comments/edit/placeholder.js.map +1 -1
- package/build/comments/save.js +2 -2
- package/build/comments/save.js.map +1 -1
- package/build/comments-pagination/comments-pagination-arrow-controls.js +5 -5
- package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
- package/build/comments-pagination/edit.js +5 -5
- package/build/comments-pagination/edit.js.map +1 -1
- package/build/comments-pagination/save.js +2 -2
- package/build/comments-pagination/save.js.map +1 -1
- package/build/comments-pagination-next/edit.js +4 -4
- package/build/comments-pagination-next/edit.js.map +1 -1
- package/build/comments-pagination-numbers/edit.js +11 -11
- package/build/comments-pagination-numbers/edit.js.map +1 -1
- package/build/comments-pagination-previous/edit.js +4 -4
- package/build/comments-pagination-previous/edit.js.map +1 -1
- package/build/comments-title/edit.js +9 -8
- package/build/comments-title/edit.js.map +1 -1
- package/build/cover/controls.native.js +17 -16
- package/build/cover/controls.native.js.map +1 -1
- package/build/cover/deprecated.js +239 -62
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/block-controls.js +6 -5
- package/build/cover/edit/block-controls.js.map +1 -1
- package/build/cover/edit/color-utils.js +135 -0
- package/build/cover/edit/color-utils.js.map +1 -0
- package/build/cover/edit/cover-placeholder.js +3 -3
- package/build/cover/edit/cover-placeholder.js.map +1 -1
- package/build/cover/edit/index.js +106 -52
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +20 -19
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/edit/resizable-cover-popover.js +3 -2
- package/build/cover/edit/resizable-cover-popover.js.map +1 -1
- package/build/cover/edit.native.js +44 -37
- package/build/cover/edit.native.js.map +1 -1
- package/build/cover/focal-point-settings-button.native.js +4 -4
- package/build/cover/focal-point-settings-button.native.js.map +1 -1
- package/build/cover/index.js +3 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/overlay-color-settings.native.js +3 -2
- package/build/cover/overlay-color-settings.native.js.map +1 -1
- package/build/cover/save.js +7 -7
- package/build/cover/save.js.map +1 -1
- package/build/cover/shared.js +33 -133
- package/build/cover/shared.js.map +1 -1
- package/build/details/edit.js +6 -6
- package/build/details/edit.js.map +1 -1
- package/build/details/save.js +4 -4
- package/build/details/save.js.map +1 -1
- package/build/embed/deprecated.js +6 -6
- package/build/embed/deprecated.js.map +1 -1
- package/build/embed/edit.js +26 -8
- package/build/embed/edit.js.map +1 -1
- package/build/embed/edit.native.js +27 -9
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/embed-controls.js +4 -4
- package/build/embed/embed-controls.js.map +1 -1
- package/build/embed/embed-controls.native.js +5 -5
- package/build/embed/embed-controls.native.js.map +1 -1
- package/build/embed/embed-link-settings.native.js +4 -3
- package/build/embed/embed-link-settings.native.js.map +1 -1
- package/build/embed/embed-loading.js +3 -3
- package/build/embed/embed-loading.js.map +1 -1
- package/build/embed/embed-loading.native.js +3 -3
- package/build/embed/embed-loading.native.js.map +1 -1
- package/build/embed/embed-no-preview.native.js +21 -20
- package/build/embed/embed-no-preview.native.js.map +1 -1
- package/build/embed/embed-placeholder.js +12 -12
- package/build/embed/embed-placeholder.js.map +1 -1
- package/build/embed/embed-placeholder.native.js +13 -12
- package/build/embed/embed-placeholder.native.js.map +1 -1
- package/build/embed/embed-preview.js +13 -12
- package/build/embed/embed-preview.js.map +1 -1
- package/build/embed/embed-preview.native.js +8 -7
- package/build/embed/embed-preview.native.js.map +1 -1
- package/build/embed/icons.js +49 -49
- package/build/embed/icons.js.map +1 -1
- package/build/embed/save.js +4 -4
- package/build/embed/save.js.map +1 -1
- package/build/embed/util.js +4 -3
- package/build/embed/util.js.map +1 -1
- package/build/embed/wp-embed-preview.js +5 -4
- package/build/embed/wp-embed-preview.js.map +1 -1
- package/build/embed/wp-embed-preview.native.js +2 -1
- package/build/embed/wp-embed-preview.native.js.map +1 -1
- package/build/file/deprecated.js +19 -19
- package/build/file/deprecated.js.map +1 -1
- package/build/file/edit.js +18 -17
- package/build/file/edit.js.map +1 -1
- package/build/file/edit.native.js +23 -22
- package/build/file/edit.native.js.map +1 -1
- package/build/file/inspector.js +8 -8
- package/build/file/inspector.js.map +1 -1
- package/build/file/save.js +7 -7
- package/build/file/save.js.map +1 -1
- package/build/footnotes/edit.js +11 -11
- package/build/footnotes/edit.js.map +1 -1
- package/build/footnotes/format.js +2 -2
- package/build/footnotes/format.js.map +1 -1
- package/build/footnotes/index.js +1 -1
- package/build/freeform/convert-to-blocks-button.js +2 -2
- package/build/freeform/convert-to-blocks-button.js.map +1 -1
- package/build/freeform/edit.js +8 -7
- package/build/freeform/edit.js.map +1 -1
- package/build/freeform/edit.native.js +2 -2
- package/build/freeform/edit.native.js.map +1 -1
- package/build/freeform/modal.js +11 -10
- package/build/freeform/modal.js.map +1 -1
- package/build/freeform/save.js +2 -1
- package/build/freeform/save.js.map +1 -1
- package/build/gallery/deprecated.js +38 -38
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit-wrapper.js +3 -3
- package/build/gallery/edit-wrapper.js.map +1 -1
- package/build/gallery/edit.js +18 -17
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js +5 -4
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/gallery.native.js +6 -5
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/gap-styles.js +4 -3
- package/build/gallery/gap-styles.js.map +1 -1
- package/build/gallery/save.js +3 -3
- package/build/gallery/save.js.map +1 -1
- package/build/gallery/shared-icon.js +2 -2
- package/build/gallery/shared-icon.js.map +1 -1
- package/build/gallery/v1/edit.js +10 -9
- package/build/gallery/v1/edit.js.map +1 -1
- package/build/gallery/v1/gallery-button.native.js +3 -3
- package/build/gallery/v1/gallery-button.native.js.map +1 -1
- package/build/gallery/v1/gallery-image.js +14 -13
- package/build/gallery/v1/gallery-image.js.map +1 -1
- package/build/gallery/v1/gallery-image.native.js +15 -14
- package/build/gallery/v1/gallery-image.native.js.map +1 -1
- package/build/gallery/v1/gallery.js +8 -8
- package/build/gallery/v1/gallery.js.map +1 -1
- package/build/gallery/v1/gallery.native.js +7 -6
- package/build/gallery/v1/gallery.native.js.map +1 -1
- package/build/gallery/v1/save.js +8 -8
- package/build/gallery/v1/save.js.map +1 -1
- package/build/gallery/v1/tiles.native.js +4 -3
- package/build/gallery/v1/tiles.native.js.map +1 -1
- package/build/group/deprecated.js +13 -13
- package/build/group/deprecated.js.map +1 -1
- package/build/group/edit.js +8 -8
- package/build/group/edit.js.map +1 -1
- package/build/group/edit.native.js +7 -6
- package/build/group/edit.native.js.map +1 -1
- package/build/group/placeholder.js +16 -15
- package/build/group/placeholder.js.map +1 -1
- package/build/group/save.js +2 -2
- package/build/group/save.js.map +1 -1
- package/build/heading/deprecated.js +8 -8
- package/build/heading/deprecated.js.map +1 -1
- package/build/heading/edit.js +6 -5
- package/build/heading/edit.js.map +1 -1
- package/build/heading/save.js +3 -3
- package/build/heading/save.js.map +1 -1
- package/build/home-link/edit.js +5 -4
- package/build/home-link/edit.js.map +1 -1
- package/build/home-link/save.js +2 -2
- package/build/home-link/save.js.map +1 -1
- package/build/html/edit.js +16 -9
- package/build/html/edit.js.map +1 -1
- package/build/html/preview.js +7 -3
- package/build/html/preview.js.map +1 -1
- package/build/html/save.js +2 -1
- package/build/html/save.js.map +1 -1
- package/build/image/deprecated.js +35 -35
- package/build/image/deprecated.js.map +1 -1
- package/build/image/edit.js +10 -9
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +30 -29
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +32 -31
- package/build/image/image.js.map +1 -1
- package/build/image/save.js +5 -5
- package/build/image/save.js.map +1 -1
- package/build/image/view.js +128 -27
- package/build/image/view.js.map +1 -1
- package/build/latest-comments/edit.js +8 -8
- package/build/latest-comments/edit.js.map +1 -1
- package/build/latest-posts/edit.js +34 -33
- package/build/latest-posts/edit.js.map +1 -1
- package/build/latest-posts/edit.native.js +19 -18
- package/build/latest-posts/edit.native.js.map +1 -1
- package/build/list/deprecated.js +7 -7
- package/build/list/deprecated.js.map +1 -1
- package/build/list/edit.js +9 -8
- package/build/list/edit.js.map +1 -1
- package/build/list/ordered-list-settings.js +5 -5
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/list/save.js +3 -3
- package/build/list/save.js.map +1 -1
- package/build/list/tag-name.js +2 -1
- package/build/list/tag-name.js.map +1 -1
- package/build/list/tag-name.native.js +2 -1
- package/build/list/tag-name.native.js.map +1 -1
- package/build/list-item/edit.js +7 -7
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/edit.native.js +11 -10
- package/build/list-item/edit.native.js.map +1 -1
- package/build/list-item/icons.native.js +7 -7
- package/build/list-item/icons.native.js.map +1 -1
- package/build/list-item/list-style-type.native.js +8 -7
- package/build/list-item/list-style-type.native.js.map +1 -1
- package/build/list-item/save.js +4 -4
- package/build/list-item/save.js.map +1 -1
- package/build/loginout/edit.js +6 -6
- package/build/loginout/edit.js.map +1 -1
- package/build/loginout/index.js +8 -0
- package/build/loginout/index.js.map +1 -1
- package/build/media-text/deprecated.js +44 -44
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/edit.js +21 -20
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/edit.native.js +12 -11
- package/build/media-text/edit.native.js.map +1 -1
- package/build/media-text/icon-retry.native.js +4 -4
- package/build/media-text/icon-retry.native.js.map +1 -1
- package/build/media-text/media-container.js +13 -12
- package/build/media-text/media-container.js.map +1 -1
- package/build/media-text/media-container.native.js +20 -19
- package/build/media-text/media-container.native.js.map +1 -1
- package/build/media-text/save.js +10 -10
- package/build/media-text/save.js.map +1 -1
- package/build/missing/edit.js +6 -5
- package/build/missing/edit.js.map +1 -1
- package/build/missing/edit.native.js +17 -16
- package/build/missing/edit.native.js.map +1 -1
- package/build/missing/save.js +2 -1
- package/build/missing/save.js.map +1 -1
- package/build/more/edit.js +4 -4
- package/build/more/edit.js.map +1 -1
- package/build/more/edit.native.js +3 -2
- package/build/more/edit.native.js.map +1 -1
- package/build/more/save.js +2 -1
- package/build/more/save.js.map +1 -1
- package/build/navigation/deprecated.js +7 -7
- package/build/navigation/deprecated.js.map +1 -1
- package/build/navigation/edit/accessible-description.js +2 -2
- package/build/navigation/edit/accessible-description.js.map +1 -1
- package/build/navigation/edit/accessible-menu-description.js +2 -2
- package/build/navigation/edit/accessible-menu-description.js.map +1 -1
- package/build/navigation/edit/deleted-navigation-warning.js +8 -5
- package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
- package/build/navigation/edit/index.js +47 -45
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +6 -4
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/leaf-more-menu.js +7 -7
- package/build/navigation/edit/leaf-more-menu.js.map +1 -1
- package/build/navigation/edit/manage-menus-button.js +2 -2
- package/build/navigation/edit/manage-menus-button.js.map +1 -1
- package/build/navigation/edit/menu-inspector-controls.js +13 -13
- package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +7 -6
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/edit/navigation-menu-name-control.js +2 -2
- package/build/navigation/edit/navigation-menu-name-control.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +9 -8
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/overlay-menu-icon.js +5 -5
- package/build/navigation/edit/overlay-menu-icon.js.map +1 -1
- package/build/navigation/edit/overlay-menu-preview.js +7 -7
- package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +10 -9
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/edit/placeholder/placeholder-preview.js +4 -4
- package/build/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +9 -9
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js +3 -2
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation/save.js +2 -2
- package/build/navigation/save.js.map +1 -1
- package/build/navigation-link/edit.js +21 -20
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/icons.js +3 -3
- package/build/navigation-link/icons.js.map +1 -1
- package/build/navigation-link/index.js +2 -2
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-link/link-ui.js +20 -11
- package/build/navigation-link/link-ui.js.map +1 -1
- package/build/navigation-link/save.js +2 -2
- package/build/navigation-link/save.js.map +1 -1
- package/build/navigation-submenu/edit.js +16 -15
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/navigation-submenu/icons.js +3 -3
- package/build/navigation-submenu/icons.js.map +1 -1
- package/build/navigation-submenu/save.js +2 -2
- package/build/navigation-submenu/save.js.map +1 -1
- package/build/nextpage/edit.js +3 -3
- package/build/nextpage/edit.js.map +1 -1
- package/build/nextpage/edit.native.js +3 -3
- package/build/nextpage/edit.native.js.map +1 -1
- package/build/nextpage/save.js +2 -1
- package/build/nextpage/save.js.map +1 -1
- package/build/page-list/convert-to-links-modal.js +6 -6
- package/build/page-list/convert-to-links-modal.js.map +1 -1
- package/build/page-list/edit.js +21 -20
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list-item/edit.js +7 -7
- package/build/page-list-item/edit.js.map +1 -1
- package/build/paragraph/deprecated.js +9 -8
- package/build/paragraph/deprecated.js.map +1 -1
- package/build/paragraph/edit.js +10 -10
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/edit.native.js +5 -4
- package/build/paragraph/edit.native.js.map +1 -1
- package/build/paragraph/save.js +3 -3
- package/build/paragraph/save.js.map +1 -1
- package/build/pattern/edit.js +3 -2
- package/build/pattern/edit.js.map +1 -1
- package/build/post-author/edit.js +19 -19
- package/build/post-author/edit.js.map +1 -1
- package/build/post-author-biography/edit.js +4 -4
- package/build/post-author-biography/edit.js.map +1 -1
- package/build/post-author-name/edit.js +8 -8
- package/build/post-author-name/edit.js.map +1 -1
- package/build/post-comment/edit.js +7 -6
- package/build/post-comment/edit.js.map +1 -1
- package/build/post-comment/save.js +2 -2
- package/build/post-comment/save.js.map +1 -1
- package/build/post-comments-count/edit.js +6 -5
- package/build/post-comments-count/edit.js.map +1 -1
- package/build/post-comments-form/edit.js +6 -6
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/form.js +13 -13
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-comments-link/edit.js +7 -6
- package/build/post-comments-link/edit.js.map +1 -1
- package/build/post-content/edit.js +14 -14
- package/build/post-content/edit.js.map +1 -1
- package/build/post-date/edit.js +14 -13
- package/build/post-date/edit.js.map +1 -1
- package/build/post-excerpt/edit.js +16 -15
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js +15 -15
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +17 -17
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/overlay.js +6 -6
- package/build/post-featured-image/overlay.js.map +1 -1
- package/build/post-navigation-link/edit.js +13 -13
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-template/edit.js +11 -10
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/save.js +2 -2
- package/build/post-template/save.js.map +1 -1
- package/build/post-terms/edit.js +9 -9
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-time-to-read/edit.js +5 -4
- package/build/post-time-to-read/edit.js.map +1 -1
- package/build/post-time-to-read/icon.js +3 -3
- package/build/post-time-to-read/icon.js.map +1 -1
- package/build/post-title/edit.js +15 -15
- package/build/post-title/edit.js.map +1 -1
- package/build/preformatted/edit.js +2 -2
- package/build/preformatted/edit.js.map +1 -1
- package/build/preformatted/edit.native.js +3 -3
- package/build/preformatted/edit.native.js.map +1 -1
- package/build/preformatted/save.js +3 -3
- package/build/preformatted/save.js.map +1 -1
- package/build/pullquote/blockquote.native.js +3 -2
- package/build/pullquote/blockquote.native.js.map +1 -1
- package/build/pullquote/deprecated.js +21 -21
- package/build/pullquote/deprecated.js.map +1 -1
- package/build/pullquote/edit.js +7 -6
- package/build/pullquote/edit.js.map +1 -1
- package/build/pullquote/edit.native.js +7 -7
- package/build/pullquote/edit.native.js.map +1 -1
- package/build/pullquote/figure.native.js +2 -2
- package/build/pullquote/figure.native.js.map +1 -1
- package/build/pullquote/save.js +4 -4
- package/build/pullquote/save.js.map +1 -1
- package/build/query/deprecated.js +6 -6
- package/build/query/deprecated.js.map +1 -1
- package/build/query/edit/enhanced-pagination-modal.js +6 -5
- package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build/query/edit/index.js +4 -3
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/author-control.js +2 -2
- package/build/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build/query/edit/inspector-controls/create-new-post-link.js +4 -3
- package/build/query/edit/inspector-controls/create-new-post-link.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +20 -19
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/order-control.js +2 -2
- package/build/query/edit/inspector-controls/order-control.js.map +1 -1
- package/build/query/edit/inspector-controls/parent-control.js +3 -2
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build/query/edit/inspector-controls/sticky-control.js +2 -2
- package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +6 -5
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/edit/pattern-selection-modal.js +7 -6
- package/build/query/edit/pattern-selection-modal.js.map +1 -1
- package/build/query/edit/query-content.js +8 -7
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/edit/query-placeholder.js +9 -8
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/edit/query-toolbar.js +9 -9
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/query/icons.js +9 -9
- package/build/query/icons.js.map +1 -1
- package/build/query/save.js +2 -2
- package/build/query/save.js.map +1 -1
- package/build/query/view.js +5 -5
- package/build/query/view.js.map +1 -1
- package/build/query-no-results/edit.js +2 -2
- package/build/query-no-results/edit.js.map +1 -1
- package/build/query-no-results/save.js +2 -2
- package/build/query-no-results/save.js.map +1 -1
- package/build/query-pagination/deprecated.js +3 -3
- package/build/query-pagination/deprecated.js.map +1 -1
- package/build/query-pagination/edit.js +6 -5
- package/build/query-pagination/edit.js.map +1 -1
- package/build/query-pagination/query-pagination-arrow-controls.js +5 -5
- package/build/query-pagination/query-pagination-arrow-controls.js.map +1 -1
- package/build/query-pagination/query-pagination-label-control.js +2 -2
- package/build/query-pagination/query-pagination-label-control.js.map +1 -1
- package/build/query-pagination/save.js +2 -2
- package/build/query-pagination/save.js.map +1 -1
- package/build/query-pagination-next/edit.js +4 -4
- package/build/query-pagination-next/edit.js.map +1 -1
- package/build/query-pagination-numbers/edit.js +6 -6
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-pagination-previous/edit.js +4 -4
- package/build/query-pagination-previous/edit.js.map +1 -1
- package/build/query-title/edit.js +12 -12
- package/build/query-title/edit.js.map +1 -1
- package/build/quote/deprecated.js +13 -13
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/edit.js +6 -5
- package/build/quote/edit.js.map +1 -1
- package/build/quote/save.js +3 -3
- package/build/quote/save.js.map +1 -1
- package/build/read-more/edit.js +4 -4
- package/build/read-more/edit.js.map +1 -1
- package/build/rss/edit.js +20 -18
- package/build/rss/edit.js.map +1 -1
- package/build/search/edit.js +30 -27
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +16 -15
- package/build/search/edit.native.js.map +1 -1
- package/build/search/icons.js +17 -17
- package/build/search/icons.js.map +1 -1
- package/build/separator/deprecated.js +2 -2
- package/build/separator/deprecated.js.map +1 -1
- package/build/separator/edit.js +2 -2
- package/build/separator/edit.js.map +1 -1
- package/build/separator/save.js +2 -2
- package/build/separator/save.js.map +1 -1
- package/build/shortcode/edit.js +5 -5
- package/build/shortcode/edit.js.map +1 -1
- package/build/shortcode/edit.native.js +5 -4
- package/build/shortcode/edit.native.js.map +1 -1
- package/build/shortcode/save.js +2 -1
- package/build/shortcode/save.js.map +1 -1
- package/build/site-logo/edit.js +41 -40
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-tagline/edit.js +5 -5
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-tagline/icon.js +3 -3
- package/build/site-tagline/icon.js.map +1 -1
- package/build/site-title/edit/index.js +12 -12
- package/build/site-title/edit/index.js.map +1 -1
- package/build/social-link/edit.js +15 -14
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/edit.native.js +8 -7
- package/build/social-link/edit.native.js.map +1 -1
- package/build/social-link/icons/amazon.js +3 -3
- package/build/social-link/icons/amazon.js.map +1 -1
- package/build/social-link/icons/bandcamp.js +3 -3
- package/build/social-link/icons/bandcamp.js.map +1 -1
- package/build/social-link/icons/behance.js +3 -3
- package/build/social-link/icons/behance.js.map +1 -1
- package/build/social-link/icons/chain.js +3 -3
- package/build/social-link/icons/chain.js.map +1 -1
- package/build/social-link/icons/codepen.js +3 -3
- package/build/social-link/icons/codepen.js.map +1 -1
- package/build/social-link/icons/deviantart.js +3 -3
- package/build/social-link/icons/deviantart.js.map +1 -1
- package/build/social-link/icons/dribbble.js +3 -3
- package/build/social-link/icons/dribbble.js.map +1 -1
- package/build/social-link/icons/dropbox.js +3 -3
- package/build/social-link/icons/dropbox.js.map +1 -1
- package/build/social-link/icons/etsy.js +3 -3
- package/build/social-link/icons/etsy.js.map +1 -1
- package/build/social-link/icons/facebook.js +3 -3
- package/build/social-link/icons/facebook.js.map +1 -1
- package/build/social-link/icons/feed.js +3 -3
- package/build/social-link/icons/feed.js.map +1 -1
- package/build/social-link/icons/fivehundredpx.js +3 -3
- package/build/social-link/icons/fivehundredpx.js.map +1 -1
- package/build/social-link/icons/flickr.js +3 -3
- package/build/social-link/icons/flickr.js.map +1 -1
- package/build/social-link/icons/foursquare.js +3 -3
- package/build/social-link/icons/foursquare.js.map +1 -1
- package/build/social-link/icons/github.js +3 -3
- package/build/social-link/icons/github.js.map +1 -1
- package/build/social-link/icons/goodreads.js +3 -3
- package/build/social-link/icons/goodreads.js.map +1 -1
- package/build/social-link/icons/google.js +3 -3
- package/build/social-link/icons/google.js.map +1 -1
- package/build/social-link/icons/instagram.js +3 -3
- package/build/social-link/icons/instagram.js.map +1 -1
- package/build/social-link/icons/lastfm.js +3 -3
- package/build/social-link/icons/lastfm.js.map +1 -1
- package/build/social-link/icons/linkedin.js +3 -3
- package/build/social-link/icons/linkedin.js.map +1 -1
- package/build/social-link/icons/mail.js +3 -3
- package/build/social-link/icons/mail.js.map +1 -1
- package/build/social-link/icons/mastodon.js +3 -3
- package/build/social-link/icons/mastodon.js.map +1 -1
- package/build/social-link/icons/medium.js +3 -3
- package/build/social-link/icons/medium.js.map +1 -1
- package/build/social-link/icons/meetup.js +3 -3
- package/build/social-link/icons/meetup.js.map +1 -1
- package/build/social-link/icons/patreon.js +4 -4
- package/build/social-link/icons/patreon.js.map +1 -1
- package/build/social-link/icons/pinterest.js +3 -3
- package/build/social-link/icons/pinterest.js.map +1 -1
- package/build/social-link/icons/pocket.js +3 -3
- package/build/social-link/icons/pocket.js.map +1 -1
- package/build/social-link/icons/reddit.js +3 -3
- package/build/social-link/icons/reddit.js.map +1 -1
- package/build/social-link/icons/skype.js +3 -3
- package/build/social-link/icons/skype.js.map +1 -1
- package/build/social-link/icons/snapchat.js +3 -3
- package/build/social-link/icons/snapchat.js.map +1 -1
- package/build/social-link/icons/soundcloud.js +3 -3
- package/build/social-link/icons/soundcloud.js.map +1 -1
- package/build/social-link/icons/spotify.js +3 -3
- package/build/social-link/icons/spotify.js.map +1 -1
- package/build/social-link/icons/telegram.js +3 -3
- package/build/social-link/icons/telegram.js.map +1 -1
- package/build/social-link/icons/threads.js +3 -3
- package/build/social-link/icons/threads.js.map +1 -1
- package/build/social-link/icons/tiktok.js +3 -3
- package/build/social-link/icons/tiktok.js.map +1 -1
- package/build/social-link/icons/tumblr.js +3 -3
- package/build/social-link/icons/tumblr.js.map +1 -1
- package/build/social-link/icons/twitch.js +3 -3
- package/build/social-link/icons/twitch.js.map +1 -1
- package/build/social-link/icons/twitter.js +3 -3
- package/build/social-link/icons/twitter.js.map +1 -1
- package/build/social-link/icons/vimeo.js +3 -3
- package/build/social-link/icons/vimeo.js.map +1 -1
- package/build/social-link/icons/vk.js +3 -3
- package/build/social-link/icons/vk.js.map +1 -1
- package/build/social-link/icons/whatsapp.js +3 -3
- package/build/social-link/icons/whatsapp.js.map +1 -1
- package/build/social-link/icons/wordpress.js +3 -3
- package/build/social-link/icons/wordpress.js.map +1 -1
- package/build/social-link/icons/x.js +3 -3
- package/build/social-link/icons/x.js.map +1 -1
- package/build/social-link/icons/yelp.js +3 -3
- package/build/social-link/icons/yelp.js.map +1 -1
- package/build/social-link/icons/youtube.js +3 -3
- package/build/social-link/icons/youtube.js.map +1 -1
- package/build/social-link/social-list.js +1 -1
- package/build/social-link/social-list.js.map +1 -1
- package/build/social-links/deprecated.js +3 -3
- package/build/social-links/deprecated.js.map +1 -1
- package/build/social-links/edit.js +19 -18
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/edit.native.js +7 -6
- package/build/social-links/edit.native.js.map +1 -1
- package/build/social-links/save.js +2 -2
- package/build/social-links/save.js.map +1 -1
- package/build/spacer/controls.js +8 -8
- package/build/spacer/controls.js.map +1 -1
- package/build/spacer/controls.native.js +4 -3
- package/build/spacer/controls.native.js.map +1 -1
- package/build/spacer/deprecated.js +2 -2
- package/build/spacer/deprecated.js.map +1 -1
- package/build/spacer/edit.js +7 -6
- package/build/spacer/edit.js.map +1 -1
- package/build/spacer/edit.native.js +4 -3
- package/build/spacer/edit.native.js.map +1 -1
- package/build/spacer/save.js +2 -2
- package/build/spacer/save.js.map +1 -1
- package/build/spacer/save.native.js +2 -2
- package/build/spacer/save.native.js.map +1 -1
- package/build/table/deprecated.js +26 -26
- package/build/table/deprecated.js.map +1 -1
- package/build/table/edit.js +24 -23
- package/build/table/edit.js.map +1 -1
- package/build/table/save.js +10 -10
- package/build/table/save.js.map +1 -1
- package/build/table-of-contents/edit.js +35 -14
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/table-of-contents/icon.js +3 -3
- package/build/table-of-contents/icon.js.map +1 -1
- package/build/table-of-contents/list.js +16 -10
- package/build/table-of-contents/list.js.map +1 -1
- package/build/table-of-contents/save.js +3 -3
- package/build/table-of-contents/save.js.map +1 -1
- package/build/tag-cloud/edit.js +11 -11
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +6 -6
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/import-controls.js +10 -8
- package/build/template-part/edit/import-controls.js.map +1 -1
- package/build/template-part/edit/index.js +17 -16
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +2 -2
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build/template-part/edit/placeholder.js +6 -5
- package/build/template-part/edit/placeholder.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +8 -7
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/template-part/edit/title-modal.js +7 -6
- package/build/template-part/edit/title-modal.js.map +1 -1
- package/build/term-description/edit.js +6 -6
- package/build/term-description/edit.js.map +1 -1
- package/build/text-columns/edit.js +6 -6
- package/build/text-columns/edit.js.map +1 -1
- package/build/text-columns/save.js +4 -4
- package/build/text-columns/save.js.map +1 -1
- package/build/verse/deprecated.js +4 -4
- package/build/verse/deprecated.js.map +1 -1
- package/build/verse/edit.js +3 -3
- package/build/verse/edit.js.map +1 -1
- package/build/verse/save.js +3 -3
- package/build/verse/save.js.map +1 -1
- package/build/video/deprecated.js +5 -5
- package/build/video/deprecated.js.map +1 -1
- package/build/video/edit-common-settings.js +8 -7
- package/build/video/edit-common-settings.js.map +1 -1
- package/build/video/edit.js +23 -22
- package/build/video/edit.js.map +1 -1
- package/build/video/edit.native.js +21 -20
- package/build/video/edit.native.js.map +1 -1
- package/build/video/icon-retry.native.js +4 -4
- package/build/video/icon-retry.native.js.map +1 -1
- package/build/video/save.js +5 -5
- package/build/video/save.js.map +1 -1
- package/build/video/tracks-editor.js +25 -24
- package/build/video/tracks-editor.js.map +1 -1
- package/build/video/tracks.js +2 -2
- package/build/video/tracks.js.map +1 -1
- package/build-module/archives/edit.js +1 -1
- package/build-module/audio/deprecated.js +1 -1
- package/build-module/audio/edit.js +1 -1
- package/build-module/audio/edit.native.js +3 -3
- package/build-module/audio/edit.native.js.map +1 -1
- package/build-module/audio/save.js +1 -1
- package/build-module/avatar/edit.js +1 -1
- package/build-module/avatar/user-control.js +1 -1
- package/build-module/block/edit-title.native.js +1 -1
- package/build-module/block/edit.js +1 -1
- package/build-module/block/edit.native.js +1 -1
- package/build-module/button/color-background.native.js +1 -1
- package/build-module/button/constants.js +4 -0
- package/build-module/button/constants.js.map +1 -0
- package/build-module/button/deprecated.js +1 -1
- package/build-module/button/edit.js +27 -30
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/edit.native.js +1 -1
- package/build-module/button/get-updated-link-attributes.js +48 -0
- package/build-module/button/get-updated-link-attributes.js.map +1 -0
- package/build-module/button/save.js +1 -1
- package/build-module/buttons/deprecated.js +1 -1
- package/build-module/buttons/edit.js +1 -1
- package/build-module/buttons/edit.native.js +1 -1
- package/build-module/buttons/save.js +1 -1
- package/build-module/calendar/edit.js +1 -1
- package/build-module/categories/edit.js +1 -1
- package/build-module/code/edit.js +1 -1
- package/build-module/code/edit.native.js +1 -1
- package/build-module/code/save.js +1 -1
- package/build-module/column/column-preview.native.js +1 -1
- package/build-module/column/deprecated.js +1 -1
- package/build-module/column/edit.js +1 -1
- package/build-module/column/edit.native.js +1 -1
- package/build-module/column/save.js +1 -1
- package/build-module/columns/deprecated.js +1 -1
- package/build-module/columns/edit.js +1 -1
- package/build-module/columns/edit.native.js +1 -1
- package/build-module/columns/save.js +1 -1
- package/build-module/columns/variations.js +1 -1
- package/build-module/comment-author-avatar/edit.js +1 -1
- package/build-module/comment-author-name/edit.js +1 -1
- package/build-module/comment-content/edit.js +1 -1
- package/build-module/comment-date/edit.js +1 -1
- package/build-module/comment-edit-link/edit.js +1 -1
- package/build-module/comment-reply-link/edit.js +1 -1
- package/build-module/comment-template/edit.js +3 -3
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comment-template/save.js +1 -1
- package/build-module/comments/deprecated.js +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +1 -1
- package/build-module/comments/edit/comments-legacy.js +1 -1
- package/build-module/comments/edit/index.js +1 -1
- package/build-module/comments/edit/placeholder.js +1 -1
- package/build-module/comments/save.js +1 -1
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js +1 -1
- package/build-module/comments-pagination/edit.js +1 -1
- package/build-module/comments-pagination/save.js +1 -1
- package/build-module/comments-pagination-next/edit.js +1 -1
- package/build-module/comments-pagination-numbers/edit.js +1 -1
- package/build-module/comments-pagination-previous/edit.js +1 -1
- package/build-module/comments-title/edit.js +1 -1
- package/build-module/cover/controls.native.js +1 -1
- package/build-module/cover/deprecated.js +190 -13
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/block-controls.js +1 -1
- package/build-module/cover/edit/color-utils.js +121 -0
- package/build-module/cover/edit/color-utils.js.map +1 -0
- package/build-module/cover/edit/cover-placeholder.js +1 -1
- package/build-module/cover/edit/index.js +90 -37
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +2 -2
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/edit/resizable-cover-popover.js +1 -1
- package/build-module/cover/edit.native.js +9 -3
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/focal-point-settings-button.native.js +1 -1
- package/build-module/cover/index.js +3 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/overlay-color-settings.native.js +1 -1
- package/build-module/cover/save.js +1 -1
- package/build-module/cover/shared.js +33 -132
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/details/edit.js +1 -1
- package/build-module/details/save.js +1 -1
- package/build-module/embed/deprecated.js +1 -1
- package/build-module/embed/edit.js +18 -1
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/edit.native.js +18 -1
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-controls.js +1 -1
- package/build-module/embed/embed-controls.native.js +1 -1
- package/build-module/embed/embed-link-settings.native.js +1 -1
- package/build-module/embed/embed-loading.js +1 -1
- package/build-module/embed/embed-loading.native.js +1 -1
- package/build-module/embed/embed-no-preview.native.js +1 -1
- package/build-module/embed/embed-placeholder.js +1 -1
- package/build-module/embed/embed-placeholder.native.js +1 -1
- package/build-module/embed/embed-preview.js +1 -1
- package/build-module/embed/embed-preview.native.js +1 -1
- package/build-module/embed/icons.js +1 -1
- package/build-module/embed/save.js +1 -1
- package/build-module/embed/util.js +1 -1
- package/build-module/embed/wp-embed-preview.js +2 -2
- package/build-module/embed/wp-embed-preview.js.map +1 -1
- package/build-module/embed/wp-embed-preview.native.js +1 -1
- package/build-module/file/deprecated.js +1 -1
- package/build-module/file/edit.js +1 -1
- package/build-module/file/edit.native.js +1 -1
- package/build-module/file/inspector.js +1 -1
- package/build-module/file/save.js +1 -1
- package/build-module/footnotes/edit.js +1 -1
- package/build-module/footnotes/format.js +1 -1
- package/build-module/footnotes/index.js +1 -1
- package/build-module/freeform/convert-to-blocks-button.js +1 -1
- package/build-module/freeform/edit.js +1 -1
- package/build-module/freeform/edit.native.js +1 -1
- package/build-module/freeform/modal.js +1 -1
- package/build-module/freeform/save.js +1 -1
- package/build-module/gallery/deprecated.js +1 -1
- package/build-module/gallery/edit-wrapper.js +1 -1
- package/build-module/gallery/edit.js +1 -1
- package/build-module/gallery/gallery.js +1 -1
- package/build-module/gallery/gallery.native.js +1 -1
- package/build-module/gallery/gap-styles.js +1 -1
- package/build-module/gallery/save.js +1 -1
- package/build-module/gallery/shared-icon.js +1 -1
- package/build-module/gallery/v1/edit.js +1 -1
- package/build-module/gallery/v1/gallery-button.native.js +1 -1
- package/build-module/gallery/v1/gallery-image.js +1 -1
- package/build-module/gallery/v1/gallery-image.native.js +1 -1
- package/build-module/gallery/v1/gallery.js +1 -1
- package/build-module/gallery/v1/gallery.native.js +1 -1
- package/build-module/gallery/v1/save.js +1 -1
- package/build-module/gallery/v1/tiles.native.js +1 -1
- package/build-module/group/deprecated.js +1 -1
- package/build-module/group/edit.js +1 -1
- package/build-module/group/edit.native.js +1 -1
- package/build-module/group/placeholder.js +1 -1
- package/build-module/group/save.js +1 -1
- package/build-module/heading/deprecated.js +1 -1
- package/build-module/heading/edit.js +1 -1
- package/build-module/heading/save.js +1 -1
- package/build-module/home-link/edit.js +1 -1
- package/build-module/home-link/save.js +1 -1
- package/build-module/html/edit.js +13 -7
- package/build-module/html/edit.js.map +1 -1
- package/build-module/html/preview.js +5 -2
- package/build-module/html/preview.js.map +1 -1
- package/build-module/html/save.js +1 -1
- package/build-module/image/deprecated.js +1 -1
- package/build-module/image/edit.js +1 -1
- package/build-module/image/edit.native.js +1 -1
- package/build-module/image/image.js +3 -3
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/save.js +1 -1
- package/build-module/image/view.js +128 -27
- package/build-module/image/view.js.map +1 -1
- package/build-module/latest-comments/edit.js +1 -1
- package/build-module/latest-posts/edit.js +1 -1
- package/build-module/latest-posts/edit.native.js +1 -1
- package/build-module/list/deprecated.js +1 -1
- package/build-module/list/edit.js +1 -1
- package/build-module/list/ordered-list-settings.js +1 -1
- package/build-module/list/save.js +1 -1
- package/build-module/list/tag-name.js +1 -1
- package/build-module/list/tag-name.native.js +1 -1
- package/build-module/list-item/edit.js +1 -1
- package/build-module/list-item/edit.native.js +1 -1
- package/build-module/list-item/icons.native.js +1 -1
- package/build-module/list-item/list-style-type.native.js +1 -1
- package/build-module/list-item/save.js +1 -1
- package/build-module/loginout/edit.js +1 -1
- package/build-module/loginout/index.js +8 -0
- package/build-module/loginout/index.js.map +1 -1
- package/build-module/media-text/deprecated.js +1 -1
- package/build-module/media-text/edit.js +2 -2
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/edit.native.js +1 -1
- package/build-module/media-text/icon-retry.native.js +1 -1
- package/build-module/media-text/media-container.js +1 -1
- package/build-module/media-text/media-container.native.js +1 -1
- package/build-module/media-text/save.js +1 -1
- package/build-module/missing/edit.js +1 -1
- package/build-module/missing/edit.native.js +1 -1
- package/build-module/missing/save.js +1 -1
- package/build-module/more/edit.js +1 -1
- package/build-module/more/edit.native.js +1 -1
- package/build-module/more/save.js +1 -1
- package/build-module/navigation/deprecated.js +1 -1
- package/build-module/navigation/edit/accessible-description.js +1 -1
- package/build-module/navigation/edit/accessible-menu-description.js +1 -1
- package/build-module/navigation/edit/deleted-navigation-warning.js +8 -5
- package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
- package/build-module/navigation/edit/index.js +4 -3
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +3 -2
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/leaf-more-menu.js +1 -1
- package/build-module/navigation/edit/manage-menus-button.js +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -1
- package/build-module/navigation/edit/navigation-menu-name-control.js +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +1 -1
- package/build-module/navigation/edit/overlay-menu-icon.js +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +1 -1
- package/build-module/navigation/edit/placeholder/index.js +1 -1
- package/build-module/navigation/edit/placeholder/placeholder-preview.js +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js +1 -1
- package/build-module/navigation/save.js +1 -1
- package/build-module/navigation-link/edit.js +1 -1
- package/build-module/navigation-link/icons.js +1 -1
- package/build-module/navigation-link/index.js +1 -1
- package/build-module/navigation-link/link-ui.js +10 -2
- package/build-module/navigation-link/link-ui.js.map +1 -1
- package/build-module/navigation-link/save.js +1 -1
- package/build-module/navigation-submenu/edit.js +1 -1
- package/build-module/navigation-submenu/icons.js +1 -1
- package/build-module/navigation-submenu/save.js +1 -1
- package/build-module/nextpage/edit.js +1 -1
- package/build-module/nextpage/edit.native.js +1 -1
- package/build-module/nextpage/save.js +1 -1
- package/build-module/page-list/convert-to-links-modal.js +1 -1
- package/build-module/page-list/edit.js +1 -1
- package/build-module/page-list-item/edit.js +1 -1
- package/build-module/paragraph/deprecated.js +1 -1
- package/build-module/paragraph/edit.js +2 -2
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/edit.native.js +1 -1
- package/build-module/paragraph/save.js +1 -1
- package/build-module/pattern/edit.js +1 -1
- package/build-module/post-author/edit.js +1 -1
- package/build-module/post-author-biography/edit.js +1 -1
- package/build-module/post-author-name/edit.js +1 -1
- package/build-module/post-comment/edit.js +1 -1
- package/build-module/post-comment/save.js +1 -1
- package/build-module/post-comments-count/edit.js +1 -1
- package/build-module/post-comments-form/edit.js +1 -1
- package/build-module/post-comments-form/form.js +1 -1
- package/build-module/post-comments-link/edit.js +1 -1
- package/build-module/post-content/edit.js +1 -1
- package/build-module/post-date/edit.js +1 -1
- package/build-module/post-excerpt/edit.js +1 -1
- package/build-module/post-featured-image/dimension-controls.js +1 -1
- package/build-module/post-featured-image/edit.js +1 -1
- package/build-module/post-featured-image/overlay.js +1 -1
- package/build-module/post-navigation-link/edit.js +1 -1
- package/build-module/post-template/edit.js +1 -1
- package/build-module/post-template/save.js +1 -1
- package/build-module/post-terms/edit.js +1 -1
- package/build-module/post-time-to-read/edit.js +1 -1
- package/build-module/post-time-to-read/icon.js +1 -1
- package/build-module/post-title/edit.js +1 -1
- package/build-module/preformatted/edit.js +1 -1
- package/build-module/preformatted/edit.native.js +1 -1
- package/build-module/preformatted/save.js +1 -1
- package/build-module/pullquote/blockquote.native.js +1 -1
- package/build-module/pullquote/deprecated.js +1 -1
- package/build-module/pullquote/edit.js +1 -1
- package/build-module/pullquote/edit.native.js +1 -1
- package/build-module/pullquote/figure.native.js +1 -1
- package/build-module/pullquote/save.js +1 -1
- package/build-module/query/deprecated.js +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js +1 -1
- package/build-module/query/edit/index.js +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +1 -1
- package/build-module/query/edit/inspector-controls/create-new-post-link.js +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +1 -1
- package/build-module/query/edit/inspector-controls/index.js +1 -1
- package/build-module/query/edit/inspector-controls/order-control.js +1 -1
- package/build-module/query/edit/inspector-controls/parent-control.js +1 -1
- package/build-module/query/edit/inspector-controls/sticky-control.js +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +1 -1
- package/build-module/query/edit/pattern-selection-modal.js +1 -1
- package/build-module/query/edit/query-content.js +1 -1
- package/build-module/query/edit/query-placeholder.js +1 -1
- package/build-module/query/edit/query-toolbar.js +1 -1
- package/build-module/query/icons.js +1 -1
- package/build-module/query/save.js +1 -1
- package/build-module/query/view.js +5 -5
- package/build-module/query/view.js.map +1 -1
- package/build-module/query-no-results/edit.js +1 -1
- package/build-module/query-no-results/save.js +1 -1
- package/build-module/query-pagination/deprecated.js +1 -1
- package/build-module/query-pagination/edit.js +1 -1
- package/build-module/query-pagination/query-pagination-arrow-controls.js +1 -1
- package/build-module/query-pagination/query-pagination-label-control.js +1 -1
- package/build-module/query-pagination/save.js +1 -1
- package/build-module/query-pagination-next/edit.js +1 -1
- package/build-module/query-pagination-numbers/edit.js +1 -1
- package/build-module/query-pagination-previous/edit.js +1 -1
- package/build-module/query-title/edit.js +1 -1
- package/build-module/quote/deprecated.js +1 -1
- package/build-module/quote/edit.js +1 -1
- package/build-module/quote/save.js +1 -1
- package/build-module/read-more/edit.js +1 -1
- package/build-module/rss/edit.js +3 -2
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/search/edit.js +13 -11
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +1 -1
- package/build-module/search/icons.js +1 -1
- package/build-module/separator/deprecated.js +1 -1
- package/build-module/separator/edit.js +1 -1
- package/build-module/separator/save.js +1 -1
- package/build-module/shortcode/edit.js +1 -1
- package/build-module/shortcode/edit.native.js +1 -1
- package/build-module/shortcode/save.js +1 -1
- package/build-module/site-logo/edit.js +1 -1
- package/build-module/site-tagline/edit.js +1 -1
- package/build-module/site-tagline/icon.js +1 -1
- package/build-module/site-title/edit/index.js +1 -1
- package/build-module/social-link/edit.js +1 -1
- package/build-module/social-link/edit.native.js +1 -1
- package/build-module/social-link/icons/amazon.js +1 -1
- package/build-module/social-link/icons/bandcamp.js +1 -1
- package/build-module/social-link/icons/behance.js +1 -1
- package/build-module/social-link/icons/chain.js +1 -1
- package/build-module/social-link/icons/codepen.js +1 -1
- package/build-module/social-link/icons/deviantart.js +1 -1
- package/build-module/social-link/icons/dribbble.js +1 -1
- package/build-module/social-link/icons/dropbox.js +1 -1
- package/build-module/social-link/icons/etsy.js +1 -1
- package/build-module/social-link/icons/facebook.js +1 -1
- package/build-module/social-link/icons/feed.js +1 -1
- package/build-module/social-link/icons/fivehundredpx.js +1 -1
- package/build-module/social-link/icons/flickr.js +1 -1
- package/build-module/social-link/icons/foursquare.js +1 -1
- package/build-module/social-link/icons/github.js +1 -1
- package/build-module/social-link/icons/goodreads.js +1 -1
- package/build-module/social-link/icons/google.js +1 -1
- package/build-module/social-link/icons/instagram.js +1 -1
- package/build-module/social-link/icons/lastfm.js +1 -1
- package/build-module/social-link/icons/linkedin.js +1 -1
- package/build-module/social-link/icons/mail.js +1 -1
- package/build-module/social-link/icons/mastodon.js +1 -1
- package/build-module/social-link/icons/medium.js +1 -1
- package/build-module/social-link/icons/meetup.js +1 -1
- package/build-module/social-link/icons/patreon.js +1 -1
- package/build-module/social-link/icons/pinterest.js +1 -1
- package/build-module/social-link/icons/pocket.js +1 -1
- package/build-module/social-link/icons/reddit.js +1 -1
- package/build-module/social-link/icons/skype.js +1 -1
- package/build-module/social-link/icons/snapchat.js +1 -1
- package/build-module/social-link/icons/soundcloud.js +1 -1
- package/build-module/social-link/icons/spotify.js +1 -1
- package/build-module/social-link/icons/telegram.js +1 -1
- package/build-module/social-link/icons/threads.js +1 -1
- package/build-module/social-link/icons/tiktok.js +1 -1
- package/build-module/social-link/icons/tumblr.js +1 -1
- package/build-module/social-link/icons/twitch.js +1 -1
- package/build-module/social-link/icons/twitter.js +1 -1
- package/build-module/social-link/icons/vimeo.js +1 -1
- package/build-module/social-link/icons/vk.js +1 -1
- package/build-module/social-link/icons/whatsapp.js +1 -1
- package/build-module/social-link/icons/wordpress.js +1 -1
- package/build-module/social-link/icons/x.js +1 -1
- package/build-module/social-link/icons/yelp.js +1 -1
- package/build-module/social-link/icons/youtube.js +1 -1
- package/build-module/social-link/social-list.js +1 -1
- package/build-module/social-link/social-list.js.map +1 -1
- package/build-module/social-links/deprecated.js +1 -1
- package/build-module/social-links/edit.js +1 -1
- package/build-module/social-links/edit.native.js +1 -1
- package/build-module/social-links/save.js +1 -1
- package/build-module/spacer/controls.js +1 -1
- package/build-module/spacer/controls.native.js +1 -1
- package/build-module/spacer/deprecated.js +1 -1
- package/build-module/spacer/edit.js +1 -1
- package/build-module/spacer/edit.native.js +1 -1
- package/build-module/spacer/save.js +1 -1
- package/build-module/spacer/save.native.js +1 -1
- package/build-module/table/deprecated.js +1 -1
- package/build-module/table/edit.js +1 -1
- package/build-module/table/save.js +1 -1
- package/build-module/table-of-contents/edit.js +26 -6
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/table-of-contents/icon.js +1 -1
- package/build-module/table-of-contents/list.js +11 -5
- package/build-module/table-of-contents/list.js.map +1 -1
- package/build-module/table-of-contents/save.js +1 -1
- package/build-module/tag-cloud/edit.js +1 -1
- package/build-module/template-part/edit/advanced-controls.js +1 -1
- package/build-module/template-part/edit/import-controls.js +3 -2
- package/build-module/template-part/edit/import-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js +1 -1
- package/build-module/template-part/edit/inner-blocks.js +1 -1
- package/build-module/template-part/edit/placeholder.js +1 -1
- package/build-module/template-part/edit/selection-modal.js +1 -1
- package/build-module/template-part/edit/title-modal.js +1 -1
- package/build-module/term-description/edit.js +1 -1
- package/build-module/text-columns/edit.js +1 -1
- package/build-module/text-columns/save.js +1 -1
- package/build-module/verse/deprecated.js +1 -1
- package/build-module/verse/edit.js +1 -1
- package/build-module/verse/save.js +1 -1
- package/build-module/video/deprecated.js +1 -1
- package/build-module/video/edit-common-settings.js +1 -1
- package/build-module/video/edit.js +1 -1
- package/build-module/video/edit.native.js +2 -2
- package/build-module/video/edit.native.js.map +1 -1
- package/build-module/video/icon-retry.native.js +1 -1
- package/build-module/video/save.js +1 -1
- package/build-module/video/tracks-editor.js +1 -1
- package/build-module/video/tracks.js +1 -1
- package/build-style/common-rtl.css +2 -4
- package/build-style/common.css +2 -4
- package/build-style/cover/style-rtl.css +2 -1
- package/build-style/cover/style.css +2 -1
- package/build-style/editor-rtl.css +1 -0
- package/build-style/editor.css +1 -0
- package/build-style/gallery/style-rtl.css +4 -2
- package/build-style/gallery/style.css +4 -2
- package/build-style/image/style-rtl.css +2 -6
- package/build-style/image/style.css +2 -6
- package/build-style/navigation-link/style-rtl.css +0 -1
- package/build-style/navigation-link/style.css +0 -1
- package/build-style/post-featured-image/style-rtl.css +3 -0
- package/build-style/post-featured-image/style.css +3 -0
- package/build-style/post-template/style-rtl.css +19 -0
- package/build-style/post-template/style.css +19 -0
- package/build-style/query-pagination/style-rtl.css +2 -4
- package/build-style/query-pagination/style.css +2 -4
- package/build-style/search/editor-rtl.css +1 -0
- package/build-style/search/editor.css +1 -0
- package/build-style/search/style-rtl.css +4 -2
- package/build-style/search/style.css +4 -2
- package/build-style/style-rtl.css +40 -20
- package/build-style/style.css +40 -20
- package/build-style/video/style-rtl.css +2 -1
- package/build-style/video/style.css +2 -1
- package/build-types/table-of-contents/list.d.ts +6 -4
- package/build-types/table-of-contents/list.d.ts.map +1 -1
- package/package.json +32 -32
- package/src/audio/edit.native.js +2 -2
- package/src/audio/test/edit.native.js +28 -14
- package/src/button/constants.js +3 -0
- package/src/button/edit.js +30 -29
- package/src/button/get-updated-link-attributes.js +54 -0
- package/src/button/test/get-updated-link-attributes.js +113 -0
- package/src/categories/index.php +2 -4
- package/src/comment-template/edit.js +2 -2
- package/src/cover/block.json +3 -0
- package/src/cover/deprecated.js +236 -12
- package/src/cover/edit/color-utils.js +122 -0
- package/src/cover/edit/index.js +132 -51
- package/src/cover/edit/inspector-controls.js +1 -1
- package/src/cover/edit.native.js +9 -2
- package/src/cover/shared.js +36 -129
- package/src/cover/test/__snapshots__/edit.native.js.snap +18 -10
- package/src/cover/test/__snapshots__/transforms.native.js.snap +4 -4
- package/src/cover/test/edit.js +1 -1
- package/src/cover/test/edit.native.js +38 -0
- package/src/embed/edit.js +15 -0
- package/src/embed/edit.native.js +15 -0
- package/src/embed/test/index.native.js +6 -1
- package/src/embed/wp-embed-preview.js +1 -1
- package/src/footnotes/block.json +1 -1
- package/src/footnotes/index.php +13 -179
- package/src/html/edit.js +26 -6
- package/src/html/preview.js +7 -1
- package/src/image/image.js +2 -2
- package/src/image/index.php +9 -2
- package/src/image/style.scss +2 -6
- package/src/image/view.js +137 -44
- package/src/loginout/block.json +8 -0
- package/src/media-text/edit.js +1 -1
- package/src/navigation/edit/deleted-navigation-warning.js +9 -4
- package/src/navigation/edit/index.js +26 -17
- package/src/navigation/edit/inner-blocks.js +1 -0
- package/src/navigation-link/link-ui.js +9 -1
- package/src/navigation-link/style.scss +0 -1
- package/src/paragraph/edit.js +1 -1
- package/src/post-featured-image/style.scss +4 -0
- package/src/post-template/style.scss +20 -0
- package/src/post-title/index.php +1 -1
- package/src/query/view.js +5 -5
- package/src/rss/edit.js +6 -2
- package/src/search/edit.js +16 -10
- package/src/search/editor.scss +1 -0
- package/src/search/style.scss +5 -1
- package/src/social-link/social-list.js +1 -1
- package/src/table-of-contents/edit.js +27 -3
- package/src/table-of-contents/list.tsx +27 -4
- package/src/template-part/edit/import-controls.js +2 -1
- package/src/video/edit.native.js +1 -1
- package/src/video/test/edit.native.js +29 -0
- package/tsconfig.tsbuildinfo +1 -1
package/build/image/view.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_interactivity","require","focusableSelectors","store","state","core","image","windowWidth","window","innerWidth","windowHeight","innerHeight","actions","showLightbox","context","event","imageLoaded","initialized","lastFocusedElement","document","activeElement","scrollDelta","lightboxEnabled","setStyles","documentElement","classList","add","hideLightbox","hideAnimationEnabled","lightboxAnimation","deltaY","type","Math","abs","scrollY","scrollTop","pageYOffset","scrollLeft","pageXOffset","onscroll","scrollTo","setTimeout","remove","focus","preventScroll","handleKeydown","key","keyCode","shiftKey","firstFocusableElement","preventDefault","lastFocusableElement","handleLoad","effects","ref","imageCurrentSrc","currentSrc","setButtonStyles","selectors","roleAttribute","lightboxObjectFit","enlargedImgSrc","imageUploadedSrc","setCurrentSrc","complete","initLightbox","figureRef","querySelector","imageRef","focusableElements","querySelectorAll","length","naturalWidth","naturalHeight","offsetWidth","offsetHeight","scaleAttr","naturalRatio","offsetRatio","imageButtonWidth","buttonHeight","imageButtonHeight","imageButtonTop","buttonWidth","imageButtonLeft","afterLoad","addEventListener","debounce","originalWidth","originalHeight","target","nextElementSibling","x","screenPosX","y","screenPosY","getBoundingClientRect","originalRatio","heightWithoutSpace","widthWithoutSpace","imgMaxWidth","parseFloat","targetWidth","imgMaxHeight","targetHeight","imgRatio","containerMaxWidth","containerMaxHeight","containerWidth","containerHeight","toFixed","reducedHeight","reducedWidth","horizontalPadding","verticalPadding","targetMaxWidth","min","targetMaxHeight","targetContainerRatio","containerScale","lightboxImgWidth","lightboxImgHeight","styleTag","getElementById","createElement","id","head","appendChild","innerHTML","func","wait","timeout","later","clearTimeout"],"sources":["@wordpress/block-library/src/image/view.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store } from '@wordpress/interactivity';\n\nconst focusableSelectors = [\n\t'a[href]',\n\t'area[href]',\n\t'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n\t'select:not([disabled]):not([aria-hidden])',\n\t'textarea:not([disabled]):not([aria-hidden])',\n\t'button:not([disabled]):not([aria-hidden])',\n\t'iframe',\n\t'object',\n\t'embed',\n\t'[contenteditable]',\n\t'[tabindex]:not([tabindex^=\"-\"])',\n];\n\nstore(\n\t{\n\t\tstate: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\twindowWidth: window.innerWidth,\n\t\t\t\t\twindowHeight: window.innerHeight,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tactions: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\tshowLightbox: ( { context, event } ) => {\n\t\t\t\t\t\t// We can't initialize the lightbox until the reference\n\t\t\t\t\t\t// image is loaded, otherwise the UX is broken.\n\t\t\t\t\t\tif ( ! context.core.image.imageLoaded ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontext.core.image.initialized = true;\n\t\t\t\t\t\tcontext.core.image.lastFocusedElement =\n\t\t\t\t\t\t\twindow.document.activeElement;\n\t\t\t\t\t\tcontext.core.image.scrollDelta = 0;\n\n\t\t\t\t\t\tcontext.core.image.lightboxEnabled = true;\n\t\t\t\t\t\tsetStyles( context, event );\n\t\t\t\t\t\t// Hide overflow only when the animation is in progress,\n\t\t\t\t\t\t// otherwise the removal of the scrollbars will draw attention\n\t\t\t\t\t\t// to itself and look like an error\n\t\t\t\t\t\tdocument.documentElement.classList.add(\n\t\t\t\t\t\t\t'wp-has-lightbox-open'\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\thideLightbox: async ( { context, event } ) => {\n\t\t\t\t\t\tcontext.core.image.hideAnimationEnabled = true;\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\t// If scrolling, wait a moment before closing the lightbox.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tcontext.core.image.lightboxAnimation === 'fade'\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcontext.core.image.scrollDelta += event.deltaY;\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tevent.type === 'mousewheel' &&\n\t\t\t\t\t\t\t\t\tMath.abs(\n\t\t\t\t\t\t\t\t\t\twindow.scrollY -\n\t\t\t\t\t\t\t\t\t\t\tcontext.core.image.scrollDelta\n\t\t\t\t\t\t\t\t\t) < 10\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\tcontext.core.image.lightboxAnimation === 'zoom'\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// Disable scroll until the zoom animation ends.\n\t\t\t\t\t\t\t\t// Get the current page scroll position\n\t\t\t\t\t\t\t\tconst scrollTop =\n\t\t\t\t\t\t\t\t\twindow.pageYOffset ||\n\t\t\t\t\t\t\t\t\tdocument.documentElement.scrollTop;\n\t\t\t\t\t\t\t\tconst scrollLeft =\n\t\t\t\t\t\t\t\t\twindow.pageXOffset ||\n\t\t\t\t\t\t\t\t\tdocument.documentElement.scrollLeft;\n\t\t\t\t\t\t\t\t// if any scroll is attempted, set this to the previous value.\n\t\t\t\t\t\t\t\twindow.onscroll = function () {\n\t\t\t\t\t\t\t\t\twindow.scrollTo( scrollLeft, scrollTop );\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t// Enable scrolling after the animation finishes\n\t\t\t\t\t\t\t\tsetTimeout( function () {\n\t\t\t\t\t\t\t\t\twindow.onscroll = function () {};\n\t\t\t\t\t\t\t\t}, 400 );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tdocument.documentElement.classList.remove(\n\t\t\t\t\t\t\t\t'wp-has-lightbox-open'\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tcontext.core.image.lightboxEnabled = false;\n\t\t\t\t\t\t\tcontext.core.image.lastFocusedElement.focus( {\n\t\t\t\t\t\t\t\tpreventScroll: true,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\thandleKeydown: ( { context, actions, event } ) => {\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\tif ( event.key === 'Tab' || event.keyCode === 9 ) {\n\t\t\t\t\t\t\t\t// If shift + tab it change the direction\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tevent.shiftKey &&\n\t\t\t\t\t\t\t\t\twindow.document.activeElement ===\n\t\t\t\t\t\t\t\t\t\tcontext.core.image.firstFocusableElement\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\tcontext.core.image.lastFocusableElement.focus();\n\t\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\t\t! event.shiftKey &&\n\t\t\t\t\t\t\t\t\twindow.document.activeElement ===\n\t\t\t\t\t\t\t\t\t\tcontext.core.image.lastFocusableElement\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\tcontext.core.image.firstFocusableElement.focus();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tevent.key === 'Escape' ||\n\t\t\t\t\t\t\t\tevent.keyCode === 27\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tactions.core.image.hideLightbox( {\n\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\thandleLoad: ( { state, context, effects, ref } ) => {\n\t\t\t\t\t\tcontext.core.image.imageLoaded = true;\n\t\t\t\t\t\tcontext.core.image.imageCurrentSrc = ref.currentSrc;\n\t\t\t\t\t\teffects.core.image.setButtonStyles( {\n\t\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tref,\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\tselectors: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\troleAttribute: ( { context } ) => {\n\t\t\t\t\t\treturn context.core.image.lightboxEnabled\n\t\t\t\t\t\t\t? 'dialog'\n\t\t\t\t\t\t\t: '';\n\t\t\t\t\t},\n\t\t\t\t\tlightboxObjectFit: ( { context } ) => {\n\t\t\t\t\t\tif ( context.core.image.initialized ) {\n\t\t\t\t\t\t\treturn 'cover';\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tenlargedImgSrc: ( { context } ) => {\n\t\t\t\t\t\treturn context.core.image.initialized\n\t\t\t\t\t\t\t? context.core.image.imageUploadedSrc\n\t\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\teffects: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\tsetCurrentSrc: ( { context, ref } ) => {\n\t\t\t\t\t\tif ( ref.complete ) {\n\t\t\t\t\t\t\tcontext.core.image.imageLoaded = true;\n\t\t\t\t\t\t\tcontext.core.image.imageCurrentSrc = ref.currentSrc;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tinitLightbox: async ( { context, ref } ) => {\n\t\t\t\t\t\tcontext.core.image.figureRef =\n\t\t\t\t\t\t\tref.querySelector( 'figure' );\n\t\t\t\t\t\tcontext.core.image.imageRef =\n\t\t\t\t\t\t\tref.querySelector( 'img' );\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\tconst focusableElements =\n\t\t\t\t\t\t\t\tref.querySelectorAll( focusableSelectors );\n\t\t\t\t\t\t\tcontext.core.image.firstFocusableElement =\n\t\t\t\t\t\t\t\tfocusableElements[ 0 ];\n\t\t\t\t\t\t\tcontext.core.image.lastFocusableElement =\n\t\t\t\t\t\t\t\tfocusableElements[\n\t\t\t\t\t\t\t\t\tfocusableElements.length - 1\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\tref.querySelector( '.close-button' ).focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tsetButtonStyles: ( { state, context, ref } ) => {\n\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\tnaturalWidth,\n\t\t\t\t\t\t\tnaturalHeight,\n\t\t\t\t\t\t\toffsetWidth,\n\t\t\t\t\t\t\toffsetHeight,\n\t\t\t\t\t\t} = ref;\n\n\t\t\t\t\t\t// If the image isn't loaded yet, we can't\n\t\t\t\t\t\t// calculate how big the button should be.\n\t\t\t\t\t\tif ( naturalWidth === 0 || naturalHeight === 0 ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Subscribe to the window dimensions so we can\n\t\t\t\t\t\t// recalculate the styles if the window is resized.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t( state.core.image.windowWidth ||\n\t\t\t\t\t\t\t\tstate.core.image.windowHeight ) &&\n\t\t\t\t\t\t\tcontext.core.image.scaleAttr === 'contain'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// In the case of an image with object-fit: contain, the\n\t\t\t\t\t\t\t// size of the img element can be larger than the image itself,\n\t\t\t\t\t\t\t// so we need to calculate the size of the button to match.\n\n\t\t\t\t\t\t\t// Natural ratio of the image.\n\t\t\t\t\t\t\tconst naturalRatio = naturalWidth / naturalHeight;\n\t\t\t\t\t\t\t// Offset ratio of the image.\n\t\t\t\t\t\t\tconst offsetRatio = offsetWidth / offsetHeight;\n\n\t\t\t\t\t\t\tif ( naturalRatio > offsetRatio ) {\n\t\t\t\t\t\t\t\t// If it reaches the width first, keep\n\t\t\t\t\t\t\t\t// the width and recalculate the height.\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonWidth =\n\t\t\t\t\t\t\t\t\toffsetWidth;\n\t\t\t\t\t\t\t\tconst buttonHeight = offsetWidth / naturalRatio;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonHeight =\n\t\t\t\t\t\t\t\t\tbuttonHeight;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonTop =\n\t\t\t\t\t\t\t\t\t( offsetHeight - buttonHeight ) / 2;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// If it reaches the height first, keep\n\t\t\t\t\t\t\t\t// the height and recalculate the width.\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonHeight =\n\t\t\t\t\t\t\t\t\toffsetHeight;\n\t\t\t\t\t\t\t\tconst buttonWidth = offsetHeight * naturalRatio;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonWidth =\n\t\t\t\t\t\t\t\t\tbuttonWidth;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonLeft =\n\t\t\t\t\t\t\t\t\t( offsetWidth - buttonWidth ) / 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// In all other cases, we can trust that the size of\n\t\t\t\t\t\t\t// the image is the right size for the button as well.\n\n\t\t\t\t\t\t\tcontext.core.image.imageButtonWidth = offsetWidth;\n\t\t\t\t\t\t\tcontext.core.image.imageButtonHeight = offsetHeight;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tafterLoad: ( { state } ) => {\n\t\t\twindow.addEventListener(\n\t\t\t\t'resize',\n\t\t\t\tdebounce( () => {\n\t\t\t\t\tstate.core.image.windowWidth = window.innerWidth;\n\t\t\t\t\tstate.core.image.windowHeight = window.innerHeight;\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t}\n);\n\nfunction setStyles( context, event ) {\n\t// The reference img element lies adjacent\n\t// to the event target button in the DOM.\n\tlet {\n\t\tnaturalWidth,\n\t\tnaturalHeight,\n\t\toffsetWidth: originalWidth,\n\t\toffsetHeight: originalHeight,\n\t} = event.target.nextElementSibling;\n\tlet { x: screenPosX, y: screenPosY } =\n\t\tevent.target.nextElementSibling.getBoundingClientRect();\n\n\t// Natural ratio of the image clicked to open the lightbox.\n\tconst naturalRatio = naturalWidth / naturalHeight;\n\t// Original ratio of the image clicked to open the lightbox.\n\tlet originalRatio = originalWidth / originalHeight;\n\n\t// If it has object-fit: contain, recalculate the original sizes\n\t// and the screen position without the blank spaces.\n\tif ( context.core.image.scaleAttr === 'contain' ) {\n\t\tif ( naturalRatio > originalRatio ) {\n\t\t\tconst heightWithoutSpace = originalWidth / naturalRatio;\n\t\t\t// Recalculate screen position without the top space.\n\t\t\tscreenPosY += ( originalHeight - heightWithoutSpace ) / 2;\n\t\t\toriginalHeight = heightWithoutSpace;\n\t\t} else {\n\t\t\tconst widthWithoutSpace = originalHeight * naturalRatio;\n\t\t\t// Recalculate screen position without the left space.\n\t\t\tscreenPosX += ( originalWidth - widthWithoutSpace ) / 2;\n\t\t\toriginalWidth = widthWithoutSpace;\n\t\t}\n\t}\n\toriginalRatio = originalWidth / originalHeight;\n\n\t// Typically, we use the image's full-sized dimensions. If those\n\t// dimensions have not been set (i.e. an external image with only one size),\n\t// the image's dimensions in the lightbox are the same\n\t// as those of the image in the content.\n\tlet imgMaxWidth = parseFloat(\n\t\tcontext.core.image.targetWidth !== 'none'\n\t\t\t? context.core.image.targetWidth\n\t\t\t: naturalWidth\n\t);\n\tlet imgMaxHeight = parseFloat(\n\t\tcontext.core.image.targetHeight !== 'none'\n\t\t\t? context.core.image.targetHeight\n\t\t\t: naturalHeight\n\t);\n\n\t// Ratio of the biggest image stored in the database.\n\tlet imgRatio = imgMaxWidth / imgMaxHeight;\n\tlet containerMaxWidth = imgMaxWidth;\n\tlet containerMaxHeight = imgMaxHeight;\n\tlet containerWidth = imgMaxWidth;\n\tlet containerHeight = imgMaxHeight;\n\t// Check if the target image has a different ratio than the original one (thumbnail).\n\t// Recalculate the width and height.\n\tif ( naturalRatio.toFixed( 2 ) !== imgRatio.toFixed( 2 ) ) {\n\t\tif ( naturalRatio > imgRatio ) {\n\t\t\t// If the width is reached before the height, we keep the maxWidth\n\t\t\t// and recalculate the height.\n\t\t\t// Unless the difference between the maxHeight and the reducedHeight\n\t\t\t// is higher than the maxWidth, where we keep the reducedHeight and\n\t\t\t// recalculate the width.\n\t\t\tconst reducedHeight = imgMaxWidth / naturalRatio;\n\t\t\tif ( imgMaxHeight - reducedHeight > imgMaxWidth ) {\n\t\t\t\timgMaxHeight = reducedHeight;\n\t\t\t\timgMaxWidth = reducedHeight * naturalRatio;\n\t\t\t} else {\n\t\t\t\timgMaxHeight = imgMaxWidth / naturalRatio;\n\t\t\t}\n\t\t} else {\n\t\t\t// If the height is reached before the width, we keep the maxHeight\n\t\t\t// and recalculate the width.\n\t\t\t// Unless the difference between the maxWidth and the reducedWidth\n\t\t\t// is higher than the maxHeight, where we keep the reducedWidth and\n\t\t\t// recalculate the height.\n\t\t\tconst reducedWidth = imgMaxHeight * naturalRatio;\n\t\t\tif ( imgMaxWidth - reducedWidth > imgMaxHeight ) {\n\t\t\t\timgMaxWidth = reducedWidth;\n\t\t\t\timgMaxHeight = reducedWidth / naturalRatio;\n\t\t\t} else {\n\t\t\t\timgMaxWidth = imgMaxHeight * naturalRatio;\n\t\t\t}\n\t\t}\n\t\tcontainerWidth = imgMaxWidth;\n\t\tcontainerHeight = imgMaxHeight;\n\t\timgRatio = imgMaxWidth / imgMaxHeight;\n\n\t\t// Calculate the max size of the container.\n\t\tif ( originalRatio > imgRatio ) {\n\t\t\tcontainerMaxWidth = imgMaxWidth;\n\t\t\tcontainerMaxHeight = containerMaxWidth / originalRatio;\n\t\t} else {\n\t\t\tcontainerMaxHeight = imgMaxHeight;\n\t\t\tcontainerMaxWidth = containerMaxHeight * originalRatio;\n\t\t}\n\t}\n\n\t// If the image has been pixelated on purpose, keep that size.\n\tif ( originalWidth > containerWidth || originalHeight > containerHeight ) {\n\t\tcontainerWidth = originalWidth;\n\t\tcontainerHeight = originalHeight;\n\t}\n\n\t// Calculate the final lightbox image size and the\n\t// scale factor. MaxWidth is either the window container\n\t// (accounting for padding) or the image resolution.\n\tlet horizontalPadding = 0;\n\tif ( window.innerWidth > 480 ) {\n\t\thorizontalPadding = 80;\n\t} else if ( window.innerWidth > 1920 ) {\n\t\thorizontalPadding = 160;\n\t}\n\tconst verticalPadding = 80;\n\n\tconst targetMaxWidth = Math.min(\n\t\twindow.innerWidth - horizontalPadding,\n\t\tcontainerWidth\n\t);\n\tconst targetMaxHeight = Math.min(\n\t\twindow.innerHeight - verticalPadding,\n\t\tcontainerHeight\n\t);\n\tconst targetContainerRatio = targetMaxWidth / targetMaxHeight;\n\n\tif ( originalRatio > targetContainerRatio ) {\n\t\t// If targetMaxWidth is reached before targetMaxHeight\n\t\tcontainerWidth = targetMaxWidth;\n\t\tcontainerHeight = containerWidth / originalRatio;\n\t} else {\n\t\t// If targetMaxHeight is reached before targetMaxWidth\n\t\tcontainerHeight = targetMaxHeight;\n\t\tcontainerWidth = containerHeight * originalRatio;\n\t}\n\n\tconst containerScale = originalWidth / containerWidth;\n\tconst lightboxImgWidth =\n\t\timgMaxWidth * ( containerWidth / containerMaxWidth );\n\tconst lightboxImgHeight =\n\t\timgMaxHeight * ( containerHeight / containerMaxHeight );\n\n\t// Add the CSS variables needed.\n\tlet styleTag = document.getElementById( 'wp-lightbox-styles' );\n\tif ( ! styleTag ) {\n\t\tstyleTag = document.createElement( 'style' );\n\t\tstyleTag.id = 'wp-lightbox-styles';\n\t\tdocument.head.appendChild( styleTag );\n\t}\n\n\t// As of this writing, using the calculations above will render the lightbox\n\t// with a small, erroneous whitespace on the left side of the image in iOS Safari,\n\t// perhaps due to an inconsistency in how browsers handle absolute positioning and CSS\n\t// transformation. In any case, adding 1 pixel to the container width and height solves\n\t// the problem, though this can be removed if the issue is fixed in the future.\n\tstyleTag.innerHTML = `\n\t\t:root {\n\t\t\t--wp--lightbox-initial-top-position: ${ screenPosY }px;\n\t\t\t--wp--lightbox-initial-left-position: ${ screenPosX }px;\n\t\t\t--wp--lightbox-container-width: ${ containerWidth + 1 }px;\n\t\t\t--wp--lightbox-container-height: ${ containerHeight + 1 }px;\n\t\t\t--wp--lightbox-image-width: ${ lightboxImgWidth }px;\n\t\t\t--wp--lightbox-image-height: ${ lightboxImgHeight }px;\n\t\t\t--wp--lightbox-scale: ${ containerScale };\n\t\t}\n\t`;\n}\n\nfunction debounce( func, wait = 50 ) {\n\tlet timeout;\n\treturn () => {\n\t\tconst later = () => {\n\t\t\ttimeout = null;\n\t\t\tfunc();\n\t\t};\n\t\tclearTimeout( timeout );\n\t\ttimeout = setTimeout( later, wait );\n\t};\n}\n"],"mappings":";;AAGA,IAAAA,cAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,MAAMC,kBAAkB,GAAG,CAC1B,SAAS,EACT,YAAY,EACZ,+DAA+D,EAC/D,2CAA2C,EAC3C,6CAA6C,EAC7C,2CAA2C,EAC3C,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,iCAAiC,CACjC;AAED,IAAAC,oBAAK,EACJ;EACCC,KAAK,EAAE;IACNC,IAAI,EAAE;MACLC,KAAK,EAAE;QACNC,WAAW,EAAEC,MAAM,CAACC,UAAU;QAC9BC,YAAY,EAAEF,MAAM,CAACG;MACtB;IACD;EACD,CAAC;EACDC,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;IACAY,eAAe,GAAGQ,eAAe;IACjCT,cAAc,GAAGC,eAAe,GAAGZ,aAAa;EACjD;EAEA,MAAMsB,cAAc,GAAG/B,aAAa,GAAGoB,cAAc;EACrD,MAAMY,gBAAgB,GACrBpB,WAAW,IAAKQ,cAAc,GAAGF,iBAAiB,CAAE;EACrD,MAAMe,iBAAiB,GACtBlB,YAAY,IAAKM,eAAe,GAAGF,kBAAkB,CAAE;;EAExD;EACA,IAAIe,QAAQ,GAAGvG,QAAQ,CAACwG,cAAc,CAAE,oBAAqB,CAAC;EAC9D,IAAK,CAAED,QAAQ,EAAG;IACjBA,QAAQ,GAAGvG,QAAQ,CAACyG,aAAa,CAAE,OAAQ,CAAC;IAC5CF,QAAQ,CAACG,EAAE,GAAG,oBAAoB;IAClC1G,QAAQ,CAAC2G,IAAI,CAACC,WAAW,CAAEL,QAAS,CAAC;EACtC;;EAEA;EACA;EACA;EACA;EACA;EACAA,QAAQ,CAACM,SAAS,GAAI;AACvB;AACA,0CAA2CjC,UAAY;AACvD,2CAA4CF,UAAY;AACxD,qCAAsCe,cAAc,GAAG,CAAG;AAC1D,sCAAuCC,eAAe,GAAG,CAAG;AAC5D,iCAAkCW,gBAAkB;AACpD,kCAAmCC,iBAAmB;AACtD,2BAA4BF,cAAgB;AAC5C;AACA,EAAE;AACF;AAEA,SAAShC,QAAQA,CAAE0C,IAAI,EAAEC,IAAI,GAAG,EAAE,EAAG;EACpC,IAAIC,OAAO;EACX,OAAO,MAAM;IACZ,MAAMC,KAAK,GAAGA,CAAA,KAAM;MACnBD,OAAO,GAAG,IAAI;MACdF,IAAI,CAAC,CAAC;IACP,CAAC;IACDI,YAAY,CAAEF,OAAQ,CAAC;IACvBA,OAAO,GAAG1F,UAAU,CAAE2F,KAAK,EAAEF,IAAK,CAAC;EACpC,CAAC;AACF"}
|
|
1
|
+
{"version":3,"names":["_interactivity","require","focusableSelectors","scrollCallback","isTouching","lastTouchTime","handleScroll","context","Date","now","window","scrollTo","core","image","scrollLeftReset","scrollTopReset","store","state","windowWidth","innerWidth","windowHeight","innerHeight","actions","showLightbox","event","imageLoaded","initialized","lastFocusedElement","document","activeElement","scrollDelta","lightboxEnabled","setStyles","pageYOffset","documentElement","scrollTop","pageXOffset","scrollLeft","bind","addEventListener","hideLightbox","hideAnimationEnabled","setTimeout","removeEventListener","focus","preventScroll","handleKeydown","key","keyCode","shiftKey","firstFocusableElement","preventDefault","lastFocusableElement","handleLoad","effects","ref","imageCurrentSrc","currentSrc","setButtonStyles","handleTouchStart","handleTouchMove","handleTouchEnd","selectors","roleAttribute","lightboxObjectFit","enlargedImgSrc","imageUploadedSrc","setCurrentSrc","complete","initLightbox","figureRef","querySelector","imageRef","focusableElements","querySelectorAll","length","naturalWidth","naturalHeight","offsetWidth","offsetHeight","scaleAttr","naturalRatio","offsetRatio","imageButtonWidth","buttonHeight","imageButtonHeight","imageButtonTop","buttonWidth","imageButtonLeft","afterLoad","debounce","originalWidth","originalHeight","target","nextElementSibling","x","screenPosX","y","screenPosY","getBoundingClientRect","originalRatio","heightWithoutSpace","widthWithoutSpace","imgMaxWidth","parseFloat","targetWidth","imgMaxHeight","targetHeight","imgRatio","containerMaxWidth","containerMaxHeight","containerWidth","containerHeight","toFixed","reducedHeight","reducedWidth","horizontalPadding","verticalPadding","targetMaxWidth","Math","min","targetMaxHeight","targetContainerRatio","containerScale","lightboxImgWidth","lightboxImgHeight","styleTag","getElementById","createElement","id","head","appendChild","innerHTML","func","wait","timeout","later","clearTimeout"],"sources":["@wordpress/block-library/src/image/view.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store } from '@wordpress/interactivity';\n\nconst focusableSelectors = [\n\t'a[href]',\n\t'area[href]',\n\t'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n\t'select:not([disabled]):not([aria-hidden])',\n\t'textarea:not([disabled]):not([aria-hidden])',\n\t'button:not([disabled]):not([aria-hidden])',\n\t'iframe',\n\t'object',\n\t'embed',\n\t'[contenteditable]',\n\t'[tabindex]:not([tabindex^=\"-\"])',\n];\n\n/*\n * Stores a context-bound scroll handler.\n *\n * This callback could be defined inline inside of the store\n * object but it's created externally to avoid confusion about\n * how its logic is called. This logic is not referenced directly\n * by the directives in the markup because the scroll event we\n * need to listen to is triggered on the window; so by defining it\n * outside of the store, we signal that the behavior here is different.\n * If we find a compelling reason to move it to the store, feel free.\n *\n * @type {Function}\n */\nlet scrollCallback;\n\n/*\n * Tracks whether user is touching screen; used to\n * differentiate behavior for touch and mouse input.\n *\n * @type {boolean}\n */\nlet isTouching = false;\n\n/*\n * Tracks the last time the screen was touched; used to\n * differentiate behavior for touch and mouse input.\n *\n * @type {number}\n */\nlet lastTouchTime = 0;\n\n/*\n * Lightbox page-scroll handler: prevents scrolling.\n *\n * This handler is added to prevent scrolling behaviors that\n * trigger content shift while the lightbox is open.\n *\n * It would be better to accomplish this through CSS alone, but\n * using overflow: hidden is currently the only way to do so, and\n * that causes the layout to shift and prevents the zoom animation\n * from working in some cases because we're unable to account for\n * the layout shift when doing the animation calculations. Instead,\n * here we use JavaScript to prevent and reset the scrolling\n * behavior. In the future, we may be able to use CSS or overflow: hidden\n * instead to not rely on JavaScript, but this seems to be the best approach\n * for now that provides the best visual experience.\n *\n * @param {Object} context Interactivity page context?\n */\nfunction handleScroll( context ) {\n\t// We can't override the scroll behavior on mobile devices\n\t// because doing so breaks the pinch to zoom functionality, and we\n\t// want to allow users to zoom in further on the high-res image.\n\tif ( ! isTouching && Date.now() - lastTouchTime > 450 ) {\n\t\t// We are unable to use event.preventDefault() to prevent scrolling\n\t\t// because the scroll event can't be canceled, so we reset the position instead.\n\t\twindow.scrollTo(\n\t\t\tcontext.core.image.scrollLeftReset,\n\t\t\tcontext.core.image.scrollTopReset\n\t\t);\n\t}\n}\n\nstore(\n\t{\n\t\tstate: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\twindowWidth: window.innerWidth,\n\t\t\t\t\twindowHeight: window.innerHeight,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tactions: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\tshowLightbox: ( { context, event } ) => {\n\t\t\t\t\t\t// We can't initialize the lightbox until the reference\n\t\t\t\t\t\t// image is loaded, otherwise the UX is broken.\n\t\t\t\t\t\tif ( ! context.core.image.imageLoaded ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontext.core.image.initialized = true;\n\t\t\t\t\t\tcontext.core.image.lastFocusedElement =\n\t\t\t\t\t\t\twindow.document.activeElement;\n\t\t\t\t\t\tcontext.core.image.scrollDelta = 0;\n\n\t\t\t\t\t\tcontext.core.image.lightboxEnabled = true;\n\t\t\t\t\t\tsetStyles( context, event );\n\n\t\t\t\t\t\tcontext.core.image.scrollTopReset =\n\t\t\t\t\t\t\twindow.pageYOffset ||\n\t\t\t\t\t\t\tdocument.documentElement.scrollTop;\n\n\t\t\t\t\t\t// In most cases, this value will be 0, but this is included\n\t\t\t\t\t\t// in case a user has created a page with horizontal scrolling.\n\t\t\t\t\t\tcontext.core.image.scrollLeftReset =\n\t\t\t\t\t\t\twindow.pageXOffset ||\n\t\t\t\t\t\t\tdocument.documentElement.scrollLeft;\n\n\t\t\t\t\t\t// We define and bind the scroll callback here so\n\t\t\t\t\t\t// that we can pass the context and as an argument.\n\t\t\t\t\t\t// We may be able to change this in the future if we\n\t\t\t\t\t\t// define the scroll callback in the store instead, but\n\t\t\t\t\t\t// this approach seems to tbe clearest for now.\n\t\t\t\t\t\tscrollCallback = handleScroll.bind( null, context );\n\n\t\t\t\t\t\t// We need to add a scroll event listener to the window\n\t\t\t\t\t\t// here because we are unable to otherwise access it via\n\t\t\t\t\t\t// the Interactivity API directives. If we add a native way\n\t\t\t\t\t\t// to access the window, we can remove this.\n\t\t\t\t\t\twindow.addEventListener(\n\t\t\t\t\t\t\t'scroll',\n\t\t\t\t\t\t\tscrollCallback,\n\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\thideLightbox: async ( { context } ) => {\n\t\t\t\t\t\tcontext.core.image.hideAnimationEnabled = true;\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\t// We want to wait until the close animation is completed\n\t\t\t\t\t\t\t// before allowing a user to scroll again. The duration of this\n\t\t\t\t\t\t\t// animation is defined in the styles.scss and depends on if the\n\t\t\t\t\t\t\t// animation is 'zoom' or 'fade', but in any case we should wait\n\t\t\t\t\t\t\t// a few milliseconds longer than the duration, otherwise a user\n\t\t\t\t\t\t\t// may scroll too soon and cause the animation to look sloppy.\n\t\t\t\t\t\t\tsetTimeout( function () {\n\t\t\t\t\t\t\t\twindow.removeEventListener(\n\t\t\t\t\t\t\t\t\t'scroll',\n\t\t\t\t\t\t\t\t\tscrollCallback\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}, 450 );\n\n\t\t\t\t\t\t\tcontext.core.image.lightboxEnabled = false;\n\t\t\t\t\t\t\tcontext.core.image.lastFocusedElement.focus( {\n\t\t\t\t\t\t\t\tpreventScroll: true,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\thandleKeydown: ( { context, actions, event } ) => {\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\tif ( event.key === 'Tab' || event.keyCode === 9 ) {\n\t\t\t\t\t\t\t\t// If shift + tab it change the direction\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tevent.shiftKey &&\n\t\t\t\t\t\t\t\t\twindow.document.activeElement ===\n\t\t\t\t\t\t\t\t\t\tcontext.core.image.firstFocusableElement\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\tcontext.core.image.lastFocusableElement.focus();\n\t\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\t\t! event.shiftKey &&\n\t\t\t\t\t\t\t\t\twindow.document.activeElement ===\n\t\t\t\t\t\t\t\t\t\tcontext.core.image.lastFocusableElement\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\tcontext.core.image.firstFocusableElement.focus();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tevent.key === 'Escape' ||\n\t\t\t\t\t\t\t\tevent.keyCode === 27\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tactions.core.image.hideLightbox( {\n\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\thandleLoad: ( { state, context, effects, ref } ) => {\n\t\t\t\t\t\tcontext.core.image.imageLoaded = true;\n\t\t\t\t\t\tcontext.core.image.imageCurrentSrc = ref.currentSrc;\n\t\t\t\t\t\teffects.core.image.setButtonStyles( {\n\t\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t} );\n\t\t\t\t\t},\n\t\t\t\t\thandleTouchStart: () => {\n\t\t\t\t\t\tisTouching = true;\n\t\t\t\t\t},\n\t\t\t\t\thandleTouchMove: ( { context, event } ) => {\n\t\t\t\t\t\t// On mobile devices, we want to prevent triggering the\n\t\t\t\t\t\t// scroll event because otherwise the page jumps around as\n\t\t\t\t\t\t// we reset the scroll position. This also means that closing\n\t\t\t\t\t\t// the lightbox requires that a user perform a simple tap. This\n\t\t\t\t\t\t// may be changed in the future if we find a better alternative\n\t\t\t\t\t\t// to override or reset the scroll position during swipe actions.\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\thandleTouchEnd: () => {\n\t\t\t\t\t\t// We need to wait a few milliseconds before resetting\n\t\t\t\t\t\t// to ensure that pinch to zoom works consistently\n\t\t\t\t\t\t// on mobile devices when the lightbox is open.\n\t\t\t\t\t\tlastTouchTime = Date.now();\n\t\t\t\t\t\tisTouching = false;\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tselectors: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\troleAttribute: ( { context } ) => {\n\t\t\t\t\t\treturn context.core.image.lightboxEnabled\n\t\t\t\t\t\t\t? 'dialog'\n\t\t\t\t\t\t\t: '';\n\t\t\t\t\t},\n\t\t\t\t\tlightboxObjectFit: ( { context } ) => {\n\t\t\t\t\t\tif ( context.core.image.initialized ) {\n\t\t\t\t\t\t\treturn 'cover';\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tenlargedImgSrc: ( { context } ) => {\n\t\t\t\t\t\treturn context.core.image.initialized\n\t\t\t\t\t\t\t? context.core.image.imageUploadedSrc\n\t\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\teffects: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\tsetCurrentSrc: ( { context, ref } ) => {\n\t\t\t\t\t\tif ( ref.complete ) {\n\t\t\t\t\t\t\tcontext.core.image.imageLoaded = true;\n\t\t\t\t\t\t\tcontext.core.image.imageCurrentSrc = ref.currentSrc;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tinitLightbox: async ( { context, ref } ) => {\n\t\t\t\t\t\tcontext.core.image.figureRef =\n\t\t\t\t\t\t\tref.querySelector( 'figure' );\n\t\t\t\t\t\tcontext.core.image.imageRef =\n\t\t\t\t\t\t\tref.querySelector( 'img' );\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\tconst focusableElements =\n\t\t\t\t\t\t\t\tref.querySelectorAll( focusableSelectors );\n\t\t\t\t\t\t\tcontext.core.image.firstFocusableElement =\n\t\t\t\t\t\t\t\tfocusableElements[ 0 ];\n\t\t\t\t\t\t\tcontext.core.image.lastFocusableElement =\n\t\t\t\t\t\t\t\tfocusableElements[\n\t\t\t\t\t\t\t\t\tfocusableElements.length - 1\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\tref.querySelector( '.close-button' ).focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tsetButtonStyles: ( { state, context, ref } ) => {\n\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\tnaturalWidth,\n\t\t\t\t\t\t\tnaturalHeight,\n\t\t\t\t\t\t\toffsetWidth,\n\t\t\t\t\t\t\toffsetHeight,\n\t\t\t\t\t\t} = ref;\n\n\t\t\t\t\t\t// If the image isn't loaded yet, we can't\n\t\t\t\t\t\t// calculate how big the button should be.\n\t\t\t\t\t\tif ( naturalWidth === 0 || naturalHeight === 0 ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Subscribe to the window dimensions so we can\n\t\t\t\t\t\t// recalculate the styles if the window is resized.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t( state.core.image.windowWidth ||\n\t\t\t\t\t\t\t\tstate.core.image.windowHeight ) &&\n\t\t\t\t\t\t\tcontext.core.image.scaleAttr === 'contain'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// In the case of an image with object-fit: contain, the\n\t\t\t\t\t\t\t// size of the img element can be larger than the image itself,\n\t\t\t\t\t\t\t// so we need to calculate the size of the button to match.\n\n\t\t\t\t\t\t\t// Natural ratio of the image.\n\t\t\t\t\t\t\tconst naturalRatio = naturalWidth / naturalHeight;\n\t\t\t\t\t\t\t// Offset ratio of the image.\n\t\t\t\t\t\t\tconst offsetRatio = offsetWidth / offsetHeight;\n\n\t\t\t\t\t\t\tif ( naturalRatio > offsetRatio ) {\n\t\t\t\t\t\t\t\t// If it reaches the width first, keep\n\t\t\t\t\t\t\t\t// the width and recalculate the height.\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonWidth =\n\t\t\t\t\t\t\t\t\toffsetWidth;\n\t\t\t\t\t\t\t\tconst buttonHeight = offsetWidth / naturalRatio;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonHeight =\n\t\t\t\t\t\t\t\t\tbuttonHeight;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonTop =\n\t\t\t\t\t\t\t\t\t( offsetHeight - buttonHeight ) / 2;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// If it reaches the height first, keep\n\t\t\t\t\t\t\t\t// the height and recalculate the width.\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonHeight =\n\t\t\t\t\t\t\t\t\toffsetHeight;\n\t\t\t\t\t\t\t\tconst buttonWidth = offsetHeight * naturalRatio;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonWidth =\n\t\t\t\t\t\t\t\t\tbuttonWidth;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonLeft =\n\t\t\t\t\t\t\t\t\t( offsetWidth - buttonWidth ) / 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// In all other cases, we can trust that the size of\n\t\t\t\t\t\t\t// the image is the right size for the button as well.\n\n\t\t\t\t\t\t\tcontext.core.image.imageButtonWidth = offsetWidth;\n\t\t\t\t\t\t\tcontext.core.image.imageButtonHeight = offsetHeight;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tafterLoad: ( { state } ) => {\n\t\t\twindow.addEventListener(\n\t\t\t\t'resize',\n\t\t\t\tdebounce( () => {\n\t\t\t\t\tstate.core.image.windowWidth = window.innerWidth;\n\t\t\t\t\tstate.core.image.windowHeight = window.innerHeight;\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t}\n);\n\n/*\n * Computes styles for the lightbox and adds them to the document.\n *\n * @function\n * @param {Object} context - An Interactivity API context\n * @param {Object} event - A triggering event\n */\nfunction setStyles( context, event ) {\n\t// The reference img element lies adjacent\n\t// to the event target button in the DOM.\n\tlet {\n\t\tnaturalWidth,\n\t\tnaturalHeight,\n\t\toffsetWidth: originalWidth,\n\t\toffsetHeight: originalHeight,\n\t} = event.target.nextElementSibling;\n\tlet { x: screenPosX, y: screenPosY } =\n\t\tevent.target.nextElementSibling.getBoundingClientRect();\n\n\t// Natural ratio of the image clicked to open the lightbox.\n\tconst naturalRatio = naturalWidth / naturalHeight;\n\t// Original ratio of the image clicked to open the lightbox.\n\tlet originalRatio = originalWidth / originalHeight;\n\n\t// If it has object-fit: contain, recalculate the original sizes\n\t// and the screen position without the blank spaces.\n\tif ( context.core.image.scaleAttr === 'contain' ) {\n\t\tif ( naturalRatio > originalRatio ) {\n\t\t\tconst heightWithoutSpace = originalWidth / naturalRatio;\n\t\t\t// Recalculate screen position without the top space.\n\t\t\tscreenPosY += ( originalHeight - heightWithoutSpace ) / 2;\n\t\t\toriginalHeight = heightWithoutSpace;\n\t\t} else {\n\t\t\tconst widthWithoutSpace = originalHeight * naturalRatio;\n\t\t\t// Recalculate screen position without the left space.\n\t\t\tscreenPosX += ( originalWidth - widthWithoutSpace ) / 2;\n\t\t\toriginalWidth = widthWithoutSpace;\n\t\t}\n\t}\n\toriginalRatio = originalWidth / originalHeight;\n\n\t// Typically, we use the image's full-sized dimensions. If those\n\t// dimensions have not been set (i.e. an external image with only one size),\n\t// the image's dimensions in the lightbox are the same\n\t// as those of the image in the content.\n\tlet imgMaxWidth = parseFloat(\n\t\tcontext.core.image.targetWidth !== 'none'\n\t\t\t? context.core.image.targetWidth\n\t\t\t: naturalWidth\n\t);\n\tlet imgMaxHeight = parseFloat(\n\t\tcontext.core.image.targetHeight !== 'none'\n\t\t\t? context.core.image.targetHeight\n\t\t\t: naturalHeight\n\t);\n\n\t// Ratio of the biggest image stored in the database.\n\tlet imgRatio = imgMaxWidth / imgMaxHeight;\n\tlet containerMaxWidth = imgMaxWidth;\n\tlet containerMaxHeight = imgMaxHeight;\n\tlet containerWidth = imgMaxWidth;\n\tlet containerHeight = imgMaxHeight;\n\t// Check if the target image has a different ratio than the original one (thumbnail).\n\t// Recalculate the width and height.\n\tif ( naturalRatio.toFixed( 2 ) !== imgRatio.toFixed( 2 ) ) {\n\t\tif ( naturalRatio > imgRatio ) {\n\t\t\t// If the width is reached before the height, we keep the maxWidth\n\t\t\t// and recalculate the height.\n\t\t\t// Unless the difference between the maxHeight and the reducedHeight\n\t\t\t// is higher than the maxWidth, where we keep the reducedHeight and\n\t\t\t// recalculate the width.\n\t\t\tconst reducedHeight = imgMaxWidth / naturalRatio;\n\t\t\tif ( imgMaxHeight - reducedHeight > imgMaxWidth ) {\n\t\t\t\timgMaxHeight = reducedHeight;\n\t\t\t\timgMaxWidth = reducedHeight * naturalRatio;\n\t\t\t} else {\n\t\t\t\timgMaxHeight = imgMaxWidth / naturalRatio;\n\t\t\t}\n\t\t} else {\n\t\t\t// If the height is reached before the width, we keep the maxHeight\n\t\t\t// and recalculate the width.\n\t\t\t// Unless the difference between the maxWidth and the reducedWidth\n\t\t\t// is higher than the maxHeight, where we keep the reducedWidth and\n\t\t\t// recalculate the height.\n\t\t\tconst reducedWidth = imgMaxHeight * naturalRatio;\n\t\t\tif ( imgMaxWidth - reducedWidth > imgMaxHeight ) {\n\t\t\t\timgMaxWidth = reducedWidth;\n\t\t\t\timgMaxHeight = reducedWidth / naturalRatio;\n\t\t\t} else {\n\t\t\t\timgMaxWidth = imgMaxHeight * naturalRatio;\n\t\t\t}\n\t\t}\n\t\tcontainerWidth = imgMaxWidth;\n\t\tcontainerHeight = imgMaxHeight;\n\t\timgRatio = imgMaxWidth / imgMaxHeight;\n\n\t\t// Calculate the max size of the container.\n\t\tif ( originalRatio > imgRatio ) {\n\t\t\tcontainerMaxWidth = imgMaxWidth;\n\t\t\tcontainerMaxHeight = containerMaxWidth / originalRatio;\n\t\t} else {\n\t\t\tcontainerMaxHeight = imgMaxHeight;\n\t\t\tcontainerMaxWidth = containerMaxHeight * originalRatio;\n\t\t}\n\t}\n\n\t// If the image has been pixelated on purpose, keep that size.\n\tif ( originalWidth > containerWidth || originalHeight > containerHeight ) {\n\t\tcontainerWidth = originalWidth;\n\t\tcontainerHeight = originalHeight;\n\t}\n\n\t// Calculate the final lightbox image size and the\n\t// scale factor. MaxWidth is either the window container\n\t// (accounting for padding) or the image resolution.\n\tlet horizontalPadding = 0;\n\tif ( window.innerWidth > 480 ) {\n\t\thorizontalPadding = 80;\n\t} else if ( window.innerWidth > 1920 ) {\n\t\thorizontalPadding = 160;\n\t}\n\tconst verticalPadding = 80;\n\n\tconst targetMaxWidth = Math.min(\n\t\twindow.innerWidth - horizontalPadding,\n\t\tcontainerWidth\n\t);\n\tconst targetMaxHeight = Math.min(\n\t\twindow.innerHeight - verticalPadding,\n\t\tcontainerHeight\n\t);\n\tconst targetContainerRatio = targetMaxWidth / targetMaxHeight;\n\n\tif ( originalRatio > targetContainerRatio ) {\n\t\t// If targetMaxWidth is reached before targetMaxHeight\n\t\tcontainerWidth = targetMaxWidth;\n\t\tcontainerHeight = containerWidth / originalRatio;\n\t} else {\n\t\t// If targetMaxHeight is reached before targetMaxWidth\n\t\tcontainerHeight = targetMaxHeight;\n\t\tcontainerWidth = containerHeight * originalRatio;\n\t}\n\n\tconst containerScale = originalWidth / containerWidth;\n\tconst lightboxImgWidth =\n\t\timgMaxWidth * ( containerWidth / containerMaxWidth );\n\tconst lightboxImgHeight =\n\t\timgMaxHeight * ( containerHeight / containerMaxHeight );\n\n\t// Add the CSS variables needed.\n\tlet styleTag = document.getElementById( 'wp-lightbox-styles' );\n\tif ( ! styleTag ) {\n\t\tstyleTag = document.createElement( 'style' );\n\t\tstyleTag.id = 'wp-lightbox-styles';\n\t\tdocument.head.appendChild( styleTag );\n\t}\n\n\t// As of this writing, using the calculations above will render the lightbox\n\t// with a small, erroneous whitespace on the left side of the image in iOS Safari,\n\t// perhaps due to an inconsistency in how browsers handle absolute positioning and CSS\n\t// transformation. In any case, adding 1 pixel to the container width and height solves\n\t// the problem, though this can be removed if the issue is fixed in the future.\n\tstyleTag.innerHTML = `\n\t\t:root {\n\t\t\t--wp--lightbox-initial-top-position: ${ screenPosY }px;\n\t\t\t--wp--lightbox-initial-left-position: ${ screenPosX }px;\n\t\t\t--wp--lightbox-container-width: ${ containerWidth + 1 }px;\n\t\t\t--wp--lightbox-container-height: ${ containerHeight + 1 }px;\n\t\t\t--wp--lightbox-image-width: ${ lightboxImgWidth }px;\n\t\t\t--wp--lightbox-image-height: ${ lightboxImgHeight }px;\n\t\t\t--wp--lightbox-scale: ${ containerScale };\n\t\t}\n\t`;\n}\n\n/*\n * Debounces a function call.\n *\n * @function\n * @param {Function} func - A function to be called\n * @param {number} wait - The time to wait before calling the function\n */\nfunction debounce( func, wait = 50 ) {\n\tlet timeout;\n\treturn () => {\n\t\tconst later = () => {\n\t\t\ttimeout = null;\n\t\t\tfunc();\n\t\t};\n\t\tclearTimeout( timeout );\n\t\ttimeout = setTimeout( later, wait );\n\t};\n}\n"],"mappings":";;AAGA,IAAAA,cAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,MAAMC,kBAAkB,GAAG,CAC1B,SAAS,EACT,YAAY,EACZ,+DAA+D,EAC/D,2CAA2C,EAC3C,6CAA6C,EAC7C,2CAA2C,EAC3C,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,iCAAiC,CACjC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,cAAc;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,UAAU,GAAG,KAAK;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,aAAa,GAAG,CAAC;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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Ce,cAAc,GAAG,CAAG;AAC1D,sCAAuCC,eAAe,GAAG,CAAG;AAC5D,iCAAkCY,gBAAkB;AACpD,kCAAmCC,iBAAmB;AACtD,2BAA4BF,cAAgB;AAC5C;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASjC,QAAQA,CAAE2C,IAAI,EAAEC,IAAI,GAAG,EAAE,EAAG;EACpC,IAAIC,OAAO;EACX,OAAO,MAAM;IACZ,MAAMC,KAAK,GAAGA,CAAA,KAAM;MACnBD,OAAO,GAAG,IAAI;MACdF,IAAI,CAAC,CAAC;IACP,CAAC;IACDI,YAAY,CAAEF,OAAQ,CAAC;IACvBA,OAAO,GAAG7F,UAAU,CAAE8F,KAAK,EAAEF,IAAK,CAAC;EACpC,CAAC;AACF"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = LatestComments;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _blockEditor = require("@wordpress/block-editor");
|
|
10
10
|
var _components = require("@wordpress/components");
|
|
11
11
|
var _serverSideRender = _interopRequireDefault(require("@wordpress/server-side-render"));
|
|
@@ -43,32 +43,32 @@ function LatestComments({
|
|
|
43
43
|
spacing: undefined
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
return (0,
|
|
46
|
+
return (0, _react.createElement)("div", {
|
|
47
47
|
...(0, _blockEditor.useBlockProps)()
|
|
48
|
-
}, (0,
|
|
48
|
+
}, (0, _react.createElement)(_blockEditor.InspectorControls, null, (0, _react.createElement)(_components.PanelBody, {
|
|
49
49
|
title: (0, _i18n.__)('Settings')
|
|
50
|
-
}, (0,
|
|
50
|
+
}, (0, _react.createElement)(_components.ToggleControl, {
|
|
51
51
|
__nextHasNoMarginBottom: true,
|
|
52
52
|
label: (0, _i18n.__)('Display avatar'),
|
|
53
53
|
checked: displayAvatar,
|
|
54
54
|
onChange: () => setAttributes({
|
|
55
55
|
displayAvatar: !displayAvatar
|
|
56
56
|
})
|
|
57
|
-
}), (0,
|
|
57
|
+
}), (0, _react.createElement)(_components.ToggleControl, {
|
|
58
58
|
__nextHasNoMarginBottom: true,
|
|
59
59
|
label: (0, _i18n.__)('Display date'),
|
|
60
60
|
checked: displayDate,
|
|
61
61
|
onChange: () => setAttributes({
|
|
62
62
|
displayDate: !displayDate
|
|
63
63
|
})
|
|
64
|
-
}), (0,
|
|
64
|
+
}), (0, _react.createElement)(_components.ToggleControl, {
|
|
65
65
|
__nextHasNoMarginBottom: true,
|
|
66
66
|
label: (0, _i18n.__)('Display excerpt'),
|
|
67
67
|
checked: displayExcerpt,
|
|
68
68
|
onChange: () => setAttributes({
|
|
69
69
|
displayExcerpt: !displayExcerpt
|
|
70
70
|
})
|
|
71
|
-
}), (0,
|
|
71
|
+
}), (0, _react.createElement)(_components.RangeControl, {
|
|
72
72
|
__nextHasNoMarginBottom: true,
|
|
73
73
|
__next40pxDefaultSize: true,
|
|
74
74
|
label: (0, _i18n.__)('Number of comments'),
|
|
@@ -79,7 +79,7 @@ function LatestComments({
|
|
|
79
79
|
min: MIN_COMMENTS,
|
|
80
80
|
max: MAX_COMMENTS,
|
|
81
81
|
required: true
|
|
82
|
-
}))), (0,
|
|
82
|
+
}))), (0, _react.createElement)(_components.Disabled, null, (0, _react.createElement)(_serverSideRender.default, {
|
|
83
83
|
block: "core/latest-comments",
|
|
84
84
|
attributes: serverSideAttributes
|
|
85
85
|
// The preview uses the site's locale to make it more true to how
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blockEditor","require","_components","_serverSideRender","_interopRequireDefault","_i18n","MIN_COMMENTS","MAX_COMMENTS","LatestComments","attributes","setAttributes","commentsToShow","displayAvatar","displayDate","displayExcerpt","serverSideAttributes","style","spacing","undefined","
|
|
1
|
+
{"version":3,"names":["_blockEditor","require","_components","_serverSideRender","_interopRequireDefault","_i18n","MIN_COMMENTS","MAX_COMMENTS","LatestComments","attributes","setAttributes","commentsToShow","displayAvatar","displayDate","displayExcerpt","serverSideAttributes","style","spacing","undefined","_react","createElement","useBlockProps","InspectorControls","PanelBody","title","__","ToggleControl","__nextHasNoMarginBottom","label","checked","onChange","RangeControl","__next40pxDefaultSize","value","min","max","required","Disabled","default","block","urlQueryArgs","_locale"],"sources":["@wordpress/block-library/src/latest-comments/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { InspectorControls, useBlockProps } from '@wordpress/block-editor';\nimport {\n\tDisabled,\n\tPanelBody,\n\tRangeControl,\n\tToggleControl,\n} from '@wordpress/components';\nimport ServerSideRender from '@wordpress/server-side-render';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Minimum number of comments a user can show using this block.\n *\n * @type {number}\n */\nconst MIN_COMMENTS = 1;\n/**\n * Maximum number of comments a user can show using this block.\n *\n * @type {number}\n */\nconst MAX_COMMENTS = 100;\n\nexport default function LatestComments( { attributes, setAttributes } ) {\n\tconst { commentsToShow, displayAvatar, displayDate, displayExcerpt } =\n\t\tattributes;\n\n\tconst serverSideAttributes = {\n\t\t...attributes,\n\t\tstyle: {\n\t\t\t...attributes?.style,\n\t\t\tspacing: undefined,\n\t\t},\n\t};\n\n\treturn (\n\t\t<div { ...useBlockProps() }>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Display avatar' ) }\n\t\t\t\t\t\tchecked={ displayAvatar }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( { displayAvatar: ! displayAvatar } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Display date' ) }\n\t\t\t\t\t\tchecked={ displayDate }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( { displayDate: ! displayDate } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Display excerpt' ) }\n\t\t\t\t\t\tchecked={ displayExcerpt }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tdisplayExcerpt: ! displayExcerpt,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Number of comments' ) }\n\t\t\t\t\t\tvalue={ commentsToShow }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { commentsToShow: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmin={ MIN_COMMENTS }\n\t\t\t\t\t\tmax={ MAX_COMMENTS }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<Disabled>\n\t\t\t\t<ServerSideRender\n\t\t\t\t\tblock=\"core/latest-comments\"\n\t\t\t\t\tattributes={ serverSideAttributes }\n\t\t\t\t\t// The preview uses the site's locale to make it more true to how\n\t\t\t\t\t// the block appears on the frontend. Setting the locale\n\t\t\t\t\t// explicitly prevents any middleware from setting it to 'user'.\n\t\t\t\t\turlQueryArgs={ { _locale: 'site' } }\n\t\t\t\t/>\n\t\t\t</Disabled>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,O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a;IACbC,uBAAuB;IACvBC,KAAK,EAAG,IAAAH,QAAE,EAAE,iBAAkB,CAAG;IACjCI,OAAO,EAAGf,cAAgB;IAC1BgB,QAAQ,EAAGA,CAAA,KACVpB,aAAa,CAAE;MACdI,cAAc,EAAE,CAAEA;IACnB,CAAE;EACF,CACD,CAAC,EACF,IAAAK,MAAA,CAAAC,aAAA,EAAClB,WAAA,CAAA6B,YAAY;IACZJ,uBAAuB;IACvBK,qBAAqB;IACrBJ,KAAK,EAAG,IAAAH,QAAE,EAAE,oBAAqB,CAAG;IACpCQ,KAAK,EAAGtB,cAAgB;IACxBmB,QAAQ,EAAKG,KAAK,IACjBvB,aAAa,CAAE;MAAEC,cAAc,EAAEsB;IAAM,CAAE,CACzC;IACDC,GAAG,EAAG5B,YAAc;IACpB6B,GAAG,EAAG5B,YAAc;IACpB6B,QAAQ;EAAA,CACR,CACS,CACO,CAAC,EACpB,IAAAjB,MAAA,CAAAC,aAAA,EAAClB,WAAA,CAAAmC,QAAQ,QACR,IAAAlB,MAAA,CAAAC,aAAA,EAACjB,iBAAA,CAAAmC,OAAgB;IAChBC,KAAK,EAAC,sBAAsB;IAC5B9B,UAAU,EAAGM;IACb;IACA;IACA;IAAA;IACAyB,YAAY,EAAG;MAAEC,OAAO,EAAE;IAAO;EAAG,CACpC,CACQ,CACN,CAAC;AAER"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = LatestPostsEdit;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _components = require("@wordpress/components");
|
|
11
11
|
var _i18n = require("@wordpress/i18n");
|
|
@@ -16,6 +16,7 @@ var _icons = require("@wordpress/icons");
|
|
|
16
16
|
var _coreData = require("@wordpress/core-data");
|
|
17
17
|
var _notices = require("@wordpress/notices");
|
|
18
18
|
var _compose = require("@wordpress/compose");
|
|
19
|
+
var _element = require("@wordpress/element");
|
|
19
20
|
var _constants = require("./constants");
|
|
20
21
|
/**
|
|
21
22
|
* External dependencies
|
|
@@ -157,15 +158,15 @@ function LatestPostsEdit({
|
|
|
157
158
|
});
|
|
158
159
|
};
|
|
159
160
|
const hasPosts = !!latestPosts?.length;
|
|
160
|
-
const inspectorControls = (0,
|
|
161
|
+
const inspectorControls = (0, _react.createElement)(_blockEditor.InspectorControls, null, (0, _react.createElement)(_components.PanelBody, {
|
|
161
162
|
title: (0, _i18n.__)('Post content')
|
|
162
|
-
}, (0,
|
|
163
|
+
}, (0, _react.createElement)(_components.ToggleControl, {
|
|
163
164
|
label: (0, _i18n.__)('Post content'),
|
|
164
165
|
checked: displayPostContent,
|
|
165
166
|
onChange: value => setAttributes({
|
|
166
167
|
displayPostContent: value
|
|
167
168
|
})
|
|
168
|
-
}), displayPostContent && (0,
|
|
169
|
+
}), displayPostContent && (0, _react.createElement)(_components.RadioControl, {
|
|
169
170
|
label: (0, _i18n.__)('Show:'),
|
|
170
171
|
selected: displayPostContentRadio,
|
|
171
172
|
options: [{
|
|
@@ -178,7 +179,7 @@ function LatestPostsEdit({
|
|
|
178
179
|
onChange: value => setAttributes({
|
|
179
180
|
displayPostContentRadio: value
|
|
180
181
|
})
|
|
181
|
-
}), displayPostContent && displayPostContentRadio === 'excerpt' && (0,
|
|
182
|
+
}), displayPostContent && displayPostContentRadio === 'excerpt' && (0, _react.createElement)(_components.RangeControl, {
|
|
182
183
|
__nextHasNoMarginBottom: true,
|
|
183
184
|
__next40pxDefaultSize: true,
|
|
184
185
|
label: (0, _i18n.__)('Max number of words'),
|
|
@@ -188,32 +189,32 @@ function LatestPostsEdit({
|
|
|
188
189
|
}),
|
|
189
190
|
min: _constants.MIN_EXCERPT_LENGTH,
|
|
190
191
|
max: _constants.MAX_EXCERPT_LENGTH
|
|
191
|
-
})), (0,
|
|
192
|
+
})), (0, _react.createElement)(_components.PanelBody, {
|
|
192
193
|
title: (0, _i18n.__)('Post meta')
|
|
193
|
-
}, (0,
|
|
194
|
+
}, (0, _react.createElement)(_components.ToggleControl, {
|
|
194
195
|
__nextHasNoMarginBottom: true,
|
|
195
196
|
label: (0, _i18n.__)('Display author name'),
|
|
196
197
|
checked: displayAuthor,
|
|
197
198
|
onChange: value => setAttributes({
|
|
198
199
|
displayAuthor: value
|
|
199
200
|
})
|
|
200
|
-
}), (0,
|
|
201
|
+
}), (0, _react.createElement)(_components.ToggleControl, {
|
|
201
202
|
__nextHasNoMarginBottom: true,
|
|
202
203
|
label: (0, _i18n.__)('Display post date'),
|
|
203
204
|
checked: displayPostDate,
|
|
204
205
|
onChange: value => setAttributes({
|
|
205
206
|
displayPostDate: value
|
|
206
207
|
})
|
|
207
|
-
})), (0,
|
|
208
|
+
})), (0, _react.createElement)(_components.PanelBody, {
|
|
208
209
|
title: (0, _i18n.__)('Featured image')
|
|
209
|
-
}, (0,
|
|
210
|
+
}, (0, _react.createElement)(_components.ToggleControl, {
|
|
210
211
|
__nextHasNoMarginBottom: true,
|
|
211
212
|
label: (0, _i18n.__)('Display featured image'),
|
|
212
213
|
checked: displayFeaturedImage,
|
|
213
214
|
onChange: value => setAttributes({
|
|
214
215
|
displayFeaturedImage: value
|
|
215
216
|
})
|
|
216
|
-
}), displayFeaturedImage && (0,
|
|
217
|
+
}), displayFeaturedImage && (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_blockEditor.__experimentalImageSizeControl, {
|
|
217
218
|
onChange: value => {
|
|
218
219
|
const newAttrs = {};
|
|
219
220
|
if (value.hasOwnProperty('width')) {
|
|
@@ -236,25 +237,25 @@ function LatestPostsEdit({
|
|
|
236
237
|
featuredImageSizeWidth: undefined,
|
|
237
238
|
featuredImageSizeHeight: undefined
|
|
238
239
|
})
|
|
239
|
-
}), (0,
|
|
240
|
+
}), (0, _react.createElement)(_components.BaseControl, {
|
|
240
241
|
className: "editor-latest-posts-image-alignment-control"
|
|
241
|
-
}, (0,
|
|
242
|
+
}, (0, _react.createElement)(_components.BaseControl.VisualLabel, null, (0, _i18n.__)('Image alignment')), (0, _react.createElement)(_blockEditor.BlockAlignmentToolbar, {
|
|
242
243
|
value: featuredImageAlign,
|
|
243
244
|
onChange: value => setAttributes({
|
|
244
245
|
featuredImageAlign: value
|
|
245
246
|
}),
|
|
246
247
|
controls: ['left', 'center', 'right'],
|
|
247
248
|
isCollapsed: false
|
|
248
|
-
})), (0,
|
|
249
|
+
})), (0, _react.createElement)(_components.ToggleControl, {
|
|
249
250
|
__nextHasNoMarginBottom: true,
|
|
250
251
|
label: (0, _i18n.__)('Add link to featured image'),
|
|
251
252
|
checked: addLinkToFeaturedImage,
|
|
252
253
|
onChange: value => setAttributes({
|
|
253
254
|
addLinkToFeaturedImage: value
|
|
254
255
|
})
|
|
255
|
-
}))), (0,
|
|
256
|
+
}))), (0, _react.createElement)(_components.PanelBody, {
|
|
256
257
|
title: (0, _i18n.__)('Sorting and filtering')
|
|
257
|
-
}, (0,
|
|
258
|
+
}, (0, _react.createElement)(_components.QueryControls, {
|
|
258
259
|
order,
|
|
259
260
|
orderBy,
|
|
260
261
|
numberOfItems: postsToShow,
|
|
@@ -275,7 +276,7 @@ function LatestPostsEdit({
|
|
|
275
276
|
}),
|
|
276
277
|
authorList: authorList !== null && authorList !== void 0 ? authorList : [],
|
|
277
278
|
selectedAuthorId: selectedAuthor
|
|
278
|
-
}), postLayout === 'grid' && (0,
|
|
279
|
+
}), postLayout === 'grid' && (0, _react.createElement)(_components.RangeControl, {
|
|
279
280
|
__nextHasNoMarginBottom: true,
|
|
280
281
|
__next40pxDefaultSize: true,
|
|
281
282
|
label: (0, _i18n.__)('Columns'),
|
|
@@ -297,12 +298,12 @@ function LatestPostsEdit({
|
|
|
297
298
|
})
|
|
298
299
|
});
|
|
299
300
|
if (!hasPosts) {
|
|
300
|
-
return (0,
|
|
301
|
+
return (0, _react.createElement)("div", {
|
|
301
302
|
...blockProps
|
|
302
|
-
}, inspectorControls, (0,
|
|
303
|
+
}, inspectorControls, (0, _react.createElement)(_components.Placeholder, {
|
|
303
304
|
icon: _icons.pin,
|
|
304
305
|
label: (0, _i18n.__)('Latest Posts')
|
|
305
|
-
}, !Array.isArray(latestPosts) ? (0,
|
|
306
|
+
}, !Array.isArray(latestPosts) ? (0, _react.createElement)(_components.Spinner, null) : (0, _i18n.__)('No posts found.')));
|
|
306
307
|
}
|
|
307
308
|
|
|
308
309
|
// Removing posts from display should be instant.
|
|
@@ -323,9 +324,9 @@ function LatestPostsEdit({
|
|
|
323
324
|
isActive: postLayout === 'grid'
|
|
324
325
|
}];
|
|
325
326
|
const dateFormat = (0, _date.getSettings)().formats.date;
|
|
326
|
-
return (0,
|
|
327
|
+
return (0, _react.createElement)("div", null, inspectorControls, (0, _react.createElement)(_blockEditor.BlockControls, null, (0, _react.createElement)(_components.ToolbarGroup, {
|
|
327
328
|
controls: layoutControls
|
|
328
|
-
})), (0,
|
|
329
|
+
})), (0, _react.createElement)("ul", {
|
|
329
330
|
...blockProps
|
|
330
331
|
}, displayPosts.map(post => {
|
|
331
332
|
const titleTrimmed = post.title.rendered.trim();
|
|
@@ -343,7 +344,7 @@ function LatestPostsEdit({
|
|
|
343
344
|
[`align${featuredImageAlign}`]: !!featuredImageAlign
|
|
344
345
|
});
|
|
345
346
|
const renderFeaturedImage = displayFeaturedImage && imageSourceUrl;
|
|
346
|
-
const featuredImage = renderFeaturedImage && (0,
|
|
347
|
+
const featuredImage = renderFeaturedImage && (0, _react.createElement)("img", {
|
|
347
348
|
src: imageSourceUrl,
|
|
348
349
|
alt: featuredImageAlt,
|
|
349
350
|
style: {
|
|
@@ -352,41 +353,41 @@ function LatestPostsEdit({
|
|
|
352
353
|
}
|
|
353
354
|
});
|
|
354
355
|
const needsReadMore = excerptLength < excerpt.trim().split(' ').length && post.excerpt.raw === '';
|
|
355
|
-
const postExcerpt = needsReadMore ? (0,
|
|
356
|
+
const postExcerpt = needsReadMore ? (0, _react.createElement)(_react.Fragment, null, excerpt.trim().split(' ', excerptLength).join(' '), (0, _element.createInterpolateElement)( /* translators: excerpt truncation character, default … */
|
|
356
357
|
(0, _i18n.__)(' … <a>Read more</a>'), {
|
|
357
358
|
a:
|
|
358
359
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
359
|
-
(0,
|
|
360
|
+
(0, _react.createElement)("a", {
|
|
360
361
|
href: post.link,
|
|
361
362
|
rel: "noopener noreferrer",
|
|
362
363
|
onClick: showRedirectionPreventedNotice
|
|
363
364
|
})
|
|
364
365
|
})) : excerpt;
|
|
365
|
-
return (0,
|
|
366
|
+
return (0, _react.createElement)("li", {
|
|
366
367
|
key: post.id
|
|
367
|
-
}, renderFeaturedImage && (0,
|
|
368
|
+
}, renderFeaturedImage && (0, _react.createElement)("div", {
|
|
368
369
|
className: imageClasses
|
|
369
|
-
}, addLinkToFeaturedImage ? (0,
|
|
370
|
+
}, addLinkToFeaturedImage ? (0, _react.createElement)("a", {
|
|
370
371
|
className: "wp-block-latest-posts__post-title",
|
|
371
372
|
href: post.link,
|
|
372
373
|
rel: "noreferrer noopener",
|
|
373
374
|
onClick: showRedirectionPreventedNotice
|
|
374
|
-
}, featuredImage) : featuredImage), (0,
|
|
375
|
+
}, featuredImage) : featuredImage), (0, _react.createElement)("a", {
|
|
375
376
|
href: post.link,
|
|
376
377
|
rel: "noreferrer noopener",
|
|
377
378
|
dangerouslySetInnerHTML: !!titleTrimmed ? {
|
|
378
379
|
__html: titleTrimmed
|
|
379
380
|
} : undefined,
|
|
380
381
|
onClick: showRedirectionPreventedNotice
|
|
381
|
-
}, !titleTrimmed ? (0, _i18n.__)('(no title)') : null), displayAuthor && currentAuthor && (0,
|
|
382
|
+
}, !titleTrimmed ? (0, _i18n.__)('(no title)') : null), displayAuthor && currentAuthor && (0, _react.createElement)("div", {
|
|
382
383
|
className: "wp-block-latest-posts__post-author"
|
|
383
384
|
}, (0, _i18n.sprintf)( /* translators: byline. %s: current author. */
|
|
384
|
-
(0, _i18n.__)('by %s'), currentAuthor.name)), displayPostDate && post.date_gmt && (0,
|
|
385
|
+
(0, _i18n.__)('by %s'), currentAuthor.name)), displayPostDate && post.date_gmt && (0, _react.createElement)("time", {
|
|
385
386
|
dateTime: (0, _date.format)('c', post.date_gmt),
|
|
386
387
|
className: "wp-block-latest-posts__post-date"
|
|
387
|
-
}, (0, _date.dateI18n)(dateFormat, post.date_gmt)), displayPostContent && displayPostContentRadio === 'excerpt' && (0,
|
|
388
|
+
}, (0, _date.dateI18n)(dateFormat, post.date_gmt)), displayPostContent && displayPostContentRadio === 'excerpt' && (0, _react.createElement)("div", {
|
|
388
389
|
className: "wp-block-latest-posts__post-excerpt"
|
|
389
|
-
}, postExcerpt), displayPostContent && displayPostContentRadio === 'full_post' && (0,
|
|
390
|
+
}, postExcerpt), displayPostContent && displayPostContentRadio === 'full_post' && (0, _react.createElement)("div", {
|
|
390
391
|
className: "wp-block-latest-posts__post-full-content",
|
|
391
392
|
dangerouslySetInnerHTML: {
|
|
392
393
|
__html: post.content.raw.trim()
|