@wordpress/block-library 9.9.0 → 9.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/audio/edit.native.js +1 -1
- package/build/audio/edit.native.js.map +1 -1
- package/build/block/edit.js.map +1 -1
- package/build/block/edit.native.js +2 -2
- package/build/block/edit.native.js.map +1 -1
- package/build/block-keyboard-shortcuts/index.js.map +1 -1
- package/build/button/deprecated.js.map +1 -1
- package/build/button/edit.js.map +1 -1
- package/build/button/edit.native.js.map +1 -1
- package/build/button/get-updated-link-attributes.js.map +1 -1
- package/build/button/save.js.map +1 -1
- package/build/buttons/deprecated.js.map +1 -1
- package/build/categories/edit.js +1 -1
- package/build/categories/edit.js.map +1 -1
- package/build/column/deprecated.js.map +1 -1
- package/build/column/edit.js +1 -1
- package/build/column/edit.js.map +1 -1
- package/build/column/edit.native.js.map +1 -1
- package/build/column/save.js.map +1 -1
- package/build/columns/deprecated.js.map +1 -1
- package/build/columns/edit.js.map +1 -1
- package/build/columns/edit.native.js +1 -1
- package/build/columns/edit.native.js.map +1 -1
- package/build/columns/save.js.map +1 -1
- package/build/columns/transforms.js.map +1 -1
- package/build/columns/utils.js.map +1 -1
- package/build/comment-author-avatar/edit.js.map +1 -1
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-content/edit.js.map +1 -1
- package/build/comment-edit-link/edit.js.map +1 -1
- package/build/comment-reply-link/edit.js.map +1 -1
- package/build/comment-template/hooks.js.map +1 -1
- package/build/comments/edit/comments-legacy.js.map +1 -1
- package/build/comments-pagination-next/edit.js.map +1 -1
- package/build/comments-pagination-numbers/edit.js.map +1 -1
- package/build/comments-pagination-previous/edit.js.map +1 -1
- package/build/comments-title/edit.js +2 -2
- package/build/comments-title/edit.js.map +1 -1
- package/build/cover/controls.native.js.map +1 -1
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +74 -30
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/save.js.map +1 -1
- package/build/cover/shared.js.map +1 -1
- package/build/embed/deprecated.js.map +1 -1
- package/build/embed/edit.js +16 -3
- package/build/embed/edit.js.map +1 -1
- package/build/embed/embed-preview.js +5 -19
- package/build/embed/embed-preview.js.map +1 -1
- package/build/embed/embed-preview.native.js +1 -1
- package/build/embed/embed-preview.native.js.map +1 -1
- package/build/embed/save.js.map +1 -1
- package/build/embed/transforms.js.map +1 -1
- package/build/embed/variations.js +1 -1
- package/build/embed/variations.js.map +1 -1
- package/build/embed/wp-embed-preview.native.js.map +1 -1
- package/build/file/deprecated.js +3 -3
- package/build/file/deprecated.js.map +1 -1
- package/build/file/edit.js.map +1 -1
- package/build/file/save.js.map +1 -1
- package/build/footnotes/edit.js.map +1 -1
- package/build/footnotes/format.js.map +1 -1
- package/build/form/edit.js.map +1 -1
- package/build/form-submission-notification/edit.js.map +1 -1
- package/build/form-submission-notification/save.js.map +1 -1
- package/build/freeform/edit.js.map +1 -1
- package/build/freeform/modal.js.map +1 -1
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +2 -2
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/gallery.native.js +1 -1
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/gap-styles.js.map +1 -1
- package/build/gallery/save.js.map +1 -1
- package/build/group/placeholder.js.map +1 -1
- package/build/heading/deprecated.js.map +1 -1
- package/build/heading/edit.js.map +1 -1
- package/build/heading/edit.native.js.map +1 -1
- package/build/heading/index.js +2 -2
- package/build/heading/index.js.map +1 -1
- package/build/heading/save.js.map +1 -1
- package/build/heading/transforms.js.map +1 -1
- package/build/home-link/edit.js.map +1 -1
- package/build/html/preview.js.map +1 -1
- package/build/image/deprecated.js.map +1 -1
- package/build/image/edit.js +1 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +1 -1
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +3 -3
- package/build/image/image.js.map +1 -1
- package/build/image/save.js.map +1 -1
- package/build/image/view.js.map +1 -1
- package/build/index.native.js.map +1 -1
- package/build/latest-posts/edit.js +2 -2
- package/build/latest-posts/edit.js.map +1 -1
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/edit.native.js.map +1 -1
- package/build/media-text/image-fill.js.map +1 -1
- package/build/media-text/save.js.map +1 -1
- package/build/missing/edit.js +2 -2
- package/build/missing/edit.js.map +1 -1
- package/build/more/edit.js.map +1 -1
- package/build/more/save.js.map +1 -1
- package/build/navigation/edit/accessible-menu-description.js.map +1 -1
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/leaf-more-menu.js +1 -1
- package/build/navigation/edit/leaf-more-menu.js.map +1 -1
- package/build/navigation/edit/menu-inspector-controls.js +1 -1
- package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build/navigation/edit/use-create-navigation-menu.js.map +1 -1
- package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
- package/build/navigation/edit/utils.js.map +1 -1
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/link-ui.js.map +1 -1
- package/build/nextpage/edit.native.js +1 -1
- package/build/nextpage/edit.native.js.map +1 -1
- package/build/page-list-item/edit.js +1 -1
- package/build/page-list-item/edit.js.map +1 -1
- package/build/paragraph/deprecated.js.map +1 -1
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/save.js.map +1 -1
- package/build/pattern/recursion-detector.js +1 -0
- package/build/pattern/recursion-detector.js.map +1 -1
- package/build/post-author/edit.js.map +1 -1
- package/build/post-author-biography/edit.js.map +1 -1
- package/build/post-author-name/edit.js.map +1 -1
- package/build/post-comments-count/edit.js.map +1 -1
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/form.js +1 -1
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-comments-link/edit.js +1 -1
- package/build/post-comments-link/edit.js.map +1 -1
- package/build/post-content/edit.js +29 -2
- package/build/post-content/edit.js.map +1 -1
- package/build/post-date/edit.js.map +1 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-time-to-read/edit.js +1 -1
- package/build/post-time-to-read/edit.js.map +1 -1
- package/build/post-title/edit.js.map +1 -1
- package/build/pullquote/deprecated.js.map +1 -1
- package/build/pullquote/edit.js.map +1 -1
- package/build/pullquote/save.js.map +1 -1
- package/build/pullquote/shared.js.map +1 -1
- package/build/query/edit/inspector-controls/author-control.js +1 -0
- package/build/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +8 -11
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/order-control.js.map +1 -1
- package/build/query/edit/inspector-controls/parent-control.js +1 -0
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +1 -0
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/edit/pattern-selection-modal.js +1 -1
- package/build/query/edit/pattern-selection-modal.js.map +1 -1
- package/build/query/utils.js.map +1 -1
- package/build/query/view.js.map +1 -1
- package/build/query-pagination-next/edit.js.map +1 -1
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-pagination-previous/edit.js.map +1 -1
- package/build/query-title/edit.js +3 -3
- package/build/query-title/edit.js.map +1 -1
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/edit.js.map +1 -1
- package/build/quote/save.js.map +1 -1
- package/build/quote/transforms.js.map +1 -1
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js.map +1 -1
- package/build/shortcode/edit.js.map +1 -1
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-title/edit.js.map +1 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/edit.native.js.map +1 -1
- package/build/social-links/deprecated.js.map +1 -1
- package/build/social-links/edit.js.map +1 -1
- package/build/spacer/controls.native.js.map +1 -1
- package/build/spacer/deprecated.js.map +1 -1
- package/build/spacer/edit.js.map +1 -1
- package/build/table/deprecated.js.map +1 -1
- package/build/table/edit.js.map +1 -1
- package/build/table/save.js.map +1 -1
- package/build/table-of-contents/edit.js +1 -1
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/table-of-contents/hooks.js.map +1 -1
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +1 -1
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/import-controls.js +2 -1
- package/build/template-part/edit/import-controls.js.map +1 -1
- package/build/template-part/edit/index.js +2 -2
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +2 -2
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/template-part/edit/utils/hooks.js.map +1 -1
- package/build/template-part/variations.js.map +1 -1
- package/build/term-description/edit.js.map +1 -1
- package/build/text-columns/edit.js.map +1 -1
- package/build/text-columns/save.js.map +1 -1
- package/build/verse/deprecated.js.map +1 -1
- package/build/verse/edit.js.map +1 -1
- package/build/verse/save.js.map +1 -1
- package/build/video/edit.js +1 -1
- package/build/video/edit.js.map +1 -1
- package/build/video/edit.native.js +1 -1
- package/build/video/edit.native.js.map +1 -1
- package/build/video/tracks-editor.js +1 -1
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/archives/edit.js +1 -3
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/audio/deprecated.js +1 -2
- package/build-module/audio/deprecated.js.map +1 -1
- package/build-module/audio/edit.js +1 -3
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/edit.native.js +2 -4
- package/build-module/audio/edit.native.js.map +1 -1
- package/build-module/audio/save.js +1 -2
- package/build-module/audio/save.js.map +1 -1
- package/build-module/avatar/edit.js +1 -3
- package/build-module/avatar/edit.js.map +1 -1
- package/build-module/block/edit-title.native.js +1 -2
- package/build-module/block/edit-title.native.js.map +1 -1
- package/build-module/block/edit.js +1 -3
- package/build-module/block/edit.js.map +1 -1
- package/build-module/block/edit.native.js +3 -4
- package/build-module/block/edit.native.js.map +1 -1
- package/build-module/block-keyboard-shortcuts/index.js.map +1 -1
- package/build-module/button/color-background.native.js +1 -2
- package/build-module/button/color-background.native.js.map +1 -1
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/edit.js +1 -3
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/edit.native.js +1 -3
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/button/get-updated-link-attributes.js.map +1 -1
- package/build-module/button/save.js.map +1 -1
- package/build-module/buttons/deprecated.js.map +1 -1
- package/build-module/buttons/edit.native.js +1 -3
- package/build-module/buttons/edit.native.js.map +1 -1
- package/build-module/categories/edit.js +2 -4
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/column/deprecated.js.map +1 -1
- package/build-module/column/edit.js +2 -4
- package/build-module/column/edit.js.map +1 -1
- package/build-module/column/edit.native.js +1 -3
- package/build-module/column/edit.native.js.map +1 -1
- package/build-module/column/save.js.map +1 -1
- package/build-module/columns/deprecated.js.map +1 -1
- package/build-module/columns/edit.js +1 -3
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +2 -4
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/columns/save.js.map +1 -1
- package/build-module/columns/transforms.js.map +1 -1
- package/build-module/columns/utils.js.map +1 -1
- package/build-module/comment-author-avatar/edit.js +1 -3
- package/build-module/comment-author-avatar/edit.js.map +1 -1
- package/build-module/comment-author-name/edit.js +1 -3
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-content/edit.js +1 -3
- package/build-module/comment-content/edit.js.map +1 -1
- package/build-module/comment-date/edit.js +1 -3
- package/build-module/comment-date/edit.js.map +1 -1
- package/build-module/comment-edit-link/edit.js +1 -3
- package/build-module/comment-edit-link/edit.js.map +1 -1
- package/build-module/comment-reply-link/edit.js +1 -3
- package/build-module/comment-reply-link/edit.js.map +1 -1
- package/build-module/comment-template/edit.js +1 -2
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comment-template/hooks.js.map +1 -1
- package/build-module/comments/edit/comments-legacy.js +1 -3
- package/build-module/comments/edit/comments-legacy.js.map +1 -1
- package/build-module/comments/edit/index.js +1 -3
- package/build-module/comments/edit/index.js.map +1 -1
- package/build-module/comments/edit/placeholder.js +1 -2
- package/build-module/comments/edit/placeholder.js.map +1 -1
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js +1 -2
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
- package/build-module/comments-pagination/edit.js +1 -3
- package/build-module/comments-pagination/edit.js.map +1 -1
- package/build-module/comments-pagination-next/edit.js +1 -2
- package/build-module/comments-pagination-next/edit.js.map +1 -1
- package/build-module/comments-pagination-numbers/edit.js +1 -2
- package/build-module/comments-pagination-numbers/edit.js.map +1 -1
- package/build-module/comments-pagination-previous/edit.js +1 -2
- package/build-module/comments-pagination-previous/edit.js.map +1 -1
- package/build-module/comments-title/edit.js +3 -5
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/cover/controls.native.js +1 -3
- package/build-module/cover/controls.native.js.map +1 -1
- package/build-module/cover/deprecated.js +1 -2
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/block-controls.js +1 -3
- package/build-module/cover/edit/block-controls.js.map +1 -1
- package/build-module/cover/edit/index.js +1 -3
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +76 -34
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/edit.native.js +1 -3
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/save.js +1 -2
- package/build-module/cover/save.js.map +1 -1
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/details/edit.js +1 -3
- package/build-module/details/edit.js.map +1 -1
- package/build-module/details/save.js +1 -2
- package/build-module/details/save.js.map +1 -1
- package/build-module/embed/deprecated.js +1 -2
- package/build-module/embed/deprecated.js.map +1 -1
- package/build-module/embed/edit.js +17 -6
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/edit.native.js +1 -3
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-controls.js +1 -3
- package/build-module/embed/embed-controls.js.map +1 -1
- package/build-module/embed/embed-controls.native.js +1 -3
- package/build-module/embed/embed-controls.native.js.map +1 -1
- package/build-module/embed/embed-no-preview.native.js +1 -3
- package/build-module/embed/embed-no-preview.native.js.map +1 -1
- package/build-module/embed/embed-placeholder.js +1 -2
- package/build-module/embed/embed-placeholder.js.map +1 -1
- package/build-module/embed/embed-placeholder.native.js +1 -3
- package/build-module/embed/embed-placeholder.native.js.map +1 -1
- package/build-module/embed/embed-preview.js +6 -21
- package/build-module/embed/embed-preview.js.map +1 -1
- package/build-module/embed/embed-preview.native.js +2 -4
- package/build-module/embed/embed-preview.native.js.map +1 -1
- package/build-module/embed/icons.js +1 -2
- package/build-module/embed/icons.js.map +1 -1
- package/build-module/embed/save.js +1 -2
- package/build-module/embed/save.js.map +1 -1
- package/build-module/embed/transforms.js.map +1 -1
- package/build-module/embed/variations.js +1 -1
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/embed/wp-embed-preview.native.js.map +1 -1
- package/build-module/file/deprecated.js +4 -6
- package/build-module/file/deprecated.js.map +1 -1
- package/build-module/file/edit.js +1 -3
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/edit.native.js +1 -2
- package/build-module/file/edit.native.js.map +1 -1
- package/build-module/file/inspector.js +1 -3
- package/build-module/file/inspector.js.map +1 -1
- package/build-module/file/save.js +1 -3
- package/build-module/file/save.js.map +1 -1
- package/build-module/footnotes/edit.js +1 -2
- package/build-module/footnotes/edit.js.map +1 -1
- package/build-module/footnotes/format.js.map +1 -1
- package/build-module/form/edit.js +1 -3
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form-input/deprecated.js +1 -2
- package/build-module/form-input/deprecated.js.map +1 -1
- package/build-module/form-input/edit.js +1 -3
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/form-input/save.js +1 -2
- package/build-module/form-input/save.js.map +1 -1
- package/build-module/form-submission-notification/edit.js.map +1 -1
- package/build-module/form-submission-notification/save.js.map +1 -1
- package/build-module/freeform/edit.js +1 -3
- package/build-module/freeform/edit.js.map +1 -1
- package/build-module/freeform/modal.js +1 -3
- package/build-module/freeform/modal.js.map +1 -1
- package/build-module/gallery/deprecated.js +1 -2
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +3 -5
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.js +1 -2
- package/build-module/gallery/gallery.js.map +1 -1
- package/build-module/gallery/gallery.native.js +2 -3
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/gap-styles.js.map +1 -1
- package/build-module/gallery/save.js +1 -2
- package/build-module/gallery/save.js.map +1 -1
- package/build-module/group/edit.js +1 -3
- package/build-module/group/edit.js.map +1 -1
- package/build-module/group/edit.native.js +1 -2
- package/build-module/group/edit.native.js.map +1 -1
- package/build-module/group/placeholder.js.map +1 -1
- package/build-module/heading/deprecated.js.map +1 -1
- package/build-module/heading/edit.js +1 -3
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/edit.native.js +1 -3
- package/build-module/heading/edit.native.js.map +1 -1
- package/build-module/heading/index.js +2 -2
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/save.js.map +1 -1
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/home-link/edit.js +1 -2
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/html/edit.js +1 -3
- package/build-module/html/edit.js.map +1 -1
- package/build-module/html/preview.js +1 -3
- package/build-module/html/preview.js.map +1 -1
- package/build-module/image/deprecated.js +1 -3
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/edit.js +2 -4
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +2 -4
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +4 -6
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/save.js +1 -3
- package/build-module/image/save.js.map +1 -1
- package/build-module/image/view.js.map +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/latest-comments/edit.js +1 -2
- package/build-module/latest-comments/edit.js.map +1 -1
- package/build-module/latest-posts/edit.js +3 -5
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/latest-posts/edit.native.js +1 -3
- package/build-module/latest-posts/edit.native.js.map +1 -1
- package/build-module/list/edit.js +1 -3
- package/build-module/list/edit.js.map +1 -1
- package/build-module/list/ordered-list-settings.js +1 -2
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/list-item/edit.js +1 -3
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/edit.native.js +1 -2
- package/build-module/list-item/edit.native.js.map +1 -1
- package/build-module/list-item/list-style-type.native.js +1 -2
- package/build-module/list-item/list-style-type.native.js.map +1 -1
- package/build-module/list-item/save.js +1 -2
- package/build-module/list-item/save.js.map +1 -1
- package/build-module/loginout/edit.js +1 -3
- package/build-module/loginout/edit.js.map +1 -1
- package/build-module/media-text/deprecated.js +1 -2
- package/build-module/media-text/deprecated.js.map +1 -1
- package/build-module/media-text/edit.js +1 -3
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/edit.native.js +1 -3
- package/build-module/media-text/edit.native.js.map +1 -1
- package/build-module/media-text/icon-retry.native.js +1 -2
- package/build-module/media-text/icon-retry.native.js.map +1 -1
- package/build-module/media-text/image-fill.js.map +1 -1
- package/build-module/media-text/media-container.js +1 -2
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/media-container.native.js +1 -3
- package/build-module/media-text/media-container.native.js.map +1 -1
- package/build-module/media-text/save.js +1 -2
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/missing/edit.js +3 -4
- package/build-module/missing/edit.js.map +1 -1
- package/build-module/missing/edit.native.js +1 -2
- package/build-module/missing/edit.native.js.map +1 -1
- package/build-module/more/edit.js +1 -3
- package/build-module/more/edit.js.map +1 -1
- package/build-module/more/save.js.map +1 -1
- package/build-module/navigation/edit/accessible-menu-description.js.map +1 -1
- package/build-module/navigation/edit/index.js +1 -3
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/leaf-more-menu.js +2 -4
- package/build-module/navigation/edit/leaf-more-menu.js.map +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js +2 -3
- package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -3
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +1 -3
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-icon.js +1 -2
- package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +1 -3
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +1 -3
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/placeholder/placeholder-preview.js +1 -2
- package/build-module/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +1 -3
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build-module/navigation/edit/use-create-navigation-menu.js.map +1 -1
- package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
- package/build-module/navigation/edit/utils.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation-link/edit.js +1 -3
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/link-ui.js +1 -2
- package/build-module/navigation-link/link-ui.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +1 -3
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/nextpage/edit.native.js +1 -1
- package/build-module/nextpage/edit.native.js.map +1 -1
- package/build-module/page-list/convert-to-links-modal.js +1 -2
- package/build-module/page-list/convert-to-links-modal.js.map +1 -1
- package/build-module/page-list/edit.js +1 -3
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list-item/edit.js +2 -4
- package/build-module/page-list-item/edit.js.map +1 -1
- package/build-module/paragraph/deprecated.js.map +1 -1
- package/build-module/paragraph/edit.js +1 -3
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/edit.native.js +1 -3
- package/build-module/paragraph/edit.native.js.map +1 -1
- package/build-module/paragraph/save.js.map +1 -1
- package/build-module/pattern/recursion-detector.js +1 -0
- package/build-module/pattern/recursion-detector.js.map +1 -1
- package/build-module/post-author/edit.js +1 -3
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-author-biography/edit.js +1 -3
- package/build-module/post-author-biography/edit.js.map +1 -1
- package/build-module/post-author-name/edit.js +1 -3
- package/build-module/post-author-name/edit.js.map +1 -1
- package/build-module/post-comment/edit.js +1 -2
- package/build-module/post-comment/edit.js.map +1 -1
- package/build-module/post-comments-count/edit.js +1 -3
- package/build-module/post-comments-count/edit.js.map +1 -1
- package/build-module/post-comments-form/edit.js +1 -3
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-comments-form/form.js +2 -3
- package/build-module/post-comments-form/form.js.map +1 -1
- package/build-module/post-comments-link/edit.js +2 -4
- package/build-module/post-comments-link/edit.js.map +1 -1
- package/build-module/post-content/edit.js +32 -5
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-date/edit.js +1 -3
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -3
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +1 -3
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +1 -3
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/overlay-controls.js +1 -3
- package/build-module/post-featured-image/overlay-controls.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +1 -3
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-template/edit.js +1 -3
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +1 -3
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-time-to-read/edit.js +2 -4
- package/build-module/post-time-to-read/edit.js.map +1 -1
- package/build-module/post-title/edit.js +1 -3
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/pullquote/deprecated.js +1 -2
- package/build-module/pullquote/deprecated.js.map +1 -1
- package/build-module/pullquote/edit.js +1 -3
- package/build-module/pullquote/edit.js.map +1 -1
- package/build-module/pullquote/edit.native.js +1 -3
- package/build-module/pullquote/edit.native.js.map +1 -1
- package/build-module/pullquote/save.js +1 -2
- package/build-module/pullquote/save.js.map +1 -1
- package/build-module/pullquote/shared.js.map +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js +1 -2
- package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build-module/query/edit/index.js +1 -3
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +1 -0
- package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +1 -2
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +9 -14
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/parent-control.js +1 -0
- package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +1 -0
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/edit/pattern-selection-modal.js +2 -3
- package/build-module/query/edit/pattern-selection-modal.js.map +1 -1
- package/build-module/query/edit/query-content.js +1 -3
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +1 -2
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +1 -2
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query/view.js.map +1 -1
- package/build-module/query-pagination/edit.js +1 -3
- package/build-module/query-pagination/edit.js.map +1 -1
- package/build-module/query-pagination/query-pagination-arrow-controls.js +1 -2
- package/build-module/query-pagination/query-pagination-arrow-controls.js.map +1 -1
- package/build-module/query-pagination-next/edit.js +1 -2
- package/build-module/query-pagination-next/edit.js.map +1 -1
- package/build-module/query-pagination-numbers/edit.js +1 -3
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-pagination-previous/edit.js +1 -2
- package/build-module/query-pagination-previous/edit.js.map +1 -1
- package/build-module/query-title/edit.js +4 -6
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/quote/deprecated.js +1 -2
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/edit.js +1 -3
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/quote/save.js +1 -2
- package/build-module/quote/save.js.map +1 -1
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/read-more/edit.js +1 -3
- package/build-module/read-more/edit.js.map +1 -1
- package/build-module/rss/edit.js +1 -3
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/search/edit.js +1 -3
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +1 -2
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/search/icons.js +1 -2
- package/build-module/search/icons.js.map +1 -1
- package/build-module/separator/edit.js +1 -2
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/shortcode/edit.js.map +1 -1
- package/build-module/shortcode/edit.native.js +1 -2
- package/build-module/shortcode/edit.native.js.map +1 -1
- package/build-module/site-logo/edit.js +1 -3
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-tagline/edit.js +1 -3
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-title/edit.js +1 -3
- package/build-module/site-title/edit.js.map +1 -1
- package/build-module/social-link/edit.js +1 -3
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/edit.native.js +1 -3
- package/build-module/social-link/edit.native.js.map +1 -1
- package/build-module/social-links/deprecated.js.map +1 -1
- package/build-module/social-links/edit.js +1 -3
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/spacer/controls.js +1 -3
- package/build-module/spacer/controls.js.map +1 -1
- package/build-module/spacer/controls.native.js +1 -2
- package/build-module/spacer/controls.native.js.map +1 -1
- package/build-module/spacer/deprecated.js.map +1 -1
- package/build-module/spacer/edit.js +1 -3
- package/build-module/spacer/edit.js.map +1 -1
- package/build-module/table/deprecated.js +1 -2
- package/build-module/table/deprecated.js.map +1 -1
- package/build-module/table/edit.js +1 -3
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/save.js +1 -2
- package/build-module/table/save.js.map +1 -1
- package/build-module/table-of-contents/edit.js +2 -4
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/table-of-contents/hooks.js.map +1 -1
- package/build-module/table-of-contents/list.js +1 -3
- package/build-module/table-of-contents/list.js.map +1 -1
- package/build-module/tag-cloud/edit.js +1 -3
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +2 -4
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/import-controls.js +3 -3
- package/build-module/template-part/edit/import-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js +3 -5
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/placeholder.js +1 -2
- package/build-module/template-part/edit/placeholder.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +3 -4
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/template-part/edit/title-modal.js +1 -2
- package/build-module/template-part/edit/title-modal.js.map +1 -1
- package/build-module/template-part/edit/utils/hooks.js.map +1 -1
- package/build-module/template-part/variations.js.map +1 -1
- package/build-module/term-description/edit.js +1 -3
- package/build-module/term-description/edit.js.map +1 -1
- package/build-module/text-columns/edit.js +1 -3
- package/build-module/text-columns/edit.js.map +1 -1
- package/build-module/text-columns/save.js.map +1 -1
- package/build-module/utils/caption.js +1 -3
- package/build-module/utils/caption.js.map +1 -1
- package/build-module/verse/deprecated.js.map +1 -1
- package/build-module/verse/edit.js +1 -3
- package/build-module/verse/edit.js.map +1 -1
- package/build-module/verse/save.js.map +1 -1
- package/build-module/video/deprecated.js +1 -2
- package/build-module/video/deprecated.js.map +1 -1
- package/build-module/video/edit-common-settings.js +1 -3
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-module/video/edit.js +2 -4
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/edit.native.js +2 -3
- package/build-module/video/edit.native.js.map +1 -1
- package/build-module/video/icon-retry.native.js +1 -2
- package/build-module/video/icon-retry.native.js.map +1 -1
- package/build-module/video/save.js +1 -2
- package/build-module/video/save.js.map +1 -1
- package/build-module/video/tracks-editor.js +2 -4
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/code/style-rtl.css +2 -0
- package/build-style/code/style.css +4 -0
- package/build-style/common-rtl.css +0 -2
- package/build-style/common.css +0 -2
- package/build-style/post-content/style-rtl.css +2 -4
- package/build-style/post-content/style.css +2 -4
- package/build-style/style-rtl.css +4 -6
- package/build-style/style.css +6 -6
- package/package.json +36 -36
- package/src/code/style.scss +5 -0
- package/src/common.scss +0 -3
- package/src/cover/edit/inspector-controls.js +103 -44
- package/src/cover/index.php +38 -19
- package/src/cover/test/edit.js +2 -2
- package/src/embed/edit.js +19 -2
- package/src/embed/embed-preview.js +2 -18
- package/src/image/index.php +1 -1
- package/src/post-content/edit.js +30 -1
- package/src/post-content/style.scss +2 -4
- package/src/post-terms/index.php +7 -6
- package/src/query/edit/inspector-controls/index.js +10 -16
- package/src/query/edit/pattern-selection-modal.js +1 -1
- package/src/template-part/edit/selection-modal.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_data","_blockEditor","_coreData","_components","_jsxRuntime","Edit","attributes","isLink","linkTarget","textAlign","context","commentId","setAttributes","blockProps","useBlockProps","className","clsx","displayName","useSelect","select","getEntityRecord","coreStore","comment","authorName","author_name","_user$name","user","author","name","__","blockControls","jsx","BlockControls","group","children","AlignmentControl","value","onChange","newAlign","inspectorControls","InspectorControls","jsxs","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","label","checked","_x","displayAuthor","href","onClick","event","preventDefault","Fragment"],"sources":["@wordpress/block-library/src/comment-author-name/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\n\n/**\n * Renders the `core/comment-author-name` 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.isLink Whether the author name should be linked.\n * @param {string} props.attributes.linkTarget Target of the link.\n * @param {string} props.attributes.textAlign Text alignment.\n * @param {Object} props.context Inherited context.\n * @param {string} props.context.commentId The comment ID.\n *\n * @return {JSX.Element} React element.\n */\nexport default function Edit( {\n\tattributes: { isLink, linkTarget, textAlign },\n\tcontext: { commentId },\n\tsetAttributes,\n} ) {\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\tlet displayName = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\n\t\t\tconst comment = getEntityRecord( 'root', 'comment', commentId );\n\t\t\tconst authorName = comment?.author_name; // eslint-disable-line camelcase\n\n\t\t\tif ( comment && ! authorName ) {\n\t\t\t\tconst user = getEntityRecord( 'root', 'user', comment.author );\n\t\t\t\treturn user?.name ?? __( 'Anonymous' );\n\t\t\t}\n\t\t\treturn authorName ?? '';\n\t\t},\n\t\t[ commentId ]\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\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Link to authors URL' ) }\n\t\t\t\t\tonChange={ () => setAttributes( { isLink: ! isLink } ) }\n\t\t\t\t\tchecked={ isLink }\n\t\t\t\t/>\n\t\t\t\t{ isLink && (\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tif ( ! commentId || ! displayName ) {\n\t\tdisplayName = _x( 'Comment Author', 'block title' );\n\t}\n\n\tconst displayAuthor = isLink ? (\n\t\t<a\n\t\t\thref=\"#comment-author-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t>\n\t\t\t{ displayName }\n\t\t</a>\n\t) : (\n\t\tdisplayName\n\t);\n\treturn (\n\t\t<>\n\t\t\t{ inspectorControls }\n\t\t\t{ blockControls }\n\t\t\t<div { ...blockProps }>{ displayAuthor }</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAMA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAAiE,IAAAM,WAAA,GAAAN,OAAA;AAjBjE;AACA;AACA;;AAGA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACe,SAASO,IAAIA,CAAE;EAC7BC,UAAU,EAAE;IAAEC,MAAM;IAAEC,UAAU;IAAEC;EAAU,CAAC;EAC7CC,OAAO,EAAE;IAAEC;EAAU,CAAC;EACtBC;AACD,CAAC,EAAG;EACH,MAAMC,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_data","_blockEditor","_coreData","_components","_jsxRuntime","Edit","attributes","isLink","linkTarget","textAlign","context","commentId","setAttributes","blockProps","useBlockProps","className","clsx","displayName","useSelect","select","getEntityRecord","coreStore","comment","authorName","author_name","_user$name","user","author","name","__","blockControls","jsx","BlockControls","group","children","AlignmentControl","value","onChange","newAlign","inspectorControls","InspectorControls","jsxs","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","label","checked","_x","displayAuthor","href","onClick","event","preventDefault","Fragment"],"sources":["@wordpress/block-library/src/comment-author-name/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\n\n/**\n * Renders the `core/comment-author-name` 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.isLink Whether the author name should be linked.\n * @param {string} props.attributes.linkTarget Target of the link.\n * @param {string} props.attributes.textAlign Text alignment.\n * @param {Object} props.context Inherited context.\n * @param {string} props.context.commentId The comment ID.\n *\n * @return {JSX.Element} React element.\n */\nexport default function Edit( {\n\tattributes: { isLink, linkTarget, textAlign },\n\tcontext: { commentId },\n\tsetAttributes,\n} ) {\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\tlet displayName = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\n\t\t\tconst comment = getEntityRecord( 'root', 'comment', commentId );\n\t\t\tconst authorName = comment?.author_name; // eslint-disable-line camelcase\n\n\t\t\tif ( comment && ! authorName ) {\n\t\t\t\tconst user = getEntityRecord( 'root', 'user', comment.author );\n\t\t\t\treturn user?.name ?? __( 'Anonymous' );\n\t\t\t}\n\t\t\treturn authorName ?? '';\n\t\t},\n\t\t[ commentId ]\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\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Link to authors URL' ) }\n\t\t\t\t\tonChange={ () => setAttributes( { isLink: ! isLink } ) }\n\t\t\t\t\tchecked={ isLink }\n\t\t\t\t/>\n\t\t\t\t{ isLink && (\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tif ( ! commentId || ! displayName ) {\n\t\tdisplayName = _x( 'Comment Author', 'block title' );\n\t}\n\n\tconst displayAuthor = isLink ? (\n\t\t<a\n\t\t\thref=\"#comment-author-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t>\n\t\t\t{ displayName }\n\t\t</a>\n\t) : (\n\t\tdisplayName\n\t);\n\treturn (\n\t\t<>\n\t\t\t{ inspectorControls }\n\t\t\t{ blockControls }\n\t\t\t<div { ...blockProps }>{ displayAuthor }</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA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W,EAAG;IACnCA,WAAW,GAAG,IAAA+B,QAAE,EAAE,gBAAgB,EAAE,aAAc,CAAC;EACpD;EAEA,MAAMC,aAAa,GAAG1C,MAAM,gBAC3B,IAAAH,WAAA,CAAA2B,GAAA;IACCmB,IAAI,EAAC,6BAA6B;IAClCC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;IAAAnB,QAAA,EAE7CjB;EAAW,CACX,CAAC,GAEJA,WACA;EACD,oBACC,IAAAb,WAAA,CAAAqC,IAAA,EAAArC,WAAA,CAAAkD,QAAA;IAAApB,QAAA,GACGK,iBAAiB,EACjBT,aAAa,eACf,IAAA1B,WAAA,CAAA2B,GAAA;MAAA,GAAUlB,UAAU;MAAAqB,QAAA,EAAKe;IAAa,CAAO,CAAC;EAAA,CAC7C,CAAC;AAEL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_components","_coreData","_blockEditor","_jsxRuntime","Edit","setAttributes","attributes","textAlign","context","commentId","blockProps","useBlockProps","className","clsx","content","useEntityProp","blockControls","jsx","BlockControls","group","children","AlignmentControl","value","onChange","newAlign","jsxs","Fragment","_x","Disabled","RawHTML","rendered"],"sources":["@wordpress/block-library/src/comment-content/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { RawHTML } from '@wordpress/element';\nimport { Disabled } from '@wordpress/components';\nimport { useEntityProp } from '@wordpress/core-data';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\n\n/**\n * Renders the `core/comment-content` 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 * @param {Object} props.context Inherited context.\n * @param {string} props.context.commentId The comment ID.\n *\n * @return {JSX.Element} React element.\n */\nexport default function Edit( {\n\tsetAttributes,\n\tattributes: { textAlign },\n\tcontext: { commentId },\n} ) {\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\tconst [ content ] = useEntityProp(\n\t\t'root',\n\t\t'comment',\n\t\t'content',\n\t\tcommentId\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\tif ( ! commentId || ! content ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ blockControls }\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t<p>{ _x( 'Comment Content', 'block title' ) }</p>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<Disabled>\n\t\t\t\t\t<RawHTML key=\"html\">{ content.rendered }</RawHTML>\n\t\t\t\t</Disabled>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAIiC,IAAAM,WAAA,GAAAN,OAAA;AAhBjC;AACA;AACA;;AAGA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACe,SAASO,IAAIA,CAAE;EAC7BC,aAAa;EACbC,UAAU,EAAE;IAAEC;EAAU,CAAC;EACzBC,OAAO,EAAE;IAAEC;EAAU;AACtB,CAAC,EAAG;EACH,MAAMC,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_components","_coreData","_blockEditor","_jsxRuntime","Edit","setAttributes","attributes","textAlign","context","commentId","blockProps","useBlockProps","className","clsx","content","useEntityProp","blockControls","jsx","BlockControls","group","children","AlignmentControl","value","onChange","newAlign","jsxs","Fragment","_x","Disabled","RawHTML","rendered"],"sources":["@wordpress/block-library/src/comment-content/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { RawHTML } from '@wordpress/element';\nimport { Disabled } from '@wordpress/components';\nimport { useEntityProp } from '@wordpress/core-data';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\n\n/**\n * Renders the `core/comment-content` 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 * @param {Object} props.context Inherited context.\n * @param {string} props.context.commentId The comment ID.\n *\n * @return {JSX.Element} React element.\n */\nexport default function Edit( {\n\tsetAttributes,\n\tattributes: { textAlign },\n\tcontext: { commentId },\n} ) {\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\tconst [ content ] = useEntityProp(\n\t\t'root',\n\t\t'comment',\n\t\t'content',\n\t\tcommentId\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\tif ( ! commentId || ! content ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ blockControls }\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t<p>{ _x( 'Comment Content', 'block title' ) }</p>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<Disabled>\n\t\t\t\t\t<RawHTML key=\"html\">{ content.rendered }</RawHTML>\n\t\t\t\t</Disabled>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAIiC,IAAAM,WAAA,GAAAN,OAAA;AAhBjC;AACA;AACA;;AAGA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACe,SAASO,IAAIA,CAAE;EAC7BC,aAAa;EACbC,UAAU,EAAE;IAAEC;EAAU,CAAC;EACzBC,OAAO,EAAE;IAAEC;EAAU;AACtB,CAAC,EAAG;EACH,MAAMC,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,CAAE,kBAAmBN,SAAS,EAAG,GAAIA;IACtC,CAAE;EACH,CAAE,CAAC;EACH,MAAM,CAAEO,OAAO,CAAE,GAAG,IAAAC,uBAAa,EAChC,MAAM,EACN,SAAS,EACT,SAAS,EACTN,SACD,CAAC;EAED,MAAMO,aAAa,gBAClB,IAAAb,WAAA,CAAAc,GAAA,EAACf,YAAA,CAAAgB,aAAa;IAACC,KAAK,EAAC,OAAO;IAAAC,QAAA,eAC3B,IAAAjB,WAAA,CAAAc,GAAA,EAACf,YAAA,CAAAmB,gBAAgB;MAChBC,KAAK,EAAGf,SAAW;MACnBgB,QAAQ,EAAKC,QAAQ,IACpBnB,aAAa,CAAE;QAAEE,SAAS,EAAEiB;MAAS,CAAE;IACvC,CACD;EAAC,CACY,CACf;EAED,IAAK,CAAEf,SAAS,IAAI,CAAEK,OAAO,EAAG;IAC/B,oBACC,IAAAX,WAAA,CAAAsB,IAAA,EAAAtB,WAAA,CAAAuB,QAAA;MAAAN,QAAA,GACGJ,aAAa,eACf,IAAAb,WAAA,CAAAc,GAAA;QAAA,GAAUP,UAAU;QAAAU,QAAA,eACnB,IAAAjB,WAAA,CAAAc,GAAA;UAAAG,QAAA,EAAK,IAAAO,QAAE,EAAE,iBAAiB,EAAE,aAAc;QAAC,CAAK;MAAC,CAC7C,CAAC;IAAA,CACL,CAAC;EAEL;EAEA,oBACC,IAAAxB,WAAA,CAAAsB,IAAA,EAAAtB,WAAA,CAAAuB,QAAA;IAAAN,QAAA,GACGJ,aAAa,eACf,IAAAb,WAAA,CAAAc,GAAA;MAAA,GAAUP,UAAU;MAAAU,QAAA,eACnB,IAAAjB,WAAA,CAAAc,GAAA,EAACjB,WAAA,CAAA4B,QAAQ;QAAAR,QAAA,eACR,IAAAjB,WAAA,CAAAc,GAAA,EAAClB,QAAA,CAAA8B,OAAO;UAAAT,QAAA,EAAcN,OAAO,CAACgB;QAAQ,GAAzB,MAAoC;MAAC,CACzC;IAAC,CACP,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_i18n","_jsxRuntime","Edit","attributes","linkTarget","textAlign","setAttributes","blockProps","useBlockProps","className","clsx","blockControls","jsx","BlockControls","group","children","AlignmentControl","value","onChange","newAlign","inspectorControls","InspectorControls","PanelBody","title","__","ToggleControl","__nextHasNoMarginBottom","label","checked","jsxs","Fragment","href","onClick","event","preventDefault"],"sources":["@wordpress/block-library/src/comment-edit-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function Edit( {\n\tattributes: { linkTarget, textAlign },\n\tsetAttributes,\n} ) {\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\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\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<a\n\t\t\t\t\thref=\"#edit-comment-pseudo-link\"\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAAqC,IAAAI,WAAA,GAAAJ,OAAA;AAfrC;AACA;AACA;;AAGA;AACA;AACA;;AAUe,SAASK,IAAIA,CAAE;EAC7BC,UAAU,EAAE;IAAEC,UAAU;IAAEC;EAAU,CAAC;EACrCC;AACD,CAAC,EAAG;EACH,MAAMC,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_i18n","_jsxRuntime","Edit","attributes","linkTarget","textAlign","setAttributes","blockProps","useBlockProps","className","clsx","blockControls","jsx","BlockControls","group","children","AlignmentControl","value","onChange","newAlign","inspectorControls","InspectorControls","PanelBody","title","__","ToggleControl","__nextHasNoMarginBottom","label","checked","jsxs","Fragment","href","onClick","event","preventDefault"],"sources":["@wordpress/block-library/src/comment-edit-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function Edit( {\n\tattributes: { linkTarget, textAlign },\n\tsetAttributes,\n} ) {\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\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\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<a\n\t\t\t\t\thref=\"#edit-comment-pseudo-link\"\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAAqC,IAAAI,WAAA,GAAAJ,OAAA;AAfrC;AACA;AACA;;AAGA;AACA;AACA;;AAUe,SAASK,IAAIA,CAAE;EAC7BC,UAAU,EAAE;IAAEC,UAAU;IAAEC;EAAU,CAAC;EACrCC;AACD,CAAC,EAAG;EACH,MAAMC,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,CAAE,kBA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,MAAO;MAAC,CACZ;IAAC,CACA,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_blockEditor","_jsxRuntime","Edit","setAttributes","attributes","textAlign","blockProps","useBlockProps","className","clsx","blockControls","jsx","BlockControls","group","children","AlignmentControl","value","onChange","newAlign","jsxs","Fragment","href","onClick","event","preventDefault","__","_default","exports","default"],"sources":["@wordpress/block-library/src/comment-reply-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\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: clsx( {\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"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAIiC,IAAAG,WAAA,GAAAH,OAAA;AAbjC;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,SAASI,IAAIA,CAAE;EAAEC,aAAa;EAAEC,UAAU,EAAE;IAAEC;EAAU;AAAE,CAAC,EAAG;EAC7D,MAAMC,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_blockEditor","_jsxRuntime","Edit","setAttributes","attributes","textAlign","blockProps","useBlockProps","className","clsx","blockControls","jsx","BlockControls","group","children","AlignmentControl","value","onChange","newAlign","jsxs","Fragment","href","onClick","event","preventDefault","__","_default","exports","default"],"sources":["@wordpress/block-library/src/comment-reply-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\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: clsx( {\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"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAIiC,IAAAG,WAAA,GAAAH,OAAA;AAbjC;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,SAASI,IAAIA,CAAE;EAAEC,aAAa;EAAEC,UAAU,EAAE;IAAEC;EAAU;AAAE,CAAC,EAAG;EAC7D,MAAMC,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,CAAE,kBAAmBJ,SAAS,EAAG,GAAIA;IACtC,CAAE;EACH,CAAE,CAAC;EAEH,MAAMK,aAAa,gBAClB,IAAAT,WAAA,CAAAU,GAAA,EAACX,YAAA,CAAAY,aAAa;IAACC,KAAK,EAAC,OAAO;IAAAC,QAAA,eAC3B,IAAAb,WAAA,CAAAU,GAAA,EAACX,YAAA,CAAAe,gBAAgB;MAChBC,KAAK,EAAGX,SAAW;MACnBY,QAAQ,EAAKC,QAAQ,IACpBf,aAAa,CAAE;QAAEE,SAAS,EAAEa;MAAS,CAAE;IACvC,CACD;EAAC,CACY,CACf;EAED,oBACC,IAAAjB,WAAA,CAAAkB,IAAA,EAAAlB,WAAA,CAAAmB,QAAA;IAAAN,QAAA,GACGJ,aAAa,eACf,IAAAT,WAAA,CAAAU,GAAA;MAAA,GAAUL,UAAU;MAAAQ,QAAA,eACnB,IAAAb,WAAA,CAAAU,GAAA;QACCU,IAAI,EAAC,4BAA4B;QACjCC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;QAAAV,QAAA,EAE7C,IAAAW,QAAE,EAAE,OAAQ;MAAC,CACb;IAAC,CACA,CAAC;EAAA,CACL,CAAC;AAEL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc1B,IAAI","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_data","_blockEditor","_url","_apiFetch","_interopRequireDefault","MAX_COMMENTS_PER_PAGE","useCommentQueryArgs","postId","queryArgs","status","order","context","parent","_embed","pageComments","commentsPerPage","defaultCommentsPage","defaultPage","useSelect","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","perPage","Math","min","page","useDefaultPageIndex","useMemo","post","per_page","exports","defaultPages","setDefaultPages","useState","key","useEffect","apiFetch","path","addQueryArgs","_fields","method","parse","then","res","pages","parseInt","headers","get","useCommentTree","topLevelComments","commentTree","map","id","_embedded","children","commentId","child"],"sources":["@wordpress/block-library/src/comment-template/hooks.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\n\n// This is limited by WP REST API\nconst MAX_COMMENTS_PER_PAGE = 100;\n\n/**\n * Return an object with the query args needed to fetch the default page of\n * comments.\n *\n * @param {Object} props Hook props.\n * @param {number} props.postId ID of the post that contains the comments.\n * discussion settings.\n *\n * @return {Object} Query args to retrieve the comments.\n */\nexport const useCommentQueryArgs = ( { postId } ) => {\n\t// Initialize the query args that are not going to change.\n\tconst queryArgs = {\n\t\tstatus: 'approve',\n\t\torder: 'asc',\n\t\tcontext: 'embed',\n\t\tparent: 0,\n\t\t_embed: 'children',\n\t};\n\n\t// Get the Discussion settings that may be needed to query the comments.\n\tconst {\n\t\tpageComments,\n\t\tcommentsPerPage,\n\t\tdefaultCommentsPage: defaultPage,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\treturn __experimentalDiscussionSettings;\n\t} );\n\n\t// WP REST API doesn't allow fetching more than max items limit set per single page of data.\n\t// As for the editor performance is more important than completeness of data and fetching only the\n\t// max allowed for single page should be enough for the purpose of design and laying out the page.\n\t// Fetching over the limit would return an error here but would work with backend query.\n\tconst perPage = pageComments\n\t\t? Math.min( commentsPerPage, MAX_COMMENTS_PER_PAGE )\n\t\t: MAX_COMMENTS_PER_PAGE;\n\n\t// Get the number of the default page.\n\tconst page = useDefaultPageIndex( {\n\t\tdefaultPage,\n\t\tpostId,\n\t\tperPage,\n\t\tqueryArgs,\n\t} );\n\n\t// Merge, memoize and return all query arguments, unless the default page's\n\t// number is not known yet.\n\treturn useMemo( () => {\n\t\treturn page\n\t\t\t? {\n\t\t\t\t\t...queryArgs,\n\t\t\t\t\tpost: postId,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t\tpage,\n\t\t\t }\n\t\t\t: null;\n\t}, [ postId, perPage, page ] );\n};\n\n/**\n * Return the index of the default page, depending on whether `defaultPage` is\n * `newest` or `oldest`. In the first case, the only way to know the page's\n * index is by using the `X-WP-TotalPages` header, which forces to make an\n * additional request.\n *\n * @param {Object} props Hook props.\n * @param {string} props.defaultPage Page shown by default (newest/oldest).\n * @param {number} props.postId ID of the post that contains the comments.\n * @param {number} props.perPage The number of comments included per page.\n * @param {Object} props.queryArgs Other query args.\n *\n * @return {number} Index of the default comments page.\n */\nconst useDefaultPageIndex = ( { defaultPage, postId, perPage, queryArgs } ) => {\n\t// Store the default page indices.\n\tconst [ defaultPages, setDefaultPages ] = useState( {} );\n\tconst key = `${ postId }_${ perPage }`;\n\tconst page = defaultPages[ key ] || 0;\n\n\tuseEffect( () => {\n\t\t// Do nothing if the page is already known or not the newest page.\n\t\tif ( page || defaultPage !== 'newest' ) {\n\t\t\treturn;\n\t\t}\n\t\t// We need to fetch comments to know the index. Use HEAD and limit\n\t\t// fields just to ID, to make this call as light as possible.\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\t...queryArgs,\n\t\t\t\tpost: postId,\n\t\t\t\tper_page: perPage,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} ).then( ( res ) => {\n\t\t\tconst pages = parseInt( res.headers.get( 'X-WP-TotalPages' ) );\n\t\t\tsetDefaultPages( {\n\t\t\t\t...defaultPages,\n\t\t\t\t[ key ]: pages <= 1 ? 1 : pages, // If there are 0 pages, it means that there are no comments, but there is no 0th page.\n\t\t\t} );\n\t\t} );\n\t}, [ defaultPage, postId, perPage, setDefaultPages ] );\n\n\t// The oldest one is always the first one.\n\treturn defaultPage === 'newest' ? page : 1;\n};\n\n/**\n * Generate a tree structure of comment IDs from a list of comment entities. The\n * children of each comment are obtained from `_embedded`.\n *\n * @typedef {{ commentId: number, children: CommentNode }} CommentNode\n *\n * @param {Object[]} topLevelComments List of comment entities.\n * @return {{ commentTree: CommentNode[]}} Tree of comment IDs.\n */\nexport const useCommentTree = ( topLevelComments ) => {\n\tconst commentTree = useMemo(\n\t\t() =>\n\t\t\ttopLevelComments?.map( ( { id, _embedded } ) => {\n\t\t\t\tconst [ children ] = _embedded?.children || [ [] ];\n\t\t\t\treturn {\n\t\t\t\t\tcommentId: id,\n\t\t\t\t\tchildren: children.map( ( child ) => ( {\n\t\t\t\t\t\tcommentId: child.id,\n\t\t\t\t\t} ) ),\n\t\t\t\t};\n\t\t\t} ),\n\t\t[ topLevelComments ]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AAI;EACR,CAAC,EAAE,CAAEnB,MAAM,EAAEgB,OAAO,EAAEG,IAAI,CAAG,CAAC;AAC/B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAbAK,OAAA,CAAAzB,mBAAA,GAAAA,mBAAA;AAcA,MAAMqB,mBAAmB,GAAGA,CAAE;EAAEV,WAAW;EAAEV,MAAM;EAAEgB,OAAO;EAAEf;AAAU,CAAC,KAAM;EAC9E;EACA,MAAM,CAAEwB,YAAY,EAAEC,eAAe,CAAE,GAAG,IAAAC,iBAAQ,EAAE,CAAC,CAAE,CAAC;EACxD,MAAMC,GAAG,
|
|
1
|
+
{"version":3,"names":["_element","require","_data","_blockEditor","_url","_apiFetch","_interopRequireDefault","MAX_COMMENTS_PER_PAGE","useCommentQueryArgs","postId","queryArgs","status","order","context","parent","_embed","pageComments","commentsPerPage","defaultCommentsPage","defaultPage","useSelect","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","perPage","Math","min","page","useDefaultPageIndex","useMemo","post","per_page","exports","defaultPages","setDefaultPages","useState","key","useEffect","apiFetch","path","addQueryArgs","_fields","method","parse","then","res","pages","parseInt","headers","get","useCommentTree","topLevelComments","commentTree","map","id","_embedded","children","commentId","child"],"sources":["@wordpress/block-library/src/comment-template/hooks.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\n\n// This is limited by WP REST API\nconst MAX_COMMENTS_PER_PAGE = 100;\n\n/**\n * Return an object with the query args needed to fetch the default page of\n * comments.\n *\n * @param {Object} props Hook props.\n * @param {number} props.postId ID of the post that contains the comments.\n * discussion settings.\n *\n * @return {Object} Query args to retrieve the comments.\n */\nexport const useCommentQueryArgs = ( { postId } ) => {\n\t// Initialize the query args that are not going to change.\n\tconst queryArgs = {\n\t\tstatus: 'approve',\n\t\torder: 'asc',\n\t\tcontext: 'embed',\n\t\tparent: 0,\n\t\t_embed: 'children',\n\t};\n\n\t// Get the Discussion settings that may be needed to query the comments.\n\tconst {\n\t\tpageComments,\n\t\tcommentsPerPage,\n\t\tdefaultCommentsPage: defaultPage,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\treturn __experimentalDiscussionSettings;\n\t} );\n\n\t// WP REST API doesn't allow fetching more than max items limit set per single page of data.\n\t// As for the editor performance is more important than completeness of data and fetching only the\n\t// max allowed for single page should be enough for the purpose of design and laying out the page.\n\t// Fetching over the limit would return an error here but would work with backend query.\n\tconst perPage = pageComments\n\t\t? Math.min( commentsPerPage, MAX_COMMENTS_PER_PAGE )\n\t\t: MAX_COMMENTS_PER_PAGE;\n\n\t// Get the number of the default page.\n\tconst page = useDefaultPageIndex( {\n\t\tdefaultPage,\n\t\tpostId,\n\t\tperPage,\n\t\tqueryArgs,\n\t} );\n\n\t// Merge, memoize and return all query arguments, unless the default page's\n\t// number is not known yet.\n\treturn useMemo( () => {\n\t\treturn page\n\t\t\t? {\n\t\t\t\t\t...queryArgs,\n\t\t\t\t\tpost: postId,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t\tpage,\n\t\t\t }\n\t\t\t: null;\n\t}, [ postId, perPage, page ] );\n};\n\n/**\n * Return the index of the default page, depending on whether `defaultPage` is\n * `newest` or `oldest`. In the first case, the only way to know the page's\n * index is by using the `X-WP-TotalPages` header, which forces to make an\n * additional request.\n *\n * @param {Object} props Hook props.\n * @param {string} props.defaultPage Page shown by default (newest/oldest).\n * @param {number} props.postId ID of the post that contains the comments.\n * @param {number} props.perPage The number of comments included per page.\n * @param {Object} props.queryArgs Other query args.\n *\n * @return {number} Index of the default comments page.\n */\nconst useDefaultPageIndex = ( { defaultPage, postId, perPage, queryArgs } ) => {\n\t// Store the default page indices.\n\tconst [ defaultPages, setDefaultPages ] = useState( {} );\n\tconst key = `${ postId }_${ perPage }`;\n\tconst page = defaultPages[ key ] || 0;\n\n\tuseEffect( () => {\n\t\t// Do nothing if the page is already known or not the newest page.\n\t\tif ( page || defaultPage !== 'newest' ) {\n\t\t\treturn;\n\t\t}\n\t\t// We need to fetch comments to know the index. Use HEAD and limit\n\t\t// fields just to ID, to make this call as light as possible.\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\t...queryArgs,\n\t\t\t\tpost: postId,\n\t\t\t\tper_page: perPage,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} ).then( ( res ) => {\n\t\t\tconst pages = parseInt( res.headers.get( 'X-WP-TotalPages' ) );\n\t\t\tsetDefaultPages( {\n\t\t\t\t...defaultPages,\n\t\t\t\t[ key ]: pages <= 1 ? 1 : pages, // If there are 0 pages, it means that there are no comments, but there is no 0th page.\n\t\t\t} );\n\t\t} );\n\t}, [ defaultPage, postId, perPage, setDefaultPages ] );\n\n\t// The oldest one is always the first one.\n\treturn defaultPage === 'newest' ? page : 1;\n};\n\n/**\n * Generate a tree structure of comment IDs from a list of comment entities. The\n * children of each comment are obtained from `_embedded`.\n *\n * @typedef {{ commentId: number, children: CommentNode }} CommentNode\n *\n * @param {Object[]} topLevelComments List of comment entities.\n * @return {{ commentTree: CommentNode[]}} Tree of comment IDs.\n */\nexport const useCommentTree = ( topLevelComments ) => {\n\tconst commentTree = useMemo(\n\t\t() =>\n\t\t\ttopLevelComments?.map( ( { id, _embedded } ) => {\n\t\t\t\tconst [ children ] = _embedded?.children || [ [] ];\n\t\t\t\treturn {\n\t\t\t\t\tcommentId: id,\n\t\t\t\t\tchildren: children.map( ( child ) => ( {\n\t\t\t\t\t\tcommentId: child.id,\n\t\t\t\t\t} ) ),\n\t\t\t\t};\n\t\t\t} ),\n\t\t[ topLevelComments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EU,eAAe,CAAG,CAAC;;EAEtD;EACA,OAAOhB,WAAW,KAAK,QAAQ,GAAGS,IAAI,GAAG,CAAC;AAC3C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMuB,cAAc,GAAKC,gBAAgB,IAAM;EACrD,MAAMC,WAAW,GAAG,IAAAvB,gBAAO,EAC1B,MACCsB,gBAAgB,EAAEE,GAAG,CAAE,CAAE;IAAEC,EAAE;IAAEC;EAAU,CAAC,KAAM;IAC/C,MAAM,CAAEC,QAAQ,CAAE,GAAGD,SAAS,EAAEC,QAAQ,IAAI,CAAE,EAAE,CAAE;IAClD,OAAO;MACNC,SAAS,EAAEH,EAAE;MACbE,QAAQ,EAAEA,QAAQ,CAACH,GAAG,CAAIK,KAAK,KAAQ;QACtCD,SAAS,EAAEC,KAAK,CAACJ;MAClB,CAAC,CAAG;IACL,CAAC;EACF,CAAE,CAAC,EACJ,CAAEH,gBAAgB,CACnB,CAAC;EAED,OAAOC,WAAW;AACnB,CAAC;AAACpB,OAAA,CAAAkB,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_i18n","_components","_placeholder","_jsxRuntime","CommentsLegacy","attributes","setAttributes","context","postType","postId","textAlign","actions","jsx","Button","__next40pxDefaultSize","onClick","legacy","variant","children","__","blockProps","useBlockProps","className","clsx","jsxs","Fragment","BlockControls","group","AlignmentControl","value","onChange","nextAlign","Warning","default"],"sources":["@wordpress/block-library/src/comments/edit/comments-legacy.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\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\t__next40pxDefaultSize\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: clsx( {\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"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAwC,IAAAK,WAAA,GAAAL,OAAA;AApBxC;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;AAGe,SAASM,cAAcA,CAAE;EACvCC,UAAU;EACVC,aAAa;EACbC,OAAO,EAAE;IAAEC,QAAQ;IAAEC;EAAO;AAC7B,CAAC,EAAG;EACH,MAAM;IAAEC;EAAU,CAAC,GAAGL,UAAU;EAEhC,MAAMM,OAAO,GAAG,cACf,IAAAR,WAAA,CAAAS,GAAA,EAACX,WAAA,CAAAY,MAAM;IACNC,qBAAqB;IAErBC,OAAO,EAAGA,CAAA,KAAM,KAAKT,aAAa,CAAE;MAAEU,MAAM,EAAE;IAAM,CAAE,CAAG;IACzDC,OAAO,EAAC,SAAS;IAAAC,QAAA,EAEf,IAAAC,QAAE,EAAE,yBAA0B;EAAC,GAJ7B,SAKG,CAAC,CACT;EAED,MAAMC,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_i18n","_components","_placeholder","_jsxRuntime","CommentsLegacy","attributes","setAttributes","context","postType","postId","textAlign","actions","jsx","Button","__next40pxDefaultSize","onClick","legacy","variant","children","__","blockProps","useBlockProps","className","clsx","jsxs","Fragment","BlockControls","group","AlignmentControl","value","onChange","nextAlign","Warning","default"],"sources":["@wordpress/block-library/src/comments/edit/comments-legacy.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\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\t__next40pxDefaultSize\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: clsx( {\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"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAwC,IAAAK,WAAA,GAAAL,OAAA;AApBxC;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;AAGe,SAASM,cAAcA,CAAE;EACvCC,UAAU;EACVC,aAAa;EACbC,OAAO,EAAE;IAAEC,QAAQ;IAAEC;EAAO;AAC7B,CAAC,EAAG;EACH,MAAM;IAAEC;EAAU,CAAC,GAAGL,UAAU;EAEhC,MAAMM,OAAO,GAAG,cAC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;AAEL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_blockEditor","_jsxRuntime","arrowMap","none","arrow","chevron","CommentsPaginationNextEdit","attributes","label","setAttributes","context","paginationArrow","displayArrow","jsxs","href","onClick","event","preventDefault","useBlockProps","children","jsx","PlainText","__experimentalVersion","tagName","__","placeholder","value","onChange","newLabel","className"],"sources":["@wordpress/block-library/src/comments-pagination-next/edit.js"],"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"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAmE,IAAAE,WAAA,GAAAF,OAAA;AAJnE;AACA;AACA;;AAIA,MAAMG,QAAQ,GAAG;EAChBC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,GAAG;EACVC,OAAO,EAAE;AACV,CAAC;AAEc,SAASC,0BAA0BA,CAAE;EACnDC,UAAU,EAAE;IAAEC;EAAM,CAAC;EACrBC,aAAa;EACbC,OAAO,EAAE;IAAE,0BAA0B,EAAEC;EAAgB;AACxD,CAAC,EAAG;EACH,MAAMC,YAAY,GAAGV,QAAQ,CAAES,eAAe,CAAE;EAChD,oBACC,IAAAV,WAAA,CAAAY,IAAA;IACCC,IAAI,EAAC,uCAAuC;IAC5CC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;IAAA,GAC1C,IAAAC,0BAAa,EAAC,CAAC;IAAAC,QAAA,gBAEpB,IAAAlB,WAAA,CAAAmB,GAAA,EAACpB,YAAA,CAAAqB,SAAS;MACTC,qBAAqB,EAAG,CAAG;MAC3BC,OAAO,EAAC,MAAM;MACd,cAAa,IAAAC,QAAE,EAAE,0BAA2B,CAAG;MAC/CC,WAAW,EAAG,IAAAD,QAAE,EAAE,gBAAiB,CAAG;MACtCE,KAAK,EAAGlB,KAAO;MACfmB,QAAQ,EAAKC,QAAQ,IACpBnB,aAAa,CAAE;QAAED,KAAK,EAAEoB;MAAS,CAAE;IACnC,CACD,CAAC,EACAhB,YAAY,iBACb,IAAAX,WAAA,CAAAmB,GAAA;MACCS,SAAS,
|
|
1
|
+
{"version":3,"names":["_i18n","require","_blockEditor","_jsxRuntime","arrowMap","none","arrow","chevron","CommentsPaginationNextEdit","attributes","label","setAttributes","context","paginationArrow","displayArrow","jsxs","href","onClick","event","preventDefault","useBlockProps","children","jsx","PlainText","__experimentalVersion","tagName","__","placeholder","value","onChange","newLabel","className"],"sources":["@wordpress/block-library/src/comments-pagination-next/edit.js"],"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"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAmE,IAAAE,WAAA,GAAAF,OAAA;AAJnE;AACA;AACA;;AAIA,MAAMG,QAAQ,GAAG;EAChBC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,GAAG;EACVC,OAAO,EAAE;AACV,CAAC;AAEc,SAASC,0BAA0BA,CAAE;EACnDC,UAAU,EAAE;IAAEC;EAAM,CAAC;EACrBC,aAAa;EACbC,OAAO,EAAE;IAAE,0BAA0B,EAAEC;EAAgB;AACxD,CAAC,EAAG;EACH,MAAMC,YAAY,GAAGV,QAAQ,CAAES,eAAe,CAAE;EAChD,oBACC,IAAAV,WAAA,CAAAY,IAAA;IACCC,IAAI,EAAC,uCAAuC;IAC5CC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;IAAA,GAC1C,IAAAC,0BAAa,EAAC,CAAC;IAAAC,QAAA,gBAEpB,IAAAlB,WAAA,CAAAmB,GAAA,EAACpB,YAAA,CAAAqB,SAAS;MACTC,qBAAqB,EAAG,CAAG;MAC3BC,OAAO,EAAC,MAAM;MACd,cAAa,IAAAC,QAAE,EAAE,0BAA2B,CAAG;MAC/CC,WAAW,EAAG,IAAAD,QAAE,EAAE,gBAAiB,CAAG;MACtCE,KAAK,EAAGlB,KAAO;MACfmB,QAAQ,EAAKC,QAAQ,IACpBnB,aAAa,CAAE;QAAED,KAAK,EAAEoB;MAAS,CAAE;IACnC,CACD,CAAC,EACAhB,YAAY,iBACb,IAAAX,WAAA,CAAAmB,GAAA;MACCS,SAAS,EAAG,oDAAqDlB,eAAe,EAAK;MAAAQ,QAAA,EAEnFP;IAAY,CACT,CACN;EAAA,CACC,CAAC;AAEN","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blockEditor","require","_jsxRuntime","PaginationItem","content","tag","Tag","extraClass","jsx","className","href","onClick","event","preventDefault","children","CommentsPaginationNumbersEdit","jsxs","useBlockProps"],"sources":["@wordpress/block-library/src/comments-pagination-numbers/edit.js"],"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"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAAwD,IAAAC,WAAA,GAAAD,OAAA;AAHxD;AACA;AACA;;AAGA,MAAME,cAAc,GAAGA,CAAE;EAAEC,OAAO;EAAEC,GAAG,EAAEC,GAAG,GAAG,GAAG;EAAEC,UAAU,GAAG;AAAG,CAAC,KACpED,GAAG,KAAK,GAAG,gBACV,IAAAJ,WAAA,CAAAM,GAAA,EAACF,GAAG;EACHG,SAAS,
|
|
1
|
+
{"version":3,"names":["_blockEditor","require","_jsxRuntime","PaginationItem","content","tag","Tag","extraClass","jsx","className","href","onClick","event","preventDefault","children","CommentsPaginationNumbersEdit","jsxs","useBlockProps"],"sources":["@wordpress/block-library/src/comments-pagination-numbers/edit.js"],"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"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAAwD,IAAAC,WAAA,GAAAD,OAAA;AAHxD;AACA;AACA;;AAGA,MAAME,cAAc,GAAGA,CAAE;EAAEC,OAAO;EAAEC,GAAG,EAAEC,GAAG,GAAG,GAAG;EAAEC,UAAU,GAAG;AAAG,CAAC,KACpED,GAAG,KAAK,GAAG,gBACV,IAAAJ,WAAA,CAAAM,GAAA,EAACF,GAAG;EACHG,SAAS,EAAG,gBAAiBF,UAAU,EAAK;EAC5CG,IAAI,EAAC,0CAA0C;EAC/CC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;EAAAC,QAAA,EAE7CV;AAAO,CACL,CAAC,gBAEN,IAAAF,WAAA,CAAAM,GAAA,EAACF,GAAG;EAACG,SAAS,EAAG,gBAAiBF,UAAU,EAAK;EAAAO,QAAA,EAAGV;AAAO,CAAO,CAClE;AAEa,SAASW,6BAA6BA,CAAA,EAAG;EACvD,oBACC,IAAAb,WAAA,CAAAc,IAAA;IAAA,GAAU,IAAAC,0BAAa,EAAC,CAAC;IAAAH,QAAA,gBACxB,IAAAZ,WAAA,CAAAM,GAAA,EAACL,cAAc;MAACC,OAAO,EAAC;IAAG,CAAE,CAAC,eAC9B,IAAAF,WAAA,CAAAM,GAAA,EAACL,cAAc;MAACC,OAAO,EAAC;IAAG,CAAE,CAAC,eAC9B,IAAAF,WAAA,CAAAM,GAAA,EAACL,cAAc;MAACC,OAAO,EAAC,GAAG;MAACC,GAAG,EAAC,MAAM;MAACE,UAAU,EAAC;IAAS,CAAE,CAAC,eAC9D,IAAAL,WAAA,CAAAM,GAAA,EAACL,cAAc;MAACC,OAAO,EAAC;IAAG,CAAE,CAAC,eAC9B,IAAAF,WAAA,CAAAM,GAAA,EAACL,cAAc;MAACC,OAAO,EAAC;IAAG,CAAE,CAAC,eAC9B,IAAAF,WAAA,CAAAM,GAAA,EAACL,cAAc;MAACC,OAAO,EAAC,KAAK;MAACC,GAAG,EAAC,MAAM;MAACE,UAAU,EAAC;IAAM,CAAE,CAAC,eAC7D,IAAAL,WAAA,CAAAM,GAAA,EAACL,cAAc;MAACC,OAAO,EAAC;IAAG,CAAE,CAAC;EAAA,CAC1B,CAAC;AAER","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_blockEditor","_jsxRuntime","arrowMap","none","arrow","chevron","CommentsPaginationPreviousEdit","attributes","label","setAttributes","context","paginationArrow","displayArrow","jsxs","href","onClick","event","preventDefault","useBlockProps","children","jsx","className","PlainText","__experimentalVersion","tagName","__","placeholder","value","onChange","newLabel"],"sources":["@wordpress/block-library/src/comments-pagination-previous/edit.js"],"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"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAmE,IAAAE,WAAA,GAAAF,OAAA;AAJnE;AACA;AACA;;AAIA,MAAMG,QAAQ,GAAG;EAChBC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,GAAG;EACVC,OAAO,EAAE;AACV,CAAC;AAEc,SAASC,8BAA8BA,CAAE;EACvDC,UAAU,EAAE;IAAEC;EAAM,CAAC;EACrBC,aAAa;EACbC,OAAO,EAAE;IAAE,0BAA0B,EAAEC;EAAgB;AACxD,CAAC,EAAG;EACH,MAAMC,YAAY,GAAGV,QAAQ,CAAES,eAAe,CAAE;EAChD,oBACC,IAAAV,WAAA,CAAAY,IAAA;IACCC,IAAI,EAAC,2CAA2C;IAChDC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;IAAA,GAC1C,IAAAC,0BAAa,EAAC,CAAC;IAAAC,QAAA,GAElBP,YAAY,iBACb,IAAAX,WAAA,CAAAmB,GAAA;MACCC,SAAS,
|
|
1
|
+
{"version":3,"names":["_i18n","require","_blockEditor","_jsxRuntime","arrowMap","none","arrow","chevron","CommentsPaginationPreviousEdit","attributes","label","setAttributes","context","paginationArrow","displayArrow","jsxs","href","onClick","event","preventDefault","useBlockProps","children","jsx","className","PlainText","__experimentalVersion","tagName","__","placeholder","value","onChange","newLabel"],"sources":["@wordpress/block-library/src/comments-pagination-previous/edit.js"],"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"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAmE,IAAAE,WAAA,GAAAF,OAAA;AAJnE;AACA;AACA;;AAIA,MAAMG,QAAQ,GAAG;EAChBC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,GAAG;EACVC,OAAO,EAAE;AACV,CAAC;AAEc,SAASC,8BAA8BA,CAAE;EACvDC,UAAU,EAAE;IAAEC;EAAM,CAAC;EACrBC,aAAa;EACbC,OAAO,EAAE;IAAE,0BAA0B,EAAEC;EAAgB;AACxD,CAAC,EAAG;EACH,MAAMC,YAAY,GAAGV,QAAQ,CAAES,eAAe,CAAE;EAChD,oBACC,IAAAV,WAAA,CAAAY,IAAA;IACCC,IAAI,EAAC,2CAA2C;IAChDC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;IAAA,GAC1C,IAAAC,0BAAa,EAAC,CAAC;IAAAC,QAAA,GAElBP,YAAY,iBACb,IAAAX,WAAA,CAAAmB,GAAA;MACCC,SAAS,EAAG,wDAAyDV,eAAe,EAAK;MAAAQ,QAAA,EAEvFP;IAAY,CACT,CACN,eACD,IAAAX,WAAA,CAAAmB,GAAA,EAACpB,YAAA,CAAAsB,SAAS;MACTC,qBAAqB,EAAG,CAAG;MAC3BC,OAAO,EAAC,MAAM;MACd,cAAa,IAAAC,QAAE,EAAE,0BAA2B,CAAG;MAC/CC,WAAW,EAAG,IAAAD,QAAE,EAAE,gBAAiB,CAAG;MACtCE,KAAK,EAAGnB,KAAO;MACfoB,QAAQ,EAAKC,QAAQ,IACpBpB,aAAa,CAAE;QAAED,KAAK,EAAEqB;MAAS,CAAE;IACnC,CACD,CAAC;EAAA,CACA,CAAC;AAEN","ignoreList":[]}
|
|
@@ -127,13 +127,13 @@ function Edit({
|
|
|
127
127
|
/* translators: %s: Post title. */
|
|
128
128
|
placeholder = (0, _i18n.sprintf)((0, _i18n.__)('One response to %s'), postTitle);
|
|
129
129
|
} else {
|
|
130
|
-
placeholder = (0, _i18n.sprintf)(
|
|
130
|
+
placeholder = (0, _i18n.sprintf)(/* translators: 1: Number of comments, 2: Post title. */
|
|
131
131
|
(0, _i18n._n)('%1$s response to %2$s', '%1$s responses to %2$s', commentsCount), commentsCount, postTitle);
|
|
132
132
|
}
|
|
133
133
|
} else if (commentsCount === 1) {
|
|
134
134
|
placeholder = (0, _i18n.__)('One response');
|
|
135
135
|
} else {
|
|
136
|
-
placeholder = (0, _i18n.sprintf)(
|
|
136
|
+
placeholder = (0, _i18n.sprintf)(/* translators: %s: Number of comments. */
|
|
137
137
|
(0, _i18n._n)('%s response', '%s responses', commentsCount), commentsCount);
|
|
138
138
|
}
|
|
139
139
|
} else if (showPostTitle) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_i18n","_coreData","_components","_element","_data","_apiFetch","_url","_jsxRuntime","Edit","attributes","textAlign","showPostTitle","showCommentsCount","level","levelOptions","setAttributes","context","postType","postId","TagName","commentsCount","setCommentsCount","useState","rawTitle","useEntityProp","isSiteEditor","blockProps","useBlockProps","className","clsx","threadCommentsDepth","threadComments","commentsPerPage","pageComments","useSelect","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","useEffect","nestedCommentsNumber","Math","min","topLevelCommentsNumber","commentsNumber","parseInt","currentPostId","apiFetch","path","addQueryArgs","post","_fields","method","parse","then","res","headers","get","catch","blockControls","jsxs","BlockControls","group","children","jsx","AlignmentControl","value","onChange","newAlign","HeadingLevelDropdown","options","newLevel","inspectorControls","InspectorControls","PanelBody","title","__","ToggleControl","__nextHasNoMarginBottom","label","checked","postTitle","placeholder","undefined","sprintf","_n","Fragment"],"sources":["@wordpress/block-library/src/comments-title/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n\tHeadingLevelDropdown,\n} from '@wordpress/block-editor';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\nexport default function Edit( {\n\tattributes: {\n\t\ttextAlign,\n\t\tshowPostTitle,\n\t\tshowCommentsCount,\n\t\tlevel,\n\t\tlevelOptions,\n\t},\n\tsetAttributes,\n\tcontext: { postType, postId },\n} ) {\n\tconst TagName = 'h' + level;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\tconst [ rawTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tconst isSiteEditor = typeof postId === 'undefined';\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst {\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\tuseEffect( () => {\n\t\tif ( isSiteEditor ) {\n\t\t\t// Match the number of comments that will be shown in the comment-template/edit.js placeholder\n\n\t\t\tconst nestedCommentsNumber = threadComments\n\t\t\t\t? Math.min( threadCommentsDepth, 3 ) - 1\n\t\t\t\t: 0;\n\t\t\tconst topLevelCommentsNumber = pageComments ? commentsPerPage : 3;\n\n\t\t\tconst commentsNumber =\n\t\t\t\tparseInt( nestedCommentsNumber ) +\n\t\t\t\tparseInt( topLevelCommentsNumber );\n\n\t\t\tsetCommentsCount( Math.min( commentsNumber, 3 ) );\n\t\t\treturn;\n\t\t}\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} )\n\t\t\t.then( ( res ) => {\n\t\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\t\tif ( currentPostId === postId ) {\n\t\t\t\t\tsetCommentsCount(\n\t\t\t\t\t\tparseInt( res.headers.get( 'X-WP-Total' ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tsetCommentsCount( 0 );\n\t\t\t} );\n\t}, [ postId ] );\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\t<HeadingLevelDropdown\n\t\t\t\tvalue={ level }\n\t\t\t\toptions={ levelOptions }\n\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show post title' ) }\n\t\t\t\t\tchecked={ showPostTitle }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showPostTitle: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show comments count' ) }\n\t\t\t\t\tchecked={ showCommentsCount }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showCommentsCount: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst postTitle = isSiteEditor ? __( '“Post Title”' ) : `\"${ rawTitle }\"`;\n\n\tlet placeholder;\n\tif ( showCommentsCount && commentsCount !== undefined ) {\n\t\tif ( showPostTitle ) {\n\t\t\tif ( commentsCount === 1 ) {\n\t\t\t\t/* translators: %s: Post title. */\n\t\t\t\tplaceholder = sprintf( __( 'One response to %s' ), postTitle );\n\t\t\t} else {\n\t\t\t\tplaceholder = sprintf(\n\t\t\t\t\t/* translators: 1: Number of comments, 2: Post title. */\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'%1$s response to %2$s',\n\t\t\t\t\t\t'%1$s responses to %2$s',\n\t\t\t\t\t\tcommentsCount\n\t\t\t\t\t),\n\t\t\t\t\tcommentsCount,\n\t\t\t\t\tpostTitle\n\t\t\t\t);\n\t\t\t}\n\t\t} else if ( commentsCount === 1 ) {\n\t\t\tplaceholder = __( 'One response' );\n\t\t} else {\n\t\t\tplaceholder = sprintf(\n\t\t\t\t/* translators: %s: Number of comments. */\n\t\t\t\t_n( '%s response', '%s responses', commentsCount ),\n\t\t\t\tcommentsCount\n\t\t\t);\n\t\t}\n\t} else if ( showPostTitle ) {\n\t\tif ( commentsCount === 1 ) {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Response to %s' ), postTitle );\n\t\t} else {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Responses to %s' ), postTitle );\n\t\t}\n\t} else if ( commentsCount === 1 ) {\n\t\tplaceholder = __( 'Response' );\n\t} else {\n\t\tplaceholder = __( 'Responses' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName { ...blockProps }>{ placeholder }</TagName>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AAA8C,IAAAS,WAAA,GAAAT,OAAA;AAtB9C;AACA;AACA;;AAGA;AACA;AACA;;AAiBe,SAASU,IAAIA,CAAE;EAC7BC,UAAU,EAAE;IACXC,SAAS;IACTC,aAAa;IACbC,iBAAiB;IACjBC,KAAK;IACLC;EACD,CAAC;EACDC,aAAa;EACbC,OAAO,EAAE;IAA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,IAAAC,QAAE,EAAE,aAAa,EAAE,cAAc,EAAEjE,aAAc,CAAC,EAClDA,aACD,CAAC;IACF;EACD,CAAC,MAAM,IAAKT,aAAa,EAAG;IAC3B,IAAKS,aAAa,KAAK,CAAC,EAAG;MAC1B;MACA8D,WAAW,GAAG,IAAAE,aAAO,EAAE,IAAAR,QAAE,EAAE,gBAAiB,CAAC,EAAEK,SAAU,CAAC;IAC3D,CAAC,MAAM;MACN;MACAC,WAAW,GAAG,IAAAE,aAAO,EAAE,IAAAR,QAAE,EAAE,iBAAkB,CAAC,EAAEK,SAAU,CAAC;IAC5D;EACD,CAAC,MAAM,IAAK7D,aAAa,KAAK,CAAC,EAAG;IACjC8D,WAAW,GAAG,IAAAN,QAAE,EAAE,UAAW,CAAC;EAC/B,CAAC,MAAM;IACNM,WAAW,GAAG,IAAAN,QAAE,EAAE,WAAY,CAAC;EAChC;EAEA,oBACC,IAAArE,WAAA,CAAAqD,IAAA,EAAArD,WAAA,CAAA+E,QAAA;IAAAvB,QAAA,GACGJ,aAAa,EACba,iBAAiB,eACnB,IAAAjE,WAAA,CAAAyD,GAAA,EAAC7C,OAAO;MAAA,GAAMO,UAAU;MAAAqC,QAAA,EAAKmB;IAAW,CAAW,CAAC;EAAA,CACnD,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_i18n","_coreData","_components","_element","_data","_apiFetch","_url","_jsxRuntime","Edit","attributes","textAlign","showPostTitle","showCommentsCount","level","levelOptions","setAttributes","context","postType","postId","TagName","commentsCount","setCommentsCount","useState","rawTitle","useEntityProp","isSiteEditor","blockProps","useBlockProps","className","clsx","threadCommentsDepth","threadComments","commentsPerPage","pageComments","useSelect","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","useEffect","nestedCommentsNumber","Math","min","topLevelCommentsNumber","commentsNumber","parseInt","currentPostId","apiFetch","path","addQueryArgs","post","_fields","method","parse","then","res","headers","get","catch","blockControls","jsxs","BlockControls","group","children","jsx","AlignmentControl","value","onChange","newAlign","HeadingLevelDropdown","options","newLevel","inspectorControls","InspectorControls","PanelBody","title","__","ToggleControl","__nextHasNoMarginBottom","label","checked","postTitle","placeholder","undefined","sprintf","_n","Fragment"],"sources":["@wordpress/block-library/src/comments-title/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n\tHeadingLevelDropdown,\n} from '@wordpress/block-editor';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\nexport default function Edit( {\n\tattributes: {\n\t\ttextAlign,\n\t\tshowPostTitle,\n\t\tshowCommentsCount,\n\t\tlevel,\n\t\tlevelOptions,\n\t},\n\tsetAttributes,\n\tcontext: { postType, postId },\n} ) {\n\tconst TagName = 'h' + level;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\tconst [ rawTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tconst isSiteEditor = typeof postId === 'undefined';\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst {\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\tuseEffect( () => {\n\t\tif ( isSiteEditor ) {\n\t\t\t// Match the number of comments that will be shown in the comment-template/edit.js placeholder\n\n\t\t\tconst nestedCommentsNumber = threadComments\n\t\t\t\t? Math.min( threadCommentsDepth, 3 ) - 1\n\t\t\t\t: 0;\n\t\t\tconst topLevelCommentsNumber = pageComments ? commentsPerPage : 3;\n\n\t\t\tconst commentsNumber =\n\t\t\t\tparseInt( nestedCommentsNumber ) +\n\t\t\t\tparseInt( topLevelCommentsNumber );\n\n\t\t\tsetCommentsCount( Math.min( commentsNumber, 3 ) );\n\t\t\treturn;\n\t\t}\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} )\n\t\t\t.then( ( res ) => {\n\t\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\t\tif ( currentPostId === postId ) {\n\t\t\t\t\tsetCommentsCount(\n\t\t\t\t\t\tparseInt( res.headers.get( 'X-WP-Total' ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tsetCommentsCount( 0 );\n\t\t\t} );\n\t}, [ postId ] );\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\t<HeadingLevelDropdown\n\t\t\t\tvalue={ level }\n\t\t\t\toptions={ levelOptions }\n\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show post title' ) }\n\t\t\t\t\tchecked={ showPostTitle }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showPostTitle: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show comments count' ) }\n\t\t\t\t\tchecked={ showCommentsCount }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showCommentsCount: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst postTitle = isSiteEditor ? __( '“Post Title”' ) : `\"${ rawTitle }\"`;\n\n\tlet placeholder;\n\tif ( showCommentsCount && commentsCount !== undefined ) {\n\t\tif ( showPostTitle ) {\n\t\t\tif ( commentsCount === 1 ) {\n\t\t\t\t/* translators: %s: Post title. */\n\t\t\t\tplaceholder = sprintf( __( 'One response to %s' ), postTitle );\n\t\t\t} else {\n\t\t\t\tplaceholder = sprintf(\n\t\t\t\t\t/* translators: 1: Number of comments, 2: Post title. */\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'%1$s response to %2$s',\n\t\t\t\t\t\t'%1$s responses to %2$s',\n\t\t\t\t\t\tcommentsCount\n\t\t\t\t\t),\n\t\t\t\t\tcommentsCount,\n\t\t\t\t\tpostTitle\n\t\t\t\t);\n\t\t\t}\n\t\t} else if ( commentsCount === 1 ) {\n\t\t\tplaceholder = __( 'One response' );\n\t\t} else {\n\t\t\tplaceholder = sprintf(\n\t\t\t\t/* translators: %s: Number of comments. */\n\t\t\t\t_n( '%s response', '%s responses', commentsCount ),\n\t\t\t\tcommentsCount\n\t\t\t);\n\t\t}\n\t} else if ( showPostTitle ) {\n\t\tif ( commentsCount === 1 ) {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Response to %s' ), postTitle );\n\t\t} else {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Responses to %s' ), postTitle );\n\t\t}\n\t} else if ( commentsCount === 1 ) {\n\t\tplaceholder = __( 'Response' );\n\t} else {\n\t\tplaceholder = __( 'Responses' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName { ...blockProps }>{ placeholder }</TagName>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AAA8C,IAAAS,WAAA,GAAAT,OAAA;AAtB9C;AACA;AACA;;AAGA;AACA;AACA;;AAiBe,SAASU,IAAIA,CAAE;EAC7BC,UAAU,EAAE;IACXC,SAAS;IACTC,aAAa;IACbC,iBAAiB;IACjBC,KAAK;IACLC;EACD,CAAC;EACDC,aAAa;EACbC,OAAO,EAAE;IAAEC,QAAQ;IAAEC;EAAO;AAC7B,CAAC,EAAG;EACH,MAAMC,OAAO,GAAG,GAAG,GAAGN,KAAK;EAC3B,MAAM,CAAEO,aAAa,EAAEC,gBAAgB,CAAE,GAAG,IAAAC,iBAAQ,EAAC,CAAC;EACtD,MAAM,CAAEC,QAAQ,CAAE,GAAG,IAAAC,uBAAa,EAAE,UAAU,EAAEP,QAAQ,EAAE,OAAO,EAAEC,MAAO,CAAC;EAC3E,MAAMO,YAAY,GAAG,OAAOP,MAAM,KAAK,WAAW;EAClD,MAAMQ,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,CA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G;IACjC8D,WAAW,GAAG,IAAAN,QAAE,EAAE,UAAW,CAAC;EAC/B,CAAC,MAAM;IACNM,WAAW,GAAG,IAAAN,QAAE,EAAE,WAAY,CAAC;EAChC;EAEA,oBACC,IAAArE,WAAA,CAAAqD,IAAA,EAAArD,WAAA,CAAA+E,QAAA;IAAAvB,QAAA,GACGJ,aAAa,EACba,iBAAiB,eACnB,IAAAjE,WAAA,CAAAyD,GAAA,EAAC7C,OAAO;MAAA,GAAMO,UAAU;MAAAqC,QAAA,EAAKmB;IAAW,CAAW,CAAC;EAAA,CACnD,CAAC;AAEL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeVideo","_interopRequireDefault","_components","_icons","_element","_compose","_blockEditor","_i18n","_style","_overlayColorSettings","_focalPointSettingsButton","_shared","_jsxRuntime","Controls","attributes","didUploadFail","hasOnlyColorBackground","isUploadInProgress","onClearMedia","onSelectMedia","setAttributes","backgroundType","dimRatio","hasParallax","focalPoint","minHeight","minHeightUnit","url","CONTAINER_HEIGHT","COVER_DEFAULT_HEIGHT","onHeightChange","useCallback","value","availableUnits","useSettings","units","useCustomUnits","defaultValues","px","em","rem","vw","vh","onOpacityChange","onChangeUnit","nextUnit","Math","max","COVER_MIN_HEIGHT","displayPlaceholder","setDisplayPlaceholder","useState","setFocalPoint","toggleParallax","undefined","IMAGE_DEFAULT_FOCAL_POINT","addMediaButtonStyle","usePreferredColorSchemeStyle","styles","addMediaButton","addMediaButtonDark","focalPointPosition","x","y","left","top","videoNaturalSize","setVideoNaturalSize","videoRef","useRef","mediaBackground","mediaBackgroundDark","imagePreviewStyles","imagePlaceholder","videoPreviewStyles","aspectRatio","width","height","opacity","video","focalPointHint","jsx","Icon","icon","plus","size","style","renderMediaSection","open","openMediaOptions","getMediaOptions","jsxs","Fragment","children","BottomSheet","Cell","accessible","cellContainerStyle","mediaPreview","View","mediaInner","IMAGE_BACKGROUND_TYPE","Image","editButton","highlightSelected","isSelected","isUploadFailed","mediaPickerOptions","destructiveButton","id","label","__","onPress","separated","onImageDataLoad","onSelectMediaUploadOption","image","VIDEO_BACKGROUND_TYPE","default","muted","paused","disableFocus","onLoadStart","onLoad","event","naturalSize","current","seek","ref","resizeMode","source","uri","disabled","onFocalPointChange","ToggleControl","checked","onChange","TextControl","leftAlign","labelStyle","clearMediaButton","accessibilityLabel","PanelBody","title","MediaUpload","allowedTypes","ALLOWED_MEDIA_TYPES","isReplacingMedia","onSelect","render","overlayColor","customOverlayColor","gradient","customGradient","RangeControl","minimumValue","maximumValue","rangeCellContainer","separatorType","UnitControl","min","COVER_MAX_HEIGHT","unit","onUnitChange","_default","exports"],"sources":["@wordpress/block-library/src/cover/controls.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\nimport Video from 'react-native-video';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tImage,\n\tIcon,\n\tIMAGE_DEFAULT_FOCAL_POINT,\n\tPanelBody,\n\tRangeControl,\n\tUnitControl,\n\tTextControl,\n\tBottomSheet,\n\tToggleControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n} from '@wordpress/components';\nimport { plus } from '@wordpress/icons';\nimport { useState, useCallback, useRef } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport { useSettings, MediaUpload } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport OverlayColorSettings from './overlay-color-settings';\nimport FocalPointSettingsButton from './focal-point-settings-button';\nimport {\n\tALLOWED_MEDIA_TYPES,\n\tCOVER_MIN_HEIGHT,\n\tCOVER_MAX_HEIGHT,\n\tCOVER_DEFAULT_HEIGHT,\n\tIMAGE_BACKGROUND_TYPE,\n\tVIDEO_BACKGROUND_TYPE,\n} from './shared';\n\nfunction Controls( {\n\tattributes,\n\tdidUploadFail,\n\thasOnlyColorBackground,\n\tisUploadInProgress,\n\tonClearMedia,\n\tonSelectMedia,\n\tsetAttributes,\n} ) {\n\tconst {\n\t\tbackgroundType,\n\t\tdimRatio,\n\t\thasParallax,\n\t\tfocalPoint,\n\t\tminHeight,\n\t\tminHeightUnit = 'px',\n\t\turl,\n\t} = attributes;\n\tconst CONTAINER_HEIGHT = minHeight || COVER_DEFAULT_HEIGHT;\n\tconst onHeightChange = useCallback(\n\t\t( value ) => {\n\t\t\tif ( minHeight || value !== COVER_DEFAULT_HEIGHT ) {\n\t\t\t\tsetAttributes( { minHeight: value } );\n\t\t\t}\n\t\t},\n\t\t[ minHeight ]\n\t);\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem', 'vw', 'vh' ],\n\t\tdefaultValues: { px: 430, em: 20, rem: 20, vw: 20, vh: 50 },\n\t} );\n\n\tconst onOpacityChange = useCallback( ( value ) => {\n\t\tsetAttributes( { dimRatio: value } );\n\t}, [] );\n\n\tconst onChangeUnit = useCallback( ( nextUnit ) => {\n\t\tsetAttributes( {\n\t\t\tminHeightUnit: nextUnit,\n\t\t\tminHeight:\n\t\t\t\tnextUnit === 'px'\n\t\t\t\t\t? Math.max( CONTAINER_HEIGHT, COVER_MIN_HEIGHT )\n\t\t\t\t\t: CONTAINER_HEIGHT,\n\t\t} );\n\t}, [] );\n\n\tconst [ displayPlaceholder, setDisplayPlaceholder ] = useState( true );\n\n\tfunction setFocalPoint( value ) {\n\t\tsetAttributes( { focalPoint: value } );\n\t}\n\n\tconst toggleParallax = () => {\n\t\tsetAttributes( {\n\t\t\thasParallax: ! hasParallax,\n\t\t\t...( ! hasParallax\n\t\t\t\t? { focalPoint: undefined }\n\t\t\t\t: { focalPoint: IMAGE_DEFAULT_FOCAL_POINT } ),\n\t\t} );\n\t};\n\n\tconst addMediaButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.addMediaButton,\n\t\tstyles.addMediaButtonDark\n\t);\n\n\tfunction focalPointPosition( { x, y } = IMAGE_DEFAULT_FOCAL_POINT ) {\n\t\treturn {\n\t\t\tleft: `${ ( hasParallax ? 0.5 : x ) * 100 }%`,\n\t\t\ttop: `${ ( hasParallax ? 0.5 : y ) * 100 }%`,\n\t\t};\n\t}\n\n\tconst [ videoNaturalSize, setVideoNaturalSize ] = useState( null );\n\tconst videoRef = useRef( null );\n\n\tconst mediaBackground = usePreferredColorSchemeStyle(\n\t\tstyles.mediaBackground,\n\t\tstyles.mediaBackgroundDark\n\t);\n\tconst imagePreviewStyles = [\n\t\tdisplayPlaceholder && styles.imagePlaceholder,\n\t];\n\tconst videoPreviewStyles = [\n\t\t{\n\t\t\taspectRatio:\n\t\t\t\tvideoNaturalSize &&\n\t\t\t\tvideoNaturalSize.width / videoNaturalSize.height,\n\t\t\t// Hide Video component since it has black background while loading the source\n\t\t\topacity: displayPlaceholder ? 0 : 1,\n\t\t},\n\t\tstyles.video,\n\t\tdisplayPlaceholder && styles.imagePlaceholder,\n\t];\n\n\tconst focalPointHint = ! hasParallax && ! displayPlaceholder && (\n\t\t<Icon\n\t\t\ticon={ plus }\n\t\t\tsize={ styles.focalPointHint?.width }\n\t\t\tstyle={ [\n\t\t\t\tstyles.focalPointHint,\n\t\t\t\tfocalPointPosition( focalPoint ),\n\t\t\t] }\n\t\t/>\n\t);\n\n\tconst renderMediaSection = ( {\n\t\topen: openMediaOptions,\n\t\tgetMediaOptions,\n\t} ) => (\n\t\t<>\n\t\t\t{ getMediaOptions() }\n\t\t\t{ url ? (\n\t\t\t\t<>\n\t\t\t\t\t<BottomSheet.Cell\n\t\t\t\t\t\taccessible={ false }\n\t\t\t\t\t\tcellContainerStyle={ [\n\t\t\t\t\t\t\tstyles.mediaPreview,\n\t\t\t\t\t\t\tmediaBackground,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t<View style={ styles.mediaInner }>\n\t\t\t\t\t\t\t{ IMAGE_BACKGROUND_TYPE === backgroundType && (\n\t\t\t\t\t\t\t\t<Image\n\t\t\t\t\t\t\t\t\teditButton={ ! displayPlaceholder }\n\t\t\t\t\t\t\t\t\thighlightSelected={ false }\n\t\t\t\t\t\t\t\t\tisSelected={ ! displayPlaceholder }\n\t\t\t\t\t\t\t\t\tisUploadFailed={ didUploadFail }\n\t\t\t\t\t\t\t\t\tisUploadInProgress={ isUploadInProgress }\n\t\t\t\t\t\t\t\t\tmediaPickerOptions={ [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tdestructiveButton: true,\n\t\t\t\t\t\t\t\t\t\t\tid: 'clearMedia',\n\t\t\t\t\t\t\t\t\t\t\tlabel: __( 'Clear Media' ),\n\t\t\t\t\t\t\t\t\t\t\tonPress: onClearMedia,\n\t\t\t\t\t\t\t\t\t\t\tseparated: true,\n\t\t\t\t\t\t\t\t\t\t\tvalue: 'clearMedia',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\tonImageDataLoad={ () => {\n\t\t\t\t\t\t\t\t\t\tsetDisplayPlaceholder( false );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tonSelectMediaUploadOption={ onSelectMedia }\n\t\t\t\t\t\t\t\t\topenMediaOptions={ openMediaOptions }\n\t\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\t\theight=\"100%\"\n\t\t\t\t\t\t\t\t\tstyle={ imagePreviewStyles }\n\t\t\t\t\t\t\t\t\twidth={ styles.image?.width }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ VIDEO_BACKGROUND_TYPE === backgroundType && (\n\t\t\t\t\t\t\t\t<Video\n\t\t\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\t\t\tpaused\n\t\t\t\t\t\t\t\t\tdisableFocus\n\t\t\t\t\t\t\t\t\tonLoadStart={ () => {\n\t\t\t\t\t\t\t\t\t\tsetDisplayPlaceholder( true );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tonLoad={ ( event ) => {\n\t\t\t\t\t\t\t\t\t\tconst { height, width } =\n\t\t\t\t\t\t\t\t\t\t\tevent.naturalSize;\n\t\t\t\t\t\t\t\t\t\tsetVideoNaturalSize( {\n\t\t\t\t\t\t\t\t\t\t\theight,\n\t\t\t\t\t\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\tsetDisplayPlaceholder( false );\n\t\t\t\t\t\t\t\t\t\t// Avoid invisible, paused video on Android, presumably\n\t\t\t\t\t\t\t\t\t\t// related to https://github.com/react-native-video/react-native-video/issues/1979\n\t\t\t\t\t\t\t\t\t\tvideoRef?.current.seek( 0 );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tref={ videoRef }\n\t\t\t\t\t\t\t\t\tresizeMode=\"cover\"\n\t\t\t\t\t\t\t\t\tsource={ { uri: url } }\n\t\t\t\t\t\t\t\t\tstyle={ videoPreviewStyles }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ displayPlaceholder ? null : focalPointHint }\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</BottomSheet.Cell>\n\t\t\t\t\t<FocalPointSettingsButton\n\t\t\t\t\t\tdisabled={ hasParallax }\n\t\t\t\t\t\tfocalPoint={ focalPoint || IMAGE_DEFAULT_FOCAL_POINT }\n\t\t\t\t\t\tonFocalPointChange={ setFocalPoint }\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t/>\n\t\t\t\t\t{ IMAGE_BACKGROUND_TYPE === backgroundType && (\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\tchecked={ hasParallax }\n\t\t\t\t\t\t\tonChange={ toggleParallax }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tleftAlign\n\t\t\t\t\t\tlabel={ __( 'Clear Media' ) }\n\t\t\t\t\t\tlabelStyle={ styles.clearMediaButton }\n\t\t\t\t\t\tonPress={ onClearMedia }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<TextControl\n\t\t\t\t\taccessibilityLabel={ __( 'Add image or video' ) }\n\t\t\t\t\tlabel={ __( 'Add image or video' ) }\n\t\t\t\t\tlabelStyle={ addMediaButtonStyle }\n\t\t\t\t\tleftAlign\n\t\t\t\t\tonPress={ openMediaOptions }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<PanelBody title={ __( 'Media' ) }>\n\t\t\t\t<MediaUpload\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\tisReplacingMedia={ ! hasOnlyColorBackground }\n\t\t\t\t\tonSelect={ onSelectMedia }\n\t\t\t\t\trender={ renderMediaSection }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\n\t\t\t<OverlayColorSettings\n\t\t\t\toverlayColor={ attributes.overlayColor }\n\t\t\t\tcustomOverlayColor={ attributes.customOverlayColor }\n\t\t\t\tgradient={ attributes.gradient }\n\t\t\t\tcustomGradient={ attributes.customGradient }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\n\t\t\t{ url ? (\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Opacity' ) }\n\t\t\t\t\t\tminimumValue={ 0 }\n\t\t\t\t\t\tmaximumValue={ 100 }\n\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\tonChange={ onOpacityChange }\n\t\t\t\t\t\tstyle={ styles.rangeCellContainer }\n\t\t\t\t\t\tseparatorType=\"topFullWidth\"\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) : null }\n\n\t\t\t<PanelBody title={ __( 'Dimensions' ) }>\n\t\t\t\t<UnitControl\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tmin={ minHeightUnit === 'px' ? COVER_MIN_HEIGHT : 1 }\n\t\t\t\t\tmax={ COVER_MAX_HEIGHT }\n\t\t\t\t\tunit={ minHeightUnit }\n\t\t\t\t\tvalue={ CONTAINER_HEIGHT }\n\t\t\t\t\tonChange={ onHeightChange }\n\t\t\t\t\tonUnitChange={ onChangeUnit }\n\t\t\t\t\tunits={ units }\n\t\t\t\t\tstyle={ styles.rangeCellContainer }\n\t\t\t\t\tkey={ minHeightUnit }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</>\n\t);\n}\n\nexport default Controls;\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AAYA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AAKA,IAAAS,MAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,qBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,yBAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,OAAA,GAAAZ,OAAA;AAOkB,IAAAa,WAAA,GAAAb,OAAA;AAxClB;AACA;AACA;;AAIA;AACA;AACA;;AAmBA;AACA;AACA;;AAaA,SAASc,QAAQA,CAAE;EAClBC,UAAU;EACVC,aAAa;EACbC,sBAAsB;EACtBC,kBAAkB;EAClBC,YAAY;EACZC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,MAAM;IACLC,cAAc;IACdC,QAAQ;IACRC,WAAW;IACXC,UAAU;IACVC,SAAS;IACTC,aAAa,GAAG,IAAI;IACpBC;EAC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A,KAAO;QACfmD,KAAK,EAAG5B,cAAM,CAACmG;MAAoB,GAC7BnI,aACN;IAAC,CACQ,CAAC;EAAA,CACX,CAAC;AAEL;AAAC,IAAA0I,QAAA,GAAAC,OAAA,CAAA/C,OAAA,GAEczG,QAAQ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeVideo","_interopRequireDefault","_components","_icons","_element","_compose","_blockEditor","_i18n","_style","_overlayColorSettings","_focalPointSettingsButton","_shared","_jsxRuntime","Controls","attributes","didUploadFail","hasOnlyColorBackground","isUploadInProgress","onClearMedia","onSelectMedia","setAttributes","backgroundType","dimRatio","hasParallax","focalPoint","minHeight","minHeightUnit","url","CONTAINER_HEIGHT","COVER_DEFAULT_HEIGHT","onHeightChange","useCallback","value","availableUnits","useSettings","units","useCustomUnits","defaultValues","px","em","rem","vw","vh","onOpacityChange","onChangeUnit","nextUnit","Math","max","COVER_MIN_HEIGHT","displayPlaceholder","setDisplayPlaceholder","useState","setFocalPoint","toggleParallax","undefined","IMAGE_DEFAULT_FOCAL_POINT","addMediaButtonStyle","usePreferredColorSchemeStyle","styles","addMediaButton","addMediaButtonDark","focalPointPosition","x","y","left","top","videoNaturalSize","setVideoNaturalSize","videoRef","useRef","mediaBackground","mediaBackgroundDark","imagePreviewStyles","imagePlaceholder","videoPreviewStyles","aspectRatio","width","height","opacity","video","focalPointHint","jsx","Icon","icon","plus","size","style","renderMediaSection","open","openMediaOptions","getMediaOptions","jsxs","Fragment","children","BottomSheet","Cell","accessible","cellContainerStyle","mediaPreview","View","mediaInner","IMAGE_BACKGROUND_TYPE","Image","editButton","highlightSelected","isSelected","isUploadFailed","mediaPickerOptions","destructiveButton","id","label","__","onPress","separated","onImageDataLoad","onSelectMediaUploadOption","image","VIDEO_BACKGROUND_TYPE","default","muted","paused","disableFocus","onLoadStart","onLoad","event","naturalSize","current","seek","ref","resizeMode","source","uri","disabled","onFocalPointChange","ToggleControl","checked","onChange","TextControl","leftAlign","labelStyle","clearMediaButton","accessibilityLabel","PanelBody","title","MediaUpload","allowedTypes","ALLOWED_MEDIA_TYPES","isReplacingMedia","onSelect","render","overlayColor","customOverlayColor","gradient","customGradient","RangeControl","minimumValue","maximumValue","rangeCellContainer","separatorType","UnitControl","min","COVER_MAX_HEIGHT","unit","onUnitChange","_default","exports"],"sources":["@wordpress/block-library/src/cover/controls.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\nimport Video from 'react-native-video';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tImage,\n\tIcon,\n\tIMAGE_DEFAULT_FOCAL_POINT,\n\tPanelBody,\n\tRangeControl,\n\tUnitControl,\n\tTextControl,\n\tBottomSheet,\n\tToggleControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n} from '@wordpress/components';\nimport { plus } from '@wordpress/icons';\nimport { useState, useCallback, useRef } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport { useSettings, MediaUpload } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport OverlayColorSettings from './overlay-color-settings';\nimport FocalPointSettingsButton from './focal-point-settings-button';\nimport {\n\tALLOWED_MEDIA_TYPES,\n\tCOVER_MIN_HEIGHT,\n\tCOVER_MAX_HEIGHT,\n\tCOVER_DEFAULT_HEIGHT,\n\tIMAGE_BACKGROUND_TYPE,\n\tVIDEO_BACKGROUND_TYPE,\n} from './shared';\n\nfunction Controls( {\n\tattributes,\n\tdidUploadFail,\n\thasOnlyColorBackground,\n\tisUploadInProgress,\n\tonClearMedia,\n\tonSelectMedia,\n\tsetAttributes,\n} ) {\n\tconst {\n\t\tbackgroundType,\n\t\tdimRatio,\n\t\thasParallax,\n\t\tfocalPoint,\n\t\tminHeight,\n\t\tminHeightUnit = 'px',\n\t\turl,\n\t} = attributes;\n\tconst CONTAINER_HEIGHT = minHeight || COVER_DEFAULT_HEIGHT;\n\tconst onHeightChange = useCallback(\n\t\t( value ) => {\n\t\t\tif ( minHeight || value !== COVER_DEFAULT_HEIGHT ) {\n\t\t\t\tsetAttributes( { minHeight: value } );\n\t\t\t}\n\t\t},\n\t\t[ minHeight ]\n\t);\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem', 'vw', 'vh' ],\n\t\tdefaultValues: { px: 430, em: 20, rem: 20, vw: 20, vh: 50 },\n\t} );\n\n\tconst onOpacityChange = useCallback( ( value ) => {\n\t\tsetAttributes( { dimRatio: value } );\n\t}, [] );\n\n\tconst onChangeUnit = useCallback( ( nextUnit ) => {\n\t\tsetAttributes( {\n\t\t\tminHeightUnit: nextUnit,\n\t\t\tminHeight:\n\t\t\t\tnextUnit === 'px'\n\t\t\t\t\t? Math.max( CONTAINER_HEIGHT, COVER_MIN_HEIGHT )\n\t\t\t\t\t: CONTAINER_HEIGHT,\n\t\t} );\n\t}, [] );\n\n\tconst [ displayPlaceholder, setDisplayPlaceholder ] = useState( true );\n\n\tfunction setFocalPoint( value ) {\n\t\tsetAttributes( { focalPoint: value } );\n\t}\n\n\tconst toggleParallax = () => {\n\t\tsetAttributes( {\n\t\t\thasParallax: ! hasParallax,\n\t\t\t...( ! hasParallax\n\t\t\t\t? { focalPoint: undefined }\n\t\t\t\t: { focalPoint: IMAGE_DEFAULT_FOCAL_POINT } ),\n\t\t} );\n\t};\n\n\tconst addMediaButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.addMediaButton,\n\t\tstyles.addMediaButtonDark\n\t);\n\n\tfunction focalPointPosition( { x, y } = IMAGE_DEFAULT_FOCAL_POINT ) {\n\t\treturn {\n\t\t\tleft: `${ ( hasParallax ? 0.5 : x ) * 100 }%`,\n\t\t\ttop: `${ ( hasParallax ? 0.5 : y ) * 100 }%`,\n\t\t};\n\t}\n\n\tconst [ videoNaturalSize, setVideoNaturalSize ] = useState( null );\n\tconst videoRef = useRef( null );\n\n\tconst mediaBackground = usePreferredColorSchemeStyle(\n\t\tstyles.mediaBackground,\n\t\tstyles.mediaBackgroundDark\n\t);\n\tconst imagePreviewStyles = [\n\t\tdisplayPlaceholder && styles.imagePlaceholder,\n\t];\n\tconst videoPreviewStyles = [\n\t\t{\n\t\t\taspectRatio:\n\t\t\t\tvideoNaturalSize &&\n\t\t\t\tvideoNaturalSize.width / videoNaturalSize.height,\n\t\t\t// Hide Video component since it has black background while loading the source\n\t\t\topacity: displayPlaceholder ? 0 : 1,\n\t\t},\n\t\tstyles.video,\n\t\tdisplayPlaceholder && styles.imagePlaceholder,\n\t];\n\n\tconst focalPointHint = ! hasParallax && ! displayPlaceholder && (\n\t\t<Icon\n\t\t\ticon={ plus }\n\t\t\tsize={ styles.focalPointHint?.width }\n\t\t\tstyle={ [\n\t\t\t\tstyles.focalPointHint,\n\t\t\t\tfocalPointPosition( focalPoint ),\n\t\t\t] }\n\t\t/>\n\t);\n\n\tconst renderMediaSection = ( {\n\t\topen: openMediaOptions,\n\t\tgetMediaOptions,\n\t} ) => (\n\t\t<>\n\t\t\t{ getMediaOptions() }\n\t\t\t{ url ? (\n\t\t\t\t<>\n\t\t\t\t\t<BottomSheet.Cell\n\t\t\t\t\t\taccessible={ false }\n\t\t\t\t\t\tcellContainerStyle={ [\n\t\t\t\t\t\t\tstyles.mediaPreview,\n\t\t\t\t\t\t\tmediaBackground,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t<View style={ styles.mediaInner }>\n\t\t\t\t\t\t\t{ IMAGE_BACKGROUND_TYPE === backgroundType && (\n\t\t\t\t\t\t\t\t<Image\n\t\t\t\t\t\t\t\t\teditButton={ ! displayPlaceholder }\n\t\t\t\t\t\t\t\t\thighlightSelected={ false }\n\t\t\t\t\t\t\t\t\tisSelected={ ! displayPlaceholder }\n\t\t\t\t\t\t\t\t\tisUploadFailed={ didUploadFail }\n\t\t\t\t\t\t\t\t\tisUploadInProgress={ isUploadInProgress }\n\t\t\t\t\t\t\t\t\tmediaPickerOptions={ [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tdestructiveButton: true,\n\t\t\t\t\t\t\t\t\t\t\tid: 'clearMedia',\n\t\t\t\t\t\t\t\t\t\t\tlabel: __( 'Clear Media' ),\n\t\t\t\t\t\t\t\t\t\t\tonPress: onClearMedia,\n\t\t\t\t\t\t\t\t\t\t\tseparated: true,\n\t\t\t\t\t\t\t\t\t\t\tvalue: 'clearMedia',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\tonImageDataLoad={ () => {\n\t\t\t\t\t\t\t\t\t\tsetDisplayPlaceholder( false );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tonSelectMediaUploadOption={ onSelectMedia }\n\t\t\t\t\t\t\t\t\topenMediaOptions={ openMediaOptions }\n\t\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\t\theight=\"100%\"\n\t\t\t\t\t\t\t\t\tstyle={ imagePreviewStyles }\n\t\t\t\t\t\t\t\t\twidth={ styles.image?.width }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ VIDEO_BACKGROUND_TYPE === backgroundType && (\n\t\t\t\t\t\t\t\t<Video\n\t\t\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\t\t\tpaused\n\t\t\t\t\t\t\t\t\tdisableFocus\n\t\t\t\t\t\t\t\t\tonLoadStart={ () => {\n\t\t\t\t\t\t\t\t\t\tsetDisplayPlaceholder( true );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tonLoad={ ( event ) => {\n\t\t\t\t\t\t\t\t\t\tconst { height, width } =\n\t\t\t\t\t\t\t\t\t\t\tevent.naturalSize;\n\t\t\t\t\t\t\t\t\t\tsetVideoNaturalSize( {\n\t\t\t\t\t\t\t\t\t\t\theight,\n\t\t\t\t\t\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\tsetDisplayPlaceholder( false );\n\t\t\t\t\t\t\t\t\t\t// Avoid invisible, paused video on Android, presumably\n\t\t\t\t\t\t\t\t\t\t// related to https://github.com/react-native-video/react-native-video/issues/1979\n\t\t\t\t\t\t\t\t\t\tvideoRef?.current.seek( 0 );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tref={ videoRef }\n\t\t\t\t\t\t\t\t\tresizeMode=\"cover\"\n\t\t\t\t\t\t\t\t\tsource={ { uri: url } }\n\t\t\t\t\t\t\t\t\tstyle={ videoPreviewStyles }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ displayPlaceholder ? null : focalPointHint }\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</BottomSheet.Cell>\n\t\t\t\t\t<FocalPointSettingsButton\n\t\t\t\t\t\tdisabled={ hasParallax }\n\t\t\t\t\t\tfocalPoint={ focalPoint || IMAGE_DEFAULT_FOCAL_POINT }\n\t\t\t\t\t\tonFocalPointChange={ setFocalPoint }\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t/>\n\t\t\t\t\t{ IMAGE_BACKGROUND_TYPE === backgroundType && (\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\tchecked={ hasParallax }\n\t\t\t\t\t\t\tonChange={ toggleParallax }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tleftAlign\n\t\t\t\t\t\tlabel={ __( 'Clear Media' ) }\n\t\t\t\t\t\tlabelStyle={ styles.clearMediaButton }\n\t\t\t\t\t\tonPress={ onClearMedia }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<TextControl\n\t\t\t\t\taccessibilityLabel={ __( 'Add image or video' ) }\n\t\t\t\t\tlabel={ __( 'Add image or video' ) }\n\t\t\t\t\tlabelStyle={ addMediaButtonStyle }\n\t\t\t\t\tleftAlign\n\t\t\t\t\tonPress={ openMediaOptions }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<PanelBody title={ __( 'Media' ) }>\n\t\t\t\t<MediaUpload\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\tisReplacingMedia={ ! hasOnlyColorBackground }\n\t\t\t\t\tonSelect={ onSelectMedia }\n\t\t\t\t\trender={ renderMediaSection }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\n\t\t\t<OverlayColorSettings\n\t\t\t\toverlayColor={ attributes.overlayColor }\n\t\t\t\tcustomOverlayColor={ attributes.customOverlayColor }\n\t\t\t\tgradient={ attributes.gradient }\n\t\t\t\tcustomGradient={ attributes.customGradient }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\n\t\t\t{ url ? (\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Opacity' ) }\n\t\t\t\t\t\tminimumValue={ 0 }\n\t\t\t\t\t\tmaximumValue={ 100 }\n\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\tonChange={ onOpacityChange }\n\t\t\t\t\t\tstyle={ styles.rangeCellContainer }\n\t\t\t\t\t\tseparatorType=\"topFullWidth\"\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) : null }\n\n\t\t\t<PanelBody title={ __( 'Dimensions' ) }>\n\t\t\t\t<UnitControl\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tmin={ minHeightUnit === 'px' ? COVER_MIN_HEIGHT : 1 }\n\t\t\t\t\tmax={ COVER_MAX_HEIGHT }\n\t\t\t\t\tunit={ minHeightUnit }\n\t\t\t\t\tvalue={ CONTAINER_HEIGHT }\n\t\t\t\t\tonChange={ onHeightChange }\n\t\t\t\t\tonUnitChange={ onChangeUnit }\n\t\t\t\t\tunits={ units }\n\t\t\t\t\tstyle={ styles.rangeCellContainer }\n\t\t\t\t\tkey={ minHeightUnit }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</>\n\t);\n}\n\nexport default Controls;\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AAYA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AAKA,IAAAS,MAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,qBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,yBAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,OAAA,GAAAZ,OAAA;AAOkB,IAAAa,WAAA,GAAAb,OAAA;AAxClB;AACA;AACA;;AAIA;AACA;AACA;;AAmBA;AACA;AACA;;AAaA,SAASc,QAAQA,CAAE;EAClBC,UAAU;EACVC,aAAa;EACbC,sBAAsB;EACtBC,kBAAkB;EAClBC,YAAY;EACZC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,MAAM;IACLC,cAAc;IACdC,QAAQ;IACRC,WAAW;IACXC,UAAU;IACVC,SAAS;IACTC,aAAa,GAAG,IAAI;IACpBC;EACD,CAAC,GAAGb,UAAU;EACd,MAAMc,gBAAgB,GAAGH,SAAS,IAAII,4BAAoB;EAC1D,MAAMC,cAAc,GAAG,IAAAC,oBAAW,EAC/BC,KAAK,IAAM;IACZ,IAAKP,SAAS,IAAIO,KAAK,KAAKH,4BAAoB,EAAG;MAClDT,aAAa,CAAE;QAAEK,SAAS,EAAEO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