@wordpress/block-library 6.0.25 → 6.1.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 (1031) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +1 -1
  3. package/build/archives/index.js +1 -0
  4. package/build/archives/index.js.map +1 -1
  5. package/build/audio/edit.js +19 -4
  6. package/build/audio/edit.js.map +1 -1
  7. package/build/audio/index.js +1 -0
  8. package/build/audio/index.js.map +1 -1
  9. package/build/block/index.js +1 -0
  10. package/build/block/index.js.map +1 -1
  11. package/build/button/edit.native.js +1 -1
  12. package/build/button/edit.native.js.map +1 -1
  13. package/build/button/index.js +5 -1
  14. package/build/button/index.js.map +1 -1
  15. package/build/buttons/edit.js +6 -0
  16. package/build/buttons/edit.js.map +1 -1
  17. package/build/buttons/edit.native.js +16 -6
  18. package/build/buttons/edit.native.js.map +1 -1
  19. package/build/buttons/index.js +1 -0
  20. package/build/buttons/index.js.map +1 -1
  21. package/build/buttons/transforms.js +1 -0
  22. package/build/buttons/transforms.js.map +1 -1
  23. package/build/calendar/index.js +1 -0
  24. package/build/calendar/index.js.map +1 -1
  25. package/build/categories/index.js +1 -0
  26. package/build/categories/index.js.map +1 -1
  27. package/build/code/index.js +6 -1
  28. package/build/code/index.js.map +1 -1
  29. package/build/column/index.js +1 -0
  30. package/build/column/index.js.map +1 -1
  31. package/build/columns/index.js +11 -0
  32. package/build/columns/index.js.map +1 -1
  33. package/build/comment-author-avatar/edit.js +5 -2
  34. package/build/comment-author-avatar/edit.js.map +1 -1
  35. package/build/comment-author-avatar/index.js +7 -2
  36. package/build/comment-author-avatar/index.js.map +1 -1
  37. package/build/comment-author-name/index.js +1 -0
  38. package/build/comment-author-name/index.js.map +1 -1
  39. package/build/comment-content/index.js +1 -0
  40. package/build/comment-content/index.js.map +1 -1
  41. package/build/comment-date/index.js +1 -0
  42. package/build/comment-date/index.js.map +1 -1
  43. package/build/comment-edit-link/index.js +2 -1
  44. package/build/comment-edit-link/index.js.map +1 -1
  45. package/build/comment-reply-link/index.js +1 -0
  46. package/build/comment-reply-link/index.js.map +1 -1
  47. package/build/comment-template/edit.js +117 -26
  48. package/build/comment-template/edit.js.map +1 -1
  49. package/build/comment-template/index.js +4 -2
  50. package/build/comment-template/index.js.map +1 -1
  51. package/build/comment-template/util.js +68 -0
  52. package/build/comment-template/util.js.map +1 -0
  53. package/build/comments-pagination/comments-pagination-arrow-controls.js +39 -0
  54. package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -0
  55. package/build/comments-pagination/edit.js +79 -0
  56. package/build/comments-pagination/edit.js.map +1 -0
  57. package/build/comments-pagination/index.js +71 -0
  58. package/build/comments-pagination/index.js.map +1 -0
  59. package/build/comments-pagination/save.js +18 -0
  60. package/build/comments-pagination/save.js.map +1 -0
  61. package/build/comments-pagination-next/edit.js +54 -0
  62. package/build/comments-pagination-next/edit.js.map +1 -0
  63. package/build/comments-pagination-next/index.js +66 -0
  64. package/build/comments-pagination-next/index.js.map +1 -0
  65. package/build/comments-pagination-numbers/edit.js +47 -0
  66. package/build/comments-pagination-numbers/edit.js.map +1 -0
  67. package/build/comments-pagination-numbers/index.js +46 -0
  68. package/build/comments-pagination-numbers/index.js.map +1 -0
  69. package/build/comments-pagination-previous/edit.js +54 -0
  70. package/build/comments-pagination-previous/edit.js.map +1 -0
  71. package/build/comments-pagination-previous/index.js +66 -0
  72. package/build/comments-pagination-previous/index.js.map +1 -0
  73. package/build/comments-query-loop/edit/comments-inspector-controls.js +102 -0
  74. package/build/comments-query-loop/edit/comments-inspector-controls.js.map +1 -0
  75. package/build/comments-query-loop/edit.js +23 -28
  76. package/build/comments-query-loop/edit.js.map +1 -1
  77. package/build/comments-query-loop/index.js +15 -7
  78. package/build/comments-query-loop/index.js.map +1 -1
  79. package/build/cover/edit.js +2 -1
  80. package/build/cover/edit.js.map +1 -1
  81. package/build/cover/edit.native.js +40 -32
  82. package/build/cover/edit.native.js.map +1 -1
  83. package/build/cover/index.js +1 -0
  84. package/build/cover/index.js.map +1 -1
  85. package/build/cover/overlay-color-settings.native.js +11 -1
  86. package/build/cover/overlay-color-settings.native.js.map +1 -1
  87. package/build/embed/deprecated.js +1 -0
  88. package/build/embed/deprecated.js.map +1 -1
  89. package/build/embed/edit.native.js +23 -20
  90. package/build/embed/edit.native.js.map +1 -1
  91. package/build/embed/embed-controls.native.js +69 -0
  92. package/build/embed/embed-controls.native.js.map +1 -0
  93. package/build/embed/embed-link-settings.native.js +101 -0
  94. package/build/embed/embed-link-settings.native.js.map +1 -0
  95. package/build/embed/embed-loading.js +1 -3
  96. package/build/embed/embed-loading.js.map +1 -1
  97. package/build/embed/embed-placeholder.native.js +9 -2
  98. package/build/embed/embed-placeholder.native.js.map +1 -1
  99. package/build/embed/index.js +1 -0
  100. package/build/embed/index.js.map +1 -1
  101. package/build/embed/transforms.js +1 -0
  102. package/build/embed/transforms.js.map +1 -1
  103. package/build/embed/util.js +1 -0
  104. package/build/embed/util.js.map +1 -1
  105. package/build/file/edit.native.js +5 -2
  106. package/build/file/edit.native.js.map +1 -1
  107. package/build/file/index.js +1 -0
  108. package/build/file/index.js.map +1 -1
  109. package/build/freeform/index.js +1 -0
  110. package/build/freeform/index.js.map +1 -1
  111. package/build/gallery/deprecated.js +4 -0
  112. package/build/gallery/deprecated.js.map +1 -1
  113. package/build/gallery/edit.js +31 -12
  114. package/build/gallery/edit.js.map +1 -1
  115. package/build/gallery/gallery.native.js +1 -1
  116. package/build/gallery/gallery.native.js.map +1 -1
  117. package/build/gallery/index.js +1 -0
  118. package/build/gallery/index.js.map +1 -1
  119. package/build/group/index.js +19 -1
  120. package/build/group/index.js.map +1 -1
  121. package/build/heading/edit.js +2 -0
  122. package/build/heading/edit.js.map +1 -1
  123. package/build/heading/index.js +1 -0
  124. package/build/heading/index.js.map +1 -1
  125. package/build/heading/transforms.js +1 -0
  126. package/build/heading/transforms.js.map +1 -1
  127. package/build/home-link/index.js +1 -0
  128. package/build/home-link/index.js.map +1 -1
  129. package/build/html/index.js +1 -0
  130. package/build/html/index.js.map +1 -1
  131. package/build/image/edit.js +56 -5
  132. package/build/image/edit.js.map +1 -1
  133. package/build/image/edit.native.js +4 -4
  134. package/build/image/edit.native.js.map +1 -1
  135. package/build/image/image.js +15 -4
  136. package/build/image/image.js.map +1 -1
  137. package/build/image/index.js +5 -1
  138. package/build/image/index.js.map +1 -1
  139. package/build/index.js +12 -2
  140. package/build/index.js.map +1 -1
  141. package/build/latest-comments/index.js +1 -0
  142. package/build/latest-comments/index.js.map +1 -1
  143. package/build/latest-posts/deprecated.js +1 -0
  144. package/build/latest-posts/deprecated.js.map +1 -1
  145. package/build/latest-posts/edit.js +1 -1
  146. package/build/latest-posts/edit.js.map +1 -1
  147. package/build/latest-posts/index.js +1 -0
  148. package/build/latest-posts/index.js.map +1 -1
  149. package/build/list/index.js +1 -0
  150. package/build/list/index.js.map +1 -1
  151. package/build/loginout/index.js +1 -0
  152. package/build/loginout/index.js.map +1 -1
  153. package/build/media-text/index.js +1 -0
  154. package/build/media-text/index.js.map +1 -1
  155. package/build/missing/index.js +1 -0
  156. package/build/missing/index.js.map +1 -1
  157. package/build/more/index.js +1 -0
  158. package/build/more/index.js.map +1 -1
  159. package/build/navigation/edit/index.js +37 -9
  160. package/build/navigation/edit/index.js.map +1 -1
  161. package/build/navigation/edit/inner-blocks.js +3 -1
  162. package/build/navigation/edit/inner-blocks.js.map +1 -1
  163. package/build/navigation/edit/overlay-menu-icon.js +36 -0
  164. package/build/navigation/edit/overlay-menu-icon.js.map +1 -0
  165. package/build/navigation/edit/placeholder/index.js +11 -7
  166. package/build/navigation/edit/placeholder/index.js.map +1 -1
  167. package/build/navigation/edit/responsive-wrapper.js +11 -22
  168. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  169. package/build/navigation/index.js +10 -1
  170. package/build/navigation/index.js.map +1 -1
  171. package/build/navigation/menu-items-to-blocks.js +4 -1
  172. package/build/navigation/menu-items-to-blocks.js.map +1 -1
  173. package/build/navigation/use-navigation-entities.js +6 -3
  174. package/build/navigation/use-navigation-entities.js.map +1 -1
  175. package/build/navigation-area/edit.js +2 -1
  176. package/build/navigation-area/edit.js.map +1 -1
  177. package/build/navigation-area/index.js +2 -1
  178. package/build/navigation-area/index.js.map +1 -1
  179. package/build/navigation-link/edit.js +7 -0
  180. package/build/navigation-link/edit.js.map +1 -1
  181. package/build/navigation-link/index.js +1 -0
  182. package/build/navigation-link/index.js.map +1 -1
  183. package/build/navigation-submenu/edit.js +4 -1
  184. package/build/navigation-submenu/edit.js.map +1 -1
  185. package/build/navigation-submenu/index.js +1 -0
  186. package/build/navigation-submenu/index.js.map +1 -1
  187. package/build/nextpage/index.js +1 -0
  188. package/build/nextpage/index.js.map +1 -1
  189. package/build/page-list/edit.js +37 -10
  190. package/build/page-list/edit.js.map +1 -1
  191. package/build/page-list/index.js +6 -1
  192. package/build/page-list/index.js.map +1 -1
  193. package/build/paragraph/edit.js +12 -2
  194. package/build/paragraph/edit.js.map +1 -1
  195. package/build/paragraph/index.js +2 -1
  196. package/build/paragraph/index.js.map +1 -1
  197. package/build/paragraph/transforms.js +2 -1
  198. package/build/paragraph/transforms.js.map +1 -1
  199. package/build/pattern/index.js +1 -0
  200. package/build/pattern/index.js.map +1 -1
  201. package/build/post-author/index.js +2 -1
  202. package/build/post-author/index.js.map +1 -1
  203. package/build/post-author-name/edit.js +98 -0
  204. package/build/post-author-name/edit.js.map +1 -0
  205. package/build/post-author-name/index.js +70 -0
  206. package/build/post-author-name/index.js.map +1 -0
  207. package/build/post-comment/index.js +1 -0
  208. package/build/post-comment/index.js.map +1 -1
  209. package/build/post-comments/index.js +1 -0
  210. package/build/post-comments/index.js.map +1 -1
  211. package/build/post-comments-count/index.js +1 -0
  212. package/build/post-comments-count/index.js.map +1 -1
  213. package/build/post-comments-form/index.js +1 -0
  214. package/build/post-comments-form/index.js.map +1 -1
  215. package/build/post-comments-link/index.js +1 -0
  216. package/build/post-comments-link/index.js.map +1 -1
  217. package/build/post-content/index.js +1 -0
  218. package/build/post-content/index.js.map +1 -1
  219. package/build/post-date/index.js +1 -0
  220. package/build/post-date/index.js.map +1 -1
  221. package/build/post-excerpt/edit.js +2 -1
  222. package/build/post-excerpt/edit.js.map +1 -1
  223. package/build/post-excerpt/index.js +4 -0
  224. package/build/post-excerpt/index.js.map +1 -1
  225. package/build/post-excerpt/transforms.js +27 -0
  226. package/build/post-excerpt/transforms.js.map +1 -0
  227. package/build/post-featured-image/dimension-controls.js +74 -32
  228. package/build/post-featured-image/dimension-controls.js.map +1 -1
  229. package/build/post-featured-image/edit.js +52 -20
  230. package/build/post-featured-image/edit.js.map +1 -1
  231. package/build/post-featured-image/index.js +4 -0
  232. package/build/post-featured-image/index.js.map +1 -1
  233. package/build/post-navigation-link/index.js +1 -0
  234. package/build/post-navigation-link/index.js.map +1 -1
  235. package/build/post-template/edit.js +34 -7
  236. package/build/post-template/edit.js.map +1 -1
  237. package/build/post-template/index.js +2 -1
  238. package/build/post-template/index.js.map +1 -1
  239. package/build/post-terms/index.js +1 -0
  240. package/build/post-terms/index.js.map +1 -1
  241. package/build/post-title/index.js +1 -0
  242. package/build/post-title/index.js.map +1 -1
  243. package/build/preformatted/edit.native.js +3 -6
  244. package/build/preformatted/edit.native.js.map +1 -1
  245. package/build/preformatted/index.js +1 -0
  246. package/build/preformatted/index.js.map +1 -1
  247. package/build/pullquote/index.js +8 -1
  248. package/build/pullquote/index.js.map +1 -1
  249. package/build/query/deprecated.js +96 -3
  250. package/build/query/deprecated.js.map +1 -1
  251. package/build/query/edit/index.js +4 -4
  252. package/build/query/edit/index.js.map +1 -1
  253. package/build/query/edit/inspector-controls/author-control.js +102 -0
  254. package/build/query/edit/inspector-controls/author-control.js.map +1 -0
  255. package/build/query/edit/inspector-controls/index.js +166 -0
  256. package/build/query/edit/inspector-controls/index.js.map +1 -0
  257. package/build/query/edit/inspector-controls/order-control.js +55 -0
  258. package/build/query/edit/inspector-controls/order-control.js.map +1 -0
  259. package/build/query/edit/inspector-controls/taxonomy-controls.js +158 -0
  260. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -0
  261. package/build/query/index.js +3 -3
  262. package/build/query/utils.js +49 -38
  263. package/build/query/utils.js.map +1 -1
  264. package/build/query/variations.js +0 -4
  265. package/build/query/variations.js.map +1 -1
  266. package/build/query-pagination/index.js +2 -1
  267. package/build/query-pagination/index.js.map +1 -1
  268. package/build/query-pagination-next/index.js +2 -1
  269. package/build/query-pagination-next/index.js.map +1 -1
  270. package/build/query-pagination-numbers/index.js +2 -1
  271. package/build/query-pagination-numbers/index.js.map +1 -1
  272. package/build/query-pagination-previous/index.js +2 -1
  273. package/build/query-pagination-previous/index.js.map +1 -1
  274. package/build/query-title/index.js +1 -0
  275. package/build/query-title/index.js.map +1 -1
  276. package/build/quote/index.js +1 -0
  277. package/build/quote/index.js.map +1 -1
  278. package/build/rss/index.js +1 -0
  279. package/build/rss/index.js.map +1 -1
  280. package/build/search/edit.js +5 -3
  281. package/build/search/edit.js.map +1 -1
  282. package/build/search/edit.native.js +2 -2
  283. package/build/search/edit.native.js.map +1 -1
  284. package/build/search/index.js +8 -1
  285. package/build/search/index.js.map +1 -1
  286. package/build/separator/index.js +1 -0
  287. package/build/separator/index.js.map +1 -1
  288. package/build/shortcode/index.js +1 -0
  289. package/build/shortcode/index.js.map +1 -1
  290. package/build/site-logo/edit.js +0 -25
  291. package/build/site-logo/edit.js.map +1 -1
  292. package/build/site-logo/index.js +5 -1
  293. package/build/site-logo/index.js.map +1 -1
  294. package/build/site-logo/transforms.js +31 -0
  295. package/build/site-logo/transforms.js.map +1 -0
  296. package/build/site-tagline/index.js +2 -1
  297. package/build/site-tagline/index.js.map +1 -1
  298. package/build/site-title/index.js +4 -0
  299. package/build/site-title/index.js.map +1 -1
  300. package/build/site-title/transforms.js +31 -0
  301. package/build/site-title/transforms.js.map +1 -0
  302. package/build/social-link/index.js +2 -1
  303. package/build/social-link/index.js.map +1 -1
  304. package/build/social-links/edit.js +29 -23
  305. package/build/social-links/edit.js.map +1 -1
  306. package/build/social-links/index.js +2 -1
  307. package/build/social-links/index.js.map +1 -1
  308. package/build/spacer/controls.js +111 -0
  309. package/build/spacer/controls.js.map +1 -0
  310. package/build/spacer/controls.native.js +95 -0
  311. package/build/spacer/controls.native.js.map +1 -0
  312. package/build/spacer/deprecated.js +53 -0
  313. package/build/spacer/deprecated.js.map +1 -0
  314. package/build/spacer/edit.js +117 -98
  315. package/build/spacer/edit.js.map +1 -1
  316. package/build/spacer/edit.native.js +76 -0
  317. package/build/spacer/edit.native.js.map +1 -0
  318. package/build/spacer/index.js +8 -4
  319. package/build/spacer/index.js.map +1 -1
  320. package/build/spacer/save.js +6 -3
  321. package/build/spacer/save.js.map +1 -1
  322. package/build/table/index.js +7 -1
  323. package/build/table/index.js.map +1 -1
  324. package/build/table-of-contents/index.js +1 -0
  325. package/build/table-of-contents/index.js.map +1 -1
  326. package/build/tag-cloud/index.js +1 -0
  327. package/build/tag-cloud/index.js.map +1 -1
  328. package/build/template-part/index.js +1 -0
  329. package/build/template-part/index.js.map +1 -1
  330. package/build/term-description/index.js +1 -0
  331. package/build/term-description/index.js.map +1 -1
  332. package/build/text-columns/index.js +1 -0
  333. package/build/text-columns/index.js.map +1 -1
  334. package/build/verse/index.js +1 -0
  335. package/build/verse/index.js.map +1 -1
  336. package/build/video/index.js +1 -0
  337. package/build/video/index.js.map +1 -1
  338. package/build-module/archives/index.js +1 -0
  339. package/build-module/archives/index.js.map +1 -1
  340. package/build-module/audio/edit.js +17 -5
  341. package/build-module/audio/edit.js.map +1 -1
  342. package/build-module/audio/index.js +1 -0
  343. package/build-module/audio/index.js.map +1 -1
  344. package/build-module/block/index.js +1 -0
  345. package/build-module/block/index.js.map +1 -1
  346. package/build-module/button/edit.native.js +1 -1
  347. package/build-module/button/edit.native.js.map +1 -1
  348. package/build-module/button/index.js +5 -1
  349. package/build-module/button/index.js.map +1 -1
  350. package/build-module/buttons/edit.js +6 -0
  351. package/build-module/buttons/edit.js.map +1 -1
  352. package/build-module/buttons/edit.native.js +17 -7
  353. package/build-module/buttons/edit.native.js.map +1 -1
  354. package/build-module/buttons/index.js +1 -0
  355. package/build-module/buttons/index.js.map +1 -1
  356. package/build-module/buttons/transforms.js +1 -0
  357. package/build-module/buttons/transforms.js.map +1 -1
  358. package/build-module/calendar/index.js +1 -0
  359. package/build-module/calendar/index.js.map +1 -1
  360. package/build-module/categories/index.js +1 -0
  361. package/build-module/categories/index.js.map +1 -1
  362. package/build-module/code/index.js +6 -1
  363. package/build-module/code/index.js.map +1 -1
  364. package/build-module/column/index.js +1 -0
  365. package/build-module/column/index.js.map +1 -1
  366. package/build-module/columns/index.js +11 -0
  367. package/build-module/columns/index.js.map +1 -1
  368. package/build-module/comment-author-avatar/edit.js +6 -3
  369. package/build-module/comment-author-avatar/edit.js.map +1 -1
  370. package/build-module/comment-author-avatar/index.js +7 -2
  371. package/build-module/comment-author-avatar/index.js.map +1 -1
  372. package/build-module/comment-author-name/index.js +1 -0
  373. package/build-module/comment-author-name/index.js.map +1 -1
  374. package/build-module/comment-content/index.js +1 -0
  375. package/build-module/comment-content/index.js.map +1 -1
  376. package/build-module/comment-date/index.js +1 -0
  377. package/build-module/comment-date/index.js.map +1 -1
  378. package/build-module/comment-edit-link/index.js +2 -1
  379. package/build-module/comment-edit-link/index.js.map +1 -1
  380. package/build-module/comment-reply-link/index.js +1 -0
  381. package/build-module/comment-reply-link/index.js.map +1 -1
  382. package/build-module/comment-template/edit.js +116 -26
  383. package/build-module/comment-template/edit.js.map +1 -1
  384. package/build-module/comment-template/index.js +4 -2
  385. package/build-module/comment-template/index.js.map +1 -1
  386. package/build-module/comment-template/util.js +59 -0
  387. package/build-module/comment-template/util.js.map +1 -0
  388. package/build-module/comments-pagination/comments-pagination-arrow-controls.js +30 -0
  389. package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -0
  390. package/build-module/comments-pagination/edit.js +66 -0
  391. package/build-module/comments-pagination/edit.js.map +1 -0
  392. package/build-module/comments-pagination/index.js +57 -0
  393. package/build-module/comments-pagination/index.js.map +1 -0
  394. package/build-module/comments-pagination/save.js +10 -0
  395. package/build-module/comments-pagination/save.js.map +1 -0
  396. package/build-module/comments-pagination-next/edit.js +41 -0
  397. package/build-module/comments-pagination-next/edit.js.map +1 -0
  398. package/build-module/comments-pagination-next/index.js +53 -0
  399. package/build-module/comments-pagination-next/index.js.map +1 -0
  400. package/build-module/comments-pagination-numbers/edit.js +40 -0
  401. package/build-module/comments-pagination-numbers/edit.js.map +1 -0
  402. package/build-module/comments-pagination-numbers/index.js +33 -0
  403. package/build-module/comments-pagination-numbers/index.js.map +1 -0
  404. package/build-module/comments-pagination-previous/edit.js +41 -0
  405. package/build-module/comments-pagination-previous/edit.js.map +1 -0
  406. package/build-module/comments-pagination-previous/index.js +53 -0
  407. package/build-module/comments-pagination-previous/index.js.map +1 -0
  408. package/build-module/comments-query-loop/edit/comments-inspector-controls.js +91 -0
  409. package/build-module/comments-query-loop/edit/comments-inspector-controls.js.map +1 -0
  410. package/build-module/comments-query-loop/edit.js +24 -28
  411. package/build-module/comments-query-loop/edit.js.map +1 -1
  412. package/build-module/comments-query-loop/index.js +15 -7
  413. package/build-module/comments-query-loop/index.js.map +1 -1
  414. package/build-module/cover/edit.js +2 -1
  415. package/build-module/cover/edit.js.map +1 -1
  416. package/build-module/cover/edit.native.js +41 -34
  417. package/build-module/cover/edit.native.js.map +1 -1
  418. package/build-module/cover/index.js +1 -0
  419. package/build-module/cover/index.js.map +1 -1
  420. package/build-module/cover/overlay-color-settings.native.js +11 -1
  421. package/build-module/cover/overlay-color-settings.native.js.map +1 -1
  422. package/build-module/embed/deprecated.js +1 -0
  423. package/build-module/embed/deprecated.js.map +1 -1
  424. package/build-module/embed/edit.native.js +24 -21
  425. package/build-module/embed/edit.native.js.map +1 -1
  426. package/build-module/embed/embed-controls.native.js +54 -0
  427. package/build-module/embed/embed-controls.native.js.map +1 -0
  428. package/build-module/embed/embed-link-settings.native.js +90 -0
  429. package/build-module/embed/embed-link-settings.native.js.map +1 -0
  430. package/build-module/embed/embed-loading.js +1 -2
  431. package/build-module/embed/embed-loading.js.map +1 -1
  432. package/build-module/embed/embed-placeholder.native.js +9 -2
  433. package/build-module/embed/embed-placeholder.native.js.map +1 -1
  434. package/build-module/embed/index.js +1 -0
  435. package/build-module/embed/index.js.map +1 -1
  436. package/build-module/embed/transforms.js +1 -0
  437. package/build-module/embed/transforms.js.map +1 -1
  438. package/build-module/embed/util.js +1 -0
  439. package/build-module/embed/util.js.map +1 -1
  440. package/build-module/file/edit.native.js +4 -2
  441. package/build-module/file/edit.native.js.map +1 -1
  442. package/build-module/file/index.js +1 -0
  443. package/build-module/file/index.js.map +1 -1
  444. package/build-module/freeform/index.js +1 -0
  445. package/build-module/freeform/index.js.map +1 -1
  446. package/build-module/gallery/deprecated.js +4 -0
  447. package/build-module/gallery/deprecated.js.map +1 -1
  448. package/build-module/gallery/edit.js +32 -13
  449. package/build-module/gallery/edit.js.map +1 -1
  450. package/build-module/gallery/gallery.native.js +1 -1
  451. package/build-module/gallery/gallery.native.js.map +1 -1
  452. package/build-module/gallery/index.js +1 -0
  453. package/build-module/gallery/index.js.map +1 -1
  454. package/build-module/group/index.js +19 -1
  455. package/build-module/group/index.js.map +1 -1
  456. package/build-module/heading/edit.js +3 -1
  457. package/build-module/heading/edit.js.map +1 -1
  458. package/build-module/heading/index.js +1 -0
  459. package/build-module/heading/index.js.map +1 -1
  460. package/build-module/heading/transforms.js +1 -0
  461. package/build-module/heading/transforms.js.map +1 -1
  462. package/build-module/home-link/index.js +1 -0
  463. package/build-module/home-link/index.js.map +1 -1
  464. package/build-module/html/index.js +1 -0
  465. package/build-module/html/index.js.map +1 -1
  466. package/build-module/image/edit.js +52 -4
  467. package/build-module/image/edit.js.map +1 -1
  468. package/build-module/image/edit.native.js +4 -4
  469. package/build-module/image/edit.native.js.map +1 -1
  470. package/build-module/image/image.js +16 -5
  471. package/build-module/image/image.js.map +1 -1
  472. package/build-module/image/index.js +5 -1
  473. package/build-module/image/index.js.map +1 -1
  474. package/build-module/index.js +7 -2
  475. package/build-module/index.js.map +1 -1
  476. package/build-module/latest-comments/index.js +1 -0
  477. package/build-module/latest-comments/index.js.map +1 -1
  478. package/build-module/latest-posts/deprecated.js +1 -0
  479. package/build-module/latest-posts/deprecated.js.map +1 -1
  480. package/build-module/latest-posts/edit.js +1 -1
  481. package/build-module/latest-posts/edit.js.map +1 -1
  482. package/build-module/latest-posts/index.js +1 -0
  483. package/build-module/latest-posts/index.js.map +1 -1
  484. package/build-module/list/index.js +1 -0
  485. package/build-module/list/index.js.map +1 -1
  486. package/build-module/loginout/index.js +1 -0
  487. package/build-module/loginout/index.js.map +1 -1
  488. package/build-module/media-text/index.js +1 -0
  489. package/build-module/media-text/index.js.map +1 -1
  490. package/build-module/missing/index.js +1 -0
  491. package/build-module/missing/index.js.map +1 -1
  492. package/build-module/more/index.js +1 -0
  493. package/build-module/more/index.js.map +1 -1
  494. package/build-module/navigation/edit/index.js +36 -9
  495. package/build-module/navigation/edit/index.js.map +1 -1
  496. package/build-module/navigation/edit/inner-blocks.js +3 -1
  497. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  498. package/build-module/navigation/edit/overlay-menu-icon.js +28 -0
  499. package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -0
  500. package/build-module/navigation/edit/placeholder/index.js +11 -7
  501. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  502. package/build-module/navigation/edit/responsive-wrapper.js +10 -21
  503. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  504. package/build-module/navigation/index.js +10 -1
  505. package/build-module/navigation/index.js.map +1 -1
  506. package/build-module/navigation/menu-items-to-blocks.js +4 -1
  507. package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
  508. package/build-module/navigation/use-navigation-entities.js +6 -3
  509. package/build-module/navigation/use-navigation-entities.js.map +1 -1
  510. package/build-module/navigation-area/edit.js +2 -1
  511. package/build-module/navigation-area/edit.js.map +1 -1
  512. package/build-module/navigation-area/index.js +2 -1
  513. package/build-module/navigation-area/index.js.map +1 -1
  514. package/build-module/navigation-link/edit.js +7 -0
  515. package/build-module/navigation-link/edit.js.map +1 -1
  516. package/build-module/navigation-link/index.js +1 -0
  517. package/build-module/navigation-link/index.js.map +1 -1
  518. package/build-module/navigation-submenu/edit.js +4 -1
  519. package/build-module/navigation-submenu/edit.js.map +1 -1
  520. package/build-module/navigation-submenu/index.js +1 -0
  521. package/build-module/navigation-submenu/index.js.map +1 -1
  522. package/build-module/nextpage/index.js +1 -0
  523. package/build-module/nextpage/index.js.map +1 -1
  524. package/build-module/page-list/edit.js +38 -11
  525. package/build-module/page-list/edit.js.map +1 -1
  526. package/build-module/page-list/index.js +6 -1
  527. package/build-module/page-list/index.js.map +1 -1
  528. package/build-module/paragraph/edit.js +13 -3
  529. package/build-module/paragraph/edit.js.map +1 -1
  530. package/build-module/paragraph/index.js +2 -1
  531. package/build-module/paragraph/index.js.map +1 -1
  532. package/build-module/paragraph/transforms.js +2 -1
  533. package/build-module/paragraph/transforms.js.map +1 -1
  534. package/build-module/pattern/index.js +1 -0
  535. package/build-module/pattern/index.js.map +1 -1
  536. package/build-module/post-author/index.js +2 -1
  537. package/build-module/post-author/index.js.map +1 -1
  538. package/build-module/post-author-name/edit.js +85 -0
  539. package/build-module/post-author-name/edit.js.map +1 -0
  540. package/build-module/post-author-name/index.js +61 -0
  541. package/build-module/post-author-name/index.js.map +1 -0
  542. package/build-module/post-comment/index.js +1 -0
  543. package/build-module/post-comment/index.js.map +1 -1
  544. package/build-module/post-comments/index.js +1 -0
  545. package/build-module/post-comments/index.js.map +1 -1
  546. package/build-module/post-comments-count/index.js +1 -0
  547. package/build-module/post-comments-count/index.js.map +1 -1
  548. package/build-module/post-comments-form/index.js +1 -0
  549. package/build-module/post-comments-form/index.js.map +1 -1
  550. package/build-module/post-comments-link/index.js +1 -0
  551. package/build-module/post-comments-link/index.js.map +1 -1
  552. package/build-module/post-content/index.js +1 -0
  553. package/build-module/post-content/index.js.map +1 -1
  554. package/build-module/post-date/index.js +1 -0
  555. package/build-module/post-date/index.js.map +1 -1
  556. package/build-module/post-excerpt/edit.js +2 -1
  557. package/build-module/post-excerpt/edit.js.map +1 -1
  558. package/build-module/post-excerpt/index.js +3 -0
  559. package/build-module/post-excerpt/index.js.map +1 -1
  560. package/build-module/post-excerpt/transforms.js +18 -0
  561. package/build-module/post-excerpt/transforms.js.map +1 -0
  562. package/build-module/post-featured-image/dimension-controls.js +76 -31
  563. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  564. package/build-module/post-featured-image/edit.js +54 -22
  565. package/build-module/post-featured-image/edit.js.map +1 -1
  566. package/build-module/post-featured-image/index.js +4 -0
  567. package/build-module/post-featured-image/index.js.map +1 -1
  568. package/build-module/post-navigation-link/index.js +1 -0
  569. package/build-module/post-navigation-link/index.js.map +1 -1
  570. package/build-module/post-template/edit.js +34 -7
  571. package/build-module/post-template/edit.js.map +1 -1
  572. package/build-module/post-template/index.js +2 -1
  573. package/build-module/post-template/index.js.map +1 -1
  574. package/build-module/post-terms/index.js +1 -0
  575. package/build-module/post-terms/index.js.map +1 -1
  576. package/build-module/post-title/index.js +1 -0
  577. package/build-module/post-title/index.js.map +1 -1
  578. package/build-module/preformatted/edit.native.js +3 -3
  579. package/build-module/preformatted/edit.native.js.map +1 -1
  580. package/build-module/preformatted/index.js +1 -0
  581. package/build-module/preformatted/index.js.map +1 -1
  582. package/build-module/pullquote/index.js +8 -1
  583. package/build-module/pullquote/index.js.map +1 -1
  584. package/build-module/query/deprecated.js +95 -4
  585. package/build-module/query/deprecated.js.map +1 -1
  586. package/build-module/query/edit/index.js +3 -3
  587. package/build-module/query/edit/index.js.map +1 -1
  588. package/build-module/query/edit/inspector-controls/author-control.js +89 -0
  589. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -0
  590. package/build-module/query/edit/inspector-controls/index.js +149 -0
  591. package/build-module/query/edit/inspector-controls/index.js.map +1 -0
  592. package/build-module/query/edit/inspector-controls/order-control.js +45 -0
  593. package/build-module/query/edit/inspector-controls/order-control.js.map +1 -0
  594. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +145 -0
  595. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -0
  596. package/build-module/query/index.js +3 -3
  597. package/build-module/query/utils.js +43 -35
  598. package/build-module/query/utils.js.map +1 -1
  599. package/build-module/query/variations.js +0 -4
  600. package/build-module/query/variations.js.map +1 -1
  601. package/build-module/query-pagination/index.js +2 -1
  602. package/build-module/query-pagination/index.js.map +1 -1
  603. package/build-module/query-pagination-next/index.js +2 -1
  604. package/build-module/query-pagination-next/index.js.map +1 -1
  605. package/build-module/query-pagination-numbers/index.js +2 -1
  606. package/build-module/query-pagination-numbers/index.js.map +1 -1
  607. package/build-module/query-pagination-previous/index.js +2 -1
  608. package/build-module/query-pagination-previous/index.js.map +1 -1
  609. package/build-module/query-title/index.js +1 -0
  610. package/build-module/query-title/index.js.map +1 -1
  611. package/build-module/quote/index.js +1 -0
  612. package/build-module/quote/index.js.map +1 -1
  613. package/build-module/rss/index.js +1 -0
  614. package/build-module/rss/index.js.map +1 -1
  615. package/build-module/search/edit.js +5 -3
  616. package/build-module/search/edit.js.map +1 -1
  617. package/build-module/search/edit.native.js +2 -2
  618. package/build-module/search/edit.native.js.map +1 -1
  619. package/build-module/search/index.js +8 -1
  620. package/build-module/search/index.js.map +1 -1
  621. package/build-module/separator/index.js +1 -0
  622. package/build-module/separator/index.js.map +1 -1
  623. package/build-module/shortcode/index.js +1 -0
  624. package/build-module/shortcode/index.js.map +1 -1
  625. package/build-module/site-logo/edit.js +0 -25
  626. package/build-module/site-logo/edit.js.map +1 -1
  627. package/build-module/site-logo/index.js +4 -1
  628. package/build-module/site-logo/index.js.map +1 -1
  629. package/build-module/site-logo/transforms.js +22 -0
  630. package/build-module/site-logo/transforms.js.map +1 -0
  631. package/build-module/site-tagline/index.js +2 -1
  632. package/build-module/site-tagline/index.js.map +1 -1
  633. package/build-module/site-title/index.js +3 -0
  634. package/build-module/site-title/index.js.map +1 -1
  635. package/build-module/site-title/transforms.js +22 -0
  636. package/build-module/site-title/transforms.js.map +1 -0
  637. package/build-module/social-link/index.js +2 -1
  638. package/build-module/social-link/index.js.map +1 -1
  639. package/build-module/social-links/edit.js +29 -23
  640. package/build-module/social-links/edit.js.map +1 -1
  641. package/build-module/social-links/index.js +2 -1
  642. package/build-module/social-links/index.js.map +1 -1
  643. package/build-module/spacer/controls.js +101 -0
  644. package/build-module/spacer/controls.js.map +1 -0
  645. package/build-module/spacer/controls.native.js +82 -0
  646. package/build-module/spacer/controls.native.js.map +1 -0
  647. package/build-module/spacer/deprecated.js +44 -0
  648. package/build-module/spacer/deprecated.js.map +1 -0
  649. package/build-module/spacer/edit.js +114 -95
  650. package/build-module/spacer/edit.js.map +1 -1
  651. package/build-module/spacer/edit.native.js +61 -0
  652. package/build-module/spacer/edit.native.js.map +1 -0
  653. package/build-module/spacer/index.js +7 -4
  654. package/build-module/spacer/index.js.map +1 -1
  655. package/build-module/spacer/save.js +6 -3
  656. package/build-module/spacer/save.js.map +1 -1
  657. package/build-module/table/index.js +7 -1
  658. package/build-module/table/index.js.map +1 -1
  659. package/build-module/table-of-contents/index.js +1 -0
  660. package/build-module/table-of-contents/index.js.map +1 -1
  661. package/build-module/tag-cloud/index.js +1 -0
  662. package/build-module/tag-cloud/index.js.map +1 -1
  663. package/build-module/template-part/index.js +1 -0
  664. package/build-module/template-part/index.js.map +1 -1
  665. package/build-module/term-description/index.js +1 -0
  666. package/build-module/term-description/index.js.map +1 -1
  667. package/build-module/text-columns/index.js +1 -0
  668. package/build-module/text-columns/index.js.map +1 -1
  669. package/build-module/verse/index.js +1 -0
  670. package/build-module/verse/index.js.map +1 -1
  671. package/build-module/video/index.js +1 -0
  672. package/build-module/video/index.js.map +1 -1
  673. package/build-style/audio/editor-rtl.css +11 -0
  674. package/build-style/audio/editor.css +11 -0
  675. package/build-style/code/theme-rtl.css +5 -3
  676. package/build-style/code/theme.css +5 -3
  677. package/build-style/columns/editor-rtl.css +0 -10
  678. package/build-style/columns/editor.css +0 -10
  679. package/build-style/columns/style-rtl.css +8 -21
  680. package/build-style/columns/style.css +8 -21
  681. package/build-style/comment-template/style-rtl.css +91 -0
  682. package/build-style/comment-template/style.css +91 -0
  683. package/build-style/{home-link/style.css → comments-pagination/editor-rtl.css} +18 -22
  684. package/build-style/comments-pagination/editor.css +102 -0
  685. package/build-style/{home-link → comments-pagination}/style-rtl.css +21 -21
  686. package/build-style/comments-pagination/style.css +106 -0
  687. package/build-style/comments-pagination-numbers/editor-rtl.css +85 -0
  688. package/build-style/comments-pagination-numbers/editor.css +86 -0
  689. package/build-style/comments-query-loop/editor-rtl.css +79 -0
  690. package/build-style/comments-query-loop/editor.css +79 -0
  691. package/build-style/common-rtl.css +19 -0
  692. package/build-style/common.css +19 -0
  693. package/build-style/cover/style-rtl.css +4 -0
  694. package/build-style/cover/style.css +4 -0
  695. package/build-style/editor-rtl.css +96 -58
  696. package/build-style/editor.css +99 -58
  697. package/build-style/embed/editor-rtl.css +0 -12
  698. package/build-style/embed/editor.css +0 -12
  699. package/build-style/gallery/editor-rtl.css +7 -18
  700. package/build-style/gallery/editor.css +7 -18
  701. package/build-style/gallery/style-rtl.css +3 -0
  702. package/build-style/gallery/style.css +3 -0
  703. package/build-style/group/theme-rtl.css +1 -1
  704. package/build-style/group/theme.css +1 -1
  705. package/build-style/latest-posts/editor-rtl.css +7 -0
  706. package/build-style/latest-posts/editor.css +7 -0
  707. package/build-style/latest-posts/style-rtl.css +0 -9
  708. package/build-style/latest-posts/style.css +0 -9
  709. package/build-style/navigation/editor-rtl.css +16 -2
  710. package/build-style/navigation/editor.css +16 -2
  711. package/build-style/navigation/style-rtl.css +18 -7
  712. package/build-style/navigation/style.css +18 -7
  713. package/build-style/page-list/editor-rtl.css +9 -5
  714. package/build-style/page-list/editor.css +9 -5
  715. package/build-style/post-comments/style-rtl.css +9 -4
  716. package/build-style/post-comments/style.css +9 -4
  717. package/build-style/post-featured-image/editor-rtl.css +0 -7
  718. package/build-style/post-featured-image/editor.css +0 -7
  719. package/build-style/post-featured-image/style-rtl.css +1 -1
  720. package/build-style/post-featured-image/style.css +1 -1
  721. package/build-style/post-template/style-rtl.css +4 -0
  722. package/build-style/post-template/style.css +4 -0
  723. package/build-style/post-title/style-rtl.css +3 -0
  724. package/build-style/post-title/style.css +3 -0
  725. package/build-style/pullquote/style-rtl.css +1 -0
  726. package/build-style/pullquote/style.css +1 -0
  727. package/build-style/query-pagination/editor-rtl.css +0 -4
  728. package/build-style/query-pagination/editor.css +0 -4
  729. package/build-style/social-links/editor-rtl.css +3 -0
  730. package/build-style/social-links/editor.css +3 -0
  731. package/build-style/social-links/style-rtl.css +1 -0
  732. package/build-style/social-links/style.css +1 -0
  733. package/build-style/spacer/editor-rtl.css +4 -0
  734. package/build-style/spacer/editor.css +4 -0
  735. package/build-style/style-rtl.css +141 -87
  736. package/build-style/style.css +143 -87
  737. package/build-style/table/style-rtl.css +1 -0
  738. package/build-style/table/style.css +1 -0
  739. package/build-style/tag-cloud/style-rtl.css +8 -0
  740. package/build-style/tag-cloud/style.css +8 -0
  741. package/build-style/theme-rtl.css +6 -4
  742. package/build-style/theme.css +6 -4
  743. package/package.json +30 -30
  744. package/src/archives/block.json +1 -0
  745. package/src/archives/index.php +5 -9
  746. package/src/audio/block.json +1 -0
  747. package/src/audio/edit.js +18 -2
  748. package/src/audio/editor.scss +14 -0
  749. package/src/audio/test/__snapshots__/edit.native.js.snap +22 -0
  750. package/src/audio/test/edit.native.js +24 -11
  751. package/src/block/block.json +1 -0
  752. package/src/block/index.php +7 -2
  753. package/src/block/test/edit.native.js +10 -12
  754. package/src/button/block.json +5 -1
  755. package/src/button/edit.native.js +1 -1
  756. package/src/buttons/block.json +2 -1
  757. package/src/buttons/edit.js +17 -0
  758. package/src/buttons/edit.native.js +17 -5
  759. package/src/buttons/test/__snapshots__/edit.native.js.snap +27 -0
  760. package/src/buttons/test/edit.native.js +75 -45
  761. package/src/calendar/block.json +1 -0
  762. package/src/calendar/index.php +35 -39
  763. package/src/categories/block.json +1 -0
  764. package/src/categories/index.php +1 -1
  765. package/src/code/block.json +6 -1
  766. package/src/code/theme.scss +6 -4
  767. package/src/column/block.json +1 -0
  768. package/src/columns/block.json +11 -0
  769. package/src/columns/editor.scss +0 -15
  770. package/src/columns/style.scss +15 -36
  771. package/src/comment-author-avatar/block.json +7 -2
  772. package/src/comment-author-avatar/edit.js +9 -2
  773. package/src/comment-author-avatar/index.php +25 -6
  774. package/src/comment-author-name/block.json +1 -0
  775. package/src/comment-content/block.json +1 -0
  776. package/src/comment-date/block.json +1 -0
  777. package/src/comment-date/index.php +2 -2
  778. package/src/comment-edit-link/block.json +1 -0
  779. package/src/comment-edit-link/index.js +1 -1
  780. package/src/comment-reply-link/block.json +1 -0
  781. package/src/comment-template/block.json +4 -2
  782. package/src/comment-template/edit.js +127 -42
  783. package/src/comment-template/index.php +46 -19
  784. package/src/comment-template/style.scss +17 -0
  785. package/src/comment-template/test/index.js +45 -0
  786. package/src/comment-template/util.js +56 -0
  787. package/src/comments-pagination/block.json +37 -0
  788. package/src/comments-pagination/comments-pagination-arrow-controls.js +44 -0
  789. package/src/comments-pagination/edit.js +83 -0
  790. package/src/comments-pagination/editor.scss +34 -0
  791. package/src/comments-pagination/index.js +20 -0
  792. package/src/comments-pagination/index.php +39 -0
  793. package/src/comments-pagination/save.js +8 -0
  794. package/src/comments-pagination/style.scss +38 -0
  795. package/src/comments-pagination-next/block.json +35 -0
  796. package/src/comments-pagination-next/edit.js +44 -0
  797. package/src/comments-pagination-next/index.js +18 -0
  798. package/src/comments-pagination-next/index.php +62 -0
  799. package/src/comments-pagination-numbers/block.json +15 -0
  800. package/src/comments-pagination-numbers/edit.js +22 -0
  801. package/src/comments-pagination-numbers/editor.scss +12 -0
  802. package/src/comments-pagination-numbers/index.js +18 -0
  803. package/src/comments-pagination-numbers/index.php +69 -0
  804. package/src/comments-pagination-previous/block.json +35 -0
  805. package/src/comments-pagination-previous/edit.js +44 -0
  806. package/src/comments-pagination-previous/index.js +18 -0
  807. package/src/comments-pagination-previous/index.php +52 -0
  808. package/src/comments-query-loop/block.json +15 -7
  809. package/src/comments-query-loop/edit/comments-inspector-controls.js +93 -0
  810. package/src/comments-query-loop/edit.js +22 -27
  811. package/src/comments-query-loop/editor.scss +3 -0
  812. package/src/common.scss +19 -0
  813. package/src/cover/block.json +1 -0
  814. package/src/cover/edit.js +1 -0
  815. package/src/cover/edit.native.js +35 -19
  816. package/src/cover/overlay-color-settings.native.js +10 -0
  817. package/src/cover/style.scss +4 -0
  818. package/src/cover/test/__snapshots__/edit.native.js.snap +33 -0
  819. package/src/cover/test/edit.native.js +280 -17
  820. package/src/editor.scss +3 -0
  821. package/src/embed/block.json +1 -0
  822. package/src/embed/edit.native.js +23 -18
  823. package/src/embed/editor.scss +0 -15
  824. package/src/embed/embed-controls.native.js +65 -0
  825. package/src/embed/embed-link-settings.native.js +100 -0
  826. package/src/embed/embed-loading.js +0 -2
  827. package/src/embed/embed-placeholder.native.js +8 -0
  828. package/src/embed/test/__snapshots__/index.native.js.snap +10 -0
  829. package/src/embed/test/index.native.js +236 -95
  830. package/src/file/block.json +1 -0
  831. package/src/file/edit.native.js +6 -2
  832. package/src/file/index.php +2 -2
  833. package/src/file/test/__snapshots__/edit.native.js.snap +18 -5
  834. package/src/file/test/edit.native.js +30 -12
  835. package/src/freeform/block.json +1 -0
  836. package/src/gallery/block.json +1 -0
  837. package/src/gallery/deprecated.js +4 -0
  838. package/src/gallery/edit.js +42 -11
  839. package/src/gallery/editor.scss +8 -22
  840. package/src/gallery/gallery.native.js +1 -1
  841. package/src/gallery/style.scss +4 -0
  842. package/src/gallery/test/use-get-new-images.js +93 -0
  843. package/src/group/block.json +19 -1
  844. package/src/group/theme.scss +4 -5
  845. package/src/heading/block.json +1 -0
  846. package/src/heading/edit.js +2 -1
  847. package/src/home-link/block.json +1 -0
  848. package/src/home-link/index.php +3 -3
  849. package/src/html/block.json +1 -0
  850. package/src/image/block.json +5 -1
  851. package/src/image/edit.js +44 -0
  852. package/src/image/edit.native.js +4 -4
  853. package/src/image/image.js +14 -3
  854. package/src/image/index.php +2 -2
  855. package/src/image/test/edit.native.js +27 -7
  856. package/src/index.js +10 -0
  857. package/src/latest-comments/block.json +1 -0
  858. package/src/latest-comments/index.php +5 -5
  859. package/src/latest-posts/block.json +1 -0
  860. package/src/latest-posts/edit.js +1 -1
  861. package/src/latest-posts/editor.scss +10 -0
  862. package/src/latest-posts/index.php +14 -12
  863. package/src/latest-posts/style.scss +0 -12
  864. package/src/list/block.json +1 -0
  865. package/src/list/test/edit.native.js +3 -3
  866. package/src/loginout/block.json +1 -0
  867. package/src/media-text/block.json +1 -0
  868. package/src/missing/block.json +1 -0
  869. package/src/missing/test/__snapshots__/edit.native.js.snap +5 -0
  870. package/src/missing/test/edit-integration.native.js +2 -2
  871. package/src/missing/test/edit.native.js +26 -30
  872. package/src/more/block.json +1 -0
  873. package/src/navigation/README.md +13 -0
  874. package/src/navigation/block.json +12 -10
  875. package/src/navigation/edit/index.js +71 -21
  876. package/src/navigation/edit/inner-blocks.js +3 -1
  877. package/src/navigation/edit/overlay-menu-icon.js +21 -0
  878. package/src/navigation/edit/placeholder/index.js +20 -9
  879. package/src/navigation/edit/responsive-wrapper.js +12 -13
  880. package/src/navigation/editor.scss +18 -3
  881. package/src/navigation/index.php +17 -10
  882. package/src/navigation/menu-items-to-blocks.js +2 -1
  883. package/src/navigation/style.scss +24 -7
  884. package/src/navigation/use-navigation-entities.js +3 -1
  885. package/src/navigation-area/block.json +3 -7
  886. package/src/navigation-area/edit.js +2 -1
  887. package/src/navigation-link/block.json +2 -3
  888. package/src/navigation-link/edit.js +5 -0
  889. package/src/navigation-link/index.php +3 -3
  890. package/src/navigation-submenu/block.json +2 -3
  891. package/src/navigation-submenu/edit.js +3 -1
  892. package/src/navigation-submenu/index.php +7 -7
  893. package/src/nextpage/block.json +1 -0
  894. package/src/page-list/block.json +4 -0
  895. package/src/page-list/edit.js +47 -9
  896. package/src/page-list/editor.scss +8 -5
  897. package/src/page-list/index.php +15 -10
  898. package/src/paragraph/block.json +2 -1
  899. package/src/paragraph/edit.js +12 -4
  900. package/src/paragraph/test/edit.native.js +4 -13
  901. package/src/pattern/block.json +1 -0
  902. package/src/post-author/block.json +2 -1
  903. package/src/post-author/index.php +1 -1
  904. package/src/post-author-name/block.json +43 -0
  905. package/src/post-author-name/edit.js +95 -0
  906. package/src/post-author-name/index.js +18 -0
  907. package/src/post-author-name/index.php +49 -0
  908. package/src/post-comment/block.json +1 -0
  909. package/src/post-comments/block.json +1 -0
  910. package/src/post-comments/style.scss +10 -4
  911. package/src/post-comments-count/block.json +1 -0
  912. package/src/post-comments-form/block.json +6 -1
  913. package/src/post-comments-link/block.json +1 -0
  914. package/src/post-comments-link/index.php +7 -7
  915. package/src/post-content/block.json +1 -0
  916. package/src/post-content/index.php +1 -1
  917. package/src/post-date/block.json +1 -0
  918. package/src/post-date/index.php +2 -2
  919. package/src/post-excerpt/block.json +1 -0
  920. package/src/post-excerpt/edit.js +1 -0
  921. package/src/post-excerpt/index.js +2 -0
  922. package/src/post-excerpt/index.php +1 -1
  923. package/src/post-excerpt/transforms.js +23 -0
  924. package/src/post-featured-image/block.json +4 -0
  925. package/src/post-featured-image/dimension-controls.js +103 -51
  926. package/src/post-featured-image/edit.js +61 -22
  927. package/src/post-featured-image/editor.scss +0 -8
  928. package/src/post-featured-image/index.php +3 -2
  929. package/src/post-featured-image/style.scss +1 -1
  930. package/src/post-navigation-link/block.json +1 -0
  931. package/src/post-navigation-link/index.php +4 -4
  932. package/src/post-template/block.json +2 -1
  933. package/src/post-template/edit.js +27 -7
  934. package/src/post-template/index.php +2 -2
  935. package/src/post-template/style.scss +5 -0
  936. package/src/post-terms/block.json +1 -0
  937. package/src/post-terms/index.php +1 -1
  938. package/src/post-title/block.json +1 -0
  939. package/src/post-title/index.php +1 -1
  940. package/src/post-title/style.scss +6 -2
  941. package/src/preformatted/block.json +1 -0
  942. package/src/preformatted/edit.native.js +4 -4
  943. package/src/preformatted/test/__snapshots__/edit.native.js.snap +53 -14
  944. package/src/preformatted/test/edit.native.js +11 -10
  945. package/src/pullquote/block.json +8 -1
  946. package/src/pullquote/style.scss +1 -0
  947. package/src/query/block.json +3 -3
  948. package/src/query/deprecated.js +80 -3
  949. package/src/query/edit/index.js +3 -3
  950. package/src/query/edit/inspector-controls/author-control.js +78 -0
  951. package/src/query/edit/inspector-controls/index.js +163 -0
  952. package/src/query/edit/inspector-controls/order-control.js +41 -0
  953. package/src/query/edit/inspector-controls/taxonomy-controls.js +118 -0
  954. package/src/query/test/utils.js +6 -4
  955. package/src/query/utils.js +45 -35
  956. package/src/query/variations.js +0 -4
  957. package/src/query-pagination/block.json +2 -1
  958. package/src/query-pagination/editor.scss +0 -4
  959. package/src/query-pagination-next/block.json +2 -1
  960. package/src/query-pagination-next/index.php +2 -1
  961. package/src/query-pagination-numbers/block.json +2 -1
  962. package/src/query-pagination-previous/block.json +2 -1
  963. package/src/query-pagination-previous/index.php +2 -1
  964. package/src/query-title/block.json +1 -0
  965. package/src/quote/block.json +1 -0
  966. package/src/rss/block.json +1 -0
  967. package/src/search/block.json +8 -1
  968. package/src/search/edit.js +2 -1
  969. package/src/search/edit.native.js +2 -5
  970. package/src/search/index.php +21 -11
  971. package/src/search/test/__snapshots__/edit.native.js.snap +7 -15
  972. package/src/search/test/edit.native.js +32 -24
  973. package/src/separator/block.json +1 -0
  974. package/src/shortcode/block.json +1 -0
  975. package/src/site-logo/block.json +1 -0
  976. package/src/site-logo/edit.js +1 -32
  977. package/src/site-logo/index.js +2 -0
  978. package/src/site-logo/index.php +1 -1
  979. package/src/site-logo/transforms.js +21 -0
  980. package/src/site-tagline/block.json +2 -1
  981. package/src/site-tagline/index.php +1 -1
  982. package/src/site-title/block.json +1 -0
  983. package/src/site-title/index.js +2 -0
  984. package/src/site-title/index.php +4 -4
  985. package/src/site-title/transforms.js +21 -0
  986. package/src/social-link/block.json +2 -1
  987. package/src/social-link/index.php +3 -3
  988. package/src/social-links/block.json +3 -8
  989. package/src/social-links/edit.js +29 -26
  990. package/src/social-links/editor.scss +7 -0
  991. package/src/social-links/style.scss +3 -0
  992. package/src/spacer/block.json +4 -3
  993. package/src/spacer/controls.js +108 -0
  994. package/src/spacer/controls.native.js +82 -0
  995. package/src/spacer/deprecated.js +41 -0
  996. package/src/spacer/edit.js +133 -132
  997. package/src/spacer/edit.native.js +68 -0
  998. package/src/spacer/editor.scss +6 -0
  999. package/src/spacer/index.js +2 -0
  1000. package/src/spacer/save.js +5 -2
  1001. package/src/style.scss +3 -2
  1002. package/src/table/block.json +7 -1
  1003. package/src/table/style.scss +1 -0
  1004. package/src/table-of-contents/block.json +1 -0
  1005. package/src/table-of-contents/index.php +3 -3
  1006. package/src/tag-cloud/block.json +1 -0
  1007. package/src/tag-cloud/index.php +9 -0
  1008. package/src/tag-cloud/style.scss +9 -0
  1009. package/src/template-part/block.json +1 -0
  1010. package/src/template-part/index.php +6 -6
  1011. package/src/term-description/block.json +1 -0
  1012. package/src/text-columns/block.json +1 -0
  1013. package/src/verse/block.json +1 -0
  1014. package/src/verse/test/edit.native.js +7 -10
  1015. package/src/video/block.json +1 -0
  1016. package/build/comments-query-loop/toolbar.js +0 -58
  1017. package/build/comments-query-loop/toolbar.js.map +0 -1
  1018. package/build/embed/embed-bottom-sheet.native.js +0 -85
  1019. package/build/embed/embed-bottom-sheet.native.js.map +0 -1
  1020. package/build/query/edit/query-inspector-controls.js +0 -275
  1021. package/build/query/edit/query-inspector-controls.js.map +0 -1
  1022. package/build-module/comments-query-loop/toolbar.js +0 -48
  1023. package/build-module/comments-query-loop/toolbar.js.map +0 -1
  1024. package/build-module/embed/embed-bottom-sheet.native.js +0 -74
  1025. package/build-module/embed/embed-bottom-sheet.native.js.map +0 -1
  1026. package/build-module/query/edit/query-inspector-controls.js +0 -261
  1027. package/build-module/query/edit/query-inspector-controls.js.map +0 -1
  1028. package/src/comments-query-loop/toolbar.js +0 -57
  1029. package/src/embed/embed-bottom-sheet.native.js +0 -78
  1030. package/src/home-link/style.scss +0 -51
  1031. package/src/query/edit/query-inspector-controls.js +0 -281
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/navigation-submenu/edit.js"],"names":["ALLOWED_BLOCKS","DEFAULT_BLOCK","MAX_NESTING","useIsDraggingWithin","elementRef","isDraggingWithin","setIsDraggingWithin","ownerDocument","current","handleDragStart","event","handleDragEnter","handleDragEnd","contains","target","addEventListener","removeEventListener","getSuggestionsQuery","type","kind","subtype","getColors","context","isSubMenu","textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","style","colors","color","text","background","updateNavigationLinkBlockAttributes","updatedValue","setAttributes","blockAttributes","label","originalLabel","originalKind","originalType","title","url","opensInNewTab","id","newKind","newType","normalizedTitle","replace","normalizedURL","escapeTitle","isBuiltInType","indexOf","isCustomLink","encodeURI","undefined","Number","isInteger","NavigationSubmenuEdit","attributes","isSelected","mergeBlocks","onReplace","clientId","description","rel","link","showSubmenuIcon","openSubmenusOnClick","saveEntityRecord","coreStore","__unstableMarkNextChangeAsNotPersistent","blockEditorStore","isLinkOpen","setIsLinkOpen","listItemRef","itemLabelPlaceholder","ref","isAtMaxNesting","isTopLevelItem","isParentOfSelectedBlock","isImmediateParentOfSelectedBlock","hasDescendants","selectedBlockHasDescendants","userCanCreatePages","userCanCreatePosts","select","getClientIdsOfDescendants","hasSelectedInnerBlock","getSelectedBlockClientId","getBlockParentsByBlockName","selectedBlockId","descendants","length","name","canUser","test","selectLabelText","focus","defaultView","selection","getSelection","range","createRange","selectNodeContents","removeAllRanges","addRange","userCanCreate","handleCreate","pageTitle","postType","page","status","rendered","onKeyDown","isKeyboardEvent","primary","blockProps","className","innerBlocksColors","innerBlocksProps","allowedBlocks","__experimentalDefaultBlock","__experimentalDirectInsert","__experimentalCaptureToolbars","renderAppender","InnerBlocks","ButtonBlockAppender","ParentElement","linkIcon","displayShortcut","descriptionValue","titleValue","relValue","labelValue","searchTerm","format","mark"],"mappings":";;;;;;;;;;AAgCA;;AA7BA;;AACA;;AAKA;;AACA;;AAQA;;AACA;;AACA;;AAWA;;AAQA;;AACA;;AACA;;AACA;;AAKA;;AA/CA;AACA;AACA;;AAIA;AACA;AACA;;AAoCA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAMA,cAAc,GAAG,CAAE,sBAAF,EAA0B,yBAA1B,CAAvB;AAEA,MAAMC,aAAa,GAAG,CAAE,sBAAF,CAAtB;AAEA,MAAMC,WAAW,GAAG,CAApB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,mBAAmB,GAAKC,UAAF,IAAkB;AAC7C,QAAM,CAAEC,gBAAF,EAAoBC,mBAApB,IAA4C,uBAAU,KAAV,CAAlD;AAEA,0BAAW,MAAM;AAChB,UAAM;AAAEC,MAAAA;AAAF,QAAoBH,UAAU,CAACI,OAArC;;AAEA,aAASC,eAAT,CAA0BC,KAA1B,EAAkC;AACjC;AACAC,MAAAA,eAAe,CAAED,KAAF,CAAf;AACA,KANe,CAQhB;;;AACA,aAASE,aAAT,GAAyB;AACxBN,MAAAA,mBAAmB,CAAE,KAAF,CAAnB;AACA;;AAED,aAASK,eAAT,CAA0BD,KAA1B,EAAkC;AACjC;AACA,UAAKN,UAAU,CAACI,OAAX,CAAmBK,QAAnB,CAA6BH,KAAK,CAACI,MAAnC,CAAL,EAAmD;AAClDR,QAAAA,mBAAmB,CAAE,IAAF,CAAnB;AACA,OAFD,MAEO;AACNA,QAAAA,mBAAmB,CAAE,KAAF,CAAnB;AACA;AACD,KApBe,CAsBhB;AACA;AACA;;;AACAC,IAAAA,aAAa,CAACQ,gBAAd,CAAgC,WAA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AAC9C,UAAIC,MAAJ;;AACA,UAAK1H,IAAI,KAAK,MAAd,EAAuB;AACtB;AACA0H,QAAAA,MAAM,GAAG,cACR,oCADQ,CAAT;AAGA,OALD,MAKO;AACN;AACAA,QAAAA,MAAM,GAAG,cACR,oCADQ,CAAT;AAGA;;AACD,aAAO,uCACN,mBAASA,MAAT,EAAiBD,UAAjB,CADM,EAEN;AAAEE,QAAAA,IAAI,EAAE;AAAR,OAFM,CAAP;AAIA,KAvBF;AAwBC,IAAA,aAAa,EAAG,CAAC,CAAE3H,IAxBpB;AAyBC,IAAA,eAAe,EAAG,CAAC,CAAEA,IAzBtB;AA0BC,IAAA,gBAAgB,EAAGD,mBAAmB,CACrCC,IADqC,EAErCC,IAFqC,CA1BvC;AA8BC,IAAA,QAAQ,EAAKmB,YAAF,IACVD,mCAAmC,CAClCC,YADkC,EAElCC,aAFkC,EAGlCwB,UAHkC,CA/BrC;AAqCC,IAAA,QAAQ,EAAG,MAAM;AAChBxB,MAAAA,aAAa,CAAE;AAAEO,QAAAA,GAAG,EAAE;AAAP,OAAF,CAAb;AACA,uBAAO,cAAI,eAAJ,CAAP,EAA8B,WAA9B;AACA;AAxCF,IALD,CA9BF,EA+EG,CAAEyB,eAAe,IAAIC,mBAArB,KACD;AAAM,IAAA,SAAS,EAAC;AAAhB,KACC,4BAAC,uBAAD,OADD,CAhFF,CAFD,EAuFC,mCAAUoD,gBAAV,CAvFD,CA9CD,CADD;AA0IA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { escape, pull } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPanelBody,\n\tPopover,\n\tTextControl,\n\tTextareaControl,\n\tToolbarButton,\n\tToolbarGroup,\n} from '@wordpress/components';\nimport { displayShortcut, isKeyboardEvent } from '@wordpress/keycodes';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tBlockControls,\n\tInnerBlocks,\n\tuseInnerBlocksProps,\n\tInspectorControls,\n\tRichText,\n\t__experimentalLinkControl as LinkControl,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\tgetColorClassName,\n} from '@wordpress/block-editor';\nimport { isURL, prependHTTP, safeDecodeURI } from '@wordpress/url';\nimport {\n\tFragment,\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport { placeCaretAtHorizontalEdge } from '@wordpress/dom';\nimport { link as linkIcon } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { ItemSubmenuIcon } from './icons';\nimport { name } from './block.json';\n\nconst ALLOWED_BLOCKS = [ 'core/navigation-link', 'core/navigation-submenu' ];\n\nconst DEFAULT_BLOCK = [ 'core/navigation-link' ];\n\nconst MAX_NESTING = 5;\n\n/**\n * A React hook to determine if it's dragging within the target element.\n *\n * @typedef {import('@wordpress/element').RefObject} RefObject\n *\n * @param {RefObject<HTMLElement>} elementRef The target elementRef object.\n *\n * @return {boolean} Is dragging within the target element.\n */\nconst useIsDraggingWithin = ( elementRef ) => {\n\tconst [ isDraggingWithin, setIsDraggingWithin ] = useState( false );\n\n\tuseEffect( () => {\n\t\tconst { ownerDocument } = elementRef.current;\n\n\t\tfunction handleDragStart( event ) {\n\t\t\t// Check the first time when the dragging starts.\n\t\t\thandleDragEnter( event );\n\t\t}\n\n\t\t// Set to false whenever the user cancel the drag event by either releasing the mouse or press Escape.\n\t\tfunction handleDragEnd() {\n\t\t\tsetIsDraggingWithin( false );\n\t\t}\n\n\t\tfunction handleDragEnter( event ) {\n\t\t\t// Check if the current target is inside the item element.\n\t\t\tif ( elementRef.current.contains( event.target ) ) {\n\t\t\t\tsetIsDraggingWithin( true );\n\t\t\t} else {\n\t\t\t\tsetIsDraggingWithin( false );\n\t\t\t}\n\t\t}\n\n\t\t// Bind these events to the document to catch all drag events.\n\t\t// Ideally, we can also use `event.relatedTarget`, but sadly that\n\t\t// doesn't work in Safari.\n\t\townerDocument.addEventListener( 'dragstart', handleDragStart );\n\t\townerDocument.addEventListener( 'dragend', handleDragEnd );\n\t\townerDocument.addEventListener( 'dragenter', handleDragEnter );\n\n\t\treturn () => {\n\t\t\townerDocument.removeEventListener( 'dragstart', handleDragStart );\n\t\t\townerDocument.removeEventListener( 'dragend', handleDragEnd );\n\t\t\townerDocument.removeEventListener( 'dragenter', handleDragEnter );\n\t\t};\n\t}, [] );\n\n\treturn isDraggingWithin;\n};\n\n/**\n * Given the Link block's type attribute, return the query params to give to\n * /wp/v2/search.\n *\n * @param {string} type Link block's type attribute.\n * @param {string} kind Link block's entity of kind (post-type|taxonomy)\n * @return {{ type?: string, subtype?: string }} Search query params.\n */\nfunction getSuggestionsQuery( type, kind ) {\n\tswitch ( type ) {\n\t\tcase 'post':\n\t\tcase 'page':\n\t\t\treturn { type: 'post', subtype: type };\n\t\tcase 'category':\n\t\t\treturn { type: 'term', subtype: 'category' };\n\t\tcase 'tag':\n\t\t\treturn { type: 'term', subtype: 'post_tag' };\n\t\tcase 'post_format':\n\t\t\treturn { type: 'post-format' };\n\t\tdefault:\n\t\t\tif ( kind === 'taxonomy' ) {\n\t\t\t\treturn { type: 'term', subtype: type };\n\t\t\t}\n\t\t\tif ( kind === 'post-type' ) {\n\t\t\t\treturn { type: 'post', subtype: type };\n\t\t\t}\n\t\t\treturn {};\n\t}\n}\n\n/**\n * Determine the colors for a menu.\n *\n * Order of priority is:\n * 1: Overlay custom colors (if submenu)\n * 2: Overlay theme colors (if submenu)\n * 3: Custom colors\n * 4: Theme colors\n * 5: Global styles\n *\n * @param {Object} context\n * @param {boolean} isSubMenu\n */\nfunction getColors( context, isSubMenu ) {\n\tconst {\n\t\ttextColor,\n\t\tcustomTextColor,\n\t\tbackgroundColor,\n\t\tcustomBackgroundColor,\n\t\toverlayTextColor,\n\t\tcustomOverlayTextColor,\n\t\toverlayBackgroundColor,\n\t\tcustomOverlayBackgroundColor,\n\t\tstyle,\n\t} = context;\n\n\tconst colors = {};\n\n\tif ( isSubMenu && !! customOverlayTextColor ) {\n\t\tcolors.customTextColor = customOverlayTextColor;\n\t} else if ( isSubMenu && !! overlayTextColor ) {\n\t\tcolors.textColor = overlayTextColor;\n\t} else if ( !! customTextColor ) {\n\t\tcolors.customTextColor = customTextColor;\n\t} else if ( !! textColor ) {\n\t\tcolors.textColor = textColor;\n\t} else if ( !! style?.color?.text ) {\n\t\tcolors.customTextColor = style.color.text;\n\t}\n\n\tif ( isSubMenu && !! customOverlayBackgroundColor ) {\n\t\tcolors.customBackgroundColor = customOverlayBackgroundColor;\n\t} else if ( isSubMenu && !! overlayBackgroundColor ) {\n\t\tcolors.backgroundColor = overlayBackgroundColor;\n\t} else if ( !! customBackgroundColor ) {\n\t\tcolors.customBackgroundColor = customBackgroundColor;\n\t} else if ( !! backgroundColor ) {\n\t\tcolors.backgroundColor = backgroundColor;\n\t} else if ( !! style?.color?.background ) {\n\t\tcolors.customTextColor = style.color.background;\n\t}\n\n\treturn colors;\n}\n\n/**\n * @typedef {'post-type'|'custom'|'taxonomy'|'post-type-archive'} WPNavigationLinkKind\n */\n\n/**\n * Navigation Link Block Attributes\n *\n * @typedef {Object} WPNavigationLinkBlockAttributes\n *\n * @property {string} [label] Link text.\n * @property {WPNavigationLinkKind} [kind] Kind is used to differentiate between term and post ids to check post draft status.\n * @property {string} [type] The type such as post, page, tag, category and other custom types.\n * @property {string} [rel] The relationship of the linked URL.\n * @property {number} [id] A post or term id.\n * @property {boolean} [opensInNewTab] Sets link target to _blank when true.\n * @property {string} [url] Link href.\n * @property {string} [title] Link title attribute.\n */\n\n/**\n * Link Control onChange handler that updates block attributes when a setting is changed.\n *\n * @param {Object} updatedValue New block attributes to update.\n * @param {Function} setAttributes Block attribute update function.\n * @param {WPNavigationLinkBlockAttributes} blockAttributes Current block attributes.\n *\n */\nexport const updateNavigationLinkBlockAttributes = (\n\tupdatedValue = {},\n\tsetAttributes,\n\tblockAttributes = {}\n) => {\n\tconst {\n\t\tlabel: originalLabel = '',\n\t\tkind: originalKind = '',\n\t\ttype: originalType = '',\n\t} = blockAttributes;\n\tconst {\n\t\ttitle = '',\n\t\turl = '',\n\t\topensInNewTab,\n\t\tid,\n\t\tkind: newKind = originalKind,\n\t\ttype: newType = originalType,\n\t} = updatedValue;\n\n\tconst normalizedTitle = title.replace( /http(s?):\\/\\//gi, '' );\n\tconst normalizedURL = url.replace( /http(s?):\\/\\//gi, '' );\n\tconst escapeTitle =\n\t\ttitle !== '' &&\n\t\tnormalizedTitle !== normalizedURL &&\n\t\toriginalLabel !== title;\n\tconst label = escapeTitle\n\t\t? escape( title )\n\t\t: originalLabel || escape( normalizedURL );\n\n\t// In https://github.com/WordPress/gutenberg/pull/24670 we decided to use \"tag\" in favor of \"post_tag\"\n\tconst type = newType === 'post_tag' ? 'tag' : newType.replace( '-', '_' );\n\n\tconst isBuiltInType =\n\t\t[ 'post', 'page', 'tag', 'category' ].indexOf( type ) > -1;\n\n\tconst isCustomLink =\n\t\t( ! newKind && ! isBuiltInType ) || newKind === 'custom';\n\tconst kind = isCustomLink ? 'custom' : newKind;\n\n\tsetAttributes( {\n\t\t// Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string.\n\t\t...( url && { url: encodeURI( safeDecodeURI( url ) ) } ),\n\t\t...( label && { label } ),\n\t\t...( undefined !== opensInNewTab && { opensInNewTab } ),\n\t\t...( id && Number.isInteger( id ) && { id } ),\n\t\t...( kind && { kind } ),\n\t\t...( type && type !== 'URL' && { type } ),\n\t} );\n};\n\nexport default function NavigationSubmenuEdit( {\n\tattributes,\n\tisSelected,\n\tsetAttributes,\n\tmergeBlocks,\n\tonReplace,\n\tcontext,\n\tclientId,\n} ) {\n\tconst {\n\t\tlabel,\n\t\ttype,\n\t\topensInNewTab,\n\t\turl,\n\t\tdescription,\n\t\trel,\n\t\ttitle,\n\t\tkind,\n\t} = attributes;\n\tconst link = {\n\t\turl,\n\t\topensInNewTab,\n\t};\n\tconst { showSubmenuIcon, openSubmenusOnClick } = context;\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { __unstableMarkNextChangeAsNotPersistent } = useDispatch(\n\t\tblockEditorStore\n\t);\n\tconst [ isLinkOpen, setIsLinkOpen ] = useState( false );\n\tconst listItemRef = useRef( null );\n\tconst isDraggingWithin = useIsDraggingWithin( listItemRef );\n\tconst itemLabelPlaceholder = __( 'Add text…' );\n\tconst ref = useRef();\n\n\tconst {\n\t\tisAtMaxNesting,\n\t\tisTopLevelItem,\n\t\tisParentOfSelectedBlock,\n\t\tisImmediateParentOfSelectedBlock,\n\t\thasDescendants,\n\t\tselectedBlockHasDescendants,\n\t\tuserCanCreatePages,\n\t\tuserCanCreatePosts,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetClientIdsOfDescendants,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetBlockParentsByBlockName,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst selectedBlockId = getSelectedBlockClientId();\n\n\t\t\tconst descendants = getClientIdsOfDescendants( [ clientId ] )\n\t\t\t\t.length;\n\n\t\t\treturn {\n\t\t\t\tisAtMaxNesting:\n\t\t\t\t\tgetBlockParentsByBlockName( clientId, name ).length >=\n\t\t\t\t\tMAX_NESTING,\n\t\t\t\tisTopLevelItem:\n\t\t\t\t\tgetBlockParentsByBlockName( clientId, name ).length === 0,\n\t\t\t\tisParentOfSelectedBlock: hasSelectedInnerBlock(\n\t\t\t\t\tclientId,\n\t\t\t\t\ttrue\n\t\t\t\t),\n\t\t\t\tisImmediateParentOfSelectedBlock: hasSelectedInnerBlock(\n\t\t\t\t\tclientId,\n\t\t\t\t\tfalse\n\t\t\t\t),\n\t\t\t\thasDescendants: !! descendants,\n\t\t\t\tselectedBlockHasDescendants: !! getClientIdsOfDescendants( [\n\t\t\t\t\tselectedBlockId,\n\t\t\t\t] )?.length,\n\t\t\t\tuserCanCreatePages: select( coreStore ).canUser(\n\t\t\t\t\t'create',\n\t\t\t\t\t'pages'\n\t\t\t\t),\n\t\t\t\tuserCanCreatePosts: select( coreStore ).canUser(\n\t\t\t\t\t'create',\n\t\t\t\t\t'posts'\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\t// Show the LinkControl on mount if the URL is empty\n\t// ( When adding a new menu item)\n\t// This can't be done in the useState call because it conflicts\n\t// with the autofocus behavior of the BlockListBlock component.\n\tuseEffect( () => {\n\t\tif ( ! openSubmenusOnClick && ! url ) {\n\t\t\tsetIsLinkOpen( true );\n\t\t}\n\t}, [] );\n\n\t// Store the colors from context as attributes for rendering\n\tuseEffect( () => {\n\t\t// This side-effect should not create an undo level as those should\n\t\t// only be created via user interactions. Mark this change as\n\t\t// not persistent to avoid undo level creation.\n\t\t// See https://github.com/WordPress/gutenberg/issues/34564.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tsetAttributes( { isTopLevelItem } );\n\t}, [ isTopLevelItem ] );\n\n\t/**\n\t * The hook shouldn't be necessary but due to a focus loss happening\n\t * when selecting a suggestion in the link popover, we force close on block unselection.\n\t */\n\tuseEffect( () => {\n\t\tif ( ! isSelected ) {\n\t\t\tsetIsLinkOpen( false );\n\t\t}\n\t}, [ isSelected ] );\n\n\t// If the LinkControl popover is open and the URL has changed, close the LinkControl and focus the label text.\n\tuseEffect( () => {\n\t\tif ( isLinkOpen && url ) {\n\t\t\t// Does this look like a URL and have something TLD-ish?\n\t\t\tif (\n\t\t\t\tisURL( prependHTTP( label ) ) &&\n\t\t\t\t/^.+\\.[a-z]+/.test( label )\n\t\t\t) {\n\t\t\t\t// Focus and select the label text.\n\t\t\t\tselectLabelText();\n\t\t\t} else {\n\t\t\t\t// Focus it (but do not select).\n\t\t\t\tplaceCaretAtHorizontalEdge( ref.current, true );\n\t\t\t}\n\t\t}\n\t}, [ url ] );\n\n\t/**\n\t * Focus the Link label text and select it.\n\t */\n\tfunction selectLabelText() {\n\t\tref.current.focus();\n\t\tconst { ownerDocument } = ref.current;\n\t\tconst { defaultView } = ownerDocument;\n\t\tconst selection = defaultView.getSelection();\n\t\tconst range = ownerDocument.createRange();\n\t\t// Get the range of the current ref contents so we can add this range to the selection.\n\t\trange.selectNodeContents( ref.current );\n\t\tselection.removeAllRanges();\n\t\tselection.addRange( range );\n\t}\n\n\tlet userCanCreate = false;\n\tif ( ! type || type === 'page' ) {\n\t\tuserCanCreate = userCanCreatePages;\n\t} else if ( type === 'post' ) {\n\t\tuserCanCreate = userCanCreatePosts;\n\t}\n\n\tasync function handleCreate( pageTitle ) {\n\t\tconst postType = type || 'page';\n\n\t\tconst page = await saveEntityRecord( 'postType', postType, {\n\t\t\ttitle: pageTitle,\n\t\t\tstatus: 'draft',\n\t\t} );\n\n\t\treturn {\n\t\t\tid: page.id,\n\t\t\ttype: postType,\n\t\t\ttitle: page.title.rendered,\n\t\t\turl: page.link,\n\t\t\tkind: 'post-type',\n\t\t};\n\t}\n\n\tconst {\n\t\ttextColor,\n\t\tcustomTextColor,\n\t\tbackgroundColor,\n\t\tcustomBackgroundColor,\n\t} = getColors( context, ! isTopLevelItem );\n\n\tfunction onKeyDown( event ) {\n\t\tif ( isKeyboardEvent.primary( event, 'k' ) ) {\n\t\t\tsetIsLinkOpen( true );\n\t\t}\n\t}\n\n\tconst blockProps = useBlockProps( {\n\t\tref: listItemRef,\n\t\tclassName: classnames( 'wp-block-navigation-item', {\n\t\t\t'is-editing': isSelected || isParentOfSelectedBlock,\n\t\t\t'is-dragging-within': isDraggingWithin,\n\t\t\t'has-link': !! url,\n\t\t\t'has-child': hasDescendants,\n\t\t\t'has-text-color': !! textColor || !! customTextColor,\n\t\t\t[ getColorClassName( 'color', textColor ) ]: !! textColor,\n\t\t\t'has-background': !! backgroundColor || customBackgroundColor,\n\t\t\t[ getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tbackgroundColor\n\t\t\t) ]: !! backgroundColor,\n\t\t\t'open-on-click': openSubmenusOnClick,\n\t\t} ),\n\t\tstyle: {\n\t\t\tcolor: ! textColor && customTextColor,\n\t\t\tbackgroundColor: ! backgroundColor && customBackgroundColor,\n\t\t},\n\t\tonKeyDown,\n\t} );\n\n\t// Always use overlay colors for submenus\n\tconst innerBlocksColors = getColors( context, true );\n\n\tif ( isAtMaxNesting ) {\n\t\tpull( ALLOWED_BLOCKS, 'core/navigation-submenu' );\n\t}\n\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\tclassName: classnames( 'wp-block-navigation__submenu-container', {\n\t\t\t\t'is-parent-of-selected-block': isParentOfSelectedBlock,\n\t\t\t\t'has-text-color': !! (\n\t\t\t\t\tinnerBlocksColors.textColor ||\n\t\t\t\t\tinnerBlocksColors.customTextColor\n\t\t\t\t),\n\t\t\t\t[ `has-${ innerBlocksColors.textColor }-color` ]: !! innerBlocksColors.textColor,\n\t\t\t\t'has-background': !! (\n\t\t\t\t\tinnerBlocksColors.backgroundColor ||\n\t\t\t\t\tinnerBlocksColors.customBackgroundColor\n\t\t\t\t),\n\t\t\t\t[ `has-${ innerBlocksColors.backgroundColor }-background-color` ]: !! innerBlocksColors.backgroundColor,\n\t\t\t} ),\n\t\t\tstyle: {\n\t\t\t\tcolor: innerBlocksColors.customTextColor,\n\t\t\t\tbackgroundColor: innerBlocksColors.customBackgroundColor,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tallowedBlocks: ALLOWED_BLOCKS,\n\t\t\t__experimentalDefaultBlock: DEFAULT_BLOCK,\n\t\t\t__experimentalDirectInsert: true,\n\n\t\t\t// Ensure block toolbar is not too far removed from item\n\t\t\t// being edited.\n\t\t\t// see: https://github.com/WordPress/gutenberg/pull/34615.\n\t\t\t__experimentalCaptureToolbars: true,\n\n\t\t\trenderAppender:\n\t\t\t\tisSelected ||\n\t\t\t\t( isImmediateParentOfSelectedBlock &&\n\t\t\t\t\t! selectedBlockHasDescendants ) ||\n\t\t\t\t// Show the appender while dragging to allow inserting element between item and the appender.\n\t\t\t\thasDescendants\n\t\t\t\t\t? InnerBlocks.ButtonBlockAppender\n\t\t\t\t\t: false,\n\t\t}\n\t);\n\n\tconst ParentElement = openSubmenusOnClick ? 'button' : 'a';\n\n\treturn (\n\t\t<Fragment>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t{ ! openSubmenusOnClick && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tname=\"link\"\n\t\t\t\t\t\t\ticon={ linkIcon }\n\t\t\t\t\t\t\ttitle={ __( 'Link' ) }\n\t\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\t\tonClick={ () => setIsLinkOpen( true ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolbarGroup>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Link settings' ) }>\n\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\tvalue={ description || '' }\n\t\t\t\t\t\tonChange={ ( descriptionValue ) => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tdescription: descriptionValue,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Description' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'The description will be displayed in the menu if the current theme supports it.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tvalue={ title || '' }\n\t\t\t\t\t\tonChange={ ( titleValue ) => {\n\t\t\t\t\t\t\tsetAttributes( { title: titleValue } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Link title' ) }\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t/>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\t\tonChange={ ( relValue ) => {\n\t\t\t\t\t\t\tsetAttributes( { rel: relValue } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ /* eslint-disable jsx-a11y/anchor-is-valid */ }\n\t\t\t\t<ParentElement className=\"wp-block-navigation-item__content\">\n\t\t\t\t\t{ /* eslint-enable */ }\n\t\t\t\t\t{\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tidentifier=\"label\"\n\t\t\t\t\t\t\tclassName=\"wp-block-navigation-item__label\"\n\t\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\t\tonChange={ ( labelValue ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { label: labelValue } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\t\taria-label={ __( 'Navigation link text' ) }\n\t\t\t\t\t\t\tplaceholder={ itemLabelPlaceholder }\n\t\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\t\tallowedFormats={ [\n\t\t\t\t\t\t\t\t'core/bold',\n\t\t\t\t\t\t\t\t'core/italic',\n\t\t\t\t\t\t\t\t'core/image',\n\t\t\t\t\t\t\t\t'core/strikethrough',\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tif ( ! openSubmenusOnClick && ! url ) {\n\t\t\t\t\t\t\t\t\tsetIsLinkOpen( true );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\t{ ! openSubmenusOnClick && isLinkOpen && (\n\t\t\t\t\t\t<Popover\n\t\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\t\tonClose={ () => setIsLinkOpen( false ) }\n\t\t\t\t\t\t\tanchorRef={ listItemRef.current }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<LinkControl\n\t\t\t\t\t\t\t\tclassName=\"wp-block-navigation-link__inline-link-input\"\n\t\t\t\t\t\t\t\tvalue={ link }\n\t\t\t\t\t\t\t\tshowInitialSuggestions={ true }\n\t\t\t\t\t\t\t\twithCreateSuggestion={ userCanCreate }\n\t\t\t\t\t\t\t\tcreateSuggestion={ handleCreate }\n\t\t\t\t\t\t\t\tcreateSuggestionButtonText={ ( searchTerm ) => {\n\t\t\t\t\t\t\t\t\tlet format;\n\t\t\t\t\t\t\t\t\tif ( type === 'post' ) {\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t\t\t\t\t\t\tformat = __(\n\t\t\t\t\t\t\t\t\t\t\t'Create draft post: <mark>%s</mark>'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t\t\t\t\t\t\tformat = __(\n\t\t\t\t\t\t\t\t\t\t\t'Create draft page: <mark>%s</mark>'\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\treturn createInterpolateElement(\n\t\t\t\t\t\t\t\t\t\tsprintf( format, searchTerm ),\n\t\t\t\t\t\t\t\t\t\t{ mark: <mark /> }\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tnoDirectEntry={ !! type }\n\t\t\t\t\t\t\t\tnoURLSuggestion={ !! type }\n\t\t\t\t\t\t\t\tsuggestionsQuery={ getSuggestionsQuery(\n\t\t\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\t\t\tkind\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ ( updatedValue ) =>\n\t\t\t\t\t\t\t\t\tupdateNavigationLinkBlockAttributes(\n\t\t\t\t\t\t\t\t\t\tupdatedValue,\n\t\t\t\t\t\t\t\t\t\tsetAttributes,\n\t\t\t\t\t\t\t\t\t\tattributes\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\t\t\tsetAttributes( { url: '' } );\n\t\t\t\t\t\t\t\t\tspeak( __( 'Link removed.' ), 'assertive' );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Popover>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ( showSubmenuIcon || openSubmenusOnClick ) && (\n\t\t\t\t\t\t<span className=\"wp-block-navigation__submenu-icon\">\n\t\t\t\t\t\t\t<ItemSubmenuIcon />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</ParentElement>\n\t\t\t\t<div { ...innerBlocksProps } />\n\t\t\t</div>\n\t\t</Fragment>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/navigation-submenu/edit.js"],"names":["ALLOWED_BLOCKS","DEFAULT_BLOCK","name","MAX_NESTING","useIsDraggingWithin","elementRef","isDraggingWithin","setIsDraggingWithin","ownerDocument","current","handleDragStart","event","handleDragEnter","handleDragEnd","contains","target","addEventListener","removeEventListener","getSuggestionsQuery","type","kind","subtype","getColors","context","isSubMenu","textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","style","colors","color","text","background","updateNavigationLinkBlockAttributes","updatedValue","setAttributes","blockAttributes","label","originalLabel","originalKind","originalType","title","url","opensInNewTab","id","newKind","newType","normalizedTitle","replace","normalizedURL","escapeTitle","isBuiltInType","indexOf","isCustomLink","encodeURI","undefined","Number","isInteger","NavigationSubmenuEdit","attributes","isSelected","mergeBlocks","onReplace","clientId","description","rel","link","showSubmenuIcon","openSubmenusOnClick","saveEntityRecord","coreStore","__unstableMarkNextChangeAsNotPersistent","blockEditorStore","isLinkOpen","setIsLinkOpen","listItemRef","itemLabelPlaceholder","ref","isAtMaxNesting","isTopLevelItem","isParentOfSelectedBlock","isImmediateParentOfSelectedBlock","hasDescendants","selectedBlockHasDescendants","userCanCreatePages","userCanCreatePosts","select","getClientIdsOfDescendants","hasSelectedInnerBlock","getSelectedBlockClientId","getBlockParentsByBlockName","selectedBlockId","descendants","length","canUser","test","selectLabelText","focus","defaultView","selection","getSelection","range","createRange","selectNodeContents","removeAllRanges","addRange","userCanCreate","handleCreate","pageTitle","postType","page","status","rendered","onKeyDown","isKeyboardEvent","primary","blockProps","className","innerBlocksColors","innerBlocksProps","allowedBlocks","__experimentalDefaultBlock","__experimentalDirectInsert","__experimentalCaptureToolbars","renderAppender","InnerBlocks","ButtonBlockAppender","ParentElement","linkIcon","displayShortcut","descriptionValue","titleValue","relValue","labelValue","searchTerm","format","mark"],"mappings":";;;;;;;;;;AAgCA;;AA7BA;;AACA;;AAKA;;AACA;;AAQA;;AACA;;AACA;;AAWA;;AAQA;;AACA;;AACA;;AACA;;AAKA;;AA/CA;AACA;AACA;;AAIA;AACA;AACA;;AAoCA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAMA,cAAc,GAAG,CAAE,sBAAF,EAA0B,yBAA1B,CAAvB;AAEA,MAAMC,aAAa,GAAG;AACrBC,EAAAA,IAAI,EAAE;AADe,CAAtB;AAIA,MAAMC,WAAW,GAAG,CAApB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,mBAAmB,GAAKC,UAAF,IAAkB;AAC7C,QAAM,CAAEC,gBAAF,EAAoBC,mBAApB,IAA4C,uBAAU,KAAV,CAAlD;AAEA,0BAAW,MAAM;AAChB,UAAM;AAAEC,MAAAA;AAAF,QAAoBH,UAAU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;AAxCF,IALD,CA9BF,EA+EG,CAAEyB,eAAe,IAAIC,mBAArB,KACD;AAAM,IAAA,SAAS,EAAC;AAAhB,KACC,4BAAC,uBAAD,OADD,CAhFF,CAFD,EAuFC,mCAAUmD,gBAAV,CAvFD,CA9CD,CADD;AA0IA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { escape, pull } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPanelBody,\n\tPopover,\n\tTextControl,\n\tTextareaControl,\n\tToolbarButton,\n\tToolbarGroup,\n} from '@wordpress/components';\nimport { displayShortcut, isKeyboardEvent } from '@wordpress/keycodes';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tBlockControls,\n\tInnerBlocks,\n\tuseInnerBlocksProps,\n\tInspectorControls,\n\tRichText,\n\t__experimentalLinkControl as LinkControl,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\tgetColorClassName,\n} from '@wordpress/block-editor';\nimport { isURL, prependHTTP, safeDecodeURI } from '@wordpress/url';\nimport {\n\tFragment,\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport { placeCaretAtHorizontalEdge } from '@wordpress/dom';\nimport { link as linkIcon } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { ItemSubmenuIcon } from './icons';\nimport { name } from './block.json';\n\nconst ALLOWED_BLOCKS = [ 'core/navigation-link', 'core/navigation-submenu' ];\n\nconst DEFAULT_BLOCK = {\n\tname: 'core/navigation-link',\n};\n\nconst MAX_NESTING = 5;\n\n/**\n * A React hook to determine if it's dragging within the target element.\n *\n * @typedef {import('@wordpress/element').RefObject} RefObject\n *\n * @param {RefObject<HTMLElement>} elementRef The target elementRef object.\n *\n * @return {boolean} Is dragging within the target element.\n */\nconst useIsDraggingWithin = ( elementRef ) => {\n\tconst [ isDraggingWithin, setIsDraggingWithin ] = useState( false );\n\n\tuseEffect( () => {\n\t\tconst { ownerDocument } = elementRef.current;\n\n\t\tfunction handleDragStart( event ) {\n\t\t\t// Check the first time when the dragging starts.\n\t\t\thandleDragEnter( event );\n\t\t}\n\n\t\t// Set to false whenever the user cancel the drag event by either releasing the mouse or press Escape.\n\t\tfunction handleDragEnd() {\n\t\t\tsetIsDraggingWithin( false );\n\t\t}\n\n\t\tfunction handleDragEnter( event ) {\n\t\t\t// Check if the current target is inside the item element.\n\t\t\tif ( elementRef.current.contains( event.target ) ) {\n\t\t\t\tsetIsDraggingWithin( true );\n\t\t\t} else {\n\t\t\t\tsetIsDraggingWithin( false );\n\t\t\t}\n\t\t}\n\n\t\t// Bind these events to the document to catch all drag events.\n\t\t// Ideally, we can also use `event.relatedTarget`, but sadly that\n\t\t// doesn't work in Safari.\n\t\townerDocument.addEventListener( 'dragstart', handleDragStart );\n\t\townerDocument.addEventListener( 'dragend', handleDragEnd );\n\t\townerDocument.addEventListener( 'dragenter', handleDragEnter );\n\n\t\treturn () => {\n\t\t\townerDocument.removeEventListener( 'dragstart', handleDragStart );\n\t\t\townerDocument.removeEventListener( 'dragend', handleDragEnd );\n\t\t\townerDocument.removeEventListener( 'dragenter', handleDragEnter );\n\t\t};\n\t}, [] );\n\n\treturn isDraggingWithin;\n};\n\n/**\n * Given the Link block's type attribute, return the query params to give to\n * /wp/v2/search.\n *\n * @param {string} type Link block's type attribute.\n * @param {string} kind Link block's entity of kind (post-type|taxonomy)\n * @return {{ type?: string, subtype?: string }} Search query params.\n */\nfunction getSuggestionsQuery( type, kind ) {\n\tswitch ( type ) {\n\t\tcase 'post':\n\t\tcase 'page':\n\t\t\treturn { type: 'post', subtype: type };\n\t\tcase 'category':\n\t\t\treturn { type: 'term', subtype: 'category' };\n\t\tcase 'tag':\n\t\t\treturn { type: 'term', subtype: 'post_tag' };\n\t\tcase 'post_format':\n\t\t\treturn { type: 'post-format' };\n\t\tdefault:\n\t\t\tif ( kind === 'taxonomy' ) {\n\t\t\t\treturn { type: 'term', subtype: type };\n\t\t\t}\n\t\t\tif ( kind === 'post-type' ) {\n\t\t\t\treturn { type: 'post', subtype: type };\n\t\t\t}\n\t\t\treturn {};\n\t}\n}\n\n/**\n * Determine the colors for a menu.\n *\n * Order of priority is:\n * 1: Overlay custom colors (if submenu)\n * 2: Overlay theme colors (if submenu)\n * 3: Custom colors\n * 4: Theme colors\n * 5: Global styles\n *\n * @param {Object} context\n * @param {boolean} isSubMenu\n */\nfunction getColors( context, isSubMenu ) {\n\tconst {\n\t\ttextColor,\n\t\tcustomTextColor,\n\t\tbackgroundColor,\n\t\tcustomBackgroundColor,\n\t\toverlayTextColor,\n\t\tcustomOverlayTextColor,\n\t\toverlayBackgroundColor,\n\t\tcustomOverlayBackgroundColor,\n\t\tstyle,\n\t} = context;\n\n\tconst colors = {};\n\n\tif ( isSubMenu && !! customOverlayTextColor ) {\n\t\tcolors.customTextColor = customOverlayTextColor;\n\t} else if ( isSubMenu && !! overlayTextColor ) {\n\t\tcolors.textColor = overlayTextColor;\n\t} else if ( !! customTextColor ) {\n\t\tcolors.customTextColor = customTextColor;\n\t} else if ( !! textColor ) {\n\t\tcolors.textColor = textColor;\n\t} else if ( !! style?.color?.text ) {\n\t\tcolors.customTextColor = style.color.text;\n\t}\n\n\tif ( isSubMenu && !! customOverlayBackgroundColor ) {\n\t\tcolors.customBackgroundColor = customOverlayBackgroundColor;\n\t} else if ( isSubMenu && !! overlayBackgroundColor ) {\n\t\tcolors.backgroundColor = overlayBackgroundColor;\n\t} else if ( !! customBackgroundColor ) {\n\t\tcolors.customBackgroundColor = customBackgroundColor;\n\t} else if ( !! backgroundColor ) {\n\t\tcolors.backgroundColor = backgroundColor;\n\t} else if ( !! style?.color?.background ) {\n\t\tcolors.customTextColor = style.color.background;\n\t}\n\n\treturn colors;\n}\n\n/**\n * @typedef {'post-type'|'custom'|'taxonomy'|'post-type-archive'} WPNavigationLinkKind\n */\n\n/**\n * Navigation Link Block Attributes\n *\n * @typedef {Object} WPNavigationLinkBlockAttributes\n *\n * @property {string} [label] Link text.\n * @property {WPNavigationLinkKind} [kind] Kind is used to differentiate between term and post ids to check post draft status.\n * @property {string} [type] The type such as post, page, tag, category and other custom types.\n * @property {string} [rel] The relationship of the linked URL.\n * @property {number} [id] A post or term id.\n * @property {boolean} [opensInNewTab] Sets link target to _blank when true.\n * @property {string} [url] Link href.\n * @property {string} [title] Link title attribute.\n */\n\n/**\n * Link Control onChange handler that updates block attributes when a setting is changed.\n *\n * @param {Object} updatedValue New block attributes to update.\n * @param {Function} setAttributes Block attribute update function.\n * @param {WPNavigationLinkBlockAttributes} blockAttributes Current block attributes.\n *\n */\nexport const updateNavigationLinkBlockAttributes = (\n\tupdatedValue = {},\n\tsetAttributes,\n\tblockAttributes = {}\n) => {\n\tconst {\n\t\tlabel: originalLabel = '',\n\t\tkind: originalKind = '',\n\t\ttype: originalType = '',\n\t} = blockAttributes;\n\tconst {\n\t\ttitle = '',\n\t\turl = '',\n\t\topensInNewTab,\n\t\tid,\n\t\tkind: newKind = originalKind,\n\t\ttype: newType = originalType,\n\t} = updatedValue;\n\n\tconst normalizedTitle = title.replace( /http(s?):\\/\\//gi, '' );\n\tconst normalizedURL = url.replace( /http(s?):\\/\\//gi, '' );\n\tconst escapeTitle =\n\t\ttitle !== '' &&\n\t\tnormalizedTitle !== normalizedURL &&\n\t\toriginalLabel !== title;\n\tconst label = escapeTitle\n\t\t? escape( title )\n\t\t: originalLabel || escape( normalizedURL );\n\n\t// In https://github.com/WordPress/gutenberg/pull/24670 we decided to use \"tag\" in favor of \"post_tag\"\n\tconst type = newType === 'post_tag' ? 'tag' : newType.replace( '-', '_' );\n\n\tconst isBuiltInType =\n\t\t[ 'post', 'page', 'tag', 'category' ].indexOf( type ) > -1;\n\n\tconst isCustomLink =\n\t\t( ! newKind && ! isBuiltInType ) || newKind === 'custom';\n\tconst kind = isCustomLink ? 'custom' : newKind;\n\n\tsetAttributes( {\n\t\t// Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string.\n\t\t...( url && { url: encodeURI( safeDecodeURI( url ) ) } ),\n\t\t...( label && { label } ),\n\t\t...( undefined !== opensInNewTab && { opensInNewTab } ),\n\t\t...( id && Number.isInteger( id ) && { id } ),\n\t\t...( kind && { kind } ),\n\t\t...( type && type !== 'URL' && { type } ),\n\t} );\n};\n\nexport default function NavigationSubmenuEdit( {\n\tattributes,\n\tisSelected,\n\tsetAttributes,\n\tmergeBlocks,\n\tonReplace,\n\tcontext,\n\tclientId,\n} ) {\n\tconst {\n\t\tlabel,\n\t\ttype,\n\t\topensInNewTab,\n\t\turl,\n\t\tdescription,\n\t\trel,\n\t\ttitle,\n\t\tkind,\n\t} = attributes;\n\tconst link = {\n\t\turl,\n\t\topensInNewTab,\n\t};\n\tconst { showSubmenuIcon, openSubmenusOnClick } = context;\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { __unstableMarkNextChangeAsNotPersistent } = useDispatch(\n\t\tblockEditorStore\n\t);\n\tconst [ isLinkOpen, setIsLinkOpen ] = useState( false );\n\tconst listItemRef = useRef( null );\n\tconst isDraggingWithin = useIsDraggingWithin( listItemRef );\n\tconst itemLabelPlaceholder = __( 'Add text…' );\n\tconst ref = useRef();\n\n\tconst {\n\t\tisAtMaxNesting,\n\t\tisTopLevelItem,\n\t\tisParentOfSelectedBlock,\n\t\tisImmediateParentOfSelectedBlock,\n\t\thasDescendants,\n\t\tselectedBlockHasDescendants,\n\t\tuserCanCreatePages,\n\t\tuserCanCreatePosts,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetClientIdsOfDescendants,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetBlockParentsByBlockName,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst selectedBlockId = getSelectedBlockClientId();\n\n\t\t\tconst descendants = getClientIdsOfDescendants( [ clientId ] )\n\t\t\t\t.length;\n\n\t\t\treturn {\n\t\t\t\tisAtMaxNesting:\n\t\t\t\t\tgetBlockParentsByBlockName( clientId, name ).length >=\n\t\t\t\t\tMAX_NESTING,\n\t\t\t\tisTopLevelItem:\n\t\t\t\t\tgetBlockParentsByBlockName( clientId, name ).length === 0,\n\t\t\t\tisParentOfSelectedBlock: hasSelectedInnerBlock(\n\t\t\t\t\tclientId,\n\t\t\t\t\ttrue\n\t\t\t\t),\n\t\t\t\tisImmediateParentOfSelectedBlock: hasSelectedInnerBlock(\n\t\t\t\t\tclientId,\n\t\t\t\t\tfalse\n\t\t\t\t),\n\t\t\t\thasDescendants: !! descendants,\n\t\t\t\tselectedBlockHasDescendants: !! getClientIdsOfDescendants( [\n\t\t\t\t\tselectedBlockId,\n\t\t\t\t] )?.length,\n\t\t\t\tuserCanCreatePages: select( coreStore ).canUser(\n\t\t\t\t\t'create',\n\t\t\t\t\t'pages'\n\t\t\t\t),\n\t\t\t\tuserCanCreatePosts: select( coreStore ).canUser(\n\t\t\t\t\t'create',\n\t\t\t\t\t'posts'\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\t// Show the LinkControl on mount if the URL is empty\n\t// ( When adding a new menu item)\n\t// This can't be done in the useState call because it conflicts\n\t// with the autofocus behavior of the BlockListBlock component.\n\tuseEffect( () => {\n\t\tif ( ! openSubmenusOnClick && ! url ) {\n\t\t\tsetIsLinkOpen( true );\n\t\t}\n\t}, [] );\n\n\t// Store the colors from context as attributes for rendering\n\tuseEffect( () => {\n\t\t// This side-effect should not create an undo level as those should\n\t\t// only be created via user interactions. Mark this change as\n\t\t// not persistent to avoid undo level creation.\n\t\t// See https://github.com/WordPress/gutenberg/issues/34564.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tsetAttributes( { isTopLevelItem } );\n\t}, [ isTopLevelItem ] );\n\n\t/**\n\t * The hook shouldn't be necessary but due to a focus loss happening\n\t * when selecting a suggestion in the link popover, we force close on block unselection.\n\t */\n\tuseEffect( () => {\n\t\tif ( ! isSelected ) {\n\t\t\tsetIsLinkOpen( false );\n\t\t}\n\t}, [ isSelected ] );\n\n\t// If the LinkControl popover is open and the URL has changed, close the LinkControl and focus the label text.\n\tuseEffect( () => {\n\t\tif ( isLinkOpen && url ) {\n\t\t\t// Does this look like a URL and have something TLD-ish?\n\t\t\tif (\n\t\t\t\tisURL( prependHTTP( label ) ) &&\n\t\t\t\t/^.+\\.[a-z]+/.test( label )\n\t\t\t) {\n\t\t\t\t// Focus and select the label text.\n\t\t\t\tselectLabelText();\n\t\t\t} else {\n\t\t\t\t// Focus it (but do not select).\n\t\t\t\tplaceCaretAtHorizontalEdge( ref.current, true );\n\t\t\t}\n\t\t}\n\t}, [ url ] );\n\n\t/**\n\t * Focus the Link label text and select it.\n\t */\n\tfunction selectLabelText() {\n\t\tref.current.focus();\n\t\tconst { ownerDocument } = ref.current;\n\t\tconst { defaultView } = ownerDocument;\n\t\tconst selection = defaultView.getSelection();\n\t\tconst range = ownerDocument.createRange();\n\t\t// Get the range of the current ref contents so we can add this range to the selection.\n\t\trange.selectNodeContents( ref.current );\n\t\tselection.removeAllRanges();\n\t\tselection.addRange( range );\n\t}\n\n\tlet userCanCreate = false;\n\tif ( ! type || type === 'page' ) {\n\t\tuserCanCreate = userCanCreatePages;\n\t} else if ( type === 'post' ) {\n\t\tuserCanCreate = userCanCreatePosts;\n\t}\n\n\tasync function handleCreate( pageTitle ) {\n\t\tconst postType = type || 'page';\n\n\t\tconst page = await saveEntityRecord( 'postType', postType, {\n\t\t\ttitle: pageTitle,\n\t\t\tstatus: 'draft',\n\t\t} );\n\n\t\treturn {\n\t\t\tid: page.id,\n\t\t\ttype: postType,\n\t\t\ttitle: page.title.rendered,\n\t\t\turl: page.link,\n\t\t\tkind: 'post-type',\n\t\t};\n\t}\n\n\tconst {\n\t\ttextColor,\n\t\tcustomTextColor,\n\t\tbackgroundColor,\n\t\tcustomBackgroundColor,\n\t} = getColors( context, ! isTopLevelItem );\n\n\tfunction onKeyDown( event ) {\n\t\tif ( isKeyboardEvent.primary( event, 'k' ) ) {\n\t\t\tsetIsLinkOpen( true );\n\t\t}\n\t}\n\n\tconst blockProps = useBlockProps( {\n\t\tref: listItemRef,\n\t\tclassName: classnames( 'wp-block-navigation-item', {\n\t\t\t'is-editing': isSelected || isParentOfSelectedBlock,\n\t\t\t'is-dragging-within': isDraggingWithin,\n\t\t\t'has-link': !! url,\n\t\t\t'has-child': hasDescendants,\n\t\t\t'has-text-color': !! textColor || !! customTextColor,\n\t\t\t[ getColorClassName( 'color', textColor ) ]: !! textColor,\n\t\t\t'has-background': !! backgroundColor || customBackgroundColor,\n\t\t\t[ getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tbackgroundColor\n\t\t\t) ]: !! backgroundColor,\n\t\t\t'open-on-click': openSubmenusOnClick,\n\t\t} ),\n\t\tstyle: {\n\t\t\tcolor: ! textColor && customTextColor,\n\t\t\tbackgroundColor: ! backgroundColor && customBackgroundColor,\n\t\t},\n\t\tonKeyDown,\n\t} );\n\n\t// Always use overlay colors for submenus\n\tconst innerBlocksColors = getColors( context, true );\n\n\tif ( isAtMaxNesting ) {\n\t\tpull( ALLOWED_BLOCKS, 'core/navigation-submenu' );\n\t}\n\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\tclassName: classnames( 'wp-block-navigation__submenu-container', {\n\t\t\t\t'is-parent-of-selected-block': isParentOfSelectedBlock,\n\t\t\t\t'has-text-color': !! (\n\t\t\t\t\tinnerBlocksColors.textColor ||\n\t\t\t\t\tinnerBlocksColors.customTextColor\n\t\t\t\t),\n\t\t\t\t[ `has-${ innerBlocksColors.textColor }-color` ]: !! innerBlocksColors.textColor,\n\t\t\t\t'has-background': !! (\n\t\t\t\t\tinnerBlocksColors.backgroundColor ||\n\t\t\t\t\tinnerBlocksColors.customBackgroundColor\n\t\t\t\t),\n\t\t\t\t[ `has-${ innerBlocksColors.backgroundColor }-background-color` ]: !! innerBlocksColors.backgroundColor,\n\t\t\t} ),\n\t\t\tstyle: {\n\t\t\t\tcolor: innerBlocksColors.customTextColor,\n\t\t\t\tbackgroundColor: innerBlocksColors.customBackgroundColor,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tallowedBlocks: ALLOWED_BLOCKS,\n\t\t\t__experimentalDefaultBlock: DEFAULT_BLOCK,\n\t\t\t__experimentalDirectInsert: true,\n\n\t\t\t// Ensure block toolbar is not too far removed from item\n\t\t\t// being edited.\n\t\t\t// see: https://github.com/WordPress/gutenberg/pull/34615.\n\t\t\t__experimentalCaptureToolbars: true,\n\n\t\t\trenderAppender:\n\t\t\t\tisSelected ||\n\t\t\t\t( isImmediateParentOfSelectedBlock &&\n\t\t\t\t\t! selectedBlockHasDescendants ) ||\n\t\t\t\t// Show the appender while dragging to allow inserting element between item and the appender.\n\t\t\t\thasDescendants\n\t\t\t\t\t? InnerBlocks.ButtonBlockAppender\n\t\t\t\t\t: false,\n\t\t}\n\t);\n\n\tconst ParentElement = openSubmenusOnClick ? 'button' : 'a';\n\n\treturn (\n\t\t<Fragment>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t{ ! openSubmenusOnClick && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tname=\"link\"\n\t\t\t\t\t\t\ticon={ linkIcon }\n\t\t\t\t\t\t\ttitle={ __( 'Link' ) }\n\t\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\t\tonClick={ () => setIsLinkOpen( true ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolbarGroup>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Link settings' ) }>\n\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\tvalue={ description || '' }\n\t\t\t\t\t\tonChange={ ( descriptionValue ) => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tdescription: descriptionValue,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Description' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'The description will be displayed in the menu if the current theme supports it.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tvalue={ title || '' }\n\t\t\t\t\t\tonChange={ ( titleValue ) => {\n\t\t\t\t\t\t\tsetAttributes( { title: titleValue } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Link title' ) }\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t/>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\t\tonChange={ ( relValue ) => {\n\t\t\t\t\t\t\tsetAttributes( { rel: relValue } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ /* eslint-disable jsx-a11y/anchor-is-valid */ }\n\t\t\t\t<ParentElement className=\"wp-block-navigation-item__content\">\n\t\t\t\t\t{ /* eslint-enable */ }\n\t\t\t\t\t{\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tidentifier=\"label\"\n\t\t\t\t\t\t\tclassName=\"wp-block-navigation-item__label\"\n\t\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\t\tonChange={ ( labelValue ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { label: labelValue } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\t\taria-label={ __( 'Navigation link text' ) }\n\t\t\t\t\t\t\tplaceholder={ itemLabelPlaceholder }\n\t\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\t\tallowedFormats={ [\n\t\t\t\t\t\t\t\t'core/bold',\n\t\t\t\t\t\t\t\t'core/italic',\n\t\t\t\t\t\t\t\t'core/image',\n\t\t\t\t\t\t\t\t'core/strikethrough',\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tif ( ! openSubmenusOnClick && ! url ) {\n\t\t\t\t\t\t\t\t\tsetIsLinkOpen( true );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\t{ ! openSubmenusOnClick && isLinkOpen && (\n\t\t\t\t\t\t<Popover\n\t\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\t\tonClose={ () => setIsLinkOpen( false ) }\n\t\t\t\t\t\t\tanchorRef={ listItemRef.current }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<LinkControl\n\t\t\t\t\t\t\t\tclassName=\"wp-block-navigation-link__inline-link-input\"\n\t\t\t\t\t\t\t\tvalue={ link }\n\t\t\t\t\t\t\t\tshowInitialSuggestions={ true }\n\t\t\t\t\t\t\t\twithCreateSuggestion={ userCanCreate }\n\t\t\t\t\t\t\t\tcreateSuggestion={ handleCreate }\n\t\t\t\t\t\t\t\tcreateSuggestionButtonText={ ( searchTerm ) => {\n\t\t\t\t\t\t\t\t\tlet format;\n\t\t\t\t\t\t\t\t\tif ( type === 'post' ) {\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t\t\t\t\t\t\tformat = __(\n\t\t\t\t\t\t\t\t\t\t\t'Create draft post: <mark>%s</mark>'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t\t\t\t\t\t\tformat = __(\n\t\t\t\t\t\t\t\t\t\t\t'Create draft page: <mark>%s</mark>'\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\treturn createInterpolateElement(\n\t\t\t\t\t\t\t\t\t\tsprintf( format, searchTerm ),\n\t\t\t\t\t\t\t\t\t\t{ mark: <mark /> }\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tnoDirectEntry={ !! type }\n\t\t\t\t\t\t\t\tnoURLSuggestion={ !! type }\n\t\t\t\t\t\t\t\tsuggestionsQuery={ getSuggestionsQuery(\n\t\t\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\t\t\tkind\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ ( updatedValue ) =>\n\t\t\t\t\t\t\t\t\tupdateNavigationLinkBlockAttributes(\n\t\t\t\t\t\t\t\t\t\tupdatedValue,\n\t\t\t\t\t\t\t\t\t\tsetAttributes,\n\t\t\t\t\t\t\t\t\t\tattributes\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\t\t\tsetAttributes( { url: '' } );\n\t\t\t\t\t\t\t\t\tspeak( __( 'Link removed.' ), 'assertive' );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Popover>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ( showSubmenuIcon || openSubmenusOnClick ) && (\n\t\t\t\t\t\t<span className=\"wp-block-navigation__submenu-icon\">\n\t\t\t\t\t\t\t<ItemSubmenuIcon />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</ParentElement>\n\t\t\t\t<div { ...innerBlocksProps } />\n\t\t\t</div>\n\t\t</Fragment>\n\t);\n}\n"]}
@@ -23,6 +23,7 @@ var _transforms = _interopRequireDefault(require("./transforms"));
23
23
  * Internal dependencies
24
24
  */
25
25
  const metadata = {
26
+ $schema: "https://schemas.wp.org/trunk/block.json",
26
27
  apiVersion: 2,
27
28
  name: "core/navigation-submenu",
28
29
  title: "Submenu",
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/navigation-submenu/index.js"],"names":["name","metadata","settings","icon","addSubmenu","__experimentalLabel","label","edit","save","transforms"],"mappings":";;;;;;;;;AAGA;;AAOA;;AACA;;AACA;;AAZA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAEC,iBADiB;AAGvBC,EAAAA,mBAAmB,EAAE;AAAA,QAAE;AAAEC,MAAAA;AAAF,KAAF;AAAA,WAAiBA,KAAjB;AAAA,GAHE;AAKvBC,EAAAA,IAAI,EAAJA,aALuB;AAOvBC,EAAAA,IAAI,EAAJA,aAPuB;AASvBC,EAAAA,UAAU,EAAVA;AATuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addSubmenu } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\n\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon: addSubmenu,\n\n\t__experimentalLabel: ( { label } ) => label,\n\n\tedit,\n\n\tsave,\n\n\ttransforms,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/navigation-submenu/index.js"],"names":["name","metadata","settings","icon","addSubmenu","__experimentalLabel","label","edit","save","transforms"],"mappings":";;;;;;;;;AAGA;;AAOA;;AACA;;AACA;;AAZA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAEC,iBADiB;AAGvBC,EAAAA,mBAAmB,EAAE;AAAA,QAAE;AAAEC,MAAAA;AAAF,KAAF;AAAA,WAAiBA,KAAjB;AAAA,GAHE;AAKvBC,EAAAA,IAAI,EAAJA,aALuB;AAOvBC,EAAAA,IAAI,EAAJA,aAPuB;AASvBC,EAAAA,UAAU,EAAVA;AATuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addSubmenu } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\n\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon: addSubmenu,\n\n\t__experimentalLabel: ( { label } ) => label,\n\n\tedit,\n\n\tsave,\n\n\ttransforms,\n};\n"]}
@@ -23,6 +23,7 @@ var _transforms = _interopRequireDefault(require("./transforms"));
23
23
  * Internal dependencies
24
24
  */
25
25
  const metadata = {
26
+ $schema: "https://schemas.wp.org/trunk/block.json",
26
27
  apiVersion: 2,
27
28
  name: "core/nextpage",
28
29
  title: "Page Break",
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/nextpage/index.js"],"names":["name","metadata","settings","icon","example","transforms","edit","save"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,gBADuB;AAEvBC,EAAAA,OAAO,EAAE,EAFc;AAGvBC,EAAAA,UAAU,EAAVA,mBAHuB;AAIvBC,EAAAA,IAAI,EAAJA,aAJuB;AAKvBC,EAAAA,IAAI,EAAJA;AALuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { pageBreak as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\ttransforms,\n\tedit,\n\tsave,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/nextpage/index.js"],"names":["name","metadata","settings","icon","example","transforms","edit","save"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,gBADuB;AAEvBC,EAAAA,OAAO,EAAE,EAFc;AAGvBC,EAAAA,UAAU,EAAVA,mBAHuB;AAIvBC,EAAAA,IAAI,EAAJA,aAJuB;AAKvBC,EAAAA,IAAI,EAAJA;AALuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { pageBreak as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\ttransforms,\n\tedit,\n\tsave,\n};\n"]}
@@ -51,8 +51,9 @@ function PageListEdit(_ref) {
51
51
  } = _ref;
52
52
  const {
53
53
  pagesByParentId,
54
- totalPages
55
- } = usePagesByParentId();
54
+ totalPages,
55
+ hasResolvedPages
56
+ } = usePageData();
56
57
  const isNavigationChild = ('showSubmenuIcon' in context);
57
58
  const allowConvertToLinks = isNavigationChild && totalPages <= MAX_PAGE_COUNT;
58
59
  const [isOpen, setOpen] = (0, _element.useState)(false);
@@ -79,18 +80,33 @@ function PageListEdit(_ref) {
79
80
  }, (0, _i18n.__)('Edit'))), allowConvertToLinks && isOpen && (0, _element.createElement)(_convertToLinksModal.default, {
80
81
  onClose: closeModal,
81
82
  clientId: clientId
82
- }), totalPages === undefined && (0, _element.createElement)("div", blockProps, (0, _element.createElement)(_components.Placeholder, null, (0, _element.createElement)(_components.Spinner, null))), totalPages === 0 && (0, _element.createElement)("div", blockProps, (0, _element.createElement)("span", null, (0, _i18n.__)('Page List: No pages to show.'))), totalPages > 0 && (0, _element.createElement)("ul", blockProps, (0, _element.createElement)(PageItems, {
83
+ }), !hasResolvedPages && (0, _element.createElement)("div", blockProps, (0, _element.createElement)(_components.Placeholder, null, (0, _element.createElement)(_components.Spinner, null))), hasResolvedPages && totalPages === null && (0, _element.createElement)("div", blockProps, (0, _element.createElement)("div", blockProps, (0, _element.createElement)(_components.Notice, {
84
+ status: 'warning',
85
+ isDismissible: false
86
+ }, (0, _i18n.__)('Page List: Cannot retrieve Pages.')))), totalPages === 0 && (0, _element.createElement)("div", blockProps, (0, _element.createElement)(_components.Notice, {
87
+ status: 'info',
88
+ isDismissible: false
89
+ }, (0, _i18n.__)('Page List: Cannot retrieve Pages.'))), totalPages > 0 && (0, _element.createElement)("ul", blockProps, (0, _element.createElement)(PageItems, {
83
90
  context: context,
84
91
  pagesByParentId: pagesByParentId
85
92
  })));
86
93
  }
