@wordpress/block-library 10.2.0 → 10.3.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 +16 -0
- package/build/accordion-panel/block.json +1 -0
- package/build/code/edit.cjs +3 -1
- package/build/code/edit.cjs.map +2 -2
- package/build/cover/block.json +1 -0
- package/build/cover/edit/block-controls.cjs +3 -1
- package/build/cover/edit/block-controls.cjs.map +2 -2
- package/build/cover/edit/index.cjs +75 -31
- package/build/cover/edit/index.cjs.map +2 -2
- package/build/embed/edit.cjs +1 -1
- package/build/embed/edit.cjs.map +2 -2
- package/build/embed/embed-placeholder.cjs +1 -1
- package/build/embed/embed-placeholder.cjs.map +2 -2
- package/build/gallery/dynamic-gallery.cjs +104 -61
- package/build/gallery/dynamic-gallery.cjs.map +3 -3
- package/build/gallery/use-dynamic-gallery.cjs +15 -8
- package/build/gallery/use-dynamic-gallery.cjs.map +2 -2
- package/build/heading/edit.cjs +1 -1
- package/build/heading/edit.cjs.map +2 -2
- package/build/html/modal.cjs +63 -54
- package/build/html/modal.cjs.map +3 -3
- package/build/icon/block.json +5 -3
- package/build/image/edit.cjs +1 -1
- package/build/image/edit.cjs.map +2 -2
- package/build/image/image.cjs +29 -5
- package/build/image/image.cjs.map +3 -3
- package/build/image/use-open-image-media-editor-modal.cjs +6 -2
- package/build/image/use-open-image-media-editor-modal.cjs.map +2 -2
- package/build/list-item/hooks/use-indent-list-item.cjs +10 -2
- package/build/list-item/hooks/use-indent-list-item.cjs.map +2 -2
- package/build/math/edit.cjs +39 -56
- package/build/math/edit.cjs.map +3 -3
- package/build/media-text/edit.cjs +2 -1
- package/build/media-text/edit.cjs.map +2 -2
- package/build/more/edit.cjs +2 -2
- package/build/more/edit.cjs.map +2 -2
- package/build/navigation/edit/index.cjs +30 -16
- package/build/navigation/edit/index.cjs.map +3 -3
- package/build/navigation/edit/use-layout-custom-properties.cjs +72 -0
- package/build/navigation/edit/use-layout-custom-properties.cjs.map +7 -0
- package/build/navigation/view.cjs +9 -6
- package/build/navigation/view.cjs.map +2 -2
- package/build/navigation-link/edit.cjs +3 -3
- package/build/navigation-link/edit.cjs.map +2 -2
- package/build/navigation-link/link-ui/index.cjs +2 -2
- package/build/navigation-link/link-ui/index.cjs.map +2 -2
- package/build/paragraph/block.json +0 -1
- package/build/paragraph/edit.cjs +5 -2
- package/build/paragraph/edit.cjs.map +3 -3
- package/build/paragraph/index.cjs +4 -1
- package/build/paragraph/index.cjs.map +2 -2
- package/build/playlist/context.cjs +2 -1
- package/build/playlist/context.cjs.map +2 -2
- package/build/playlist/edit.cjs +113 -26
- package/build/playlist/edit.cjs.map +2 -2
- package/build/playlist/utils.cjs +19 -4
- package/build/playlist/utils.cjs.map +2 -2
- package/build/playlist-track/edit.cjs +21 -6
- package/build/playlist-track/edit.cjs.map +2 -2
- package/build/post-content/edit.cjs +36 -15
- package/build/post-content/edit.cjs.map +2 -2
- package/build/post-featured-image/edit.cjs +3 -2
- package/build/post-featured-image/edit.cjs.map +2 -2
- package/build/post-terms/edit.cjs +2 -2
- package/build/post-terms/edit.cjs.map +2 -2
- package/build/post-title/edit.cjs +2 -2
- package/build/post-title/edit.cjs.map +2 -2
- package/build/preformatted/edit.cjs +3 -1
- package/build/preformatted/edit.cjs.map +2 -2
- package/build/pullquote/edit.cjs +5 -3
- package/build/pullquote/edit.cjs.map +2 -2
- package/build/query/edit/inspector-controls/index.cjs +4 -1
- package/build/query/edit/inspector-controls/index.cjs.map +2 -2
- package/build/query/edit/inspector-controls/offset-controls.cjs +1 -1
- package/build/query/edit/inspector-controls/offset-controls.cjs.map +2 -2
- package/build/read-more/edit.cjs +3 -1
- package/build/read-more/edit.cjs.map +2 -2
- package/build/site-tagline/edit.cjs +3 -1
- package/build/site-tagline/edit.cjs.map +2 -2
- package/build/site-title/edit.cjs +3 -1
- package/build/site-title/edit.cjs.map +2 -2
- package/build/social-links/edit.cjs +11 -4
- package/build/social-links/edit.cjs.map +2 -2
- package/build/tab-list/block.json +2 -1
- package/build/tab-list/edit.cjs +2 -0
- package/build/tab-list/edit.cjs.map +3 -3
- package/build/tab-list/tab-movers.cjs +87 -0
- package/build/tab-list/tab-movers.cjs.map +7 -0
- package/build/tab-panel/edit.cjs +1 -9
- package/build/tab-panel/edit.cjs.map +2 -2
- package/build/table/edit.cjs +1 -1
- package/build/table/edit.cjs.map +2 -2
- package/build/tabs/use-tab-actions.cjs +23 -1
- package/build/tabs/use-tab-actions.cjs.map +2 -2
- package/build/utils/caption.cjs +2 -2
- package/build/utils/caption.cjs.map +2 -2
- package/build/verse/edit.cjs +3 -1
- package/build/verse/edit.cjs.map +2 -2
- package/build/video/tracks-editor.cjs +0 -1
- package/build/video/tracks-editor.cjs.map +2 -2
- package/build-module/accordion-panel/block.json +1 -0
- package/build-module/code/edit.mjs +3 -1
- package/build-module/code/edit.mjs.map +2 -2
- package/build-module/cover/block.json +1 -0
- package/build-module/cover/edit/block-controls.mjs +3 -1
- package/build-module/cover/edit/block-controls.mjs.map +2 -2
- package/build-module/cover/edit/index.mjs +78 -34
- package/build-module/cover/edit/index.mjs.map +2 -2
- package/build-module/embed/edit.mjs +1 -1
- package/build-module/embed/edit.mjs.map +2 -2
- package/build-module/embed/embed-placeholder.mjs +1 -1
- package/build-module/embed/embed-placeholder.mjs.map +2 -2
- package/build-module/gallery/dynamic-gallery.mjs +104 -61
- package/build-module/gallery/dynamic-gallery.mjs.map +2 -2
- package/build-module/gallery/use-dynamic-gallery.mjs +16 -9
- package/build-module/gallery/use-dynamic-gallery.mjs.map +2 -2
- package/build-module/heading/edit.mjs +1 -1
- package/build-module/heading/edit.mjs.map +2 -2
- package/build-module/html/modal.mjs +68 -55
- package/build-module/html/modal.mjs.map +2 -2
- package/build-module/icon/block.json +5 -3
- package/build-module/image/edit.mjs +1 -1
- package/build-module/image/edit.mjs.map +2 -2
- package/build-module/image/image.mjs +19 -5
- package/build-module/image/image.mjs.map +2 -2
- package/build-module/image/use-open-image-media-editor-modal.mjs +6 -2
- package/build-module/image/use-open-image-media-editor-modal.mjs.map +2 -2
- package/build-module/list-item/hooks/use-indent-list-item.mjs +10 -2
- package/build-module/list-item/hooks/use-indent-list-item.mjs.map +2 -2
- package/build-module/math/edit.mjs +41 -60
- package/build-module/math/edit.mjs.map +2 -2
- package/build-module/media-text/edit.mjs +2 -1
- package/build-module/media-text/edit.mjs.map +2 -2
- package/build-module/more/edit.mjs +2 -2
- package/build-module/more/edit.mjs.map +2 -2
- package/build-module/navigation/edit/index.mjs +30 -16
- package/build-module/navigation/edit/index.mjs.map +2 -2
- package/build-module/navigation/edit/use-layout-custom-properties.mjs +51 -0
- package/build-module/navigation/edit/use-layout-custom-properties.mjs.map +7 -0
- package/build-module/navigation/view.mjs +9 -6
- package/build-module/navigation/view.mjs.map +2 -2
- package/build-module/navigation-link/edit.mjs +3 -3
- package/build-module/navigation-link/edit.mjs.map +2 -2
- package/build-module/navigation-link/link-ui/index.mjs +2 -2
- package/build-module/navigation-link/link-ui/index.mjs.map +2 -2
- package/build-module/paragraph/block.json +0 -1
- package/build-module/paragraph/edit.mjs +6 -2
- package/build-module/paragraph/edit.mjs.map +2 -2
- package/build-module/paragraph/index.mjs +4 -1
- package/build-module/paragraph/index.mjs.map +2 -2
- package/build-module/playlist/context.mjs +2 -1
- package/build-module/playlist/context.mjs.map +2 -2
- package/build-module/playlist/edit.mjs +113 -27
- package/build-module/playlist/edit.mjs.map +2 -2
- package/build-module/playlist/utils.mjs +19 -4
- package/build-module/playlist/utils.mjs.map +2 -2
- package/build-module/playlist-track/edit.mjs +21 -6
- package/build-module/playlist-track/edit.mjs.map +2 -2
- package/build-module/post-content/edit.mjs +37 -15
- package/build-module/post-content/edit.mjs.map +2 -2
- package/build-module/post-featured-image/edit.mjs +3 -2
- package/build-module/post-featured-image/edit.mjs.map +2 -2
- package/build-module/post-terms/edit.mjs +2 -2
- package/build-module/post-terms/edit.mjs.map +2 -2
- package/build-module/post-title/edit.mjs +2 -2
- package/build-module/post-title/edit.mjs.map +2 -2
- package/build-module/preformatted/edit.mjs +3 -1
- package/build-module/preformatted/edit.mjs.map +2 -2
- package/build-module/pullquote/edit.mjs +5 -3
- package/build-module/pullquote/edit.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/index.mjs +5 -2
- package/build-module/query/edit/inspector-controls/index.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/offset-controls.mjs +2 -2
- package/build-module/query/edit/inspector-controls/offset-controls.mjs.map +2 -2
- package/build-module/read-more/edit.mjs +3 -1
- package/build-module/read-more/edit.mjs.map +2 -2
- package/build-module/site-tagline/edit.mjs +3 -1
- package/build-module/site-tagline/edit.mjs.map +2 -2
- package/build-module/site-title/edit.mjs +3 -1
- package/build-module/site-title/edit.mjs.map +2 -2
- package/build-module/social-links/edit.mjs +11 -4
- package/build-module/social-links/edit.mjs.map +2 -2
- package/build-module/tab-list/block.json +2 -1
- package/build-module/tab-list/edit.mjs +2 -0
- package/build-module/tab-list/edit.mjs.map +2 -2
- package/build-module/tab-list/tab-movers.mjs +59 -0
- package/build-module/tab-list/tab-movers.mjs.map +7 -0
- package/build-module/tab-panel/edit.mjs +1 -9
- package/build-module/tab-panel/edit.mjs.map +2 -2
- package/build-module/table/edit.mjs +1 -1
- package/build-module/table/edit.mjs.map +2 -2
- package/build-module/tabs/use-tab-actions.mjs +23 -1
- package/build-module/tabs/use-tab-actions.mjs.map +2 -2
- package/build-module/utils/caption.mjs +2 -2
- package/build-module/utils/caption.mjs.map +2 -2
- package/build-module/verse/edit.mjs +3 -1
- package/build-module/verse/edit.mjs.map +2 -2
- package/build-module/video/tracks-editor.mjs +0 -1
- package/build-module/video/tracks-editor.mjs.map +2 -2
- package/build-style/cover/editor-rtl.css +3 -0
- package/build-style/cover/editor.css +3 -0
- package/build-style/editor-rtl.css +18 -41
- package/build-style/editor.css +18 -41
- package/build-style/icon/editor-rtl.css +1 -4
- package/build-style/icon/editor.css +1 -4
- package/build-style/image/editor-rtl.css +3 -32
- package/build-style/image/editor.css +3 -32
- package/build-style/playlist/editor-rtl.css +0 -5
- package/build-style/playlist/editor.css +0 -5
- package/build-style/playlist/style-rtl.css +44 -4
- package/build-style/playlist/style.css +44 -4
- package/build-style/pullquote/editor-rtl.css +4 -0
- package/build-style/pullquote/editor.css +4 -0
- package/build-style/style-rtl.css +44 -4
- package/build-style/style.css +44 -4
- package/build-style/tab-list/editor-rtl.css +101 -0
- package/build-style/tab-list/editor.css +101 -0
- package/package.json +43 -43
- package/src/accordion-panel/block.json +1 -0
- package/src/breadcrumbs/index.php +3 -1
- package/src/button/index.php +1 -1
- package/src/code/edit.js +7 -2
- package/src/cover/block.json +1 -0
- package/src/cover/edit/block-controls.js +5 -0
- package/src/cover/edit/index.js +100 -35
- package/src/cover/editor.scss +6 -0
- package/src/cover/index.php +9 -2
- package/src/editor.scss +1 -0
- package/src/embed/edit.js +3 -1
- package/src/embed/embed-placeholder.js +9 -7
- package/src/form/index.php +6 -4
- package/src/gallery/dynamic-gallery.js +133 -74
- package/src/gallery/use-dynamic-gallery.js +27 -12
- package/src/heading/edit.js +1 -1
- package/src/html/modal.js +13 -2
- package/src/icon/README.md +1 -3
- package/src/icon/block.json +5 -3
- package/src/icon/editor.scss +1 -4
- package/src/image/edit.js +1 -5
- package/src/image/editor.scss +6 -46
- package/src/image/image.js +37 -3
- package/src/image/test/use-open-image-media-editor-modal.js +37 -1
- package/src/image/use-open-image-media-editor-modal.js +8 -1
- package/src/latest-posts/index.php +3 -2
- package/src/list-item/hooks/use-indent-list-item.js +10 -1
- package/src/math/edit.js +42 -59
- package/src/media-text/edit.js +1 -0
- package/src/media-text/index.php +11 -2
- package/src/more/edit.js +7 -4
- package/src/navigation/edit/index.js +52 -36
- package/src/navigation/edit/test/layout-custom-properties.js +138 -0
- package/src/navigation/edit/use-layout-custom-properties.js +84 -0
- package/src/navigation/index.php +123 -12
- package/src/navigation/test/view.js +51 -0
- package/src/navigation/view.js +15 -14
- package/src/navigation-link/edit.js +11 -7
- package/src/navigation-link/index.php +64 -0
- package/src/navigation-link/link-ui/index.js +2 -1
- package/src/navigation-link/test/__snapshots__/hooks.js.snap +1 -1
- package/src/page-list/index.php +4 -3
- package/src/paragraph/README.md +0 -1
- package/src/paragraph/block.json +0 -1
- package/src/paragraph/edit.js +9 -2
- package/src/paragraph/index.js +4 -1
- package/src/pattern/index.php +5 -5
- package/src/playlist/context.js +1 -0
- package/src/playlist/edit.js +151 -47
- package/src/playlist/editor.scss +0 -7
- package/src/playlist/index.php +14 -9
- package/src/playlist/style.scss +3 -0
- package/src/playlist/test/edit-component.js +139 -0
- package/src/playlist/test/edit.js +30 -0
- package/src/playlist/utils.js +25 -4
- package/src/playlist-track/edit.js +22 -5
- package/src/playlist-track/index.php +8 -7
- package/src/playlist-track/test/edit.js +87 -3
- package/src/post-content/edit.js +45 -16
- package/src/post-excerpt/index.php +4 -1
- package/src/post-featured-image/edit.js +3 -2
- package/src/post-featured-image/index.php +4 -1
- package/src/post-terms/edit.js +7 -4
- package/src/post-title/edit.js +5 -3
- package/src/preformatted/edit.js +7 -2
- package/src/pullquote/edit.js +9 -4
- package/src/pullquote/editor.scss +6 -0
- package/src/query/edit/inspector-controls/index.js +5 -2
- package/src/query/edit/inspector-controls/offset-controls.js +2 -2
- package/src/read-more/edit.js +7 -2
- package/src/rss/index.php +9 -3
- package/src/site-tagline/edit.js +7 -2
- package/src/site-title/edit.js +7 -2
- package/src/social-link/index.php +19 -9
- package/src/social-links/edit.js +21 -12
- package/src/tab-list/block.json +2 -1
- package/src/tab-list/edit.js +2 -0
- package/src/tab-list/editor.scss +9 -0
- package/src/tab-list/tab-movers.js +72 -0
- package/src/tab-panel/edit.js +1 -9
- package/src/table/edit.js +1 -1
- package/src/table-of-contents/index.php +386 -1
- package/src/tabs/use-tab-actions.js +32 -3
- package/src/tag-cloud/index.php +3 -2
- package/src/template-part/index.php +2 -1
- package/src/utils/caption.js +7 -4
- package/src/utils/test/waveform-utils.js +63 -0
- package/src/verse/edit.js +7 -2
- package/src/video/index.php +2 -2
- package/src/video/tracks-editor.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tabs/use-tab-actions.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { createBlock } from '@wordpress/blocks';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useDispatch, useRegistry } from '@wordpress/data';\n\n/**\n * Provides callbacks to insert and
|
|
5
|
-
"mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,mBAAmB;AAC5B,SAAS,SAAS,wBAAwB;AAC1C,SAAS,aAAa,mBAAmB;AAY1B,SAAR,cAAgC,cAAe;AACrD,QAAM,WAAW,YAAY;AAC7B,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI,YAAa,gBAAiB;AAGlC,QAAM,eAAe,MAAM;AAC1B,UAAM,EAAE,WAAW,mBAAmB,IACrC,SAAS,OAAQ,gBAAiB;AAEnC,UAAM,iBAAiB,eACpB,mBAAoB,YAAa,IACjC;AACH,UAAM,YAAY,eACf,UAAW,YAAa,EAAE;AAAA,MAC1B,CAAE,UAAW,MAAM,SAAS;AAAA,IAC5B,IACA;AAEH,WAAO;AAAA,MACN,mBAAmB,WAAW,YAAY;AAAA,MAC1C,gBAAgB,WAAW,eAAe,CAAC;AAAA,MAC3C,aACC,gBAAgB,wBAChB,gBAAgB,kBAChB;AAAA,IACF;AAAA,EACD;AAGA,QAAM,YAAY,CAAE,YAAa;AAChC,UAAM,EAAE,mBAAmB,eAAe,IAAI,aAAa;AAC3D,QAAK,CAAE,mBAAoB;AAC1B;AAAA,IACD;AAEA,UAAM,WAAW,WAAW,eAAe;AAC3C;AAAA,MACC,YAAa,kBAAkB,EAAE,OAAO,GAAI,KAAM,EAAE,CAAE;AAAA,MACtD;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAGA,4CAAwC;AACxC,0BAAuB,cAAc;AAAA,MACpC,sBAAsB;AAAA,IACvB,CAAE;AAAA,EACH;AAIA,QAAM,YAAY,CAAE,YAAa;AAChC,UAAM,EAAE,gBAAgB,YAAY,IAAI,aAAa;AACrD,UAAM,WAAW,eAAe;AAChC,QAAK,YAAY,GAAI;AACpB;AAAA,IACD;AAEA,UAAM,cAAc,WAAW;AAC/B,UAAM,SAAS,eAAgB,WAAY;AAC3C,QAAK,CAAE,QAAS;AACf;AAAA,IACD;AAGA,UAAM,iBACL,eAAe,WAAW,IAAI,WAAW,IAAI;AAG9C,4CAAwC;AACxC,0BAAuB,cAAc;AAAA,MACpC,sBAAsB;AAAA,IACvB,CAAE;AACF,gBAAa,OAAO,UAAU,KAAM;AAAA,EACrC;AAEA,SAAO,EAAE,WAAW,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { createBlock } from '@wordpress/blocks';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useDispatch, useRegistry } from '@wordpress/data';\n\n/**\n * Provides callbacks to insert, remove and move tabs for a tabs block.\n *\n * The hook intentionally avoids subscribing to the store: all data is derived\n * lazily inside the callbacks via `registry.select`, so consumers don't\n * re-render when the tab structure changes.\n *\n * @param {string|null} tabsClientId The client ID of the parent tabs block.\n * @return {{ insertTab: Function, removeTab: Function, moveTab: Function }} Tab action callbacks.\n */\nexport default function useTabActions( tabsClientId ) {\n\tconst registry = useRegistry();\n\tconst {\n\t\tinsertBlock,\n\t\tremoveBlock,\n\t\tmoveBlocksToPosition,\n\t\tupdateBlockAttributes,\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t} = useDispatch( blockEditorStore );\n\n\t// Derive the current tabs state at call time without subscribing.\n\tconst getTabsState = () => {\n\t\tconst { getBlocks, getBlockAttributes } =\n\t\t\tregistry.select( blockEditorStore );\n\n\t\tconst tabsAttributes = tabsClientId\n\t\t\t? getBlockAttributes( tabsClientId )\n\t\t\t: undefined;\n\t\tconst tabPanels = tabsClientId\n\t\t\t? getBlocks( tabsClientId ).find(\n\t\t\t\t\t( block ) => block.name === 'core/tab-panels'\n\t\t\t )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\ttabPanelsClientId: tabPanels?.clientId ?? null,\n\t\t\ttabPanelBlocks: tabPanels?.innerBlocks ?? [],\n\t\t\tactiveIndex:\n\t\t\t\ttabsAttributes?.editorActiveTabIndex ??\n\t\t\t\ttabsAttributes?.activeTabIndex ??\n\t\t\t\t0,\n\t\t};\n\t};\n\n\t// Insert a new tab and make it active. Defaults to appending at the end.\n\tconst insertTab = ( atIndex ) => {\n\t\tconst { tabPanelsClientId, tabPanelBlocks } = getTabsState();\n\t\tif ( ! tabPanelsClientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newIndex = atIndex ?? tabPanelBlocks.length;\n\t\tinsertBlock(\n\t\t\tcreateBlock( 'core/tab-panel', { label: __( 'Tab' ) } ),\n\t\t\tnewIndex,\n\t\t\ttabPanelsClientId,\n\t\t\tfalse\n\t\t);\n\n\t\t// Switch editor active tab to the new tab.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tupdateBlockAttributes( tabsClientId, {\n\t\t\teditorActiveTabIndex: newIndex,\n\t\t} );\n\t};\n\n\t// Remove a tab and move the active tab to an adjacent one. Defaults to the\n\t// currently active tab.\n\tconst removeTab = ( atIndex ) => {\n\t\tconst { tabPanelBlocks, activeIndex } = getTabsState();\n\t\tconst tabCount = tabPanelBlocks.length;\n\t\tif ( tabCount <= 1 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst removeIndex = atIndex ?? activeIndex;\n\t\tconst target = tabPanelBlocks[ removeIndex ];\n\t\tif ( ! target ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Calculate new active index after removal.\n\t\tconst newActiveIndex =\n\t\t\tremoveIndex >= tabCount - 1 ? tabCount - 2 : removeIndex;\n\n\t\t// Switch editor to the adjacent tab and remove the current one.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tupdateBlockAttributes( tabsClientId, {\n\t\t\teditorActiveTabIndex: newActiveIndex,\n\t\t} );\n\t\tremoveBlock( target.clientId, false );\n\t};\n\n\t// Move the active tab one position left or right by reordering the\n\t// underlying tab-panel. The tab-list labels follow their panel\n\t// automatically via useTabListItemsSync.\n\tconst moveTab = ( direction ) => {\n\t\tconst { tabPanelsClientId, tabPanelBlocks, activeIndex } =\n\t\t\tgetTabsState();\n\t\tif ( ! tabPanelsClientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst toIndex = activeIndex + direction;\n\t\tconst target = tabPanelBlocks[ activeIndex ];\n\t\tif ( ! target || toIndex < 0 || toIndex >= tabPanelBlocks.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tupdateBlockAttributes( tabsClientId, {\n\t\t\teditorActiveTabIndex: toIndex,\n\t\t} );\n\t\tmoveBlocksToPosition(\n\t\t\t[ target.clientId ],\n\t\t\ttabPanelsClientId,\n\t\t\ttabPanelsClientId,\n\t\t\ttoIndex\n\t\t);\n\t};\n\n\treturn { insertTab, removeTab, moveTab };\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,mBAAmB;AAC5B,SAAS,SAAS,wBAAwB;AAC1C,SAAS,aAAa,mBAAmB;AAY1B,SAAR,cAAgC,cAAe;AACrD,QAAM,WAAW,YAAY;AAC7B,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI,YAAa,gBAAiB;AAGlC,QAAM,eAAe,MAAM;AAC1B,UAAM,EAAE,WAAW,mBAAmB,IACrC,SAAS,OAAQ,gBAAiB;AAEnC,UAAM,iBAAiB,eACpB,mBAAoB,YAAa,IACjC;AACH,UAAM,YAAY,eACf,UAAW,YAAa,EAAE;AAAA,MAC1B,CAAE,UAAW,MAAM,SAAS;A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AAA,IACvB,CAAE;AACF;AAAA,MACC,CAAE,OAAO,QAAS;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACD;AAEA,SAAO,EAAE,WAAW,WAAW,QAAQ;AACxC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -85,9 +85,9 @@ function Caption({
|
|
|
85
85
|
value: caption,
|
|
86
86
|
onChange: (value) => setAttributes({ [attributeKey]: value }),
|
|
87
87
|
inlineToolbar: true,
|
|
88
|
-
__unstableOnSplitAtEnd: () => insertBlocksAfter(
|
|
88
|
+
__unstableOnSplitAtEnd: insertBlocksAfter ? () => insertBlocksAfter(
|
|
89
89
|
createBlock(getDefaultBlockName())
|
|
90
|
-
),
|
|
90
|
+
) : void 0,
|
|
91
91
|
readOnly,
|
|
92
92
|
...props
|
|
93
93
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/caption.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useCallback } from '@wordpress/element';\nimport { usePrevious } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBlockControls,\n\t__experimentalGetElementClassName,\n\tRichText,\n} from '@wordpress/block-editor';\nimport { ToolbarButton } from '@wordpress/components';\nimport { caption as captionIcon } from '@wordpress/icons';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\nexport function Caption( {\n\tattributeKey = 'caption',\n\tattributes,\n\tsetAttributes,\n\tisSelected,\n\tinsertBlocksAfter,\n\tplaceholder = __( 'Add caption' ),\n\tlabel = __( 'Caption text' ),\n\tshowToolbarButton = true,\n\texcludeElementClassName,\n\tclassName,\n\treadOnly,\n\ttagName = 'figcaption',\n\taddLabel = __( 'Add caption' ),\n\tremoveLabel = __( 'Remove caption' ),\n\ticon = captionIcon,\n\t...props\n} ) {\n\tconst caption = attributes[ attributeKey ];\n\tconst prevCaption = usePrevious( caption );\n\tconst isCaptionEmpty = RichText.isEmpty( caption );\n\tconst isPrevCaptionEmpty = RichText.isEmpty( prevCaption );\n\tconst [ showCaption, setShowCaption ] = useState( ! isCaptionEmpty );\n\n\t// We need to show the caption when changes come from\n\t// history navigation(undo/redo).\n\tuseEffect( () => {\n\t\tif ( ! isCaptionEmpty && isPrevCaptionEmpty ) {\n\t\t\tsetShowCaption( true );\n\t\t}\n\t}, [ isCaptionEmpty, isPrevCaptionEmpty ] );\n\n\tuseEffect( () => {\n\t\tif ( ! isSelected && isCaptionEmpty ) {\n\t\t\tsetShowCaption( false );\n\t\t}\n\t}, [ isSelected, isCaptionEmpty ] );\n\n\t// Focus the caption when we click to add one.\n\tconst ref = useCallback(\n\t\t( node ) => {\n\t\t\tif ( node && isCaptionEmpty ) {\n\t\t\t\tnode.focus();\n\t\t\t}\n\t\t},\n\t\t[ isCaptionEmpty ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ showToolbarButton && (\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetShowCaption( ! showCaption );\n\t\t\t\t\t\t\tif ( showCaption && caption ) {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t[ attributeKey ]: undefined,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tisPressed={ showCaption }\n\t\t\t\t\t\tlabel={ showCaption ? removeLabel : addLabel }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ showCaption &&\n\t\t\t\t( ! RichText.isEmpty( caption ) || isSelected ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier={ attributeKey }\n\t\t\t\t\t\ttagName={ tagName }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t\texcludeElementClassName\n\t\t\t\t\t\t\t\t? ''\n\t\t\t\t\t\t\t\t: __experimentalGetElementClassName( 'caption' )\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { [ attributeKey ]: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinlineToolbar\n\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\treadOnly={ readOnly }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t</>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,UAAU,WAAW,mBAAmB;AACjD,SAAS,mBAAmB;AAC5B,SAAS,UAAU;AACnB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,qBAAqB;AAC9B,SAAS,WAAW,mBAAmB;AACvC,SAAS,aAAa,2BAA2B;AAmD/C,mBAGG,KAHH;AAjDK,SAAS,QAAS;AAAA,EACxB,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc,GAAI,aAAc;AAAA,EAChC,QAAQ,GAAI,cAAe;AAAA,EAC3B,oBAAoB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,WAAW,GAAI,aAAc;AAAA,EAC7B,cAAc,GAAI,gBAAiB;AAAA,EACnC,OAAO;AAAA,EACP,GAAG;AAC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C,eAAa;AAAA,QACb,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useCallback } from '@wordpress/element';\nimport { usePrevious } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBlockControls,\n\t__experimentalGetElementClassName,\n\tRichText,\n} from '@wordpress/block-editor';\nimport { ToolbarButton } from '@wordpress/components';\nimport { caption as captionIcon } from '@wordpress/icons';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\nexport function Caption( {\n\tattributeKey = 'caption',\n\tattributes,\n\tsetAttributes,\n\tisSelected,\n\tinsertBlocksAfter,\n\tplaceholder = __( 'Add caption' ),\n\tlabel = __( 'Caption text' ),\n\tshowToolbarButton = true,\n\texcludeElementClassName,\n\tclassName,\n\treadOnly,\n\ttagName = 'figcaption',\n\taddLabel = __( 'Add caption' ),\n\tremoveLabel = __( 'Remove caption' ),\n\ticon = captionIcon,\n\t...props\n} ) {\n\tconst caption = attributes[ attributeKey ];\n\tconst prevCaption = usePrevious( caption );\n\tconst isCaptionEmpty = RichText.isEmpty( caption );\n\tconst isPrevCaptionEmpty = RichText.isEmpty( prevCaption );\n\tconst [ showCaption, setShowCaption ] = useState( ! isCaptionEmpty );\n\n\t// We need to show the caption when changes come from\n\t// history navigation(undo/redo).\n\tuseEffect( () => {\n\t\tif ( ! isCaptionEmpty && isPrevCaptionEmpty ) {\n\t\t\tsetShowCaption( true );\n\t\t}\n\t}, [ isCaptionEmpty, isPrevCaptionEmpty ] );\n\n\tuseEffect( () => {\n\t\tif ( ! isSelected && isCaptionEmpty ) {\n\t\t\tsetShowCaption( false );\n\t\t}\n\t}, [ isSelected, isCaptionEmpty ] );\n\n\t// Focus the caption when we click to add one.\n\tconst ref = useCallback(\n\t\t( node ) => {\n\t\t\tif ( node && isCaptionEmpty ) {\n\t\t\t\tnode.focus();\n\t\t\t}\n\t\t},\n\t\t[ isCaptionEmpty ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ showToolbarButton && (\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetShowCaption( ! showCaption );\n\t\t\t\t\t\t\tif ( showCaption && caption ) {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t[ attributeKey ]: undefined,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tisPressed={ showCaption }\n\t\t\t\t\t\tlabel={ showCaption ? removeLabel : addLabel }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ showCaption &&\n\t\t\t\t( ! RichText.isEmpty( caption ) || isSelected ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier={ attributeKey }\n\t\t\t\t\t\ttagName={ tagName }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t\texcludeElementClassName\n\t\t\t\t\t\t\t\t? ''\n\t\t\t\t\t\t\t\t: __experimentalGetElementClassName( 'caption' )\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { [ attributeKey ]: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinlineToolbar\n\t\t\t\t\t\t__unstableOnSplitAtEnd={\n\t\t\t\t\t\t\tinsertBlocksAfter\n\t\t\t\t\t\t\t\t? () =>\n\t\t\t\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t\t\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ACX,UAAK,QAAQ,gBAAiB;AAC7B,aAAK,MAAM;AAAA,MACZ;AAAA,IACD;AAAA,IACA,CAAE,cAAe;AAAA,EAClB;AAEA,SACC,iCACG;AAAA,yBACD,oBAAC,iBAAc,OAAM,SACpB;AAAA,MAAC;AAAA;AAAA,QACA,SAAU,MAAM;AACf,yBAAgB,CAAE,WAAY;AAC9B,cAAK,eAAe,SAAU;AAC7B,0BAAe;AAAA,cACd,CAAE,YAAa,GAAG;AAAA,YACnB,CAAE;AAAA,UACH;AAAA,QACD;AAAA,QACA;AAAA,QACA,WAAY;AAAA,QACZ,OAAQ,cAAc,cAAc;AAAA;AAAA,IACrC,GACD;AAAA,IAEC,gBACC,CAAE,SAAS,QAAS,OAAQ,KAAK,eAClC;AAAA,MAAC;AAAA;AAAA,QACA,YAAa;AAAA,QACb;AAAA,QACA,WAAY;AAAA,UACX;AAAA,UACA,0BACG,KACA,kCAAmC,SAAU;AAAA,QACjD;AAAA,QACA;AAAA,QACA,cAAa;AAAA,QACb;AAAA,QACA,OAAQ;AAAA,QACR,UAAW,CAAE,UACZ,cAAe,EAAE,CAAE,YAAa,GAAG,MAAM,CAAE;AAAA,QAE5C,eAAa;AAAA,QACb,wBACC,oBACG,MACA;AAAA,UACC,YAAa,oBAAoB,CAAE;AAAA,QACpC,IACA;AAAA,QAEJ;AAAA,QACE,GAAG;AAAA;AAAA,IACN;AAAA,KAEH;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -34,7 +34,9 @@ function VerseEdit(props) {
|
|
|
34
34
|
onMerge: mergeBlocks,
|
|
35
35
|
...blockProps,
|
|
36
36
|
__unstablePastePlainText: true,
|
|
37
|
-
__unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter(
|
|
37
|
+
__unstableOnSplitAtDoubleLineEnd: insertBlocksAfter ? () => insertBlocksAfter(
|
|
38
|
+
createBlock(getDefaultBlockName())
|
|
39
|
+
) : void 0
|
|
38
40
|
}
|
|
39
41
|
);
|
|
40
42
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/verse/edit.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport useDeprecatedTextAlign from '../utils/deprecated-text-align-attributes';\n\nexport default function VerseEdit( props ) {\n\tconst {\n\t\tattributes,\n\t\tsetAttributes,\n\t\tmergeBlocks,\n\t\tonRemove,\n\t\tinsertBlocksAfter,\n\t\tstyle,\n\t} = props;\n\tconst { content } = attributes;\n\tuseDeprecatedTextAlign( props );\n\tconst blockProps = useBlockProps( { style } );\n\n\treturn (\n\t\t<RichText\n\t\t\ttagName=\"pre\"\n\t\t\tidentifier=\"content\"\n\t\t\tpreserveWhiteSpace\n\t\t\tvalue={ content }\n\t\t\tonChange={ ( nextContent ) => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tcontent: nextContent,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\taria-label={ __( 'Poetry text' ) }\n\t\t\tplaceholder={ __( 'Write poetry…' ) }\n\t\t\tonRemove={ onRemove }\n\t\t\tonMerge={ mergeBlocks }\n\t\t\t{ ...blockProps }\n\t\t\t__unstablePastePlainText\n\t\t\t__unstableOnSplitAtDoubleLineEnd={ () =>\n\t\t\t\tinsertBlocksAfter(
|
|
5
|
-
"mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,UAAU,qBAAqB;AACxC,SAAS,aAAa,2BAA2B;AAKjD,OAAO,4BAA4B;AAgBjC;AAda,SAAR,UAA4B,OAAQ;AAC1C,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI;AACJ,QAAM,EAAE,QAAQ,IAAI;AACpB,yBAAwB,KAAM;AAC9B,QAAM,aAAa,cAAe,EAAE,MAAM,CAAE;AAE5C,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SAAQ;AAAA,MACR,YAAW;AAAA,MACX,oBAAkB;AAAA,MAClB,OAAQ;AAAA,MACR,UAAW,CAAE,gBAAiB;AAC7B,sBAAe;AAAA,UACd,SAAS;AAAA,QACV,CAAE;AAAA,MACH;AAAA,MACA,cAAa,GAAI,aAAc;AAAA,MAC/B,aAAc,GAAI,eAAgB;AAAA,MAClC;AAAA,MACA,SAAU;AAAA,MACR,GAAG;AAAA,MACL,0BAAwB;AAAA,MACxB,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport useDeprecatedTextAlign from '../utils/deprecated-text-align-attributes';\n\nexport default function VerseEdit( props ) {\n\tconst {\n\t\tattributes,\n\t\tsetAttributes,\n\t\tmergeBlocks,\n\t\tonRemove,\n\t\tinsertBlocksAfter,\n\t\tstyle,\n\t} = props;\n\tconst { content } = attributes;\n\tuseDeprecatedTextAlign( props );\n\tconst blockProps = useBlockProps( { style } );\n\n\treturn (\n\t\t<RichText\n\t\t\ttagName=\"pre\"\n\t\t\tidentifier=\"content\"\n\t\t\tpreserveWhiteSpace\n\t\t\tvalue={ content }\n\t\t\tonChange={ ( nextContent ) => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tcontent: nextContent,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\taria-label={ __( 'Poetry text' ) }\n\t\t\tplaceholder={ __( 'Write poetry…' ) }\n\t\t\tonRemove={ onRemove }\n\t\t\tonMerge={ mergeBlocks }\n\t\t\t{ ...blockProps }\n\t\t\t__unstablePastePlainText\n\t\t\t__unstableOnSplitAtDoubleLineEnd={\n\t\t\t\tinsertBlocksAfter\n\t\t\t\t\t? () =>\n\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t/>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,UAAU,qBAAqB;AACxC,SAAS,aAAa,2BAA2B;AAKjD,OAAO,4BAA4B;AAgBjC;AAda,SAAR,UAA4B,OAAQ;AAC1C,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI;AACJ,QAAM,EAAE,QAAQ,IAAI;AACpB,yBAAwB,KAAM;AAC9B,QAAM,aAAa,cAAe,EAAE,MAAM,CAAE;AAE5C,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SAAQ;AAAA,MACR,YAAW;AAAA,MACX,oBAAkB;AAAA,MAClB,OAAQ;AAAA,MACR,UAAW,CAAE,gBAAiB;AAC7B,sBAAe;AAAA,UACd,SAAS;AAAA,QACV,CAAE;AAAA,MACH;AAAA,MACA,cAAa,GAAI,aAAc;AAAA,MAC/B,aAAc,GAAI,eAAgB;AAAA,MAClC;AAAA,MACA,SAAU;AAAA,MACR,GAAG;AAAA,MACL,0BAAwB;AAAA,MACxB,kCACC,oBACG,MACA;AAAA,QACC,YAAa,oBAAoB,CAAE;AAAA,MACpC,IACA;AAAA;AAAA,EAEL;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/video/tracks-editor.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tNavigableMenu,\n\tMenuItem,\n\tFormFileUpload,\n\tMenuGroup,\n\tToolbarGroup,\n\tToolbarButton,\n\tDropdown,\n\tButton,\n\tTextControl,\n\tSelectControl,\n\tToggleControl,\n\t__experimentalGrid as Grid,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport {\n\tMediaUpload,\n\tMediaUploadCheck,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { upload, media } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { useState, useRef, useEffect } from '@wordpress/element';\nimport { getFilename } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\nconst { Badge: WCBadge } = unlock( componentsPrivateApis );\n\nconst ALLOWED_TYPES = [ 'text/vtt' ];\n\nconst DEFAULT_KIND = 'subtitles';\n\nconst KIND_OPTIONS = [\n\t{ label: __( 'Subtitles' ), value: 'subtitles' },\n\t{ label: __( 'Captions' ), value: 'captions' },\n\t{ label: __( 'Descriptions' ), value: 'descriptions' },\n\t{ label: __( 'Chapters' ), value: 'chapters' },\n\t{ label: __( 'Metadata' ), value: 'metadata' },\n];\n\nconst DEFAULT_TRACK = {\n\tsrc: '',\n\tlabel: '',\n\tsrcLang: 'en',\n\tkind: DEFAULT_KIND,\n\tdefault: false,\n};\n\nfunction TrackList( { tracks, onEditPress } ) {\n\tconst content = tracks.map( ( track, index ) => {\n\t\treturn (\n\t\t\t<HStack\n\t\t\t\tkey={ track.id ?? track.src }\n\t\t\t\tclassName=\"block-library-video-tracks-editor__track-list-track\"\n\t\t\t>\n\t\t\t\t<span>{ track.label }</span>\n\t\t\t\t<HStack justify=\"flex-end\">\n\t\t\t\t\t{ track.default && <WCBadge>{ __( 'Default' ) }</WCBadge> }\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => onEditPress( index ) }\n\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t/* translators: %s: Label of the video text track e.g: \"French subtitles\". */\n\t\t\t\t\t\t\t_x( 'Edit %s', 'text tracks' ),\n\t\t\t\t\t\t\ttrack.label\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</HStack>\n\t\t);\n\t} );\n\n\treturn (\n\t\t<MenuGroup\n\t\t\tlabel={ __( 'Text tracks' ) }\n\t\t\tclassName=\"block-library-video-tracks-editor__track-list\"\n\t\t>\n\t\t\t{ content }\n\t\t</MenuGroup>\n\t);\n}\n\nfunction SingleTrackEditor( {\n\ttrack,\n\tonChange,\n\tonClose,\n\tonRemove,\n\tallowSettingDefault,\n} ) {\n\tconst [ trackState, setTrackState ] = useState( {\n\t\t...DEFAULT_TRACK,\n\t\t...track,\n\t} );\n\n\tconst { src, label, srcLang, kind, default: isDefaultTrack } = trackState;\n\tconst fileName = src.startsWith( 'blob:' ) ? '' : getFilename( src ) || '';\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"block-library-video-tracks-editor__single-track-editor\"\n\t\t\tspacing=\"4\"\n\t\t>\n\t\t\t<span className=\"block-library-video-tracks-editor__single-track-editor-edit-track-label\">\n\t\t\t\t{ __( 'Edit track' ) }\n\t\t\t</span>\n\t\t\t<span>\n\t\t\t\t{ __( 'File' ) }: <b>{ fileName }</b>\n\t\t\t</span>\n\t\t\t<Grid columns={ 2 } gap={ 4 }>\n\t\t\t\t<TextControl\n\t\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\t\tsetTrackState( ( prevTrackState ) => ( {\n\t\t\t\t\t\t\t...prevTrackState,\n\t\t\t\t\t\t\tlabel: newLabel,\n\t\t\t\t\t\t} ) )\n\t\t\t\t\t}\n\t\t\t\t\tlabel={ __( 'Label' ) }\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\thelp={ __( 'Title of track' ) }\n\t\t\t\t/>\n\t\t\t\t<TextControl\n\t\t\t\t\tonChange={ ( newSrcLang ) =>\n\t\t\t\t\t\tsetTrackState( ( prevTrackState ) => ( {\n\t\t\t\t\t\t\t...prevTrackState,\n\t\t\t\t\t\t\tsrcLang: newSrcLang,\n\t\t\t\t\t\t} ) )\n\t\t\t\t\t}\n\t\t\t\t\tlabel={ __( 'Source language' ) }\n\t\t\t\t\tvalue={ srcLang }\n\t\t\t\t\thelp={ __( 'Language tag (en, fr, etc.)' ) }\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t\t<VStack spacing=\"4\">\n\t\t\t\t<SelectControl\n\t\t\t\t\tclassName=\"block-library-video-tracks-editor__single-track-editor-kind-select\"\n\t\t\t\t\toptions={ KIND_OPTIONS }\n\t\t\t\t\tvalue={ kind }\n\t\t\t\t\tlabel={ __( 'Kind' ) }\n\t\t\t\t\tonChange={ ( newKind ) =>\n\t\t\t\t\t\tsetTrackState( ( prevTrackState ) => ( {\n\t\t\t\t\t\t\t...prevTrackState,\n\t\t\t\t\t\t\tkind: newKind,\n\t\t\t\t\t\t} ) )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'Set as default track' ) }\n\t\t\t\t\tchecked={ isDefaultTrack }\n\t\t\t\t\tdisabled={ ! allowSettingDefault }\n\t\t\t\t\tonChange={ ( defaultTrack ) =>\n\t\t\t\t\t\tsetTrackState( ( prevTrackState ) => ( {\n\t\t\t\t\t\t\t...prevTrackState,\n\t\t\t\t\t\t\tdefault: defaultTrack,\n\t\t\t\t\t\t} ) )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<HStack className=\"block-library-video-tracks-editor__single-track-editor-buttons-container\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tisDestructive\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\tonClick={ onRemove }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Remove track' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonChange( trackState );\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Apply' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</VStack>\n\t);\n}\n\nexport default function TracksEditor( { tracks = [], onChange } ) {\n\tconst mediaUpload = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).getSettings().mediaUpload;\n\t}, [] );\n\tconst [ trackBeingEdited, setTrackBeingEdited ] = useState( null );\n\tconst dropdownPopoverRef = useRef();\n\n\tconst handleTrackSelect = ( selectedTracks = [], appendTracks = false ) => {\n\t\tconst existingTracksMap = new Map(\n\t\t\ttracks.map( ( track ) => [ track.id, track ] )\n\t\t);\n\t\tconst tracksToAdd = selectedTracks.map( ( { id, title, url } ) => {\n\t\t\t// Reuse existing tracks to preserve user-configured metadata.\n\t\t\tif ( existingTracksMap.has( id ) ) {\n\t\t\t\treturn existingTracksMap.get( id );\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...DEFAULT_TRACK,\n\t\t\t\tid,\n\t\t\t\tlabel: title || '',\n\t\t\t\tsrc: url,\n\t\t\t};\n\t\t} );\n\n\t\tif ( tracksToAdd.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tonChange( [ ...( appendTracks ? tracks : [] ), ...tracksToAdd ] );\n\t};\n\n\tfunction uploadFiles( event ) {\n\t\tconst files = event.target.files;\n\t\tmediaUpload( {\n\t\t\tallowedTypes: ALLOWED_TYPES,\n\t\t\tfilesList: files,\n\t\t\tonFileChange: ( selectedTracks ) => {\n\t\t\t\tif ( ! Array.isArray( selectedTracks ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Wait until the track has been uploaded.\n\t\t\t\tconst uploadedTracks = selectedTracks.filter(\n\t\t\t\t\t( track ) => !! track?.id\n\t\t\t\t);\n\n\t\t\t\tif ( ! uploadedTracks.length ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\thandleTrackSelect( uploadedTracks, true );\n\t\t\t},\n\t\t} );\n\t}\n\n\tuseEffect( () => {\n\t\tdropdownPopoverRef.current?.focus();\n\t}, [ trackBeingEdited ] );\n\n\tif ( ! mediaUpload ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Dropdown\n\t\t\tcontentClassName=\"block-library-video-tracks-editor\"\n\t\t\tfocusOnMount\n\t\t\tpopoverProps={ {\n\t\t\t\tref: dropdownPopoverRef,\n\t\t\t} }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => {\n\t\t\t\tconst handleOnToggle = () => {\n\t\t\t\t\tif ( ! isOpen ) {\n\t\t\t\t\t\t// When the Popover opens make sure the initial view is\n\t\t\t\t\t\t// always the track list rather than the edit track UI.\n\t\t\t\t\t\tsetTrackBeingEdited( null );\n\t\t\t\t\t}\n\t\t\t\t\tonToggle();\n\t\t\t\t};\n\n\t\t\t\treturn (\n\t\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\t\tonClick={ handleOnToggle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Text tracks' ) }\n\t\t\t\t\t\t</ToolbarButton>\n\t\t\t\t\t</ToolbarGroup>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trenderContent={ () => {\n\t\t\t\tif ( trackBeingEdited !== null ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<SingleTrackEditor\n\t\t\t\t\t\t\ttrack={ tracks[ trackBeingEdited ] }\n\t\t\t\t\t\t\tonChange={ ( newTrack ) => {\n\t\t\t\t\t\t\t\tconst newTracks = [ ...tracks ];\n\t\t\t\t\t\t\t\tnewTracks[ trackBeingEdited ] = newTrack;\n\t\t\t\t\t\t\t\tonChange( newTracks );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonClose={ () => setTrackBeingEdited( null ) }\n\t\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\ttracks.filter(\n\t\t\t\t\t\t\t\t\t\t( _track, index ) =>\n\t\t\t\t\t\t\t\t\t\t\tindex !== trackBeingEdited\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tsetTrackBeingEdited( null );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tallowSettingDefault={\n\t\t\t\t\t\t\t\t! tracks.some( ( track ) => track.default ) ||\n\t\t\t\t\t\t\t\ttracks[ trackBeingEdited ].default\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ tracks.length === 0 && (\n\t\t\t\t\t\t\t<div className=\"block-library-video-tracks-editor__tracks-informative-message\">\n\t\t\t\t\t\t\t\t<h2 className=\"block-library-video-tracks-editor__tracks-informative-message-title\">\n\t\t\t\t\t\t\t\t\t{ __( 'Text tracks' ) }\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t<p className=\"block-library-video-tracks-editor__tracks-informative-message-description\">\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<NavigableMenu>\n\t\t\t\t\t\t\t<TrackList\n\t\t\t\t\t\t\t\ttracks={ tracks }\n\t\t\t\t\t\t\t\tonEditPress={ setTrackBeingEdited }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuGroup\n\t\t\t\t\t\t\t\tclassName=\"block-library-video-tracks-editor__add-tracks-container\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Add tracks' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<MediaUploadCheck>\n\t\t\t\t\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\t\t\t\t\tonSelect={ handleTrackSelect }\n\t\t\t\t\t\t\t\t\t\tallowedTypes={ ALLOWED_TYPES }\n\t\t\t\t\t\t\t\t\t\tvalue={ tracks.map( ( { id } ) => id ) }\n\t\t\t\t\t\t\t\t\t\tmultiple\n\t\t\t\t\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ media }\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'Open Media Library' ) }\n\t\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<FormFileUpload\n\t\t\t\t\t\t\t\t\t\tonChange={ uploadFiles }\n\t\t\t\t\t\t\t\t\t\taccept=\".vtt,text/vtt\"\n\t\t\t\t\t\t\t\t\t\tmultiple\n\t\t\t\t\t\t\t\t\t\trender={ ( { openFileDialog } ) => {\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ openFileDialog }\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ _x( 'Upload', 'verb' ) }\n\t\t\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</MediaUploadCheck>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t</NavigableMenu>\n\t\t\t\t\t</>\n\t\t\t\t);\n\t\t\t} }\n\t\t/>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";AAGA,SAAS,IAAI,IAAI,eAAe;AAChC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,sBAAsB;AAAA,EACtB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,eAAe;AAAA,OACT;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA,SAAS;AAAA,OACH;AACP,SAAS,QAAQ,aAAa;AAC9B,SAAS,iBAAiB;AAC1B,SAAS,UAAU,QAAQ,iBAAiB;AAC5C,SAAS,mBAAmB;AAK5B,SAAS,cAAc;AA+BnB,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tNavigableMenu,\n\tMenuItem,\n\tFormFileUpload,\n\tMenuGroup,\n\tToolbarGroup,\n\tToolbarButton,\n\tDropdown,\n\tButton,\n\tTextControl,\n\tSelectControl,\n\tToggleControl,\n\t__experimentalGrid as Grid,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport {\n\tMediaUpload,\n\tMediaUploadCheck,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { upload, media } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { useState, useRef, useEffect } from '@wordpress/element';\nimport { getFilename } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\nconst { Badge: WCBadge } = unlock( componentsPrivateApis );\n\nconst ALLOWED_TYPES = [ 'text/vtt' ];\n\nconst DEFAULT_KIND = 'subtitles';\n\nconst KIND_OPTIONS = [\n\t{ label: __( 'Subtitles' ), value: 'subtitles' },\n\t{ label: __( 'Captions' ), value: 'captions' },\n\t{ label: __( 'Descriptions' ), value: 'descriptions' },\n\t{ label: __( 'Chapters' ), value: 'chapters' },\n\t{ label: __( 'Metadata' ), value: 'metadata' },\n];\n\nconst DEFAULT_TRACK = {\n\tsrc: '',\n\tlabel: '',\n\tsrcLang: 'en',\n\tkind: DEFAULT_KIND,\n\tdefault: false,\n};\n\nfunction TrackList( { tracks, onEditPress } ) {\n\tconst content = tracks.map( ( track, index ) => {\n\t\treturn (\n\t\t\t<HStack\n\t\t\t\tkey={ track.id ?? track.src }\n\t\t\t\tclassName=\"block-library-video-tracks-editor__track-list-track\"\n\t\t\t>\n\t\t\t\t<span>{ track.label }</span>\n\t\t\t\t<HStack justify=\"flex-end\">\n\t\t\t\t\t{ track.default && <WCBadge>{ __( 'Default' ) }</WCBadge> }\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => onEditPress( index ) }\n\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t/* translators: %s: Label of the video text track e.g: \"French subtitles\". */\n\t\t\t\t\t\t\t_x( 'Edit %s', 'text tracks' ),\n\t\t\t\t\t\t\ttrack.label\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</HStack>\n\t\t);\n\t} );\n\n\treturn (\n\t\t<MenuGroup\n\t\t\tlabel={ __( 'Text tracks' ) }\n\t\t\tclassName=\"block-library-video-tracks-editor__track-list\"\n\t\t>\n\t\t\t{ content }\n\t\t</MenuGroup>\n\t);\n}\n\nfunction SingleTrackEditor( {\n\ttrack,\n\tonChange,\n\tonClose,\n\tonRemove,\n\tallowSettingDefault,\n} ) {\n\tconst [ trackState, setTrackState ] = useState( {\n\t\t...DEFAULT_TRACK,\n\t\t...track,\n\t} );\n\n\tconst { src, label, srcLang, kind, default: isDefaultTrack } = trackState;\n\tconst fileName = src.startsWith( 'blob:' ) ? '' : getFilename( src ) || '';\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"block-library-video-tracks-editor__single-track-editor\"\n\t\t\tspacing=\"4\"\n\t\t>\n\t\t\t<span className=\"block-library-video-tracks-editor__single-track-editor-edit-track-label\">\n\t\t\t\t{ __( 'Edit track' ) }\n\t\t\t</span>\n\t\t\t<span>\n\t\t\t\t{ __( 'File' ) }: <b>{ fileName }</b>\n\t\t\t</span>\n\t\t\t<Grid columns={ 2 } gap={ 4 }>\n\t\t\t\t<TextControl\n\t\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\t\tsetTrackState( ( prevTrackState ) => ( {\n\t\t\t\t\t\t\t...prevTrackState,\n\t\t\t\t\t\t\tlabel: newLabel,\n\t\t\t\t\t\t} ) )\n\t\t\t\t\t}\n\t\t\t\t\tlabel={ __( 'Label' ) }\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\thelp={ __( 'Title of track' ) }\n\t\t\t\t/>\n\t\t\t\t<TextControl\n\t\t\t\t\tonChange={ ( newSrcLang ) =>\n\t\t\t\t\t\tsetTrackState( ( prevTrackState ) => ( {\n\t\t\t\t\t\t\t...prevTrackState,\n\t\t\t\t\t\t\tsrcLang: newSrcLang,\n\t\t\t\t\t\t} ) )\n\t\t\t\t\t}\n\t\t\t\t\tlabel={ __( 'Source language' ) }\n\t\t\t\t\tvalue={ srcLang }\n\t\t\t\t\thelp={ __( 'Language tag (en, fr, etc.)' ) }\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t\t<VStack spacing=\"4\">\n\t\t\t\t<SelectControl\n\t\t\t\t\tclassName=\"block-library-video-tracks-editor__single-track-editor-kind-select\"\n\t\t\t\t\toptions={ KIND_OPTIONS }\n\t\t\t\t\tvalue={ kind }\n\t\t\t\t\tlabel={ __( 'Kind' ) }\n\t\t\t\t\tonChange={ ( newKind ) =>\n\t\t\t\t\t\tsetTrackState( ( prevTrackState ) => ( {\n\t\t\t\t\t\t\t...prevTrackState,\n\t\t\t\t\t\t\tkind: newKind,\n\t\t\t\t\t\t} ) )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Set as default track' ) }\n\t\t\t\t\tchecked={ isDefaultTrack }\n\t\t\t\t\tdisabled={ ! allowSettingDefault }\n\t\t\t\t\tonChange={ ( defaultTrack ) =>\n\t\t\t\t\t\tsetTrackState( ( prevTrackState ) => ( {\n\t\t\t\t\t\t\t...prevTrackState,\n\t\t\t\t\t\t\tdefault: defaultTrack,\n\t\t\t\t\t\t} ) )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<HStack className=\"block-library-video-tracks-editor__single-track-editor-buttons-container\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tisDestructive\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\tonClick={ onRemove }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Remove track' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonChange( trackState );\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Apply' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</VStack>\n\t);\n}\n\nexport default function TracksEditor( { tracks = [], onChange } ) {\n\tconst mediaUpload = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).getSettings().mediaUpload;\n\t}, [] );\n\tconst [ trackBeingEdited, setTrackBeingEdited ] = useState( null );\n\tconst dropdownPopoverRef = useRef();\n\n\tconst handleTrackSelect = ( selectedTracks = [], appendTracks = false ) => {\n\t\tconst existingTracksMap = new Map(\n\t\t\ttracks.map( ( track ) => [ track.id, track ] )\n\t\t);\n\t\tconst tracksToAdd = selectedTracks.map( ( { id, title, url } ) => {\n\t\t\t// Reuse existing tracks to preserve user-configured metadata.\n\t\t\tif ( existingTracksMap.has( id ) ) {\n\t\t\t\treturn existingTracksMap.get( id );\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...DEFAULT_TRACK,\n\t\t\t\tid,\n\t\t\t\tlabel: title || '',\n\t\t\t\tsrc: url,\n\t\t\t};\n\t\t} );\n\n\t\tif ( tracksToAdd.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tonChange( [ ...( appendTracks ? tracks : [] ), ...tracksToAdd ] );\n\t};\n\n\tfunction uploadFiles( event ) {\n\t\tconst files = event.target.files;\n\t\tmediaUpload( {\n\t\t\tallowedTypes: ALLOWED_TYPES,\n\t\t\tfilesList: files,\n\t\t\tonFileChange: ( selectedTracks ) => {\n\t\t\t\tif ( ! Array.isArray( selectedTracks ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Wait until the track has been uploaded.\n\t\t\t\tconst uploadedTracks = selectedTracks.filter(\n\t\t\t\t\t( track ) => !! track?.id\n\t\t\t\t);\n\n\t\t\t\tif ( ! uploadedTracks.length ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\thandleTrackSelect( uploadedTracks, true );\n\t\t\t},\n\t\t} );\n\t}\n\n\tuseEffect( () => {\n\t\tdropdownPopoverRef.current?.focus();\n\t}, [ trackBeingEdited ] );\n\n\tif ( ! mediaUpload ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Dropdown\n\t\t\tcontentClassName=\"block-library-video-tracks-editor\"\n\t\t\tfocusOnMount\n\t\t\tpopoverProps={ {\n\t\t\t\tref: dropdownPopoverRef,\n\t\t\t} }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => {\n\t\t\t\tconst handleOnToggle = () => {\n\t\t\t\t\tif ( ! isOpen ) {\n\t\t\t\t\t\t// When the Popover opens make sure the initial view is\n\t\t\t\t\t\t// always the track list rather than the edit track UI.\n\t\t\t\t\t\tsetTrackBeingEdited( null );\n\t\t\t\t\t}\n\t\t\t\t\tonToggle();\n\t\t\t\t};\n\n\t\t\t\treturn (\n\t\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\t\tonClick={ handleOnToggle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Text tracks' ) }\n\t\t\t\t\t\t</ToolbarButton>\n\t\t\t\t\t</ToolbarGroup>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trenderContent={ () => {\n\t\t\t\tif ( trackBeingEdited !== null ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<SingleTrackEditor\n\t\t\t\t\t\t\ttrack={ tracks[ trackBeingEdited ] }\n\t\t\t\t\t\t\tonChange={ ( newTrack ) => {\n\t\t\t\t\t\t\t\tconst newTracks = [ ...tracks ];\n\t\t\t\t\t\t\t\tnewTracks[ trackBeingEdited ] = newTrack;\n\t\t\t\t\t\t\t\tonChange( newTracks );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonClose={ () => setTrackBeingEdited( null ) }\n\t\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\ttracks.filter(\n\t\t\t\t\t\t\t\t\t\t( _track, index ) =>\n\t\t\t\t\t\t\t\t\t\t\tindex !== trackBeingEdited\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tsetTrackBeingEdited( null );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tallowSettingDefault={\n\t\t\t\t\t\t\t\t! tracks.some( ( track ) => track.default ) ||\n\t\t\t\t\t\t\t\ttracks[ trackBeingEdited ].default\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ tracks.length === 0 && (\n\t\t\t\t\t\t\t<div className=\"block-library-video-tracks-editor__tracks-informative-message\">\n\t\t\t\t\t\t\t\t<h2 className=\"block-library-video-tracks-editor__tracks-informative-message-title\">\n\t\t\t\t\t\t\t\t\t{ __( 'Text tracks' ) }\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t<p className=\"block-library-video-tracks-editor__tracks-informative-message-description\">\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<NavigableMenu>\n\t\t\t\t\t\t\t<TrackList\n\t\t\t\t\t\t\t\ttracks={ tracks }\n\t\t\t\t\t\t\t\tonEditPress={ setTrackBeingEdited }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuGroup\n\t\t\t\t\t\t\t\tclassName=\"block-library-video-tracks-editor__add-tracks-container\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Add tracks' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<MediaUploadCheck>\n\t\t\t\t\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\t\t\t\t\tonSelect={ handleTrackSelect }\n\t\t\t\t\t\t\t\t\t\tallowedTypes={ ALLOWED_TYPES }\n\t\t\t\t\t\t\t\t\t\tvalue={ tracks.map( ( { id } ) => id ) }\n\t\t\t\t\t\t\t\t\t\tmultiple\n\t\t\t\t\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ media }\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'Open Media Library' ) }\n\t\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<FormFileUpload\n\t\t\t\t\t\t\t\t\t\tonChange={ uploadFiles }\n\t\t\t\t\t\t\t\t\t\taccept=\".vtt,text/vtt\"\n\t\t\t\t\t\t\t\t\t\tmultiple\n\t\t\t\t\t\t\t\t\t\trender={ ( { openFileDialog } ) => {\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ openFileDialog }\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ _x( 'Upload', 'verb' ) }\n\t\t\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</MediaUploadCheck>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t</NavigableMenu>\n\t\t\t\t\t</>\n\t\t\t\t);\n\t\t\t} }\n\t\t/>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,IAAI,IAAI,eAAe;AAChC;AAAA,EACC;AAAA,EACA;AAAA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,YACA;AAAA,cAAC;AAAA;AAAA,gBACA,WAAU;AAAA,gBACV,OAAQ,GAAI,YAAa;AAAA,gBAEzB,+BAAC,oBACA;AAAA;AAAA,oBAAC;AAAA;AAAA,sBACA,UAAW;AAAA,sBACX,cAAe;AAAA,sBACf,OAAQ,OAAO,IAAK,CAAE,EAAE,GAAG,MAAO,EAAG;AAAA,sBACrC,UAAQ;AAAA,sBACR,QAAS,CAAE,EAAE,KAAK,MACjB;AAAA,wBAAC;AAAA;AAAA,0BACA,MAAO;AAAA,0BACP,SAAU;AAAA,0BAER,aAAI,oBAAqB;AAAA;AAAA,sBAC5B;AAAA;AAAA,kBAEF;AAAA,kBACA;AAAA,oBAAC;AAAA;AAAA,sBACA,UAAW;AAAA,sBACX,QAAO;AAAA,sBACP,UAAQ;AAAA,sBACR,QAAS,CAAE,EAAE,eAAe,MAAO;AAClC,+BACC;AAAA,0BAAC;AAAA;AAAA,4BACA,MAAO;AAAA,4BACP,SAAU;AAAA,4BAER,aAAI,UAAU,MAAO;AAAA;AAAA,wBACxB;AAAA,sBAEF;AAAA;AAAA,kBACD;AAAA,mBACD;AAAA;AAAA,YACD;AAAA,aACD;AAAA,WACD;AAAA,MAEF;AAAA;AAAA,EACD;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -479,6 +479,9 @@ html :where(.wp-block-column) {
|
|
|
479
479
|
.wp-block-cover.is-transient .wp-block-cover__inner-container {
|
|
480
480
|
z-index: 2;
|
|
481
481
|
}
|
|
482
|
+
.wp-block-cover.is-transient .components-spinner {
|
|
483
|
+
z-index: 3;
|
|
484
|
+
}
|
|
482
485
|
.wp-block-cover .components-spinner {
|
|
483
486
|
position: absolute;
|
|
484
487
|
top: 50%;
|
|
@@ -992,10 +995,7 @@ html :where(.wp-block-column) {
|
|
|
992
995
|
.wp-block-icon__inserter-grid-icons-list-item-title {
|
|
993
996
|
font-size: 12px;
|
|
994
997
|
padding: 4px 4px 8px;
|
|
995
|
-
overflow:
|
|
996
|
-
text-overflow: ellipsis;
|
|
997
|
-
white-space: nowrap;
|
|
998
|
-
width: 100%;
|
|
998
|
+
overflow-wrap: break-word;
|
|
999
999
|
}
|
|
1000
1000
|
|
|
1001
1001
|
.wp-block-icon__toolbar-content {
|
|
@@ -1017,11 +1017,12 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
1017
1017
|
.wp-block-image {
|
|
1018
1018
|
position: relative;
|
|
1019
1019
|
}
|
|
1020
|
-
.wp-block-image.is-transient:not(.alignwide):not(.alignfull) {
|
|
1020
|
+
.wp-block-image.is-transient:not(.alignwide):not(.alignfull), .wp-block-image:has(img.is-swapping-media):not(.alignwide):not(.alignfull) {
|
|
1021
1021
|
width: -moz-fit-content;
|
|
1022
1022
|
width: fit-content;
|
|
1023
1023
|
}
|
|
1024
|
-
.wp-block-image .is-applying img, .wp-block-image.is-transient img
|
|
1024
|
+
.wp-block-image .is-applying img, .wp-block-image.is-transient img,
|
|
1025
|
+
.wp-block-image img.is-swapping-media {
|
|
1025
1026
|
opacity: 0.3;
|
|
1026
1027
|
}
|
|
1027
1028
|
.wp-block-image figcaption img {
|
|
@@ -1104,36 +1105,6 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
1104
1105
|
position: relative;
|
|
1105
1106
|
}
|
|
1106
1107
|
|
|
1107
|
-
.wp-block-image__crop-area {
|
|
1108
|
-
position: relative;
|
|
1109
|
-
max-width: 100%;
|
|
1110
|
-
width: 100%;
|
|
1111
|
-
overflow: hidden;
|
|
1112
|
-
}
|
|
1113
|
-
.wp-block-image__crop-area .reactEasyCrop_Container {
|
|
1114
|
-
pointer-events: auto;
|
|
1115
|
-
}
|
|
1116
|
-
.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image {
|
|
1117
|
-
border: none;
|
|
1118
|
-
border-radius: 0;
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
.wp-block-image__crop-icon {
|
|
1122
|
-
padding: 0 8px;
|
|
1123
|
-
min-width: 48px;
|
|
1124
|
-
display: flex;
|
|
1125
|
-
justify-content: center;
|
|
1126
|
-
align-items: center;
|
|
1127
|
-
}
|
|
1128
|
-
.wp-block-image__crop-icon svg {
|
|
1129
|
-
fill: currentColor;
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
.wp-block-image__zoom .components-popover__content {
|
|
1133
|
-
min-width: 260px;
|
|
1134
|
-
overflow: visible !important;
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
1108
|
.wp-block-image__toolbar_content_textarea__container {
|
|
1138
1109
|
padding: 8px;
|
|
1139
1110
|
}
|
|
@@ -2052,11 +2023,6 @@ html[dir=rtl] .has-drop-cap:not(:focus)::first-letter {
|
|
|
2052
2023
|
padding: 16px;
|
|
2053
2024
|
}
|
|
2054
2025
|
|
|
2055
|
-
.wp-block-playlist li.block-list-appender.block-list-appender {
|
|
2056
|
-
position: initial;
|
|
2057
|
-
margin-top: var(--wp--preset--spacing--30, 1em);
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
2026
|
.wp-block-playlist__waveform-color-controls {
|
|
2061
2027
|
display: grid;
|
|
2062
2028
|
grid-column: 1/-1;
|
|
@@ -2079,6 +2045,10 @@ html[dir=rtl] .has-drop-cap:not(:focus)::first-letter {
|
|
|
2079
2045
|
color: inherit;
|
|
2080
2046
|
}
|
|
2081
2047
|
|
|
2048
|
+
.wp-block-pullquote[style*=line-height] :where(p) {
|
|
2049
|
+
line-height: inherit;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2082
2052
|
.wp-block-rss li a > div {
|
|
2083
2053
|
display: inline;
|
|
2084
2054
|
}
|
|
@@ -2370,6 +2340,13 @@ html[dir=rtl] .has-drop-cap:not(:focus)::first-letter {
|
|
|
2370
2340
|
height: 100% !important;
|
|
2371
2341
|
}
|
|
2372
2342
|
|
|
2343
|
+
@media (min-width: 600px) {
|
|
2344
|
+
.wp-block-tab-list__mover-button {
|
|
2345
|
+
width: 24px;
|
|
2346
|
+
min-width: 0 !important;
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2373
2350
|
.wp-block[data-align=left] > .wp-block-table, .wp-block[data-align=right] > .wp-block-table, .wp-block[data-align=center] > .wp-block-table {
|
|
2374
2351
|
height: auto;
|
|
2375
2352
|
}
|
package/build-style/editor.css
CHANGED
|
@@ -481,6 +481,9 @@ html :where(.wp-block-column) {
|
|
|
481
481
|
.wp-block-cover.is-transient .wp-block-cover__inner-container {
|
|
482
482
|
z-index: 2;
|
|
483
483
|
}
|
|
484
|
+
.wp-block-cover.is-transient .components-spinner {
|
|
485
|
+
z-index: 3;
|
|
486
|
+
}
|
|
484
487
|
.wp-block-cover .components-spinner {
|
|
485
488
|
position: absolute;
|
|
486
489
|
top: 50%;
|
|
@@ -995,10 +998,7 @@ html :where(.wp-block-column) {
|
|
|
995
998
|
.wp-block-icon__inserter-grid-icons-list-item-title {
|
|
996
999
|
font-size: 12px;
|
|
997
1000
|
padding: 4px 4px 8px;
|
|
998
|
-
overflow:
|
|
999
|
-
text-overflow: ellipsis;
|
|
1000
|
-
white-space: nowrap;
|
|
1001
|
-
width: 100%;
|
|
1001
|
+
overflow-wrap: break-word;
|
|
1002
1002
|
}
|
|
1003
1003
|
|
|
1004
1004
|
.wp-block-icon__toolbar-content {
|
|
@@ -1020,11 +1020,12 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
1020
1020
|
.wp-block-image {
|
|
1021
1021
|
position: relative;
|
|
1022
1022
|
}
|
|
1023
|
-
.wp-block-image.is-transient:not(.alignwide):not(.alignfull) {
|
|
1023
|
+
.wp-block-image.is-transient:not(.alignwide):not(.alignfull), .wp-block-image:has(img.is-swapping-media):not(.alignwide):not(.alignfull) {
|
|
1024
1024
|
width: -moz-fit-content;
|
|
1025
1025
|
width: fit-content;
|
|
1026
1026
|
}
|
|
1027
|
-
.wp-block-image .is-applying img, .wp-block-image.is-transient img
|
|
1027
|
+
.wp-block-image .is-applying img, .wp-block-image.is-transient img,
|
|
1028
|
+
.wp-block-image img.is-swapping-media {
|
|
1028
1029
|
opacity: 0.3;
|
|
1029
1030
|
}
|
|
1030
1031
|
.wp-block-image figcaption img {
|
|
@@ -1107,36 +1108,6 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
1107
1108
|
position: relative;
|
|
1108
1109
|
}
|
|
1109
1110
|
|
|
1110
|
-
.wp-block-image__crop-area {
|
|
1111
|
-
position: relative;
|
|
1112
|
-
max-width: 100%;
|
|
1113
|
-
width: 100%;
|
|
1114
|
-
overflow: hidden;
|
|
1115
|
-
}
|
|
1116
|
-
.wp-block-image__crop-area .reactEasyCrop_Container {
|
|
1117
|
-
pointer-events: auto;
|
|
1118
|
-
}
|
|
1119
|
-
.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image {
|
|
1120
|
-
border: none;
|
|
1121
|
-
border-radius: 0;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
.wp-block-image__crop-icon {
|
|
1125
|
-
padding: 0 8px;
|
|
1126
|
-
min-width: 48px;
|
|
1127
|
-
display: flex;
|
|
1128
|
-
justify-content: center;
|
|
1129
|
-
align-items: center;
|
|
1130
|
-
}
|
|
1131
|
-
.wp-block-image__crop-icon svg {
|
|
1132
|
-
fill: currentColor;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
.wp-block-image__zoom .components-popover__content {
|
|
1136
|
-
min-width: 260px;
|
|
1137
|
-
overflow: visible !important;
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
1111
|
.wp-block-image__toolbar_content_textarea__container {
|
|
1141
1112
|
padding: 8px;
|
|
1142
1113
|
}
|
|
@@ -2056,11 +2027,6 @@ html[dir=rtl] .has-drop-cap:not(:focus)::first-letter {
|
|
|
2056
2027
|
padding: 16px;
|
|
2057
2028
|
}
|
|
2058
2029
|
|
|
2059
|
-
.wp-block-playlist li.block-list-appender.block-list-appender {
|
|
2060
|
-
position: initial;
|
|
2061
|
-
margin-top: var(--wp--preset--spacing--30, 1em);
|
|
2062
|
-
}
|
|
2063
|
-
|
|
2064
2030
|
.wp-block-playlist__waveform-color-controls {
|
|
2065
2031
|
display: grid;
|
|
2066
2032
|
grid-column: 1/-1;
|
|
@@ -2083,6 +2049,10 @@ html[dir=rtl] .has-drop-cap:not(:focus)::first-letter {
|
|
|
2083
2049
|
color: inherit;
|
|
2084
2050
|
}
|
|
2085
2051
|
|
|
2052
|
+
.wp-block-pullquote[style*=line-height] :where(p) {
|
|
2053
|
+
line-height: inherit;
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2086
2056
|
.wp-block-rss li a > div {
|
|
2087
2057
|
display: inline;
|
|
2088
2058
|
}
|
|
@@ -2374,6 +2344,13 @@ html[dir=rtl] .has-drop-cap:not(:focus)::first-letter {
|
|
|
2374
2344
|
height: 100% !important;
|
|
2375
2345
|
}
|
|
2376
2346
|
|
|
2347
|
+
@media (min-width: 600px) {
|
|
2348
|
+
.wp-block-tab-list__mover-button {
|
|
2349
|
+
width: 24px;
|
|
2350
|
+
min-width: 0 !important;
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2377
2354
|
.wp-block[data-align=left] > .wp-block-table, .wp-block[data-align=right] > .wp-block-table, .wp-block[data-align=center] > .wp-block-table {
|
|
2378
2355
|
height: auto;
|
|
2379
2356
|
}
|
|
@@ -155,10 +155,7 @@
|
|
|
155
155
|
.wp-block-icon__inserter-grid-icons-list-item-title {
|
|
156
156
|
font-size: 12px;
|
|
157
157
|
padding: 4px 4px 8px;
|
|
158
|
-
overflow:
|
|
159
|
-
text-overflow: ellipsis;
|
|
160
|
-
white-space: nowrap;
|
|
161
|
-
width: 100%;
|
|
158
|
+
overflow-wrap: break-word;
|
|
162
159
|
}
|
|
163
160
|
|
|
164
161
|
.wp-block-icon__toolbar-content {
|
|
@@ -155,10 +155,7 @@
|
|
|
155
155
|
.wp-block-icon__inserter-grid-icons-list-item-title {
|
|
156
156
|
font-size: 12px;
|
|
157
157
|
padding: 4px 4px 8px;
|
|
158
|
-
overflow:
|
|
159
|
-
text-overflow: ellipsis;
|
|
160
|
-
white-space: nowrap;
|
|
161
|
-
width: 100%;
|
|
158
|
+
overflow-wrap: break-word;
|
|
162
159
|
}
|
|
163
160
|
|
|
164
161
|
.wp-block-icon__toolbar-content {
|
|
@@ -104,11 +104,12 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
104
104
|
.wp-block-image {
|
|
105
105
|
position: relative;
|
|
106
106
|
}
|
|
107
|
-
.wp-block-image.is-transient:not(.alignwide):not(.alignfull) {
|
|
107
|
+
.wp-block-image.is-transient:not(.alignwide):not(.alignfull), .wp-block-image:has(img.is-swapping-media):not(.alignwide):not(.alignfull) {
|
|
108
108
|
width: -moz-fit-content;
|
|
109
109
|
width: fit-content;
|
|
110
110
|
}
|
|
111
|
-
.wp-block-image .is-applying img, .wp-block-image.is-transient img
|
|
111
|
+
.wp-block-image .is-applying img, .wp-block-image.is-transient img,
|
|
112
|
+
.wp-block-image img.is-swapping-media {
|
|
112
113
|
opacity: 0.3;
|
|
113
114
|
}
|
|
114
115
|
.wp-block-image figcaption img {
|
|
@@ -191,36 +192,6 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
191
192
|
position: relative;
|
|
192
193
|
}
|
|
193
194
|
|
|
194
|
-
.wp-block-image__crop-area {
|
|
195
|
-
position: relative;
|
|
196
|
-
max-width: 100%;
|
|
197
|
-
width: 100%;
|
|
198
|
-
overflow: hidden;
|
|
199
|
-
}
|
|
200
|
-
.wp-block-image__crop-area .reactEasyCrop_Container {
|
|
201
|
-
pointer-events: auto;
|
|
202
|
-
}
|
|
203
|
-
.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image {
|
|
204
|
-
border: none;
|
|
205
|
-
border-radius: 0;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.wp-block-image__crop-icon {
|
|
209
|
-
padding: 0 8px;
|
|
210
|
-
min-width: 48px;
|
|
211
|
-
display: flex;
|
|
212
|
-
justify-content: center;
|
|
213
|
-
align-items: center;
|
|
214
|
-
}
|
|
215
|
-
.wp-block-image__crop-icon svg {
|
|
216
|
-
fill: currentColor;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.wp-block-image__zoom .components-popover__content {
|
|
220
|
-
min-width: 260px;
|
|
221
|
-
overflow: visible !important;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
195
|
.wp-block-image__toolbar_content_textarea__container {
|
|
225
196
|
padding: 8px;
|
|
226
197
|
}
|
|
@@ -104,11 +104,12 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
104
104
|
.wp-block-image {
|
|
105
105
|
position: relative;
|
|
106
106
|
}
|
|
107
|
-
.wp-block-image.is-transient:not(.alignwide):not(.alignfull) {
|
|
107
|
+
.wp-block-image.is-transient:not(.alignwide):not(.alignfull), .wp-block-image:has(img.is-swapping-media):not(.alignwide):not(.alignfull) {
|
|
108
108
|
width: -moz-fit-content;
|
|
109
109
|
width: fit-content;
|
|
110
110
|
}
|
|
111
|
-
.wp-block-image .is-applying img, .wp-block-image.is-transient img
|
|
111
|
+
.wp-block-image .is-applying img, .wp-block-image.is-transient img,
|
|
112
|
+
.wp-block-image img.is-swapping-media {
|
|
112
113
|
opacity: 0.3;
|
|
113
114
|
}
|
|
114
115
|
.wp-block-image figcaption img {
|
|
@@ -191,36 +192,6 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
191
192
|
position: relative;
|
|
192
193
|
}
|
|
193
194
|
|
|
194
|
-
.wp-block-image__crop-area {
|
|
195
|
-
position: relative;
|
|
196
|
-
max-width: 100%;
|
|
197
|
-
width: 100%;
|
|
198
|
-
overflow: hidden;
|
|
199
|
-
}
|
|
200
|
-
.wp-block-image__crop-area .reactEasyCrop_Container {
|
|
201
|
-
pointer-events: auto;
|
|
202
|
-
}
|
|
203
|
-
.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image {
|
|
204
|
-
border: none;
|
|
205
|
-
border-radius: 0;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.wp-block-image__crop-icon {
|
|
209
|
-
padding: 0 8px;
|
|
210
|
-
min-width: 48px;
|
|
211
|
-
display: flex;
|
|
212
|
-
justify-content: center;
|
|
213
|
-
align-items: center;
|
|
214
|
-
}
|
|
215
|
-
.wp-block-image__crop-icon svg {
|
|
216
|
-
fill: currentColor;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.wp-block-image__zoom .components-popover__content {
|
|
220
|
-
min-width: 260px;
|
|
221
|
-
overflow: visible !important;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
195
|
.wp-block-image__toolbar_content_textarea__container {
|
|
225
196
|
padding: 8px;
|
|
226
197
|
}
|