@wordpress/block-library 10.1.1-next.v.202607070741.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 +9 -0
- package/build/accordion/block.json +1 -0
- package/build/button/edit.cjs +18 -8
- package/build/button/edit.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/embed-video-utils.cjs +17 -7
- package/build/cover/embed-video-utils.cjs.map +2 -2
- package/build/details/transforms.cjs +1 -3
- package/build/details/transforms.cjs.map +2 -2
- package/build/embed/embed-placeholder.cjs +0 -1
- package/build/embed/embed-placeholder.cjs.map +2 -2
- package/build/file/edit.cjs +4 -3
- package/build/file/edit.cjs.map +2 -2
- package/build/file/transforms.cjs +25 -60
- package/build/file/transforms.cjs.map +2 -2
- package/build/gallery/block.json +4 -2
- package/build/gallery/edit.cjs +1 -1
- package/build/gallery/edit.cjs.map +3 -3
- package/build/gallery/gap-styles.cjs +49 -13
- package/build/gallery/gap-styles.cjs.map +3 -3
- package/build/group/transforms.cjs +1 -1
- package/build/group/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/edit.cjs +0 -34
- package/build/image/edit.cjs.map +2 -2
- package/build/image/image.cjs +4 -23
- 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-posts/edit.cjs +5 -8
- package/build/latest-posts/edit.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/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 +29 -10
- package/build/playlist/edit.cjs +216 -14
- 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 -5
- package/build/playlist/utils.cjs.map +2 -2
- package/build/playlist/view.cjs +83 -13
- package/build/playlist/view.cjs.map +2 -2
- package/build/playlist-track/block.json +4 -2
- package/build/playlist-track/edit.cjs +94 -64
- package/build/playlist-track/edit.cjs.map +2 -2
- package/build/post-content/block.json +1 -0
- 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/index.cjs +38 -4
- 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/pages-control.cjs +0 -1
- package/build/query/edit/inspector-controls/pages-control.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/quote/block.json +3 -1
- package/build/quote/transforms.cjs +1 -3
- package/build/quote/transforms.cjs.map +2 -2
- package/build/rss/edit.cjs +0 -1
- package/build/rss/edit.cjs.map +2 -2
- package/build/tab-list/block.json +2 -2
- package/build/tab-list/edit.cjs +65 -11
- package/build/tab-list/edit.cjs.map +3 -3
- package/build/tab-panel/block.json +1 -6
- 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/tabs/block.json +0 -5
- package/build/tabs/edit.cjs +4 -39
- package/build/tabs/edit.cjs.map +3 -3
- package/build/tabs/use-tab-list-items-sync.cjs +19 -1
- package/build/tabs/use-tab-list-items-sync.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/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/video/edit.cjs +2 -11
- package/build/video/edit.cjs.map +3 -3
- package/build-module/accordion/block.json +1 -0
- package/build-module/button/edit.mjs +19 -14
- package/build-module/button/edit.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/embed-video-utils.mjs +16 -7
- package/build-module/cover/embed-video-utils.mjs.map +2 -2
- package/build-module/details/transforms.mjs +2 -7
- package/build-module/details/transforms.mjs.map +2 -2
- package/build-module/embed/embed-placeholder.mjs +0 -1
- 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/transforms.mjs +25 -60
- package/build-module/file/transforms.mjs.map +2 -2
- package/build-module/gallery/block.json +4 -2
- package/build-module/gallery/edit.mjs +3 -3
- package/build-module/gallery/edit.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/group/transforms.mjs +2 -5
- package/build-module/group/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/edit.mjs +0 -34
- package/build-module/image/edit.mjs.map +2 -2
- package/build-module/image/image.mjs +4 -13
- 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-posts/edit.mjs +5 -8
- package/build-module/latest-posts/edit.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/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 +29 -10
- package/build-module/playlist/edit.mjs +220 -16
- 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 -4
- package/build-module/playlist/utils.mjs.map +2 -2
- package/build-module/playlist/view.mjs +89 -14
- package/build-module/playlist/view.mjs.map +2 -2
- package/build-module/playlist-track/block.json +4 -2
- package/build-module/playlist-track/edit.mjs +96 -65
- package/build-module/playlist-track/edit.mjs.map +2 -2
- package/build-module/post-content/block.json +1 -0
- 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/index.mjs +40 -5
- 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/pages-control.mjs +0 -1
- package/build-module/query/edit/inspector-controls/pages-control.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/quote/block.json +3 -1
- package/build-module/quote/transforms.mjs +2 -4
- package/build-module/quote/transforms.mjs.map +2 -2
- package/build-module/rss/edit.mjs +0 -1
- package/build-module/rss/edit.mjs.map +2 -2
- package/build-module/tab-list/block.json +2 -2
- package/build-module/tab-list/edit.mjs +72 -13
- package/build-module/tab-list/edit.mjs.map +2 -2
- package/build-module/tab-panel/block.json +1 -6
- 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/tabs/block.json +0 -5
- package/build-module/tabs/edit.mjs +5 -45
- package/build-module/tabs/edit.mjs.map +2 -2
- package/build-module/tabs/use-tab-list-items-sync.mjs +19 -1
- package/build-module/tabs/use-tab-list-items-sync.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/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/video/edit.mjs +2 -11
- package/build-module/video/edit.mjs.map +2 -2
- package/build-style/editor-rtl.css +46 -21
- package/build-style/editor.css +46 -21
- package/build-style/icon/editor-rtl.css +80 -7
- package/build-style/icon/editor.css +80 -7
- package/build-style/more/editor-rtl.css +2 -2
- package/build-style/more/editor.css +2 -2
- package/build-style/navigation/editor-rtl.css +3 -4
- package/build-style/navigation/editor.css +3 -4
- package/build-style/navigation-link/editor-rtl.css +1 -1
- package/build-style/navigation-link/editor.css +1 -1
- package/build-style/nextpage/editor-rtl.css +2 -2
- package/build-style/nextpage/editor.css +2 -2
- package/build-style/playlist/editor-rtl.css +6 -0
- package/build-style/playlist/editor.css +6 -0
- package/build-style/playlist/style-rtl.css +37 -1
- package/build-style/playlist/style.css +37 -1
- package/build-style/playlist-track/style-rtl.css +10 -0
- package/build-style/playlist-track/style.css +10 -0
- package/build-style/style-rtl.css +47 -1
- package/build-style/style.css +47 -1
- package/build-style/video/editor-rtl.css +1 -1
- package/build-style/video/editor.css +1 -1
- 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 +46 -44
- package/src/accordion/README.md +1 -0
- package/src/accordion/block.json +1 -0
- package/src/button/edit.js +21 -15
- 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/embed-video-utils.js +38 -13
- package/src/details/transforms.js +2 -7
- package/src/embed/embed-placeholder.js +0 -1
- package/src/file/edit.js +8 -8
- package/src/file/transforms.js +28 -60
- package/src/gallery/README.md +1 -1
- package/src/gallery/block.json +4 -2
- package/src/gallery/edit.js +3 -3
- package/src/gallery/gap-styles.js +79 -20
- package/src/gallery/index.php +103 -43
- package/src/group/transforms.js +2 -5
- 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/image/README.md +1 -1
- package/src/image/block.json +1 -1
- package/src/image/edit.js +0 -52
- package/src/image/editor.scss +2 -0
- package/src/image/image.js +19 -24
- package/src/image/transforms.js +128 -0
- package/src/index.js +19 -7
- package/src/latest-posts/edit.js +5 -8
- package/src/latest-posts/index.php +46 -16
- 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/editor.scss +1 -0
- package/src/more/editor.scss +1 -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-submenu/index.php +6 -3
- package/src/nextpage/editor.scss +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 -18
- package/src/playlist/block.json +29 -10
- package/src/playlist/edit.js +247 -15
- package/src/playlist/editor.scss +6 -0
- package/src/playlist/index.js +1 -1
- package/src/playlist/index.php +58 -14
- package/src/playlist/style.scss +51 -1
- package/src/playlist/test/edit.js +13 -2
- package/src/playlist/utils.js +25 -7
- package/src/playlist/view.js +97 -16
- package/src/playlist-track/README.md +3 -3
- package/src/playlist-track/block.json +4 -2
- package/src/playlist-track/edit.js +94 -70
- package/src/playlist-track/index.php +20 -6
- package/src/playlist-track/style.scss +10 -0
- package/src/playlist-track/test/edit.js +169 -0
- package/src/post-content/README.md +1 -0
- package/src/post-content/block.json +1 -0
- 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/index.js +43 -3
- package/src/query/edit/inspector-controls/offset-controls.js +0 -1
- package/src/query/edit/inspector-controls/pages-control.js +0 -1
- package/src/query/edit/query-content.js +19 -3
- package/src/query/index.js +1 -0
- package/src/quote/README.md +1 -0
- package/src/quote/block.json +3 -1
- package/src/quote/transforms.js +2 -4
- package/src/rss/edit.js +0 -1
- package/src/rss/index.php +1 -1
- package/src/tab-list/README.md +4 -5
- package/src/tab-list/block.json +2 -2
- package/src/tab-list/edit.js +90 -28
- package/src/tab-list/index.php +9 -4
- package/src/tab-panel/README.md +4 -6
- package/src/tab-panel/block.json +1 -6
- 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/tabs/README.md +18 -9
- package/src/tabs/block.json +0 -5
- package/src/tabs/edit.js +7 -64
- package/src/tabs/use-tab-list-items-sync.js +24 -4
- 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/utils/media-control.scss +1 -5
- package/src/utils/test/waveform-player.js +297 -34
- package/src/utils/test/waveform-utils.js +410 -5
- package/src/utils/waveform-player.js +189 -59
- package/src/utils/waveform-utils.js +443 -40
- package/src/video/edit.js +0 -8
- package/src/video/editor.scss +1 -1
- package/build/image/animated-gif-convert-control.cjs +0 -105
- package/build/image/animated-gif-convert-control.cjs.map +0 -7
- package/build/utils/gif-conversion-attributes.cjs +0 -40
- package/build/utils/gif-conversion-attributes.cjs.map +0 -7
- package/build/video/gif-restore-control.cjs +0 -73
- package/build/video/gif-restore-control.cjs.map +0 -7
- package/build-module/image/animated-gif-convert-control.mjs +0 -87
- package/build-module/image/animated-gif-convert-control.mjs.map +0 -7
- package/build-module/utils/gif-conversion-attributes.mjs +0 -15
- package/build-module/utils/gif-conversion-attributes.mjs.map +0 -7
- package/build-module/video/gif-restore-control.mjs +0 -55
- package/build-module/video/gif-restore-control.mjs.map +0 -7
- package/src/image/animated-gif-convert-control.js +0 -135
- package/src/image/test/animated-gif-convert-control.js +0 -276
- package/src/utils/gif-conversion-attributes.js +0 -30
- package/src/utils/test/gif-conversion-attributes.js +0 -60
- package/src/video/gif-restore-control.js +0 -92
|
@@ -2,7 +2,25 @@
|
|
|
2
2
|
import { store as blockEditorStore } from "@wordpress/block-editor";
|
|
3
3
|
import { useDispatch, useSelect } from "@wordpress/data";
|
|
4
4
|
import { useEffect } from "@wordpress/element";
|
|
5
|
-
|
|
5
|
+
var EMPTY_ARRAY = [];
|
|
6
|
+
function useTabListItemsSync(tabsClientId) {
|
|
7
|
+
const { tabPanels, tabListClientId } = useSelect(
|
|
8
|
+
(select) => {
|
|
9
|
+
const { getBlocks } = select(blockEditorStore);
|
|
10
|
+
const innerBlocks = getBlocks(tabsClientId);
|
|
11
|
+
const tabPanelsBlock = innerBlocks.find(
|
|
12
|
+
(block) => block.name === "core/tab-panels"
|
|
13
|
+
);
|
|
14
|
+
const tabList = innerBlocks.find(
|
|
15
|
+
(block) => block.name === "core/tab-list"
|
|
16
|
+
);
|
|
17
|
+
return {
|
|
18
|
+
tabPanels: tabPanelsBlock?.innerBlocks ?? EMPTY_ARRAY,
|
|
19
|
+
tabListClientId: tabList?.clientId ?? null
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
[tabsClientId]
|
|
23
|
+
);
|
|
6
24
|
const { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } = useDispatch(blockEditorStore);
|
|
7
25
|
const { getBlockAttributes } = useSelect(blockEditorStore);
|
|
8
26
|
useEffect(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tabs/use-tab-list-items-sync.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Keep the tab-list block's `tabs` attribute in sync with the tab-panel blocks.\n *\n * Whenever the list of core/tab-panel blocks changes (add, remove, reorder, or\n * label edit), this hook updates the `tabs` attribute on the core/tab-list\n * block so that save.js can render the correct buttons.\n *\n * @param {
|
|
5
|
-
"mappings": ";AAGA,SAAS,SAAS,wBAAwB;AAC1C,SAAS,aAAa,iBAAiB;AACvC,SAAS,iBAAiB;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nconst EMPTY_ARRAY = [];\n\n/**\n * Keep the tab-list block's `tabs` attribute in sync with the tab-panel blocks.\n *\n * Whenever the list of core/tab-panel blocks changes (add, remove, reorder, or\n * label edit), this hook updates the `tabs` attribute on the core/tab-list\n * block so that save.js can render the correct buttons.\n *\n * @param {string} tabsClientId Client ID of the core/tabs block.\n */\nexport default function useTabListItemsSync( tabsClientId ) {\n\tconst { tabPanels, tabListClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlocks } = select( blockEditorStore );\n\t\t\tconst innerBlocks = getBlocks( tabsClientId );\n\n\t\t\tconst tabPanelsBlock = innerBlocks.find(\n\t\t\t\t( block ) => block.name === 'core/tab-panels'\n\t\t\t);\n\t\t\tconst tabList = innerBlocks.find(\n\t\t\t\t( block ) => block.name === 'core/tab-list'\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\ttabPanels: tabPanelsBlock?.innerBlocks ?? EMPTY_ARRAY,\n\t\t\t\ttabListClientId: tabList?.clientId ?? null,\n\t\t\t};\n\t\t},\n\t\t[ tabsClientId ]\n\t);\n\n\tconst { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst { getBlockAttributes } = useSelect( blockEditorStore );\n\n\tuseEffect( () => {\n\t\tif ( ! tabListClientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newTabs = tabPanels.map( ( tab ) => ( {\n\t\t\tlabel: tab.attributes.label || '',\n\t\t} ) );\n\n\t\t// Skip the update when the stored tabs already match the derived ones.\n\t\tconst currentTabs = getBlockAttributes( tabListClientId )?.tabs ?? [];\n\t\tif ( JSON.stringify( newTabs ) === JSON.stringify( currentTabs ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tupdateBlockAttributes( tabListClientId, { tabs: newTabs } );\n\t}, [\n\t\ttabPanels,\n\t\ttabListClientId,\n\t\tgetBlockAttributes,\n\t\tupdateBlockAttributes,\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t] );\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,SAAS,wBAAwB;AAC1C,SAAS,aAAa,iBAAiB;AACvC,SAAS,iBAAiB;AAE1B,IAAM,cAAc,CAAC;AAWN,SAAR,oBAAsC,cAAe;AAC3D,QAAM,EAAE,WAAW,gBAAgB,IAAI;AAAA,IACtC,CAAE,WAAY;AACb,YAAM,EAAE,UAAU,IAAI,OAAQ,gBAAiB;AAC/C,YAAM,cAAc,UAAW,YAAa;AAE5C,YAAM,iBAAiB,YAAY;AAAA,QAClC,CAAE,UAAW,MAAM,SAAS;AAAA,MAC7B;AACA,YAAM,UAAU,YAAY;AAAA,QAC3B,CAAE,UAAW,MAAM,SAAS;AAAA,MAC7B;AAEA,aAAO;AAAA,QACN,WAAW,gBAAgB,eAAe;AAAA,QAC1C,iBAAiB,SAAS,YAAY;AAAA,MACvC;AAAA,IACD;AAAA,IACA,CAAE,YAAa;AAAA,EAChB;AAEA,QAAM,EAAE,uBAAuB,wCAAwC,IACtE,YAAa,gBAAiB;AAC/B,QAAM,EAAE,mBAAmB,IAAI,UAAW,gBAAiB;AAE3D,YAAW,MAAM;AAChB,QAAK,CAAE,iBAAkB;AACxB;AAAA,IACD;AAEA,UAAM,UAAU,UAAU,IAAK,CAAE,SAAW;AAAA,MAC3C,OAAO,IAAI,WAAW,SAAS;AAAA,IAChC,EAAI;AAGJ,UAAM,cAAc,mBAAoB,eAAgB,GAAG,QAAQ,CAAC;AACpE,QAAK,KAAK,UAAW,OAAQ,MAAM,KAAK,UAAW,WAAY,GAAI;AAClE;AAAA,IACD;AAEA,4CAAwC;AACxC,0BAAuB,iBAAiB,EAAE,MAAM,QAAQ,CAAE;AAAA,EAC3D,GAAG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -9,9 +9,6 @@
|
|
|
9
9
|
"textdomain": "default",
|
|
10
10
|
"usesContext": [ "termId", "taxonomy" ],
|
|
11
11
|
"attributes": {
|
|
12
|
-
"textAlign": {
|
|
13
|
-
"type": "string"
|
|
14
|
-
},
|
|
15
12
|
"level": {
|
|
16
13
|
"type": "number",
|
|
17
14
|
"default": 0
|
|
@@ -43,6 +40,7 @@
|
|
|
43
40
|
"typography": {
|
|
44
41
|
"fontSize": true,
|
|
45
42
|
"lineHeight": true,
|
|
43
|
+
"textAlign": true,
|
|
46
44
|
"__experimentalFontFamily": true,
|
|
47
45
|
"__experimentalFontWeight": true,
|
|
48
46
|
"__experimentalFontStyle": true,
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// packages/block-library/src/term-name/deprecated.js
|
|
2
|
+
import migrateTextAlign from "../utils/migrate-text-align.mjs";
|
|
3
|
+
var v1 = {
|
|
4
|
+
attributes: {
|
|
5
|
+
textAlign: {
|
|
6
|
+
type: "string"
|
|
7
|
+
},
|
|
8
|
+
level: {
|
|
9
|
+
type: "number",
|
|
10
|
+
default: 0
|
|
11
|
+
},
|
|
12
|
+
isLink: {
|
|
13
|
+
type: "boolean",
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
levelOptions: {
|
|
17
|
+
type: "array"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
supports: {
|
|
21
|
+
anchor: true,
|
|
22
|
+
align: ["wide", "full"],
|
|
23
|
+
html: false,
|
|
24
|
+
color: {
|
|
25
|
+
gradients: true,
|
|
26
|
+
link: true,
|
|
27
|
+
__experimentalDefaultControls: {
|
|
28
|
+
background: true,
|
|
29
|
+
text: true,
|
|
30
|
+
link: true
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
spacing: {
|
|
34
|
+
padding: true
|
|
35
|
+
},
|
|
36
|
+
typography: {
|
|
37
|
+
fontSize: true,
|
|
38
|
+
lineHeight: true,
|
|
39
|
+
__experimentalFontFamily: true,
|
|
40
|
+
__experimentalFontWeight: true,
|
|
41
|
+
__experimentalFontStyle: true,
|
|
42
|
+
__experimentalTextTransform: true,
|
|
43
|
+
__experimentalTextDecoration: true,
|
|
44
|
+
__experimentalLetterSpacing: true,
|
|
45
|
+
__experimentalDefaultControls: {
|
|
46
|
+
fontSize: true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
interactivity: {
|
|
50
|
+
clientNavigation: true
|
|
51
|
+
},
|
|
52
|
+
__experimentalBorder: {
|
|
53
|
+
radius: true,
|
|
54
|
+
color: true,
|
|
55
|
+
width: true,
|
|
56
|
+
style: true,
|
|
57
|
+
__experimentalDefaultControls: {
|
|
58
|
+
color: true,
|
|
59
|
+
width: true,
|
|
60
|
+
style: true
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
migrate: migrateTextAlign,
|
|
65
|
+
isEligible(attributes) {
|
|
66
|
+
return !!attributes.textAlign;
|
|
67
|
+
},
|
|
68
|
+
save: () => null
|
|
69
|
+
};
|
|
70
|
+
var deprecated_default = [v1];
|
|
71
|
+
export {
|
|
72
|
+
deprecated_default as default
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=deprecated.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/term-name/deprecated.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport migrateTextAlign from '../utils/migrate-text-align';\n\nconst v1 = {\n\tattributes: {\n\t\ttextAlign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlevel: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 0,\n\t\t},\n\t\tisLink: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t},\n\t\tlevelOptions: {\n\t\t\ttype: 'array',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\talign: [ 'wide', 'full' ],\n\t\thtml: false,\n\t\tcolor: {\n\t\t\tgradients: true,\n\t\t\tlink: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tbackground: true,\n\t\t\t\ttext: true,\n\t\t\t\tlink: true,\n\t\t\t},\n\t\t},\n\t\tspacing: {\n\t\t\tpadding: true,\n\t\t},\n\t\ttypography: {\n\t\t\tfontSize: true,\n\t\t\tlineHeight: true,\n\t\t\t__experimentalFontFamily: true,\n\t\t\t__experimentalFontWeight: true,\n\t\t\t__experimentalFontStyle: true,\n\t\t\t__experimentalTextTransform: true,\n\t\t\t__experimentalTextDecoration: true,\n\t\t\t__experimentalLetterSpacing: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tfontSize: true,\n\t\t\t},\n\t\t},\n\t\tinteractivity: {\n\t\t\tclientNavigation: true,\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tradius: true,\n\t\t\tcolor: true,\n\t\t\twidth: true,\n\t\t\tstyle: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tcolor: true,\n\t\t\t\twidth: true,\n\t\t\t\tstyle: true,\n\t\t\t},\n\t\t},\n\t},\n\tmigrate: migrateTextAlign,\n\tisEligible( attributes ) {\n\t\treturn !! attributes.textAlign;\n\t},\n\tsave: () => null,\n};\n\nexport default [ v1 ];\n"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,sBAAsB;AAE7B,IAAM,KAAK;AAAA,EACV,YAAY;AAAA,IACX,WAAW;AAAA,MACV,MAAM;AAAA,IACP;AAAA,IACA,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IACA,QAAQ;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IACA,cAAc;AAAA,MACb,MAAM;AAAA,IACP;AAAA,EACD;AAAA,EACA,UAAU;AAAA,IACT,QAAQ;AAAA,IACR,OAAO,CAAE,QAAQ,MAAO;AAAA,IACxB,MAAM;AAAA,IACN,OAAO;AAAA,MACN,WAAW;AAAA,MACX,MAAM;AAAA,MACN,+BAA+B;AAAA,QAC9B,YAAY;AAAA,QACZ,MAAM;AAAA,QACN,MAAM;AAAA,MACP;AAAA,IACD;AAAA,IACA,SAAS;AAAA,MACR,SAAS;AAAA,IACV;AAAA,IACA,YAAY;AAAA,MACX,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,0BAA0B;AAAA,MAC1B,0BAA0B;AAAA,MAC1B,yBAAyB;AAAA,MACzB,6BAA6B;AAAA,MAC7B,8BAA8B;AAAA,MAC9B,6BAA6B;AAAA,MAC7B,+BAA+B;AAAA,QAC9B,UAAU;AAAA,MACX;AAAA,IACD;AAAA,IACA,eAAe;AAAA,MACd,kBAAkB;AAAA,IACnB;AAAA,IACA,sBAAsB;AAAA,MACrB,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,+BAA+B;AAAA,QAC9B,OAAO;AAAA,QACP,OAAO;AAAA,QACP,OAAO;AAAA,MACR;AAAA,IACD;AAAA,EACD;AAAA,EACA,SAAS;AAAA,EACT,WAAY,YAAa;AACxB,WAAO,CAAC,CAAE,WAAW;AAAA,EACtB;AAAA,EACA,MAAM,MAAM;AACb;AAEA,IAAO,qBAAQ,CAAE,EAAG;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
// packages/block-library/src/term-name/edit.js
|
|
2
|
-
import clsx from "clsx";
|
|
3
2
|
import { __ } from "@wordpress/i18n";
|
|
4
3
|
import {
|
|
5
4
|
useBlockProps,
|
|
6
5
|
BlockControls,
|
|
7
|
-
AlignmentControl,
|
|
8
6
|
InspectorControls,
|
|
9
7
|
HeadingLevelDropdown
|
|
10
8
|
} from "@wordpress/block-editor";
|
|
@@ -22,14 +20,10 @@ function TermNameEdit({
|
|
|
22
20
|
setAttributes,
|
|
23
21
|
context: { termId, taxonomy }
|
|
24
22
|
}) {
|
|
25
|
-
const {
|
|
23
|
+
const { level = 0, isLink, levelOptions } = attributes;
|
|
26
24
|
const { term } = useTermName(termId, taxonomy);
|
|
27
25
|
const termName = term?.name ? decodeEntities(term.name) : __("Term Name");
|
|
28
|
-
const blockProps = useBlockProps(
|
|
29
|
-
className: clsx({
|
|
30
|
-
[`has-text-align-${textAlign}`]: textAlign
|
|
31
|
-
})
|
|
32
|
-
});
|
|
26
|
+
const blockProps = useBlockProps();
|
|
33
27
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
34
28
|
const TagName = level === 0 ? "p" : `h${level}`;
|
|
35
29
|
let termNameDisplay = termName;
|
|
@@ -44,27 +38,16 @@ function TermNameEdit({
|
|
|
44
38
|
);
|
|
45
39
|
}
|
|
46
40
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
setAttributes({ level: newLevel });
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
|
-
/* @__PURE__ */ jsx(
|
|
59
|
-
AlignmentControl,
|
|
60
|
-
{
|
|
61
|
-
value: textAlign,
|
|
62
|
-
onChange: (nextAlign) => {
|
|
63
|
-
setAttributes({ textAlign: nextAlign });
|
|
64
|
-
}
|
|
41
|
+
/* @__PURE__ */ jsx(BlockControls, { group: "block", children: /* @__PURE__ */ jsx(
|
|
42
|
+
HeadingLevelDropdown,
|
|
43
|
+
{
|
|
44
|
+
value: level,
|
|
45
|
+
options: levelOptions,
|
|
46
|
+
onChange: (newLevel) => {
|
|
47
|
+
setAttributes({ level: newLevel });
|
|
65
48
|
}
|
|
66
|
-
|
|
67
|
-
|
|
49
|
+
}
|
|
50
|
+
) }),
|
|
68
51
|
/* @__PURE__ */ jsx(InspectorControls, { children: /* @__PURE__ */ jsx(
|
|
69
52
|
ToolsPanel,
|
|
70
53
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/term-name/edit.js"],
|
|
4
|
-
"sourcesContent": ["/**\n *
|
|
5
|
-
"mappings": ";AAGA,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseBlockProps,\n\tBlockControls,\n\tInspectorControls,\n\tHeadingLevelDropdown,\n} from '@wordpress/block-editor';\nimport {\n\tToggleControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\nimport { useTermName } from './use-term-name';\n\nexport default function TermNameEdit( {\n\tattributes,\n\tsetAttributes,\n\tcontext: { termId, taxonomy },\n} ) {\n\tconst { level = 0, isLink, levelOptions } = attributes;\n\tconst { term } = useTermName( termId, taxonomy );\n\n\tconst termName = term?.name\n\t\t? decodeEntities( term.name )\n\t\t: __( 'Term Name' );\n\n\tconst blockProps = useBlockProps();\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst TagName = level === 0 ? 'p' : `h${ level }`;\n\n\tlet termNameDisplay = termName;\n\tif ( isLink ) {\n\t\ttermNameDisplay = (\n\t\t\t<a\n\t\t\t\thref=\"#term-name-pseudo-link\"\n\t\t\t\tonClick={ ( e ) => e.preventDefault() }\n\t\t\t>\n\t\t\t\t{ termName }\n\t\t\t</a>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<HeadingLevelDropdown\n\t\t\t\t\tvalue={ level }\n\t\t\t\t\toptions={ levelOptions }\n\t\t\t\t\tonChange={ ( newLevel ) => {\n\t\t\t\t\t\tsetAttributes( { level: newLevel } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\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\tsetAttributes( {\n\t\t\t\t\t\t\tisLink: false,\n\t\t\t\t\t\t} );\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\thasValue={ () => !! isLink }\n\t\t\t\t\t\tlabel={ __( 'Make term name a link' ) }\n\t\t\t\t\t\tonDeselect={ () => setAttributes( { isLink: false } ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Make term name a link' ) }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { isLink: ! isLink } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t\t/>\n\t\t\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wBAAe;AAAA,YACd,QAAQ;AAAA,UACT,CAAE;AAAA,QACH;AAAA,QACA;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACA,UAAW,MAAM,CAAC,CAAE;AAAA,YACpB,OAAQ,GAAI,uBAAwB;AAAA,YACpC,YAAa,MAAM,cAAe,EAAE,QAAQ,MAAM,CAAE;AAAA,YACpD,kBAAgB;AAAA,YAEhB;AAAA,cAAC;AAAA;AAAA,gBACA,OAAQ,GAAI,uBAAwB;AAAA,gBACpC,UAAW,MACV,cAAe,EAAE,QAAQ,CAAE,OAAO,CAAE;AAAA,gBAErC,SAAU;AAAA;AAAA,YACX;AAAA;AAAA,QACD;AAAA;AAAA,IACD,GACD;AAAA,IACA,oBAAC,WAAU,GAAG,YAAe,2BAAiB;AAAA,KAC/C;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,11 +3,13 @@ import { termName as icon } from "@wordpress/icons";
|
|
|
3
3
|
import initBlock from "../utils/init-block.mjs";
|
|
4
4
|
import metadata from "./block.json";
|
|
5
5
|
import edit from "./edit.mjs";
|
|
6
|
+
import deprecated from "./deprecated.mjs";
|
|
6
7
|
var { name } = metadata;
|
|
7
8
|
var settings = {
|
|
8
9
|
icon,
|
|
9
10
|
example: {},
|
|
10
|
-
edit
|
|
11
|
+
edit,
|
|
12
|
+
deprecated
|
|
11
13
|
};
|
|
12
14
|
var init = () => initBlock({ name, metadata, settings });
|
|
13
15
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/term-name/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { termName as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],
|
|
5
|
-
"mappings": ";AAGA,SAAS,YAAY,YAAY;AAKjC,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB,OAAO,UAAU;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { termName as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,YAAY,YAAY;AAKjC,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AAEvB,IAAM,EAAE,KAAK,IAAI;AAGV,IAAM,WAAW;AAAA,EACvB;AAAA,EACA,SAAS,CAAC;AAAA,EACV;AAAA,EACA;AACD;AAEO,IAAM,OAAO,MAAM,UAAW,EAAE,MAAM,UAAU,SAAS,CAAE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,19 +1,38 @@
|
|
|
1
1
|
// packages/block-library/src/utils/waveform-player.js
|
|
2
2
|
import { useEffect, useRef } from "@wordpress/element";
|
|
3
3
|
import { useEvent, useRefEffect } from "@wordpress/compose";
|
|
4
|
-
import {
|
|
4
|
+
import { __, _x } from "@wordpress/i18n";
|
|
5
|
+
import {
|
|
6
|
+
applyWaveformPlayerStyles,
|
|
7
|
+
initWaveformPlayer,
|
|
8
|
+
setupPlayButtonArtwork,
|
|
9
|
+
updateSeekControlLabel
|
|
10
|
+
} from "./waveform-utils.mjs";
|
|
5
11
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
|
|
12
|
+
function updatePlayerMetadata(player, { title, artist, image, imageAlt }, showPlayButtonArtwork) {
|
|
13
|
+
const { instance, container } = player;
|
|
14
|
+
const playerArtwork = showPlayButtonArtwork ? void 0 : image;
|
|
8
15
|
if (instance.titleEl) {
|
|
9
16
|
instance.titleEl.textContent = title ?? "";
|
|
10
17
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
instance.
|
|
18
|
+
updateSeekControlLabel(instance, title || __("Seek"));
|
|
19
|
+
if (typeof instance.syncArtist === "function") {
|
|
20
|
+
instance.syncArtist(artist || "");
|
|
21
|
+
} else if (instance.artistEl) {
|
|
22
|
+
instance.artistEl.textContent = artist ?? "";
|
|
23
|
+
instance.artistEl.style.display = artist ? "" : "none";
|
|
14
24
|
}
|
|
15
|
-
if (instance.
|
|
16
|
-
instance.
|
|
25
|
+
if (typeof instance.syncArtwork === "function") {
|
|
26
|
+
instance.syncArtwork(
|
|
27
|
+
playerArtwork || null,
|
|
28
|
+
playerArtwork ? imageAlt || "" : ""
|
|
29
|
+
);
|
|
30
|
+
} else if (instance.artworkEl && playerArtwork) {
|
|
31
|
+
instance.artworkEl.src = playerArtwork;
|
|
32
|
+
instance.artworkEl.alt = imageAlt || "";
|
|
33
|
+
}
|
|
34
|
+
if (showPlayButtonArtwork) {
|
|
35
|
+
setupPlayButtonArtwork(container, image);
|
|
17
36
|
}
|
|
18
37
|
}
|
|
19
38
|
function WaveformPlayer({
|
|
@@ -21,23 +40,60 @@ function WaveformPlayer({
|
|
|
21
40
|
title,
|
|
22
41
|
artist,
|
|
23
42
|
image,
|
|
43
|
+
imageAlt,
|
|
44
|
+
color,
|
|
45
|
+
gradient,
|
|
46
|
+
backgroundColor,
|
|
47
|
+
backgroundGradient,
|
|
48
|
+
textColor,
|
|
24
49
|
waveformStyle,
|
|
25
|
-
onEnded
|
|
50
|
+
onEnded,
|
|
51
|
+
showPlayButtonArtwork = false
|
|
26
52
|
}) {
|
|
27
53
|
const onEndedEvent = useEvent(onEnded);
|
|
28
|
-
const metadataRef = useRef({ title, artist, image });
|
|
29
54
|
const playerRef = useRef();
|
|
30
|
-
const
|
|
55
|
+
const hasSrc = !!src;
|
|
56
|
+
const metadataRef = useRef({ src, title, artist, image, imageAlt });
|
|
57
|
+
const stylesRef = useRef({
|
|
58
|
+
color,
|
|
59
|
+
gradient,
|
|
60
|
+
backgroundColor,
|
|
61
|
+
backgroundGradient,
|
|
62
|
+
textColor
|
|
63
|
+
});
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
metadataRef.current = { src, title, artist, image, imageAlt };
|
|
66
|
+
}, [src, title, artist, image, imageAlt]);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
stylesRef.current = {
|
|
69
|
+
color,
|
|
70
|
+
gradient,
|
|
71
|
+
backgroundColor,
|
|
72
|
+
backgroundGradient,
|
|
73
|
+
textColor
|
|
74
|
+
};
|
|
75
|
+
}, [color, gradient, backgroundColor, backgroundGradient, textColor]);
|
|
31
76
|
useEffect(() => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
77
|
+
if (playerRef.current?.container) {
|
|
78
|
+
applyWaveformPlayerStyles(playerRef.current.container, {
|
|
79
|
+
backgroundColor,
|
|
80
|
+
backgroundGradient,
|
|
81
|
+
textColor,
|
|
82
|
+
playButtonColor: showPlayButtonArtwork ? void 0 : color,
|
|
83
|
+
playButtonGradient: showPlayButtonArtwork ? void 0 : gradient
|
|
84
|
+
});
|
|
36
85
|
}
|
|
37
|
-
}, [
|
|
86
|
+
}, [
|
|
87
|
+
backgroundColor,
|
|
88
|
+
backgroundGradient,
|
|
89
|
+
color,
|
|
90
|
+
gradient,
|
|
91
|
+
showPlayButtonArtwork,
|
|
92
|
+
textColor
|
|
93
|
+
]);
|
|
38
94
|
const ref = useRefEffect(
|
|
39
95
|
(element) => {
|
|
40
|
-
if (!
|
|
96
|
+
if (!hasSrc) {
|
|
41
97
|
return;
|
|
42
98
|
}
|
|
43
99
|
let cancelled = false;
|
|
@@ -47,14 +103,29 @@ function WaveformPlayer({
|
|
|
47
103
|
return;
|
|
48
104
|
}
|
|
49
105
|
const player = initWaveformPlayer(element, {
|
|
50
|
-
src,
|
|
51
|
-
|
|
106
|
+
src: metadataRef.current.src,
|
|
107
|
+
title: metadataRef.current.title,
|
|
108
|
+
artist: metadataRef.current.artist,
|
|
109
|
+
image: metadataRef.current.image,
|
|
110
|
+
imageAlt: metadataRef.current.imageAlt,
|
|
111
|
+
waveformColor: stylesRef.current.color,
|
|
112
|
+
waveformGradient: stylesRef.current.gradient,
|
|
113
|
+
backgroundColor: stylesRef.current.backgroundColor,
|
|
114
|
+
backgroundGradient: stylesRef.current.backgroundGradient,
|
|
115
|
+
textColor: stylesRef.current.textColor,
|
|
52
116
|
waveformStyle,
|
|
53
|
-
|
|
54
|
-
|
|
117
|
+
labels: {
|
|
118
|
+
seek: __("Seek"),
|
|
119
|
+
/* translators: %1$s: current audio time, %2$s: total audio duration. */
|
|
120
|
+
seekValueText: _x(
|
|
121
|
+
"%1$s of %2$s",
|
|
122
|
+
"audio current time of total duration"
|
|
123
|
+
)
|
|
124
|
+
},
|
|
125
|
+
onEnded: () => onEndedEvent?.(),
|
|
126
|
+
showPlayButtonArtwork
|
|
55
127
|
});
|
|
56
128
|
playerRef.current = player;
|
|
57
|
-
updatePlayerMetadata(player.instance, metadataRef.current);
|
|
58
129
|
const { destroy } = player;
|
|
59
130
|
playerDestroy = destroy;
|
|
60
131
|
}
|
|
@@ -66,8 +137,58 @@ function WaveformPlayer({
|
|
|
66
137
|
playerDestroy?.();
|
|
67
138
|
};
|
|
68
139
|
},
|
|
69
|
-
[
|
|
140
|
+
[
|
|
141
|
+
onEndedEvent,
|
|
142
|
+
hasSrc,
|
|
143
|
+
waveformStyle,
|
|
144
|
+
color,
|
|
145
|
+
gradient,
|
|
146
|
+
textColor,
|
|
147
|
+
showPlayButtonArtwork
|
|
148
|
+
]
|
|
70
149
|
);
|
|
150
|
+
useEffect(() => {
|
|
151
|
+
if (playerRef.current?.instance) {
|
|
152
|
+
const player = playerRef.current;
|
|
153
|
+
if (player) {
|
|
154
|
+
updatePlayerMetadata(
|
|
155
|
+
player,
|
|
156
|
+
{
|
|
157
|
+
title,
|
|
158
|
+
artist,
|
|
159
|
+
image,
|
|
160
|
+
imageAlt
|
|
161
|
+
},
|
|
162
|
+
showPlayButtonArtwork
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}, [title, artist, image, imageAlt, showPlayButtonArtwork]);
|
|
167
|
+
useEffect(() => {
|
|
168
|
+
if (src && playerRef.current?.instance) {
|
|
169
|
+
const wasPlaying = playerRef.current.instance.isPlaying;
|
|
170
|
+
const promise = playerRef.current.instance.loadTrack(
|
|
171
|
+
src,
|
|
172
|
+
metadataRef.current.title,
|
|
173
|
+
metadataRef.current.artist,
|
|
174
|
+
{
|
|
175
|
+
artwork: showPlayButtonArtwork ? void 0 : metadataRef.current.image,
|
|
176
|
+
artworkAlt: showPlayButtonArtwork ? "" : metadataRef.current.imageAlt
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
promise.then(() => {
|
|
180
|
+
if (showPlayButtonArtwork && playerRef.current?.container) {
|
|
181
|
+
setupPlayButtonArtwork(
|
|
182
|
+
playerRef.current.container,
|
|
183
|
+
metadataRef.current.image
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
if (!wasPlaying) {
|
|
187
|
+
playerRef.current?.instance.pause();
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}, [src, showPlayButtonArtwork]);
|
|
71
192
|
return /* @__PURE__ */ jsx("div", { ref, className: "wp-block-playlist__waveform-player" });
|
|
72
193
|
}
|
|
73
194
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/waveform-player.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useEvent, useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {
|
|
5
|
-
"mappings": ";AAGA,SAAS,WAAW,cAAc;AAClC,SAAS,UAAU,oBAAoB;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useEvent, useRefEffect } from '@wordpress/compose';\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tapplyWaveformPlayerStyles,\n\tinitWaveformPlayer,\n\tsetupPlayButtonArtwork,\n\tupdateSeekControlLabel,\n} from './waveform-utils';\n\n/**\n * Update the metadata of a WaveformPlayer element to reflect current props.\n *\n * `loadTrack()` owns full track swaps, but it also resets the audio element.\n * This keeps same-source metadata edits lightweight in the editor.\n *\n * @param {Object} player - The waveform player.\n * @param {Object} metadata - The track metadata.\n * @param {string} metadata.title - The track title.\n * @param {string} metadata.artist - The artist name.\n * @param {string} metadata.image - The track image URL.\n * @param {string} metadata.imageAlt - The track image alt text.\n * @param {boolean} showPlayButtonArtwork - Whether to show artwork on the play button.\n */\nfunction updatePlayerMetadata(\n\tplayer,\n\t{ title, artist, image, imageAlt },\n\tshowPlayButtonArtwork\n) {\n\tconst { instance, container } = player;\n\tconst playerArtwork = showPlayButtonArtwork ? undefined : image;\n\n\tif ( instance.titleEl ) {\n\t\tinstance.titleEl.textContent = title ?? '';\n\t}\n\tupdateSeekControlLabel( instance, title || __( 'Seek' ) );\n\n\tif ( typeof instance.syncArtist === 'function' ) {\n\t\tinstance.syncArtist( artist || '' );\n\t} else if ( instance.artistEl ) {\n\t\tinstance.artistEl.textContent = artist ?? '';\n\t\tinstance.artistEl.style.display = artist ? '' : 'none';\n\t}\n\n\tif ( typeof instance.syncArtwork === 'function' ) {\n\t\tinstance.syncArtwork(\n\t\t\tplayerArtwork || null,\n\t\t\tplayerArtwork ? imageAlt || '' : ''\n\t\t);\n\t} else if ( instance.artworkEl && playerArtwork ) {\n\t\tinstance.artworkEl.src = playerArtwork;\n\t\tinstance.artworkEl.alt = imageAlt || '';\n\t}\n\tif ( showPlayButtonArtwork ) {\n\t\tsetupPlayButtonArtwork( container, image );\n\t}\n}\n\n/**\n * A reusable WaveformPlayer component for the block editor.\n *\n * Renders an audio waveform visualization with play/pause controls.\n * Automatically inherits colors from the parent block's text color.\n *\n * @param {Object} props - Component props.\n * @param {string} props.src - The audio file URL.\n * @param {string} props.title - The track title.\n * @param {string} props.artist - The artist name.\n * @param {string} props.image - The track image URL.\n * @param {string} props.imageAlt - The track image alt text.\n * @param {string} props.color - The waveform color.\n * @param {string} props.gradient - The waveform gradient.\n * @param {string} props.backgroundColor - The waveform background color.\n * @param {string} props.backgroundGradient - The waveform background gradient.\n * @param {string} props.textColor - The player text color.\n * @param {string} props.waveformStyle - Waveform style (bars, mirror, line, blocks, dots, seekbar).\n * @param {Function} props.onEnded - Callback when the track finishes playing.\n * @param {boolean} props.showPlayButtonArtwork - Whether to show artwork on the play button.\n * @return {Element} The WaveformPlayer element.\n */\nexport function WaveformPlayer( {\n\tsrc,\n\ttitle,\n\tartist,\n\timage,\n\timageAlt,\n\tcolor,\n\tgradient,\n\tbackgroundColor,\n\tbackgroundGradient,\n\ttextColor,\n\twaveformStyle,\n\tonEnded,\n\tshowPlayButtonArtwork = false,\n} ) {\n\t// Store onEnded in a stable callback so it doesn't need to be a useRefEffect dependency.\n\t// The callback changes reference on every render (its dependency chain\n\t// includes an unstable array), which would cause useRefEffect to destroy\n\t// and recreate the entire player on every re-render, making it disappear\n\t// during editor resizes.\n\tconst onEndedEvent = useEvent( onEnded );\n\n\t// Ref for the WaveformPlayer instance\n\tconst playerRef = useRef();\n\n\t// WaveformPlayer needs an audio source on init, but the source may change\n\t// throughout its lifetime.\n\tconst hasSrc = !! src;\n\n\t// Combined props ref for `initWaveformPlayer`, which is called\n\t// asynchronously after this component mounts.\n\tconst metadataRef = useRef( { src, title, artist, image, imageAlt } );\n\tconst stylesRef = useRef( {\n\t\tcolor,\n\t\tgradient,\n\t\tbackgroundColor,\n\t\tbackgroundGradient,\n\t\ttextColor,\n\t} );\n\tuseEffect( () => {\n\t\tmetadataRef.current = { src, title, artist, image, imageAlt };\n\t}, [ src, title, artist, image, imageAlt ] );\n\n\tuseEffect( () => {\n\t\tstylesRef.current = {\n\t\t\tcolor,\n\t\t\tgradient,\n\t\t\tbackgroundColor,\n\t\t\tbackgroundGradient,\n\t\t\ttextColor,\n\t\t};\n\t}, [ color, gradient, backgroundColor, backgroundGradient, textColor ] );\n\n\tuseEffect( () => {\n\t\tif ( playerRef.current?.container ) {\n\t\t\tapplyWaveformPlayerStyles( playerRef.current.container, {\n\t\t\t\tbackgroundColor,\n\t\t\t\tbackgroundGradient,\n\t\t\t\ttextColor,\n\t\t\t\tplayButtonColor: showPlayButtonArtwork ? undefined : color,\n\t\t\t\tplayButtonGradient: showPlayButtonArtwork\n\t\t\t\t\t? undefined\n\t\t\t\t\t: gradient,\n\t\t\t} );\n\t\t}\n\t}, [\n\t\tbackgroundColor,\n\t\tbackgroundGradient,\n\t\tcolor,\n\t\tgradient,\n\t\tshowPlayButtonArtwork,\n\t\ttextColor,\n\t] );\n\n\tconst ref = useRefEffect(\n\t\t( element ) => {\n\t\t\tif ( ! hasSrc ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet cancelled = false;\n\t\t\tlet playerDestroy;\n\n\t\t\tfunction init() {\n\t\t\t\tif ( cancelled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst player = initWaveformPlayer( element, {\n\t\t\t\t\tsrc: metadataRef.current.src,\n\t\t\t\t\ttitle: metadataRef.current.title,\n\t\t\t\t\tartist: metadataRef.current.artist,\n\t\t\t\t\timage: metadataRef.current.image,\n\t\t\t\t\timageAlt: metadataRef.current.imageAlt,\n\t\t\t\t\twaveformColor: stylesRef.current.color,\n\t\t\t\t\twaveformGradient: stylesRef.current.gradient,\n\t\t\t\t\tbackgroundColor: stylesRef.current.backgroundColor,\n\t\t\t\t\tbackgroundGradient: stylesRef.current.backgroundGradient,\n\t\t\t\t\ttextColor: stylesRef.current.textColor,\n\t\t\t\t\twaveformStyle,\n\t\t\t\t\tlabels: {\n\t\t\t\t\t\tseek: __( 'Seek' ),\n\t\t\t\t\t\t/* translators: %1$s: current audio time, %2$s: total audio duration. */\n\t\t\t\t\t\tseekValueText: _x(\n\t\t\t\t\t\t\t'%1$s of %2$s',\n\t\t\t\t\t\t\t'audio current time of total duration'\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t\tonEnded: () => onEndedEvent?.(),\n\t\t\t\t\tshowPlayButtonArtwork,\n\t\t\t\t} );\n\t\t\t\tplayerRef.current = player;\n\t\t\t\tconst { destroy } = player;\n\t\t\t\tplayerDestroy = destroy;\n\t\t\t}\n\n\t\t\t// Defer initialization so the element inherits the correct\n\t\t\t// text color, which is used to derive waveform colors. In the\n\t\t\t// editor iframe, theme styles (CSS custom properties) are\n\t\t\t// injected dynamically, so getComputedStyle may return the\n\t\t\t// default black on first render.\n\t\t\t// Using a requestAnimationFrame loop isn't sufficient to solve the issue.\n\t\t\t// TODO - find a better option than a setTimeout, so we're not relying on an arbitrary number.\n\t\t\tconst timeoutId = setTimeout( init, 100 );\n\n\t\t\treturn () => {\n\t\t\t\tcancelled = true;\n\t\t\t\tclearTimeout( timeoutId );\n\t\t\t\tplayerRef.current = undefined;\n\t\t\t\tplayerDestroy?.();\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tonEndedEvent,\n\t\t\thasSrc,\n\t\t\twaveformStyle,\n\t\t\tcolor,\n\t\t\tgradient,\n\t\t\ttextColor,\n\t\t\tshowPlayButtonArtwork,\n\t\t]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( playerRef.current?.instance ) {\n\t\t\tconst player = playerRef.current;\n\t\t\tif ( player ) {\n\t\t\t\tupdatePlayerMetadata(\n\t\t\t\t\tplayer,\n\t\t\t\t\t{\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tartist,\n\t\t\t\t\t\timage,\n\t\t\t\t\t\timageAlt,\n\t\t\t\t\t},\n\t\t\t\t\tshowPlayButtonArtwork\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}, [ title, artist, image, imageAlt, showPlayButtonArtwork ] );\n\n\tuseEffect( () => {\n\t\tif ( src && playerRef.current?.instance ) {\n\t\t\tconst wasPlaying = playerRef.current.instance.isPlaying;\n\t\t\tconst promise = playerRef.current.instance.loadTrack(\n\t\t\t\tsrc,\n\t\t\t\tmetadataRef.current.title,\n\t\t\t\tmetadataRef.current.artist,\n\t\t\t\t{\n\t\t\t\t\tartwork: showPlayButtonArtwork\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: metadataRef.current.image,\n\t\t\t\t\tartworkAlt: showPlayButtonArtwork\n\t\t\t\t\t\t? ''\n\t\t\t\t\t\t: metadataRef.current.imageAlt,\n\t\t\t\t}\n\t\t\t);\n\t\t\tpromise.then( () => {\n\t\t\t\tif ( showPlayButtonArtwork && playerRef.current?.container ) {\n\t\t\t\t\tsetupPlayButtonArtwork(\n\t\t\t\t\t\tplayerRef.current.container,\n\t\t\t\t\t\tmetadataRef.current.image\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif ( ! wasPlaying ) {\n\t\t\t\t\tplayerRef.current?.instance.pause();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}, [ src, showPlayButtonArtwork ] );\n\n\treturn <div ref={ ref } className=\"wp-block-playlist__waveform-player\" />;\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,WAAW,cAAc;AAClC,SAAS,UAAU,oBAAoB;AACvC,SAAS,IAAI,UAAU;AAKvB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAsQC;AAtPR,SAAS,qBACR,QACA,EAAE,OAAO,QAAQ,OAAO,SAAS,GACjC,uBACC;AACD,QAAM,EAAE,UAAU,UAAU,IAAI;AAChC,QAAM,gBAAgB,wBAAwB,SAAY;AAE1D,MAAK,SAAS,SAAU;AACvB,aAAS,Q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