87
94
 
88
- function usePagesByParentId() {
95
+ function useFrontPageId() {
96
+ return (0, _data.useSelect)(select => {
97
+ const site = select(_coreData.store).getEntityRecord('root', 'site');
98
+ return (site === null || site === void 0 ? void 0 : site.show_on_front) === 'page' && (site === null || site === void 0 ? void 0 : site.page_on_front);
99
+ }, []);
100
+ }
101
+
102
+ function usePageData() {
89
103
  const {
90
- pages
104
+ pages,
105
+ hasResolvedPages
91
106
  } = (0, _data.useSelect)(select => {
92
107
  const {
93
- getEntityRecords
108
+ getEntityRecords,
109
+ hasFinishedResolution
94
110
  } = select(_coreData.store);
95
111
  return {
96
112
  pages: getEntityRecords('postType', 'page', {
@@ -98,10 +114,18 @@ function usePagesByParentId() {
98
114
  order: 'asc',
99
115
  _fields: ['id', 'link', 'parent', 'title', 'menu_order'],
100
116
  per_page: -1
101
- })
117
+ }),
118
+ hasResolvedPages: hasFinishedResolution('getEntityRecords', ['postType', 'page', {
119
+ orderby: 'menu_order',
120
+ order: 'asc',
121
+ _fields: ['id', 'link', 'parent', 'title', 'menu_order'],
122
+ per_page: -1
123
+ }])
102
124
  };
103
125
  }, []);
104
126
  return (0, _element.useMemo)(() => {
127
+ var _pages$length;
128
+
105
129
  // TODO: Once the REST API supports passing multiple values to
106
130
  // 'orderby', this can be removed.
107
131
  // https://core.trac.wordpress.org/ticket/39037
@@ -121,9 +145,10 @@ function usePagesByParentId() {
121
145
  }, new Map());
122
146
  return {
123
147
  pagesByParentId,
124
- totalPages: pages === null || pages === void 0 ? void 0 : pages.length
148
+ hasResolvedPages,
149
+ totalPages: (_pages$length = pages === null || pages === void 0 ? void 0 : pages.length) !== null && _pages$length !== void 0 ? _pages$length : null
125
150
  };
126
- }, [pages]);
151
+ }, [pages, hasResolvedPages]);
127
152
  }
