@wordpress/block-library 10.1.0 → 10.2.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 +18 -0
- package/build/accordion/block.json +1 -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/button/edit.cjs +18 -8
- package/build/button/edit.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/block.json +11 -0
- package/build/cover/edit/block-controls.cjs +11 -4
- package/build/cover/edit/block-controls.cjs.map +2 -2
- package/build/cover/edit/embed-video-url-input.cjs +5 -3
- package/build/cover/edit/embed-video-url-input.cjs.map +3 -3
- package/build/cover/edit/index.cjs +1 -1
- package/build/cover/edit/index.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/cover/embed-video-utils.cjs +17 -7
- package/build/cover/embed-video-utils.cjs.map +2 -2
- package/build/details/transforms.cjs +1 -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 -21
- package/build/embed/embed-placeholder.cjs.map +3 -3
- package/build/file/edit.cjs +4 -3
- package/build/file/edit.cjs.map +2 -2
- package/build/file/inspector.cjs +0 -2
- package/build/file/inspector.cjs.map +2 -2
- package/build/file/transforms.cjs +25 -60
- package/build/file/transforms.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 +8 -3
- 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 +286 -206
- 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/gap-styles.cjs +49 -13
- package/build/gallery/gap-styles.cjs.map +3 -3
- 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/icon/components/custom-inserter/icon-grid.cjs +25 -12
- package/build/icon/components/custom-inserter/icon-grid.cjs.map +2 -2
- package/build/icon/components/custom-inserter/index.cjs +100 -31
- package/build/icon/components/custom-inserter/index.cjs.map +3 -3
- package/build/icon/edit.cjs +11 -12
- package/build/icon/edit.cjs.map +2 -2
- package/build/image/block.json +1 -1
- package/build/image/image.cjs +23 -70
- package/build/image/image.cjs.map +3 -3
- package/build/image/transforms.cjs +78 -0
- package/build/image/transforms.cjs.map +3 -3
- package/build/index.cjs +18 -8
- 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 +67 -84
- 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/list-item/edit.cjs +1 -1
- package/build/list-item/edit.cjs.map +2 -2
- package/build/list-item/hooks/use-enter.cjs +14 -17
- package/build/list-item/hooks/use-enter.cjs.map +3 -3
- package/build/list-item/hooks/use-space.cjs +3 -2
- package/build/list-item/hooks/use-space.cjs.map +3 -3
- 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/paragraph/block.json +1 -0
- package/build/paragraph/use-enter.cjs +3 -7
- package/build/paragraph/use-enter.cjs.map +3 -3
- package/build/playlist/block.json +28 -15
- package/build/playlist/context.cjs +36 -0
- package/build/playlist/context.cjs.map +7 -0
- package/build/playlist/edit.cjs +257 -81
- package/build/playlist/edit.cjs.map +3 -3
- package/build/playlist/index.cjs +1 -1
- package/build/playlist/index.cjs.map +2 -2
- package/build/playlist/utils.cjs +19 -8
- package/build/playlist/utils.cjs.map +3 -3
- package/build/playlist/view.cjs +87 -17
- package/build/playlist/view.cjs.map +2 -2
- package/build/playlist-track/block.json +4 -5
- package/build/playlist-track/edit.cjs +114 -70
- 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-content/block.json +1 -0
- 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/post-template/block.json +2 -1
- package/build/post-template/edit.cjs +10 -1
- package/build/post-template/edit.cjs.map +2 -2
- package/build/pullquote/block.json +3 -1
- package/build/query/block.json +3 -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 +38 -7
- package/build/query/edit/inspector-controls/index.cjs.map +2 -2
- package/build/query/edit/inspector-controls/offset-controls.cjs +0 -1
- package/build/query/edit/inspector-controls/offset-controls.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/pages-control.cjs +0 -1
- package/build/query/edit/inspector-controls/pages-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/edit/query-content.cjs +10 -3
- package/build/query/edit/query-content.cjs.map +2 -2
- package/build/query/index.cjs +2 -1
- package/build/query/index.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/block.json +3 -1
- package/build/quote/transforms.cjs +1 -7
- package/build/quote/transforms.cjs.map +2 -2
- package/build/rss/edit.cjs +0 -4
- 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 +5 -4
- package/build/tab-list/edit.cjs +95 -54
- 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/block.json +1 -6
- package/build/tab-panel/controls.cjs +2 -4
- package/build/tab-panel/controls.cjs.map +3 -3
- package/build/tab-panel/edit.cjs +15 -15
- package/build/tab-panel/edit.cjs.map +2 -2
- package/build/tab-panels/block.json +0 -1
- 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/block.json +0 -5
- package/build/tabs/edit.cjs +6 -41
- 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 +23 -5
- 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/term-name/block.json +1 -3
- package/build/term-name/deprecated.cjs +105 -0
- package/build/term-name/deprecated.cjs.map +7 -0
- package/build/term-name/edit.cjs +11 -37
- package/build/term-name/edit.cjs.map +3 -3
- package/build/term-name/index.cjs +3 -1
- package/build/term-name/index.cjs.map +3 -3
- 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/waveform-player.cjs +138 -22
- package/build/utils/waveform-player.cjs.map +2 -2
- package/build/utils/waveform-utils.cjs +315 -17
- package/build/utils/waveform-utils.cjs.map +2 -2
- 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 +17 -1
- package/build/video/edit.cjs.map +2 -2
- 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/block.json +1 -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/button/edit.mjs +19 -14
- package/build-module/button/edit.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/block.json +11 -0
- package/build-module/cover/edit/block-controls.mjs +11 -4
- package/build-module/cover/edit/block-controls.mjs.map +2 -2
- package/build-module/cover/edit/embed-video-url-input.mjs +5 -4
- package/build-module/cover/edit/embed-video-url-input.mjs.map +2 -2
- package/build-module/cover/edit/index.mjs +1 -1
- package/build-module/cover/edit/index.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/cover/embed-video-utils.mjs +16 -7
- package/build-module/cover/embed-video-utils.mjs.map +2 -2
- package/build-module/details/transforms.mjs +2 -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 -24
- package/build-module/embed/embed-placeholder.mjs.map +2 -2
- package/build-module/file/edit.mjs +4 -3
- package/build-module/file/edit.mjs.map +2 -2
- package/build-module/file/inspector.mjs +0 -2
- package/build-module/file/inspector.mjs.map +2 -2
- package/build-module/file/transforms.mjs +25 -60
- package/build-module/file/transforms.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 +8 -3
- 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 +291 -209
- 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/gap-styles.mjs +53 -14
- package/build-module/gallery/gap-styles.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 +4 -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/icon/components/custom-inserter/icon-grid.mjs +25 -12
- package/build-module/icon/components/custom-inserter/icon-grid.mjs.map +2 -2
- package/build-module/icon/components/custom-inserter/index.mjs +102 -33
- package/build-module/icon/components/custom-inserter/index.mjs.map +2 -2
- package/build-module/icon/edit.mjs +11 -12
- package/build-module/icon/edit.mjs.map +2 -2
- package/build-module/image/block.json +1 -1
- package/build-module/image/image.mjs +23 -71
- package/build-module/image/image.mjs.map +2 -2
- package/build-module/image/transforms.mjs +78 -0
- package/build-module/image/transforms.mjs.map +2 -2
- package/build-module/index.mjs +18 -8
- 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 +67 -85
- 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/list-item/edit.mjs +1 -1
- package/build-module/list-item/edit.mjs.map +2 -2
- package/build-module/list-item/hooks/use-enter.mjs +15 -21
- package/build-module/list-item/hooks/use-enter.mjs.map +2 -2
- package/build-module/list-item/hooks/use-space.mjs +4 -6
- package/build-module/list-item/hooks/use-space.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/paragraph/block.json +1 -0
- package/build-module/paragraph/use-enter.mjs +4 -11
- package/build-module/paragraph/use-enter.mjs.map +2 -2
- package/build-module/playlist/block.json +28 -15
- package/build-module/playlist/context.mjs +11 -0
- package/build-module/playlist/context.mjs.map +7 -0
- package/build-module/playlist/edit.mjs +262 -84
- package/build-module/playlist/edit.mjs.map +2 -2
- package/build-module/playlist/index.mjs +1 -1
- package/build-module/playlist/index.mjs.map +2 -2
- package/build-module/playlist/utils.mjs +17 -7
- package/build-module/playlist/utils.mjs.map +2 -2
- package/build-module/playlist/view.mjs +93 -18
- package/build-module/playlist/view.mjs.map +2 -2
- package/build-module/playlist-track/block.json +4 -5
- package/build-module/playlist-track/edit.mjs +117 -72
- 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-content/block.json +1 -0
- 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/post-template/block.json +2 -1
- package/build-module/post-template/edit.mjs +10 -1
- package/build-module/post-template/edit.mjs.map +2 -2
- package/build-module/pullquote/block.json +3 -1
- package/build-module/query/block.json +3 -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 +40 -8
- package/build-module/query/edit/inspector-controls/index.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/offset-controls.mjs +0 -1
- package/build-module/query/edit/inspector-controls/offset-controls.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/pages-control.mjs +0 -1
- package/build-module/query/edit/inspector-controls/pages-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/edit/query-content.mjs +10 -3
- package/build-module/query/edit/query-content.mjs.map +2 -2
- package/build-module/query/index.mjs +2 -1
- package/build-module/query/index.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/block.json +3 -1
- package/build-module/quote/transforms.mjs +6 -8
- package/build-module/quote/transforms.mjs.map +2 -2
- package/build-module/rss/edit.mjs +0 -4
- 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 +5 -4
- package/build-module/tab-list/edit.mjs +102 -56
- 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/block.json +1 -6
- package/build-module/tab-panel/controls.mjs +2 -4
- package/build-module/tab-panel/controls.mjs.map +2 -2
- package/build-module/tab-panel/edit.mjs +16 -16
- package/build-module/tab-panel/edit.mjs.map +2 -2
- package/build-module/tab-panels/block.json +0 -1
- 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/block.json +0 -5
- package/build-module/tabs/edit.mjs +7 -47
- 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 +25 -7
- 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/term-name/block.json +1 -3
- package/build-module/term-name/deprecated.mjs +74 -0
- package/build-module/term-name/deprecated.mjs.map +7 -0
- package/build-module/term-name/edit.mjs +11 -28
- package/build-module/term-name/edit.mjs.map +2 -2
- package/build-module/term-name/index.mjs +3 -1
- package/build-module/term-name/index.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/waveform-player.mjs +144 -23
- package/build-module/utils/waveform-player.mjs.map +2 -2
- package/build-module/utils/waveform-utils.mjs +310 -16
- package/build-module/utils/waveform-utils.mjs.map +2 -2
- 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 +17 -1
- package/build-module/video/edit.mjs.map +2 -2
- 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 +84 -24
- package/build-style/editor.css +84 -24
- 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/icon/editor-rtl.css +80 -7
- package/build-style/icon/editor.css +80 -7
- 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/more/editor-rtl.css +2 -2
- package/build-style/more/editor.css +2 -2
- package/build-style/navigation/editor-rtl.css +9 -4
- package/build-style/navigation/editor.css +9 -4
- package/build-style/navigation/style-rtl.css +6 -0
- package/build-style/navigation/style.css +6 -0
- package/build-style/navigation-link/editor-rtl.css +1 -1
- package/build-style/navigation-link/editor.css +1 -1
- package/build-style/navigation-submenu/editor-rtl.css +6 -0
- package/build-style/navigation-submenu/editor.css +6 -0
- 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 +6 -0
- package/build-style/page-list/editor.css +6 -0
- package/build-style/playlist/editor-rtl.css +6 -0
- package/build-style/playlist/editor.css +6 -0
- package/build-style/playlist/style-rtl.css +158 -20
- package/build-style/playlist/style.css +158 -20
- package/build-style/playlist-track/style-rtl.css +10 -0
- package/build-style/playlist-track/style.css +10 -0
- 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 +192 -39
- package/build-style/style.css +192 -39
- 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/editor-rtl.css +1 -1
- package/build-style/video/editor.css +1 -1
- 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/build-types/table-of-contents/list.d.ts +1 -1
- package/build-types/table-of-contents/list.d.ts.map +1 -1
- package/package.json +48 -44
- package/src/accordion/README.md +2 -1
- package/src/accordion/block.json +1 -0
- 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/button/edit.js +21 -15
- 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/README.md +60 -0
- package/src/cover/block.json +11 -0
- package/src/cover/edit/block-controls.js +21 -11
- package/src/cover/edit/embed-video-url-input.js +5 -4
- package/src/cover/edit/index.js +9 -11
- package/src/cover/edit/inspector-controls.js +0 -2
- package/src/cover/embed-video-utils.js +38 -13
- package/src/cover/test/edit.js +4 -4
- package/src/details/transforms.js +2 -2
- package/src/embed/edit.js +4 -5
- package/src/embed/embed-placeholder.js +16 -20
- package/src/file/edit.js +8 -8
- package/src/file/inspector.js +0 -2
- package/src/file/transforms.js +28 -60
- 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 +4 -1
- package/src/gallery/block.json +8 -3
- package/src/gallery/dynamic-gallery.js +384 -0
- package/src/gallery/dynamic-source.js +117 -0
- package/src/gallery/edit.js +155 -49
- package/src/gallery/editor.scss +32 -4
- package/src/gallery/gallery.js +0 -7
- package/src/gallery/gap-styles.js +79 -20
- package/src/gallery/index.js +2 -0
- package/src/gallery/index.php +379 -42
- 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 +4 -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/components/custom-inserter/icon-grid.js +40 -11
- package/src/icon/components/custom-inserter/index.js +98 -25
- package/src/icon/edit.js +11 -17
- package/src/icon/editor.scss +33 -8
- package/src/icon/index.php +38 -45
- package/src/image/README.md +1 -1
- package/src/image/block.json +1 -1
- package/src/image/editor.scss +11 -0
- package/src/image/image.js +105 -169
- package/src/image/style.scss +0 -1
- package/src/image/test/use-open-image-media-editor-modal.js +19 -4
- package/src/image/transforms.js +128 -0
- package/src/index.js +19 -9
- 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 +38 -53
- package/src/latest-posts/index.php +60 -19
- 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/list-item/edit.js +1 -1
- package/src/list-item/hooks/use-enter.js +15 -22
- package/src/list-item/hooks/use-space.js +4 -6
- package/src/media-text/edit.js +0 -1
- package/src/media-text/editor.scss +1 -0
- package/src/missing/edit.js +1 -3
- package/src/more/editor.scss +1 -1
- 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/editor.scss +1 -2
- package/src/navigation-link/editor.scss +1 -1
- package/src/navigation-link/index.php +6 -3
- 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/navigation-submenu/index.php +6 -3
- package/src/nextpage/editor.scss +1 -1
- package/src/page-list/edit.js +0 -1
- package/src/page-list/index.php +1 -1
- package/src/paragraph/README.md +1 -0
- package/src/paragraph/block.json +1 -0
- package/src/paragraph/use-enter.js +4 -11
- package/src/playlist/README.md +17 -20
- package/src/playlist/block.json +28 -15
- package/src/playlist/context.js +9 -0
- package/src/playlist/edit.js +298 -97
- package/src/playlist/editor.scss +6 -0
- package/src/playlist/index.js +1 -1
- package/src/playlist/index.php +91 -36
- package/src/playlist/style.scss +51 -6
- package/src/playlist/test/edit.js +13 -12
- package/src/playlist/utils.js +24 -12
- package/src/playlist/view.js +101 -20
- package/src/playlist-track/README.md +3 -5
- package/src/playlist-track/block.json +4 -5
- package/src/playlist-track/edit.js +116 -83
- package/src/playlist-track/index.php +24 -17
- package/src/playlist-track/style.scss +10 -0
- package/src/playlist-track/test/edit.js +169 -0
- package/src/post-author/edit.js +0 -2
- package/src/post-content/README.md +1 -0
- package/src/post-content/block.json +1 -0
- 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/post-template/README.md +1 -0
- package/src/post-template/block.json +2 -1
- package/src/post-template/edit.js +9 -0
- package/src/pullquote/README.md +1 -0
- package/src/pullquote/block.json +3 -1
- package/src/query/README.md +2 -1
- package/src/query/block.json +3 -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 +43 -6
- package/src/query/edit/inspector-controls/offset-controls.js +0 -1
- package/src/query/edit/inspector-controls/order-control.js +0 -1
- package/src/query/edit/inspector-controls/pages-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/edit/query-content.js +19 -3
- package/src/query/index.js +1 -0
- package/src/query-pagination/query-pagination-arrow-controls.js +0 -1
- package/src/query-pagination-numbers/edit.js +0 -1
- package/src/quote/README.md +1 -0
- package/src/quote/block.json +3 -1
- package/src/quote/transforms.js +6 -8
- package/src/rss/edit.js +0 -4
- package/src/rss/index.php +1 -1
- 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/README.md +4 -5
- package/src/tab-list/block.json +5 -4
- package/src/tab-list/edit.js +133 -73
- package/src/tab-list/index.php +9 -4
- package/src/tab-list/save.js +5 -4
- package/src/tab-panel/README.md +4 -6
- package/src/tab-panel/block.json +1 -6
- package/src/tab-panel/controls.js +2 -4
- package/src/tab-panel/edit.js +19 -24
- package/src/tab-panels/README.md +5 -3
- package/src/tab-panels/block.json +0 -1
- package/src/tab-panels/edit.js +2 -4
- package/src/table-of-contents/edit.js +0 -1
- package/src/tabs/README.md +18 -9
- package/src/tabs/block.json +0 -5
- package/src/tabs/edit.js +8 -65
- 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 +31 -12
- 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/template-part/index.php +1 -16
- package/src/term-name/README.md +1 -1
- package/src/term-name/block.json +1 -3
- package/src/term-name/deprecated.js +74 -0
- package/src/term-name/edit.js +2 -18
- package/src/term-name/index.js +2 -0
- 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/media-control.scss +1 -5
- package/src/utils/test/waveform-player.js +297 -38
- package/src/utils/test/waveform-utils.js +410 -9
- package/src/utils/waveform-player.js +189 -59
- package/src/utils/waveform-utils.js +443 -40
- 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 +30 -1
- package/src/video/editor.scss +1 -1
- 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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/gallery/dynamic-source.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Source discriminator for \"images attached to the post\" — the only dynamic\n * source implemented so far. Kept as a named constant since it's referenced from\n * several call sites (the query builder, the descriptor, and the entry points\n * that switch a gallery into dynamic mode).\n */\nexport const ATTACHED_MEDIA = 'core/attached-media';\n\n/**\n * Default ordering for a dynamic source. `menu_order` (the manual media-library\n * order) is intentionally not used: it isn't a valid `orderby` value on the\n * media REST endpoint, so the editor preview couldn't reproduce it. Both the\n * editor query and the server resolver default to the same REST-supported order\n * so the preview matches the frontend.\n */\nexport const DEFAULT_ORDERBY = 'date';\nexport const DEFAULT_ORDER = 'desc';\n\n/**\n * Per-source copy, keyed by the `source` discriminator in a gallery's\n * `dynamicContent`. Adding a dynamic source means adding an entry here; the\n * editor components read these strings instead of hardcoding source-specific\n * wording. The fields also map onto a future \"Choose source\" control: `title`\n * becomes an option label, `description` its help text, and `emptyMessage` the\n * canvas preview when the source resolves to nothing.\n */\nconst DYNAMIC_SOURCES = {\n\t[ ATTACHED_MEDIA ]: {\n\t\t// Short label for the entry affordance / future source chooser. Mirrors\n\t\t// the \"Attached images\" media inserter category name.\n\t\ttitle: __( 'Use attached images' ),\n\t\t// Help text shown beneath the Source controls.\n\t\tdescription: __( 'Images attached to the post.' ),\n\t\t// Empty-state copy for the canvas preview.\n\t\temptyMessage: __( 'Images attached to the post will appear here.' ),\n\t},\n};\n\n/**\n * Returns the descriptor for a dynamic source, or `undefined` for an unknown or\n * not-yet-implemented source.\n *\n * @param {?string} source The `dynamicContent.source` discriminator.\n * @return {?Object} The source descriptor (`title`, `description`, `emptyMessage`).\n */\nexport function getDynamicSource( source ) {\n\treturn DYNAMIC_SOURCES[ source ];\n}\n\n/**\n * Upper bound on the number of images a dynamic source resolves, until the\n * gallery supports pagination. Kept in sync with the `posts_per_page` cap in\n * `block_core_gallery_resolve_dynamic_source()`.\n */\nexport const MAX_IMAGES = 100;\n\n/**\n * Maps a gallery's `dynamicContent` attribute to a query for the `attachment`\n * entity (i.e. `/wp/v2/media` collection params), used to resolve the source to\n * a list of media in the editor.\n *\n * The `source` key is the dispatch discriminator and `args` holds the\n * source's parameters. This `{ source, args }` shape mirrors the Block\n * Bindings metadata shape (`metadata.bindings.<key> = { source, args }`) so\n * dynamic mode can migrate to an `innerBlocks` binding with minimal change.\n * `args` keys are camelCase (the block-attribute convention, as used by the\n * Query block's `query` attribute); each source's resolver maps them to the\n * REST/transport names it needs. `core/attached-media` is a context-relative anchor\n * resolved here to the REST `parent` param. The server-side counterpart is\n * `block_core_gallery_resolve_dynamic_source()` in `index.php`.\n *\n * @param {Object} dynamicContent The gallery's `dynamicContent` attribute.\n * @param {Object} context Resolution context.\n * @param {number} context.postId The current post ID.\n * @return {Object|null} A `getEntityRecords` query, or `null` when the source\n * cannot be resolved (unknown source or missing context).\n */\nexport function getSourceQuery( dynamicContent, { postId } ) {\n\tconst { source, args = {} } = dynamicContent ?? {};\n\n\tswitch ( source ) {\n\t\tcase ATTACHED_MEDIA:\n\t\t\tif ( ! postId ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tparent: postId,\n\t\t\t\tper_page: MAX_IMAGES,\n\t\t\t\t// The gallery only accepts images, so constrain the source to\n\t\t\t\t// image media (matching the server resolver). This keeps the\n\t\t\t\t// editor preview in step with the rendered output for posts\n\t\t\t\t// that also have non-image attachments.\n\t\t\t\tmedia_type: 'image',\n\t\t\t\t// Map the camelCase `args` to the REST-named media collection\n\t\t\t\t// params. Unexpected values (only reachable via hand-edited\n\t\t\t\t// markup) are coerced back to the defaults — mirroring the server\n\t\t\t\t// resolver's allow list — so the editor preview stays in step with\n\t\t\t\t// the frontend instead of issuing an invalid REST query.\n\t\t\t\torderby:\n\t\t\t\t\targs.orderBy === 'date' || args.orderBy === 'title'\n\t\t\t\t\t\t? args.orderBy\n\t\t\t\t\t\t: DEFAULT_ORDERBY,\n\t\t\t\torder:\n\t\t\t\t\targs.order === 'asc' || args.order === 'desc'\n\t\t\t\t\t\t? args.order\n\t\t\t\t\t\t: DEFAULT_ORDER,\n\t\t\t};\n\t}\n\n\t// Unknown or not-yet-implemented source.\n\treturn null;\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,UAAU;AAQZ,IAAM,iBAAiB;AASvB,IAAM,kBAAkB;AACxB,IAAM,gBAAgB;AAU7B,IAAM,kBAAkB;AAAA,EACvB,CAAE,cAAe,GAAG;AAAA;AAAA;AAAA,IAGnB,OAAO,GAAI,qBAAsB;AAAA;AAAA,IAEjC,aAAa,GAAI,8BAA+B;AAAA;AAAA,IAEhD,cAAc,GAAI,+CAAgD;AAAA,EACnE;AACD;AASO,SAAS,iBAAkB,QAAS;AAC1C,SAAO,gBAAiB,MAAO;AAChC;AAOO,IAAM,aAAa;AAuBnB,SAAS,eAAgB,gBAAgB,EAAE,OAAO,GAAI;AAC5D,QAAM,EAAE,QAAQ,OAAO,CAAC,EAAE,IAAI,kBAAkB,CAAC;AAEjD,UAAS,QAAS;AAAA,IACjB,KAAK;AACJ,UAAK,CAAE,QAAS;AACf,eAAO;AAAA,MACR;AACA,aAAO;AAAA,QACN,QAAQ;AAAA,QACR,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,QAKV,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMZ,SACC,KAAK,YAAY,UAAU,KAAK,YAAY,UACzC,KAAK,UACL;AAAA,QACJ,OACC,KAAK,UAAU,SAAS,KAAK,UAAU,SACpC,KAAK,QACL;AAAA,MACL;AAAA,EACF;AAGA,SAAO;AACR;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
11
11
|
__experimentalToggleGroupControl as ToggleGroupControl,
|
|
12
12
|
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
|
|
13
|
-
ToolbarDropdownMenu
|
|
13
|
+
ToolbarDropdownMenu,
|
|
14
|
+
Button
|
|
14
15
|
} from "@wordpress/components";
|
|
15
16
|
import {
|
|
16
17
|
store as blockEditorStore,
|
|
@@ -18,6 +19,7 @@ import {
|
|
|
18
19
|
InspectorControls,
|
|
19
20
|
useBlockProps,
|
|
20
21
|
useInnerBlocksProps,
|
|
22
|
+
useBlockEditingMode,
|
|
21
23
|
BlockControls,
|
|
22
24
|
MediaReplaceFlow,
|
|
23
25
|
useSettings
|
|
@@ -25,7 +27,6 @@ import {
|
|
|
25
27
|
import { useEffect, useMemo } from "@wordpress/element";
|
|
26
28
|
import { __, _x, sprintf } from "@wordpress/i18n";
|
|
27
29
|
import { useSelect, useDispatch } from "@wordpress/data";
|
|
28
|
-
import { View } from "@wordpress/primitives";
|
|
29
30
|
import { createBlock } from "@wordpress/blocks";
|
|
30
31
|
import { createBlobURL } from "@wordpress/blob";
|
|
31
32
|
import { store as noticesStore } from "@wordpress/notices";
|
|
@@ -55,7 +56,10 @@ import {
|
|
|
55
56
|
import useImageSizes from "./use-image-sizes.mjs";
|
|
56
57
|
import useGetNewImages from "./use-get-new-images.mjs";
|
|
57
58
|
import useGetMedia from "./use-get-media.mjs";
|
|
58
|
-
import
|
|
59
|
+
import GalleryGapCustomProperties from "./gap-styles.mjs";
|
|
60
|
+
import useDynamicGallery from "./use-dynamic-gallery.mjs";
|
|
61
|
+
import { GallerySourcePanel, GalleryDynamicView } from "./dynamic-gallery.mjs";
|
|
62
|
+
import { getDynamicSource, ATTACHED_MEDIA } from "./dynamic-source.mjs";
|
|
59
63
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
60
64
|
var MAX_COLUMNS = 8;
|
|
61
65
|
var LINK_OPTIONS = [
|
|
@@ -113,8 +117,13 @@ function GalleryEdit(props) {
|
|
|
113
117
|
clientId,
|
|
114
118
|
isSelected,
|
|
115
119
|
insertBlocksAfter,
|
|
116
|
-
isContentLocked
|
|
120
|
+
isContentLocked,
|
|
121
|
+
context,
|
|
122
|
+
__unstableLayoutClassNames: layoutClassNames
|
|
117
123
|
} = props;
|
|
124
|
+
const postId = context?.postId;
|
|
125
|
+
const postType = context?.postType;
|
|
126
|
+
const blockEditingMode = useBlockEditingMode();
|
|
118
127
|
const [lightboxSetting, defaultRatios, themeRatios, showDefaultRatios] = useSettings(
|
|
119
128
|
"blocks.core/image.lightbox",
|
|
120
129
|
"dimensions.aspectRatios.default",
|
|
@@ -125,6 +134,7 @@ function GalleryEdit(props) {
|
|
|
125
134
|
(option) => option.value !== LINK_DESTINATION_LIGHTBOX
|
|
126
135
|
) : LINK_OPTIONS;
|
|
127
136
|
const {
|
|
137
|
+
align,
|
|
128
138
|
navigationButtonType,
|
|
129
139
|
columns,
|
|
130
140
|
imageCrop,
|
|
@@ -173,9 +183,26 @@ function GalleryEdit(props) {
|
|
|
173
183
|
);
|
|
174
184
|
const imageData = useGetMedia(innerBlockImages);
|
|
175
185
|
const newImages = useGetNewImages(images, imageData);
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
186
|
+
const hasImages = !!images.length;
|
|
187
|
+
const isDynamic = !!attributes.dynamicContent;
|
|
188
|
+
const dynamic = useDynamicGallery({
|
|
189
|
+
attributes,
|
|
190
|
+
setAttributes,
|
|
191
|
+
clientId,
|
|
192
|
+
postId,
|
|
193
|
+
postType
|
|
194
|
+
});
|
|
195
|
+
const displayedImageCount = isDynamic ? dynamic.dynamicMedia.length : images.length;
|
|
196
|
+
let hasLightboxImages;
|
|
197
|
+
if (isDynamic) {
|
|
198
|
+
hasLightboxImages = linkTo === LINK_DESTINATION_LIGHTBOX;
|
|
199
|
+
} else if (lightboxSetting?.enabled) {
|
|
200
|
+
hasLightboxImages = images.filter(
|
|
201
|
+
(image) => image.attributes?.lightbox?.enabled === void 0 || image.attributes?.lightbox?.enabled === true
|
|
202
|
+
).length > 0;
|
|
203
|
+
} else {
|
|
204
|
+
hasLightboxImages = images.filter((image) => image.attributes.lightbox?.enabled).length > 0;
|
|
205
|
+
}
|
|
179
206
|
const themeOptions = themeRatios?.map(({ name, ratio }) => ({
|
|
180
207
|
label: name,
|
|
181
208
|
value: ratio
|
|
@@ -206,7 +233,7 @@ function GalleryEdit(props) {
|
|
|
206
233
|
});
|
|
207
234
|
}, [newImages]);
|
|
208
235
|
const imageSizeOptions = useImageSizes(
|
|
209
|
-
imageData,
|
|
236
|
+
isDynamic ? dynamic.dynamicMedia : imageData,
|
|
210
237
|
isSelected,
|
|
211
238
|
getSettings
|
|
212
239
|
);
|
|
@@ -438,7 +465,6 @@ function GalleryEdit(props) {
|
|
|
438
465
|
});
|
|
439
466
|
}
|
|
440
467
|
}, [linkTo]);
|
|
441
|
-
const hasImages = !!images.length;
|
|
442
468
|
const hasImageIds = hasImages && images.some((image) => !!image.id);
|
|
443
469
|
const imagesUploading = images.some(
|
|
444
470
|
(img) => !img.id && img.url?.indexOf("blob:") === 0
|
|
@@ -448,217 +474,265 @@ function GalleryEdit(props) {
|
|
|
448
474
|
disableMediaButtons: imagesUploading,
|
|
449
475
|
value: {}
|
|
450
476
|
};
|
|
451
|
-
const mediaPlaceholder = /* @__PURE__ */ jsx(
|
|
452
|
-
MediaPlaceholder,
|
|
453
|
-
{
|
|
454
|
-
handleUpload: false,
|
|
455
|
-
icon: sharedIcon,
|
|
456
|
-
labels: {
|
|
457
|
-
title: __("Gallery"),
|
|
458
|
-
instructions: PLACEHOLDER_TEXT
|
|
459
|
-
},
|
|
460
|
-
onSelect: updateImages,
|
|
461
|
-
allowedTypes: ALLOWED_MEDIA_TYPES,
|
|
462
|
-
multiple: true,
|
|
463
|
-
onError: onUploadError,
|
|
464
|
-
...mediaPlaceholderProps
|
|
465
|
-
}
|
|
466
|
-
);
|
|
467
477
|
const blockProps = useBlockProps({
|
|
468
|
-
className: clsx(
|
|
478
|
+
className: clsx(
|
|
479
|
+
className,
|
|
480
|
+
"has-nested-images",
|
|
481
|
+
// In dynamic mode there are no inner blocks and the gallery isn't
|
|
482
|
+
// rendered through the `Gallery` component, so the classes that
|
|
483
|
+
// component normally composes onto the `<figure>` (see `gallery.js`)
|
|
484
|
+
// must be added here to keep the preview's flex/crop layout matching
|
|
485
|
+
// the static gallery and the frontend.
|
|
486
|
+
isDynamic && [
|
|
487
|
+
layoutClassNames,
|
|
488
|
+
"blocks-gallery-grid",
|
|
489
|
+
{
|
|
490
|
+
[`align${align}`]: align,
|
|
491
|
+
[`columns-${columns}`]: columns !== void 0,
|
|
492
|
+
"columns-default": columns === void 0,
|
|
493
|
+
"is-cropped": imageCrop
|
|
494
|
+
}
|
|
495
|
+
]
|
|
496
|
+
)
|
|
469
497
|
});
|
|
470
498
|
const innerBlocksProps = useInnerBlocksProps(blockProps, {
|
|
471
499
|
defaultBlock: DEFAULT_BLOCK,
|
|
472
500
|
directInsert: true,
|
|
473
501
|
orientation: "horizontal",
|
|
474
|
-
renderAppender: false
|
|
502
|
+
renderAppender: false,
|
|
503
|
+
// In dynamic mode nothing may be inserted: the images are resolved from
|
|
504
|
+
// the source, not authored as inner blocks. `allowedBlocks: []` enforces
|
|
505
|
+
// this in every context — unlike `templateLock: 'all'`, it isn't relaxed
|
|
506
|
+
// to `contentOnly` by a content-locked ancestor — so it blocks insertion
|
|
507
|
+
// and drag-and-drop (via `canInsertBlockType`). It's also what opts the
|
|
508
|
+
// gallery out of the List View: a block that can't be inserted into and
|
|
509
|
+
// has no inner blocks has nothing to navigate or add (see
|
|
510
|
+
// `shouldRenderBlockListView`). This reaches the block's list settings
|
|
511
|
+
// only while the inner blocks are mounted, which is why the dynamic view
|
|
512
|
+
// still renders the (empty) inner blocks.
|
|
513
|
+
allowedBlocks: isDynamic ? EMPTY_ARRAY : void 0
|
|
475
514
|
});
|
|
476
515
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
477
|
-
if (!hasImages) {
|
|
478
|
-
return /* @__PURE__ */ jsxs(
|
|
516
|
+
if (!hasImages && !isDynamic) {
|
|
517
|
+
return /* @__PURE__ */ jsxs("div", { ...innerBlocksProps, children: [
|
|
479
518
|
innerBlocksProps.children,
|
|
480
|
-
|
|
519
|
+
/* @__PURE__ */ jsx(
|
|
520
|
+
MediaPlaceholder,
|
|
521
|
+
{
|
|
522
|
+
handleUpload: false,
|
|
523
|
+
icon: sharedIcon,
|
|
524
|
+
labels: {
|
|
525
|
+
title: __("Gallery"),
|
|
526
|
+
instructions: PLACEHOLDER_TEXT
|
|
527
|
+
},
|
|
528
|
+
onSelect: updateImages,
|
|
529
|
+
allowedTypes: ALLOWED_MEDIA_TYPES,
|
|
530
|
+
multiple: true,
|
|
531
|
+
onError: onUploadError,
|
|
532
|
+
...mediaPlaceholderProps,
|
|
533
|
+
children: blockEditingMode === "default" && /* @__PURE__ */ jsx(
|
|
534
|
+
Button,
|
|
535
|
+
{
|
|
536
|
+
__next40pxDefaultSize: true,
|
|
537
|
+
variant: "secondary",
|
|
538
|
+
onClick: dynamic.enableDynamicMode,
|
|
539
|
+
children: getDynamicSource(ATTACHED_MEDIA).title
|
|
540
|
+
}
|
|
541
|
+
)
|
|
542
|
+
}
|
|
543
|
+
)
|
|
481
544
|
] });
|
|
482
545
|
}
|
|
483
546
|
const hasLinkTo = linkTo && linkTo !== "none";
|
|
484
547
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
485
|
-
/* @__PURE__ */
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
{
|
|
509
|
-
isShownByDefault: true,
|
|
510
|
-
label: __("Columns"),
|
|
511
|
-
hasValue: () => !!columns && columns !== images.length,
|
|
512
|
-
onDeselect: () => setColumnsNumber(void 0),
|
|
513
|
-
children: /* @__PURE__ */ jsx(
|
|
514
|
-
RangeControl,
|
|
515
|
-
{
|
|
516
|
-
label: __("Columns"),
|
|
517
|
-
value: columns ? columns : defaultColumnsNumber(images.length),
|
|
518
|
-
onChange: setColumnsNumber,
|
|
519
|
-
min: 1,
|
|
520
|
-
max: Math.min(MAX_COLUMNS, images.length),
|
|
521
|
-
required: true,
|
|
522
|
-
__next40pxDefaultSize: true
|
|
523
|
-
}
|
|
524
|
-
)
|
|
525
|
-
}
|
|
526
|
-
),
|
|
527
|
-
imageSizeOptions?.length > 0 && /* @__PURE__ */ jsx(
|
|
528
|
-
ToolsPanelItem,
|
|
529
|
-
{
|
|
530
|
-
isShownByDefault: true,
|
|
531
|
-
label: __("Resolution"),
|
|
532
|
-
hasValue: () => sizeSlug !== DEFAULT_MEDIA_SIZE_SLUG,
|
|
533
|
-
onDeselect: () => updateImagesSize(DEFAULT_MEDIA_SIZE_SLUG),
|
|
534
|
-
children: /* @__PURE__ */ jsx(
|
|
535
|
-
SelectControl,
|
|
536
|
-
{
|
|
537
|
-
label: __("Resolution"),
|
|
538
|
-
help: __(
|
|
539
|
-
"Select the size of the source images."
|
|
540
|
-
),
|
|
541
|
-
value: sizeSlug,
|
|
542
|
-
options: imageSizeOptions,
|
|
543
|
-
onChange: updateImagesSize,
|
|
544
|
-
hideCancelButton: true,
|
|
545
|
-
size: "__unstable-large"
|
|
546
|
-
}
|
|
547
|
-
)
|
|
548
|
-
}
|
|
549
|
-
),
|
|
550
|
-
/* @__PURE__ */ jsx(
|
|
551
|
-
ToolsPanelItem,
|
|
552
|
-
{
|
|
553
|
-
isShownByDefault: true,
|
|
554
|
-
label: __("Crop images to fit"),
|
|
555
|
-
hasValue: () => !imageCrop,
|
|
556
|
-
onDeselect: () => setAttributes({ imageCrop: true }),
|
|
557
|
-
children: /* @__PURE__ */ jsx(
|
|
558
|
-
ToggleControl,
|
|
559
|
-
{
|
|
560
|
-
label: __("Crop images to fit"),
|
|
561
|
-
checked: !!imageCrop,
|
|
562
|
-
onChange: toggleImageCrop
|
|
563
|
-
}
|
|
564
|
-
)
|
|
565
|
-
}
|
|
566
|
-
),
|
|
567
|
-
/* @__PURE__ */ jsx(
|
|
568
|
-
ToolsPanelItem,
|
|
569
|
-
{
|
|
570
|
-
isShownByDefault: true,
|
|
571
|
-
label: __("Randomize order"),
|
|
572
|
-
hasValue: () => !!randomOrder,
|
|
573
|
-
onDeselect: () => setAttributes({ randomOrder: false }),
|
|
574
|
-
children: /* @__PURE__ */ jsx(
|
|
575
|
-
ToggleControl,
|
|
576
|
-
{
|
|
577
|
-
label: __("Randomize order"),
|
|
578
|
-
checked: !!randomOrder,
|
|
579
|
-
onChange: toggleRandomOrder
|
|
580
|
-
}
|
|
581
|
-
)
|
|
582
|
-
}
|
|
583
|
-
),
|
|
584
|
-
hasLinkTo && /* @__PURE__ */ jsx(
|
|
585
|
-
ToolsPanelItem,
|
|
586
|
-
{
|
|
587
|
-
isShownByDefault: true,
|
|
588
|
-
label: __("Open images in new tab"),
|
|
589
|
-
hasValue: () => !!linkTarget,
|
|
590
|
-
onDeselect: () => toggleOpenInNewTab(false),
|
|
591
|
-
children: /* @__PURE__ */ jsx(
|
|
592
|
-
ToggleControl,
|
|
593
|
-
{
|
|
594
|
-
label: __("Open images in new tab"),
|
|
595
|
-
checked: linkTarget === "_blank",
|
|
596
|
-
onChange: toggleOpenInNewTab
|
|
597
|
-
}
|
|
598
|
-
)
|
|
548
|
+
/* @__PURE__ */ jsxs(InspectorControls, { children: [
|
|
549
|
+
/* @__PURE__ */ jsx(
|
|
550
|
+
GallerySourcePanel,
|
|
551
|
+
{
|
|
552
|
+
dynamic,
|
|
553
|
+
dropdownMenuProps,
|
|
554
|
+
hasImages
|
|
555
|
+
}
|
|
556
|
+
),
|
|
557
|
+
/* @__PURE__ */ jsxs(
|
|
558
|
+
ToolsPanel,
|
|
559
|
+
{
|
|
560
|
+
label: __("Settings"),
|
|
561
|
+
resetAll: () => {
|
|
562
|
+
setAttributes({
|
|
563
|
+
navigationButtonType: "icon",
|
|
564
|
+
columns: void 0,
|
|
565
|
+
imageCrop: true,
|
|
566
|
+
randomOrder: false
|
|
567
|
+
});
|
|
568
|
+
setAspectRatio("auto");
|
|
569
|
+
if (sizeSlug !== DEFAULT_MEDIA_SIZE_SLUG) {
|
|
570
|
+
updateImagesSize(DEFAULT_MEDIA_SIZE_SLUG);
|
|
599
571
|
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
ToolsPanelItem,
|
|
603
|
-
{
|
|
604
|
-
hasValue: () => !!aspectRatio && aspectRatio !== "auto",
|
|
605
|
-
label: __("Aspect ratio"),
|
|
606
|
-
onDeselect: () => setAspectRatio("auto"),
|
|
607
|
-
isShownByDefault: true,
|
|
608
|
-
children: /* @__PURE__ */ jsx(
|
|
609
|
-
SelectControl,
|
|
610
|
-
{
|
|
611
|
-
__next40pxDefaultSize: true,
|
|
612
|
-
label: __("Aspect ratio"),
|
|
613
|
-
help: __(
|
|
614
|
-
"Set a consistent aspect ratio for all images in the gallery."
|
|
615
|
-
),
|
|
616
|
-
value: aspectRatio,
|
|
617
|
-
options: aspectRatioOptions,
|
|
618
|
-
onChange: setAspectRatio
|
|
619
|
-
}
|
|
620
|
-
)
|
|
572
|
+
if (linkTarget) {
|
|
573
|
+
toggleOpenInNewTab(false);
|
|
621
574
|
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
575
|
+
},
|
|
576
|
+
dropdownMenuProps,
|
|
577
|
+
children: [
|
|
578
|
+
displayedImageCount > 1 && /* @__PURE__ */ jsx(
|
|
579
|
+
ToolsPanelItem,
|
|
580
|
+
{
|
|
581
|
+
isShownByDefault: true,
|
|
582
|
+
label: __("Columns"),
|
|
583
|
+
hasValue: () => !!columns && columns !== displayedImageCount,
|
|
584
|
+
onDeselect: () => setColumnsNumber(void 0),
|
|
585
|
+
children: /* @__PURE__ */ jsx(
|
|
586
|
+
RangeControl,
|
|
587
|
+
{
|
|
588
|
+
label: __("Columns"),
|
|
589
|
+
value: columns ? columns : defaultColumnsNumber(
|
|
590
|
+
displayedImageCount
|
|
591
|
+
),
|
|
592
|
+
onChange: setColumnsNumber,
|
|
593
|
+
min: 1,
|
|
594
|
+
max: Math.min(
|
|
595
|
+
MAX_COLUMNS,
|
|
596
|
+
displayedImageCount
|
|
597
|
+
),
|
|
598
|
+
required: true
|
|
599
|
+
}
|
|
600
|
+
)
|
|
601
|
+
}
|
|
602
|
+
),
|
|
603
|
+
imageSizeOptions?.length > 0 && /* @__PURE__ */ jsx(
|
|
604
|
+
ToolsPanelItem,
|
|
605
|
+
{
|
|
606
|
+
isShownByDefault: true,
|
|
607
|
+
label: __("Resolution"),
|
|
608
|
+
hasValue: () => sizeSlug !== DEFAULT_MEDIA_SIZE_SLUG,
|
|
609
|
+
onDeselect: () => updateImagesSize(DEFAULT_MEDIA_SIZE_SLUG),
|
|
610
|
+
children: /* @__PURE__ */ jsx(
|
|
611
|
+
SelectControl,
|
|
612
|
+
{
|
|
613
|
+
label: __("Resolution"),
|
|
614
|
+
help: __(
|
|
615
|
+
"Select the size of the source images."
|
|
616
|
+
),
|
|
617
|
+
value: sizeSlug,
|
|
618
|
+
options: imageSizeOptions,
|
|
619
|
+
onChange: updateImagesSize,
|
|
620
|
+
hideCancelButton: true
|
|
621
|
+
}
|
|
622
|
+
)
|
|
623
|
+
}
|
|
624
|
+
),
|
|
625
|
+
/* @__PURE__ */ jsx(
|
|
626
|
+
ToolsPanelItem,
|
|
627
|
+
{
|
|
628
|
+
isShownByDefault: true,
|
|
629
|
+
label: __("Crop images to fit"),
|
|
630
|
+
hasValue: () => !imageCrop,
|
|
631
|
+
onDeselect: () => setAttributes({ imageCrop: true }),
|
|
632
|
+
children: /* @__PURE__ */ jsx(
|
|
633
|
+
ToggleControl,
|
|
634
|
+
{
|
|
635
|
+
label: __("Crop images to fit"),
|
|
636
|
+
checked: !!imageCrop,
|
|
637
|
+
onChange: toggleImageCrop
|
|
638
|
+
}
|
|
639
|
+
)
|
|
640
|
+
}
|
|
641
|
+
),
|
|
642
|
+
/* @__PURE__ */ jsx(
|
|
643
|
+
ToolsPanelItem,
|
|
644
|
+
{
|
|
645
|
+
isShownByDefault: true,
|
|
646
|
+
label: __("Randomize order"),
|
|
647
|
+
hasValue: () => !!randomOrder,
|
|
648
|
+
onDeselect: () => setAttributes({ randomOrder: false }),
|
|
649
|
+
children: /* @__PURE__ */ jsx(
|
|
650
|
+
ToggleControl,
|
|
651
|
+
{
|
|
652
|
+
label: __("Randomize order"),
|
|
653
|
+
checked: !!randomOrder,
|
|
654
|
+
onChange: toggleRandomOrder
|
|
655
|
+
}
|
|
656
|
+
)
|
|
657
|
+
}
|
|
658
|
+
),
|
|
659
|
+
hasLinkTo && /* @__PURE__ */ jsx(
|
|
660
|
+
ToolsPanelItem,
|
|
661
|
+
{
|
|
662
|
+
isShownByDefault: true,
|
|
663
|
+
label: __("Open images in new tab"),
|
|
664
|
+
hasValue: () => !!linkTarget,
|
|
665
|
+
onDeselect: () => toggleOpenInNewTab(false),
|
|
666
|
+
children: /* @__PURE__ */ jsx(
|
|
667
|
+
ToggleControl,
|
|
668
|
+
{
|
|
669
|
+
label: __("Open images in new tab"),
|
|
670
|
+
checked: linkTarget === "_blank",
|
|
671
|
+
onChange: toggleOpenInNewTab
|
|
672
|
+
}
|
|
673
|
+
)
|
|
674
|
+
}
|
|
675
|
+
),
|
|
676
|
+
aspectRatioOptions.length > 1 && /* @__PURE__ */ jsx(
|
|
677
|
+
ToolsPanelItem,
|
|
678
|
+
{
|
|
679
|
+
hasValue: () => !!aspectRatio && aspectRatio !== "auto",
|
|
680
|
+
label: __("Aspect ratio"),
|
|
681
|
+
onDeselect: () => setAspectRatio("auto"),
|
|
682
|
+
isShownByDefault: true,
|
|
683
|
+
children: /* @__PURE__ */ jsx(
|
|
684
|
+
SelectControl,
|
|
685
|
+
{
|
|
686
|
+
label: __("Aspect ratio"),
|
|
687
|
+
help: __(
|
|
688
|
+
"Set a consistent aspect ratio for all images in the gallery."
|
|
689
|
+
),
|
|
690
|
+
value: aspectRatio,
|
|
691
|
+
options: aspectRatioOptions,
|
|
692
|
+
onChange: setAspectRatio
|
|
693
|
+
}
|
|
694
|
+
)
|
|
695
|
+
}
|
|
696
|
+
),
|
|
697
|
+
lightboxSetting?.allowEditing && hasLightboxImages && /* @__PURE__ */ jsx(
|
|
698
|
+
ToolsPanelItem,
|
|
699
|
+
{
|
|
700
|
+
label: __("Navigation button type"),
|
|
701
|
+
isShownByDefault: true,
|
|
702
|
+
hasValue: () => navigationButtonType !== "icon",
|
|
703
|
+
onDeselect: () => setAttributes({
|
|
704
|
+
navigationButtonType: "icon"
|
|
705
|
+
}),
|
|
706
|
+
children: /* @__PURE__ */ jsx(
|
|
707
|
+
ToggleGroupControl,
|
|
708
|
+
{
|
|
709
|
+
label: __("Navigation button type"),
|
|
710
|
+
value: navigationButtonType,
|
|
711
|
+
onChange: (value) => setAttributes({
|
|
712
|
+
navigationButtonType: value
|
|
713
|
+
}),
|
|
714
|
+
isBlock: true,
|
|
715
|
+
help: __(
|
|
716
|
+
"Adjust the appearance of buttons in the lightbox."
|
|
717
|
+
),
|
|
718
|
+
children: NAVIGATION_BUTTON_TYPE_OPTIONS.map(
|
|
719
|
+
(option) => /* @__PURE__ */ jsx(
|
|
720
|
+
ToggleGroupControlOption,
|
|
721
|
+
{
|
|
722
|
+
value: option.value,
|
|
723
|
+
label: option.label
|
|
724
|
+
},
|
|
725
|
+
option.value
|
|
726
|
+
)
|
|
653
727
|
)
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
728
|
+
}
|
|
729
|
+
)
|
|
730
|
+
}
|
|
731
|
+
)
|
|
732
|
+
]
|
|
733
|
+
}
|
|
734
|
+
)
|
|
735
|
+
] }),
|
|
662
736
|
/* @__PURE__ */ jsx(BlockControls, { group: "block", children: /* @__PURE__ */ jsx(ToolbarDropdownMenu, { icon: linkIcon, label: __("Link"), children: ({ onClose }) => /* @__PURE__ */ jsx(MenuGroup, { children: linkOptions.map((linkItem) => {
|
|
663
737
|
const isOptionSelected = linkTo === linkItem.value;
|
|
664
738
|
return /* @__PURE__ */ jsx(
|
|
@@ -685,7 +759,7 @@ function GalleryEdit(props) {
|
|
|
685
759
|
);
|
|
686
760
|
}) }) }) }),
|
|
687
761
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
688
|
-
!multiGallerySelection && /* @__PURE__ */ jsx(BlockControls, { group: "other", children: /* @__PURE__ */ jsx(
|
|
762
|
+
!multiGallerySelection && !isDynamic && /* @__PURE__ */ jsx(BlockControls, { group: "other", children: /* @__PURE__ */ jsx(
|
|
689
763
|
MediaReplaceFlow,
|
|
690
764
|
{
|
|
691
765
|
allowedTypes: ALLOWED_MEDIA_TYPES,
|
|
@@ -699,20 +773,28 @@ function GalleryEdit(props) {
|
|
|
699
773
|
}
|
|
700
774
|
) }),
|
|
701
775
|
/* @__PURE__ */ jsx(
|
|
702
|
-
|
|
776
|
+
GalleryGapCustomProperties,
|
|
703
777
|
{
|
|
704
|
-
|
|
778
|
+
style: attributes.style,
|
|
705
779
|
clientId
|
|
706
780
|
}
|
|
707
781
|
)
|
|
708
782
|
] }),
|
|
709
|
-
/* @__PURE__ */ jsx(
|
|
783
|
+
isDynamic ? /* @__PURE__ */ jsx(
|
|
784
|
+
GalleryDynamicView,
|
|
785
|
+
{
|
|
786
|
+
...props,
|
|
787
|
+
dynamic,
|
|
788
|
+
blockProps,
|
|
789
|
+
innerBlocksProps,
|
|
790
|
+
multiGallerySelection
|
|
791
|
+
}
|
|
792
|
+
) : /* @__PURE__ */ jsx(
|
|
710
793
|
Gallery,
|
|
711
794
|
{
|
|
712
795
|
...props,
|
|
713
796
|
isContentLocked,
|
|
714
797
|
images,
|
|
715
|
-
mediaPlaceholder: !hasImages ? mediaPlaceholder : void 0,
|
|
716
798
|
blockProps: innerBlocksProps,
|
|
717
799
|
insertBlocksAfter,
|
|
718
800
|
multiGallerySelection
|