@wordpress/block-library 11.1.0 → 11.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 +32 -0
- package/build/accordion-heading/block.json +1 -0
- package/build/archives/block.json +3 -0
- package/build/audio/edit.cjs +2 -1
- package/build/audio/edit.cjs.map +2 -2
- package/build/avatar/block.json +4 -0
- package/build/avatar/edit.cjs +31 -1
- package/build/avatar/edit.cjs.map +3 -3
- package/build/button/block.json +6 -0
- package/build/button/edit.cjs +9 -6
- package/build/button/edit.cjs.map +2 -2
- package/build/buttons/block.json +6 -1
- package/build/code/block.json +4 -0
- package/build/column/edit.cjs +5 -0
- package/build/column/edit.cjs.map +2 -2
- package/build/columns/block.json +4 -0
- package/build/columns/edit.cjs +21 -112
- package/build/columns/edit.cjs.map +3 -3
- package/build/comments/edit/placeholder.cjs +95 -87
- package/build/comments/edit/placeholder.cjs.map +2 -2
- package/build/comments-pagination/block.json +11 -0
- package/build/cover/block.json +2 -1
- package/build/cover/edit/index.cjs +26 -5
- package/build/cover/edit/index.cjs.map +2 -2
- package/build/cover/edit/inspector-controls.cjs +4 -1
- package/build/cover/edit/inspector-controls.cjs.map +2 -2
- package/build/cover/embed-video-utils.cjs +9 -8
- package/build/cover/embed-video-utils.cjs.map +2 -2
- package/build/cover/view.cjs +21 -0
- package/build/cover/view.cjs.map +7 -0
- package/build/details/block.json +3 -0
- package/build/embed/block.json +6 -1
- package/build/file/block.json +5 -0
- package/build/footnotes/block.json +4 -0
- package/build/gallery/block.json +13 -0
- package/build/gallery/dynamic-gallery.cjs +32 -93
- package/build/gallery/dynamic-gallery.cjs.map +3 -3
- package/build/gallery/edit.cjs +103 -40
- package/build/gallery/edit.cjs.map +2 -2
- package/build/gallery/order-controls.cjs +107 -0
- package/build/gallery/order-controls.cjs.map +7 -0
- package/build/gallery/order-images.cjs +92 -0
- package/build/gallery/order-images.cjs.map +7 -0
- package/build/gallery/order-options.cjs +62 -0
- package/build/gallery/order-options.cjs.map +7 -0
- package/build/gallery/use-dynamic-gallery.cjs +1 -7
- package/build/gallery/use-dynamic-gallery.cjs.map +2 -2
- package/build/gallery/use-get-media.cjs +2 -3
- package/build/gallery/use-get-media.cjs.map +2 -2
- package/build/group/edit.cjs +3 -3
- package/build/group/edit.cjs.map +2 -2
- package/build/heading/block.json +5 -0
- package/build/home-link/block.json +12 -0
- package/build/icon/components/custom-inserter/index.cjs +3 -1
- package/build/icon/components/custom-inserter/index.cjs.map +2 -2
- package/build/icon/edit.cjs +49 -5
- package/build/icon/edit.cjs.map +2 -2
- package/build/image/use-open-image-media-editor-modal.cjs +32 -28
- package/build/image/use-open-image-media-editor-modal.cjs.map +2 -2
- package/build/image/view.cjs +44 -50
- package/build/image/view.cjs.map +2 -2
- package/build/latest-comments/block.json +10 -0
- package/build/latest-posts/block.json +4 -0
- package/build/list/block.json +12 -1
- package/build/list-item/block.json +8 -1
- package/build/list-item/index.cjs +4 -0
- package/build/list-item/index.cjs.map +3 -3
- package/build/loginout/block.json +4 -0
- package/build/math/block.json +4 -0
- package/build/media-text/block.json +18 -0
- package/build/navigation-link/link-ui/index.cjs +33 -19
- package/build/navigation-link/link-ui/index.cjs.map +2 -2
- package/build/navigation-link/shared/index.cjs +5 -0
- package/build/navigation-link/shared/index.cjs.map +2 -2
- package/build/navigation-link/shared/use-block-suggestions.cjs +141 -0
- package/build/navigation-link/shared/use-block-suggestions.cjs.map +7 -0
- package/build/page-list/block.json +4 -0
- package/build/paragraph/block.json +1 -0
- package/build/post-author-biography/block.json +1 -0
- package/build/post-comments-form/block.json +5 -0
- package/build/post-content/block.json +2 -1
- package/build/post-excerpt/block.json +4 -0
- package/build/post-featured-image/block.json +1 -0
- package/build/post-featured-image/edit.cjs +1 -1
- package/build/post-featured-image/edit.cjs.map +2 -2
- package/build/post-terms/block.json +4 -0
- package/build/post-time-to-read/block.json +4 -0
- package/build/post-title/block.json +4 -0
- package/build/preformatted/block.json +4 -0
- package/build/pullquote/block.json +2 -1
- package/build/query-no-results/block.json +4 -0
- package/build/query-pagination/block.json +17 -0
- package/build/query-total/block.json +4 -0
- package/build/quote/block.json +2 -0
- package/build/read-more/block.json +5 -0
- package/build/rss/block.json +4 -0
- package/build/search/block.json +2 -1
- package/build/site-tagline/block.json +4 -0
- package/build/site-title/block.json +4 -0
- package/build/social-links/block.json +1 -0
- package/build/tab-list/block.json +4 -0
- package/build/tab-list/edit.cjs +3 -1
- package/build/tab-list/edit.cjs.map +3 -3
- package/build/tab-list/save.cjs +3 -1
- package/build/tab-list/save.cjs.map +3 -3
- package/build/tab-panels/block.json +3 -0
- package/build/tabs/block.json +3 -0
- package/build/term-count/block.json +5 -0
- package/build/term-description/block.json +4 -0
- package/build/term-name/block.json +6 -1
- package/build/term-template/block.json +4 -0
- package/build/utils/waveform-utils.cjs +2 -2
- package/build/utils/waveform-utils.cjs.map +2 -2
- package/build/verse/block.json +4 -0
- package/build/video/block.json +7 -1
- package/build/video/edit.cjs +10 -2
- package/build/video/edit.cjs.map +2 -2
- package/build-module/accordion-heading/block.json +1 -0
- package/build-module/archives/block.json +3 -0
- package/build-module/audio/edit.mjs +2 -1
- package/build-module/audio/edit.mjs.map +2 -2
- package/build-module/avatar/block.json +4 -0
- package/build-module/avatar/edit.mjs +33 -2
- package/build-module/avatar/edit.mjs.map +2 -2
- package/build-module/button/block.json +6 -0
- package/build-module/button/edit.mjs +11 -7
- package/build-module/button/edit.mjs.map +2 -2
- package/build-module/buttons/block.json +6 -1
- package/build-module/code/block.json +4 -0
- package/build-module/column/edit.mjs +5 -0
- package/build-module/column/edit.mjs.map +2 -2
- package/build-module/columns/block.json +4 -0
- package/build-module/columns/edit.mjs +22 -122
- package/build-module/columns/edit.mjs.map +2 -2
- package/build-module/comments/edit/placeholder.mjs +95 -87
- package/build-module/comments/edit/placeholder.mjs.map +2 -2
- package/build-module/comments-pagination/block.json +11 -0
- package/build-module/cover/block.json +2 -1
- package/build-module/cover/edit/index.mjs +32 -6
- package/build-module/cover/edit/index.mjs.map +2 -2
- package/build-module/cover/edit/inspector-controls.mjs +5 -2
- package/build-module/cover/edit/inspector-controls.mjs.map +2 -2
- package/build-module/cover/embed-video-utils.mjs +9 -8
- package/build-module/cover/embed-video-utils.mjs.map +2 -2
- package/build-module/cover/view.mjs +19 -0
- package/build-module/cover/view.mjs.map +7 -0
- package/build-module/details/block.json +3 -0
- package/build-module/embed/block.json +6 -1
- package/build-module/file/block.json +5 -0
- package/build-module/footnotes/block.json +4 -0
- package/build-module/gallery/block.json +13 -0
- package/build-module/gallery/dynamic-gallery.mjs +33 -97
- package/build-module/gallery/dynamic-gallery.mjs.map +2 -2
- package/build-module/gallery/edit.mjs +110 -42
- package/build-module/gallery/edit.mjs.map +2 -2
- package/build-module/gallery/order-controls.mjs +87 -0
- package/build-module/gallery/order-controls.mjs.map +7 -0
- package/build-module/gallery/order-images.mjs +66 -0
- package/build-module/gallery/order-images.mjs.map +7 -0
- package/build-module/gallery/order-options.mjs +33 -0
- package/build-module/gallery/order-options.mjs.map +7 -0
- package/build-module/gallery/use-dynamic-gallery.mjs +1 -7
- package/build-module/gallery/use-dynamic-gallery.mjs.map +2 -2
- package/build-module/gallery/use-get-media.mjs +2 -3
- package/build-module/gallery/use-get-media.mjs.map +2 -2
- package/build-module/group/edit.mjs +4 -4
- package/build-module/group/edit.mjs.map +2 -2
- package/build-module/heading/block.json +5 -0
- package/build-module/home-link/block.json +12 -0
- package/build-module/icon/components/custom-inserter/index.mjs +3 -1
- package/build-module/icon/components/custom-inserter/index.mjs.map +2 -2
- package/build-module/icon/edit.mjs +50 -6
- package/build-module/icon/edit.mjs.map +2 -2
- package/build-module/image/use-open-image-media-editor-modal.mjs +32 -28
- package/build-module/image/use-open-image-media-editor-modal.mjs.map +2 -2
- package/build-module/image/view.mjs +44 -50
- package/build-module/image/view.mjs.map +2 -2
- package/build-module/latest-comments/block.json +10 -0
- package/build-module/latest-posts/block.json +4 -0
- package/build-module/list/block.json +12 -1
- package/build-module/list-item/block.json +8 -1
- package/build-module/list-item/index.mjs +4 -0
- package/build-module/list-item/index.mjs.map +2 -2
- package/build-module/loginout/block.json +4 -0
- package/build-module/math/block.json +4 -0
- package/build-module/media-text/block.json +18 -0
- package/build-module/navigation-link/link-ui/index.mjs +39 -20
- package/build-module/navigation-link/link-ui/index.mjs.map +2 -2
- package/build-module/navigation-link/shared/index.mjs +6 -0
- package/build-module/navigation-link/shared/index.mjs.map +2 -2
- package/build-module/navigation-link/shared/use-block-suggestions.mjs +120 -0
- package/build-module/navigation-link/shared/use-block-suggestions.mjs.map +7 -0
- package/build-module/page-list/block.json +4 -0
- package/build-module/paragraph/block.json +1 -0
- package/build-module/post-author-biography/block.json +1 -0
- package/build-module/post-comments-form/block.json +5 -0
- package/build-module/post-content/block.json +2 -1
- package/build-module/post-excerpt/block.json +4 -0
- package/build-module/post-featured-image/block.json +1 -0
- package/build-module/post-featured-image/edit.mjs +1 -1
- package/build-module/post-featured-image/edit.mjs.map +2 -2
- package/build-module/post-terms/block.json +4 -0
- package/build-module/post-time-to-read/block.json +4 -0
- package/build-module/post-title/block.json +4 -0
- package/build-module/preformatted/block.json +4 -0
- package/build-module/pullquote/block.json +2 -1
- package/build-module/query-no-results/block.json +4 -0
- package/build-module/query-pagination/block.json +17 -0
- package/build-module/query-total/block.json +4 -0
- package/build-module/quote/block.json +2 -0
- package/build-module/read-more/block.json +5 -0
- package/build-module/rss/block.json +4 -0
- package/build-module/search/block.json +2 -1
- package/build-module/site-tagline/block.json +4 -0
- package/build-module/site-title/block.json +4 -0
- package/build-module/social-links/block.json +1 -0
- package/build-module/tab-list/block.json +4 -0
- package/build-module/tab-list/edit.mjs +4 -1
- package/build-module/tab-list/edit.mjs.map +2 -2
- package/build-module/tab-list/save.mjs +4 -1
- package/build-module/tab-list/save.mjs.map +2 -2
- package/build-module/tab-panels/block.json +3 -0
- package/build-module/tabs/block.json +3 -0
- package/build-module/term-count/block.json +5 -0
- package/build-module/term-description/block.json +4 -0
- package/build-module/term-name/block.json +6 -1
- package/build-module/term-template/block.json +4 -0
- package/build-module/utils/waveform-utils.mjs +1 -1
- package/build-module/utils/waveform-utils.mjs.map +1 -1
- package/build-module/verse/block.json +4 -0
- package/build-module/video/block.json +7 -1
- package/build-module/video/edit.mjs +10 -2
- package/build-module/video/edit.mjs.map +2 -2
- package/build-style/avatar/editor-rtl.css +4 -0
- package/build-style/avatar/editor.css +4 -0
- package/build-style/comments-pagination/style-rtl.css +3 -0
- package/build-style/comments-pagination/style.css +3 -0
- package/build-style/common-rtl.css +32 -1
- package/build-style/common.css +35 -2
- package/build-style/editor-rtl.css +11 -4
- package/build-style/editor.css +11 -4
- package/build-style/embed/style-rtl.css +4 -1
- package/build-style/embed/style.css +4 -1
- package/build-style/gallery/editor-rtl.css +1 -3
- package/build-style/gallery/editor.css +1 -3
- package/build-style/image/style-rtl.css +11 -2
- package/build-style/image/style.css +11 -2
- package/build-style/media-text/style-rtl.css +4 -1
- package/build-style/media-text/style.css +4 -1
- package/build-style/query-pagination/style-rtl.css +3 -0
- package/build-style/query-pagination/style.css +3 -0
- package/build-style/style-rtl.css +70 -9
- package/build-style/style.css +73 -10
- package/build-style/table/editor-rtl.css +6 -1
- package/build-style/table/editor.css +6 -1
- package/build-style/table/style-rtl.css +4 -2
- package/build-style/table/style.css +4 -2
- package/build-style/tag-cloud/style-rtl.css +1 -1
- package/build-style/tag-cloud/style.css +1 -1
- package/build-style/verse/style-rtl.css +8 -1
- package/build-style/verse/style.css +8 -1
- package/build-types/gallery/order-controls.d.ts +58 -0
- package/build-types/gallery/order-controls.d.ts.map +1 -0
- package/build-types/gallery/order-options.d.ts +67 -0
- package/build-types/gallery/order-options.d.ts.map +1 -0
- package/package.json +44 -41
- package/src/accordion-heading/README.md +1 -0
- package/src/accordion-heading/block.json +1 -0
- package/src/archives/README.md +2 -0
- package/src/archives/block.json +3 -0
- package/src/audio/edit.jsx +2 -1
- package/src/avatar/README.md +2 -0
- package/src/avatar/block.json +4 -0
- package/src/avatar/edit.jsx +48 -2
- package/src/avatar/editor.scss +4 -0
- package/src/avatar/index.php +5 -3
- package/src/breadcrumbs/index.php +1 -1
- package/src/button/README.md +4 -0
- package/src/button/block.json +6 -0
- package/src/button/edit.jsx +47 -52
- package/src/button/index.php +47 -0
- package/src/buttons/README.md +4 -0
- package/src/buttons/block.json +6 -1
- package/src/code/README.md +3 -0
- package/src/code/block.json +4 -0
- package/src/column/edit.jsx +6 -0
- package/src/columns/README.md +3 -0
- package/src/columns/block.json +4 -0
- package/src/columns/edit.jsx +1 -131
- package/src/comments/edit/placeholder.jsx +5 -1
- package/src/comments-pagination/README.md +4 -0
- package/src/comments-pagination/block.json +11 -0
- package/src/comments-pagination/style.scss +3 -0
- package/src/common.scss +38 -0
- package/src/cover/README.md +1 -0
- package/src/cover/block.json +2 -1
- package/src/cover/edit/index.jsx +38 -6
- package/src/cover/edit/inspector-controls.jsx +10 -1
- package/src/cover/embed-video-utils.js +18 -10
- package/src/cover/index.php +44 -15
- package/src/cover/test/edit.browser.test.js +182 -2
- package/src/cover/test/embed-video-utils.test.js +48 -0
- package/src/cover/view.js +22 -0
- package/src/details/README.md +2 -0
- package/src/details/block.json +3 -0
- package/src/embed/README.md +4 -0
- package/src/embed/block.json +6 -1
- package/src/embed/style.scss +7 -1
- package/src/file/README.md +4 -0
- package/src/file/block.json +5 -0
- package/src/footnotes/README.md +3 -0
- package/src/footnotes/block.json +4 -0
- package/src/gallery/README.md +13 -0
- package/src/gallery/block.json +13 -0
- package/src/gallery/dynamic-gallery.jsx +11 -91
- package/src/gallery/edit.jsx +146 -47
- package/src/gallery/editor.scss +5 -9
- package/src/gallery/order-controls.tsx +143 -0
- package/src/gallery/order-images.js +111 -0
- package/src/gallery/order-options.ts +75 -0
- package/src/gallery/test/edit.jsdom.test.js +87 -10
- package/src/gallery/test/order-images.js +162 -0
- package/src/gallery/use-dynamic-gallery.js +1 -9
- package/src/gallery/use-get-media.js +7 -2
- package/src/group/edit.jsx +5 -5
- package/src/heading/README.md +4 -0
- package/src/heading/block.json +5 -0
- package/src/home-link/README.md +6 -0
- package/src/home-link/block.json +12 -0
- package/src/icon/components/custom-inserter/index.jsx +5 -1
- package/src/icon/edit.jsx +68 -7
- package/src/icon/index.php +1 -1
- package/src/image/index.php +3 -4
- package/src/image/style.scss +14 -2
- package/src/image/test/use-open-image-media-editor-modal.jsdom.test.js +122 -60
- package/src/image/use-open-image-media-editor-modal.js +37 -41
- package/src/image/view.js +64 -68
- package/src/latest-comments/README.md +3 -0
- package/src/latest-comments/block.json +10 -0
- package/src/latest-posts/README.md +3 -0
- package/src/latest-posts/block.json +4 -0
- package/src/list/README.md +6 -0
- package/src/list/block.json +12 -1
- package/src/list-item/README.md +6 -0
- package/src/list-item/block.json +8 -1
- package/src/list-item/index.js +5 -0
- package/src/loginout/README.md +3 -0
- package/src/loginout/block.json +4 -0
- package/src/math/README.md +3 -0
- package/src/math/block.json +4 -0
- package/src/media-text/README.md +17 -0
- package/src/media-text/block.json +18 -0
- package/src/media-text/style.scss +5 -1
- package/src/navigation/test/use-navigation-menu.jsdom.test.js +1 -1
- package/src/navigation-link/README.md +1 -1
- package/src/navigation-link/link-ui/index.jsx +60 -27
- package/src/navigation-link/link-ui/test/get-suggestions-query.jsdom.test.js +67 -0
- package/src/navigation-link/shared/index.js +4 -0
- package/src/navigation-link/shared/test/use-block-suggestions.jsdom.test.js +158 -0
- package/src/navigation-link/shared/test/use-entity-binding.jsdom.test.js +1 -7
- package/src/navigation-link/shared/use-block-suggestions.js +192 -0
- package/src/page-list/README.md +3 -0
- package/src/page-list/block.json +4 -0
- package/src/paragraph/README.md +1 -0
- package/src/paragraph/block.json +1 -0
- package/src/playlist/test/edit-component.jsdom.test.jsx +11 -11
- package/src/playlist-track/test/edit.jsdom.test.jsx +3 -3
- package/src/post-author-biography/README.md +1 -0
- package/src/post-author-biography/block.json +1 -0
- package/src/post-comments-form/README.md +3 -0
- package/src/post-comments-form/block.json +5 -0
- package/src/post-content/README.md +1 -0
- package/src/post-content/block.json +2 -1
- package/src/post-excerpt/README.md +3 -0
- package/src/post-excerpt/block.json +4 -0
- package/src/post-featured-image/block.json +1 -0
- package/src/post-featured-image/edit.jsx +2 -2
- package/src/post-terms/README.md +3 -0
- package/src/post-terms/block.json +4 -0
- package/src/post-time-to-read/README.md +3 -0
- package/src/post-time-to-read/block.json +4 -0
- package/src/post-title/README.md +3 -0
- package/src/post-title/block.json +4 -0
- package/src/preformatted/README.md +3 -0
- package/src/preformatted/block.json +4 -0
- package/src/pullquote/README.md +1 -0
- package/src/pullquote/block.json +2 -1
- package/src/query-no-results/README.md +3 -0
- package/src/query-no-results/block.json +4 -0
- package/src/query-pagination/README.md +4 -0
- package/src/query-pagination/block.json +17 -0
- package/src/query-pagination/style.scss +3 -0
- package/src/query-total/README.md +3 -0
- package/src/query-total/block.json +4 -0
- package/src/quote/README.md +2 -0
- package/src/quote/block.json +2 -0
- package/src/read-more/README.md +3 -0
- package/src/read-more/block.json +5 -0
- package/src/rss/README.md +3 -0
- package/src/rss/block.json +4 -0
- package/src/search/README.md +1 -0
- package/src/search/block.json +2 -1
- package/src/site-tagline/README.md +3 -0
- package/src/site-tagline/block.json +4 -0
- package/src/site-title/README.md +3 -0
- package/src/site-title/block.json +4 -0
- package/src/social-links/README.md +1 -0
- package/src/social-links/block.json +1 -0
- package/src/tab-list/README.md +2 -0
- package/src/tab-list/block.json +4 -0
- package/src/tab-list/edit.jsx +3 -0
- package/src/tab-list/save.jsx +3 -0
- package/src/tab-panels/README.md +2 -0
- package/src/tab-panels/block.json +3 -0
- package/src/table/editor.scss +8 -2
- package/src/table/style.scss +4 -4
- package/src/tabs/README.md +2 -0
- package/src/tabs/block.json +3 -0
- package/src/tag-cloud/style.scss +1 -1
- package/src/template-part/index.php +16 -3
- package/src/term-count/README.md +4 -0
- package/src/term-count/block.json +5 -0
- package/src/term-description/README.md +3 -0
- package/src/term-description/block.json +4 -0
- package/src/term-name/README.md +4 -0
- package/src/term-name/block.json +6 -1
- package/src/term-template/README.md +3 -0
- package/src/term-template/block.json +4 -0
- package/src/utils/test/waveform-player-auto-init.jsdom.test.js +25 -0
- package/src/utils/test/waveform-player-dependency.jsdom.test.js +7 -60
- package/src/utils/test/waveform-utils.browser.test.js +3 -15
- package/src/utils/waveform-utils.js +1 -1
- package/src/verse/README.md +4 -0
- package/src/verse/block.json +4 -0
- package/src/verse/style.scss +11 -2
- package/src/video/README.md +4 -0
- package/src/video/block.json +7 -1
- package/src/video/edit.jsx +13 -2
- package/build/columns/utils.cjs +0 -112
- package/build/columns/utils.cjs.map +0 -7
- package/build-module/columns/utils.mjs +0 -78
- package/build-module/columns/utils.mjs.map +0 -7
- package/src/columns/test/utils.js +0 -331
- package/src/columns/utils.js +0 -176
|
@@ -38,6 +38,9 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
38
38
|
- [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
|
|
39
39
|
- [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize): `true`
|
|
40
40
|
- [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true`
|
|
41
|
+
- [`dimensions`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#dimensions):
|
|
42
|
+
- `minHeight`: `true`
|
|
43
|
+
- `minWidth`: `true`
|
|
41
44
|
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
|
42
45
|
- `margin`: `true`
|
|
43
46
|
- `padding`: `true`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Kept in a file of its own: the dependency is evaluated once per file and CI
|
|
5
|
+
* shuffles test order, so any sibling test importing it first would leave this
|
|
6
|
+
* one asserting an already scanned document.
|
|
7
|
+
*/
|
|
8
|
+
describe( 'Waveform Player auto-initialization', () => {
|
|
9
|
+
afterEach( () => {
|
|
10
|
+
vi.resetModules();
|
|
11
|
+
document.body.innerHTML = '';
|
|
12
|
+
delete window.WaveformPlayer;
|
|
13
|
+
} );
|
|
14
|
+
|
|
15
|
+
it( 'leaves declarative markup it does not own uninitialized', async () => {
|
|
16
|
+
const element = document.createElement( 'div' );
|
|
17
|
+
element.setAttribute( 'data-waveform-player', '' );
|
|
18
|
+
document.body.appendChild( element );
|
|
19
|
+
|
|
20
|
+
await import( '../waveform-utils' );
|
|
21
|
+
|
|
22
|
+
expect( element ).not.toHaveAttribute( 'data-waveform-initialized' );
|
|
23
|
+
expect( element ).toBeEmptyDOMElement();
|
|
24
|
+
} );
|
|
25
|
+
} );
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function createDeclarativePlayer( attributes = {} ) {
|
|
3
|
+
function createDeclarativePlayer() {
|
|
6
4
|
const element = document.createElement( 'div' );
|
|
7
5
|
element.setAttribute( 'data-waveform-player', '' );
|
|
8
|
-
|
|
9
|
-
for ( const [ name, value ] of Object.entries( attributes ) ) {
|
|
10
|
-
element.setAttribute( name, value );
|
|
11
|
-
}
|
|
12
|
-
|
|
13
6
|
document.body.appendChild( element );
|
|
14
7
|
return element;
|
|
15
8
|
}
|
|
16
9
|
|
|
17
|
-
async function
|
|
18
|
-
|
|
10
|
+
async function loadWaveformUtils() {
|
|
11
|
+
await import( '../waveform-utils' );
|
|
19
12
|
}
|
|
20
13
|
|
|
21
14
|
describe( 'Waveform Player dependency', () => {
|
|
22
|
-
let WaveformPlayer;
|
|
23
15
|
let originalReadyState;
|
|
24
16
|
let jsdomStubs;
|
|
25
17
|
|
|
@@ -48,12 +40,11 @@ describe( 'Waveform Player dependency', () => {
|
|
|
48
40
|
} );
|
|
49
41
|
|
|
50
42
|
afterEach( () => {
|
|
51
|
-
WaveformPlayer?.destroyAll();
|
|
43
|
+
window.WaveformPlayer?.destroyAll();
|
|
52
44
|
jsdomStubs.forEach( ( stub ) => stub.mockRestore() );
|
|
53
45
|
vi.useRealTimers();
|
|
54
46
|
vi.resetModules();
|
|
55
47
|
document.body.innerHTML = '';
|
|
56
|
-
delete window.WaveformPlayer;
|
|
57
48
|
|
|
58
49
|
if ( originalReadyState ) {
|
|
59
50
|
Object.defineProperty( document, 'readyState', originalReadyState );
|
|
@@ -62,55 +53,11 @@ describe( 'Waveform Player dependency', () => {
|
|
|
62
53
|
}
|
|
63
54
|
} );
|
|
64
55
|
|
|
65
|
-
it( '
|
|
66
|
-
const iconValue = `<span ${ FIXTURE_ATTRIBUTE }></span>`;
|
|
67
|
-
const element = createDeclarativePlayer( {
|
|
68
|
-
'data-play-icon': iconValue,
|
|
69
|
-
'data-pause-icon': iconValue,
|
|
70
|
-
} );
|
|
71
|
-
|
|
72
|
-
WaveformPlayer = await loadWaveformPlayer();
|
|
73
|
-
WaveformPlayer.init();
|
|
74
|
-
|
|
75
|
-
expect(
|
|
76
|
-
element.querySelector( `[${ FIXTURE_ATTRIBUTE }]` )
|
|
77
|
-
).toBeNull();
|
|
78
|
-
expect(
|
|
79
|
-
element.querySelector( '.waveform-icon-play svg' )
|
|
80
|
-
).not.toBeNull();
|
|
81
|
-
expect(
|
|
82
|
-
element.querySelector( '.waveform-icon-pause svg' )
|
|
83
|
-
).not.toBeNull();
|
|
84
|
-
} );
|
|
85
|
-
|
|
86
|
-
it( 'supports custom control icons passed to the constructor', async () => {
|
|
87
|
-
const element = document.createElement( 'div' );
|
|
88
|
-
const icon = document.createElementNS(
|
|
89
|
-
'http://www.w3.org/2000/svg',
|
|
90
|
-
'svg'
|
|
91
|
-
);
|
|
92
|
-
icon.setAttribute( FIXTURE_ATTRIBUTE, 'constructor' );
|
|
93
|
-
document.body.appendChild( element );
|
|
94
|
-
|
|
95
|
-
WaveformPlayer = await loadWaveformPlayer();
|
|
96
|
-
new WaveformPlayer( element, {
|
|
97
|
-
playIcon: icon.outerHTML,
|
|
98
|
-
} );
|
|
99
|
-
|
|
100
|
-
expect(
|
|
101
|
-
element.querySelector( `[${ FIXTURE_ATTRIBUTE }="constructor"]` )
|
|
102
|
-
).not.toBeNull();
|
|
103
|
-
} );
|
|
104
|
-
|
|
105
|
-
it( 'initializes declarative players only after an explicit request', async () => {
|
|
56
|
+
it( 'initializes declarative markup that is requested explicitly', async () => {
|
|
106
57
|
const element = createDeclarativePlayer();
|
|
107
58
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
expect( element ).not.toHaveAttribute( 'data-waveform-initialized' );
|
|
111
|
-
expect( element ).toBeEmptyDOMElement();
|
|
112
|
-
|
|
113
|
-
WaveformPlayer.init();
|
|
59
|
+
await loadWaveformUtils();
|
|
60
|
+
window.WaveformPlayer.init( element );
|
|
114
61
|
|
|
115
62
|
expect( element ).toHaveAttribute(
|
|
116
63
|
'data-waveform-initialized',
|
|
@@ -757,24 +757,12 @@ describe( 'Waveform utilities', () => {
|
|
|
757
757
|
} );
|
|
758
758
|
|
|
759
759
|
describe( 'logPlayError', () => {
|
|
760
|
-
let consoleErrorSpy;
|
|
761
|
-
|
|
762
|
-
beforeEach( () => {
|
|
763
|
-
consoleErrorSpy = vi
|
|
764
|
-
.spyOn( console, 'error' )
|
|
765
|
-
.mockImplementation( () => {} );
|
|
766
|
-
} );
|
|
767
|
-
|
|
768
|
-
afterEach( () => {
|
|
769
|
-
consoleErrorSpy.mockRestore();
|
|
770
|
-
} );
|
|
771
|
-
|
|
772
760
|
it( 'should not log AbortError', () => {
|
|
773
761
|
const abortError = new DOMException( 'Aborted', 'AbortError' );
|
|
774
762
|
|
|
775
763
|
logPlayError( abortError );
|
|
776
764
|
|
|
777
|
-
expect(
|
|
765
|
+
expect( console ).not.toHaveErrored();
|
|
778
766
|
} );
|
|
779
767
|
|
|
780
768
|
it( 'should log other errors', () => {
|
|
@@ -782,7 +770,7 @@ describe( 'Waveform utilities', () => {
|
|
|
782
770
|
|
|
783
771
|
logPlayError( otherError );
|
|
784
772
|
|
|
785
|
-
expect(
|
|
773
|
+
expect( console ).toHaveErroredWith(
|
|
786
774
|
'Playlist play error:',
|
|
787
775
|
otherError
|
|
788
776
|
);
|
|
@@ -796,7 +784,7 @@ describe( 'Waveform utilities', () => {
|
|
|
796
784
|
|
|
797
785
|
logPlayError( notAllowedError );
|
|
798
786
|
|
|
799
|
-
expect(
|
|
787
|
+
expect( console ).toHaveErroredWith(
|
|
800
788
|
'Playlist play error:',
|
|
801
789
|
notAllowedError
|
|
802
790
|
);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Used by both the WaveformPlayer component (editor) and view.js (frontend).
|
|
4
4
|
*/
|
|
5
5
|
import { colord } from 'colord';
|
|
6
|
-
import WaveformPlayerLib from '@arraypress/waveform-player';
|
|
6
|
+
import WaveformPlayerLib from '@arraypress/waveform-player/no-autoinit';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Configuration constants.
|
package/src/verse/README.md
CHANGED
|
@@ -31,10 +31,14 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
31
31
|
- [`link`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-link): `true`
|
|
32
32
|
- [`dimensions`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#dimensions):
|
|
33
33
|
- `minHeight`: `true`
|
|
34
|
+
- `minWidth`: `true`
|
|
34
35
|
- [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
|
|
35
36
|
- [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize): `true`
|
|
36
37
|
- [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true`
|
|
37
38
|
- [`textAlign`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-textalign): `true`
|
|
39
|
+
- `textColumns`: `true`
|
|
40
|
+
- `textIndent`: `true`
|
|
41
|
+
- `fitText`: `true`
|
|
38
42
|
- [`shadow`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#shadow): `true`
|
|
39
43
|
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
|
40
44
|
- `margin`: `true`
|
package/src/verse/block.json
CHANGED
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dimensions": {
|
|
39
39
|
"minHeight": true,
|
|
40
|
+
"minWidth": true,
|
|
40
41
|
"__experimentalDefaultControls": {
|
|
41
42
|
"minHeight": false
|
|
42
43
|
}
|
|
@@ -46,12 +47,15 @@
|
|
|
46
47
|
"__experimentalFontFamily": true,
|
|
47
48
|
"lineHeight": true,
|
|
48
49
|
"textAlign": true,
|
|
50
|
+
"textColumns": true,
|
|
51
|
+
"textIndent": true,
|
|
49
52
|
"__experimentalFontStyle": true,
|
|
50
53
|
"__experimentalFontWeight": true,
|
|
51
54
|
"__experimentalLetterSpacing": true,
|
|
52
55
|
"__experimentalTextTransform": true,
|
|
53
56
|
"__experimentalTextDecoration": true,
|
|
54
57
|
"__experimentalWritingMode": true,
|
|
58
|
+
"fitText": true,
|
|
55
59
|
"__experimentalDefaultControls": {
|
|
56
60
|
"fontSize": true
|
|
57
61
|
}
|
package/src/verse/style.scss
CHANGED
|
@@ -2,13 +2,22 @@ pre.wp-block-verse {
|
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
overflow: auto;
|
|
4
4
|
white-space: pre-wrap;
|
|
5
|
+
word-break: normal;
|
|
6
|
+
overflow-wrap: break-word;
|
|
7
|
+
}
|
|
5
8
|
|
|
9
|
+
:root :where(pre.wp-block-verse) {
|
|
6
10
|
// Prevent text overflow off-screen when the previous block has float.
|
|
11
|
+
// :root :where() matches Global Styles specificity so a minimum width set
|
|
12
|
+
// there can win, since block library styles load first.
|
|
7
13
|
min-width: 1em;
|
|
8
|
-
word-break: normal;
|
|
9
|
-
overflow-wrap: break-word;
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
:where(pre.wp-block-verse) {
|
|
13
17
|
font-family: inherit;
|
|
14
18
|
}
|
|
19
|
+
|
|
20
|
+
// Fit text sets `white-space: nowrap`, which collapses the spacing poetry relies on.
|
|
21
|
+
pre.wp-block-verse.has-fit-text {
|
|
22
|
+
white-space: pre !important;
|
|
23
|
+
}
|
package/src/video/README.md
CHANGED
|
@@ -36,6 +36,8 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
36
36
|
|
|
37
37
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
38
38
|
- [`align`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#align): `true`
|
|
39
|
+
- [`filter`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#filter):
|
|
40
|
+
- [`duotone`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#filter-duotone): `true`
|
|
39
41
|
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
|
40
42
|
- `margin`: `true`
|
|
41
43
|
- `padding`: `true`
|
|
@@ -48,6 +50,8 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
48
50
|
_Defined via the [`selectors`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-selectors/) property in block.json._
|
|
49
51
|
|
|
50
52
|
- **shadow**: `.wp-block-video video`
|
|
53
|
+
- **filter**:
|
|
54
|
+
- duotone: `.wp-block-video video`
|
|
51
55
|
|
|
52
56
|
## Block Markup
|
|
53
57
|
|
package/src/video/block.json
CHANGED
|
@@ -91,6 +91,9 @@
|
|
|
91
91
|
"supports": {
|
|
92
92
|
"anchor": true,
|
|
93
93
|
"align": true,
|
|
94
|
+
"filter": {
|
|
95
|
+
"duotone": true
|
|
96
|
+
},
|
|
94
97
|
"spacing": {
|
|
95
98
|
"margin": true,
|
|
96
99
|
"padding": true,
|
|
@@ -107,7 +110,10 @@
|
|
|
107
110
|
}
|
|
108
111
|
},
|
|
109
112
|
"selectors": {
|
|
110
|
-
"shadow": ".wp-block-video video"
|
|
113
|
+
"shadow": ".wp-block-video video",
|
|
114
|
+
"filter": {
|
|
115
|
+
"duotone": ".wp-block-video video"
|
|
116
|
+
}
|
|
111
117
|
},
|
|
112
118
|
"editorStyle": "wp-block-video-editor",
|
|
113
119
|
"style": "wp-block-video"
|
package/src/video/edit.jsx
CHANGED
|
@@ -16,7 +16,9 @@ import {
|
|
|
16
16
|
__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,
|
|
17
17
|
} from '@wordpress/block-editor';
|
|
18
18
|
import { useRef, useEffect, useState } from '@wordpress/element';
|
|
19
|
+
import { useReducedMotion } from '@wordpress/compose';
|
|
19
20
|
import { __ } from '@wordpress/i18n';
|
|
21
|
+
import { inertValue } from '@wordpress/react-inert-value';
|
|
20
22
|
import { useDispatch } from '@wordpress/data';
|
|
21
23
|
import { video as icon } from '@wordpress/icons';
|
|
22
24
|
import { store as noticesStore } from '@wordpress/notices';
|
|
@@ -73,6 +75,7 @@ function VideoEdit( {
|
|
|
73
75
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
74
76
|
const blockEditingMode = useBlockEditingMode();
|
|
75
77
|
const hasNonContentControls = blockEditingMode === 'default';
|
|
78
|
+
const prefersReducedMotion = useReducedMotion();
|
|
76
79
|
|
|
77
80
|
useUploadMediaFromBlobURL( {
|
|
78
81
|
url: temporaryURL,
|
|
@@ -87,6 +90,14 @@ function VideoEdit( {
|
|
|
87
90
|
videoPlayer.current.load();
|
|
88
91
|
}
|
|
89
92
|
}, [ poster ] );
|
|
93
|
+
|
|
94
|
+
// `autoPlay` only applies when the video loads, so pause a video that is
|
|
95
|
+
// already playing when the user turns on reduced motion.
|
|
96
|
+
useEffect( () => {
|
|
97
|
+
if ( prefersReducedMotion ) {
|
|
98
|
+
videoPlayer.current?.pause();
|
|
99
|
+
}
|
|
100
|
+
}, [ prefersReducedMotion ] );
|
|
90
101
|
// TODO: Whether the video was obtained from the media library or was provided by URL, obtain the `videoWidth` and `videoHeight` of the video once its metadata has loaded and persist in the block attributes.
|
|
91
102
|
function onSelectVideo( media ) {
|
|
92
103
|
if ( ! media || ! media.url ) {
|
|
@@ -250,11 +261,11 @@ function VideoEdit( {
|
|
|
250
261
|
<figure { ...blockProps }>
|
|
251
262
|
<video
|
|
252
263
|
controls={ controls }
|
|
253
|
-
inert={ ! isSingleSelected
|
|
264
|
+
inert={ inertValue( ! isSingleSelected ) }
|
|
254
265
|
poster={ poster }
|
|
255
266
|
src={ src || temporaryURL }
|
|
256
267
|
ref={ videoPlayer }
|
|
257
|
-
autoPlay={ autoplay }
|
|
268
|
+
autoPlay={ autoplay && ! prefersReducedMotion }
|
|
258
269
|
loop={ loop }
|
|
259
270
|
muted={ muted }
|
|
260
271
|
playsInline={ playsInline }
|
package/build/columns/utils.cjs
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
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/columns/utils.js
|
|
21
|
-
var utils_exports = {};
|
|
22
|
-
__export(utils_exports, {
|
|
23
|
-
getColumnWidths: () => getColumnWidths,
|
|
24
|
-
getEffectiveColumnWidth: () => getEffectiveColumnWidth,
|
|
25
|
-
getMappedColumnWidths: () => getMappedColumnWidths,
|
|
26
|
-
getRedistributedColumnWidths: () => getRedistributedColumnWidths,
|
|
27
|
-
getTotalColumnsWidth: () => getTotalColumnsWidth,
|
|
28
|
-
getWidthWithUnit: () => getWidthWithUnit,
|
|
29
|
-
getWidths: () => getWidths,
|
|
30
|
-
hasExplicitPercentColumnWidths: () => hasExplicitPercentColumnWidths,
|
|
31
|
-
isPercentageUnit: () => isPercentageUnit,
|
|
32
|
-
toWidthPrecision: () => toWidthPrecision
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(utils_exports);
|
|
35
|
-
var toWidthPrecision = (value) => {
|
|
36
|
-
const unitlessValue = parseFloat(value);
|
|
37
|
-
return Number.isFinite(unitlessValue) ? parseFloat(unitlessValue.toFixed(2)) : void 0;
|
|
38
|
-
};
|
|
39
|
-
function getEffectiveColumnWidth(block, totalBlockCount) {
|
|
40
|
-
const { width = 100 / totalBlockCount } = block.attributes;
|
|
41
|
-
return toWidthPrecision(width);
|
|
42
|
-
}
|
|
43
|
-
function getTotalColumnsWidth(blocks, totalBlockCount = blocks.length) {
|
|
44
|
-
return blocks.reduce(
|
|
45
|
-
(sum, block) => sum + getEffectiveColumnWidth(block, totalBlockCount),
|
|
46
|
-
0
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
function getColumnWidths(blocks, totalBlockCount = blocks.length) {
|
|
50
|
-
return blocks.reduce((accumulator, block) => {
|
|
51
|
-
const width = getEffectiveColumnWidth(block, totalBlockCount);
|
|
52
|
-
return Object.assign(accumulator, { [block.clientId]: width });
|
|
53
|
-
}, {});
|
|
54
|
-
}
|
|
55
|
-
function getRedistributedColumnWidths(blocks, availableWidth, totalBlockCount = blocks.length) {
|
|
56
|
-
const totalWidth = getTotalColumnsWidth(blocks, totalBlockCount);
|
|
57
|
-
return Object.fromEntries(
|
|
58
|
-
Object.entries(getColumnWidths(blocks, totalBlockCount)).map(
|
|
59
|
-
([clientId, width]) => {
|
|
60
|
-
const newWidth = availableWidth * width / totalWidth;
|
|
61
|
-
return [clientId, toWidthPrecision(newWidth)];
|
|
62
|
-
}
|
|
63
|
-
)
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
function hasExplicitPercentColumnWidths(blocks) {
|
|
67
|
-
return blocks.every((block) => {
|
|
68
|
-
const blockWidth = block.attributes.width;
|
|
69
|
-
return Number.isFinite(
|
|
70
|
-
blockWidth?.endsWith?.("%") ? parseFloat(blockWidth) : blockWidth
|
|
71
|
-
);
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
function getMappedColumnWidths(blocks, widths) {
|
|
75
|
-
return blocks.map((block) => ({
|
|
76
|
-
...block,
|
|
77
|
-
attributes: {
|
|
78
|
-
...block.attributes,
|
|
79
|
-
width: `${widths[block.clientId]}%`
|
|
80
|
-
}
|
|
81
|
-
}));
|
|
82
|
-
}
|
|
83
|
-
function getWidths(blocks, withParsing = true) {
|
|
84
|
-
return blocks.map((innerColumn) => {
|
|
85
|
-
const innerColumnWidth = innerColumn.attributes.width || 100 / blocks.length;
|
|
86
|
-
return withParsing ? parseFloat(innerColumnWidth) : innerColumnWidth;
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
function getWidthWithUnit(width, unit) {
|
|
90
|
-
width = 0 > parseFloat(width) ? "0" : width;
|
|
91
|
-
if (isPercentageUnit(unit)) {
|
|
92
|
-
width = Math.min(width, 100);
|
|
93
|
-
}
|
|
94
|
-
return `${width}${unit}`;
|
|
95
|
-
}
|
|
96
|
-
function isPercentageUnit(unit) {
|
|
97
|
-
return unit === "%";
|
|
98
|
-
}
|
|
99
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
100
|
-
0 && (module.exports = {
|
|
101
|
-
getColumnWidths,
|
|
102
|
-
getEffectiveColumnWidth,
|
|
103
|
-
getMappedColumnWidths,
|
|
104
|
-
getRedistributedColumnWidths,
|
|
105
|
-
getTotalColumnsWidth,
|
|
106
|
-
getWidthWithUnit,
|
|
107
|
-
getWidths,
|
|
108
|
-
hasExplicitPercentColumnWidths,
|
|
109
|
-
isPercentageUnit,
|
|
110
|
-
toWidthPrecision
|
|
111
|
-
});
|
|
112
|
-
//# sourceMappingURL=utils.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/columns/utils.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Returns a column width attribute value rounded to standard precision.\n * Returns `undefined` if the value is not a valid finite number.\n *\n * @param {?number} value Raw value.\n *\n * @return {number} Value rounded to standard precision.\n */\nexport const toWidthPrecision = ( value ) => {\n\tconst unitlessValue = parseFloat( value );\n\treturn Number.isFinite( unitlessValue )\n\t\t? parseFloat( unitlessValue.toFixed( 2 ) )\n\t\t: undefined;\n};\n/**\n * Returns an effective width for a given block. An effective width is equal to\n * its attribute value if set, or a computed value assuming equal distribution.\n *\n * @param {WPBlock} block Block object.\n * @param {number} totalBlockCount Total number of blocks in Columns.\n *\n * @return {number} Effective column width.\n */\nexport function getEffectiveColumnWidth( block, totalBlockCount ) {\n\tconst { width = 100 / totalBlockCount } = block.attributes;\n\treturn toWidthPrecision( width );\n}\n\n/**\n * Returns the total width occupied by the given set of column blocks.\n *\n * @param {WPBlock[]} blocks Block objects.\n * @param {?number} totalBlockCount Total number of blocks in Columns.\n * Defaults to number of blocks passed.\n *\n * @return {number} Total width occupied by blocks.\n */\nexport function getTotalColumnsWidth(\n\tblocks,\n\ttotalBlockCount = blocks.length\n) {\n\treturn blocks.reduce(\n\t\t( sum, block ) =>\n\t\t\tsum + getEffectiveColumnWidth( block, totalBlockCount ),\n\t\t0\n\t);\n}\n\n/**\n * Returns an object of `clientId` → `width` of effective column widths.\n *\n * @param {WPBlock[]} blocks Block objects.\n * @param {?number} totalBlockCount Total number of blocks in Columns.\n * Defaults to number of blocks passed.\n *\n * @return {Object<string,number>} Column widths.\n */\nexport function getColumnWidths( blocks, totalBlockCount = blocks.length ) {\n\treturn blocks.reduce( ( accumulator, block ) => {\n\t\tconst width = getEffectiveColumnWidth( block, totalBlockCount );\n\t\treturn Object.assign( accumulator, { [ block.clientId ]: width } );\n\t}, {} );\n}\n\n/**\n * Returns an object of `clientId` → `width` of column widths as redistributed\n * proportional to their current widths, constrained or expanded to fit within\n * the given available width.\n *\n * @param {WPBlock[]} blocks Block objects.\n * @param {number} availableWidth Maximum width to fit within.\n * @param {?number} totalBlockCount Total number of blocks in Columns.\n * Defaults to number of blocks passed.\n *\n * @return {Object<string,number>} Redistributed column widths.\n */\nexport function getRedistributedColumnWidths(\n\tblocks,\n\tavailableWidth,\n\ttotalBlockCount = blocks.length\n) {\n\tconst totalWidth = getTotalColumnsWidth( blocks, totalBlockCount );\n\n\treturn Object.fromEntries(\n\t\tObject.entries( getColumnWidths( blocks, totalBlockCount ) ).map(\n\t\t\t( [ clientId, width ] ) => {\n\t\t\t\tconst newWidth = ( availableWidth * width ) / totalWidth;\n\t\t\t\treturn [ clientId, toWidthPrecision( newWidth ) ];\n\t\t\t}\n\t\t)\n\t);\n}\n\n/**\n * Returns true if column blocks within the provided set are assigned with\n * explicit widths, or false otherwise.\n *\n * @param {WPBlock[]} blocks Block objects.\n *\n * @return {boolean} Whether columns have explicit widths.\n */\nexport function hasExplicitPercentColumnWidths( blocks ) {\n\treturn blocks.every( ( block ) => {\n\t\tconst blockWidth = block.attributes.width;\n\t\treturn Number.isFinite(\n\t\t\tblockWidth?.endsWith?.( '%' )\n\t\t\t\t? parseFloat( blockWidth )\n\t\t\t\t: blockWidth\n\t\t);\n\t} );\n}\n\n/**\n * Returns a copy of the given set of blocks with new widths assigned from the\n * provided object of redistributed column widths.\n *\n * @param {WPBlock[]} blocks Block objects.\n * @param {Object<string,number>} widths Redistributed column widths.\n *\n * @return {WPBlock[]} blocks Mapped block objects.\n */\nexport function getMappedColumnWidths( blocks, widths ) {\n\treturn blocks.map( ( block ) => ( {\n\t\t...block,\n\t\tattributes: {\n\t\t\t...block.attributes,\n\t\t\twidth: `${ widths[ block.clientId ] }%`,\n\t\t},\n\t} ) );\n}\n\n/**\n * Returns an array with columns widths values, parsed or no depends on `withParsing` flag.\n *\n * @param {WPBlock[]} blocks Block objects.\n * @param {?boolean} withParsing Whether value has to be parsed.\n *\n * @return {Array<number,string>} Column widths.\n */\nexport function getWidths( blocks, withParsing = true ) {\n\treturn blocks.map( ( innerColumn ) => {\n\t\tconst innerColumnWidth =\n\t\t\tinnerColumn.attributes.width || 100 / blocks.length;\n\n\t\treturn withParsing ? parseFloat( innerColumnWidth ) : innerColumnWidth;\n\t} );\n}\n\n/**\n * Returns a column width with unit.\n *\n * @param {string} width Column width.\n * @param {string} unit Column width unit.\n *\n * @return {string} Column width with unit.\n */\nexport function getWidthWithUnit( width, unit ) {\n\twidth = 0 > parseFloat( width ) ? '0' : width;\n\n\tif ( isPercentageUnit( unit ) ) {\n\t\twidth = Math.min( width, 100 );\n\t}\n\n\treturn `${ width }${ unit }`;\n}\n\n/**\n * Returns a boolean whether passed unit is percentage\n *\n * @param {string} unit Column width unit.\n *\n * @return {boolean} \tWhether unit is '%'.\n */\nexport function isPercentageUnit( unit ) {\n\treturn unit === '%';\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,IAAM,mBAAmB,CAAE,UAAW;AAC5C,QAAM,gBAAgB,WAAY,KAAM;AACxC,SAAO,OAAO,SAAU,aAAc,IACnC,WAAY,cAAc,QAAS,CAAE,CAAE,IACvC;AACJ;AAUO,SAAS,wBAAyB,OAAO,iBAAkB;AACjE,QAAM,EAAE,QAAQ,MAAM,gBAAgB,IAAI,MAAM;AAChD,SAAO,iBAAkB,KAAM;AAChC;AAWO,SAAS,qBACf,QACA,kBAAkB,OAAO,QACxB;AACD,SAAO,OAAO;AAAA,IACb,CAAE,KAAK,UACN,MAAM,wBAAyB,OAAO,eAAgB;AAAA,IACvD;AAAA,EACD;AACD;AAWO,SAAS,gBAAiB,QAAQ,kBAAkB,OAAO,QAAS;AAC1E,SAAO,OAAO,OAAQ,CAAE,aAAa,UAAW;AAC/C,UAAM,QAAQ,wBAAyB,OAAO,eAAgB;AAC9D,WAAO,OAAO,OAAQ,aAAa,EAAE,CAAE,MAAM,QAAS,GAAG,MAAM,CAAE;AAAA,EAClE,GAAG,CAAC,CAAE;AACP;AAcO,SAAS,6BACf,QACA,gBACA,kBAAkB,OAAO,QACxB;AACD,QAAM,aAAa,qBAAsB,QAAQ,eAAgB;AAEjE,SAAO,OAAO;AAAA,IACb,OAAO,QAAS,gBAAiB,QAAQ,eAAgB,CAAE,EAAE;AAAA,MAC5D,CAAE,CAAE,UAAU,KAAM,MAAO;AAC1B,cAAM,WAAa,iBAAiB,QAAU;AAC9C,eAAO,CAAE,UAAU,iBAAkB,QAAS,CAAE;AAAA,MACjD;AAAA,IACD;AAAA,EACD;AACD;AAUO,SAAS,+BAAgC,QAAS;AACxD,SAAO,OAAO,MAAO,CAAE,UAAW;AACjC,UAAM,aAAa,MAAM,WAAW;AACpC,WAAO,OAAO;AAAA,MACb,YAAY,WAAY,GAAI,IACzB,WAAY,UAAW,IACvB;AAAA,IACJ;AAAA,EACD,CAAE;AACH;AAWO,SAAS,sBAAuB,QAAQ,QAAS;AACvD,SAAO,OAAO,IAAK,CAAE,WAAa;AAAA,IACjC,GAAG;AAAA,IACH,YAAY;AAAA,MACX,GAAG,MAAM;AAAA,MACT,OAAO,GAAI,OAAQ,MAAM,QAAS,CAAE;AAAA,IACrC;AAAA,EACD,EAAI;AACL;AAUO,SAAS,UAAW,QAAQ,cAAc,MAAO;AACvD,SAAO,OAAO,IAAK,CAAE,gBAAiB;AACrC,UAAM,mBACL,YAAY,WAAW,SAAS,MAAM,OAAO;AAE9C,WAAO,cAAc,WAAY,gBAAiB,IAAI;AAAA,EACvD,CAAE;AACH;AAUO,SAAS,iBAAkB,OAAO,MAAO;AAC/C,UAAQ,IAAI,WAAY,KAAM,IAAI,MAAM;AAExC,MAAK,iBAAkB,IAAK,GAAI;AAC/B,YAAQ,KAAK,IAAK,OAAO,GAAI;AAAA,EAC9B;AAEA,SAAO,GAAI,KAAM,GAAI,IAAK;AAC3B;AASO,SAAS,iBAAkB,MAAO;AACxC,SAAO,SAAS;AACjB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
// packages/block-library/src/columns/utils.js
|
|
2
|
-
var toWidthPrecision = (value) => {
|
|
3
|
-
const unitlessValue = parseFloat(value);
|
|
4
|
-
return Number.isFinite(unitlessValue) ? parseFloat(unitlessValue.toFixed(2)) : void 0;
|
|
5
|
-
};
|
|
6
|
-
function getEffectiveColumnWidth(block, totalBlockCount) {
|
|
7
|
-
const { width = 100 / totalBlockCount } = block.attributes;
|
|
8
|
-
return toWidthPrecision(width);
|
|
9
|
-
}
|
|
10
|
-
function getTotalColumnsWidth(blocks, totalBlockCount = blocks.length) {
|
|
11
|
-
return blocks.reduce(
|
|
12
|
-
(sum, block) => sum + getEffectiveColumnWidth(block, totalBlockCount),
|
|
13
|
-
0
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
function getColumnWidths(blocks, totalBlockCount = blocks.length) {
|
|
17
|
-
return blocks.reduce((accumulator, block) => {
|
|
18
|
-
const width = getEffectiveColumnWidth(block, totalBlockCount);
|
|
19
|
-
return Object.assign(accumulator, { [block.clientId]: width });
|
|
20
|
-
}, {});
|
|
21
|
-
}
|
|
22
|
-
function getRedistributedColumnWidths(blocks, availableWidth, totalBlockCount = blocks.length) {
|
|
23
|
-
const totalWidth = getTotalColumnsWidth(blocks, totalBlockCount);
|
|
24
|
-
return Object.fromEntries(
|
|
25
|
-
Object.entries(getColumnWidths(blocks, totalBlockCount)).map(
|
|
26
|
-
([clientId, width]) => {
|
|
27
|
-
const newWidth = availableWidth * width / totalWidth;
|
|
28
|
-
return [clientId, toWidthPrecision(newWidth)];
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
function hasExplicitPercentColumnWidths(blocks) {
|
|
34
|
-
return blocks.every((block) => {
|
|
35
|
-
const blockWidth = block.attributes.width;
|
|
36
|
-
return Number.isFinite(
|
|
37
|
-
blockWidth?.endsWith?.("%") ? parseFloat(blockWidth) : blockWidth
|
|
38
|
-
);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function getMappedColumnWidths(blocks, widths) {
|
|
42
|
-
return blocks.map((block) => ({
|
|
43
|
-
...block,
|
|
44
|
-
attributes: {
|
|
45
|
-
...block.attributes,
|
|
46
|
-
width: `${widths[block.clientId]}%`
|
|
47
|
-
}
|
|
48
|
-
}));
|
|
49
|
-
}
|
|
50
|
-
function getWidths(blocks, withParsing = true) {
|
|
51
|
-
return blocks.map((innerColumn) => {
|
|
52
|
-
const innerColumnWidth = innerColumn.attributes.width || 100 / blocks.length;
|
|
53
|
-
return withParsing ? parseFloat(innerColumnWidth) : innerColumnWidth;
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function getWidthWithUnit(width, unit) {
|
|
57
|
-
width = 0 > parseFloat(width) ? "0" : width;
|
|
58
|
-
if (isPercentageUnit(unit)) {
|
|
59
|
-
width = Math.min(width, 100);
|
|
60
|
-
}
|
|
61
|
-
return `${width}${unit}`;
|
|
62
|
-
}
|
|
63
|
-
function isPercentageUnit(unit) {
|
|
64
|
-
return unit === "%";
|
|
65
|
-
}
|
|
66
|
-
export {
|
|
67
|
-
getColumnWidths,
|
|
68
|
-
getEffectiveColumnWidth,
|
|
69
|
-
getMappedColumnWidths,
|
|
70
|
-
getRedistributedColumnWidths,
|
|
71
|
-
getTotalColumnsWidth,
|
|
72
|
-
getWidthWithUnit,
|
|
73
|
-
getWidths,
|
|
74
|
-
hasExplicitPercentColumnWidths,
|
|
75
|
-
isPercentageUnit,
|
|
76
|
-
toWidthPrecision
|
|
77
|
-
};
|
|
78
|
-
//# sourceMappingURL=utils.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/columns/utils.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Returns a column width attribute value rounded to standard precision.\n * Returns `undefined` if the value is not a valid finite number.\n *\n * @param {?number} value Raw value.\n *\n * @return {number} Value rounded to standard precision.\n */\nexport const toWidthPrecision = ( value ) => {\n\tconst unitlessValue = parseFloat( value );\n\treturn Number.isFinite( unitlessValue )\n\t\t? parseFloat( unitlessValue.toFixed( 2 ) )\n\t\t: undefined;\n};\n/**\n * Returns an effective width for a given block. An effective width is equal to\n * its attribute value if set, or a computed value assuming equal distribution.\n *\n * @param {WPBlock} block Block object.\n * @param {number} totalBlockCount Total number of blocks in Columns.\n *\n * @return {number} Effective column width.\n */\nexport function getEffectiveColumnWidth( block, totalBlockCount ) {\n\tconst { width = 100 / totalBlockCount } = block.attributes;\n\treturn toWidthPrecision( width );\n}\n\n/**\n * Returns the total width occupied by the given set of column blocks.\n *\n * @param {WPBlock[]} blocks Block objects.\n * @param {?number} totalBlockCount Total number of blocks in Columns.\n * Defaults to number of blocks passed.\n *\n * @return {number} Total width occupied by blocks.\n */\nexport function getTotalColumnsWidth(\n\tblocks,\n\ttotalBlockCount = blocks.length\n) {\n\treturn blocks.reduce(\n\t\t( sum, block ) =>\n\t\t\tsum + getEffectiveColumnWidth( block, totalBlockCount ),\n\t\t0\n\t);\n}\n\n/**\n * Returns an object of `clientId` → `width` of effective column widths.\n *\n * @param {WPBlock[]} blocks Block objects.\n * @param {?number} totalBlockCount Total number of blocks in Columns.\n * Defaults to number of blocks passed.\n *\n * @return {Object<string,number>} Column widths.\n */\nexport function getColumnWidths( blocks, totalBlockCount = blocks.length ) {\n\treturn blocks.reduce( ( accumulator, block ) => {\n\t\tconst width = getEffectiveColumnWidth( block, totalBlockCount );\n\t\treturn Object.assign( accumulator, { [ block.clientId ]: width } );\n\t}, {} );\n}\n\n/**\n * Returns an object of `clientId` → `width` of column widths as redistributed\n * proportional to their current widths, constrained or expanded to fit within\n * the given available width.\n *\n * @param {WPBlock[]} blocks Block objects.\n * @param {number} availableWidth Maximum width to fit within.\n * @param {?number} totalBlockCount Total number of blocks in Columns.\n * Defaults to number of blocks passed.\n *\n * @return {Object<string,number>} Redistributed column widths.\n */\nexport function getRedistributedColumnWidths(\n\tblocks,\n\tavailableWidth,\n\ttotalBlockCount = blocks.length\n) {\n\tconst totalWidth = getTotalColumnsWidth( blocks, totalBlockCount );\n\n\treturn Object.fromEntries(\n\t\tObject.entries( getColumnWidths( blocks, totalBlockCount ) ).map(\n\t\t\t( [ clientId, width ] ) => {\n\t\t\t\tconst newWidth = ( availableWidth * width ) / totalWidth;\n\t\t\t\treturn [ clientId, toWidthPrecision( newWidth ) ];\n\t\t\t}\n\t\t)\n\t);\n}\n\n/**\n * Returns true if column blocks within the provided set are assigned with\n * explicit widths, or false otherwise.\n *\n * @param {WPBlock[]} blocks Block objects.\n *\n * @return {boolean} Whether columns have explicit widths.\n */\nexport function hasExplicitPercentColumnWidths( blocks ) {\n\treturn blocks.every( ( block ) => {\n\t\tconst blockWidth = block.attributes.width;\n\t\treturn Number.isFinite(\n\t\t\tblockWidth?.endsWith?.( '%' )\n\t\t\t\t? parseFloat( blockWidth )\n\t\t\t\t: blockWidth\n\t\t);\n\t} );\n}\n\n/**\n * Returns a copy of the given set of blocks with new widths assigned from the\n * provided object of redistributed column widths.\n *\n * @param {WPBlock[]} blocks Block objects.\n * @param {Object<string,number>} widths Redistributed column widths.\n *\n * @return {WPBlock[]} blocks Mapped block objects.\n */\nexport function getMappedColumnWidths( blocks, widths ) {\n\treturn blocks.map( ( block ) => ( {\n\t\t...block,\n\t\tattributes: {\n\t\t\t...block.attributes,\n\t\t\twidth: `${ widths[ block.clientId ] }%`,\n\t\t},\n\t} ) );\n}\n\n/**\n * Returns an array with columns widths values, parsed or no depends on `withParsing` flag.\n *\n * @param {WPBlock[]} blocks Block objects.\n * @param {?boolean} withParsing Whether value has to be parsed.\n *\n * @return {Array<number,string>} Column widths.\n */\nexport function getWidths( blocks, withParsing = true ) {\n\treturn blocks.map( ( innerColumn ) => {\n\t\tconst innerColumnWidth =\n\t\t\tinnerColumn.attributes.width || 100 / blocks.length;\n\n\t\treturn withParsing ? parseFloat( innerColumnWidth ) : innerColumnWidth;\n\t} );\n}\n\n/**\n * Returns a column width with unit.\n *\n * @param {string} width Column width.\n * @param {string} unit Column width unit.\n *\n * @return {string} Column width with unit.\n */\nexport function getWidthWithUnit( width, unit ) {\n\twidth = 0 > parseFloat( width ) ? '0' : width;\n\n\tif ( isPercentageUnit( unit ) ) {\n\t\twidth = Math.min( width, 100 );\n\t}\n\n\treturn `${ width }${ unit }`;\n}\n\n/**\n * Returns a boolean whether passed unit is percentage\n *\n * @param {string} unit Column width unit.\n *\n * @return {boolean} \tWhether unit is '%'.\n */\nexport function isPercentageUnit( unit ) {\n\treturn unit === '%';\n}\n"],
|
|
5
|
-
"mappings": ";AAQO,IAAM,mBAAmB,CAAE,UAAW;AAC5C,QAAM,gBAAgB,WAAY,KAAM;AACxC,SAAO,OAAO,SAAU,aAAc,IACnC,WAAY,cAAc,QAAS,CAAE,CAAE,IACvC;AACJ;AAUO,SAAS,wBAAyB,OAAO,iBAAkB;AACjE,QAAM,EAAE,QAAQ,MAAM,gBAAgB,IAAI,MAAM;AAChD,SAAO,iBAAkB,KAAM;AAChC;AAWO,SAAS,qBACf,QACA,kBAAkB,OAAO,QACxB;AACD,SAAO,OAAO;AAAA,IACb,CAAE,KAAK,UACN,MAAM,wBAAyB,OAAO,eAAgB;AAAA,IACvD;AAAA,EACD;AACD;AAWO,SAAS,gBAAiB,QAAQ,kBAAkB,OAAO,QAAS;AAC1E,SAAO,OAAO,OAAQ,CAAE,aAAa,UAAW;AAC/C,UAAM,QAAQ,wBAAyB,OAAO,eAAgB;AAC9D,WAAO,OAAO,OAAQ,aAAa,EAAE,CAAE,MAAM,QAAS,GAAG,MAAM,CAAE;AAAA,EAClE,GAAG,CAAC,CAAE;AACP;AAcO,SAAS,6BACf,QACA,gBACA,kBAAkB,OAAO,QACxB;AACD,QAAM,aAAa,qBAAsB,QAAQ,eAAgB;AAEjE,SAAO,OAAO;AAAA,IACb,OAAO,QAAS,gBAAiB,QAAQ,eAAgB,CAAE,EAAE;AAAA,MAC5D,CAAE,CAAE,UAAU,KAAM,MAAO;AAC1B,cAAM,WAAa,iBAAiB,QAAU;AAC9C,eAAO,CAAE,UAAU,iBAAkB,QAAS,CAAE;AAAA,MACjD;AAAA,IACD;AAAA,EACD;AACD;AAUO,SAAS,+BAAgC,QAAS;AACxD,SAAO,OAAO,MAAO,CAAE,UAAW;AACjC,UAAM,aAAa,MAAM,WAAW;AACpC,WAAO,OAAO;AAAA,MACb,YAAY,WAAY,GAAI,IACzB,WAAY,UAAW,IACvB;AAAA,IACJ;AAAA,EACD,CAAE;AACH;AAWO,SAAS,sBAAuB,QAAQ,QAAS;AACvD,SAAO,OAAO,IAAK,CAAE,WAAa;AAAA,IACjC,GAAG;AAAA,IACH,YAAY;AAAA,MACX,GAAG,MAAM;AAAA,MACT,OAAO,GAAI,OAAQ,MAAM,QAAS,CAAE;AAAA,IACrC;AAAA,EACD,EAAI;AACL;AAUO,SAAS,UAAW,QAAQ,cAAc,MAAO;AACvD,SAAO,OAAO,IAAK,CAAE,gBAAiB;AACrC,UAAM,mBACL,YAAY,WAAW,SAAS,MAAM,OAAO;AAE9C,WAAO,cAAc,WAAY,gBAAiB,IAAI;AAAA,EACvD,CAAE;AACH;AAUO,SAAS,iBAAkB,OAAO,MAAO;AAC/C,UAAQ,IAAI,WAAY,KAAM,IAAI,MAAM;AAExC,MAAK,iBAAkB,IAAK,GAAI;AAC/B,YAAQ,KAAK,IAAK,OAAO,GAAI;AAAA,EAC9B;AAEA,SAAO,GAAI,KAAM,GAAI,IAAK;AAC3B;AASO,SAAS,iBAAkB,MAAO;AACxC,SAAO,SAAS;AACjB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|