@wordpress/block-library 8.12.0 → 8.12.1
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/build/archives/edit.js +2 -1
- package/build/archives/edit.js.map +1 -1
- package/build/archives/index.js +0 -1
- package/build/archives/index.js.map +1 -1
- package/build/audio/edit.js +4 -2
- package/build/audio/edit.js.map +1 -1
- package/build/audio/save.js +2 -1
- package/build/audio/save.js.map +1 -1
- package/build/avatar/edit.js +6 -3
- package/build/avatar/edit.js.map +1 -1
- package/build/avatar/index.js +0 -1
- package/build/avatar/index.js.map +1 -1
- package/build/block/edit.js +8 -4
- package/build/block/edit.js.map +1 -1
- package/build/block/index.js +1 -1
- package/build/button/deprecated.js +20 -15
- package/build/button/deprecated.js.map +1 -1
- package/build/button/edit.js +2 -4
- package/build/button/edit.js.map +1 -1
- package/build/button/save.js +4 -3
- package/build/button/save.js.map +1 -1
- package/build/buttons/deprecated.js +6 -5
- package/build/buttons/deprecated.js.map +1 -1
- package/build/buttons/edit.js +2 -1
- package/build/buttons/edit.js.map +1 -1
- package/build/buttons/edit.native.js +6 -6
- package/build/buttons/edit.native.js.map +1 -1
- package/build/buttons/index.js +1 -1
- package/build/buttons/save.js +2 -1
- package/build/buttons/save.js.map +1 -1
- package/build/buttons/transforms.js +1 -1
- package/build/calendar/edit.js +4 -2
- package/build/calendar/edit.js.map +1 -1
- package/build/calendar/index.js +0 -1
- package/build/calendar/index.js.map +1 -1
- package/build/categories/edit.js +2 -1
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +0 -1
- package/build/categories/index.js.map +1 -1
- package/build/code/edit.js +2 -1
- package/build/code/edit.js.map +1 -1
- package/build/code/save.js +2 -1
- package/build/code/save.js.map +1 -1
- package/build/column/edit.js +2 -1
- package/build/column/edit.js.map +1 -1
- package/build/column/edit.native.js +2 -1
- package/build/column/edit.native.js.map +1 -1
- package/build/column/index.js +1 -1
- package/build/column/save.js +2 -1
- package/build/column/save.js.map +1 -1
- package/build/columns/edit.js +6 -3
- package/build/columns/edit.js.map +1 -1
- package/build/columns/edit.native.js +4 -5
- package/build/columns/edit.native.js.map +1 -1
- package/build/columns/index.js +1 -1
- package/build/columns/save.js +2 -1
- package/build/columns/save.js.map +1 -1
- package/build/comment-author-avatar/edit.js +6 -8
- package/build/comment-author-avatar/edit.js.map +1 -1
- package/build/comment-author-avatar/index.js +0 -1
- package/build/comment-author-avatar/index.js.map +1 -1
- package/build/comment-author-name/edit.js +2 -1
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-author-name/index.js +0 -1
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/edit.js +4 -2
- package/build/comment-content/edit.js.map +1 -1
- package/build/comment-content/index.js +0 -1
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/edit.js +2 -1
- package/build/comment-date/edit.js.map +1 -1
- package/build/comment-date/index.js +0 -1
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/edit.js +2 -1
- package/build/comment-edit-link/edit.js.map +1 -1
- package/build/comment-edit-link/index.js +0 -1
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/edit.js +2 -1
- package/build/comment-reply-link/edit.js.map +1 -1
- package/build/comment-reply-link/index.js +0 -1
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comment-template/edit.js +10 -10
- package/build/comment-template/edit.js.map +1 -1
- package/build/comment-template/index.js +0 -1
- package/build/comment-template/index.js.map +1 -1
- package/build/comments/deprecated.js +2 -1
- package/build/comments/deprecated.js.map +1 -1
- package/build/comments/edit/comments-legacy.js +2 -1
- package/build/comments/edit/comments-legacy.js.map +1 -1
- package/build/comments/edit/index.js +4 -2
- package/build/comments/edit/index.js.map +1 -1
- package/build/comments/index.js +0 -1
- package/build/comments/index.js.map +1 -1
- package/build/comments/save.js +2 -1
- package/build/comments/save.js.map +1 -1
- package/build/comments-pagination/edit.js +2 -1
- package/build/comments-pagination/edit.js.map +1 -1
- package/build/comments-pagination/index.js +1 -2
- package/build/comments-pagination/index.js.map +1 -1
- package/build/comments-pagination-next/edit.js +4 -7
- package/build/comments-pagination-next/edit.js.map +1 -1
- package/build/comments-pagination-next/index.js +0 -1
- package/build/comments-pagination-next/index.js.map +1 -1
- package/build/comments-pagination-numbers/edit.js +2 -1
- package/build/comments-pagination-numbers/edit.js.map +1 -1
- package/build/comments-pagination-numbers/index.js +0 -1
- package/build/comments-pagination-numbers/index.js.map +1 -1
- package/build/comments-pagination-previous/edit.js +4 -7
- package/build/comments-pagination-previous/edit.js.map +1 -1
- package/build/comments-pagination-previous/index.js +0 -1
- package/build/comments-pagination-previous/index.js.map +1 -1
- package/build/comments-title/edit.js +4 -9
- package/build/comments-title/edit.js.map +1 -1
- package/build/cover/deprecated.js +46 -36
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/index.js +8 -7
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +4 -7
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/edit/resizable-cover-popover.js +6 -7
- package/build/cover/edit/resizable-cover-popover.js.map +1 -1
- package/build/cover/edit.native.js +12 -11
- package/build/cover/edit.native.js.map +1 -1
- package/build/cover/index.js +1 -1
- package/build/cover/save.js +9 -7
- package/build/cover/save.js.map +1 -1
- package/build/cover/transforms.js +2 -2
- package/build/cover/transforms.js.map +1 -1
- package/build/details/edit.js +3 -7
- package/build/details/edit.js.map +1 -1
- package/build/details/index.js +1 -1
- package/build/details/init.js +16 -0
- package/build/details/init.js.map +1 -0
- package/build/details/save.js +2 -6
- package/build/details/save.js.map +1 -1
- package/build/embed/deprecated.js +4 -3
- package/build/embed/deprecated.js.map +1 -1
- package/build/embed/edit.js +6 -3
- package/build/embed/edit.js.map +1 -1
- package/build/embed/edit.native.js +6 -3
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/save.js +4 -3
- package/build/embed/save.js.map +1 -1
- package/build/embed/wp-embed-preview.js +4 -7
- package/build/embed/wp-embed-preview.js.map +1 -1
- package/build/embed/wp-embed-preview.native.js +4 -7
- package/build/embed/wp-embed-preview.native.js.map +1 -1
- package/build/file/deprecated.js +6 -3
- package/build/file/deprecated.js.map +1 -1
- package/build/file/edit.js +4 -2
- package/build/file/edit.js.map +1 -1
- package/build/file/index.js +1 -1
- package/build/file/save.js +2 -1
- package/build/file/save.js.map +1 -1
- package/build/file/view.js +9 -0
- package/build/file/view.js.map +1 -0
- package/build/footnotes/edit.js +57 -0
- package/build/footnotes/edit.js.map +1 -0
- package/build/footnotes/format.js +142 -0
- package/build/footnotes/format.js.map +1 -0
- package/build/footnotes/index.js +67 -0
- package/build/footnotes/index.js.map +1 -0
- package/build/freeform/edit.js +6 -3
- package/build/freeform/edit.js.map +1 -1
- package/build/freeform/edit.native.js +2 -4
- package/build/freeform/edit.native.js.map +1 -1
- package/build/freeform/modal.js +2 -1
- package/build/freeform/modal.js.map +1 -1
- package/build/gallery/deprecated.js +6 -4
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit-wrapper.js +4 -2
- package/build/gallery/edit-wrapper.js.map +1 -1
- package/build/gallery/edit.js +16 -13
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js +2 -4
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/gallery.native.js +3 -2
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/index.js +1 -1
- package/build/gallery/save.js +2 -1
- package/build/gallery/save.js.map +1 -1
- package/build/gallery/shared-icon.native.js +4 -5
- package/build/gallery/shared-icon.native.js.map +1 -1
- package/build/gallery/v1/edit.js +8 -9
- package/build/gallery/v1/edit.js.map +1 -1
- package/build/gallery/v1/gallery.js +7 -7
- package/build/gallery/v1/gallery.js.map +1 -1
- package/build/gallery/v1/save.js +4 -3
- package/build/gallery/v1/save.js.map +1 -1
- package/build/group/deprecated.js +5 -3
- package/build/group/deprecated.js.map +1 -1
- package/build/group/edit.js +4 -1
- package/build/group/edit.js.map +1 -1
- package/build/group/index.js +1 -1
- package/build/group/placeholder.js +2 -1
- package/build/group/placeholder.js.map +1 -1
- package/build/group/save.js +2 -1
- package/build/group/save.js.map +1 -1
- package/build/heading/deprecated.js +8 -6
- package/build/heading/deprecated.js.map +1 -1
- package/build/heading/edit.js +9 -11
- package/build/heading/edit.js.map +1 -1
- package/build/heading/save.js +4 -3
- package/build/heading/save.js.map +1 -1
- package/build/home-link/edit.js +2 -1
- package/build/home-link/edit.js.map +1 -1
- package/build/home-link/index.js +0 -1
- package/build/home-link/index.js.map +1 -1
- package/build/html/edit.js +4 -3
- package/build/html/edit.js.map +1 -1
- package/build/image/deprecated.js +14 -12
- package/build/image/deprecated.js.map +1 -1
- package/build/image/edit.js +4 -3
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +8 -8
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +16 -9
- package/build/image/image.js.map +1 -1
- package/build/image/interactivity.js +119 -6
- package/build/image/interactivity.js.map +1 -1
- package/build/image/save.js +4 -3
- package/build/image/save.js.map +1 -1
- package/build/index.js +3 -1
- package/build/index.js.map +1 -1
- package/build/latest-comments/edit.js +2 -1
- package/build/latest-comments/edit.js.map +1 -1
- package/build/latest-comments/index.js +0 -1
- package/build/latest-comments/index.js.map +1 -1
- package/build/latest-posts/deprecated.js +0 -1
- package/build/latest-posts/deprecated.js.map +1 -1
- package/build/latest-posts/edit.js +14 -7
- package/build/latest-posts/edit.js.map +1 -1
- package/build/latest-posts/edit.native.js +4 -5
- package/build/latest-posts/edit.native.js.map +1 -1
- package/build/latest-posts/index.js +0 -1
- package/build/latest-posts/index.js.map +1 -1
- package/build/list/deprecated.js +12 -10
- package/build/list/deprecated.js.map +1 -1
- package/build/list/edit.js +4 -5
- package/build/list/edit.js.map +1 -1
- package/build/list/ordered-list-settings.js +25 -1
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/list/save.js +6 -5
- package/build/list/save.js.map +1 -1
- package/build/list/tag-name.js +4 -7
- package/build/list/tag-name.js.map +1 -1
- package/build/list/tag-name.native.js +4 -7
- package/build/list/tag-name.native.js.map +1 -1
- package/build/list-item/edit.js +2 -1
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/edit.native.js +2 -1
- package/build/list-item/edit.native.js.map +1 -1
- package/build/list-item/save.js +2 -1
- package/build/list-item/save.js.map +1 -1
- package/build/{private-apis.js → lock-unlock.js} +1 -1
- package/build/lock-unlock.js.map +1 -0
- package/build/loginout/edit.js +4 -3
- package/build/loginout/edit.js.map +1 -1
- package/build/loginout/index.js +0 -1
- package/build/loginout/index.js.map +1 -1
- package/build/media-text/deprecated.js +43 -33
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/edit.js +7 -4
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/media-container.js +8 -7
- package/build/media-text/media-container.js.map +1 -1
- package/build/media-text/media-container.native.js +8 -8
- package/build/media-text/media-container.native.js.map +1 -1
- package/build/media-text/save.js +17 -13
- package/build/media-text/save.js.map +1 -1
- package/build/missing/edit.js +4 -3
- package/build/missing/edit.js.map +1 -1
- package/build/more/edit.js +2 -1
- package/build/more/edit.js.map +1 -1
- package/build/navigation/constants.js +8 -1
- package/build/navigation/constants.js.map +1 -1
- package/build/navigation/deprecated.js +1 -1
- package/build/navigation/deprecated.js.map +1 -1
- package/build/navigation/edit/index.js +35 -21
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +2 -1
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/leaf-more-menu.js +5 -9
- package/build/navigation/edit/leaf-more-menu.js.map +1 -1
- package/build/navigation/edit/menu-inspector-controls.js +12 -16
- package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +15 -7
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +2 -1
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js +3 -5
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation/index.js +2 -3
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +9 -7
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation/view-modal.js +64 -0
- package/build/navigation/view-modal.js.map +1 -0
- package/build/navigation/view.js +61 -0
- package/build/navigation/view.js.map +1 -0
- package/build/navigation-link/edit.js +4 -2
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +4 -2
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/nextpage/edit.js +2 -1
- package/build/nextpage/edit.js.map +1 -1
- package/build/page-list/edit.js +12 -6
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list/index.js +0 -1
- package/build/page-list/index.js.map +1 -1
- package/build/page-list-item/edit.js +2 -1
- package/build/page-list-item/edit.js.map +1 -1
- package/build/paragraph/deprecated.js +5 -4
- package/build/paragraph/deprecated.js.map +1 -1
- package/build/paragraph/edit.js +4 -6
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/save.js +5 -4
- package/build/paragraph/save.js.map +1 -1
- package/build/pattern/edit.js +7 -32
- package/build/pattern/edit.js.map +1 -1
- package/build/pattern/index.js +3 -11
- package/build/pattern/index.js.map +1 -1
- package/build/post-author/edit.js +4 -2
- package/build/post-author/edit.js.map +1 -1
- package/build/post-author/index.js +0 -1
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/edit.js +2 -4
- package/build/post-author-biography/edit.js.map +1 -1
- package/build/post-author-biography/index.js +0 -1
- package/build/post-author-biography/index.js.map +1 -1
- package/build/post-author-name/edit.js +2 -1
- package/build/post-author-name/edit.js.map +1 -1
- package/build/post-author-name/index.js +0 -1
- package/build/post-author-name/index.js.map +1 -1
- package/build/post-comment/edit.js +4 -2
- package/build/post-comment/edit.js.map +1 -1
- package/build/post-comment/save.js +2 -1
- package/build/post-comment/save.js.map +1 -1
- package/build/post-comments-count/edit.js +2 -4
- package/build/post-comments-count/edit.js.map +1 -1
- package/build/post-comments-count/index.js +0 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-form/edit.js +2 -1
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/index.js +0 -1
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-comments-link/edit.js +2 -1
- package/build/post-comments-link/edit.js.map +1 -1
- package/build/post-comments-link/index.js +0 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/edit.js +11 -10
- package/build/post-content/edit.js.map +1 -1
- package/build/post-content/index.js +1 -2
- package/build/post-content/index.js.map +1 -1
- package/build/post-date/edit.js +2 -1
- package/build/post-date/edit.js.map +1 -1
- package/build/post-date/index.js +0 -1
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/edit.js +6 -3
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +0 -1
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-featured-image/edit.js +4 -2
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +0 -1
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-featured-image/overlay.js +4 -5
- package/build/post-featured-image/overlay.js.map +1 -1
- package/build/post-navigation-link/edit.js +2 -1
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-navigation-link/index.js +0 -1
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-template/edit.js +14 -9
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/index.js +1 -2
- package/build/post-template/index.js.map +1 -1
- package/build/post-terms/edit.js +4 -8
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/hooks.js +9 -5
- package/build/post-terms/hooks.js.map +1 -1
- package/build/post-terms/index.js +0 -1
- package/build/post-terms/index.js.map +1 -1
- package/build/post-time-to-read/edit.js +2 -1
- package/build/post-time-to-read/edit.js.map +1 -1
- package/build/post-time-to-read/init.js +16 -0
- package/build/post-time-to-read/init.js.map +1 -0
- package/build/post-title/edit.js +16 -16
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +0 -1
- package/build/post-title/index.js.map +1 -1
- package/build/preformatted/edit.js +4 -8
- package/build/preformatted/edit.js.map +1 -1
- package/build/preformatted/edit.native.js +2 -1
- package/build/preformatted/edit.native.js.map +1 -1
- package/build/preformatted/save.js +2 -1
- package/build/preformatted/save.js.map +1 -1
- package/build/pullquote/deprecated.js +10 -8
- package/build/pullquote/deprecated.js.map +1 -1
- package/build/pullquote/edit.js +2 -1
- package/build/pullquote/edit.js.map +1 -1
- package/build/pullquote/edit.native.js +2 -1
- package/build/pullquote/edit.native.js.map +1 -1
- package/build/pullquote/save.js +5 -4
- package/build/pullquote/save.js.map +1 -1
- package/build/query/deprecated.js +16 -10
- package/build/query/deprecated.js.map +1 -1
- package/build/query/edit/index.js +2 -4
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +4 -3
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/query-content.js +20 -6
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/edit/query-placeholder.js +4 -2
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/index.js +1 -2
- package/build/query/index.js.map +1 -1
- package/build/query/save.js +2 -1
- package/build/query/save.js.map +1 -1
- package/build/query/utils.js +1 -2
- package/build/query/utils.js.map +1 -1
- package/build/query-no-results/edit.js +2 -1
- package/build/query-no-results/edit.js.map +1 -1
- package/build/query-no-results/index.js +0 -1
- package/build/query-no-results/index.js.map +1 -1
- package/build/query-pagination/deprecated.js +2 -1
- package/build/query-pagination/deprecated.js.map +1 -1
- package/build/query-pagination/edit.js +2 -1
- package/build/query-pagination/edit.js.map +1 -1
- package/build/query-pagination/index.js +1 -2
- package/build/query-pagination/index.js.map +1 -1
- package/build/query-pagination-next/edit.js +4 -7
- package/build/query-pagination-next/edit.js.map +1 -1
- package/build/query-pagination-next/index.js +0 -1
- package/build/query-pagination-next/index.js.map +1 -1
- package/build/query-pagination-numbers/edit.js +2 -1
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-pagination-numbers/index.js +0 -1
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/query-pagination-previous/edit.js +4 -7
- package/build/query-pagination-previous/edit.js.map +1 -1
- package/build/query-pagination-previous/index.js +0 -1
- package/build/query-pagination-previous/index.js.map +1 -1
- package/build/query-title/edit.js +8 -11
- package/build/query-title/edit.js.map +1 -1
- package/build/query-title/index.js +0 -1
- package/build/query-title/index.js.map +1 -1
- package/build/quote/deprecated.js +4 -3
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/edit.js +7 -7
- package/build/quote/edit.js.map +1 -1
- package/build/quote/save.js +4 -3
- package/build/quote/save.js.map +1 -1
- package/build/read-more/edit.js +4 -7
- package/build/read-more/edit.js.map +1 -1
- package/build/read-more/index.js +0 -1
- package/build/read-more/index.js.map +1 -1
- package/build/rss/edit.js +4 -2
- package/build/rss/edit.js.map +1 -1
- package/build/rss/index.js +0 -1
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +4 -3
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +6 -8
- package/build/search/edit.native.js.map +1 -1
- package/build/search/index.js +0 -1
- package/build/search/index.js.map +1 -1
- package/build/separator/deprecated.js +5 -4
- package/build/separator/deprecated.js.map +1 -1
- package/build/separator/edit.js +5 -4
- package/build/separator/edit.js.map +1 -1
- package/build/separator/save.js +5 -4
- package/build/separator/save.js.map +1 -1
- package/build/shortcode/edit.js +4 -3
- package/build/shortcode/edit.js.map +1 -1
- package/build/site-logo/edit.js +10 -10
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-logo/index.js +0 -1
- package/build/site-logo/index.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 +0 -3
- package/build/site-tagline/icon.js.map +1 -1
- package/build/site-tagline/index.js +0 -1
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/edit/index.js +8 -9
- package/build/site-title/edit/index.js.map +1 -1
- package/build/site-title/index.js +0 -1
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js +2 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/index.js +0 -1
- package/build/social-link/index.js.map +1 -1
- package/build/social-links/deprecated.js +5 -4
- package/build/social-links/deprecated.js.map +1 -1
- package/build/social-links/edit.js +6 -6
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/index.js +1 -1
- package/build/social-links/save.js +2 -1
- package/build/social-links/save.js.map +1 -1
- package/build/spacer/deprecated.js +8 -7
- package/build/spacer/deprecated.js.map +1 -1
- package/build/spacer/edit.js +10 -10
- package/build/spacer/edit.js.map +1 -1
- package/build/spacer/edit.native.js +4 -5
- package/build/spacer/edit.native.js.map +1 -1
- package/build/spacer/save.js +21 -11
- package/build/spacer/save.js.map +1 -1
- package/build/spacer/save.native.js +8 -7
- package/build/spacer/save.native.js.map +1 -1
- package/build/table/deprecated.js +4 -2
- package/build/table/deprecated.js.map +1 -1
- package/build/table/edit.js +6 -4
- package/build/table/edit.js.map +1 -1
- package/build/table/save.js +2 -1
- package/build/table/save.js.map +1 -1
- package/build/table-of-contents/edit.js +4 -2
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/table-of-contents/save.js +2 -1
- package/build/table-of-contents/save.js.map +1 -1
- package/build/tag-cloud/edit.js +2 -1
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/tag-cloud/index.js +0 -1
- package/build/tag-cloud/index.js.map +1 -1
- package/build/template-part/edit/index.js +8 -4
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +3 -2
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build/template-part/index.js +0 -1
- package/build/template-part/index.js.map +1 -1
- package/build/term-description/edit.js +2 -1
- package/build/term-description/edit.js.map +1 -1
- package/build/term-description/index.js +0 -1
- package/build/term-description/index.js.map +1 -1
- package/build/text-columns/edit.js +4 -3
- package/build/text-columns/edit.js.map +1 -1
- package/build/text-columns/save.js +4 -3
- package/build/text-columns/save.js.map +1 -1
- package/build/utils/interactivity/directives.js +4 -7
- package/build/utils/interactivity/directives.js.map +1 -1
- package/build/utils/interactivity/index.js +1 -3
- package/build/utils/interactivity/index.js.map +1 -1
- package/build/utils/migrate-font-family.js +2 -2
- package/build/utils/migrate-font-family.js.map +1 -1
- package/build/verse/deprecated.js +4 -3
- package/build/verse/deprecated.js.map +1 -1
- package/build/verse/edit.js +4 -6
- package/build/verse/edit.js.map +1 -1
- package/build/verse/save.js +4 -3
- package/build/verse/save.js.map +1 -1
- package/build/video/deprecated.js +2 -1
- package/build/video/deprecated.js.map +1 -1
- package/build/video/edit.js +4 -2
- package/build/video/edit.js.map +1 -1
- package/build/video/edit.native.js +8 -8
- package/build/video/edit.native.js.map +1 -1
- package/build/video/save.js +2 -1
- package/build/video/save.js.map +1 -1
- package/build/video/tracks.js +4 -7
- package/build/video/tracks.js.map +1 -1
- package/build-module/archives/edit.js +2 -1
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/archives/index.js +0 -1
- package/build-module/archives/index.js.map +1 -1
- package/build-module/audio/edit.js +4 -2
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/save.js +2 -1
- package/build-module/audio/save.js.map +1 -1
- package/build-module/avatar/edit.js +6 -3
- package/build-module/avatar/edit.js.map +1 -1
- package/build-module/avatar/index.js +0 -1
- package/build-module/avatar/index.js.map +1 -1
- package/build-module/block/edit.js +8 -4
- package/build-module/block/edit.js.map +1 -1
- package/build-module/block/index.js +1 -1
- package/build-module/button/deprecated.js +20 -15
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/edit.js +2 -3
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/save.js +4 -3
- package/build-module/button/save.js.map +1 -1
- package/build-module/buttons/deprecated.js +6 -5
- package/build-module/buttons/deprecated.js.map +1 -1
- package/build-module/buttons/edit.js +2 -1
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/buttons/edit.native.js +6 -6
- package/build-module/buttons/edit.native.js.map +1 -1
- package/build-module/buttons/index.js +1 -1
- package/build-module/buttons/save.js +2 -1
- package/build-module/buttons/save.js.map +1 -1
- package/build-module/buttons/transforms.js +1 -1
- package/build-module/calendar/edit.js +4 -2
- package/build-module/calendar/edit.js.map +1 -1
- package/build-module/calendar/index.js +0 -1
- package/build-module/calendar/index.js.map +1 -1
- package/build-module/categories/edit.js +2 -1
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +0 -1
- package/build-module/categories/index.js.map +1 -1
- package/build-module/code/edit.js +2 -1
- package/build-module/code/edit.js.map +1 -1
- package/build-module/code/save.js +2 -1
- package/build-module/code/save.js.map +1 -1
- package/build-module/column/edit.js +2 -1
- package/build-module/column/edit.js.map +1 -1
- package/build-module/column/edit.native.js +2 -1
- package/build-module/column/edit.native.js.map +1 -1
- package/build-module/column/index.js +1 -1
- package/build-module/column/save.js +2 -1
- package/build-module/column/save.js.map +1 -1
- package/build-module/columns/edit.js +6 -3
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +4 -4
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/columns/index.js +1 -1
- package/build-module/columns/save.js +2 -1
- package/build-module/columns/save.js.map +1 -1
- package/build-module/comment-author-avatar/edit.js +6 -5
- package/build-module/comment-author-avatar/edit.js.map +1 -1
- package/build-module/comment-author-avatar/index.js +0 -1
- package/build-module/comment-author-avatar/index.js.map +1 -1
- package/build-module/comment-author-name/edit.js +2 -1
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-author-name/index.js +0 -1
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/edit.js +4 -2
- package/build-module/comment-content/edit.js.map +1 -1
- package/build-module/comment-content/index.js +0 -1
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/edit.js +2 -1
- package/build-module/comment-date/edit.js.map +1 -1
- package/build-module/comment-date/index.js +0 -1
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/edit.js +2 -1
- package/build-module/comment-edit-link/edit.js.map +1 -1
- package/build-module/comment-edit-link/index.js +0 -1
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/edit.js +2 -1
- package/build-module/comment-reply-link/edit.js.map +1 -1
- package/build-module/comment-reply-link/index.js +0 -1
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comment-template/edit.js +10 -7
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comment-template/index.js +0 -1
- package/build-module/comment-template/index.js.map +1 -1
- package/build-module/comments/deprecated.js +2 -1
- package/build-module/comments/deprecated.js.map +1 -1
- package/build-module/comments/edit/comments-legacy.js +2 -1
- package/build-module/comments/edit/comments-legacy.js.map +1 -1
- package/build-module/comments/edit/index.js +4 -2
- package/build-module/comments/edit/index.js.map +1 -1
- package/build-module/comments/index.js +0 -1
- package/build-module/comments/index.js.map +1 -1
- package/build-module/comments/save.js +2 -1
- package/build-module/comments/save.js.map +1 -1
- package/build-module/comments-pagination/edit.js +2 -1
- package/build-module/comments-pagination/edit.js.map +1 -1
- package/build-module/comments-pagination/index.js +1 -2
- package/build-module/comments-pagination/index.js.map +1 -1
- package/build-module/comments-pagination-next/edit.js +4 -4
- package/build-module/comments-pagination-next/edit.js.map +1 -1
- package/build-module/comments-pagination-next/index.js +0 -1
- package/build-module/comments-pagination-next/index.js.map +1 -1
- package/build-module/comments-pagination-numbers/edit.js +2 -1
- package/build-module/comments-pagination-numbers/edit.js.map +1 -1
- package/build-module/comments-pagination-numbers/index.js +0 -1
- package/build-module/comments-pagination-numbers/index.js.map +1 -1
- package/build-module/comments-pagination-previous/edit.js +4 -4
- package/build-module/comments-pagination-previous/edit.js.map +1 -1
- package/build-module/comments-pagination-previous/index.js +0 -1
- package/build-module/comments-pagination-previous/index.js.map +1 -1
- package/build-module/comments-title/edit.js +4 -8
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/cover/deprecated.js +46 -36
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/index.js +8 -6
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +4 -4
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/edit/resizable-cover-popover.js +5 -5
- package/build-module/cover/edit/resizable-cover-popover.js.map +1 -1
- package/build-module/cover/edit.native.js +12 -10
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/index.js +1 -1
- package/build-module/cover/save.js +9 -7
- package/build-module/cover/save.js.map +1 -1
- package/build-module/cover/transforms.js +1 -1
- package/build-module/cover/transforms.js.map +1 -1
- package/build-module/details/edit.js +3 -4
- package/build-module/details/edit.js.map +1 -1
- package/build-module/details/index.js +1 -1
- package/build-module/details/init.js +6 -0
- package/build-module/details/init.js.map +1 -0
- package/build-module/details/save.js +2 -3
- package/build-module/details/save.js.map +1 -1
- package/build-module/embed/deprecated.js +4 -3
- package/build-module/embed/deprecated.js.map +1 -1
- package/build-module/embed/edit.js +6 -3
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/edit.native.js +6 -3
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/save.js +4 -3
- package/build-module/embed/save.js.map +1 -1
- package/build-module/embed/wp-embed-preview.js +4 -4
- package/build-module/embed/wp-embed-preview.js.map +1 -1
- package/build-module/embed/wp-embed-preview.native.js +4 -4
- package/build-module/embed/wp-embed-preview.native.js.map +1 -1
- package/build-module/file/deprecated.js +6 -3
- package/build-module/file/deprecated.js.map +1 -1
- package/build-module/file/edit.js +4 -2
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/index.js +1 -1
- package/build-module/file/save.js +2 -1
- package/build-module/file/save.js.map +1 -1
- package/build-module/file/view.js +6 -0
- package/build-module/file/view.js.map +1 -0
- package/build-module/footnotes/edit.js +48 -0
- package/build-module/footnotes/edit.js.map +1 -0
- package/build-module/footnotes/format.js +126 -0
- package/build-module/footnotes/format.js.map +1 -0
- package/build-module/footnotes/index.js +48 -0
- package/build-module/footnotes/index.js.map +1 -0
- package/build-module/freeform/edit.js +6 -3
- package/build-module/freeform/edit.js.map +1 -1
- package/build-module/freeform/edit.native.js +2 -3
- package/build-module/freeform/edit.native.js.map +1 -1
- package/build-module/freeform/modal.js +2 -1
- package/build-module/freeform/modal.js.map +1 -1
- package/build-module/gallery/deprecated.js +6 -4
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit-wrapper.js +4 -2
- package/build-module/gallery/edit-wrapper.js.map +1 -1
- package/build-module/gallery/edit.js +16 -12
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.js +2 -3
- package/build-module/gallery/gallery.js.map +1 -1
- package/build-module/gallery/gallery.native.js +3 -2
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/index.js +1 -1
- package/build-module/gallery/save.js +2 -1
- package/build-module/gallery/save.js.map +1 -1
- package/build-module/gallery/shared-icon.native.js +4 -4
- package/build-module/gallery/shared-icon.native.js.map +1 -1
- package/build-module/gallery/v1/edit.js +8 -8
- package/build-module/gallery/v1/edit.js.map +1 -1
- package/build-module/gallery/v1/gallery.js +7 -6
- package/build-module/gallery/v1/gallery.js.map +1 -1
- package/build-module/gallery/v1/save.js +4 -3
- package/build-module/gallery/v1/save.js.map +1 -1
- package/build-module/group/deprecated.js +5 -3
- package/build-module/group/deprecated.js.map +1 -1
- package/build-module/group/edit.js +4 -1
- package/build-module/group/edit.js.map +1 -1
- package/build-module/group/index.js +1 -1
- package/build-module/group/placeholder.js +2 -1
- package/build-module/group/placeholder.js.map +1 -1
- package/build-module/group/save.js +2 -1
- package/build-module/group/save.js.map +1 -1
- package/build-module/heading/deprecated.js +8 -6
- package/build-module/heading/deprecated.js.map +1 -1
- package/build-module/heading/edit.js +9 -9
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/save.js +4 -3
- package/build-module/heading/save.js.map +1 -1
- package/build-module/home-link/edit.js +2 -1
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/home-link/index.js +0 -1
- package/build-module/home-link/index.js.map +1 -1
- package/build-module/html/edit.js +4 -3
- package/build-module/html/edit.js.map +1 -1
- package/build-module/image/deprecated.js +14 -11
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/edit.js +3 -2
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +8 -7
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +17 -10
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/interactivity.js +119 -6
- package/build-module/image/interactivity.js.map +1 -1
- package/build-module/image/save.js +4 -3
- package/build-module/image/save.js.map +1 -1
- package/build-module/index.js +2 -1
- package/build-module/index.js.map +1 -1
- package/build-module/latest-comments/edit.js +2 -1
- package/build-module/latest-comments/edit.js.map +1 -1
- package/build-module/latest-comments/index.js +0 -1
- package/build-module/latest-comments/index.js.map +1 -1
- package/build-module/latest-posts/deprecated.js +0 -1
- package/build-module/latest-posts/deprecated.js.map +1 -1
- package/build-module/latest-posts/edit.js +15 -7
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/latest-posts/edit.native.js +4 -4
- package/build-module/latest-posts/edit.native.js.map +1 -1
- package/build-module/latest-posts/index.js +0 -1
- package/build-module/latest-posts/index.js.map +1 -1
- package/build-module/list/deprecated.js +12 -10
- package/build-module/list/deprecated.js.map +1 -1
- package/build-module/list/edit.js +4 -4
- package/build-module/list/edit.js.map +1 -1
- package/build-module/list/ordered-list-settings.js +26 -2
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/list/save.js +6 -5
- package/build-module/list/save.js.map +1 -1
- package/build-module/list/tag-name.js +4 -4
- package/build-module/list/tag-name.js.map +1 -1
- package/build-module/list/tag-name.native.js +4 -4
- package/build-module/list/tag-name.native.js.map +1 -1
- package/build-module/list-item/edit.js +2 -1
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/edit.native.js +2 -1
- package/build-module/list-item/edit.native.js.map +1 -1
- package/build-module/list-item/save.js +2 -1
- package/build-module/list-item/save.js.map +1 -1
- package/build-module/{private-apis.js → lock-unlock.js} +1 -1
- package/build-module/lock-unlock.js.map +1 -0
- package/build-module/loginout/edit.js +4 -3
- package/build-module/loginout/edit.js.map +1 -1
- package/build-module/loginout/index.js +0 -1
- package/build-module/loginout/index.js.map +1 -1
- package/build-module/media-text/deprecated.js +43 -33
- package/build-module/media-text/deprecated.js.map +1 -1
- package/build-module/media-text/edit.js +6 -3
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/media-container.js +8 -6
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/media-container.native.js +8 -7
- package/build-module/media-text/media-container.native.js.map +1 -1
- package/build-module/media-text/save.js +17 -13
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/missing/edit.js +4 -3
- package/build-module/missing/edit.js.map +1 -1
- package/build-module/more/edit.js +2 -1
- package/build-module/more/edit.js.map +1 -1
- package/build-module/navigation/constants.js +6 -0
- package/build-module/navigation/constants.js.map +1 -1
- package/build-module/navigation/deprecated.js +1 -1
- package/build-module/navigation/deprecated.js.map +1 -1
- package/build-module/navigation/edit/index.js +34 -21
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +2 -1
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/leaf-more-menu.js +5 -6
- package/build-module/navigation/edit/leaf-more-menu.js.map +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js +12 -16
- package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +15 -7
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +2 -1
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js +4 -6
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/navigation/index.js +2 -3
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +8 -7
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation/view-modal.js +58 -0
- package/build-module/navigation/view-modal.js.map +1 -0
- package/build-module/navigation/view.js +59 -0
- package/build-module/navigation/view.js.map +1 -0
- package/build-module/navigation-link/edit.js +4 -2
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +4 -2
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/nextpage/edit.js +2 -1
- package/build-module/nextpage/edit.js.map +1 -1
- package/build-module/page-list/edit.js +12 -6
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list/index.js +0 -1
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/page-list-item/edit.js +2 -1
- package/build-module/page-list-item/edit.js.map +1 -1
- package/build-module/paragraph/deprecated.js +5 -4
- package/build-module/paragraph/deprecated.js.map +1 -1
- package/build-module/paragraph/edit.js +4 -5
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/save.js +5 -4
- package/build-module/paragraph/save.js.map +1 -1
- package/build-module/pattern/edit.js +8 -33
- package/build-module/pattern/edit.js.map +1 -1
- package/build-module/pattern/index.js +4 -11
- package/build-module/pattern/index.js.map +1 -1
- package/build-module/post-author/edit.js +4 -2
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-author/index.js +0 -1
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/edit.js +2 -3
- package/build-module/post-author-biography/edit.js.map +1 -1
- package/build-module/post-author-biography/index.js +0 -1
- package/build-module/post-author-biography/index.js.map +1 -1
- package/build-module/post-author-name/edit.js +2 -1
- package/build-module/post-author-name/edit.js.map +1 -1
- package/build-module/post-author-name/index.js +0 -1
- package/build-module/post-author-name/index.js.map +1 -1
- package/build-module/post-comment/edit.js +4 -2
- package/build-module/post-comment/edit.js.map +1 -1
- package/build-module/post-comment/save.js +2 -1
- package/build-module/post-comment/save.js.map +1 -1
- package/build-module/post-comments-count/edit.js +2 -3
- package/build-module/post-comments-count/edit.js.map +1 -1
- package/build-module/post-comments-count/index.js +0 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-form/edit.js +2 -1
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-comments-form/index.js +0 -1
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-comments-link/edit.js +2 -1
- package/build-module/post-comments-link/edit.js.map +1 -1
- package/build-module/post-comments-link/index.js +0 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/edit.js +11 -7
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-content/index.js +1 -2
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-date/edit.js +2 -1
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-date/index.js +0 -1
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +6 -3
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +0 -1
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-featured-image/edit.js +4 -2
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +0 -1
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-featured-image/overlay.js +4 -4
- package/build-module/post-featured-image/overlay.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +2 -1
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-navigation-link/index.js +0 -1
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-template/edit.js +14 -8
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-template/index.js +1 -2
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/post-terms/edit.js +4 -8
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/hooks.js +9 -5
- package/build-module/post-terms/hooks.js.map +1 -1
- package/build-module/post-terms/index.js +0 -1
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-time-to-read/edit.js +2 -1
- package/build-module/post-time-to-read/edit.js.map +1 -1
- package/build-module/post-time-to-read/init.js +6 -0
- package/build-module/post-time-to-read/init.js.map +1 -0
- package/build-module/post-title/edit.js +15 -13
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/post-title/index.js +0 -1
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/preformatted/edit.js +4 -5
- package/build-module/preformatted/edit.js.map +1 -1
- package/build-module/preformatted/edit.native.js +2 -1
- package/build-module/preformatted/edit.native.js.map +1 -1
- package/build-module/preformatted/save.js +2 -1
- package/build-module/preformatted/save.js.map +1 -1
- package/build-module/pullquote/deprecated.js +10 -8
- package/build-module/pullquote/deprecated.js.map +1 -1
- package/build-module/pullquote/edit.js +2 -1
- package/build-module/pullquote/edit.js.map +1 -1
- package/build-module/pullquote/edit.native.js +2 -1
- package/build-module/pullquote/edit.native.js.map +1 -1
- package/build-module/pullquote/save.js +5 -4
- package/build-module/pullquote/save.js.map +1 -1
- package/build-module/query/deprecated.js +15 -9
- package/build-module/query/deprecated.js.map +1 -1
- package/build-module/query/edit/index.js +2 -3
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +3 -2
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/query-content.js +19 -6
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +4 -2
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/index.js +1 -2
- package/build-module/query/index.js.map +1 -1
- package/build-module/query/save.js +2 -1
- package/build-module/query/save.js.map +1 -1
- package/build-module/query/utils.js +1 -2
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query-no-results/edit.js +2 -1
- package/build-module/query-no-results/edit.js.map +1 -1
- package/build-module/query-no-results/index.js +0 -1
- package/build-module/query-no-results/index.js.map +1 -1
- package/build-module/query-pagination/deprecated.js +2 -1
- package/build-module/query-pagination/deprecated.js.map +1 -1
- package/build-module/query-pagination/edit.js +2 -1
- package/build-module/query-pagination/edit.js.map +1 -1
- package/build-module/query-pagination/index.js +1 -2
- package/build-module/query-pagination/index.js.map +1 -1
- package/build-module/query-pagination-next/edit.js +4 -4
- package/build-module/query-pagination-next/edit.js.map +1 -1
- package/build-module/query-pagination-next/index.js +0 -1
- package/build-module/query-pagination-next/index.js.map +1 -1
- package/build-module/query-pagination-numbers/edit.js +2 -1
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +0 -1
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/query-pagination-previous/edit.js +4 -4
- package/build-module/query-pagination-previous/edit.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +0 -1
- package/build-module/query-pagination-previous/index.js.map +1 -1
- package/build-module/query-title/edit.js +8 -10
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/query-title/index.js +0 -1
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/deprecated.js +4 -3
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/edit.js +7 -6
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/quote/save.js +4 -3
- package/build-module/quote/save.js.map +1 -1
- package/build-module/read-more/edit.js +4 -4
- package/build-module/read-more/edit.js.map +1 -1
- package/build-module/read-more/index.js +0 -1
- package/build-module/read-more/index.js.map +1 -1
- package/build-module/rss/edit.js +4 -2
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/rss/index.js +0 -1
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +4 -3
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +6 -7
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/search/index.js +0 -1
- package/build-module/search/index.js.map +1 -1
- package/build-module/separator/deprecated.js +5 -4
- package/build-module/separator/deprecated.js.map +1 -1
- package/build-module/separator/edit.js +5 -4
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/separator/save.js +5 -4
- package/build-module/separator/save.js.map +1 -1
- package/build-module/shortcode/edit.js +4 -3
- package/build-module/shortcode/edit.js.map +1 -1
- package/build-module/site-logo/edit.js +10 -9
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-logo/index.js +0 -1
- package/build-module/site-logo/index.js.map +1 -1
- package/build-module/site-tagline/edit.js +5 -4
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-tagline/icon.js +0 -3
- package/build-module/site-tagline/icon.js.map +1 -1
- package/build-module/site-tagline/index.js +0 -1
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/edit/index.js +9 -10
- package/build-module/site-title/edit/index.js.map +1 -1
- package/build-module/site-title/index.js +0 -1
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +2 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/index.js +0 -1
- package/build-module/social-link/index.js.map +1 -1
- package/build-module/social-links/deprecated.js +5 -4
- package/build-module/social-links/deprecated.js.map +1 -1
- package/build-module/social-links/edit.js +6 -5
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/index.js +1 -1
- package/build-module/social-links/save.js +2 -1
- package/build-module/social-links/save.js.map +1 -1
- package/build-module/spacer/deprecated.js +8 -7
- package/build-module/spacer/deprecated.js.map +1 -1
- package/build-module/spacer/edit.js +10 -9
- package/build-module/spacer/edit.js.map +1 -1
- package/build-module/spacer/edit.native.js +4 -4
- package/build-module/spacer/edit.native.js.map +1 -1
- package/build-module/spacer/save.js +21 -11
- package/build-module/spacer/save.js.map +1 -1
- package/build-module/spacer/save.native.js +8 -7
- package/build-module/spacer/save.native.js.map +1 -1
- package/build-module/table/deprecated.js +4 -2
- package/build-module/table/deprecated.js.map +1 -1
- package/build-module/table/edit.js +6 -4
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/save.js +2 -1
- package/build-module/table/save.js.map +1 -1
- package/build-module/table-of-contents/edit.js +4 -2
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/table-of-contents/save.js +2 -1
- package/build-module/table-of-contents/save.js.map +1 -1
- package/build-module/tag-cloud/edit.js +2 -1
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/tag-cloud/index.js +0 -1
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/template-part/edit/index.js +8 -4
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +3 -2
- package/build-module/template-part/edit/inner-blocks.js.map +1 -1
- package/build-module/template-part/index.js +0 -1
- package/build-module/template-part/index.js.map +1 -1
- package/build-module/term-description/edit.js +2 -1
- package/build-module/term-description/edit.js.map +1 -1
- package/build-module/term-description/index.js +0 -1
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/text-columns/edit.js +4 -3
- package/build-module/text-columns/edit.js.map +1 -1
- package/build-module/text-columns/save.js +4 -3
- package/build-module/text-columns/save.js.map +1 -1
- package/build-module/utils/interactivity/directives.js +4 -4
- package/build-module/utils/interactivity/directives.js.map +1 -1
- package/build-module/utils/interactivity/index.js +1 -3
- package/build-module/utils/interactivity/index.js.map +1 -1
- package/build-module/utils/migrate-font-family.js +1 -1
- package/build-module/utils/migrate-font-family.js.map +1 -1
- package/build-module/verse/deprecated.js +4 -3
- package/build-module/verse/deprecated.js.map +1 -1
- package/build-module/verse/edit.js +4 -5
- package/build-module/verse/edit.js.map +1 -1
- package/build-module/verse/save.js +4 -3
- package/build-module/verse/save.js.map +1 -1
- package/build-module/video/deprecated.js +2 -1
- package/build-module/video/deprecated.js.map +1 -1
- package/build-module/video/edit.js +4 -2
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/edit.native.js +8 -7
- package/build-module/video/edit.native.js.map +1 -1
- package/build-module/video/save.js +2 -1
- package/build-module/video/save.js.map +1 -1
- package/build-module/video/tracks.js +4 -4
- package/build-module/video/tracks.js.map +1 -1
- package/build-style/avatar/style-rtl.css +1 -0
- package/build-style/avatar/style.css +1 -0
- package/build-style/editor-rtl.css +0 -17
- package/build-style/editor.css +0 -17
- package/build-style/footnotes/style-rtl.css +106 -0
- package/build-style/footnotes/style.css +106 -0
- package/build-style/image/style-rtl.css +71 -11
- package/build-style/image/style.css +71 -11
- package/build-style/navigation/editor-rtl.css +0 -17
- package/build-style/navigation/editor.css +0 -17
- package/build-style/style-rtl.css +91 -12
- package/build-style/style.css +91 -12
- package/package.json +33 -32
- package/src/archives/block.json +0 -1
- package/src/avatar/block.json +0 -1
- package/src/avatar/style.scss +1 -0
- package/src/block/block.json +1 -1
- package/src/block/edit.js +1 -0
- package/src/block/test/__snapshots__/transforms.native.js.snap +2 -2
- package/src/block/test/edit.native.js +5 -7
- package/src/block/test/transforms.native.js +1 -1
- package/src/buttons/block.json +1 -1
- package/src/buttons/edit.native.js +7 -6
- package/src/buttons/test/__snapshots__/edit.native.js.snap +6 -0
- package/src/buttons/test/edit.native.js +30 -2
- package/src/calendar/block.json +0 -1
- package/src/categories/block.json +0 -1
- package/src/column/block.json +1 -1
- package/src/columns/block.json +1 -1
- package/src/columns/test/edit.native.js +36 -32
- package/src/comment-author-avatar/block.json +0 -1
- package/src/comment-author-name/block.json +0 -1
- package/src/comment-content/block.json +0 -1
- package/src/comment-date/block.json +0 -1
- package/src/comment-edit-link/block.json +0 -1
- package/src/comment-reply-link/block.json +0 -1
- package/src/comment-template/block.json +0 -1
- package/src/comments/block.json +0 -1
- package/src/comments-pagination/block.json +1 -2
- package/src/comments-pagination-next/block.json +0 -1
- package/src/comments-pagination-numbers/block.json +0 -1
- package/src/comments-pagination-previous/block.json +0 -1
- package/src/comments-title/edit.js +2 -6
- package/src/cover/block.json +1 -1
- package/src/cover/edit/resizable-cover-popover.js +1 -1
- package/src/cover/test/edit.native.js +45 -31
- package/src/cover/transforms.js +1 -1
- package/src/details/block.json +1 -1
- package/src/details/edit.js +12 -9
- package/src/details/init.js +6 -0
- package/src/embed/test/index.native.js +38 -44
- package/src/file/block.json +1 -1
- package/src/file/index.php +18 -1
- package/src/file/view.js +9 -0
- package/src/footnotes/block.json +18 -0
- package/src/footnotes/edit.js +52 -0
- package/src/footnotes/format.js +112 -0
- package/src/footnotes/index.js +29 -0
- package/src/footnotes/index.php +78 -0
- package/src/footnotes/style.scss +18 -0
- package/src/gallery/block.json +1 -1
- package/src/gallery/edit.js +4 -1
- package/src/gallery/gallery.native.js +1 -1
- package/src/gallery/test/__snapshots__/index.native.js.snap +6 -0
- package/src/gallery/test/index.native.js +23 -1
- package/src/group/block.json +1 -1
- package/src/group/deprecated.js +1 -1
- package/src/group/test/edit.native.js +2 -4
- package/src/heading/edit.js +2 -2
- package/src/home-link/block.json +0 -1
- package/src/image/edit.js +1 -1
- package/src/image/image.js +23 -11
- package/src/image/interactivity.js +155 -13
- package/src/image/style.scss +79 -9
- package/src/image/test/edit.native.js +3 -13
- package/src/index.js +2 -0
- package/src/latest-comments/block.json +0 -1
- package/src/latest-posts/block.json +0 -1
- package/src/latest-posts/edit.js +17 -9
- package/src/latest-posts/index.php +8 -0
- package/src/list/ordered-list-settings.js +20 -2
- package/src/list/test/edit.native.js +5 -0
- package/src/loginout/block.json +0 -1
- package/src/media-text/edit.js +1 -1
- package/src/navigation/block.json +2 -3
- package/src/navigation/constants.js +11 -0
- package/src/navigation/deprecated.js +1 -1
- package/src/navigation/edit/index.js +15 -6
- package/src/navigation/edit/leaf-more-menu.js +1 -2
- package/src/navigation/edit/menu-inspector-controls.js +24 -26
- package/src/navigation/edit/navigation-menu-selector.js +17 -7
- package/src/navigation/edit/unsaved-inner-blocks.js +6 -6
- package/src/navigation/editor.scss +0 -24
- package/src/navigation/index.php +85 -70
- package/src/navigation/test/use-navigation-menu.js +15 -3
- package/src/navigation/use-navigation-menu.js +11 -8
- package/src/navigation/view-modal.js +78 -0
- package/src/navigation/view.js +74 -0
- package/src/page-list/block.json +0 -1
- package/src/paragraph/test/__snapshots__/edit.native.js.snap +39 -0
- package/src/paragraph/test/edit.native.js +3 -3
- package/src/pattern/block.json +1 -5
- package/src/pattern/edit.js +14 -40
- package/src/pattern/index.js +4 -5
- package/src/pattern/index.php +1 -13
- package/src/post-author/block.json +0 -1
- package/src/post-author/edit.js +3 -3
- package/src/post-author-biography/block.json +0 -1
- package/src/post-author-name/block.json +0 -1
- package/src/post-comments-count/block.json +0 -1
- package/src/post-comments-form/block.json +0 -1
- package/src/post-comments-link/block.json +0 -1
- package/src/post-content/block.json +1 -2
- package/src/post-date/block.json +0 -1
- package/src/post-excerpt/block.json +0 -1
- package/src/post-featured-image/block.json +0 -1
- package/src/post-navigation-link/block.json +0 -1
- package/src/post-template/block.json +1 -2
- package/src/post-template/edit.js +4 -1
- package/src/post-template/index.php +5 -0
- package/src/post-terms/block.json +0 -1
- package/src/post-terms/edit.js +8 -7
- package/src/post-terms/hooks.js +3 -3
- package/src/post-time-to-read/init.js +6 -0
- package/src/post-title/block.json +0 -1
- package/src/post-title/edit.js +4 -4
- package/src/post-title/index.php +1 -1
- package/src/preformatted/test/edit.native.js +1 -13
- package/src/query/block.json +1 -2
- package/src/query/deprecated.js +7 -5
- package/src/query/edit/inspector-controls/index.js +1 -1
- package/src/query/edit/query-content.js +13 -4
- package/src/query-no-results/block.json +0 -1
- package/src/query-pagination/block.json +1 -2
- package/src/query-pagination-next/block.json +0 -1
- package/src/query-pagination-numbers/block.json +0 -1
- package/src/query-pagination-previous/block.json +0 -1
- package/src/query-title/block.json +0 -1
- package/src/query-title/edit.js +2 -6
- package/src/read-more/block.json +0 -1
- package/src/rss/block.json +0 -1
- package/src/search/block.json +0 -1
- package/src/search/edit.js +3 -3
- package/src/site-logo/block.json +0 -1
- package/src/site-tagline/block.json +0 -1
- package/src/site-tagline/icon.js +0 -1
- package/src/site-title/block.json +0 -1
- package/src/site-title/edit/index.js +5 -6
- package/src/social-link/block.json +0 -1
- package/src/social-links/block.json +1 -1
- package/src/spacer/save.js +7 -2
- package/src/spacer/test/index.native.js +33 -29
- package/src/style.scss +1 -0
- package/src/tag-cloud/block.json +0 -1
- package/src/template-part/block.json +0 -1
- package/src/template-part/edit/inner-blocks.js +1 -1
- package/src/template-part/index.php +18 -11
- package/src/term-description/block.json +0 -1
- package/src/utils/interactivity/index.js +0 -2
- package/src/utils/migrate-font-family.js +1 -1
- package/build/heading/heading-level-dropdown.js +0 -81
- package/build/heading/heading-level-dropdown.js.map +0 -1
- package/build/heading/heading-level-dropdown.native.js +0 -72
- package/build/heading/heading-level-dropdown.native.js.map +0 -1
- package/build/pattern/v1/edit.js +0 -56
- package/build/pattern/v1/edit.js.map +0 -1
- package/build/private-apis.js.map +0 -1
- package/build/site-title/edit/level-icon.js +0 -40
- package/build/site-title/edit/level-icon.js.map +0 -1
- package/build/site-title/edit/level-toolbar.js +0 -51
- package/build/site-title/edit/level-toolbar.js.map +0 -1
- package/build-module/heading/heading-level-dropdown.js +0 -69
- package/build-module/heading/heading-level-dropdown.js.map +0 -1
- package/build-module/heading/heading-level-dropdown.native.js +0 -60
- package/build-module/heading/heading-level-dropdown.native.js.map +0 -1
- package/build-module/pattern/v1/edit.js +0 -47
- package/build-module/pattern/v1/edit.js.map +0 -1
- package/build-module/private-apis.js.map +0 -1
- package/build-module/site-title/edit/level-icon.js +0 -31
- package/build-module/site-title/edit/level-icon.js.map +0 -1
- package/build-module/site-title/edit/level-toolbar.js +0 -39
- package/build-module/site-title/edit/level-toolbar.js.map +0 -1
- package/src/heading/heading-level-dropdown.js +0 -69
- package/src/heading/heading-level-dropdown.native.js +0 -63
- package/src/pattern/v1/edit.js +0 -57
- package/src/site-title/edit/level-icon.js +0 -28
- package/src/site-title/edit/level-toolbar.js +0 -34
- /package/src/{private-apis.js → lock-unlock.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comment-edit-link/index.js"],"names":["commentEditLink","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,IAAIC,IAA5B,QAAwC,kBAAxC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comment-edit-link/index.js"],"names":["commentEditLink","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,IAAIC,IAA5B,QAAwC,kBAAxC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBE,EAAAA;AAFuB,CAAjB;AAKP,OAAO,MAAMI,IAAI,GAAG,MAAML,SAAS,CAAE;AAAEE,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentEditLink as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
|
|
@@ -40,7 +40,8 @@ function Edit({
|
|
|
40
40
|
textAlign: newAlign
|
|
41
41
|
})
|
|
42
42
|
}));
|
|
43
|
-
return createElement(Fragment, null, blockControls, createElement("div", blockProps
|
|
43
|
+
return createElement(Fragment, null, blockControls, createElement("div", { ...blockProps
|
|
44
|
+
}, createElement("a", {
|
|
44
45
|
href: "#comment-reply-pseudo-link",
|
|
45
46
|
onClick: event => event.preventDefault()
|
|
46
47
|
}, __('Reply'))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comment-reply-link/edit.js"],"names":["classnames","__","AlignmentControl","BlockControls","useBlockProps","Edit","setAttributes","attributes","textAlign","blockProps","className","blockControls","newAlign","event","preventDefault"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,aAHD,QAIO,yBAJP;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,IAAT,CAAe;AAAEC,EAAAA,aAAF;AAAiBC,EAAAA,UAAU,EAAE;AAAEC,IAAAA;AAAF;AAA7B,CAAf,EAA8D;AAC7D,QAAMC,UAAU,GAAGL,aAAa,CAAE;AACjCM,IAAAA,SAAS,EAAEV,UAAU,CAAE;AACtB,OAAG,kBAAkBQ,SAAW,EAAhC,GAAqCA;AADf,KAAF;AADY,GAAF,CAAhC;AAMA,QAAMG,aAAa,GAClB,cAAC,aAAD;AAAe,IAAA,KAAK,EAAC;AAArB,KACC,cAAC,gBAAD;AACC,IAAA,KAAK,EAAGH,SADT;AAEC,IAAA,QAAQ,EAAKI,QAAF,IACVN,aAAa,CAAE;AAAEE,MAAAA,SAAS,EAAEI;AAAb,KAAF;AAHf,IADD,CADD;AAWA,SACC,8BACGD,aADH,EAEC,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comment-reply-link/edit.js"],"names":["classnames","__","AlignmentControl","BlockControls","useBlockProps","Edit","setAttributes","attributes","textAlign","blockProps","className","blockControls","newAlign","event","preventDefault"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,aAHD,QAIO,yBAJP;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,IAAT,CAAe;AAAEC,EAAAA,aAAF;AAAiBC,EAAAA,UAAU,EAAE;AAAEC,IAAAA;AAAF;AAA7B,CAAf,EAA8D;AAC7D,QAAMC,UAAU,GAAGL,aAAa,CAAE;AACjCM,IAAAA,SAAS,EAAEV,UAAU,CAAE;AACtB,OAAG,kBAAkBQ,SAAW,EAAhC,GAAqCA;AADf,KAAF;AADY,GAAF,CAAhC;AAMA,QAAMG,aAAa,GAClB,cAAC,aAAD;AAAe,IAAA,KAAK,EAAC;AAArB,KACC,cAAC,gBAAD;AACC,IAAA,KAAK,EAAGH,SADT;AAEC,IAAA,QAAQ,EAAKI,QAAF,IACVN,aAAa,CAAE;AAAEE,MAAAA,SAAS,EAAEI;AAAb,KAAF;AAHf,IADD,CADD;AAWA,SACC,8BACGD,aADH,EAEC,0BAAUF;AAAV,KACC;AACC,IAAA,IAAI,EAAC,4BADN;AAEC,IAAA,OAAO,EAAKI,KAAF,IAAaA,KAAK,CAACC,cAAN;AAFxB,KAIGb,EAAE,CAAE,OAAF,CAJL,CADD,CAFD,CADD;AAaA;;AAED,eAAeI,IAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\n\n/**\n * Renders the `core/comment-reply-link` block on the editor.\n *\n * @param {Object} props React props.\n * @param {Object} props.setAttributes Callback for updating block attributes.\n * @param {Object} props.attributes Block attributes.\n * @param {string} props.attributes.textAlign The `textAlign` attribute.\n *\n * @return {JSX.Element} React element.\n */\nfunction Edit( { setAttributes, attributes: { textAlign } } ) {\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst blockControls = (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ textAlign }\n\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\tsetAttributes( { textAlign: newAlign } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<a\n\t\t\t\t\thref=\"#comment-reply-pseudo-link\"\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Reply' ) }\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Edit;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comment-reply-link/index.js"],"names":["commentReplyLink","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,IAAIC,IAA7B,QAAyC,kBAAzC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comment-reply-link/index.js"],"names":["commentReplyLink","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,IAAIC,IAA7B,QAAyC,kBAAzC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBH,EAAAA,IADuB;AAEvBF,EAAAA;AAFuB,CAAjB;AAKP,OAAO,MAAMM,IAAI,GAAG,MAAML,SAAS,CAAE;AAAEE,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentReplyLink as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\tedit,\n\ticon,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import { createElement } from "@wordpress/element";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -106,7 +105,8 @@ function CommentTemplateInnerBlocks({
|
|
|
106
105
|
} = useInnerBlocksProps({}, {
|
|
107
106
|
template: TEMPLATE
|
|
108
107
|
});
|
|
109
|
-
return createElement("li", innerBlocksProps
|
|
108
|
+
return createElement("li", { ...innerBlocksProps
|
|
109
|
+
}, comment.commentId === (activeCommentId || firstCommentId) ? children : null, createElement(MemoizedCommentTemplatePreview, {
|
|
110
110
|
blocks: blocks,
|
|
111
111
|
commentId: comment.commentId,
|
|
112
112
|
setActiveCommentId: setActiveCommentId,
|
|
@@ -141,14 +141,14 @@ const CommentTemplatePreview = ({
|
|
|
141
141
|
const style = {
|
|
142
142
|
display: isHidden ? 'none' : undefined
|
|
143
143
|
};
|
|
144
|
-
return createElement("div",
|
|
144
|
+
return createElement("div", { ...blockPreviewProps,
|
|
145
145
|
tabIndex: 0,
|
|
146
146
|
role: "button",
|
|
147
147
|
style: style // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
|
|
148
148
|
,
|
|
149
149
|
onClick: handleOnClick,
|
|
150
150
|
onKeyPress: handleOnClick
|
|
151
|
-
})
|
|
151
|
+
});
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
const MemoizedCommentTemplatePreview = memo(CommentTemplatePreview);
|
|
@@ -173,7 +173,8 @@ const CommentsList = ({
|
|
|
173
173
|
setActiveCommentId,
|
|
174
174
|
blocks,
|
|
175
175
|
firstCommentId
|
|
176
|
-
}) => createElement("ol", blockProps
|
|
176
|
+
}) => createElement("ol", { ...blockProps
|
|
177
|
+
}, comments && comments.map(({
|
|
177
178
|
commentId,
|
|
178
179
|
...comment
|
|
179
180
|
}, index) => createElement(BlockContextProvider, {
|
|
@@ -241,7 +242,8 @@ export default function CommentTemplateEdit({
|
|
|
241
242
|
commentOrder === 'desc' && topLevelComments ? [...topLevelComments].reverse() : topLevelComments);
|
|
242
243
|
|
|
243
244
|
if (!topLevelComments) {
|
|
244
|
-
return createElement("p", blockProps
|
|
245
|
+
return createElement("p", { ...blockProps
|
|
246
|
+
}, createElement(Spinner, null));
|
|
245
247
|
}
|
|
246
248
|
|
|
247
249
|
if (!postId) {
|
|
@@ -254,7 +256,8 @@ export default function CommentTemplateEdit({
|
|
|
254
256
|
}
|
|
255
257
|
|
|
256
258
|
if (!commentTree.length) {
|
|
257
|
-
return createElement("p", blockProps
|
|
259
|
+
return createElement("p", { ...blockProps
|
|
260
|
+
}, __('No results found.'));
|
|
258
261
|
}
|
|
259
262
|
|
|
260
263
|
return createElement(CommentsList, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comment-template/edit.js"],"names":["useState","memo","useSelect","__","BlockContextProvider","useBlockProps","useInnerBlocksProps","store","blockEditorStore","__experimentalUseBlockPreview","useBlockPreview","Spinner","coreStore","useCommentQueryArgs","useCommentTree","TEMPLATE","getCommentsPlaceholder","perPage","pageComments","threadComments","threadCommentsDepth","commentsDepth","Math","min","buildChildrenComment","commentsLevel","nextLevel","commentId","children","placeholderComments","push","CommentTemplateInnerBlocks","comment","activeCommentId","setActiveCommentId","firstCommentId","blocks","innerBlocksProps","template","length","CommentTemplatePreview","isHidden","blockPreviewProps","handleOnClick","style","display","undefined","MemoizedCommentTemplatePreview","CommentsList","comments","blockProps","map","index","CommentTemplateEdit","clientId","context","postId","commentOrder","commentsPerPage","select","getSettings","__experimentalDiscussionSettings","commentQuery","topLevelComments","getEntityRecords","getBlocks","commentTree","reverse"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,IAAnB,QAA+B,oBAA/B;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,oBADD,EAECC,aAFD,EAGCC,mBAHD,EAICC,KAAK,IAAIC,gBAJV,EAKCC,6BAA6B,IAAIC,eALlC,QAMO,yBANP;AAOA,SAASC,OAAT,QAAwB,uBAAxB;AACA,SAASJ,KAAK,IAAIK,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASC,mBAAT,EAA8BC,cAA9B,QAAoD,SAApD;AAEA,MAAMC,QAAQ,GAAG,CAChB,CAAE,aAAF,CADgB,EAEhB,CAAE,0BAAF,CAFgB,EAGhB,CAAE,mBAAF,CAHgB,EAIhB,CAAE,sBAAF,CAJgB,EAKhB,CAAE,yBAAF,CALgB,EAMhB,CAAE,wBAAF,CANgB,CAAjB;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,sBAAsB,GAAG,CAAE;AAChCC,EAAAA,OADgC;AAEhCC,EAAAA,YAFgC;AAGhCC,EAAAA,cAHgC;AAIhCC,EAAAA;AAJgC,CAAF,KAKxB;AACN;AACA,QAAMC,aAAa,GAAG,CAAEF,cAAF,GACnB,CADmB,GAEnBG,IAAI,CAACC,GAAL,CAAUH,mBAAV,EAA+B,CAA/B,CAFH;;AAIA,QAAMI,oBAAoB,GAAKC,aAAF,IAAqB;AACjD;AACA,QAAKA,aAAa,GAAGJ,aAArB,EAAqC;AACpC,YAAMK,SAAS,GAAGD,aAAa,GAAG,CAAlC;AAEA,aAAO,CACN;AACCE,QAAAA,SAAS,EAAE,EAAGF,aAAa,GAAG,CAAnB,CADZ;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AACC,IAAA,QAAQ,EAAG+D,WADZ;AAEC,IAAA,UAAU,EAAGhB,UAFd;AAGC,IAAA,MAAM,EAAGd,MAHV;AAIC,IAAA,eAAe,EAAGH,eAJnB;AAKC,IAAA,kBAAkB,EAAGC,kBALtB;AAMC,IAAA,cAAc,EAAGgC,WAAW,CAAE,CAAF,CAAX,EAAkBvC;AANpC,IADD;AAUA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, memo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBlockContextProvider,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n\t__experimentalUseBlockPreview as useBlockPreview,\n} from '@wordpress/block-editor';\nimport { Spinner } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { useCommentQueryArgs, useCommentTree } from './hooks';\n\nconst TEMPLATE = [\n\t[ 'core/avatar' ],\n\t[ 'core/comment-author-name' ],\n\t[ 'core/comment-date' ],\n\t[ 'core/comment-content' ],\n\t[ 'core/comment-reply-link' ],\n\t[ 'core/comment-edit-link' ],\n];\n\n/**\n * Function that returns a comment structure that will be rendered with default placehoders.\n *\n * Each comment has a `commentId` property that is always a negative number in\n * case of the placeholders. This is to ensure that the comment does not\n * conflict with the actual (real) comments.\n *\n * @param {Object} settings Discussion Settings.\n * @param {number} [settings.perPage] - Comments per page setting or block attribute.\n * @param {boolean} [settings.pageComments] - Enable break comments into pages setting.\n * @param {boolean} [settings.threadComments] - Enable threaded (nested) comments setting.\n * @param {number} [settings.threadCommentsDepth] - Level deep of threaded comments.\n *\n * @typedef {{id: null, children: EmptyComment[]}} EmptyComment\n * @return {EmptyComment[]} \t\tInner blocks of the Comment Template\n */\nconst getCommentsPlaceholder = ( {\n\tperPage,\n\tpageComments,\n\tthreadComments,\n\tthreadCommentsDepth,\n} ) => {\n\t// Limit commentsDepth to 3\n\tconst commentsDepth = ! threadComments\n\t\t? 1\n\t\t: Math.min( threadCommentsDepth, 3 );\n\n\tconst buildChildrenComment = ( commentsLevel ) => {\n\t\t// Render children comments until commentsDepth is reached\n\t\tif ( commentsLevel < commentsDepth ) {\n\t\t\tconst nextLevel = commentsLevel + 1;\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tcommentId: -( commentsLevel + 3 ),\n\t\t\t\t\tchildren: buildChildrenComment( nextLevel ),\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn [];\n\t};\n\n\t// Add the first comment and its children\n\tconst placeholderComments = [\n\t\t{ commentId: -1, children: buildChildrenComment( 1 ) },\n\t];\n\n\t// Add a second comment unless the break comments setting is active and set to less than 2, and there is one nested comment max\n\tif ( ( ! pageComments || perPage >= 2 ) && commentsDepth < 3 ) {\n\t\tplaceholderComments.push( {\n\t\t\tcommentId: -2,\n\t\t\tchildren: [],\n\t\t} );\n\t}\n\n\t// Add a third comment unless the break comments setting is active and set to less than 3, and there aren't nested comments\n\tif ( ( ! pageComments || perPage >= 3 ) && commentsDepth < 2 ) {\n\t\tplaceholderComments.push( {\n\t\t\tcommentId: -3,\n\t\t\tchildren: [],\n\t\t} );\n\t}\n\n\t// In case that the value is set but larger than 3 we truncate it to 3.\n\treturn placeholderComments;\n};\n\n/**\n * Component which renders the inner blocks of the Comment Template.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.comment] - A comment object.\n * @param {Array} [props.activeCommentId] - The ID of the comment that is currently active.\n * @param {Array} [props.setActiveCommentId] - The setter for activeCommentId.\n * @param {Array} [props.firstCommentId] - ID of the first comment in the array.\n * @param {Array} [props.blocks] - Array of blocks returned from\n * getBlocks() in parent .\n * @return {WPElement} \t\tInner blocks of the Comment Template\n */\nfunction CommentTemplateInnerBlocks( {\n\tcomment,\n\tactiveCommentId,\n\tsetActiveCommentId,\n\tfirstCommentId,\n\tblocks,\n} ) {\n\tconst { children, ...innerBlocksProps } = useInnerBlocksProps(\n\t\t{},\n\t\t{ template: TEMPLATE }\n\t);\n\n\treturn (\n\t\t<li { ...innerBlocksProps }>\n\t\t\t{ comment.commentId === ( activeCommentId || firstCommentId )\n\t\t\t\t? children\n\t\t\t\t: null }\n\n\t\t\t{ /* To avoid flicker when switching active block contexts, a preview\n\t\t\t is ALWAYS rendered and the preview for the active block is hidden.\n\t\t\t This ensures that when switching the active block, the component is not\n\t\t\t mounted again but rather it only toggles the `isHidden` prop.\n\t\t\t The same strategy is used for preventing the flicker in the Post Template\n\t\t\t block. */ }\n\t\t\t<MemoizedCommentTemplatePreview\n\t\t\t\tblocks={ blocks }\n\t\t\t\tcommentId={ comment.commentId }\n\t\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\t\tisHidden={\n\t\t\t\t\tcomment.commentId === ( activeCommentId || firstCommentId )\n\t\t\t\t}\n\t\t\t/>\n\n\t\t\t{ comment?.children?.length > 0 ? (\n\t\t\t\t<CommentsList\n\t\t\t\t\tcomments={ comment.children }\n\t\t\t\t\tactiveCommentId={ activeCommentId }\n\t\t\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tfirstCommentId={ firstCommentId }\n\t\t\t\t/>\n\t\t\t) : null }\n\t\t</li>\n\t);\n}\n\nconst CommentTemplatePreview = ( {\n\tblocks,\n\tcommentId,\n\tsetActiveCommentId,\n\tisHidden,\n} ) => {\n\tconst blockPreviewProps = useBlockPreview( {\n\t\tblocks,\n\t} );\n\n\tconst handleOnClick = () => {\n\t\tsetActiveCommentId( commentId );\n\t};\n\n\t// We have to hide the preview block if the `comment` props points to\n\t// the curently active block!\n\n\t// Or, to put it differently, every preview block is visible unless it is the\n\t// currently active block - in this case we render its inner blocks.\n\tconst style = {\n\t\tdisplay: isHidden ? 'none' : undefined,\n\t};\n\n\treturn (\n\t\t<div\n\t\t\t{ ...blockPreviewProps }\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"button\"\n\t\t\tstyle={ style }\n\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n\t\t\tonClick={ handleOnClick }\n\t\t\tonKeyPress={ handleOnClick }\n\t\t/>\n\t);\n};\n\nconst MemoizedCommentTemplatePreview = memo( CommentTemplatePreview );\n\n/**\n * Component that renders a list of (nested) comments. It is called recursively.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.comments] - Array of comment objects.\n * @param {Array} [props.blockProps] - Props from parent's `useBlockProps()`.\n * @param {Array} [props.activeCommentId] - The ID of the comment that is currently active.\n * @param {Array} [props.setActiveCommentId] - The setter for activeCommentId.\n * @param {Array} [props.blocks] - Array of blocks returned from getBlocks() in parent.\n * @param {Object} [props.firstCommentId] - The ID of the first comment in the array of\n * comment objects.\n * @return {WPElement} \t\tList of comments.\n */\nconst CommentsList = ( {\n\tcomments,\n\tblockProps,\n\tactiveCommentId,\n\tsetActiveCommentId,\n\tblocks,\n\tfirstCommentId,\n} ) => (\n\t<ol { ...blockProps }>\n\t\t{ comments &&\n\t\t\tcomments.map( ( { commentId, ...comment }, index ) => (\n\t\t\t\t<BlockContextProvider\n\t\t\t\t\tkey={ comment.commentId || index }\n\t\t\t\t\tvalue={ {\n\t\t\t\t\t\t// If the commentId is negative it means that this comment is a\n\t\t\t\t\t\t// \"placeholder\" and that the block is most likely being used in the\n\t\t\t\t\t\t// site editor. In this case, we have to set the commentId to `null`\n\t\t\t\t\t\t// because otherwise the (non-existent) comment with a negative ID\n\t\t\t\t\t\t// would be reqested from the REST API.\n\t\t\t\t\t\tcommentId: commentId < 0 ? null : commentId,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<CommentTemplateInnerBlocks\n\t\t\t\t\t\tcomment={ { commentId, ...comment } }\n\t\t\t\t\t\tactiveCommentId={ activeCommentId }\n\t\t\t\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\tfirstCommentId={ firstCommentId }\n\t\t\t\t\t/>\n\t\t\t\t</BlockContextProvider>\n\t\t\t) ) }\n\t</ol>\n);\n\nexport default function CommentTemplateEdit( {\n\tclientId,\n\tcontext: { postId },\n} ) {\n\tconst blockProps = useBlockProps();\n\n\tconst [ activeCommentId, setActiveCommentId ] = useState();\n\tconst {\n\t\tcommentOrder,\n\t\tthreadCommentsDepth,\n\t\tthreadComments,\n\t\tcommentsPerPage,\n\t\tpageComments,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().__experimentalDiscussionSettings;\n\t} );\n\n\tconst commentQuery = useCommentQueryArgs( {\n\t\tpostId,\n\t} );\n\n\tconst { topLevelComments, blocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\tconst { getBlocks } = select( blockEditorStore );\n\t\t\treturn {\n\t\t\t\t// Request only top-level comments. Replies are embedded.\n\t\t\t\ttopLevelComments: commentQuery\n\t\t\t\t\t? getEntityRecords( 'root', 'comment', commentQuery )\n\t\t\t\t\t: null,\n\t\t\t\tblocks: getBlocks( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, commentQuery ]\n\t);\n\n\t// Generate a tree structure of comment IDs.\n\tlet commentTree = useCommentTree(\n\t\t// Reverse the order of top comments if needed.\n\t\tcommentOrder === 'desc' && topLevelComments\n\t\t\t? [ ...topLevelComments ].reverse()\n\t\t\t: topLevelComments\n\t);\n\n\tif ( ! topLevelComments ) {\n\t\treturn (\n\t\t\t<p { ...blockProps }>\n\t\t\t\t<Spinner />\n\t\t\t</p>\n\t\t);\n\t}\n\n\tif ( ! postId ) {\n\t\tcommentTree = getCommentsPlaceholder( {\n\t\t\tperPage: commentsPerPage,\n\t\t\tpageComments,\n\t\t\tthreadComments,\n\t\t\tthreadCommentsDepth,\n\t\t} );\n\t}\n\n\tif ( ! commentTree.length ) {\n\t\treturn <p { ...blockProps }>{ __( 'No results found.' ) }</p>;\n\t}\n\n\treturn (\n\t\t<CommentsList\n\t\t\tcomments={ commentTree }\n\t\t\tblockProps={ blockProps }\n\t\t\tblocks={ blocks }\n\t\t\tactiveCommentId={ activeCommentId }\n\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\tfirstCommentId={ commentTree[ 0 ]?.commentId }\n\t\t/>\n\t);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comment-template/edit.js"],"names":["useState","memo","useSelect","__","BlockContextProvider","useBlockProps","useInnerBlocksProps","store","blockEditorStore","__experimentalUseBlockPreview","useBlockPreview","Spinner","coreStore","useCommentQueryArgs","useCommentTree","TEMPLATE","getCommentsPlaceholder","perPage","pageComments","threadComments","threadCommentsDepth","commentsDepth","Math","min","buildChildrenComment","commentsLevel","nextLevel","commentId","children","placeholderComments","push","CommentTemplateInnerBlocks","comment","activeCommentId","setActiveCommentId","firstCommentId","blocks","innerBlocksProps","template","length","CommentTemplatePreview","isHidden","blockPreviewProps","handleOnClick","style","display","undefined","MemoizedCommentTemplatePreview","CommentsList","comments","blockProps","map","index","CommentTemplateEdit","clientId","context","postId","commentOrder","commentsPerPage","select","getSettings","__experimentalDiscussionSettings","commentQuery","topLevelComments","getEntityRecords","getBlocks","commentTree","reverse"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,IAAnB,QAA+B,oBAA/B;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,oBADD,EAECC,aAFD,EAGCC,mBAHD,EAICC,KAAK,IAAIC,gBAJV,EAKCC,6BAA6B,IAAIC,eALlC,QAMO,yBANP;AAOA,SAASC,OAAT,QAAwB,uBAAxB;AACA,SAASJ,KAAK,IAAIK,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASC,mBAAT,EAA8BC,cAA9B,QAAoD,SAApD;AAEA,MAAMC,QAAQ,GAAG,CAChB,CAAE,aAAF,CADgB,EAEhB,CAAE,0BAAF,CAFgB,EAGhB,CAAE,mBAAF,CAH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CAZ6C,CAA9C,CAnBG,CAkCH;;AACA,MAAII,WAAW,GAAGpD,cAAc,EAC/B;AACA2C,EAAAA,YAAY,KAAK,MAAjB,IAA2BM,gBAA3B,GACG,CAAE,GAAGA,gBAAL,EAAwBI,OAAxB,EADH,GAEGJ,gBAJ4B,CAAhC;;AAOA,MAAK,CAAEA,gBAAP,EAA0B;AACzB,WACC,wBAAQb;AAAR,OACC,cAAC,OAAD,OADD,CADD;AAKA;;AAED,MAAK,CAAEM,MAAP,EAAgB;AACfU,IAAAA,WAAW,GAAGlD,sBAAsB,CAAE;AACrCC,MAAAA,OAAO,EAAEyC,eAD4B;AAErCxC,MAAAA,YAFqC;AAGrCC,MAAAA,cAHqC;AAIrCC,MAAAA;AAJqC,KAAF,CAApC;AAMA;;AAED,MAAK,CAAE8C,WAAW,CAAC3B,MAAnB,EAA4B;AAC3B,WAAO,wBAAQW;AAAR,OAAuB/C,EAAE,CAAE,mBAAF,CAAzB,CAAP;AACA;;AAED,SACC,cAAC,YAAD;AACC,IAAA,QAAQ,EAAG+D,WADZ;AAEC,IAAA,UAAU,EAAGhB,UAFd;AAGC,IAAA,MAAM,EAAGd,MAHV;AAIC,IAAA,eAAe,EAAGH,eAJnB;AAKC,IAAA,kBAAkB,EAAGC,kBALtB;AAMC,IAAA,cAAc,EAAGgC,WAAW,CAAE,CAAF,CAAX,EAAkBvC;AANpC,IADD;AAUA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, memo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBlockContextProvider,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n\t__experimentalUseBlockPreview as useBlockPreview,\n} from '@wordpress/block-editor';\nimport { Spinner } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { useCommentQueryArgs, useCommentTree } from './hooks';\n\nconst TEMPLATE = [\n\t[ 'core/avatar' ],\n\t[ 'core/comment-author-name' ],\n\t[ 'core/comment-date' ],\n\t[ 'core/comment-content' ],\n\t[ 'core/comment-reply-link' ],\n\t[ 'core/comment-edit-link' ],\n];\n\n/**\n * Function that returns a comment structure that will be rendered with default placehoders.\n *\n * Each comment has a `commentId` property that is always a negative number in\n * case of the placeholders. This is to ensure that the comment does not\n * conflict with the actual (real) comments.\n *\n * @param {Object} settings Discussion Settings.\n * @param {number} [settings.perPage] - Comments per page setting or block attribute.\n * @param {boolean} [settings.pageComments] - Enable break comments into pages setting.\n * @param {boolean} [settings.threadComments] - Enable threaded (nested) comments setting.\n * @param {number} [settings.threadCommentsDepth] - Level deep of threaded comments.\n *\n * @typedef {{id: null, children: EmptyComment[]}} EmptyComment\n * @return {EmptyComment[]} \t\tInner blocks of the Comment Template\n */\nconst getCommentsPlaceholder = ( {\n\tperPage,\n\tpageComments,\n\tthreadComments,\n\tthreadCommentsDepth,\n} ) => {\n\t// Limit commentsDepth to 3\n\tconst commentsDepth = ! threadComments\n\t\t? 1\n\t\t: Math.min( threadCommentsDepth, 3 );\n\n\tconst buildChildrenComment = ( commentsLevel ) => {\n\t\t// Render children comments until commentsDepth is reached\n\t\tif ( commentsLevel < commentsDepth ) {\n\t\t\tconst nextLevel = commentsLevel + 1;\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tcommentId: -( commentsLevel + 3 ),\n\t\t\t\t\tchildren: buildChildrenComment( nextLevel ),\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn [];\n\t};\n\n\t// Add the first comment and its children\n\tconst placeholderComments = [\n\t\t{ commentId: -1, children: buildChildrenComment( 1 ) },\n\t];\n\n\t// Add a second comment unless the break comments setting is active and set to less than 2, and there is one nested comment max\n\tif ( ( ! pageComments || perPage >= 2 ) && commentsDepth < 3 ) {\n\t\tplaceholderComments.push( {\n\t\t\tcommentId: -2,\n\t\t\tchildren: [],\n\t\t} );\n\t}\n\n\t// Add a third comment unless the break comments setting is active and set to less than 3, and there aren't nested comments\n\tif ( ( ! pageComments || perPage >= 3 ) && commentsDepth < 2 ) {\n\t\tplaceholderComments.push( {\n\t\t\tcommentId: -3,\n\t\t\tchildren: [],\n\t\t} );\n\t}\n\n\t// In case that the value is set but larger than 3 we truncate it to 3.\n\treturn placeholderComments;\n};\n\n/**\n * Component which renders the inner blocks of the Comment Template.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.comment] - A comment object.\n * @param {Array} [props.activeCommentId] - The ID of the comment that is currently active.\n * @param {Array} [props.setActiveCommentId] - The setter for activeCommentId.\n * @param {Array} [props.firstCommentId] - ID of the first comment in the array.\n * @param {Array} [props.blocks] - Array of blocks returned from\n * getBlocks() in parent .\n * @return {WPElement} \t\tInner blocks of the Comment Template\n */\nfunction CommentTemplateInnerBlocks( {\n\tcomment,\n\tactiveCommentId,\n\tsetActiveCommentId,\n\tfirstCommentId,\n\tblocks,\n} ) {\n\tconst { children, ...innerBlocksProps } = useInnerBlocksProps(\n\t\t{},\n\t\t{ template: TEMPLATE }\n\t);\n\n\treturn (\n\t\t<li { ...innerBlocksProps }>\n\t\t\t{ comment.commentId === ( activeCommentId || firstCommentId )\n\t\t\t\t? children\n\t\t\t\t: null }\n\n\t\t\t{ /* To avoid flicker when switching active block contexts, a preview\n\t\t\t is ALWAYS rendered and the preview for the active block is hidden.\n\t\t\t This ensures that when switching the active block, the component is not\n\t\t\t mounted again but rather it only toggles the `isHidden` prop.\n\t\t\t The same strategy is used for preventing the flicker in the Post Template\n\t\t\t block. */ }\n\t\t\t<MemoizedCommentTemplatePreview\n\t\t\t\tblocks={ blocks }\n\t\t\t\tcommentId={ comment.commentId }\n\t\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\t\tisHidden={\n\t\t\t\t\tcomment.commentId === ( activeCommentId || firstCommentId )\n\t\t\t\t}\n\t\t\t/>\n\n\t\t\t{ comment?.children?.length > 0 ? (\n\t\t\t\t<CommentsList\n\t\t\t\t\tcomments={ comment.children }\n\t\t\t\t\tactiveCommentId={ activeCommentId }\n\t\t\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tfirstCommentId={ firstCommentId }\n\t\t\t\t/>\n\t\t\t) : null }\n\t\t</li>\n\t);\n}\n\nconst CommentTemplatePreview = ( {\n\tblocks,\n\tcommentId,\n\tsetActiveCommentId,\n\tisHidden,\n} ) => {\n\tconst blockPreviewProps = useBlockPreview( {\n\t\tblocks,\n\t} );\n\n\tconst handleOnClick = () => {\n\t\tsetActiveCommentId( commentId );\n\t};\n\n\t// We have to hide the preview block if the `comment` props points to\n\t// the curently active block!\n\n\t// Or, to put it differently, every preview block is visible unless it is the\n\t// currently active block - in this case we render its inner blocks.\n\tconst style = {\n\t\tdisplay: isHidden ? 'none' : undefined,\n\t};\n\n\treturn (\n\t\t<div\n\t\t\t{ ...blockPreviewProps }\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"button\"\n\t\t\tstyle={ style }\n\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n\t\t\tonClick={ handleOnClick }\n\t\t\tonKeyPress={ handleOnClick }\n\t\t/>\n\t);\n};\n\nconst MemoizedCommentTemplatePreview = memo( CommentTemplatePreview );\n\n/**\n * Component that renders a list of (nested) comments. It is called recursively.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.comments] - Array of comment objects.\n * @param {Array} [props.blockProps] - Props from parent's `useBlockProps()`.\n * @param {Array} [props.activeCommentId] - The ID of the comment that is currently active.\n * @param {Array} [props.setActiveCommentId] - The setter for activeCommentId.\n * @param {Array} [props.blocks] - Array of blocks returned from getBlocks() in parent.\n * @param {Object} [props.firstCommentId] - The ID of the first comment in the array of\n * comment objects.\n * @return {WPElement} \t\tList of comments.\n */\nconst CommentsList = ( {\n\tcomments,\n\tblockProps,\n\tactiveCommentId,\n\tsetActiveCommentId,\n\tblocks,\n\tfirstCommentId,\n} ) => (\n\t<ol { ...blockProps }>\n\t\t{ comments &&\n\t\t\tcomments.map( ( { commentId, ...comment }, index ) => (\n\t\t\t\t<BlockContextProvider\n\t\t\t\t\tkey={ comment.commentId || index }\n\t\t\t\t\tvalue={ {\n\t\t\t\t\t\t// If the commentId is negative it means that this comment is a\n\t\t\t\t\t\t// \"placeholder\" and that the block is most likely being used in the\n\t\t\t\t\t\t// site editor. In this case, we have to set the commentId to `null`\n\t\t\t\t\t\t// because otherwise the (non-existent) comment with a negative ID\n\t\t\t\t\t\t// would be reqested from the REST API.\n\t\t\t\t\t\tcommentId: commentId < 0 ? null : commentId,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<CommentTemplateInnerBlocks\n\t\t\t\t\t\tcomment={ { commentId, ...comment } }\n\t\t\t\t\t\tactiveCommentId={ activeCommentId }\n\t\t\t\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\tfirstCommentId={ firstCommentId }\n\t\t\t\t\t/>\n\t\t\t\t</BlockContextProvider>\n\t\t\t) ) }\n\t</ol>\n);\n\nexport default function CommentTemplateEdit( {\n\tclientId,\n\tcontext: { postId },\n} ) {\n\tconst blockProps = useBlockProps();\n\n\tconst [ activeCommentId, setActiveCommentId ] = useState();\n\tconst {\n\t\tcommentOrder,\n\t\tthreadCommentsDepth,\n\t\tthreadComments,\n\t\tcommentsPerPage,\n\t\tpageComments,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().__experimentalDiscussionSettings;\n\t} );\n\n\tconst commentQuery = useCommentQueryArgs( {\n\t\tpostId,\n\t} );\n\n\tconst { topLevelComments, blocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\tconst { getBlocks } = select( blockEditorStore );\n\t\t\treturn {\n\t\t\t\t// Request only top-level comments. Replies are embedded.\n\t\t\t\ttopLevelComments: commentQuery\n\t\t\t\t\t? getEntityRecords( 'root', 'comment', commentQuery )\n\t\t\t\t\t: null,\n\t\t\t\tblocks: getBlocks( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, commentQuery ]\n\t);\n\n\t// Generate a tree structure of comment IDs.\n\tlet commentTree = useCommentTree(\n\t\t// Reverse the order of top comments if needed.\n\t\tcommentOrder === 'desc' && topLevelComments\n\t\t\t? [ ...topLevelComments ].reverse()\n\t\t\t: topLevelComments\n\t);\n\n\tif ( ! topLevelComments ) {\n\t\treturn (\n\t\t\t<p { ...blockProps }>\n\t\t\t\t<Spinner />\n\t\t\t</p>\n\t\t);\n\t}\n\n\tif ( ! postId ) {\n\t\tcommentTree = getCommentsPlaceholder( {\n\t\t\tperPage: commentsPerPage,\n\t\t\tpageComments,\n\t\t\tthreadComments,\n\t\t\tthreadCommentsDepth,\n\t\t} );\n\t}\n\n\tif ( ! commentTree.length ) {\n\t\treturn <p { ...blockProps }>{ __( 'No results found.' ) }</p>;\n\t}\n\n\treturn (\n\t\t<CommentsList\n\t\t\tcomments={ commentTree }\n\t\t\tblockProps={ blockProps }\n\t\t\tblocks={ blocks }\n\t\t\tactiveCommentId={ activeCommentId }\n\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\tfirstCommentId={ commentTree[ 0 ]?.commentId }\n\t\t/>\n\t);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comment-template/index.js"],"names":["layout","icon","initBlock","edit","save","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,IAAIC,IAAnB,QAA+B,kBAA/B;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comment-template/index.js"],"names":["layout","icon","initBlock","edit","save","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,IAAIC,IAAnB,QAA+B,kBAA/B;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBN,EAAAA,IADuB;AAEvBE,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB;AAMP,OAAO,MAAMI,IAAI,GAAG,MAAMN,SAAS,CAAE;AAAEG,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { layout as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
|
|
@@ -45,7 +45,8 @@ const v1 = {
|
|
|
45
45
|
const newBlockProps = { ...blockProps,
|
|
46
46
|
className: newClasses.join(' ')
|
|
47
47
|
};
|
|
48
|
-
return createElement(Tag, newBlockProps
|
|
48
|
+
return createElement(Tag, { ...newBlockProps
|
|
49
|
+
}, createElement(InnerBlocks.Content, null));
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments/deprecated.js"],"names":["InnerBlocks","useBlockProps","v1","attributes","tagName","type","default","apiVersion","supports","align","html","color","gradients","link","__experimentalDefaultControls","background","text","save","Tag","blockProps","className","classes","split","newClasses","filter","cls","newBlockProps","join"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,WAAT,EAAsBC,aAAtB,QAA2C,yBAA3C,C,CAEA;AACA;;AACA,MAAMC,EAAE,GAAG;AACVC,EAAAA,UAAU,EAAE;AACXC,IAAAA,OAAO,EAAE;AACRC,MAAAA,IAAI,EAAE,QADE;AAERC,MAAAA,OAAO,EAAE;AAFD;AADE,GADF;AAOVC,EAAAA,UAAU,EAAE,CAPF;AAQVC,EAAAA,QAAQ,EAAE;AACTC,IAAAA,KAAK,EAAE,CAAE,MAAF,EAAU,MAAV,CADE;AAETC,IAAAA,IAAI,EAAE,KAFG;AAGTC,IAAAA,KAAK,EAAE;AACNC,MAAAA,SAAS,EAAE,IADL;AAENC,MAAAA,IAAI,EAAE,IAFA;AAGNC,MAAAA,6BAA6B,EAAE;AAC9BC,QAAAA,UAAU,EAAE,IADkB;AAE9BC,QAAAA,IAAI,EAAE,IAFwB;AAG9BH,QAAAA,IAAI,EAAE;AAHwB;AAHzB;AAHE,GARA;;AAqBVI,EAAAA,IAAI,CAAE;AAAEd,IAAAA,UAAU,EAAE;AAAEC,MAAAA,OAAO,EAAEc;AAAX;AAAd,GAAF,EAAqC;AACxC,UAAMC,UAAU,GAAGlB,aAAa,CAACgB,IAAd,EAAnB;AACA,UAAM;AAAEG,MAAAA;AAAF,QAAgBD,UAAtB;AACA,UAAME,OAAO,GAAGD,SAAS,EAAEE,KAAX,CAAkB,GAAlB,KAA2B,EAA3C,CAHwC,CAKxC;AACA;AACA;;AACA,UAAMC,UAAU,GAAGF,OAAO,EAAEG,MAAT,CAChBC,GAAF,IAAWA,GAAG,KAAK,mBADD,CAAnB;AAGA,UAAMC,aAAa,GAAG,EACrB,GAAGP,UADkB;AAErBC,MAAAA,SAAS,EAAEG,UAAU,CAACI,IAAX,CAAiB,GAAjB;AAFU,KAAtB;AAKA,WACC,cAAC,GAAD,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments/deprecated.js"],"names":["InnerBlocks","useBlockProps","v1","attributes","tagName","type","default","apiVersion","supports","align","html","color","gradients","link","__experimentalDefaultControls","background","text","save","Tag","blockProps","className","classes","split","newClas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;;AA1CS,CAAX;AA6CA,eAAe,CAAExB,EAAF,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { InnerBlocks, useBlockProps } from '@wordpress/block-editor';\n\n// v1: Deprecate the initial version of the block which was called \"Comments\n// Query Loop\" instead of \"Comments\".\nconst v1 = {\n\tattributes: {\n\t\ttagName: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'div',\n\t\t},\n\t},\n\tapiVersion: 3,\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t\thtml: false,\n\t\tcolor: {\n\t\t\tgradients: true,\n\t\t\tlink: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tbackground: true,\n\t\t\t\ttext: true,\n\t\t\t\tlink: true,\n\t\t\t},\n\t\t},\n\t},\n\tsave( { attributes: { tagName: Tag } } ) {\n\t\tconst blockProps = useBlockProps.save();\n\t\tconst { className } = blockProps;\n\t\tconst classes = className?.split( ' ' ) || [];\n\n\t\t// The ID of the previous version of the block\n\t\t// didn't have the `wp-block-comments` class,\n\t\t// so we need to remove it here in order to mimic it.\n\t\tconst newClasses = classes?.filter(\n\t\t\t( cls ) => cls !== 'wp-block-comments'\n\t\t);\n\t\tconst newBlockProps = {\n\t\t\t...blockProps,\n\t\t\tclassName: newClasses.join( ' ' ),\n\t\t};\n\n\t\treturn (\n\t\t\t<Tag { ...newBlockProps }>\n\t\t\t\t<InnerBlocks.Content />\n\t\t\t</Tag>\n\t\t);\n\t},\n};\n\nexport default [ v1 ];\n"]}
|
|
@@ -48,7 +48,8 @@ export default function CommentsLegacy({
|
|
|
48
48
|
textAlign: nextAlign
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
})), createElement("div", blockProps
|
|
51
|
+
})), createElement("div", { ...blockProps
|
|
52
|
+
}, createElement(Warning, {
|
|
52
53
|
actions: actions
|
|
53
54
|
}, __('Comments block: You’re currently using the legacy version of the block. ' + 'The following is just a placeholder - the final styling will likely look different. ' + 'For a better representation and more customization options, ' + 'switch the block to its editable mode.')), createElement(Placeholder, {
|
|
54
55
|
postId: postId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments/edit/comments-legacy.js"],"names":["classnames","AlignmentControl","BlockControls","Warning","useBlockProps","__","Button","Placeholder","CommentsLegacy","attributes","setAttributes","context","postType","postId","textAlign","actions","legacy","blockProps","className","nextAlign"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,OAHD,EAICC,aAJD,QAKO,yBALP;AAMA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,MAAT,QAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAEA,eAAe,SAASC,cAAT,CAAyB;AACvCC,EAAAA,UADuC;AAEvCC,EAAAA,aAFuC;AAGvCC,EAAAA,OAAO,EAAE;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ;AAH8B,CAAzB,EAIX;AACH,QAAM;AAAEC,IAAAA;AAAF,MAAgBL,UAAtB;AAEA,QAAMM,OAAO,GAAG,CACf,cAAC,MAAD;AACC,IAAA,GAAG,EAAC,SADL;AAEC,IAAA,OAAO,EAAG,MAAM,KAAKL,aAAa,CAAE;AAAEM,MAAAA,MAAM,EAAE;AAAV,KAAF,CAFnC;AAGC,IAAA,OAAO,EAAC;AAHT,KAKGX,EAAE,CAAE,yBAAF,CALL,CADe,CAAhB;AAUA,QAAMY,UAAU,GAAGb,aAAa,CAAE;AACjCc,IAAAA,SAAS,EAAElB,UAAU,CAAE;AACtB,OAAG,kBAAkBc,SAAW,EAAhC,GAAqCA;AADf,KAAF;AADY,GAAF,CAAhC;AAMA,SACC,8BACC,cAAC,aAAD;AAAe,IAAA,KAAK,EAAC;AAArB,KACC,cAAC,gBAAD;AACC,IAAA,KAAK,EAAGA,SADT;AAEC,IAAA,QAAQ,EAAKK,SAAF,IAAiB;AAC3BT,MAAAA,aAAa,CAAE;AAAEI,QAAAA,SAAS,EAAEK;AAAb,OAAF,CAAb;AACA;AAJF,IADD,CADD,EAUC,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments/edit/comments-legacy.js"],"names":["classnames","AlignmentControl","BlockControls","Warning","useBlockProps","__","Button","Placeholder","CommentsLegacy","attributes","setAttributes","context","postType","postId","textAlign","actions","legacy","blockProps","className","nextAlign"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,OAHD,EAICC,aAJD,QAKO,yBALP;AAMA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,MAAT,QAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAEA,eAAe,SAASC,cAAT,CAAyB;AACvCC,EAAAA,UADuC;AAEvCC,EAAAA,aAFuC;AAGvCC,EAAAA,OAAO,EAAE;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ;AAH8B,CAAzB,EAIX;AACH,QAAM;AAAEC,IAAAA;AAAF,MAAgBL,UAAtB;AAEA,QAAMM,OAAO,GAAG,CACf,cAAC,MAAD;AACC,IAAA,GAAG,EAAC,SADL;AAEC,IAAA,OAAO,EAAG,MAAM,KAAKL,aAAa,CAAE;AAAEM,MAAAA,MAAM,EAAE;AAAV,KAAF,CAFnC;AAGC,IAAA,OAAO,EAAC;AAHT,KAKGX,EAAE,CAAE,yBAAF,CALL,CADe,CAAhB;AAUA,QAAMY,UAAU,GAAGb,aAAa,CAAE;AACjCc,IAAAA,SAAS,EAAElB,UAAU,CAAE;AACtB,OAAG,kBAAkBc,SAAW,EAAhC,GAAqCA;AADf,KAAF;AADY,GAAF,CAAhC;AAMA,SACC,8BACC,cAAC,aAAD;AAAe,IAAA,KAAK,EAAC;AAArB,KACC,cAAC,gBAAD;AACC,IAAA,KAAK,EAAGA,SADT;AAEC,IAAA,QAAQ,EAAKK,SAAF,IAAiB;AAC3BT,MAAAA,aAAa,CAAE;AAAEI,QAAAA,SAAS,EAAEK;AAAb,OAAF,CAAb;AACA;AAJF,IADD,CADD,EAUC,0BAAUF;AAAV,KACC,cAAC,OAAD;AAAS,IAAA,OAAO,EAAGF;AAAnB,KACGV,EAAE,CACH,6EACC,sFADD,GAEC,8DAFD,GAGC,wCAJE,CADL,CADD,EASC,cAAC,WAAD;AAAa,IAAA,MAAM,EAAGQ,MAAtB;AAA+B,IAAA,QAAQ,EAAGD;AAA1C,IATD,CAVD,CADD;AAwBA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tWarning,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport Placeholder from './placeholder';\n\nexport default function CommentsLegacy( {\n\tattributes,\n\tsetAttributes,\n\tcontext: { postType, postId },\n} ) {\n\tconst { textAlign } = attributes;\n\n\tconst actions = [\n\t\t<Button\n\t\t\tkey=\"convert\"\n\t\t\tonClick={ () => void setAttributes( { legacy: false } ) }\n\t\t\tvariant=\"primary\"\n\t\t>\n\t\t\t{ __( 'Switch to editable mode' ) }\n\t\t</Button>,\n\t];\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<Warning actions={ actions }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Comments block: You’re currently using the legacy version of the block. ' +\n\t\t\t\t\t\t\t'The following is just a placeholder - the final styling will likely look different. ' +\n\t\t\t\t\t\t\t'For a better representation and more customization options, ' +\n\t\t\t\t\t\t\t'switch the block to its editable mode.'\n\t\t\t\t\t) }\n\t\t\t\t</Warning>\n\t\t\t\t<Placeholder postId={ postId } postType={ postType } />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -26,12 +26,14 @@ export default function CommentsEdit(props) {
|
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
if (legacy) {
|
|
29
|
-
return createElement(CommentsLegacy, props
|
|
29
|
+
return createElement(CommentsLegacy, { ...props
|
|
30
|
+
});
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
return createElement(Fragment, null, createElement(CommentsInspectorControls, {
|
|
33
34
|
attributes: attributes,
|
|
34
35
|
setAttributes: setAttributes
|
|
35
|
-
}), createElement(TagName, innerBlocksProps
|
|
36
|
+
}), createElement(TagName, { ...innerBlocksProps
|
|
37
|
+
}));
|
|
36
38
|
}
|
|
37
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments/edit/index.js"],"names":["useBlockProps","useInnerBlocksProps","CommentsInspectorControls","CommentsLegacy","TEMPLATE","CommentsEdit","props","attributes","setAttributes","tagName","TagName","legacy","blockProps","innerBlocksProps","template"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,aAAT,EAAwBC,mBAAxB,QAAmD,yBAAnD;AAEA;AACA;AACA;;AACA,OAAOC,yBAAP,MAAsC,+BAAtC;AACA,OAAOC,cAAP,MAA2B,mBAA3B;AACA,OAAOC,QAAP,MAAqB,YAArB;AAEA,eAAe,SAASC,YAAT,CAAuBC,KAAvB,EAA+B;AAC7C,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAAgCF,KAAtC;AACA,QAAM;AAAEG,IAAAA,OAAO,EAAEC,OAAX;AAAoBC,IAAAA;AAApB,MAA+BJ,UAArC;AAEA,QAAMK,UAAU,GAAGZ,aAAa,EAAhC;AACA,QAAMa,gBAAgB,GAAGZ,mBAAmB,CAAEW,UAAF,EAAc;AACzDE,IAAAA,QAAQ,EAAEV;AAD+C,GAAd,CAA5C;;AAIA,MAAKO,MAAL,EAAc;AACb,WAAO,cAAC,cAAD,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments/edit/index.js"],"names":["useBlockProps","useInnerBlocksProps","CommentsInspectorControls","CommentsLegacy","TEMPLATE","CommentsEdit","props","attributes","setAttributes","tagName","TagName","legacy","blockProps","innerBlocksProps","template"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,aAAT,EAAwBC,mBAAxB,QAAmD,yBAAnD;AAEA;AACA;AACA;;AACA,OAAOC,yBAAP,MAAsC,+BAAtC;AACA,OAAOC,cAAP,MAA2B,mBAA3B;AACA,OAAOC,QAAP,MAAqB,YAArB;AAEA,eAAe,SAASC,YAAT,CAAuBC,KAAvB,EAA+B;AAC7C,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAAgCF,KAAtC;AACA,QAAM;AAAEG,IAAAA,OAAO,EAAEC,OAAX;AAAoBC,IAAAA;AAApB,MAA+BJ,UAArC;AAEA,QAAMK,UAAU,GAAGZ,aAAa,EAAhC;AACA,QAAMa,gBAAgB,GAAGZ,mBAAmB,CAAEW,UAAF,EAAc;AACzDE,IAAAA,QAAQ,EAAEV;AAD+C,GAAd,CAA5C;;AAIA,MAAKO,MAAL,EAAc;AACb,WAAO,cAAC,cAAD,OAAqBL;AAArB,MAAP;AACA;;AAED,SACC,8BACC,cAAC,yBAAD;AACC,IAAA,UAAU,EAAGC,UADd;AAEC,IAAA,aAAa,EAAGC;AAFjB,IADD,EAKC,cAAC,OAAD,OAAcK;AAAd,IALD,CADD;AASA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport CommentsInspectorControls from './comments-inspector-controls';\nimport CommentsLegacy from './comments-legacy';\nimport TEMPLATE from './template';\n\nexport default function CommentsEdit( props ) {\n\tconst { attributes, setAttributes } = props;\n\tconst { tagName: TagName, legacy } = attributes;\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t} );\n\n\tif ( legacy ) {\n\t\treturn <CommentsLegacy { ...props } />;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<CommentsInspectorControls\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\t\t\t<TagName { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments/index.js"],"names":["postComments","icon","initBlock","deprecated","edit","save","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,IAAIC,IAAzB,QAAqC,kBAArC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments/index.js"],"names":["postComments","icon","initBlock","deprecated","edit","save","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,IAAIC,IAAzB,QAAqC,kBAArC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBP,EAAAA,IADuB;AAEvBG,EAAAA,IAFuB;AAGvBC,EAAAA,IAHuB;AAIvBF,EAAAA;AAJuB,CAAjB;AAOP,OAAO,MAAMM,IAAI,GAAG,MAAMP,SAAS,CAAE;AAAEI,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postComments as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
|
|
@@ -14,6 +14,7 @@ export default function save({
|
|
|
14
14
|
const innerBlocksProps = useInnerBlocksProps.save(blockProps); // The legacy version is dynamic (i.e. PHP rendered) and doesn't allow inner
|
|
15
15
|
// blocks, so nothing is saved in that case.
|
|
16
16
|
|
|
17
|
-
return legacy ? null : createElement(Tag, innerBlocksProps
|
|
17
|
+
return legacy ? null : createElement(Tag, { ...innerBlocksProps
|
|
18
|
+
});
|
|
18
19
|
}
|
|
19
20
|
//# sourceMappingURL=save.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments/save.js"],"names":["useInnerBlocksProps","useBlockProps","save","attributes","tagName","Tag","legacy","blockProps","innerBlocksProps"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,mBAAT,EAA8BC,aAA9B,QAAmD,yBAAnD;AAEA,eAAe,SAASC,IAAT,CAAe;AAAEC,EAAAA,UAAU,EAAE;AAAEC,IAAAA,OAAO,EAAEC,GAAX;AAAgBC,IAAAA;AAAhB;AAAd,CAAf,EAA0D;AACxE,QAAMC,UAAU,GAAGN,aAAa,CAACC,IAAd,EAAnB;AACA,QAAMM,gBAAgB,GAAGR,mBAAmB,CAACE,IAApB,CAA0BK,UAA1B,CAAzB,CAFwE,CAIxE;AACA;;AACA,SAAOD,MAAM,GAAG,IAAH,GAAU,cAAC,GAAD,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments/save.js"],"names":["useInnerBlocksProps","useBlockProps","save","attributes","tagName","Tag","legacy","blockProps","innerBlocksProps"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,mBAAT,EAA8BC,aAA9B,QAAmD,yBAAnD;AAEA,eAAe,SAASC,IAAT,CAAe;AAAEC,EAAAA,UAAU,EAAE;AAAEC,IAAAA,OAAO,EAAEC,GAAX;AAAgBC,IAAAA;AAAhB;AAAd,CAAf,EAA0D;AACxE,QAAMC,UAAU,GAAGN,aAAa,CAACC,IAAd,EAAnB;AACA,QAAMM,gBAAgB,GAAGR,mBAAmB,CAACE,IAApB,CAA0BK,UAA1B,CAAzB,CAFwE,CAIxE;AACA;;AACA,SAAOD,MAAM,GAAG,IAAH,GAAU,cAAC,GAAD,OAAUE;AAAV,IAAvB;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInnerBlocksProps, useBlockProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes: { tagName: Tag, legacy } } ) {\n\tconst blockProps = useBlockProps.save();\n\tconst innerBlocksProps = useInnerBlocksProps.save( blockProps );\n\n\t// The legacy version is dynamic (i.e. PHP rendered) and doesn't allow inner\n\t// blocks, so nothing is saved in that case.\n\treturn legacy ? null : <Tag { ...innerBlocksProps } />;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination/edit.js"],"names":["__","InspectorControls","useBlockProps","useInnerBlocksProps","store","blockEditorStore","Warning","useSelect","PanelBody","CommentsPaginationArrowControls","TEMPLATE","ALLOWED_BLOCKS","QueryPaginationEdit","attributes","paginationArrow","setAttributes","clientId","hasNextPreviousBlocks","select","getBlocks","innerBlocks","find","innerBlock","includes","name","blockProps","innerBlocksProps","template","allowedBlocks","pageComments","getSettings","__experimentalDiscussionSettings","value"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SACCC,iBADD,EAECC,aAFD,EAGCC,mBAHD,EAICC,KAAK,IAAIC,gBAJV,EAKCC,OALD,QAMO,yBANP;AAOA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,SAAT,QAA0B,uBAA1B;AAEA;AACA;AACA;;AACA,SAASC,+BAAT,QAAgD,sCAAhD;AAEA,MAAMC,QAAQ,GAAG,CAChB,CAAE,mCAAF,CADgB,EAEhB,CAAE,kCAAF,CAFgB,EAGhB,CAAE,+BAAF,CAHgB,CAAjB;AAKA,MAAMC,cAAc,GAAG,CACtB,mCADsB,EAEtB,kCAFsB,EAGtB,+BAHsB,CAAvB;AAMA,eAAe,SAASC,mBAAT,CAA8B;AAC5CC,EAAAA,UAAU,EAAE;AAAEC,IAAAA;AAAF,GADgC;AAE5CC,EAAAA,aAF4C;AAG5CC,EAAAA;AAH4C,CAA9B,EAIX;AACH,QAAMC,qBAAqB,GAAGV,SAAS,CAAIW,MAAF,IAAc;AACtD,UAAM;AAAEC,MAAAA;AAAF,QAAgBD,MAAM,CAAEb,gBAAF,CAA5B;AACA,UAAMe,WAAW,GAAGD,SAAS,CAAEH,QAAF,CAA7B;AACA;AACF;AACA;AACA;AACA;;AACE,WAAOI,WAAW,EAAEC,IAAb,CAAqBC,UAAF,IAAkB;AAC3C,aAAO,CACN,mCADM,EAEN,+BAFM,EAGLC,QAHK,CAGKD,UAAU,CAACE,IAHhB,CAAP;AAIA,KALM,CAAP;AAMA,GAdsC,EAcpC,EAdoC,CAAvC;AAgBA,QAAMC,UAAU,GAAGvB,aAAa,EAAhC;AACA,QAAMwB,gBAAgB,GAAGvB,mBAAmB,CAAEsB,UAAF,EAAc;AACzDE,IAAAA,QAAQ,EAAEjB,QAD+C;AAEzDkB,IAAAA,aAAa,EAAEjB;AAF0C,GAAd,CAA5C,CAlBG,CAuBH;;AACA,QAAMkB,YAAY,GAAGtB,SAAS,CAAIW,MAAF,IAAc;AAC7C,UAAM;AAAEY,MAAAA;AAAF,QAAkBZ,MAAM,CAAEb,gBAAF,CAA9B;AACA,UAAM;AAAE0B,MAAAA;AAAF,QAAuCD,WAAW,EAAxD;AACA,WAAOC,gCAAgC,EAAEF,YAAzC;AACA,GAJ6B,EAI3B,EAJ2B,CAA9B,CAxBG,CA8BH;AACA;AACA;;AACA,MAAK,CAAEA,YAAP,EAAsB;AACrB,WACC,cAAC,OAAD,QACG7B,EAAE,CACH,mFADG,CADL,CADD;AAOA;;AAED,SACC,8BACGiB,qBAAqB,IACtB,cAAC,iBAAD,QACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGjB,EAAE,CAAE,UAAF;AAArB,KACC,cAAC,+BAAD;AACC,IAAA,KAAK,EAAGc,eADT;AAEC,IAAA,QAAQ,EAAKkB,KAAF,IAAa;AACvBjB,MAAAA,aAAa,CAAE;AAAED,QAAAA,eAAe,EAAEkB;AAAnB,OAAF,CAAb;AACA;AAJF,IADD,CADD,CAFF,EAaC,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination/edit.js"],"names":["__","InspectorControls","useBlockProps","useInnerBlocksProps","store","blockEditorStore","Warning","useSelect","PanelBody","CommentsPaginationArrowControls","TEMPLATE","ALLOWED_BLOCKS","QueryPaginationEdit","attributes","paginationArrow","setAttributes","clientId","hasNextPreviousBlocks","select","getBlocks","innerBlocks","find","innerBlock","includes","name","blockProps","innerBlocksProps","template","allowedBlocks","pageComments","getSettings","__experimentalDiscussionSettings","value"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SACCC,iBADD,EAECC,aAFD,EAGCC,mBAHD,EAICC,KAAK,IAAIC,gBAJV,EAKCC,OALD,QAMO,yBANP;AAOA,SAASC,SAAT,QAA0B,iBAA1B;AAC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6B,EAI3B,EAJ2B,CAA9B,CAxBG,CA8BH;AACA;AACA;;AACA,MAAK,CAAEA,YAAP,EAAsB;AACrB,WACC,cAAC,OAAD,QACG7B,EAAE,CACH,mFADG,CADL,CADD;AAOA;;AAED,SACC,8BACGiB,qBAAqB,IACtB,cAAC,iBAAD,QACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGjB,EAAE,CAAE,UAAF;AAArB,KACC,cAAC,+BAAD;AACC,IAAA,KAAK,EAAGc,eADT;AAEC,IAAA,QAAQ,EAAKkB,KAAF,IAAa;AACvBjB,MAAAA,aAAa,CAAE;AAAED,QAAAA,eAAe,EAAEkB;AAAnB,OAAF,CAAb;AACA;AAJF,IADD,CADD,CAFF,EAaC,0BAAUN;AAAV,IAbD,CADD;AAiBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInspectorControls,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n\tWarning,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { CommentsPaginationArrowControls } from './comments-pagination-arrow-controls';\n\nconst TEMPLATE = [\n\t[ 'core/comments-pagination-previous' ],\n\t[ 'core/comments-pagination-numbers' ],\n\t[ 'core/comments-pagination-next' ],\n];\nconst ALLOWED_BLOCKS = [\n\t'core/comments-pagination-previous',\n\t'core/comments-pagination-numbers',\n\t'core/comments-pagination-next',\n];\n\nexport default function QueryPaginationEdit( {\n\tattributes: { paginationArrow },\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst hasNextPreviousBlocks = useSelect( ( select ) => {\n\t\tconst { getBlocks } = select( blockEditorStore );\n\t\tconst innerBlocks = getBlocks( clientId );\n\t\t/**\n\t\t * Show the `paginationArrow` control only if a\n\t\t * Comments Pagination Next or Comments Pagination Previous\n\t\t * block exists.\n\t\t */\n\t\treturn innerBlocks?.find( ( innerBlock ) => {\n\t\t\treturn [\n\t\t\t\t'core/comments-pagination-previous',\n\t\t\t\t'core/comments-pagination-next',\n\t\t\t].includes( innerBlock.name );\n\t\t} );\n\t}, [] );\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\tallowedBlocks: ALLOWED_BLOCKS,\n\t} );\n\n\t// Get the Discussion settings\n\tconst pageComments = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\treturn __experimentalDiscussionSettings?.pageComments;\n\t}, [] );\n\n\t// If paging comments is not enabled in the Discussion Settings then hide the pagination\n\t// controls. We don't want to remove them from the template so that when the user enables\n\t// paging comments, the controls will be visible.\n\tif ( ! pageComments ) {\n\t\treturn (\n\t\t\t<Warning>\n\t\t\t\t{ __(\n\t\t\t\t\t'Comments Pagination block: paging comments is disabled in the Discussion Settings'\n\t\t\t\t) }\n\t\t\t</Warning>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ hasNextPreviousBlocks && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t<CommentsPaginationArrowControls\n\t\t\t\t\t\t\tvalue={ paginationArrow }\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( { paginationArrow: value } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -26,7 +26,6 @@ const metadata = {
|
|
|
26
26
|
"comments/paginationArrow": "paginationArrow"
|
|
27
27
|
},
|
|
28
28
|
supports: {
|
|
29
|
-
anchor: true,
|
|
30
29
|
align: true,
|
|
31
30
|
reusable: false,
|
|
32
31
|
html: false,
|
|
@@ -39,7 +38,7 @@ const metadata = {
|
|
|
39
38
|
link: true
|
|
40
39
|
}
|
|
41
40
|
},
|
|
42
|
-
|
|
41
|
+
layout: {
|
|
43
42
|
allowSwitching: false,
|
|
44
43
|
allowInheriting: false,
|
|
45
44
|
"default": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination/index.js"],"names":["queryPagination","icon","initBlock","edit","save","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,IAAIC,IAA5B,QAAwC,kBAAxC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination/index.js"],"names":["queryPagination","icon","initBlock","edit","save","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,IAAIC,IAA5B,QAAwC,kBAAxC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBN,EAAAA,IADuB;AAEvBE,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB;AAMP,OAAO,MAAMI,IAAI,GAAG,MAAMN,SAAS,CAAE;AAAEG,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPagination as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import { createElement } from "@wordpress/element";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -21,10 +20,11 @@ export default function CommentsPaginationNextEdit({
|
|
|
21
20
|
}
|
|
22
21
|
}) {
|
|
23
22
|
const displayArrow = arrowMap[paginationArrow];
|
|
24
|
-
return createElement("a",
|
|
23
|
+
return createElement("a", {
|
|
25
24
|
href: "#comments-pagination-next-pseudo-link",
|
|
26
|
-
onClick: event => event.preventDefault()
|
|
27
|
-
|
|
25
|
+
onClick: event => event.preventDefault(),
|
|
26
|
+
...useBlockProps()
|
|
27
|
+
}, createElement(PlainText, {
|
|
28
28
|
__experimentalVersion: 2,
|
|
29
29
|
tagName: "span",
|
|
30
30
|
"aria-label": __('Newer comments page link'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination-next/edit.js"],"names":["__","useBlockProps","PlainText","arrowMap","none","arrow","chevron","CommentsPaginationNextEdit","attributes","label","setAttributes","context","paginationArrow","displayArrow","event","preventDefault","newLabel"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination-next/edit.js"],"names":["__","useBlockProps","PlainText","arrowMap","none","arrow","chevron","CommentsPaginationNextEdit","attributes","label","setAttributes","context","paginationArrow","displayArrow","event","preventDefault","newLabel"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,aAAT,EAAwBC,SAAxB,QAAyC,yBAAzC;AAEA,MAAMC,QAAQ,GAAG;AAChBC,EAAAA,IAAI,EAAE,EADU;AAEhBC,EAAAA,KAAK,EAAE,GAFS;AAGhBC,EAAAA,OAAO,EAAE;AAHO,CAAjB;AAMA,eAAe,SAASC,0BAAT,CAAqC;AACnDC,EAAAA,UAAU,EAAE;AAAEC,IAAAA;AAAF,GADuC;AAEnDC,EAAAA,aAFmD;AAGnDC,EAAAA,OAAO,EAAE;AAAE,gCAA4BC;AAA9B;AAH0C,CAArC,EAIX;AACH,QAAMC,YAAY,GAAGV,QAAQ,CAAES,eAAF,CAA7B;AACA,SACC;AACC,IAAA,IAAI,EAAC,uCADN;AAEC,IAAA,OAAO,EAAKE,KAAF,IAAaA,KAAK,CAACC,cAAN,EAFxB;AAAA,OAGMd,aAAa;AAHnB,KAKC,cAAC,SAAD;AACC,IAAA,qBAAqB,EAAG,CADzB;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,kBAAaD,EAAE,CAAE,0BAAF,CAHhB;AAIC,IAAA,WAAW,EAAGA,EAAE,CAAE,gBAAF,CAJjB;AAKC,IAAA,KAAK,EAAGS,KALT;AAMC,IAAA,QAAQ,EAAKO,QAAF,IACVN,aAAa,CAAE;AAAED,MAAAA,KAAK,EAAEO;AAAT,KAAF;AAPf,IALD,EAeGH,YAAY,IACb;AACC,IAAA,SAAS,EAAI,oDAAoDD,eAAiB;AADnF,KAGGC,YAHH,CAhBF,CADD;AAyBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useBlockProps, PlainText } from '@wordpress/block-editor';\n\nconst arrowMap = {\n\tnone: '',\n\tarrow: '→',\n\tchevron: '»',\n};\n\nexport default function CommentsPaginationNextEdit( {\n\tattributes: { label },\n\tsetAttributes,\n\tcontext: { 'comments/paginationArrow': paginationArrow },\n} ) {\n\tconst displayArrow = arrowMap[ paginationArrow ];\n\treturn (\n\t\t<a\n\t\t\thref=\"#comments-pagination-next-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t{ ...useBlockProps() }\n\t\t>\n\t\t\t<PlainText\n\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\ttagName=\"span\"\n\t\t\t\taria-label={ __( 'Newer comments page link' ) }\n\t\t\t\tplaceholder={ __( 'Newer Comments' ) }\n\t\t\t\tvalue={ label }\n\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\tsetAttributes( { label: newLabel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ displayArrow && (\n\t\t\t\t<span\n\t\t\t\t\tclassName={ `wp-block-comments-pagination-next-arrow is-arrow-${ paginationArrow }` }\n\t\t\t\t>\n\t\t\t\t\t{ displayArrow }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t</a>\n\t);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination-next/index.js"],"names":["queryPaginationNext","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAmB,IAAIC,IAAhC,QAA4C,kBAA5C;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination-next/index.js"],"names":["queryPaginationNext","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAmB,IAAIC,IAAhC,QAA4C,kBAA5C;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBE,EAAAA;AAFuB,CAAjB;AAKP,OAAO,MAAMI,IAAI,GAAG,MAAML,SAAS,CAAE;AAAEE,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationNext as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
|
|
@@ -18,7 +18,8 @@ const PaginationItem = ({
|
|
|
18
18
|
}, content);
|
|
19
19
|
|
|
20
20
|
export default function CommentsPaginationNumbersEdit() {
|
|
21
|
-
return createElement("div", useBlockProps()
|
|
21
|
+
return createElement("div", { ...useBlockProps()
|
|
22
|
+
}, createElement(PaginationItem, {
|
|
22
23
|
content: "1"
|
|
23
24
|
}), createElement(PaginationItem, {
|
|
24
25
|
content: "2"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination-numbers/edit.js"],"names":["useBlockProps","PaginationItem","content","tag","Tag","extraClass","event","preventDefault","CommentsPaginationNumbersEdit"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,yBAA9B;;AAEA,MAAMC,cAAc,GAAG,CAAE;AAAEC,EAAAA,OAAF;AAAWC,EAAAA,GAAG,EAAEC,GAAG,GAAG,GAAtB;AAA2BC,EAAAA,UAAU,GAAG;AAAxC,CAAF,KACtBD,GAAG,KAAK,GAAR,GACC,cAAC,GAAD;AACC,EAAA,SAAS,EAAI,gBAAgBC,UAAY,EAD1C;AAEC,EAAA,IAAI,EAAC,0CAFN;AAGC,EAAA,OAAO,EAAKC,KAAF,IAAaA,KAAK,CAACC,cAAN;AAHxB,GAKGL,OALH,CADD,GASC,cAAC,GAAD;AAAK,EAAA,SAAS,EAAI,gBAAgBG,UAAY;AAA9C,GAAoDH,OAApD,CAVF;;AAaA,eAAe,SAASM,6BAAT,GAAyC;AACvD,SACC,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination-numbers/edit.js"],"names":["useBlockProps","PaginationItem","content","tag","Tag","extraClass","event","preventDefault","CommentsPaginationNumbersEdit"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,yBAA9B;;AAEA,MAAMC,cAAc,GAAG,CAAE;AAAEC,EAAAA,OAAF;AAAWC,EAAAA,GAAG,EAAEC,GAAG,GAAG,GAAtB;AAA2BC,EAAAA,UAAU,GAAG;AAAxC,CAAF,KACtBD,GAAG,KAAK,GAAR,GACC,cAAC,GAAD;AACC,EAAA,SAAS,EAAI,gBAAgBC,UAAY,EAD1C;AAEC,EAAA,IAAI,EAAC,0CAFN;AAGC,EAAA,OAAO,EAAKC,KAAF,IAAaA,KAAK,CAACC,cAAN;AAHxB,GAKGL,OALH,CADD,GASC,cAAC,GAAD;AAAK,EAAA,SAAS,EAAI,gBAAgBG,UAAY;AAA9C,GAAoDH,OAApD,CAVF;;AAaA,eAAe,SAASM,6BAAT,GAAyC;AACvD,SACC,0BAAUR,aAAa;AAAvB,KACC,cAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IADD,EAEC,cAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IAFD,EAGC,cAAC,cAAD;AAAgB,IAAA,OAAO,EAAC,GAAxB;AAA4B,IAAA,GAAG,EAAC,MAAhC;AAAuC,IAAA,UAAU,EAAC;AAAlD,IAHD,EAIC,cAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IAJD,EAKC,cAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IALD,EAMC,cAAC,cAAD;AAAgB,IAAA,OAAO,EAAC,KAAxB;AAA8B,IAAA,GAAG,EAAC,MAAlC;AAAyC,IAAA,UAAU,EAAC;AAApD,IAND,EAOC,cAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IAPD,CADD;AAWA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps } from '@wordpress/block-editor';\n\nconst PaginationItem = ( { content, tag: Tag = 'a', extraClass = '' } ) =>\n\tTag === 'a' ? (\n\t\t<Tag\n\t\t\tclassName={ `page-numbers ${ extraClass }` }\n\t\t\thref=\"#comments-pagination-numbers-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t>\n\t\t\t{ content }\n\t\t</Tag>\n\t) : (\n\t\t<Tag className={ `page-numbers ${ extraClass }` }>{ content }</Tag>\n\t);\n\nexport default function CommentsPaginationNumbersEdit() {\n\treturn (\n\t\t<div { ...useBlockProps() }>\n\t\t\t<PaginationItem content=\"1\" />\n\t\t\t<PaginationItem content=\"2\" />\n\t\t\t<PaginationItem content=\"3\" tag=\"span\" extraClass=\"current\" />\n\t\t\t<PaginationItem content=\"4\" />\n\t\t\t<PaginationItem content=\"5\" />\n\t\t\t<PaginationItem content=\"...\" tag=\"span\" extraClass=\"dots\" />\n\t\t\t<PaginationItem content=\"8\" />\n\t\t</div>\n\t);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination-numbers/index.js"],"names":["queryPaginationNumbers","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,sBAAsB,IAAIC,IAAnC,QAA+C,kBAA/C;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination-numbers/index.js"],"names":["queryPaginationNumbers","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,sBAAsB,IAAIC,IAAnC,QAA+C,kBAA/C;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBE,EAAAA;AAFuB,CAAjB;AAKP,OAAO,MAAMI,IAAI,GAAG,MAAML,SAAS,CAAE;AAAEE,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationNumbers as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import { createElement } from "@wordpress/element";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -21,10 +20,11 @@ export default function CommentsPaginationPreviousEdit({
|
|
|
21
20
|
}
|
|
22
21
|
}) {
|
|
23
22
|
const displayArrow = arrowMap[paginationArrow];
|
|
24
|
-
return createElement("a",
|
|
23
|
+
return createElement("a", {
|
|
25
24
|
href: "#comments-pagination-previous-pseudo-link",
|
|
26
|
-
onClick: event => event.preventDefault()
|
|
27
|
-
|
|
25
|
+
onClick: event => event.preventDefault(),
|
|
26
|
+
...useBlockProps()
|
|
27
|
+
}, displayArrow && createElement("span", {
|
|
28
28
|
className: `wp-block-comments-pagination-previous-arrow is-arrow-${paginationArrow}`
|
|
29
29
|
}, displayArrow), createElement(PlainText, {
|
|
30
30
|
__experimentalVersion: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination-previous/edit.js"],"names":["__","useBlockProps","PlainText","arrowMap","none","arrow","chevron","CommentsPaginationPreviousEdit","attributes","label","setAttributes","context","paginationArrow","displayArrow","event","preventDefault","newLabel"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination-previous/edit.js"],"names":["__","useBlockProps","PlainText","arrowMap","none","arrow","chevron","CommentsPaginationPreviousEdit","attributes","label","setAttributes","context","paginationArrow","displayArrow","event","preventDefault","newLabel"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,aAAT,EAAwBC,SAAxB,QAAyC,yBAAzC;AAEA,MAAMC,QAAQ,GAAG;AAChBC,EAAAA,IAAI,EAAE,EADU;AAEhBC,EAAAA,KAAK,EAAE,GAFS;AAGhBC,EAAAA,OAAO,EAAE;AAHO,CAAjB;AAMA,eAAe,SAASC,8BAAT,CAAyC;AACvDC,EAAAA,UAAU,EAAE;AAAEC,IAAAA;AAAF,GAD2C;AAEvDC,EAAAA,aAFuD;AAGvDC,EAAAA,OAAO,EAAE;AAAE,gCAA4BC;AAA9B;AAH8C,CAAzC,EAIX;AACH,QAAMC,YAAY,GAAGV,QAAQ,CAAES,eAAF,CAA7B;AACA,SACC;AACC,IAAA,IAAI,EAAC,2CADN;AAEC,IAAA,OAAO,EAAKE,KAAF,IAAaA,KAAK,CAACC,cAAN,EAFxB;AAAA,OAGMd,aAAa;AAHnB,KAKGY,YAAY,IACb;AACC,IAAA,SAAS,EAAI,wDAAwDD,eAAiB;AADvF,KAGGC,YAHH,CANF,EAYC,cAAC,SAAD;AACC,IAAA,qBAAqB,EAAG,CADzB;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,kBAAab,EAAE,CAAE,0BAAF,CAHhB;AAIC,IAAA,WAAW,EAAGA,EAAE,CAAE,gBAAF,CAJjB;AAKC,IAAA,KAAK,EAAGS,KALT;AAMC,IAAA,QAAQ,EAAKO,QAAF,IACVN,aAAa,CAAE;AAAED,MAAAA,KAAK,EAAEO;AAAT,KAAF;AAPf,IAZD,CADD;AAyBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useBlockProps, PlainText } from '@wordpress/block-editor';\n\nconst arrowMap = {\n\tnone: '',\n\tarrow: '←',\n\tchevron: '«',\n};\n\nexport default function CommentsPaginationPreviousEdit( {\n\tattributes: { label },\n\tsetAttributes,\n\tcontext: { 'comments/paginationArrow': paginationArrow },\n} ) {\n\tconst displayArrow = arrowMap[ paginationArrow ];\n\treturn (\n\t\t<a\n\t\t\thref=\"#comments-pagination-previous-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t{ ...useBlockProps() }\n\t\t>\n\t\t\t{ displayArrow && (\n\t\t\t\t<span\n\t\t\t\t\tclassName={ `wp-block-comments-pagination-previous-arrow is-arrow-${ paginationArrow }` }\n\t\t\t\t>\n\t\t\t\t\t{ displayArrow }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t\t<PlainText\n\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\ttagName=\"span\"\n\t\t\t\taria-label={ __( 'Older comments page link' ) }\n\t\t\t\tplaceholder={ __( 'Older Comments' ) }\n\t\t\t\tvalue={ label }\n\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\tsetAttributes( { label: newLabel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</a>\n\t);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination-previous/index.js"],"names":["queryPaginationPrevious","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,uBAAuB,IAAIC,IAApC,QAAgD,kBAAhD;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments-pagination-previous/index.js"],"names":["queryPaginationPrevious","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,uBAAuB,IAAIC,IAApC,QAAgD,kBAAhD;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBE,EAAAA;AAFuB,CAAjB;AAKP,OAAO,MAAMI,IAAI,GAAG,MAAML,SAAS,CAAE;AAAEE,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationPrevious as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
|