128
153
 
129
154
  const PageItems = (0, _element.memo)(function PageItems(_ref2) {
@@ -134,6 +159,7 @@ const PageItems = (0, _element.memo)(function PageItems(_ref2) {
134
159
  depth = 0
135
160
  } = _ref2;
136
161
  const pages = pagesByParentId.get(parentId);
162
+ const frontPageId = useFrontPageId();
137
163
 
138
164
  if (!(pages !== null && pages !== void 0 && pages.length)) {
139
165
  return [];
@@ -150,7 +176,8 @@ const PageItems = (0, _element.memo)(function PageItems(_ref2) {
150
176
  'has-child': hasChildren,
151
177
  'wp-block-navigation-item': isNavigationChild,
152
178
  'open-on-click': context.openSubmenusOnClick,
153
- 'open-on-hover-click': !context.openSubmenusOnClick && context.showSubmenuIcon
179
+ 'open-on-hover-click': !context.openSubmenusOnClick && context.showSubmenuIcon,
180
+ 'menu-item-home': page.id === frontPageId
154
181
  })
155
182
  }, hasChildren && context.openSubmenusOnClick ? (0, _element.createElement)(ItemSubmenuToggle, {
156
183
  title: (_page$title = page.title) === null || _page$title === void 0 ? void 0 : _page$title.rendered
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/page-list/edit.js"],"names":["MAX_PAGE_COUNT","PageListEdit","context","clientId","pagesByParentId","totalPages","usePagesByParentId","isNavigationChild","allowConvertToLinks","isOpen","setOpen","openModal","closeModal","blockProps","className","textColor","backgroundColor","style","color","undefined","pages","select","getEntityRecords","coreStore","orderby","order","_fields","per_page","sortedPages","reduce","accumulator","page","parent","has","get","push","set","Map","length","PageItems","parentId","depth","map","hasChildren","id","openSubmenusOnClick","showSubmenuIcon","title","rendered","link","ItemSubmenuToggle"],"mappings":";;;;;;;;;AAgBA;;AAbA;;AACA;;AAKA;;AAKA;;AACA;;AAEA;;AACA;;AAKA;;AACA;;AAxBA;AACA;AACA;;AAIA;AACA;AACA;;AAYA;AACA;AACA;AAIA;AACA;AACA,MAAMA,cAAc,GAAG,GAAvB;;AAEe,SAASC,YAAT,OAA+C;AAAA;;AAAA,MAAxB;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,GAAwB;AAC7D,QAAM;AAAEC,IAAAA,eAAF;AAAmBC,IAAAA;AAAnB,MAAkCC,kBAAkB,EAA1D;AAEA,QAAMC,iBAAiB,IAAG,qBAAqBL,OAAxB,CAAvB;AACA,QAAMM,mBAAmB,GACxBD,iBAAiB,IAAIF,UAAU,IAAIL,cADpC;AAGA,QAAM,CAAES,MAAF,EAAUC,OAAV,IAAsB,uBAAU,KAAV,CAA5B;;AACA,QAAMC,SAAS,GAAG,MAAMD,OAAO,CAAE,IAAF,CAA/B;;AACA,QAAME,UAAU,GAAG,MAAMF,OAAO,CAAE,KAAF,CAAhC;;AAEA,QAAMG,UAAU,GAAG,gCAAe;AACjCC,IAAAA,SAAS,EAAE,yBAAY,oBAAZ,EAAkC;AAC5C,wBAAkB,CAAC,CAAEZ,OAAO,CAACa,SADe;AAE5C,OAAE,oCACD,OADC,EAEDb,O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IC,MAAA,KAAK,EAAGH,KAAK,GAAG;AAJjB,MALD,CAHD,CA3BF,CADD;AA+CA,GAlDM,CAAP;AAmDA,CA/DiB,CAAlB;;AAiEA,SAASS,iBAAT,QAAwC;AAAA,MAAZ;AAAEH,IAAAA;AAAF,GAAY;AACvC,SACC;AACC,IAAA,SAAS,EAAC,uEADX;AAEC,qBAAc;AAFf,KAIGA,KAJH,EAKC;AAAM,IAAA,SAAS,EAAC;AAAhB,KACC,4BAAC,sBAAD,OADD,CALD,CADD;AAWA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { sortBy } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBlockControls,\n\tuseBlockProps,\n\tgetColorClassName,\n} from '@wordpress/block-editor';\nimport { ToolbarButton, Placeholder, Spinner } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState, memo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport ConvertToLinksModal from './convert-to-links-modal';\nimport { ItemSubmenuIcon } from '../navigation-link/icons';\n\n// We only show the edit option when page count is <= MAX_PAGE_COUNT\n// Performance of Navigation Links is not good past this value.\nconst MAX_PAGE_COUNT = 100;\n\nexport default function PageListEdit( { context, clientId } ) {\n\tconst { pagesByParentId, totalPages } = usePagesByParentId();\n\n\tconst isNavigationChild = 'showSubmenuIcon' in context;\n\tconst allowConvertToLinks =\n\t\tisNavigationChild && totalPages <= MAX_PAGE_COUNT;\n\n\tconst [ isOpen, setOpen ] = useState( false );\n\tconst openModal = () => setOpen( true );\n\tconst closeModal = () => setOpen( false );\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( 'wp-block-page-list', {\n\t\t\t'has-text-color': !! context.textColor,\n\t\t\t[ getColorClassName(\n\t\t\t\t'color',\n\t\t\t\tcontext.textColor\n\t\t\t) ]: !! context.textColor,\n\t\t\t'has-background': !! context.backgroundColor,\n\t\t\t[ getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tcontext.backgroundColor\n\t\t\t) ]: !! context.backgroundColor,\n\t\t} ),\n\t\tstyle: { ...context.style?.color },\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t{ allowConvertToLinks && (\n\t\t\t\t<BlockControls group=\"other\">\n\t\t\t\t\t<ToolbarButton title={ __( 'Edit' ) } onClick={ openModal }>\n\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t</ToolbarButton>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ allowConvertToLinks && isOpen && (\n\t\t\t\t<ConvertToLinksModal\n\t\t\t\t\tonClose={ closeModal }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ totalPages === undefined && (\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t<Placeholder>\n\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t</Placeholder>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ totalPages === 0 && (\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t<span>{ __( 'Page List: No pages to show.' ) }</span>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ totalPages > 0 && (\n\t\t\t\t<ul { ...blockProps }>\n\t\t\t\t\t<PageItems\n\t\t\t\t\t\tcontext={ context }\n\t\t\t\t\t\tpagesByParentId={ pagesByParentId }\n\t\t\t\t\t/>\n\t\t\t\t</ul>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction usePagesByParentId() {\n\tconst { pages } = useSelect( ( select ) => {\n\t\tconst { getEntityRecords } = select( coreStore );\n\n\t\treturn {\n\t\t\tpages: getEntityRecords( 'postType', 'page', {\n\t\t\t\torderby: 'menu_order',\n\t\t\t\torder: 'asc',\n\t\t\t\t_fields: [ 'id', 'link', 'parent', 'title', 'menu_order' ],\n\t\t\t\tper_page: -1,\n\t\t\t} ),\n\t\t};\n\t}, [] );\n\n\treturn useMemo( () => {\n\t\t// TODO: Once the REST API supports passing multiple values to\n\t\t// 'orderby', this can be removed.\n\t\t// https://core.trac.wordpress.org/ticket/39037\n\t\tconst sortedPages = sortBy( pages, [ 'menu_order', 'title.rendered' ] );\n\t\tconst pagesByParentId = sortedPages.reduce( ( accumulator, page ) => {\n\t\t\tconst { parent } = page;\n\t\t\tif ( accumulator.has( parent ) ) {\n\t\t\t\taccumulator.get( parent ).push( page );\n\t\t\t} else {\n\t\t\t\taccumulator.set( parent, [ page ] );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t}, new Map() );\n\n\t\treturn {\n\t\t\tpagesByParentId,\n\t\t\ttotalPages: pages?.length,\n\t\t};\n\t}, [ pages ] );\n}\n\nconst PageItems = memo( function PageItems( {\n\tcontext,\n\tpagesByParentId,\n\tparentId = 0,\n\tdepth = 0,\n} ) {\n\tconst pages = pagesByParentId.get( parentId );\n\n\tif ( ! pages?.length ) {\n\t\treturn [];\n\t}\n\n\treturn pages.map( ( page ) => {\n\t\tconst hasChildren = pagesByParentId.has( page.id );\n\t\tconst isNavigationChild = 'showSubmenuIcon' in context;\n\t\treturn (\n\t\t\t<li\n\t\t\t\tkey={ page.id }\n\t\t\t\tclassName={ classnames( 'wp-block-pages-list__item', {\n\t\t\t\t\t'has-child': hasChildren,\n\t\t\t\t\t'wp-block-navigation-item': isNavigationChild,\n\t\t\t\t\t'open-on-click': context.openSubmenusOnClick,\n\t\t\t\t\t'open-on-hover-click':\n\t\t\t\t\t\t! context.openSubmenusOnClick &&\n\t\t\t\t\t\tcontext.showSubmenuIcon,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ hasChildren && context.openSubmenusOnClick ? (\n\t\t\t\t\t<ItemSubmenuToggle title={ page.title?.rendered } />\n\t\t\t\t) : (\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'wp-block-pages-list__item__link',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'wp-block-navigation-item__content': isNavigationChild,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\thref={ page.link }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ page.title?.rendered }\n\t\t\t\t\t</a>\n\t\t\t\t) }\n\t\t\t\t{ hasChildren && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! context.openSubmenusOnClick &&\n\t\t\t\t\t\t\tcontext.showSubmenuIcon && <ItemSubmenuToggle /> }\n\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\tclassName={ classnames( 'submenu-container', {\n\t\t\t\t\t\t\t\t'wp-block-navigation__submenu-container': isNavigationChild,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PageItems\n\t\t\t\t\t\t\t\tcontext={ context }\n\t\t\t\t\t\t\t\tpagesByParentId={ pagesByParentId }\n\t\t\t\t\t\t\t\tparentId={ page.id }\n\t\t\t\t\t\t\t\tdepth={ depth + 1 }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</li>\n\t\t);\n\t} );\n} );\n\nfunction ItemSubmenuToggle( { title } ) {\n\treturn (\n\t\t<button\n\t\t\tclassName=\"wp-block-navigation-item__content wp-block-navigation-submenu__toggle\"\n\t\t\taria-expanded=\"false\"\n\t\t>\n\t\t\t{ title }\n\t\t\t<span className=\"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon\">\n\t\t\t\t<ItemSubmenuIcon />\n\t\t\t</span>\n\t\t</button>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/page-list/edit.js"],"names":["MAX_PAGE_COUNT","PageListEdit","context","clientId","pagesByParentId","totalPages","hasResolvedPages","usePageData","isNavigationChild","allowConvertToLinks","isOpen","setOpen","openModal","closeModal","blockProps","className","textColor","backgroundColor","style","color","useFrontPageId","select","site","coreStore","getEntityRecord","show_on_front","page_on_front","pages","getEntityRecords","hasFinishedResolution","orderby","order","_fields","per_page","sortedPages","reduce","accumulator","page","parent","has","get","push","set","Map","length","PageItems","parentId","depth","frontPageId","map","hasChildren","id","openSubmenusOnClick","showSubmenuIcon","title","rendered","link","ItemSubmenuToggle"],"mappings":";;;;;;;;;AAqBA;;AAlBA;;AACA;;AAKA;;AAKA;;AAMA;;AAEA;;AACA;;AAKA;;AACA;;AA7BA;AACA;AACA;;AAIA;AACA;AACA;;AAiBA;AACA;AACA;AAIA;AACA;AACA,MAAMA,cAAc,GAAG,GAAvB;;AAEe,SAASC,YAAT,OAA+C;AAAA;;AAAA,MAAxB;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,GAAwB;AAC7D,QAAM;AAAEC,IAAAA,eAAF;AAAmBC,IAAAA,UAAnB;AAA+BC,IAAAA;AAA/B,MAAoDC,WAAW,EAArE;AAEA,QAAMC,iBAAiB,IAAG,qBAAqBN,OAAxB,CAAvB;AACA,QAAMO,mBAAmB,GACxBD,iBAAiB,IAAIH,UAAU,IAAIL,cADpC;AAGA,QAAM,CAAEU,MAAF,EAAUC,OAAV,IAAsB,uBAAU,KAAV,CAA5B;;AACA,QAAMC,SAAS,GAAG,MAAMD,OAAO,CAAE,IAAF,CAA/B;;AACA,QAAME,UAAU,GAAG,MAAMF,OAAO,CAAE,KAAF,CAAhC;;AAEA,QAAMG,UAAU,GAAG,gCAAe;AACjCC,IAAAA,SAAS,EAAE,yBAAY,oBAAZ,EAAkC;AAC5C,wBAAkB,CAAC,CAAEb,OAAO,CAACc,SADe;AAE5C,OAAE,oCACD,OADC,EAEDd,OAAO,CAACc,SAFP,CAAF,GAGK,CAAC,CAAEd,OAAO,CAACc,SAL4B;AAM5C,wBAAkB,CAAC,CAAEd,OAAO,CAACe,eANe;AAO5C,OAAE,oCACD,kBADC,EAEDf,OAAO,CAACe,eAFP,CAAF,GAGK,CAAC,CAAEf,OAAO,CAACe;AAV4B,KAAlC,CADsB;AAajCC,IA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D;AAWA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { sortBy } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBlockControls,\n\tuseBlockProps,\n\tgetColorClassName,\n} from '@wordpress/block-editor';\nimport {\n\tToolbarButton,\n\tPlaceholder,\n\tSpinner,\n\tNotice,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState, memo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport ConvertToLinksModal from './convert-to-links-modal';\nimport { ItemSubmenuIcon } from '../navigation-link/icons';\n\n// We only show the edit option when page count is <= MAX_PAGE_COUNT\n// Performance of Navigation Links is not good past this value.\nconst MAX_PAGE_COUNT = 100;\n\nexport default function PageListEdit( { context, clientId } ) {\n\tconst { pagesByParentId, totalPages, hasResolvedPages } = usePageData();\n\n\tconst isNavigationChild = 'showSubmenuIcon' in context;\n\tconst allowConvertToLinks =\n\t\tisNavigationChild && totalPages <= MAX_PAGE_COUNT;\n\n\tconst [ isOpen, setOpen ] = useState( false );\n\tconst openModal = () => setOpen( true );\n\tconst closeModal = () => setOpen( false );\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( 'wp-block-page-list', {\n\t\t\t'has-text-color': !! context.textColor,\n\t\t\t[ getColorClassName(\n\t\t\t\t'color',\n\t\t\t\tcontext.textColor\n\t\t\t) ]: !! context.textColor,\n\t\t\t'has-background': !! context.backgroundColor,\n\t\t\t[ getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tcontext.backgroundColor\n\t\t\t) ]: !! context.backgroundColor,\n\t\t} ),\n\t\tstyle: { ...context.style?.color },\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t{ allowConvertToLinks && (\n\t\t\t\t<BlockControls group=\"other\">\n\t\t\t\t\t<ToolbarButton title={ __( 'Edit' ) } onClick={ openModal }>\n\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t</ToolbarButton>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ allowConvertToLinks && isOpen && (\n\t\t\t\t<ConvertToLinksModal\n\t\t\t\t\tonClose={ closeModal }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ! hasResolvedPages && (\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t<Placeholder>\n\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t</Placeholder>\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ hasResolvedPages && totalPages === null && (\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t\t<Notice status={ 'warning' } isDismissible={ false }>\n\t\t\t\t\t\t\t{ __( 'Page List: Cannot retrieve Pages.' ) }\n\t\t\t\t\t\t</Notice>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ totalPages === 0 && (\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t<Notice status={ 'info' } isDismissible={ false }>\n\t\t\t\t\t\t{ __( 'Page List: Cannot retrieve Pages.' ) }\n\t\t\t\t\t</Notice>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ totalPages > 0 && (\n\t\t\t\t<ul { ...blockProps }>\n\t\t\t\t\t<PageItems\n\t\t\t\t\t\tcontext={ context }\n\t\t\t\t\t\tpagesByParentId={ pagesByParentId }\n\t\t\t\t\t/>\n\t\t\t\t</ul>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction useFrontPageId() {\n\treturn useSelect( ( select ) => {\n\t\tconst site = select( coreStore ).getEntityRecord( 'root', 'site' );\n\t\treturn site?.show_on_front === 'page' && site?.page_on_front;\n\t}, [] );\n}\n\nfunction usePageData() {\n\tconst { pages, hasResolvedPages } = useSelect( ( select ) => {\n\t\tconst { getEntityRecords, hasFinishedResolution } = select( coreStore );\n\n\t\treturn {\n\t\t\tpages: getEntityRecords( 'postType', 'page', {\n\t\t\t\torderby: 'menu_order',\n\t\t\t\torder: 'asc',\n\t\t\t\t_fields: [ 'id', 'link', 'parent', 'title', 'menu_order' ],\n\t\t\t\tper_page: -1,\n\t\t\t} ),\n\t\t\thasResolvedPages: hasFinishedResolution( 'getEntityRecords', [\n\t\t\t\t'postType',\n\t\t\t\t'page',\n\t\t\t\t{\n\t\t\t\t\torderby: 'menu_order',\n\t\t\t\t\torder: 'asc',\n\t\t\t\t\t_fields: [ 'id', 'link', 'parent', 'title', 'menu_order' ],\n\t\t\t\t\tper_page: -1,\n\t\t\t\t},\n\t\t\t] ),\n\t\t};\n\t}, [] );\n\n\treturn useMemo( () => {\n\t\t// TODO: Once the REST API supports passing multiple values to\n\t\t// 'orderby', this can be removed.\n\t\t// https://core.trac.wordpress.org/ticket/39037\n\t\tconst sortedPages = sortBy( pages, [ 'menu_order', 'title.rendered' ] );\n\t\tconst pagesByParentId = sortedPages.reduce( ( accumulator, page ) => {\n\t\t\tconst { parent } = page;\n\t\t\tif ( accumulator.has( parent ) ) {\n\t\t\t\taccumulator.get( parent ).push( page );\n\t\t\t} else {\n\t\t\t\taccumulator.set( parent, [ page ] );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t}, new Map() );\n\n\t\treturn {\n\t\t\tpagesByParentId,\n\t\t\thasResolvedPages,\n\t\t\ttotalPages: pages?.length ?? null,\n\t\t};\n\t}, [ pages, hasResolvedPages ] );\n}\n\nconst PageItems = memo( function PageItems( {\n\tcontext,\n\tpagesByParentId,\n\tparentId = 0,\n\tdepth = 0,\n} ) {\n\tconst pages = pagesByParentId.get( parentId );\n\tconst frontPageId = useFrontPageId();\n\n\tif ( ! pages?.length ) {\n\t\treturn [];\n\t}\n\n\treturn pages.map( ( page ) => {\n\t\tconst hasChildren = pagesByParentId.has( page.id );\n\t\tconst isNavigationChild = 'showSubmenuIcon' in context;\n\t\treturn (\n\t\t\t<li\n\t\t\t\tkey={ page.id }\n\t\t\t\tclassName={ classnames( 'wp-block-pages-list__item', {\n\t\t\t\t\t'has-child': hasChildren,\n\t\t\t\t\t'wp-block-navigation-item': isNavigationChild,\n\t\t\t\t\t'open-on-click': context.openSubmenusOnClick,\n\t\t\t\t\t'open-on-hover-click':\n\t\t\t\t\t\t! context.openSubmenusOnClick &&\n\t\t\t\t\t\tcontext.showSubmenuIcon,\n\t\t\t\t\t'menu-item-home': page.id === frontPageId,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ hasChildren && context.openSubmenusOnClick ? (\n\t\t\t\t\t<ItemSubmenuToggle title={ page.title?.rendered } />\n\t\t\t\t) : (\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'wp-block-pages-list__item__link',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'wp-block-navigation-item__content': isNavigationChild,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\thref={ page.link }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ page.title?.rendered }\n\t\t\t\t\t</a>\n\t\t\t\t) }\n\t\t\t\t{ hasChildren && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! context.openSubmenusOnClick &&\n\t\t\t\t\t\t\tcontext.showSubmenuIcon && <ItemSubmenuToggle /> }\n\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\tclassName={ classnames( 'submenu-container', {\n\t\t\t\t\t\t\t\t'wp-block-navigation__submenu-container': isNavigationChild,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PageItems\n\t\t\t\t\t\t\t\tcontext={ context }\n\t\t\t\t\t\t\t\tpagesByParentId={ pagesByParentId }\n\t\t\t\t\t\t\t\tparentId={ page.id }\n\t\t\t\t\t\t\t\tdepth={ depth + 1 }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</li>\n\t\t);\n\t} );\n} );\n\nfunction ItemSubmenuToggle( { title } ) {\n\treturn (\n\t\t<button\n\t\t\tclassName=\"wp-block-navigation-item__content wp-block-navigation-submenu__toggle\"\n\t\t\taria-expanded=\"false\"\n\t\t>\n\t\t\t{ title }\n\t\t\t<span className=\"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon\">\n\t\t\t\t<ItemSubmenuIcon />\n\t\t\t</span>\n\t\t</button>\n\t);\n}\n"]}
@@ -19,6 +19,7 @@ var _edit = _interopRequireDefault(require("./edit.js"));
19
19
  * Internal dependencies
20
20
  */
21
21
  const metadata = {
22
+ $schema: "https://schemas.wp.org/trunk/block.json",
22
23
  apiVersion: 2,
23
24
  name: "core/page-list",
24
25
  title: "Page List",
@@ -26,7 +27,11 @@ const metadata = {
26
27
  description: "Display a list of all pages.",
27
28
  keywords: ["menu", "navigation"],
28
29
  textdomain: "default",
29
- attributes: {},
30
+ attributes: {
31
+ __unstableMaxPages: {
32
+ type: "number"
33
+ }
34
+ },
30
35
  usesContext: ["textColor", "customTextColor", "backgroundColor", "customBackgroundColor", "overlayTextColor", "customOverlayTextColor", "overlayBackgroundColor", "customOverlayBackgroundColor", "fontSize", "customFontSize", "showSubmenuIcon", "style", "openSubmenusOnClick"],
31
36
  supports: {
32
37
  reusable: false,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/page-list/index.js"],"names":["name","metadata","settings","icon","example","edit"],"mappings":";;;;;;;;;AAGA;;AAMA;;AATA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAIA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,YADuB;AAEvBC,EAAAA,OAAO,EAAE,EAFc;AAGvBC,EAAAA,IAAI,EAAJA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { pages as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit.js';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/page-list/index.js"],"names":["name","metadata","settings","icon","example","edit"],"mappings":";;;;;;;;;AAGA;;AAMA;;AATA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,YADuB;AAEvBC,EAAAA,OAAO,EAAE,EAFc;AAGvBC,EAAAA,IAAI,EAAJA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { pages as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit.js';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n};\n"]}
@@ -89,8 +89,18 @@ function ParagraphBlock(_ref2) {
89
89
  setDirection: newDirection => setAttributes({
90
90
  direction: newDirection
91
91
  })
92
- })), isDropCapFeatureEnabled && (0, _element.createElement)(_blockEditor.InspectorControls, null, (0, _element.createElement)(_components.PanelBody, {
93
- title: (0, _i18n.__)('Text settings')
92
+ })), isDropCapFeatureEnabled && (0, _element.createElement)(_blockEditor.InspectorControls, {
93
+ __experimentalGroup: "typography"
94
+ }, (0, _element.createElement)(_components.__experimentalToolsPanelItem, {
95
+ hasValue: () => !!dropCap,
96
+ label: (0, _i18n.__)('Drop cap'),
97
+ onDeselect: () => setAttributes({
98
+ dropCap: undefined
99
+ }),
100
+ resetAllFilter: () => ({
101
+ dropCap: undefined
102
+ }),
103
+ panelId: clientId
94
104
  }, (0, _element.createElement)(_components.ToggleControl, {
95
105
  label: (0, _i18n.__)('Drop cap'),
96
106
  checked: !!dropCap,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/paragraph/edit.js"],"names":["name","ParagraphRTLControl","direction","setDirection","icon","formatLtr","title","isActive","onClick","undefined","ParagraphBlock","attributes","mergeBlocks","onReplace","onRemove","setAttributes","clientId","align","content","dropCap","placeholder","isDropCapFeatureEnabled","blockProps","className","style","newAlign","newDirection","newContent","value","isOriginal","newAttributes","block"],"mappings":";;;;;;;;;;;;;AAGA;;AAKA;;AACA;;AAKA;;AAQA;;AACA;;AAvBA;AACA;AACA;;AAGA;AACA;AACA;AAkBA,MAAMA,IAAI,GAAG,gBAAb;;AAEA,SAASC,mBAAT,OAA4D;AAAA,MAA9B;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,GAA8B;AAC3D,SACC,sBACC,4BAAC,+BAAD;AACC,IAAA,QAAQ,EAAG,CACV;AACCC,MAAAA,IAAI,EAAEC,gBADP;AAECC,MAAAA,KAAK,EAAE,cAAI,eAAJ,EAAqB,eAArB,CAFR;AAGCC,MAAAA,QAAQ,EAAEL,SAAS,KAAK,KAHzB;;AAICM,MAAAA,OAAO,GAAG;AACTL,QAAAA,YAAY,CACXD,SAAS,KAAK,KAAd,GAAsBO,SAAtB,GAAkC,KADvB,CAAZ;AAGA;;AARF,KADU;AADZ,IAFF;AAkBA;;AAED,SAASC,cAAT,QAOI;AAAA,MAPqB;AACxBC,IAAAA,UADwB;AAExBC,IAAAA,WAFwB;AAGxBC,IAAAA,SAHwB;AAIxBC,IAAAA,QAJwB;AAKxBC,IAAAA,aALwB;AAMxBC,IAAAA;AANwB,GAOrB;AACH,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA,OAAT;AAAkBhB,IAAAA,SAAlB;AAA6BiB,IAAAA,OAA7B;AAAsCC,IAAAA;AAAtC,MAAsDT,UAA5D;AACA,QAAMU,uBAAuB,GAAG,6BAAY,oBAAZ,CAAhC;AACA,QAAMC,UAAU,GAAG,gCAAe;AACjCC,IAAAA,SAAS,EA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AAEA,UAAKD,UAAU,IAAID,KAAnB,EAA2B;AAC1BE,QAAAA,aAAa,GAAG,EACf,GAAGnB,UADY;AAEfO,UAAAA,OAAO,EAAEU;AAFM,SAAhB;AAIA;;AAED,YAAMG,KAAK,GAAG,yBAAa/B,IAAb,EAAmB8B,aAAnB,CAAd;;AAEA,UAAKD,UAAL,EAAkB;AACjBE,QAAAA,KAAK,CAACf,QAAN,GAAiBA,QAAjB;AACA;;AAED,aAAOe,KAAP;AACA,KAzBF;AA0BC,IAAA,OAAO,EAAGnB,WA1BX;AA2BC,IAAA,SAAS,EAAGC,SA3Bb;AA4BC,IAAA,QAAQ,EAAGC,QA5BZ;AA6BC,kBACCI,OAAO,GACJ,cAAI,iBAAJ,CADI,GAEJ,cACA,oEADA,CAhCL;AAoCC,kBAAaA,OAAO,GAAG,KAAH,GAAW,IApChC;AAqCC,IAAA,WAAW,EAAGE,WAAW,IAAI,cAAI,0BAAJ,CArC9B;AAsCC,IAAA,yBAAyB,MAtC1B;AAuCC,IAAA,oCAAoC;AAvCrC,KAnCD,CADD;AA+EA;;eAEcV,c","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, isRTL } from '@wordpress/i18n';\nimport {\n\tToolbarDropdownMenu,\n\tPanelBody,\n\tToggleControl,\n} from '@wordpress/components';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\tuseSetting,\n} from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\nimport { formatLtr } from '@wordpress/icons';\n\nconst name = 'core/paragraph';\n\nfunction ParagraphRTLControl( { direction, setDirection } ) {\n\treturn (\n\t\tisRTL() && (\n\t\t\t<ToolbarDropdownMenu\n\t\t\t\tcontrols={ [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: formatLtr,\n\t\t\t\t\t\ttitle: _x( 'Left to right', 'editor button' ),\n\t\t\t\t\t\tisActive: direction === 'ltr',\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\tsetDirection(\n\t\t\t\t\t\t\t\tdirection === 'ltr' ? undefined : 'ltr'\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/>\n\t\t)\n\t);\n}\n\nfunction ParagraphBlock( {\n\tattributes,\n\tmergeBlocks,\n\tonReplace,\n\tonRemove,\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst { align, content, direction, dropCap, placeholder } = attributes;\n\tconst isDropCapFeatureEnabled = useSetting( 'typography.dropCap' );\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( {\n\t\t\t'has-drop-cap': dropCap,\n\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t} ),\n\t\tstyle: { direction },\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ align }\n\t\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\t\tsetAttributes( { align: newAlign } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ParagraphRTLControl\n\t\t\t\t\tdirection={ direction }\n\t\t\t\t\tsetDirection={ ( newDirection ) =>\n\t\t\t\t\t\tsetAttributes( { direction: newDirection } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t{ isDropCapFeatureEnabled && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Text settings' ) }>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Drop cap' ) }\n\t\t\t\t\t\t\tchecked={ !! dropCap }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { dropCap: ! dropCap } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\tdropCap\n\t\t\t\t\t\t\t\t\t? __( 'Showing large initial letter.' )\n\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t'Toggle to show a large initial letter.'\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<RichText\n\t\t\t\tidentifier=\"content\"\n\t\t\t\ttagName=\"p\"\n\t\t\t\t{ ...blockProps }\n\t\t\t\tvalue={ content }\n\t\t\t\tonChange={ ( newContent ) =>\n\t\t\t\t\tsetAttributes( { content: newContent } )\n\t\t\t\t}\n\t\t\t\tonSplit={ ( value, isOriginal ) => {\n\t\t\t\t\tlet newAttributes;\n\n\t\t\t\t\tif ( isOriginal || value ) {\n\t\t\t\t\t\tnewAttributes = {\n\t\t\t\t\t\t\t...attributes,\n\t\t\t\t\t\t\tcontent: value,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\tconst block = createBlock( name, newAttributes );\n\n\t\t\t\t\tif ( isOriginal ) {\n\t\t\t\t\t\tblock.clientId = clientId;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn block;\n\t\t\t\t} }\n\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\tonReplace={ onReplace }\n\t\t\t\tonRemove={ onRemove }\n\t\t\t\taria-label={\n\t\t\t\t\tcontent\n\t\t\t\t\t\t? __( 'Paragraph block' )\n\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t'Empty block; start writing or type forward slash to choose a block'\n\t\t\t\t\t\t )\n\t\t\t\t}\n\t\t\t\tdata-empty={ content ? false : true }\n\t\t\t\tplaceholder={ placeholder || __( 'Type / to choose a block' ) }\n\t\t\t\t__unstableEmbedURLOnPaste\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ParagraphBlock;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/paragraph/edit.js"],"names":["name","ParagraphRTLControl","direction","setDirection","icon","formatLtr","title","isActive","onClick","undefined","ParagraphBlock","attributes","mergeBlocks","onReplace","onRemove","setAttributes","clientId","align","content","dropCap","placeholder","isDropCapFeatureEnabled","blockProps","className","style","newAlign","newDirection","newContent","value","isOriginal","newAttributes","block"],"mappings":";;;;;;;;;;;;;AAGA;;AAKA;;AACA;;AAKA;;AAQA;;AACA;;AAvBA;AACA;AACA;;AAGA;AACA;AACA;AAkBA,MAAMA,IAAI,GAAG,gBAAb;;AAEA,SAASC,mBAAT,OAA4D;AAAA,MAA9B;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,GAA8B;AAC3D,SACC,sBACC,4BAAC,+BAAD;AACC,IAAA,QAAQ,EAAG,CACV;AACCC,MAAAA,IAAI,EAAEC,gBADP;AAECC,MAAAA,KAAK,EAAE,cAAI,eAAJ,EAAqB,eAArB,CAFR;AAGCC,MAAAA,QAAQ,EAAEL,SAAS,KAAK,KAHzB;;AAICM,MAAAA,OAAO,GAAG;AACTL,QAAAA,YAAY,CACXD,SAAS,KAAK,KAAd,GAAsBO,SAAtB,GAAkC,KADvB,CAAZ;AAGA;;AARF,KADU;AADZ,IAFF;AAkBA;;AAED,SAASC,cAAT,QAOI;AAAA,MAPqB;AACxBC,IAAAA,UADwB;AAExBC,IAAAA,WAFwB;AAGxBC,IAAAA,SAHwB;AAIxBC,IAAAA,QAJwB;AAKxBC,IAAAA,aALwB;AAMxBC,IAAAA;AANwB,GAOrB;AACH,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA,OAAT;AAAkBhB,IAAAA,SAAlB;AAA6BiB,IAAAA,OAA7B;AAAsCC,IAAAA;AAAtC,MAAsDT,UAA5D;AACA,QAAMU,uBAAuB,GAAG,6BAAY,oBAAZ,CAAhC;AACA,QAAMC,UAAU,GAAG,gCAAe;AACjCC,IAAAA,SAAS,EAAE,yBAAY;AACtB,sBAAgBJ,OADM;AAEtB,OAAG,kBAAkBF,KAAO,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KAGMG,UAHN;AAIC,IAAA,KAAK,EAAGJ,OAJT;AAKC,IAAA,QAAQ,EAAKS,UAAF,IACVZ,aAAa,CAAE;AAAEG,MAAAA,OAAO,EAAES;AAAX,KAAF,CANf;AAQC,IAAA,OAAO,EAAG,CAAEC,KAAF,EAASC,UAAT,KAAyB;AAClC,UAAIC,aAAJ;;AAEA,UAAKD,UAAU,IAAID,KAAnB,EAA2B;AAC1BE,QAAAA,aAAa,GAAG,EACf,GAAGnB,UADY;AAEfO,UAAAA,OAAO,EAAEU;AAFM,SAAhB;AAIA;;AAED,YAAMG,KAAK,GAAG,yBAAa/B,IAAb,EAAmB8B,aAAnB,CAAd;;AAEA,UAAKD,UAAL,EAAkB;AACjBE,QAAAA,KAAK,CAACf,QAAN,GAAiBA,QAAjB;AACA;;AAED,aAAOe,KAAP;AACA,KAzBF;AA0BC,IAAA,OAAO,EAAGnB,WA1BX;AA2BC,IAAA,SAAS,EAAGC,SA3Bb;AA4BC,IAAA,QAAQ,EAAGC,QA5BZ;AA6BC,kBACCI,OAAO,GACJ,cAAI,iBAAJ,CADI,GAEJ,cACA,oEADA,CAhCL;AAoCC,kBAAaA,OAAO,GAAG,KAAH,GAAW,IApChC;AAqCC,IAAA,WAAW,EAAGE,WAAW,IAAI,cAAI,0BAAJ,CArC9B;AAsCC,IAAA,yBAAyB,MAtC1B;AAuCC,IAAA,oCAAoC;AAvCrC,KA3CD,CADD;AAuFA;;eAEcV,c","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, isRTL } from '@wordpress/i18n';\nimport {\n\tToolbarDropdownMenu,\n\tToggleControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\tuseSetting,\n} from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\nimport { formatLtr } from '@wordpress/icons';\n\nconst name = 'core/paragraph';\n\nfunction ParagraphRTLControl( { direction, setDirection } ) {\n\treturn (\n\t\tisRTL() && (\n\t\t\t<ToolbarDropdownMenu\n\t\t\t\tcontrols={ [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: formatLtr,\n\t\t\t\t\t\ttitle: _x( 'Left to right', 'editor button' ),\n\t\t\t\t\t\tisActive: direction === 'ltr',\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\tsetDirection(\n\t\t\t\t\t\t\t\tdirection === 'ltr' ? undefined : 'ltr'\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/>\n\t\t)\n\t);\n}\n\nfunction ParagraphBlock( {\n\tattributes,\n\tmergeBlocks,\n\tonReplace,\n\tonRemove,\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst { align, content, direction, dropCap, placeholder } = attributes;\n\tconst isDropCapFeatureEnabled = useSetting( 'typography.dropCap' );\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( {\n\t\t\t'has-drop-cap': dropCap,\n\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t} ),\n\t\tstyle: { direction },\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ align }\n\t\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\t\tsetAttributes( { align: newAlign } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ParagraphRTLControl\n\t\t\t\t\tdirection={ direction }\n\t\t\t\t\tsetDirection={ ( newDirection ) =>\n\t\t\t\t\t\tsetAttributes( { direction: newDirection } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t{ isDropCapFeatureEnabled && (\n\t\t\t\t<InspectorControls __experimentalGroup=\"typography\">\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => !! dropCap }\n\t\t\t\t\t\tlabel={ __( 'Drop cap' ) }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { dropCap: undefined } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresetAllFilter={ () => ( { dropCap: undefined } ) }\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Drop cap' ) }\n\t\t\t\t\t\t\tchecked={ !! dropCap }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { dropCap: ! dropCap } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\tdropCap\n\t\t\t\t\t\t\t\t\t? __( 'Showing large initial letter.' )\n\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t'Toggle to show a large initial letter.'\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<RichText\n\t\t\t\tidentifier=\"content\"\n\t\t\t\ttagName=\"p\"\n\t\t\t\t{ ...blockProps }\n\t\t\t\tvalue={ content }\n\t\t\t\tonChange={ ( newContent ) =>\n\t\t\t\t\tsetAttributes( { content: newContent } )\n\t\t\t\t}\n\t\t\t\tonSplit={ ( value, isOriginal ) => {\n\t\t\t\t\tlet newAttributes;\n\n\t\t\t\t\tif ( isOriginal || value ) {\n\t\t\t\t\t\tnewAttributes = {\n\t\t\t\t\t\t\t...attributes,\n\t\t\t\t\t\t\tcontent: value,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\tconst block = createBlock( name, newAttributes );\n\n\t\t\t\t\tif ( isOriginal ) {\n\t\t\t\t\t\tblock.clientId = clientId;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn block;\n\t\t\t\t} }\n\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\tonReplace={ onReplace }\n\t\t\t\tonRemove={ onRemove }\n\t\t\t\taria-label={\n\t\t\t\t\tcontent\n\t\t\t\t\t\t? __( 'Paragraph block' )\n\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t'Empty block; start writing or type forward slash to choose a block'\n\t\t\t\t\t\t )\n\t\t\t\t}\n\t\t\t\tdata-empty={ content ? false : true }\n\t\t\t\tplaceholder={ placeholder || __( 'Type / to choose a block' ) }\n\t\t\t\t__unstableEmbedURLOnPaste\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ParagraphBlock;\n"]}
@@ -33,11 +33,12 @@ var _transforms = _interopRequireDefault(require("./transforms"));
33
33
  * Internal dependencies
34
34
  */
35
35
  const metadata = {
36
+ $schema: "https://schemas.wp.org/trunk/block.json",
36
37
  apiVersion: 2,
37
38
  name: "core/paragraph",
38
39
  title: "Paragraph",
39
40
  category: "text",
40
- description: "Start with the building block of all narrative.",
41
+ description: "Start with the basic building block of all narrative.",
41
42
  keywords: ["text"],
42
43
  textdomain: "default",
43
44
  attributes: {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/paragraph/index.js"],"names":["name","metadata","settings","icon","example","attributes","content","style","typography","fontSize","dropCap","__experimentalLabel","context","transforms","deprecated","merge","attributesToMerge","edit","save"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AAKA;;AACA;;AAEA;;AACA;;AAlBA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,gBADuB;AAEvBC,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACXC,MAAAA,OAAO,EAAE,cACR,kOADQ,CADE;AAIXC,MAAAA,KAAK,EAAE;AACNC,QAAAA,UAAU,EAAE;AACXC,UAAAA,QAAQ,EAAE;AADC;AADN,OAJI;AASXC,MAAAA,OAAO,EAAE;AATE;AADJ,GAFc;;AAevBC,EAAAA,mBAAmB,CAAEN,UAAF,QAA4B;AAAA,QAAd;AAAEO,MAAAA;AAAF,KAAc;;AAC9C,QAAKA,OAAO,KAAK,eAAjB,EAAmC;AAClC,YAAM;AAAEN,QAAAA;AAAF,UAAcD,UAApB;AACA,aAAO,qBAASC,OAAT,IAAqB,cAAI,OAAJ,CAArB,GAAqCA,OAA5C;AACA;AACD,GApBsB;;AAqBvBO,EAAAA,UAAU,EAAVA,mBArBuB;AAsBvBC,EAAAA,UAAU,EAAVA,mBAtBuB;;AAuBvBC,EAAAA,KAAK,CAAEV,UAAF,EAAcW,iBAAd,EAAkC;AACtC,WAAO;AACNV,MAAAA,OAAO,EACN,CAAED,UAAU,CAACC,OAAX,IAAsB,EAAxB,KACEU,iBAAiB,CAACV,OAAlB,IAA6B,EAD/B;AAFK,KAAP;AAKA,GA7BsB;;AA8BvBW,EAAAA,IAAI,EAAJA,aA9BuB;AA+BvBC,EAAAA,IAAI,EAAJA;AA/BuB,CAAjB","sourcesContent":["/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { paragraph 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';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcontent: __(\n\t\t\t\t'In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.'\n\t\t\t),\n\t\t\tstyle: {\n\t\t\t\ttypography: {\n\t\t\t\t\tfontSize: 28,\n\t\t\t\t},\n\t\t\t},\n\t\t\tdropCap: true,\n\t\t},\n\t},\n\t__experimentalLabel( attributes, { context } ) {\n\t\tif ( context === 'accessibility' ) {\n\t\t\tconst { content } = attributes;\n\t\t\treturn isEmpty( content ) ? __( 'Empty' ) : content;\n\t\t}\n\t},\n\ttransforms,\n\tdeprecated,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent:\n\t\t\t\t( attributes.content || '' ) +\n\t\t\t\t( attributesToMerge.content || '' ),\n\t\t};\n\t},\n\tedit,\n\tsave,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/paragraph/index.js"],"names":["name","metadata","settings","icon","example","attributes","content","style","typography","fontSize","dropCap","__experimentalLabel","context","transforms","deprecated","merge","attributesToMerge","edit","save"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AAKA;;AACA;;AAEA;;AACA;;AAlBA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,gBADuB;AAEvBC,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACXC,MAAAA,OAAO,EAAE,cACR,kOADQ,CADE;AAIXC,MAAAA,KAAK,EAAE;AACNC,QAAAA,UAAU,EAAE;AACXC,UAAAA,QAAQ,EAAE;AADC;AADN,OAJI;AASXC,MAAAA,OAAO,EAAE;AATE;AADJ,GAFc;;AAevBC,EAAAA,mBAAmB,CAAEN,UAAF,QAA4B;AAAA,QAAd;AAAEO,MAAAA;AAAF,KAAc;;AAC9C,QAAKA,OAAO,KAAK,eAAjB,EAAmC;AAClC,YAAM;AAAEN,QAAAA;AAAF,UAAcD,UAApB;AACA,aAAO,qBAASC,OAAT,IAAqB,cAAI,OAAJ,CAArB,GAAqCA,OAA5C;AACA;AACD,GApBsB;;AAqBvBO,EAAAA,UAAU,EAAVA,mBArBuB;AAsBvBC,EAAAA,UAAU,EAAVA,mBAtBuB;;AAuBvBC,EAAAA,KAAK,CAAEV,UAAF,EAAcW,iBAAd,EAAkC;AACtC,WAAO;AACNV,MAAAA,OAAO,EACN,CAAED,UAAU,CAACC,OAAX,IAAsB,EAAxB,KACEU,iBAAiB,CAACV,OAAlB,IAA6B,EAD/B;AAFK,KAAP;AAKA,GA7BsB;;AA8BvBW,EAAAA,IAAI,EAAJA,aA9BuB;AA+BvBC,EAAAA,IAAI,EAAJA;AA/BuB,CAAjB","sourcesContent":["/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { paragraph 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';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcontent: __(\n\t\t\t\t'In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.'\n\t\t\t),\n\t\t\tstyle: {\n\t\t\t\ttypography: {\n\t\t\t\t\tfontSize: 28,\n\t\t\t\t},\n\t\t\t},\n\t\t\tdropCap: true,\n\t\t},\n\t},\n\t__experimentalLabel( attributes, { context } ) {\n\t\tif ( context === 'accessibility' ) {\n\t\t\tconst { content } = attributes;\n\t\t\treturn isEmpty( content ) ? __( 'Empty' ) : content;\n\t\t}\n\t},\n\ttransforms,\n\tdeprecated,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent:\n\t\t\t\t( attributes.content || '' ) +\n\t\t\t\t( attributesToMerge.content || '' ),\n\t\t};\n\t},\n\tedit,\n\tsave,\n};\n"]}
@@ -17,11 +17,12 @@ var _blocks = require("@wordpress/blocks");
17
17
  const {
18
18
  name: name
19
19
  } = {
20
+ $schema: "https://schemas.wp.org/trunk/block.json",
20
21
  apiVersion: 2,
21
22
  name: "core/paragraph",
22
23
  title: "Paragraph",
23
24
  category: "text",
24
- description: "Start with the building block of all narrative.",
25
+ description: "Start with the basic building block of all narrative.",
25
26
  keywords: ["text"],
26
27
  textdomain: "default",
27
28
  attributes: {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/paragraph/transforms.js"],"names":["transforms","from","type","priority","selector","schema","phrasingContentSchema","isPaste","p","children","attributes","transform","node","name","outerHTML","textAlign","style","align"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,UAAU,GAAG;AAClBC,EAAAA,IAAI,EAAE,CACL;AACCC,IAAAA,IAAI,EAAE,KADP;AAEC;AACAC,IAAAA,QAAQ,EAAE,EAHX;AAICC,IAAAA,QAAQ,EAAE,GAJX;AAKCC,IAAAA,MAAM,EAAE;AAAA,UAAE;AAAEC,QAAAA,qBAAF;AAAyBC,QAAAA;AAAzB,OAAF;AAAA,aAA4C;AACnDC,QAAAA,CAAC,EAAE;AACFC,UAAAA,QAAQ,EAAEH,qBADR;AAEFI,UAAAA,UAAU,EAAEH,OAAO,GAAG,EAAH,GAAQ,CAAE,OAAF,EAAW,IAAX;AAFzB;AADgD,OAA5C;AAAA,KALT;;AAWCI,IAAAA,SAAS,CAAEC,IAAF,EAAS;AACjB,YAAMF,UAAU,GAAG,gCAAoBG,IAApB,EAA0BD,IAAI,CAACE,SAA/B,CAAnB;AACA,YAAM;AAAEC,QAAAA;AAAF,UAAgBH,IAAI,CAACI,KAAL,IAAc,EAApC;;AAEA,UACCD,SAAS,KAAK,MAAd,IACAA,SAAS,KAAK,QADd,IAEAA,SAAS,KAAK,OAHf,EAIE;AACDL,QAAAA,UAAU,CAACO,KAAX,GAAmBF,SAAnB;AACA;;AAED,aAAO,yBAAaF,IAAb,EAAmBH,UAAnB,CAAP;AACA;;AAxBF,GADK;AADY,CAAnB;eA+BeV,U","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createBlock, getBlockAttributes } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { name } from './block.json';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'raw',\n\t\t\t// Paragraph is a fallback and should be matched last.\n\t\t\tpriority: 20,\n\t\t\tselector: 'p',\n\t\t\tschema: ( { phrasingContentSchema, isPaste } ) => ( {\n\t\t\t\tp: {\n\t\t\t\t\tchildren: phrasingContentSchema,\n\t\t\t\t\tattributes: isPaste ? [] : [ 'style', 'id' ],\n\t\t\t\t},\n\t\t\t} ),\n\t\t\ttransform( node ) {\n\t\t\t\tconst attributes = getBlockAttributes( name, node.outerHTML );\n\t\t\t\tconst { textAlign } = node.style || {};\n\n\t\t\t\tif (\n\t\t\t\t\ttextAlign === 'left' ||\n\t\t\t\t\ttextAlign === 'center' ||\n\t\t\t\t\ttextAlign === 'right'\n\t\t\t\t) {\n\t\t\t\t\tattributes.align = textAlign;\n\t\t\t\t}\n\n\t\t\t\treturn createBlock( name, attributes );\n\t\t\t},\n\t\t},\n\t],\n};\n\nexport default transforms;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/paragraph/transforms.js"],"names":["transforms","from","type","priority","selector","schema","phrasingContentSchema","isPaste","p","children","attributes","transform","node","name","outerHTML","textAlign","style","align"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,UAAU,GAAG;AAClBC,EAAAA,IAAI,EAAE,CACL;AACCC,IAAAA,IAAI,EAAE,KADP;AAEC;AACAC,IAAAA,QAAQ,EAAE,EAHX;AAICC,IAAAA,QAAQ,EAAE,GAJX;AAKCC,IAAAA,MAAM,EAAE;AAAA,UAAE;AAAEC,QAAAA,qBAAF;AAAyBC,QAAAA;AAAzB,OAAF;AAAA,aAA4C;AACnDC,QAAAA,CAAC,EAAE;AACFC,UAAAA,QAAQ,EAAEH,qBADR;AAEFI,UAAAA,UAAU,EAAEH,OAAO,GAAG,EAAH,GAAQ,CAAE,OAAF,EAAW,IAAX;AAFzB;AADgD,OAA5C;AAAA,KALT;;AAWCI,IAAAA,SAAS,CAAEC,IAAF,EAAS;AACjB,YAAMF,UAAU,GAAG,gCAAoBG,IAApB,EAA0BD,IAAI,CAACE,SAA/B,CAAnB;AACA,YAAM;AAAEC,QAAAA;AAAF,UAAgBH,IAAI,CAACI,KAAL,IAAc,EAApC;;AAEA,UACCD,SAAS,KAAK,MAAd,IACAA,SAAS,KAAK,QADd,IAEAA,SAAS,KAAK,OAHf,EAIE;AACDL,QAAAA,UAAU,CAACO,KAAX,GAAmBF,SAAnB;AACA;;AAED,aAAO,yBAAaF,IAAb,EAAmBH,UAAnB,CAAP;AACA;;AAxBF,GADK;AADY,CAAnB;eA+BeV,U","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createBlock, getBlockAttributes } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { name } from './block.json';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'raw',\n\t\t\t// Paragraph is a fallback and should be matched last.\n\t\t\tpriority: 20,\n\t\t\tselector: 'p',\n\t\t\tschema: ( { phrasingContentSchema, isPaste } ) => ( {\n\t\t\t\tp: {\n\t\t\t\t\tchildren: phrasingContentSchema,\n\t\t\t\t\tattributes: isPaste ? [] : [ 'style', 'id' ],\n\t\t\t\t},\n\t\t\t} ),\n\t\t\ttransform( node ) {\n\t\t\t\tconst attributes = getBlockAttributes( name, node.outerHTML );\n\t\t\t\tconst { textAlign } = node.style || {};\n\n\t\t\t\tif (\n\t\t\t\t\ttextAlign === 'left' ||\n\t\t\t\t\ttextAlign === 'center' ||\n\t\t\t\t\ttextAlign === 'right'\n\t\t\t\t) {\n\t\t\t\t\tattributes.align = textAlign;\n\t\t\t\t}\n\n\t\t\t\treturn createBlock( name, attributes );\n\t\t\t},\n\t\t},\n\t],\n};\n\nexport default transforms;\n"]}
@@ -13,6 +13,7 @@ var _edit = _interopRequireDefault(require("./edit"));
13
13
  * Internal dependencies
14
14
  */
15
15
  const metadata = {
16
+ $schema: "https://schemas.wp.org/trunk/block.json",
16
17
  apiVersion: 2,
17
18
  name: "core/pattern",
18
19
  title: "Pattern",
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/pattern/index.js"],"names":["name","metadata","settings","edit","PatternEdit"],"mappings":";;;;;;;;;AAIA;;AAJA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAIA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAEC;AADiB,CAAjB","sourcesContent":["/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport PatternEdit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\tedit: PatternEdit,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/pattern/index.js"],"names":["name","metadata","settings","edit","PatternEdit"],"mappings":";;;;;;;;;AAIA;;AAJA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAIA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAEC;AADiB,CAAjB","sourcesContent":["/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport PatternEdit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\tedit: PatternEdit,\n};\n"]}
@@ -15,11 +15,12 @@ var _icons = require("@wordpress/icons");
15
15
  * Internal dependencies
16
16
  */
17
17
  const metadata = {
18
+ $schema: "https://schemas.wp.org/trunk/block.json",
18
19
  apiVersion: 2,
19
20
  name: "core/post-author",
20
21
  title: "Post Author",
21
22
  category: "theme",
22
- description: "Add the author of this post.",
23
+ description: "Display post author details such as name, avatar, and bio.",
23
24
  textdomain: "default",
24
25
  attributes: {
25
26
  textAlign: {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/post-author/index.js"],"names":["name","metadata","settings","icon","edit"],"mappings":";;;;;;;;;AAIA;;AAKA;;AATA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,iBADuB;AAEvBC,EAAAA,IAAI,EAAJA;AAFuB,CAAjB","sourcesContent":["/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\n/**\n * WordPress dependencies\n */\nimport { postAuthor as icon } from '@wordpress/icons';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/post-author/index.js"],"names":["name","metadata","settings","icon","edit"],"mappings":";;;;;;;;;AAIA;;AAKA;;AATA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,iBADuB;AAEvBC,EAAAA,IAAI,EAAJA;AAFuB,CAAjB","sourcesContent":["/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\n/**\n * WordPress dependencies\n */\nimport { postAuthor as icon } from '@wordpress/icons';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}