@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","_i18n","_components","_blockEditor","_icons","_useEnter","_jsxRuntime","ParagraphRTLControl","direction","setDirection","isRTL","jsx","ToolbarButton","icon","formatLtr","title","_x","isActive","onClick","undefined","hasDropCapDisabled","align","DropCapControl","clientId","attributes","setAttributes","isDropCapFeatureEnabled","useSettings","dropCap","helpText","__","__experimentalToolsPanelItem","hasValue","label","onDeselect","resetAllFilter","panelId","children","ToggleControl","__nextHasNoMarginBottom","checked","onChange","help","disabled","ParagraphBlock","mergeBlocks","onReplace","onRemove","content","placeholder","blockProps","useBlockProps","ref","useOnEnter","className","clsx","style","blockEditingMode","useBlockEditingMode","jsxs","Fragment","BlockControls","group","AlignmentControl","value","newAlign","newDirection","InspectorControls","RichText","identifier","tagName","newContent","onMerge","isEmpty","__unstableEmbedURLOnPaste","__unstableAllowPrefixTransformations","_default","exports","default"],"sources":["@wordpress/block-library/src/paragraph/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, isRTL } from '@wordpress/i18n';\nimport {\n\tToolbarButton,\n\tToggleControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\tuseSettings,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { formatLtr } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useOnEnter } from './use-enter';\n\nfunction ParagraphRTLControl( { direction, setDirection } ) {\n\treturn (\n\t\tisRTL() && (\n\t\t\t<ToolbarButton\n\t\t\t\ticon={ formatLtr }\n\t\t\t\ttitle={ _x( 'Left to right', 'editor button' ) }\n\t\t\t\tisActive={ direction === 'ltr' }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetDirection( direction === 'ltr' ? undefined : 'ltr' );\n\t\t\t\t} }\n\t\t\t/>\n\t\t)\n\t);\n}\n\nfunction hasDropCapDisabled( align ) {\n\treturn align === ( isRTL() ? 'left' : 'right' ) || align === 'center';\n}\n\nfunction DropCapControl( { clientId, attributes, setAttributes } ) {\n\t// Please do not add a useSelect call to the paragraph block unconditionally.\n\t// Every useSelect added to a (frequently used) block will degrade load\n\t// and type performance. By moving it within InspectorControls, the subscription is\n\t// now only added for the selected block(s).\n\tconst [ isDropCapFeatureEnabled ] = useSettings( 'typography.dropCap' );\n\n\tif ( ! isDropCapFeatureEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst { align, dropCap } = attributes;\n\n\tlet helpText;\n\tif ( hasDropCapDisabled( align ) ) {\n\t\thelpText = __( 'Not available for aligned text.' );\n\t} else if ( dropCap ) {\n\t\thelpText = __( 'Showing large initial letter.' );\n\t} else {\n\t\thelpText = __( 'Toggle to show a large initial letter.' );\n\t}\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\thasValue={ () => !! dropCap }\n\t\t\tlabel={ __( 'Drop cap' ) }\n\t\t\tonDeselect={ () => setAttributes( { dropCap: undefined } ) }\n\t\t\tresetAllFilter={ () => ( { dropCap: undefined } ) }\n\t\t\tpanelId={ clientId }\n\t\t>\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Drop cap' ) }\n\t\t\t\tchecked={ !! dropCap }\n\t\t\t\tonChange={ () => setAttributes( { dropCap: ! dropCap } ) }\n\t\t\t\thelp={ helpText }\n\t\t\t\tdisabled={ hasDropCapDisabled( align ) ? true : false }\n\t\t\t/>\n\t\t</ToolsPanelItem>\n\t);\n}\n\nfunction ParagraphBlock( {\n\tattributes,\n\tmergeBlocks,\n\tonReplace,\n\tonRemove,\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst { align, content, direction, dropCap, placeholder } = attributes;\n\tconst blockProps = useBlockProps( {\n\t\tref: useOnEnter( { clientId, content } ),\n\t\tclassName: clsx( {\n\t\t\t'has-drop-cap': hasDropCapDisabled( align ) ? false : dropCap,\n\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t} ),\n\t\tstyle: { direction },\n\t} );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\treturn (\n\t\t<>\n\t\t\t{ blockEditingMode === 'default' && (\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t<AlignmentControl\n\t\t\t\t\t\tvalue={ align }\n\t\t\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\talign: newAlign,\n\t\t\t\t\t\t\t\tdropCap: hasDropCapDisabled( newAlign )\n\t\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t\t: dropCap,\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<ParagraphRTLControl\n\t\t\t\t\t\tdirection={ direction }\n\t\t\t\t\t\tsetDirection={ ( newDirection ) =>\n\t\t\t\t\t\t\tsetAttributes( { direction: newDirection } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"typography\">\n\t\t\t\t<DropCapControl\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<RichText\n\t\t\t\tidentifier=\"content\"\n\t\t\t\ttagName=\"p\"\n\t\t\t\t{ ...blockProps }\n\t\t\t\tvalue={ content }\n\t\t\t\tonChange={ ( newContent ) =>\n\t\t\t\t\tsetAttributes( { content: newContent } )\n\t\t\t\t}\n\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\tonReplace={ onReplace }\n\t\t\t\tonRemove={ onRemove }\n\t\t\t\taria-label={\n\t\t\t\t\tRichText.isEmpty( content )\n\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t'Empty block; start writing or type forward slash to choose a block'\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Block: Paragraph' )\n\t\t\t\t}\n\t\t\t\tdata-empty={ RichText.isEmpty( content ) }\n\t\t\t\tplaceholder={ placeholder || __( 'Type / to choose a block' ) }\n\t\t\t\tdata-custom-placeholder={ placeholder ? true : undefined }\n\t\t\t\t__unstableEmbedURLOnPaste\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ParagraphBlock;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAH,OAAA;AASA,IAAAI,MAAA,GAAAJ,OAAA;AA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G;MAAA,GACNpB,UAAU;MACfc,KAAK,EAAGhB,OAAS;MACjBP,QAAQ,EAAK8B,UAAU,IACtB9C,aAAa,CAAE;QAAEuB,OAAO,EAAEuB;MAAW,CAAE,CACvC;MACDC,OAAO,EAAG3B,WAAa;MACvBC,SAAS,EAAGA,SAAW;MACvBC,QAAQ,EAAGA,QAAU;MACrB,cACCqB,qBAAQ,CAACK,OAAO,CAAEzB,OAAQ,CAAC,GACxB,IAAAlB,QAAE,EACF,oEACA,CAAC,GACD,IAAAA,QAAE,EAAE,kBAAmB,CAC1B;MACD,cAAasC,qBAAQ,CAACK,OAAO,CAAEzB,OAAQ,CAAG;MAC1CC,WAAW,EAAGA,WAAW,IAAI,IAAAnB,QAAE,EAAE,0BAA2B,CAAG;MAC/D,2BAA0BmB,WAAW,GAAG,IAAI,GAAG9B,SAAW;MAC1DuD,yBAAyB;MACzBC,oCAAoC;IAAA,CACpC,CAAC;EAAA,CACD,CAAC;AAEL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEclC,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_components","_blockEditor","_icons","_useEnter","_jsxRuntime","ParagraphRTLControl","direction","setDirection","isRTL","jsx","ToolbarButton","icon","formatLtr","title","_x","isActive","onClick","undefined","hasDropCapDisabled","align","DropCapControl","clientId","attributes","setAttributes","isDropCapFeatureEnabled","useSettings","dropCap","helpText","__","__experimentalToolsPanelItem","hasValue","label","onDeselect","resetAllFilter","panelId","children","ToggleControl","__nextHasNoMarginBottom","checked","onChange","help","disabled","ParagraphBlock","mergeBlocks","onReplace","onRemove","content","placeholder","blockProps","useBlockProps","ref","useOnEnter","className","clsx","style","blockEditingMode","useBlockEditingMode","jsxs","Fragment","BlockControls","group","AlignmentControl","value","newAlign","newDirection","InspectorControls","RichText","identifier","tagName","newContent","onMerge","isEmpty","__unstableEmbedURLOnPaste","__unstableAllowPrefixTransformations","_default","exports","default"],"sources":["@wordpress/block-library/src/paragraph/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, isRTL } from '@wordpress/i18n';\nimport {\n\tToolbarButton,\n\tToggleControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\tuseSettings,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { formatLtr } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useOnEnter } from './use-enter';\n\nfunction ParagraphRTLControl( { direction, setDirection } ) {\n\treturn (\n\t\tisRTL() && (\n\t\t\t<ToolbarButton\n\t\t\t\ticon={ formatLtr }\n\t\t\t\ttitle={ _x( 'Left to right', 'editor button' ) }\n\t\t\t\tisActive={ direction === 'ltr' }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetDirection( direction === 'ltr' ? undefined : 'ltr' );\n\t\t\t\t} }\n\t\t\t/>\n\t\t)\n\t);\n}\n\nfunction hasDropCapDisabled( align ) {\n\treturn align === ( isRTL() ? 'left' : 'right' ) || align === 'center';\n}\n\nfunction DropCapControl( { clientId, attributes, setAttributes } ) {\n\t// Please do not add a useSelect call to the paragraph block unconditionally.\n\t// Every useSelect added to a (frequently used) block will degrade load\n\t// and type performance. By moving it within InspectorControls, the subscription is\n\t// now only added for the selected block(s).\n\tconst [ isDropCapFeatureEnabled ] = useSettings( 'typography.dropCap' );\n\n\tif ( ! isDropCapFeatureEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst { align, dropCap } = attributes;\n\n\tlet helpText;\n\tif ( hasDropCapDisabled( align ) ) {\n\t\thelpText = __( 'Not available for aligned text.' );\n\t} else if ( dropCap ) {\n\t\thelpText = __( 'Showing large initial letter.' );\n\t} else {\n\t\thelpText = __( 'Toggle to show a large initial letter.' );\n\t}\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\thasValue={ () => !! dropCap }\n\t\t\tlabel={ __( 'Drop cap' ) }\n\t\t\tonDeselect={ () => setAttributes( { dropCap: undefined } ) }\n\t\t\tresetAllFilter={ () => ( { dropCap: undefined } ) }\n\t\t\tpanelId={ clientId }\n\t\t>\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Drop cap' ) }\n\t\t\t\tchecked={ !! dropCap }\n\t\t\t\tonChange={ () => setAttributes( { dropCap: ! dropCap } ) }\n\t\t\t\thelp={ helpText }\n\t\t\t\tdisabled={ hasDropCapDisabled( align ) ? true : false }\n\t\t\t/>\n\t\t</ToolsPanelItem>\n\t);\n}\n\nfunction ParagraphBlock( {\n\tattributes,\n\tmergeBlocks,\n\tonReplace,\n\tonRemove,\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst { align, content, direction, dropCap, placeholder } = attributes;\n\tconst blockProps = useBlockProps( {\n\t\tref: useOnEnter( { clientId, content } ),\n\t\tclassName: clsx( {\n\t\t\t'has-drop-cap': hasDropCapDisabled( align ) ? false : dropCap,\n\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t} ),\n\t\tstyle: { direction },\n\t} );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\treturn (\n\t\t<>\n\t\t\t{ blockEditingMode === 'default' && (\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t<AlignmentControl\n\t\t\t\t\t\tvalue={ align }\n\t\t\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\talign: newAlign,\n\t\t\t\t\t\t\t\tdropCap: hasDropCapDisabled( newAlign )\n\t\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t\t: dropCap,\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<ParagraphRTLControl\n\t\t\t\t\t\tdirection={ direction }\n\t\t\t\t\t\tsetDirection={ ( newDirection ) =>\n\t\t\t\t\t\t\tsetAttributes( { direction: newDirection } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"typography\">\n\t\t\t\t<DropCapControl\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<RichText\n\t\t\t\tidentifier=\"content\"\n\t\t\t\ttagName=\"p\"\n\t\t\t\t{ ...blockProps }\n\t\t\t\tvalue={ content }\n\t\t\t\tonChange={ ( newContent ) =>\n\t\t\t\t\tsetAttributes( { content: newContent } )\n\t\t\t\t}\n\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\tonReplace={ onReplace }\n\t\t\t\tonRemove={ onRemove }\n\t\t\t\taria-label={\n\t\t\t\t\tRichText.isEmpty( content )\n\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t'Empty block; start writing or type forward slash to choose a block'\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Block: Paragraph' )\n\t\t\t\t}\n\t\t\t\tdata-empty={ RichText.isEmpty( content ) }\n\t\t\t\tplaceholder={ placeholder || __( 'Type / to choose a block' ) }\n\t\t\t\tdata-custom-placeholder={ placeholder ? true : undefined }\n\t\t\t\t__unstableEmbedURLOnPaste\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ParagraphBlock;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAH,OAAA;AASA,IAAAI,MAAA,GAAAJ,OAAA;AAKA,IAAAK,SAAA,GAAAL,OAAA;AAAyC,IAAAM,WAAA,GAAAN,OAAA;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AAK8B,UAAU,IACtB9C,aAAa,CAAE;QAAEuB,OAAO,EAAEuB;MAAW,CAAE,CACvC;MACDC,OAAO,EAAG3B,WAAa;MACvBC,SAAS,EAAGA,SAAW;MACvBC,QAAQ,EAAGA,QAAU;MACrB,cACCqB,qBAAQ,CAACK,OAAO,CAAEzB,OAAQ,CAAC,GACxB,IAAAlB,QAAE,EACF,oEACA,CAAC,GACD,IAAAA,QAAE,EAAE,kBAAmB,CAC1B;MACD,cAAasC,qBAAQ,CAACK,OAAO,CAAEzB,OAAQ,CAAG;MAC1CC,WAAW,EAAGA,WAAW,IAAI,IAAAnB,QAAE,EAAE,0BAA2B,CAAG;MAC/D,2BAA0BmB,WAAW,GAAG,IAAI,GAAG9B,SAAW;MAC1DuD,yBAAyB;MACzBC,oCAAoC;IAAA,CACpC,CAAC;EAAA,CACD,CAAC;AAEL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEclC,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_i18n","_jsxRuntime","save","attributes","align","content","dropCap","direction","className","clsx","isRTL","jsx","useBlockProps","dir","children","RichText","Content","value"],"sources":["@wordpress/block-library/src/paragraph/save.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\nimport { isRTL } from '@wordpress/i18n';\n\nexport default function save( { attributes } ) {\n\tconst { align, content, dropCap, direction } = attributes;\n\tconst className = clsx( {\n\t\t'has-drop-cap':\n\t\t\talign === ( isRTL() ? 'left' : 'right' ) || align === 'center'\n\t\t\t\t? false\n\t\t\t\t: dropCap,\n\t\t[ `has-text-align-${ align }` ]: align,\n\t} );\n\n\treturn (\n\t\t<p { ...useBlockProps.save( { className, dir: direction } ) }>\n\t\t\t<RichText.Content value={ content } />\n\t\t</p>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAAwC,IAAAG,WAAA,GAAAH,OAAA;AATxC;AACA;AACA;;AAGA;AACA;AACA;;AAIe,SAASI,IAAIA,CAAE;EAAEC;AAAW,CAAC,EAAG;EAC9C,MAAM;IAAEC,KAAK;IAAEC,OAAO;IAAEC,OAAO;IAAEC;EAAU,CAAC,GAAGJ,UAAU;EACzD,MAAMK,SAAS,GAAG,IAAAC,aAAI,EAAE;IACvB,cAAc,EACbL,KAAK,MAAO,IAAAM,WAAK,EAAC,CAAC,GAAG,MAAM,GAAG,OAAO,CAAE,IAAIN,KAAK,KAAK,QAAQ,GAC3D,KAAK,GACLE,OAAO;IACX,CAAG,kBAAkBF,KAAO,EAAC,GAAIA;EAClC,CAAE,CAAC;EAEH,oBACC,IAAAH,WAAA,CAAAU,GAAA;IAAA,GAAQC,0BAAa,CAACV,IAAI,CAAE;MAAEM,SAAS;MAAEK,GAAG,EAAEN;IAAU,CAAE,CAAC;IAAAO,QAAA,eAC1D,IAAAb,WAAA,CAAAU,GAAA,EAACZ,YAAA,CAAAgB,QAAQ,CAACC,OAAO;MAACC,KAAK,EAAGZ;IAAS,CAAE;EAAC,CACpC,CAAC;AAEN","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_i18n","_jsxRuntime","save","attributes","align","content","dropCap","direction","className","clsx","isRTL","jsx","useBlockProps","dir","children","RichText","Content","value"],"sources":["@wordpress/block-library/src/paragraph/save.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\nimport { isRTL } from '@wordpress/i18n';\n\nexport default function save( { attributes } ) {\n\tconst { align, content, dropCap, direction } = attributes;\n\tconst className = clsx( {\n\t\t'has-drop-cap':\n\t\t\talign === ( isRTL() ? 'left' : 'right' ) || align === 'center'\n\t\t\t\t? false\n\t\t\t\t: dropCap,\n\t\t[ `has-text-align-${ align }` ]: align,\n\t} );\n\n\treturn (\n\t\t<p { ...useBlockProps.save( { className, dir: direction } ) }>\n\t\t\t<RichText.Content value={ content } />\n\t\t</p>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAAwC,IAAAG,WAAA,GAAAH,OAAA;AATxC;AACA;AACA;;AAGA;AACA;AACA;;AAIe,SAASI,IAAIA,CAAE;EAAEC;AAAW,CAAC,EAAG;EAC9C,MAAM;IAAEC,KAAK;IAAEC,OAAO;IAAEC,OAAO;IAAEC;EAAU,CAAC,GAAGJ,UAAU;EACzD,MAAMK,SAAS,GAAG,IAAAC,aAAI,EAAE;IACvB,cAAc,EACbL,KAAK,MAAO,IAAAM,WAAK,EAAC,CAAC,GAAG,MAAM,GAAG,OAAO,CAAE,IAAIN,KAAK,KAAK,QAAQ,GAC3D,KAAK,GACLE,OAAO;IACX,CAAE,kBAAmBF,KAAK,EAAG,GAAIA;EAClC,CAAE,CAAC;EAEH,oBACC,IAAAH,WAAA,CAAAU,GAAA;IAAA,GAAQC,0BAAa,CAACV,IAAI,CAAE;MAAEM,SAAS;MAAEK,GAAG,EAAEN;IAAU,CAAE,CAAC;IAAAO,QAAA,eAC1D,IAAAb,WAAA,CAAAU,GAAA,EAACZ,YAAA,CAAAgB,QAAQ,CAACC,OAAO;MAACC,KAAK,EAAGZ;IAAS,CAAE;EAAC,CACpC,CAAC;AAEN","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","cachedParsers","WeakMap","useParsePatternDependencies","registry","useRegistry","has","deps","Map","set","parsePatternDependencies","bind","get","name","blocks","queue","length","block","shift","innerBlock","_block$innerBlocks","innerBlocks","unshift","registerDependency","attributes","slug","a","b","Set","add","hasCycle","TypeError","visitedNodes","currentPath","_deps$get","dependencies","dependency","delete"],"sources":["@wordpress/block-library/src/pattern/recursion-detector.js"],"sourcesContent":["/**\n * THIS MODULE IS INTENTIONALLY KEPT WITHIN THE PATTERN BLOCK'S SOURCE.\n *\n * This is because this approach for preventing infinite loops due to\n * recursively rendering blocks is specific to the way that the `core/pattern`\n * block behaves in the editor. Any other block types that deal with recursion\n * SHOULD USE THE STANDARD METHOD for avoiding loops:\n *\n * @see https://github.com/WordPress/gutenberg/pull/31455\n * @see packages/block-editor/src/components/recursion-provider/README.md\n */\n\n/**\n * WordPress dependencies\n */\nimport { useRegistry } from '@wordpress/data';\n\n/**\n * Naming is hard.\n *\n * @see useParsePatternDependencies\n *\n * @type {WeakMap<Object, Function>}\n */\nconst cachedParsers = new WeakMap();\n\n/**\n * Hook used by PatternEdit to parse block patterns. It returns a function that\n * takes a pattern and returns nothing but throws an error if the pattern is\n * recursive.\n *\n * @example\n * ```js\n * const parsePatternDependencies = useParsePatternDependencies();\n * parsePatternDependencies( selectedPattern );\n * ```\n *\n * @see parsePatternDependencies\n *\n * @return {Function} A function to parse block patterns.\n */\nexport function useParsePatternDependencies() {\n\tconst registry = useRegistry();\n\n\t// Instead of caching maps, go straight to the point and cache bound\n\t// functions. Each of those functions is bound to a different Map that will\n\t// keep track of patterns in the context of the given registry.\n\tif ( ! cachedParsers.has( registry ) ) {\n\t\tconst deps = new Map();\n\t\tcachedParsers.set(\n\t\t\tregistry,\n\t\t\tparsePatternDependencies.bind( null, deps )\n\t\t);\n\t}\n\treturn cachedParsers.get( registry );\n}\n\n/**\n * Parse a given pattern and traverse its contents to detect any subsequent\n * patterns on which it may depend. Such occurrences will be added to an\n * internal dependency graph. If a circular dependency is detected, an\n * error will be thrown.\n *\n * EXPORTED FOR TESTING PURPOSES ONLY.\n *\n * @param {Map<string, Set<string>>} deps Map of pattern dependencies.\n * @param {Object} pattern Pattern.\n * @param {string} pattern.name Pattern name.\n * @param {Array} pattern.blocks Pattern's block list.\n *\n * @throws {Error} If a circular dependency is detected.\n */\nexport function parsePatternDependencies( deps, { name, blocks } ) {\n\tconst queue = [ ...blocks ];\n\twhile ( queue.length ) {\n\t\tconst block = queue.shift();\n\t\tfor ( const innerBlock of block.innerBlocks ?? [] ) {\n\t\t\tqueue.unshift( innerBlock );\n\t\t}\n\t\tif ( block.name === 'core/pattern' ) {\n\t\t\tregisterDependency( deps, name, block.attributes.slug );\n\t\t}\n\t}\n}\n\n/**\n * Declare that pattern `a` depends on pattern `b`. If a circular\n * dependency is detected, an error will be thrown.\n *\n * EXPORTED FOR TESTING PURPOSES ONLY.\n *\n * @param {Map<string, Set<string>>} deps Map of pattern dependencies.\n * @param {string} a Slug for pattern A.\n * @param {string} b Slug for pattern B.\n *\n * @throws {Error} If a circular dependency is detected.\n */\nexport function registerDependency( deps, a, b ) {\n\tif ( ! deps.has( a ) ) {\n\t\tdeps.set( a, new Set() );\n\t}\n\tdeps.get( a ).add( b );\n\tif ( hasCycle( deps, a ) ) {\n\t\tthrow new TypeError(\n\t\t\t`Pattern ${ a } has a circular dependency and cannot be rendered.`\n\t\t);\n\t}\n}\n\n/**\n * Determine if a given pattern has circular dependencies on other patterns.\n * This will be determined by running a depth-first search on the current state\n * of the graph represented by `patternDependencies`.\n *\n * @param {Map<string, Set<string>>} deps Map of pattern dependencies.\n * @param {string} slug Pattern slug.\n * @param {Set<string>} [visitedNodes] Set to track visited nodes in the graph.\n * @param {Set<string>} [currentPath] Set to track and backtrack graph paths.\n * @return {boolean} Whether any cycle was found.\n */\nfunction hasCycle(\n\tdeps,\n\tslug,\n\tvisitedNodes = new Set(),\n\tcurrentPath = new Set()\n) {\n\tvisitedNodes.add( slug );\n\tcurrentPath.add( slug );\n\n\tconst dependencies = deps.get( slug ) ?? new Set();\n\n\tfor ( const dependency of dependencies ) {\n\t\tif ( ! visitedNodes.has( dependency ) ) {\n\t\t\tif ( hasCycle( deps, dependency, visitedNodes, currentPath ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if ( currentPath.has( dependency ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// Remove the current node from the current path when backtracking\n\tcurrentPath.delete( slug );\n\treturn false;\n}\n"],"mappings":";;;;;;;;AAeA,IAAAA,KAAA,GAAAC,OAAA;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,IAAIC,OAAO,CAAC,CAAC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,2BAA2BA,CAAA,EAAG;EAC7C,MAAMC,QAAQ,GAAG,IAAAC,iBAAW,EAAC,CAAC;;EAE9B;EACA;EACA;EACA,IAAK,CAAEJ,aAAa,CAACK,GAAG,CAAEF,QAAS,CAAC,EAAG;IACtC,MAAMG,IAAI,GAAG,IAAIC,GAAG,CAAC,CAAC;IACtBP,aAAa,CAACQ,GAAG,CAChBL,QAAQ,EACRM,wBAAwB,CAACC,IAAI,CAAE,IAAI,EAAEJ,IAAK,CAC3C,CAAC;EACF;EACA,OAAON,aAAa,CAACW,GAAG,CAAER,QAAS,CAAC;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASM,wBAAwBA,CAAEH,IAAI,EAAE;EAAEM,IAAI;EAAEC;AAAO,CAAC,EAAG;EAClE,MAAMC,KAAK,GAAG,CAAE,GAAGD,MAAM,CAAE;EAC3B,OAAQC,KAAK,CAACC,MAAM,EAAG;IACtB,MAAMC,KAAK,GAAGF,KAAK,CAACG,KAAK,CAAC,CAAC;IAC3B,KAAM,MAAMC,UAAU,KAAAC,kBAAA,GAAIH,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MQ,UAAU,IAAID,YAAY,EAAG;IACxC,IAAK,CAAEH,YAAY,CAAC1B,GAAG,CAAE8B,UAAW,CAAC,EAAG;MACvC,IAAKN,QAAQ,CAAEvB,IAAI,EAAE6B,UAAU,EAAEJ,YAAY,EAAEC,WAAY,CAAC,EAAG;QAC9D,OAAO,IAAI;MACZ;IACD,CAAC,MAAM,IAAKA,WAAW,CAAC3B,GAAG,CAAE8B,UAAW,CAAC,EAAG;MAC3C,OAAO,IAAI;IACZ;EACD;;EAEA;EACAH,WAAW,CAACI,MAAM,CAAEZ,IAAK,CAAC;EAC1B,OAAO,KAAK;AACb","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","cachedParsers","WeakMap","useParsePatternDependencies","registry","useRegistry","has","deps","Map","set","parsePatternDependencies","bind","get","name","blocks","queue","length","block","shift","innerBlock","_block$innerBlocks","innerBlocks","unshift","registerDependency","attributes","slug","a","b","Set","add","hasCycle","TypeError","visitedNodes","currentPath","_deps$get","dependencies","dependency","delete"],"sources":["@wordpress/block-library/src/pattern/recursion-detector.js"],"sourcesContent":["/**\n * THIS MODULE IS INTENTIONALLY KEPT WITHIN THE PATTERN BLOCK'S SOURCE.\n *\n * This is because this approach for preventing infinite loops due to\n * recursively rendering blocks is specific to the way that the `core/pattern`\n * block behaves in the editor. Any other block types that deal with recursion\n * SHOULD USE THE STANDARD METHOD for avoiding loops:\n *\n * @see https://github.com/WordPress/gutenberg/pull/31455\n * @see packages/block-editor/src/components/recursion-provider/README.md\n */\n\n/**\n * WordPress dependencies\n */\nimport { useRegistry } from '@wordpress/data';\n\n/**\n * Naming is hard.\n *\n * @see useParsePatternDependencies\n *\n * @type {WeakMap<Object, Function>}\n */\nconst cachedParsers = new WeakMap();\n\n/**\n * Hook used by PatternEdit to parse block patterns. It returns a function that\n * takes a pattern and returns nothing but throws an error if the pattern is\n * recursive.\n *\n * @example\n * ```js\n * const parsePatternDependencies = useParsePatternDependencies();\n * parsePatternDependencies( selectedPattern );\n * ```\n *\n * @see parsePatternDependencies\n *\n * @return {Function} A function to parse block patterns.\n */\nexport function useParsePatternDependencies() {\n\tconst registry = useRegistry();\n\n\t// Instead of caching maps, go straight to the point and cache bound\n\t// functions. Each of those functions is bound to a different Map that will\n\t// keep track of patterns in the context of the given registry.\n\tif ( ! cachedParsers.has( registry ) ) {\n\t\tconst deps = new Map();\n\t\tcachedParsers.set(\n\t\t\tregistry,\n\t\t\tparsePatternDependencies.bind( null, deps )\n\t\t);\n\t}\n\treturn cachedParsers.get( registry );\n}\n\n/**\n * Parse a given pattern and traverse its contents to detect any subsequent\n * patterns on which it may depend. Such occurrences will be added to an\n * internal dependency graph. If a circular dependency is detected, an\n * error will be thrown.\n *\n * EXPORTED FOR TESTING PURPOSES ONLY.\n *\n * @param {Map<string, Set<string>>} deps Map of pattern dependencies.\n * @param {Object} pattern Pattern.\n * @param {string} pattern.name Pattern name.\n * @param {Array} pattern.blocks Pattern's block list.\n *\n * @throws {Error} If a circular dependency is detected.\n */\nexport function parsePatternDependencies( deps, { name, blocks } ) {\n\tconst queue = [ ...blocks ];\n\twhile ( queue.length ) {\n\t\tconst block = queue.shift();\n\t\tfor ( const innerBlock of block.innerBlocks ?? [] ) {\n\t\t\tqueue.unshift( innerBlock );\n\t\t}\n\t\tif ( block.name === 'core/pattern' ) {\n\t\t\tregisterDependency( deps, name, block.attributes.slug );\n\t\t}\n\t}\n}\n\n/**\n * Declare that pattern `a` depends on pattern `b`. If a circular\n * dependency is detected, an error will be thrown.\n *\n * EXPORTED FOR TESTING PURPOSES ONLY.\n *\n * @param {Map<string, Set<string>>} deps Map of pattern dependencies.\n * @param {string} a Slug for pattern A.\n * @param {string} b Slug for pattern B.\n *\n * @throws {Error} If a circular dependency is detected.\n */\nexport function registerDependency( deps, a, b ) {\n\tif ( ! deps.has( a ) ) {\n\t\tdeps.set( a, new Set() );\n\t}\n\tdeps.get( a ).add( b );\n\tif ( hasCycle( deps, a ) ) {\n\t\tthrow new TypeError(\n\t\t\t`Pattern ${ a } has a circular dependency and cannot be rendered.`\n\t\t);\n\t}\n}\n\n/**\n * Determine if a given pattern has circular dependencies on other patterns.\n * This will be determined by running a depth-first search on the current state\n * of the graph represented by `patternDependencies`.\n *\n * @param {Map<string, Set<string>>} deps Map of pattern dependencies.\n * @param {string} slug Pattern slug.\n * @param {Set<string>} [visitedNodes] Set to track visited nodes in the graph.\n * @param {Set<string>} [currentPath] Set to track and backtrack graph paths.\n * @return {boolean} Whether any cycle was found.\n */\nfunction hasCycle(\n\tdeps,\n\tslug,\n\tvisitedNodes = new Set(),\n\tcurrentPath = new Set()\n) {\n\tvisitedNodes.add( slug );\n\tcurrentPath.add( slug );\n\n\tconst dependencies = deps.get( slug ) ?? new Set();\n\n\tfor ( const dependency of dependencies ) {\n\t\tif ( ! visitedNodes.has( dependency ) ) {\n\t\t\tif ( hasCycle( deps, dependency, visitedNodes, currentPath ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if ( currentPath.has( dependency ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// Remove the current node from the current path when backtracking\n\tcurrentPath.delete( slug );\n\treturn false;\n}\n"],"mappings":";;;;;;;;;AAeA,IAAAA,KAAA,GAAAC,OAAA;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,IAAIC,OAAO,CAAC,CAAC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,2BAA2BA,CAAA,EAAG;EAC7C,MAAMC,QAAQ,GAAG,IAAAC,iBAAW,EAAC,CAAC;;EAE9B;EACA;EACA;EACA,IAAK,CAAEJ,aAAa,CAACK,GAAG,CAAEF,QAAS,CAAC,EAAG;IACtC,MAAMG,IAAI,GAAG,IAAIC,GAAG,CAAC,CAAC;IACtBP,aAAa,CAACQ,GAAG,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,oDACd,CAAC;EACF;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASI,QAAQA,CAChBvB,IAAI,EACJkB,IAAI,EACJO,YAAY,GAAG,IAAIJ,GAAG,CAAC,CAAC,EACxBK,WAAW,GAAG,IAAIL,GAAG,CAAC,CAAC,EACtB;EAAA,IAAAM,SAAA;EACDF,YAAY,CAACH,GAAG,CAAEJ,IAAK,CAAC;EACxBQ,WAAW,CAACJ,GAAG,CAAEJ,IAAK,CAAC;EAEvB,MAAMU,YAAY,IAAAD,SAAA,GAAG3B,IAAI,CAACK,GAAG,CAAEa,IAAK,CAAC,cAAAS,SAAA,cAAAA,SAAA,GAAI,IAAIN,GAAG,CAAC,CAAC;EAElD,KAAM,MAAMQ,UAAU,IAAID,YAAY,EAAG;IACxC,IAAK,CAAEH,YAAY,CAAC1B,GAAG,CAAE8B,UAAW,CAAC,EAAG;MACvC,IAAKN,QAAQ,CAAEvB,IAAI,EAAE6B,UAAU,EAAEJ,YAAY,EAAEC,WAAY,CAAC,EAAG;QAC9D,OAAO,IAAI;MACZ;IACD,CAAC,MAAM,IAAKA,WAAW,CAAC3B,GAAG,CAAE8B,UAAW,CAAC,EAAG;MAC3C,OAAO,IAAI;IACZ;EACD;;EAEA;EACAH,WAAW,CAACI,MAAM,CAAEZ,IAAK,CAAC;EAC1B,OAAO,KAAK;AACb","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_data","_i18n","_coreData","_jsxRuntime","minimumUsersForCombobox","AUTHORS_QUERY","who","per_page","PostAuthorEdit","isSelected","context","postType","postId","queryId","attributes","setAttributes","isDescendentOfQueryLoop","Number","isFinite","authorId","authorDetails","authors","useSelect","select","getEditedEntityRecord","getUser","getUsers","coreStore","_authorId","author","editEntityRecord","useDispatch","textAlign","showAvatar","showBio","byline","isLink","linkTarget","avatarSizes","authorName","name","__","avatar_urls","Object","keys","forEach","size","push","value","label","blockProps","useBlockProps","className","clsx","authorOptions","length","map","id","handleSelect","nextAuthorId","showCombobox","showAuthorControl","jsxs","Fragment","children","jsx","InspectorControls","PanelBody","title","__experimentalVStack","spacing","ComboboxControl","__next40pxDefaultSize","__nextHasNoMarginBottom","options","onChange","allowReset","SelectControl","ToggleControl","checked","avatarSize","BlockControls","group","AlignmentControl","nextAlign","width","src","alt","RichText","isEmpty","identifier","placeholder","href","onClick","event","preventDefault","dangerouslySetInnerHTML","__html","description","_default","exports","default"],"sources":["@wordpress/block-library/src/post-author/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport {\n\tComboboxControl,\n\tPanelBody,\n\tSelectControl,\n\tToggleControl,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\nconst minimumUsersForCombobox = 25;\n\nconst AUTHORS_QUERY = {\n\twho: 'authors',\n\tper_page: 100,\n};\n\nfunction PostAuthorEdit( {\n\tisSelected,\n\tcontext: { postType, postId, queryId },\n\tattributes,\n\tsetAttributes,\n} ) {\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\tconst { authorId, authorDetails, authors } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getUser, getUsers } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst _authorId = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t)?.author;\n\n\t\t\treturn {\n\t\t\t\tauthorId: _authorId,\n\t\t\t\tauthorDetails: _authorId ? getUser( _authorId ) : null,\n\t\t\t\tauthors: getUsers( AUTHORS_QUERY ),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst { textAlign, showAvatar, showBio, byline, isLink, linkTarget } =\n\t\tattributes;\n\tconst avatarSizes = [];\n\tconst authorName = authorDetails?.name || __( 'Post Author' );\n\tif ( authorDetails?.avatar_urls ) {\n\t\tObject.keys( authorDetails.avatar_urls ).forEach( ( size ) => {\n\t\t\tavatarSizes.push( {\n\t\t\t\tvalue: size,\n\t\t\t\tlabel: `${ size } x ${ size }`,\n\t\t\t} );\n\t\t} );\n\t}\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst authorOptions = authors?.length\n\t\t? authors.map( ( { id, name } ) => {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: id,\n\t\t\t\t\tlabel: name,\n\t\t\t\t};\n\t\t } )\n\t\t: [];\n\n\tconst handleSelect = ( nextAuthorId ) => {\n\t\teditEntityRecord( 'postType', postType, postId, {\n\t\t\tauthor: nextAuthorId,\n\t\t} );\n\t};\n\n\tconst showCombobox = authorOptions.length >= minimumUsersForCombobox;\n\tconst showAuthorControl =\n\t\t!! postId && ! isDescendentOfQueryLoop && authorOptions.length > 0;\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\t\tclassName=\"wp-block-post-author__inspector-settings\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showAuthorControl &&\n\t\t\t\t\t\t\t( ( showCombobox && (\n\t\t\t\t\t\t\t\t<ComboboxControl\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Author' ) }\n\t\t\t\t\t\t\t\t\toptions={ authorOptions }\n\t\t\t\t\t\t\t\t\tvalue={ authorId }\n\t\t\t\t\t\t\t\t\tonChange={ handleSelect }\n\t\t\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) || (\n\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Author' ) }\n\t\t\t\t\t\t\t\t\tvalue={ authorId }\n\t\t\t\t\t\t\t\t\toptions={ authorOptions }\n\t\t\t\t\t\t\t\t\tonChange={ handleSelect }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Show avatar' ) }\n\t\t\t\t\t\t\tchecked={ showAvatar }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { showAvatar: ! showAvatar } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ showAvatar && (\n\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Avatar size' ) }\n\t\t\t\t\t\t\t\tvalue={ attributes.avatarSize }\n\t\t\t\t\t\t\t\toptions={ avatarSizes }\n\t\t\t\t\t\t\t\tonChange={ ( size ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tavatarSize: Number( size ),\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\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Show bio' ) }\n\t\t\t\t\t\t\tchecked={ showBio }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { showBio: ! showBio } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Link author name to author page' ) }\n\t\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { isLink: ! isLink } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ isLink && (\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\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\tchecked={ linkTarget === '_blank' }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</VStack>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ showAvatar && authorDetails?.avatar_urls && (\n\t\t\t\t\t<div className=\"wp-block-post-author__avatar\">\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\twidth={ attributes.avatarSize }\n\t\t\t\t\t\t\tsrc={\n\t\t\t\t\t\t\t\tauthorDetails.avatar_urls[\n\t\t\t\t\t\t\t\t\tattributes.avatarSize\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\talt={ authorDetails.name }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<div className=\"wp-block-post-author__content\">\n\t\t\t\t\t{ ( ! RichText.isEmpty( byline ) || isSelected ) && (\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tidentifier=\"byline\"\n\t\t\t\t\t\t\tclassName=\"wp-block-post-author__byline\"\n\t\t\t\t\t\t\taria-label={ __( 'Post author byline text' ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'Write byline…' ) }\n\t\t\t\t\t\t\tvalue={ byline }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { byline: value } )\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<p className=\"wp-block-post-author__name\">\n\t\t\t\t\t\t{ isLink ? (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\"#post-author-pseudo-link\"\n\t\t\t\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ authorName }\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tauthorName\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t{ showBio && (\n\t\t\t\t\t\t<p\n\t\t\t\t\t\t\tclassName=\"wp-block-post-author__bio\"\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t\t__html: authorDetails?.description,\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</div>\n\t\t</>\n\t);\n}\n\nexport default PostAu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4BAA4B;UAAAY,QAAA,EACtC5B,MAAM,gBACP,IAAAjC,WAAA,CAAA8D,GAAA;YACC2B,IAAI,EAAC,0BAA0B;YAC/BC,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;YAAA/B,QAAA,EAE7CzB;UAAU,CACV,CAAC,GAEJA;QACA,CACC,CAAC,EACFL,OAAO,iBACR,IAAA/B,WAAA,CAAA8D,GAAA;UACCb,SAAS,EAAC,2BAA2B;UACrC4C,uBAAuB,EAAG;YACzBC,MAAM,EAAE7E,aAAa,EAAE8E;UACxB;QAAG,CACH,CACD;MAAA,CACG,CAAC;IAAA,CACF,CAAC;EAAA,CACL,CAAC;AAEL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc7F,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_data","_i18n","_coreData","_jsxRuntime","minimumUsersForCombobox","AUTHORS_QUERY","who","per_page","PostAuthorEdit","isSelected","context","postType","postId","queryId","attributes","setAttributes","isDescendentOfQueryLoop","Number","isFinite","authorId","authorDetails","authors","useSelect","select","getEditedEntityRecord","getUser","getUsers","coreStore","_authorId","author","editEntityRecord","useDispatch","textAlign","showAvatar","showBio","byline","isLink","linkTarget","avatarSizes","authorName","name","__","avatar_urls","Object","keys","forEach","size","push","value","label","blockProps","useBlockProps","className","clsx","authorOptions","length","map","id","handleSelect","nextAuthorId","showCombobox","showAuthorControl","jsxs","Fragment","children","jsx","InspectorControls","PanelBody","title","__experimentalVStack","spacing","ComboboxControl","__next40pxDefaultSize","__nextHasNoMarginBottom","options","onChange","allowReset","SelectControl","ToggleControl","checked","avatarSize","BlockControls","group","AlignmentControl","nextAlign","width","src","alt","RichText","isEmpty","identifier","placeholder","href","onClick","event","preventDefault","dangerouslySetInnerHTML","__html","description","_default","exports","default"],"sources":["@wordpress/block-library/src/post-author/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport {\n\tComboboxControl,\n\tPanelBody,\n\tSelectControl,\n\tToggleControl,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\nconst minimumUsersForCombobox = 25;\n\nconst AUTHORS_QUERY = {\n\twho: 'authors',\n\tper_page: 100,\n};\n\nfunction PostAuthorEdit( {\n\tisSelected,\n\tcontext: { postType, postId, queryId },\n\tattributes,\n\tsetAttributes,\n} ) {\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\tconst { authorId, authorDetails, authors } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getUser, getUsers } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst _authorId = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t)?.author;\n\n\t\t\treturn {\n\t\t\t\tauthorId: _authorId,\n\t\t\t\tauthorDetails: _authorId ? getUser( _authorId ) : null,\n\t\t\t\tauthors: getUsers( AUTHORS_QUERY ),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst { textAlign, showAvatar, showBio, byline, isLink, linkTarget } =\n\t\tattributes;\n\tconst avatarSizes = [];\n\tconst authorName = authorDetails?.name || __( 'Post Author' );\n\tif ( authorDetails?.avatar_urls ) {\n\t\tObject.keys( authorDetails.avatar_urls ).forEach( ( size ) => {\n\t\t\tavatarSizes.push( {\n\t\t\t\tvalue: size,\n\t\t\t\tlabel: `${ size } x ${ size }`,\n\t\t\t} );\n\t\t} );\n\t}\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst authorOptions = authors?.length\n\t\t? authors.map( ( { id, name } ) => {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: id,\n\t\t\t\t\tlabel: name,\n\t\t\t\t};\n\t\t } )\n\t\t: [];\n\n\tconst handleSelect = ( nextAuthorId ) => {\n\t\teditEntityRecord( 'postType', postType, postId, {\n\t\t\tauthor: nextAuthorId,\n\t\t} );\n\t};\n\n\tconst showCombobox = authorOptions.length >= minimumUsersForCombobox;\n\tconst showAuthorControl =\n\t\t!! postId && ! isDescendentOfQueryLoop && authorOptions.length > 0;\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\t\tclassName=\"wp-block-post-author__inspector-settings\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showAuthorControl &&\n\t\t\t\t\t\t\t( ( showCombobox && (\n\t\t\t\t\t\t\t\t<ComboboxControl\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Author' ) }\n\t\t\t\t\t\t\t\t\toptions={ authorOptions }\n\t\t\t\t\t\t\t\t\tvalue={ authorId }\n\t\t\t\t\t\t\t\t\tonChange={ handleSelect }\n\t\t\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) || (\n\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Author' ) }\n\t\t\t\t\t\t\t\t\tvalue={ authorId }\n\t\t\t\t\t\t\t\t\toptions={ authorOptions }\n\t\t\t\t\t\t\t\t\tonChange={ handleSelect }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Show avatar' ) }\n\t\t\t\t\t\t\tchecked={ showAvatar }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { showAvatar: ! showAvatar } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ showAvatar && (\n\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Avatar size' ) }\n\t\t\t\t\t\t\t\tvalue={ attributes.avatarSize }\n\t\t\t\t\t\t\t\toptions={ avatarSizes }\n\t\t\t\t\t\t\t\tonChange={ ( size ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tavatarSize: Number( size ),\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\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Show bio' ) }\n\t\t\t\t\t\t\tchecked={ showBio }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { showBio: ! showBio } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Link author name to author page' ) }\n\t\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { isLink: ! isLink } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ isLink && (\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\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\tchecked={ linkTarget === '_blank' }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</VStack>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ showAvatar && authorDetails?.avatar_urls && (\n\t\t\t\t\t<div className=\"wp-block-post-author__avatar\">\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\twidth={ attributes.avatarSize }\n\t\t\t\t\t\t\tsrc={\n\t\t\t\t\t\t\t\tauthorDetails.avatar_urls[\n\t\t\t\t\t\t\t\t\tattributes.avatarSize\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\talt={ authorDetails.name }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<div className=\"wp-block-post-author__content\">\n\t\t\t\t\t{ ( ! RichText.isEmpty( byline ) || isSelected ) && (\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tidentifier=\"byline\"\n\t\t\t\t\t\t\tclassName=\"wp-block-post-author__byline\"\n\t\t\t\t\t\t\taria-label={ __( 'Post author byline text' ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'Write byline…' ) }\n\t\t\t\t\t\t\tvalue={ byline }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { byline: value } )\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<p className=\"wp-block-post-author__name\">\n\t\t\t\t\t\t{ isLink ? (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\"#post-author-pseudo-link\"\n\t\t\t\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ authorName }\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tauthorName\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t{ showBio && (\n\t\t\t\t\t\t<p\n\t\t\t\t\t\t\tclassName=\"wp-block-post-author__bio\"\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t\t__html: authorDetails?.description,\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</div>\n\t\t</>\n\t);\n}\n\nexport default PostAuthorEdit;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,WAAA,GAAAF,OAAA;AAOA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAA0D,IAAAM,WAAA,GAAAN,OAAA;AAxB1D;AACA;AACA;;AAGA;AACA;AACA;;AAmBA,MAAMO,uBAAuB,GAAG,EAAE;AAElC,MAAMC,aAAa,GAAG;EACrBC,GAAG,EAAE,S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A,CACG,CAAC;IAAA,CACF,CAAC;EAAA,CACL,CAAC;AAEL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc7F,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_data","_i18n","_coreData","_jsxRuntime","PostAuthorBiographyEdit","context","postType","postId","attributes","textAlign","setAttributes","authorDetails","useSelect","select","getEditedEntityRecord","getUser","coreStore","_authorId","author","blockProps","useBlockProps","className","clsx","displayAuthorBiography","description","__","jsxs","Fragment","children","jsx","BlockControls","group","AlignmentControl","value","onChange","nextAlign","dangerouslySetInnerHTML","__html","_default","exports","default"],"sources":["@wordpress/block-library/src/post-author-biography/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\nfunction PostAuthorBiographyEdit( {\n\tcontext: { postType, postId },\n\tattributes: { textAlign },\n\tsetAttributes,\n} ) {\n\tconst { authorDetails } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getUser } = select( coreStore );\n\t\t\tconst _authorId = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t)?.author;\n\n\t\t\treturn {\n\t\t\t\tauthorDetails: _authorId ? getUser( _authorId ) : null,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst displayAuthorBiography =\n\t\tauthorDetails?.description || __( 'Author Biography' );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<div\n\t\t\t\t{ ...blockProps }\n\t\t\t\tdangerouslySetInnerHTML={ { __html: displayAuthorBiography } }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default PostAuthorBiographyEdit;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAA0D,IAAAK,WAAA,GAAAL,OAAA;AAf1D;AACA;AACA;;AAGA;AACA;AACA;;AAUA,SAASM,uBAAuBA,CAAE;EACjCC,OAAO,EAAE;IAAEC,QAAQ;IAAEC;EAAO,CAAC;EAC7BC,UAAU,EAAE;IAAEC;EAAU,CAAC;EACzBC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,eAAS,EAChCC,MAAM,IAAM;IACb,MAAM;MAAEC,qBAAqB;MAAEC;IAAQ,CAAC,GAAGF,MAAM,CAAEG,eAAU,CAAC;IAC9D,MAAMC,SAAS,GAAGH,qBAAqB,CACtC,UAAU,EACVR,QAAQ,EACRC,MACD,CAAC,EAAEW,MAAM;IAET,OAAO;MACNP,aAAa,EAAEM,SAAS,GAAGF,OAAO,CAAEE,SAAU,CAAC,GAAG;IACnD,CAAC;EACF,CAAC,EACD,CAAEX,QAAQ,EAAEC,MAAM,CACnB,CAAC;EAED,MAAMY,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,CAAG,kBAAkBb,SAAW,EAAC,GAAIA;IACtC,CAAE;EACH,CAAE,CAAC;EAEH,MAAMc,sBAAsB,GAC3BZ,aAAa,EAAEa,WAAW,IAAI,IAAAC,QAAE,EAAE,kBAAmB,CAAC;EAEvD,oBACC,IAAAtB,WAAA,CAAAuB,IAAA,EAAAvB,WAAA,CAAAwB,QAAA;IAAAC,QAAA,gBACC,IAAAzB,WAAA,CAAA0B,GAAA,EAAC9B,YAAA,CAAA+B,aAAa;MAACC,KAAK,EAAC,OAAO;MAAAH,QAAA,eAC3B,IAAAzB,WAAA,CAAA0B,GAAA,EAAC9B,YAAA,CAAAiC,gBAAgB;QAChBC,KAAK,EAAGxB,SAAW;QACnByB,QAAQ,EAAKC,SAAS,IAAM;UAC3BzB,aAAa,CAAE;YAAED,SAAS,EAAE0B;UAAU,CAAE,CAAC;QAC1C;MAAG,CACH;IAAC,CACY,CAAC,eAChB,IAAAhC,WAAA,CAAA0B,GAAA;MAAA,GACMV,UAAU;MACfiB,uBAAuB,EAAG;QAAEC,MAAM,EAAEd;MAAuB;IAAG,CAC9D,CAAC;EAAA,CACD,CAAC;AAEL;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcpC,uBAAuB","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_data","_i18n","_coreData","_jsxRuntime","PostAuthorBiographyEdit","context","postType","postId","attributes","textAlign","setAttributes","authorDetails","useSelect","select","getEditedEntityRecord","getUser","coreStore","_authorId","author","blockProps","useBlockProps","className","clsx","displayAuthorBiography","description","__","jsxs","Fragment","children","jsx","BlockControls","group","AlignmentControl","value","onChange","nextAlign","dangerouslySetInnerHTML","__html","_default","exports","default"],"sources":["@wordpress/block-library/src/post-author-biography/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\nfunction PostAuthorBiographyEdit( {\n\tcontext: { postType, postId },\n\tattributes: { textAlign },\n\tsetAttributes,\n} ) {\n\tconst { authorDetails } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getUser } = select( coreStore );\n\t\t\tconst _authorId = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t)?.author;\n\n\t\t\treturn {\n\t\t\t\tauthorDetails: _authorId ? getUser( _authorId ) : null,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst displayAuthorBiography =\n\t\tauthorDetails?.description || __( 'Author Biography' );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<div\n\t\t\t\t{ ...blockProps }\n\t\t\t\tdangerouslySetInnerHTML={ { __html: displayAuthorBiography } }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default PostAuthorBiographyEdit;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAA0D,IAAAK,WAAA,GAAAL,OAAA;AAf1D;AACA;AACA;;AAGA;AACA;AACA;;AAUA,SAASM,uBAAuBA,CAAE;EACjCC,OAAO,EAAE;IAAEC,Q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AC9D,CAAC;EAAA,CACD,CAAC;AAEL;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcpC,uBAAuB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_data","_i18n","_coreData","_components","_jsxRuntime","PostAuthorNameEdit","context","postType","postId","attributes","textAlign","isLink","linkTarget","setAttributes","authorName","useSelect","select","getEditedEntityRecord","getUser","coreStore","_authorId","author","blockProps","useBlockProps","className","clsx","displayName","name","__","displayAuthor","jsx","href","onClick","event","preventDefault","children","jsxs","Fragment","BlockControls","group","AlignmentControl","value","onChange","nextAlign","InspectorControls","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","label","checked","_default","exports","default"],"sources":["@wordpress/block-library/src/post-author-name/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\n\nfunction PostAuthorNameEdit( {\n\tcontext: { postType, postId },\n\tattributes: { textAlign, isLink, linkTarget },\n\tsetAttributes,\n} ) {\n\tconst { authorName } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getUser } = select( coreStore );\n\t\t\tconst _authorId = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t)?.author;\n\n\t\t\treturn {\n\t\t\t\tauthorName: _authorId ? getUser( _authorId ) : null,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst displayName = authorName?.name || __( 'Author Name' );\n\n\tconst displayAuthor = isLink ? (\n\t\t<a\n\t\t\thref=\"#author-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\tclassName=\"wp-block-post-author-name__link\"\n\t\t>\n\t\t\t{ displayName }\n\t\t</a>\n\t) : (\n\t\tdisplayName\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Link to author archive' ) }\n\t\t\t\t\t\tonChange={ () => setAttributes( { isLink: ! isLink } ) }\n\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t/>\n\t\t\t\t\t{ isLink && (\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...blockProps }> { displayAuthor } </div>\n\t\t</>\n\t);\n}\n\nexport default PostAuthorNameEdit;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA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ACM,CAAC,eACpB,IAAAR,WAAA,CAAAgC,IAAA;MAAA,GAAUd,UAAU;MAAAa,QAAA,GAAG,GAAC,EAAEN,aAAa,EAAE,GAAC;IAAA,CAAK,CAAC;EAAA,CAC/C,CAAC;AAEL;AAAC,IAAAsB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEchD,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_data","_i18n","_coreData","_components","_jsxRuntime","PostAuthorNameEdit","context","postType","postId","attributes","textAlign","isLink","linkTarget","setAttributes","authorName","useSelect","select","getEditedEntityRecord","getUser","coreStore","_authorId","author","blockProps","useBlockProps","className","clsx","displayName","name","__","displayAuthor","jsx","href","onClick","event","preventDefault","children","jsxs","Fragment","BlockControls","group","AlignmentControl","value","onChange","nextAlign","InspectorControls","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","label","checked","_default","exports","default"],"sources":["@wordpress/block-library/src/post-author-name/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\n\nfunction PostAuthorNameEdit( {\n\tcontext: { postType, postId },\n\tattributes: { textAlign, isLink, linkTarget },\n\tsetAttributes,\n} ) {\n\tconst { authorName } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getUser } = select( coreStore );\n\t\t\tconst _authorId = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t)?.author;\n\n\t\t\treturn {\n\t\t\t\tauthorName: _authorId ? getUser( _authorId ) : null,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst displayName = authorName?.name || __( 'Author Name' );\n\n\tconst displayAuthor = isLink ? (\n\t\t<a\n\t\t\thref=\"#author-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\tclassName=\"wp-block-post-author-name__link\"\n\t\t>\n\t\t\t{ displayName }\n\t\t</a>\n\t) : (\n\t\tdisplayName\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Link to author archive' ) }\n\t\t\t\t\t\tonChange={ () => setAttributes( { isLink: ! isLink } ) }\n\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t/>\n\t\t\t\t\t{ isLink && (\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...blockProps }> { displayAuthor } </div>\n\t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AAK,GAAG,QAAQ,GAAG;UAChC,CAAE,CACF;UACDS,OAAO,EAAGtC,UAAU,KAAK;QAAU,CACnC,CACD;MAAA,CACS;IAAC,CACM,CAAC,eACpB,IAAAR,WAAA,CAAAgC,IAAA;MAAA,GAAUd,UAAU;MAAAa,QAAA,GAAG,GAAC,EAAEN,aAAa,EAAE,GAAC;IAAA,CAAK,CAAC;EAAA,CAC/C,CAAC;AAEL;AAAC,IAAAsB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEchD,kBAAkB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_element","_apiFetch","_url","_i18n","_jsxRuntime","PostCommentsCountEdit","attributes","context","setAttributes","textAlign","postId","commentsCount","setCommentsCount","useState","blockProps","useBlockProps","className","clsx","useEffect","currentPostId","apiFetch","path","addQueryArgs","post","parse","then","res","headers","get","hasPostAndComments","undefined","blockStyles","style","textDecoration","jsxs","Fragment","children","jsx","BlockControls","group","AlignmentControl","value","onChange","nextAlign","Warning","__"],"sources":["@wordpress/block-library/src/post-comments-count/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tWarning,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { useState, useEffect } from '@wordpress/element';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport { __ } from '@wordpress/i18n';\n\nexport default function PostCommentsCountEdit( {\n\tattributes,\n\tcontext,\n\tsetAttributes,\n} ) {\n\tconst { textAlign } = attributes;\n\tconst { postId } = context;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( ! postId ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t} ),\n\t\t\tparse: false,\n\t\t} ).then( ( res ) => {\n\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\tif ( currentPostId === postId ) {\n\t\t\t\tsetCommentsCount( res.headers.get( 'X-WP-Total' ) );\n\t\t\t}\n\t\t} );\n\t}, [ postId ] );\n\n\tconst hasPostAndComments = postId && commentsCount !== undefined;\n\tconst blockStyles = {\n\t\t...blockProps.style,\n\t\ttextDecoration: hasPostAndComments\n\t\t\t? blockProps.style?.textDecoration\n\t\t\t: undefined,\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<div { ...blockProps } style={ blockStyles }>\n\t\t\t\t{ hasPostAndComments ? (\n\t\t\t\t\tcommentsCount\n\t\t\t\t) : (\n\t\t\t\t\t<Warning>\n\t\t\t\t\t\t{ __( 'Post Comments Count block: post not found.' ) }\n\t\t\t\t\t</Warning>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAAqC,IAAAM,WAAA,GAAAN,OAAA;AAjBrC;AACA;AACA;;AAGA;AACA;AACA;;AAYe,SAASO,qBAAqBA,CAAE;EAC9CC,UAA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A,eAC3B,IAAAhC,WAAA,CAAAiC,GAAA,EAACtC,YAAA,CAAAyC,gBAAgB;QAChBC,KAAK,EAAGhC,SAAW;QACnBiC,QAAQ,EAAKC,SAAS,IAAM;UAC3BnC,aAAa,CAAE;YAAEC,SAAS,EAAEkC;UAAU,CAAE,CAAC;QAC1C;MAAG,CACH;IAAC,CACY,CAAC,eAChB,IAAAvC,WAAA,CAAAiC,GAAA;MAAA,GAAUvB,UAAU;MAAGkB,KAAK,EAAGD,WAAa;MAAAK,QAAA,EACzCP,kBAAkB,GACnBlB,aAAa,gBAEb,IAAAP,WAAA,CAAAiC,GAAA,EAACtC,YAAA,CAAA6C,OAAO;QAAAR,QAAA,EACL,IAAAS,QAAE,EAAE,4CAA6C;MAAC,CAC5C;IACT,CACG,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_element","_apiFetch","_url","_i18n","_jsxRuntime","PostCommentsCountEdit","attributes","context","setAttributes","textAlign","postId","commentsCount","setCommentsCount","useState","blockProps","useBlockProps","className","clsx","useEffect","currentPostId","apiFetch","path","addQueryArgs","post","parse","then","res","headers","get","hasPostAndComments","undefined","blockStyles","style","textDecoration","jsxs","Fragment","children","jsx","BlockControls","group","AlignmentControl","value","onChange","nextAlign","Warning","__"],"sources":["@wordpress/block-library/src/post-comments-count/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tWarning,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { useState, useEffect } from '@wordpress/element';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport { __ } from '@wordpress/i18n';\n\nexport default function PostCommentsCountEdit( {\n\tattributes,\n\tcontext,\n\tsetAttributes,\n} ) {\n\tconst { textAlign } = attributes;\n\tconst { postId } = context;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( ! postId ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t} ),\n\t\t\tparse: false,\n\t\t} ).then( ( res ) => {\n\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\tif ( currentPostId === postId ) {\n\t\t\t\tsetCommentsCount( res.headers.get( 'X-WP-Total' ) );\n\t\t\t}\n\t\t} );\n\t}, [ postId ] );\n\n\tconst hasPostAndComments = postId && commentsCount !== undefined;\n\tconst blockStyles = {\n\t\t...blockProps.style,\n\t\ttextDecoration: hasPostAndComments\n\t\t\t? blockProps.style?.textDecoration\n\t\t\t: undefined,\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<div { ...blockProps } style={ blockStyles }>\n\t\t\t\t{ hasPostAndComments ? (\n\t\t\t\t\tcommentsCount\n\t\t\t\t) : (\n\t\t\t\t\t<Warning>\n\t\t\t\t\t\t{ __( 'Post Comments Count block: post not found.' ) }\n\t\t\t\t\t</Warning>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAJ,sBAAA,CAAAC,OAAA;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BACC,IAAA1B,WAAA,CAAA8B,IAAA,EAAA9B,WAAA,CAAA+B,QAAA;IAAAC,QAAA,gBACC,IAAAhC,WAAA,CAAAiC,GAAA,EAACtC,YAAA,CAAAuC,aAAa;MAACC,KAAK,EAAC,OAAO;MAAAH,QAAA,eAC3B,IAAAhC,WAAA,CAAAiC,GAAA,EAACtC,YAAA,CAAAyC,gBAAgB;QAChBC,KAAK,EAAGhC,SAAW;QACnBiC,QAAQ,EAAKC,SAAS,IAAM;UAC3BnC,aAAa,CAAE;YAAEC,SAAS,EAAEkC;UAAU,CAAE,CAAC;QAC1C;MAAG,CACH;IAAC,CACY,CAAC,eAChB,IAAAvC,WAAA,CAAAiC,GAAA;MAAA,GAAUvB,UAAU;MAAGkB,KAAK,EAAGD,WAAa;MAAAK,QAAA,EACzCP,kBAAkB,GACnBlB,aAAa,gBAEb,IAAAP,WAAA,CAAAiC,GAAA,EAACtC,YAAA,CAAA6C,OAAO;QAAAR,QAAA,EACL,IAAAS,QAAE,EAAE,4CAA6C;MAAC,CAC5C;IACT,CACG,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_compose","_i18n","_form","_jsxRuntime","PostCommentsFormEdit","attributes","context","setAttributes","textAlign","postId","postType","instanceId","useInstanceId","instanceIdDesc","sprintf","blockProps","useBlockProps","className","clsx","jsxs","Fragment","children","jsx","BlockControls","group","AlignmentControl","value","onChange","nextAlign","default","VisuallyHidden","id","__"],"sources":["@wordpress/block-library/src/post-comments-form/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { VisuallyHidden } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport CommentsForm from './form';\n\nexport default function PostCommentsFormEdit( {\n\tattributes,\n\tcontext,\n\tsetAttributes,\n} ) {\n\tconst { textAlign } = attributes;\n\tconst { postId, postType } = context;\n\n\tconst instanceId = useInstanceId( PostCommentsFormEdit );\n\tconst instanceIdDesc = sprintf( 'comments-form-edit-%d-desc', instanceId );\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t\t'aria-describedby': instanceIdDesc,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<CommentsForm postId={ postId } postType={ postType } />\n\t\t\t\t<VisuallyHidden id={ instanceIdDesc }>\n\t\t\t\t\t{ __( 'Comments form disabled in editor.' ) }\n\t\t\t\t</VisuallyHidden>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,KAAA,GAAAN,sBAAA,CAAAC,OAAA;AAAkC,IAAAM,WAAA,GAAAN,OAAA;AApBlC;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;AAGe,SAASO,oBAAoBA,CAAE;EAC7CC,UAAU;EACVC,OAAO;EACPC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAU,CAAC,GAAGH,UAAU;EAChC,MAAM;IAAEI,MAAM;IAAEC;EAAS,CAAC,GAAGJ,OAAO;EAEpC,MAAMK,UAAU,GAAG,IAAAC,sBAAa,EAAER,oBAAqB,CAAC;EACxD,MAAMS,cAAc,GAAG,IAAAC,aAAO,EAAE,4BAA4B,EAAEH,UAAW,CAAC;EAE1E,MAAMI,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,CAAG,kBAAkBV,SAAW,EAAC,GAAIA;IACtC,CAAE,CAAC;IACH,kBAAkB,EAAEK;EACrB,CAAE,CAAC;EAEH,oBACC,IAAAV,WAAA,CAAAgB,IAAA,EAAAhB,WAAA,CAAAiB,QAAA;IAAAC,QAAA,gBACC,IAAAlB,WAAA,CAAAmB,GAAA,EAACxB,YAAA,CAAAyB,aAAa;MAACC,KAAK,EAAC,OAAO;MAAAH,QAAA,eAC3B,IAAAlB,WAAA,CAAAmB,GAAA,EAACxB,YAAA,CAAA2B,gBAAgB;QAChBC,KAAK,EAAGlB,SAAW;QACnBmB,QAAQ,EAAKC,SAAS,IAAM;UAC3BrB,aAAa,CAAE;YAAEC,SAAS,EAAEoB;UAAU,CAAE,CAAC;QAC1C;MAAG,CACH;IAAC,CACY,CAAC,eAChB,IAAAzB,WAAA,CAAAgB,IAAA;MAAA,GAAUJ,UAAU;MAAAM,QAAA,gBACnB,IAAAlB,WAAA,CAAAmB,GAAA,EAACpB,KAAA,CAAA2B,OAAY;QAACpB,MAAM,EAAGA,MAAQ;QAACC,QAAQ,EAAGA;MAAU,CAAE,CAAC,eACxD,IAAAP,WAAA,CAAAmB,GAAA,EAACvB,WAAA,CAAA+B,cAAc;QAACC,EAAE,EAAGlB,cAAgB;QAAAQ,QAAA,EAClC,IAAAW,QAAE,EAAE,mCAAoC;MAAC,CAC5B,CAAC;IAAA,CACb,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_compose","_i18n","_form","_jsxRuntime","PostCommentsFormEdit","attributes","context","setAttributes","textAlign","postId","postType","instanceId","useInstanceId","instanceIdDesc","sprintf","blockProps","useBlockProps","className","clsx","jsxs","Fragment","children","jsx","BlockControls","group","AlignmentControl","value","onChange","nextAlign","default","VisuallyHidden","id","__"],"sources":["@wordpress/block-library/src/post-comments-form/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { VisuallyHidden } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport CommentsForm from './form';\n\nexport default function PostCommentsFormEdit( {\n\tattributes,\n\tcontext,\n\tsetAttributes,\n} ) {\n\tconst { textAlign } = attributes;\n\tconst { postId, postType } = context;\n\n\tconst instanceId = useInstanceId( PostCommentsFormEdit );\n\tconst instanceIdDesc = sprintf( 'comments-form-edit-%d-desc', instanceId );\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t\t'aria-describedby': instanceIdDesc,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<CommentsForm postId={ postId } postType={ postType } />\n\t\t\t\t<VisuallyHidden id={ instanceIdDesc }>\n\t\t\t\t\t{ __( 'Comments form disabled in editor.' ) }\n\t\t\t\t</VisuallyHidden>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAA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A,GAAUJ,UAAU;MAAAM,QAAA,gBACnB,IAAAlB,WAAA,CAAAmB,GAAA,EAACpB,KAAA,CAAA2B,OAAY;QAACpB,MAAM,EAAGA,MAAQ;QAACC,QAAQ,EAAGA;MAAU,CAAE,CAAC,eACxD,IAAAP,WAAA,CAAAmB,GAAA,EAACvB,WAAA,CAAA+B,cAAc;QAACC,EAAE,EAAGlB,cAAgB;QAAAQ,QAAA,EAClC,IAAAW,QAAE,EAAE,mCAAoC;MAAC,CAC5B,CAAC;IAAA,CACb,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
@@ -81,7 +81,7 @@ const CommentsForm = ({
81
81
  });
82
82
  } else if (!postTypeSupportsComments) {
83
83
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.Warning, {
84
- children: (0, _i18n.sprintf)( /* translators: 1: Post type (i.e. "post", "page") */
84
+ children: (0, _i18n.sprintf)(/* translators: 1: Post type (i.e. "post", "page") */
85
85
  (0, _i18n.__)('Post Comments Form block: Comments are not enabled for this post type (%s).'), postType)
86
86
  });
87
87
  } else if ('open' !== defaultCommentStatus) {
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_blockEditor","_components","_compose","_coreData","_data","_jsxRuntime","CommentsFormPlaceholder","instanceId","useInstanceId","jsxs","className","children","jsx","__","noValidate","onSubmit","event","preventDefault","htmlFor","id","name","cols","rows","readOnly","type","clsx","__experimentalGetElementClassName","label","value","CommentsForm","postId","postType","commentStatus","setCommentStatus","useEntityProp","isSiteEditor","undefined","defaultCommentStatus","useSelect","select","blockEditorStore","getSettings","__experimentalDiscussionSettings","postTypeSupportsComments","coreStore","getPostType","supports","comments","actions","Button","__next40pxDefaultSize","onClick","variant","_x","Warning","sprintf","_default","exports","default"],"sources":["@wordpress/block-library/src/post-comments-form/form.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tWarning,\n\tstore as blockEditorStore,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nconst CommentsFormPlaceholder = () => {\n\tconst instanceId = useInstanceId( CommentsFormPlaceholder );\n\n\treturn (\n\t\t<div className=\"comment-respond\">\n\t\t\t<h3 className=\"comment-reply-title\">{ __( 'Leave a Reply' ) }</h3>\n\t\t\t<form\n\t\t\t\tnoValidate\n\t\t\t\tclassName=\"comment-form\"\n\t\t\t\tonSubmit={ ( event ) => event.preventDefault() }\n\t\t\t>\n\t\t\t\t<p>\n\t\t\t\t\t<label htmlFor={ `comment-${ instanceId }` }>\n\t\t\t\t\t\t{ __( 'Comment' ) }\n\t\t\t\t\t</label>\n\t\t\t\t\t<textarea\n\t\t\t\t\t\tid={ `comment-${ instanceId }` }\n\t\t\t\t\t\tname=\"comment\"\n\t\t\t\t\t\tcols=\"45\"\n\t\t\t\t\t\trows=\"8\"\n\t\t\t\t\t\treadOnly\n\t\t\t\t\t/>\n\t\t\t\t</p>\n\t\t\t\t<p className=\"form-submit wp-block-button\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tname=\"submit\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'wp-block-button__link',\n\t\t\t\t\t\t\t__experimentalGetElementClassName( 'button' )\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tlabel={ __( 'Post Comment' ) }\n\t\t\t\t\t\tvalue={ __( 'Post Comment' ) }\n\t\t\t\t\t\taria-disabled=\"true\"\n\t\t\t\t\t/>\n\t\t\t\t</p>\n\t\t\t</form>\n\t\t</div>\n\t);\n};\n\nconst CommentsForm = ( { postId, postType } ) => {\n\tconst [ commentStatus, setCommentStatus ] = useEntityProp(\n\t\t'postType',\n\t\tpostType,\n\t\t'comment_status',\n\t\tpostId\n\t);\n\n\tconst isSiteEditor = postType === undefined || postId === undefined;\n\n\tconst { defaultCommentStatus } = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getSettings()\n\t\t\t\t.__experimentalDiscussionSettings\n\t);\n\n\tconst postTypeSupportsComments = useSelect( ( select ) =>\n\t\tpostType\n\t\t\t? !! select( coreStore ).getPostType( postType )?.supports.comments\n\t\t\t: false\n\t);\n\n\tif ( ! isSiteEditor && 'open' !== commentStatus ) {\n\t\tif ( 'closed' === commentStatus ) {\n\t\t\tconst actions = [\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tkey=\"enableComments\"\n\t\t\t\t\tonClick={ () => setCommentStatus( 'open' ) }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t>\n\t\t\t\t\t{ _x(\n\t\t\t\t\t\t'Enable comments',\n\t\t\t\t\t\t'action that affects the current post'\n\t\t\t\t\t) }\n\t\t\t\t</Button>,\n\t\t\t];\n\t\t\treturn (\n\t\t\t\t<Warning actions={ actions }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Post Comments Form block: Comments are not enabled for this item.'\n\t\t\t\t\t) }\n\t\t\t\t</Warning>\n\t\t\t);\n\t\t} else if ( ! postTypeSupportsComments ) {\n\t\t\treturn (\n\t\t\t\t<Warning>\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: 1: Post type (i.e. \"post\", \"page\") */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Post Comments Form block: Comments are not enabled for this post type (%s).'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpostType\n\t\t\t\t\t) }\n\t\t\t\t</Warning>\n\t\t\t);\n\t\t} else if ( 'open' !== defaultCommentStatus ) {\n\t\t\treturn (\n\t\t\t\t<Warning>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Post Comments Form block: Comments are not enabled.'\n\t\t\t\t\t) }\n\t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QACNC,qBAAqB;QAErBC,OAAO,EAAGA,CAAA,KAAMlB,gBAAgB,CAAE,MAAO,CAAG;QAC5CmB,OAAO,EAAC,SAAS;QAAAzC,QAAA,EAEf,IAAA0C,QAAE,EACH,iBAAiB,EACjB,sCACD;MAAC,GAPG,gBAQG,CAAC,CACT;MACD,oBACC,IAAAhD,WAAA,CAAAO,GAAA,EAACZ,YAAA,CAAAsD,OAAO;QAACN,OAAO,EAAGA,OAAS;QAAArC,QAAA,EACzB,IAAAE,QAAE,EACH,mEACD;MAAC,CACO,CAAC;IAEZ,CAAC,MAAM,IAAK,CAAE8B,wBAAwB,EAAG;MACxC,oBACC,IAAAtC,WAAA,CAAAO,GAAA,EAACZ,YAAA,CAAAsD,OAAO;QAAA3C,QAAA,EACL,IAAA4C,aAAO,GACR;QACA,IAAA1C,QAAE,EACD,6EACD,CAAC,EACDkB,QACD;MAAC,CACO,CAAC;IAEZ,CAAC,MAAM,IAAK,MAAM,KAAKM,oBAAoB,EAAG;MAC7C,oBACC,IAAAhC,WAAA,CAAAO,GAAA,EAACZ,YAAA,CAAAsD,OAAO;QAAA3C,QAAA,EACL,IAAAE,QAAE,EACH,qDACD;MAAC,CACO,CAAC;IAEZ;EACD;EAEA,oBAAO,IAAAR,WAAA,CAAAO,GAAA,EAACN,uBAAuB,IAAE,CAAC;AACnC,CAAC;AAAC,IAAAkD,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa7B,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_blockEditor","_components","_compose","_coreData","_data","_jsxRuntime","CommentsFormPlaceholder","instanceId","useInstanceId","jsxs","className","children","jsx","__","noValidate","onSubmit","event","preventDefault","htmlFor","id","name","cols","rows","readOnly","type","clsx","__experimentalGetElementClassName","label","value","CommentsForm","postId","postType","commentStatus","setCommentStatus","useEntityProp","isSiteEditor","undefined","defaultCommentStatus","useSelect","select","blockEditorStore","getSettings","__experimentalDiscussionSettings","postTypeSupportsComments","coreStore","getPostType","supports","comments","actions","Button","__next40pxDefaultSize","onClick","variant","_x","Warning","sprintf","_default","exports","default"],"sources":["@wordpress/block-library/src/post-comments-form/form.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tWarning,\n\tstore as blockEditorStore,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nconst CommentsFormPlaceholder = () => {\n\tconst instanceId = useInstanceId( CommentsFormPlaceholder );\n\n\treturn (\n\t\t<div className=\"comment-respond\">\n\t\t\t<h3 className=\"comment-reply-title\">{ __( 'Leave a Reply' ) }</h3>\n\t\t\t<form\n\t\t\t\tnoValidate\n\t\t\t\tclassName=\"comment-form\"\n\t\t\t\tonSubmit={ ( event ) => event.preventDefault() }\n\t\t\t>\n\t\t\t\t<p>\n\t\t\t\t\t<label htmlFor={ `comment-${ instanceId }` }>\n\t\t\t\t\t\t{ __( 'Comment' ) }\n\t\t\t\t\t</label>\n\t\t\t\t\t<textarea\n\t\t\t\t\t\tid={ `comment-${ instanceId }` }\n\t\t\t\t\t\tname=\"comment\"\n\t\t\t\t\t\tcols=\"45\"\n\t\t\t\t\t\trows=\"8\"\n\t\t\t\t\t\treadOnly\n\t\t\t\t\t/>\n\t\t\t\t</p>\n\t\t\t\t<p className=\"form-submit wp-block-button\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tname=\"submit\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'wp-block-button__link',\n\t\t\t\t\t\t\t__experimentalGetElementClassName( 'button' )\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tlabel={ __( 'Post Comment' ) }\n\t\t\t\t\t\tvalue={ __( 'Post Comment' ) }\n\t\t\t\t\t\taria-disabled=\"true\"\n\t\t\t\t\t/>\n\t\t\t\t</p>\n\t\t\t</form>\n\t\t</div>\n\t);\n};\n\nconst CommentsForm = ( { postId, postType } ) => {\n\tconst [ commentStatus, setCommentStatus ] = useEntityProp(\n\t\t'postType',\n\t\tpostType,\n\t\t'comment_status',\n\t\tpostId\n\t);\n\n\tconst isSiteEditor = postType === undefined || postId === undefined;\n\n\tconst { defaultCommentStatus } = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getSettings()\n\t\t\t\t.__experimentalDiscussionSettings\n\t);\n\n\tconst postTypeSupportsComments = useSelect( ( select ) =>\n\t\tpostType\n\t\t\t? !! select( coreStore ).getPostType( postType )?.supports.comments\n\t\t\t: false\n\t);\n\n\tif ( ! isSiteEditor && 'open' !== commentStatus ) {\n\t\tif ( 'closed' === commentStatus ) {\n\t\t\tconst actions = [\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tkey=\"enableComments\"\n\t\t\t\t\tonClick={ () => setCommentStatus( 'open' ) }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t>\n\t\t\t\t\t{ _x(\n\t\t\t\t\t\t'Enable comments',\n\t\t\t\t\t\t'action that affects the current post'\n\t\t\t\t\t) }\n\t\t\t\t</Button>,\n\t\t\t];\n\t\t\treturn (\n\t\t\t\t<Warning actions={ actions }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Post Comments Form block: Comments are not enabled for this item.'\n\t\t\t\t\t) }\n\t\t\t\t</Warning>\n\t\t\t);\n\t\t} else if ( ! postTypeSupportsComments ) {\n\t\t\treturn (\n\t\t\t\t<Warning>\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: 1: Post type (i.e. \"post\", \"page\") */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Post Comments Form block: Comments are not enabled for this post type (%s).'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpostType\n\t\t\t\t\t) }\n\t\t\t\t</Warning>\n\t\t\t);\n\t\t} else if ( 'open' !== defaultCommentStatus ) {\n\t\t\treturn (\n\t\t\t\t<Warning>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Post Comments Form block: Comments are not enabled.'\n\t\t\t\t\t) }\n\t\t\t\t</Warning>\n\t\t\t);\n\t\t}\n\t}\n\n\treturn <CommentsFormPlaceholder />;\n};\n\nexport default CommentsForm;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AAA4C,IAAAO,WAAA,GAAAP,OAAA;AAjB5C;AACA;AACA;;AAGA;AACA;AACA;;AAYA,MAAMQ,uBAAuB,GAAGA,CAAA,KAAM;EACrC,MAAMC,UAAU,GAAG,IAAAC,sBAAa,EAAEF,uBAAwB,CAAC;EAE3D,oBACC,IAAAD,WAAA,CAAAI,IAAA;IAAKC,SAAS,EAAC,iBAAiB;IAAAC,QAAA,gBAC/B,IAAAN,WAAA,CAAAO,GAAA;MAAIF,SAAS,EAAC,qBAAqB;MAAAC,QAAA,EAAG,IAAAE,QAAE,EAAE,eAAgB;IAAC,CAAM,CAAC,eAClE,IAAAR,WAAA,CAAAI,IAAA;MACCK,UAAU;MACVJ,SAAS,EAAC,cAAc;MACxBK,QAAQ,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;MAAAN,QAAA,gBAEhD,IAAAN,WAAA,CAAAI,IAAA;QAAAE,QAAA,gBACC,IAAAN,WAAA,CAAAO,GAAA;UAAOM,OAAO,EAAG,WAAYX,UAAU,EAAK;UAAAI,QAAA,EACzC,IAAAE,QAAE,EAAE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AQ,GACjE,KACJ,CAAC;EAED,IAAK,CAAEZ,YAAY,IAAI,MAAM,KAAKH,aAAa,EAAG;IACjD,IAAK,QAAQ,KAAKA,aAAa,EAAG;MACjC,MAAMgB,OAAO,GAAG,cACf,IAAA3C,WAAA,CAAAO,GAAA,EAACX,WAAA,CAAAgD,MAAM;QACNC,qBAAqB;QAErBC,OAAO,EAAGA,CAAA,KAAMlB,gBAAgB,CAAE,MAAO,CAAG;QAC5CmB,OAAO,EAAC,SAAS;QAAAzC,QAAA,EAEf,IAAA0C,QAAE,EACH,iBAAiB,EACjB,sCACD;MAAC,GAPG,gBAQG,CAAC,CACT;MACD,oBACC,IAAAhD,WAAA,CAAAO,GAAA,EAACZ,YAAA,CAAAsD,OAAO;QAACN,OAAO,EAAGA,OAAS;QAAArC,QAAA,EACzB,IAAAE,QAAE,EACH,mEACD;MAAC,CACO,CAAC;IAEZ,CAAC,MAAM,IAAK,CAAE8B,wBAAwB,EAAG;MACxC,oBACC,IAAAtC,WAAA,CAAAO,GAAA,EAACZ,YAAA,CAAAsD,OAAO;QAAA3C,QAAA,EACL,IAAA4C,aAAO,EACR;QACA,IAAA1C,QAAE,EACD,6EACD,CAAC,EACDkB,QACD;MAAC,CACO,CAAC;IAEZ,CAAC,MAAM,IAAK,MAAM,KAAKM,oBAAoB,EAAG;MAC7C,oBACC,IAAAhC,WAAA,CAAAO,GAAA,EAACZ,YAAA,CAAAsD,OAAO;QAAA3C,QAAA,EACL,IAAAE,QAAE,EACH,qDACD;MAAC,CACO,CAAC;IAEZ;EACD;EAEA,oBAAO,IAAAR,WAAA,CAAAO,GAAA,EAACN,uBAAuB,IAAE,CAAC;AACnC,CAAC;AAAC,IAAAkD,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa7B,YAAY","ignoreList":[]}
@@ -70,7 +70,7 @@ function PostCommentsLinkEdit({
70
70
  if (commentsNumber === 0) {
71
71
  commentsText = (0, _i18n.__)('No comments');
72
72
  } else {
73
- commentsText = (0, _i18n.sprintf)( /* translators: %s: Number of comments */
73
+ commentsText = (0, _i18n.sprintf)(/* translators: %s: Number of comments */
74
74
  (0, _i18n._n)('%s comment', '%s comments', commentsNumber), commentsNumber.toLocaleString());
75
75
  }
76
76
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_element","_data","_apiFetch","_url","_i18n","_coreData","_jsxRuntime","PostCommentsLinkEdit","context","attributes","setAttributes","textAlign","postType","postId","commentsCount","setCommentsCount","useState","blockProps","useBlockProps","className","clsx","useEffect","currentPostId","apiFetch","path","addQueryArgs","post","parse","then","res","headers","get","useSelect","select","coreStore","getEditedEntityRecord","link","commentsText","undefined","commentsNumber","parseInt","__","sprintf","_n","toLocaleString","jsxs","Fragment","children","jsx","BlockControls","group","AlignmentControl","value","onChange","nextAlign","href","onClick","event","preventDefault","Warning","_default","exports","default"],"sources":["@wordpress/block-library/src/post-comments-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tWarning,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\nfunction PostCommentsLinkEdit( { context, attributes, setAttributes } ) {\n\tconst { textAlign } = attributes;\n\tconst { postType, postId } = context;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( ! postId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t} ),\n\t\t\tparse: false,\n\t\t} ).then( ( res ) => {\n\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\tif ( currentPostId === postId ) {\n\t\t\t\tsetCommentsCount( res.headers.get( 'X-WP-Total' ) );\n\t\t\t}\n\t\t} );\n\t}, [ postId ] );\n\n\tconst post = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t),\n\t\t[ postType, postId ]\n\t);\n\n\tif ( ! post ) {\n\t\treturn null;\n\t}\n\n\tconst { link } = post;\n\n\tlet commentsText;\n\tif ( commentsCount !== undefined ) {\n\t\tconst commentsNumber = parseInt( commentsCount );\n\n\t\tif ( commentsNumber === 0 ) {\n\t\t\tcommentsText = __( 'No comments' );\n\t\t} else {\n\t\t\tcommentsText = sprintf(\n\t\t\t\t/* translators: %s: Number of comments */\n\t\t\t\t_n( '%s comment', '%s comments', commentsNumber ),\n\t\t\t\tcommentsNumber.toLocaleString()\n\t\t\t);\n\t\t}\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ link && commentsText !== undefined ? (\n\t\t\t\t\t<a\n\t\t\t\t\t\thref={ link + '#comments' }\n\t\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ commentsText }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\t<Warning>\n\t\t\t\t\t\t{ __( 'Post Comments Link block: post not found.' ) }\n\t\t\t\t\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B,UAAU;MAAA8B,QAAA,EACjBX,IAAI,IAAIC,YAAY,KAAKC,SAAS,gBACnC,IAAAhC,WAAA,CAAA0C,GAAA;QACCO,IAAI,EAAGnB,IAAI,GAAG,WAAa;QAC3BoB,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;QAAAX,QAAA,EAE7CV;MAAY,CACZ,CAAC,gBAEJ,IAAA/B,WAAA,CAAA0C,GAAA,EAACjD,YAAA,CAAA4D,OAAO;QAAAZ,QAAA,EACL,IAAAN,QAAE,EAAE,2CAA4C;MAAC,CAC3C;IACT,CACG,CAAC;EAAA,CACL,CAAC;AAEL;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcvD,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_element","_data","_apiFetch","_url","_i18n","_coreData","_jsxRuntime","PostCommentsLinkEdit","context","attributes","setAttributes","textAlign","postType","postId","commentsCount","setCommentsCount","useState","blockProps","useBlockProps","className","clsx","useEffect","currentPostId","apiFetch","path","addQueryArgs","post","parse","then","res","headers","get","useSelect","select","coreStore","getEditedEntityRecord","link","commentsText","undefined","commentsNumber","parseInt","__","sprintf","_n","toLocaleString","jsxs","Fragment","children","jsx","BlockControls","group","AlignmentControl","value","onChange","nextAlign","href","onClick","event","preventDefault","Warning","_default","exports","default"],"sources":["@wordpress/block-library/src/post-comments-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tWarning,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\nfunction PostCommentsLinkEdit( { context, attributes, setAttributes } ) {\n\tconst { textAlign } = attributes;\n\tconst { postType, postId } = context;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( ! postId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t} ),\n\t\t\tparse: false,\n\t\t} ).then( ( res ) => {\n\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\tif ( currentPostId === postId ) {\n\t\t\t\tsetCommentsCount( res.headers.get( 'X-WP-Total' ) );\n\t\t\t}\n\t\t} );\n\t}, [ postId ] );\n\n\tconst post = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t),\n\t\t[ postType, postId ]\n\t);\n\n\tif ( ! post ) {\n\t\treturn null;\n\t}\n\n\tconst { link } = post;\n\n\tlet commentsText;\n\tif ( commentsCount !== undefined ) {\n\t\tconst commentsNumber = parseInt( commentsCount );\n\n\t\tif ( commentsNumber === 0 ) {\n\t\t\tcommentsText = __( 'No comments' );\n\t\t} else {\n\t\t\tcommentsText = sprintf(\n\t\t\t\t/* translators: %s: Number of comments */\n\t\t\t\t_n( '%s comment', '%s comments', commentsNumber ),\n\t\t\t\tcommentsNumber.toLocaleString()\n\t\t\t);\n\t\t}\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ link && commentsText !== undefined ? (\n\t\t\t\t\t<a\n\t\t\t\t\t\thref={ link + '#comments' }\n\t\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ commentsText }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\t<Warning>\n\t\t\t\t\t\t{ __( 'Post Comments Link block: post not found.' ) }\n\t\t\t\t\t</Warning>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default PostCommentsLinkEdit;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAA0D,IAAAQ,WAAA,GAAAR,OAAA;AAnB1D;AACA;AACA;;AAGA;AACA;AACA;;AAcA,SAASS,oBAAoBA,CAAE;EAAEC,OAAO;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAG;EACvE,MAAM;IAAEC;EAAU,CAAC,GAAGF,UAAU;EAChC,MAAM;IAAEG,QAAQ;IAAEC;EAAO,CAAC,GAAGL,OAAO;EACpC,MAAM,CAAEM,aAAa,EAAEC,gBAAgB,CAAE,GAAG,IAAAC,iBAAQ,EAAC,CAAC;EAEtD,MAAMC,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,CAAE,kBAAmBT,SAAS,EAAG,GAAIA;IACtC,CAAE;EACH,CAAE,CAAC;EAEH,IAAAU,kBAAS,EAAE,MAAM;IAChB,IAA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kD,aAAa;MAACC,KAAK,EAAC,OAAO;MAAAH,QAAA,eAC3B,IAAAzC,WAAA,CAAA0C,GAAA,EAACjD,YAAA,CAAAoD,gBAAgB;QAChBC,KAAK,EAAGzC,SAAW;QACnB0C,QAAQ,EAAKC,SAAS,IAAM;UAC3B5C,aAAa,CAAE;YAAEC,SAAS,EAAE2C;UAAU,CAAE,CAAC;QAC1C;MAAG,CACH;IAAC,CACY,CAAC,eAEhB,IAAAhD,WAAA,CAAA0C,GAAA;MAAA,GAAU/B,UAAU;MAAA8B,QAAA,EACjBX,IAAI,IAAIC,YAAY,KAAKC,SAAS,gBACnC,IAAAhC,WAAA,CAAA0C,GAAA;QACCO,IAAI,EAAGnB,IAAI,GAAG,WAAa;QAC3BoB,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;QAAAX,QAAA,EAE7CV;MAAY,CACZ,CAAC,gBAEJ,IAAA/B,WAAA,CAAA0C,GAAA,EAACjD,YAAA,CAAA4D,OAAO;QAAAZ,QAAA,EACL,IAAAN,QAAE,EAAE,2CAA4C;MAAC,CAC3C;IACT,CACG,CAAC;EAAA,CACL,CAAC;AAEL;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcvD,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_coreData","_element","_date","_blockEditor","_components","_i18n","_icons","_keycodes","_data","_jsxRuntime","PostDateEdit","attributes","textAlign","format","isLink","displayType","context","postId","postType","postTypeSlug","queryId","setAttributes","blockProps","useBlockProps","className","clsx","popoverAnchor","setPopoverAnchor","useState","popoverProps","useMemo","anchor","isDescendentOfQueryLoop","Number","isFinite","dateSettings","getDateSettings","siteFormat","formats","date","useEntityProp","siteTimeFormat","time","setDate","useSelect","select","coreStore","getPostType","dateLabel","__","postDate","jsx","dateTime","dateI18n","ref","children","humanTimeDiff","href","onClick","event","preventDefault","jsxs","Fragment","BlockControls","group","AlignmentControl","value","onChange","nextAlign","ToolbarGroup","Dropdown","renderContent","onClose","__experimentalPublishDateTimePicker","currentDate","is12Hour","is12HourFormat","dateOrder","_x","renderToggle","isOpen","onToggle","openOnArrowDown","keyCode","DOWN","ToolbarButton","icon","edit","title","onKeyDown","InspectorControls","PanelBody","__experimentalDateFormatPicker","defaultFormat","nextFormat","ToggleControl","__nextHasNoMarginBottom","label","labels","singular_name","sprintf","toLowerCase","checked","help","test"],"sources":["@wordpress/block-library/src/post-date/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useMemo, useState } from '@wordpress/element';\nimport {\n\tdateI18n,\n\thumanTimeDiff,\n\tgetSettings as getDateSettings,\n} from '@wordpress/date';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n\t__experimentalDateFormatPicker as DateFormatPicker,\n\t__experimentalPublishDateTimePicker as PublishDateTimePicker,\n} from '@wordpress/block-editor';\nimport {\n\tDropdown,\n\tToolbarGroup,\n\tToolbarButton,\n\tToggleControl,\n\tPanelBody,\n} from '@wordpress/components';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { edit } from '@wordpress/icons';\nimport { DOWN } from '@wordpress/keycodes';\nimport { useSelect } from '@wordpress/data';\n\nexport default function PostDateEdit( {\n\tattributes: { textAlign, format, isLink, displayType },\n\tcontext: { postId, postType: postTypeSlug, queryId },\n\tsetAttributes,\n} ) {\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t[ `wp-block-post-date__modified-date` ]: displayType === 'modified',\n\t\t} ),\n\t} );\n\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\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( { anchor: popoverAnchor } ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\tconst dateSettings = getDateSettings();\n\tconst [ siteFormat = dateSettings.formats.date ] = useEntityProp(\n\t\t'root',\n\t\t'site',\n\t\t'date_format'\n\t);\n\tconst [ siteTimeFormat = dateSettings.formats.time ] = useEntityProp(\n\t\t'root',\n\t\t'site',\n\t\t'time_format'\n\t);\n\tconst [ date, setDate ] = useEntityProp(\n\t\t'postType',\n\t\tpostTypeSlug,\n\t\tdisplayType,\n\t\tpostId\n\t);\n\n\tconst postType = useSelect(\n\t\t( select ) =>\n\t\t\tpostTypeSlug\n\t\t\t\t? select( coreStore ).getPostType( postTypeSlug )\n\t\t\t\t: null,\n\t\t[ postTypeSlug ]\n\t);\n\n\tconst dateLabel =\n\t\tdisplayType === 'date' ? __( 'Post Date' ) : __( 'Post Modified Date' );\n\n\tlet postDate = date ? (\n\t\t<time dateTime={ dateI18n( 'c', date ) } ref={ setPopoverAnchor }>\n\t\t\t{ format === 'human-diff'\n\t\t\t\t? humanTimeDiff( date )\n\t\t\t\t: dateI18n( format || siteFormat, date ) }\n\t\t</time>\n\t) : (\n\t\tdateLabel\n\t);\n\n\tif ( isLink && date ) {\n\t\tpostDate = (\n\t\t\t<a\n\t\t\t\thref=\"#post-date-pseudo-link\"\n\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t>\n\t\t\t\t{ postDate }\n\t\t\t</a>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t{ date &&\n\t\t\t\t\tdisplayType === 'date' &&\n\t\t\t\t\t! isDescendentOfQueryLoop && (\n\t\t\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t\t<PublishDateTimePicker\n\t\t\t\t\t\t\t\t\t\tcurrentDate={ date }\n\t\t\t\t\t\t\t\t\t\tonChange={ setDate }\n\t\t\t\t\t\t\t\t\t\tis12Hour={ is12HourFormat(\n\t\t\t\t\t\t\t\t\t\t\tsiteTimeFormat\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t\t\t\tdateOrder={\n\t\t\t\t\t\t\t\t\t\t\t/* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */\n\t\t\t\t\t\t\t\t\t\t\t_x( 'dmy', 'date order' )\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\trenderToggle={ ( { isOpen, onToggle } ) => {\n\t\t\t\t\t\t\t\t\tconst openOnArrowDown = ( event ) => {\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t! isOpen &&\n\t\t\t\t\t\t\t\t\t\t\tevent.keyCode === DOWN\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\t\t\t\t\ttitle={ __( 'Change Date' ) }\n\t\t\t\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\t\t\t\tonKeyDown={ openOnArrowDown }\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/>\n\t\t\t\t\t\t</ToolbarGroup>\n\t\t\t\t\t) }\n\t\t\t</BlockControls>\n\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<DateFormatPicker\n\t\t\t\t\t\tformat={ format }\n\t\t\t\t\t\tdefaultFormat={ siteFormat }\n\t\t\t\t\t\tonChange={ ( nextFormat ) =>\n\t\t\t\t\t\t\tsetAttributes( { format: nextFormat } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\tpostType?.labels.singular_name\n\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"post\".\n\t\t\t\t\t\t\t\t\t\t__( 'Link to %s' ),\n\t\t\t\t\t\t\t\t\t\tpostType.labels.singular_name.toLowerCase()\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: __( 'Link to post' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonChange={ () => setAttributes( { isLink: ! isLink } ) }\n\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Display last modified date' ) }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tdisplayType: value ? 'modified' : 'date',\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchecked={ displayType === 'modified' }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Only shows if the post has been modified'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\n\t\t\t<div { ...blockProps }>{ postDate }</div>\n\t\t</>\n\t);\n}\n\nexport function is12HourFormat( format ) {\n\t// To know if the time format is a 12 hour time, look for any of the 12 hour\n\t// format characters: 'a', 'A', 'g', and 'h'. The character must be\n\t// unescaped, i.e. not preceded by a '\\'. Coincidentally, 'aAgh' is how I\n\t// feel when working with regular expressions.\n\t// https://www.php.net/manual/en/datetime.format.php\n\treturn /(?:^|[^\\\\])[aAgh]/.test( format );\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAJ,OAAA;AAQA,IAAAK,WAAA,GAAAL,OAAA;AAOA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AAA4C,IAAAU,WAAA,GAAAV,OAAA;AAjC5C;AACA;AACA;;AAGA;AACA;AACA;;AA4Be,SAASW,YAAYA,CAAE;EACrCC,UAAU,EAAE;IAAEC,SAAS;IAAEC,MAAM;IAAEC,MAAM;IAAEC;EAAY,CAAC;EACtDC,OAAO,EAAE;IAAEC,MAAM;IAAEC,QAAQ,EAAEC,YAAY;IAAEC;EAAQ,CAAC;EACpDC;AACD,CAAC,EAAG;EACH,MAAMC,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,CAAG,kBAAkBb,SAAW,EAAC,GAAIA,SAAS;MAC9C,CAAG,mCAAkC,GAAIG,WAAW,KAAK;IAC1D,CAAE;EACH,CAAE,C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AE,YAAa,CAAC,EAClB/B,QAAQ,CAACgF,MAAM,CAACC,aAAa,CAACE,WAAW,CAAC,CAC1C,CAAC,GACD,IAAApD,QAAE,EAAE,cAAe,CACtB;UACDkB,QAAQ,EAAGA,CAAA,KAAM9C,aAAa,CAAE;YAAEP,MAAM,EAAE,CAAEA;UAAO,CAAE,CAAG;UACxDwF,OAAO,EAAGxF;QAAQ,CAClB,CAAC,eACF,IAAAL,WAAA,CAAA0C,GAAA,EAAC/C,WAAA,CAAA2F,aAAa;UACbC,uBAAuB;UACvBC,KAAK,EAAG,IAAAhD,QAAE,EAAE,4BAA6B,CAAG;UAC5CkB,QAAQ,EAAKD,KAAK,IACjB7C,aAAa,CAAE;YACdN,WAAW,EAAEmD,KAAK,GAAG,UAAU,GAAG;UACnC,CAAE,CACF;UACDoC,OAAO,EAAGvF,WAAW,KAAK,UAAY;UACtCwF,IAAI,EAAG,IAAAtD,QAAE,EACR,0CACD;QAAG,CACH,CAAC;MAAA,CACQ;IAAC,CACM,CAAC,eAEpB,IAAAxC,WAAA,CAAA0C,GAAA;MAAA,GAAU7B,UAAU;MAAAiC,QAAA,EAAKL;IAAQ,CAAO,CAAC;EAAA,CACxC,CAAC;AAEL;AAEO,SAAS0B,cAAcA,CAAE/D,MAAM,EAAG;EACxC;EACA;EACA;EACA;EACA;EACA,OAAO,mBAAmB,CAAC2F,IAAI,CAAE3F,MAAO,CAAC;AAC1C","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_coreData","_element","_date","_blockEditor","_components","_i18n","_icons","_keycodes","_data","_jsxRuntime","PostDateEdit","attributes","textAlign","format","isLink","displayType","context","postId","postType","postTypeSlug","queryId","setAttributes","blockProps","useBlockProps","className","clsx","popoverAnchor","setPopoverAnchor","useState","popoverProps","useMemo","anchor","isDescendentOfQueryLoop","Number","isFinite","dateSettings","getDateSettings","siteFormat","formats","date","useEntityProp","siteTimeFormat","time","setDate","useSelect","select","coreStore","getPostType","dateLabel","__","postDate","jsx","dateTime","dateI18n","ref","children","humanTimeDiff","href","onClick","event","preventDefault","jsxs","Fragment","BlockControls","group","AlignmentControl","value","onChange","nextAlign","ToolbarGroup","Dropdown","renderContent","onClose","__experimentalPublishDateTimePicker","currentDate","is12Hour","is12HourFormat","dateOrder","_x","renderToggle","isOpen","onToggle","openOnArrowDown","keyCode","DOWN","ToolbarButton","icon","edit","title","onKeyDown","InspectorControls","PanelBody","__experimentalDateFormatPicker","defaultFormat","nextFormat","ToggleControl","__nextHasNoMarginBottom","label","labels","singular_name","sprintf","toLowerCase","checked","help","test"],"sources":["@wordpress/block-library/src/post-date/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useMemo, useState } from '@wordpress/element';\nimport {\n\tdateI18n,\n\thumanTimeDiff,\n\tgetSettings as getDateSettings,\n} from '@wordpress/date';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n\t__experimentalDateFormatPicker as DateFormatPicker,\n\t__experimentalPublishDateTimePicker as PublishDateTimePicker,\n} from '@wordpress/block-editor';\nimport {\n\tDropdown,\n\tToolbarGroup,\n\tToolbarButton,\n\tToggleControl,\n\tPanelBody,\n} from '@wordpress/components';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { edit } from '@wordpress/icons';\nimport { DOWN } from '@wordpress/keycodes';\nimport { useSelect } from '@wordpress/data';\n\nexport default function PostDateEdit( {\n\tattributes: { textAlign, format, isLink, displayType },\n\tcontext: { postId, postType: postTypeSlug, queryId },\n\tsetAttributes,\n} ) {\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t[ `wp-block-post-date__modified-date` ]: displayType === 'modified',\n\t\t} ),\n\t} );\n\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\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( { anchor: popoverAnchor } ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\tconst dateSettings = getDateSettings();\n\tconst [ siteFormat = dateSettings.formats.date ] = useEntityProp(\n\t\t'root',\n\t\t'site',\n\t\t'date_format'\n\t);\n\tconst [ siteTimeFormat = dateSettings.formats.time ] = useEntityProp(\n\t\t'root',\n\t\t'site',\n\t\t'time_format'\n\t);\n\tconst [ date, setDate ] = useEntityProp(\n\t\t'postType',\n\t\tpostTypeSlug,\n\t\tdisplayType,\n\t\tpostId\n\t);\n\n\tconst postType = useSelect(\n\t\t( select ) =>\n\t\t\tpostTypeSlug\n\t\t\t\t? select( coreStore ).getPostType( postTypeSlug )\n\t\t\t\t: null,\n\t\t[ postTypeSlug ]\n\t);\n\n\tconst dateLabel =\n\t\tdisplayType === 'date' ? __( 'Post Date' ) : __( 'Post Modified Date' );\n\n\tlet postDate = date ? (\n\t\t<time dateTime={ dateI18n( 'c', date ) } ref={ setPopoverAnchor }>\n\t\t\t{ format === 'human-diff'\n\t\t\t\t? humanTimeDiff( date )\n\t\t\t\t: dateI18n( format || siteFormat, date ) }\n\t\t</time>\n\t) : (\n\t\tdateLabel\n\t);\n\n\tif ( isLink && date ) {\n\t\tpostDate = (\n\t\t\t<a\n\t\t\t\thref=\"#post-date-pseudo-link\"\n\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t>\n\t\t\t\t{ postDate }\n\t\t\t</a>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t{ date &&\n\t\t\t\t\tdisplayType === 'date' &&\n\t\t\t\t\t! isDescendentOfQueryLoop && (\n\t\t\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t\t<PublishDateTimePicker\n\t\t\t\t\t\t\t\t\t\tcurrentDate={ date }\n\t\t\t\t\t\t\t\t\t\tonChange={ setDate }\n\t\t\t\t\t\t\t\t\t\tis12Hour={ is12HourFormat(\n\t\t\t\t\t\t\t\t\t\t\tsiteTimeFormat\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t\t\t\tdateOrder={\n\t\t\t\t\t\t\t\t\t\t\t/* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */\n\t\t\t\t\t\t\t\t\t\t\t_x( 'dmy', 'date order' )\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\trenderToggle={ ( { isOpen, onToggle } ) => {\n\t\t\t\t\t\t\t\t\tconst openOnArrowDown = ( event ) => {\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t! isOpen &&\n\t\t\t\t\t\t\t\t\t\t\tevent.keyCode === DOWN\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\t\t\t\t\ttitle={ __( 'Change Date' ) }\n\t\t\t\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\t\t\t\tonKeyDown={ openOnArrowDown }\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/>\n\t\t\t\t\t\t</ToolbarGroup>\n\t\t\t\t\t) }\n\t\t\t</BlockControls>\n\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<DateFormatPicker\n\t\t\t\t\t\tformat={ format }\n\t\t\t\t\t\tdefaultFormat={ siteFormat }\n\t\t\t\t\t\tonChange={ ( nextFormat ) =>\n\t\t\t\t\t\t\tsetAttributes( { format: nextFormat } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\tpostType?.labels.singular_name\n\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"post\".\n\t\t\t\t\t\t\t\t\t\t__( 'Link to %s' ),\n\t\t\t\t\t\t\t\t\t\tpostType.labels.singular_name.toLowerCase()\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: __( 'Link to post' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonChange={ () => setAttributes( { isLink: ! isLink } ) }\n\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Display last modified date' ) }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tdisplayType: value ? 'modified' : 'date',\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchecked={ displayType === 'modified' }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Only shows if the post has been modified'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\n\t\t\t<div { ...blockProps }>{ postDate }</div>\n\t\t</>\n\t);\n}\n\nexport function is12HourFormat( format ) {\n\t// To know if the time format is a 12 hour time, look for any of the 12 hour\n\t// format characters: 'a', 'A', 'g', and 'h'. The character must be\n\t// unescaped, i.e. not preceded by a '\\'. Coincidentally, 'aAgh' is how I\n\t// feel when working with regular expressions.\n\t// https://www.php.net/manual/en/datetime.format.php\n\treturn /(?:^|[^\\\\])[aAgh]/.test( format );\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAJ,OAAA;AAQA,IAAAK,WAAA,GAAAL,OAAA;AAOA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AAA4C,IAAAU,WAAA,GAAAV,OAAA;AAjC5C;AACA;AACA;;AAGA;AACA;AACA;;AA4Be,SAASW,YAAYA,CAAE;EACrCC,UAAU,EAAE;IAAEC,SAAS;IAAEC,MAAM;IAAEC,MAAM;IAAEC;EAAY,CAAC;EACtDC,OAAO,EAAE;IAAEC,MAAM;IAAEC,QAAQ,EAAEC,YAAY;IAAEC;EAAQ,CAAC;EACpDC;AACD,CAAC,EAAG;EACH,MAAMC,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC,aAAI,EAAE;MAChB,CAAE,kBAAmBb,SAAS,EAAG,G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AQ,EAAEgF,MAAM,CAACC,aAAa,GAC3B,IAAAC,aAAO;UACP;UACA,IAAAnD,QAAE,EAAE,YAAa,CAAC,EAClB/B,QAAQ,CAACgF,MAAM,CAACC,aAAa,CAACE,WAAW,CAAC,CAC1C,CAAC,GACD,IAAApD,QAAE,EAAE,cAAe,CACtB;UACDkB,QAAQ,EAAGA,CAAA,KAAM9C,aAAa,CAAE;YAAEP,MAAM,EAAE,CAAEA;UAAO,CAAE,CAAG;UACxDwF,OAAO,EAAGxF;QAAQ,CAClB,CAAC,eACF,IAAAL,WAAA,CAAA0C,GAAA,EAAC/C,WAAA,CAAA2F,aAAa;UACbC,uBAAuB;UACvBC,KAAK,EAAG,IAAAhD,QAAE,EAAE,4BAA6B,CAAG;UAC5CkB,QAAQ,EAAKD,KAAK,IACjB7C,aAAa,CAAE;YACdN,WAAW,EAAEmD,KAAK,GAAG,UAAU,GAAG;UACnC,CAAE,CACF;UACDoC,OAAO,EAAGvF,WAAW,KAAK,UAAY;UACtCwF,IAAI,EAAG,IAAAtD,QAAE,EACR,0CACD;QAAG,CACH,CAAC;MAAA,CACQ;IAAC,CACM,CAAC,eAEpB,IAAAxC,WAAA,CAAA0C,GAAA;MAAA,GAAU7B,UAAU;MAAAiC,QAAA,EAAKL;IAAQ,CAAO,CAAC;EAAA,CACxC,CAAC;AAEL;AAEO,SAAS0B,cAAcA,CAAE/D,MAAM,EAAG;EACxC;EACA;EACA;EACA;EACA;EACA,OAAO,mBAAmB,CAAC2F,IAAI,CAAE3F,MAAO,CAAC;AAC1C","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_coreData","_element","_blockEditor","_components","_i18n","_data","_hooks","_jsxRuntime","ELLIPSIS","PostExcerptEditor","attributes","textAlign","moreText","showMoreOnNewLine","excerptLength","setAttributes","isSelected","context","postId","postType","queryId","isDescendentOfQueryLoop","Number","isFinite","userCanEdit","useCanEditEntity","rawExcerpt","setExcerpt","rendered","renderedExcerpt","protected","isProtected","useEntityProp","postTypeSupportsExcerpts","useSelect","select","coreStore","getPostType","supports","excerpt","isEditable","blockProps","useBlockProps","className","clsx","wordCountType","_x","strippedRenderedExcerpt","useMemo","document","window","DOMParser","parseFromString","body","textContent","innerText","jsxs","Fragment","children","jsx","BlockControls","AlignmentToolbar","value","onChange","newAlign","__","Warning","readMoreLink","RichText","identifier","tagName","placeholder","newMoreText","withoutInteractiveFormatting","excerptClassName","rawOrRenderedExcerpt","trim","trimmedExcerpt","split","join","excerptWithSpaces","numberOfSpaces","length","replaceAll","isTrimmed","excerptContent","InspectorControls","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","label","checked","newShowMoreOnNewLine","RangeControl","__next40pxDefaultSize","min","max"],"sources":["@wordpress/block-library/src/post-excerpt/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\nimport {\n\tAlignmentToolbar,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tWarning,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { PanelBody, ToggleControl, RangeControl } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useCanEditEntity } from '../utils/hooks';\n\nconst ELLIPSIS = '…';\n\nexport default function PostExcerptEditor( {\n\tattributes: { textAlign, moreText, showMoreOnNewLine, excerptLength },\n\tsetAttributes,\n\tisSelected,\n\tcontext: { postId, postType, queryId },\n} ) {\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\tconst userCanEdit = useCanEditEntity( 'postType', postType, postId );\n\tconst [\n\t\trawExcerpt,\n\t\tsetExcerpt,\n\t\t{ rendered: renderedExcerpt, protected: isProtected } = {},\n\t] = useEntityProp( 'postType', postType, 'excerpt', postId );\n\n\t/**\n\t * Check if the post type supports excerpts.\n\t * Add an exception and return early for the \"page\" post type,\n\t * which is registered without support for the excerpt UI,\n\t * but supports saving the excerpt to the database.\n\t * See: https://core.trac.wordpress.org/browser/branches/6.1/src/wp-includes/post.php#L65\n\t * Without this exception, users that have excerpts saved to the database will\n\t * not be able to edit the excerpts.\n\t */\n\tconst postTypeSupportsExcerpts = useSelect(\n\t\t( select ) => {\n\t\t\tif ( postType === 'page' ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn !! select( coreStore ).getPostType( postType )?.supports\n\t\t\t\t?.excerpt;\n\t\t},\n\t\t[ postType ]\n\t);\n\n\t/**\n\t * The excerpt is editable if:\n\t * - The user can edit the post\n\t * - It is not a descendent of a Query Loop block\n\t * - The post type supports excerpts\n\t */\n\tconst isEditable =\n\t\tuserCanEdit && ! isDescendentOfQueryLoop && postTypeSupportsExcerpts;\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\t/**\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\n\t/**\n\t * When excerpt is editable, strip the html tags from\n\t * rendered excerpt. This will be used if the entity's\n\t * excerpt has been produced from the content.\n\t */\n\tconst strippedRenderedExcerpt = useMemo( () => {\n\t\tif ( ! renderedExcerpt ) {\n\t\t\treturn '';\n\t\t}\n\t\tconst document = new window.DOMParser().parseFromString(\n\t\t\trenderedExcerpt,\n\t\t\t'text/html'\n\t\t);\n\t\treturn document.body.textContent || document.body.innerText || '';\n\t}, [ renderedExcerpt ] );\n\n\tif ( ! postType || ! postId ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockControls>\n\t\t\t\t\t<AlignmentToolbar\n\t\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\t\t\tsetAttributes( { textAlign: newAlign } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t<p>{ __( 'This block will display the excerpt.' ) }</p>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\tif ( isProtected && ! userCanEdit ) {\n\t\treturn (\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<Warning>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'The content is currently protected and does not have the available excerpt.'\n\t\t\t\t\t) }\n\t\t\t\t</Warning>\n\t\t\t</div>\n\t\t);\n\t}\n\tconst readMoreLink = (\n\t\t<RichText\n\t\t\tidentifier=\"moreText\"\n\t\t\tclassName=\"wp-block-post-excerpt__more-link\"\n\t\t\ttagName=\"a\"\n\t\t\taria-label={ __( '“Read more” link text' ) }\n\t\t\tplaceholder={ __( 'Add \"read more\" link text' ) }\n\t\t\tvalue={ moreText }\n\t\t\tonChange={ ( newMoreText ) =>\n\t\t\t\tsetAttributes( { moreText: newMoreText } )\n\t\t\t}\n\t\t\twithoutInteractiveFormatting\n\t\t/>\n\t);\n\tconst excerptClassName = clsx( 'wp-block-post-excerpt__excerpt', {\n\t\t'is-inline': ! showMoreOnNewLine,\n\t} );\n\n\t/**\n\t * The excerpt length setting needs to be applied to both\n\t * the raw and the rendered excerpt depending on which is being used.\n\t */\n\tconst rawOrRenderedExcerpt = (\n\t\trawExcerpt || strippedRenderedExcerpt\n\t).trim();\n\n\tlet trimmedExcerpt = '';\n\tif ( wordCountType === 'words' ) {\n\t\ttrimmedExcerpt = rawOrRenderedExcerpt\n\t\t\t.split( ' ', excerptLength )\n\t\t\t.join( ' ' );\n\t} else if ( wordCountType === 'characters_excluding_spaces' ) {\n\t\t/*\n\t\t * 1. Split the excerpt at the character limit,\n\t\t * then join the substrings back into one string.\n\t\t * 2. Count the number of spaces in the excerpt\n\t\t * by comparing the lengths of the string with and without spaces.\n\t\t * 3. Add the number to the length of the visible excerpt,\n\t\t * so that the spaces are excluded from the word count.\n\t\t */\n\t\tconst excerptWithSpaces = rawOrRenderedExcerpt\n\t\t\t.split( '', excerptLength )\n\t\t\t.join( '' );\n\n\t\tconst numberOfSpaces =\n\t\t\texcerptWithSpaces.length -\n\t\t\texcerptWithSpaces.replaceAll( ' ', '' ).length;\n\n\t\ttrimmedExcerpt = rawOrRenderedExcerpt\n\t\t\t.split( '', excerptLength + numberOfSpaces )\n\t\t\t.join( '' );\n\t} else if ( wordCountType === 'characters_including_spaces' ) {\n\t\ttrimmedExcerpt = rawOrRenderedExcerpt\n\t\t\t.split( '', excerptLength )\n\t\t\t.join( '' );\n\t}\n\n\tconst isTrimmed = trimmedExcerpt !== rawOrRenderedExcerpt;\n\n\tconst excerptContent = isEditable ? (\n\t\t<RichText\n\t\t\tclassName={ excerptClassName }\n\t\t\taria-label={ __( 'Excerpt text' ) }\n\t\t\tvalue={\n\t\t\t\tisSelected\n\t\t\t\t\t? rawOrRenderedExcerpt\n\t\t\t\t\t: ( ! isTrimmed\n\t\t\t\t\t\t\t? rawOrRenderedExcerpt\n\t\t\t\t\t\t\t: trimmedExcerpt + ELLIPSIS ) ||\n\t\t\t\t\t __( 'No excerpt found' )\n\t\t\t}\n\t\t\tonChange={ setExcerpt }\n\t\t\ttagName=\"p\"\n\t\t/>\n\t) : (\n\t\t<p className={ excerptClassName }>\n\t\t\t{ ! isTrimmed\n\t\t\t\t? rawOrRenderedExcerpt || __( 'No excerpt found' )\n\t\t\t\t: trimmedExcerpt + ELLIPSIS }\n\t\t</p>\n\t);\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<AlignmentToolbar\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\t\tsetAttributes( { textAlign: newAlign } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Show link on new line' ) }\n\t\t\t\t\t\tchecked={ showMoreOnNewLine }\n\t\t\t\t\t\tonChange={ ( newShowMoreOnNewLine ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowMoreOnNewLine: newShowMoreOnNewLine,\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<RangeControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Max number of words' ) }\n\t\t\t\t\t\tvalue={ excerptLength }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tsetAttributes( { excerptLength: value } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tmin=\"10\"\n\t\t\t\t\t\tmax=\"100\"\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ excerptContent }\n\t\t\t\t{ ! showMoreOnNewLine && ' ' }\n\t\t\t\t{ showMoreOnNewLine ? (\n\t\t\t\t\t<p className=\"wp-block-post-excerpt__more-text\">\n\t\t\t\t\t\t{ readMoreLink }\n\t\t\t\t\t</p>\n\t\t\t\t) : (\n\t\t\t\t\treadMoreLink\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAQA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IA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EAC5CS;MAAY,CACZ,CAAC,GAEJA,YACA;IAAA,CACG,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_coreData","_element","_blockEditor","_components","_i18n","_data","_hooks","_jsxRuntime","ELLIPSIS","PostExcerptEditor","attributes","textAlign","moreText","showMoreOnNewLine","excerptLength","setAttributes","isSelected","context","postId","postType","queryId","isDescendentOfQueryLoop","Number","isFinite","userCanEdit","useCanEditEntity","rawExcerpt","setExcerpt","rendered","renderedExcerpt","protected","isProtected","useEntityProp","postTypeSupportsExcerpts","useSelect","select","coreStore","getPostType","supports","excerpt","isEditable","blockProps","useBlockProps","className","clsx","wordCountType","_x","strippedRenderedExcerpt","useMemo","document","window","DOMParser","parseFromString","body","textContent","innerText","jsxs","Fragment","children","jsx","BlockControls","AlignmentToolbar","value","onChange","newAlign","__","Warning","readMoreLink","RichText","identifier","tagName","placeholder","newMoreText","withoutInteractiveFormatting","excerptClassName","rawOrRenderedExcerpt","trim","trimmedExcerpt","split","join","excerptWithSpaces","numberOfSpaces","length","replaceAll","isTrimmed","excerptContent","InspectorControls","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","label","checked","newShowMoreOnNewLine","RangeControl","__next40pxDefaultSize","min","max"],"sources":["@wordpress/block-library/src/post-excerpt/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\nimport {\n\tAlignmentToolbar,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tWarning,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { PanelBody, ToggleControl, RangeControl } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useCanEditEntity } from '../utils/hooks';\n\nconst ELLIPSIS = '…';\n\nexport default function PostExcerptEditor( {\n\tattributes: { textAlign, moreText, showMoreOnNewLine, excerptLength },\n\tsetAttributes,\n\tisSelected,\n\tcontext: { postId, postType, queryId },\n} ) {\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\tconst userCanEdit = useCanEditEntity( 'postType', postType, postId );\n\tconst [\n\t\trawExcerpt,\n\t\tsetExcerpt,\n\t\t{ rendered: renderedExcerpt, protected: isProtected } = {},\n\t] = useEntityProp( 'postType', postType, 'excerpt', postId );\n\n\t/**\n\t * Check if the post type supports excerpts.\n\t * Add an exception and return early for the \"page\" post type,\n\t * which is registered without support for the excerpt UI,\n\t * but supports saving the excerpt to the database.\n\t * See: https://core.trac.wordpress.org/browser/branches/6.1/src/wp-includes/post.php#L65\n\t * Without this exception, users that have excerpts saved to the database will\n\t * not be able to edit the excerpts.\n\t */\n\tconst postTypeSupportsExcerpts = useSelect(\n\t\t( select ) => {\n\t\t\tif ( postType === 'page' ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn !! select( coreStore ).getPostType( postType )?.supports\n\t\t\t\t?.excerpt;\n\t\t},\n\t\t[ postType ]\n\t);\n\n\t/**\n\t * The excerpt is editable if:\n\t * - The user can edit the post\n\t * - It is not a descendent of a Query Loop block\n\t * - The post type supports excerpts\n\t */\n\tconst isEditable =\n\t\tuserCanEdit && ! isDescendentOfQueryLoop && postTypeSupportsExcerpts;\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\t/**\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\n\t/**\n\t * When excerpt is editable, strip the html tags from\n\t * rendered excerpt. This will be used if the entity's\n\t * excerpt has been produced from the content.\n\t */\n\tconst strippedRenderedExcerpt = useMemo( () => {\n\t\tif ( ! renderedExcerpt ) {\n\t\t\treturn '';\n\t\t}\n\t\tconst document = new window.DOMParser().parseFromString(\n\t\t\trenderedExcerpt,\n\t\t\t'text/html'\n\t\t);\n\t\treturn document.body.textContent || document.body.innerText || '';\n\t}, [ renderedExcerpt ] );\n\n\tif ( ! postType || ! postId ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockControls>\n\t\t\t\t\t<AlignmentToolbar\n\t\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\t\t\tsetAttributes( { textAlign: newAlign } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t<p>{ __( 'This block will display the excerpt.' ) }</p>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\tif ( isProtected && ! userCanEdit ) {\n\t\treturn (\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<Warning>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'The content is currently protected and does not have the available excerpt.'\n\t\t\t\t\t) }\n\t\t\t\t</Warning>\n\t\t\t</div>\n\t\t);\n\t}\n\tconst readMoreLink = (\n\t\t<RichText\n\t\t\tidentifier=\"moreText\"\n\t\t\tclassName=\"wp-block-post-excerpt__more-link\"\n\t\t\ttagName=\"a\"\n\t\t\taria-label={ __( '“Read more” link text' ) }\n\t\t\tplaceholder={ __( 'Add \"read more\" link text' ) }\n\t\t\tvalue={ moreText }\n\t\t\tonChange={ ( newMoreText ) =>\n\t\t\t\tsetAttributes( { moreText: newMoreText } )\n\t\t\t}\n\t\t\twithoutInteractiveFormatting\n\t\t/>\n\t);\n\tconst excerptClassName = clsx( 'wp-block-post-excerpt__excerpt', {\n\t\t'is-inline': ! showMoreOnNewLine,\n\t} );\n\n\t/**\n\t * The excerpt length setting needs to be applied to both\n\t * the raw and the rendered excerpt depending on which is being used.\n\t */\n\tconst rawOrRenderedExcerpt = (\n\t\trawExcerpt || strippedRenderedExcerpt\n\t).trim();\n\n\tlet trimmedExcerpt = '';\n\tif ( wordCountType === 'words' ) {\n\t\ttrimmedExcerpt = rawOrRenderedExcerpt\n\t\t\t.split( ' ', excerptLength )\n\t\t\t.join( ' ' );\n\t} else if ( wordCountType === 'characters_excluding_spaces' ) {\n\t\t/*\n\t\t * 1. Split the excerpt at the character limit,\n\t\t * then join the substrings back into one string.\n\t\t * 2. Count the number of spaces in the excerpt\n\t\t * by comparing the lengths of the string with and without spaces.\n\t\t * 3. Add the number to the length of the visible excerpt,\n\t\t * so that the spaces are excluded from the word count.\n\t\t */\n\t\tconst excerptWithSpaces = rawOrRenderedExcerpt\n\t\t\t.split( '', excerptLength )\n\t\t\t.join( '' );\n\n\t\tconst numberOfSpaces =\n\t\t\texcerptWithSpaces.length -\n\t\t\texcerptWithSpaces.replaceAll( ' ', '' ).length;\n\n\t\ttrimmedExcerpt = rawOrRenderedExcerpt\n\t\t\t.split( '', excerptLength + numberOfSpaces )\n\t\t\t.join( '' );\n\t} else if ( wordCountType === 'characters_including_spaces' ) {\n\t\ttrimmedExcerpt = rawOrRenderedExcerpt\n\t\t\t.split( '', excerptLength )\n\t\t\t.join( '' );\n\t}\n\n\tconst isTrimmed = trimmedExcerpt !== rawOrRenderedExcerpt;\n\n\tconst excerptContent = isEditable ? (\n\t\t<RichText\n\t\t\tclassName={ excerptClassName }\n\t\t\taria-label={ __( 'Excerpt text' ) }\n\t\t\tvalue={\n\t\t\t\tisSelected\n\t\t\t\t\t? rawOrRenderedExcerpt\n\t\t\t\t\t: ( ! isTrimmed\n\t\t\t\t\t\t\t? rawOrRenderedExcerpt\n\t\t\t\t\t\t\t: trimmedExcerpt + ELLIPSIS ) ||\n\t\t\t\t\t __( 'No excerpt found' )\n\t\t\t}\n\t\t\tonChange={ setExcerpt }\n\t\t\ttagName=\"p\"\n\t\t/>\n\t) : (\n\t\t<p className={ excerptClassName }>\n\t\t\t{ ! isTrimmed\n\t\t\t\t? rawOrRenderedExcerpt || __( 'No excerpt found' )\n\t\t\t\t: trimmedExcerpt + ELLIPSIS }\n\t\t</p>\n\t);\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<AlignmentToolbar\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\t\tsetAttributes( { textAlign: newAlign } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Show link on new line' ) }\n\t\t\t\t\t\tchecked={ showMoreOnNewLine }\n\t\t\t\t\t\tonChange={ ( newShowMoreOnNewLine ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowMoreOnNewLine: newShowMoreOnNewLine,\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<RangeControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Max number of words' ) }\n\t\t\t\t\t\tvalue={ excerptLength }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tsetAttributes( { excerptLength: value } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tmin=\"10\"\n\t\t\t\t\t\tmax=\"100\"\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ excerptContent }\n\t\t\t\t{ ! showMoreOnNewLine && ' ' }\n\t\t\t\t{ showMoreOnNewLine ? (\n\t\t\t\t\t<p className=\"wp-block-post-excerpt__more-text\">\n\t\t\t\t\t\t{ readMoreLink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