@wordpress/block-library 7.3.0 → 7.3.3

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 (140) hide show
  1. package/build/audio/edit.js +1 -1
  2. package/build/audio/edit.js.map +1 -1
  3. package/build/comment-template/edit.js +3 -1
  4. package/build/comment-template/edit.js.map +1 -1
  5. package/build/comment-template/hooks.js +14 -4
  6. package/build/comment-template/hooks.js.map +1 -1
  7. package/build/comments-pagination/edit.js +18 -1
  8. package/build/comments-pagination/edit.js.map +1 -1
  9. package/build/comments-query-loop/edit.js +2 -2
  10. package/build/comments-query-loop/edit.js.map +1 -1
  11. package/build/comments-title/edit.js +149 -0
  12. package/build/comments-title/edit.js.map +1 -0
  13. package/build/comments-title/index.js +101 -0
  14. package/build/comments-title/index.js.map +1 -0
  15. package/build/cover/transforms.js +33 -32
  16. package/build/cover/transforms.js.map +1 -1
  17. package/build/index.js +6 -4
  18. package/build/index.js.map +1 -1
  19. package/build/list/index.js +13 -2
  20. package/build/list/index.js.map +1 -1
  21. package/build/navigation/edit/index.js +17 -1
  22. package/build/navigation/edit/index.js.map +1 -1
  23. package/build/navigation/edit/navigation-menu-selector.js +7 -2
  24. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  25. package/build/post-comments/edit.js +141 -35
  26. package/build/post-comments/edit.js.map +1 -1
  27. package/build/post-comments/index.js +6 -4
  28. package/build/post-comments/index.js.map +1 -1
  29. package/build/post-comments-form/edit.js +22 -1
  30. package/build/post-comments-form/edit.js.map +1 -1
  31. package/build/post-comments-form/index.js +1 -0
  32. package/build/post-comments-form/index.js.map +1 -1
  33. package/build/post-featured-image/edit.js +19 -7
  34. package/build/post-featured-image/edit.js.map +1 -1
  35. package/build/query/edit/index.js +84 -22
  36. package/build/query/edit/index.js.map +1 -1
  37. package/build/query/edit/query-placeholder.js +7 -14
  38. package/build/query/edit/query-placeholder.js.map +1 -1
  39. package/build/query/edit/query-toolbar.js +6 -1
  40. package/build/query/edit/query-toolbar.js.map +1 -1
  41. package/build/query-no-results/edit.js +1 -1
  42. package/build/query-no-results/edit.js.map +1 -1
  43. package/build/quote/index.js +13 -2
  44. package/build/quote/index.js.map +1 -1
  45. package/build-module/audio/edit.js +1 -1
  46. package/build-module/audio/edit.js.map +1 -1
  47. package/build-module/comment-template/edit.js +3 -1
  48. package/build-module/comment-template/edit.js.map +1 -1
  49. package/build-module/comment-template/hooks.js +14 -4
  50. package/build-module/comment-template/hooks.js.map +1 -1
  51. package/build-module/comments-pagination/edit.js +19 -2
  52. package/build-module/comments-pagination/edit.js.map +1 -1
  53. package/build-module/comments-query-loop/edit.js +2 -2
  54. package/build-module/comments-query-loop/edit.js.map +1 -1
  55. package/build-module/comments-title/edit.js +133 -0
  56. package/build-module/comments-title/edit.js.map +1 -0
  57. package/build-module/comments-title/index.js +88 -0
  58. package/build-module/comments-title/index.js.map +1 -0
  59. package/build-module/cover/transforms.js +33 -32
  60. package/build-module/cover/transforms.js.map +1 -1
  61. package/build-module/index.js +5 -4
  62. package/build-module/index.js.map +1 -1
  63. package/build-module/list/index.js +9 -3
  64. package/build-module/list/index.js.map +1 -1
  65. package/build-module/navigation/edit/index.js +17 -1
  66. package/build-module/navigation/edit/index.js.map +1 -1
  67. package/build-module/navigation/edit/navigation-menu-selector.js +6 -2
  68. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  69. package/build-module/post-comments/edit.js +143 -38
  70. package/build-module/post-comments/edit.js.map +1 -1
  71. package/build-module/post-comments/index.js +6 -4
  72. package/build-module/post-comments/index.js.map +1 -1
  73. package/build-module/post-comments-form/edit.js +21 -1
  74. package/build-module/post-comments-form/edit.js.map +1 -1
  75. package/build-module/post-comments-form/index.js +1 -0
  76. package/build-module/post-comments-form/index.js.map +1 -1
  77. package/build-module/post-featured-image/edit.js +19 -7
  78. package/build-module/post-featured-image/edit.js.map +1 -1
  79. package/build-module/query/edit/index.js +87 -26
  80. package/build-module/query/edit/index.js.map +1 -1
  81. package/build-module/query/edit/query-placeholder.js +8 -15
  82. package/build-module/query/edit/query-placeholder.js.map +1 -1
  83. package/build-module/query/edit/query-toolbar.js +6 -1
  84. package/build-module/query/edit/query-toolbar.js.map +1 -1
  85. package/build-module/query-no-results/edit.js +1 -1
  86. package/build-module/query-no-results/edit.js.map +1 -1
  87. package/build-module/quote/index.js +9 -3
  88. package/build-module/quote/index.js.map +1 -1
  89. package/build-style/comments-title/editor-rtl.css +79 -0
  90. package/build-style/comments-title/editor.css +79 -0
  91. package/build-style/editor-rtl.css +51 -0
  92. package/build-style/editor.css +51 -0
  93. package/build-style/post-comments/editor-rtl.css +79 -0
  94. package/build-style/post-comments/editor.css +79 -0
  95. package/build-style/post-comments/style-rtl.css +1 -3
  96. package/build-style/post-comments/style.css +1 -3
  97. package/build-style/post-comments-form/editor-rtl.css +79 -0
  98. package/build-style/post-comments-form/editor.css +79 -0
  99. package/build-style/post-comments-form/style-rtl.css +9 -0
  100. package/build-style/post-comments-form/style.css +9 -0
  101. package/build-style/query/editor-rtl.css +39 -0
  102. package/build-style/query/editor.css +39 -0
  103. package/build-style/style-rtl.css +10 -3
  104. package/build-style/style.css +10 -3
  105. package/package.json +28 -28
  106. package/src/audio/edit.js +1 -1
  107. package/src/comment-edit-link/index.php +1 -4
  108. package/src/comment-reply-link/index.php +1 -4
  109. package/src/comment-template/edit.js +5 -2
  110. package/src/comment-template/hooks.js +15 -2
  111. package/src/comment-template/index.php +23 -2
  112. package/src/comments-pagination/edit.js +23 -0
  113. package/src/comments-query-loop/edit.js +2 -0
  114. package/src/comments-title/block.json +70 -0
  115. package/src/comments-title/edit.js +197 -0
  116. package/src/comments-title/editor.scss +4 -0
  117. package/src/comments-title/index.js +18 -0
  118. package/src/comments-title/index.php +68 -0
  119. package/src/cover/transforms.js +51 -28
  120. package/src/editor.scss +3 -0
  121. package/src/index.js +8 -2
  122. package/src/list/index.js +7 -3
  123. package/src/navigation/edit/index.js +24 -0
  124. package/src/navigation/edit/navigation-menu-selector.js +15 -9
  125. package/src/post-comments/block.json +6 -4
  126. package/src/post-comments/edit.js +204 -44
  127. package/src/post-comments/editor.scss +3 -0
  128. package/src/post-comments/style.scss +1 -5
  129. package/src/post-comments-form/block.json +1 -0
  130. package/src/post-comments-form/edit.js +39 -2
  131. package/src/post-comments-form/editor.scss +3 -0
  132. package/src/post-comments-form/index.php +12 -4
  133. package/src/post-comments-form/style.scss +11 -0
  134. package/src/post-featured-image/edit.js +24 -12
  135. package/src/query/edit/index.js +125 -26
  136. package/src/query/edit/query-placeholder.js +3 -13
  137. package/src/query/edit/query-toolbar.js +6 -0
  138. package/src/query/editor.scss +38 -0
  139. package/src/query-no-results/edit.js +1 -1
  140. package/src/quote/index.js +7 -3
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-title/index.js"],"names":["commentTitle","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,IAAIC,IAAzB,QAAqC,kBAArC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBC,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentTitle as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
@@ -68,48 +68,49 @@ const transforms = {
68
68
  }, {
69
69
  type: 'block',
70
70
  blocks: ['core/group'],
71
- isMatch: _ref3 => {
72
- var _style$color2, _style$color3;
73
-
74
- let {
75
- backgroundColor,
76
- gradient,
77
- style
78
- } = _ref3;
71
+ transform: (attributes, innerBlocks) => {
72
+ var _style$color2, _style$color3, _style$color4, _style$color5, _attributes$style;
79
73
 
80
- /*
81
- * Make this transformation available only if the Group has background
82
- * or gradient set, because otherwise `Cover` block displays a Placeholder.
83
- *
84
- * This helps avoid arbitrary decisions about the Cover block's background
85
- * and user confusion about the existence of previous content.
86
- */
87
- return backgroundColor || (style === null || style === void 0 ? void 0 : (_style$color2 = style.color) === null || _style$color2 === void 0 ? void 0 : _style$color2.background) || (style === null || style === void 0 ? void 0 : (_style$color3 = style.color) === null || _style$color3 === void 0 ? void 0 : _style$color3.gradient) || gradient;
88
- },
89
- transform: (_ref4, innerBlocks) => {
90
- var _style$color4, _style$color5;
91
-
92
- let {
74
+ const {
93
75
  align,
94
76
  anchor,
95
77
  backgroundColor,
96
78
  gradient,
97
79
  style
98
- } = _ref4;
99
- return createBlock('core/cover', {
80
+ } = attributes; // If no background or gradient color is provided, default to 50% opacity.
81
+ // This matches the styling of a Cover block with a background image,
82
+ // in the state where a background image has been removed.
83
+
84
+ const dimRatio = backgroundColor || gradient || style !== null && style !== void 0 && (_style$color2 = style.color) !== null && _style$color2 !== void 0 && _style$color2.background || style !== null && style !== void 0 && (_style$color3 = style.color) !== null && _style$color3 !== void 0 && _style$color3.gradient ? undefined : 50; // Move the background or gradient color to the parent Cover block.
85
+
86
+ const parentAttributes = {
100
87
  align,
101
88
  anchor,
89
+ dimRatio,
102
90
  overlayColor: backgroundColor,
103
91
  customOverlayColor: style === null || style === void 0 ? void 0 : (_style$color4 = style.color) === null || _style$color4 === void 0 ? void 0 : _style$color4.background,
104
92
  gradient,
105
93
  customGradient: style === null || style === void 0 ? void 0 : (_style$color5 = style.color) === null || _style$color5 === void 0 ? void 0 : _style$color5.gradient
106
- }, innerBlocks);
94
+ };
95
+ const attributesWithoutBackgroundColors = { ...attributes,
96
+ backgroundColor: undefined,
97
+ gradient: undefined,
98
+ style: { ...(attributes === null || attributes === void 0 ? void 0 : attributes.style),
99
+ color: { ...(attributes === null || attributes === void 0 ? void 0 : (_attributes$style = attributes.style) === null || _attributes$style === void 0 ? void 0 : _attributes$style.color),
100
+ background: undefined,
101
+ gradient: undefined
102
+ }
103
+ }
104
+ }; // Preserve the block by nesting it within the Cover block,
105
+ // instead of converting the Group block directly to the Cover block.
106
+
107
+ return createBlock('core/cover', parentAttributes, [createBlock('core/group', attributesWithoutBackgroundColors, innerBlocks)]);
107
108
  }
108
109
  }],
