@wordpress/block-library 9.8.7 → 9.10.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 (1111) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/audio/edit.native.js +1 -1
  3. package/build/audio/edit.native.js.map +1 -1
  4. package/build/avatar/index.js +2 -1
  5. package/build/avatar/index.js.map +1 -1
  6. package/build/block/edit.js.map +1 -1
  7. package/build/block/edit.native.js +2 -2
  8. package/build/block/edit.native.js.map +1 -1
  9. package/build/block-keyboard-shortcuts/index.js.map +1 -1
  10. package/build/button/deprecated.js.map +1 -1
  11. package/build/button/edit.js.map +1 -1
  12. package/build/button/edit.native.js.map +1 -1
  13. package/build/button/get-updated-link-attributes.js.map +1 -1
  14. package/build/button/save.js.map +1 -1
  15. package/build/buttons/deprecated.js.map +1 -1
  16. package/build/categories/edit.js +1 -1
  17. package/build/categories/edit.js.map +1 -1
  18. package/build/column/deprecated.js.map +1 -1
  19. package/build/column/edit.js +1 -1
  20. package/build/column/edit.js.map +1 -1
  21. package/build/column/edit.native.js.map +1 -1
  22. package/build/column/save.js.map +1 -1
  23. package/build/columns/deprecated.js.map +1 -1
  24. package/build/columns/edit.js.map +1 -1
  25. package/build/columns/edit.native.js +1 -1
  26. package/build/columns/edit.native.js.map +1 -1
  27. package/build/columns/save.js.map +1 -1
  28. package/build/columns/transforms.js.map +1 -1
  29. package/build/columns/utils.js.map +1 -1
  30. package/build/comment-author-avatar/edit.js.map +1 -1
  31. package/build/comment-author-name/edit.js.map +1 -1
  32. package/build/comment-author-name/index.js +2 -1
  33. package/build/comment-author-name/index.js.map +1 -1
  34. package/build/comment-content/edit.js.map +1 -1
  35. package/build/comment-content/index.js +2 -1
  36. package/build/comment-content/index.js.map +1 -1
  37. package/build/comment-date/index.js +2 -1
  38. package/build/comment-date/index.js.map +1 -1
  39. package/build/comment-edit-link/edit.js.map +1 -1
  40. package/build/comment-edit-link/index.js +2 -1
  41. package/build/comment-edit-link/index.js.map +1 -1
  42. package/build/comment-reply-link/edit.js.map +1 -1
  43. package/build/comment-reply-link/index.js +2 -1
  44. package/build/comment-reply-link/index.js.map +1 -1
  45. package/build/comment-template/hooks.js.map +1 -1
  46. package/build/comments/edit/comments-legacy.js.map +1 -1
  47. package/build/comments-pagination-next/edit.js.map +1 -1
  48. package/build/comments-pagination-next/index.js +5 -0
  49. package/build/comments-pagination-next/index.js.map +1 -1
  50. package/build/comments-pagination-numbers/edit.js.map +1 -1
  51. package/build/comments-pagination-numbers/index.js +2 -1
  52. package/build/comments-pagination-numbers/index.js.map +1 -1
  53. package/build/comments-pagination-previous/edit.js.map +1 -1
  54. package/build/comments-pagination-previous/index.js +5 -0
  55. package/build/comments-pagination-previous/index.js.map +1 -1
  56. package/build/comments-title/edit.js +2 -2
  57. package/build/comments-title/edit.js.map +1 -1
  58. package/build/comments-title/index.js +2 -1
  59. package/build/comments-title/index.js.map +1 -1
  60. package/build/cover/controls.native.js.map +1 -1
  61. package/build/cover/deprecated.js.map +1 -1
  62. package/build/cover/edit/index.js.map +1 -1
  63. package/build/cover/edit/inspector-controls.js +74 -30
  64. package/build/cover/edit/inspector-controls.js.map +1 -1
  65. package/build/cover/save.js.map +1 -1
  66. package/build/cover/shared.js.map +1 -1
  67. package/build/embed/deprecated.js.map +1 -1
  68. package/build/embed/edit.js +16 -3
  69. package/build/embed/edit.js.map +1 -1
  70. package/build/embed/embed-preview.js +5 -19
  71. package/build/embed/embed-preview.js.map +1 -1
  72. package/build/embed/embed-preview.native.js +1 -1
  73. package/build/embed/embed-preview.native.js.map +1 -1
  74. package/build/embed/save.js.map +1 -1
  75. package/build/embed/transforms.js.map +1 -1
  76. package/build/embed/variations.js +1 -1
  77. package/build/embed/variations.js.map +1 -1
  78. package/build/embed/wp-embed-preview.native.js.map +1 -1
  79. package/build/file/deprecated.js +3 -3
  80. package/build/file/deprecated.js.map +1 -1
  81. package/build/file/edit.js.map +1 -1
  82. package/build/file/index.js +8 -4
  83. package/build/file/index.js.map +1 -1
  84. package/build/file/save.js.map +1 -1
  85. package/build/footnotes/edit.js.map +1 -1
  86. package/build/footnotes/format.js.map +1 -1
  87. package/build/form/edit.js.map +1 -1
  88. package/build/form-submission-notification/edit.js.map +1 -1
  89. package/build/form-submission-notification/save.js.map +1 -1
  90. package/build/freeform/edit.js.map +1 -1
  91. package/build/freeform/modal.js.map +1 -1
  92. package/build/gallery/deprecated.js.map +1 -1
  93. package/build/gallery/edit.js +2 -2
  94. package/build/gallery/edit.js.map +1 -1
  95. package/build/gallery/gallery.js.map +1 -1
  96. package/build/gallery/gallery.native.js +1 -1
  97. package/build/gallery/gallery.native.js.map +1 -1
  98. package/build/gallery/gap-styles.js.map +1 -1
  99. package/build/gallery/save.js.map +1 -1
  100. package/build/group/placeholder.js.map +1 -1
  101. package/build/heading/deprecated.js.map +1 -1
  102. package/build/heading/edit.js.map +1 -1
  103. package/build/heading/edit.native.js.map +1 -1
  104. package/build/heading/index.js +2 -2
  105. package/build/heading/index.js.map +1 -1
  106. package/build/heading/save.js.map +1 -1
  107. package/build/heading/transforms.js.map +1 -1
  108. package/build/home-link/edit.js.map +1 -1
  109. package/build/html/preview.js.map +1 -1
  110. package/build/image/deprecated.js.map +1 -1
  111. package/build/image/edit.js +1 -1
  112. package/build/image/edit.js.map +1 -1
  113. package/build/image/edit.native.js +1 -1
  114. package/build/image/edit.native.js.map +1 -1
  115. package/build/image/image.js +3 -3
  116. package/build/image/image.js.map +1 -1
  117. package/build/image/save.js.map +1 -1
  118. package/build/image/view.js.map +1 -1
  119. package/build/index.native.js.map +1 -1
  120. package/build/latest-posts/edit.js +2 -2
  121. package/build/latest-posts/edit.js.map +1 -1
  122. package/build/media-text/deprecated.js.map +1 -1
  123. package/build/media-text/edit.js.map +1 -1
  124. package/build/media-text/edit.native.js.map +1 -1
  125. package/build/media-text/image-fill.js.map +1 -1
  126. package/build/media-text/save.js.map +1 -1
  127. package/build/missing/edit.js +2 -2
  128. package/build/missing/edit.js.map +1 -1
  129. package/build/more/edit.js.map +1 -1
  130. package/build/more/save.js.map +1 -1
  131. package/build/navigation/edit/accessible-menu-description.js.map +1 -1
  132. package/build/navigation/edit/index.js.map +1 -1
  133. package/build/navigation/edit/leaf-more-menu.js +1 -1
  134. package/build/navigation/edit/leaf-more-menu.js.map +1 -1
  135. package/build/navigation/edit/menu-inspector-controls.js +1 -1
  136. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  137. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  138. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  139. package/build/navigation/edit/use-create-navigation-menu.js.map +1 -1
  140. package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  141. package/build/navigation/edit/utils.js.map +1 -1
  142. package/build/navigation/use-navigation-menu.js.map +1 -1
  143. package/build/navigation-link/edit.js.map +1 -1
  144. package/build/navigation-link/link-ui.js.map +1 -1
  145. package/build/nextpage/edit.native.js +1 -1
  146. package/build/nextpage/edit.native.js.map +1 -1
  147. package/build/page-list-item/edit.js +1 -1
  148. package/build/page-list-item/edit.js.map +1 -1
  149. package/build/paragraph/deprecated.js.map +1 -1
  150. package/build/paragraph/edit.js.map +1 -1
  151. package/build/paragraph/save.js.map +1 -1
  152. package/build/pattern/recursion-detector.js +1 -0
  153. package/build/pattern/recursion-detector.js.map +1 -1
  154. package/build/post-author/edit.js.map +1 -1
  155. package/build/post-author-biography/edit.js.map +1 -1
  156. package/build/post-author-name/edit.js.map +1 -1
  157. package/build/post-comments-count/edit.js.map +1 -1
  158. package/build/post-comments-form/edit.js.map +1 -1
  159. package/build/post-comments-form/form.js +1 -1
  160. package/build/post-comments-form/form.js.map +1 -1
  161. package/build/post-comments-link/edit.js +1 -1
  162. package/build/post-comments-link/edit.js.map +1 -1
  163. package/build/post-date/edit.js.map +1 -1
  164. package/build/post-excerpt/edit.js.map +1 -1
  165. package/build/post-navigation-link/edit.js.map +1 -1
  166. package/build/post-navigation-link/index.js +6 -0
  167. package/build/post-navigation-link/index.js.map +1 -1
  168. package/build/post-navigation-link/variations.js +14 -2
  169. package/build/post-navigation-link/variations.js.map +1 -1
  170. package/build/post-template/edit.js.map +1 -1
  171. package/build/post-terms/edit.js.map +1 -1
  172. package/build/post-time-to-read/edit.js +1 -1
  173. package/build/post-time-to-read/edit.js.map +1 -1
  174. package/build/post-time-to-read/index.js +2 -1
  175. package/build/post-time-to-read/index.js.map +1 -1
  176. package/build/post-title/edit.js.map +1 -1
  177. package/build/pullquote/deprecated.js.map +1 -1
  178. package/build/pullquote/edit.js.map +1 -1
  179. package/build/pullquote/save.js.map +1 -1
  180. package/build/pullquote/shared.js.map +1 -1
  181. package/build/query/edit/inspector-controls/author-control.js +1 -0
  182. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  183. package/build/query/edit/inspector-controls/index.js +7 -10
  184. package/build/query/edit/inspector-controls/index.js.map +1 -1
  185. package/build/query/edit/inspector-controls/order-control.js.map +1 -1
  186. package/build/query/edit/inspector-controls/pages-control.js +1 -1
  187. package/build/query/edit/inspector-controls/pages-control.js.map +1 -1
  188. package/build/query/edit/inspector-controls/parent-control.js +1 -0
  189. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  190. package/build/query/edit/inspector-controls/per-page-control.js +1 -1
  191. package/build/query/edit/inspector-controls/per-page-control.js.map +1 -1
  192. package/build/query/edit/inspector-controls/taxonomy-controls.js +1 -0
  193. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  194. package/build/query/edit/pattern-selection-modal.js +1 -1
  195. package/build/query/edit/pattern-selection-modal.js.map +1 -1
  196. package/build/query/index.js +1 -0
  197. package/build/query/index.js.map +1 -1
  198. package/build/query/utils.js.map +1 -1
  199. package/build/query/view.js.map +1 -1
  200. package/build/query-no-results/index.js +8 -0
  201. package/build/query-no-results/index.js.map +1 -1
  202. package/build/query-pagination-next/edit.js.map +1 -1
  203. package/build/query-pagination-numbers/edit.js.map +1 -1
  204. package/build/query-pagination-numbers/index.js +2 -1
  205. package/build/query-pagination-numbers/index.js.map +1 -1
  206. package/build/query-pagination-previous/edit.js.map +1 -1
  207. package/build/query-title/edit.js +3 -3
  208. package/build/query-title/edit.js.map +1 -1
  209. package/build/query-title/index.js +5 -0
  210. package/build/query-title/index.js.map +1 -1
  211. package/build/quote/deprecated.js.map +1 -1
  212. package/build/quote/edit.js.map +1 -1
  213. package/build/quote/save.js.map +1 -1
  214. package/build/quote/transforms.js.map +1 -1
  215. package/build/search/edit.js.map +1 -1
  216. package/build/search/edit.native.js.map +1 -1
  217. package/build/shortcode/edit.js.map +1 -1
  218. package/build/site-logo/edit.js +5 -3
  219. package/build/site-logo/edit.js.map +1 -1
  220. package/build/site-tagline/edit.js.map +1 -1
  221. package/build/site-title/edit.js.map +1 -1
  222. package/build/social-link/edit.js.map +1 -1
  223. package/build/social-link/edit.native.js.map +1 -1
  224. package/build/social-links/deprecated.js.map +1 -1
  225. package/build/social-links/edit.js.map +1 -1
  226. package/build/spacer/controls.native.js.map +1 -1
  227. package/build/spacer/deprecated.js.map +1 -1
  228. package/build/spacer/edit.js.map +1 -1
  229. package/build/table/deprecated.js.map +1 -1
  230. package/build/table/edit.js.map +1 -1
  231. package/build/table/save.js.map +1 -1
  232. package/build/table-of-contents/edit.js +1 -1
  233. package/build/table-of-contents/edit.js.map +1 -1
  234. package/build/table-of-contents/hooks.js.map +1 -1
  235. package/build/table-of-contents/index.js +42 -1
  236. package/build/table-of-contents/index.js.map +1 -1
  237. package/build/tag-cloud/edit.js.map +1 -1
  238. package/build/template-part/edit/advanced-controls.js +1 -1
  239. package/build/template-part/edit/advanced-controls.js.map +1 -1
  240. package/build/template-part/edit/import-controls.js +2 -1
  241. package/build/template-part/edit/import-controls.js.map +1 -1
  242. package/build/template-part/edit/index.js +2 -2
  243. package/build/template-part/edit/index.js.map +1 -1
  244. package/build/template-part/edit/selection-modal.js +2 -2
  245. package/build/template-part/edit/selection-modal.js.map +1 -1
  246. package/build/template-part/edit/utils/hooks.js.map +1 -1
  247. package/build/template-part/variations.js.map +1 -1
  248. package/build/term-description/edit.js.map +1 -1
  249. package/build/term-description/index.js +2 -1
  250. package/build/term-description/index.js.map +1 -1
  251. package/build/text-columns/edit.js.map +1 -1
  252. package/build/text-columns/save.js.map +1 -1
  253. package/build/verse/deprecated.js.map +1 -1
  254. package/build/verse/edit.js.map +1 -1
  255. package/build/verse/save.js.map +1 -1
  256. package/build/video/edit.js +1 -1
  257. package/build/video/edit.js.map +1 -1
  258. package/build/video/edit.native.js +1 -1
  259. package/build/video/edit.native.js.map +1 -1
  260. package/build/video/tracks-editor.js +1 -1
  261. package/build/video/tracks-editor.js.map +1 -1
  262. package/build-module/archives/edit.js +1 -3
  263. package/build-module/archives/edit.js.map +1 -1
  264. package/build-module/audio/deprecated.js +1 -2
  265. package/build-module/audio/deprecated.js.map +1 -1
  266. package/build-module/audio/edit.js +1 -3
  267. package/build-module/audio/edit.js.map +1 -1
  268. package/build-module/audio/edit.native.js +2 -4
  269. package/build-module/audio/edit.native.js.map +1 -1
  270. package/build-module/audio/save.js +1 -2
  271. package/build-module/audio/save.js.map +1 -1
  272. package/build-module/avatar/edit.js +1 -3
  273. package/build-module/avatar/edit.js.map +1 -1
  274. package/build-module/avatar/index.js +2 -1
  275. package/build-module/avatar/index.js.map +1 -1
  276. package/build-module/block/edit-title.native.js +1 -2
  277. package/build-module/block/edit-title.native.js.map +1 -1
  278. package/build-module/block/edit.js +1 -3
  279. package/build-module/block/edit.js.map +1 -1
  280. package/build-module/block/edit.native.js +3 -4
  281. package/build-module/block/edit.native.js.map +1 -1
  282. package/build-module/block-keyboard-shortcuts/index.js.map +1 -1
  283. package/build-module/button/color-background.native.js +1 -2
  284. package/build-module/button/color-background.native.js.map +1 -1
  285. package/build-module/button/deprecated.js.map +1 -1
  286. package/build-module/button/edit.js +1 -3
  287. package/build-module/button/edit.js.map +1 -1
  288. package/build-module/button/edit.native.js +1 -3
  289. package/build-module/button/edit.native.js.map +1 -1
  290. package/build-module/button/get-updated-link-attributes.js.map +1 -1
  291. package/build-module/button/save.js.map +1 -1
  292. package/build-module/buttons/deprecated.js.map +1 -1
  293. package/build-module/buttons/edit.native.js +1 -3
  294. package/build-module/buttons/edit.native.js.map +1 -1
  295. package/build-module/categories/edit.js +2 -4
  296. package/build-module/categories/edit.js.map +1 -1
  297. package/build-module/column/deprecated.js.map +1 -1
  298. package/build-module/column/edit.js +2 -4
  299. package/build-module/column/edit.js.map +1 -1
  300. package/build-module/column/edit.native.js +1 -3
  301. package/build-module/column/edit.native.js.map +1 -1
  302. package/build-module/column/save.js.map +1 -1
  303. package/build-module/columns/deprecated.js.map +1 -1
  304. package/build-module/columns/edit.js +1 -3
  305. package/build-module/columns/edit.js.map +1 -1
  306. package/build-module/columns/edit.native.js +2 -4
  307. package/build-module/columns/edit.native.js.map +1 -1
  308. package/build-module/columns/save.js.map +1 -1
  309. package/build-module/columns/transforms.js.map +1 -1
  310. package/build-module/columns/utils.js.map +1 -1
  311. package/build-module/comment-author-avatar/edit.js +1 -3
  312. package/build-module/comment-author-avatar/edit.js.map +1 -1
  313. package/build-module/comment-author-name/edit.js +1 -3
  314. package/build-module/comment-author-name/edit.js.map +1 -1
  315. package/build-module/comment-author-name/index.js +2 -1
  316. package/build-module/comment-author-name/index.js.map +1 -1
  317. package/build-module/comment-content/edit.js +1 -3
  318. package/build-module/comment-content/edit.js.map +1 -1
  319. package/build-module/comment-content/index.js +2 -1
  320. package/build-module/comment-content/index.js.map +1 -1
  321. package/build-module/comment-date/edit.js +1 -3
  322. package/build-module/comment-date/edit.js.map +1 -1
  323. package/build-module/comment-date/index.js +2 -1
  324. package/build-module/comment-date/index.js.map +1 -1
  325. package/build-module/comment-edit-link/edit.js +1 -3
  326. package/build-module/comment-edit-link/edit.js.map +1 -1
  327. package/build-module/comment-edit-link/index.js +2 -1
  328. package/build-module/comment-edit-link/index.js.map +1 -1
  329. package/build-module/comment-reply-link/edit.js +1 -3
  330. package/build-module/comment-reply-link/edit.js.map +1 -1
  331. package/build-module/comment-reply-link/index.js +2 -1
  332. package/build-module/comment-reply-link/index.js.map +1 -1
  333. package/build-module/comment-template/edit.js +1 -2
  334. package/build-module/comment-template/edit.js.map +1 -1
  335. package/build-module/comment-template/hooks.js.map +1 -1
  336. package/build-module/comments/edit/comments-legacy.js +1 -3
  337. package/build-module/comments/edit/comments-legacy.js.map +1 -1
  338. package/build-module/comments/edit/index.js +1 -3
  339. package/build-module/comments/edit/index.js.map +1 -1
  340. package/build-module/comments/edit/placeholder.js +1 -2
  341. package/build-module/comments/edit/placeholder.js.map +1 -1
  342. package/build-module/comments-pagination/comments-pagination-arrow-controls.js +1 -2
  343. package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
  344. package/build-module/comments-pagination/edit.js +1 -3
  345. package/build-module/comments-pagination/edit.js.map +1 -1
  346. package/build-module/comments-pagination-next/edit.js +1 -2
  347. package/build-module/comments-pagination-next/edit.js.map +1 -1
  348. package/build-module/comments-pagination-next/index.js +5 -0
  349. package/build-module/comments-pagination-next/index.js.map +1 -1
  350. package/build-module/comments-pagination-numbers/edit.js +1 -2
  351. package/build-module/comments-pagination-numbers/edit.js.map +1 -1
  352. package/build-module/comments-pagination-numbers/index.js +2 -1
  353. package/build-module/comments-pagination-numbers/index.js.map +1 -1
  354. package/build-module/comments-pagination-previous/edit.js +1 -2
  355. package/build-module/comments-pagination-previous/edit.js.map +1 -1
  356. package/build-module/comments-pagination-previous/index.js +5 -0
  357. package/build-module/comments-pagination-previous/index.js.map +1 -1
  358. package/build-module/comments-title/edit.js +3 -5
  359. package/build-module/comments-title/edit.js.map +1 -1
  360. package/build-module/comments-title/index.js +2 -1
  361. package/build-module/comments-title/index.js.map +1 -1
  362. package/build-module/cover/controls.native.js +1 -3
  363. package/build-module/cover/controls.native.js.map +1 -1
  364. package/build-module/cover/deprecated.js +1 -2
  365. package/build-module/cover/deprecated.js.map +1 -1
  366. package/build-module/cover/edit/block-controls.js +1 -3
  367. package/build-module/cover/edit/block-controls.js.map +1 -1
  368. package/build-module/cover/edit/index.js +1 -3
  369. package/build-module/cover/edit/index.js.map +1 -1
  370. package/build-module/cover/edit/inspector-controls.js +76 -34
  371. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  372. package/build-module/cover/edit.native.js +1 -3
  373. package/build-module/cover/edit.native.js.map +1 -1
  374. package/build-module/cover/save.js +1 -2
  375. package/build-module/cover/save.js.map +1 -1
  376. package/build-module/cover/shared.js.map +1 -1
  377. package/build-module/details/edit.js +1 -3
  378. package/build-module/details/edit.js.map +1 -1
  379. package/build-module/details/save.js +1 -2
  380. package/build-module/details/save.js.map +1 -1
  381. package/build-module/embed/deprecated.js +1 -2
  382. package/build-module/embed/deprecated.js.map +1 -1
  383. package/build-module/embed/edit.js +17 -6
  384. package/build-module/embed/edit.js.map +1 -1
  385. package/build-module/embed/edit.native.js +1 -3
  386. package/build-module/embed/edit.native.js.map +1 -1
  387. package/build-module/embed/embed-controls.js +1 -3
  388. package/build-module/embed/embed-controls.js.map +1 -1
  389. package/build-module/embed/embed-controls.native.js +1 -3
  390. package/build-module/embed/embed-controls.native.js.map +1 -1
  391. package/build-module/embed/embed-no-preview.native.js +1 -3
  392. package/build-module/embed/embed-no-preview.native.js.map +1 -1
  393. package/build-module/embed/embed-placeholder.js +1 -2
  394. package/build-module/embed/embed-placeholder.js.map +1 -1
  395. package/build-module/embed/embed-placeholder.native.js +1 -3
  396. package/build-module/embed/embed-placeholder.native.js.map +1 -1
  397. package/build-module/embed/embed-preview.js +6 -21
  398. package/build-module/embed/embed-preview.js.map +1 -1
  399. package/build-module/embed/embed-preview.native.js +2 -4
  400. package/build-module/embed/embed-preview.native.js.map +1 -1
  401. package/build-module/embed/icons.js +1 -2
  402. package/build-module/embed/icons.js.map +1 -1
  403. package/build-module/embed/save.js +1 -2
  404. package/build-module/embed/save.js.map +1 -1
  405. package/build-module/embed/transforms.js.map +1 -1
  406. package/build-module/embed/variations.js +1 -1
  407. package/build-module/embed/variations.js.map +1 -1
  408. package/build-module/embed/wp-embed-preview.native.js.map +1 -1
  409. package/build-module/file/deprecated.js +4 -6
  410. package/build-module/file/deprecated.js.map +1 -1
  411. package/build-module/file/edit.js +1 -3
  412. package/build-module/file/edit.js.map +1 -1
  413. package/build-module/file/edit.native.js +1 -2
  414. package/build-module/file/edit.native.js.map +1 -1
  415. package/build-module/file/index.js +8 -4
  416. package/build-module/file/index.js.map +1 -1
  417. package/build-module/file/inspector.js +1 -3
  418. package/build-module/file/inspector.js.map +1 -1
  419. package/build-module/file/save.js +1 -3
  420. package/build-module/file/save.js.map +1 -1
  421. package/build-module/footnotes/edit.js +1 -2
  422. package/build-module/footnotes/edit.js.map +1 -1
  423. package/build-module/footnotes/format.js.map +1 -1
  424. package/build-module/form/edit.js +1 -3
  425. package/build-module/form/edit.js.map +1 -1
  426. package/build-module/form-input/deprecated.js +1 -2
  427. package/build-module/form-input/deprecated.js.map +1 -1
  428. package/build-module/form-input/edit.js +1 -3
  429. package/build-module/form-input/edit.js.map +1 -1
  430. package/build-module/form-input/save.js +1 -2
  431. package/build-module/form-input/save.js.map +1 -1
  432. package/build-module/form-submission-notification/edit.js.map +1 -1
  433. package/build-module/form-submission-notification/save.js.map +1 -1
  434. package/build-module/freeform/edit.js +1 -3
  435. package/build-module/freeform/edit.js.map +1 -1
  436. package/build-module/freeform/modal.js +1 -3
  437. package/build-module/freeform/modal.js.map +1 -1
  438. package/build-module/gallery/deprecated.js +1 -2
  439. package/build-module/gallery/deprecated.js.map +1 -1
  440. package/build-module/gallery/edit.js +3 -5
  441. package/build-module/gallery/edit.js.map +1 -1
  442. package/build-module/gallery/gallery.js +1 -2
  443. package/build-module/gallery/gallery.js.map +1 -1
  444. package/build-module/gallery/gallery.native.js +2 -3
  445. package/build-module/gallery/gallery.native.js.map +1 -1
  446. package/build-module/gallery/gap-styles.js.map +1 -1
  447. package/build-module/gallery/save.js +1 -2
  448. package/build-module/gallery/save.js.map +1 -1
  449. package/build-module/group/edit.js +1 -3
  450. package/build-module/group/edit.js.map +1 -1
  451. package/build-module/group/edit.native.js +1 -2
  452. package/build-module/group/edit.native.js.map +1 -1
  453. package/build-module/group/placeholder.js.map +1 -1
  454. package/build-module/heading/deprecated.js.map +1 -1
  455. package/build-module/heading/edit.js +1 -3
  456. package/build-module/heading/edit.js.map +1 -1
  457. package/build-module/heading/edit.native.js +1 -3
  458. package/build-module/heading/edit.native.js.map +1 -1
  459. package/build-module/heading/index.js +2 -2
  460. package/build-module/heading/index.js.map +1 -1
  461. package/build-module/heading/save.js.map +1 -1
  462. package/build-module/heading/transforms.js.map +1 -1
  463. package/build-module/home-link/edit.js +1 -2
  464. package/build-module/home-link/edit.js.map +1 -1
  465. package/build-module/html/edit.js +1 -3
  466. package/build-module/html/edit.js.map +1 -1
  467. package/build-module/html/preview.js +1 -3
  468. package/build-module/html/preview.js.map +1 -1
  469. package/build-module/image/deprecated.js +1 -3
  470. package/build-module/image/deprecated.js.map +1 -1
  471. package/build-module/image/edit.js +2 -4
  472. package/build-module/image/edit.js.map +1 -1
  473. package/build-module/image/edit.native.js +2 -4
  474. package/build-module/image/edit.native.js.map +1 -1
  475. package/build-module/image/image.js +4 -6
  476. package/build-module/image/image.js.map +1 -1
  477. package/build-module/image/save.js +1 -3
  478. package/build-module/image/save.js.map +1 -1
  479. package/build-module/image/view.js.map +1 -1
  480. package/build-module/index.native.js.map +1 -1
  481. package/build-module/latest-comments/edit.js +1 -2
  482. package/build-module/latest-comments/edit.js.map +1 -1
  483. package/build-module/latest-posts/edit.js +3 -5
  484. package/build-module/latest-posts/edit.js.map +1 -1
  485. package/build-module/latest-posts/edit.native.js +1 -3
  486. package/build-module/latest-posts/edit.native.js.map +1 -1
  487. package/build-module/list/edit.js +1 -3
  488. package/build-module/list/edit.js.map +1 -1
  489. package/build-module/list/ordered-list-settings.js +1 -2
  490. package/build-module/list/ordered-list-settings.js.map +1 -1
  491. package/build-module/list-item/edit.js +1 -3
  492. package/build-module/list-item/edit.js.map +1 -1
  493. package/build-module/list-item/edit.native.js +1 -2
  494. package/build-module/list-item/edit.native.js.map +1 -1
  495. package/build-module/list-item/list-style-type.native.js +1 -2
  496. package/build-module/list-item/list-style-type.native.js.map +1 -1
  497. package/build-module/list-item/save.js +1 -2
  498. package/build-module/list-item/save.js.map +1 -1
  499. package/build-module/loginout/edit.js +1 -3
  500. package/build-module/loginout/edit.js.map +1 -1
  501. package/build-module/media-text/deprecated.js +1 -2
  502. package/build-module/media-text/deprecated.js.map +1 -1
  503. package/build-module/media-text/edit.js +1 -3
  504. package/build-module/media-text/edit.js.map +1 -1
  505. package/build-module/media-text/edit.native.js +1 -3
  506. package/build-module/media-text/edit.native.js.map +1 -1
  507. package/build-module/media-text/icon-retry.native.js +1 -2
  508. package/build-module/media-text/icon-retry.native.js.map +1 -1
  509. package/build-module/media-text/image-fill.js.map +1 -1
  510. package/build-module/media-text/media-container.js +1 -2
  511. package/build-module/media-text/media-container.js.map +1 -1
  512. package/build-module/media-text/media-container.native.js +1 -3
  513. package/build-module/media-text/media-container.native.js.map +1 -1
  514. package/build-module/media-text/save.js +1 -2
  515. package/build-module/media-text/save.js.map +1 -1
  516. package/build-module/missing/edit.js +3 -4
  517. package/build-module/missing/edit.js.map +1 -1
  518. package/build-module/missing/edit.native.js +1 -2
  519. package/build-module/missing/edit.native.js.map +1 -1
  520. package/build-module/more/edit.js +1 -3
  521. package/build-module/more/edit.js.map +1 -1
  522. package/build-module/more/save.js.map +1 -1
  523. package/build-module/navigation/edit/accessible-menu-description.js.map +1 -1
  524. package/build-module/navigation/edit/index.js +1 -3
  525. package/build-module/navigation/edit/index.js.map +1 -1
  526. package/build-module/navigation/edit/leaf-more-menu.js +2 -4
  527. package/build-module/navigation/edit/leaf-more-menu.js.map +1 -1
  528. package/build-module/navigation/edit/menu-inspector-controls.js +2 -3
  529. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  530. package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -3
  531. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  532. package/build-module/navigation/edit/navigation-menu-selector.js +1 -3
  533. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  534. package/build-module/navigation/edit/overlay-menu-icon.js +1 -2
  535. package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -1
  536. package/build-module/navigation/edit/overlay-menu-preview.js +1 -3
  537. package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
  538. package/build-module/navigation/edit/placeholder/index.js +1 -3
  539. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  540. package/build-module/navigation/edit/placeholder/placeholder-preview.js +1 -2
  541. package/build-module/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
  542. package/build-module/navigation/edit/responsive-wrapper.js +1 -3
  543. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  544. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  545. package/build-module/navigation/edit/use-create-navigation-menu.js.map +1 -1
  546. package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  547. package/build-module/navigation/edit/utils.js.map +1 -1
  548. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  549. package/build-module/navigation-link/edit.js +1 -3
  550. package/build-module/navigation-link/edit.js.map +1 -1
  551. package/build-module/navigation-link/link-ui.js +1 -2
  552. package/build-module/navigation-link/link-ui.js.map +1 -1
  553. package/build-module/navigation-submenu/edit.js +1 -3
  554. package/build-module/navigation-submenu/edit.js.map +1 -1
  555. package/build-module/nextpage/edit.native.js +1 -1
  556. package/build-module/nextpage/edit.native.js.map +1 -1
  557. package/build-module/page-list/convert-to-links-modal.js +1 -2
  558. package/build-module/page-list/convert-to-links-modal.js.map +1 -1
  559. package/build-module/page-list/edit.js +1 -3
  560. package/build-module/page-list/edit.js.map +1 -1
  561. package/build-module/page-list-item/edit.js +2 -4
  562. package/build-module/page-list-item/edit.js.map +1 -1
  563. package/build-module/paragraph/deprecated.js.map +1 -1
  564. package/build-module/paragraph/edit.js +1 -3
  565. package/build-module/paragraph/edit.js.map +1 -1
  566. package/build-module/paragraph/edit.native.js +1 -3
  567. package/build-module/paragraph/edit.native.js.map +1 -1
  568. package/build-module/paragraph/save.js.map +1 -1
  569. package/build-module/pattern/recursion-detector.js +1 -0
  570. package/build-module/pattern/recursion-detector.js.map +1 -1
  571. package/build-module/post-author/edit.js +1 -3
  572. package/build-module/post-author/edit.js.map +1 -1
  573. package/build-module/post-author-biography/edit.js +1 -3
  574. package/build-module/post-author-biography/edit.js.map +1 -1
  575. package/build-module/post-author-name/edit.js +1 -3
  576. package/build-module/post-author-name/edit.js.map +1 -1
  577. package/build-module/post-comment/edit.js +1 -2
  578. package/build-module/post-comment/edit.js.map +1 -1
  579. package/build-module/post-comments-count/edit.js +1 -3
  580. package/build-module/post-comments-count/edit.js.map +1 -1
  581. package/build-module/post-comments-form/edit.js +1 -3
  582. package/build-module/post-comments-form/edit.js.map +1 -1
  583. package/build-module/post-comments-form/form.js +2 -3
  584. package/build-module/post-comments-form/form.js.map +1 -1
  585. package/build-module/post-comments-link/edit.js +2 -4
  586. package/build-module/post-comments-link/edit.js.map +1 -1
  587. package/build-module/post-content/edit.js +1 -2
  588. package/build-module/post-content/edit.js.map +1 -1
  589. package/build-module/post-date/edit.js +1 -3
  590. package/build-module/post-date/edit.js.map +1 -1
  591. package/build-module/post-excerpt/edit.js +1 -3
  592. package/build-module/post-excerpt/edit.js.map +1 -1
  593. package/build-module/post-featured-image/dimension-controls.js +1 -3
  594. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  595. package/build-module/post-featured-image/edit.js +1 -3
  596. package/build-module/post-featured-image/edit.js.map +1 -1
  597. package/build-module/post-featured-image/overlay-controls.js +1 -3
  598. package/build-module/post-featured-image/overlay-controls.js.map +1 -1
  599. package/build-module/post-navigation-link/edit.js +1 -3
  600. package/build-module/post-navigation-link/edit.js.map +1 -1
  601. package/build-module/post-navigation-link/index.js +6 -0
  602. package/build-module/post-navigation-link/index.js.map +1 -1
  603. package/build-module/post-navigation-link/variations.js +14 -2
  604. package/build-module/post-navigation-link/variations.js.map +1 -1
  605. package/build-module/post-template/edit.js +1 -3
  606. package/build-module/post-template/edit.js.map +1 -1
  607. package/build-module/post-terms/edit.js +1 -3
  608. package/build-module/post-terms/edit.js.map +1 -1
  609. package/build-module/post-time-to-read/edit.js +2 -4
  610. package/build-module/post-time-to-read/edit.js.map +1 -1
  611. package/build-module/post-time-to-read/index.js +2 -1
  612. package/build-module/post-time-to-read/index.js.map +1 -1
  613. package/build-module/post-title/edit.js +1 -3
  614. package/build-module/post-title/edit.js.map +1 -1
  615. package/build-module/pullquote/deprecated.js +1 -2
  616. package/build-module/pullquote/deprecated.js.map +1 -1
  617. package/build-module/pullquote/edit.js +1 -3
  618. package/build-module/pullquote/edit.js.map +1 -1
  619. package/build-module/pullquote/edit.native.js +1 -3
  620. package/build-module/pullquote/edit.native.js.map +1 -1
  621. package/build-module/pullquote/save.js +1 -2
  622. package/build-module/pullquote/save.js.map +1 -1
  623. package/build-module/pullquote/shared.js.map +1 -1
  624. package/build-module/query/edit/enhanced-pagination-modal.js +1 -2
  625. package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
  626. package/build-module/query/edit/index.js +1 -3
  627. package/build-module/query/edit/index.js.map +1 -1
  628. package/build-module/query/edit/inspector-controls/author-control.js +1 -0
  629. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  630. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +1 -2
  631. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  632. package/build-module/query/edit/inspector-controls/index.js +8 -13
  633. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  634. package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
  635. package/build-module/query/edit/inspector-controls/pages-control.js +1 -1
  636. package/build-module/query/edit/inspector-controls/pages-control.js.map +1 -1
  637. package/build-module/query/edit/inspector-controls/parent-control.js +1 -0
  638. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  639. package/build-module/query/edit/inspector-controls/per-page-control.js +1 -1
  640. package/build-module/query/edit/inspector-controls/per-page-control.js.map +1 -1
  641. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +1 -0
  642. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  643. package/build-module/query/edit/pattern-selection-modal.js +2 -3
  644. package/build-module/query/edit/pattern-selection-modal.js.map +1 -1
  645. package/build-module/query/edit/query-content.js +1 -3
  646. package/build-module/query/edit/query-content.js.map +1 -1
  647. package/build-module/query/edit/query-placeholder.js +1 -2
  648. package/build-module/query/edit/query-placeholder.js.map +1 -1
  649. package/build-module/query/edit/query-toolbar.js +1 -2
  650. package/build-module/query/edit/query-toolbar.js.map +1 -1
  651. package/build-module/query/index.js +1 -0
  652. package/build-module/query/index.js.map +1 -1
  653. package/build-module/query/utils.js.map +1 -1
  654. package/build-module/query/view.js.map +1 -1
  655. package/build-module/query-no-results/index.js +8 -0
  656. package/build-module/query-no-results/index.js.map +1 -1
  657. package/build-module/query-pagination/edit.js +1 -3
  658. package/build-module/query-pagination/edit.js.map +1 -1
  659. package/build-module/query-pagination/query-pagination-arrow-controls.js +1 -2
  660. package/build-module/query-pagination/query-pagination-arrow-controls.js.map +1 -1
  661. package/build-module/query-pagination-next/edit.js +1 -2
  662. package/build-module/query-pagination-next/edit.js.map +1 -1
  663. package/build-module/query-pagination-numbers/edit.js +1 -3
  664. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  665. package/build-module/query-pagination-numbers/index.js +2 -1
  666. package/build-module/query-pagination-numbers/index.js.map +1 -1
  667. package/build-module/query-pagination-previous/edit.js +1 -2
  668. package/build-module/query-pagination-previous/edit.js.map +1 -1
  669. package/build-module/query-title/edit.js +4 -6
  670. package/build-module/query-title/edit.js.map +1 -1
  671. package/build-module/query-title/index.js +5 -0
  672. package/build-module/query-title/index.js.map +1 -1
  673. package/build-module/quote/deprecated.js +1 -2
  674. package/build-module/quote/deprecated.js.map +1 -1
  675. package/build-module/quote/edit.js +1 -3
  676. package/build-module/quote/edit.js.map +1 -1
  677. package/build-module/quote/save.js +1 -2
  678. package/build-module/quote/save.js.map +1 -1
  679. package/build-module/quote/transforms.js.map +1 -1
  680. package/build-module/read-more/edit.js +1 -3
  681. package/build-module/read-more/edit.js.map +1 -1
  682. package/build-module/rss/edit.js +1 -3
  683. package/build-module/rss/edit.js.map +1 -1
  684. package/build-module/search/edit.js +1 -3
  685. package/build-module/search/edit.js.map +1 -1
  686. package/build-module/search/edit.native.js +1 -2
  687. package/build-module/search/edit.native.js.map +1 -1
  688. package/build-module/search/icons.js +1 -2
  689. package/build-module/search/icons.js.map +1 -1
  690. package/build-module/separator/edit.js +1 -2
  691. package/build-module/separator/edit.js.map +1 -1
  692. package/build-module/shortcode/edit.js.map +1 -1
  693. package/build-module/shortcode/edit.native.js +1 -2
  694. package/build-module/shortcode/edit.native.js.map +1 -1
  695. package/build-module/site-logo/edit.js +6 -6
  696. package/build-module/site-logo/edit.js.map +1 -1
  697. package/build-module/site-tagline/edit.js +1 -3
  698. package/build-module/site-tagline/edit.js.map +1 -1
  699. package/build-module/site-title/edit.js +1 -3
  700. package/build-module/site-title/edit.js.map +1 -1
  701. package/build-module/social-link/edit.js +1 -3
  702. package/build-module/social-link/edit.js.map +1 -1
  703. package/build-module/social-link/edit.native.js +1 -3
  704. package/build-module/social-link/edit.native.js.map +1 -1
  705. package/build-module/social-links/deprecated.js.map +1 -1
  706. package/build-module/social-links/edit.js +1 -3
  707. package/build-module/social-links/edit.js.map +1 -1
  708. package/build-module/spacer/controls.js +1 -3
  709. package/build-module/spacer/controls.js.map +1 -1
  710. package/build-module/spacer/controls.native.js +1 -2
  711. package/build-module/spacer/controls.native.js.map +1 -1
  712. package/build-module/spacer/deprecated.js.map +1 -1
  713. package/build-module/spacer/edit.js +1 -3
  714. package/build-module/spacer/edit.js.map +1 -1
  715. package/build-module/table/deprecated.js +1 -2
  716. package/build-module/table/deprecated.js.map +1 -1
  717. package/build-module/table/edit.js +1 -3
  718. package/build-module/table/edit.js.map +1 -1
  719. package/build-module/table/save.js +1 -2
  720. package/build-module/table/save.js.map +1 -1
  721. package/build-module/table-of-contents/edit.js +2 -4
  722. package/build-module/table-of-contents/edit.js.map +1 -1
  723. package/build-module/table-of-contents/hooks.js.map +1 -1
  724. package/build-module/table-of-contents/index.js +42 -1
  725. package/build-module/table-of-contents/index.js.map +1 -1
  726. package/build-module/table-of-contents/list.js +1 -3
  727. package/build-module/table-of-contents/list.js.map +1 -1
  728. package/build-module/tag-cloud/edit.js +1 -3
  729. package/build-module/tag-cloud/edit.js.map +1 -1
  730. package/build-module/template-part/edit/advanced-controls.js +2 -4
  731. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  732. package/build-module/template-part/edit/import-controls.js +3 -3
  733. package/build-module/template-part/edit/import-controls.js.map +1 -1
  734. package/build-module/template-part/edit/index.js +3 -5
  735. package/build-module/template-part/edit/index.js.map +1 -1
  736. package/build-module/template-part/edit/placeholder.js +1 -2
  737. package/build-module/template-part/edit/placeholder.js.map +1 -1
  738. package/build-module/template-part/edit/selection-modal.js +3 -4
  739. package/build-module/template-part/edit/selection-modal.js.map +1 -1
  740. package/build-module/template-part/edit/title-modal.js +1 -2
  741. package/build-module/template-part/edit/title-modal.js.map +1 -1
  742. package/build-module/template-part/edit/utils/hooks.js.map +1 -1
  743. package/build-module/template-part/variations.js.map +1 -1
  744. package/build-module/term-description/edit.js +1 -3
  745. package/build-module/term-description/edit.js.map +1 -1
  746. package/build-module/term-description/index.js +2 -1
  747. package/build-module/term-description/index.js.map +1 -1
  748. package/build-module/text-columns/edit.js +1 -3
  749. package/build-module/text-columns/edit.js.map +1 -1
  750. package/build-module/text-columns/save.js.map +1 -1
  751. package/build-module/utils/caption.js +1 -3
  752. package/build-module/utils/caption.js.map +1 -1
  753. package/build-module/verse/deprecated.js.map +1 -1
  754. package/build-module/verse/edit.js +1 -3
  755. package/build-module/verse/edit.js.map +1 -1
  756. package/build-module/verse/save.js.map +1 -1
  757. package/build-module/video/deprecated.js +1 -2
  758. package/build-module/video/deprecated.js.map +1 -1
  759. package/build-module/video/edit-common-settings.js +1 -3
  760. package/build-module/video/edit-common-settings.js.map +1 -1
  761. package/build-module/video/edit.js +2 -4
  762. package/build-module/video/edit.js.map +1 -1
  763. package/build-module/video/edit.native.js +2 -3
  764. package/build-module/video/edit.native.js.map +1 -1
  765. package/build-module/video/icon-retry.native.js +1 -2
  766. package/build-module/video/icon-retry.native.js.map +1 -1
  767. package/build-module/video/save.js +1 -2
  768. package/build-module/video/save.js.map +1 -1
  769. package/build-module/video/tracks-editor.js +2 -4
  770. package/build-module/video/tracks-editor.js.map +1 -1
  771. package/build-style/archives/editor-rtl.css +10 -1
  772. package/build-style/archives/editor.css +10 -1
  773. package/build-style/archives/style-rtl.css +10 -1
  774. package/build-style/archives/style.css +10 -1
  775. package/build-style/audio/editor-rtl.css +10 -1
  776. package/build-style/audio/editor.css +10 -1
  777. package/build-style/audio/style-rtl.css +10 -1
  778. package/build-style/audio/style.css +10 -1
  779. package/build-style/audio/theme-rtl.css +10 -1
  780. package/build-style/audio/theme.css +10 -1
  781. package/build-style/avatar/editor-rtl.css +10 -1
  782. package/build-style/avatar/editor.css +10 -1
  783. package/build-style/avatar/style-rtl.css +10 -1
  784. package/build-style/avatar/style.css +10 -1
  785. package/build-style/button/editor-rtl.css +10 -1
  786. package/build-style/button/editor.css +10 -1
  787. package/build-style/button/style-rtl.css +10 -1
  788. package/build-style/button/style.css +10 -1
  789. package/build-style/buttons/editor-rtl.css +10 -1
  790. package/build-style/buttons/editor.css +10 -1
  791. package/build-style/buttons/style-rtl.css +11 -1
  792. package/build-style/buttons/style.css +11 -1
  793. package/build-style/calendar/style-rtl.css +10 -1
  794. package/build-style/calendar/style.css +10 -1
  795. package/build-style/categories/editor-rtl.css +10 -1
  796. package/build-style/categories/editor.css +10 -1
  797. package/build-style/categories/style-rtl.css +10 -1
  798. package/build-style/categories/style.css +10 -1
  799. package/build-style/classic-rtl.css +10 -1
  800. package/build-style/classic.css +10 -1
  801. package/build-style/code/editor-rtl.css +10 -1
  802. package/build-style/code/editor.css +10 -1
  803. package/build-style/code/style-rtl.css +12 -1
  804. package/build-style/code/style.css +14 -1
  805. package/build-style/code/theme-rtl.css +10 -1
  806. package/build-style/code/theme.css +10 -1
  807. package/build-style/columns/editor-rtl.css +10 -1
  808. package/build-style/columns/editor.css +10 -1
  809. package/build-style/columns/style-rtl.css +10 -1
  810. package/build-style/columns/style.css +10 -1
  811. package/build-style/comment-author-avatar/editor-rtl.css +10 -1
  812. package/build-style/comment-author-avatar/editor.css +10 -1
  813. package/build-style/comment-author-name/style-rtl.css +10 -1
  814. package/build-style/comment-author-name/style.css +10 -1
  815. package/build-style/comment-content/style-rtl.css +10 -1
  816. package/build-style/comment-content/style.css +10 -1
  817. package/build-style/comment-date/style-rtl.css +10 -1
  818. package/build-style/comment-date/style.css +10 -1
  819. package/build-style/comment-edit-link/style-rtl.css +10 -1
  820. package/build-style/comment-edit-link/style.css +10 -1
  821. package/build-style/comment-reply-link/style-rtl.css +10 -1
  822. package/build-style/comment-reply-link/style.css +10 -1
  823. package/build-style/comment-template/style-rtl.css +10 -1
  824. package/build-style/comment-template/style.css +10 -1
  825. package/build-style/comments/editor-rtl.css +10 -1
  826. package/build-style/comments/editor.css +10 -1
  827. package/build-style/comments/style-rtl.css +10 -1
  828. package/build-style/comments/style.css +10 -1
  829. package/build-style/comments-pagination/editor-rtl.css +10 -1
  830. package/build-style/comments-pagination/editor.css +10 -1
  831. package/build-style/comments-pagination/style-rtl.css +10 -1
  832. package/build-style/comments-pagination/style.css +10 -1
  833. package/build-style/comments-pagination-numbers/editor-rtl.css +10 -1
  834. package/build-style/comments-pagination-numbers/editor.css +10 -1
  835. package/build-style/comments-title/editor-rtl.css +10 -1
  836. package/build-style/comments-title/editor.css +10 -1
  837. package/build-style/common-rtl.css +10 -3
  838. package/build-style/common.css +10 -3
  839. package/build-style/cover/editor-rtl.css +11 -1
  840. package/build-style/cover/editor.css +11 -1
  841. package/build-style/cover/style-rtl.css +14 -5
  842. package/build-style/cover/style.css +14 -5
  843. package/build-style/details/editor-rtl.css +10 -1
  844. package/build-style/details/editor.css +10 -1
  845. package/build-style/details/style-rtl.css +10 -1
  846. package/build-style/details/style.css +10 -1
  847. package/build-style/editor-elements-rtl.css +10 -1
  848. package/build-style/editor-elements.css +10 -1
  849. package/build-style/editor-rtl.css +15 -17
  850. package/build-style/editor.css +15 -17
  851. package/build-style/elements-rtl.css +10 -1
  852. package/build-style/elements.css +10 -1
  853. package/build-style/embed/editor-rtl.css +10 -1
  854. package/build-style/embed/editor.css +10 -1
  855. package/build-style/embed/style-rtl.css +10 -1
  856. package/build-style/embed/style.css +10 -1
  857. package/build-style/embed/theme-rtl.css +10 -1
  858. package/build-style/embed/theme.css +10 -1
  859. package/build-style/file/editor-rtl.css +10 -1
  860. package/build-style/file/editor.css +10 -1
  861. package/build-style/file/style-rtl.css +10 -1
  862. package/build-style/file/style.css +10 -1
  863. package/build-style/footnotes/style-rtl.css +10 -1
  864. package/build-style/footnotes/style.css +10 -1
  865. package/build-style/form-input/editor-rtl.css +10 -1
  866. package/build-style/form-input/editor.css +10 -1
  867. package/build-style/form-input/style-rtl.css +10 -1
  868. package/build-style/form-input/style.css +10 -1
  869. package/build-style/form-submission-notification/editor-rtl.css +10 -1
  870. package/build-style/form-submission-notification/editor.css +10 -1
  871. package/build-style/form-submit-button/style-rtl.css +10 -1
  872. package/build-style/form-submit-button/style.css +10 -1
  873. package/build-style/freeform/editor-rtl.css +10 -1
  874. package/build-style/freeform/editor.css +10 -1
  875. package/build-style/gallery/editor-rtl.css +10 -1
  876. package/build-style/gallery/editor.css +10 -1
  877. package/build-style/gallery/style-rtl.css +10 -1
  878. package/build-style/gallery/style.css +10 -1
  879. package/build-style/gallery/theme-rtl.css +10 -1
  880. package/build-style/gallery/theme.css +10 -1
  881. package/build-style/group/editor-rtl.css +10 -1
  882. package/build-style/group/editor.css +10 -1
  883. package/build-style/group/style-rtl.css +10 -1
  884. package/build-style/group/style.css +10 -1
  885. package/build-style/group/theme-rtl.css +10 -1
  886. package/build-style/group/theme.css +10 -1
  887. package/build-style/heading/style-rtl.css +10 -1
  888. package/build-style/heading/style.css +10 -1
  889. package/build-style/html/editor-rtl.css +10 -1
  890. package/build-style/html/editor.css +10 -1
  891. package/build-style/image/editor-rtl.css +10 -1
  892. package/build-style/image/editor.css +10 -1
  893. package/build-style/image/style-rtl.css +10 -1
  894. package/build-style/image/style.css +10 -1
  895. package/build-style/image/theme-rtl.css +10 -1
  896. package/build-style/image/theme.css +10 -1
  897. package/build-style/latest-comments/style-rtl.css +10 -1
  898. package/build-style/latest-comments/style.css +10 -1
  899. package/build-style/latest-posts/editor-rtl.css +10 -1
  900. package/build-style/latest-posts/editor.css +10 -1
  901. package/build-style/latest-posts/style-rtl.css +10 -1
  902. package/build-style/latest-posts/style.css +10 -1
  903. package/build-style/list/style-rtl.css +10 -1
  904. package/build-style/list/style.css +10 -1
  905. package/build-style/loginout/style-rtl.css +10 -1
  906. package/build-style/loginout/style.css +10 -1
  907. package/build-style/media-text/editor-rtl.css +10 -1
  908. package/build-style/media-text/editor.css +10 -1
  909. package/build-style/media-text/style-rtl.css +10 -1
  910. package/build-style/media-text/style.css +10 -1
  911. package/build-style/more/editor-rtl.css +10 -1
  912. package/build-style/more/editor.css +10 -1
  913. package/build-style/navigation/editor-rtl.css +10 -1
  914. package/build-style/navigation/editor.css +10 -1
  915. package/build-style/navigation/style-rtl.css +10 -1
  916. package/build-style/navigation/style.css +10 -1
  917. package/build-style/navigation-link/editor-rtl.css +10 -1
  918. package/build-style/navigation-link/editor.css +10 -1
  919. package/build-style/navigation-link/style-rtl.css +10 -1
  920. package/build-style/navigation-link/style.css +10 -1
  921. package/build-style/navigation-submenu/editor-rtl.css +10 -1
  922. package/build-style/navigation-submenu/editor.css +10 -1
  923. package/build-style/nextpage/editor-rtl.css +10 -1
  924. package/build-style/nextpage/editor.css +10 -1
  925. package/build-style/page-list/editor-rtl.css +10 -1
  926. package/build-style/page-list/editor.css +10 -1
  927. package/build-style/page-list/style-rtl.css +10 -1
  928. package/build-style/page-list/style.css +10 -1
  929. package/build-style/paragraph/editor-rtl.css +10 -1
  930. package/build-style/paragraph/editor.css +10 -1
  931. package/build-style/paragraph/style-rtl.css +10 -1
  932. package/build-style/paragraph/style.css +10 -1
  933. package/build-style/post-author/editor-rtl.css +10 -1
  934. package/build-style/post-author/editor.css +10 -1
  935. package/build-style/post-author/style-rtl.css +10 -1
  936. package/build-style/post-author/style.css +10 -1
  937. package/build-style/post-author-biography/style-rtl.css +10 -1
  938. package/build-style/post-author-biography/style.css +10 -1
  939. package/build-style/post-author-name/style-rtl.css +10 -1
  940. package/build-style/post-author-name/style.css +10 -1
  941. package/build-style/post-comments-form/editor-rtl.css +10 -1
  942. package/build-style/post-comments-form/editor.css +10 -1
  943. package/build-style/post-comments-form/style-rtl.css +10 -1
  944. package/build-style/post-comments-form/style.css +10 -1
  945. package/build-style/post-content/style-rtl.css +10 -1
  946. package/build-style/post-content/style.css +10 -1
  947. package/build-style/post-date/style-rtl.css +10 -1
  948. package/build-style/post-date/style.css +10 -1
  949. package/build-style/post-excerpt/editor-rtl.css +10 -1
  950. package/build-style/post-excerpt/editor.css +10 -1
  951. package/build-style/post-excerpt/style-rtl.css +10 -1
  952. package/build-style/post-excerpt/style.css +10 -1
  953. package/build-style/post-featured-image/editor-rtl.css +10 -1
  954. package/build-style/post-featured-image/editor.css +10 -1
  955. package/build-style/post-featured-image/style-rtl.css +10 -1
  956. package/build-style/post-featured-image/style.css +10 -1
  957. package/build-style/post-navigation-link/style-rtl.css +10 -1
  958. package/build-style/post-navigation-link/style.css +10 -1
  959. package/build-style/post-template/editor-rtl.css +10 -1
  960. package/build-style/post-template/editor.css +10 -1
  961. package/build-style/post-template/style-rtl.css +10 -1
  962. package/build-style/post-template/style.css +10 -1
  963. package/build-style/post-terms/style-rtl.css +10 -1
  964. package/build-style/post-terms/style.css +10 -1
  965. package/build-style/post-time-to-read/style-rtl.css +10 -1
  966. package/build-style/post-time-to-read/style.css +10 -1
  967. package/build-style/post-title/style-rtl.css +10 -1
  968. package/build-style/post-title/style.css +10 -1
  969. package/build-style/preformatted/style-rtl.css +10 -1
  970. package/build-style/preformatted/style.css +10 -1
  971. package/build-style/pullquote/editor-rtl.css +10 -1
  972. package/build-style/pullquote/editor.css +10 -1
  973. package/build-style/pullquote/style-rtl.css +10 -1
  974. package/build-style/pullquote/style.css +10 -1
  975. package/build-style/pullquote/theme-rtl.css +10 -1
  976. package/build-style/pullquote/theme.css +10 -1
  977. package/build-style/query/editor-rtl.css +10 -1
  978. package/build-style/query/editor.css +10 -1
  979. package/build-style/query-pagination/editor-rtl.css +10 -1
  980. package/build-style/query-pagination/editor.css +10 -1
  981. package/build-style/query-pagination/style-rtl.css +10 -1
  982. package/build-style/query-pagination/style.css +10 -1
  983. package/build-style/query-pagination-numbers/editor-rtl.css +10 -1
  984. package/build-style/query-pagination-numbers/editor.css +10 -1
  985. package/build-style/query-title/style-rtl.css +10 -1
  986. package/build-style/query-title/style.css +10 -1
  987. package/build-style/quote/style-rtl.css +10 -1
  988. package/build-style/quote/style.css +10 -1
  989. package/build-style/quote/theme-rtl.css +10 -1
  990. package/build-style/quote/theme.css +10 -1
  991. package/build-style/read-more/style-rtl.css +10 -1
  992. package/build-style/read-more/style.css +10 -1
  993. package/build-style/reset-rtl.css +10 -1
  994. package/build-style/reset.css +10 -1
  995. package/build-style/rss/editor-rtl.css +10 -1
  996. package/build-style/rss/editor.css +10 -1
  997. package/build-style/rss/style-rtl.css +10 -1
  998. package/build-style/rss/style.css +10 -1
  999. package/build-style/search/editor-rtl.css +10 -1
  1000. package/build-style/search/editor.css +10 -1
  1001. package/build-style/search/style-rtl.css +10 -1
  1002. package/build-style/search/style.css +10 -1
  1003. package/build-style/search/theme-rtl.css +10 -1
  1004. package/build-style/search/theme.css +10 -1
  1005. package/build-style/separator/editor-rtl.css +10 -1
  1006. package/build-style/separator/editor.css +10 -1
  1007. package/build-style/separator/style-rtl.css +10 -1
  1008. package/build-style/separator/style.css +10 -1
  1009. package/build-style/separator/theme-rtl.css +10 -1
  1010. package/build-style/separator/theme.css +10 -1
  1011. package/build-style/shortcode/editor-rtl.css +10 -1
  1012. package/build-style/shortcode/editor.css +10 -1
  1013. package/build-style/site-logo/editor-rtl.css +10 -1
  1014. package/build-style/site-logo/editor.css +10 -1
  1015. package/build-style/site-logo/style-rtl.css +10 -1
  1016. package/build-style/site-logo/style.css +10 -1
  1017. package/build-style/site-tagline/editor-rtl.css +10 -1
  1018. package/build-style/site-tagline/editor.css +10 -1
  1019. package/build-style/site-tagline/style-rtl.css +10 -1
  1020. package/build-style/site-tagline/style.css +10 -1
  1021. package/build-style/site-title/editor-rtl.css +10 -1
  1022. package/build-style/site-title/editor.css +10 -1
  1023. package/build-style/site-title/style-rtl.css +10 -1
  1024. package/build-style/site-title/style.css +10 -1
  1025. package/build-style/social-link/editor-rtl.css +10 -1
  1026. package/build-style/social-link/editor.css +10 -1
  1027. package/build-style/social-links/editor-rtl.css +14 -12
  1028. package/build-style/social-links/editor.css +14 -12
  1029. package/build-style/social-links/style-rtl.css +10 -1
  1030. package/build-style/social-links/style.css +10 -1
  1031. package/build-style/spacer/editor-rtl.css +10 -1
  1032. package/build-style/spacer/editor.css +10 -1
  1033. package/build-style/spacer/style-rtl.css +10 -1
  1034. package/build-style/spacer/style.css +10 -1
  1035. package/build-style/style-rtl.css +17 -7
  1036. package/build-style/style.css +19 -7
  1037. package/build-style/table/editor-rtl.css +10 -1
  1038. package/build-style/table/editor.css +10 -1
  1039. package/build-style/table/style-rtl.css +10 -1
  1040. package/build-style/table/style.css +10 -1
  1041. package/build-style/table/theme-rtl.css +10 -1
  1042. package/build-style/table/theme.css +10 -1
  1043. package/build-style/table-of-contents/style-rtl.css +10 -1
  1044. package/build-style/table-of-contents/style.css +10 -1
  1045. package/build-style/tag-cloud/editor-rtl.css +10 -1
  1046. package/build-style/tag-cloud/editor.css +10 -1
  1047. package/build-style/tag-cloud/style-rtl.css +10 -1
  1048. package/build-style/tag-cloud/style.css +10 -1
  1049. package/build-style/template-part/editor-rtl.css +10 -1
  1050. package/build-style/template-part/editor.css +10 -1
  1051. package/build-style/template-part/theme-rtl.css +10 -1
  1052. package/build-style/template-part/theme.css +10 -1
  1053. package/build-style/term-description/style-rtl.css +10 -1
  1054. package/build-style/term-description/style.css +10 -1
  1055. package/build-style/text-columns/editor-rtl.css +10 -1
  1056. package/build-style/text-columns/editor.css +10 -1
  1057. package/build-style/text-columns/style-rtl.css +10 -1
  1058. package/build-style/text-columns/style.css +10 -1
  1059. package/build-style/theme-rtl.css +10 -1
  1060. package/build-style/theme.css +10 -1
  1061. package/build-style/verse/style-rtl.css +10 -1
  1062. package/build-style/verse/style.css +10 -1
  1063. package/build-style/video/editor-rtl.css +10 -1
  1064. package/build-style/video/editor.css +10 -1
  1065. package/build-style/video/style-rtl.css +10 -1
  1066. package/build-style/video/style.css +10 -1
  1067. package/build-style/video/theme-rtl.css +10 -1
  1068. package/build-style/video/theme.css +10 -1
  1069. package/package.json +36 -36
  1070. package/src/avatar/index.js +1 -0
  1071. package/src/buttons/style.scss +2 -0
  1072. package/src/code/style.scss +5 -0
  1073. package/src/comment-author-name/index.js +1 -0
  1074. package/src/comment-content/index.js +1 -0
  1075. package/src/comment-date/index.js +1 -0
  1076. package/src/comment-edit-link/index.js +1 -0
  1077. package/src/comment-reply-link/index.js +1 -0
  1078. package/src/comments-pagination-next/block.json +5 -0
  1079. package/src/comments-pagination-numbers/index.js +1 -0
  1080. package/src/comments-pagination-previous/block.json +5 -0
  1081. package/src/comments-title/index.js +1 -0
  1082. package/src/common.scss +0 -3
  1083. package/src/cover/edit/inspector-controls.js +103 -44
  1084. package/src/cover/editor.scss +1 -0
  1085. package/src/cover/index.php +38 -19
  1086. package/src/cover/style.scss +1 -1
  1087. package/src/cover/test/edit.js +2 -2
  1088. package/src/editor.scss +0 -1
  1089. package/src/embed/edit.js +19 -2
  1090. package/src/embed/embed-preview.js +2 -18
  1091. package/src/file/block.json +8 -4
  1092. package/src/post-navigation-link/block.json +6 -0
  1093. package/src/post-navigation-link/variations.js +12 -0
  1094. package/src/post-terms/index.php +7 -6
  1095. package/src/post-time-to-read/index.js +1 -0
  1096. package/src/query/block.json +1 -0
  1097. package/src/query/edit/inspector-controls/index.js +7 -10
  1098. package/src/query/edit/inspector-controls/pages-control.js +1 -1
  1099. package/src/query/edit/inspector-controls/per-page-control.js +1 -1
  1100. package/src/query/edit/pattern-selection-modal.js +1 -1
  1101. package/src/query-no-results/block.json +10 -0
  1102. package/src/query-pagination-numbers/index.js +1 -0
  1103. package/src/query-title/block.json +5 -0
  1104. package/src/site-logo/edit.js +1 -0
  1105. package/src/social-links/editor.scss +4 -13
  1106. package/src/table-of-contents/block.json +52 -1
  1107. package/src/template-part/edit/selection-modal.js +1 -1
  1108. package/src/term-description/index.js +1 -0
  1109. package/build-style/post-content/editor-rtl.css +0 -95
  1110. package/build-style/post-content/editor.css +0 -95
  1111. package/src/post-content/editor.scss +0 -4
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","getComputedStyle","node","ownerDocument","defaultView","detectColors","colorsDetectionElement","setColor","setBackground","color","backgroundColorNode","backgroundColor","parentNode","nodeType","ELEMENT_NODE","getColors","context","isSubMenu","textColor","customTextColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","style","colors","text","background","getNavigationChildBlockProps","innerBlocksColors","className","clsx"],"sources":["@wordpress/block-library/src/navigation/edit/utils.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\nfunction getComputedStyle( node ) {\n\treturn node.ownerDocument.defaultView.getComputedStyle( node );\n}\n\nexport function detectColors(\n\tcolorsDetectionElement,\n\tsetColor,\n\tsetBackground\n) {\n\tif ( ! colorsDetectionElement ) {\n\t\treturn;\n\t}\n\tsetColor( getComputedStyle( colorsDetectionElement ).color );\n\n\tlet backgroundColorNode = colorsDetectionElement;\n\tlet backgroundColor =\n\t\tgetComputedStyle( backgroundColorNode ).backgroundColor;\n\twhile (\n\t\tbackgroundColor === 'rgba(0, 0, 0, 0)' &&\n\t\tbackgroundColorNode.parentNode &&\n\t\tbackgroundColorNode.parentNode.nodeType ===\n\t\t\tbackgroundColorNode.parentNode.ELEMENT_NODE\n\t) {\n\t\tbackgroundColorNode = backgroundColorNode.parentNode;\n\t\tbackgroundColor =\n\t\t\tgetComputedStyle( backgroundColorNode ).backgroundColor;\n\t}\n\n\tsetBackground( backgroundColor );\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 */\nexport function 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\nexport function getNavigationChildBlockProps( innerBlocksColors ) {\n\treturn {\n\t\tclassName: clsx( 'wp-block-navigation__submenu-container', {\n\t\t\t'has-text-color': !! (\n\t\t\t\tinnerBlocksColors.textColor || innerBlocksColors.customTextColor\n\t\t\t),\n\t\t\t[ `has-${ innerBlocksColors.textColor }-color` ]:\n\t\t\t\t!! innerBlocksColors.textColor,\n\t\t\t'has-background': !! (\n\t\t\t\tinnerBlocksColors.backgroundColor ||\n\t\t\t\tinnerBlocksColors.customBackgroundColor\n\t\t\t),\n\t\t\t[ `has-${ innerBlocksColors.backgroundColor }-background-color` ]:\n\t\t\t\t!! innerBlocksColors.backgroundColor,\n\t\t} ),\n\t\tstyle: {\n\t\t\tcolor: innerBlocksColors.customTextColor,\n\t\t\tbackgroundColor: innerBlocksColors.customBackgroundColor,\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAHA;AACA;AACA;;AAGA,SAASC,gBAAgBA,CAAEC,IAAI,EAAG;EACjC,OAAOA,IAAI,CAACC,aAAa,CAACC,WAAW,CAACH,gBAAgB,CAAEC,IAAK,CAAC;AAC/D;AAEO,SAASG,YAAYA,CAC3BC,sBAAsB,EACtBC,QAAQ,EACRC,aAAa,EACZ;EACD,IAAK,CAAEF,sBAAsB,EAAG;IAC/B;EACD;EACAC,QAAQ,CAAEN,gBAAgB,CAAEK,sBAAuB,CAAC,CAACG,KAAM,CAAC;EAE5D,IAAIC,mBAAmB,GAAGJ,sBAAsB;EAChD,IAAIK,eAAe,GAClBV,gBAAgB,CAAES,mBAAoB,CAAC,CAACC,eAAe;EACxD,OACCA,eA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AC,MAAM,IAAKP,SAAS,IAAI,CAAC,CAAEM,sBAAsB,EAAG;IACpDG,MAAM,CAACf,eAAe,GAAGY,sBAAsB;EAChD,CAAC,MAAM,IAAK,CAAC,CAAEH,qBAAqB,EAAG;IACtCM,MAAM,CAACN,qBAAqB,GAAGA,qBAAqB;EACrD,CAAC,MAAM,IAAK,CAAC,CAAET,eAAe,EAAG;IAChCe,MAAM,CAACf,eAAe,GAAGA,eAAe;EACzC,CAAC,MAAM,IAAK,CAAC,CAAEc,KAAK,EAAEhB,KAAK,EAAEmB,UAAU,EAAG;IACzCF,MAAM,CAACP,eAAe,GAAGM,KAAK,CAAChB,KAAK,CAACmB,UAAU;EAChD;EAEA,OAAOF,MAAM;AACd;AAEO,SAASG,4BAA4BA,CAAEC,iBAAiB,EAAG;EACjE,OAAO;IACNC,SAAS,EAAE,IAAAC,aAAI,EAAE,wCAAwC,EAAE;MAC1D,gBAAgB,EAAE,CAAC,EAClBF,iBAAiB,CAACZ,SAAS,IAAIY,iBAAiB,CAACX,eAAe,CAChE;MACD,CAAG,OAAOW,iBAAiB,CAACZ,SAAW,QAAO,GAC7C,CAAC,CAAEY,iBAAiB,CAACZ,SAAS;MAC/B,gBAAgB,EAAE,CAAC,EAClBY,iBAAiB,CAACnB,eAAe,IACjCmB,iBAAiB,CAACV,qBAAqB,CACvC;MACD,CAAG,OAAOU,iBAAiB,CAACnB,eAAiB,mBAAkB,GAC9D,CAAC,CAAEmB,iBAAiB,CAACnB;IACvB,CAAE,CAAC;IACHc,KAAK,EAAE;MACNhB,KAAK,EAAEqB,iBAAiB,CAACX,eAAe;MACxCR,eAAe,EAAEmB,iBAAiB,CAACV;IACpC;EACD,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","getComputedStyle","node","ownerDocument","defaultView","detectColors","colorsDetectionElement","setColor","setBackground","color","backgroundColorNode","backgroundColor","parentNode","nodeType","ELEMENT_NODE","getColors","context","isSubMenu","textColor","customTextColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","style","colors","text","background","getNavigationChildBlockProps","innerBlocksColors","className","clsx"],"sources":["@wordpress/block-library/src/navigation/edit/utils.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\nfunction getComputedStyle( node ) {\n\treturn node.ownerDocument.defaultView.getComputedStyle( node );\n}\n\nexport function detectColors(\n\tcolorsDetectionElement,\n\tsetColor,\n\tsetBackground\n) {\n\tif ( ! colorsDetectionElement ) {\n\t\treturn;\n\t}\n\tsetColor( getComputedStyle( colorsDetectionElement ).color );\n\n\tlet backgroundColorNode = colorsDetectionElement;\n\tlet backgroundColor =\n\t\tgetComputedStyle( backgroundColorNode ).backgroundColor;\n\twhile (\n\t\tbackgroundColor === 'rgba(0, 0, 0, 0)' &&\n\t\tbackgroundColorNode.parentNode &&\n\t\tbackgroundColorNode.parentNode.nodeType ===\n\t\t\tbackgroundColorNode.parentNode.ELEMENT_NODE\n\t) {\n\t\tbackgroundColorNode = backgroundColorNode.parentNode;\n\t\tbackgroundColor =\n\t\t\tgetComputedStyle( backgroundColorNode ).backgroundColor;\n\t}\n\n\tsetBackground( backgroundColor );\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 */\nexport function 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\nexport function getNavigationChildBlockProps( innerBlocksColors ) {\n\treturn {\n\t\tclassName: clsx( 'wp-block-navigation__submenu-container', {\n\t\t\t'has-text-color': !! (\n\t\t\t\tinnerBlocksColors.textColor || innerBlocksColors.customTextColor\n\t\t\t),\n\t\t\t[ `has-${ innerBlocksColors.textColor }-color` ]:\n\t\t\t\t!! innerBlocksColors.textColor,\n\t\t\t'has-background': !! (\n\t\t\t\tinnerBlocksColors.backgroundColor ||\n\t\t\t\tinnerBlocksColors.customBackgroundColor\n\t\t\t),\n\t\t\t[ `has-${ innerBlocksColors.backgroundColor }-background-color` ]:\n\t\t\t\t!! innerBlocksColors.backgroundColor,\n\t\t} ),\n\t\tstyle: {\n\t\t\tcolor: innerBlocksColors.customTextColor,\n\t\t\tbackgroundColor: innerBlocksColors.customBackgroundColor,\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAHA;AACA;AACA;;AAGA,SAASC,gBAAgBA,CAAEC,IAAI,EAAG;EACjC,OAAOA,IAAI,CAACC,aAAa,CAACC,WAAW,CAACH,gBAAg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,iBAAiB,CAACnB;IACvB,CAAE,CAAC;IACHc,KAAK,EAAE;MACNhB,KAAK,EAAEqB,iBAAiB,CAACX,eAAe;MACxCR,eAAe,EAAEmB,iBAAiB,CAACV;IACpC;EACD,CAAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_coreData","require","_data","_constants","useNavigationMenu","ref","permissions","useResourcePermissions","kind","name","id","navigationMenu","isNavigationMenuResolved","isNavigationMenuMissing","useSelect","select","selectExistingMenu","canCreate","canCreateNavigationMenus","canUpdate","canUpdateNavigationMenu","canDelete","canDeleteNavigationMenu","isResolving","isResolvingPermissions","hasResolved","hasResolvedPermissions","records","navigationMenus","isResolvingNavigationMenus","hasResolvedNavigationMenus","useEntityRecords","PRELOADED_NAVIGATION_MENUS_QUERY","canSwitchNavigationMenu","length","canUserCreateNavigationMenus","isResolvingCanUserCreateNavigationMenus","hasResolvedCanUserCreateNavigationMenus","canUserUpdateNavigationMenu","hasResolvedCanUserUpdateNavigationMenu","undefined","canUserDeleteNavigationMenu","hasResolvedCanUserDeleteNavigationMenu","getEntityRecord","getEditedEntityRecord","hasFinishedResolution","coreStore","args","editedNavigationMenu","hasResolvedNavigationMenu","isNavigationMenuPublishedOrDraft","status"],"sources":["@wordpress/block-library/src/navigation/use-navigation-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tstore as coreStore,\n\tuseResourcePermissions,\n\tuseEntityRecords,\n} from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { PRELOADED_NAVIGATION_MENUS_QUERY } from './constants';\n\nexport default function useNavigationMenu( ref ) {\n\tconst permissions = useResourcePermissions( {\n\t\tkind: 'postType',\n\t\tname: 'wp_navigation',\n\t\tid: ref,\n\t} );\n\n\tconst {\n\t\tnavigationMenu,\n\t\tisNavigationMenuResolved,\n\t\tisNavigationMenuMissing,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\treturn selectExistingMenu( select, ref );\n\t\t},\n\t\t[ ref ]\n\t);\n\n\tconst {\n\t\t// Can the user create navigation menus?\n\t\tcanCreate: canCreateNavigationMenus,\n\n\t\t// Can the user update the specific navigation menu with the given post ID?\n\t\tcanUpdate: canUpdateNavigationMenu,\n\n\t\t// Can the user delete the specific navigation menu with the given post ID?\n\t\tcanDelete: canDeleteNavigationMenu,\n\t\tisResolving: isResolvingPermissions,\n\t\thasResolved: hasResolvedPermissions,\n\t} = permissions;\n\n\tconst {\n\t\trecords: navigationMenus,\n\t\tisResolving: isResolvingNavigationMenus,\n\t\thasResolved: hasResolvedNavigationMenus,\n\t} = useEntityRecords(\n\t\t'postType',\n\t\t`wp_navigation`,\n\t\tPRELOADED_NAVIGATION_MENUS_QUERY\n\t);\n\n\tconst canSwitchNavigationMenu = ref\n\t\t? navigationMenus?.length > 1\n\t\t: navigationMenus?.length > 0;\n\n\treturn {\n\t\tnavigationMenu,\n\t\tisNavigationMenuResolved,\n\t\tisNavigationMenuMissing,\n\t\tnavigationMenus,\n\t\tisResolvingNavigationMenus,\n\t\thasResolvedNavigationMenus,\n\t\tcanSwitchNavigationMenu,\n\t\tcanUserCreateNavigationMenus: canCreateNavigationMenus,\n\t\tisResolvingCanUserCreateNavigationMenus: isResolvingPermissions,\n\t\thasResolvedCanUserCreateNavigationMenus: hasResolvedPermissions,\n\t\tcanUserUpdateNavigationMenu: canUpdateNavigationMenu,\n\t\thasResolvedCanUserUpdateNavigationMenu: ref\n\t\t\t? hasResolvedPermissions\n\t\t\t: undefined,\n\t\tcanUserDeleteNavigationMenu: canDeleteNavigationMenu,\n\t\thasResolvedCanUserDeleteNavigationMenu: ref\n\t\t\t? hasResolvedPermissions\n\t\t\t: undefined,\n\t};\n}\n\nfunction selectExistingMenu( select, ref ) {\n\tif ( ! ref ) {\n\t\treturn {\n\t\t\tisNavigationMenuResolved: false,\n\t\t\tisNavigationMenuMissing: true,\n\t\t};\n\t}\n\n\tconst { getEntityRecord, getEditedEntityRecord, hasFinishedResolution } =\n\t\tselect( coreStore );\n\n\tconst args = [ 'postType', 'wp_navigation', ref ];\n\tconst navigationMenu = getEntityRecord( ...args );\n\tconst editedNavigationMenu = getEditedEntityRecord( ...args );\n\tconst hasResolvedNavigationMenu = hasFinishedResolution(\n\t\t'getEditedEntityRecord',\n\t\targs\n\t);\n\n\t// Only published Navigation posts are considered valid.\n\t// Draft Navigation posts are valid only on the editor,\n\t// requiring a post update to publish to show in frontend.\n\t// To achieve that, index.php must reflect this validation only for published.\n\tconst isNavigationMenuPublishedOrDraft =\n\t\teditedNavigationMenu.status === 'publish' ||\n\t\teditedNavigationMenu.status === 'draft';\n\n\treturn {\n\t\tisNavigationMenuResolved: hasResolvedNavigationMenu,\n\t\tisNavigationMenuMissing:\n\t\t\thasResolvedNavigationMenu &&\n\t\t\t( ! navigationMenu || ! isNavigationMenuPublishedOrDraft ),\n\n\t\t// getEditedEntityRecord will return the post regardless of status.\n\t\t// Therefore if the found post is not published then we should ignore it.\n\t\tnavigationMenu: isNavigationMenuPublishedOrDraft\n\t\t\t? editedNavigationMenu\n\t\t\t: null,\n\t};\n}\n"],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAF,OAAA;AAbA;AACA;AACA;;AAQA;AACA;AACA;;AAGe,SAASG,iBAAiBA,CAAEC,GAAG,EAAG;EAChD,MAAMC,WAAW,GAAG,IAAAC,gCAAsB,EAAE;IAC3CC,IAAI,EAAE,UAAU;IAChBC,IAAI,EAAE,eAAe;IACrBC,EAAE,EAAEL;EACL,CAAE,CAAC;EAEH,MAAM;IACLM,cAAc;IACdC,wBAAwB;IACxBC;EACD,CAAC,GAAG,IAAAC,eAAS,EACVC,MAAM,IAAM;IACb,OAAOC,kBAAkB,CAAED,MAAM,EAAEV,GAAI,CAAC;EACzC,CAAC,EACD,CAAEA,GAAG,CACN,CAAC;EAED,MAAM;IACL;IACAY,SAAS,EAAEC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C;EACjD,MAAMC,oBAAoB,GAAGJ,qBAAqB,CAAE,GAAGG,IAAK,CAAC;EAC7D,MAAME,yBAAyB,GAAGJ,qBAAqB,CACtD,uBAAuB,EACvBE,IACD,CAAC;;EAED;EACA;EACA;EACA;EACA,MAAMG,gCAAgC,GACrCF,oBAAoB,CAACG,MAAM,KAAK,SAAS,IACzCH,oBAAoB,CAACG,MAAM,KAAK,OAAO;EAExC,OAAO;IACNvC,wBAAwB,EAAEqC,yBAAyB;IACnDpC,uBAAuB,EACtBoC,yBAAyB,KACvB,CAAEtC,cAAc,IAAI,CAAEuC,gCAAgC,CAAE;IAE3D;IACA;IACAvC,cAAc,EAAEuC,gCAAgC,GAC7CF,oBAAoB,GACpB;EACJ,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_coreData","require","_data","_constants","useNavigationMenu","ref","permissions","useResourcePermissions","kind","name","id","navigationMenu","isNavigationMenuResolved","isNavigationMenuMissing","useSelect","select","selectExistingMenu","canCreate","canCreateNavigationMenus","canUpdate","canUpdateNavigationMenu","canDelete","canDeleteNavigationMenu","isResolving","isResolvingPermissions","hasResolved","hasResolvedPermissions","records","navigationMenus","isResolvingNavigationMenus","hasResolvedNavigationMenus","useEntityRecords","PRELOADED_NAVIGATION_MENUS_QUERY","canSwitchNavigationMenu","length","canUserCreateNavigationMenus","isResolvingCanUserCreateNavigationMenus","hasResolvedCanUserCreateNavigationMenus","canUserUpdateNavigationMenu","hasResolvedCanUserUpdateNavigationMenu","undefined","canUserDeleteNavigationMenu","hasResolvedCanUserDeleteNavigationMenu","getEntityRecord","getEditedEntityRecord","hasFinishedResolution","coreStore","args","editedNavigationMenu","hasResolvedNavigationMenu","isNavigationMenuPublishedOrDraft","status"],"sources":["@wordpress/block-library/src/navigation/use-navigation-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tstore as coreStore,\n\tuseResourcePermissions,\n\tuseEntityRecords,\n} from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { PRELOADED_NAVIGATION_MENUS_QUERY } from './constants';\n\nexport default function useNavigationMenu( ref ) {\n\tconst permissions = useResourcePermissions( {\n\t\tkind: 'postType',\n\t\tname: 'wp_navigation',\n\t\tid: ref,\n\t} );\n\n\tconst {\n\t\tnavigationMenu,\n\t\tisNavigationMenuResolved,\n\t\tisNavigationMenuMissing,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\treturn selectExistingMenu( select, ref );\n\t\t},\n\t\t[ ref ]\n\t);\n\n\tconst {\n\t\t// Can the user create navigation menus?\n\t\tcanCreate: canCreateNavigationMenus,\n\n\t\t// Can the user update the specific navigation menu with the given post ID?\n\t\tcanUpdate: canUpdateNavigationMenu,\n\n\t\t// Can the user delete the specific navigation menu with the given post ID?\n\t\tcanDelete: canDeleteNavigationMenu,\n\t\tisResolving: isResolvingPermissions,\n\t\thasResolved: hasResolvedPermissions,\n\t} = permissions;\n\n\tconst {\n\t\trecords: navigationMenus,\n\t\tisResolving: isResolvingNavigationMenus,\n\t\thasResolved: hasResolvedNavigationMenus,\n\t} = useEntityRecords(\n\t\t'postType',\n\t\t`wp_navigation`,\n\t\tPRELOADED_NAVIGATION_MENUS_QUERY\n\t);\n\n\tconst canSwitchNavigationMenu = ref\n\t\t? navigationMenus?.length > 1\n\t\t: navigationMenus?.length > 0;\n\n\treturn {\n\t\tnavigationMenu,\n\t\tisNavigationMenuResolved,\n\t\tisNavigationMenuMissing,\n\t\tnavigationMenus,\n\t\tisResolvingNavigationMenus,\n\t\thasResolvedNavigationMenus,\n\t\tcanSwitchNavigationMenu,\n\t\tcanUserCreateNavigationMenus: canCreateNavigationMenus,\n\t\tisResolvingCanUserCreateNavigationMenus: isResolvingPermissions,\n\t\thasResolvedCanUserCreateNavigationMenus: hasResolvedPermissions,\n\t\tcanUserUpdateNavigationMenu: canUpdateNavigationMenu,\n\t\thasResolvedCanUserUpdateNavigationMenu: ref\n\t\t\t? hasResolvedPermissions\n\t\t\t: undefined,\n\t\tcanUserDeleteNavigationMenu: canDeleteNavigationMenu,\n\t\thasResolvedCanUserDeleteNavigationMenu: ref\n\t\t\t? hasResolvedPermissions\n\t\t\t: undefined,\n\t};\n}\n\nfunction selectExistingMenu( select, ref ) {\n\tif ( ! ref ) {\n\t\treturn {\n\t\t\tisNavigationMenuResolved: false,\n\t\t\tisNavigationMenuMissing: true,\n\t\t};\n\t}\n\n\tconst { getEntityRecord, getEditedEntityRecord, hasFinishedResolution } =\n\t\tselect( coreStore );\n\n\tconst args = [ 'postType', 'wp_navigation', ref ];\n\tconst navigationMenu = getEntityRecord( ...args );\n\tconst editedNavigationMenu = getEditedEntityRecord( ...args );\n\tconst hasResolvedNavigationMenu = hasFinishedResolution(\n\t\t'getEditedEntityRecord',\n\t\targs\n\t);\n\n\t// Only published Navigation posts are considered valid.\n\t// Draft Navigation posts are valid only on the editor,\n\t// requiring a post update to publish to show in frontend.\n\t// To achieve that, index.php must reflect this validation only for published.\n\tconst isNavigationMenuPublishedOrDraft =\n\t\teditedNavigationMenu.status === 'publish' ||\n\t\teditedNavigationMenu.status === 'draft';\n\n\treturn {\n\t\tisNavigationMenuResolved: hasResolvedNavigationMenu,\n\t\tisNavigationMenuMissing:\n\t\t\thasResolvedNavigationMenu &&\n\t\t\t( ! navigationMenu || ! isNavigationMenuPublishedOrDraft ),\n\n\t\t// getEditedEntityRecord will return the post regardless of status.\n\t\t// Therefore if the found post is not published then we should ignore it.\n\t\tnavigationMenu: isNavigationMenuPublishedOrDraft\n\t\t\t? editedNavigationMenu\n\t\t\t: null,\n\t};\n}\n"],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAF,OAAA;AAbA;AACA;AACA;;AAQA;AACA;AACA;;AAGe,SAASG,iBAAiBA,CAAEC,GAAG,EAAG;EAChD,MAAMC,WAAW,GAAG,IAAAC,gCAAsB,EAAE;IAC3CC,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,OAAO;MACNO,wBAAwB,EAAE,KAAK;MAC/BC,uBAAuB,EAAE;IAC1B,CAAC;EACF;EAEA,MAAM;IAAE8B,eAAe;IAAEC,qBAAqB;IAAEC;EAAsB,CAAC,GACtE9B,MAAM,CAAE+B,eAAU,CAAC;EAEpB,MAAMC,IAAI,GAAG,CAAE,UAAU,EAAE,eAAe,EAAE1C,GAAG,CAAE;EACjD,MAAMM,cAAc,GAAGgC,eAAe,CAAE,GAAGI,IAAK,CAAC;EACjD,MAAMC,oBAAoB,GAAGJ,qBAAqB,CAAE,GAAGG,IAAK,CAAC;EAC7D,MAAME,yBAAyB,GAAGJ,qBAAqB,CACtD,uBAAuB,EACvBE,IACD,CAAC;;EAED;EACA;EACA;EACA;EACA,MAAMG,gCAAgC,GACrCF,oBAAoB,CAACG,MAAM,KAAK,SAAS,IACzCH,oBAAoB,CAACG,MAAM,KAAK,OAAO;EAExC,OAAO;IACNvC,wBAAwB,EAAEqC,yBAAyB;IACnDpC,uBAAuB,EACtBoC,yBAAyB,KACvB,CAAEtC,cAAc,IAAI,CAAEuC,gCAAgC,CAAE;IAE3D;IACA;IACAvC,cAAc,EAAEuC,gCAAgC,GAC7CF,oBAAoB,GACpB;EACJ,CAAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blocks","_data","_components","_keycodes","_i18n","_blockEditor","_url","_element","_dom","_htmlEntities","_icons","_coreData","_compose","_linkUi","_updateAttributes","_utils","_jsxRuntime","DEFAULT_BLOCK","name","useIsDraggingWithin","elementRef","isDraggingWithin","setIsDraggingWithin","useState","useEffect","ownerDocument","current","handleDragStart","event","handleDragEnter","handleDragEnd","contains","target","addEventListener","removeEventListener","useIsInvalidLink","kind","type","id","isPostType","hasId","Number","isInteger","postStatus","useSelect","select","getEntityRecord","coreStore","status","isInvalid","isDraft","getMissingText","missingText","__","Controls","attributes","setAttributes","setIsLabelFieldFocused","label","url","description","title","rel","jsxs","PanelBody","children","jsx","TextControl","__nextHasNoMarginBottom","__next40pxDefaultSize","value","stripHTML","onChange","labelValue","autoComplete","onFocus","onBlur","safeDecodeURI","urlValue","updateAttributes","TextareaControl","descriptionValue","help","titleValue","relValue","NavigationLinkEdit","isSelected","insertBlocksAfter","mergeBlocks","onReplace","context","clientId","maxNestingLevel","replaceBlock","__unstableMarkNextChangeAsNotPersistent","selectBlock","selectPreviousBlock","useDispatch","blockEditorStore","isLinkOpen","setIsLinkOpen","openedBy","setOpenedBy","popoverAnchor","setPopoverAnchor","listItemRef","useRef","itemLabelPlaceholder","ref","linkUIref","prevUrl","usePrevious","isLabelFieldFocused","isAtMaxNesting","isTopLevelLink","isParentOfSelectedBlock","hasChildren","getBlockCount","getBlockName","getBlockRootClientId","hasSelectedInnerBlock","getBlockParentsByBlockName","length","getBlocks","transformToSubmenu","innerBlocks","createBlock","newSubmenu","isURL","prependHTTP","test","selectLabelText","focus","defaultView","selection","getSelection","range","createRange","selectNodeContents","removeAllRanges","addRange","removeLink","undefined","opensInNewTab","textColor","customTextColor","backgroundColor","customBackgroundColor","getColors","onKeyDown","isKeyboardEvent","primary","preventDefault","stopPropagation","blockProps","useBlockProps","useMergeRefs","className","clsx","getColorClassName","style","color","innerBlocksProps","useInnerBlocksProps","defaultBlock","directInsert","renderAppender","onClick","classes","placeholderText","tooltipText","Fragment","BlockControls","ToolbarGroup","ToolbarButton","icon","linkIcon","shortcut","displayShortcut","currentTarget","addSubmenu","InspectorControls","Tooltip","text","RichText","identifier","onMerge","__unstableOnSplitAtEnd","placeholder","withoutInteractiveFormatting","allowedFormats","decodeEntities","trim","LinkUI","link","onClose","window","document","activeElement","anchor","onRemove","updatedValue"],"sources":["@wordpress/block-library/src/navigation-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createBlock } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPanelBody,\n\tTextControl,\n\tTextareaControl,\n\tToolbarButton,\n\tTooltip,\n\tToolbarGroup,\n} from '@wordpress/components';\nimport { displayShortcut, isKeyboardEvent } from '@wordpress/keycodes';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\tgetColorClassName,\n\tuseInnerBlocksProps,\n} from '@wordpress/block-editor';\nimport { isURL, prependHTTP, safeDecodeURI } from '@wordpress/url';\nimport { useState, useEffect, useRef } from '@wordpress/element';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { link as linkIcon, addSubmenu } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMergeRefs, usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { LinkUI } from './link-ui';\nimport { updateAttributes } from './update-attributes';\nimport { getColors } from '../navigation/edit/utils';\n\nconst DEFAULT_BLOCK = { name: 'core/navigation-link' };\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}, [ elementRef ] );\n\n\treturn isDraggingWithin;\n};\n\nconst useIsInvalidLink = ( kind, type, id ) => {\n\tconst isPostType =\n\t\tkind === 'post-type' || type === 'post' || type === 'page';\n\tconst hasId = Number.isInteger( id );\n\tconst postStatus = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isPostType ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\treturn getEntityRecord( 'postType', type, id )?.status;\n\t\t},\n\t\t[ isPostType, type, id ]\n\t);\n\n\t// Check Navigation Link validity if:\n\t// 1. Link is 'post-type'.\n\t// 2. It has an id.\n\t// 3. It's neither null, nor undefined, as valid items might be either of those while loading.\n\t// If those conditions are met, check if\n\t// 1. The post status is published.\n\t// 2. The Navigation Link item has no label.\n\t// If either of those is true, invalidate.\n\tconst isInvalid =\n\t\tisPostType && hasId && postStatus && 'trash' === postStatus;\n\tconst isDraft = 'draft' === postStatus;\n\n\treturn [ isInvalid, isDraft ];\n};\n\nfunction getMissingText( type ) {\n\tlet missingText = '';\n\n\tswitch ( type ) {\n\t\tcase 'post':\n\t\t\t/* translators: label for missing post in navigation link block */\n\t\t\tmissingText = __( 'Select post' );\n\t\t\tbreak;\n\t\tcase 'page':\n\t\t\t/* translators: label for missing page in navigation link block */\n\t\t\tmissingText = __( 'Select page' );\n\t\t\tbreak;\n\t\tcase 'category':\n\t\t\t/* translators: label for missing category in navigation link block */\n\t\t\tmissingText = __( 'Select category' );\n\t\t\tbreak;\n\t\tcase 'tag':\n\t\t\t/* translators: label for missing tag in navigation link block */\n\t\t\tmissingText = __( 'Select tag' );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t/* translators: label for missing values in navigation link block */\n\t\t\tmissingText = __( 'Add link' );\n\t}\n\n\treturn missingText;\n}\n\n/*\n * Warning, this duplicated in\n * packages/block-library/src/navigation-submenu/edit.js\n * Consider reuseing this components for both blocks.\n */\nfunction Controls( { attributes, setAttributes, setIsLabelFieldFocused } ) {\n\tconst { label, url, description, title, rel } = attributes;\n\treturn (\n\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t<TextControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvalue={ label ? stripHTML( label ) : '' }\n\t\t\t\tonChange={ ( labelValue ) => {\n\t\t\t\t\tsetAttributes( { label: labelValue } );\n\t\t\t\t} }\n\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tonFocus={ () => setIsLabelFieldFocused( true ) }\n\t\t\t\tonBlur={ () => setIsLabelFieldFocused( false ) }\n\t\t\t/>\n\t\t\t<TextControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvalue={ url ? safeDecodeURI( url ) : '' }\n\t\t\t\tonChange={ ( urlValue ) => {\n\t\t\t\t\tupdateAttributes(\n\t\t\t\t\t\t{ url: urlValue },\n\t\t\t\t\t\tsetAttributes,\n\t\t\t\t\t\tattributes\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t\tlabel={ __( 'Link' ) }\n\t\t\t\tautoComplete=\"off\"\n\t\t\t/>\n\t\t\t<TextareaControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tvalue={ description || '' }\n\t\t\t\tonChange={ ( descriptionValue ) => {\n\t\t\t\t\tsetAttributes( { description: descriptionValue } );\n\t\t\t\t} }\n\t\t\t\tlabel={ __( 'Description' ) }\n\t\t\t\thelp={ __(\n\t\t\t\t\t'The description will be displayed in the menu if the current theme supports it.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<TextControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvalue={ title || '' }\n\t\t\t\tonChange={ ( titleValue ) => {\n\t\t\t\t\tsetAttributes( { title: titleValue } );\n\t\t\t\t} }\n\t\t\t\tlabel={ __( 'Title attribute' ) }\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\thelp={ __(\n\t\t\t\t\t'Additional information to help clarify the purpose of the link.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<TextControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvalue={ rel || '' }\n\t\t\t\tonChange={ ( relValue ) => {\n\t\t\t\t\tsetAttributes( { rel: relValue } );\n\t\t\t\t} }\n\t\t\t\tlabel={ __( 'Rel attribute' ) }\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\thelp={ __(\n\t\t\t\t\t'The relationship of the linked URL as space-separated link types.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PanelBody>\n\t);\n}\n\nexport default function NavigationLinkEdit( {\n\tattributes,\n\tisSelected,\n\tsetAttributes,\n\tinsertBlocksAfter,\n\tmergeBlocks,\n\tonReplace,\n\tcontext,\n\tclientId,\n} ) {\n\tconst { id, label, type, url, description, kind } = attributes;\n\n\tconst [ isInvalid, isDraft ] = useIsInvalidLink( kind, type, id );\n\tconst { maxNestingLevel } = context;\n\n\tconst {\n\t\treplaceBlock,\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t\tselectBlock,\n\t\tselectPreviousBlock,\n\t} = useDispatch( blockEditorStore );\n\t// Have the link editing ui open on mount when lacking a url and selected.\n\tconst [ isLinkOpen, setIsLinkOpen ] = useState( isSelected && ! url );\n\t// Store what element opened the popover, so we know where to return focus to (toolbar button vs navigation link text)\n\tconst [ openedBy, setOpenedBy ] = useState( null );\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\tconst listItemRef = useRef( null );\n\tconst isDraggingWithin = useIsDraggingWithin( listItemRef );\n\tconst itemLabelPlaceholder = __( 'Add label…' );\n\tconst ref = useRef();\n\tconst linkUIref = useRef();\n\tconst prevUrl = usePrevious( url );\n\n\t// Change the label using inspector causes rich text to change focus on firefox.\n\t// This is a workaround to keep the focus on the label field when label filed is focused we don't render the rich text.\n\tconst [ isLabelFieldFocused, setIsLabelFieldFocused ] = useState( false );\n\n\tconst {\n\t\tisAtMaxNesting,\n\t\tisTopLevelLink,\n\t\tisParentOfSelectedBlock,\n\t\thasChildren,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockCount,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t\tgetBlockParentsByBlockName,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\treturn {\n\t\t\t\tisAtMaxNesting:\n\t\t\t\t\tgetBlockParentsByBlockName( clientId, [\n\t\t\t\t\t\t'core/navigation-link',\n\t\t\t\t\t\t'core/navigation-submenu',\n\t\t\t\t\t] ).length >= maxNestingLevel,\n\t\t\t\tisTopLevelLink:\n\t\t\t\t\tgetBlockName( getBlockRootClientId( clientId ) ) ===\n\t\t\t\t\t'core/navigation',\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\thasChildren: !! getBlockCount( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, maxNestingLevel ]\n\t);\n\tconst { getBlocks } = useSelect( blockEditorStore );\n\n\t/**\n\t * Transform to submenu block.\n\t */\n\tconst transformToSubmenu = () => {\n\t\tlet innerBlocks = getBlocks( clientId );\n\t\tif ( innerBlocks.length === 0 ) {\n\t\t\tinnerBlocks = [ createBlock( 'core/navigation-link' ) ];\n\t\t\tselectBlock( innerBlocks[ 0 ].clientId );\n\t\t}\n\t\tconst newSubmenu = createBlock(\n\t\t\t'core/navigation-submenu',\n\t\t\tattributes,\n\t\t\tinnerBlocks\n\t\t);\n\t\treplaceBlock( clientId, newSubmenu );\n\t};\n\n\tuseEffect( () => {\n\t\t// If block has inner blocks, transform to Submenu.\n\t\tif ( hasChildren ) {\n\t\t\t// This side-effect should not create an undo level as those should\n\t\t\t// only be created via user interactions.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\ttransformToSubmenu();\n\t\t}\n\t}, [ hasChildren ] );\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\t// We only want to do this when the URL has gone from nothing to a new URL AND the label looks like a URL\n\t\tif (\n\t\t\t! prevUrl &&\n\t\t\turl &&\n\t\t\tisLinkOpen &&\n\t\t\tisURL( prependHTTP( label ) ) &&\n\t\t\t/^.+\\.[a-z]+/.test( label )\n\t\t) {\n\t\t\t// Focus and select the label text.\n\t\t\tselectLabelText();\n\t\t}\n\t}, [ prevUrl, url, isLinkOpen, label ] );\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\t/**\n\t * Removes the current link if set.\n\t */\n\tfunction removeLink() {\n\t\t// Reset all attributes that comprise the link.\n\t\t// It is critical that all attributes are reset\n\t\t// to their default values otherwise this may\n\t\t// in advertently trigger side effects because\n\t\t// the values will have \"changed\".\n\t\tsetAttributes( {\n\t\t\turl: undefined,\n\t\t\tlabel: undefined,\n\t\t\tid: undefined,\n\t\t\tkind: undefined,\n\t\t\ttype: undefined,\n\t\t\topensInNewTab: false,\n\t\t} );\n\n\t\t// Close the link editing UI.\n\t\tsetIsLinkOpen( false );\n\t}\n\n\tconst {\n\t\ttextColor,\n\t\tcustomTextColor,\n\t\tbackgroundColor,\n\t\tcustomBackgroundColor,\n\t} = getColors( context, ! isTopLevelLink );\n\n\tfunction onKeyDown( event ) {\n\t\tif ( isKeyboardEvent.primary( event, 'k' ) ) {\n\t\t\t// Required to prevent the command center from opening,\n\t\t\t// as it shares the CMD+K shortcut.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/59845.\n\t\t\tevent.preventDefault();\n\t\t\t// If this link is a child of a parent submenu item, the parent submenu item event will also open, closing this popover\n\t\t\tevent.stopPropagation();\n\t\t\tsetIsLinkOpen( true );\n\t\t\tsetOpenedBy( ref.current );\n\t\t}\n\t}\n\n\tconst blockProps = useBlockProps( {\n\t\tref: useMergeRefs( [ setPopoverAnchor, listItemRef ] ),\n\t\tclassName: clsx( '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': hasChildren,\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( 'background-color', backgroundColor ) ]:\n\t\t\t\t!! backgroundColor,\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\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\t...blockProps,\n\t\t\tclassName: 'remove-outline', // Remove the outline from the inner blocks container.\n\t\t},\n\t\t{\n\t\t\tdefaultBlock: DEFAULT_BLOCK,\n\t\t\tdirectInsert: true,\n\t\t\trenderAppender: false,\n\t\t}\n\t);\n\n\tif ( ! url || isInvalid || isDraft ) {\n\t\tblockProps.onClick = () => {\n\t\t\tsetIsLinkOpen( true );\n\t\t\tsetOpenedBy( ref.current );\n\t\t};\n\t}\n\n\tconst classes = clsx( 'wp-block-navigation-item__content', {\n\t\t'wp-block-navigation-link__placeholder': ! url || isInvalid || isDraft,\n\t} );\n\n\tconst missingText = getMissingText( type );\n\t/* translators: Whether the navigation link is Invalid or a Draft. */\n\tconst placeholderText = `(${\n\t\tisInvalid ? __( 'Invalid' ) : __( 'Draft' )\n\t})`;\n\tconst tooltipText =\n\t\tisInvalid || isDraft\n\t\t\t? __( 'This item has been deleted, or is a draft' )\n\t\t\t: __( 'This item is missing a link' );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tname=\"link\"\n\t\t\t\t\t\ticon={ linkIcon }\n\t\t\t\t\t\ttitle={ __( 'Link' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tsetIsLinkOpen( true );\n\t\t\t\t\t\t\tsetOpenedBy( event.currentTarget );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! isAtMaxNesting && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tname=\"submenu\"\n\t\t\t\t\t\t\ticon={ addSubmenu }\n\t\t\t\t\t\t\ttitle={ __( 'Add submenu' ) }\n\t\t\t\t\t\t\tonClick={ transformToSubmenu }\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{ /* Warning, this duplicated in packages/block-library/src/navigation-submenu/edit.js */ }\n\t\t\t<InspectorControls>\n\t\t\t\t<Controls\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tsetIsLabelFieldFocused={ setIsLabelFieldFocused }\n\t\t\t\t/>\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<a className={ classes }>\n\t\t\t\t\t{ /* eslint-enable */ }\n\t\t\t\t\t{ ! url ? (\n\t\t\t\t\t\t<div className=\"wp-block-navigation-link__placeholder-text\">\n\t\t\t\t\t\t\t<Tooltip text={ tooltipText }>\n\t\t\t\t\t\t\t\t<span>{ missingText }</span>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! isInvalid &&\n\t\t\t\t\t\t\t\t! isDraft &&\n\t\t\t\t\t\t\t\t! isLabelFieldFocused && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\t\t\tidentifier=\"label\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"wp-block-navigation-item__label\"\n\t\t\t\t\t\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\t\t\t\t\t\tonChange={ ( labelValue ) =>\n\t\t\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\t\t\tlabel: labelValue,\n\t\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\t\t\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'core/navigation-link'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Navigation link text'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\tplaceholder={ itemLabelPlaceholder }\n\t\t\t\t\t\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\t\t\t\t\t\tallowedFormats={ [\n\t\t\t\t\t\t\t\t\t\t\t\t'core/bold',\n\t\t\t\t\t\t\t\t\t\t\t\t'core/italic',\n\t\t\t\t\t\t\t\t\t\t\t\t'core/image',\n\t\t\t\t\t\t\t\t\t\t\t\t'core/strikethrough',\n\t\t\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ description && (\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"wp-block-navigation-item__description\">\n\t\t\t\t\t\t\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t\t\t\t\t\t</span>\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) }\n\t\t\t\t\t\t\t{ ( isInvalid ||\n\t\t\t\t\t\t\t\tisDraft ||\n\t\t\t\t\t\t\t\tisLabelFieldFocused ) && (\n\t\t\t\t\t\t\t\t<div className=\"wp-block-navigation-link__placeholder-text wp-block-navigation-link__label\">\n\t\t\t\t\t\t\t\t\t<Tooltip text={ tooltipText }>\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Navigation link text'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t// Some attributes are stored in an escaped form. It's a legacy issue.\n\t\t\t\t\t\t\t\t\t\t\t\t// Ideally they would be stored in a raw, unescaped form.\n\t\t\t\t\t\t\t\t\t\t\t\t// Unescape is used here to \"recover\" the escaped characters\n\t\t\t\t\t\t\t\t\t\t\t\t// so they display without encoding.\n\t\t\t\t\t\t\t\t\t\t\t\t// See `updateAttributes` for more details.\n\t\t\t\t\t\t\t\t\t\t\t\t`${ decodeEntities( label ) } ${\n\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid || isDraft\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? placeholderText\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t\t\t\t}`.trim()\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t</div>\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{ isLinkOpen && (\n\t\t\t\t\t\t<LinkUI\n\t\t\t\t\t\t\tref={ linkUIref }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\tlink={ attributes }\n\t\t\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\t\t\t// If there is no link then remove the auto-inserted block.\n\t\t\t\t\t\t\t\t// This avoids empty blocks which can provided a poor UX.\n\t\t\t\t\t\t\t\tif ( ! url ) {\n\t\t\t\t\t\t\t\t\t// Fixes https://github.com/WordPress/gutenberg/issues/61361\n\t\t\t\t\t\t\t\t\t// There's a chance we're closing due to the user selecting the browse all button.\n\t\t\t\t\t\t\t\t\t// Only move focus if the focus is still within the popover ui. If it's not within\n\t\t\t\t\t\t\t\t\t// the popover, it's because something has taken the focus from the popover, and\n\t\t\t\t\t\t\t\t\t// we don't want to steal it back.\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tlinkUIref.current.contains(\n\t\t\t\t\t\t\t\t\t\t\twindow.document.activeElement\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t// Select the previous block to keep focus nearby\n\t\t\t\t\t\t\t\t\t\tselectPreviousBlock( clientId, true );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Remove the link.\n\t\t\t\t\t\t\t\t\tonReplace( [] );\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tsetIsLinkOpen( false );\n\t\t\t\t\t\t\t\tif ( openedBy ) {\n\t\t\t\t\t\t\t\t\topenedBy.focus();\n\t\t\t\t\t\t\t\t\tsetOpenedBy( null );\n\t\t\t\t\t\t\t\t} else if ( ref.current ) {\n\t\t\t\t\t\t\t\t\t// select the ref when adding a new link\n\t\t\t\t\t\t\t\t\tref.current.focus();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// Fallback\n\t\t\t\t\t\t\t\t\tselectPreviousBlock( clientId, 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\tanchor={ popoverAnchor }\n\t\t\t\t\t\t\tonRemove={ removeLink }\n\t\t\t\t\t\t\tonChange={ ( updatedValue ) => {\n\t\t\t\t\t\t\t\tupdateAttributes(\n\t\t\t\t\t\t\t\t\tupdatedValue,\n\t\t\t\t\t\t\t\t\tsetAttributes,\n\t\t\t\t\t\t\t\t\tattributes\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</a>\n\t\t\t\t<div { ...innerBlocksProps } />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"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ACtB,IAAKC,QAAQ,EAAG;cACfA,QAAQ,CAAC+B,KAAK,CAAC,CAAC;cAChB9B,WAAW,CAAE,IAAK,CAAC;YACpB,CAAC,MAAM,IAAKM,GAAG,CAAClF,OAAO,EAAG;cACzB;cACAkF,GAAG,CAAClF,OAAO,CAAC0G,KAAK,CAAC,CAAC;YACpB,CAAC,MAAM;cACN;cACApC,mBAAmB,CAAEL,QAAQ,EAAE,IAAK,CAAC;YACtC;UACD,CAAG;UACH4G,MAAM,EAAGhG,aAAe;UACxBiG,QAAQ,EAAG3D,UAAY;UACvBrE,QAAQ,EAAKiI,YAAY,IAAM;YAC9B,IAAA1H,kCAAgB,EACf0H,YAAY,EACZjJ,aAAa,EACbD,UACD,CAAC;UACF;QAAG,CACH,CACD;MAAA,CACC,CAAC,eACJ,IAAAvC,WAAA,CAAAkD,GAAA;QAAA,GAAUgG;MAAgB,CAAI,CAAC;IAAA,CAC3B,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blocks","_data","_components","_keycodes","_i18n","_blockEditor","_url","_element","_dom","_htmlEntities","_icons","_coreData","_compose","_linkUi","_updateAttributes","_utils","_jsxRuntime","DEFAULT_BLOCK","name","useIsDraggingWithin","elementRef","isDraggingWithin","setIsDraggingWithin","useState","useEffect","ownerDocument","current","handleDragStart","event","handleDragEnter","handleDragEnd","contains","target","addEventListener","removeEventListener","useIsInvalidLink","kind","type","id","isPostType","hasId","Number","isInteger","postStatus","useSelect","select","getEntityRecord","coreStore","status","isInvalid","isDraft","getMissingText","missingText","__","Controls","attributes","setAttributes","setIsLabelFieldFocused","label","url","description","title","rel","jsxs","PanelBody","children","jsx","TextControl","__nextHasNoMarginBottom","__next40pxDefaultSize","value","stripHTML","onChange","labelValue","autoComplete","onFocus","onBlur","safeDecodeURI","urlValue","updateAttributes","TextareaControl","descriptionValue","help","titleValue","relValue","NavigationLinkEdit","isSelected","insertBlocksAfter","mergeBlocks","onReplace","context","clientId","maxNestingLevel","replaceBlock","__unstableMarkNextChangeAsNotPersistent","selectBlock","selectPreviousBlock","useDispatch","blockEditorStore","isLinkOpen","setIsLinkOpen","openedBy","setOpenedBy","popoverAnchor","setPopoverAnchor","listItemRef","useRef","itemLabelPlaceholder","ref","linkUIref","prevUrl","usePrevious","isLabelFieldFocused","isAtMaxNesting","isTopLevelLink","isParentOfSelectedBlock","hasChildren","getBlockCount","getBlockName","getBlockRootClientId","hasSelectedInnerBlock","getBlockParentsByBlockName","length","getBlocks","transformToSubmenu","innerBlocks","createBlock","newSubmenu","isURL","prependHTTP","test","selectLabelText","focus","defaultView","selection","getSelection","range","createRange","selectNodeContents","removeAllRanges","addRange","removeLink","undefined","opensInNewTab","textColor","customTextColor","backgroundColor","customBackgroundColor","getColors","onKeyDown","isKeyboardEvent","primary","preventDefault","stopPropagation","blockProps","useBlockProps","useMergeRefs","className","clsx","getColorClassName","style","color","innerBlocksProps","useInnerBlocksProps","defaultBlock","directInsert","renderAppender","onClick","classes","placeholderText","tooltipText","Fragment","BlockControls","ToolbarGroup","ToolbarButton","icon","linkIcon","shortcut","displayShortcut","currentTarget","addSubmenu","InspectorControls","Tooltip","text","RichText","identifier","onMerge","__unstableOnSplitAtEnd","placeholder","withoutInteractiveFormatting","allowedFormats","decodeEntities","trim","LinkUI","link","onClose","window","document","activeElement","anchor","onRemove","updatedValue"],"sources":["@wordpress/block-library/src/navigation-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createBlock } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPanelBody,\n\tTextControl,\n\tTextareaControl,\n\tToolbarButton,\n\tTooltip,\n\tToolbarGroup,\n} from '@wordpress/components';\nimport { displayShortcut, isKeyboardEvent } from '@wordpress/keycodes';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\tgetColorClassName,\n\tuseInnerBlocksProps,\n} from '@wordpress/block-editor';\nimport { isURL, prependHTTP, safeDecodeURI } from '@wordpress/url';\nimport { useState, useEffect, useRef } from '@wordpress/element';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { link as linkIcon, addSubmenu } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMergeRefs, usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { LinkUI } from './link-ui';\nimport { updateAttributes } from './update-attributes';\nimport { getColors } from '../navigation/edit/utils';\n\nconst DEFAULT_BLOCK = { name: 'core/navigation-link' };\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}, [ elementRef ] );\n\n\treturn isDraggingWithin;\n};\n\nconst useIsInvalidLink = ( kind, type, id ) => {\n\tconst isPostType =\n\t\tkind === 'post-type' || type === 'post' || type === 'page';\n\tconst hasId = Number.isInteger( id );\n\tconst postStatus = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isPostType ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\treturn getEntityRecord( 'postType', type, id )?.status;\n\t\t},\n\t\t[ isPostType, type, id ]\n\t);\n\n\t// Check Navigation Link validity if:\n\t// 1. Link is 'post-type'.\n\t// 2. It has an id.\n\t// 3. It's neither null, nor undefined, as valid items might be either of those while loading.\n\t// If those conditions are met, check if\n\t// 1. The post status is published.\n\t// 2. The Navigation Link item has no label.\n\t// If either of those is true, invalidate.\n\tconst isInvalid =\n\t\tisPostType && hasId && postStatus && 'trash' === postStatus;\n\tconst isDraft = 'draft' === postStatus;\n\n\treturn [ isInvalid, isDraft ];\n};\n\nfunction getMissingText( type ) {\n\tlet missingText = '';\n\n\tswitch ( type ) {\n\t\tcase 'post':\n\t\t\t/* translators: label for missing post in navigation link block */\n\t\t\tmissingText = __( 'Select post' );\n\t\t\tbreak;\n\t\tcase 'page':\n\t\t\t/* translators: label for missing page in navigation link block */\n\t\t\tmissingText = __( 'Select page' );\n\t\t\tbreak;\n\t\tcase 'category':\n\t\t\t/* translators: label for missing category in navigation link block */\n\t\t\tmissingText = __( 'Select category' );\n\t\t\tbreak;\n\t\tcase 'tag':\n\t\t\t/* translators: label for missing tag in navigation link block */\n\t\t\tmissingText = __( 'Select tag' );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t/* translators: label for missing values in navigation link block */\n\t\t\tmissingText = __( 'Add link' );\n\t}\n\n\treturn missingText;\n}\n\n/*\n * Warning, this duplicated in\n * packages/block-library/src/navigation-submenu/edit.js\n * Consider reuseing this components for both blocks.\n */\nfunction Controls( { attributes, setAttributes, setIsLabelFieldFocused } ) {\n\tconst { label, url, description, title, rel } = attributes;\n\treturn (\n\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t<TextControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvalue={ label ? stripHTML( label ) : '' }\n\t\t\t\tonChange={ ( labelValue ) => {\n\t\t\t\t\tsetAttributes( { label: labelValue } );\n\t\t\t\t} }\n\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tonFocus={ () => setIsLabelFieldFocused( true ) }\n\t\t\t\tonBlur={ () => setIsLabelFieldFocused( false ) }\n\t\t\t/>\n\t\t\t<TextControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvalue={ url ? safeDecodeURI( url ) : '' }\n\t\t\t\tonChange={ ( urlValue ) => {\n\t\t\t\t\tupdateAttributes(\n\t\t\t\t\t\t{ url: urlValue },\n\t\t\t\t\t\tsetAttributes,\n\t\t\t\t\t\tattributes\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t\tlabel={ __( 'Link' ) }\n\t\t\t\tautoComplete=\"off\"\n\t\t\t/>\n\t\t\t<TextareaControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tvalue={ description || '' }\n\t\t\t\tonChange={ ( descriptionValue ) => {\n\t\t\t\t\tsetAttributes( { description: descriptionValue } );\n\t\t\t\t} }\n\t\t\t\tlabel={ __( 'Description' ) }\n\t\t\t\thelp={ __(\n\t\t\t\t\t'The description will be displayed in the menu if the current theme supports it.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<TextControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvalue={ title || '' }\n\t\t\t\tonChange={ ( titleValue ) => {\n\t\t\t\t\tsetAttributes( { title: titleValue } );\n\t\t\t\t} }\n\t\t\t\tlabel={ __( 'Title attribute' ) }\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\thelp={ __(\n\t\t\t\t\t'Additional information to help clarify the purpose of the link.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<TextControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvalue={ rel || '' }\n\t\t\t\tonChange={ ( relValue ) => {\n\t\t\t\t\tsetAttributes( { rel: relValue } );\n\t\t\t\t} }\n\t\t\t\tlabel={ __( 'Rel attribute' ) }\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\thelp={ __(\n\t\t\t\t\t'The relationship of the linked URL as space-separated link types.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PanelBody>\n\t);\n}\n\nexport default function NavigationLinkEdit( {\n\tattributes,\n\tisSelected,\n\tsetAttributes,\n\tinsertBlocksAfter,\n\tmergeBlocks,\n\tonReplace,\n\tcontext,\n\tclientId,\n} ) {\n\tconst { id, label, type, url, description, kind } = attributes;\n\n\tconst [ isInvalid, isDraft ] = useIsInvalidLink( kind, type, id );\n\tconst { maxNestingLevel } = context;\n\n\tconst {\n\t\treplaceBlock,\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t\tselectBlock,\n\t\tselectPreviousBlock,\n\t} = useDispatch( blockEditorStore );\n\t// Have the link editing ui open on mount when lacking a url and selected.\n\tconst [ isLinkOpen, setIsLinkOpen ] = useState( isSelected && ! url );\n\t// Store what element opened the popover, so we know where to return focus to (toolbar button vs navigation link text)\n\tconst [ openedBy, setOpenedBy ] = useState( null );\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\tconst listItemRef = useRef( null );\n\tconst isDraggingWithin = useIsDraggingWithin( listItemRef );\n\tconst itemLabelPlaceholder = __( 'Add label…' );\n\tconst ref = useRef();\n\tconst linkUIref = useRef();\n\tconst prevUrl = usePrevious( url );\n\n\t// Change the label using inspector causes rich text to change focus on firefox.\n\t// This is a workaround to keep the focus on the label field when label filed is focused we don't render the rich text.\n\tconst [ isLabelFieldFocused, setIsLabelFieldFocused ] = useState( false );\n\n\tconst {\n\t\tisAtMaxNesting,\n\t\tisTopLevelLink,\n\t\tisParentOfSelectedBlock,\n\t\thasChildren,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockCount,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t\tgetBlockParentsByBlockName,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\treturn {\n\t\t\t\tisAtMaxNesting:\n\t\t\t\t\tgetBlockParentsByBlockName( clientId, [\n\t\t\t\t\t\t'core/navigation-link',\n\t\t\t\t\t\t'core/navigation-submenu',\n\t\t\t\t\t] ).length >= maxNestingLevel,\n\t\t\t\tisTopLevelLink:\n\t\t\t\t\tgetBlockName( getBlockRootClientId( clientId ) ) ===\n\t\t\t\t\t'core/navigation',\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\thasChildren: !! getBlockCount( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, maxNestingLevel ]\n\t);\n\tconst { getBlocks } = useSelect( blockEditorStore );\n\n\t/**\n\t * Transform to submenu block.\n\t */\n\tconst transformToSubmenu = () => {\n\t\tlet innerBlocks = getBlocks( clientId );\n\t\tif ( innerBlocks.length === 0 ) {\n\t\t\tinnerBlocks = [ createBlock( 'core/navigation-link' ) ];\n\t\t\tselectBlock( innerBlocks[ 0 ].clientId );\n\t\t}\n\t\tconst newSubmenu = createBlock(\n\t\t\t'core/navigation-submenu',\n\t\t\tattributes,\n\t\t\tinnerBlocks\n\t\t);\n\t\treplaceBlock( clientId, newSubmenu );\n\t};\n\n\tuseEffect( () => {\n\t\t// If block has inner blocks, transform to Submenu.\n\t\tif ( hasChildren ) {\n\t\t\t// This side-effect should not create an undo level as those should\n\t\t\t// only be created via user interactions.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\ttransformToSubmenu();\n\t\t}\n\t}, [ hasChildren ] );\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\t// We only want to do this when the URL has gone from nothing to a new URL AND the label looks like a URL\n\t\tif (\n\t\t\t! prevUrl &&\n\t\t\turl &&\n\t\t\tisLinkOpen &&\n\t\t\tisURL( prependHTTP( label ) ) &&\n\t\t\t/^.+\\.[a-z]+/.test( label )\n\t\t) {\n\t\t\t// Focus and select the label text.\n\t\t\tselectLabelText();\n\t\t}\n\t}, [ prevUrl, url, isLinkOpen, label ] );\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\t/**\n\t * Removes the current link if set.\n\t */\n\tfunction removeLink() {\n\t\t// Reset all attributes that comprise the link.\n\t\t// It is critical that all attributes are reset\n\t\t// to their default values otherwise this may\n\t\t// in advertently trigger side effects because\n\t\t// the values will have \"changed\".\n\t\tsetAttributes( {\n\t\t\turl: undefined,\n\t\t\tlabel: undefined,\n\t\t\tid: undefined,\n\t\t\tkind: undefined,\n\t\t\ttype: undefined,\n\t\t\topensInNewTab: false,\n\t\t} );\n\n\t\t// Close the link editing UI.\n\t\tsetIsLinkOpen( false );\n\t}\n\n\tconst {\n\t\ttextColor,\n\t\tcustomTextColor,\n\t\tbackgroundColor,\n\t\tcustomBackgroundColor,\n\t} = getColors( context, ! isTopLevelLink );\n\n\tfunction onKeyDown( event ) {\n\t\tif ( isKeyboardEvent.primary( event, 'k' ) ) {\n\t\t\t// Required to prevent the command center from opening,\n\t\t\t// as it shares the CMD+K shortcut.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/59845.\n\t\t\tevent.preventDefault();\n\t\t\t// If this link is a child of a parent submenu item, the parent submenu item event will also open, closing this popover\n\t\t\tevent.stopPropagation();\n\t\t\tsetIsLinkOpen( true );\n\t\t\tsetOpenedBy( ref.current );\n\t\t}\n\t}\n\n\tconst blockProps = useBlockProps( {\n\t\tref: useMergeRefs( [ setPopoverAnchor, listItemRef ] ),\n\t\tclassName: clsx( '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': hasChildren,\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( 'background-color', backgroundColor ) ]:\n\t\t\t\t!! backgroundColor,\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\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\t...blockProps,\n\t\t\tclassName: 'remove-outline', // Remove the outline from the inner blocks container.\n\t\t},\n\t\t{\n\t\t\tdefaultBlock: DEFAULT_BLOCK,\n\t\t\tdirectInsert: true,\n\t\t\trenderAppender: false,\n\t\t}\n\t);\n\n\tif ( ! url || isInvalid || isDraft ) {\n\t\tblockProps.onClick = () => {\n\t\t\tsetIsLinkOpen( true );\n\t\t\tsetOpenedBy( ref.current );\n\t\t};\n\t}\n\n\tconst classes = clsx( 'wp-block-navigation-item__content', {\n\t\t'wp-block-navigation-link__placeholder': ! url || isInvalid || isDraft,\n\t} );\n\n\tconst missingText = getMissingText( type );\n\t/* translators: Whether the navigation link is Invalid or a Draft. */\n\tconst placeholderText = `(${\n\t\tisInvalid ? __( 'Invalid' ) : __( 'Draft' )\n\t})`;\n\tconst tooltipText =\n\t\tisInvalid || isDraft\n\t\t\t? __( 'This item has been deleted, or is a draft' )\n\t\t\t: __( 'This item is missing a link' );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tname=\"link\"\n\t\t\t\t\t\ticon={ linkIcon }\n\t\t\t\t\t\ttitle={ __( 'Link' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tsetIsLinkOpen( true );\n\t\t\t\t\t\t\tsetOpenedBy( event.currentTarget );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! isAtMaxNesting && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tname=\"submenu\"\n\t\t\t\t\t\t\ticon={ addSubmenu }\n\t\t\t\t\t\t\ttitle={ __( 'Add submenu' ) }\n\t\t\t\t\t\t\tonClick={ transformToSubmenu }\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{ /* Warning, this duplicated in packages/block-library/src/navigation-submenu/edit.js */ }\n\t\t\t<InspectorControls>\n\t\t\t\t<Controls\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tsetIsLabelFieldFocused={ setIsLabelFieldFocused }\n\t\t\t\t/>\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<a className={ classes }>\n\t\t\t\t\t{ /* eslint-enable */ }\n\t\t\t\t\t{ ! url ? (\n\t\t\t\t\t\t<div className=\"wp-block-navigation-link__placeholder-text\">\n\t\t\t\t\t\t\t<Tooltip text={ tooltipText }>\n\t\t\t\t\t\t\t\t<span>{ missingText }</span>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! isInvalid &&\n\t\t\t\t\t\t\t\t! isDraft &&\n\t\t\t\t\t\t\t\t! isLabelFieldFocused && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\t\t\tidentifier=\"label\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"wp-block-navigation-item__label\"\n\t\t\t\t\t\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\t\t\t\t\t\tonChange={ ( labelValue ) =>\n\t\t\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\t\t\tlabel: labelValue,\n\t\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\t\t\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'core/navigation-link'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Navigation link text'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\tplaceholder={ itemLabelPlaceholder }\n\t\t\t\t\t\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\t\t\t\t\t\tallowedFormats={ [\n\t\t\t\t\t\t\t\t\t\t\t\t'core/bold',\n\t\t\t\t\t\t\t\t\t\t\t\t'core/italic',\n\t\t\t\t\t\t\t\t\t\t\t\t'core/image',\n\t\t\t\t\t\t\t\t\t\t\t\t'core/strikethrough',\n\t\t\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ description && (\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"wp-block-navigation-item__description\">\n\t\t\t\t\t\t\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t\t\t\t\t\t</span>\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) }\n\t\t\t\t\t\t\t{ ( isInvalid ||\n\t\t\t\t\t\t\t\tisDraft ||\n\t\t\t\t\t\t\t\tisLabelFieldFocused ) && (\n\t\t\t\t\t\t\t\t<div className=\"wp-block-navigation-link__placeholder-text wp-block-navigation-link__label\">\n\t\t\t\t\t\t\t\t\t<Tooltip text={ tooltipText }>\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Navigation link text'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t// Some attributes are stored in an escaped form. It's a legacy issue.\n\t\t\t\t\t\t\t\t\t\t\t\t// Ideally they would be stored in a raw, unescaped form.\n\t\t\t\t\t\t\t\t\t\t\t\t// Unescape is used here to \"recover\" the escaped characters\n\t\t\t\t\t\t\t\t\t\t\t\t// so they display without encoding.\n\t\t\t\t\t\t\t\t\t\t\t\t// See `updateAttributes` for more details.\n\t\t\t\t\t\t\t\t\t\t\t\t`${ decodeEntities( label ) } ${\n\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid || isDraft\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? placeholderText\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t\t\t\t}`.trim()\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t</div>\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{ isLinkOpen && (\n\t\t\t\t\t\t<LinkUI\n\t\t\t\t\t\t\tref={ linkUIref }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\tlink={ attributes }\n\t\t\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\t\t\t// If there is no link then remove the auto-inserted block.\n\t\t\t\t\t\t\t\t// This avoids empty blocks which can provided a poor UX.\n\t\t\t\t\t\t\t\tif ( ! url ) {\n\t\t\t\t\t\t\t\t\t// Fixes https://github.com/WordPress/gutenberg/issues/61361\n\t\t\t\t\t\t\t\t\t// There's a chance we're closing due to the user selecting the browse all button.\n\t\t\t\t\t\t\t\t\t// Only move focus if the focus is still within the popover ui. If it's not within\n\t\t\t\t\t\t\t\t\t// the popover, it's because something has taken the focus from the popover, and\n\t\t\t\t\t\t\t\t\t// we don't want to steal it back.\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tlinkUIref.current.contains(\n\t\t\t\t\t\t\t\t\t\t\twindow.document.activeElement\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t// Select the previous block to keep focus nearby\n\t\t\t\t\t\t\t\t\t\tselectPreviousBlock( clientId, true );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Remove the link.\n\t\t\t\t\t\t\t\t\tonReplace( [] );\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tsetIsLinkOpen( false );\n\t\t\t\t\t\t\t\tif ( openedBy ) {\n\t\t\t\t\t\t\t\t\topenedBy.focus();\n\t\t\t\t\t\t\t\t\tsetOpenedBy( null );\n\t\t\t\t\t\t\t\t} else if ( ref.current ) {\n\t\t\t\t\t\t\t\t\t// select the ref when adding a new link\n\t\t\t\t\t\t\t\t\tref.current.focus();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// Fallback\n\t\t\t\t\t\t\t\t\tselectPreviousBlock( clientId, 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\tanchor={ popoverAnchor }\n\t\t\t\t\t\t\tonRemove={ removeLink }\n\t\t\t\t\t\t\tonChange={ ( updatedValue ) => {\n\t\t\t\t\t\t\t\tupdateAttributes(\n\t\t\t\t\t\t\t\t\tupdatedValue,\n\t\t\t\t\t\t\t\t\tsetAttributes,\n\t\t\t\t\t\t\t\t\tattributes\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</a>\n\t\t\t\t<div { ...innerBlocksProps } />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAQA,IAAAI,SAAA,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AO,CAAC0G,KAAK,CAAC,CAAC;YACpB,CAAC,MAAM;cACN;cACApC,mBAAmB,CAAEL,QAAQ,EAAE,IAAK,CAAC;YACtC;UACD,CAAG;UACH4G,MAAM,EAAGhG,aAAe;UACxBiG,QAAQ,EAAG3D,UAAY;UACvBrE,QAAQ,EAAKiI,YAAY,IAAM;YAC9B,IAAA1H,kCAAgB,EACf0H,YAAY,EACZjJ,aAAa,EACbD,UACD,CAAC;UACF;QAAG,CACH,CACD;MAAA,CACC,CAAC,eACJ,IAAAvC,WAAA,CAAAkD,GAAA;QAAA,GAAUgG;MAAgB,CAAI,CAAC;IAAA,CAC3B,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_dom","require","_components","_i18n","_blockEditor","_element","_coreData","_htmlEntities","_data","_icons","_compose","_lockUnlock","_jsxRuntime","PrivateQuickInserter","QuickInserter","unlock","blockEditorPrivateApis","getSuggestionsQuery","type","kind","subtype","initialSuggestionsSearchOptions","perPage","LinkUIBlockInserter","clientId","onBack","onSelectBlock","rootBlockClientId","useSelect","select","getBlockRootClientId","blockEditorStore","focusOnMountRef","useFocusOnMount","dialogTitleId","useInstanceId","LinkControl","dialogDescritionId","jsxs","className","role","ref","children","VisuallyHidden","jsx","id","__","Button","icon","isRTL","chevronRightSmall","chevronLeftSmall","onClick","e","preventDefault","size","rootClientId","isAppender","prioritizePatterns","selectBlockOnInsert","hasSearch","onSelect","UnforwardedLinkUI","props","label","url","opensInNewTab","link","postType","addingBlock","setAddingBlock","useState","focusAddBlockButton","setFocusAddBlockButton","saveEntityRecord","useDispatch","coreStore","permissions","useResourcePermissions","name","handleCreate","pageTitle","page","title","status","decodeEntities","rendered","useMemo","stripHTML","LinkUI","onClose","Popover","placement","anchor","shift","__experimentalLinkControl","hasTextControl","hasRichPreviews","value","showInitialSuggestions","withCreateSuggestion","canCreate","createSuggestion","createSuggestionButtonText","searchTerm","format","createInterpolateElement","sprintf","mark","noDirectEntry","noURLSuggestion","suggestionsQuery","onChange","onRemove","onCancel","renderControlBottom","length","LinkUITools","exports","forwardRef","blockInserterAriaRole","addBlockButtonRef","useRef","useEffect","current","focus","__experimentalVStack","__next40pxDefaultSize","plus","_default","default"],"sources":["@wordpress/block-library/src/navigation-link/link-ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport {\n\tPopover,\n\tButton,\n\tVisuallyHidden,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\nimport {\n\t__experimentalLinkControl as LinkControl,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport {\n\tcreateInterpolateElement,\n\tuseMemo,\n\tuseState,\n\tuseRef,\n\tuseEffect,\n\tforwardRef,\n} from '@wordpress/element';\nimport {\n\tstore as coreStore,\n\tuseResourcePermissions,\n} from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { chevronLeftSmall, chevronRightSmall, plus } from '@wordpress/icons';\nimport { useInstanceId, useFocusOnMount } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\nconst { PrivateQuickInserter: QuickInserter } = unlock(\n\tblockEditorPrivateApis\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 */\nexport function 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\t\t\t// for custom link which has no type\n\t\t\t\t// always show pages as initial suggestions\n\t\t\t\tinitialSuggestionsSearchOptions: {\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tsubtype: 'page',\n\t\t\t\t\tperPage: 20,\n\t\t\t\t},\n\t\t\t};\n\t}\n}\n\nfunction LinkUIBlockInserter( { clientId, onBack, onSelectBlock } ) {\n\tconst { rootBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId } = select( blockEditorStore );\n\n\t\t\treturn {\n\t\t\t\trootBlockClientId: getBlockRootClientId( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\n\tconst dialogTitleId = useInstanceId(\n\t\tLinkControl,\n\t\t`link-ui-block-inserter__title`\n\t);\n\tconst dialogDescritionId = useInstanceId(\n\t\tLinkControl,\n\t\t`link-ui-block-inserter__description`\n\t);\n\n\tif ( ! clientId ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"link-ui-block-inserter\"\n\t\t\trole=\"dialog\"\n\t\t\taria-labelledby={ dialogTitleId }\n\t\t\taria-describedby={ dialogDescritionId }\n\t\t\tref={ focusOnMountRef }\n\t\t>\n\t\t\t<VisuallyHidden>\n\t\t\t\t<h2 id={ dialogTitleId }>{ __( 'Add block' ) }</h2>\n\n\t\t\t\t<p id={ dialogDescritionId }>\n\t\t\t\t\t{ __( 'Choose a block to add to your Navigation.' ) }\n\t\t\t\t</p>\n\t\t\t</VisuallyHidden>\n\n\t\t\t<Button\n\t\t\t\tclassName=\"link-ui-block-inserter__back\"\n\t\t\t\ticon={ isRTL() ? chevronRightSmall : chevronLeftSmall }\n\t\t\t\tonClick={ ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tonBack();\n\t\t\t\t} }\n\t\t\t\tsize=\"small\"\n\t\t\t>\n\t\t\t\t{ __( 'Back' ) }\n\t\t\t</Button>\n\n\t\t\t<QuickInserter\n\t\t\t\trootClientId={ rootBlockClientId }\n\t\t\t\tclientId={ clientId }\n\t\t\t\tisAppender={ false }\n\t\t\t\tprioritizePatterns={ false }\n\t\t\t\tselectBlockOnInsert\n\t\t\t\thasSearch={ false }\n\t\t\t\tonSelect={ onSelectBlock }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nfunction UnforwardedLinkUI( props, ref ) {\n\tconst { label, url, opensInNewTab, type, kind } = props.link;\n\tconst postType = type || 'page';\n\n\tconst [ addingBlock, setAddingBlock ] = useState( false );\n\tconst [ focusAddBlockButton, setFocusAddBlockButton ] = useState( false );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst permissions = useResourcePermissions( {\n\t\tkind: 'postType',\n\t\tname: postType,\n\t} );\n\n\tasync function handleCreate( pageTitle ) {\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\t// Make `title` property consistent with that in `fetchLinkSuggestions` where the `rendered` title (containing HTML entities)\n\t\t\t// is also being decoded. By being consistent in both locations we avoid having to branch in the rendering output code.\n\t\t\t// Ideally in the future we will update both APIs to utilise the \"raw\" form of the title which is better suited to edit contexts.\n\t\t\t// e.g.\n\t\t\t// - title.raw = \"Yes & No\"\n\t\t\t// - title.rendered = \"Yes &#038; No\"\n\t\t\t// - decodeEntities( title.rendered ) = \"Yes & No\"\n\t\t\t// See:\n\t\t\t// - https://github.com/WordPress/gutenberg/pull/41063\n\t\t\t// - https://github.com/WordPress/gutenberg/blob/a1e1fdc0e6278457e9f4fc0b31ac6d2095f5450b/packages/core-data/src/fetch/__experimental-fetch-link-suggestions.js#L212-L218\n\t\t\ttitle: decodeEntities( page.title.rendered ),\n\t\t\turl: page.link,\n\t\t\tkind: 'post-type',\n\t\t};\n\t}\n\n\t// Memoize link value to avoid overriding the LinkControl's internal state.\n\t// This is a temporary fix. See https://github.com/WordPress/gutenberg/issues/50976#issuecomment-1568226407.\n\tconst link = useMemo(\n\t\t() => ( {\n\t\t\turl,\n\t\t\topensInNewTab,\n\t\t\ttitle: label && stripHTML( label ),\n\t\t} ),\n\t\t[ label, opensInNewTab, url ]\n\t);\n\n\tconst dialogTitleId = useInstanceId(\n\t\tLinkUI,\n\t\t`link-ui-link-control__title`\n\t);\n\tconst dialogDescritionId = useInstanceId(\n\t\tLinkUI,\n\t\t`link-ui-link-control__description`\n\t);\n\n\t// Selecting a block should close the popover and also remove the (previously) automatically inserted\n\t// link block so that the newly selected block can be inserted in its place.\n\tconst { onClose: onSelectBlock } = props;\n\n\treturn (\n\t\t<Popover\n\t\t\tref={ ref }\n\t\t\tplacement=\"bottom\"\n\t\t\tonClose={ props.onClose }\n\t\t\tanchor={ props.anchor }\n\t\t\tshift\n\t\t>\n\t\t\t{ ! addingBlock && (\n\t\t\t\t<div\n\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\taria-labelledby={ dialogTitleId }\n\t\t\t\t\taria-describedby={ dialogDescritionId }\n\t\t\t\t>\n\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t<h2 id={ dialogTitleId }>{ __( 'Add link' ) }</h2>\n\n\t\t\t\t\t\t<p id={ dialogDescritionId }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Search for and add a link to your Navigation.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t<LinkControl\n\t\t\t\t\t\thasTextControl\n\t\t\t\t\t\thasRichPreviews\n\t\t\t\t\t\tvalue={ link }\n\t\t\t\t\t\tshowInitialSuggestions\n\t\t\t\t\t\twithCreateSuggestion={ permissions.canCreate }\n\t\t\t\t\t\tcreateSuggestion={ handleCreate }\n\t\t\t\t\t\tcreateSuggestionButtonText={ ( searchTerm ) => {\n\t\t\t\t\t\t\tlet format;\n\n\t\t\t\t\t\t\tif ( type === 'post' ) {\n\t\t\t\t\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t\t\t\t\tformat = __(\n\t\t\t\t\t\t\t\t\t'Create draft post: <mark>%s</mark>'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t\t\t\t\tformat = __(\n\t\t\t\t\t\t\t\t\t'Create draft page: <mark>%s</mark>'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf( format, searchTerm ),\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmark: <mark />,\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\tnoDirectEntry={ !! type }\n\t\t\t\t\t\tnoURLSuggestion={ !! type }\n\t\t\t\t\t\tsuggestionsQuery={ getSuggestionsQuery( type, kind ) }\n\t\t\t\t\t\tonChange={ props.onChange }\n\t\t\t\t\t\tonRemove={ props.onRemove }\n\t\t\t\t\t\tonCancel={ props.onCancel }\n\t\t\t\t\t\trenderControlBottom={ () =>\n\t\t\t\t\t\t\t! link?.url?.length && (\n\t\t\t\t\t\t\t\t<LinkUITools\n\t\t\t\t\t\t\t\t\tfocusAddBlockButton={ focusAddBlockButton }\n\t\t\t\t\t\t\t\t\tsetAddingBlock={ () => {\n\t\t\t\t\t\t\t\t\t\tsetAddingBlock( true );\n\t\t\t\t\t\t\t\t\t\tsetFocusAddBlockButton( false );\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)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ addingBlock && (\n\t\t\t\t<LinkUIBlockInserter\n\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\tonBack={ () => {\n\t\t\t\t\t\tsetAddingBlock( false );\n\t\t\t\t\t\tsetFocusAddBlockButton( true );\n\t\t\t\t\t} }\n\t\t\t\t\tonSelectBlock={ onSelectBlock }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</Popover>\n\t);\n}\n\nexport const LinkUI = forwardRef( UnforwardedLinkUI );\n\nconst LinkUITools = ( { setAddingBlock, focusAddBlockButton } ) => {\n\tconst blockInserterAriaRole = 'listbox';\n\tconst addBlockButtonRef = useRef();\n\n\t// Focus the add block button when the popover is opened.\n\tuseEffect( () => {\n\t\tif ( focusAddBlockButton ) {\n\t\t\taddBlockButtonRef.current?.focus();\n\t\t}\n\t}, [ focusAddBlockButton ] );\n\n\treturn (\n\t\t<VStack className=\"link-ui-tools\">\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tref={ addBlockButtonRef }\n\t\t\t\ticon={ plus }\n\t\t\t\tonClick={ ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tsetAddingBlock( true );\n\t\t\t\t} }\n\t\t\t\taria-haspopup={ blockInserterAriaRole }\n\t\t\t>\n\t\t\t\t{ __( 'Add block' ) }\n\t\t\t</Button>\n\t\t</VStack>\n\t);\n};\n\nexport default LinkUITools;\n"],"mappings":";;;;;;;AAGA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,QAAA,GAAAJ,OAAA;AAQA,IAAAK,SAAA,GAAAL,OAAA;AAIA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,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AC,IAAAmF,QAAA,GAAAX,OAAA,CAAAY,OAAA,GAEab,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["_dom","require","_components","_i18n","_blockEditor","_element","_coreData","_htmlEntities","_data","_icons","_compose","_lockUnlock","_jsxRuntime","PrivateQuickInserter","QuickInserter","unlock","blockEditorPrivateApis","getSuggestionsQuery","type","kind","subtype","initialSuggestionsSearchOptions","perPage","LinkUIBlockInserter","clientId","onBack","onSelectBlock","rootBlockClientId","useSelect","select","getBlockRootClientId","blockEditorStore","focusOnMountRef","useFocusOnMount","dialogTitleId","useInstanceId","LinkControl","dialogDescritionId","jsxs","className","role","ref","children","VisuallyHidden","jsx","id","__","Button","icon","isRTL","chevronRightSmall","chevronLeftSmall","onClick","e","preventDefault","size","rootClientId","isAppender","prioritizePatterns","selectBlockOnInsert","hasSearch","onSelect","UnforwardedLinkUI","props","label","url","opensInNewTab","link","postType","addingBlock","setAddingBlock","useState","focusAddBlockButton","setFocusAddBlockButton","saveEntityRecord","useDispatch","coreStore","permissions","useResourcePermissions","name","handleCreate","pageTitle","page","title","status","decodeEntities","rendered","useMemo","stripHTML","LinkUI","onClose","Popover","placement","anchor","shift","__experimentalLinkControl","hasTextControl","hasRichPreviews","value","showInitialSuggestions","withCreateSuggestion","canCreate","createSuggestion","createSuggestionButtonText","searchTerm","format","createInterpolateElement","sprintf","mark","noDirectEntry","noURLSuggestion","suggestionsQuery","onChange","onRemove","onCancel","renderControlBottom","length","LinkUITools","exports","forwardRef","blockInserterAriaRole","addBlockButtonRef","useRef","useEffect","current","focus","__experimentalVStack","__next40pxDefaultSize","plus","_default","default"],"sources":["@wordpress/block-library/src/navigation-link/link-ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport {\n\tPopover,\n\tButton,\n\tVisuallyHidden,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\nimport {\n\t__experimentalLinkControl as LinkControl,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport {\n\tcreateInterpolateElement,\n\tuseMemo,\n\tuseState,\n\tuseRef,\n\tuseEffect,\n\tforwardRef,\n} from '@wordpress/element';\nimport {\n\tstore as coreStore,\n\tuseResourcePermissions,\n} from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { chevronLeftSmall, chevronRightSmall, plus } from '@wordpress/icons';\nimport { useInstanceId, useFocusOnMount } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\nconst { PrivateQuickInserter: QuickInserter } = unlock(\n\tblockEditorPrivateApis\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 */\nexport function 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\t\t\t// for custom link which has no type\n\t\t\t\t// always show pages as initial suggestions\n\t\t\t\tinitialSuggestionsSearchOptions: {\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tsubtype: 'page',\n\t\t\t\t\tperPage: 20,\n\t\t\t\t},\n\t\t\t};\n\t}\n}\n\nfunction LinkUIBlockInserter( { clientId, onBack, onSelectBlock } ) {\n\tconst { rootBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId } = select( blockEditorStore );\n\n\t\t\treturn {\n\t\t\t\trootBlockClientId: getBlockRootClientId( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\n\tconst dialogTitleId = useInstanceId(\n\t\tLinkControl,\n\t\t`link-ui-block-inserter__title`\n\t);\n\tconst dialogDescritionId = useInstanceId(\n\t\tLinkControl,\n\t\t`link-ui-block-inserter__description`\n\t);\n\n\tif ( ! clientId ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"link-ui-block-inserter\"\n\t\t\trole=\"dialog\"\n\t\t\taria-labelledby={ dialogTitleId }\n\t\t\taria-describedby={ dialogDescritionId }\n\t\t\tref={ focusOnMountRef }\n\t\t>\n\t\t\t<VisuallyHidden>\n\t\t\t\t<h2 id={ dialogTitleId }>{ __( 'Add block' ) }</h2>\n\n\t\t\t\t<p id={ dialogDescritionId }>\n\t\t\t\t\t{ __( 'Choose a block to add to your Navigation.' ) }\n\t\t\t\t</p>\n\t\t\t</VisuallyHidden>\n\n\t\t\t<Button\n\t\t\t\tclassName=\"link-ui-block-inserter__back\"\n\t\t\t\ticon={ isRTL() ? chevronRightSmall : chevronLeftSmall }\n\t\t\t\tonClick={ ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tonBack();\n\t\t\t\t} }\n\t\t\t\tsize=\"small\"\n\t\t\t>\n\t\t\t\t{ __( 'Back' ) }\n\t\t\t</Button>\n\n\t\t\t<QuickInserter\n\t\t\t\trootClientId={ rootBlockClientId }\n\t\t\t\tclientId={ clientId }\n\t\t\t\tisAppender={ false }\n\t\t\t\tprioritizePatterns={ false }\n\t\t\t\tselectBlockOnInsert\n\t\t\t\thasSearch={ false }\n\t\t\t\tonSelect={ onSelectBlock }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nfunction UnforwardedLinkUI( props, ref ) {\n\tconst { label, url, opensInNewTab, type, kind } = props.link;\n\tconst postType = type || 'page';\n\n\tconst [ addingBlock, setAddingBlock ] = useState( false );\n\tconst [ focusAddBlockButton, setFocusAddBlockButton ] = useState( false );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst permissions = useResourcePermissions( {\n\t\tkind: 'postType',\n\t\tname: postType,\n\t} );\n\n\tasync function handleCreate( pageTitle ) {\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\t// Make `title` property consistent with that in `fetchLinkSuggestions` where the `rendered` title (containing HTML entities)\n\t\t\t// is also being decoded. By being consistent in both locations we avoid having to branch in the rendering output code.\n\t\t\t// Ideally in the future we will update both APIs to utilise the \"raw\" form of the title which is better suited to edit contexts.\n\t\t\t// e.g.\n\t\t\t// - title.raw = \"Yes & No\"\n\t\t\t// - title.rendered = \"Yes &#038; No\"\n\t\t\t// - decodeEntities( title.rendered ) = \"Yes & No\"\n\t\t\t// See:\n\t\t\t// - https://github.com/WordPress/gutenberg/pull/41063\n\t\t\t// - https://github.com/WordPress/gutenberg/blob/a1e1fdc0e6278457e9f4fc0b31ac6d2095f5450b/packages/core-data/src/fetch/__experimental-fetch-link-suggestions.js#L212-L218\n\t\t\ttitle: decodeEntities( page.title.rendered ),\n\t\t\turl: page.link,\n\t\t\tkind: 'post-type',\n\t\t};\n\t}\n\n\t// Memoize link value to avoid overriding the LinkControl's internal state.\n\t// This is a temporary fix. See https://github.com/WordPress/gutenberg/issues/50976#issuecomment-1568226407.\n\tconst link = useMemo(\n\t\t() => ( {\n\t\t\turl,\n\t\t\topensInNewTab,\n\t\t\ttitle: label && stripHTML( label ),\n\t\t} ),\n\t\t[ label, opensInNewTab, url ]\n\t);\n\n\tconst dialogTitleId = useInstanceId(\n\t\tLinkUI,\n\t\t`link-ui-link-control__title`\n\t);\n\tconst dialogDescritionId = useInstanceId(\n\t\tLinkUI,\n\t\t`link-ui-link-control__description`\n\t);\n\n\t// Selecting a block should close the popover and also remove the (previously) automatically inserted\n\t// link block so that the newly selected block can be inserted in its place.\n\tconst { onClose: onSelectBlock } = props;\n\n\treturn (\n\t\t<Popover\n\t\t\tref={ ref }\n\t\t\tplacement=\"bottom\"\n\t\t\tonClose={ props.onClose }\n\t\t\tanchor={ props.anchor }\n\t\t\tshift\n\t\t>\n\t\t\t{ ! addingBlock && (\n\t\t\t\t<div\n\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\taria-labelledby={ dialogTitleId }\n\t\t\t\t\taria-describedby={ dialogDescritionId }\n\t\t\t\t>\n\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t<h2 id={ dialogTitleId }>{ __( 'Add link' ) }</h2>\n\n\t\t\t\t\t\t<p id={ dialogDescritionId }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Search for and add a link to your Navigation.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t<LinkControl\n\t\t\t\t\t\thasTextControl\n\t\t\t\t\t\thasRichPreviews\n\t\t\t\t\t\tvalue={ link }\n\t\t\t\t\t\tshowInitialSuggestions\n\t\t\t\t\t\twithCreateSuggestion={ permissions.canCreate }\n\t\t\t\t\t\tcreateSuggestion={ handleCreate }\n\t\t\t\t\t\tcreateSuggestionButtonText={ ( searchTerm ) => {\n\t\t\t\t\t\t\tlet format;\n\n\t\t\t\t\t\t\tif ( type === 'post' ) {\n\t\t\t\t\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t\t\t\t\tformat = __(\n\t\t\t\t\t\t\t\t\t'Create draft post: <mark>%s</mark>'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t\t\t\t\tformat = __(\n\t\t\t\t\t\t\t\t\t'Create draft page: <mark>%s</mark>'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf( format, searchTerm ),\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmark: <mark />,\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\tnoDirectEntry={ !! type }\n\t\t\t\t\t\tnoURLSuggestion={ !! type }\n\t\t\t\t\t\tsuggestionsQuery={ getSuggestionsQuery( type, kind ) }\n\t\t\t\t\t\tonChange={ props.onChange }\n\t\t\t\t\t\tonRemove={ props.onRemove }\n\t\t\t\t\t\tonCancel={ props.onCancel }\n\t\t\t\t\t\trenderControlBottom={ () =>\n\t\t\t\t\t\t\t! link?.url?.length && (\n\t\t\t\t\t\t\t\t<LinkUITools\n\t\t\t\t\t\t\t\t\tfocusAddBlockButton={ focusAddBlockButton }\n\t\t\t\t\t\t\t\t\tsetAddingBlock={ () => {\n\t\t\t\t\t\t\t\t\t\tsetAddingBlock( true );\n\t\t\t\t\t\t\t\t\t\tsetFocusAddBlockButton( false );\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)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ addingBlock && (\n\t\t\t\t<LinkUIBlockInserter\n\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\tonBack={ () => {\n\t\t\t\t\t\tsetAddingBlock( false );\n\t\t\t\t\t\tsetFocusAddBlockButton( true );\n\t\t\t\t\t} }\n\t\t\t\t\tonSelectBlock={ onSelectBlock }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</Popover>\n\t);\n}\n\nexport const LinkUI = forwardRef( UnforwardedLinkUI );\n\nconst LinkUITools = ( { setAddingBlock, focusAddBlockButton } ) => {\n\tconst blockInserterAriaRole = 'listbox';\n\tconst addBlockButtonRef = useRef();\n\n\t// Focus the add block button when the popover is opened.\n\tuseEffect( () => {\n\t\tif ( focusAddBlockButton ) {\n\t\t\taddBlockButtonRef.current?.focus();\n\t\t}\n\t}, [ focusAddBlockButton ] );\n\n\treturn (\n\t\t<VStack className=\"link-ui-tools\">\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tref={ addBlockButtonRef }\n\t\t\t\ticon={ plus }\n\t\t\t\tonClick={ ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tsetAddingBlock( true );\n\t\t\t\t} }\n\t\t\t\taria-haspopup={ blockInserterAriaRole }\n\t\t\t>\n\t\t\t\t{ __( 'Add block' ) }\n\t\t\t</Button>\n\t\t</VStack>\n\t);\n};\n\nexport default LinkUITools;\n"],"mappings":";;;;;;;AAGA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,QAAA,GAAAJ,OAAA;AAQA,IAAAK,SAAA,GAAAL,OAAA;AAIA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAKA,IAAAU,WAAA,GAAAV,OAAA;AAAwC,IAAAW,WAAA,GAAAX,OAAA;AApCxC;AACA;AACA;;AA+BA;AACA;AACA;;AAGA,MAAM;EAAEY,oBAAoB,EAAEC;AAAc,CAAC,GAAG,IAAAC,kBAAM,EACrDC,wBACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,mBAAmBA,CAAEC,IAAI,EAAEC,IAAI,EAAG;EACjD,QAASD,IAAI;IACZ,K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A8B,mBAAU,EAAEzD,iBAAkB,CAAC;AAErD,MAAMuD,WAAW,GAAGA,CAAE;EAAE/C,cAAc;EAAEE;AAAoB,CAAC,KAAM;EAClE,MAAMgD,qBAAqB,GAAG,SAAS;EACvC,MAAMC,iBAAiB,GAAG,IAAAC,eAAM,EAAC,CAAC;;EAElC;EACA,IAAAC,kBAAS,EAAE,MAAM;IAChB,IAAKnD,mBAAmB,EAAG;MAC1BiD,iBAAiB,CAACG,OAAO,EAAEC,KAAK,CAAC,CAAC;IACnC;EACD,CAAC,EAAE,CAAErD,mBAAmB,CAAG,CAAC;EAE5B,oBACC,IAAA5D,WAAA,CAAAgC,GAAA,EAAC1C,WAAA,CAAA4H,oBAAM;IAACvF,SAAS,EAAC,eAAe;IAAAG,QAAA,eAChC,IAAA9B,WAAA,CAAAgC,GAAA,EAAC1C,WAAA,CAAA6C,MAAM;MACNgF,qBAAqB;MACrBtF,GAAG,EAAGgF,iBAAmB;MACzBzE,IAAI,EAAGgF,WAAM;MACb5E,OAAO,EAAKC,CAAC,IAAM;QAClBA,CAAC,CAACC,cAAc,CAAC,CAAC;QAClBgB,cAAc,CAAE,IAAK,CAAC;MACvB,CAAG;MACH,iBAAgBkD,qBAAuB;MAAA9E,QAAA,EAErC,IAAAI,QAAE,EAAE,WAAY;IAAC,CACZ;EAAC,CACF,CAAC;AAEX,CAAC;AAAC,IAAAmF,QAAA,GAAAX,OAAA,CAAAY,OAAA,GAEab,WAAW","ignoreList":[]}
@@ -39,7 +39,7 @@ function NextPageEdit({
39
39
  const lineStyle = getStylesFromColorScheme(_editor.default.nextpageLine, _editor.default.nextpageLineDark);
40
40
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
41
41
  accessible: true,
42
- accessibilityLabel: (0, _i18n.sprintf)( /* translators: accessibility text. %s: Page break text. */
42
+ accessibilityLabel: (0, _i18n.sprintf)(/* translators: accessibility text. %s: Page break text. */
43
43
  (0, _i18n.__)('Page break block. %s'), accessibilityTitle),
44
44
  accessibilityStates: accessibilityState,
45
45
  onAccessibilityTap: onFocus,
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_i18n","_compose","_components","_editor","_interopRequireDefault","_jsxRuntime","NextPageEdit","attributes","isSelected","onFocus","getStylesFromColorScheme","customText","__","accessibilityTitle","accessibilityState","textStyle","styles","nextpageText","nextpageTextDark","lineStyle","nextpageLine","nextpageLineDark","jsx","View","accessible","accessibilityLabel","sprintf","accessibilityStates","onAccessibilityTap","children","HorizontalRule","text","marginLeft","marginRight","_default","exports","default","withPreferredColorScheme"],"sources":["@wordpress/block-library/src/nextpage/edit.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { withPreferredColorScheme } from '@wordpress/compose';\nimport { HorizontalRule } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport styles from './editor.scss';\n\nexport function NextPageEdit( {\n\tattributes,\n\tisSelected,\n\tonFocus,\n\tgetStylesFromColorScheme,\n} ) {\n\tconst { customText = __( 'Page break' ) } = attributes;\n\tconst accessibilityTitle = attributes.customText || '';\n\tconst accessibilityState = isSelected ? [ 'selected' ] : [];\n\tconst textStyle = getStylesFromColorScheme(\n\t\tstyles.nextpageText,\n\t\tstyles.nextpageTextDark\n\t);\n\tconst lineStyle = getStylesFromColorScheme(\n\t\tstyles.nextpageLine,\n\t\tstyles.nextpageLineDark\n\t);\n\n\treturn (\n\t\t<View\n\t\t\taccessible\n\t\t\taccessibilityLabel={ sprintf(\n\t\t\t\t/* translators: accessibility text. %s: Page break text. */\n\t\t\t\t__( 'Page break block. %s' ),\n\t\t\t\taccessibilityTitle\n\t\t\t) }\n\t\t\taccessibilityStates={ accessibilityState }\n\t\t\tonAccessibilityTap={ onFocus }\n\t\t>\n\t\t\t<HorizontalRule\n\t\t\t\ttext={ customText }\n\t\t\t\tmarginLeft={ 0 }\n\t\t\t\tmarginRight={ 0 }\n\t\t\t\ttextStyle={ textStyle }\n\t\t\t\tlineStyle={ lineStyle }\n\t\t\t/>\n\t\t</View>\n\t);\n}\n\nexport default withPreferredColorScheme( NextPageEdit );\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAKA,IAAAI,OAAA,GAAAC,sBAAA,CAAAL,OAAA;AAAmC,IAAAM,WAAA,GAAAN,OAAA;AAfnC;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;;AAGO,SAASO,YAAYA,CAAE;EAC7BC,UAAU;EACVC,UAAU;EACVC,OAAO;EACPC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,UAAU,GAAG,IAAAC,QAAE,EAAE,YAAa;EAAE,CAAC,GAAGL,UAAU;EACtD,MAAMM,kBAAkB,GAAGN,UAAU,CAACI,UAAU,IAAI,EAAE;EACtD,MAAMG,kBAAkB,GAAGN,UAAU,GAAG,CAAE,UAAU,CAAE,GAAG,EAAE;EAC3D,MAAMO,SAAS,GAAGL,wBAAwB,CACzCM,eAAM,CAACC,YAAY,EACnBD,eAAM,CAACE,gBACR,CAAC;EACD,MAAMC,SAAS,GAAGT,wBAAwB,CACzCM,eAAM,CAACI,YAAY,EACnBJ,eAAM,CAACK,gBACR,CAAC;EAED,oBACC,IAAAhB,WAAA,CAAAiB,GAAA,EAACxB,YAAA,CAAAyB,IAAI;IACJC,UAAU;IACVC,kBAAkB,EAAG,IAAAC,aAAO,GAC3B;IACA,IAAAd,QAAE,EAAE,sBAAuB,CAAC,EAC5BC,kBACD,CAAG;IACHc,mBAAmB,EAAGb,kBAAoB;IAC1Cc,kBAAkB,EAAGnB,OAAS;IAAAoB,QAAA,eAE9B,IAAAxB,WAAA,CAAAiB,GAAA,EAACpB,WAAA,CAAA4B,cAAc;MACdC,IAAI,EAAGpB,UAAY;MACnBqB,UAAU,EAAG,CAAG;MAChBC,WAAW,EAAG,CAAG;MACjBlB,SAAS,EAAGA,SAAW;MACvBI,SAAS,EAAGA;IAAW,CACvB;EAAC,CACG,CAAC;AAET;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,iCAAwB,EAAE/B,YAAa,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_i18n","_compose","_components","_editor","_interopRequireDefault","_jsxRuntime","NextPageEdit","attributes","isSelected","onFocus","getStylesFromColorScheme","customText","__","accessibilityTitle","accessibilityState","textStyle","styles","nextpageText","nextpageTextDark","lineStyle","nextpageLine","nextpageLineDark","jsx","View","accessible","accessibilityLabel","sprintf","accessibilityStates","onAccessibilityTap","children","HorizontalRule","text","marginLeft","marginRight","_default","exports","default","withPreferredColorScheme"],"sources":["@wordpress/block-library/src/nextpage/edit.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { withPreferredColorScheme } from '@wordpress/compose';\nimport { HorizontalRule } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport styles from './editor.scss';\n\nexport function NextPageEdit( {\n\tattributes,\n\tisSelected,\n\tonFocus,\n\tgetStylesFromColorScheme,\n} ) {\n\tconst { customText = __( 'Page break' ) } = attributes;\n\tconst accessibilityTitle = attributes.customText || '';\n\tconst accessibilityState = isSelected ? [ 'selected' ] : [];\n\tconst textStyle = getStylesFromColorScheme(\n\t\tstyles.nextpageText,\n\t\tstyles.nextpageTextDark\n\t);\n\tconst lineStyle = getStylesFromColorScheme(\n\t\tstyles.nextpageLine,\n\t\tstyles.nextpageLineDark\n\t);\n\n\treturn (\n\t\t<View\n\t\t\taccessible\n\t\t\taccessibilityLabel={ sprintf(\n\t\t\t\t/* translators: accessibility text. %s: Page break text. */\n\t\t\t\t__( 'Page break block. %s' ),\n\t\t\t\taccessibilityTitle\n\t\t\t) }\n\t\t\taccessibilityStates={ accessibilityState }\n\t\t\tonAccessibilityTap={ onFocus }\n\t\t>\n\t\t\t<HorizontalRule\n\t\t\t\ttext={ customText }\n\t\t\t\tmarginLeft={ 0 }\n\t\t\t\tmarginRight={ 0 }\n\t\t\t\ttextStyle={ textStyle }\n\t\t\t\tlineStyle={ lineStyle }\n\t\t\t/>\n\t\t</View>\n\t);\n}\n\nexport default withPreferredColorScheme( NextPageEdit );\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAKA,IAAAI,OAAA,GAAAC,sBAAA,CAAAL,OAAA;AAAmC,IAAAM,WAAA,GAAAN,OAAA;AAfnC;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;;AAGO,SAASO,YAAYA,CAAE;EAC7BC,UAAU;EACVC,UAAU;EACVC,OAAO;EACPC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,UAAU,GAAG,IAAAC,QAAE,EAAE,YAAa;EAAE,CAAC,GAAGL,UAAU;EACtD,MAAMM,kBAAkB,GAAGN,UAAU,CAACI,UAAU,IAAI,EAAE;EACtD,MAAMG,kBAAkB,GAAGN,UAAU,GAAG,CAAE,UAAU,CAAE,GAAG,EAAE;EAC3D,MAAMO,SAAS,GAAGL,wBAAwB,CACzCM,eAAM,CAACC,YAAY,EACnBD,eAAM,CAACE,gBACR,CAAC;EACD,MAAMC,SAAS,GAAGT,wBAAwB,CACzCM,eAAM,CAACI,YAAY,EACnBJ,eAAM,CAACK,gBACR,CAAC;EAED,oBACC,IAAAhB,WAAA,CAAAiB,GAAA,EAACxB,YAAA,CAAAyB,IAAI;IACJC,UAAU;IACVC,kBAAkB,EAAG,IAAAC,aAAO,EAC3B;IACA,IAAAd,QAAE,EAAE,sBAAuB,CAAC,EAC5BC,kBACD,CAAG;IACHc,mBAAmB,EAAGb,kBAAoB;IAC1Cc,kBAAkB,EAAGnB,OAAS;IAAAoB,QAAA,eAE9B,IAAAxB,WAAA,CAAAiB,GAAA,EAACpB,WAAA,CAAA4B,cAAc;MACdC,IAAI,EAAGpB,UAAY;MACnBqB,UAAU,EAAG,CAAG;MAChBC,WAAW,EAAG,CAAG;MACjBlB,SAAS,EAAGA,SAAW;MACvBI,SAAS,EAAGA;IAAW,CACvB;EAAC,CACG,CAAC;AAET;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,iCAAwB,EAAE/B,YAAa,CAAC","ignoreList":[]}
@@ -49,7 +49,7 @@ function PageListItemEdit({
49
49
  hasChildren,
50
50
  title
51
51
  } = attributes;
52
- const isNavigationChild = ('showSubmenuIcon' in context);
52
+ const isNavigationChild = 'showSubmenuIcon' in context;
53
53
  const frontPageId = useFrontPageId();
54
54
  const innerBlocksColors = (0, _utils.getColors)(context, true);
55
55
  const navigationChildBlockProps = (0, _utils.getNavigationChildBlockProps)(innerBlocksColors);
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_data","_coreData","_htmlEntities","_icons","_utils","_jsxRuntime","useFrontPageId","useSelect","select","canReadSettings","coreStore","canUser","kind","name","undefined","site","getEntityRecord","show_on_front","page_on_front","PageListItemEdit","context","attributes","id","label","link","hasChildren","title","isNavigationChild","frontPageId","innerBlocksColors","getColors","navigationChildBlockProps","getNavigationChildBlockProps","blockProps","useBlockProps","className","innerBlocksProps","useInnerBlocksProps","jsxs","clsx","openSubmenusOnClick","showSubmenuIcon","children","Fragment","jsx","type","decodeEntities","ItemSubmenuIcon","href"],"sources":["@wordpress/block-library/src/page-list-item/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { ItemSubmenuIcon } from '../navigation-link/icons';\nimport {\n\tgetColors,\n\tgetNavigationChildBlockProps,\n} from '../navigation/edit/utils';\n\nfunction useFrontPageId() {\n\treturn useSelect( ( select ) => {\n\t\tconst canReadSettings = select( coreStore ).canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} );\n\t\tif ( ! canReadSettings ) {\n\t\t\treturn undefined;\n\t\t}\n\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\nexport default function PageListItemEdit( { context, attributes } ) {\n\tconst { id, label, link, hasChildren, title } = attributes;\n\tconst isNavigationChild = 'showSubmenuIcon' in context;\n\tconst frontPageId = useFrontPageId();\n\n\tconst innerBlocksColors = getColors( context, true );\n\n\tconst navigationChildBlockProps =\n\t\tgetNavigationChildBlockProps( innerBlocksColors );\n\tconst blockProps = useBlockProps( navigationChildBlockProps, {\n\t\tclassName: 'wp-block-pages-list__item',\n\t} );\n\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps );\n\n\treturn (\n\t\t<li\n\t\t\tkey={ id }\n\t\t\tclassName={ clsx( 'wp-block-pages-list__item', {\n\t\t\t\t'has-child': hasChildren,\n\t\t\t\t'wp-block-navigation-item': isNavigationChild,\n\t\t\t\t'open-on-click': context.openSubmenusOnClick,\n\t\t\t\t'open-on-hover-click':\n\t\t\t\t\t! context.openSubmenusOnClick && context.showSubmenuIcon,\n\t\t\t\t'menu-item-home': id === frontPageId,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ hasChildren && context.openSubmenusOnClick ? (\n\t\t\t\t<>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName=\"wp-block-navigation-item__content wp-block-navigation-submenu__toggle\"\n\t\t\t\t\t\taria-expanded=\"false\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ decodeEntities( label ) }\n\t\t\t\t\t</button>\n\t\t\t\t\t<span className=\"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon\">\n\t\t\t\t\t\t<ItemSubmenuIcon />\n\t\t\t\t\t</span>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<a\n\t\t\t\t\tclassName={ clsx( 'wp-block-pages-list__item__link', {\n\t\t\t\t\t\t'wp-block-navigation-item__content': isNavigationChild,\n\t\t\t\t\t} ) }\n\t\t\t\t\thref={ link }\n\t\t\t\t>\n\t\t\t\t\t{ decodeEntities( title ) }\n\t\t\t\t</a>\n\t\t\t) }\n\t\t\t{ hasChildren && (\n\t\t\t\t<>\n\t\t\t\t\t{ ! context.openSubmenusOnClick &&\n\t\t\t\t\t\tcontext.showSubmenuIcon && (\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tclassName=\"wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon\"\n\t\t\t\t\t\t\t\taria-expanded=\"false\"\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<ItemSubmenuIcon />\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t<ul { ...innerBlocksProps }></ul>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</li>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAGkC,IAAAO,WAAA,GAAAP,OAAA;AAnBlC;AACA;AACA;;AAEA;AACA;AACA;;AAMA;AACA;AAC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AAuC,GAAA;QAAA,GAASR;MAAgB,CAAO,CAAC;IAAA,CAChC,CACF;EAAA,GA/CKd,EAgDH,CAAC;AAEP","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_data","_coreData","_htmlEntities","_icons","_utils","_jsxRuntime","useFrontPageId","useSelect","select","canReadSettings","coreStore","canUser","kind","name","undefined","site","getEntityRecord","show_on_front","page_on_front","PageListItemEdit","context","attributes","id","label","link","hasChildren","title","isNavigationChild","frontPageId","innerBlocksColors","getColors","navigationChildBlockProps","getNavigationChildBlockProps","blockProps","useBlockProps","className","innerBlocksProps","useInnerBlocksProps","jsxs","clsx","openSubmenusOnClick","showSubmenuIcon","children","Fragment","jsx","type","decodeEntities","ItemSubmenuIcon","href"],"sources":["@wordpress/block-library/src/page-list-item/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { ItemSubmenuIcon } from '../navigation-link/icons';\nimport {\n\tgetColors,\n\tgetNavigationChildBlockProps,\n} from '../navigation/edit/utils';\n\nfunction useFrontPageId() {\n\treturn useSelect( ( select ) => {\n\t\tconst canReadSettings = select( coreStore ).canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} );\n\t\tif ( ! canReadSettings ) {\n\t\t\treturn undefined;\n\t\t}\n\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\nexport default function PageListItemEdit( { context, attributes } ) {\n\tconst { id, label, link, hasChildren, title } = attributes;\n\tconst isNavigationChild = 'showSubmenuIcon' in context;\n\tconst frontPageId = useFrontPageId();\n\n\tconst innerBlocksColors = getColors( context, true );\n\n\tconst navigationChildBlockProps =\n\t\tgetNavigationChildBlockProps( innerBlocksColors );\n\tconst blockProps = useBlockProps( navigationChildBlockProps, {\n\t\tclassName: 'wp-block-pages-list__item',\n\t} );\n\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps );\n\n\treturn (\n\t\t<li\n\t\t\tkey={ id }\n\t\t\tclassName={ clsx( 'wp-block-pages-list__item', {\n\t\t\t\t'has-child': hasChildren,\n\t\t\t\t'wp-block-navigation-item': isNavigationChild,\n\t\t\t\t'open-on-click': context.openSubmenusOnClick,\n\t\t\t\t'open-on-hover-click':\n\t\t\t\t\t! context.openSubmenusOnClick && context.showSubmenuIcon,\n\t\t\t\t'menu-item-home': id === frontPageId,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ hasChildren && context.openSubmenusOnClick ? (\n\t\t\t\t<>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName=\"wp-block-navigation-item__content wp-block-navigation-submenu__toggle\"\n\t\t\t\t\t\taria-expanded=\"false\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ decodeEntities( label ) }\n\t\t\t\t\t</button>\n\t\t\t\t\t<span className=\"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon\">\n\t\t\t\t\t\t<ItemSubmenuIcon />\n\t\t\t\t\t</span>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<a\n\t\t\t\t\tclassName={ clsx( 'wp-block-pages-list__item__link', {\n\t\t\t\t\t\t'wp-block-navigation-item__content': isNavigationChild,\n\t\t\t\t\t} ) }\n\t\t\t\t\thref={ link }\n\t\t\t\t>\n\t\t\t\t\t{ decodeEntities( title ) }\n\t\t\t\t</a>\n\t\t\t) }\n\t\t\t{ hasChildren && (\n\t\t\t\t<>\n\t\t\t\t\t{ ! context.openSubmenusOnClick &&\n\t\t\t\t\t\tcontext.showSubmenuIcon && (\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tclassName=\"wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon\"\n\t\t\t\t\t\t\t\taria-expanded=\"false\"\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<ItemSubmenuIcon />\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t<ul { ...innerBlocksProps }></ul>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</li>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAGkC,IAAAO,WAAA,GAAAP,OAAA;AAnBlC;AACA;AACA;;AAEA;AACA;AACA;;AAMA;AACA;AACA;;AAOA,SAASQ,cAAcA,CAAA,EAAG;EACzB,OAAO,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC/B,MAAMC,eAAe,GAAGD,MAAM,CAAEE,eAAU,CAAC,CAACC,OAAO,CAAE,MAAM,EAAE;MAC5DC,IAAI,EAAE,MAAM;MACZC,IAAI,EAAE;IACP,CAAE,CAAC;IACH,IAAK,CAAEJ,eAAe,EAAG;MACxB,OAAOK,SAAS;IACjB;IAEA,MAAMC,IAAI,GAAGP,MAAM,CAAEE,eAAU,CAAC,CAACM,eAAe,CAAE,MAAM,EAAE,MAAO,CAAC;IAClE,OAAOD,IAAI,EAAEE,aAAa,KAAK,MAAM,IAAIF,IAAI,EAAEG,aAAa;EAC7D,CAAC,EAAE,EAAG,CAAC;AACR;AAEe,SAASC,gBAAgBA,CAAE;EAAEC,OAAO;EAAEC;AAAW,CAAC,EAAG;EACnE,MAAM;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,EAACzC,MAAA,CAAA4C,eAAe,IAAE;MAAC,CACd,CAAC;IAAA,CACN,CAAC,gBAEH,IAAA1C,WAAA,CAAAuC,GAAA;MACCT,SAAS,EAAG,IAAAI,aAAI,EAAE,iCAAiC,EAAE;QACpD,mCAAmC,EAAEZ;MACtC,CAAE,CAAG;MACLqB,IAAI,EAAGxB,IAAM;MAAAkB,QAAA,EAEX,IAAAI,4BAAc,EAAEpB,KAAM;IAAC,CACvB,CACH,EACCD,WAAW,iBACZ,IAAApB,WAAA,CAAAiC,IAAA,EAAAjC,WAAA,CAAAsC,QAAA;MAAAD,QAAA,GACG,CAAEtB,OAAO,CAACoB,mBAAmB,IAC9BpB,OAAO,CAACqB,eAAe,iBACtB,IAAApC,WAAA,CAAAuC,GAAA;QACCT,SAAS,EAAC,0IAA0I;QACpJ,iBAAc,OAAO;QACrBU,IAAI,EAAC,QAAQ;QAAAH,QAAA,eAEb,IAAArC,WAAA,CAAAuC,GAAA,EAACzC,MAAA,CAAA4C,eAAe,IAAE;MAAC,CACZ,CACR,eACF,IAAA1C,WAAA,CAAAuC,GAAA;QAAA,GAASR;MAAgB,CAAO,CAAC;IAAA,CAChC,CACF;EAAA,GA/CKd,EAgDH,CAAC;AAEP","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_blockEditor","_i18n","_jsxRuntime","supports","className","blockAttributes","align","type","content","source","selector","default","dropCap","placeholder","textColor","backgroundColor","fontSize","direction","enum","style","migrateCustomColorsAndFontSizes","attributes","customTextColor","customBackgroundColor","customFontSize","color","text","background","typography","restAttributes","restBlockAttributes","deprecated","save","clsx","isRTL","jsx","useBlockProps","dir","children","RichText","Content","value","migrate","textClass","getColorClassName","backgroundClass","fontSizeClass","getFontSizeClass","styles","undefined","tagName","textAlign","width","Number","isFinite","RawHTML","_default","exports"],"sources":["@wordpress/block-library/src/paragraph/deprecated.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { RawHTML } from '@wordpress/element';\nimport {\n\tgetColorClassName,\n\tgetFontSizeClass,\n\tRichText,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\n\nimport { isRTL } from '@wordpress/i18n';\n\nconst supports = {\n\tclassName: false,\n};\n\nconst blockAttributes = {\n\talign: {\n\t\ttype: 'string',\n\t},\n\tcontent: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'p',\n\t\tdefault: '',\n\t},\n\tdropCap: {\n\t\ttype: 'boolean',\n\t\tdefault: false,\n\t},\n\tplaceholder: {\n\t\ttype: 'string',\n\t},\n\ttextColor: {\n\t\ttype: 'string',\n\t},\n\tbackgroundColor: {\n\t\ttype: 'string',\n\t},\n\tfontSize: {\n\t\ttype: 'string',\n\t},\n\tdirection: {\n\t\ttype: 'string',\n\t\tenum: [ 'ltr', 'rtl' ],\n\t},\n\tstyle: {\n\t\ttype: 'object',\n\t},\n};\n\nconst migrateCustomColorsAndFontSizes = ( attributes ) => {\n\tif (\n\t\t! attributes.customTextColor &&\n\t\t! attributes.customBackgroundColor &&\n\t\t! attributes.customFontSize\n\t) {\n\t\treturn attributes;\n\t}\n\tconst style = {};\n\tif ( attributes.customTextColor || attributes.customBackgroundColor ) {\n\t\tstyle.color = {};\n\t}\n\tif ( attributes.customTextColor ) {\n\t\tstyle.color.text = attributes.customTextColor;\n\t}\n\tif ( attributes.customBackgroundColor ) {\n\t\tstyle.color.background = attributes.customBackgroundColor;\n\t}\n\tif ( attributes.customFontSize ) {\n\t\tstyle.typography = { fontSize: attributes.customFontSize };\n\t}\n\n\tconst {\n\t\tcustomTextColor,\n\t\tcustomBackgroundColor,\n\t\tcustomFontSize,\n\t\t...restAttributes\n\t} = attributes;\n\n\treturn {\n\t\t...restAttributes,\n\t\tstyle,\n\t};\n};\n\nconst { style, ...restBlockAttributes } = blockAttributes;\n\nconst deprecated = [\n\t// Version without drop cap on aligned text.\n\t{\n\t\tsupports,\n\t\tattributes: {\n\t\t\t...restBlockAttributes,\n\t\t\tcustomTextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomBackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomFontSize: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\tconst { align, content, dropCap, direction } = attributes;\n\t\t\tconst className = clsx( {\n\t\t\t\t'has-drop-cap':\n\t\t\t\t\talign === ( isRTL() ? 'left' : 'right' ) ||\n\t\t\t\t\talign === 'center'\n\t\t\t\t\t\t? false\n\t\t\t\t\t\t: dropCap,\n\t\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t\t} );\n\n\t\t\treturn (\n\t\t\t\t<p { ...useBlockProps.save( { className, dir: direction } ) }>\n\t\t\t\t\t<RichText.Content value={ content } />\n\t\t\t\t</p>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\tsupports,\n\t\tattributes: {\n\t\t\t...restBlockAttributes,\n\t\t\tcustomTextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomBackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomFontSize: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t},\n\t\tmigrate: migrateCustomColorsAndFontSizes,\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\talign,\n\t\t\t\tcontent,\n\t\t\t\tdropCap,\n\t\t\t\tbackgroundColor,\n\t\t\t\ttextColor,\n\t\t\t\tcustomBackgroundColor,\n\t\t\t\tcustomTextColor,\n\t\t\t\tfontSize,\n\t\t\t\tcustomFontSize,\n\t\t\t\tdirection,\n\t\t\t} = attributes;\n\n\t\t\tconst textClass = getColorClassName( 'color', textColor );\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tbackgroundColor\n\t\t\t);\n\t\t\tconst fontSizeClass = getFontSizeClass( fontSize );\n\n\t\t\tconst className = clsx( {\n\t\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t\t'has-background': backgroundColor || customBackgroundColor,\n\t\t\t\t'has-drop-cap': dropCap,\n\t\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t\t\t[ fontSizeClass ]: fontSizeClass,\n\t\t\t\t[ textClass ]: textClass,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tconst styles = {\n\t\t\t\tbackgroundColor: backgroundClass\n\t\t\t\t\t? undefined\n\t\t\t\t\t: customBackgroundColor,\n\t\t\t\tcolor: textClass ? undefined : customTextColor,\n\t\t\t\tfontSize: fontSizeClass ? undefined : customFontSize,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\tstyle={ styles }\n\t\t\t\t\tclassName={ className ? className : undefined }\n\t\t\t\t\tvalue={ content }\n\t\t\t\t\tdir={ direction }\n\t\t\t\t/>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\tsupports,\n\t\tattributes: {\n\t\t\t...restBlockAttributes,\n\t\t\tcustomTextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomBackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomFontSize: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t},\n\t\tmigrate: migrateCustomColorsAndFontSizes,\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\talign,\n\t\t\t\tcontent,\n\t\t\t\tdropCap,\n\t\t\t\tbackgroundColor,\n\t\t\t\ttextColor,\n\t\t\t\tcustomBackgroundColor,\n\t\t\t\tcustomTextColor,\n\t\t\t\tfontSize,\n\t\t\t\tcustomFontSize,\n\t\t\t\tdirection,\n\t\t\t} = attributes;\n\n\t\t\tconst textClass = getColorClassName( 'color', textColor );\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tbackgroundColor\n\t\t\t);\n\t\t\tconst fontSizeClass = getFontSizeClass( fontSize );\n\n\t\t\tconst className = clsx( {\n\t\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t\t'has-background': backgroundColor || customBackgroundColor,\n\t\t\t\t'has-drop-cap': dropCap,\n\t\t\t\t[ fontSizeClass ]: fontSizeClass,\n\t\t\t\t[ textClass ]: textClass,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tconst styles = {\n\t\t\t\tbackgroundColor: backgroundClass\n\t\t\t\t\t? undefined\n\t\t\t\t\t: customBackgroundColor,\n\t\t\t\tcolor: textClass ? undefined : customTextColor,\n\t\t\t\tfontSize: fontSizeClass ? undefined : customFontSize,\n\t\t\t\ttextAlign: align,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\tstyle={ styles }\n\t\t\t\t\tclassName={ className ? className : undefined }\n\t\t\t\t\tvalue={ content }\n\t\t\t\t\tdir={ direction }\n\t\t\t\t/>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\tsupports,\n\t\tattributes: {\n\t\t\t...restBlockAttributes,\n\t\t\tcustomTextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomBackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomFontSize: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\twidth: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t},\n\t\tmigrate: migrateCustomColorsAndFontSizes,\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\twidth,\n\t\t\t\talign,\n\t\t\t\tcontent,\n\t\t\t\tdropCap,\n\t\t\t\tbackgroundColor,\n\t\t\t\ttextColor,\n\t\t\t\tcustomBackgroundColor,\n\t\t\t\tcustomTextColor,\n\t\t\t\tfontSize,\n\t\t\t\tcustomFontSize,\n\t\t\t} = attributes;\n\n\t\t\tconst textClass = getColorClassName( 'color', textColor );\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tbackgroundColor\n\t\t\t);\n\t\t\tconst fontSizeClass = fontSize && `is-${ fontSize }-text`;\n\n\t\t\tconst className = clsx( {\n\t\t\t\t[ `align${ width }` ]: width,\n\t\t\t\t'has-background': backgroundColor || customBackgroundColor,\n\t\t\t\t'has-drop-cap': dropCap,\n\t\t\t\t[ fontSizeClass ]: fontSizeClass,\n\t\t\t\t[ textClass ]: textClass,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tconst styles = {\n\t\t\t\tbackgroundColor: backgroundClass\n\t\t\t\t\t? undefined\n\t\t\t\t\t: customBackgroundColor,\n\t\t\t\tcolor: textClass ? undefined : customTextColor,\n\t\t\t\tfontSize: fontSizeClass ? undefined : customFontSize,\n\t\t\t\ttextAlign: align,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\tstyle={ styles }\n\t\t\t\t\tclassName={ className ? className : undefined }\n\t\t\t\t\tvalue={ content }\n\t\t\t\t/>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\tsupports,\n\t\tattributes: {\n\t\t\t...restBlockAttributes,\n\t\t\tfontSize: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\twidth,\n\t\t\t\talign,\n\t\t\t\tcontent,\n\t\t\t\tdropCap,\n\t\t\t\tbackgroundColor,\n\t\t\t\ttextColor,\n\t\t\t\tfontSize,\n\t\t\t} = attributes;\n\t\t\tconst className = clsx( {\n\t\t\t\t[ `align${ width }` ]: width,\n\t\t\t\t'has-background': backgroundColor,\n\t\t\t\t'has-drop-cap': dropCap,\n\t\t\t} );\n\t\t\tconst styles = {\n\t\t\t\tbackgroundColor,\n\t\t\t\tcolor: textColor,\n\t\t\t\tfontSize,\n\t\t\t\ttextAlign: align,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<p\n\t\t\t\t\tstyle={ styles }\n\t\t\t\t\tclassName={ className ? className : undefined }\n\t\t\t\t>\n\t\t\t\t\t{ content }\n\t\t\t\t</p>\n\t\t\t);\n\t\t},\n\t\tmigrate( attributes ) {\n\t\t\treturn migrateCustomColorsAndFontSizes( {\n\t\t\t\t...attributes,\n\t\t\t\tcustomFontSize: Number.isFinite( attributes.fontSize )\n\t\t\t\t\t? attributes.fontSize\n\t\t\t\t\t: undefined,\n\t\t\t\tcustomTextColor:\n\t\t\t\t\tattributes.textColor && '#' === attributes.textColor[ 0 ]\n\t\t\t\t\t\t? attributes.textColor\n\t\t\t\t\t\t: undefined,\n\t\t\t\tcustomBackgroundColor:\n\t\t\t\t\tattributes.backgroundColor &&\n\t\t\t\t\t'#' === attributes.backgroundColor[ 0 ]\n\t\t\t\t\t\t? attributes.backgroundColor\n\t\t\t\t\t\t: undefined,\n\t\t\t} );\n\t\t},\n\t},\n\t{\n\t\tsupports,\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\tcontent: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'html',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\treturn <RawHTML>{ attributes.content }</RawHTML>;\n\t\t},\n\t\tmigrate( attributes ) {\n\t\t\treturn attributes;\n\t\t},\n\t},\n];\n\nexport default deprecated;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAOA,IAAAG,KAAA,GAAAH,OAAA;AAAwC,IAAAI,WAAA,GAAAJ,OAAA;AAhBxC;AACA;AACA;;AAGA;AACA;AACA;;AAWA,MAAMK,QAAQ,GAAG;EAChBC,SAAS,EAAE;AACZ,CAAC;A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A,SAAS,GAAGA,SAAS,GAAG6C,SAAW;MAAAX,QAAA,EAE7C9B;IAAO,CACP,CAAC;EAEN,CAAC;EACDkC,OAAOA,CAAErB,UAAU,EAAG;IACrB,OAAOD,+BAA+B,CAAE;MACvC,GAAGC,UAAU;MACbG,cAAc,EAAE6B,MAAM,CAACC,QAAQ,CAAEjC,UAAU,CAACL,QAAS,CAAC,GACnDK,UAAU,CAACL,QAAQ,GACnBiC,SAAS;MACZ3B,eAAe,EACdD,UAAU,CAACP,SAAS,IAAI,GAAG,KAAKO,UAAU,CAACP,SAAS,CAAE,CAAC,CAAE,GACtDO,UAAU,CAACP,SAAS,GACpBmC,SAAS;MACb1B,qBAAqB,EACpBF,UAAU,CAACN,eAAe,IAC1B,GAAG,KAAKM,UAAU,CAACN,eAAe,CAAE,CAAC,CAAE,GACpCM,UAAU,CAACN,eAAe,GAC1BkC;IACL,CAAE,CAAC;EACJ;AACD,CAAC,EACD;EACC9C,QAAQ;EACRkB,UAAU,EAAE;IACX,GAAGhB,eAAe;IAClBG,OAAO,EAAE;MACRD,IAAI,EAAE,QAAQ;MACdE,MAAM,EAAE,MAAM;MACdE,OAAO,EAAE;IACV;EACD,CAAC;EACDqB,IAAIA,CAAE;IAAEX;EAAW,CAAC,EAAG;IACtB,oBAAO,IAAAnB,WAAA,CAAAiC,GAAA,EAACpC,QAAA,CAAAwD,OAAO;MAAAjB,QAAA,EAAGjB,UAAU,CAACb;IAAO,CAAW,CAAC;EACjD,CAAC;EACDkC,OAAOA,CAAErB,UAAU,EAAG;IACrB,OAAOA,UAAU;EAClB;AACD,CAAC,CACD;AAAC,IAAAmC,QAAA,GAAAC,OAAA,CAAA9C,OAAA,GAEaoB,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_blockEditor","_i18n","_jsxRuntime","supports","className","blockAttributes","align","type","content","source","selector","default","dropCap","placeholder","textColor","backgroundColor","fontSize","direction","enum","style","migrateCustomColorsAndFontSizes","attributes","customTextColor","customBackgroundColor","customFontSize","color","text","background","typography","restAttributes","restBlockAttributes","deprecated","save","clsx","isRTL","jsx","useBlockProps","dir","children","RichText","Content","value","migrate","textClass","getColorClassName","backgroundClass","fontSizeClass","getFontSizeClass","styles","undefined","tagName","textAlign","width","Number","isFinite","RawHTML","_default","exports"],"sources":["@wordpress/block-library/src/paragraph/deprecated.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { RawHTML } from '@wordpress/element';\nimport {\n\tgetColorClassName,\n\tgetFontSizeClass,\n\tRichText,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\n\nimport { isRTL } from '@wordpress/i18n';\n\nconst supports = {\n\tclassName: false,\n};\n\nconst blockAttributes = {\n\talign: {\n\t\ttype: 'string',\n\t},\n\tcontent: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'p',\n\t\tdefault: '',\n\t},\n\tdropCap: {\n\t\ttype: 'boolean',\n\t\tdefault: false,\n\t},\n\tplaceholder: {\n\t\ttype: 'string',\n\t},\n\ttextColor: {\n\t\ttype: 'string',\n\t},\n\tbackgroundColor: {\n\t\ttype: 'string',\n\t},\n\tfontSize: {\n\t\ttype: 'string',\n\t},\n\tdirection: {\n\t\ttype: 'string',\n\t\tenum: [ 'ltr', 'rtl' ],\n\t},\n\tstyle: {\n\t\ttype: 'object',\n\t},\n};\n\nconst migrateCustomColorsAndFontSizes = ( attributes ) => {\n\tif (\n\t\t! attributes.customTextColor &&\n\t\t! attributes.customBackgroundColor &&\n\t\t! attributes.customFontSize\n\t) {\n\t\treturn attributes;\n\t}\n\tconst style = {};\n\tif ( attributes.customTextColor || attributes.customBackgroundColor ) {\n\t\tstyle.color = {};\n\t}\n\tif ( attributes.customTextColor ) {\n\t\tstyle.color.text = attributes.customTextColor;\n\t}\n\tif ( attributes.customBackgroundColor ) {\n\t\tstyle.color.background = attributes.customBackgroundColor;\n\t}\n\tif ( attributes.customFontSize ) {\n\t\tstyle.typography = { fontSize: attributes.customFontSize };\n\t}\n\n\tconst {\n\t\tcustomTextColor,\n\t\tcustomBackgroundColor,\n\t\tcustomFontSize,\n\t\t...restAttributes\n\t} = attributes;\n\n\treturn {\n\t\t...restAttributes,\n\t\tstyle,\n\t};\n};\n\nconst { style, ...restBlockAttributes } = blockAttributes;\n\nconst deprecated = [\n\t// Version without drop cap on aligned text.\n\t{\n\t\tsupports,\n\t\tattributes: {\n\t\t\t...restBlockAttributes,\n\t\t\tcustomTextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomBackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomFontSize: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\tconst { align, content, dropCap, direction } = attributes;\n\t\t\tconst className = clsx( {\n\t\t\t\t'has-drop-cap':\n\t\t\t\t\talign === ( isRTL() ? 'left' : 'right' ) ||\n\t\t\t\t\talign === 'center'\n\t\t\t\t\t\t? false\n\t\t\t\t\t\t: dropCap,\n\t\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t\t} );\n\n\t\t\treturn (\n\t\t\t\t<p { ...useBlockProps.save( { className, dir: direction } ) }>\n\t\t\t\t\t<RichText.Content value={ content } />\n\t\t\t\t</p>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\tsupports,\n\t\tattributes: {\n\t\t\t...restBlockAttributes,\n\t\t\tcustomTextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomBackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomFontSize: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t},\n\t\tmigrate: migrateCustomColorsAndFontSizes,\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\talign,\n\t\t\t\tcontent,\n\t\t\t\tdropCap,\n\t\t\t\tbackgroundColor,\n\t\t\t\ttextColor,\n\t\t\t\tcustomBackgroundColor,\n\t\t\t\tcustomTextColor,\n\t\t\t\tfontSize,\n\t\t\t\tcustomFontSize,\n\t\t\t\tdirection,\n\t\t\t} = attributes;\n\n\t\t\tconst textClass = getColorClassName( 'color', textColor );\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tbackgroundColor\n\t\t\t);\n\t\t\tconst fontSizeClass = getFontSizeClass( fontSize );\n\n\t\t\tconst className = clsx( {\n\t\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t\t'has-background': backgroundColor || customBackgroundColor,\n\t\t\t\t'has-drop-cap': dropCap,\n\t\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t\t\t[ fontSizeClass ]: fontSizeClass,\n\t\t\t\t[ textClass ]: textClass,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tconst styles = {\n\t\t\t\tbackgroundColor: backgroundClass\n\t\t\t\t\t? undefined\n\t\t\t\t\t: customBackgroundColor,\n\t\t\t\tcolor: textClass ? undefined : customTextColor,\n\t\t\t\tfontSize: fontSizeClass ? undefined : customFontSize,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\tstyle={ styles }\n\t\t\t\t\tclassName={ className ? className : undefined }\n\t\t\t\t\tvalue={ content }\n\t\t\t\t\tdir={ direction }\n\t\t\t\t/>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\tsupports,\n\t\tattributes: {\n\t\t\t...restBlockAttributes,\n\t\t\tcustomTextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomBackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomFontSize: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t},\n\t\tmigrate: migrateCustomColorsAndFontSizes,\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\talign,\n\t\t\t\tcontent,\n\t\t\t\tdropCap,\n\t\t\t\tbackgroundColor,\n\t\t\t\ttextColor,\n\t\t\t\tcustomBackgroundColor,\n\t\t\t\tcustomTextColor,\n\t\t\t\tfontSize,\n\t\t\t\tcustomFontSize,\n\t\t\t\tdirection,\n\t\t\t} = attributes;\n\n\t\t\tconst textClass = getColorClassName( 'color', textColor );\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tbackgroundColor\n\t\t\t);\n\t\t\tconst fontSizeClass = getFontSizeClass( fontSize );\n\n\t\t\tconst className = clsx( {\n\t\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t\t'has-background': backgroundColor || customBackgroundColor,\n\t\t\t\t'has-drop-cap': dropCap,\n\t\t\t\t[ fontSizeClass ]: fontSizeClass,\n\t\t\t\t[ textClass ]: textClass,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tconst styles = {\n\t\t\t\tbackgroundColor: backgroundClass\n\t\t\t\t\t? undefined\n\t\t\t\t\t: customBackgroundColor,\n\t\t\t\tcolor: textClass ? undefined : customTextColor,\n\t\t\t\tfontSize: fontSizeClass ? undefined : customFontSize,\n\t\t\t\ttextAlign: align,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\tstyle={ styles }\n\t\t\t\t\tclassName={ className ? className : undefined }\n\t\t\t\t\tvalue={ content }\n\t\t\t\t\tdir={ direction }\n\t\t\t\t/>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\tsupports,\n\t\tattributes: {\n\t\t\t...restBlockAttributes,\n\t\t\tcustomTextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomBackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomFontSize: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\twidth: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t},\n\t\tmigrate: migrateCustomColorsAndFontSizes,\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\twidth,\n\t\t\t\talign,\n\t\t\t\tcontent,\n\t\t\t\tdropCap,\n\t\t\t\tbackgroundColor,\n\t\t\t\ttextColor,\n\t\t\t\tcustomBackgroundColor,\n\t\t\t\tcustomTextColor,\n\t\t\t\tfontSize,\n\t\t\t\tcustomFontSize,\n\t\t\t} = attributes;\n\n\t\t\tconst textClass = getColorClassName( 'color', textColor );\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tbackgroundColor\n\t\t\t);\n\t\t\tconst fontSizeClass = fontSize && `is-${ fontSize }-text`;\n\n\t\t\tconst className = clsx( {\n\t\t\t\t[ `align${ width }` ]: width,\n\t\t\t\t'has-background': backgroundColor || customBackgroundColor,\n\t\t\t\t'has-drop-cap': dropCap,\n\t\t\t\t[ fontSizeClass ]: fontSizeClass,\n\t\t\t\t[ textClass ]: textClass,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tconst styles = {\n\t\t\t\tbackgroundColor: backgroundClass\n\t\t\t\t\t? undefined\n\t\t\t\t\t: customBackgroundColor,\n\t\t\t\tcolor: textClass ? undefined : customTextColor,\n\t\t\t\tfontSize: fontSizeClass ? undefined : customFontSize,\n\t\t\t\ttextAlign: align,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\tstyle={ styles }\n\t\t\t\t\tclassName={ className ? className : undefined }\n\t\t\t\t\tvalue={ content }\n\t\t\t\t/>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\tsupports,\n\t\tattributes: {\n\t\t\t...restBlockAttributes,\n\t\t\tfontSize: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\twidth,\n\t\t\t\talign,\n\t\t\t\tcontent,\n\t\t\t\tdropCap,\n\t\t\t\tbackgroundColor,\n\t\t\t\ttextColor,\n\t\t\t\tfontSize,\n\t\t\t} = attributes;\n\t\t\tconst className = clsx( {\n\t\t\t\t[ `align${ width }` ]: width,\n\t\t\t\t'has-background': backgroundColor,\n\t\t\t\t'has-drop-cap': dropCap,\n\t\t\t} );\n\t\t\tconst styles = {\n\t\t\t\tbackgroundColor,\n\t\t\t\tcolor: textColor,\n\t\t\t\tfontSize,\n\t\t\t\ttextAlign: align,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<p\n\t\t\t\t\tstyle={ styles }\n\t\t\t\t\tclassName={ className ? className : undefined }\n\t\t\t\t>\n\t\t\t\t\t{ content }\n\t\t\t\t</p>\n\t\t\t);\n\t\t},\n\t\tmigrate( attributes ) {\n\t\t\treturn migrateCustomColorsAndFontSizes( {\n\t\t\t\t...attributes,\n\t\t\t\tcustomFontSize: Number.isFinite( attributes.fontSize )\n\t\t\t\t\t? attributes.fontSize\n\t\t\t\t\t: undefined,\n\t\t\t\tcustomTextColor:\n\t\t\t\t\tattributes.textColor && '#' === attributes.textColor[ 0 ]\n\t\t\t\t\t\t? attributes.textColor\n\t\t\t\t\t\t: undefined,\n\t\t\t\tcustomBackgroundColor:\n\t\t\t\t\tattributes.backgroundColor &&\n\t\t\t\t\t'#' === attributes.backgroundColor[ 0 ]\n\t\t\t\t\t\t? attributes.backgroundColor\n\t\t\t\t\t\t: undefined,\n\t\t\t} );\n\t\t},\n\t},\n\t{\n\t\tsupports,\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\tcontent: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'html',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\treturn <RawHTML>{ attributes.content }</RawHTML>;\n\t\t},\n\t\tmigrate( attributes ) {\n\t\t\treturn attributes;\n\t\t},\n\t},\n];\n\nexport default deprecated;\n"],"mappings":";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