@wordpress/block-library 9.5.0 → 9.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/archives/edit.js +1 -0
- package/build/archives/edit.js.map +1 -1
- package/build/audio/edit.js +1 -0
- package/build/audio/edit.js.map +1 -1
- package/build/avatar/user-control.js +1 -0
- package/build/avatar/user-control.js.map +1 -1
- package/build/button/edit.js +1 -0
- package/build/button/edit.js.map +1 -1
- package/build/comment-author-name/index.js +14 -1
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +14 -1
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/index.js +14 -1
- package/build/comment-date/index.js.map +1 -1
- package/build/comments-pagination/comments-pagination-arrow-controls.js +1 -0
- package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +0 -1
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/embed/edit.js +12 -4
- package/build/embed/edit.js.map +1 -1
- package/build/embed/embed-placeholder.js +6 -3
- package/build/embed/embed-placeholder.js.map +1 -1
- package/build/embed/embed-preview.js +4 -18
- package/build/embed/embed-preview.js.map +1 -1
- package/build/file/index.js +12 -0
- package/build/file/index.js.map +1 -1
- package/build/file/inspector.js +1 -0
- package/build/file/inspector.js.map +1 -1
- package/build/form/edit.js +2 -0
- package/build/form/edit.js.map +1 -1
- package/build/form-input/edit.js +1 -0
- package/build/form-input/edit.js.map +1 -1
- package/build/gallery/edit.js +2 -6
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.native.js +4 -1
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/group/edit.js +1 -1
- package/build/group/edit.js.map +1 -1
- package/build/image/image.js +6 -1
- package/build/image/image.js.map +1 -1
- package/build/image/transforms.js +4 -0
- package/build/image/transforms.js.map +1 -1
- package/build/latest-posts/edit.js +37 -11
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/index.js +9 -0
- package/build/list/index.js.map +1 -1
- package/build/list-item/index.js +8 -1
- package/build/list-item/index.js.map +1 -1
- package/build/media-text/edit.js +0 -1
- package/build/media-text/edit.js.map +1 -1
- package/build/missing/edit.js +10 -19
- package/build/missing/edit.js.map +1 -1
- package/build/navigation/edit/index.js +3 -4
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-name-control.js +1 -0
- package/build/navigation/edit/navigation-menu-name-control.js.map +1 -1
- package/build/navigation/edit/overlay-menu-preview.js +2 -0
- package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build/post-author/edit.js +60 -53
- package/build/post-author/edit.js.map +1 -1
- package/build/post-author/index.js +13 -0
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/index.js +14 -1
- package/build/post-author-biography/index.js.map +1 -1
- package/build/post-author-name/index.js +14 -1
- package/build/post-author-name/index.js.map +1 -1
- package/build/post-comment/edit.js +2 -0
- package/build/post-comment/edit.js.map +1 -1
- package/build/post-excerpt/edit.js +1 -0
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js +9 -2
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +1 -0
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-navigation-link/edit.js +5 -2
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-terms/edit.js +1 -0
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-title/edit.js +1 -0
- package/build/post-title/edit.js.map +1 -1
- package/build/preformatted/index.js +12 -0
- package/build/preformatted/index.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/query-content.js +1 -1
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query-pagination/query-pagination-arrow-controls.js +1 -0
- package/build/query-pagination/query-pagination-arrow-controls.js.map +1 -1
- package/build/query-pagination-numbers/edit.js +1 -0
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-title/index.js +12 -0
- package/build/query-title/index.js.map +1 -1
- package/build/quote/index.js +1 -0
- package/build/quote/index.js.map +1 -1
- package/build/quote/transforms.js +4 -0
- package/build/quote/transforms.js.map +1 -1
- package/build/search/edit.js +9 -5
- package/build/search/edit.js.map +1 -1
- package/build/social-link/edit.js +2 -0
- package/build/social-link/edit.js.map +1 -1
- package/build/table/edit.js +6 -5
- package/build/table/edit.js.map +1 -1
- package/build/tag-cloud/edit.js +44 -33
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/tag-cloud/index.js +12 -0
- package/build/tag-cloud/index.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +2 -0
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/video/edit-common-settings.js +1 -0
- package/build/video/edit-common-settings.js.map +1 -1
- package/build/video/edit.js +1 -1
- package/build/video/edit.js.map +1 -1
- package/build/video/tracks-editor.js +3 -0
- package/build/video/tracks-editor.js.map +1 -1
- package/build/video/transforms.js +4 -0
- package/build/video/transforms.js.map +1 -1
- package/build-module/archives/edit.js +1 -0
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/audio/edit.js +1 -0
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/avatar/user-control.js +1 -0
- package/build-module/avatar/user-control.js.map +1 -1
- package/build-module/button/edit.js +1 -0
- package/build-module/button/edit.js.map +1 -1
- package/build-module/comment-author-name/index.js +14 -1
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +14 -1
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/index.js +14 -1
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js +1 -0
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +0 -1
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/embed/edit.js +13 -5
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/embed-placeholder.js +7 -4
- package/build-module/embed/embed-placeholder.js.map +1 -1
- package/build-module/embed/embed-preview.js +5 -19
- package/build-module/embed/embed-preview.js.map +1 -1
- package/build-module/file/index.js +12 -0
- package/build-module/file/index.js.map +1 -1
- package/build-module/file/inspector.js +1 -0
- package/build-module/file/inspector.js.map +1 -1
- package/build-module/form/edit.js +2 -0
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form-input/edit.js +1 -0
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/gallery/edit.js +3 -7
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.native.js +4 -1
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/group/edit.js +1 -1
- package/build-module/group/edit.js.map +1 -1
- package/build-module/image/image.js +7 -2
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/transforms.js +5 -1
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/latest-posts/edit.js +40 -14
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/index.js +9 -0
- package/build-module/list/index.js.map +1 -1
- package/build-module/list-item/index.js +8 -1
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/media-text/edit.js +0 -1
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/missing/edit.js +10 -19
- package/build-module/missing/edit.js.map +1 -1
- package/build-module/navigation/edit/index.js +3 -4
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-name-control.js +1 -0
- package/build-module/navigation/edit/navigation-menu-name-control.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +2 -0
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/post-author/edit.js +61 -54
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-author/index.js +13 -0
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/index.js +14 -1
- package/build-module/post-author-biography/index.js.map +1 -1
- package/build-module/post-author-name/index.js +14 -1
- package/build-module/post-author-name/index.js.map +1 -1
- package/build-module/post-comment/edit.js +2 -0
- package/build-module/post-comment/edit.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -0
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +9 -2
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +1 -0
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +5 -2
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +1 -0
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-title/edit.js +1 -0
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/preformatted/index.js +12 -0
- package/build-module/preformatted/index.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/query-content.js +1 -1
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query-pagination/query-pagination-arrow-controls.js +1 -0
- package/build-module/query-pagination/query-pagination-arrow-controls.js.map +1 -1
- package/build-module/query-pagination-numbers/edit.js +1 -0
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-title/index.js +12 -0
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/index.js +1 -0
- package/build-module/quote/index.js.map +1 -1
- package/build-module/quote/transforms.js +4 -0
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/search/edit.js +10 -6
- package/build-module/search/edit.js.map +1 -1
- package/build-module/social-link/edit.js +2 -0
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/table/edit.js +6 -5
- package/build-module/table/edit.js.map +1 -1
- package/build-module/tag-cloud/edit.js +45 -34
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/tag-cloud/index.js +12 -0
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +2 -0
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/video/edit-common-settings.js +1 -0
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-module/video/edit.js +1 -1
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/tracks-editor.js +3 -0
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-module/video/transforms.js +5 -1
- package/build-module/video/transforms.js.map +1 -1
- package/build-style/archives/editor-rtl.css +2 -2
- package/build-style/archives/editor.css +2 -2
- package/build-style/archives/style-rtl.css +2 -2
- package/build-style/archives/style.css +2 -2
- package/build-style/audio/editor-rtl.css +2 -2
- package/build-style/audio/editor.css +2 -2
- package/build-style/audio/style-rtl.css +2 -2
- package/build-style/audio/style.css +2 -2
- package/build-style/audio/theme-rtl.css +2 -2
- package/build-style/audio/theme.css +2 -2
- package/build-style/avatar/editor-rtl.css +2 -2
- package/build-style/avatar/editor.css +2 -2
- package/build-style/avatar/style-rtl.css +2 -2
- package/build-style/avatar/style.css +2 -2
- package/build-style/button/editor-rtl.css +2 -2
- package/build-style/button/editor.css +2 -2
- package/build-style/button/style-rtl.css +2 -2
- package/build-style/button/style.css +2 -2
- package/build-style/buttons/editor-rtl.css +2 -2
- package/build-style/buttons/editor.css +2 -2
- package/build-style/buttons/style-rtl.css +2 -2
- package/build-style/buttons/style.css +2 -2
- package/build-style/calendar/style-rtl.css +2 -2
- package/build-style/calendar/style.css +2 -2
- package/build-style/categories/editor-rtl.css +2 -2
- package/build-style/categories/editor.css +2 -2
- package/build-style/categories/style-rtl.css +2 -2
- package/build-style/categories/style.css +2 -2
- package/build-style/classic-rtl.css +2 -2
- package/build-style/classic.css +2 -2
- package/build-style/code/editor-rtl.css +2 -2
- package/build-style/code/editor.css +2 -2
- package/build-style/code/style-rtl.css +2 -2
- package/build-style/code/style.css +2 -2
- package/build-style/code/theme-rtl.css +2 -2
- package/build-style/code/theme.css +2 -2
- package/build-style/columns/editor-rtl.css +2 -2
- package/build-style/columns/editor.css +2 -2
- package/build-style/columns/style-rtl.css +2 -2
- package/build-style/columns/style.css +2 -2
- package/build-style/comment-author-avatar/editor-rtl.css +2 -2
- package/build-style/comment-author-avatar/editor.css +2 -2
- package/build-style/comment-author-name/style-rtl.css +94 -0
- package/build-style/comment-author-name/style.css +94 -0
- package/build-style/comment-content/style-rtl.css +6 -2
- package/build-style/comment-content/style.css +6 -2
- package/build-style/comment-date/style-rtl.css +94 -0
- package/build-style/comment-date/style.css +94 -0
- package/build-style/comment-template/style-rtl.css +2 -2
- package/build-style/comment-template/style.css +2 -2
- package/build-style/comments/editor-rtl.css +2 -2
- package/build-style/comments/editor.css +2 -2
- package/build-style/comments/style-rtl.css +2 -2
- package/build-style/comments/style.css +2 -2
- package/build-style/comments-pagination/editor-rtl.css +2 -2
- package/build-style/comments-pagination/editor.css +2 -2
- package/build-style/comments-pagination/style-rtl.css +2 -2
- package/build-style/comments-pagination/style.css +2 -2
- package/build-style/comments-pagination-numbers/editor-rtl.css +2 -2
- package/build-style/comments-pagination-numbers/editor.css +2 -2
- package/build-style/comments-title/editor-rtl.css +2 -2
- package/build-style/comments-title/editor.css +2 -2
- package/build-style/common-rtl.css +2 -2
- package/build-style/common.css +2 -2
- package/build-style/cover/editor-rtl.css +2 -2
- package/build-style/cover/editor.css +2 -2
- package/build-style/cover/style-rtl.css +2 -2
- package/build-style/cover/style.css +2 -2
- package/build-style/details/editor-rtl.css +2 -2
- package/build-style/details/editor.css +2 -2
- package/build-style/details/style-rtl.css +2 -2
- package/build-style/details/style.css +2 -2
- package/build-style/editor-elements-rtl.css +2 -2
- package/build-style/editor-elements.css +2 -2
- package/build-style/editor-rtl.css +31 -15
- package/build-style/editor.css +31 -15
- package/build-style/elements-rtl.css +2 -2
- package/build-style/elements.css +2 -2
- package/build-style/embed/editor-rtl.css +5 -2
- package/build-style/embed/editor.css +5 -2
- package/build-style/embed/style-rtl.css +2 -2
- package/build-style/embed/style.css +2 -2
- package/build-style/embed/theme-rtl.css +2 -2
- package/build-style/embed/theme.css +2 -2
- package/build-style/file/editor-rtl.css +2 -2
- package/build-style/file/editor.css +2 -2
- package/build-style/file/style-rtl.css +2 -2
- package/build-style/file/style.css +2 -2
- package/build-style/footnotes/style-rtl.css +2 -2
- package/build-style/footnotes/style.css +2 -2
- package/build-style/form-input/editor-rtl.css +2 -2
- package/build-style/form-input/editor.css +2 -2
- package/build-style/form-input/style-rtl.css +2 -2
- package/build-style/form-input/style.css +2 -2
- package/build-style/form-submission-notification/editor-rtl.css +2 -2
- package/build-style/form-submission-notification/editor.css +2 -2
- package/build-style/form-submit-button/style-rtl.css +2 -2
- package/build-style/form-submit-button/style.css +2 -2
- package/build-style/freeform/editor-rtl.css +2 -2
- package/build-style/freeform/editor.css +2 -2
- package/build-style/gallery/editor-rtl.css +2 -2
- package/build-style/gallery/editor.css +2 -2
- package/build-style/gallery/style-rtl.css +26 -9
- package/build-style/gallery/style.css +26 -9
- package/build-style/gallery/theme-rtl.css +2 -2
- package/build-style/gallery/theme.css +2 -2
- package/build-style/group/editor-rtl.css +2 -2
- package/build-style/group/editor.css +2 -2
- package/build-style/group/style-rtl.css +2 -2
- package/build-style/group/style.css +2 -2
- package/build-style/group/theme-rtl.css +2 -2
- package/build-style/group/theme.css +2 -2
- package/build-style/heading/style-rtl.css +2 -2
- package/build-style/heading/style.css +2 -2
- package/build-style/html/editor-rtl.css +2 -2
- package/build-style/html/editor.css +2 -2
- package/build-style/image/editor-rtl.css +2 -2
- package/build-style/image/editor.css +2 -2
- package/build-style/image/style-rtl.css +2 -2
- package/build-style/image/style.css +2 -2
- package/build-style/image/theme-rtl.css +2 -2
- package/build-style/image/theme.css +2 -2
- package/build-style/latest-comments/style-rtl.css +2 -2
- package/build-style/latest-comments/style.css +2 -2
- package/build-style/latest-posts/editor-rtl.css +9 -6
- package/build-style/latest-posts/editor.css +9 -6
- package/build-style/latest-posts/style-rtl.css +2 -2
- package/build-style/latest-posts/style.css +2 -2
- package/build-style/list/style-rtl.css +2 -2
- package/build-style/list/style.css +2 -2
- package/build-style/loginout/style-rtl.css +2 -2
- package/build-style/loginout/style.css +2 -2
- package/build-style/media-text/editor-rtl.css +2 -2
- package/build-style/media-text/editor.css +2 -2
- package/build-style/media-text/style-rtl.css +2 -2
- package/build-style/media-text/style.css +2 -2
- package/build-style/more/editor-rtl.css +2 -2
- package/build-style/more/editor.css +2 -2
- package/build-style/navigation/editor-rtl.css +6 -2
- package/build-style/navigation/editor.css +6 -2
- package/build-style/navigation/style-rtl.css +2 -2
- package/build-style/navigation/style.css +2 -2
- package/build-style/navigation-link/editor-rtl.css +2 -5
- package/build-style/navigation-link/editor.css +2 -5
- package/build-style/navigation-link/style-rtl.css +2 -2
- package/build-style/navigation-link/style.css +2 -2
- package/build-style/navigation-submenu/editor-rtl.css +2 -2
- package/build-style/navigation-submenu/editor.css +2 -2
- package/build-style/nextpage/editor-rtl.css +2 -2
- package/build-style/nextpage/editor.css +2 -2
- package/build-style/page-list/editor-rtl.css +2 -2
- package/build-style/page-list/editor.css +2 -2
- package/build-style/page-list/style-rtl.css +2 -2
- package/build-style/page-list/style.css +2 -2
- package/build-style/paragraph/editor-rtl.css +2 -2
- package/build-style/paragraph/editor.css +2 -2
- package/build-style/paragraph/style-rtl.css +2 -2
- package/build-style/paragraph/style.css +2 -2
- package/build-style/post-author/editor-rtl.css +95 -0
- package/build-style/post-author/editor.css +95 -0
- package/build-style/post-author/style-rtl.css +3 -2
- package/build-style/post-author/style.css +3 -2
- package/build-style/post-author-biography/style-rtl.css +94 -0
- package/build-style/post-author-biography/style.css +94 -0
- package/build-style/post-author-name/style-rtl.css +94 -0
- package/build-style/post-author-name/style.css +94 -0
- package/build-style/post-comments-form/editor-rtl.css +2 -2
- package/build-style/post-comments-form/editor.css +2 -2
- package/build-style/post-comments-form/style-rtl.css +2 -2
- package/build-style/post-comments-form/style.css +2 -2
- package/build-style/post-content/editor-rtl.css +2 -2
- package/build-style/post-content/editor.css +2 -2
- package/build-style/post-content/style-rtl.css +2 -2
- package/build-style/post-content/style.css +2 -2
- package/build-style/post-date/style-rtl.css +2 -2
- package/build-style/post-date/style.css +2 -2
- package/build-style/post-excerpt/editor-rtl.css +2 -2
- package/build-style/post-excerpt/editor.css +2 -2
- package/build-style/post-excerpt/style-rtl.css +2 -2
- package/build-style/post-excerpt/style.css +2 -2
- package/build-style/post-featured-image/editor-rtl.css +2 -2
- package/build-style/post-featured-image/editor.css +2 -2
- package/build-style/post-featured-image/style-rtl.css +2 -2
- package/build-style/post-featured-image/style.css +2 -2
- package/build-style/post-navigation-link/style-rtl.css +2 -2
- package/build-style/post-navigation-link/style.css +2 -2
- package/build-style/post-template/editor-rtl.css +2 -2
- package/build-style/post-template/editor.css +2 -2
- package/build-style/post-template/style-rtl.css +2 -2
- package/build-style/post-template/style.css +2 -2
- package/build-style/post-terms/style-rtl.css +2 -2
- package/build-style/post-terms/style.css +2 -2
- package/build-style/post-time-to-read/style-rtl.css +2 -2
- package/build-style/post-time-to-read/style.css +2 -2
- package/build-style/post-title/style-rtl.css +2 -2
- package/build-style/post-title/style.css +2 -2
- package/build-style/preformatted/style-rtl.css +2 -2
- package/build-style/preformatted/style.css +2 -2
- package/build-style/pullquote/editor-rtl.css +2 -2
- package/build-style/pullquote/editor.css +2 -2
- package/build-style/pullquote/style-rtl.css +2 -2
- package/build-style/pullquote/style.css +2 -2
- package/build-style/pullquote/theme-rtl.css +2 -2
- package/build-style/pullquote/theme.css +2 -2
- package/build-style/query/editor-rtl.css +2 -2
- package/build-style/query/editor.css +2 -2
- package/build-style/query-pagination/editor-rtl.css +2 -2
- package/build-style/query-pagination/editor.css +2 -2
- package/build-style/query-pagination/style-rtl.css +2 -2
- package/build-style/query-pagination/style.css +2 -2
- package/build-style/query-pagination-numbers/editor-rtl.css +2 -2
- package/build-style/query-pagination-numbers/editor.css +2 -2
- package/build-style/query-title/style-rtl.css +2 -2
- package/build-style/query-title/style.css +2 -2
- package/build-style/quote/style-rtl.css +2 -2
- package/build-style/quote/style.css +2 -2
- package/build-style/quote/theme-rtl.css +2 -2
- package/build-style/quote/theme.css +2 -2
- package/build-style/read-more/style-rtl.css +2 -2
- package/build-style/read-more/style.css +2 -2
- package/build-style/reset-rtl.css +2 -2
- package/build-style/reset.css +2 -2
- package/build-style/rss/editor-rtl.css +2 -2
- package/build-style/rss/editor.css +2 -2
- package/build-style/rss/style-rtl.css +2 -2
- package/build-style/rss/style.css +2 -2
- package/build-style/search/editor-rtl.css +5 -4
- package/build-style/search/editor.css +5 -4
- package/build-style/search/style-rtl.css +2 -2
- package/build-style/search/style.css +2 -2
- package/build-style/search/theme-rtl.css +2 -2
- package/build-style/search/theme.css +2 -2
- package/build-style/separator/editor-rtl.css +2 -2
- package/build-style/separator/editor.css +2 -2
- package/build-style/separator/style-rtl.css +2 -2
- package/build-style/separator/style.css +2 -2
- package/build-style/separator/theme-rtl.css +2 -2
- package/build-style/separator/theme.css +2 -2
- package/build-style/shortcode/editor-rtl.css +2 -2
- package/build-style/shortcode/editor.css +2 -2
- package/build-style/site-logo/editor-rtl.css +2 -2
- package/build-style/site-logo/editor.css +2 -2
- package/build-style/site-logo/style-rtl.css +2 -2
- package/build-style/site-logo/style.css +2 -2
- package/build-style/site-tagline/editor-rtl.css +2 -2
- package/build-style/site-tagline/editor.css +2 -2
- package/build-style/site-tagline/style-rtl.css +2 -2
- package/build-style/site-tagline/style.css +2 -2
- package/build-style/site-title/editor-rtl.css +2 -2
- package/build-style/site-title/editor.css +2 -2
- package/build-style/site-title/style-rtl.css +2 -2
- package/build-style/site-title/style.css +2 -2
- package/build-style/social-link/editor-rtl.css +2 -2
- package/build-style/social-link/editor.css +2 -2
- package/build-style/social-links/editor-rtl.css +2 -2
- package/build-style/social-links/editor.css +2 -2
- package/build-style/social-links/style-rtl.css +2 -2
- package/build-style/social-links/style.css +2 -2
- package/build-style/spacer/editor-rtl.css +2 -2
- package/build-style/spacer/editor.css +2 -2
- package/build-style/spacer/style-rtl.css +2 -2
- package/build-style/spacer/style.css +2 -2
- package/build-style/style-rtl.css +53 -9
- package/build-style/style.css +53 -9
- package/build-style/table/editor-rtl.css +2 -2
- package/build-style/table/editor.css +2 -2
- package/build-style/table/style-rtl.css +2 -2
- package/build-style/table/style.css +2 -2
- package/build-style/table/theme-rtl.css +2 -2
- package/build-style/table/theme.css +2 -2
- package/build-style/table-of-contents/style-rtl.css +2 -2
- package/build-style/table-of-contents/style.css +2 -2
- package/build-style/tag-cloud/editor-rtl.css +9 -2
- package/build-style/tag-cloud/editor.css +9 -2
- package/build-style/tag-cloud/style-rtl.css +2 -2
- package/build-style/tag-cloud/style.css +2 -2
- package/build-style/template-part/editor-rtl.css +2 -6
- package/build-style/template-part/editor.css +2 -6
- package/build-style/template-part/theme-rtl.css +2 -2
- package/build-style/template-part/theme.css +2 -2
- package/build-style/term-description/style-rtl.css +2 -2
- package/build-style/term-description/style.css +2 -2
- package/build-style/text-columns/editor-rtl.css +2 -2
- package/build-style/text-columns/editor.css +2 -2
- package/build-style/text-columns/style-rtl.css +2 -2
- package/build-style/text-columns/style.css +2 -2
- package/build-style/theme-rtl.css +2 -2
- package/build-style/theme.css +2 -2
- package/build-style/verse/style-rtl.css +2 -2
- package/build-style/verse/style.css +2 -2
- package/build-style/video/editor-rtl.css +2 -2
- package/build-style/video/editor.css +2 -2
- package/build-style/video/style-rtl.css +2 -2
- package/build-style/video/style.css +2 -2
- package/build-style/video/theme-rtl.css +2 -2
- package/build-style/video/theme.css +2 -2
- package/package.json +35 -35
- package/src/archives/edit.js +1 -0
- package/src/audio/edit.js +4 -3
- package/src/avatar/user-control.js +1 -0
- package/src/button/edit.js +1 -0
- package/src/comment-author-name/block.json +14 -1
- package/src/comment-author-name/style.scss +4 -0
- package/src/comment-content/block.json +14 -1
- package/src/comment-content/style.scss +5 -0
- package/src/comment-date/block.json +14 -1
- package/src/comment-date/index.php +1 -1
- package/src/comment-date/style.scss +4 -0
- package/src/comments-pagination/comments-pagination-arrow-controls.js +1 -0
- package/src/cover/edit/inspector-controls.js +0 -1
- package/src/editor.scss +1 -0
- package/src/embed/edit.js +10 -1
- package/src/embed/editor.scss +4 -0
- package/src/embed/embed-placeholder.js +7 -4
- package/src/embed/embed-preview.js +3 -37
- package/src/file/block.json +12 -0
- package/src/file/inspector.js +1 -0
- package/src/form/edit.js +2 -0
- package/src/form/index.php +2 -2
- package/src/form-input/edit.js +1 -0
- package/src/gallery/edit.js +5 -9
- package/src/gallery/editor.scss +1 -1
- package/src/gallery/gallery.native.js +2 -1
- package/src/gallery/style.scss +33 -7
- package/src/group/edit.js +1 -1
- package/src/image/image.js +7 -1
- package/src/image/transforms.js +7 -1
- package/src/latest-posts/edit.js +60 -17
- package/src/latest-posts/editor.scss +11 -6
- package/src/list/block.json +9 -0
- package/src/list-item/block.json +8 -1
- package/src/media-text/edit.js +0 -1
- package/src/missing/edit.js +12 -18
- package/src/navigation/edit/index.js +3 -3
- package/src/navigation/edit/navigation-menu-name-control.js +1 -0
- package/src/navigation/edit/overlay-menu-preview.js +2 -0
- package/src/navigation/editor.scss +5 -0
- package/src/navigation/index.php +10 -27
- package/src/navigation-link/editor.scss +0 -3
- package/src/post-author/block.json +13 -0
- package/src/post-author/edit.js +68 -57
- package/src/post-author/editor.scss +7 -0
- package/src/post-author/style.scss +1 -0
- package/src/post-author-biography/block.json +14 -1
- package/src/post-author-biography/style.scss +4 -0
- package/src/post-author-name/block.json +14 -1
- package/src/post-author-name/style.scss +4 -0
- package/src/post-comment/edit.js +2 -0
- package/src/post-date/index.php +3 -3
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-featured-image/dimension-controls.js +5 -0
- package/src/post-featured-image/edit.js +1 -0
- package/src/post-navigation-link/edit.js +6 -2
- package/src/post-terms/edit.js +1 -0
- package/src/post-title/edit.js +1 -0
- package/src/preformatted/block.json +12 -0
- package/src/query/edit/inspector-controls/parent-control.js +1 -0
- package/src/query/edit/query-content.js +1 -1
- package/src/query-pagination/query-pagination-arrow-controls.js +1 -0
- package/src/query-pagination-numbers/edit.js +1 -0
- package/src/query-title/block.json +12 -0
- package/src/quote/block.json +1 -0
- package/src/quote/test/transforms.native.js +1 -1
- package/src/quote/transforms.js +11 -2
- package/src/search/edit.js +9 -9
- package/src/search/editor.scss +5 -2
- package/src/social-link/edit.js +2 -0
- package/src/style.scss +5 -0
- package/src/table/edit.js +5 -4
- package/src/tag-cloud/block.json +12 -0
- package/src/tag-cloud/edit.js +46 -34
- package/src/tag-cloud/editor.scss +11 -1
- package/src/template-part/edit/advanced-controls.js +2 -0
- package/src/template-part/editor.scss +0 -5
- package/src/video/edit-common-settings.js +1 -0
- package/src/video/edit.js +2 -2
- package/src/video/tracks-editor.js +3 -0
- package/src/video/transforms.js +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_blocks","_components","_data","_htmlEntities","_i18n","_coreData","_usePostTerms","_jsxRuntime","ALLOWED_FORMATS","PostTermsEdit","attributes","clientId","context","isSelected","setAttributes","insertBlocksAfter","term","textAlign","separator","prefix","suffix","postId","postType","selectedTerm","useSelect","select","getTaxonomy","coreStore","taxonomy","visibility","publicly_queryable","postTerms","hasPostTerms","isLoading","usePostTerms","hasPost","blockInformation","useBlockDisplayInformation","blockProps","useBlockProps","className","clsx","jsxs","Fragment","children","jsx","BlockControls","AlignmentToolbar","value","onChange","nextAlign","InspectorControls","group","TextControl","__nextHasNoMarginBottom","autoComplete","label","__","nextValue","help","Spinner","RichText","identifier","allowedFormats","placeholder","tagName","title","map","postTerm","href","link","onClick","event","preventDefault","decodeEntities","name","id","reduce","prev","curr","labels","no_terms","__unstableOnSplitAtEnd","createBlock","getDefaultBlockName"],"sources":["@wordpress/block-library/src/post-terms/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentToolbar,\n\tInspectorControls,\n\tBlockControls,\n\tuseBlockProps,\n\tuseBlockDisplayInformation,\n\tRichText,\n} from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { Spinner, TextControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport usePostTerms from './use-post-terms';\n\n// Allowed formats for the prefix and suffix fields.\nconst ALLOWED_FORMATS = [\n\t'core/bold',\n\t'core/image',\n\t'core/italic',\n\t'core/link',\n\t'core/strikethrough',\n\t'core/text-color',\n];\n\nexport default function PostTermsEdit( {\n\tattributes,\n\tclientId,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tinsertBlocksAfter,\n} ) {\n\tconst { term, textAlign, separator, prefix, suffix } = attributes;\n\tconst { postId, postType } = context;\n\n\tconst selectedTerm = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! term ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst { getTaxonomy } = select( coreStore );\n\t\t\tconst taxonomy = getTaxonomy( term );\n\t\t\treturn taxonomy?.visibility?.publicly_queryable ? taxonomy : {};\n\t\t},\n\t\t[ term ]\n\t);\n\tconst { postTerms, hasPostTerms, isLoading } = usePostTerms( {\n\t\tpostId,\n\t\tterm: selectedTerm,\n\t} );\n\tconst hasPost = postId && postType;\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t[ `taxonomy-${ term }` ]: term,\n\t\t} ),\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<AlignmentToolbar\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\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tlabel={ __( 'Separator' ) }\n\t\t\t\t\tvalue={ separator || '' }\n\t\t\t\t\tonChange={ ( nextValue ) => {\n\t\t\t\t\t\tsetAttributes( { separator: nextValue } );\n\t\t\t\t\t} }\n\t\t\t\t\thelp={ __( 'Enter character(s) used to separate terms.' ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ isLoading && hasPost && <Spinner /> }\n\t\t\t\t{ ! isLoading && ( isSelected || prefix ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"prefix\"\n\t\t\t\t\t\tallowedFormats={ ALLOWED_FORMATS }\n\t\t\t\t\t\tclassName=\"wp-block-post-terms__prefix\"\n\t\t\t\t\t\taria-label={ __( 'Prefix' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Prefix' ) + ' ' }\n\t\t\t\t\t\tvalue={ prefix }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { prefix: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( ! hasPost || ! term ) && (\n\t\t\t\t\t<span>{ blockInformation.title }</span>\n\t\t\t\t) }\n\t\t\t\t{ hasPost &&\n\t\t\t\t\t! isLoading &&\n\t\t\t\t\thasPostTerms &&\n\t\t\t\t\tpostTerms\n\t\t\t\t\t\t.map( ( postTerm ) => (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tkey={ postTerm.id }\n\t\t\t\t\t\t\t\thref={ postTerm.link }\n\t\t\t\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( postTerm.name ) }\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t) )\n\t\t\t\t\t\t.reduce( ( prev, curr ) => (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{ prev }\n\t\t\t\t\t\t\t\t<span className=\"wp-block-post-terms__separator\">\n\t\t\t\t\t\t\t\t\t{ separator || ' ' }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{ curr }\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) ) }\n\t\t\t\t{ hasPost &&\n\t\t\t\t\t! isLoading &&\n\t\t\t\t\t! hasPostTerms &&\n\t\t\t\t\t( selectedTerm?.labels?.no_terms ||\n\t\t\t\t\t\t__( 'Term items not found.' ) ) }\n\t\t\t\t{ ! isLoading && ( isSelected || suffix ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"suffix\"\n\t\t\t\t\t\tallowedFormats={ ALLOWED_FORMATS }\n\t\t\t\t\t\tclassName=\"wp-block-post-terms__suffix\"\n\t\t\t\t\t\taria-label={ __( 'Suffix' ) }\n\t\t\t\t\t\tplaceholder={ ' ' + __( 'Suffix' ) }\n\t\t\t\t\t\tvalue={ suffix }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { suffix: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\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;AAQA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA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,OAAO,IACR,CAAEF,SAAS,IACX,CAAED,YAAY,KACZT,YAAY,EAAEyD,MAAM,EAAEC,QAAQ,IAC/B,IAAAxB,QAAE,EAAE,uBAAwB,CAAC,CAAE,EAC/B,CAAExB,SAAS,KAAMpB,UAAU,IAAIO,MAAM,CAAE,iBACxC,IAAAb,WAAA,CAAAsC,GAAA,EAAC9C,YAAA,CAAA8D,QAAQ;QACRC,UAAU,EAAC,QAAQ;QACnBC,cAAc,EAAGvD,eAAiB;QAClCgC,SAAS,EAAC,6BAA6B;QACvC,cAAa,IAAAiB,QAAE,EAAE,QAAS,CAAG;QAC7BO,WAAW,EAAG,GAAG,GAAG,IAAAP,QAAE,EAAE,QAAS,CAAG;QACpCT,KAAK,EAAG5B,MAAQ;QAChB6B,QAAQ,EAAKD,KAAK,IACjBlC,aAAa,CAAE;UAAEM,MAAM,EAAE4B;QAAM,CAAE,CACjC;QACDiB,OAAO,EAAC,MAAM;QACdiB,sBAAsB,EAAGA,CAAA,KACxBnE,iBAAiB,CAChB,IAAAoE,mBAAW,EAAE,IAAAC,2BAAmB,EAAC,CAAE,CACpC;MACA,CACD,CACD;IAAA,CACG,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_blocks","_components","_data","_htmlEntities","_i18n","_coreData","_usePostTerms","_jsxRuntime","ALLOWED_FORMATS","PostTermsEdit","attributes","clientId","context","isSelected","setAttributes","insertBlocksAfter","term","textAlign","separator","prefix","suffix","postId","postType","selectedTerm","useSelect","select","getTaxonomy","coreStore","taxonomy","visibility","publicly_queryable","postTerms","hasPostTerms","isLoading","usePostTerms","hasPost","blockInformation","useBlockDisplayInformation","blockProps","useBlockProps","className","clsx","jsxs","Fragment","children","jsx","BlockControls","AlignmentToolbar","value","onChange","nextAlign","InspectorControls","group","TextControl","__next40pxDefaultSize","__nextHasNoMarginBottom","autoComplete","label","__","nextValue","help","Spinner","RichText","identifier","allowedFormats","placeholder","tagName","title","map","postTerm","href","link","onClick","event","preventDefault","decodeEntities","name","id","reduce","prev","curr","labels","no_terms","__unstableOnSplitAtEnd","createBlock","getDefaultBlockName"],"sources":["@wordpress/block-library/src/post-terms/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentToolbar,\n\tInspectorControls,\n\tBlockControls,\n\tuseBlockProps,\n\tuseBlockDisplayInformation,\n\tRichText,\n} from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { Spinner, TextControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport usePostTerms from './use-post-terms';\n\n// Allowed formats for the prefix and suffix fields.\nconst ALLOWED_FORMATS = [\n\t'core/bold',\n\t'core/image',\n\t'core/italic',\n\t'core/link',\n\t'core/strikethrough',\n\t'core/text-color',\n];\n\nexport default function PostTermsEdit( {\n\tattributes,\n\tclientId,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tinsertBlocksAfter,\n} ) {\n\tconst { term, textAlign, separator, prefix, suffix } = attributes;\n\tconst { postId, postType } = context;\n\n\tconst selectedTerm = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! term ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst { getTaxonomy } = select( coreStore );\n\t\t\tconst taxonomy = getTaxonomy( term );\n\t\t\treturn taxonomy?.visibility?.publicly_queryable ? taxonomy : {};\n\t\t},\n\t\t[ term ]\n\t);\n\tconst { postTerms, hasPostTerms, isLoading } = usePostTerms( {\n\t\tpostId,\n\t\tterm: selectedTerm,\n\t} );\n\tconst hasPost = postId && postType;\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t[ `taxonomy-${ term }` ]: term,\n\t\t} ),\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<AlignmentToolbar\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\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tlabel={ __( 'Separator' ) }\n\t\t\t\t\tvalue={ separator || '' }\n\t\t\t\t\tonChange={ ( nextValue ) => {\n\t\t\t\t\t\tsetAttributes( { separator: nextValue } );\n\t\t\t\t\t} }\n\t\t\t\t\thelp={ __( 'Enter character(s) used to separate terms.' ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ isLoading && hasPost && <Spinner /> }\n\t\t\t\t{ ! isLoading && ( isSelected || prefix ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"prefix\"\n\t\t\t\t\t\tallowedFormats={ ALLOWED_FORMATS }\n\t\t\t\t\t\tclassName=\"wp-block-post-terms__prefix\"\n\t\t\t\t\t\taria-label={ __( 'Prefix' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Prefix' ) + ' ' }\n\t\t\t\t\t\tvalue={ prefix }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { prefix: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( ! hasPost || ! term ) && (\n\t\t\t\t\t<span>{ blockInformation.title }</span>\n\t\t\t\t) }\n\t\t\t\t{ hasPost &&\n\t\t\t\t\t! isLoading &&\n\t\t\t\t\thasPostTerms &&\n\t\t\t\t\tpostTerms\n\t\t\t\t\t\t.map( ( postTerm ) => (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tkey={ postTerm.id }\n\t\t\t\t\t\t\t\thref={ postTerm.link }\n\t\t\t\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( postTerm.name ) }\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t) )\n\t\t\t\t\t\t.reduce( ( prev, curr ) => (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{ prev }\n\t\t\t\t\t\t\t\t<span className=\"wp-block-post-terms__separator\">\n\t\t\t\t\t\t\t\t\t{ separator || ' ' }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{ curr }\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) ) }\n\t\t\t\t{ hasPost &&\n\t\t\t\t\t! isLoading &&\n\t\t\t\t\t! hasPostTerms &&\n\t\t\t\t\t( selectedTerm?.labels?.no_terms ||\n\t\t\t\t\t\t__( 'Term items not found.' ) ) }\n\t\t\t\t{ ! isLoading && ( isSelected || suffix ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"suffix\"\n\t\t\t\t\t\tallowedFormats={ ALLOWED_FORMATS }\n\t\t\t\t\t\tclassName=\"wp-block-post-terms__suffix\"\n\t\t\t\t\t\taria-label={ __( 'Suffix' ) }\n\t\t\t\t\t\tplaceholder={ ' ' + __( 'Suffix' ) }\n\t\t\t\t\t\tvalue={ suffix }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { suffix: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\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,IAAK;MAAC,GAJ3BP,QAAQ,CAACQ,EAKb,CACF,CAAC,CACFC,MAAM,CAAE,CAAEC,IAAI,EAAEC,IAAI,kBACpB,IAAAzE,WAAA,CAAAmC,IAAA,EAAAnC,WAAA,CAAAoC,QAAA;QAAAC,QAAA,GACGmC,IAAI,eACN,IAAAxE,WAAA,CAAAsC,GAAA;UAAML,SAAS,EAAC,gCAAgC;UAAAI,QAAA,EAC7C1B,SAAS,IAAI;QAAG,CACb,CAAC,EACL8D,IAAI;MAAA,CACL,CACD,CAAC,EACH7C,OAAO,IACR,CAAEF,SAAS,IACX,CAAED,YAAY,KACZT,YAAY,EAAE0D,MAAM,EAAEC,QAAQ,IAC/B,IAAAxB,QAAE,EAAE,uBAAwB,CAAC,CAAE,EAC/B,CAAEzB,SAAS,KAAMpB,UAAU,IAAIO,MAAM,CAAE,iBACxC,IAAAb,WAAA,CAAAsC,GAAA,EAAC9C,YAAA,CAAA+D,QAAQ;QACRC,UAAU,EAAC,QAAQ;QACnBC,cAAc,EAAGxD,eAAiB;QAClCgC,SAAS,EAAC,6BAA6B;QACvC,cAAa,IAAAkB,QAAE,EAAE,QAAS,CAAG;QAC7BO,WAAW,EAAG,GAAG,GAAG,IAAAP,QAAE,EAAE,QAAS,CAAG;QACpCV,KAAK,EAAG5B,MAAQ;QAChB6B,QAAQ,EAAKD,KAAK,IACjBlC,aAAa,CAAE;UAAEM,MAAM,EAAE4B;QAAM,CAAE,CACjC;QACDkB,OAAO,EAAC,MAAM;QACdiB,sBAAsB,EAAGA,CAAA,KACxBpE,iBAAiB,CAChB,IAAAqE,mBAAW,EAAE,IAAAC,2BAAmB,EAAC,CAAE,CACpC;MACA,CACD,CACD;IAAA,CACG,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
|
package/build/post-title/edit.js
CHANGED
|
@@ -153,6 +153,7 @@ function PostTitleEdit({
|
|
|
153
153
|
}),
|
|
154
154
|
checked: linkTarget === '_blank'
|
|
155
155
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextControl, {
|
|
156
|
+
__next40pxDefaultSize: true,
|
|
156
157
|
__nextHasNoMarginBottom: true,
|
|
157
158
|
label: (0, _i18n.__)('Link rel'),
|
|
158
159
|
value: rel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_i18n","_blocks","_coreData","_data","_jsxRuntime","PostTitleEdit","attributes","level","levelOptions","textAlign","isLink","rel","linkTarget","setAttributes","context","postType","postId","queryId","insertBlocksAfter","TagName","isDescendentOfQueryLoop","Number","isFinite","userCanEdit","useSelect","select","coreStore","canUser","kind","name","id","rawTitle","setTitle","fullTitle","useEntityProp","link","onSplitAtEnd","createBlock","getDefaultBlockName","blockProps","useBlockProps","className","clsx","blockEditingMode","useBlockEditingMode","titleElement","jsx","children","__","PlainText","tagName","placeholder","value","onChange","__experimentalVersion","__unstableOnSplitAtEnd","dangerouslySetInnerHTML","__html","rendered","href","target","length","onClick","event","preventDefault","jsxs","Fragment","BlockControls","group","HeadingLevelDropdown","options","newLevel","AlignmentControl","nextAlign","InspectorControls","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","label","checked","TextControl","newRel"],"sources":["@wordpress/block-library/src/post-title/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\tPlainText,\n\tHeadingLevelDropdown,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { ToggleControl, TextControl, PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nexport default function PostTitleEdit( {\n\tattributes: { level, levelOptions, textAlign, isLink, rel, linkTarget },\n\tsetAttributes,\n\tcontext: { postType, postId, queryId },\n\tinsertBlocksAfter,\n} ) {\n\tconst TagName = level === 0 ? 'p' : `h${ level }`;\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\tconst userCanEdit = useSelect(\n\t\t( select ) => {\n\t\t\t/**\n\t\t\t * useCanEditEntity may trigger an OPTIONS request to the REST API\n\t\t\t * via the canUser resolver. However, when the Post Title is a\n\t\t\t * descendant of a Query Loop block, the title cannot be edited. In\n\t\t\t * order to avoid these unnecessary requests, we call the hook\n\t\t\t * without the proper data, resulting in returning early without\n\t\t\t * making them.\n\t\t\t */\n\t\t\tif ( isDescendentOfQueryLoop ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn select( coreStore ).canUser( 'update', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: postType,\n\t\t\t\tid: postId,\n\t\t\t} );\n\t\t},\n\t\t[ isDescendentOfQueryLoop, postType, postId ]\n\t);\n\tconst [ rawTitle = '', setTitle, fullTitle ] = useEntityProp(\n\t\t'postType',\n\t\tpostType,\n\t\t'title',\n\t\tpostId\n\t);\n\tconst [ link ] = useEntityProp( 'postType', postType, 'link', postId );\n\tconst onSplitAtEnd = () => {\n\t\tinsertBlocksAfter( createBlock( getDefaultBlockName() ) );\n\t};\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tlet titleElement = <TagName { ...blockProps }>{ __( 'Title' ) }</TagName>;\n\n\tif ( postType && postId ) {\n\t\ttitleElement = userCanEdit ? (\n\t\t\t<PlainText\n\t\t\t\ttagName={ TagName }\n\t\t\t\tplaceholder={ __( 'No title' ) }\n\t\t\t\tvalue={ rawTitle }\n\t\t\t\tonChange={ setTitle }\n\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\t__unstableOnSplitAtEnd={ onSplitAtEnd }\n\t\t\t\t{ ...blockProps }\n\t\t\t/>\n\t\t) : (\n\t\t\t<TagName\n\t\t\t\t{ ...blockProps }\n\t\t\t\tdangerouslySetInnerHTML={ { __html: fullTitle?.rendered } }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isLink && postType && postId ) {\n\t\ttitleElement = userCanEdit ? (\n\t\t\t<TagName { ...blockProps }>\n\t\t\t\t<PlainText\n\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\thref={ link }\n\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\trel={ rel }\n\t\t\t\t\tplaceholder={ ! rawTitle.length ? __( 'No title' ) : null }\n\t\t\t\t\tvalue={ rawTitle }\n\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\t\t__unstableOnSplitAtEnd={ onSplitAtEnd }\n\t\t\t\t/>\n\t\t\t</TagName>\n\t\t) : (\n\t\t\t<TagName { ...blockProps }>\n\t\t\t\t<a\n\t\t\t\t\thref={ link }\n\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\trel={ rel }\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t__html: fullTitle?.rendered,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</TagName>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockEditingMode === 'default' && (\n\t\t\t\t<>\n\t\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t\t<HeadingLevelDropdown\n\t\t\t\t\t\t\tvalue={ level }\n\t\t\t\t\t\t\toptions={ levelOptions }\n\t\t\t\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<AlignmentControl\n\t\t\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BlockControls>\n\t\t\t\t\t<InspectorControls>\n\t\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Make title a link' ) }\n\t\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { isLink: ! isLink } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isLink && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\t\tlinkTarget: value\n\t\t\t\t\t\t\t\t\t\t\t\t\t? '_blank'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '_self',\n\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\t\t\t\t\t\tvalue={ rel }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( newRel ) =>\n\t\t\t\t\t\t\t\t\t\t\tsetAttributes( { rel: newRel } )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n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AK,IACjBvC,aAAa,CAAE;gBACdD,UAAU,EAAEwC,KAAK,GACd,QAAQ,GACR;cACJ,CAAE,CACF;cACD4B,OAAO,EAAGpE,UAAU,KAAK;YAAU,CACnC,CAAC,eACF,IAAAR,WAAA,CAAA0C,GAAA,EAAC/C,WAAA,CAAAkF,WAAW;cACXH,uBAAuB;cACvBC,KAAK,EAAG,IAAA/B,QAAE,EAAE,UAAW,CAAG;cAC1BI,KAAK,EAAGzC,GAAK;cACb0C,QAAQ,EAAK6B,MAAM,IAClBrE,aAAa,CAAE;gBAAEF,GAAG,EAAEuE;cAAO,CAAE;YAC/B,CACD,CAAC;UAAA,CACD,CACF;QAAA,CACS;MAAC,CACM,CAAC;IAAA,CACnB,CACF,EACCrC,YAAY;EAAA,CACb,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_i18n","_blocks","_coreData","_data","_jsxRuntime","PostTitleEdit","attributes","level","levelOptions","textAlign","isLink","rel","linkTarget","setAttributes","context","postType","postId","queryId","insertBlocksAfter","TagName","isDescendentOfQueryLoop","Number","isFinite","userCanEdit","useSelect","select","coreStore","canUser","kind","name","id","rawTitle","setTitle","fullTitle","useEntityProp","link","onSplitAtEnd","createBlock","getDefaultBlockName","blockProps","useBlockProps","className","clsx","blockEditingMode","useBlockEditingMode","titleElement","jsx","children","__","PlainText","tagName","placeholder","value","onChange","__experimentalVersion","__unstableOnSplitAtEnd","dangerouslySetInnerHTML","__html","rendered","href","target","length","onClick","event","preventDefault","jsxs","Fragment","BlockControls","group","HeadingLevelDropdown","options","newLevel","AlignmentControl","nextAlign","InspectorControls","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","label","checked","TextControl","__next40pxDefaultSize","newRel"],"sources":["@wordpress/block-library/src/post-title/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\tPlainText,\n\tHeadingLevelDropdown,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { ToggleControl, TextControl, PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nexport default function PostTitleEdit( {\n\tattributes: { level, levelOptions, textAlign, isLink, rel, linkTarget },\n\tsetAttributes,\n\tcontext: { postType, postId, queryId },\n\tinsertBlocksAfter,\n} ) {\n\tconst TagName = level === 0 ? 'p' : `h${ level }`;\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\tconst userCanEdit = useSelect(\n\t\t( select ) => {\n\t\t\t/**\n\t\t\t * useCanEditEntity may trigger an OPTIONS request to the REST API\n\t\t\t * via the canUser resolver. However, when the Post Title is a\n\t\t\t * descendant of a Query Loop block, the title cannot be edited. In\n\t\t\t * order to avoid these unnecessary requests, we call the hook\n\t\t\t * without the proper data, resulting in returning early without\n\t\t\t * making them.\n\t\t\t */\n\t\t\tif ( isDescendentOfQueryLoop ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn select( coreStore ).canUser( 'update', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: postType,\n\t\t\t\tid: postId,\n\t\t\t} );\n\t\t},\n\t\t[ isDescendentOfQueryLoop, postType, postId ]\n\t);\n\tconst [ rawTitle = '', setTitle, fullTitle ] = useEntityProp(\n\t\t'postType',\n\t\tpostType,\n\t\t'title',\n\t\tpostId\n\t);\n\tconst [ link ] = useEntityProp( 'postType', postType, 'link', postId );\n\tconst onSplitAtEnd = () => {\n\t\tinsertBlocksAfter( createBlock( getDefaultBlockName() ) );\n\t};\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tlet titleElement = <TagName { ...blockProps }>{ __( 'Title' ) }</TagName>;\n\n\tif ( postType && postId ) {\n\t\ttitleElement = userCanEdit ? (\n\t\t\t<PlainText\n\t\t\t\ttagName={ TagName }\n\t\t\t\tplaceholder={ __( 'No title' ) }\n\t\t\t\tvalue={ rawTitle }\n\t\t\t\tonChange={ setTitle }\n\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\t__unstableOnSplitAtEnd={ onSplitAtEnd }\n\t\t\t\t{ ...blockProps }\n\t\t\t/>\n\t\t) : (\n\t\t\t<TagName\n\t\t\t\t{ ...blockProps }\n\t\t\t\tdangerouslySetInnerHTML={ { __html: fullTitle?.rendered } }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isLink && postType && postId ) {\n\t\ttitleElement = userCanEdit ? (\n\t\t\t<TagName { ...blockProps }>\n\t\t\t\t<PlainText\n\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\thref={ link }\n\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\trel={ rel }\n\t\t\t\t\tplaceholder={ ! rawTitle.length ? __( 'No title' ) : null }\n\t\t\t\t\tvalue={ rawTitle }\n\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\t\t__unstableOnSplitAtEnd={ onSplitAtEnd }\n\t\t\t\t/>\n\t\t\t</TagName>\n\t\t) : (\n\t\t\t<TagName { ...blockProps }>\n\t\t\t\t<a\n\t\t\t\t\thref={ link }\n\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\trel={ rel }\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t__html: fullTitle?.rendered,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</TagName>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockEditingMode === 'default' && (\n\t\t\t\t<>\n\t\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t\t<HeadingLevelDropdown\n\t\t\t\t\t\t\tvalue={ level }\n\t\t\t\t\t\t\toptions={ levelOptions }\n\t\t\t\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<AlignmentControl\n\t\t\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BlockControls>\n\t\t\t\t\t<InspectorControls>\n\t\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Make title a link' ) }\n\t\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { isLink: ! isLink } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isLink && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\t\tlinkTarget: value\n\t\t\t\t\t\t\t\t\t\t\t\t\t? '_blank'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '_self',\n\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\t\t\t\t\t\tvalue={ rel }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( newRel ) =>\n\t\t\t\t\t\t\t\t\t\t\tsetAttributes( { rel: newRel } )\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</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t</InspectorControls>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ titleElement }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AAA4C,IAAAO,WAAA,GAAAP,OAAA;AArB5C;AACA;AACA;;AAGA;AACA;AACA;;AAgBe,SAASQ,aAAaA,CAAE;EACtCC,UAAU,EAAE;IAAEC,KAAK;IAAEC,YAAY;IAAEC,SAAS;IAAEC,MAAM;IAAEC,GAAG;IAAEC;EAAW,CAAC;EACvEC,aAAa;EACbC,OAAO,EAAE;IAAEC,QAAQ;IAAEC,MAAM;IAAEC;EAAQ,CAAC;EACtCC;AACD,CAAC,EAAG;EACH,MAAMC,OAAO,GAAGZ,KAAK,KAAK,CAAC,GAAG,GAAG,GAAI,IAAIA,KAAO,EAAC;EACjD,MAAMa,uBAAuB,GAAGC,MAAM,CAACC,QAAQ,CAA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AG;YACnCK,QAAQ,EAAGA,CAAA,KACVxC,aAAa,CAAE;cAAEH,MAAM,EAAE,CAAEA;YAAO,CAAE,CACpC;YACDsE,OAAO,EAAGtE;UAAQ,CAClB,CAAC,EACAA,MAAM,iBACP,IAAAN,WAAA,CAAA6D,IAAA,EAAA7D,WAAA,CAAA8D,QAAA;YAAAnB,QAAA,gBACC,IAAA3C,WAAA,CAAA0C,GAAA,EAAC/C,WAAA,CAAA8E,aAAa;cACbC,uBAAuB;cACvBC,KAAK,EAAG,IAAA/B,QAAE,EAAE,iBAAkB,CAAG;cACjCK,QAAQ,EAAKD,KAAK,IACjBvC,aAAa,CAAE;gBACdD,UAAU,EAAEwC,KAAK,GACd,QAAQ,GACR;cACJ,CAAE,CACF;cACD4B,OAAO,EAAGpE,UAAU,KAAK;YAAU,CACnC,CAAC,eACF,IAAAR,WAAA,CAAA0C,GAAA,EAAC/C,WAAA,CAAAkF,WAAW;cACXC,qBAAqB;cACrBJ,uBAAuB;cACvBC,KAAK,EAAG,IAAA/B,QAAE,EAAE,UAAW,CAAG;cAC1BI,KAAK,EAAGzC,GAAK;cACb0C,QAAQ,EAAK8B,MAAM,IAClBtE,aAAa,CAAE;gBAAEF,GAAG,EAAEwE;cAAO,CAAE;YAC/B,CACD,CAAC;UAAA,CACD,CACF;QAAA,CACS;MAAC,CACM,CAAC;IAAA,CACnB,CACF,EACCtC,YAAY;EAAA,CACb,CAAC;AAEL","ignoreList":[]}
|
|
@@ -62,6 +62,18 @@ const metadata = exports.metadata = {
|
|
|
62
62
|
},
|
|
63
63
|
interactivity: {
|
|
64
64
|
clientNavigation: true
|
|
65
|
+
},
|
|
66
|
+
__experimentalBorder: {
|
|
67
|
+
radius: true,
|
|
68
|
+
color: true,
|
|
69
|
+
width: true,
|
|
70
|
+
style: true,
|
|
71
|
+
__experimentalDefaultControls: {
|
|
72
|
+
radius: true,
|
|
73
|
+
color: true,
|
|
74
|
+
width: true,
|
|
75
|
+
style: true
|
|
76
|
+
}
|
|
65
77
|
}
|
|
66
78
|
},
|
|
67
79
|
style: "wp-block-preformatted"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_edit","_save","_transforms","metadata","exports","$schema","apiVersion","name","title","category","description","textdomain","attributes","content","type","source","selector","__unstablePreserveWhiteSpace","__experimentalRole","supports","anchor","color","gradients","__experimentalDefaultControls","background","text","spacing","padding","margin","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","style","settings","icon","example","__","transforms","edit","save","merge","attributesToMerge","init","initBlock"],"sources":["@wordpress/block-library/src/preformatted/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { preformatted as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\t/* eslint-disable @wordpress/i18n-no-collapsible-whitespace */\n\t\t\t// translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work.\n\t\t\tcontent: __(\n\t\t\t\t'EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\\nWindow, very small in the distance, illuminated.\\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;'\n\t\t\t),\n\t\t\t/* eslint-enable @wordpress/i18n-no-collapsible-whitespace */\n\t\t},\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent: attributes.content + '\\n\\n' + attributesToMerge.content,\n\t\t};\n\t},\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAD,sBAAA,CAAAH,OAAA;AAEA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,WAAA,GAAAH,sBAAA,CAAAH,OAAA;AAbA;AACA;AACA;AAIA;AACA;AACA;AAFA,MAAAO,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,OAAA;MAAAC,IAAA;MAAAC,MAAA;MAAAC,QAAA;MAAAC,4BAAA;MAAAC,kBAAA;IAAA;EAAA;EAAAC,QAAA;IAAAC,MAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;IAAAC,OAAA;MAAAC,OAAA;MAAAC,MAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAd,6BAAA;QAAAO,QAAA;MAAA;IAAA;IAAAQ,aAAA;MAAAC,gBAAA;IAAA;EAAA;
|
|
1
|
+
{"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_edit","_save","_transforms","metadata","exports","$schema","apiVersion","name","title","category","description","textdomain","attributes","content","type","source","selector","__unstablePreserveWhiteSpace","__experimentalRole","supports","anchor","color","gradients","__experimentalDefaultControls","background","text","spacing","padding","margin","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","__experimentalBorder","radius","width","style","settings","icon","example","__","transforms","edit","save","merge","attributesToMerge","init","initBlock"],"sources":["@wordpress/block-library/src/preformatted/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { preformatted as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\t/* eslint-disable @wordpress/i18n-no-collapsible-whitespace */\n\t\t\t// translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work.\n\t\t\tcontent: __(\n\t\t\t\t'EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\\nWindow, very small in the distance, illuminated.\\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;'\n\t\t\t),\n\t\t\t/* eslint-enable @wordpress/i18n-no-collapsible-whitespace */\n\t\t},\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent: attributes.content + '\\n\\n' + attributesToMerge.content,\n\t\t};\n\t},\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAD,sBAAA,CAAAH,OAAA;AAEA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,WAAA,GAAAH,sBAAA,CAAAH,OAAA;AAbA;AACA;AACA;AAIA;AACA;AACA;AAFA,MAAAO,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;E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AE/C,IAAI;EAAEJ,QAAQ;EAAEyC;AAAS,CAAE,CAAC;AAACxC,OAAA,CAAAiD,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_data","_coreData","_element","_compose","_utils","_jsxRuntime","EMPTY_ARRAY","BASE_QUERY","order","_fields","context","ParentControl","parents","postType","onChange","search","setSearch","useState","value","setValue","suggestions","setSuggestions","debouncedSearch","useDebounce","searchResults","searchHasResolved","useSelect","select","getEntityRecords","hasFinishedResolution","coreStore","selectorArgs","orderby","exclude","per_page","currentParents","length","include","useEffect","currentParentsInfo","getEntitiesInfo","mapToIHasNameAndId","sanitizedValue","reduce","accumulator","id","entity","mapById","push","name","entitiesInfo","useMemo","names","getIdByValue","entitiesMappedByName","onParentChange","newValue","ids","Array","from","mapByName","add","Set","jsx","FormTokenField","label","__","onInputChange","__experimentalShowHowTo","__nextHasNoMarginBottom","_default","exports","default"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/parent-control.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { FormTokenField } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { getEntitiesInfo, mapToIHasNameAndId } from '../../utils';\n\nconst EMPTY_ARRAY = [];\nconst BASE_QUERY = {\n\torder: 'asc',\n\t_fields: 'id,title',\n\tcontext: 'view',\n};\n\nfunction ParentControl( { parents, postType, onChange } ) {\n\tconst [ search, setSearch ] = useState( '' );\n\tconst [ value, setValue ] = useState( EMPTY_ARRAY );\n\tconst [ suggestions, setSuggestions ] = useState( EMPTY_ARRAY );\n\tconst debouncedSearch = useDebounce( setSearch, 250 );\n\tconst { searchResults, searchHasResolved } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! search ) {\n\t\t\t\treturn { searchResults: EMPTY_ARRAY, searchHasResolved: true };\n\t\t\t}\n\t\t\tconst { getEntityRecords, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst selectorArgs = [\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\t{\n\t\t\t\t\t...BASE_QUERY,\n\t\t\t\t\tsearch,\n\t\t\t\t\torderby: 'relevance',\n\t\t\t\t\texclude: parents,\n\t\t\t\t\tper_page: 20,\n\t\t\t\t},\n\t\t\t];\n\t\t\treturn {\n\t\t\t\tsearchResults: getEntityRecords( ...selectorArgs ),\n\t\t\t\tsearchHasResolved: hasFinishedResolution(\n\t\t\t\t\t'getEntityRecords',\n\t\t\t\t\tselectorArgs\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ search, parents ]\n\t);\n\tconst currentParents = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! parents?.length ) {\n\t\t\t\treturn EMPTY_ARRAY;\n\t\t\t}\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\treturn getEntityRecords( 'postType', postType, {\n\t\t\t\t...BASE_QUERY,\n\t\t\t\tinclude: parents,\n\t\t\t\tper_page: parents.length,\n\t\t\t} );\n\t\t},\n\t\t[ parents ]\n\t);\n\t// Update the `value` state only after the selectors are resolved\n\t// to avoid emptying the input when we're changing parents.\n\tuseEffect( () => {\n\t\tif ( ! parents?.length ) {\n\t\t\tsetValue( EMPTY_ARRAY );\n\t\t}\n\t\tif ( ! currentParents?.length ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentParentsInfo = getEntitiesInfo(\n\t\t\tmapToIHasNameAndId( currentParents, 'title.rendered' )\n\t\t);\n\t\t// Returns only the existing entity ids. This prevents the component\n\t\t// from crashing in the editor, when non existing ids are provided.\n\t\tconst sanitizedValue = parents.reduce( ( accumulator, id ) => {\n\t\t\tconst entity = currentParentsInfo.mapById[ id ];\n\t\t\tif ( entity ) {\n\t\t\t\taccumulator.push( {\n\t\t\t\t\tid,\n\t\t\t\t\tvalue: entity.name,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t}, [] );\n\t\tsetValue( sanitizedValue );\n\t}, [ parents, currentParents ] );\n\n\tconst entitiesInfo = useMemo( () => {\n\t\tif ( ! searchResults?.length ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\t\treturn getEntitiesInfo(\n\t\t\tmapToIHasNameAndId( searchResults, 'title.rendered' )\n\t\t);\n\t}, [ searchResults ] );\n\t// Update suggestions only when the query has resolved.\n\tuseEffect( () => {\n\t\tif ( ! searchHasResolved ) {\n\t\t\treturn;\n\t\t}\n\t\tsetSuggestions( entitiesInfo.names );\n\t}, [ entitiesInfo.names, searchHasResolved ] );\n\n\tconst getIdByValue = ( entitiesMappedByName, entity ) => {\n\t\tconst id = entity?.id || entitiesMappedByName?.[ entity ]?.id;\n\t\tif ( id ) {\n\t\t\treturn id;\n\t\t}\n\t};\n\tconst onParentChange = ( newValue ) => {\n\t\tconst ids = Array.from(\n\t\t\tnewValue.reduce( ( accumulator, entity ) => {\n\t\t\t\t// Verify that new values point to existing entities.\n\t\t\t\tconst id = getIdByValue( entitiesInfo.mapByName, entity );\n\t\t\t\tif ( id ) {\n\t\t\t\t\taccumulator.add( id );\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t}, new Set() )\n\t\t);\n\t\tsetSuggestions( EMPTY_ARRAY );\n\t\tonChange( { parents: ids } );\n\t};\n\treturn (\n\t\t<FormTokenField\n\t\t\tlabel={ __( 'Parents' ) }\n\t\t\tvalue={ value }\n\t\t\tonInputChange={ debouncedSearch }\n\t\t\tsuggestions={ suggestions }\n\t\t\tonChange={ onParentChange }\n\t\t\t__experimentalShowHowTo={ false }\n\t\t\t__nextHasNoMarginBottom\n\t\t/>\n\t);\n}\n\nexport default ParentControl;\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,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EACD,oBACC,IAAApD,WAAA,CAAA0D,GAAA,EAAChE,WAAA,CAAAiE,cAAc;IACdC,KAAK,EAAG,IAAAC,QAAE,EAAE,SAAU,CAAG;
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_data","_coreData","_element","_compose","_utils","_jsxRuntime","EMPTY_ARRAY","BASE_QUERY","order","_fields","context","ParentControl","parents","postType","onChange","search","setSearch","useState","value","setValue","suggestions","setSuggestions","debouncedSearch","useDebounce","searchResults","searchHasResolved","useSelect","select","getEntityRecords","hasFinishedResolution","coreStore","selectorArgs","orderby","exclude","per_page","currentParents","length","include","useEffect","currentParentsInfo","getEntitiesInfo","mapToIHasNameAndId","sanitizedValue","reduce","accumulator","id","entity","mapById","push","name","entitiesInfo","useMemo","names","getIdByValue","entitiesMappedByName","onParentChange","newValue","ids","Array","from","mapByName","add","Set","jsx","FormTokenField","__next40pxDefaultSize","label","__","onInputChange","__experimentalShowHowTo","__nextHasNoMarginBottom","_default","exports","default"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/parent-control.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { FormTokenField } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { getEntitiesInfo, mapToIHasNameAndId } from '../../utils';\n\nconst EMPTY_ARRAY = [];\nconst BASE_QUERY = {\n\torder: 'asc',\n\t_fields: 'id,title',\n\tcontext: 'view',\n};\n\nfunction ParentControl( { parents, postType, onChange } ) {\n\tconst [ search, setSearch ] = useState( '' );\n\tconst [ value, setValue ] = useState( EMPTY_ARRAY );\n\tconst [ suggestions, setSuggestions ] = useState( EMPTY_ARRAY );\n\tconst debouncedSearch = useDebounce( setSearch, 250 );\n\tconst { searchResults, searchHasResolved } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! search ) {\n\t\t\t\treturn { searchResults: EMPTY_ARRAY, searchHasResolved: true };\n\t\t\t}\n\t\t\tconst { getEntityRecords, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst selectorArgs = [\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\t{\n\t\t\t\t\t...BASE_QUERY,\n\t\t\t\t\tsearch,\n\t\t\t\t\torderby: 'relevance',\n\t\t\t\t\texclude: parents,\n\t\t\t\t\tper_page: 20,\n\t\t\t\t},\n\t\t\t];\n\t\t\treturn {\n\t\t\t\tsearchResults: getEntityRecords( ...selectorArgs ),\n\t\t\t\tsearchHasResolved: hasFinishedResolution(\n\t\t\t\t\t'getEntityRecords',\n\t\t\t\t\tselectorArgs\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ search, parents ]\n\t);\n\tconst currentParents = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! parents?.length ) {\n\t\t\t\treturn EMPTY_ARRAY;\n\t\t\t}\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\treturn getEntityRecords( 'postType', postType, {\n\t\t\t\t...BASE_QUERY,\n\t\t\t\tinclude: parents,\n\t\t\t\tper_page: parents.length,\n\t\t\t} );\n\t\t},\n\t\t[ parents ]\n\t);\n\t// Update the `value` state only after the selectors are resolved\n\t// to avoid emptying the input when we're changing parents.\n\tuseEffect( () => {\n\t\tif ( ! parents?.length ) {\n\t\t\tsetValue( EMPTY_ARRAY );\n\t\t}\n\t\tif ( ! currentParents?.length ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentParentsInfo = getEntitiesInfo(\n\t\t\tmapToIHasNameAndId( currentParents, 'title.rendered' )\n\t\t);\n\t\t// Returns only the existing entity ids. This prevents the component\n\t\t// from crashing in the editor, when non existing ids are provided.\n\t\tconst sanitizedValue = parents.reduce( ( accumulator, id ) => {\n\t\t\tconst entity = currentParentsInfo.mapById[ id ];\n\t\t\tif ( entity ) {\n\t\t\t\taccumulator.push( {\n\t\t\t\t\tid,\n\t\t\t\t\tvalue: entity.name,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t}, [] );\n\t\tsetValue( sanitizedValue );\n\t}, [ parents, currentParents ] );\n\n\tconst entitiesInfo = useMemo( () => {\n\t\tif ( ! searchResults?.length ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\t\treturn getEntitiesInfo(\n\t\t\tmapToIHasNameAndId( searchResults, 'title.rendered' )\n\t\t);\n\t}, [ searchResults ] );\n\t// Update suggestions only when the query has resolved.\n\tuseEffect( () => {\n\t\tif ( ! searchHasResolved ) {\n\t\t\treturn;\n\t\t}\n\t\tsetSuggestions( entitiesInfo.names );\n\t}, [ entitiesInfo.names, searchHasResolved ] );\n\n\tconst getIdByValue = ( entitiesMappedByName, entity ) => {\n\t\tconst id = entity?.id || entitiesMappedByName?.[ entity ]?.id;\n\t\tif ( id ) {\n\t\t\treturn id;\n\t\t}\n\t};\n\tconst onParentChange = ( newValue ) => {\n\t\tconst ids = Array.from(\n\t\t\tnewValue.reduce( ( accumulator, entity ) => {\n\t\t\t\t// Verify that new values point to existing entities.\n\t\t\t\tconst id = getIdByValue( entitiesInfo.mapByName, entity );\n\t\t\t\tif ( id ) {\n\t\t\t\t\taccumulator.add( id );\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t}, new Set() )\n\t\t);\n\t\tsetSuggestions( EMPTY_ARRAY );\n\t\tonChange( { parents: ids } );\n\t};\n\treturn (\n\t\t<FormTokenField\n\t\t\t__next40pxDefaultSize\n\t\t\tlabel={ __( 'Parents' ) }\n\t\t\tvalue={ value }\n\t\t\tonInputChange={ debouncedSearch }\n\t\t\tsuggestions={ suggestions }\n\t\t\tonChange={ onParentChange }\n\t\t\t__experimentalShowHowTo={ false }\n\t\t\t__nextHasNoMarginBottom\n\t\t/>\n\t);\n}\n\nexport default ParentControl;\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;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CAAE,CAAC;EAC7B,CAAC;EACD,oBACC,IAAApD,WAAA,CAAA0D,GAAA,EAAChE,WAAA,CAAAiE,cAAc;IACdC,qBAAqB;IACrBC,KAAK,EAAG,IAAAC,QAAE,EAAE,SAAU,CAAG;IACzBjD,KAAK,EAAGA,KAAO;IACfkD,aAAa,EAAG9C,eAAiB;IACjCF,WAAW,EAAGA,WAAa;IAC3BN,QAAQ,EAAGyC,cAAgB;IAC3Bc,uBAAuB,EAAG,KAAO;IACjCC,uBAAuB;EAAA,CACvB,CAAC;AAEJ;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc9D,aAAa","ignoreList":[]}
|
|
@@ -120,7 +120,7 @@ function QueryContent({
|
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
const htmlElementMessages = {
|
|
123
|
-
main: (0, _i18n.__)('The <main> element should be used for the primary content of your document only.
|
|
123
|
+
main: (0, _i18n.__)('The <main> element should be used for the primary content of your document only.'),
|
|
124
124
|
section: (0, _i18n.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),
|
|
125
125
|
aside: (0, _i18n.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.")
|
|
126
126
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_compose","_element","_blockEditor","_components","_i18n","_coreData","_queryToolbar","_interopRequireDefault","_inspectorControls","_enhancedPaginationModal","_jsxRuntime","DEFAULTS_POSTS_PER_PAGE","TEMPLATE","QueryContent","attributes","setAttributes","openPatternSelectionModal","name","clientId","queryId","query","displayLayout","tagName","TagName","inherit","__unstableMarkNextChangeAsNotPersistent","useDispatch","blockEditorStore","instanceId","useInstanceId","blockProps","useBlockProps","innerBlocksProps","useInnerBlocksProps","template","postsPerPage","useSelect","select","getSettings","getEntityRecord","getEntityRecordEdits","canUser","coreStore","settingPerPage","kind","posts_per_page","editedSettingPerPage","useEffect","newQuery","perPage","Object","keys","length","updateQuery","Number","isFinite","updateDisplayLayout","newDisplayLayout","htmlElementMessages","main","__","section","aside","jsxs","Fragment","children","jsx","default","InspectorControls","setQuery","setDisplayLayout","BlockControls","group","SelectControl","__nextHasNoMarginBottom","__next40pxDefaultSize","label","options","value","onChange","help"],"sources":["@wordpress/block-library/src/query/edit/query-content.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEffect } from '@wordpress/element';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\tuseInnerBlocksProps,\n} from '@wordpress/block-editor';\nimport { SelectControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport QueryToolbar from './query-toolbar';\nimport QueryInspectorControls from './inspector-controls';\nimport EnhancedPaginationModal from './enhanced-pagination-modal';\n\nconst DEFAULTS_POSTS_PER_PAGE = 3;\n\nconst TEMPLATE = [ [ 'core/post-template' ] ];\nexport default function QueryContent( {\n\tattributes,\n\tsetAttributes,\n\topenPatternSelectionModal,\n\tname,\n\tclientId,\n} ) {\n\tconst {\n\t\tqueryId,\n\t\tquery,\n\t\tdisplayLayout,\n\t\ttagName: TagName = 'div',\n\t\tquery: { inherit } = {},\n\t} = attributes;\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst instanceId = useInstanceId( QueryContent );\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t} );\n\tconst { postsPerPage } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { getEntityRecord, getEntityRecordEdits, canUser } =\n\t\t\tselect( coreStore );\n\t\tconst settingPerPage = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? +getEntityRecord( 'root', 'site' )?.posts_per_page\n\t\t\t: +getSettings().postsPerPage;\n\n\t\t// Gets changes made via the template area posts per page setting. These won't be saved\n\t\t// until the page is saved, but we should reflect this setting within the query loops\n\t\t// that inherit it.\n\t\tconst editedSettingPerPage = +getEntityRecordEdits( 'root', 'site' )\n\t\t\t?.posts_per_page;\n\n\t\treturn {\n\t\t\tpostsPerPage:\n\t\t\t\teditedSettingPerPage ||\n\t\t\t\tsettingPerPage ||\n\t\t\t\tDEFAULTS_POSTS_PER_PAGE,\n\t\t};\n\t}, [] );\n\t// There are some effects running where some initialization logic is\n\t// happening and setting some values to some attributes (ex. queryId).\n\t// These updates can cause an `undo trap` where undoing will result in\n\t// resetting again, so we need to mark these changes as not persistent\n\t// with `__unstableMarkNextChangeAsNotPersistent`.\n\n\t// Changes in query property (which is an object) need to be in the same callback,\n\t// because updates are batched after the render and changes in different query properties\n\t// would cause to override previous wanted changes.\n\tuseEffect( () => {\n\t\tconst newQuery = {};\n\t\t// When we inherit from global query always need to set the `perPage`\n\t\t// based on the reading settings.\n\t\tif ( inherit && query.perPage !== postsPerPage ) {\n\t\t\tnewQuery.perPage = postsPerPage;\n\t\t} else if ( ! query.perPage && postsPerPage ) {\n\t\t\tnewQuery.perPage = postsPerPage;\n\t\t}\n\t\tif ( !! Object.keys( newQuery ).length ) {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tupdateQuery( newQuery );\n\t\t}\n\t}, [ query.perPage, postsPerPage, inherit ] );\n\t// We need this for multi-query block pagination.\n\t// Query parameters for each block are scoped to their ID.\n\tuseEffect( () => {\n\t\tif ( ! Number.isFinite( queryId ) ) {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( { queryId: instanceId } );\n\t\t}\n\t}, [ queryId, instanceId ] );\n\tconst updateQuery = ( newQuery ) =>\n\t\tsetAttributes( { query: { ...query, ...newQuery } } );\n\tconst updateDisplayLayout = ( newDisplayLayout ) =>\n\t\tsetAttributes( {\n\t\t\tdisplayLayout: { ...displayLayout, ...newDisplayLayout },\n\t\t} );\n\tconst htmlElementMessages = {\n\t\tmain: __(\n\t\t\t'The <main> element should be used for the primary content of your document only. '\n\t\t),\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<EnhancedPaginationModal\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tclientId={ clientId }\n\t\t\t/>\n\t\t\t<InspectorControls>\n\t\t\t\t<QueryInspectorControls\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetQuery={ updateQuery }\n\t\t\t\t\tsetDisplayLayout={ updateDisplayLayout }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<BlockControls>\n\t\t\t\t<QueryToolbar\n\t\t\t\t\tname={ name }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetQuery={ updateQuery }\n\t\t\t\t\topenPatternSelectionModal={ openPatternSelectionModal }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ TagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ TagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<TagName { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAOA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAKA,IAAAO,aAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,wBAAA,GAAAF,sBAAA,CAAAR,OAAA;AAAkE,IAAAW,WAAA,GAAAX,OAAA;AAtBlE;AACA;AACA;;AAeA;AACA;AACA;;AAKA,MAAMY,uBAAuB,GAAG,CAAC;AAEjC,MAAMC,QAAQ,GAAG,CAAE,CAAE,oBAAoB,CAAE,CAAE;AAC9B,SAASC,YAAYA,CAAE;EACrCC,UAAU;EACVC,aAAa;EACbC,yBAAyB;EACzBC,IAAI;EACJC;AACD,CAAC,EAAG;EACH,MAAM;IACLC,OAAO;IACPC,KAAK;IACLC,aAAa;IACbC,OAAO,EAAEC,OAAO,GAAG,KAAK;IACxBH,KAAK,EAAE;MAAEI;IAAQ,CAAC,GAAG,CAAC;EACvB,CAAC,GAAGV,UAAU;EACd,MAAM;IAAEW;EAAwC,CAAC,GAChD,IAAAC,iBAAW,EAAEC,kBAAiB,CAAC;EAChC,MAAMC,UAAU,GAAG,IAAAC,sBAAa,EAAEhB,YAAa,CAAC;EAChD,MAAMiB,UAAU,GAAG,IAAAC,0BAAa,EAAC,CAAC;EAClC,MAAMC,gBAAgB,GAAG,IAAAC,gCAAmB,EAA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oreList":[]}
|
|
1
|
+
{"version":3,"names":["_data","require","_compose","_element","_blockEditor","_components","_i18n","_coreData","_queryToolbar","_interopRequireDefault","_inspectorControls","_enhancedPaginationModal","_jsxRuntime","DEFAULTS_POSTS_PER_PAGE","TEMPLATE","QueryContent","attributes","setAttributes","openPatternSelectionModal","name","clientId","queryId","query","displayLayout","tagName","TagName","inherit","__unstableMarkNextChangeAsNotPersistent","useDispatch","blockEditorStore","instanceId","useInstanceId","blockProps","useBlockProps","innerBlocksProps","useInnerBlocksProps","template","postsPerPage","useSelect","select","getSettings","getEntityRecord","getEntityRecordEdits","canUser","coreStore","settingPerPage","kind","posts_per_page","editedSettingPerPage","useEffect","newQuery","perPage","Object","keys","length","updateQuery","Number","isFinite","updateDisplayLayout","newDisplayLayout","htmlElementMessages","main","__","section","aside","jsxs","Fragment","children","jsx","default","InspectorControls","setQuery","setDisplayLayout","BlockControls","group","SelectControl","__nextHasNoMarginBottom","__next40pxDefaultSize","label","options","value","onChange","help"],"sources":["@wordpress/block-library/src/query/edit/query-content.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEffect } from '@wordpress/element';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\tuseInnerBlocksProps,\n} from '@wordpress/block-editor';\nimport { SelectControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport QueryToolbar from './query-toolbar';\nimport QueryInspectorControls from './inspector-controls';\nimport EnhancedPaginationModal from './enhanced-pagination-modal';\n\nconst DEFAULTS_POSTS_PER_PAGE = 3;\n\nconst TEMPLATE = [ [ 'core/post-template' ] ];\nexport default function QueryContent( {\n\tattributes,\n\tsetAttributes,\n\topenPatternSelectionModal,\n\tname,\n\tclientId,\n} ) {\n\tconst {\n\t\tqueryId,\n\t\tquery,\n\t\tdisplayLayout,\n\t\ttagName: TagName = 'div',\n\t\tquery: { inherit } = {},\n\t} = attributes;\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst instanceId = useInstanceId( QueryContent );\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t} );\n\tconst { postsPerPage } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { getEntityRecord, getEntityRecordEdits, canUser } =\n\t\t\tselect( coreStore );\n\t\tconst settingPerPage = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? +getEntityRecord( 'root', 'site' )?.posts_per_page\n\t\t\t: +getSettings().postsPerPage;\n\n\t\t// Gets changes made via the template area posts per page setting. These won't be saved\n\t\t// until the page is saved, but we should reflect this setting within the query loops\n\t\t// that inherit it.\n\t\tconst editedSettingPerPage = +getEntityRecordEdits( 'root', 'site' )\n\t\t\t?.posts_per_page;\n\n\t\treturn {\n\t\t\tpostsPerPage:\n\t\t\t\teditedSettingPerPage ||\n\t\t\t\tsettingPerPage ||\n\t\t\t\tDEFAULTS_POSTS_PER_PAGE,\n\t\t};\n\t}, [] );\n\t// There are some effects running where some initialization logic is\n\t// happening and setting some values to some attributes (ex. queryId).\n\t// These updates can cause an `undo trap` where undoing will result in\n\t// resetting again, so we need to mark these changes as not persistent\n\t// with `__unstableMarkNextChangeAsNotPersistent`.\n\n\t// Changes in query property (which is an object) need to be in the same callback,\n\t// because updates are batched after the render and changes in different query properties\n\t// would cause to override previous wanted changes.\n\tuseEffect( () => {\n\t\tconst newQuery = {};\n\t\t// When we inherit from global query always need to set the `perPage`\n\t\t// based on the reading settings.\n\t\tif ( inherit && query.perPage !== postsPerPage ) {\n\t\t\tnewQuery.perPage = postsPerPage;\n\t\t} else if ( ! query.perPage && postsPerPage ) {\n\t\t\tnewQuery.perPage = postsPerPage;\n\t\t}\n\t\tif ( !! Object.keys( newQuery ).length ) {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tupdateQuery( newQuery );\n\t\t}\n\t}, [ query.perPage, postsPerPage, inherit ] );\n\t// We need this for multi-query block pagination.\n\t// Query parameters for each block are scoped to their ID.\n\tuseEffect( () => {\n\t\tif ( ! Number.isFinite( queryId ) ) {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( { queryId: instanceId } );\n\t\t}\n\t}, [ queryId, instanceId ] );\n\tconst updateQuery = ( newQuery ) =>\n\t\tsetAttributes( { query: { ...query, ...newQuery } } );\n\tconst updateDisplayLayout = ( newDisplayLayout ) =>\n\t\tsetAttributes( {\n\t\t\tdisplayLayout: { ...displayLayout, ...newDisplayLayout },\n\t\t} );\n\tconst htmlElementMessages = {\n\t\tmain: __(\n\t\t\t'The <main> element should be used for the primary content of your document only.'\n\t\t),\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<EnhancedPaginationModal\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tclientId={ clientId }\n\t\t\t/>\n\t\t\t<InspectorControls>\n\t\t\t\t<QueryInspectorControls\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetQuery={ updateQuery }\n\t\t\t\t\tsetDisplayLayout={ updateDisplayLayout }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<BlockControls>\n\t\t\t\t<QueryToolbar\n\t\t\t\t\tname={ name }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetQuery={ updateQuery }\n\t\t\t\t\topenPatternSelectionModal={ openPatternSelectionModal }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ TagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ TagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<TagName { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAOA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAKA,IAAAO,aAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,wBAAA,GAAAF,sBAAA,CAAAR,OAAA;AAAkE,IAAAW,WAAA,GAAAX,OAAA;AAtBlE;AACA;AACA;;AAeA;AACA;AACA;;AAKA,MAAMY,uBAAuB,GAAG,CAAC;AAEjC,MAAMC,QAAQ,GAAG,CAAE,CAAE,oBAAoB,CAAE,CAAE;AAC9B,SAASC,YAAYA,CAAE;EACrCC,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Q;UAAEE,KAAK,EAAE;QAAO,CAAC,EAClC;UAAEF,KAAK,EAAE,WAAW;UAAEE,KAAK,EAAE;QAAU,CAAC,EACxC;UAAEF,KAAK,EAAE,SAAS;UAAEE,KAAK,EAAE;QAAQ,CAAC,CAClC;QACHA,KAAK,EAAGvD,OAAS;QACjBwD,QAAQ,EAAKD,KAAK,IACjB/D,aAAa,CAAE;UAAEO,OAAO,EAAEwD;QAAM,CAAE,CAClC;QACDE,IAAI,EAAGtB,mBAAmB,CAAEnC,OAAO;MAAI,CACvC;IAAC,CACgB,CAAC,eACpB,IAAAb,WAAA,CAAAwD,GAAA,EAAC3C,OAAO;MAAA,GAAMS;IAAgB,CAAI,CAAC;EAAA,CAClC,CAAC;AAEL","ignoreList":[]}
|
|
@@ -16,6 +16,7 @@ function QueryPaginationArrowControls({
|
|
|
16
16
|
onChange
|
|
17
17
|
}) {
|
|
18
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalToggleGroupControl, {
|
|
19
|
+
__next40pxDefaultSize: true,
|
|
19
20
|
__nextHasNoMarginBottom: true,
|
|
20
21
|
label: (0, _i18n.__)('Arrow'),
|
|
21
22
|
value: value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_jsxRuntime","QueryPaginationArrowControls","value","onChange","jsxs","__experimentalToggleGroupControl","__nextHasNoMarginBottom","label","__","help","isBlock","children","jsx","__experimentalToggleGroupControlOption","_x"],"sources":["@wordpress/block-library/src/query-pagination/query-pagination-arrow-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\n\nexport function QueryPaginationArrowControls( { value, onChange } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Arrow' ) }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\thelp={ __(\n\t\t\t\t'A decorative arrow appended to the next and previous page link.'\n\t\t\t) }\n\t\t\tisBlock\n\t\t>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"none\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'None',\n\t\t\t\t\t'Arrow option for Query Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"arrow\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Arrow',\n\t\t\t\t\t'Arrow option for Query Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"chevron\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Chevron',\n\t\t\t\t\t'Arrow option for Query Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t</ToggleGroupControl>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAG+B,IAAAE,WAAA,GAAAF,OAAA;AAP/B;AACA;AACA;;AAOO,SAASG,4BAA4BA,CAAE;EAAEC,KAAK;EAAEC;AAAS,CAAC,EAAG;EACnE,oBACC,IAAAH,WAAA,CAAAI,IAAA,EAACL,WAAA,CAAAM,gCAAkB;IAClBC,uBAAuB;IACvBC,KAAK,EAAG,IAAAC,QAAE,EAAE,OAAQ,CAAG;
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_jsxRuntime","QueryPaginationArrowControls","value","onChange","jsxs","__experimentalToggleGroupControl","__next40pxDefaultSize","__nextHasNoMarginBottom","label","__","help","isBlock","children","jsx","__experimentalToggleGroupControlOption","_x"],"sources":["@wordpress/block-library/src/query-pagination/query-pagination-arrow-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\n\nexport function QueryPaginationArrowControls( { value, onChange } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Arrow' ) }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\thelp={ __(\n\t\t\t\t'A decorative arrow appended to the next and previous page link.'\n\t\t\t) }\n\t\t\tisBlock\n\t\t>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"none\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'None',\n\t\t\t\t\t'Arrow option for Query Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"arrow\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Arrow',\n\t\t\t\t\t'Arrow option for Query Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"chevron\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Chevron',\n\t\t\t\t\t'Arrow option for Query Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t</ToggleGroupControl>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAG+B,IAAAE,WAAA,GAAAF,OAAA;AAP/B;AACA;AACA;;AAOO,SAASG,4BAA4BA,CAAE;EAAEC,KAAK;EAAEC;AAAS,CAAC,EAAG;EACnE,oBACC,IAAAH,WAAA,CAAAI,IAAA,EAACL,WAAA,CAAAM,gCAAkB;IAClBC,qBAAqB;IACrBC,uBAAuB;IACvBC,KAAK,EAAG,IAAAC,QAAE,EAAE,OAAQ,CAAG;IACvBP,KAAK,EAAGA,KAAO;IACfC,QAAQ,EAAGA,QAAU;IACrBO,IAAI,EAAG,IAAAD,QAAE,EACR,iEACD,CAAG;IACHE,OAAO;IAAAC,QAAA,gBAEP,IAAAZ,WAAA,CAAAa,GAAA,EAACd,WAAA,CAAAe,sCAAwB;MACxBZ,KAAK,EAAC,MAAM;MACZM,KAAK,EAAG,IAAAO,QAAE,EACT,MAAM,EACN,wDACD;IAAG,CACH,CAAC,eACF,IAAAf,WAAA,CAAAa,GAAA,EAACd,WAAA,CAAAe,sCAAwB;MACxBZ,KAAK,EAAC,OAAO;MACbM,KAAK,EAAG,IAAAO,QAAE,EACT,OAAO,EACP,wDACD;IAAG,CACH,CAAC,eACF,IAAAf,WAAA,CAAAa,GAAA,EAACd,WAAA,CAAAe,sCAAwB;MACxBZ,KAAK,EAAC,SAAS;MACfM,KAAK,EAAG,IAAAO,QAAE,EACT,SAAS,EACT,wDACD;IAAG,CACH,CAAC;EAAA,CACiB,CAAC;AAEvB","ignoreList":[]}
|
|
@@ -54,6 +54,7 @@ function QueryPaginationNumbersEdit({
|
|
|
54
54
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PanelBody, {
|
|
55
55
|
title: (0, _i18n.__)('Settings'),
|
|
56
56
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.RangeControl, {
|
|
57
|
+
__next40pxDefaultSize: true,
|
|
57
58
|
__nextHasNoMarginBottom: true,
|
|
58
59
|
label: (0, _i18n.__)('Number of links'),
|
|
59
60
|
help: (0, _i18n.__)('Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible.'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_blockEditor","_components","_jsxRuntime","createPaginationItem","content","Tag","extraClass","jsx","className","children","previewPaginationNumbers","midSize","paginationItems","i","push","Fragment","QueryPaginationNumbersEdit","attributes","setAttributes","paginationNumbers","parseInt","jsxs","InspectorControls","PanelBody","title","__","RangeControl","__nextHasNoMarginBottom","label","help","value","onChange","min","max","withInputField","useBlockProps"],"sources":["@wordpress/block-library/src/query-pagination-numbers/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { InspectorControls, useBlockProps } from '@wordpress/block-editor';\nimport { PanelBody, RangeControl } from '@wordpress/components';\n\nconst createPaginationItem = ( content, Tag = 'a', extraClass = '' ) => (\n\t<Tag key={ content } className={ `page-numbers ${ extraClass }` }>\n\t\t{ content }\n\t</Tag>\n);\n\nconst previewPaginationNumbers = ( midSize ) => {\n\tconst paginationItems = [];\n\n\t// First set of pagination items.\n\tfor ( let i = 1; i <= midSize; i++ ) {\n\t\tpaginationItems.push( createPaginationItem( i ) );\n\t}\n\n\t// Current pagination item.\n\tpaginationItems.push(\n\t\tcreatePaginationItem( midSize + 1, 'span', 'current' )\n\t);\n\n\t// Second set of pagination items.\n\tfor ( let i = 1; i <= midSize; i++ ) {\n\t\tpaginationItems.push( createPaginationItem( midSize + 1 + i ) );\n\t}\n\n\t// Dots.\n\tpaginationItems.push( createPaginationItem( '...', 'span', 'dots' ) );\n\n\t// Last pagination item.\n\tpaginationItems.push( createPaginationItem( midSize * 2 + 3 ) );\n\n\treturn <>{ paginationItems }</>;\n};\n\nexport default function QueryPaginationNumbersEdit( {\n\tattributes,\n\tsetAttributes,\n} ) {\n\tconst { midSize } = attributes;\n\tconst paginationNumbers = previewPaginationNumbers(\n\t\tparseInt( midSize, 10 )\n\t);\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Number of links' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ midSize }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tmidSize: parseInt( value, 10 ),\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tmax={ 5 }\n\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...useBlockProps() }>{ paginationNumbers }</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAgE,IAAAG,WAAA,GAAAH,OAAA;AALhE;AACA;AACA;;AAKA,MAAMI,oBAAoB,GAAGA,CAAEC,OAAO,EAAEC,GAAG,GAAG,GAAG,EAAEC,UAAU,GAAG,EAAE,kBACjE,IAAAJ,WAAA,CAAAK,GAAA,EAACF,GAAG;EAAiBG,SAAS,EAAI,gBAAgBF,UAAY,EAAG;EAAAG,QAAA,EAC9DL;AAAO,GADCA,OAEN,CACL;AAED,MAAMM,wBAAwB,GAAKC,OAAO,IAAM;EAC/C,MAAMC,eAAe,GAAG,EAAE;;EAE1B;EACA,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIF,OAAO,EAAEE,CAAC,EAAE,EAAG;IACpCD,eAAe,CAACE,IAAI,CAAEX,oBAAoB,CAAEU,CAAE,CAAE,CAAC;EAClD;;EAEA;EACAD,eAAe,CAACE,IAAI,CACnBX,oBAAoB,CAAEQ,OAAO,GAAG,CAAC,EAAE,MAAM,EAAE,SAAU,CACtD,CAAC;;EAED;EACA,KAAM,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIF,OAAO,EAAEE,CAAC,EAAE,EAAG;IACpCD,eAAe,CAACE,IAAI,CAAEX,oBAAoB,CAAEQ,OAAO,GAAG,CAAC,GAAGE,CAAE,CAAE,CAAC;EAChE;;EAEA;EACAD,eAAe,CAACE,IAAI,CAAEX,oBAAoB,CAAE,KAAK,EAAE,MAAM,EAAE,MAAO,CAAE,CAAC;;EAErE;EACAS,eAAe,CAACE,IAAI,CAAEX,oBAAoB,CAAEQ,OAAO,GAAG,CAAC,GAAG,CAAE,CAAE,CAAC;EAE/D,oBAAO,IAAAT,WAAA,CAAAK,GAAA,EAAAL,WAAA,CAAAa,QAAA;IAAAN,QAAA,EAAIG;EAAe,CAAI,CAAC;AAChC,CAAC;AAEc,SAASI,0BAA0BA,CAAE;EACnDC,UAAU;EACVC;AACD,CAAC,EAAG;EACH,MAAM;IAAEP;EAAQ,CAAC,GAAGM,UAAU;EAC9B,MAAME,iBAAiB,GAAGT,wBAAwB,CACjDU,QAAQ,CAAET,OAAO,EAAE,EAAG,CACvB,CAAC;EACD,oBACC,IAAAT,WAAA,CAAAmB,IAAA,EAAAnB,WAAA,CAAAa,QAAA;IAAAN,QAAA,gBACC,IAAAP,WAAA,CAAAK,GAAA,EAACP,YAAA,CAAAsB,iBAAiB;MAAAb,QAAA,eACjB,IAAAP,WAAA,CAAAK,GAAA,EAACN,WAAA,CAAAsB,SAAS;QAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,UAAW,CAAG;QAAAhB,QAAA,eACpC,IAAAP,WAAA,CAAAK,GAAA,EAACN,WAAA,CAAAyB,YAAY;UACZC,uBAAuB;UACvBC,KAAK,EAAG,
|
|
1
|
+
{"version":3,"names":["_i18n","require","_blockEditor","_components","_jsxRuntime","createPaginationItem","content","Tag","extraClass","jsx","className","children","previewPaginationNumbers","midSize","paginationItems","i","push","Fragment","QueryPaginationNumbersEdit","attributes","setAttributes","paginationNumbers","parseInt","jsxs","InspectorControls","PanelBody","title","__","RangeControl","__next40pxDefaultSize","__nextHasNoMarginBottom","label","help","value","onChange","min","max","withInputField","useBlockProps"],"sources":["@wordpress/block-library/src/query-pagination-numbers/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { InspectorControls, useBlockProps } from '@wordpress/block-editor';\nimport { PanelBody, RangeControl } from '@wordpress/components';\n\nconst createPaginationItem = ( content, Tag = 'a', extraClass = '' ) => (\n\t<Tag key={ content } className={ `page-numbers ${ extraClass }` }>\n\t\t{ content }\n\t</Tag>\n);\n\nconst previewPaginationNumbers = ( midSize ) => {\n\tconst paginationItems = [];\n\n\t// First set of pagination items.\n\tfor ( let i = 1; i <= midSize; i++ ) {\n\t\tpaginationItems.push( createPaginationItem( i ) );\n\t}\n\n\t// Current pagination item.\n\tpaginationItems.push(\n\t\tcreatePaginationItem( midSize + 1, 'span', 'current' )\n\t);\n\n\t// Second set of pagination items.\n\tfor ( let i = 1; i <= midSize; i++ ) {\n\t\tpaginationItems.push( createPaginationItem( midSize + 1 + i ) );\n\t}\n\n\t// Dots.\n\tpaginationItems.push( createPaginationItem( '...', 'span', 'dots' ) );\n\n\t// Last pagination item.\n\tpaginationItems.push( createPaginationItem( midSize * 2 + 3 ) );\n\n\treturn <>{ paginationItems }</>;\n};\n\nexport default function QueryPaginationNumbersEdit( {\n\tattributes,\n\tsetAttributes,\n} ) {\n\tconst { midSize } = attributes;\n\tconst paginationNumbers = previewPaginationNumbers(\n\t\tparseInt( midSize, 10 )\n\t);\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Number of links' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ midSize }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tmidSize: parseInt( value, 10 ),\n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6B,0BAAa,EAAC,CAAC;MAAA3B,QAAA,EAAKU;IAAiB,CAAO,CAAC;EAAA,CACtD,CAAC;AAEL","ignoreList":[]}
|
|
@@ -76,6 +76,18 @@ const metadata = exports.metadata = {
|
|
|
76
76
|
},
|
|
77
77
|
interactivity: {
|
|
78
78
|
clientNavigation: true
|
|
79
|
+
},
|
|
80
|
+
__experimentalBorder: {
|
|
81
|
+
radius: true,
|
|
82
|
+
color: true,
|
|
83
|
+
width: true,
|
|
84
|
+
style: true,
|
|
85
|
+
__experimentalDefaultControls: {
|
|
86
|
+
radius: true,
|
|
87
|
+
color: true,
|
|
88
|
+
width: true,
|
|
89
|
+
style: true
|
|
90
|
+
}
|
|
79
91
|
}
|
|
80
92
|
},
|
|
81
93
|
style: "wp-block-query-title"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_variations","_deprecated","metadata","exports","$schema","apiVersion","name","title","category","description","textdomain","attributes","type","textAlign","level","levelOptions","showPrefix","showSearchTerm","supports","align","html","color","gradients","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontStyle","__experimentalFontWeight","__experimentalLetterSpacing","__experimentalTextTransform","__experimentalTextDecoration","interactivity","clientNavigation","style","settings","icon","edit","variations","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/query-title/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { title as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport variations from './variations';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tvariations,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,WAAA,GAAAH,sBAAA,CAAAF,OAAA;AAZA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAM,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,IAAA;MAAAA,IAAA;IAAA;IAAAC,SAAA;MAAAD,IAAA;IAAA;IAAAE,KAAA;MAAAF,IAAA;MAAA;IAAA;IAAAG,YAAA;MAAAH,IAAA;IAAA;IAAAI,UAAA;MAAAJ,IAAA;MAAA;IAAA;IAAAK,cAAA;MAAAL,IAAA;MAAA;IAAA;EAAA;EAAAM,QAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,wBAAA;MAAAC,2BAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAd,6BAAA;QAAAO,QAAA;MAAA;IAAA;IAAAQ,aAAA;MAAAC,gBAAA;IAAA;EAAA;
|
|
1
|
+
{"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_variations","_deprecated","metadata","exports","$schema","apiVersion","name","title","category","description","textdomain","attributes","type","textAlign","level","levelOptions","showPrefix","showSearchTerm","supports","align","html","color","gradients","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontStyle","__experimentalFontWeight","__experimentalLetterSpacing","__experimentalTextTransform","__experimentalTextDecoration","interactivity","clientNavigation","__experimentalBorder","radius","width","style","settings","icon","edit","variations","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/query-title/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { title as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport variations from './variations';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tvariations,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,WAAA,GAAAH,sBAAA,CAAAF,OAAA;AAZA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAM,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,IAAA;MAAAA,IAAA;IAAA;IAAAC,SAAA;MAAAD,IAAA;IAAA;IAAAE,KAAA;MAAAF,IAAA;MAAA;IAAA;IAAAG,YAAA;MAAAH,IAAA;IAAA;IAAAI,UAAA;MAAAJ,IAAA;MAAA;IAAA;IAAAK,cAAA;MAAAL,IAAA;MAAA;IAAA;EAAA;EAAAM,QAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,wBAAA;MAAAC,2BAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAd,6BAAA;QAAAO,QAAA;MAAA;IAAA;IAAAQ,aAAA;MAAAC,gBAAA;IAAA;IAAAC,oBAAA;MAAAC,MAAA;MAAApB,KAAA;MAAAqB,KAAA;MAAAC,KAAA;MAAApB,6BAAA;QAAAkB,MAAA;QAAApB,KAAA;QAAAqB,KAAA;QAAAC,KAAA;MAAA;IAAA;EAAA;EAAAA,KAAA;AAAA;AASA,MAAM;EAAErC;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAGnB,MAAMsC,QAAQ,GAAAzC,OAAA,CAAAyC,QAAA,GAAG;EACvBC,IAAI,EAAJA,YAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA,mBAAU;EACVC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAE5C,IAAI;EAAEJ,QAAQ;EAAE0C;AAAS,CAAE,CAAC;AAACzC,OAAA,CAAA8C,IAAA,GAAAA,IAAA","ignoreList":[]}
|
package/build/quote/index.js
CHANGED
package/build/quote/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","_transforms","metadata","exports","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","value","type","source","selector","multiline","__experimentalRole","citation","textAlign","supports","anchor","html","background","backgroundImage","backgroundSize","__experimentalDefaultControls","__experimentalBorder","color","radius","style","width","dimensions","minHeight","__experimentalOnEnter","__experimentalOnMerge","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","gradients","heading","link","text","layout","allowEditing","spacing","blockGap","padding","margin","interactivity","clientNavigation","styles","label","isDefault","editorStyle","settings","icon","example","innerBlocks","content","__","transforms","edit","save","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/quote/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { quote as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcitation: 'Julio Cortázar',\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __( 'In quoting others, we cite ourselves.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AAEA,IAAAM,KAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,WAAA,GAAAJ,sBAAA,CAAAH,OAAA;AAdA;AACA;AACA;AAIA;AACA;AACA;AAFA,MAAAQ,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,KAAA;MAAAC,IAAA;MAAAC,MAAA;MAAAC,QAAA;MAAAC,SAAA;MAAA;MAAAC,kBAAA;IAAA;IAAAC,QAAA;MAAAL,IAAA;MAAAC,MAAA;MAAAC,QAAA;MAAAE,kBAAA;IAAA;IAAAE,SAAA;MAAAN,IAAA;IAAA;EAAA;EAAAO,QAAA;IAAAC,MAAA;IAAAC,IAAA;IAAAC,UAAA;MAAAC,eAAA;MAAAC,cAAA;MAAAC,6BAAA;QAAAF,eAAA;MAAA;IAAA;IAAAG,oBAAA;MAAAC,KAAA;MAAAC,MAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAL,6BAAA;QAAAE,KAAA;QAAAC,MAAA;QAAAC,KAAA;QAAAC,KAAA;MAAA;IAAA;IAAAC,UAAA;MAAAC,SAAA;MAAAP,6BAAA;QAAAO,SAAA;MAAA;IAAA;IAAAC,qBAAA;IAAAC,qBAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAlB,6BAAA;QAAAW,QAAA;MAAA;IAAA;IAAAT,KAAA;MAAAiB,SAAA;MAAAC,OAAA;MAAAC,IAAA;MAAArB,6BAAA;QAAAH,UAAA;QAAAyB,IAAA;MAAA;IAAA;IAAAC,MAAA;MAAAC,YAAA;IAAA;IAAAC,OAAA;MAAAC,QAAA;MAAAC,OAAA;MAAAC,MAAA;IAAA;IAAAC,aAAA;MAAAC,gBAAA;IAAA;EAAA;EAAAC,MAAA;
|
|
1
|
+
{"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","_transforms","metadata","exports","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","value","type","source","selector","multiline","__experimentalRole","citation","textAlign","supports","anchor","align","html","background","backgroundImage","backgroundSize","__experimentalDefaultControls","__experimentalBorder","color","radius","style","width","dimensions","minHeight","__experimentalOnEnter","__experimentalOnMerge","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","gradients","heading","link","text","layout","allowEditing","spacing","blockGap","padding","margin","interactivity","clientNavigation","styles","label","isDefault","editorStyle","settings","icon","example","innerBlocks","content","__","transforms","edit","save","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/quote/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { quote as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcitation: 'Julio Cortázar',\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __( 'In quoting others, we cite ourselves.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AAEA,IAAAM,KAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,WAAA,GAAAJ,sBAAA,CAAAH,OAAA;AAdA;AACA;AACA;AAIA;AACA;AACA;AAFA,MAAAQ,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,U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5D,OAAA,CAAA4D,QAAA,GAAG;EACvBC,IAAI,EAAJA,YAAI;EACJC,OAAO,EAAE;IACRrD,UAAU,EAAE;MACXO,QAAQ,EAAE;IACX,CAAC;IACD+C,WAAW,EAAE,CACZ;MACC5D,IAAI,EAAE,gBAAgB;MACtBM,UAAU,EAAE;QACXuD,OAAO,EAAE,IAAAC,QAAE,EAAE,uCAAwC;MACtD;IACD,CAAC;EAEH,CAAC;EACDC,UAAU,EAAVA,mBAAU;EACVC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEpE,IAAI;EAAEJ,QAAQ;EAAE6D;AAAS,CAAE,CAAC;AAAC5D,OAAA,CAAAsE,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -16,12 +16,14 @@ const transforms = {
|
|
|
16
16
|
blocks: ['core/pullquote'],
|
|
17
17
|
transform: ({
|
|
18
18
|
value,
|
|
19
|
+
align,
|
|
19
20
|
citation,
|
|
20
21
|
anchor,
|
|
21
22
|
fontSize,
|
|
22
23
|
style
|
|
23
24
|
}) => {
|
|
24
25
|
return (0, _blocks.createBlock)('core/quote', {
|
|
26
|
+
align,
|
|
25
27
|
citation,
|
|
26
28
|
anchor,
|
|
27
29
|
fontSize,
|
|
@@ -81,6 +83,7 @@ const transforms = {
|
|
|
81
83
|
}) => name === 'core/paragraph');
|
|
82
84
|
},
|
|
83
85
|
transform: ({
|
|
86
|
+
align,
|
|
84
87
|
citation,
|
|
85
88
|
anchor,
|
|
86
89
|
fontSize,
|
|
@@ -91,6 +94,7 @@ const transforms = {
|
|
|
91
94
|
}) => `${attributes.content}`).join('<br>');
|
|
92
95
|
return (0, _blocks.createBlock)('core/pullquote', {
|
|
93
96
|
value,
|
|
97
|
+
align,
|
|
94
98
|
citation,
|
|
95
99
|
anchor,
|
|
96
100
|
fontSize,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blockEditor","require","_blocks","transforms","from","type","blocks","transform","value","citation","anchor","fontSize","style","createBlock","content","prefix","schema","blockquote","children","selector","node","handler","HTML","innerHTML","mode","isMultiBlock","isMatch","length","includes","name","some","__experimentalConvert","map","block","attributes","innerBlocks","to","every","join","RichText","isEmpty","ungroup","_default","exports","default"],"sources":["@wordpress/block-library/src/quote/transforms.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RichText } from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/pullquote' ],\n\t\t\ttransform: ( {
|
|
1
|
+
{"version":3,"names":["_blockEditor","require","_blocks","transforms","from","type","blocks","transform","value","align","citation","anchor","fontSize","style","createBlock","content","prefix","schema","blockquote","children","selector","node","handler","HTML","innerHTML","mode","isMultiBlock","isMatch","length","includes","name","some","__experimentalConvert","map","block","attributes","innerBlocks","to","every","join","RichText","isEmpty","ungroup","_default","exports","default"],"sources":["@wordpress/block-library/src/quote/transforms.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RichText } from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/pullquote' ],\n\t\t\ttransform: ( {\n\t\t\t\tvalue,\n\t\t\t\talign,\n\t\t\t\tcitation,\n\t\t\t\tanchor,\n\t\t\t\tfontSize,\n\t\t\t\tstyle,\n\t\t\t} ) => {\n\t\t\t\treturn createBlock(\n\t\t\t\t\t'core/quote',\n\t\t\t\t\t{\n\t\t\t\t\t\talign,\n\t\t\t\t\t\tcitation,\n\t\t\t\t\t\tanchor,\n\t\t\t\t\t\tfontSize,\n\t\t\t\t\t\tstyle,\n\t\t\t\t\t},\n\t\t\t\t\t[ createBlock( 'core/paragraph', { content: value } ) ]\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'prefix',\n\t\t\tprefix: '>',\n\t\t\ttransform: ( content ) =>\n\t\t\t\tcreateBlock( 'core/quote', {}, [\n\t\t\t\t\tcreateBlock( 'core/paragraph', { content } ),\n\t\t\t\t] ),\n\t\t},\n\t\t{\n\t\t\ttype: 'raw',\n\t\t\tschema: () => ( {\n\t\t\t\tblockquote: {\n\t\t\t\t\tchildren: '*',\n\t\t\t\t},\n\t\t\t} ),\n\t\t\tselector: 'blockquote',\n\t\t\ttransform: ( node, handler ) => {\n\t\t\t\treturn createBlock(\n\t\t\t\t\t'core/quote',\n\t\t\t\t\t// Don't try to parse any `cite` out of this content.\n\t\t\t\t\t// * There may be more than one cite.\n\t\t\t\t\t// * There may be more attribution text than just the cite.\n\t\t\t\t\t// * If the cite is nested in the quoted text, it's wrong to\n\t\t\t\t\t// remove it.\n\t\t\t\t\t{},\n\t\t\t\t\thandler( {\n\t\t\t\t\t\tHTML: node.innerHTML,\n\t\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tisMultiBlock: true,\n\t\t\tblocks: [ '*' ],\n\t\t\tisMatch: ( {}, blocks ) => {\n\t\t\t\t// When a single block is selected make the tranformation\n\t\t\t\t// available only to specific blocks that make sense.\n\t\t\t\tif ( blocks.length === 1 ) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'core/paragraph',\n\t\t\t\t\t\t'core/heading',\n\t\t\t\t\t\t'core/list',\n\t\t\t\t\t\t'core/pullquote',\n\t\t\t\t\t].includes( blocks[ 0 ].name );\n\t\t\t\t}\n\t\t\t\treturn ! blocks.some( ( { name } ) => name === 'core/quote' );\n\t\t\t},\n\t\t\t__experimentalConvert: ( blocks ) =>\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/quote',\n\t\t\t\t\t{},\n\t\t\t\t\tblocks.map( ( block ) =>\n\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\tblock.name,\n\t\t\t\t\t\t\tblock.attributes,\n\t\t\t\t\t\t\tblock.innerBlocks\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t},\n\t],\n\tto: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/pullquote' ],\n\t\t\tisMatch: ( {}, block ) => {\n\t\t\t\treturn block.innerBlocks.every(\n\t\t\t\t\t( { name } ) => name === 'core/paragraph'\n\t\t\t\t);\n\t\t\t},\n\t\t\ttransform: (\n\t\t\t\t{ align, citation, anchor, fontSize, style },\n\t\t\t\tinnerBlocks\n\t\t\t) => {\n\t\t\t\tconst value = innerBlocks\n\t\t\t\t\t.map( ( { attributes } ) => `${ attributes.content }` )\n\t\t\t\t\t.join( '<br>' );\n\t\t\t\treturn createBlock( 'core/pullquote', {\n\t\t\t\t\tvalue,\n\t\t\t\t\talign,\n\t\t\t\t\tcitation,\n\t\t\t\t\tanchor,\n\t\t\t\t\tfontSize,\n\t\t\t\t\tstyle,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/paragraph' ],\n\t\t\ttransform: ( { citation }, innerBlocks ) =>\n\t\t\t\tRichText.isEmpty( citation )\n\t\t\t\t\t? innerBlocks\n\t\t\t\t\t: [\n\t\t\t\t\t\t\t...innerBlocks,\n\t\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t\t\t} ),\n\t\t\t\t\t ],\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/group' ],\n\t\t\ttransform: ( { citation, anchor }, innerBlocks ) =>\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/group',\n\t\t\t\t\t{ anchor },\n\t\t\t\t\tRichText.isEmpty( citation )\n\t\t\t\t\t\t? innerBlocks\n\t\t\t\t\t\t: [\n\t\t\t\t\t\t\t\t...innerBlocks,\n\t\t\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t ]\n\t\t\t\t),\n\t\t},\n\t],\n\tungroup: ( { citation }, innerBlocks ) =>\n\t\tRichText.isEmpty( citation )\n\t\t\t? innerBlocks\n\t\t\t: [\n\t\t\t\t\t...innerBlocks,\n\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t} ),\n\t\t\t ],\n};\n\nexport default transforms;\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAME,UAAU,GAAG;EAClBC,IAAI,EAAE,CACL;IACCC,IAAI,EAAE,OAAO;IACbC,MAAM,EAAE,CAAE,gBAAgB,CAAE;IAC5BC,SAAS,EAAEA,CAAE;MACZC,KAAK;MACLC,KAAK;MACLC,QAAQ;MACRC,MAAM;MACNC,QAAQ;MACRC;IACD,CAAC,KAAM;MACN,OAAO,IAAAC,mBAAW,EACjB,YAAY,EACZ;QACCL,KAAK;QACLC,QAAQ;QACRC,MAAM;QACNC,QAAQ;QACRC;MACD,CAAC,EACD,CAAE,IAAAC,mBAAW,EAAE,gBAAgB,EAAE;QAAEC,OAAO,EAAEP;MAAM,CAAE,CAAC,CACtD,CAAC;IACF;EACD,CAAC,EACD;IACCH,IAAI,EAAE,QAAQ;IACdW,MAAM,EAAE,GAAG;IACXT,SAAS,EAAIQ,OAAO,IACnB,IAAAD,mBAAW,EAAE,YAAY,EAAE,CAAC,CAAC,EAAE,CAC9B,IAAAA,mBAAW,EAAE,gBAAgB,EAAE;MAAEC;IAAQ,CAAE,CAAC,CAC3C;EACJ,CAAC,EACD;IACCV,IAAI,EAAE,KAAK;IACXY,MAAM,EAAEA,CAAA,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AAS,CAAC,EAAE0B,WAAW,KACnCI,qBAAQ,CAACC,OAAO,CAAE/B,QAAS,CAAC,GACzB0B,WAAW,GACX,CACA,GAAGA,WAAW,EACd,IAAAtB,mBAAW,EAAE,gBAAgB,EAAE;IAC9BC,OAAO,EAAEL;EACV,CAAE,CAAC;AAER,CAAC;AAAC,IAAAiC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa1C,UAAU","ignoreList":[]}
|
package/build/search/edit.js
CHANGED
|
@@ -300,11 +300,14 @@ function SearchEdit({
|
|
|
300
300
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.InspectorControls, {
|
|
301
301
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PanelBody, {
|
|
302
302
|
title: (0, _i18n.__)('Settings'),
|
|
303
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.
|
|
304
|
-
|
|
305
|
-
|
|
303
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
|
|
304
|
+
className: "wp-block-search__inspector-controls",
|
|
305
|
+
spacing: 4,
|
|
306
306
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalUnitControl, {
|
|
307
|
-
|
|
307
|
+
__next40pxDefaultSize: true,
|
|
308
|
+
label: (0, _i18n.__)('Width'),
|
|
309
|
+
id: unitControlInputId // unused, kept for backwards compatibility
|
|
310
|
+
,
|
|
308
311
|
min: (0, _utils.isPercentageUnit)(widthUnit) ? 0 : _utils.MIN_WIDTH,
|
|
309
312
|
max: (0, _utils.isPercentageUnit)(widthUnit) ? 100 : undefined,
|
|
310
313
|
step: 1,
|
|
@@ -324,7 +327,8 @@ function SearchEdit({
|
|
|
324
327
|
value: `${width}${widthUnit}`,
|
|
325
328
|
units: units
|
|
326
329
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ButtonGroup, {
|
|
327
|
-
className: "wp-block-search__components-button-group",
|
|
330
|
+
className: "wp-block-search__components-button-group" // unused, kept for backwards compatibility
|
|
331
|
+
,
|
|
328
332
|
"aria-label": (0, _i18n.__)('Percentage Width'),
|
|
329
333
|
children: [25, 50, 75, 100].map(widthValue => {
|
|
330
334
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Button, {
|