@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
package/build/file/edit.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/file/edit.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { isBlobURL } from '@wordpress/blob';\nimport {\n\t__unstableGetAnimateClassName as getAnimateClassName,\n\tResizableBox,\n\tToolbarButton,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockControls,\n\tBlockIcon,\n\tMediaPlaceholder,\n\tMediaReplaceFlow,\n\tRichText,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { file as icon } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { getFilename } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport FileBlockInspector from './inspector';\nimport { browserSupportsPdfs } from './utils';\nimport removeAnchorTag from '../utils/remove-anchor-tag';\nimport { useUploadMediaFromBlobURL } from '../utils/hooks';\n\nexport const MIN_PREVIEW_HEIGHT = 200;\nexport const MAX_PREVIEW_HEIGHT = 2000;\n\nfunction ClipboardToolbarButton( { text, disabled } ) {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst ref = useCopyToClipboard( text, () => {\n\t\tcreateNotice( 'info', __( 'Copied URL to clipboard.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t} );\n\n\treturn (\n\t\t<ToolbarButton\n\t\t\tclassName=\"components-clipboard-toolbar-button\"\n\t\t\tref={ ref }\n\t\t\tdisabled={ disabled }\n\t\t>\n\t\t\t{ __( 'Copy URL' ) }\n\t\t</ToolbarButton>\n\t);\n}\n\nfunction FileEdit( { attributes, isSelected, setAttributes, clientId } ) {\n\tconst {\n\t\tid,\n\t\tfileName,\n\t\thref,\n\t\ttextLinkHref,\n\t\ttextLinkTarget,\n\t\tshowDownloadButton,\n\t\tdownloadButtonText,\n\t\tdisplayPreview,\n\t\tpreviewHeight,\n\t} = attributes;\n\tconst [ temporaryURL, setTemporaryURL ] = useState( attributes.blob );\n\tconst { media } = useSelect(\n\t\t( select ) => ( {\n\t\t\tmedia
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,kBAA0B;AAC1B,wBAIO;AACP,kBAAuC;AACvC,0BASO;AACP,qBAAyB;AACzB,qBAAmC;AACnC,kBAAmB;AACnB,mBAA6B;AAC7B,uBAAmC;AACnC,qBAAsC;AACtC,iBAA4B;AAK5B,uBAA+B;AAC/B,mBAAoC;AACpC,+BAA4B;AAC5B,mBAA0C;AAexC;AAbK,IAAM,qBAAqB;AAC3B,IAAM,qBAAqB;AAElC,SAAS,uBAAwB,EAAE,MAAM,SAAS,GAAI;AACrD,QAAM,EAAE,aAAa,QAAI,yBAAa,eAAAA,KAAa;AACnD,QAAM,UAAM,mCAAoB,MAAM,MAAM;AAC3C,iBAAc,YAAQ,gBAAI,0BAA2B,GAAG;AAAA,MACvD,eAAe;AAAA,MACf,MAAM;AAAA,IACP,CAAE;AAAA,EACH,CAAE;AAEF,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV;AAAA,MACA;AAAA,MAEE,8BAAI,UAAW;AAAA;AAAA,EAClB;AAEF;AAEA,SAAS,SAAU,EAAE,YAAY,YAAY,eAAe,SAAS,GAAI;AACxE,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI;AACJ,QAAM,CAAE,cAAc,eAAgB,QAAI,yBAAU,WAAW,IAAK;AACpE,QAAM,EAAE,MAAM,QAAI;AAAA,IACjB,CAAE,YAAc;AAAA,MACf,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { isBlobURL } from '@wordpress/blob';\nimport {\n\t__unstableGetAnimateClassName as getAnimateClassName,\n\tResizableBox,\n\tToolbarButton,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockControls,\n\tBlockIcon,\n\tMediaPlaceholder,\n\tMediaReplaceFlow,\n\tRichText,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { file as icon } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { getFilename } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport FileBlockInspector from './inspector';\nimport { browserSupportsPdfs } from './utils';\nimport removeAnchorTag from '../utils/remove-anchor-tag';\nimport { useUploadMediaFromBlobURL } from '../utils/hooks';\n\nexport const MIN_PREVIEW_HEIGHT = 200;\nexport const MAX_PREVIEW_HEIGHT = 2000;\n\nfunction ClipboardToolbarButton( { text, disabled } ) {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst ref = useCopyToClipboard( text, () => {\n\t\tcreateNotice( 'info', __( 'Copied URL to clipboard.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t} );\n\n\treturn (\n\t\t<ToolbarButton\n\t\t\tclassName=\"components-clipboard-toolbar-button\"\n\t\t\tref={ ref }\n\t\t\tdisabled={ disabled }\n\t\t>\n\t\t\t{ __( 'Copy URL' ) }\n\t\t</ToolbarButton>\n\t);\n}\n\nfunction FileEdit( { attributes, isSelected, setAttributes, clientId } ) {\n\tconst {\n\t\tid,\n\t\tfileName,\n\t\thref,\n\t\ttextLinkHref,\n\t\ttextLinkTarget,\n\t\tshowDownloadButton,\n\t\tdownloadButtonText,\n\t\tdisplayPreview,\n\t\tpreviewHeight,\n\t} = attributes;\n\tconst [ temporaryURL, setTemporaryURL ] = useState( attributes.blob );\n\tconst { media } = useSelect(\n\t\t( select ) => ( {\n\t\t\tmedia: !! id\n\t\t\t\t? select( coreStore ).getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'attachment',\n\t\t\t\t\t\tid,\n\t\t\t\t\t\t{ context: 'view' }\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t} ),\n\t\t[ id ]\n\t);\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { toggleSelection } = useDispatch( blockEditorStore );\n\n\tuseUploadMediaFromBlobURL( {\n\t\turl: temporaryURL,\n\t\tonChange: onSelectFile,\n\t\tonError: onUploadError,\n\t} );\n\n\tfunction onSelectFile( newMedia ) {\n\t\tif ( ! newMedia || ! newMedia.url ) {\n\t\t\t// Reset attributes.\n\t\t\tsetAttributes( {\n\t\t\t\thref: undefined,\n\t\t\t\tfileName: undefined,\n\t\t\t\ttextLinkHref: undefined,\n\t\t\t\tid: undefined,\n\t\t\t\tfileId: undefined,\n\t\t\t\tdisplayPreview: undefined,\n\t\t\t\tpreviewHeight: undefined,\n\t\t\t} );\n\t\t\tsetTemporaryURL();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isBlobURL( newMedia.url ) ) {\n\t\t\tsetTemporaryURL( newMedia.url );\n\t\t\treturn;\n\t\t}\n\n\t\tconst isPdf =\n\t\t\t// Media Library and REST API use different properties for mime type.\n\t\t\t( newMedia.mime || newMedia.mime_type ) === 'application/pdf' ||\n\t\t\tgetFilename( newMedia.url ).toLowerCase().endsWith( '.pdf' );\n\t\tconst pdfAttributes = {\n\t\t\tdisplayPreview: isPdf\n\t\t\t\t? attributes.displayPreview ?? true\n\t\t\t\t: undefined,\n\t\t\tpreviewHeight: isPdf ? attributes.previewHeight ?? 600 : undefined,\n\t\t};\n\n\t\tsetAttributes( {\n\t\t\thref: newMedia.url,\n\t\t\tfileName: newMedia.title,\n\t\t\ttextLinkHref: newMedia.url,\n\t\t\tid: newMedia.id,\n\t\t\tfileId: `wp-block-file--media-${ clientId }`,\n\t\t\tblob: undefined,\n\t\t\t...pdfAttributes,\n\t\t} );\n\t\tsetTemporaryURL();\n\t}\n\n\tfunction onUploadError( message ) {\n\t\tsetAttributes( { href: undefined } );\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t}\n\n\tfunction changeLinkDestinationOption( newHref ) {\n\t\t// Choose Media File or Attachment Page (when file is in Media Library).\n\t\tsetAttributes( { textLinkHref: newHref } );\n\t}\n\n\tfunction changeOpenInNewWindow( newValue ) {\n\t\tsetAttributes( {\n\t\t\ttextLinkTarget: newValue ? '_blank' : false,\n\t\t} );\n\t}\n\n\tfunction changeShowDownloadButton( newValue ) {\n\t\tsetAttributes( { showDownloadButton: newValue } );\n\t}\n\n\tfunction changeDisplayPreview( newValue ) {\n\t\tsetAttributes( { displayPreview: newValue } );\n\t}\n\n\tfunction handleOnResizeStop( event, direction, elt, delta ) {\n\t\ttoggleSelection( true );\n\n\t\tconst newHeight = parseInt( previewHeight + delta.height, 10 );\n\t\tsetAttributes( { previewHeight: newHeight } );\n\t}\n\n\tfunction changePreviewHeight( newValue ) {\n\t\tconst newHeight = Math.max(\n\t\t\tparseInt( newValue, 10 ),\n\t\t\tMIN_PREVIEW_HEIGHT\n\t\t);\n\t\tsetAttributes( { previewHeight: newHeight } );\n\t}\n\n\tconst attachmentPage = media && media.link;\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx(\n\t\t\t!! temporaryURL && getAnimateClassName( { type: 'loading' } ),\n\t\t\t{\n\t\t\t\t'is-transient': !! temporaryURL,\n\t\t\t}\n\t\t),\n\t} );\n\n\tconst displayPreviewInEditor = browserSupportsPdfs() && displayPreview;\n\n\tif ( ! href && ! temporaryURL ) {\n\t\treturn (\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<MediaPlaceholder\n\t\t\t\t\ticon={ <BlockIcon icon={ icon } /> }\n\t\t\t\t\tlabels={ {\n\t\t\t\t\t\ttitle: __( 'File' ),\n\t\t\t\t\t\tinstructions: __(\n\t\t\t\t\t\t\t'Drag and drop a file, upload, or choose from your library.'\n\t\t\t\t\t\t),\n\t\t\t\t\t} }\n\t\t\t\t\tonSelect={ onSelectFile }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\taccept=\"*\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<FileBlockInspector\n\t\t\t\threfs={ {\n\t\t\t\t\thref: href || temporaryURL,\n\t\t\t\t\ttextLinkHref,\n\t\t\t\t\tattachmentPage,\n\t\t\t\t} }\n\t\t\t\t{ ...{\n\t\t\t\t\topenInNewWindow: !! textLinkTarget,\n\t\t\t\t\tshowDownloadButton,\n\t\t\t\t\tchangeLinkDestinationOption,\n\t\t\t\t\tchangeOpenInNewWindow,\n\t\t\t\t\tchangeShowDownloadButton,\n\t\t\t\t\tdisplayPreview,\n\t\t\t\t\tchangeDisplayPreview,\n\t\t\t\t\tpreviewHeight,\n\t\t\t\t\tchangePreviewHeight,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<BlockControls group=\"other\">\n\t\t\t\t<MediaReplaceFlow\n\t\t\t\t\tmediaId={ id }\n\t\t\t\t\tmediaURL={ href }\n\t\t\t\t\taccept=\"*\"\n\t\t\t\t\tonSelect={ onSelectFile }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\tonReset={ () => onSelectFile( undefined ) }\n\t\t\t\t/>\n\t\t\t\t<ClipboardToolbarButton\n\t\t\t\t\ttext={ href }\n\t\t\t\t\tdisabled={ isBlobURL( href ) }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ displayPreviewInEditor && (\n\t\t\t\t\t<ResizableBox\n\t\t\t\t\t\tsize={ { height: previewHeight, width: '100%' } }\n\t\t\t\t\t\tminHeight={ MIN_PREVIEW_HEIGHT }\n\t\t\t\t\t\tmaxHeight={ MAX_PREVIEW_HEIGHT }\n\t\t\t\t\t\t// The horizontal grid value must be 1 or else the width may snap during a\n\t\t\t\t\t\t// resize even though only vertical resizing is enabled.\n\t\t\t\t\t\tgrid={ [ 1, 10 ] }\n\t\t\t\t\t\tenable={ {\n\t\t\t\t\t\t\ttop: false,\n\t\t\t\t\t\t\tright: false,\n\t\t\t\t\t\t\tbottom: true,\n\t\t\t\t\t\t\tleft: false,\n\t\t\t\t\t\t\ttopRight: false,\n\t\t\t\t\t\t\tbottomRight: false,\n\t\t\t\t\t\t\tbottomLeft: false,\n\t\t\t\t\t\t\ttopLeft: false,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonResizeStart={ () => toggleSelection( false ) }\n\t\t\t\t\t\tonResizeStop={ handleOnResizeStop }\n\t\t\t\t\t\tshowHandle={ isSelected }\n\t\t\t\t\t>\n\t\t\t\t\t\t<object\n\t\t\t\t\t\t\tclassName=\"wp-block-file__preview\"\n\t\t\t\t\t\t\tdata={ href }\n\t\t\t\t\t\t\ttype=\"application/pdf\"\n\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t'Embed of the selected PDF file.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ ! isSelected && (\n\t\t\t\t\t\t\t<div className=\"wp-block-file__preview-overlay\" />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ResizableBox>\n\t\t\t\t) }\n\t\t\t\t<div className=\"wp-block-file__content-wrapper\">\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"fileName\"\n\t\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\t\tvalue={ fileName }\n\t\t\t\t\t\tplaceholder={ __( 'Write file name…' ) }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tonChange={ ( text ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tfileName: removeAnchorTag( text ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\thref={ textLinkHref }\n\t\t\t\t\t/>\n\t\t\t\t\t{ showDownloadButton && (\n\t\t\t\t\t\t<div className=\"wp-block-file__button-richtext-wrapper\">\n\t\t\t\t\t\t\t{ /* Using RichText here instead of PlainText so that it can be styled like a button. */ }\n\t\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\t\tidentifier=\"downloadButtonText\"\n\t\t\t\t\t\t\t\ttagName=\"div\" // Must be block-level or else cursor disappears.\n\t\t\t\t\t\t\t\taria-label={ __( 'Download button text' ) }\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t'wp-block-file__button',\n\t\t\t\t\t\t\t\t\t__experimentalGetElementClassName(\n\t\t\t\t\t\t\t\t\t\t'button'\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tvalue={ downloadButtonText }\n\t\t\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\t\t\tplaceholder={ __( 'Add text…' ) }\n\t\t\t\t\t\t\t\tonChange={ ( text ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tdownloadButtonText:\n\t\t\t\t\t\t\t\t\t\t\tremoveAnchorTag( text ),\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default FileEdit;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,kBAA0B;AAC1B,wBAIO;AACP,kBAAuC;AACvC,0BASO;AACP,qBAAyB;AACzB,qBAAmC;AACnC,kBAAmB;AACnB,mBAA6B;AAC7B,uBAAmC;AACnC,qBAAsC;A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Ed;AAAA,UAAC;AAAA;AAAA,YACA,YAAW;AAAA,YACX,SAAQ;AAAA,YACR,kBAAa,gBAAI,sBAAuB;AAAA,YACxC,eAAY,YAAAJ;AAAA,cACX;AAAA,kBACA;AAAA,gBACC;AAAA,cACD;AAAA,YACD;AAAA,YACA,OAAQ;AAAA,YACR,8BAA4B;AAAA,YAC5B,iBAAc,gBAAI,WAAY;AAAA,YAC9B,UAAW,CAAE,SACZ,cAAe;AAAA,cACd,wBACC,yBAAAI,SAAiB,IAAK;AAAA,YACxB,CAAE;AAAA;AAAA,QAEJ,GACD;AAAA,SAEF;AAAA,OACD;AAAA,KACD;AAEF;AAEA,IAAO,eAAQ;",
|
|
6
6
|
"names": ["noticesStore", "coreStore", "blockEditorStore", "clsx", "getAnimateClassName", "icon", "FileBlockInspector", "removeAnchorTag"]
|
|
7
7
|
}
|
package/build/file/inspector.cjs
CHANGED
|
@@ -91,7 +91,6 @@ function FileBlockInspector({
|
|
|
91
91
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
92
92
|
import_components.RangeControl,
|
|
93
93
|
{
|
|
94
|
-
__next40pxDefaultSize: true,
|
|
95
94
|
label: (0, import_i18n.__)("Height in pixels"),
|
|
96
95
|
min: import_edit.MIN_PREVIEW_HEIGHT,
|
|
97
96
|
max: Math.max(
|
|
@@ -128,7 +127,6 @@ function FileBlockInspector({
|
|
|
128
127
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
129
128
|
import_components.SelectControl,
|
|
130
129
|
{
|
|
131
|
-
__next40pxDefaultSize: true,
|
|
132
130
|
label: (0, import_i18n.__)("Link to"),
|
|
133
131
|
value: textLinkHref,
|
|
134
132
|
options: linkDestinationOptions,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/file/inspector.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tRangeControl,\n\tSelectControl,\n\tToggleControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { InspectorControls } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { MIN_PREVIEW_HEIGHT, MAX_PREVIEW_HEIGHT } from './edit';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nexport default function FileBlockInspector( {\n\threfs,\n\topenInNewWindow,\n\tshowDownloadButton,\n\tchangeLinkDestinationOption,\n\tchangeOpenInNewWindow,\n\tchangeShowDownloadButton,\n\tdisplayPreview,\n\tchangeDisplayPreview,\n\tpreviewHeight,\n\tchangePreviewHeight,\n} ) {\n\tconst { href, textLinkHref, attachmentPage } = hrefs;\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tlet linkDestinationOptions = [ { value: href, label: __( 'URL' ) } ];\n\tif ( attachmentPage ) {\n\t\tlinkDestinationOptions = [\n\t\t\t{ value: href, label: __( 'Media file' ) },\n\t\t\t{ value: attachmentPage, label: __( 'Attachment page' ) },\n\t\t];\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ href.endsWith( '.pdf' ) && (\n\t\t\t\t\t<ToolsPanel\n\t\t\t\t\t\tlabel={ __( 'PDF settings' ) }\n\t\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\t\tchangeDisplayPreview( true );\n\t\t\t\t\t\t\tchangePreviewHeight( 600 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Show inline embed' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => ! displayPreview }\n\t\t\t\t\t\t\tonDeselect={ () => changeDisplayPreview( true ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Show inline embed' ) }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tdisplayPreview\n\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t\"Note: Most phone and tablet browsers won't display embedded PDFs.\"\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tchecked={ !! displayPreview }\n\t\t\t\t\t\t\t\tonChange={ changeDisplayPreview }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t{ displayPreview && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\tlabel={ __( 'Height in pixels' ) }\n\t\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\t\thasValue={ () => previewHeight !== 600 }\n\t\t\t\t\t\t\t\tonDeselect={ () => changePreviewHeight( 600 ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t\t\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,wBAMO;AACP,0BAAkC;AAKlC,kBAAuD;AACvD,mBAA+C;AA0B7C;AAxBa,SAAR,mBAAqC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,EAAE,MAAM,cAAc,eAAe,IAAI;AAC/C,QAAM,wBAAoB,6CAA+B;AAEzD,MAAI,yBAAyB,CAAE,EAAE,OAAO,MAAM,WAAO,gBAAI,KAAM,EAAE,CAAE;AACnE,MAAK,gBAAiB;AACrB,6BAAyB;AAAA,MACxB,EAAE,OAAO,MAAM,WAAO,gBAAI,YAAa,EAAE;AAAA,MACzC,EAAE,OAAO,gBAAgB,WAAO,gBAAI,iBAAkB,EAAE;AAAA,IACzD;AAAA,EACD;AAEA,SACC,2EACC,uDAAC,yCACE;AAAA,SAAK,SAAU,MAAO,KACvB;AAAA,MAAC,kBAAAA;AAAA,MAAA;AAAA,QACA,WAAQ,gBAAI,cAAe;AAAA,QAC3B,UAAW,MAAM;AAChB,+BAAsB,IAAK;AAC3B,8BAAqB,GAAI;AAAA,QAC1B;AAAA,QACA;AAAA,QAEA;AAAA;AAAA,YAAC,kBAAAC;AAAA,YAAA;AAAA,cACA,WAAQ,gBAAI,mBAAoB;AAAA,cAChC,kBAAgB;AAAA,cAChB,UAAW,MAAM,CAAE;AAAA,cACnB,YAAa,MAAM,qBAAsB,IAAK;AAAA,cAE9C;AAAA,gBAAC;AAAA;AAAA,kBACA,WAAQ,gBAAI,mBAAoB;AAAA,kBAChC,MACC,qBACG;AAAA,oBACA;AAAA,kBACA,IACA;AAAA,kBAEJ,SAAU,CAAC,CAAE;AAAA,kBACb,UAAW;AAAA;AAAA,cACZ;AAAA;AAAA,UACD;AAAA,UACE,kBACD;AAAA,YAAC,kBAAAA;AAAA,YAAA;AAAA,cACA,WAAQ,gBAAI,kBAAmB;AAAA,cAC/B,kBAAgB;AAAA,cAChB,UAAW,MAAM,kBAAkB;AAAA,cACnC,YAAa,MAAM,oBAAqB,GAAI;AAAA,cAE5C;AAAA,gBAAC;AAAA;AAAA,kBACA,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tRangeControl,\n\tSelectControl,\n\tToggleControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { InspectorControls } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { MIN_PREVIEW_HEIGHT, MAX_PREVIEW_HEIGHT } from './edit';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nexport default function FileBlockInspector( {\n\threfs,\n\topenInNewWindow,\n\tshowDownloadButton,\n\tchangeLinkDestinationOption,\n\tchangeOpenInNewWindow,\n\tchangeShowDownloadButton,\n\tdisplayPreview,\n\tchangeDisplayPreview,\n\tpreviewHeight,\n\tchangePreviewHeight,\n} ) {\n\tconst { href, textLinkHref, attachmentPage } = hrefs;\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tlet linkDestinationOptions = [ { value: href, label: __( 'URL' ) } ];\n\tif ( attachmentPage ) {\n\t\tlinkDestinationOptions = [\n\t\t\t{ value: href, label: __( 'Media file' ) },\n\t\t\t{ value: attachmentPage, label: __( 'Attachment page' ) },\n\t\t];\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ href.endsWith( '.pdf' ) && (\n\t\t\t\t\t<ToolsPanel\n\t\t\t\t\t\tlabel={ __( 'PDF settings' ) }\n\t\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\t\tchangeDisplayPreview( true );\n\t\t\t\t\t\t\tchangePreviewHeight( 600 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Show inline embed' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => ! displayPreview }\n\t\t\t\t\t\t\tonDeselect={ () => changeDisplayPreview( true ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Show inline embed' ) }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tdisplayPreview\n\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t\"Note: Most phone and tablet browsers won't display embedded PDFs.\"\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tchecked={ !! displayPreview }\n\t\t\t\t\t\t\t\tonChange={ changeDisplayPreview }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t{ displayPreview && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\tlabel={ __( 'Height in pixels' ) }\n\t\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\t\thasValue={ () => previewHeight !== 600 }\n\t\t\t\t\t\t\t\tonDeselect={ () => changePreviewHeight( 600 ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Height in pixels' ) }\n\t\t\t\t\t\t\t\t\tmin={ MIN_PREVIEW_HEIGHT }\n\t\t\t\t\t\t\t\t\tmax={ Math.max(\n\t\t\t\t\t\t\t\t\t\tMAX_PREVIEW_HEIGHT,\n\t\t\t\t\t\t\t\t\t\tpreviewHeight\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tvalue={ previewHeight }\n\t\t\t\t\t\t\t\t\tonChange={ changePreviewHeight }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ToolsPanel>\n\t\t\t\t) }\n\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tchangeLinkDestinationOption( href );\n\t\t\t\t\t\tchangeOpenInNewWindow( false );\n\t\t\t\t\t\tchangeShowDownloadButton( true );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Link to' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => textLinkHref !== href }\n\t\t\t\t\t\tonDeselect={ () => changeLinkDestinationOption( href ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\tlabel={ __( 'Link to' ) }\n\t\t\t\t\t\t\tvalue={ textLinkHref }\n\t\t\t\t\t\t\toptions={ linkDestinationOptions }\n\t\t\t\t\t\t\tonChange={ changeLinkDestinationOption }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => !! openInNewWindow }\n\t\t\t\t\t\tonDeselect={ () => changeOpenInNewWindow( false ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\tchecked={ openInNewWindow }\n\t\t\t\t\t\t\tonChange={ changeOpenInNewWindow }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Show download button' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => ! showDownloadButton }\n\t\t\t\t\t\tonDeselect={ () => changeShowDownloadButton( true ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Show download button' ) }\n\t\t\t\t\t\t\tchecked={ showDownloadButton }\n\t\t\t\t\t\t\tonChange={ changeShowDownloadButton }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kB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C,kBAAgB;AAAA,cAChB,UAAW,MAAM,CAAE;AAAA,cACnB,YAAa,MAAM,yBAA0B,IAAK;AAAA,cAElD;AAAA,gBAAC;AAAA;AAAA,kBACA,WAAQ,gBAAI,sBAAuB;AAAA,kBACnC,SAAU;AAAA,kBACV,UAAW;AAAA;AAAA,cACZ;AAAA;AAAA,UACD;AAAA;AAAA;AAAA,IACD;AAAA,KACD,GACD;AAEF;",
|
|
6
6
|
"names": ["ToolsPanel", "ToolsPanelItem"]
|
|
7
7
|
}
|
|
@@ -30,6 +30,28 @@ var import_core_data = require("@wordpress/core-data");
|
|
|
30
30
|
var import_i18n = require("@wordpress/i18n");
|
|
31
31
|
var import_url = require("@wordpress/url");
|
|
32
32
|
var downloadButtonText = (0, import_i18n._x)("Download", "button label");
|
|
33
|
+
var toMediaTransform = (blockName, mediaType, srcAttribute) => ({
|
|
34
|
+
type: "block",
|
|
35
|
+
blocks: [blockName],
|
|
36
|
+
isMatch: ({ id }) => {
|
|
37
|
+
if (!id) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
const { getEntityRecord } = (0, import_data.select)(import_core_data.store);
|
|
41
|
+
const media = getEntityRecord("postType", "attachment", id, {
|
|
42
|
+
context: "view"
|
|
43
|
+
});
|
|
44
|
+
return !!media && media.mime_type.includes(mediaType);
|
|
45
|
+
},
|
|
46
|
+
transform: (attributes) => {
|
|
47
|
+
return (0, import_blocks.createBlock)(blockName, {
|
|
48
|
+
[srcAttribute]: attributes.href,
|
|
49
|
+
caption: attributes.fileName,
|
|
50
|
+
id: attributes.id,
|
|
51
|
+
anchor: attributes.anchor
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
33
55
|
var transforms = {
|
|
34
56
|
from: [
|
|
35
57
|
{
|
|
@@ -92,66 +114,9 @@ var transforms = {
|
|
|
92
114
|
}
|
|
93
115
|
],
|
|
94
116
|
to: [
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
isMatch: ({ id }) => {
|
|
99
|
-
if (!id) {
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
const { getEntityRecord } = (0, import_data.select)(import_core_data.store);
|
|
103
|
-
const media = getEntityRecord("postType", "attachment", id);
|
|
104
|
-
return !!media && media.mime_type.includes("audio");
|
|
105
|
-
},
|
|
106
|
-
transform: (attributes) => {
|
|
107
|
-
return (0, import_blocks.createBlock)("core/audio", {
|
|
108
|
-
src: attributes.href,
|
|
109
|
-
caption: attributes.fileName,
|
|
110
|
-
id: attributes.id,
|
|
111
|
-
anchor: attributes.anchor
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
type: "block",
|
|
117
|
-
blocks: ["core/video"],
|
|
118
|
-
isMatch: ({ id }) => {
|
|
119
|
-
if (!id) {
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
const { getEntityRecord } = (0, import_data.select)(import_core_data.store);
|
|
123
|
-
const media = getEntityRecord("postType", "attachment", id);
|
|
124
|
-
return !!media && media.mime_type.includes("video");
|
|
125
|
-
},
|
|
126
|
-
transform: (attributes) => {
|
|
127
|
-
return (0, import_blocks.createBlock)("core/video", {
|
|
128
|
-
src: attributes.href,
|
|
129
|
-
caption: attributes.fileName,
|
|
130
|
-
id: attributes.id,
|
|
131
|
-
anchor: attributes.anchor
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
type: "block",
|
|
137
|
-
blocks: ["core/image"],
|
|
138
|
-
isMatch: ({ id }) => {
|
|
139
|
-
if (!id) {
|
|
140
|
-
return false;
|
|
141
|
-
}
|
|
142
|
-
const { getEntityRecord } = (0, import_data.select)(import_core_data.store);
|
|
143
|
-
const media = getEntityRecord("postType", "attachment", id);
|
|
144
|
-
return !!media && media.mime_type.includes("image");
|
|
145
|
-
},
|
|
146
|
-
transform: (attributes) => {
|
|
147
|
-
return (0, import_blocks.createBlock)("core/image", {
|
|
148
|
-
url: attributes.href,
|
|
149
|
-
caption: attributes.fileName,
|
|
150
|
-
id: attributes.id,
|
|
151
|
-
anchor: attributes.anchor
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
}
|
|
117
|
+
toMediaTransform("core/audio", "audio", "src"),
|
|
118
|
+
toMediaTransform("core/video", "video", "src"),
|
|
119
|
+
toMediaTransform("core/image", "image", "url")
|
|
155
120
|
]
|
|
156
121
|
};
|
|
157
122
|
var transforms_default = transforms;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/file/transforms.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createBlobURL } from '@wordpress/blob';\nimport { createBlock } from '@wordpress/blocks';\nimport { select } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { _x } from '@wordpress/i18n';\nimport { getFilename } from '@wordpress/url';\n\n// Transforms bypass the default variation, so set the localized default here.\nconst downloadButtonText = _x( 'Download', 'button label' );\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'files',\n\t\t\tisMatch( files ) {\n\t\t\t\treturn files.length > 0;\n\t\t\t},\n\t\t\t// We define a lower priority (higher number) than the default of 10. This\n\t\t\t// ensures that the File block is only created as a fallback.\n\t\t\tpriority: 15,\n\t\t\ttransform: ( files ) => {\n\t\t\t\tconst blocks = [];\n\n\t\t\t\tfiles.forEach( ( file ) => {\n\t\t\t\t\tconst blobURL = createBlobURL( file );\n\n\t\t\t\t\t// File will be uploaded in componentDidMount()\n\t\t\t\t\tif ( file.type.startsWith( 'video/' ) ) {\n\t\t\t\t\t\tblocks.push(\n\t\t\t\t\t\t\tcreateBlock( 'core/video', {\n\t\t\t\t\t\t\t\tblob: createBlobURL( file ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( file.type.startsWith( 'image/' ) ) {\n\t\t\t\t\t\tblocks.push(\n\t\t\t\t\t\t\tcreateBlock( 'core/image', {\n\t\t\t\t\t\t\t\tblob: createBlobURL( file ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( file.type.startsWith( 'audio/' ) ) {\n\t\t\t\t\t\tblocks.push(\n\t\t\t\t\t\t\tcreateBlock( 'core/audio', {\n\t\t\t\t\t\t\t\tblob: createBlobURL( file ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tblocks.push(\n\t\t\t\t\t\t\tcreateBlock( 'core/file', {\n\t\t\t\t\t\t\t\tblob: blobURL,\n\t\t\t\t\t\t\t\tfileName: file.name,\n\t\t\t\t\t\t\t\tdownloadButtonText,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\treturn blocks;\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/audio', 'core/video', 'core/image' ],\n\t\t\ttransform: ( attributes ) => {\n\t\t\t\t// Audio/Video use `src`, Image uses `url`.\n\t\t\t\tconst href = attributes.src ?? attributes.url;\n\t\t\t\treturn createBlock( 'core/file', {\n\t\t\t\t\thref,\n\t\t\t\t\tfileName: attributes.caption || getFilename( href ),\n\t\t\t\t\ttextLinkHref: href,\n\t\t\t\t\tid: attributes.id,\n\t\t\t\t\tanchor: attributes.anchor,\n\t\t\t\t\tdownloadButtonText,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t],\n\tto: [\n\t\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA8B;AAC9B,oBAA4B;AAC5B,kBAAuB;AACvB,uBAAmC;AACnC,kBAAmB;AACnB,iBAA4B;AAG5B,IAAM,yBAAqB,gBAAI,YAAY,cAAe;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createBlobURL } from '@wordpress/blob';\nimport { createBlock } from '@wordpress/blocks';\nimport { select } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { _x } from '@wordpress/i18n';\nimport { getFilename } from '@wordpress/url';\n\n// Transforms bypass the default variation, so set the localized default here.\nconst downloadButtonText = _x( 'Download', 'button label' );\n\n// The File → audio/video/image transforms are identical apart from the target\n// block, its media MIME type, and the src attribute name (image uses `url`).\nconst toMediaTransform = ( blockName, mediaType, srcAttribute ) => ( {\n\ttype: 'block',\n\tblocks: [ blockName ],\n\tisMatch: ( { id } ) => {\n\t\tif ( ! id ) {\n\t\t\treturn false;\n\t\t}\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst media = getEntityRecord( 'postType', 'attachment', id, {\n\t\t\tcontext: 'view',\n\t\t} );\n\t\treturn !! media && media.mime_type.includes( mediaType );\n\t},\n\ttransform: ( attributes ) => {\n\t\treturn createBlock( blockName, {\n\t\t\t[ srcAttribute ]: attributes.href,\n\t\t\tcaption: attributes.fileName,\n\t\t\tid: attributes.id,\n\t\t\tanchor: attributes.anchor,\n\t\t} );\n\t},\n} );\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'files',\n\t\t\tisMatch( files ) {\n\t\t\t\treturn files.length > 0;\n\t\t\t},\n\t\t\t// We define a lower priority (higher number) than the default of 10. This\n\t\t\t// ensures that the File block is only created as a fallback.\n\t\t\tpriority: 15,\n\t\t\ttransform: ( files ) => {\n\t\t\t\tconst blocks = [];\n\n\t\t\t\tfiles.forEach( ( file ) => {\n\t\t\t\t\tconst blobURL = createBlobURL( file );\n\n\t\t\t\t\t// File will be uploaded in componentDidMount()\n\t\t\t\t\tif ( file.type.startsWith( 'video/' ) ) {\n\t\t\t\t\t\tblocks.push(\n\t\t\t\t\t\t\tcreateBlock( 'core/video', {\n\t\t\t\t\t\t\t\tblob: createBlobURL( file ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( file.type.startsWith( 'image/' ) ) {\n\t\t\t\t\t\tblocks.push(\n\t\t\t\t\t\t\tcreateBlock( 'core/image', {\n\t\t\t\t\t\t\t\tblob: createBlobURL( file ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( file.type.startsWith( 'audio/' ) ) {\n\t\t\t\t\t\tblocks.push(\n\t\t\t\t\t\t\tcreateBlock( 'core/audio', {\n\t\t\t\t\t\t\t\tblob: createBlobURL( file ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tblocks.push(\n\t\t\t\t\t\t\tcreateBlock( 'core/file', {\n\t\t\t\t\t\t\t\tblob: blobURL,\n\t\t\t\t\t\t\t\tfileName: file.name,\n\t\t\t\t\t\t\t\tdownloadButtonText,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\treturn blocks;\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/audio', 'core/video', 'core/image' ],\n\t\t\ttransform: ( attributes ) => {\n\t\t\t\t// Audio/Video use `src`, Image uses `url`.\n\t\t\t\tconst href = attributes.src ?? attributes.url;\n\t\t\t\treturn createBlock( 'core/file', {\n\t\t\t\t\thref,\n\t\t\t\t\tfileName: attributes.caption || getFilename( href ),\n\t\t\t\t\ttextLinkHref: href,\n\t\t\t\t\tid: attributes.id,\n\t\t\t\t\tanchor: attributes.anchor,\n\t\t\t\t\tdownloadButtonText,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t],\n\tto: [\n\t\ttoMediaTransform( 'core/audio', 'audio', 'src' ),\n\t\ttoMediaTransform( 'core/video', 'video', 'src' ),\n\t\ttoMediaTransform( 'core/image', 'image', 'url' ),\n\t],\n};\n\nexport default transforms;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA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,2BAAa,cAAc;AAAA,gBAC1B,UAAM,2BAAe,IAAK;AAAA,cAC3B,CAAE;AAAA,YACH;AAAA,UACD,WAAY,KAAK,KAAK,WAAY,QAAS,GAAI;AAC9C,mBAAO;AAAA,kBACN,2BAAa,cAAc;AAAA,gBAC1B,UAAM,2BAAe,IAAK;AAAA,cAC3B,CAAE;AAAA,YACH;AAAA,UACD,OAAO;AACN,mBAAO;AAAA,kBACN,2BAAa,aAAa;AAAA,gBACzB,MAAM;AAAA,gBACN,UAAU,KAAK;AAAA,gBACf;AAAA,cACD,CAAE;AAAA,YACH;AAAA,UACD;AAAA,QACD,CAAE;AAEF,eAAO;AAAA,MACR;AAAA,IACD;AAAA,IACA;AAAA,MACC,MAAM;AAAA,MACN,QAAQ,CAAE,cAAc,cAAc,YAAa;AAAA,MACnD,WAAW,CAAE,eAAgB;AAE5B,cAAM,OAAO,WAAW,OAAO,WAAW;AAC1C,mBAAO,2BAAa,aAAa;AAAA,UAChC;AAAA,UACA,UAAU,WAAW,eAAW,wBAAa,IAAK;AAAA,UAClD,cAAc;AAAA,UACd,IAAI,WAAW;AAAA,UACf,QAAQ,WAAW;AAAA,UACnB;AAAA,QACD,CAAE;AAAA,MACH;AAAA,IACD;AAAA,EACD;AAAA,EACA,IAAI;AAAA,IACH,iBAAkB,cAAc,SAAS,KAAM;AAAA,IAC/C,iBAAkB,cAAc,SAAS,KAAM;AAAA,IAC/C,iBAAkB,cAAc,SAAS,KAAM;AAAA,EAChD;AACD;AAEA,IAAO,qBAAQ;",
|
|
6
6
|
"names": ["coreStore"]
|
|
7
7
|
}
|
package/build/form/edit.cjs
CHANGED
|
@@ -105,7 +105,6 @@ var Edit = ({ attributes, setAttributes, clientId }) => {
|
|
|
105
105
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
106
106
|
import_components.SelectControl,
|
|
107
107
|
{
|
|
108
|
-
__next40pxDefaultSize: true,
|
|
109
108
|
label: (0, import_i18n.__)("Submissions method"),
|
|
110
109
|
options: [
|
|
111
110
|
// TODO: Allow plugins to add their own submission methods.
|
|
@@ -169,7 +168,6 @@ var Edit = ({ attributes, setAttributes, clientId }) => {
|
|
|
169
168
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
170
169
|
import_components.SelectControl,
|
|
171
170
|
{
|
|
172
|
-
__next40pxDefaultSize: true,
|
|
173
171
|
label: (0, import_i18n.__)("Method"),
|
|
174
172
|
options: [
|
|
175
173
|
{ label: "Get", value: "get" },
|
package/build/form/edit.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/form/edit.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInnerBlocks,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tSelectControl,\n\tTextControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\nimport {\n\tformSubmissionNotificationSuccess,\n\tformSubmissionNotificationError,\n} from './utils.js';\n\nconst TEMPLATE = [\n\tformSubmissionNotificationSuccess,\n\tformSubmissionNotificationError,\n\t[\n\t\t'core/form-input',\n\t\t{\n\t\t\ttype: 'text',\n\t\t\tlabel: __( 'Name' ),\n\t\t\trequired: true,\n\t\t},\n\t],\n\t[\n\t\t'core/form-input',\n\t\t{\n\t\t\ttype: 'email',\n\t\t\tlabel: __( 'Email' ),\n\t\t\trequired: true,\n\t\t},\n\t],\n\t[\n\t\t'core/form-input',\n\t\t{\n\t\t\ttype: 'textarea',\n\t\t\tlabel: __( 'Comment' ),\n\t\t\trequired: true,\n\t\t},\n\t],\n\t[ 'core/form-submit-button', {} ],\n];\n\nconst Edit = ( { attributes, setAttributes, clientId } ) => {\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst resetAllSettings = () => {\n\t\tsetAttributes( {\n\t\t\tsubmissionMethod: 'email',\n\t\t\temail: undefined,\n\t\t\taction: undefined,\n\t\t\tmethod: 'post',\n\t\t} );\n\t};\n\n\tconst { action, method, email, submissionMethod } = attributes;\n\tconst blockProps = useBlockProps();\n\n\tconst { hasInnerBlocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlock } = select( blockEditorStore );\n\t\t\tconst block = getBlock( clientId );\n\t\t\treturn {\n\t\t\t\thasInnerBlocks: !! ( block && block.innerBlocks.length ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\trenderAppender: hasInnerBlocks\n\t\t\t? undefined\n\t\t\t: InnerBlocks.ButtonBlockAppender,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ resetAllSettings }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => submissionMethod !== 'email' }\n\t\t\t\t\t\tlabel={ __( 'Submissions method' ) }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tsubmissionMethod: 'email',\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,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AAC,kBAAAC;AAAA,MAAA;AAAA,QACA;AAAA,QACA,WAAQ,gBAAI,UAAW;AAAA,QACvB,UAAW;AAAA,QAEX;AAAA;AAAA,YAAC,kBAAAC;AAAA,YAAA;AAAA,cACA,UAAW,MAAM,qBAAqB;AAAA,cACtC,WAAQ,gBAAI,oBAAqB;AAAA,cACjC,YAAa,MACZ,cAAe;AAAA,gBACd,kBAAkB;AAAA,cACnB,CAAE;AAAA,cAEH,kBAAgB;AAAA,cAEhB;AAAA,gBAAC;AAAA;AAAA,kBACA,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInnerBlocks,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tSelectControl,\n\tTextControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\nimport {\n\tformSubmissionNotificationSuccess,\n\tformSubmissionNotificationError,\n} from './utils.js';\n\nconst TEMPLATE = [\n\tformSubmissionNotificationSuccess,\n\tformSubmissionNotificationError,\n\t[\n\t\t'core/form-input',\n\t\t{\n\t\t\ttype: 'text',\n\t\t\tlabel: __( 'Name' ),\n\t\t\trequired: true,\n\t\t},\n\t],\n\t[\n\t\t'core/form-input',\n\t\t{\n\t\t\ttype: 'email',\n\t\t\tlabel: __( 'Email' ),\n\t\t\trequired: true,\n\t\t},\n\t],\n\t[\n\t\t'core/form-input',\n\t\t{\n\t\t\ttype: 'textarea',\n\t\t\tlabel: __( 'Comment' ),\n\t\t\trequired: true,\n\t\t},\n\t],\n\t[ 'core/form-submit-button', {} ],\n];\n\nconst Edit = ( { attributes, setAttributes, clientId } ) => {\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst resetAllSettings = () => {\n\t\tsetAttributes( {\n\t\t\tsubmissionMethod: 'email',\n\t\t\temail: undefined,\n\t\t\taction: undefined,\n\t\t\tmethod: 'post',\n\t\t} );\n\t};\n\n\tconst { action, method, email, submissionMethod } = attributes;\n\tconst blockProps = useBlockProps();\n\n\tconst { hasInnerBlocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlock } = select( blockEditorStore );\n\t\t\tconst block = getBlock( clientId );\n\t\t\treturn {\n\t\t\t\thasInnerBlocks: !! ( block && block.innerBlocks.length ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\trenderAppender: hasInnerBlocks\n\t\t\t? undefined\n\t\t\t: InnerBlocks.ButtonBlockAppender,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ resetAllSettings }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => submissionMethod !== 'email' }\n\t\t\t\t\t\tlabel={ __( 'Submissions method' ) }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tsubmissionMethod: 'email',\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\tlabel={ __( 'Submissions method' ) }\n\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t// TODO: Allow plugins to add their own submission methods.\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'Send email' ),\n\t\t\t\t\t\t\t\t\tvalue: 'email',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( '- Custom -' ),\n\t\t\t\t\t\t\t\t\tvalue: 'custom',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\tvalue={ submissionMethod }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { submissionMethod: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\tsubmissionMethod === 'custom'\n\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t'Select the method to use for form submissions. Additional options for the \"custom\" mode can be found in the \"Advanced\" section.'\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t'Select the method to use for form submissions.'\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t{ submissionMethod === 'email' && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! email }\n\t\t\t\t\t\t\tlabel={ __( 'Email for form submissions' ) }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\temail: undefined,\n\t\t\t\t\t\t\t\t\taction: undefined,\n\t\t\t\t\t\t\t\t\tmethod: 'post',\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Email for form submissions' ) }\n\t\t\t\t\t\t\t\tvalue={ email || '' }\n\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( { email: value } );\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\taction: `mailto:${ value }`,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\tsetAttributes( { method: 'post' } );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'The email address where form submissions will be sent. Separate multiple email addresses with a comma.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t\t{ submissionMethod !== 'email' && (\n\t\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Method' ) }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{ label: 'Get', value: 'get' },\n\t\t\t\t\t\t\t{ label: 'Post', value: 'post' },\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tvalue={ method }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { method: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Select the method to use for form submissions.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tlabel={ __( 'Form action' ) }\n\t\t\t\t\t\tvalue={ action }\n\t\t\t\t\t\tonChange={ ( newVal ) => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\taction: newVal,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'The URL where the form should be submitted.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\ttype=\"url\"\n\t\t\t\t\t/>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<form\n\t\t\t\t{ ...innerBlocksProps }\n\t\t\t\tencType={ submissionMethod === 'email' ? 'text/plain' : null }\n\t\t\t/>\n\t\t</>\n\t);\n};\nexport default Edit;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,0BAMO;AACP,wBAKO;AACP,kBAA0B;AAK1B,mBAA+C;AAC/C,mBAGO;AAkEL;AAhEF,IAAM,WAAW;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,MACC,MAAM;AAAA,MACN,WAAO,gBAAI,MAAO;AAAA,MAClB,UAAU;AAAA,IACX;AAAA,EACD;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,MACC,MAAM;AAAA,MACN,WAAO,gBAAI,OAAQ;AAAA,MACnB,UAAU;AAAA,IACX;AAAA,EACD;AAAA,EACA;AAAA,IACC;AAAA,IACA;AAAA,MACC,MAAM;AAAA,MACN,WAAO,gBAAI,SAAU;AAAA,MACrB,UAAU;AAAA,IACX;AAAA,EACD;AAAA,EACA,CAAE,2BAA2B,CAAC,CAAE;AACjC;AAEA,IAAM,OAAO,CAAE,EAAE,YAAY,eAAe,SAAS,MAAO;AAC3D,QAAM,wBAAoB,6CAA+B;AAEzD,QAAM,mBAAmB,MAAM;AAC9B,kBAAe;AAAA,MACd,kBAAkB;AAAA,MAClB,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ;AAAA,IACT,CAAE;AAAA,EACH;AAEA,QAAM,EAAE,QAAQ,QAAQ,OAAO,iBAAiB,IAAI;AACpD,QAAM,iBAAa,mCAAc;AAEjC,QAAM,EAAE,eAAe,QAAI;AAAA,IAC1B,CAAE,WAAY;AACb,YAAM,EAAE,SAAS,IAAI,OAAQ,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e;AAAA;AAAA,IACzD;AAAA,KACD;AAEF;AACA,IAAO,eAAQ;",
|
|
6
6
|
"names": ["blockEditorStore", "ToolsPanel", "ToolsPanelItem"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/block-library/src/freeform/convert-to-blocks-button.js
|
|
21
|
+
var convert_to_blocks_button_exports = {};
|
|
22
|
+
__export(convert_to_blocks_button_exports, {
|
|
23
|
+
default: () => convert_to_blocks_button_default
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(convert_to_blocks_button_exports);
|
|
26
|
+
var import_i18n = require("@wordpress/i18n");
|
|
27
|
+
var import_components = require("@wordpress/components");
|
|
28
|
+
var import_data = require("@wordpress/data");
|
|
29
|
+
var import_blocks = require("@wordpress/blocks");
|
|
30
|
+
var import_block_editor = require("@wordpress/block-editor");
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
var ConvertToBlocksButton = ({ clientId }) => {
|
|
33
|
+
const { replaceBlocks } = (0, import_data.useDispatch)(import_block_editor.store);
|
|
34
|
+
const block = (0, import_data.useSelect)(
|
|
35
|
+
(select) => {
|
|
36
|
+
return select(import_block_editor.store).getBlock(clientId);
|
|
37
|
+
},
|
|
38
|
+
[clientId]
|
|
39
|
+
);
|
|
40
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
41
|
+
import_components.ToolbarButton,
|
|
42
|
+
{
|
|
43
|
+
onClick: () => replaceBlocks(
|
|
44
|
+
block.clientId,
|
|
45
|
+
(0, import_blocks.rawHandler)({ HTML: (0, import_blocks.serialize)(block) })
|
|
46
|
+
),
|
|
47
|
+
children: (0, import_i18n.__)("Convert to blocks")
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
var convert_to_blocks_button_default = ConvertToBlocksButton;
|
|
52
|
+
//# sourceMappingURL=convert-to-blocks-button.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/freeform/convert-to-blocks-button.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ToolbarButton } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { rawHandler, serialize } from '@wordpress/blocks';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nconst ConvertToBlocksButton = ( { clientId } ) => {\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\tconst block = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( blockEditorStore ).getBlock( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn (\n\t\t<ToolbarButton\n\t\t\tonClick={ () =>\n\t\t\t\treplaceBlocks(\n\t\t\t\t\tblock.clientId,\n\t\t\t\t\trawHandler( { HTML: serialize( block ) } )\n\t\t\t\t)\n\t\t\t}\n\t\t>\n\t\t\t{ __( 'Convert to blocks' ) }\n\t\t</ToolbarButton>\n\t);\n};\n\nexport default ConvertToBlocksButton;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,wBAA8B;AAC9B,kBAAuC;AACvC,oBAAsC;AACtC,0BAA0C;AAYxC;AAVF,IAAM,wBAAwB,CAAE,EAAE,SAAS,MAAO;AACjD,QAAM,EAAE,cAAc,QAAI,yBAAa,oBAAAA,KAAiB;AACxD,QAAM,YAAQ;AAAA,IACb,CAAE,WAAY;AACb,aAAO,OAAQ,oBAAAA,KAAiB,EAAE,SAAU,QAAS;AAAA,IACtD;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SAAU,MACT;AAAA,QACC,MAAM;AAAA,YACN,0BAAY,EAAE,UAAM,yBAAW,KAAM,EAAE,CAAE;AAAA,MAC1C;AAAA,MAGC,8BAAI,mBAAoB;AAAA;AAAA,EAC3B;AAEF;AAEA,IAAO,mCAAQ;",
|
|
6
|
+
"names": ["blockEditorStore"]
|
|
7
|
+
}
|
package/build/freeform/edit.cjs
CHANGED
|
@@ -39,14 +39,13 @@ var import_components = require("@wordpress/components");
|
|
|
39
39
|
var import_element = require("@wordpress/element");
|
|
40
40
|
var import_i18n = require("@wordpress/i18n");
|
|
41
41
|
var import_icons = require("@wordpress/icons");
|
|
42
|
-
var
|
|
42
|
+
var import_convert_to_blocks_button = __toESM(require("./convert-to-blocks-button.cjs"));
|
|
43
43
|
var import_modal = __toESM(require("./modal.cjs"));
|
|
44
44
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
45
|
function FreeformEdit({
|
|
46
46
|
attributes,
|
|
47
47
|
setAttributes,
|
|
48
|
-
clientId
|
|
49
|
-
onReplace
|
|
48
|
+
clientId
|
|
50
49
|
}) {
|
|
51
50
|
const { content } = attributes;
|
|
52
51
|
const [isOpen, setOpen] = (0, import_element.useState)(false);
|
|
@@ -55,8 +54,8 @@ function FreeformEdit({
|
|
|
55
54
|
(select) => select(import_block_editor.store).canRemoveBlock(clientId),
|
|
56
55
|
[clientId]
|
|
57
56
|
);
|
|
58
|
-
const { removeBlock } = (0, import_data.useDispatch)(import_block_editor.store);
|
|
59
57
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
58
|
+
canRemove && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_block_editor.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_convert_to_blocks_button.default, { clientId }) }) }),
|
|
60
59
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_block_editor.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
60
|
import_components.ToolbarButton,
|
|
62
61
|
{
|
|
@@ -66,41 +65,23 @@ function FreeformEdit({
|
|
|
66
65
|
}
|
|
67
66
|
) }) }),
|
|
68
67
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...(0, import_block_editor.useBlockProps)(), children: [
|
|
69
|
-
|
|
70
|
-
import_migration_notice.default,
|
|
71
|
-
{
|
|
72
|
-
content,
|
|
73
|
-
onReplace
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
content ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_element.RawHTML, { children: content }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
68
|
+
content ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_element.RawHTML, { children: content }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
69
|
import_components.Placeholder,
|
|
78
70
|
{
|
|
79
71
|
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_block_editor.BlockIcon, { icon: import_icons.classic }),
|
|
80
72
|
label: (0, import_i18n.__)("Classic"),
|
|
81
73
|
instructions: (0, import_i18n.__)(
|
|
82
|
-
"
|
|
74
|
+
"Use the classic editor to add content."
|
|
83
75
|
),
|
|
84
|
-
children:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
),
|
|
94
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
|
-
import_components.Button,
|
|
96
|
-
{
|
|
97
|
-
__next40pxDefaultSize: true,
|
|
98
|
-
variant: canRemove ? "secondary" : "primary",
|
|
99
|
-
onClick: () => setOpen(true),
|
|
100
|
-
children: (0, import_i18n.__)("Edit contents")
|
|
101
|
-
}
|
|
102
|
-
)
|
|
103
|
-
]
|
|
76
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
|
+
import_components.Button,
|
|
78
|
+
{
|
|
79
|
+
__next40pxDefaultSize: true,
|
|
80
|
+
variant: "primary",
|
|
81
|
+
onClick: () => setOpen(true),
|
|
82
|
+
children: (0, import_i18n.__)("Edit contents")
|
|
83
|
+
}
|
|
84
|
+
)
|
|
104
85
|
}
|
|
105
86
|
),
|
|
106
87
|
isOpen && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/freeform/edit.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tBlockControls,\n\tBlockIcon,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAKO;AACP,
|
|
6
|
-
"names": ["blockEditorStore", "
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tBlockControls,\n\tBlockIcon,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tPlaceholder,\n\tToolbarGroup,\n\tToolbarButton,\n} from '@wordpress/components';\nimport { useState, useRef, RawHTML } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { classic } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport ConvertToBlocksButton from './convert-to-blocks-button';\nimport ModalEdit from './modal';\n\nexport default function FreeformEdit( {\n\tattributes,\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst { content } = attributes;\n\tconst [ isOpen, setOpen ] = useState( false );\n\tconst editButtonRef = useRef( null );\n\n\tconst canRemove = useSelect(\n\t\t( select ) => select( blockEditorStore ).canRemoveBlock( clientId ),\n\t\t[ clientId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ canRemove && (\n\t\t\t\t<BlockControls>\n\t\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t\t<ConvertToBlocksButton clientId={ clientId } />\n\t\t\t\t\t</ToolbarGroup>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tref={ editButtonRef }\n\t\t\t\t\t\tonClick={ () => setOpen( true ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t</ToolbarButton>\n\t\t\t\t</ToolbarGroup>\n\t\t\t</BlockControls>\n\t\t\t<div { ...useBlockProps() }>\n\t\t\t\t{ content ? (\n\t\t\t\t\t<RawHTML>{ content }</RawHTML>\n\t\t\t\t) : (\n\t\t\t\t\t<Placeholder\n\t\t\t\t\t\ticon={ <BlockIcon icon={ classic } /> }\n\t\t\t\t\t\tlabel={ __( 'Classic' ) }\n\t\t\t\t\t\tinstructions={ __(\n\t\t\t\t\t\t\t'Use the classic editor to add content.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tonClick={ () => setOpen( true ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Edit contents' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</Placeholder>\n\t\t\t\t) }\n\t\t\t\t{ isOpen && (\n\t\t\t\t\t<ModalEdit\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\tcontent={ content }\n\t\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\t\tsetOpen( false );\n\t\t\t\t\t\t\tif ( editButtonRef.current ) {\n\t\t\t\t\t\t\t\teditButtonRef.current.focus();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonChange={ ( newContent ) =>\n\t\t\t\t\t\t\tsetAttributes( { content: newContent } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAKO;AACP,kBAA0B;AAC1B,wBAKO;AACP,qBAA0C;AAC1C,kBAAmB;AACnB,mBAAwB;AAKxB,sCAAkC;AAClC,mBAAsB;AAiBpB;AAfa,SAAR,aAA+B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,EAAE,QAAQ,IAAI;AACpB,QAAM,CAAE,QAAQ,OAAQ,QAAI,yBAAU,KAAM;AAC5C,QAAM,oBAAgB,uBAAQ,IAAK;AAEnC,QAAM,gBAAY;AAAA,IACjB,CAAE,WAAY,OAAQ,oBAAAA,KAAiB,EAAE,eAAgB,QAAS;AAAA,IAClE,CAAE,QAAS;AAAA,EACZ;AAEA,SACC,4EACG;AAAA,iBACD,4CAAC,qCACA,sDAAC,kCACA,sDAAC,gCAAAC,SAAA,EAAsB,UAAsB,GAC9C,GACD;AAAA,IAED,4CAAC,qCACA,sDAAC,kCACA;AAAA,MAAC;AAAA;AAAA,QACA,KAAM;AAAA,QACN,SAAU,MAAM,QAAS,IAAK;AAAA,QAE5B,8BAAI,MAAO;AAAA;AAAA,IACd,GACD,GACD;AAAA,IACA,6CAAC,SAAM,OAAG,mCAAc,GACrB;AAAA,gBACD,4CAAC,0BAAU,mBAAS,IAEpB;AAAA,QAAC;AAAA;AAAA,UACA,MAAO,4CAAC,iCAAU,MAAO,sBAAU;AAAA,UACnC,WAAQ,gBAAI,SAAU;AAAA,UACtB,kBAAe;AAAA,YACd;AAAA,UACD;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACA,uBAAqB;AAAA,cACrB,SAAQ;AAAA,cACR,SAAU,MAAM,QAAS,IAAK;AAAA,cAE5B,8BAAI,eAAgB;AAAA;AAAA,UACvB;AAAA;AAAA,MACD;AAAA,MAEC,UACD;AAAA,QAAC,aAAAC;AAAA,QAAA;AAAA,UACA;AAAA,UACA;AAAA,UACA,SAAU,MAAM;AACf,oBAAS,KAAM;AACf,gBAAK,cAAc,SAAU;AAC5B,4BAAc,QAAQ,MAAM;AAAA,YAC7B;AAAA,UACD;AAAA,UACA,UAAW,CAAE,eACZ,cAAe,EAAE,SAAS,WAAW,CAAE;AAAA;AAAA,MAEzC;AAAA,OAEF;AAAA,KACD;AAEF;",
|
|
6
|
+
"names": ["blockEditorStore", "ConvertToBlocksButton", "ModalEdit"]
|
|
7
7
|
}
|
package/build/freeform/index.cjs
CHANGED
|
@@ -47,13 +47,7 @@ var settings = {
|
|
|
47
47
|
edit: import_edit.default,
|
|
48
48
|
save: import_save.default
|
|
49
49
|
};
|
|
50
|
-
var init = () => {
|
|
51
|
-
const supports = {
|
|
52
|
-
...import_block.default.supports,
|
|
53
|
-
inserter: !!window?.__needsClassicBlock
|
|
54
|
-
};
|
|
55
|
-
return (0, import_init_block.default)({ name, metadata: import_block.default, settings: { ...settings, supports } });
|
|
56
|
-
};
|
|
50
|
+
var init = () => (0, import_init_block.default)({ name, metadata: import_block.default, settings });
|
|
57
51
|
// Annotate the CommonJS export names for ESM import in node:
|
|
58
52
|
0 && (module.exports = {
|
|
59
53
|
init,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/freeform/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { classic as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () =>
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,+BAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAGA,mBAAgC;AAKhC,wBAAsB;AACtB,kBAAiB;AACjB,mBAAqB;AACrB,kBAAiB;AAEjB,IAAM,EAAE,KAAK,IAAI,aAAAA;AAIV,IAAM,WAAW;AAAA,EACvB,mBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,kBAAAC;AACD;AAEO,IAAM,OAAO,
|
|
6
|
-
"names": ["metadata", "icon", "edit", "save", "
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { classic as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,+BAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAGA,mBAAgC;AAKhC,wBAAsB;AACtB,kBAAiB;AACjB,mBAAqB;AACrB,kBAAiB;AAEjB,IAAM,EAAE,KAAK,IAAI,aAAAA;AAIV,IAAM,WAAW;AAAA,EACvB,mBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,kBAAAC;AACD;AAEO,IAAM,OAAO,UAAM,kBAAAC,SAAW,EAAE,MAAM,uBAAAC,SAAU,SAAS,CAAE;",
|
|
6
|
+
"names": ["metadata", "icon", "edit", "save", "initBlock", "metadata"]
|
|
7
7
|
}
|
package/build/gallery/block.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "core/gallery",
|
|
5
5
|
"title": "Gallery",
|
|
6
6
|
"category": "media",
|
|
7
|
-
"usesContext": [ "galleryId" ],
|
|
7
|
+
"usesContext": [ "galleryId", "postId", "postType" ],
|
|
8
8
|
"allowedBlocks": [ "core/image" ],
|
|
9
9
|
"description": "Display multiple images in a rich gallery.",
|
|
10
10
|
"keywords": [ "images", "photos" ],
|
|
@@ -61,6 +61,9 @@
|
|
|
61
61
|
},
|
|
62
62
|
"default": []
|
|
63
63
|
},
|
|
64
|
+
"dynamicContent": {
|
|
65
|
+
"type": "object"
|
|
66
|
+
},
|
|
64
67
|
"navigationButtonType": {
|
|
65
68
|
"type": "string",
|
|
66
69
|
"default": "icon",
|
|
@@ -139,8 +142,10 @@
|
|
|
139
142
|
"spacing": {
|
|
140
143
|
"margin": true,
|
|
141
144
|
"padding": true,
|
|
142
|
-
"blockGap":
|
|
143
|
-
|
|
145
|
+
"blockGap": {
|
|
146
|
+
"sides": [ "horizontal", "vertical" ],
|
|
147
|
+
"__experimentalDefault": "var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )"
|
|
148
|
+
},
|
|
144
149
|
"__experimentalDefaultControls": {
|
|
145
150
|
"blockGap": true,
|
|
146
151
|
"margin": false,
|