@wordpress/block-library 7.15.1-next.4d3b314fd5.0 → 7.16.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.
Files changed (146) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/code/utils.js +3 -3
  3. package/build/code/utils.js.map +1 -1
  4. package/build/group/edit.js +1 -1
  5. package/build/group/edit.js.map +1 -1
  6. package/build/navigation/edit/index.js +12 -12
  7. package/build/navigation/edit/index.js.map +1 -1
  8. package/build/paragraph/deprecated.js +49 -10
  9. package/build/paragraph/deprecated.js.map +1 -1
  10. package/build/paragraph/edit.js +19 -3
  11. package/build/paragraph/edit.js.map +1 -1
  12. package/build/paragraph/save.js +3 -1
  13. package/build/paragraph/save.js.map +1 -1
  14. package/build/post-author/edit.js +20 -2
  15. package/build/post-author/edit.js.map +1 -1
  16. package/build/post-author/index.js +8 -0
  17. package/build/post-author/index.js.map +1 -1
  18. package/build/post-featured-image/index.js +1 -1
  19. package/build/post-featured-image/overlay.js +2 -2
  20. package/build/post-featured-image/overlay.js.map +1 -1
  21. package/build/post-terms/index.js +4 -0
  22. package/build/post-terms/index.js.map +1 -1
  23. package/build/query/edit/inspector-controls/author-control.js +2 -1
  24. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  25. package/build/query/edit/inspector-controls/index.js +1 -1
  26. package/build/query/edit/inspector-controls/index.js.map +1 -1
  27. package/build/query/edit/inspector-controls/parent-control.js +2 -1
  28. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  29. package/build/query/edit/inspector-controls/taxonomy-controls.js +2 -1
  30. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  31. package/build/query/utils.js +1 -1
  32. package/build/query/utils.js.map +1 -1
  33. package/build/quote/index.js +0 -1
  34. package/build/quote/index.js.map +1 -1
  35. package/build/site-title/index.js +2 -1
  36. package/build/site-title/index.js.map +1 -1
  37. package/build/template-part/index.js +2 -2
  38. package/build/template-part/index.js.map +1 -1
  39. package/build/video/edit.js +13 -1
  40. package/build/video/edit.js.map +1 -1
  41. package/build-module/code/utils.js +3 -3
  42. package/build-module/code/utils.js.map +1 -1
  43. package/build-module/group/edit.js +1 -1
  44. package/build-module/group/edit.js.map +1 -1
  45. package/build-module/navigation/edit/index.js +12 -12
  46. package/build-module/navigation/edit/index.js.map +1 -1
  47. package/build-module/paragraph/deprecated.js +49 -11
  48. package/build-module/paragraph/deprecated.js.map +1 -1
  49. package/build-module/paragraph/edit.js +19 -3
  50. package/build-module/paragraph/edit.js.map +1 -1
  51. package/build-module/paragraph/save.js +2 -1
  52. package/build-module/paragraph/save.js.map +1 -1
  53. package/build-module/post-author/edit.js +21 -2
  54. package/build-module/post-author/edit.js.map +1 -1
  55. package/build-module/post-author/index.js +8 -0
  56. package/build-module/post-author/index.js.map +1 -1
  57. package/build-module/post-featured-image/index.js +1 -1
  58. package/build-module/post-featured-image/overlay.js +2 -2
  59. package/build-module/post-featured-image/overlay.js.map +1 -1
  60. package/build-module/post-terms/index.js +4 -0
  61. package/build-module/post-terms/index.js.map +1 -1
  62. package/build-module/query/edit/inspector-controls/author-control.js +2 -1
  63. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  64. package/build-module/query/edit/inspector-controls/index.js +1 -1
  65. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  66. package/build-module/query/edit/inspector-controls/parent-control.js +2 -1
  67. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  68. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +2 -1
  69. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  70. package/build-module/query/utils.js +1 -1
  71. package/build-module/query/utils.js.map +1 -1
  72. package/build-module/quote/index.js +0 -1
  73. package/build-module/quote/index.js.map +1 -1
  74. package/build-module/site-title/index.js +2 -1
  75. package/build-module/site-title/index.js.map +1 -1
  76. package/build-module/template-part/index.js +2 -2
  77. package/build-module/template-part/index.js.map +1 -1
  78. package/build-module/video/edit.js +15 -3
  79. package/build-module/video/edit.js.map +1 -1
  80. package/build-style/code/style-rtl.css +3 -0
  81. package/build-style/code/style.css +3 -0
  82. package/build-style/editor-rtl.css +69 -29
  83. package/build-style/editor.css +69 -29
  84. package/build-style/navigation/editor-rtl.css +4 -0
  85. package/build-style/navigation/editor.css +4 -0
  86. package/build-style/navigation/style-rtl.css +3 -0
  87. package/build-style/navigation/style.css +3 -0
  88. package/build-style/paragraph/style-rtl.css +5 -0
  89. package/build-style/paragraph/style.css +5 -0
  90. package/build-style/post-featured-image/editor-rtl.css +39 -29
  91. package/build-style/post-featured-image/editor.css +39 -29
  92. package/build-style/post-terms/style-rtl.css +4 -1
  93. package/build-style/post-terms/style.css +4 -1
  94. package/build-style/site-title/editor-rtl.css +4 -0
  95. package/build-style/site-title/editor.css +4 -0
  96. package/build-style/site-title/style-rtl.css +79 -0
  97. package/build-style/site-title/style.css +79 -0
  98. package/build-style/style-rtl.css +19 -1
  99. package/build-style/style.css +19 -1
  100. package/build-style/video/editor-rtl.css +22 -0
  101. package/build-style/video/editor.css +22 -0
  102. package/package.json +28 -28
  103. package/src/categories/index.php +1 -1
  104. package/src/code/style.scss +12 -7
  105. package/src/code/utils.js +3 -3
  106. package/src/comment-author-name/index.php +1 -1
  107. package/src/comment-reply-link/index.php +1 -1
  108. package/src/comment-template/index.php +2 -3
  109. package/src/cover/index.php +1 -1
  110. package/src/group/edit.js +1 -1
  111. package/src/latest-posts/index.php +1 -1
  112. package/src/navigation/edit/index.js +12 -10
  113. package/src/navigation/editor.scss +6 -0
  114. package/src/navigation/style.scss +8 -0
  115. package/src/page-list/index.php +2 -2
  116. package/src/paragraph/deprecated.js +36 -0
  117. package/src/paragraph/edit.js +23 -8
  118. package/src/paragraph/save.js +5 -1
  119. package/src/paragraph/style.scss +5 -0
  120. package/src/post-author/block.json +8 -0
  121. package/src/post-author/edit.js +29 -3
  122. package/src/post-author/index.php +7 -1
  123. package/src/post-featured-image/block.json +1 -1
  124. package/src/post-featured-image/editor.scss +79 -72
  125. package/src/post-featured-image/index.php +18 -24
  126. package/src/post-featured-image/overlay.js +17 -14
  127. package/src/post-terms/block.json +4 -0
  128. package/src/post-terms/style.scss +7 -2
  129. package/src/query/edit/inspector-controls/author-control.js +1 -0
  130. package/src/query/edit/inspector-controls/index.js +1 -4
  131. package/src/query/edit/inspector-controls/parent-control.js +1 -0
  132. package/src/query/edit/inspector-controls/taxonomy-controls.js +1 -0
  133. package/src/query/utils.js +1 -1
  134. package/src/quote/block.json +0 -1
  135. package/src/site-title/block.json +2 -1
  136. package/src/site-title/editor.scss +6 -0
  137. package/src/site-title/style.scss +5 -0
  138. package/src/style.scss +1 -0
  139. package/src/template-part/index.js +2 -2
  140. package/src/video/edit.js +19 -0
  141. package/src/video/editor.scss +37 -0
  142. package/build/navigation-submenu/view.js +0 -56
  143. package/build/navigation-submenu/view.js.map +0 -1
  144. package/build-module/navigation-submenu/view.js +0 -54
  145. package/build-module/navigation-submenu/view.js.map +0 -1
  146. package/src/navigation-submenu/view.js +0 -67
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/site-title/index.js"],"names":["mapMarker","icon","initBlock","edit","deprecated","transforms","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,IAAIC,IAAtB,QAAkC,kBAAlC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBP,EAAAA,IADuB;AAEvBE,EAAAA,IAFuB;AAGvBE,EAAAA,UAHuB;AAIvBD,EAAAA;AAJuB,CAAjB;AAOP,OAAO,MAAMK,IAAI,GAAG,MAAMP,SAAS,CAAE;AAAEI,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { mapMarker 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';\nimport transforms from './transforms';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\ttransforms,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/site-title/index.js"],"names":["mapMarker","icon","initBlock","edit","deprecated","transforms","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,IAAIC,IAAtB,QAAkC,kBAAlC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBP,EAAAA,IADuB;AAEvBE,EAAAA,IAFuB;AAGvBE,EAAAA,UAHuB;AAIvBD,EAAAA;AAJuB,CAAjB;AAOP,OAAO,MAAMK,IAAI,GAAG,MAAMP,SAAS,CAAE;AAAEI,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { mapMarker 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';\nimport transforms from './transforms';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\ttransforms,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
@@ -81,14 +81,14 @@ export const init = () => {
81
81
  addFilter('blocks.registerBlockType', 'core/template-part', enhanceTemplatePartVariations); // Prevent adding template parts inside post templates.
82
82
 
83
83
  const DISALLOWED_PARENTS = ['core/post-template', 'core/post-content'];
84
- addFilter('blockEditor.__unstableCanInsertBlockType', 'removeTemplatePartsFromPostTemplates', (can, blockType, rootClientId, _ref2) => {
84
+ addFilter('blockEditor.__unstableCanInsertBlockType', 'removeTemplatePartsFromPostTemplates', (canInsert, blockType, rootClientId, _ref2) => {
85
85
  let {
86
86
  getBlock,
87
87
  getBlockParentsByBlockName
88
88
  } = _ref2;
89
89
 
90
90
  if (blockType.name !== 'core/template-part') {
91
- return can;
91
+ return canInsert;
92
92
  }
93
93
 
94
94
  for (const disallowedParentType of DISALLOWED_PARENTS) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/template-part/index.js"],"names":["capitalCase","store","coreDataStore","select","symbolFilled","addFilter","decodeEntities","initBlock","edit","enhanceTemplatePartVariations","name","metadata","settings","icon","__experimentalLabel","slug","theme","entity","getEntityRecord","title","rendered","init","DISALLOWED_PARENTS","can","blockType","rootClientId","getBlock","getBlockParentsByBlockName","disallowedParentType","hasDisallowedParent","length"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAT,QAA4B,aAA5B;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,sBAAvC;AACA,SAASC,MAAT,QAAuB,iBAAvB;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,SAAT,QAA0B,kBAA1B;AACA,SAASC,cAAT,QAA+B,0B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AMK,oBAAZ,IAAoCN,kBAApC,EAAyD;AAAA;;AACxD,YAAMO,mBAAmB,GACxB,cAAAH,QAAQ,CAAED,YAAF,CAAR,wDAA0Bf,IAA1B,MAAmCkB,oBAAnC,IACAD,0BAA0B,CACzBF,YADyB,EAEzBG,oBAFyB,CAA1B,CAGEE,MALH;;AAMA,UAAKD,mBAAL,EAA2B;AAC1B,eAAO,KAAP;AACA;AACD;;AACD,WAAO,IAAP;AACA,GAzBO,CAAT;AA4BA,SAAOtB,SAAS,CAAE;AAAEG,IAAAA,IAAF;AAAQC,IAAAA,QAAR;AAAkBC,IAAAA;AAAlB,GAAF,CAAhB;AACA,CAtCM","sourcesContent":["/**\n * External dependencies\n */\nimport { capitalCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { select } from '@wordpress/data';\nimport { symbolFilled } from '@wordpress/icons';\nimport { addFilter } from '@wordpress/hooks';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport { enhanceTemplatePartVariations } from './variations';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon: symbolFilled,\n\t__experimentalLabel: ( { slug, theme } ) => {\n\t\t// Attempt to find entity title if block is a template part.\n\t\t// Require slug to request, otherwise entity is uncreated and will throw 404.\n\t\tif ( ! slug ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst entity = select( coreDataStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template_part',\n\t\t\ttheme + '//' + slug\n\t\t);\n\t\tif ( ! entity ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn (\n\t\t\tdecodeEntities( entity.title?.rendered ) ||\n\t\t\tcapitalCase( entity.slug )\n\t\t);\n\t},\n\tedit,\n};\n\nexport const init = () => {\n\taddFilter(\n\t\t'blocks.registerBlockType',\n\t\t'core/template-part',\n\t\tenhanceTemplatePartVariations\n\t);\n\n\t// Prevent adding template parts inside post templates.\n\tconst DISALLOWED_PARENTS = [ 'core/post-template', 'core/post-content' ];\n\taddFilter(\n\t\t'blockEditor.__unstableCanInsertBlockType',\n\t\t'removeTemplatePartsFromPostTemplates',\n\t\t(\n\t\t\tcan,\n\t\t\tblockType,\n\t\t\trootClientId,\n\t\t\t{ getBlock, getBlockParentsByBlockName }\n\t\t) => {\n\t\t\tif ( blockType.name !== 'core/template-part' ) {\n\t\t\t\treturn can;\n\t\t\t}\n\n\t\t\tfor ( const disallowedParentType of DISALLOWED_PARENTS ) {\n\t\t\t\tconst hasDisallowedParent =\n\t\t\t\t\tgetBlock( rootClientId )?.name === disallowedParentType ||\n\t\t\t\t\tgetBlockParentsByBlockName(\n\t\t\t\t\t\trootClientId,\n\t\t\t\t\t\tdisallowedParentType\n\t\t\t\t\t).length;\n\t\t\t\tif ( hasDisallowedParent ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t);\n\n\treturn initBlock( { name, metadata, settings } );\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/template-part/index.js"],"names":["capitalCase","store","coreDataStore","select","symbolFilled","addFilter","decodeEntities","initBlock","edit","enhanceTemplatePartVariations","name","metadata","settings","icon","__experimentalLabel","slug","theme","entity","getEntityRecord","title","rendered","init","DISALLOWED_PARENTS","canInsert","blockType","rootClientId","getBlock","getBlockParentsByBlockName","disallowedParentType","hasDisallowedParent","length"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAT,QAA4B,aAA5B;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,sBAAvC;AACA,SAASC,MAAT,QAAuB,iBAAvB;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,SAAT,QAA0B,kBAA1B;AACA,SAASC,cAAT,QAA+B,0BAA/B;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB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D,YAAMO,mBAAmB,GACxB,cAAAH,QAAQ,CAAED,YAAF,CAAR,wDAA0Bf,IAA1B,MAAmCkB,oBAAnC,IACAD,0BAA0B,CACzBF,YADyB,EAEzBG,oBAFyB,CAA1B,CAGEE,MALH;;AAMA,UAAKD,mBAAL,EAA2B;AAC1B,eAAO,KAAP;AACA;AACD;;AACD,WAAO,IAAP;AACA,GAzBO,CAAT;AA4BA,SAAOtB,SAAS,CAAE;AAAEG,IAAAA,IAAF;AAAQC,IAAAA,QAAR;AAAkBC,IAAAA;AAAlB,GAAF,CAAhB;AACA,CAtCM","sourcesContent":["/**\n * External dependencies\n */\nimport { capitalCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { select } from '@wordpress/data';\nimport { symbolFilled } from '@wordpress/icons';\nimport { addFilter } from '@wordpress/hooks';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport { enhanceTemplatePartVariations } from './variations';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon: symbolFilled,\n\t__experimentalLabel: ( { slug, theme } ) => {\n\t\t// Attempt to find entity title if block is a template part.\n\t\t// Require slug to request, otherwise entity is uncreated and will throw 404.\n\t\tif ( ! slug ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst entity = select( coreDataStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template_part',\n\t\t\ttheme + '//' + slug\n\t\t);\n\t\tif ( ! entity ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn (\n\t\t\tdecodeEntities( entity.title?.rendered ) ||\n\t\t\tcapitalCase( entity.slug )\n\t\t);\n\t},\n\tedit,\n};\n\nexport const init = () => {\n\taddFilter(\n\t\t'blocks.registerBlockType',\n\t\t'core/template-part',\n\t\tenhanceTemplatePartVariations\n\t);\n\n\t// Prevent adding template parts inside post templates.\n\tconst DISALLOWED_PARENTS = [ 'core/post-template', 'core/post-content' ];\n\taddFilter(\n\t\t'blockEditor.__unstableCanInsertBlockType',\n\t\t'removeTemplatePartsFromPostTemplates',\n\t\t(\n\t\t\tcanInsert,\n\t\t\tblockType,\n\t\t\trootClientId,\n\t\t\t{ getBlock, getBlockParentsByBlockName }\n\t\t) => {\n\t\t\tif ( blockType.name !== 'core/template-part' ) {\n\t\t\t\treturn canInsert;\n\t\t\t}\n\n\t\t\tfor ( const disallowedParentType of DISALLOWED_PARENTS ) {\n\t\t\t\tconst hasDisallowedParent =\n\t\t\t\t\tgetBlock( rootClientId )?.name === disallowedParentType ||\n\t\t\t\t\tgetBlockParentsByBlockName(\n\t\t\t\t\t\trootClientId,\n\t\t\t\t\t\tdisallowedParentType\n\t\t\t\t\t).length;\n\t\t\t\tif ( hasDisallowedParent ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t);\n\n\treturn initBlock( { name, metadata, settings } );\n};\n"]}
@@ -9,7 +9,7 @@ import classnames from 'classnames';
9
9
  */
10
10
 
11
11
  import { getBlobByURL, isBlobURL } from '@wordpress/blob';
12
- import { BaseControl, Button, Disabled, PanelBody, Spinner } from '@wordpress/components';
12
+ import { BaseControl, Button, Disabled, PanelBody, Spinner, Placeholder } from '@wordpress/components';
13
13
  import { BlockControls, BlockIcon, InspectorControls, MediaPlaceholder, MediaUpload, MediaUploadCheck, MediaReplaceFlow, RichText, useBlockProps, store as blockEditorStore, __experimentalGetElementClassName } from '@wordpress/block-editor';
14
14
  import { useRef, useEffect } from '@wordpress/element';
15
15
  import { __, sprintf } from '@wordpress/i18n';
@@ -25,7 +25,18 @@ import { store as noticesStore } from '@wordpress/notices';
25
25
  import { createUpgradedEmbedBlock } from '../embed/util';
26
26
  import VideoCommonSettings from './edit-common-settings';
27
27
  import TracksEditor from './tracks-editor';
28
- import Tracks from './tracks';
28
+ import Tracks from './tracks'; // Much of this description is duplicated from MediaPlaceholder.
29
+
30
+ const placeholder = content => {
31
+ return createElement(Placeholder, {
32
+ className: "block-editor-media-placeholder",
33
+ withIllustration: true,
34
+ icon: icon,
35
+ label: __('Video'),
36
+ instructions: __('Upload a video file, pick one from your media library, or add one with a URL.')
37
+ }, content);
38
+ };
39
+
29
40
  const ALLOWED_MEDIA_TYPES = ['video'];
30
41
  const VIDEO_POSTER_ALLOWED_MEDIA_TYPES = ['image'];
31
42
 
@@ -148,7 +159,8 @@ function VideoEdit(_ref) {
148
159
  accept: "video/*",
149
160
  allowedTypes: ALLOWED_MEDIA_TYPES,
150
161
  value: attributes,
151
- onError: onUploadError
162
+ onError: onUploadError,
163
+ placeholder: placeholder
152
164
  }));
153
165
  }
154
166
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/video/edit.js"],"names":["classnames","getBlobByURL","isBlobURL","BaseControl","Button","Disabled","PanelBody","Spinner","BlockControls","BlockIcon","InspectorControls","MediaPlaceholder","MediaUpload","MediaUploadCheck","MediaReplaceFlow","RichText","useBlockProps","store","blockEditorStore","__experimentalGetElementClassName","useRef","useEffect","__","sprintf","useInstanceId","useDispatch","useSelect","video","icon","createBlock","getDefaultBlockName","noticesStore","createUpgradedEmbedBlock","VideoCommonSettings","TracksEditor","Tracks","ALLOWED_MEDIA_TYPES","VIDEO_POSTER_ALLOWED_MEDIA_TYPES","VideoEdit","isSelected","attributes","className","setAttributes","insertBlocksAfter","onReplace","instanceId","videoPlayer","posterImageButton","id","caption","controls","poster","src","tracks","isTemporaryVideo","mediaUpload","select","getSettings","file","filesList","onFileChange","media","onSelectVideo","onError","onUploadError","allowedTypes","current","load","url","undefined","image","onSelectURL","newSrc","embedBlock","createErrorNotice","message","type","classes","blockProps","onSelectPoster","onRemovePoster","focus","videoPosterDescription","newTracks","open","isEmpty","value"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,YAAT,EA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,GAAG,EAAGC,GAHP;AAIC,IAAA,GAAG,EAAGN;AAJP,KAMC,cAAC,MAAD;AAAQ,IAAA,MAAM,EAAGO;AAAjB,IAND,CADD,CAND,EAgBGC,gBAAgB,IAAI,cAAC,OAAD,OAhBvB,EAiBG,CAAE,CAAEvC,QAAQ,CAACsE,OAAT,CAAkBpC,OAAlB,CAAF,IAAiCV,UAAnC,KACD,cAAC,QAAD;AACC,IAAA,OAAO,EAAC,YADT;AAEC,IAAA,SAAS,EAAGpB,iCAAiC,CAC5C,SAD4C,CAF9C;AAKC,kBAAaG,EAAE,CAAE,oBAAF,CALhB;AAMC,IAAA,WAAW,EAAGA,EAAE,CAAE,aAAF,CANjB;AAOC,IAAA,KAAK,EAAG2B,OAPT;AAQC,IAAA,QAAQ,EAAKqC,KAAF,IACV5C,aAAa,CAAE;AAAEO,MAAAA,OAAO,EAAEqC;AAAX,KAAF,CATf;AAWC,IAAA,aAAa,MAXd;AAYC,IAAA,sBAAsB,EAAG,MACxB3C,iBAAiB,CAChBd,WAAW,CAAEC,mBAAmB,EAArB,CADK;AAbnB,IAlBF,CA7ED,CADD;AAsHA;;AAED,eAAeQ,SAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { getBlobByURL, isBlobURL } from '@wordpress/blob';\nimport {\n\tBaseControl,\n\tButton,\n\tDisabled,\n\tPanelBody,\n\tSpinner,\n} from '@wordpress/components';\nimport {\n\tBlockControls,\n\tBlockIcon,\n\tInspectorControls,\n\tMediaPlaceholder,\n\tMediaUpload,\n\tMediaUploadCheck,\n\tMediaReplaceFlow,\n\tRichText,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\nimport { useRef, useEffect } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { video as icon } from '@wordpress/icons';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { createUpgradedEmbedBlock } from '../embed/util';\nimport VideoCommonSettings from './edit-common-settings';\nimport TracksEditor from './tracks-editor';\nimport Tracks from './tracks';\n\nconst ALLOWED_MEDIA_TYPES = [ 'video' ];\nconst VIDEO_POSTER_ALLOWED_MEDIA_TYPES = [ 'image' ];\n\nfunction VideoEdit( {\n\tisSelected,\n\tattributes,\n\tclassName,\n\tsetAttributes,\n\tinsertBlocksAfter,\n\tonReplace,\n} ) {\n\tconst instanceId = useInstanceId( VideoEdit );\n\tconst videoPlayer = useRef();\n\tconst posterImageButton = useRef();\n\tconst { id, caption, controls, poster, src, tracks } = attributes;\n\tconst isTemporaryVideo = ! id && isBlobURL( src );\n\tconst mediaUpload = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings().mediaUpload,\n\t\t[]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( ! id && isBlobURL( src ) ) {\n\t\t\tconst file = getBlobByURL( src );\n\t\t\tif ( file ) {\n\t\t\t\tmediaUpload( {\n\t\t\t\t\tfilesList: [ file ],\n\t\t\t\t\tonFileChange: ( [ media ] ) => onSelectVideo( media ),\n\t\t\t\t\tonError: onUploadError,\n\t\t\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t// Placeholder may be rendered.\n\t\tif ( videoPlayer.current ) {\n\t\t\tvideoPlayer.current.load();\n\t\t}\n\t}, [ poster ] );\n\n\tfunction onSelectVideo( media ) {\n\t\tif ( ! media || ! media.url ) {\n\t\t\t// In this case there was an error\n\t\t\t// previous attributes should be removed\n\t\t\t// because they may be temporary blob urls.\n\t\t\tsetAttributes( {\n\t\t\t\tsrc: undefined,\n\t\t\t\tid: undefined,\n\t\t\t\tposter: undefined,\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\t// Sets the block's attribute and updates the edit component from the\n\t\t// selected media.\n\t\tsetAttributes( {\n\t\t\tsrc: media.url,\n\t\t\tid: media.id,\n\t\t\tposter:\n\t\t\t\tmedia.image?.src !== media.icon ? media.image?.src : undefined,\n\t\t} );\n\t}\n\n\tfunction onSelectURL( newSrc ) {\n\t\tif ( newSrc !== src ) {\n\t\t\t// Check if there's an embed block that handles this URL.\n\t\t\tconst embedBlock = createUpgradedEmbedBlock( {\n\t\t\t\tattributes: { url: newSrc },\n\t\t\t} );\n\t\t\tif ( undefined !== embedBlock ) {\n\t\t\t\tonReplace( embedBlock );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetAttributes( { src: newSrc, id: undefined, poster: undefined } );\n\t\t}\n\t}\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tfunction onUploadError( message ) {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t}\n\n\tconst classes = classnames( className, {\n\t\t'is-transient': isTemporaryVideo,\n\t} );\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t} );\n\n\tif ( ! src ) {\n\t\treturn (\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<MediaPlaceholder\n\t\t\t\t\ticon={ <BlockIcon icon={ icon } /> }\n\t\t\t\t\tonSelect={ onSelectVideo }\n\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\taccept=\"video/*\"\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\tvalue={ attributes }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tfunction onSelectPoster( image ) {\n\t\tsetAttributes( { poster: image.url } );\n\t}\n\n\tfunction onRemovePoster() {\n\t\tsetAttributes( { poster: undefined } );\n\n\t\t// Move focus back to the Media Upload button.\n\t\tposterImageButton.current.focus();\n\t}\n\n\tconst videoPosterDescription = `video-block__poster-image-description-${ instanceId }`;\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<TracksEditor\n\t\t\t\t\ttracks={ tracks }\n\t\t\t\t\tonChange={ ( newTracks ) => {\n\t\t\t\t\t\tsetAttributes( { tracks: newTracks } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<BlockControls group=\"other\">\n\t\t\t\t<MediaReplaceFlow\n\t\t\t\t\tmediaId={ id }\n\t\t\t\t\tmediaURL={ src }\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\taccept=\"video/*\"\n\t\t\t\t\tonSelect={ onSelectVideo }\n\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<VideoCommonSettings\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\t/>\n\t\t\t\t\t<MediaUploadCheck>\n\t\t\t\t\t\t<BaseControl className=\"editor-video-poster-control\">\n\t\t\t\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t\t\t\t{ __( 'Poster image' ) }\n\t\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\t\t\ttitle={ __( 'Select poster image' ) }\n\t\t\t\t\t\t\t\tonSelect={ onSelectPoster }\n\t\t\t\t\t\t\t\tallowedTypes={\n\t\t\t\t\t\t\t\t\tVIDEO_POSTER_ALLOWED_MEDIA_TYPES\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\tref={ posterImageButton }\n\t\t\t\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t\t\t\tvideoPosterDescription\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\t{ ! poster\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Select' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Replace' ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<p id={ videoPosterDescription } hidden>\n\t\t\t\t\t\t\t\t{ poster\n\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: poster image URL. */\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'The current poster image url is %s'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tposter\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t'There is no poster image currently selected'\n\t\t\t\t\t\t\t\t\t ) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t{ !! poster && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={ onRemovePoster }\n\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BaseControl>\n\t\t\t\t\t</MediaUploadCheck>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<figure { ...blockProps }>\n\t\t\t\t{ /*\n\t\t\t\t\tDisable the video tag if the block is not selected\n\t\t\t\t\tso the user clicking on it won't play the\n\t\t\t\t\tvideo when the controls are enabled.\n\t\t\t\t*/ }\n\t\t\t\t<Disabled isDisabled={ ! isSelected }>\n\t\t\t\t\t<video\n\t\t\t\t\t\tcontrols={ controls }\n\t\t\t\t\t\tposter={ poster }\n\t\t\t\t\t\tsrc={ src }\n\t\t\t\t\t\tref={ videoPlayer }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Tracks tracks={ tracks } />\n\t\t\t\t\t</video>\n\t\t\t\t</Disabled>\n\t\t\t\t{ isTemporaryVideo && <Spinner /> }\n\t\t\t\t{ ( ! RichText.isEmpty( caption ) || isSelected ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\tclassName={ __experimentalGetElementClassName(\n\t\t\t\t\t\t\t'caption'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\taria-label={ __( 'Video caption text' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Add caption' ) }\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { caption: 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/>\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t</>\n\t);\n}\n\nexport default VideoEdit;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/video/edit.js"],"names":["classnames","getBlobByURL","isBlobURL","BaseControl","Button","Disabled","PanelBody","Spinner","Placeholder","BlockControls","BlockIcon","InspectorControls","MediaPlaceholder","MediaUpload","MediaUploadCheck","MediaReplaceFlow","RichText","useBlockProps","store","blockEditorStore","__experimentalGetElementClassName","useRef","useEffect","__","sprintf","useInstanceId","useDispatch","useSelect","video","icon","createBlock","getDefaultBlockName","noticesStore","createUpgradedEmbedBlock","VideoCommonSettings","TracksEditor","Tracks","placeholder","content","ALLOWED_MEDIA_TYPES","VIDEO_POSTER_ALLOWED_MEDIA_TYPES","VideoEdit","isSelected","attributes","className","setAttributes","insertBlocksAfter","onReplace","instanceId","videoPlayer","posterImageButton","id","caption","controls","poster","src","tracks","isTemporaryVideo","mediaUpload","select","getSettings","file","filesList","onFileChange","media","onSelectVideo","onError","onUploadError","allowedTypes","current","load","url","undefined","image","onSelectURL","newSrc","embedBlock","createErrorNotice","message","type","classes","blockProps","onSelectPoster","onRemovePoster","focus","videoPosterDescription","newTracks","open","isEmpty","value"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,YAAT,EAAuBC,SAAvB,QAAwC,iBAAxC;AACA,SACCC,WADD,EAECC,MAFD,EAGCC,QAHD,EAICC,SAJD,EAKCC,OALD,EAMCC,WAND,QAOO,uBAPP;AAQA,SACCC,aADD,EAECC,SAFD,EAGCC,iBAHD,EAICC,gBAJD,EAKCC,WALD,EAMCC,gBAND,EAOCC,gBAPD,EAQCC,QARD,EASCC,aATD,EAUCC,KAAK,IAAIC,gBAVV,EAWCC,iCAXD,QAYO,yBAZP;AAaA,SAASC,MAAT,EAAiBC,SAAjB,QAAkC,oBAAlC;AACA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SAASC,aAAT,QAA8B,oBAA9B;AACA,SAASC,WAAT,EAAsBC,SAAtB,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,IAAlB,QAA8B,kBAA9B;AACA,SAASC,WAAT,EAAsBC,mBAAtB,QAAiD,mBAAjD;AACA,SAASb,KAAK,IAAIc,YAAlB,QAAsC,oBAAtC;AAEA;AACA;AACA;;AACA,SAASC,wBAAT,QAAyC,eAAzC;AACA,OAAOC,mBAAP,MAAgC,wBAAhC;AACA,OAAOC,YAAP,MAAyB,iBAAzB;AACA,OAAOC,MAAP,MAAmB,UAAn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AF,CANjB;AAOC,IAAA,KAAK,EAAG6B,OAPT;AAQC,IAAA,QAAQ,EAAKqC,KAAF,IACV5C,aAAa,CAAE;AAAEO,MAAAA,OAAO,EAAEqC;AAAX,KAAF,CATf;AAWC,IAAA,aAAa,MAXd;AAYC,IAAA,sBAAsB,EAAG,MACxB3C,iBAAiB,CAChBhB,WAAW,CAAEC,mBAAmB,EAArB,CADK;AAbnB,IAlBF,CA7ED,CADD;AAsHA;;AAED,eAAeU,SAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { getBlobByURL, isBlobURL } from '@wordpress/blob';\nimport {\n\tBaseControl,\n\tButton,\n\tDisabled,\n\tPanelBody,\n\tSpinner,\n\tPlaceholder,\n} from '@wordpress/components';\nimport {\n\tBlockControls,\n\tBlockIcon,\n\tInspectorControls,\n\tMediaPlaceholder,\n\tMediaUpload,\n\tMediaUploadCheck,\n\tMediaReplaceFlow,\n\tRichText,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\nimport { useRef, useEffect } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { video as icon } from '@wordpress/icons';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { createUpgradedEmbedBlock } from '../embed/util';\nimport VideoCommonSettings from './edit-common-settings';\nimport TracksEditor from './tracks-editor';\nimport Tracks from './tracks';\n\n// Much of this description is duplicated from MediaPlaceholder.\nconst placeholder = ( content ) => {\n\treturn (\n\t\t<Placeholder\n\t\t\tclassName=\"block-editor-media-placeholder\"\n\t\t\twithIllustration={ true }\n\t\t\ticon={ icon }\n\t\t\tlabel={ __( 'Video' ) }\n\t\t\tinstructions={ __(\n\t\t\t\t'Upload a video file, pick one from your media library, or add one with a URL.'\n\t\t\t) }\n\t\t>\n\t\t\t{ content }\n\t\t</Placeholder>\n\t);\n};\n\nconst ALLOWED_MEDIA_TYPES = [ 'video' ];\nconst VIDEO_POSTER_ALLOWED_MEDIA_TYPES = [ 'image' ];\n\nfunction VideoEdit( {\n\tisSelected,\n\tattributes,\n\tclassName,\n\tsetAttributes,\n\tinsertBlocksAfter,\n\tonReplace,\n} ) {\n\tconst instanceId = useInstanceId( VideoEdit );\n\tconst videoPlayer = useRef();\n\tconst posterImageButton = useRef();\n\tconst { id, caption, controls, poster, src, tracks } = attributes;\n\tconst isTemporaryVideo = ! id && isBlobURL( src );\n\tconst mediaUpload = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings().mediaUpload,\n\t\t[]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( ! id && isBlobURL( src ) ) {\n\t\t\tconst file = getBlobByURL( src );\n\t\t\tif ( file ) {\n\t\t\t\tmediaUpload( {\n\t\t\t\t\tfilesList: [ file ],\n\t\t\t\t\tonFileChange: ( [ media ] ) => onSelectVideo( media ),\n\t\t\t\t\tonError: onUploadError,\n\t\t\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t// Placeholder may be rendered.\n\t\tif ( videoPlayer.current ) {\n\t\t\tvideoPlayer.current.load();\n\t\t}\n\t}, [ poster ] );\n\n\tfunction onSelectVideo( media ) {\n\t\tif ( ! media || ! media.url ) {\n\t\t\t// In this case there was an error\n\t\t\t// previous attributes should be removed\n\t\t\t// because they may be temporary blob urls.\n\t\t\tsetAttributes( {\n\t\t\t\tsrc: undefined,\n\t\t\t\tid: undefined,\n\t\t\t\tposter: undefined,\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\t// Sets the block's attribute and updates the edit component from the\n\t\t// selected media.\n\t\tsetAttributes( {\n\t\t\tsrc: media.url,\n\t\t\tid: media.id,\n\t\t\tposter:\n\t\t\t\tmedia.image?.src !== media.icon ? media.image?.src : undefined,\n\t\t} );\n\t}\n\n\tfunction onSelectURL( newSrc ) {\n\t\tif ( newSrc !== src ) {\n\t\t\t// Check if there's an embed block that handles this URL.\n\t\t\tconst embedBlock = createUpgradedEmbedBlock( {\n\t\t\t\tattributes: { url: newSrc },\n\t\t\t} );\n\t\t\tif ( undefined !== embedBlock ) {\n\t\t\t\tonReplace( embedBlock );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetAttributes( { src: newSrc, id: undefined, poster: undefined } );\n\t\t}\n\t}\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tfunction onUploadError( message ) {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t}\n\n\tconst classes = classnames( className, {\n\t\t'is-transient': isTemporaryVideo,\n\t} );\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t} );\n\n\tif ( ! src ) {\n\t\treturn (\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<MediaPlaceholder\n\t\t\t\t\ticon={ <BlockIcon icon={ icon } /> }\n\t\t\t\t\tonSelect={ onSelectVideo }\n\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\taccept=\"video/*\"\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\tvalue={ attributes }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tfunction onSelectPoster( image ) {\n\t\tsetAttributes( { poster: image.url } );\n\t}\n\n\tfunction onRemovePoster() {\n\t\tsetAttributes( { poster: undefined } );\n\n\t\t// Move focus back to the Media Upload button.\n\t\tposterImageButton.current.focus();\n\t}\n\n\tconst videoPosterDescription = `video-block__poster-image-description-${ instanceId }`;\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<TracksEditor\n\t\t\t\t\ttracks={ tracks }\n\t\t\t\t\tonChange={ ( newTracks ) => {\n\t\t\t\t\t\tsetAttributes( { tracks: newTracks } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<BlockControls group=\"other\">\n\t\t\t\t<MediaReplaceFlow\n\t\t\t\t\tmediaId={ id }\n\t\t\t\t\tmediaURL={ src }\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\taccept=\"video/*\"\n\t\t\t\t\tonSelect={ onSelectVideo }\n\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<VideoCommonSettings\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\t/>\n\t\t\t\t\t<MediaUploadCheck>\n\t\t\t\t\t\t<BaseControl className=\"editor-video-poster-control\">\n\t\t\t\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t\t\t\t{ __( 'Poster image' ) }\n\t\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\t\t\ttitle={ __( 'Select poster image' ) }\n\t\t\t\t\t\t\t\tonSelect={ onSelectPoster }\n\t\t\t\t\t\t\t\tallowedTypes={\n\t\t\t\t\t\t\t\t\tVIDEO_POSTER_ALLOWED_MEDIA_TYPES\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\tref={ posterImageButton }\n\t\t\t\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t\t\t\tvideoPosterDescription\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\t{ ! poster\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Select' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Replace' ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<p id={ videoPosterDescription } hidden>\n\t\t\t\t\t\t\t\t{ poster\n\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: poster image URL. */\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'The current poster image url is %s'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tposter\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t'There is no poster image currently selected'\n\t\t\t\t\t\t\t\t\t ) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t{ !! poster && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={ onRemovePoster }\n\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BaseControl>\n\t\t\t\t\t</MediaUploadCheck>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<figure { ...blockProps }>\n\t\t\t\t{ /*\n\t\t\t\t\tDisable the video tag if the block is not selected\n\t\t\t\t\tso the user clicking on it won't play the\n\t\t\t\t\tvideo when the controls are enabled.\n\t\t\t\t*/ }\n\t\t\t\t<Disabled isDisabled={ ! isSelected }>\n\t\t\t\t\t<video\n\t\t\t\t\t\tcontrols={ controls }\n\t\t\t\t\t\tposter={ poster }\n\t\t\t\t\t\tsrc={ src }\n\t\t\t\t\t\tref={ videoPlayer }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Tracks tracks={ tracks } />\n\t\t\t\t\t</video>\n\t\t\t\t</Disabled>\n\t\t\t\t{ isTemporaryVideo && <Spinner /> }\n\t\t\t\t{ ( ! RichText.isEmpty( caption ) || isSelected ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\tclassName={ __experimentalGetElementClassName(\n\t\t\t\t\t\t\t'caption'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\taria-label={ __( 'Video caption text' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Add caption' ) }\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { caption: 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/>\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t</>\n\t);\n}\n\nexport default VideoEdit;\n"]}
@@ -74,6 +74,9 @@
74
74
  /**
75
75
  * Reset the WP Admin page styles for Gutenberg-like pages.
76
76
  */
77
+ .wp-block-code {
78
+ box-sizing: border-box;
79
+ }
77
80
  .wp-block-code code {
78
81
  display: block;
79
82
  font-family: inherit;
@@ -74,6 +74,9 @@
74
74
  /**
75
75
  * Reset the WP Admin page styles for Gutenberg-like pages.
76
76
  */
77
+ .wp-block-code {
78
+ box-sizing: border-box;
79
+ }
77
80
  .wp-block-code code {
78
81
  display: block;
79
82
  font-family: inherit;
@@ -1877,6 +1877,10 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
1877
1877
  width: 100%;
1878
1878
  }
1879
1879
 
1880
+ .wp-block-navigation__responsive-container-open.components-button {
1881
+ opacity: 1;
1882
+ }
1883
+
1880
1884
  /**
1881
1885
  * Submenus.
1882
1886
  */
@@ -2307,6 +2311,10 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2307
2311
  border: 1px dashed;
2308
2312
  }
2309
2313
 
2314
+ .editor-styles-wrapper .wp-block-site-title a {
2315
+ color: inherit;
2316
+ }
2317
+
2310
2318
  .wp-block-social-links .wp-social-link {
2311
2319
  line-height: 0;
2312
2320
  }
@@ -2562,6 +2570,28 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2562
2570
  outline: 1px solid #ddd;
2563
2571
  }
2564
2572
 
2573
+ .wp-block-video.wp-block-video.is-selected .components-placeholder {
2574
+ color: #1e1e1e;
2575
+ background-color: #fff;
2576
+ box-shadow: inset 0 0 0 1px #1e1e1e;
2577
+ border: none;
2578
+ border-radius: 2px;
2579
+ }
2580
+ .wp-block-video.wp-block-video.is-selected .components-placeholder > svg {
2581
+ opacity: 0;
2582
+ }
2583
+ .wp-block-video.wp-block-video.is-selected .components-placeholder .components-placeholder__illustration {
2584
+ display: none;
2585
+ }
2586
+ .wp-block-video.wp-block-video.is-selected .components-placeholder::before {
2587
+ opacity: 0;
2588
+ }
2589
+ .wp-block-video.wp-block-video .components-placeholder__label,
2590
+ .wp-block-video.wp-block-video .components-placeholder__instructions,
2591
+ .wp-block-video.wp-block-video .components-button {
2592
+ transition: none;
2593
+ }
2594
+
2565
2595
  .wp-block[data-align=center] > .wp-block-video {
2566
2596
  text-align: center;
2567
2597
  }
@@ -2758,19 +2788,19 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2758
2788
  -webkit-backdrop-filter: none;
2759
2789
  backdrop-filter: none;
2760
2790
  }
2761
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
2762
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder {
2791
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
2792
+ .wp-block-post-featured-image .components-placeholder {
2763
2793
  justify-content: center;
2764
2794
  align-items: center;
2765
2795
  padding: 0;
2766
2796
  min-height: 200px;
2767
2797
  }
2768
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload,
2769
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-form-file-upload {
2798
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload,
2799
+ .wp-block-post-featured-image .components-placeholder .components-form-file-upload {
2770
2800
  display: none;
2771
2801
  }
2772
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button,
2773
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button {
2802
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button,
2803
+ .wp-block-post-featured-image .components-placeholder .components-button {
2774
2804
  padding: 0;
2775
2805
  display: flex;
2776
2806
  justify-content: center;
@@ -2784,51 +2814,61 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2784
2814
  border-style: solid;
2785
2815
  color: #fff;
2786
2816
  }
2787
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button > svg,
2788
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button > svg {
2817
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button > svg,
2818
+ .wp-block-post-featured-image .components-placeholder .components-button > svg {
2789
2819
  color: inherit;
2790
2820
  }
2791
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),
2792
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where(.has-border-color) {
2821
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),
2822
+ .wp-block-post-featured-image .components-placeholder:where(.has-border-color),
2823
+ .wp-block-post-featured-image img:where(.has-border-color) {
2793
2824
  border-style: solid;
2794
2825
  }
2795
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-color"]),
2796
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-top-color"]) {
2826
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-color"]),
2827
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-top-color"]),
2828
+ .wp-block-post-featured-image img:where([style*="border-top-color"]) {
2797
2829
  border-top-style: solid;
2798
2830
  }
2799
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-color"]),
2800
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-right-color"]) {
2831
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-color"]),
2832
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-right-color"]),
2833
+ .wp-block-post-featured-image img:where([style*="border-right-color"]) {
2801
2834
  border-left-style: solid;
2802
2835
  }
2803
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-color"]),
2804
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-color"]) {
2836
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-color"]),
2837
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-color"]),
2838
+ .wp-block-post-featured-image img:where([style*="border-bottom-color"]) {
2805
2839
  border-bottom-style: solid;
2806
2840
  }
2807
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-color"]),
2808
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-left-color"]) {
2841
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-color"]),
2842
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-left-color"]),
2843
+ .wp-block-post-featured-image img:where([style*="border-left-color"]) {
2809
2844
  border-right-style: solid;
2810
2845
  }
2811
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-width"]),
2812
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-width"]) {
2846
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-width"]),
2847
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-width"]),
2848
+ .wp-block-post-featured-image img:where([style*="border-width"]) {
2813
2849
  border-style: solid;
2814
2850
  }
2815
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-width"]),
2816
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-top-width"]) {
2851
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-width"]),
2852
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-top-width"]),
2853
+ .wp-block-post-featured-image img:where([style*="border-top-width"]) {
2817
2854
  border-top-style: solid;
2818
2855
  }
2819
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-width"]),
2820
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-right-width"]) {
2856
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-width"]),
2857
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-right-width"]),
2858
+ .wp-block-post-featured-image img:where([style*="border-right-width"]) {
2821
2859
  border-left-style: solid;
2822
2860
  }
2823
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-width"]),
2824
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-width"]) {
2861
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-width"]),
2862
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-width"]),
2863
+ .wp-block-post-featured-image img:where([style*="border-bottom-width"]) {
2825
2864
  border-bottom-style: solid;
2826
2865
  }
2827
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-width"]),
2828
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-left-width"]) {
2866
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-width"]),
2867
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-left-width"]),
2868
+ .wp-block-post-featured-image img:where([style*="border-left-width"]) {
2829
2869
  border-right-style: solid;
2830
2870
  }
2831
- .wp-block-post-featured-image.wp-block-post-featured-image[style*=height] .components-placeholder {
2871
+ .wp-block-post-featured-image[style*=height] .components-placeholder {
2832
2872
  min-height: 48px;
2833
2873
  min-width: 48px;
2834
2874
  height: 100%;
@@ -1885,6 +1885,10 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
1885
1885
  width: 100%;
1886
1886
  }
1887
1887
 
1888
+ .wp-block-navigation__responsive-container-open.components-button {
1889
+ opacity: 1;
1890
+ }
1891
+
1888
1892
  /**
1889
1893
  * Submenus.
1890
1894
  */
@@ -2315,6 +2319,10 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2315
2319
  border: 1px dashed;
2316
2320
  }
2317
2321
 
2322
+ .editor-styles-wrapper .wp-block-site-title a {
2323
+ color: inherit;
2324
+ }
2325
+
2318
2326
  .wp-block-social-links .wp-social-link {
2319
2327
  line-height: 0;
2320
2328
  }
@@ -2570,6 +2578,28 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2570
2578
  outline: 1px solid #ddd;
2571
2579
  }
2572
2580
 
2581
+ .wp-block-video.wp-block-video.is-selected .components-placeholder {
2582
+ color: #1e1e1e;
2583
+ background-color: #fff;
2584
+ box-shadow: inset 0 0 0 1px #1e1e1e;
2585
+ border: none;
2586
+ border-radius: 2px;
2587
+ }
2588
+ .wp-block-video.wp-block-video.is-selected .components-placeholder > svg {
2589
+ opacity: 0;
2590
+ }
2591
+ .wp-block-video.wp-block-video.is-selected .components-placeholder .components-placeholder__illustration {
2592
+ display: none;
2593
+ }
2594
+ .wp-block-video.wp-block-video.is-selected .components-placeholder::before {
2595
+ opacity: 0;
2596
+ }
2597
+ .wp-block-video.wp-block-video .components-placeholder__label,
2598
+ .wp-block-video.wp-block-video .components-placeholder__instructions,
2599
+ .wp-block-video.wp-block-video .components-button {
2600
+ transition: none;
2601
+ }
2602
+
2573
2603
  .wp-block[data-align=center] > .wp-block-video {
2574
2604
  text-align: center;
2575
2605
  }
@@ -2769,19 +2799,19 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2769
2799
  -webkit-backdrop-filter: none;
2770
2800
  backdrop-filter: none;
2771
2801
  }
2772
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
2773
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder {
2802
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
2803
+ .wp-block-post-featured-image .components-placeholder {
2774
2804
  justify-content: center;
2775
2805
  align-items: center;
2776
2806
  padding: 0;
2777
2807
  min-height: 200px;
2778
2808
  }
2779
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload,
2780
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-form-file-upload {
2809
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload,
2810
+ .wp-block-post-featured-image .components-placeholder .components-form-file-upload {
2781
2811
  display: none;
2782
2812
  }
2783
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button,
2784
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button {
2813
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button,
2814
+ .wp-block-post-featured-image .components-placeholder .components-button {
2785
2815
  padding: 0;
2786
2816
  display: flex;
2787
2817
  justify-content: center;
@@ -2795,51 +2825,61 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2795
2825
  border-style: solid;
2796
2826
  color: #fff;
2797
2827
  }
2798
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button > svg,
2799
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button > svg {
2828
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button > svg,
2829
+ .wp-block-post-featured-image .components-placeholder .components-button > svg {
2800
2830
  color: inherit;
2801
2831
  }
2802
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),
2803
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where(.has-border-color) {
2832
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),
2833
+ .wp-block-post-featured-image .components-placeholder:where(.has-border-color),
2834
+ .wp-block-post-featured-image img:where(.has-border-color) {
2804
2835
  border-style: solid;
2805
2836
  }
2806
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-color"]),
2807
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-top-color"]) {
2837
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-color"]),
2838
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-top-color"]),
2839
+ .wp-block-post-featured-image img:where([style*="border-top-color"]) {
2808
2840
  border-top-style: solid;
2809
2841
  }
2810
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-color"]),
2811
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-right-color"]) {
2842
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-color"]),
2843
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-right-color"]),
2844
+ .wp-block-post-featured-image img:where([style*="border-right-color"]) {
2812
2845
  border-right-style: solid;
2813
2846
  }
2814
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-color"]),
2815
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-color"]) {
2847
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-color"]),
2848
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-color"]),
2849
+ .wp-block-post-featured-image img:where([style*="border-bottom-color"]) {
2816
2850
  border-bottom-style: solid;
2817
2851
  }
2818
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-color"]),
2819
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-left-color"]) {
2852
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-color"]),
2853
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-left-color"]),
2854
+ .wp-block-post-featured-image img:where([style*="border-left-color"]) {
2820
2855
  border-left-style: solid;
2821
2856
  }
2822
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-width"]),
2823
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-width"]) {
2857
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-width"]),
2858
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-width"]),
2859
+ .wp-block-post-featured-image img:where([style*="border-width"]) {
2824
2860
  border-style: solid;
2825
2861
  }
2826
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-width"]),
2827
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-top-width"]) {
2862
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-width"]),
2863
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-top-width"]),
2864
+ .wp-block-post-featured-image img:where([style*="border-top-width"]) {
2828
2865
  border-top-style: solid;
2829
2866
  }
2830
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-width"]),
2831
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-right-width"]) {
2867
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-width"]),
2868
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-right-width"]),
2869
+ .wp-block-post-featured-image img:where([style*="border-right-width"]) {
2832
2870
  border-right-style: solid;
2833
2871
  }
2834
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-width"]),
2835
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-width"]) {
2872
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-width"]),
2873
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-width"]),
2874
+ .wp-block-post-featured-image img:where([style*="border-bottom-width"]) {
2836
2875
  border-bottom-style: solid;
2837
2876
  }
2838
- .wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-width"]),
2839
- .wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-left-width"]) {
2877
+ .wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-width"]),
2878
+ .wp-block-post-featured-image .components-placeholder:where([style*="border-left-width"]),
2879
+ .wp-block-post-featured-image img:where([style*="border-left-width"]) {
2840
2880
  border-left-style: solid;
2841
2881
  }
2842
- .wp-block-post-featured-image.wp-block-post-featured-image[style*=height] .components-placeholder {
2882
+ .wp-block-post-featured-image[style*=height] .components-placeholder {
2843
2883
  min-height: 48px;
2844
2884
  min-width: 48px;
2845
2885
  height: 100%;
@@ -551,4 +551,8 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
551
551
  border: 1px solid;
552
552
  margin-bottom: 16px;
553
553
  width: 100%;
554
+ }
555
+
556
+ .wp-block-navigation__responsive-container-open.components-button {
557
+ opacity: 1;
554
558
  }
@@ -551,4 +551,8 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
551
551
  border: 1px solid;
552
552
  margin-bottom: 16px;
553
553
  width: 100%;
554
+ }
555
+
556
+ .wp-block-navigation__responsive-container-open.components-button {
557
+ opacity: 1;
554
558
  }
@@ -104,6 +104,9 @@
104
104
  .wp-block-navigation .wp-block-navigation-item__content {
105
105
  display: block;
106
106
  }
107
+ .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content {
108
+ color: inherit;
109
+ }
107
110
  .wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content {
108
111
  text-decoration: underline;
109
112
  }
@@ -104,6 +104,9 @@
104
104
  .wp-block-navigation .wp-block-navigation-item__content {
105
105
  display: block;
106
106
  }
107
+ .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content {
108
+ color: inherit;
109
+ }
107
110
  .wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content {
108
111
  text-decoration: underline;
109
112
  }
@@ -100,6 +100,11 @@
100
100
  font-style: normal;
101
101
  }
102
102
 
103
+ body.rtl .has-drop-cap:not(:focus)::first-letter {
104
+ float: initial;
105
+ margin-right: 0.1em;
106
+ }
107
+
103
108
  p.has-drop-cap.has-background {
104
109
  overflow: hidden;
105
110
  }
@@ -100,6 +100,11 @@
100
100
  font-style: normal;
101
101
  }
102
102
 
103
+ body.rtl .has-drop-cap:not(:focus)::first-letter {
104
+ float: initial;
105
+ margin-left: 0.1em;
106
+ }
107
+
103
108
  p.has-drop-cap.has-background {
104
109
  overflow: hidden;
105
110
  }