109
110
  to: [{
110
111
  type: 'block',
111
112
  blocks: ['core/image'],
112
- isMatch: _ref5 => {
113
+ isMatch: _ref3 => {
113
114
  let {
114
115
  backgroundType,
115
116
  url,
@@ -117,7 +118,7 @@ const transforms = {
117
118
  customOverlayColor,
118
119
  gradient,
119
120
  customGradient
120
- } = _ref5;
121
+ } = _ref3;
121
122
 
122
123
  if (url) {
123
124
  // If a url exists the transform could happen if that URL represents an image background.
@@ -127,7 +128,7 @@ const transforms = {
127
128
 
128
129
  return !overlayColor && !customOverlayColor && !gradient && !customGradient;
129
130
  },
130
- transform: _ref6 => {
131
+ transform: _ref4 => {
131
132
  var _style$color6;
132
133
 
133
134
  let {
@@ -138,7 +139,7 @@ const transforms = {
138
139
  id,
139
140
  anchor,
140
141
  style
141
- } = _ref6;
142
+ } = _ref4;
142
143
  return createBlock('core/image', {
143
144
  caption: title,
144
145
  url,
@@ -156,7 +157,7 @@ const transforms = {
156
157
  }, {
157
158
  type: 'block',
158
159
  blocks: ['core/video'],
159
- isMatch: _ref7 => {
160
+ isMatch: _ref5 => {
160
161
  let {
161
162
  backgroundType,
162
163
  url,
@@ -164,7 +165,7 @@ const transforms = {
164
165
  customOverlayColor,
165
166
  gradient,
166
167
  customGradient
167
- } = _ref7;
168
+ } = _ref5;
168
169
 
169
170
  if (url) {
170
171
  // If a url exists the transform could happen if that URL represents a video background.
@@ -174,14 +175,14 @@ const transforms = {
174
175
 
175
176
  return !overlayColor && !customOverlayColor && !gradient && !customGradient;
176
177
  },
177
- transform: _ref8 => {
178
+ transform: _ref6 => {
178
179
  let {
179
180
  title,
180
181
  url,
181
182
  align,
182
183
  id,
183
184
  anchor
184
- } = _ref8;
185
+ } = _ref6;
185
186
  return createBlock('core/video', {
186
187
  caption: title,
187
188
  src: url,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/cover/transforms.js"],"names":["createBlock","IMAGE_BACKGROUND_TYPE","VIDEO_BACKGROUND_TYPE","transforms","from","type","blocks","transform","caption","url","alt","align","id","anchor","style","dimRatio","color","duotone","content","fontSize","src","backgroundType","isMatch","backgroundColor","gradient","background","innerBlocks","overlayColor","customOverlayColor","customGradient","to","title"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAT,QAA4B,mBAA5B;AAEA;AACA;AACA;;AACA,SAASC,qBAAT,EAAgCC,qBAAhC,QAA6D,UAA7D;AAEA,MAAMC,UAAU,GAAG;AAClBC,EAAAA,IAAI,EAAE,CACL;AACCC,IAAAA,IAAI,EAAE,OADP;AAECC,IAAAA,MAAM,EAAE,CAAE,YAAF,CAFT;AAGCC,IAAAA,SAAS,EAAE;AAAA;;AAAA,UAAE;AAAEC,QAAAA,OAAF;AAAWC,QAAAA,GAAX;AAAgBC,QAAAA,GAAhB;AAAqBC,QAAAA,KAArB;AAA4BC,QAAAA,EAA5B;AAAgCC,QAAAA,MAAhC;AAAwCC,QAAAA;AAAxC,OAAF;AAAA,aACVd,WAAW,CACV,YADU,EAEV;AACCe,QAAAA,QAAQ,EAAE,EADX;AAECN,QAAAA,GAFD;AAGCC,QAAAA,GAHD;AAICC,QAAAA,KAJD;AAKCC,QAAAA,EALD;AAMCC,QAAAA,MAND;AAOCC,QAAAA,KAAK,EAAE;AACNE,UAAAA,KAAK,EAAE;AACNC,YAAAA,OAAO,EAAEH,KAAF,aAAEA,KAAF,uCAAEA,KAAK,CAAEE,KAAT,iDAAE,aAAcC;AADjB;AADD;AAPR,OAFU,EAeV,CACCjB,WAAW,CAAE,gBAAF,EA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\n */\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { IMAGE_BACKGROUND_TYPE, VIDEO_BACKGROUND_TYPE } from './shared';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/image' ],\n\t\t\ttransform: ( { caption, url, alt, align, id, anchor, style } ) =>\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/cover',\n\t\t\t\t\t{\n\t\t\t\t\t\tdimRatio: 50,\n\t\t\t\t\t\turl,\n\t\t\t\t\t\talt,\n\t\t\t\t\t\talign,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tanchor,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t\tduotone: style?.color?.duotone,\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\t[\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\tcontent: caption,\n\t\t\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\t\t\talign: 'center',\n\t\t\t\t\t\t} ),\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/video' ],\n\t\t\ttransform: ( { caption, src, align, id, anchor } ) =>\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/cover',\n\t\t\t\t\t{\n\t\t\t\t\t\tdimRatio: 50,\n\t\t\t\t\t\turl: src,\n\t\t\t\t\t\talign,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tbackgroundType: VIDEO_BACKGROUND_TYPE,\n\t\t\t\t\t\tanchor,\n\t\t\t\t\t},\n\t\t\t\t\t[\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\tcontent: caption,\n\t\t\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\t\t\talign: 'center',\n\t\t\t\t\t\t} ),\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/group' ],\n\t\t\tisMatch: ( { backgroundColor, gradient, style } ) => {\n\t\t\t\t/*\n\t\t\t\t * Make this transformation available only if the Group has background\n\t\t\t\t * or gradient set, because otherwise `Cover` block displays a Placeholder.\n\t\t\t\t *\n\t\t\t\t * This helps avoid arbitrary decisions about the Cover block's background\n\t\t\t\t * and user confusion about the existence of previous content.\n\t\t\t\t */\n\t\t\t\treturn (\n\t\t\t\t\tbackgroundColor ||\n\t\t\t\t\tstyle?.color?.background ||\n\t\t\t\t\tstyle?.color?.gradient ||\n\t\t\t\t\tgradient\n\t\t\t\t);\n\t\t\t},\n\t\t\ttransform: (\n\t\t\t\t{ align, anchor, backgroundColor, gradient, style },\n\t\t\t\tinnerBlocks\n\t\t\t) => {\n\t\t\t\treturn createBlock(\n\t\t\t\t\t'core/cover',\n\t\t\t\t\t{\n\t\t\t\t\t\talign,\n\t\t\t\t\t\tanchor,\n\t\t\t\t\t\toverlayColor: backgroundColor,\n\t\t\t\t\t\tcustomOverlayColor: style?.color?.background,\n\t\t\t\t\t\tgradient,\n\t\t\t\t\t\tcustomGradient: style?.color?.gradient,\n\t\t\t\t\t},\n\t\t\t\t\tinnerBlocks\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\t],\n\tto: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/image' ],\n\t\t\tisMatch: ( {\n\t\t\t\tbackgroundType,\n\t\t\t\turl,\n\t\t\t\toverlayColor,\n\t\t\t\tcustomOverlayColor,\n\t\t\t\tgradient,\n\t\t\t\tcustomGradient,\n\t\t\t} ) => {\n\t\t\t\tif ( url ) {\n\t\t\t\t\t// If a url exists the transform could happen if that URL represents an image background.\n\t\t\t\t\treturn backgroundType === IMAGE_BACKGROUND_TYPE;\n\t\t\t\t}\n\t\t\t\t// If a url is not set the transform could happen if the cover has no background color or gradient;\n\t\t\t\treturn (\n\t\t\t\t\t! overlayColor &&\n\t\t\t\t\t! customOverlayColor &&\n\t\t\t\t\t! gradient &&\n\t\t\t\t\t! customGradient\n\t\t\t\t);\n\t\t\t},\n\t\t\ttransform: ( { title, url, alt, align, id, anchor, style } ) =>\n\t\t\t\tcreateBlock( 'core/image', {\n\t\t\t\t\tcaption: title,\n\t\t\t\t\turl,\n\t\t\t\t\talt,\n\t\t\t\t\talign,\n\t\t\t\t\tid,\n\t\t\t\t\tanchor,\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\tduotone: style?.color?.duotone,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t} ),\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/video' ],\n\t\t\tisMatch: ( {\n\t\t\t\tbackgroundType,\n\t\t\t\turl,\n\t\t\t\toverlayColor,\n\t\t\t\tcustomOverlayColor,\n\t\t\t\tgradient,\n\t\t\t\tcustomGradient,\n\t\t\t} ) => {\n\t\t\t\tif ( url ) {\n\t\t\t\t\t// If a url exists the transform could happen if that URL represents a video background.\n\t\t\t\t\treturn backgroundType === VIDEO_BACKGROUND_TYPE;\n\t\t\t\t}\n\t\t\t\t// If a url is not set the transform could happen if the cover has no background color or gradient;\n\t\t\t\treturn (\n\t\t\t\t\t! overlayColor &&\n\t\t\t\t\t! customOverlayColor &&\n\t\t\t\t\t! gradient &&\n\t\t\t\t\t! customGradient\n\t\t\t\t);\n\t\t\t},\n\t\t\ttransform: ( { title, url, align, id, anchor } ) =>\n\t\t\t\tcreateBlock( 'core/video', {\n\t\t\t\t\tcaption: title,\n\t\t\t\t\tsrc: url,\n\t\t\t\t\tid,\n\t\t\t\t\talign,\n\t\t\t\t\tanchor,\n\t\t\t\t} ),\n\t\t},\n\t],\n};\n\nexport default transforms;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/cover/transforms.js"],"names":["createBlock","IMAGE_BACKGROUND_TYPE","VIDEO_BACKGROUND_TYPE","transforms","from","type","blocks","transform","caption","url","alt","align","id","anchor","style","dimRatio","color","duotone","content","fontSize","src","backgroundType","attributes","innerBlocks","backgroundColor","gradient","background","undefined","parentAttributes","overlayColor","customOverlayColor","customGradient","attributesWithoutBackgroundColors","to","isMatch","title"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAT,QAA4B,mBAA5B;AAEA;AACA;AACA;;AACA,SAASC,qBAAT,EAAgCC,qBAAhC,QAA6D,UAA7D;AAEA,MAAMC,UAAU,GAAG;AAClBC,EAAAA,IAAI,EAAE,CACL;AACCC,IAAAA,IAAI,EAAE,OADP;AAECC,IAAAA,MAAM,EAAE,CAAE,YAAF,CAFT;AAGCC,IAAAA,SAAS,EAAE;AAAA;;AAAA,UAAE;AAAEC,QAAAA,OAAF;AAAWC,QAAAA,GAAX;AAAgBC,QAAAA,GAAhB;AAAqBC,QAAAA,KAArB;AAA4BC,QAAAA,EAA5B;AAAgCC,QAAAA,MAAhC;AAAwCC,QAAAA;AAAxC,OAAF;AAAA,aACVd,WAAW,CACV,YADU,EAEV;AACCe,QAAAA,QAAQ,EAAE,EADX;AAECN,QAAAA,GAFD;AAGCC,QAAAA,GAHD;AAICC,QAAAA,KAJD;AAKCC,QAAAA,EALD;AAMCC,QAAAA,MAND;AAOCC,QAAAA,KAAK,EAAE;AACNE,UAAAA,KAAK,EAAE;AACNC,YAAAA,OAAO,EAAEH,KAAF,aAAEA,KAAF,uCAAEA,KAAK,CAAEE,KAAT,iDAAE,aAAcC;AADjB;AADD;AAPR,OAFU,EAeV,CACCjB,WAAW,CAAE,gBAAF,EAAoB;AAC9BkB,QAAAA,OAAO,EAAEV,OADqB;AAE9BW,QAAAA,QAAQ,EAAE,OAFoB;AAG9BR,QAAAA,KAAK,EAAE;AAHuB,OAApB,CADZ,CAfU,CADD;AAAA;AAHZ,GADK,EA6BL;AACCN,IAAAA,IAAI,EAAE,OADP;AAECC,IAAAA,MAAM,EAAE,CAA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AAF,EAAgB;AAC1BQ,QAAAA,OAAO,EAAE2B,KADiB;AAE1Bf,QAAAA,GAAG,EAAEX,GAFqB;AAG1BG,QAAAA,EAH0B;AAI1BD,QAAAA,KAJ0B;AAK1BE,QAAAA;AAL0B,OAAhB,CADD;AAAA;AAvBZ,GAvCG;AAjHc,CAAnB;AA2LA,eAAeV,UAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { IMAGE_BACKGROUND_TYPE, VIDEO_BACKGROUND_TYPE } from './shared';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/image' ],\n\t\t\ttransform: ( { caption, url, alt, align, id, anchor, style } ) =>\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/cover',\n\t\t\t\t\t{\n\t\t\t\t\t\tdimRatio: 50,\n\t\t\t\t\t\turl,\n\t\t\t\t\t\talt,\n\t\t\t\t\t\talign,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tanchor,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t\tduotone: style?.color?.duotone,\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\t[\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\tcontent: caption,\n\t\t\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\t\t\talign: 'center',\n\t\t\t\t\t\t} ),\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/video' ],\n\t\t\ttransform: ( { caption, src, align, id, anchor } ) =>\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/cover',\n\t\t\t\t\t{\n\t\t\t\t\t\tdimRatio: 50,\n\t\t\t\t\t\turl: src,\n\t\t\t\t\t\talign,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tbackgroundType: VIDEO_BACKGROUND_TYPE,\n\t\t\t\t\t\tanchor,\n\t\t\t\t\t},\n\t\t\t\t\t[\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\tcontent: caption,\n\t\t\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\t\t\talign: 'center',\n\t\t\t\t\t\t} ),\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/group' ],\n\t\t\ttransform: ( attributes, innerBlocks ) => {\n\t\t\t\tconst {\n\t\t\t\t\talign,\n\t\t\t\t\tanchor,\n\t\t\t\t\tbackgroundColor,\n\t\t\t\t\tgradient,\n\t\t\t\t\tstyle,\n\t\t\t\t} = attributes;\n\n\t\t\t\t// If no background or gradient color is provided, default to 50% opacity.\n\t\t\t\t// This matches the styling of a Cover block with a background image,\n\t\t\t\t// in the state where a background image has been removed.\n\t\t\t\tconst dimRatio =\n\t\t\t\t\tbackgroundColor ||\n\t\t\t\t\tgradient ||\n\t\t\t\t\tstyle?.color?.background ||\n\t\t\t\t\tstyle?.color?.gradient\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: 50;\n\n\t\t\t\t// Move the background or gradient color to the parent Cover block.\n\t\t\t\tconst parentAttributes = {\n\t\t\t\t\talign,\n\t\t\t\t\tanchor,\n\t\t\t\t\tdimRatio,\n\t\t\t\t\toverlayColor: backgroundColor,\n\t\t\t\t\tcustomOverlayColor: style?.color?.background,\n\t\t\t\t\tgradient,\n\t\t\t\t\tcustomGradient: style?.color?.gradient,\n\t\t\t\t};\n\n\t\t\t\tconst attributesWithoutBackgroundColors = {\n\t\t\t\t\t...attributes,\n\t\t\t\t\tbackgroundColor: undefined,\n\t\t\t\t\tgradient: undefined,\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...attributes?.style,\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t...attributes?.style?.color,\n\t\t\t\t\t\t\tbackground: undefined,\n\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\t// Preserve the block by nesting it within the Cover block,\n\t\t\t\t// instead of converting the Group block directly to the Cover block.\n\t\t\t\treturn createBlock( 'core/cover', parentAttributes, [\n\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t'core/group',\n\t\t\t\t\t\tattributesWithoutBackgroundColors,\n\t\t\t\t\t\tinnerBlocks\n\t\t\t\t\t),\n\t\t\t\t] );\n\t\t\t},\n\t\t},\n\t],\n\tto: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/image' ],\n\t\t\tisMatch: ( {\n\t\t\t\tbackgroundType,\n\t\t\t\turl,\n\t\t\t\toverlayColor,\n\t\t\t\tcustomOverlayColor,\n\t\t\t\tgradient,\n\t\t\t\tcustomGradient,\n\t\t\t} ) => {\n\t\t\t\tif ( url ) {\n\t\t\t\t\t// If a url exists the transform could happen if that URL represents an image background.\n\t\t\t\t\treturn backgroundType === IMAGE_BACKGROUND_TYPE;\n\t\t\t\t}\n\t\t\t\t// If a url is not set the transform could happen if the cover has no background color or gradient;\n\t\t\t\treturn (\n\t\t\t\t\t! overlayColor &&\n\t\t\t\t\t! customOverlayColor &&\n\t\t\t\t\t! gradient &&\n\t\t\t\t\t! customGradient\n\t\t\t\t);\n\t\t\t},\n\t\t\ttransform: ( { title, url, alt, align, id, anchor, style } ) =>\n\t\t\t\tcreateBlock( 'core/image', {\n\t\t\t\t\tcaption: title,\n\t\t\t\t\turl,\n\t\t\t\t\talt,\n\t\t\t\t\talign,\n\t\t\t\t\tid,\n\t\t\t\t\tanchor,\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\tduotone: style?.color?.duotone,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t} ),\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/video' ],\n\t\t\tisMatch: ( {\n\t\t\t\tbackgroundType,\n\t\t\t\turl,\n\t\t\t\toverlayColor,\n\t\t\t\tcustomOverlayColor,\n\t\t\t\tgradient,\n\t\t\t\tcustomGradient,\n\t\t\t} ) => {\n\t\t\t\tif ( url ) {\n\t\t\t\t\t// If a url exists the transform could happen if that URL represents a video background.\n\t\t\t\t\treturn backgroundType === VIDEO_BACKGROUND_TYPE;\n\t\t\t\t}\n\t\t\t\t// If a url is not set the transform could happen if the cover has no background color or gradient;\n\t\t\t\treturn (\n\t\t\t\t\t! overlayColor &&\n\t\t\t\t\t! customOverlayColor &&\n\t\t\t\t\t! gradient &&\n\t\t\t\t\t! customGradient\n\t\t\t\t);\n\t\t\t},\n\t\t\ttransform: ( { title, url, align, id, anchor } ) =>\n\t\t\t\tcreateBlock( 'core/video', {\n\t\t\t\t\tcaption: title,\n\t\t\t\t\tsrc: url,\n\t\t\t\t\tid,\n\t\t\t\t\talign,\n\t\t\t\t\tanchor,\n\t\t\t\t} ),\n\t\t},\n\t],\n};\n\nexport default transforms;\n"]}
@@ -29,6 +29,7 @@ import * as commentsQueryLoop from './comments-query-loop';
29
29
  import * as commentsPagination from './comments-pagination';
30
30
  import * as commentsPaginationNext from './comments-pagination-next';
31
31
  import * as commentsPaginationNumbers from './comments-pagination-numbers';
32
+ import * as commentsTitle from './comments-title';
32
33
  import * as cover from './cover';
33
34
  import * as embed from './embed';
34
35
  import * as file from './file';
@@ -135,11 +136,11 @@ const registerBlock = block => {
135
136
 
136
137
  export const __experimentalGetCoreBlocks = () => [// Common blocks are grouped at the top to prioritize their display
137
138
  // in various contexts — like the inserter and auto-complete components.
138
- paragraph, image, heading, gallery, list, listItem, quote, // Register all remaining core blocks.
139
+ paragraph, image, heading, gallery, list, quote, // Register all remaining core blocks.
139
140
  archives, audio, button, buttons, calendar, categories, window.wp && window.wp.oldEditor ? classic : null, // Only add the classic block in WP Context.
140
141
  code, column, columns, cover, embed, file, group, html, latestComments, latestPosts, mediaText, missing, more, nextpage, pageList, pattern, preformatted, pullquote, reusableBlock, rss, search, separator, shortcode, socialLink, socialLinks, spacer, table, // tableOfContents,
141
142
  tagCloud, textColumns, verse, video, // theme blocks
142
- navigation, navigationLink, navigationSubmenu, siteLogo, siteTitle, siteTagline, query, templatePart, avatar, postTitle, postExcerpt, postFeaturedImage, postContent, postAuthor, postDate, postTerms, postNavigationLink, postTemplate, queryPagination, queryPaginationNext, queryPaginationNumbers, queryPaginationPrevious, queryNoResults, readMore, commentAuthorName, commentContent, commentDate, commentEditLink, commentReplyLink, commentTemplate, commentsQueryLoop, commentsPagination, commentsPaginationNext, commentsPaginationNumbers, commentsPaginationPrevious, postComments, homeLink, logInOut, termDescription, queryTitle, postAuthorBiography];
143
+ navigation, navigationLink, navigationSubmenu, siteLogo, siteTitle, siteTagline, query, templatePart, avatar, postTitle, postExcerpt, postFeaturedImage, postContent, postAuthor, postDate, postTerms, postNavigationLink, postTemplate, queryPagination, queryPaginationNext, queryPaginationNumbers, queryPaginationPrevious, queryNoResults, readMore, commentAuthorName, commentContent, commentDate, commentEditLink, commentReplyLink, commentTemplate, commentsTitle, commentsQueryLoop, commentsPagination, commentsPaginationNext, commentsPaginationNumbers, commentsPaginationPrevious, postComments, postCommentsForm, homeLink, logInOut, termDescription, queryTitle, postAuthorBiography];
143
144
  /**
144
145
  * Function to register core blocks provided by the block editor.
145
146
  *
@@ -182,7 +183,7 @@ export const __experimentalRegisterExperimentalCoreBlocks = process.env.IS_GUTEN
182
183
  enableFSEBlocks
183
184
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
184
185
  [// Experimental blocks.
185
- postAuthorName, // Full Site Editing blocks.
186
- ...(enableFSEBlocks ? [commentAuthorAvatar, navigationArea, postComment, postCommentsCount, postCommentsForm, postCommentsLink] : [])].forEach(registerBlock);
186
+ postAuthorName, ...(window.__experimentalEnableListBlockV2 ? [listItem] : []), // Full Site Editing blocks.
187
+ ...(enableFSEBlocks ? [commentAuthorAvatar, navigationArea, postComment, postCommentsCount, postCommentsLink] : [])].forEach(registerBlock);
187
188
  } : undefined;
188
189
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/index.js"],"names":["registerBlockType","setDefaultBlockName","setFreeformContentHandlerName","setUnregisteredTypeHandlerName","setGroupingBlockName","archives","avatar","audio","button","buttons","calendar","categories","classic","code","column","columns","commentAuthorAvatar","commentAuthorName","commentContent","commentDate","commentEditLink","commentReplyLink","commentTemplate","commentsPaginationPrevious","commentsQueryLoop","commentsPagination","commentsPaginationNext","commentsPaginationNumbers","cover","embed","file","gallery","group","heading","homeLink","html","image","latestComments","latestPosts","list","listItem","logInOut","mediaText","missing","more","navigation","navigationArea","navigationLink","navigationSubmenu","nextpage","pattern","pageList","paragraph","postAuthor","postAuthorName","postAuthorBiography","postComment","postComments","postCommentsCount","postCommentsForm","postCommentsLink","postContent","postDate","postExcerpt","postFeaturedImage","postNavigationLink","postTemplate","postTerms","postTitle","preformatted","pullquote","query","queryNoResults","queryPagination","queryPaginationNext","queryPaginationNumbers","queryPaginationPrevious","queryTitle","quote","reusableBlock","readMore","rss","search","separator","shortcode","siteLogo","siteTagline","siteTitle","socialLink","socialLinks","spacer","table","tagCloud","templatePart","termDescription","textColumns","verse","video","registerBlock","block","metadata","settings","name","__experimentalGetCoreBlocks","window","wp","oldEditor","registerCoreBlocks","blocks","forEach","__experimentalRegisterExperimentalCoreBlocks","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","undefined"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,iBADD,EAECC,mBAFD,EAGCC,6BAHD,EAICC,8BAJD,EAKCC,oBALD,QAMO,mBANP;AAQA;AACA;AACA;;AACA,OAAO,KAAKC,QAAZ,MAA0B,YAA1B;AACA,OAAO,KAAKC,MAAZ,MAAwB,UAAxB;AACA,OAAO,KAAKC,KAAZ,MAAuB,SAAvB;AACA,OAAO,K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CAACsE,IAAR,CAApB;AACA,CAXM;AAaP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMQ,4CAA4C,GAAGC,OAAO,CAACC,GAAR,CAC1DC,mBAD0D,GAEzD,YAAgC;AAAA,MAA9B;AAAEC,IAAAA;AAAF,GAA8B,uEAAR,EAAQ;AAChC,GACC;AACA5D,EAAAA,cAFD,EAGC;AACA,MAAK4D,eAAe,GACjB,CACAlG,mBADA,EAEA8B,cAFA,EAGAU,WAHA,EAIAE,iBAJA,EAKAC,gBALA,EAMAC,gBANA,CADiB,GASjB,EATH,CAJD,EAcEiD,OAdF,CAcWX,aAdX;AAeC,CAlBwD,GAmBzDiB,SAnBI","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tregisterBlockType,\n\tsetDefaultBlockName,\n\tsetFreeformContentHandlerName,\n\tsetUnregisteredTypeHandlerName,\n\tsetGroupingBlockName,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport * as archives from './archives';\nimport * as avatar from './avatar';\nimport * as audio from './audio';\nimport * as button from './button';\nimport * as buttons from './buttons';\nimport * as calendar from './calendar';\nimport * as categories from './categories';\nimport * as classic from './freeform';\nimport * as code from './code';\nimport * as column from './column';\nimport * as columns from './columns';\nimport * as commentAuthorAvatar from './comment-author-avatar';\nimport * as commentAuthorName from './comment-author-name';\nimport * as commentContent from './comment-content';\nimport * as commentDate from './comment-date';\nimport * as commentEditLink from './comment-edit-link';\nimport * as commentReplyLink from './comment-reply-link';\nimport * as commentTemplate from './comment-template';\nimport * as commentsPaginationPrevious from './comments-pagination-previous';\nimport * as commentsQueryLoop from './comments-query-loop';\nimport * as commentsPagination from './comments-pagination';\nimport * as commentsPaginationNext from './comments-pagination-next';\nimport * as commentsPaginationNumbers from './comments-pagination-numbers';\nimport * as cover from './cover';\nimport * as embed from './embed';\nimport * as file from './file';\nimport * as gallery from './gallery';\nimport * as group from './group';\nimport * as heading from './heading';\nimport * as homeLink from './home-link';\nimport * as html from './html';\nimport * as image from './image';\nimport * as latestComments from './latest-comments';\nimport * as latestPosts from './latest-posts';\nimport * as list from './list';\nimport * as listItem from './list-item';\nimport * as logInOut from './loginout';\nimport * as mediaText from './media-text';\nimport * as missing from './missing';\nimport * as more from './more';\nimport * as navigation from './navigation';\nimport * as navigationArea from './navigation-area';\nimport * as navigationLink from './navigation-link';\nimport * as navigationSubmenu from './navigation-submenu';\nimport * as nextpage from './nextpage';\nimport * as pattern from './pattern';\nimport * as pageList from './page-list';\nimport * as paragraph from './paragraph';\nimport * as postAuthor from './post-author';\nimport * as postAuthorName from './post-author-name';\nimport * as postAuthorBiography from './post-author-biography';\nimport * as postComment from './post-comment';\nimport * as postComments from './post-comments';\nimport * as postCommentsCount from './post-comments-count';\nimport * as postCommentsForm from './post-comments-form';\nimport * as postCommentsLink from './post-comments-link';\nimport * as postContent from './post-content';\nimport * as postDate from './post-date';\nimport * as postExcerpt from './post-excerpt';\nimport * as postFeaturedImage from './post-featured-image';\nimport * as postNavigationLink from './post-navigation-link';\nimport * as postTemplate from './post-template';\nimport * as postTerms from './post-terms';\nimport * as postTitle from './post-title';\nimport * as preformatted from './preformatted';\nimport * as pullquote from './pullquote';\nimport * as query from './query';\nimport * as queryNoResults from './query-no-results';\nimport * as queryPagination from './query-pagination';\nimport * as queryPaginationNext from './query-pagination-next';\nimport * as queryPaginationNumbers from './query-pagination-numbers';\nimport * as queryPaginationPrevious from './query-pagination-previous';\nimport * as queryTitle from './query-title';\nimport * as quote from './quote';\nimport * as reusableBlock from './block';\nimport * as readMore from './read-more';\nimport * as rss from './rss';\nimport * as search from './search';\nimport * as separator from './separator';\nimport * as shortcode from './shortcode';\nimport * as siteLogo from './site-logo';\nimport * as siteTagline from './site-tagline';\nimport * as siteTitle from './site-title';\nimport * as socialLink from './social-link';\nimport * as socialLinks from './social-links';\nimport * as spacer from './spacer';\nimport * as table from './table';\nimport * as tagCloud from './tag-cloud';\nimport * as templatePart from './template-part';\nimport * as termDescription from './term-description';\nimport * as textColumns from './text-columns';\nimport * as verse from './verse';\nimport * as video from './video';\n\n/**\n * Function to register an individual block.\n *\n * @param {Object} block The block to be registered.\n *\n */\nconst registerBlock = ( block ) => {\n\tif ( ! block ) {\n\t\treturn;\n\t}\n\tconst { metadata, settings, name } = block;\n\tregisterBlockType( { name, ...metadata }, settings );\n};\n\n/**\n * Function to get all the core blocks in an array.\n *\n * @example\n * ```js\n * import { __experimentalGetCoreBlocks } from '@wordpress/block-library';\n *\n * const coreBlocks = __experimentalGetCoreBlocks();\n * ```\n */\nexport const __experimentalGetCoreBlocks = () => [\n\t// Common blocks are grouped at the top to prioritize their display\n\t// in various contexts — like the inserter and auto-complete components.\n\tparagraph,\n\timage,\n\theading,\n\tgallery,\n\tlist,\n\tlistItem,\n\tquote,\n\n\t// Register all remaining core blocks.\n\tarchives,\n\taudio,\n\tbutton,\n\tbuttons,\n\tcalendar,\n\tcategories,\n\twindow.wp && window.wp.oldEditor ? classic : null, // Only add the classic block in WP Context.\n\tcode,\n\tcolumn,\n\tcolumns,\n\tcover,\n\tembed,\n\tfile,\n\tgroup,\n\thtml,\n\tlatestComments,\n\tlatestPosts,\n\tmediaText,\n\tmissing,\n\tmore,\n\tnextpage,\n\tpageList,\n\tpattern,\n\tpreformatted,\n\tpullquote,\n\treusableBlock,\n\trss,\n\tsearch,\n\tseparator,\n\tshortcode,\n\tsocialLink,\n\tsocialLinks,\n\tspacer,\n\ttable,\n\t// tableOfContents,\n\ttagCloud,\n\ttextColumns,\n\tverse,\n\tvideo,\n\n\t// theme blocks\n\tnavigation,\n\tnavigationLink,\n\tnavigationSubmenu,\n\tsiteLogo,\n\tsiteTitle,\n\tsiteTagline,\n\tquery,\n\ttemplatePart,\n\tavatar,\n\tpostTitle,\n\tpostExcerpt,\n\tpostFeaturedImage,\n\tpostContent,\n\tpostAuthor,\n\tpostDate,\n\tpostTerms,\n\tpostNavigationLink,\n\tpostTemplate,\n\tqueryPagination,\n\tqueryPaginationNext,\n\tqueryPaginationNumbers,\n\tqueryPaginationPrevious,\n\tqueryNoResults,\n\treadMore,\n\tcommentAuthorName,\n\tcommentContent,\n\tcommentDate,\n\tcommentEditLink,\n\tcommentReplyLink,\n\tcommentTemplate,\n\tcommentsQueryLoop,\n\tcommentsPagination,\n\tcommentsPaginationNext,\n\tcommentsPaginationNumbers,\n\tcommentsPaginationPrevious,\n\tpostComments,\n\thomeLink,\n\tlogInOut,\n\ttermDescription,\n\tqueryTitle,\n\tpostAuthorBiography,\n];\n\n/**\n * Function to register core blocks provided by the block editor.\n *\n * @param {Array} blocks An optional array of the core blocks being registered.\n *\n * @example\n * ```js\n * import { registerCoreBlocks } from '@wordpress/block-library';\n *\n * registerCoreBlocks();\n * ```\n */\nexport const registerCoreBlocks = (\n\tblocks = __experimentalGetCoreBlocks()\n) => {\n\tblocks.forEach( registerBlock );\n\n\tsetDefaultBlockName( paragraph.name );\n\tif ( window.wp && window.wp.oldEditor ) {\n\t\tsetFreeformContentHandlerName( classic.name );\n\t}\n\tsetUnregisteredTypeHandlerName( missing.name );\n\tsetGroupingBlockName( group.name );\n};\n\n/**\n * Function to register experimental core blocks depending on editor settings.\n *\n * @param {boolean} enableFSEBlocks Whether to enable the full site editing blocks.\n * @example\n * ```js\n * import { __experimentalRegisterExperimentalCoreBlocks } from '@wordpress/block-library';\n *\n * __experimentalRegisterExperimentalCoreBlocks( settings );\n * ```\n */\nexport const __experimentalRegisterExperimentalCoreBlocks = process.env\n\t.IS_GUTENBERG_PLUGIN\n\t? ( { enableFSEBlocks } = {} ) => {\n\t\t\t[\n\t\t\t\t// Experimental blocks.\n\t\t\t\tpostAuthorName,\n\t\t\t\t// Full Site Editing blocks.\n\t\t\t\t...( enableFSEBlocks\n\t\t\t\t\t? [\n\t\t\t\t\t\t\tcommentAuthorAvatar,\n\t\t\t\t\t\t\tnavigationArea,\n\t\t\t\t\t\t\tpostComment,\n\t\t\t\t\t\t\tpostCommentsCount,\n\t\t\t\t\t\t\tpostCommentsForm,\n\t\t\t\t\t\t\tpostCommentsLink,\n\t\t\t\t\t ]\n\t\t\t\t\t: [] ),\n\t\t\t].forEach( registerBlock );\n\t }\n\t: undefined;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/index.js"],"names":["registerBlockType","setDefaultBlockName","setFreeformContentHandlerName","setUnregisteredTypeHandlerName","setGroupingBlockName","archives","avatar","audio","button","buttons","calendar","categories","classic","code","column","columns","commentAuthorAvatar","commentAuthorName","commentContent","commentDate","commentEditLink","commentReplyLink","commentTemplate","commentsPaginationPrevious","commentsQueryLoop","commentsPagination","commentsPaginationNext","commentsPaginationNumbers","commentsTitle","cover","embed","file","gallery","group","heading","homeLink","html","image","latestComments","latestPosts","list","listItem","logInOut","mediaText","missing","more","navigation","navigationArea","navigationLink","navigationSubmenu","nextpage","pattern","pageList","paragraph","postAuthor","postAuthorName","postAuthorBiography","postComment","postComments","postCommentsCount","postCommentsForm","postCommentsLink","postContent","postDate","postExcerpt","postFeaturedImage","postNavigationLink","postTemplate","postTerms","postTitle","preformatted","pullquote","query","queryNoResults","queryPagination","queryPaginationNext","queryPaginationNumbers","queryPaginationPrevious","queryTitle","quote","reusableBlock","readMore","rss","search","separator","shortcode","siteLogo","siteTagline","siteTitle","socialLink","socialLinks","spacer","table","tagCloud","templatePart","termDescription","textColumns","verse","video","registerBlock","block","metadata","settings","name","__experimentalGetCoreBlocks","window","wp","oldEditor","registerCoreBlocks","blocks","forEach","__experimentalRegisterExperimentalCoreBlocks","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","__experimentalEnableListBlockV2","undefined"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,iBADD,EAECC,mBAFD,EAGCC,6BAHD,EAICC,8BAJD,EAKCC,oBALD,QAMO,mBANP;AAQA;AACA;AACA;;AACA,OAAO,KAAKC,QAAZ,MAA0B,YAA1B;AACA,OAAO,KAAKC,MAAZ,MAAwB,UAAxB;AACA,OAAO,KAAKC,KAAZ,MAAuB,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BAA8B,CAAEyC,OAAO,CAAC2D,IAAV,CAA9B;AACAnG,EAAAA,oBAAoB,CAAE6B,KAAK,CAACsE,IAAR,CAApB;AACA,CAXM;AAaP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMQ,4CAA4C,GAAGC,OAAO,CAACC,GAAR,CAC1DC,mBAD0D,GAEzD,YAAgC;AAAA,MAA9B;AAAEC,IAAAA;AAAF,GAA8B,uEAAR,EAAQ;AAChC,GACC;AACA5D,EAAAA,cAFD,EAGC,IAAKkD,MAAM,CAACW,+BAAP,GACF,CAAE3E,QAAF,CADE,GAEF,EAFH,CAHD,EAOC;AACA,MAAK0E,eAAe,GACjB,CACAnG,mBADA,EAEA+B,cAFA,EAGAU,WAHA,EAIAE,iBAJA,EAKAE,gBALA,CADiB,GAQjB,EARH,CARD,EAiBEiD,OAjBF,CAiBWX,aAjBX;AAkBC,CArBwD,GAsBzDkB,SAtBI","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tregisterBlockType,\n\tsetDefaultBlockName,\n\tsetFreeformContentHandlerName,\n\tsetUnregisteredTypeHandlerName,\n\tsetGroupingBlockName,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport * as archives from './archives';\nimport * as avatar from './avatar';\nimport * as audio from './audio';\nimport * as button from './button';\nimport * as buttons from './buttons';\nimport * as calendar from './calendar';\nimport * as categories from './categories';\nimport * as classic from './freeform';\nimport * as code from './code';\nimport * as column from './column';\nimport * as columns from './columns';\nimport * as commentAuthorAvatar from './comment-author-avatar';\nimport * as commentAuthorName from './comment-author-name';\nimport * as commentContent from './comment-content';\nimport * as commentDate from './comment-date';\nimport * as commentEditLink from './comment-edit-link';\nimport * as commentReplyLink from './comment-reply-link';\nimport * as commentTemplate from './comment-template';\nimport * as commentsPaginationPrevious from './comments-pagination-previous';\nimport * as commentsQueryLoop from './comments-query-loop';\nimport * as commentsPagination from './comments-pagination';\nimport * as commentsPaginationNext from './comments-pagination-next';\nimport * as commentsPaginationNumbers from './comments-pagination-numbers';\nimport * as commentsTitle from './comments-title';\nimport * as cover from './cover';\nimport * as embed from './embed';\nimport * as file from './file';\nimport * as gallery from './gallery';\nimport * as group from './group';\nimport * as heading from './heading';\nimport * as homeLink from './home-link';\nimport * as html from './html';\nimport * as image from './image';\nimport * as latestComments from './latest-comments';\nimport * as latestPosts from './latest-posts';\nimport * as list from './list';\nimport * as listItem from './list-item';\nimport * as logInOut from './loginout';\nimport * as mediaText from './media-text';\nimport * as missing from './missing';\nimport * as more from './more';\nimport * as navigation from './navigation';\nimport * as navigationArea from './navigation-area';\nimport * as navigationLink from './navigation-link';\nimport * as navigationSubmenu from './navigation-submenu';\nimport * as nextpage from './nextpage';\nimport * as pattern from './pattern';\nimport * as pageList from './page-list';\nimport * as paragraph from './paragraph';\nimport * as postAuthor from './post-author';\nimport * as postAuthorName from './post-author-name';\nimport * as postAuthorBiography from './post-author-biography';\nimport * as postComment from './post-comment';\nimport * as postComments from './post-comments';\nimport * as postCommentsCount from './post-comments-count';\nimport * as postCommentsForm from './post-comments-form';\nimport * as postCommentsLink from './post-comments-link';\nimport * as postContent from './post-content';\nimport * as postDate from './post-date';\nimport * as postExcerpt from './post-excerpt';\nimport * as postFeaturedImage from './post-featured-image';\nimport * as postNavigationLink from './post-navigation-link';\nimport * as postTemplate from './post-template';\nimport * as postTerms from './post-terms';\nimport * as postTitle from './post-title';\nimport * as preformatted from './preformatted';\nimport * as pullquote from './pullquote';\nimport * as query from './query';\nimport * as queryNoResults from './query-no-results';\nimport * as queryPagination from './query-pagination';\nimport * as queryPaginationNext from './query-pagination-next';\nimport * as queryPaginationNumbers from './query-pagination-numbers';\nimport * as queryPaginationPrevious from './query-pagination-previous';\nimport * as queryTitle from './query-title';\nimport * as quote from './quote';\nimport * as reusableBlock from './block';\nimport * as readMore from './read-more';\nimport * as rss from './rss';\nimport * as search from './search';\nimport * as separator from './separator';\nimport * as shortcode from './shortcode';\nimport * as siteLogo from './site-logo';\nimport * as siteTagline from './site-tagline';\nimport * as siteTitle from './site-title';\nimport * as socialLink from './social-link';\nimport * as socialLinks from './social-links';\nimport * as spacer from './spacer';\nimport * as table from './table';\nimport * as tagCloud from './tag-cloud';\nimport * as templatePart from './template-part';\nimport * as termDescription from './term-description';\nimport * as textColumns from './text-columns';\nimport * as verse from './verse';\nimport * as video from './video';\n\n/**\n * Function to register an individual block.\n *\n * @param {Object} block The block to be registered.\n *\n */\nconst registerBlock = ( block ) => {\n\tif ( ! block ) {\n\t\treturn;\n\t}\n\tconst { metadata, settings, name } = block;\n\tregisterBlockType( { name, ...metadata }, settings );\n};\n\n/**\n * Function to get all the core blocks in an array.\n *\n * @example\n * ```js\n * import { __experimentalGetCoreBlocks } from '@wordpress/block-library';\n *\n * const coreBlocks = __experimentalGetCoreBlocks();\n * ```\n */\nexport const __experimentalGetCoreBlocks = () => [\n\t// Common blocks are grouped at the top to prioritize their display\n\t// in various contexts — like the inserter and auto-complete components.\n\tparagraph,\n\timage,\n\theading,\n\tgallery,\n\tlist,\n\tquote,\n\n\t// Register all remaining core blocks.\n\tarchives,\n\taudio,\n\tbutton,\n\tbuttons,\n\tcalendar,\n\tcategories,\n\twindow.wp && window.wp.oldEditor ? classic : null, // Only add the classic block in WP Context.\n\tcode,\n\tcolumn,\n\tcolumns,\n\tcover,\n\tembed,\n\tfile,\n\tgroup,\n\thtml,\n\tlatestComments,\n\tlatestPosts,\n\tmediaText,\n\tmissing,\n\tmore,\n\tnextpage,\n\tpageList,\n\tpattern,\n\tpreformatted,\n\tpullquote,\n\treusableBlock,\n\trss,\n\tsearch,\n\tseparator,\n\tshortcode,\n\tsocialLink,\n\tsocialLinks,\n\tspacer,\n\ttable,\n\t// tableOfContents,\n\ttagCloud,\n\ttextColumns,\n\tverse,\n\tvideo,\n\n\t// theme blocks\n\tnavigation,\n\tnavigationLink,\n\tnavigationSubmenu,\n\tsiteLogo,\n\tsiteTitle,\n\tsiteTagline,\n\tquery,\n\ttemplatePart,\n\tavatar,\n\tpostTitle,\n\tpostExcerpt,\n\tpostFeaturedImage,\n\tpostContent,\n\tpostAuthor,\n\tpostDate,\n\tpostTerms,\n\tpostNavigationLink,\n\tpostTemplate,\n\tqueryPagination,\n\tqueryPaginationNext,\n\tqueryPaginationNumbers,\n\tqueryPaginationPrevious,\n\tqueryNoResults,\n\treadMore,\n\tcommentAuthorName,\n\tcommentContent,\n\tcommentDate,\n\tcommentEditLink,\n\tcommentReplyLink,\n\tcommentTemplate,\n\tcommentsTitle,\n\tcommentsQueryLoop,\n\tcommentsPagination,\n\tcommentsPaginationNext,\n\tcommentsPaginationNumbers,\n\tcommentsPaginationPrevious,\n\n\tpostComments,\n\tpostCommentsForm,\n\thomeLink,\n\tlogInOut,\n\ttermDescription,\n\tqueryTitle,\n\tpostAuthorBiography,\n];\n\n/**\n * Function to register core blocks provided by the block editor.\n *\n * @param {Array} blocks An optional array of the core blocks being registered.\n *\n * @example\n * ```js\n * import { registerCoreBlocks } from '@wordpress/block-library';\n *\n * registerCoreBlocks();\n * ```\n */\nexport const registerCoreBlocks = (\n\tblocks = __experimentalGetCoreBlocks()\n) => {\n\tblocks.forEach( registerBlock );\n\n\tsetDefaultBlockName( paragraph.name );\n\tif ( window.wp && window.wp.oldEditor ) {\n\t\tsetFreeformContentHandlerName( classic.name );\n\t}\n\tsetUnregisteredTypeHandlerName( missing.name );\n\tsetGroupingBlockName( group.name );\n};\n\n/**\n * Function to register experimental core blocks depending on editor settings.\n *\n * @param {boolean} enableFSEBlocks Whether to enable the full site editing blocks.\n * @example\n * ```js\n * import { __experimentalRegisterExperimentalCoreBlocks } from '@wordpress/block-library';\n *\n * __experimentalRegisterExperimentalCoreBlocks( settings );\n * ```\n */\nexport const __experimentalRegisterExperimentalCoreBlocks = process.env\n\t.IS_GUTENBERG_PLUGIN\n\t? ( { enableFSEBlocks } = {} ) => {\n\t\t\t[\n\t\t\t\t// Experimental blocks.\n\t\t\t\tpostAuthorName,\n\t\t\t\t...( window.__experimentalEnableListBlockV2\n\t\t\t\t\t? [ listItem ]\n\t\t\t\t\t: [] ),\n\n\t\t\t\t// Full Site Editing blocks.\n\t\t\t\t...( enableFSEBlocks\n\t\t\t\t\t? [\n\t\t\t\t\t\t\tcommentAuthorAvatar,\n\t\t\t\t\t\t\tnavigationArea,\n\t\t\t\t\t\t\tpostComment,\n\t\t\t\t\t\t\tpostCommentsCount,\n\t\t\t\t\t\t\tpostCommentsLink,\n\t\t\t\t\t ]\n\t\t\t\t\t: [] ),\n\t\t\t].forEach( registerBlock );\n\t }\n\t: undefined;\n"]}
@@ -1,5 +1,3 @@
1
- var _window;
2
-
3
1
  /**
4
2
  * WordPress dependencies
5
3
  */
@@ -111,5 +109,13 @@ const settingsV1 = {
111
109
  save,
112
110
  deprecated
113
111
  };
114
- export const settings = (_window = window) !== null && _window !== void 0 && _window.__experimentalEnableListBlockV2 ? settingsV2 : settingsV1;
112
+ let settings = settingsV1;
113
+
114
+ if (process.env.IS_GUTENBERG_PLUGIN) {
115
+ var _window;
116
+
117
+ settings = (_window = window) !== null && _window !== void 0 && _window.__experimentalEnableListBlockV2 ? settingsV2 : settingsV1;
118
+ }
119
+
120
+ export { settings };
115
121
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/list/index.js"],"names":["list","icon","deprecated","edit","save","transforms","settingsV2","name","metadata","settingsV1","example","attributes","values","merge","attributesToMerge","settings","window","__experimentalEnableListBlockV2"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAI,IAAIC,IAAjB,QAA6B,kBAA7B;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,IAAP,MAAiB,QAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,UAAP,MAAuB,MAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AAEA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,MAAME,UAAU,GAAG;AAClBR,EAAAA,IADkB;AAElBS,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACXC,MAAAA,MAAM,EACL;AAFU;AADJ,GAFS;AAQlBP,EAAAA,UARkB;;AASlBQ,EAAAA,KAAK,CAAEF,UAAF,EAAcG,iBAAd,EAAkC;AACtC,UAAM;AAAEF,MAAAA;AAAF,QAAaE,iBAAnB;;AAEA,QAAK,CAAEF,MAAF,IAAYA,MAAM,KAAK,WAA5B,EAA0C;AACzC,aAAOD,UAAP;AACA;;AAED,WAAO,EACN,GAAGA,UADG;AAENC,MAAAA,MAAM,EAAED,UAAU,CAACC,MAAX,GAAoBA;AAFtB,KAAP;AAIA,GApBiB;;AAqBlBT,EAAAA,IArBkB;AAsBlBC,EAAAA,IAtBkB;AAuBlBF,EAAAA;AAvBkB,CAAnB;AA0BA,OAAO,MAAMa,QAAQ,GAAG,WAAAC,MAAM,UAAN,kCAAQC,+BAAR,GACrBX,UADqB,GAErBG,UAFI","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { list as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport settingsV2 from './v2';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nconst settingsV1 = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tvalues:\n\t\t\t\t'<li>Alice.</li><li>The White Rabbit.</li><li>The Cheshire Cat.</li><li>The Mad Hatter.</li><li>The Queen of Hearts.</li>',\n\t\t},\n\t},\n\ttransforms,\n\tmerge( attributes, attributesToMerge ) {\n\t\tconst { values } = attributesToMerge;\n\n\t\tif ( ! values || values === '<li></li>' ) {\n\t\t\treturn attributes;\n\t\t}\n\n\t\treturn {\n\t\t\t...attributes,\n\t\t\tvalues: attributes.values + values,\n\t\t};\n\t},\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const settings = window?.__experimentalEnableListBlockV2\n\t? settingsV2\n\t: settingsV1;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/list/index.js"],"names":["list","icon","deprecated","edit","save","transforms","settingsV2","name","metadata","settingsV1","example","attributes","values","merge","attributesToMerge","settings","process","env","IS_GUTENBERG_PLUGIN","window","__experimentalEnableListBlockV2"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,IAAIC,IAAjB,QAA6B,kBAA7B;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,IAAP,MAAiB,QAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,UAAP,MAAuB,MAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AAEA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,MAAME,UAAU,GAAG;AAClBR,EAAAA,IADkB;AAElBS,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACXC,MAAAA,MAAM,EACL;AAFU;AADJ,GAFS;AAQlBP,EAAAA,UARkB;;AASlBQ,EAAAA,KAAK,CAAEF,UAAF,EAAcG,iBAAd,EAAkC;AACtC,UAAM;AAAEF,MAAAA;AAAF,QAAaE,iBAAnB;;AAEA,QAAK,CAAEF,MAAF,IAAYA,MAAM,KAAK,WAA5B,EAA0C;AACzC,aAAOD,UAAP;AACA;;AAED,WAAO,EACN,GAAGA,UADG;AAENC,MAAAA,MAAM,EAAED,UAAU,CAACC,MAAX,GAAoBA;AAFtB,KAAP;AAIA,GApBiB;;AAqBlBT,EAAAA,IArBkB;AAsBlBC,EAAAA,IAtBkB;AAuBlBF,EAAAA;AAvBkB,CAAnB;AA0BA,IAAIa,QAAQ,GAAGN,UAAf;;AACA,IAAKO,OAAO,CAACC,GAAR,CAAYC,mBAAjB,EAAuC;AAAA;;AACtCH,EAAAA,QAAQ,GAAG,WAAAI,MAAM,UAAN,kCAAQC,+BAAR,GACRd,UADQ,GAERG,UAFH;AAGA;;AACD,SAASM,QAAT","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { list as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport settingsV2 from './v2';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nconst settingsV1 = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tvalues:\n\t\t\t\t'<li>Alice.</li><li>The White Rabbit.</li><li>The Cheshire Cat.</li><li>The Mad Hatter.</li><li>The Queen of Hearts.</li>',\n\t\t},\n\t},\n\ttransforms,\n\tmerge( attributes, attributesToMerge ) {\n\t\tconst { values } = attributesToMerge;\n\n\t\tif ( ! values || values === '<li></li>' ) {\n\t\t\treturn attributes;\n\t\t}\n\n\t\treturn {\n\t\t\t...attributes,\n\t\t\tvalues: attributes.values + values,\n\t\t};\n\t},\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nlet settings = settingsV1;\nif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\tsettings = window?.__experimentalEnableListBlockV2\n\t\t? settingsV2\n\t\t: settingsV1;\n}\nexport { settings };\n"]}
@@ -348,6 +348,8 @@ function Navigation(_ref) {
348
348
  }
349
349
  }
350
350
  }, [isSelected, isInnerBlockSelected, canUserUpdateNavigationMenu, hasResolvedCanUserUpdateNavigationMenu, canUserCreateNavigationMenu, hasResolvedCanUserCreateNavigationMenu, ref]);
351
+ const navigationSelectorRef = useRef();
352
+ const [shouldFocusNavigationSelector, setShouldFocusNavigationSelector] = useState(false);
351
353
  const handleSelectNavigation = useCallback(navPostOrClassicMenu => {
352
354
  if (!navPostOrClassicMenu) {
353
355
  return;
@@ -360,7 +362,20 @@ function Navigation(_ref) {
360
362
  } else {
361
363
  handleUpdateMenu(navPostOrClassicMenu.id);
362
364
  }
363
- }, [convert, handleUpdateMenu]);
365
+
366
+ setShouldFocusNavigationSelector(true);
367
+ }, [convert, handleUpdateMenu]); // Focus support after menu selection.
368
+
369
+ useEffect(() => {
370
+ var _navigationSelectorRe;
371
+
372
+ if (isDraftNavigationMenu || !isEntityAvailable || !shouldFocusNavigationSelector) {
373
+ return;
374
+ }
375
+
376
+ navigationSelectorRef === null || navigationSelectorRef === void 0 ? void 0 : (_navigationSelectorRe = navigationSelectorRef.current) === null || _navigationSelectorRe === void 0 ? void 0 : _navigationSelectorRe.focus();
377
+ setShouldFocusNavigationSelector(false);
378
+ }, [isDraftNavigationMenu, isEntityAvailable, shouldFocusNavigationSelector]);
364
379
  const resetToEmptyBlock = useCallback(() => {
365
380
  registry.batch(() => {
366
381
  if (navigationArea) {
@@ -448,6 +463,7 @@ function Navigation(_ref) {
448
463
  }, createElement(RecursionProvider, null, createElement(BlockControls, null, !isDraftNavigationMenu && isEntityAvailable && createElement(ToolbarGroup, {
449
464
  className: "wp-block-navigation__toolbar-menu-selector"
450
465
  }, createElement(NavigationMenuSelector, {
466
+ ref: navigationSelectorRef,
451
467
  currentMenuId: ref,
452
468
  clientId: clientId,
453
469
  onSelect: handleSelectNavigation,