@wordpress/block-library 10.0.1 → 10.1.1-next.v.202607070741.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/build/accordion/edit.cjs +0 -1
- package/build/accordion/edit.cjs.map +2 -2
- package/build/accordion/view.cjs +23 -0
- package/build/accordion/view.cjs.map +2 -2
- package/build/accordion-heading/deprecated.cjs +121 -1
- package/build/accordion-heading/deprecated.cjs.map +2 -2
- package/build/accordion-heading/edit.cjs +18 -1
- package/build/accordion-heading/edit.cjs.map +3 -3
- package/build/accordion-heading/save.cjs +18 -1
- package/build/accordion-heading/save.cjs.map +3 -3
- package/build/accordion-panel/edit.cjs +1 -1
- package/build/accordion-panel/edit.cjs.map +2 -2
- package/build/archives/edit.cjs +0 -1
- package/build/archives/edit.cjs.map +2 -2
- package/build/audio/edit.cjs +0 -1
- package/build/audio/edit.cjs.map +2 -2
- package/build/avatar/edit.cjs +0 -1
- package/build/avatar/edit.cjs.map +2 -2
- package/build/avatar/user-control.cjs +0 -1
- package/build/avatar/user-control.cjs.map +2 -2
- package/build/categories/edit.cjs +0 -1
- package/build/categories/edit.cjs.map +2 -2
- package/build/code/transforms.cjs +5 -3
- package/build/code/transforms.cjs.map +2 -2
- package/build/column/edit.cjs +0 -1
- package/build/column/edit.cjs.map +2 -2
- package/build/columns/edit.cjs +0 -1
- package/build/columns/edit.cjs.map +2 -2
- package/build/columns/transforms.cjs +9 -2
- package/build/columns/transforms.cjs.map +2 -2
- package/build/comment-author-avatar/edit.cjs +0 -1
- package/build/comment-author-avatar/edit.cjs.map +2 -2
- package/build/comments-pagination/comments-pagination-arrow-controls.cjs +0 -1
- package/build/comments-pagination/comments-pagination-arrow-controls.cjs.map +2 -2
- package/build/cover/edit/inspector-controls.cjs +1 -3
- package/build/cover/edit/inspector-controls.cjs.map +2 -2
- package/build/details/transforms.cjs +3 -1
- package/build/details/transforms.cjs.map +2 -2
- package/build/embed/edit.cjs +2 -3
- package/build/embed/edit.cjs.map +2 -2
- package/build/embed/embed-placeholder.cjs +20 -20
- package/build/embed/embed-placeholder.cjs.map +3 -3
- package/build/file/inspector.cjs +0 -2
- package/build/file/inspector.cjs.map +2 -2
- package/build/form/edit.cjs +0 -2
- package/build/form/edit.cjs.map +2 -2
- package/build/freeform/convert-to-blocks-button.cjs +52 -0
- package/build/freeform/convert-to-blocks-button.cjs.map +7 -0
- package/build/freeform/edit.cjs +14 -33
- package/build/freeform/edit.cjs.map +3 -3
- package/build/freeform/index.cjs +1 -7
- package/build/freeform/index.cjs.map +3 -3
- package/build/gallery/block.json +4 -1
- package/build/gallery/dynamic-gallery.cjs +263 -0
- package/build/gallery/dynamic-gallery.cjs.map +7 -0
- package/build/gallery/dynamic-source.cjs +85 -0
- package/build/gallery/dynamic-source.cjs.map +7 -0
- package/build/gallery/edit.cjs +285 -205
- package/build/gallery/edit.cjs.map +3 -3
- package/build/gallery/gallery.cjs +0 -3
- package/build/gallery/gallery.cjs.map +2 -2
- package/build/gallery/index.cjs +2 -0
- package/build/gallery/index.cjs.map +3 -3
- package/build/gallery/save.cjs +16 -12
- package/build/gallery/save.cjs.map +2 -2
- package/build/gallery/use-dynamic-gallery.cjs +181 -0
- package/build/gallery/use-dynamic-gallery.cjs.map +7 -0
- package/build/gallery/variations.cjs +54 -0
- package/build/gallery/variations.cjs.map +7 -0
- package/build/group/edit.cjs +1 -2
- package/build/group/edit.cjs.map +2 -2
- package/build/group/transforms.cjs +3 -7
- package/build/group/transforms.cjs.map +2 -2
- package/build/heading/edit.cjs +10 -3
- package/build/heading/edit.cjs.map +2 -2
- package/build/html/block.json +2 -2
- package/build/html/edit.cjs +65 -23
- package/build/html/edit.cjs.map +3 -3
- package/build/html/index.cjs +3 -3
- package/build/html/index.cjs.map +2 -2
- package/build/html/modal.cjs +4 -8
- package/build/html/modal.cjs.map +2 -2
- package/build/html/save.cjs +2 -4
- package/build/html/save.cjs.map +2 -2
- package/build/html/transforms.cjs +7 -5
- package/build/html/transforms.cjs.map +2 -2
- package/build/image/animated-gif-convert-control.cjs +105 -0
- package/build/image/animated-gif-convert-control.cjs.map +7 -0
- package/build/image/edit.cjs +34 -0
- package/build/image/edit.cjs.map +2 -2
- package/build/image/image.cjs +38 -66
- package/build/image/image.cjs.map +3 -3
- package/build/index.cjs.map +2 -2
- package/build/latest-comments/edit.cjs +0 -2
- package/build/latest-comments/edit.cjs.map +2 -2
- package/build/latest-posts/block.json +8 -9
- package/build/latest-posts/constants.cjs +0 -3
- package/build/latest-posts/constants.cjs.map +2 -2
- package/build/latest-posts/deprecated.cjs +100 -8
- package/build/latest-posts/deprecated.cjs.map +2 -2
- package/build/latest-posts/edit.cjs +62 -76
- package/build/latest-posts/edit.cjs.map +2 -2
- package/build/list/ordered-list-settings.cjs +0 -1
- package/build/list/ordered-list-settings.cjs.map +2 -2
- package/build/media-text/edit.cjs +0 -1
- package/build/media-text/edit.cjs.map +2 -2
- package/build/missing/edit.cjs +1 -3
- package/build/missing/edit.cjs.map +2 -2
- package/build/navigation/edit/index.cjs +0 -1
- package/build/navigation/edit/index.cjs.map +2 -2
- package/build/navigation/edit/overlay-menu-preview-controls.cjs +0 -1
- package/build/navigation/edit/overlay-menu-preview-controls.cjs.map +2 -2
- package/build/navigation/edit/overlay-menu-preview.cjs +0 -1
- package/build/navigation/edit/overlay-menu-preview.cjs.map +2 -2
- package/build/navigation/edit/overlay-template-part-selector.cjs +0 -1
- package/build/navigation/edit/overlay-template-part-selector.cjs.map +2 -2
- package/build/navigation/edit/overlay-visibility-control.cjs +0 -1
- package/build/navigation/edit/overlay-visibility-control.cjs.map +2 -2
- package/build/navigation-link/shared/use-link-preview.cjs +11 -1
- package/build/navigation-link/shared/use-link-preview.cjs.map +2 -2
- package/build/navigation-overlay-close/edit.cjs +0 -1
- package/build/navigation-overlay-close/edit.cjs.map +2 -2
- package/build/page-list/edit.cjs +0 -1
- package/build/page-list/edit.cjs.map +2 -2
- package/build/playlist/block.json +1 -7
- package/build/playlist/context.cjs +36 -0
- package/build/playlist/context.cjs.map +7 -0
- package/build/playlist/edit.cjs +43 -69
- package/build/playlist/edit.cjs.map +3 -3
- package/build/playlist/utils.cjs +0 -3
- package/build/playlist/utils.cjs.map +3 -3
- package/build/playlist/view.cjs +4 -4
- package/build/playlist/view.cjs.map +2 -2
- package/build/playlist-track/block.json +1 -4
- package/build/playlist-track/edit.cjs +22 -8
- package/build/playlist-track/edit.cjs.map +3 -3
- package/build/post-author/edit.cjs +0 -2
- package/build/post-author/edit.cjs.map +2 -2
- package/build/post-excerpt/edit.cjs +0 -1
- package/build/post-excerpt/edit.cjs.map +2 -2
- package/build/post-featured-image/overlay-controls.cjs +1 -2
- package/build/post-featured-image/overlay-controls.cjs.map +2 -2
- package/build/post-navigation-link/edit.cjs +0 -2
- package/build/post-navigation-link/edit.cjs.map +2 -2
- package/build/query/edit/inspector-controls/author-control.cjs +1 -2
- package/build/query/edit/inspector-controls/author-control.cjs.map +2 -2
- package/build/query/edit/inspector-controls/format-controls.cjs +1 -2
- package/build/query/edit/inspector-controls/format-controls.cjs.map +2 -2
- package/build/query/edit/inspector-controls/index.cjs +0 -3
- package/build/query/edit/inspector-controls/index.cjs.map +2 -2
- package/build/query/edit/inspector-controls/order-control.cjs +0 -1
- package/build/query/edit/inspector-controls/order-control.cjs.map +2 -2
- package/build/query/edit/inspector-controls/parent-control.cjs +0 -1
- package/build/query/edit/inspector-controls/parent-control.cjs.map +2 -2
- package/build/query/edit/inspector-controls/per-page-control.cjs +0 -1
- package/build/query/edit/inspector-controls/per-page-control.cjs.map +2 -2
- package/build/query/edit/inspector-controls/sticky-control.cjs +0 -1
- package/build/query/edit/inspector-controls/sticky-control.cjs.map +2 -2
- package/build/query/edit/inspector-controls/taxonomy-controls.cjs +1 -2
- package/build/query/edit/inspector-controls/taxonomy-controls.cjs.map +2 -2
- package/build/query-pagination/query-pagination-arrow-controls.cjs +0 -1
- package/build/query-pagination/query-pagination-arrow-controls.cjs.map +2 -2
- package/build/query-pagination-numbers/edit.cjs +0 -1
- package/build/query-pagination-numbers/edit.cjs.map +2 -2
- package/build/quote/transforms.cjs +1 -5
- package/build/quote/transforms.cjs.map +2 -2
- package/build/rss/edit.cjs +0 -3
- package/build/rss/edit.cjs.map +2 -2
- package/build/search/edit.cjs +0 -4
- package/build/search/edit.cjs.map +2 -2
- package/build/separator/edit.cjs +1 -2
- package/build/separator/edit.cjs.map +2 -2
- package/build/site-logo/edit.cjs +34 -63
- package/build/site-logo/edit.cjs.map +3 -3
- package/build/social-links/edit.cjs +0 -1
- package/build/social-links/edit.cjs.map +2 -2
- package/build/spacer/controls.cjs +2 -4
- package/build/spacer/controls.cjs.map +2 -2
- package/build/spacer/edit.cjs +1 -2
- package/build/spacer/edit.cjs.map +2 -2
- package/build/tab-list/block.json +3 -2
- package/build/tab-list/edit.cjs +38 -51
- package/build/tab-list/edit.cjs.map +3 -3
- package/build/tab-list/save.cjs +4 -3
- package/build/tab-list/save.cjs.map +2 -2
- package/build/tab-panel/controls.cjs +2 -4
- package/build/tab-panel/controls.cjs.map +3 -3
- package/build/tab-panels/edit.cjs +2 -4
- package/build/tab-panels/edit.cjs.map +3 -3
- package/build/table-of-contents/edit.cjs +0 -1
- package/build/table-of-contents/edit.cjs.map +2 -2
- package/build/tabs/edit.cjs +2 -2
- package/build/tabs/edit.cjs.map +3 -3
- package/build/tabs/tab-toolbar-controls.cjs +74 -0
- package/build/tabs/tab-toolbar-controls.cjs.map +7 -0
- package/build/tabs/use-tab-actions.cjs +87 -0
- package/build/tabs/use-tab-actions.cjs.map +7 -0
- package/build/tabs/use-tab-list-items-sync.cjs +4 -4
- package/build/tabs/use-tab-list-items-sync.cjs.map +2 -2
- package/build/tag-cloud/edit.cjs +2 -6
- package/build/tag-cloud/edit.cjs.map +2 -2
- package/build/template-part/edit/advanced-controls.cjs +0 -1
- package/build/template-part/edit/advanced-controls.cjs.map +2 -2
- package/build/template-part/edit/import-controls.cjs +1 -2
- package/build/template-part/edit/import-controls.cjs.map +2 -2
- package/build/terms-query/edit/inspector-controls/include-control.cjs +0 -1
- package/build/terms-query/edit/inspector-controls/include-control.cjs.map +2 -2
- package/build/terms-query/edit/inspector-controls/inherit-control.cjs +0 -1
- package/build/terms-query/edit/inspector-controls/inherit-control.cjs.map +2 -2
- package/build/terms-query/edit/inspector-controls/max-terms-control.cjs +0 -1
- package/build/terms-query/edit/inspector-controls/max-terms-control.cjs.map +2 -2
- package/build/terms-query/edit/inspector-controls/order-control.cjs +0 -1
- package/build/terms-query/edit/inspector-controls/order-control.cjs.map +2 -2
- package/build/terms-query/edit/inspector-controls/taxonomy-control.cjs +0 -1
- package/build/terms-query/edit/inspector-controls/taxonomy-control.cjs.map +2 -2
- package/build/text-columns/edit.cjs +0 -1
- package/build/text-columns/edit.cjs.map +2 -2
- package/build/utils/gif-conversion-attributes.cjs +40 -0
- package/build/utils/gif-conversion-attributes.cjs.map +7 -0
- package/build/verse/block.json +3 -1
- package/build/video/block.json +6 -0
- package/build/video/edit-common-settings.cjs +0 -1
- package/build/video/edit-common-settings.cjs.map +2 -2
- package/build/video/edit.cjs +28 -3
- package/build/video/edit.cjs.map +3 -3
- package/build/video/gif-restore-control.cjs +73 -0
- package/build/video/gif-restore-control.cjs.map +7 -0
- package/build/video/index.cjs +2 -0
- package/build/video/index.cjs.map +3 -3
- package/build/video/save.cjs +7 -1
- package/build/video/save.cjs.map +2 -2
- package/build/video/tracks-editor.cjs +0 -1
- package/build/video/tracks-editor.cjs.map +2 -2
- package/build/video/variations.cjs +75 -0
- package/build/video/variations.cjs.map +7 -0
- package/build-module/accordion/edit.mjs +0 -1
- package/build-module/accordion/edit.mjs.map +2 -2
- package/build-module/accordion/view.mjs +23 -0
- package/build-module/accordion/view.mjs.map +2 -2
- package/build-module/accordion-heading/deprecated.mjs +121 -1
- package/build-module/accordion-heading/deprecated.mjs.map +2 -2
- package/build-module/accordion-heading/edit.mjs +8 -1
- package/build-module/accordion-heading/edit.mjs.map +2 -2
- package/build-module/accordion-heading/save.mjs +8 -1
- package/build-module/accordion-heading/save.mjs.map +2 -2
- package/build-module/accordion-panel/edit.mjs +1 -1
- package/build-module/accordion-panel/edit.mjs.map +2 -2
- package/build-module/archives/edit.mjs +0 -1
- package/build-module/archives/edit.mjs.map +2 -2
- package/build-module/audio/edit.mjs +0 -1
- package/build-module/audio/edit.mjs.map +2 -2
- package/build-module/avatar/edit.mjs +0 -1
- package/build-module/avatar/edit.mjs.map +2 -2
- package/build-module/avatar/user-control.mjs +0 -1
- package/build-module/avatar/user-control.mjs.map +2 -2
- package/build-module/categories/edit.mjs +0 -1
- package/build-module/categories/edit.mjs.map +2 -2
- package/build-module/code/transforms.mjs +6 -4
- package/build-module/code/transforms.mjs.map +2 -2
- package/build-module/column/edit.mjs +0 -1
- package/build-module/column/edit.mjs.map +2 -2
- package/build-module/columns/edit.mjs +0 -1
- package/build-module/columns/edit.mjs.map +2 -2
- package/build-module/columns/transforms.mjs +9 -2
- package/build-module/columns/transforms.mjs.map +2 -2
- package/build-module/comment-author-avatar/edit.mjs +0 -1
- package/build-module/comment-author-avatar/edit.mjs.map +2 -2
- package/build-module/comments-pagination/comments-pagination-arrow-controls.mjs +0 -1
- package/build-module/comments-pagination/comments-pagination-arrow-controls.mjs.map +2 -2
- package/build-module/cover/edit/inspector-controls.mjs +1 -3
- package/build-module/cover/edit/inspector-controls.mjs.map +2 -2
- package/build-module/details/transforms.mjs +7 -2
- package/build-module/details/transforms.mjs.map +2 -2
- package/build-module/embed/edit.mjs +2 -3
- package/build-module/embed/edit.mjs.map +2 -2
- package/build-module/embed/embed-placeholder.mjs +20 -23
- package/build-module/embed/embed-placeholder.mjs.map +2 -2
- package/build-module/file/inspector.mjs +0 -2
- package/build-module/file/inspector.mjs.map +2 -2
- package/build-module/form/edit.mjs +0 -2
- package/build-module/form/edit.mjs.map +2 -2
- package/build-module/freeform/convert-to-blocks-button.mjs +31 -0
- package/build-module/freeform/convert-to-blocks-button.mjs.map +7 -0
- package/build-module/freeform/edit.mjs +15 -34
- package/build-module/freeform/edit.mjs.map +2 -2
- package/build-module/freeform/index.mjs +1 -7
- package/build-module/freeform/index.mjs.map +2 -2
- package/build-module/gallery/block.json +4 -1
- package/build-module/gallery/dynamic-gallery.mjs +253 -0
- package/build-module/gallery/dynamic-gallery.mjs.map +7 -0
- package/build-module/gallery/dynamic-source.mjs +55 -0
- package/build-module/gallery/dynamic-source.mjs.map +7 -0
- package/build-module/gallery/edit.mjs +288 -206
- package/build-module/gallery/edit.mjs.map +2 -2
- package/build-module/gallery/gallery.mjs +0 -3
- package/build-module/gallery/gallery.mjs.map +2 -2
- package/build-module/gallery/index.mjs +2 -0
- package/build-module/gallery/index.mjs.map +2 -2
- package/build-module/gallery/save.mjs +16 -12
- package/build-module/gallery/save.mjs.map +2 -2
- package/build-module/gallery/use-dynamic-gallery.mjs +167 -0
- package/build-module/gallery/use-dynamic-gallery.mjs.map +7 -0
- package/build-module/gallery/variations.mjs +33 -0
- package/build-module/gallery/variations.mjs.map +7 -0
- package/build-module/group/edit.mjs +1 -2
- package/build-module/group/edit.mjs.map +2 -2
- package/build-module/group/transforms.mjs +7 -8
- package/build-module/group/transforms.mjs.map +2 -2
- package/build-module/heading/edit.mjs +11 -4
- package/build-module/heading/edit.mjs.map +2 -2
- package/build-module/html/block.json +2 -2
- package/build-module/html/edit.mjs +69 -25
- package/build-module/html/edit.mjs.map +2 -2
- package/build-module/html/index.mjs +3 -3
- package/build-module/html/index.mjs.map +2 -2
- package/build-module/html/modal.mjs +4 -8
- package/build-module/html/modal.mjs.map +2 -2
- package/build-module/html/save.mjs +2 -4
- package/build-module/html/save.mjs.map +2 -2
- package/build-module/html/transforms.mjs +8 -6
- package/build-module/html/transforms.mjs.map +2 -2
- package/build-module/image/animated-gif-convert-control.mjs +87 -0
- package/build-module/image/animated-gif-convert-control.mjs.map +7 -0
- package/build-module/image/edit.mjs +34 -0
- package/build-module/image/edit.mjs.map +2 -2
- package/build-module/image/image.mjs +28 -67
- package/build-module/image/image.mjs.map +2 -2
- package/build-module/index.mjs.map +2 -2
- package/build-module/latest-comments/edit.mjs +0 -2
- package/build-module/latest-comments/edit.mjs.map +2 -2
- package/build-module/latest-posts/block.json +8 -9
- package/build-module/latest-posts/constants.mjs +0 -2
- package/build-module/latest-posts/constants.mjs.map +2 -2
- package/build-module/latest-posts/deprecated.mjs +100 -8
- package/build-module/latest-posts/deprecated.mjs.map +2 -2
- package/build-module/latest-posts/edit.mjs +62 -77
- package/build-module/latest-posts/edit.mjs.map +2 -2
- package/build-module/list/ordered-list-settings.mjs +0 -1
- package/build-module/list/ordered-list-settings.mjs.map +2 -2
- package/build-module/media-text/edit.mjs +0 -1
- package/build-module/media-text/edit.mjs.map +2 -2
- package/build-module/missing/edit.mjs +1 -3
- package/build-module/missing/edit.mjs.map +2 -2
- package/build-module/navigation/edit/index.mjs +0 -1
- package/build-module/navigation/edit/index.mjs.map +2 -2
- package/build-module/navigation/edit/overlay-menu-preview-controls.mjs +0 -1
- package/build-module/navigation/edit/overlay-menu-preview-controls.mjs.map +2 -2
- package/build-module/navigation/edit/overlay-menu-preview.mjs +0 -1
- package/build-module/navigation/edit/overlay-menu-preview.mjs.map +2 -2
- package/build-module/navigation/edit/overlay-template-part-selector.mjs +0 -1
- package/build-module/navigation/edit/overlay-template-part-selector.mjs.map +2 -2
- package/build-module/navigation/edit/overlay-visibility-control.mjs +0 -1
- package/build-module/navigation/edit/overlay-visibility-control.mjs.map +2 -2
- package/build-module/navigation-link/shared/use-link-preview.mjs +11 -1
- package/build-module/navigation-link/shared/use-link-preview.mjs.map +2 -2
- package/build-module/navigation-overlay-close/edit.mjs +0 -1
- package/build-module/navigation-overlay-close/edit.mjs.map +2 -2
- package/build-module/page-list/edit.mjs +0 -1
- package/build-module/page-list/edit.mjs.map +2 -2
- package/build-module/playlist/block.json +1 -7
- package/build-module/playlist/context.mjs +11 -0
- package/build-module/playlist/context.mjs.map +7 -0
- package/build-module/playlist/edit.mjs +44 -70
- package/build-module/playlist/edit.mjs.map +2 -2
- package/build-module/playlist/utils.mjs +0 -3
- package/build-module/playlist/utils.mjs.map +2 -2
- package/build-module/playlist/view.mjs +4 -4
- package/build-module/playlist/view.mjs.map +2 -2
- package/build-module/playlist-track/block.json +1 -4
- package/build-module/playlist-track/edit.mjs +23 -9
- package/build-module/playlist-track/edit.mjs.map +2 -2
- package/build-module/post-author/edit.mjs +0 -2
- package/build-module/post-author/edit.mjs.map +2 -2
- package/build-module/post-excerpt/edit.mjs +0 -1
- package/build-module/post-excerpt/edit.mjs.map +2 -2
- package/build-module/post-featured-image/overlay-controls.mjs +1 -2
- package/build-module/post-featured-image/overlay-controls.mjs.map +2 -2
- package/build-module/post-navigation-link/edit.mjs +0 -2
- package/build-module/post-navigation-link/edit.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/author-control.mjs +1 -2
- package/build-module/query/edit/inspector-controls/author-control.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/format-controls.mjs +1 -2
- package/build-module/query/edit/inspector-controls/format-controls.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/index.mjs +0 -3
- package/build-module/query/edit/inspector-controls/index.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/order-control.mjs +0 -1
- package/build-module/query/edit/inspector-controls/order-control.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/parent-control.mjs +0 -1
- package/build-module/query/edit/inspector-controls/parent-control.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/per-page-control.mjs +0 -1
- package/build-module/query/edit/inspector-controls/per-page-control.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/sticky-control.mjs +0 -1
- package/build-module/query/edit/inspector-controls/sticky-control.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/taxonomy-controls.mjs +1 -2
- package/build-module/query/edit/inspector-controls/taxonomy-controls.mjs.map +2 -2
- package/build-module/query-pagination/query-pagination-arrow-controls.mjs +0 -1
- package/build-module/query-pagination/query-pagination-arrow-controls.mjs.map +2 -2
- package/build-module/query-pagination-numbers/edit.mjs +0 -1
- package/build-module/query-pagination-numbers/edit.mjs.map +2 -2
- package/build-module/quote/transforms.mjs +6 -6
- package/build-module/quote/transforms.mjs.map +2 -2
- package/build-module/rss/edit.mjs +0 -3
- package/build-module/rss/edit.mjs.map +2 -2
- package/build-module/search/edit.mjs +0 -4
- package/build-module/search/edit.mjs.map +2 -2
- package/build-module/separator/edit.mjs +1 -2
- package/build-module/separator/edit.mjs.map +2 -2
- package/build-module/site-logo/edit.mjs +34 -64
- package/build-module/site-logo/edit.mjs.map +2 -2
- package/build-module/social-links/edit.mjs +0 -1
- package/build-module/social-links/edit.mjs.map +2 -2
- package/build-module/spacer/controls.mjs +2 -4
- package/build-module/spacer/controls.mjs.map +2 -2
- package/build-module/spacer/edit.mjs +1 -2
- package/build-module/spacer/edit.mjs.map +2 -2
- package/build-module/tab-list/block.json +3 -2
- package/build-module/tab-list/edit.mjs +39 -52
- package/build-module/tab-list/edit.mjs.map +2 -2
- package/build-module/tab-list/save.mjs +5 -3
- package/build-module/tab-list/save.mjs.map +2 -2
- package/build-module/tab-panel/controls.mjs +2 -4
- package/build-module/tab-panel/controls.mjs.map +2 -2
- package/build-module/tab-panels/edit.mjs +2 -4
- package/build-module/tab-panels/edit.mjs.map +2 -2
- package/build-module/table-of-contents/edit.mjs +0 -1
- package/build-module/table-of-contents/edit.mjs.map +2 -2
- package/build-module/tabs/edit.mjs +2 -2
- package/build-module/tabs/edit.mjs.map +2 -2
- package/build-module/tabs/tab-toolbar-controls.mjs +46 -0
- package/build-module/tabs/tab-toolbar-controls.mjs.map +7 -0
- package/build-module/tabs/use-tab-actions.mjs +66 -0
- package/build-module/tabs/use-tab-actions.mjs.map +7 -0
- package/build-module/tabs/use-tab-list-items-sync.mjs +6 -6
- package/build-module/tabs/use-tab-list-items-sync.mjs.map +2 -2
- package/build-module/tag-cloud/edit.mjs +2 -6
- package/build-module/tag-cloud/edit.mjs.map +2 -2
- package/build-module/template-part/edit/advanced-controls.mjs +0 -1
- package/build-module/template-part/edit/advanced-controls.mjs.map +2 -2
- package/build-module/template-part/edit/import-controls.mjs +1 -2
- package/build-module/template-part/edit/import-controls.mjs.map +2 -2
- package/build-module/terms-query/edit/inspector-controls/include-control.mjs +0 -1
- package/build-module/terms-query/edit/inspector-controls/include-control.mjs.map +2 -2
- package/build-module/terms-query/edit/inspector-controls/inherit-control.mjs +0 -1
- package/build-module/terms-query/edit/inspector-controls/inherit-control.mjs.map +2 -2
- package/build-module/terms-query/edit/inspector-controls/max-terms-control.mjs +0 -1
- package/build-module/terms-query/edit/inspector-controls/max-terms-control.mjs.map +2 -2
- package/build-module/terms-query/edit/inspector-controls/order-control.mjs +0 -1
- package/build-module/terms-query/edit/inspector-controls/order-control.mjs.map +2 -2
- package/build-module/terms-query/edit/inspector-controls/taxonomy-control.mjs +0 -1
- package/build-module/terms-query/edit/inspector-controls/taxonomy-control.mjs.map +2 -2
- package/build-module/text-columns/edit.mjs +0 -1
- package/build-module/text-columns/edit.mjs.map +2 -2
- package/build-module/utils/gif-conversion-attributes.mjs +15 -0
- package/build-module/utils/gif-conversion-attributes.mjs.map +7 -0
- package/build-module/verse/block.json +3 -1
- package/build-module/video/block.json +6 -0
- package/build-module/video/edit-common-settings.mjs +0 -1
- package/build-module/video/edit-common-settings.mjs.map +2 -2
- package/build-module/video/edit.mjs +28 -3
- package/build-module/video/edit.mjs.map +2 -2
- package/build-module/video/gif-restore-control.mjs +55 -0
- package/build-module/video/gif-restore-control.mjs.map +7 -0
- package/build-module/video/index.mjs +2 -0
- package/build-module/video/index.mjs.map +2 -2
- package/build-module/video/save.mjs +7 -1
- package/build-module/video/save.mjs.map +2 -2
- package/build-module/video/tracks-editor.mjs +0 -1
- package/build-module/video/tracks-editor.mjs.map +2 -2
- package/build-module/video/variations.mjs +50 -0
- package/build-module/video/variations.mjs.map +7 -0
- package/build-style/accordion-panel/style-rtl.css +1 -2
- package/build-style/accordion-panel/style.css +1 -2
- package/build-style/audio/style-rtl.css +6 -0
- package/build-style/audio/style.css +6 -0
- package/build-style/audio/theme-rtl.css +6 -0
- package/build-style/audio/theme.css +6 -0
- package/build-style/columns/style-rtl.css +6 -0
- package/build-style/columns/style.css +6 -0
- package/build-style/common-rtl.css +6 -4
- package/build-style/common.css +6 -4
- package/build-style/editor-rtl.css +38 -3
- package/build-style/editor.css +38 -3
- package/build-style/embed/style-rtl.css +6 -0
- package/build-style/embed/style.css +6 -0
- package/build-style/embed/theme-rtl.css +6 -0
- package/build-style/embed/theme.css +6 -0
- package/build-style/freeform/editor-rtl.css +6 -0
- package/build-style/freeform/editor.css +6 -0
- package/build-style/gallery/editor-rtl.css +27 -3
- package/build-style/gallery/editor.css +27 -3
- package/build-style/gallery/style-rtl.css +6 -0
- package/build-style/gallery/style.css +6 -0
- package/build-style/gallery/theme-rtl.css +6 -0
- package/build-style/gallery/theme.css +6 -0
- package/build-style/html/editor-rtl.css +13 -0
- package/build-style/html/editor.css +13 -0
- package/build-style/image/editor-rtl.css +10 -0
- package/build-style/image/editor.css +10 -0
- package/build-style/image/style-rtl.css +6 -1
- package/build-style/image/style.css +6 -1
- package/build-style/image/theme-rtl.css +6 -0
- package/build-style/image/theme.css +6 -0
- package/build-style/latest-posts/style-rtl.css +26 -15
- package/build-style/latest-posts/style.css +26 -15
- package/build-style/navigation/editor-rtl.css +6 -0
- package/build-style/navigation/editor.css +6 -0
- package/build-style/navigation/style-rtl.css +6 -0
- package/build-style/navigation/style.css +6 -0
- package/build-style/navigation-submenu/editor-rtl.css +6 -0
- package/build-style/navigation-submenu/editor.css +6 -0
- package/build-style/page-list/editor-rtl.css +6 -0
- package/build-style/page-list/editor.css +6 -0
- package/build-style/playlist/style-rtl.css +121 -19
- package/build-style/playlist/style.css +121 -19
- package/build-style/post-template/style-rtl.css +6 -0
- package/build-style/post-template/style.css +6 -0
- package/build-style/query/editor-rtl.css +6 -0
- package/build-style/query/editor.css +6 -0
- package/build-style/rss/style-rtl.css +6 -0
- package/build-style/rss/style.css +6 -0
- package/build-style/shortcode/editor-rtl.css +6 -0
- package/build-style/shortcode/editor.css +6 -0
- package/build-style/style-rtl.css +145 -38
- package/build-style/style.css +145 -38
- package/build-style/table/editor-rtl.css +6 -0
- package/build-style/table/editor.css +6 -0
- package/build-style/table/theme-rtl.css +6 -0
- package/build-style/table/theme.css +6 -0
- package/build-style/template-part/editor-rtl.css +6 -0
- package/build-style/template-part/editor.css +6 -0
- package/build-style/theme-rtl.css +6 -0
- package/build-style/theme.css +6 -0
- package/build-style/video/style-rtl.css +6 -0
- package/build-style/video/style.css +6 -0
- package/build-style/video/theme-rtl.css +6 -0
- package/build-style/video/theme.css +6 -0
- package/package.json +43 -41
- package/src/accordion/README.md +1 -1
- package/src/accordion/edit.js +0 -1
- package/src/accordion/view.js +24 -0
- package/src/accordion-heading/README.md +1 -1
- package/src/accordion-heading/deprecated.js +122 -1
- package/src/accordion-heading/edit.js +12 -1
- package/src/accordion-heading/save.js +12 -1
- package/src/accordion-item/README.md +1 -1
- package/src/accordion-item/index.php +2 -1
- package/src/accordion-panel/edit.js +1 -1
- package/src/accordion-panel/style.scss +1 -4
- package/src/archives/edit.js +0 -1
- package/src/audio/edit.js +0 -1
- package/src/avatar/edit.js +0 -1
- package/src/avatar/user-control.js +0 -1
- package/src/categories/edit.js +0 -1
- package/src/code/transforms.js +6 -4
- package/src/column/edit.js +0 -1
- package/src/columns/edit.js +0 -1
- package/src/columns/transforms.js +9 -2
- package/src/comment-author-avatar/edit.js +0 -1
- package/src/comments-pagination/comments-pagination-arrow-controls.js +0 -1
- package/src/common.scss +0 -4
- package/src/cover/edit/inspector-controls.js +0 -2
- package/src/cover/test/edit.js +4 -42
- package/src/details/transforms.js +7 -2
- package/src/embed/edit.js +4 -5
- package/src/embed/embed-placeholder.js +16 -19
- package/src/file/inspector.js +0 -2
- package/src/form/edit.js +0 -2
- package/src/freeform/convert-to-blocks-button.js +33 -0
- package/src/freeform/edit.js +11 -21
- package/src/freeform/index.js +1 -9
- package/src/gallery/README.md +3 -0
- package/src/gallery/block.json +4 -1
- package/src/gallery/dynamic-gallery.js +384 -0
- package/src/gallery/dynamic-source.js +117 -0
- package/src/gallery/edit.js +152 -46
- package/src/gallery/editor.scss +32 -4
- package/src/gallery/gallery.js +0 -7
- package/src/gallery/index.js +2 -0
- package/src/gallery/index.php +277 -0
- package/src/gallery/save.js +22 -11
- package/src/gallery/test/dynamic-source.js +90 -0
- package/src/gallery/use-dynamic-gallery.js +275 -0
- package/src/gallery/variations.js +37 -0
- package/src/group/edit.js +2 -3
- package/src/group/transforms.js +7 -8
- package/src/heading/edit.js +19 -14
- package/src/home-link/index.php +1 -1
- package/src/html/README.md +2 -1
- package/src/html/block.json +2 -2
- package/src/html/edit.js +86 -14
- package/src/html/editor.scss +10 -0
- package/src/html/index.js +3 -4
- package/src/html/modal.js +5 -9
- package/src/html/save.js +4 -7
- package/src/html/test/index.js +143 -0
- package/src/html/transforms.js +11 -6
- package/src/icon/index.php +38 -45
- package/src/image/animated-gif-convert-control.js +135 -0
- package/src/image/edit.js +52 -0
- package/src/image/editor.scss +9 -0
- package/src/image/image.js +121 -180
- package/src/image/style.scss +0 -1
- package/src/image/test/animated-gif-convert-control.js +276 -0
- package/src/image/test/use-open-image-media-editor-modal.js +19 -4
- package/src/index.js +0 -2
- package/src/latest-comments/edit.js +0 -2
- package/src/latest-posts/README.md +2 -2
- package/src/latest-posts/block.json +8 -9
- package/src/latest-posts/constants.js +0 -1
- package/src/latest-posts/deprecated.js +112 -9
- package/src/latest-posts/edit.js +33 -45
- package/src/latest-posts/index.php +14 -3
- package/src/latest-posts/style.scss +12 -2
- package/src/latest-posts/test/deprecated.js +153 -0
- package/src/list/ordered-list-settings.js +0 -1
- package/src/media-text/edit.js +0 -1
- package/src/missing/edit.js +1 -3
- package/src/navigation/edit/index.js +0 -1
- package/src/navigation/edit/overlay-menu-preview-controls.js +0 -1
- package/src/navigation/edit/overlay-menu-preview.js +0 -1
- package/src/navigation/edit/overlay-template-part-selector.js +0 -1
- package/src/navigation/edit/overlay-visibility-control.js +0 -1
- package/src/navigation-link/shared/test/controls.js +0 -4
- package/src/navigation-link/shared/test/use-entity-binding.js +8 -12
- package/src/navigation-link/shared/test/use-handle-link-change.test.js +0 -4
- package/src/navigation-link/shared/test/use-link-preview.test.js +17 -4
- package/src/navigation-link/shared/use-link-preview.js +24 -4
- package/src/navigation-overlay-close/edit.js +0 -1
- package/src/page-list/edit.js +0 -1
- package/src/page-list/index.php +1 -1
- package/src/playlist/README.md +0 -2
- package/src/playlist/block.json +1 -7
- package/src/playlist/context.js +9 -0
- package/src/playlist/edit.js +51 -82
- package/src/playlist/index.php +37 -26
- package/src/playlist/style.scss +0 -5
- package/src/playlist/test/edit.js +0 -10
- package/src/playlist/utils.js +0 -6
- package/src/playlist/view.js +4 -4
- package/src/playlist-track/README.md +0 -2
- package/src/playlist-track/block.json +1 -4
- package/src/playlist-track/edit.js +25 -16
- package/src/playlist-track/index.php +4 -11
- package/src/post-author/edit.js +0 -2
- package/src/post-excerpt/edit.js +0 -1
- package/src/post-featured-image/overlay-controls.js +0 -1
- package/src/post-navigation-link/edit.js +0 -2
- package/src/query/edit/inspector-controls/author-control.js +0 -1
- package/src/query/edit/inspector-controls/format-controls.js +0 -1
- package/src/query/edit/inspector-controls/index.js +0 -3
- package/src/query/edit/inspector-controls/order-control.js +0 -1
- package/src/query/edit/inspector-controls/parent-control.js +0 -1
- package/src/query/edit/inspector-controls/per-page-control.js +0 -1
- package/src/query/edit/inspector-controls/sticky-control.js +0 -1
- package/src/query/edit/inspector-controls/taxonomy-controls.js +0 -1
- package/src/query-pagination/query-pagination-arrow-controls.js +0 -1
- package/src/query-pagination-numbers/edit.js +0 -1
- package/src/quote/transforms.js +6 -6
- package/src/rss/edit.js +0 -3
- package/src/search/edit.js +0 -4
- package/src/separator/edit.js +0 -1
- package/src/site-logo/edit.js +38 -78
- package/src/social-links/edit.js +0 -1
- package/src/spacer/controls.js +2 -4
- package/src/spacer/edit.js +2 -3
- package/src/tab-list/block.json +3 -2
- package/src/tab-list/edit.js +53 -55
- package/src/tab-list/save.js +5 -4
- package/src/tab-panel/controls.js +2 -4
- package/src/tab-panels/edit.js +2 -4
- package/src/table-of-contents/edit.js +0 -1
- package/src/tabs/edit.js +2 -2
- package/src/tabs/tab-toolbar-controls.js +58 -0
- package/src/tabs/use-tab-actions.js +102 -0
- package/src/tabs/use-tab-list-items-sync.js +7 -8
- package/src/tag-cloud/edit.js +0 -4
- package/src/tag-cloud/index.php +1 -1
- package/src/template-part/edit/advanced-controls.js +0 -1
- package/src/template-part/edit/import-controls.js +0 -1
- package/src/terms-query/edit/inspector-controls/include-control.js +0 -1
- package/src/terms-query/edit/inspector-controls/inherit-control.js +0 -1
- package/src/terms-query/edit/inspector-controls/max-terms-control.js +0 -1
- package/src/terms-query/edit/inspector-controls/order-control.js +0 -1
- package/src/terms-query/edit/inspector-controls/taxonomy-control.js +0 -1
- package/src/text-columns/edit.js +0 -1
- package/src/utils/gif-conversion-attributes.js +30 -0
- package/src/utils/test/gif-conversion-attributes.js +60 -0
- package/src/utils/test/waveform-player.js +0 -4
- package/src/utils/test/waveform-utils.js +0 -4
- package/src/verse/README.md +1 -0
- package/src/verse/block.json +3 -1
- package/src/video/README.md +2 -0
- package/src/video/block.json +6 -0
- package/src/video/edit-common-settings.js +0 -1
- package/src/video/edit.js +38 -1
- package/src/video/gif-restore-control.js +92 -0
- package/src/video/index.js +2 -0
- package/src/video/save.js +12 -0
- package/src/video/test/variations.js +65 -0
- package/src/video/tracks-editor.js +0 -1
- package/src/video/variations.js +65 -0
- package/build/freeform/migration-notice.cjs +0 -58
- package/build/freeform/migration-notice.cjs.map +0 -7
- package/build/tab-panel/add-tab-toolbar-control.cjs +0 -90
- package/build/tab-panel/add-tab-toolbar-control.cjs.map +0 -7
- package/build/tab-panel/remove-tab-toolbar-control.cjs +0 -99
- package/build/tab-panel/remove-tab-toolbar-control.cjs.map +0 -7
- package/build/tabs/controls.cjs +0 -45
- package/build/tabs/controls.cjs.map +0 -7
- package/build-module/freeform/migration-notice.mjs +0 -37
- package/build-module/freeform/migration-notice.mjs.map +0 -7
- package/build-module/tab-panel/add-tab-toolbar-control.mjs +0 -72
- package/build-module/tab-panel/add-tab-toolbar-control.mjs.map +0 -7
- package/build-module/tab-panel/remove-tab-toolbar-control.mjs +0 -81
- package/build-module/tab-panel/remove-tab-toolbar-control.mjs.map +0 -7
- package/build-module/tabs/controls.mjs +0 -14
- package/build-module/tabs/controls.mjs.map +0 -7
- package/src/freeform/migration-notice.js +0 -49
- package/src/tab-panel/add-tab-toolbar-control.js +0 -90
- package/src/tab-panel/remove-tab-toolbar-control.js +0 -110
- package/src/tabs/controls.js +0 -14
package/src/playlist/edit.js
CHANGED
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { v4 as uuid } from 'uuid';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* WordPress dependencies
|
|
9
8
|
*/
|
|
10
|
-
import { useCallback, useEffect } from '@wordpress/element';
|
|
9
|
+
import { useCallback, useEffect, useMemo, useState } from '@wordpress/element';
|
|
11
10
|
import {
|
|
12
11
|
store as blockEditorStore,
|
|
13
12
|
MediaPlaceholder,
|
|
@@ -38,6 +37,7 @@ import { createBlock } from '@wordpress/blocks';
|
|
|
38
37
|
import { Caption } from '../utils/caption';
|
|
39
38
|
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
40
39
|
import { WaveformPlayer } from '../utils/waveform-player';
|
|
40
|
+
import { PlaylistContext } from './context';
|
|
41
41
|
import { getTrackAttributes } from './utils';
|
|
42
42
|
|
|
43
43
|
const ALLOWED_MEDIA_TYPES = [ 'audio' ];
|
|
@@ -56,21 +56,19 @@ const PlaylistEdit = ( {
|
|
|
56
56
|
showImages,
|
|
57
57
|
showArtists,
|
|
58
58
|
showTrackLength,
|
|
59
|
-
currentTrack,
|
|
60
59
|
} = attributes;
|
|
61
60
|
|
|
62
61
|
// Extract the waveform style from the block style variation class.
|
|
63
62
|
const waveformStyle =
|
|
64
63
|
attributes.className?.match( /is-style-([\w-]+)/ )?.[ 1 ] || 'bars';
|
|
65
64
|
const blockProps = useBlockProps();
|
|
66
|
-
const { replaceInnerBlocks
|
|
67
|
-
useDispatch( blockEditorStore );
|
|
65
|
+
const { replaceInnerBlocks } = useDispatch( blockEditorStore );
|
|
68
66
|
const { createErrorNotice } = useDispatch( noticesStore );
|
|
69
67
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
70
68
|
function onUploadError( message ) {
|
|
71
69
|
createErrorNotice( message, { type: 'snackbar' } );
|
|
72
70
|
}
|
|
73
|
-
const
|
|
71
|
+
const [ currentTrackClientId, setCurrentTrackClientId ] = useState( null );
|
|
74
72
|
|
|
75
73
|
const { innerBlockTracks } = useSelect(
|
|
76
74
|
( select ) => {
|
|
@@ -82,61 +80,44 @@ const PlaylistEdit = ( {
|
|
|
82
80
|
[ clientId ]
|
|
83
81
|
);
|
|
84
82
|
|
|
85
|
-
// Ensure that each inner block has a unique ID,
|
|
86
|
-
// even if a track is duplicated.
|
|
87
|
-
useEffect( () => {
|
|
88
|
-
const seen = new Set();
|
|
89
|
-
let hasDuplicates = false;
|
|
90
|
-
const updatedBlocks = innerBlockTracks.map( ( block ) => {
|
|
91
|
-
if ( seen.has( block.attributes.uniqueId ) ) {
|
|
92
|
-
hasDuplicates = true;
|
|
93
|
-
return {
|
|
94
|
-
...block,
|
|
95
|
-
attributes: {
|
|
96
|
-
...block.attributes,
|
|
97
|
-
uniqueId: uuid(),
|
|
98
|
-
},
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
seen.add( block.attributes.uniqueId );
|
|
102
|
-
return block;
|
|
103
|
-
} );
|
|
104
|
-
if ( hasDuplicates ) {
|
|
105
|
-
replaceInnerBlocks( clientId, updatedBlocks );
|
|
106
|
-
}
|
|
107
|
-
}, [ innerBlockTracks, clientId, replaceInnerBlocks ] );
|
|
108
|
-
|
|
109
83
|
// Create a list of tracks from the inner blocks,
|
|
110
|
-
// but skip blocks that do not have a
|
|
111
|
-
const validTracks =
|
|
112
|
-
(
|
|
84
|
+
// but skip blocks that do not have a source, such as the media placeholder.
|
|
85
|
+
const validTracks = useMemo(
|
|
86
|
+
() =>
|
|
87
|
+
innerBlockTracks.filter(
|
|
88
|
+
( block ) => !! block.attributes.src || !! block.attributes.blob
|
|
89
|
+
),
|
|
90
|
+
[ innerBlockTracks ]
|
|
91
|
+
);
|
|
92
|
+
const tracks = useMemo(
|
|
93
|
+
() =>
|
|
94
|
+
validTracks.map( ( block ) => ( {
|
|
95
|
+
...block.attributes,
|
|
96
|
+
clientId: block.clientId,
|
|
97
|
+
} ) ),
|
|
98
|
+
[ validTracks ]
|
|
113
99
|
);
|
|
114
|
-
const tracks = validTracks.map( ( block ) => block.attributes );
|
|
115
|
-
const firstTrackId = validTracks[ 0 ]?.attributes?.uniqueId;
|
|
116
100
|
|
|
117
|
-
// updateBlockAttributes is used to force updating the parent playlist block
|
|
118
|
-
// when the currentTrack changes. Using setAttributes directly does not update
|
|
119
|
-
// the currentTrack when multiple tracks are moved at the same time.
|
|
120
101
|
useEffect( () => {
|
|
121
|
-
if (
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
updateBlockAttributes( clientId, { currentTrack: null } );
|
|
102
|
+
if ( validTracks.length === 0 ) {
|
|
103
|
+
if ( currentTrackClientId !== null ) {
|
|
104
|
+
setCurrentTrackClientId( null );
|
|
125
105
|
}
|
|
126
|
-
|
|
127
|
-
// If the currentTrack is not the first track, update it to the first track.
|
|
128
|
-
firstTrackId &&
|
|
129
|
-
firstTrackId !== currentTrack
|
|
130
|
-
) {
|
|
131
|
-
updateBlockAttributes( clientId, { currentTrack: firstTrackId } );
|
|
106
|
+
return;
|
|
132
107
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
108
|
+
|
|
109
|
+
const currentTrackExists = validTracks.some(
|
|
110
|
+
( block ) => block.clientId === currentTrackClientId
|
|
111
|
+
);
|
|
112
|
+
if ( ! currentTrackExists ) {
|
|
113
|
+
setCurrentTrackClientId( validTracks[ 0 ].clientId );
|
|
114
|
+
}
|
|
115
|
+
}, [ currentTrackClientId, setCurrentTrackClientId, validTracks ] );
|
|
116
|
+
|
|
117
|
+
const playlistContext = useMemo(
|
|
118
|
+
() => ( { currentTrackClientId, setCurrentTrackClientId } ),
|
|
119
|
+
[ currentTrackClientId, setCurrentTrackClientId ]
|
|
120
|
+
);
|
|
140
121
|
|
|
141
122
|
const onSelectTracks = useCallback(
|
|
142
123
|
( media ) => {
|
|
@@ -149,41 +130,32 @@ const PlaylistEdit = ( {
|
|
|
149
130
|
}
|
|
150
131
|
|
|
151
132
|
const trackList = media.map( getTrackAttributes );
|
|
152
|
-
__unstableMarkNextChangeAsNotPersistent();
|
|
153
|
-
setAttributes( {
|
|
154
|
-
currentTrack:
|
|
155
|
-
trackList.length > 0 ? trackList[ 0 ].uniqueId : null,
|
|
156
|
-
} );
|
|
157
133
|
|
|
158
134
|
const newBlocks = trackList.map( ( track ) =>
|
|
159
135
|
createBlock( 'core/playlist-track', track )
|
|
160
136
|
);
|
|
137
|
+
setCurrentTrackClientId( newBlocks[ 0 ]?.clientId ?? null );
|
|
161
138
|
// Replace the inner blocks with the new tracks.
|
|
162
139
|
replaceInnerBlocks( clientId, newBlocks );
|
|
163
140
|
},
|
|
164
|
-
[
|
|
165
|
-
__unstableMarkNextChangeAsNotPersistent,
|
|
166
|
-
setAttributes,
|
|
167
|
-
replaceInnerBlocks,
|
|
168
|
-
clientId,
|
|
169
|
-
]
|
|
141
|
+
[ replaceInnerBlocks, clientId, setCurrentTrackClientId ]
|
|
170
142
|
);
|
|
171
143
|
|
|
172
|
-
// Get current track data by finding the track with matching
|
|
173
|
-
const currentTrackData =
|
|
174
|
-
( track ) => track.
|
|
175
|
-
|
|
144
|
+
// Get current track data by finding the track with matching client ID.
|
|
145
|
+
const currentTrackData =
|
|
146
|
+
tracks.find( ( track ) => track.clientId === currentTrackClientId ) ??
|
|
147
|
+
tracks[ 0 ];
|
|
176
148
|
|
|
177
149
|
// Handle track end - advance to next track or loop to first.
|
|
178
150
|
const onTrackEnded = useCallback( () => {
|
|
179
151
|
const currentIndex = tracks.findIndex(
|
|
180
|
-
( track ) => track.
|
|
152
|
+
( track ) => track.clientId === currentTrackClientId
|
|
181
153
|
);
|
|
182
154
|
const nextTrack = tracks[ currentIndex + 1 ] || tracks[ 0 ];
|
|
183
|
-
if ( nextTrack?.
|
|
184
|
-
|
|
155
|
+
if ( nextTrack?.clientId ) {
|
|
156
|
+
setCurrentTrackClientId( nextTrack.clientId );
|
|
185
157
|
}
|
|
186
|
-
}, [
|
|
158
|
+
}, [ currentTrackClientId, setCurrentTrackClientId, tracks ] );
|
|
187
159
|
|
|
188
160
|
const onChangeOrder = useCallback(
|
|
189
161
|
( trackOrder ) => {
|
|
@@ -196,22 +168,18 @@ const PlaylistEdit = ( {
|
|
|
196
168
|
}
|
|
197
169
|
return titleB.localeCompare( titleA );
|
|
198
170
|
} );
|
|
199
|
-
const firstUniqueId = sortedBlocks[ 0 ]?.attributes?.uniqueId;
|
|
200
171
|
replaceInnerBlocks( clientId, sortedBlocks );
|
|
172
|
+
setCurrentTrackClientId( sortedBlocks[ 0 ]?.clientId ?? null );
|
|
201
173
|
setAttributes( {
|
|
202
174
|
order: trackOrder,
|
|
203
|
-
currentTrack:
|
|
204
|
-
firstUniqueId && firstUniqueId !== currentTrack
|
|
205
|
-
? firstUniqueId
|
|
206
|
-
: currentTrack,
|
|
207
175
|
} );
|
|
208
176
|
},
|
|
209
177
|
[
|
|
210
178
|
clientId,
|
|
211
|
-
currentTrack,
|
|
212
179
|
innerBlockTracks,
|
|
213
180
|
replaceInnerBlocks,
|
|
214
181
|
setAttributes,
|
|
182
|
+
setCurrentTrackClientId,
|
|
215
183
|
]
|
|
216
184
|
);
|
|
217
185
|
|
|
@@ -379,7 +347,6 @@ const PlaylistEdit = ( {
|
|
|
379
347
|
onDeselect={ () => setAttributes( { order: 'asc' } ) }
|
|
380
348
|
>
|
|
381
349
|
<SelectControl
|
|
382
|
-
__next40pxDefaultSize
|
|
383
350
|
label={ __( 'Order' ) }
|
|
384
351
|
value={ order }
|
|
385
352
|
options={ [
|
|
@@ -411,7 +378,9 @@ const PlaylistEdit = ( {
|
|
|
411
378
|
! showTrackLength,
|
|
412
379
|
} ) }
|
|
413
380
|
>
|
|
414
|
-
{
|
|
381
|
+
<PlaylistContext.Provider value={ playlistContext }>
|
|
382
|
+
{ innerBlocksProps.children }
|
|
383
|
+
</PlaylistContext.Provider>
|
|
415
384
|
</ol>
|
|
416
385
|
) }
|
|
417
386
|
<Caption
|
package/src/playlist/index.php
CHANGED
|
@@ -17,28 +17,23 @@
|
|
|
17
17
|
* @return string Returns the Playlist.
|
|
18
18
|
*/
|
|
19
19
|
function render_block_core_playlist( $attributes, $content, $block ) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
$current_media_id = $attributes['currentTrack'];
|
|
25
|
-
$playlist_id = wp_unique_id( 'playlist-' );
|
|
26
|
-
$playlist_tracks = array();
|
|
27
|
-
$tracks_data = array();
|
|
28
|
-
$current_unique_id = null;
|
|
20
|
+
$playlist_id = wp_unique_id( 'playlist-' );
|
|
21
|
+
$playlist_tracks = array();
|
|
22
|
+
$tracks_data = array();
|
|
29
23
|
|
|
30
24
|
// Parse inner blocks to extract track data.
|
|
31
25
|
// This approach avoids duplicating track data in the HTML output.
|
|
32
26
|
if ( ! empty( $block->inner_blocks ) ) {
|
|
33
27
|
foreach ( $block->inner_blocks as $inner_block ) {
|
|
34
28
|
if ( 'core/playlist-track' === $inner_block->name ) {
|
|
35
|
-
$
|
|
29
|
+
$track_attributes = $inner_block->attributes;
|
|
36
30
|
|
|
37
|
-
$track_attributes
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
if ( empty( $track_attributes['id'] ) ) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
40
34
|
|
|
41
|
-
$
|
|
35
|
+
$track_id = 'track-' . count( $playlist_tracks );
|
|
36
|
+
$playlist_tracks[] = $track_id;
|
|
42
37
|
|
|
43
38
|
// Extract track metadata from block attributes.
|
|
44
39
|
$title = isset( $track_attributes['title'] ) && ! empty( $track_attributes['title'] ) ? $track_attributes['title'] : __( 'Unknown title' );
|
|
@@ -61,7 +56,7 @@ function render_block_core_playlist( $attributes, $content, $block ) {
|
|
|
61
56
|
// Data is passed to wp_interactivity_state() which JSON-encodes it,
|
|
62
57
|
// so we use wp_strip_all_tags() instead of esc_html() to prevent
|
|
63
58
|
// HTML injection without double-encoding. URLs still use esc_url().
|
|
64
|
-
$tracks_data[ $
|
|
59
|
+
$tracks_data[ $track_id ] = array(
|
|
65
60
|
'url' => esc_url( $url ),
|
|
66
61
|
'title' => wp_strip_all_tags( $title ),
|
|
67
62
|
'artist' => wp_strip_all_tags( $artist ),
|
|
@@ -69,18 +64,11 @@ function render_block_core_playlist( $attributes, $content, $block ) {
|
|
|
69
64
|
'image' => esc_url( $image ),
|
|
70
65
|
'ariaLabel' => wp_strip_all_tags( $aria_label ),
|
|
71
66
|
);
|
|
72
|
-
|
|
73
|
-
if ( $unique_id === $current_media_id ) {
|
|
74
|
-
$current_unique_id = $unique_id;
|
|
75
|
-
}
|
|
76
67
|
}
|
|
77
68
|
}
|
|
78
69
|
}
|
|
79
70
|
|
|
80
|
-
|
|
81
|
-
// This can happen for example if the currentTrack was not deleted correctly
|
|
82
|
-
// or if the block is manually edited in the code editor mode.
|
|
83
|
-
if ( empty( $playlist_tracks ) || ! in_array( $current_media_id, $playlist_tracks, true ) ) {
|
|
71
|
+
if ( empty( $playlist_tracks ) ) {
|
|
84
72
|
return '';
|
|
85
73
|
}
|
|
86
74
|
|
|
@@ -108,7 +96,7 @@ function render_block_core_playlist( $attributes, $content, $block ) {
|
|
|
108
96
|
data-label-pause="' . $label_pause . '"
|
|
109
97
|
></div>';
|
|
110
98
|
|
|
111
|
-
// Add the
|
|
99
|
+
// Add the waveform player container inside the figure.
|
|
112
100
|
$figure = null;
|
|
113
101
|
preg_match( '/<figure[^>]*>/', $content, $figure );
|
|
114
102
|
if ( ! empty( $figure[0] ) ) {
|
|
@@ -126,16 +114,39 @@ function render_block_core_playlist( $attributes, $content, $block ) {
|
|
|
126
114
|
|
|
127
115
|
$processor->set_attribute(
|
|
128
116
|
'data-wp-context',
|
|
129
|
-
|
|
117
|
+
wp_json_encode(
|
|
130
118
|
array(
|
|
131
119
|
'playlistId' => $playlist_id,
|
|
132
|
-
'currentId' => $
|
|
120
|
+
'currentId' => $playlist_tracks[0],
|
|
133
121
|
'tracks' => $playlist_tracks,
|
|
134
122
|
'waveformStyle' => $waveform_style,
|
|
135
123
|
)
|
|
136
124
|
)
|
|
137
125
|
);
|
|
138
126
|
|
|
127
|
+
// Track IDs are render-time only. Add them after inner blocks have rendered
|
|
128
|
+
// so track buttons can update the Interactivity API state without storing
|
|
129
|
+
// persistent unique IDs in post content.
|
|
130
|
+
$track_index = 0;
|
|
131
|
+
while ( $processor->next_tag( array( 'class_name' => 'wp-block-playlist-track__button' ) ) ) {
|
|
132
|
+
$track_id = $playlist_tracks[ $track_index ] ?? null;
|
|
133
|
+
|
|
134
|
+
if ( null === $track_id ) {
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
$processor->set_attribute(
|
|
139
|
+
'data-wp-context',
|
|
140
|
+
wp_json_encode(
|
|
141
|
+
array(
|
|
142
|
+
'trackId' => $track_id,
|
|
143
|
+
)
|
|
144
|
+
)
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
++$track_index;
|
|
148
|
+
}
|
|
149
|
+
|
|
139
150
|
return $processor->get_updated_html();
|
|
140
151
|
}
|
|
141
152
|
|
package/src/playlist/style.scss
CHANGED
|
@@ -4,11 +4,6 @@
|
|
|
4
4
|
$waveform-player-height: 100px;
|
|
5
5
|
|
|
6
6
|
.wp-block-playlist {
|
|
7
|
-
// Clip content to respect border-radius.
|
|
8
|
-
// `overflow: hidden` is a fallback for browsers that don't support `overflow: clip`.
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
overflow: clip;
|
|
11
|
-
|
|
12
7
|
// Main waveform player container.
|
|
13
8
|
.wp-block-playlist__waveform-player {
|
|
14
9
|
width: 100%;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jest-environment jsdom
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
/**
|
|
6
2
|
* Internal dependencies
|
|
7
3
|
*/
|
|
8
4
|
import { getTrackAttributes } from '../utils';
|
|
9
5
|
|
|
10
|
-
// Mock uuid to return predictable values.
|
|
11
|
-
jest.mock( 'uuid', () => ( {
|
|
12
|
-
v4: jest.fn( () => 'mock-uuid-1234' ),
|
|
13
|
-
} ) );
|
|
14
|
-
|
|
15
6
|
describe( 'Playlist block edit utilities', () => {
|
|
16
7
|
describe( 'getTrackAttributes', () => {
|
|
17
8
|
it( 'should transform media object to track attributes', () => {
|
|
@@ -29,7 +20,6 @@ describe( 'Playlist block edit utilities', () => {
|
|
|
29
20
|
|
|
30
21
|
expect( result ).toEqual( {
|
|
31
22
|
id: 123,
|
|
32
|
-
uniqueId: 'mock-uuid-1234',
|
|
33
23
|
src: 'https://example.com/song.mp3',
|
|
34
24
|
title: 'My Song',
|
|
35
25
|
artist: 'The Artist',
|
package/src/playlist/utils.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { v4 as uuid } from 'uuid';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -17,7 +12,6 @@ import { __ } from '@wordpress/i18n';
|
|
|
17
12
|
export function getTrackAttributes( media ) {
|
|
18
13
|
return {
|
|
19
14
|
id: media.id || media.url, // Attachment ID or URL.
|
|
20
|
-
uniqueId: uuid(), // Unique ID for the track.
|
|
21
15
|
src: media.url,
|
|
22
16
|
title: media.title,
|
|
23
17
|
artist:
|
package/src/playlist/view.js
CHANGED
|
@@ -19,14 +19,14 @@ const { state } = store(
|
|
|
19
19
|
state: {
|
|
20
20
|
playlists: {},
|
|
21
21
|
get isCurrentTrack() {
|
|
22
|
-
const { currentId,
|
|
23
|
-
return currentId ===
|
|
22
|
+
const { currentId, trackId } = getContext();
|
|
23
|
+
return currentId === trackId;
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
actions: {
|
|
27
27
|
changeTrack() {
|
|
28
28
|
const context = getContext();
|
|
29
|
-
context.currentId = context.
|
|
29
|
+
context.currentId = context.trackId;
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
callbacks: {
|
|
@@ -109,7 +109,7 @@ function initPlayer( ref, track, shouldAutoPlay, context ) {
|
|
|
109
109
|
onEnded: () => {
|
|
110
110
|
// Advance to next track (autoPlay handles playback).
|
|
111
111
|
const currentIndex = context.tracks.findIndex(
|
|
112
|
-
(
|
|
112
|
+
( trackId ) => trackId === context.currentId
|
|
113
113
|
);
|
|
114
114
|
const nextTrack = context.tracks[ currentIndex + 1 ];
|
|
115
115
|
if ( nextTrack ) {
|
|
@@ -24,7 +24,6 @@ _Defined via the [`attributes`](https://developer.wordpress.org/block-editor/ref
|
|
|
24
24
|
|-----------|------|---------|-------------|
|
|
25
25
|
| `blob` | `string` | — | [Role](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#role): `local` |
|
|
26
26
|
| `id` | `number` | — | — |
|
|
27
|
-
| `uniqueId` | `string` | — | — |
|
|
28
27
|
| `src` | `string` | — | — |
|
|
29
28
|
| `type` | `string` | `"audio"` | — |
|
|
30
29
|
| `album` | `string` | — | — |
|
|
@@ -49,7 +48,6 @@ _Defined via the [`usesContext` and `providesContext`](https://developer.wordpre
|
|
|
49
48
|
**Uses context:**
|
|
50
49
|
|
|
51
50
|
- `showArtists`
|
|
52
|
-
- `currentTrack`
|
|
53
51
|
|
|
54
52
|
## Block Markup
|
|
55
53
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"description": "Playlist track.",
|
|
10
10
|
"keywords": [ "music", "sound" ],
|
|
11
11
|
"textdomain": "default",
|
|
12
|
-
"usesContext": [ "showArtists"
|
|
12
|
+
"usesContext": [ "showArtists" ],
|
|
13
13
|
"attributes": {
|
|
14
14
|
"blob": {
|
|
15
15
|
"type": "string",
|
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
"id": {
|
|
19
19
|
"type": "number"
|
|
20
20
|
},
|
|
21
|
-
"uniqueId": {
|
|
22
|
-
"type": "string"
|
|
23
|
-
},
|
|
24
21
|
"src": {
|
|
25
22
|
"type": "string"
|
|
26
23
|
},
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { v4 as uuid } from 'uuid';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
9
4
|
import { isBlobURL } from '@wordpress/blob';
|
|
10
|
-
import { useRef, useState } from '@wordpress/element';
|
|
5
|
+
import { useContext, useEffect, useRef, useState } from '@wordpress/element';
|
|
11
6
|
import {
|
|
12
7
|
MediaPlaceholder,
|
|
13
8
|
MediaReplaceFlow,
|
|
@@ -35,26 +30,42 @@ import { __unstableStripHTML as stripHTML } from '@wordpress/dom';
|
|
|
35
30
|
/**
|
|
36
31
|
* Internal dependencies
|
|
37
32
|
*/
|
|
33
|
+
import { PlaylistContext } from '../playlist/context';
|
|
38
34
|
import { useUploadMediaFromBlobURL } from '../utils/hooks';
|
|
39
35
|
|
|
40
36
|
const ALLOWED_MEDIA_TYPES = [ 'audio' ];
|
|
41
37
|
const ALBUM_COVER_ALLOWED_MEDIA_TYPES = [ 'image' ];
|
|
42
38
|
|
|
43
|
-
const PlaylistTrackEdit = ( {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
const PlaylistTrackEdit = ( {
|
|
40
|
+
attributes,
|
|
41
|
+
setAttributes,
|
|
42
|
+
context,
|
|
43
|
+
clientId,
|
|
44
|
+
isSelected,
|
|
45
|
+
} ) => {
|
|
46
|
+
const { id, src, album, artist, image, length, title } = attributes;
|
|
48
47
|
const [ temporaryURL, setTemporaryURL ] = useState( attributes.blob );
|
|
49
48
|
const showArtists = context?.showArtists;
|
|
50
|
-
const currentTrack = context?.currentTrack;
|
|
51
49
|
const imageButton = useRef();
|
|
52
50
|
const blockProps = useBlockProps();
|
|
51
|
+
const { currentTrackClientId, setCurrentTrackClientId } =
|
|
52
|
+
useContext( PlaylistContext );
|
|
53
53
|
const { createErrorNotice } = useDispatch( noticesStore );
|
|
54
54
|
function onUploadError( message ) {
|
|
55
55
|
createErrorNotice( message, { type: 'snackbar' } );
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
useEffect( () => {
|
|
59
|
+
if ( isSelected && currentTrackClientId !== clientId ) {
|
|
60
|
+
setCurrentTrackClientId( clientId );
|
|
61
|
+
}
|
|
62
|
+
}, [
|
|
63
|
+
isSelected,
|
|
64
|
+
clientId,
|
|
65
|
+
currentTrackClientId,
|
|
66
|
+
setCurrentTrackClientId,
|
|
67
|
+
] );
|
|
68
|
+
|
|
58
69
|
useUploadMediaFromBlobURL( {
|
|
59
70
|
src: temporaryURL,
|
|
60
71
|
allowedTypes: ALLOWED_MEDIA_TYPES,
|
|
@@ -69,7 +80,6 @@ const PlaylistTrackEdit = ( { attributes, setAttributes, context } ) => {
|
|
|
69
80
|
setAttributes( {
|
|
70
81
|
blob: undefined,
|
|
71
82
|
id: undefined,
|
|
72
|
-
uniqueId: undefined,
|
|
73
83
|
artist: undefined,
|
|
74
84
|
album: undefined,
|
|
75
85
|
image: undefined,
|
|
@@ -89,7 +99,6 @@ const PlaylistTrackEdit = ( { attributes, setAttributes, context } ) => {
|
|
|
89
99
|
setAttributes( {
|
|
90
100
|
blob: undefined,
|
|
91
101
|
id: media.id,
|
|
92
|
-
uniqueId: uuid(),
|
|
93
102
|
src: media.url,
|
|
94
103
|
artist:
|
|
95
104
|
media.artist ||
|
|
@@ -228,9 +237,9 @@ const PlaylistTrackEdit = ( { attributes, setAttributes, context } ) => {
|
|
|
228
237
|
{ !! temporaryURL && <Spinner /> }
|
|
229
238
|
<button
|
|
230
239
|
className="wp-block-playlist-track__button"
|
|
231
|
-
|
|
240
|
+
onClick={ () => setCurrentTrackClientId( clientId ) }
|
|
232
241
|
aria-current={
|
|
233
|
-
|
|
242
|
+
currentTrackClientId === clientId ? 'true' : 'false'
|
|
234
243
|
}
|
|
235
244
|
>
|
|
236
245
|
<span className="wp-block-playlist-track__content">
|
|
@@ -21,19 +21,12 @@ function render_block_core_playlist_track( $attributes ) {
|
|
|
21
21
|
|
|
22
22
|
$wrapper_attributes = get_block_wrapper_attributes();
|
|
23
23
|
|
|
24
|
-
$
|
|
25
|
-
$
|
|
26
|
-
$
|
|
27
|
-
$title = isset( $attributes['title'] ) && ! empty( $attributes['title'] ) ? $attributes['title'] : __( 'Unknown title' );
|
|
28
|
-
|
|
29
|
-
$context = wp_interactivity_data_wp_context(
|
|
30
|
-
array(
|
|
31
|
-
'uniqueId' => $unique_id,
|
|
32
|
-
)
|
|
33
|
-
);
|
|
24
|
+
$artist = $attributes['artist'] ?? '';
|
|
25
|
+
$length = $attributes['length'] ?? '';
|
|
26
|
+
$title = isset( $attributes['title'] ) && ! empty( $attributes['title'] ) ? $attributes['title'] : __( 'Unknown title' );
|
|
34
27
|
|
|
35
28
|
$html = '<li ' . $wrapper_attributes . '>';
|
|
36
|
-
$html .= '<button
|
|
29
|
+
$html .= '<button data-wp-on--click="actions.changeTrack" data-wp-bind--aria-current="state.isCurrentTrack" class="wp-block-playlist-track__button">';
|
|
37
30
|
|
|
38
31
|
$html .= '<span class="wp-block-playlist-track__content">';
|
|
39
32
|
if ( $title ) {
|
package/src/post-author/edit.js
CHANGED
|
@@ -107,7 +107,6 @@ function AuthorCombobox( { value, onChange } ) {
|
|
|
107
107
|
|
|
108
108
|
return (
|
|
109
109
|
<ComboboxControl
|
|
110
|
-
__next40pxDefaultSize
|
|
111
110
|
label={ __( 'Author' ) }
|
|
112
111
|
options={ authorOptions }
|
|
113
112
|
value={ value?.id }
|
|
@@ -268,7 +267,6 @@ function PostAuthorEdit( {
|
|
|
268
267
|
}
|
|
269
268
|
>
|
|
270
269
|
<SelectControl
|
|
271
|
-
__next40pxDefaultSize
|
|
272
270
|
label={ __( 'Avatar size' ) }
|
|
273
271
|
value={ avatarSize }
|
|
274
272
|
options={ avatarSizes }
|
package/src/post-excerpt/edit.js
CHANGED
|
@@ -145,7 +145,6 @@ export default function PostNavigationLinkEdit( {
|
|
|
145
145
|
onDeselect={ () => setAttributes( { arrow: 'none' } ) }
|
|
146
146
|
>
|
|
147
147
|
<ToggleGroupControl
|
|
148
|
-
__next40pxDefaultSize
|
|
149
148
|
label={ __( 'Arrow' ) }
|
|
150
149
|
value={ arrow }
|
|
151
150
|
onChange={ ( value ) => {
|
|
@@ -183,7 +182,6 @@ export default function PostNavigationLinkEdit( {
|
|
|
183
182
|
</InspectorControls>
|
|
184
183
|
<InspectorControls group="advanced">
|
|
185
184
|
<SelectControl
|
|
186
|
-
__next40pxDefaultSize
|
|
187
185
|
label={ __( 'Filter by taxonomy' ) }
|
|
188
186
|
value={ taxonomy }
|
|
189
187
|
options={ getTaxonomyOptions() }
|
|
@@ -218,7 +218,6 @@ export default function QueryInspectorControls( props ) {
|
|
|
218
218
|
>
|
|
219
219
|
<VStack spacing={ 4 }>
|
|
220
220
|
<ToggleGroupControl
|
|
221
|
-
__next40pxDefaultSize
|
|
222
221
|
label={ __( 'Query type' ) }
|
|
223
222
|
isBlock
|
|
224
223
|
onChange={ ( value ) => {
|
|
@@ -269,7 +268,6 @@ export default function QueryInspectorControls( props ) {
|
|
|
269
268
|
>
|
|
270
269
|
{ postTypesSelectOptions.length > 2 ? (
|
|
271
270
|
<SelectControl
|
|
272
|
-
__next40pxDefaultSize
|
|
273
271
|
options={ postTypesSelectOptions }
|
|
274
272
|
value={ postType }
|
|
275
273
|
label={ postTypeControlLabel }
|
|
@@ -278,7 +276,6 @@ export default function QueryInspectorControls( props ) {
|
|
|
278
276
|
/>
|
|
279
277
|
) : (
|
|
280
278
|
<ToggleGroupControl
|
|
281
|
-
__next40pxDefaultSize
|
|
282
279
|
isBlock
|
|
283
280
|
value={ postType }
|
|
284
281
|
label={ postTypeControlLabel }
|