@wordpress/block-library 8.18.1-next.5a1d1283.0 → 8.19.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 (381) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +1 -1
  3. package/build/block/edit.js +53 -2
  4. package/build/block/edit.js.map +1 -1
  5. package/build/button/edit.js +7 -4
  6. package/build/button/edit.js.map +1 -1
  7. package/build/button/index.js +11 -2
  8. package/build/button/index.js.map +1 -1
  9. package/build/button/save.js +10 -4
  10. package/build/button/save.js.map +1 -1
  11. package/build/buttons/edit.js +12 -3
  12. package/build/buttons/edit.js.map +1 -1
  13. package/build/code/edit.js +8 -2
  14. package/build/code/edit.js.map +1 -1
  15. package/build/code/index.js +7 -1
  16. package/build/code/index.js.map +1 -1
  17. package/build/column/index.js +1 -0
  18. package/build/column/index.js.map +1 -1
  19. package/build/columns/index.js +2 -0
  20. package/build/columns/index.js.map +1 -1
  21. package/build/file/edit.native.js +1 -1
  22. package/build/file/edit.native.js.map +1 -1
  23. package/build/file/index.js +2 -1
  24. package/build/file/index.js.map +1 -1
  25. package/build/file/utils/index.js +1 -15
  26. package/build/file/utils/index.js.map +1 -1
  27. package/build/file/view.js +14 -1
  28. package/build/file/view.js.map +1 -1
  29. package/build/footnotes/edit.js +12 -2
  30. package/build/footnotes/edit.js.map +1 -1
  31. package/build/gallery/edit.js +1 -1
  32. package/build/gallery/edit.js.map +1 -1
  33. package/build/group/edit.js +0 -1
  34. package/build/group/edit.js.map +1 -1
  35. package/build/group/index.js +4 -0
  36. package/build/group/index.js.map +1 -1
  37. package/build/heading/edit.js +0 -1
  38. package/build/heading/edit.js.map +1 -1
  39. package/build/heading/index.js +2 -0
  40. package/build/heading/index.js.map +1 -1
  41. package/build/heading/transforms.js +3 -6
  42. package/build/heading/transforms.js.map +1 -1
  43. package/build/image/deprecated.js +191 -7
  44. package/build/image/deprecated.js.map +1 -1
  45. package/build/image/edit.js +27 -12
  46. package/build/image/edit.js.map +1 -1
  47. package/build/image/image.js +75 -40
  48. package/build/image/image.js.map +1 -1
  49. package/build/image/index.js +7 -4
  50. package/build/image/index.js.map +1 -1
  51. package/build/image/{view-interactivity.js → view.js} +1 -1
  52. package/build/image/view.js.map +1 -0
  53. package/build/list/deprecated.js +93 -1
  54. package/build/list/deprecated.js.map +1 -1
  55. package/build/list/edit.js +10 -10
  56. package/build/list/edit.js.map +1 -1
  57. package/build/list/ordered-list-settings.js +10 -10
  58. package/build/list/ordered-list-settings.js.map +1 -1
  59. package/build/list/save.js +4 -2
  60. package/build/list/save.js.map +1 -1
  61. package/build/list/utils.js +21 -2
  62. package/build/list/utils.js.map +1 -1
  63. package/build/navigation/constants.js +1 -1
  64. package/build/navigation/constants.js.map +1 -1
  65. package/build/navigation/index.js +4 -2
  66. package/build/navigation/index.js.map +1 -1
  67. package/build/navigation/view.js +168 -82
  68. package/build/navigation/view.js.map +1 -1
  69. package/build/navigation-link/edit.js +3 -9
  70. package/build/navigation-link/edit.js.map +1 -1
  71. package/build/navigation-link/transforms.js +24 -0
  72. package/build/navigation-link/transforms.js.map +1 -1
  73. package/build/page-list/edit.js +2 -1
  74. package/build/page-list/edit.js.map +1 -1
  75. package/build/post-comments-form/edit.js +10 -2
  76. package/build/post-comments-form/edit.js.map +1 -1
  77. package/build/post-comments-form/form.js +5 -3
  78. package/build/post-comments-form/form.js.map +1 -1
  79. package/build/post-content/edit.js +8 -7
  80. package/build/post-content/edit.js.map +1 -1
  81. package/build/post-content/index.js +3 -0
  82. package/build/post-content/index.js.map +1 -1
  83. package/build/post-featured-image/overlay.js +2 -1
  84. package/build/post-featured-image/overlay.js.map +1 -1
  85. package/build/preformatted/edit.js +4 -1
  86. package/build/preformatted/edit.js.map +1 -1
  87. package/build/preformatted/index.js +1 -1
  88. package/build/preformatted/index.js.map +1 -1
  89. package/build/pullquote/deprecated.js +6 -7
  90. package/build/pullquote/deprecated.js.map +1 -1
  91. package/build/query/edit/enhanced-pagination-modal.js +56 -0
  92. package/build/query/edit/enhanced-pagination-modal.js.map +1 -0
  93. package/build/query/edit/inspector-controls/enhanced-pagination-control.js +42 -0
  94. package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -0
  95. package/build/query/edit/inspector-controls/index.js +8 -25
  96. package/build/query/edit/inspector-controls/index.js.map +1 -1
  97. package/build/query/edit/query-content.js +8 -2
  98. package/build/query/edit/query-content.js.map +1 -1
  99. package/build/query/utils.js +19 -0
  100. package/build/query/utils.js.map +1 -1
  101. package/build/query/view.js +4 -5
  102. package/build/query/view.js.map +1 -1
  103. package/build/search/index.js +1 -0
  104. package/build/search/index.js.map +1 -1
  105. package/build/search/view.js +81 -150
  106. package/build/search/view.js.map +1 -1
  107. package/build/social-link/edit.native.js +3 -1
  108. package/build/social-link/edit.native.js.map +1 -1
  109. package/build/table/edit.js +7 -7
  110. package/build/table/edit.js.map +1 -1
  111. package/build/table-of-contents/edit.js +2 -130
  112. package/build/table-of-contents/edit.js.map +1 -1
  113. package/build/table-of-contents/hooks.js +145 -0
  114. package/build/table-of-contents/hooks.js.map +1 -0
  115. package/build/table-of-contents/index.js +2 -1
  116. package/build/table-of-contents/index.js.map +1 -1
  117. package/build/verse/edit.js +4 -1
  118. package/build/verse/edit.js.map +1 -1
  119. package/build/verse/index.js +1 -1
  120. package/build/verse/index.js.map +1 -1
  121. package/build-module/block/edit.js +54 -3
  122. package/build-module/block/edit.js.map +1 -1
  123. package/build-module/button/edit.js +7 -4
  124. package/build-module/button/edit.js.map +1 -1
  125. package/build-module/button/index.js +11 -2
  126. package/build-module/button/index.js.map +1 -1
  127. package/build-module/button/save.js +10 -4
  128. package/build-module/button/save.js.map +1 -1
  129. package/build-module/buttons/edit.js +12 -3
  130. package/build-module/buttons/edit.js.map +1 -1
  131. package/build-module/code/edit.js +8 -2
  132. package/build-module/code/edit.js.map +1 -1
  133. package/build-module/code/index.js +7 -1
  134. package/build-module/code/index.js.map +1 -1
  135. package/build-module/column/index.js +1 -0
  136. package/build-module/column/index.js.map +1 -1
  137. package/build-module/columns/index.js +2 -0
  138. package/build-module/columns/index.js.map +1 -1
  139. package/build-module/file/edit.native.js +1 -1
  140. package/build-module/file/edit.native.js.map +1 -1
  141. package/build-module/file/index.js +2 -1
  142. package/build-module/file/index.js.map +1 -1
  143. package/build-module/file/utils/index.js +0 -13
  144. package/build-module/file/utils/index.js.map +1 -1
  145. package/build-module/file/view.js +14 -2
  146. package/build-module/file/view.js.map +1 -1
  147. package/build-module/footnotes/edit.js +12 -2
  148. package/build-module/footnotes/edit.js.map +1 -1
  149. package/build-module/gallery/edit.js +1 -1
  150. package/build-module/gallery/edit.js.map +1 -1
  151. package/build-module/group/edit.js +0 -1
  152. package/build-module/group/edit.js.map +1 -1
  153. package/build-module/group/index.js +4 -0
  154. package/build-module/group/index.js.map +1 -1
  155. package/build-module/heading/edit.js +0 -1
  156. package/build-module/heading/edit.js.map +1 -1
  157. package/build-module/heading/index.js +2 -0
  158. package/build-module/heading/index.js.map +1 -1
  159. package/build-module/heading/transforms.js +3 -6
  160. package/build-module/heading/transforms.js.map +1 -1
  161. package/build-module/image/deprecated.js +191 -7
  162. package/build-module/image/deprecated.js.map +1 -1
  163. package/build-module/image/edit.js +27 -12
  164. package/build-module/image/edit.js.map +1 -1
  165. package/build-module/image/image.js +77 -42
  166. package/build-module/image/image.js.map +1 -1
  167. package/build-module/image/index.js +7 -4
  168. package/build-module/image/index.js.map +1 -1
  169. package/build-module/image/{view-interactivity.js → view.js} +1 -1
  170. package/build-module/image/view.js.map +1 -0
  171. package/build-module/list/deprecated.js +95 -3
  172. package/build-module/list/deprecated.js.map +1 -1
  173. package/build-module/list/edit.js +10 -10
  174. package/build-module/list/edit.js.map +1 -1
  175. package/build-module/list/ordered-list-settings.js +10 -10
  176. package/build-module/list/ordered-list-settings.js.map +1 -1
  177. package/build-module/list/save.js +4 -2
  178. package/build-module/list/save.js.map +1 -1
  179. package/build-module/list/utils.js +20 -2
  180. package/build-module/list/utils.js.map +1 -1
  181. package/build-module/navigation/constants.js +1 -1
  182. package/build-module/navigation/constants.js.map +1 -1
  183. package/build-module/navigation/index.js +4 -2
  184. package/build-module/navigation/index.js.map +1 -1
  185. package/build-module/navigation/view.js +168 -83
  186. package/build-module/navigation/view.js.map +1 -1
  187. package/build-module/navigation-link/edit.js +3 -9
  188. package/build-module/navigation-link/edit.js.map +1 -1
  189. package/build-module/navigation-link/transforms.js +24 -0
  190. package/build-module/navigation-link/transforms.js.map +1 -1
  191. package/build-module/page-list/edit.js +2 -1
  192. package/build-module/page-list/edit.js.map +1 -1
  193. package/build-module/post-comments-form/edit.js +10 -2
  194. package/build-module/post-comments-form/edit.js.map +1 -1
  195. package/build-module/post-comments-form/form.js +5 -3
  196. package/build-module/post-comments-form/form.js.map +1 -1
  197. package/build-module/post-content/edit.js +8 -7
  198. package/build-module/post-content/edit.js.map +1 -1
  199. package/build-module/post-content/index.js +3 -0
  200. package/build-module/post-content/index.js.map +1 -1
  201. package/build-module/post-featured-image/overlay.js +2 -1
  202. package/build-module/post-featured-image/overlay.js.map +1 -1
  203. package/build-module/preformatted/edit.js +4 -1
  204. package/build-module/preformatted/edit.js.map +1 -1
  205. package/build-module/preformatted/index.js +1 -1
  206. package/build-module/preformatted/index.js.map +1 -1
  207. package/build-module/pullquote/deprecated.js +6 -7
  208. package/build-module/pullquote/deprecated.js.map +1 -1
  209. package/build-module/query/edit/enhanced-pagination-modal.js +50 -0
  210. package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -0
  211. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +35 -0
  212. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -0
  213. package/build-module/query/edit/inspector-controls/index.js +9 -26
  214. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  215. package/build-module/query/edit/query-content.js +8 -2
  216. package/build-module/query/edit/query-content.js.map +1 -1
  217. package/build-module/query/utils.js +17 -0
  218. package/build-module/query/utils.js.map +1 -1
  219. package/build-module/query/view.js +4 -5
  220. package/build-module/query/view.js.map +1 -1
  221. package/build-module/search/index.js +1 -0
  222. package/build-module/search/index.js.map +1 -1
  223. package/build-module/search/view.js +81 -151
  224. package/build-module/search/view.js.map +1 -1
  225. package/build-module/social-link/edit.native.js +3 -1
  226. package/build-module/social-link/edit.native.js.map +1 -1
  227. package/build-module/table/edit.js +7 -7
  228. package/build-module/table/edit.js.map +1 -1
  229. package/build-module/table-of-contents/edit.js +3 -131
  230. package/build-module/table-of-contents/edit.js.map +1 -1
  231. package/build-module/table-of-contents/hooks.js +137 -0
  232. package/build-module/table-of-contents/hooks.js.map +1 -0
  233. package/build-module/table-of-contents/index.js +2 -1
  234. package/build-module/table-of-contents/index.js.map +1 -1
  235. package/build-module/verse/edit.js +4 -1
  236. package/build-module/verse/edit.js.map +1 -1
  237. package/build-module/verse/index.js +1 -1
  238. package/build-module/verse/index.js.map +1 -1
  239. package/build-style/cover/style-rtl.css +9 -0
  240. package/build-style/cover/style.css +9 -0
  241. package/build-style/editor-rtl.css +15 -9
  242. package/build-style/editor.css +15 -9
  243. package/build-style/file/style-rtl.css +5 -0
  244. package/build-style/file/style.css +5 -0
  245. package/build-style/heading/style-rtl.css +13 -0
  246. package/build-style/heading/style.css +13 -0
  247. package/build-style/navigation-link/editor-rtl.css +0 -9
  248. package/build-style/navigation-link/editor.css +0 -9
  249. package/build-style/paragraph/editor-rtl.css +5 -0
  250. package/build-style/paragraph/editor.css +5 -0
  251. package/build-style/paragraph/style-rtl.css +5 -0
  252. package/build-style/paragraph/style.css +5 -0
  253. package/build-style/post-navigation-link/style-rtl.css +3 -0
  254. package/build-style/post-navigation-link/style.css +3 -0
  255. package/build-style/query/editor-rtl.css +10 -0
  256. package/build-style/query/editor.css +10 -0
  257. package/build-style/query/style-rtl.css +1 -1
  258. package/build-style/query/style.css +1 -1
  259. package/build-style/reset-rtl.css +27 -27
  260. package/build-style/reset.css +27 -27
  261. package/build-style/style-rtl.css +35 -0
  262. package/build-style/style.css +35 -0
  263. package/package.json +32 -33
  264. package/src/audio/test/__snapshots__/edit.native.js.snap +78 -106
  265. package/src/avatar/index.php +2 -2
  266. package/src/block/edit.js +58 -2
  267. package/src/block/test/edit.native.js +2 -3
  268. package/src/button/block.json +11 -2
  269. package/src/button/edit.js +27 -11
  270. package/src/button/save.js +10 -4
  271. package/src/buttons/edit.js +13 -3
  272. package/src/buttons/test/edit.native.js +28 -24
  273. package/src/calendar/index.php +2 -2
  274. package/src/code/block.json +2 -1
  275. package/src/code/edit.js +13 -1
  276. package/src/code/index.js +5 -0
  277. package/src/column/block.json +1 -0
  278. package/src/columns/block.json +2 -0
  279. package/src/comment-template/index.php +1 -1
  280. package/src/comments-pagination-next/index.php +1 -1
  281. package/src/comments-pagination-previous/index.php +1 -1
  282. package/src/cover/style.scss +12 -1
  283. package/src/cover/test/edit.js +7 -7
  284. package/src/cover/test/edit.native.js +18 -27
  285. package/src/embed/test/index.native.js +30 -45
  286. package/src/file/block.json +2 -1
  287. package/src/file/edit.native.js +1 -1
  288. package/src/file/index.php +19 -21
  289. package/src/file/style.scss +6 -1
  290. package/src/file/test/__snapshots__/edit.native.js.snap +162 -218
  291. package/src/file/utils/index.js +0 -15
  292. package/src/file/view.js +14 -5
  293. package/src/footnotes/edit.js +13 -1
  294. package/src/gallery/edit.js +1 -1
  295. package/src/gallery/index.php +1 -1
  296. package/src/group/block.json +4 -0
  297. package/src/group/edit.js +0 -1
  298. package/src/heading/block.json +2 -0
  299. package/src/heading/edit.js +0 -1
  300. package/src/heading/style.scss +4 -0
  301. package/src/heading/transforms.js +1 -6
  302. package/src/image/block.json +7 -4
  303. package/src/image/deprecated.js +210 -7
  304. package/src/image/edit.js +43 -29
  305. package/src/image/image.js +86 -43
  306. package/src/image/index.php +251 -28
  307. package/src/latest-posts/index.php +1 -1
  308. package/src/list/deprecated.js +84 -3
  309. package/src/list/edit.js +6 -3
  310. package/src/list/ordered-list-settings.js +20 -5
  311. package/src/list/save.js +10 -1
  312. package/src/list/test/edit.native.js +2 -4
  313. package/src/list/utils.js +22 -1
  314. package/src/navigation/block.json +4 -2
  315. package/src/navigation/constants.js +1 -0
  316. package/src/navigation/index.php +85 -123
  317. package/src/navigation/view.js +192 -96
  318. package/src/navigation-link/edit.js +21 -36
  319. package/src/navigation-link/editor.scss +0 -8
  320. package/src/navigation-link/transforms.js +22 -0
  321. package/src/page-list/edit.js +2 -1
  322. package/src/paragraph/editor.scss +5 -0
  323. package/src/paragraph/style.scss +5 -0
  324. package/src/pattern/index.php +2 -2
  325. package/src/post-comments-form/edit.js +10 -0
  326. package/src/post-comments-form/form.js +7 -1
  327. package/src/post-content/block.json +3 -0
  328. package/src/post-content/edit.js +14 -6
  329. package/src/post-excerpt/index.php +2 -2
  330. package/src/post-featured-image/index.php +2 -2
  331. package/src/post-featured-image/overlay.js +1 -0
  332. package/src/post-navigation-link/index.php +0 -5
  333. package/src/post-navigation-link/style.scss +4 -0
  334. package/src/post-template/index.php +1 -1
  335. package/src/post-terms/index.php +5 -2
  336. package/src/preformatted/edit.js +5 -0
  337. package/src/preformatted/index.js +1 -1
  338. package/src/pullquote/deprecated.js +8 -13
  339. package/src/query/edit/enhanced-pagination-modal.js +65 -0
  340. package/src/query/edit/inspector-controls/enhanced-pagination-control.js +49 -0
  341. package/src/query/edit/inspector-controls/index.js +9 -45
  342. package/src/query/edit/query-content.js +8 -0
  343. package/src/query/editor.scss +10 -0
  344. package/src/query/index.php +29 -16
  345. package/src/query/style.scss +2 -2
  346. package/src/query/utils.js +22 -0
  347. package/src/query/view.js +5 -5
  348. package/src/query-pagination-next/index.php +1 -1
  349. package/src/query-pagination-previous/index.php +1 -1
  350. package/src/reset.scss +1 -1
  351. package/src/search/block.json +1 -0
  352. package/src/search/index.php +45 -4
  353. package/src/search/test/__snapshots__/edit.native.js.snap +265 -363
  354. package/src/search/view.js +70 -169
  355. package/src/social-link/edit.native.js +1 -1
  356. package/src/social-link/editor.native.scss +4 -0
  357. package/src/table/edit.js +21 -19
  358. package/src/table-of-contents/block.json +2 -1
  359. package/src/table-of-contents/edit.js +5 -162
  360. package/src/table-of-contents/hooks.js +156 -0
  361. package/src/verse/edit.js +5 -0
  362. package/src/verse/index.js +1 -1
  363. package/src/verse/test/edit.native.js +2 -3
  364. package/build/file/view-interactivity.js +0 -22
  365. package/build/file/view-interactivity.js.map +0 -1
  366. package/build/image/view-interactivity.js.map +0 -1
  367. package/build/navigation/view-interactivity.js +0 -172
  368. package/build/navigation/view-interactivity.js.map +0 -1
  369. package/build/navigation/view-modal.js +0 -115
  370. package/build/navigation/view-modal.js.map +0 -1
  371. package/build-module/file/view-interactivity.js +0 -18
  372. package/build-module/file/view-interactivity.js.map +0 -1
  373. package/build-module/image/view-interactivity.js.map +0 -1
  374. package/build-module/navigation/view-interactivity.js +0 -169
  375. package/build-module/navigation/view-interactivity.js.map +0 -1
  376. package/build-module/navigation/view-modal.js +0 -112
  377. package/build-module/navigation/view-modal.js.map +0 -1
  378. package/src/file/view-interactivity.js +0 -18
  379. package/src/navigation/view-interactivity.js +0 -196
  380. package/src/navigation/view-modal.js +0 -127
  381. /package/src/image/{view-interactivity.js → view.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["__","useBlockProps","useInnerBlocksProps","__experimentalRecursionProvider","RecursionProvider","__experimentalUseHasRecursion","useHasRecursion","Warning","useEntityProp","useEntityBlockEditor","store","coreStore","useSelect","useCanEditEntity","ReadOnlyContent","userCanEdit","postType","postId","content","blockProps","protected","createElement","dangerouslySetInnerHTML","__html","rendered","EditableContent","context","blocks","onInput","onChange","id","entityRecord","select","getEntityRecord","hasInnerBlocks","raw","length","initialInnerBlocks","props","className","value","template","undefined","Content","queryId","isDescendentOfQueryLoop","Number","isFinite","isEditable","Placeholder","layoutClassNames","RecursionError","PostContentEdit","attributes","__unstableLayoutClassNames","contextPostId","contextPostType","layout","hasAlreadyRendered","uniqueId"],"sources":["@wordpress/block-library/src/post-content/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\t__experimentalRecursionProvider as RecursionProvider,\n\t__experimentalUseHasRecursion as useHasRecursion,\n\tWarning,\n} from '@wordpress/block-editor';\nimport {\n\tuseEntityProp,\n\tuseEntityBlockEditor,\n\tstore as coreStore,\n} from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n/**\n * Internal dependencies\n */\nimport { useCanEditEntity } from '../utils/hooks';\n\nfunction ReadOnlyContent( { userCanEdit, postType, postId } ) {\n\tconst [ , , content ] = useEntityProp(\n\t\t'postType',\n\t\tpostType,\n\t\t'content',\n\t\tpostId\n\t);\n\tconst blockProps = useBlockProps();\n\treturn content?.protected && ! userCanEdit ? (\n\t\t<div { ...blockProps }>\n\t\t\t<Warning>{ __( 'This content is password protected.' ) }</Warning>\n\t\t</div>\n\t) : (\n\t\t<div\n\t\t\t{ ...blockProps }\n\t\t\tdangerouslySetInnerHTML={ { __html: content?.rendered } }\n\t\t></div>\n\t);\n}\n\nfunction EditableContent( { context = {} } ) {\n\tconst { postType, postId } = context;\n\n\tconst [ blocks, onInput, onChange ] = useEntityBlockEditor(\n\t\t'postType',\n\t\tpostType,\n\t\t{ id: postId }\n\t);\n\n\tconst entityRecord = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( coreStore ).getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\tconst hasInnerBlocks = !! entityRecord?.content?.raw || blocks?.length;\n\n\tconst initialInnerBlocks = [ [ 'core/paragraph' ] ];\n\n\tconst props = useInnerBlocksProps(\n\t\tuseBlockProps( { className: 'entry-content' } ),\n\t\t{\n\t\t\tvalue: blocks,\n\t\t\tonInput,\n\t\t\tonChange,\n\t\t\ttemplate: ! hasInnerBlocks ? initialInnerBlocks : undefined,\n\t\t}\n\t);\n\treturn <div { ...props } />;\n}\n\nfunction Content( props ) {\n\tconst { context: { queryId, postType, postId } = {} } = props;\n\tconst userCanEdit = useCanEditEntity( 'postType', postType, postId );\n\tif ( userCanEdit === undefined ) {\n\t\treturn null;\n\t}\n\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\tconst isEditable = userCanEdit && ! isDescendentOfQueryLoop;\n\n\treturn isEditable ? (\n\t\t<EditableContent { ...props } />\n\t) : (\n\t\t<ReadOnlyContent\n\t\t\tuserCanEdit={ userCanEdit }\n\t\t\tpostType={ postType }\n\t\t\tpostId={ postId }\n\t\t/>\n\t);\n}\n\nfunction Placeholder( { layoutClassNames } ) {\n\tconst blockProps = useBlockProps( { className: layoutClassNames } );\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'This is the Content block, it will display all the blocks in any single post or page.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t</div>\n\t);\n}\n\nfunction RecursionError() {\n\tconst blockProps = useBlockProps();\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<Warning>\n\t\t\t\t{ __( 'Block cannot be rendered inside itself.' ) }\n\t\t\t</Warning>\n\t\t</div>\n\t);\n}\n\nexport default function PostContentEdit( {\n\tcontext,\n\tattributes,\n\t__unstableLayoutClassNames: layoutClassNames,\n} ) {\n\tconst { postId: contextPostId, postType: contextPostType } = context;\n\tconst { layout = {} } = attributes;\n\tconst hasAlreadyRendered = useHasRecursion( contextPostId );\n\n\tif ( contextPostId && contextPostType && hasAlreadyRendered ) {\n\t\treturn <RecursionError />;\n\t}\n\n\treturn (\n\t\t<RecursionProvider uniqueId={ contextPostId }>\n\t\t\t{ contextPostId && contextPostType ? (\n\t\t\t\t<Content context={ context } layout={ layout } />\n\t\t\t) : (\n\t\t\t\t<Placeholder layoutClassNames={ layoutClassNames } />\n\t\t\t) }\n\t\t</RecursionProvider>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,aAAa,EACbC,mBAAmB,EACnBC,+BAA+B,IAAIC,iBAAiB,EACpDC,6BAA6B,IAAIC,eAAe,EAChDC,OAAO,QACD,yBAAyB;AAChC,SACCC,aAAa,EACbC,oBAAoB,EACpBC,KAAK,IAAIC,SAAS,QACZ,sBAAsB;AAC7B,SAASC,SAAS,QAAQ,iBAAiB;AAC3C;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,gBAAgB;AAEjD,SAASC,eAAeA,CAAE;EAAEC,WAAW;EAAEC,QAAQ;EAAEC;AAAO,CAAC,EAAG;EAC7D,MAAM,IAAMC,OAAO,CAAE,GAAGV,aAAa,CACpC,UAAU,EACVQ,QAAQ,EACR,SAAS,EACTC,MACD,CAAC;EACD,MAAME,UAAU,GAAGlB,aAAa,CAAC,CAAC;EAClC,OAAOiB,OAAO,EAAEE,SAAS,IAAI,CAAEL,WAAW,GACzCM,aAAA;IAAA,GAAUF;EAAU,GACnBE,aAAA,CAACd,OAAO,QAAGP,EAAE,CAAE,qCAAsC,CAAY,CAC7D,CAAC,GAENqB,aAAA;IAAA,GACMF,UAAU;IACfG,uBAAuB,EAAG;MAAEC,MAAM,EAAEL,OAAO,EAAEM;IAAS;EAAG,CACpD,CACN;AACF;AAEA,SAASC,eAAeA,CAAE;EAAEC,OAAO,GAAG,CAAC;AAAE,CAAC,EAAG;EAC5C,MAAM;IAAEV,QAAQ;IAAEC;EAAO,CAAC,GAAGS,OAAO;EAEpC,MAAM,CAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ,CAAE,GAAGpB,oBA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A;EAAQ,CAAE,CAAC,GAEjDpC,aAAA,CAAC4B,WAAW;IAACC,gBAAgB,EAAGA;EAAkB,CAAE,CAEnC,CAAC;AAEtB"}
1
+ {"version":3,"names":["__","useBlockProps","useInnerBlocksProps","__experimentalRecursionProvider","RecursionProvider","__experimentalUseHasRecursion","useHasRecursion","Warning","useEntityProp","useEntityBlockEditor","store","coreStore","useSelect","useCanEditEntity","ReadOnlyContent","layoutClassNames","userCanEdit","postType","postId","content","blockProps","className","protected","createElement","dangerouslySetInnerHTML","__html","rendered","EditableContent","context","blocks","onInput","onChange","id","entityRecord","select","getEntityRecord","hasInnerBlocks","raw","length","initialInnerBlocks","props","value","template","undefined","Content","queryId","isDescendentOfQueryLoop","Number","isFinite","isEditable","Placeholder","RecursionError","PostContentEdit","__unstableLayoutClassNames","contextPostId","contextPostType","hasAlreadyRendered","uniqueId"],"sources":["@wordpress/block-library/src/post-content/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\t__experimentalRecursionProvider as RecursionProvider,\n\t__experimentalUseHasRecursion as useHasRecursion,\n\tWarning,\n} from '@wordpress/block-editor';\nimport {\n\tuseEntityProp,\n\tuseEntityBlockEditor,\n\tstore as coreStore,\n} from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n/**\n * Internal dependencies\n */\nimport { useCanEditEntity } from '../utils/hooks';\n\nfunction ReadOnlyContent( {\n\tlayoutClassNames,\n\tuserCanEdit,\n\tpostType,\n\tpostId,\n} ) {\n\tconst [ , , content ] = useEntityProp(\n\t\t'postType',\n\t\tpostType,\n\t\t'content',\n\t\tpostId\n\t);\n\tconst blockProps = useBlockProps( { className: layoutClassNames } );\n\treturn content?.protected && ! userCanEdit ? (\n\t\t<div { ...blockProps }>\n\t\t\t<Warning>{ __( 'This content is password protected.' ) }</Warning>\n\t\t</div>\n\t) : (\n\t\t<div\n\t\t\t{ ...blockProps }\n\t\t\tdangerouslySetInnerHTML={ { __html: content?.rendered } }\n\t\t></div>\n\t);\n}\n\nfunction EditableContent( { context = {} } ) {\n\tconst { postType, postId } = context;\n\n\tconst [ blocks, onInput, onChange ] = useEntityBlockEditor(\n\t\t'postType',\n\t\tpostType,\n\t\t{ id: postId }\n\t);\n\n\tconst entityRecord = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( coreStore ).getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\tconst hasInnerBlocks = !! entityRecord?.content?.raw || blocks?.length;\n\n\tconst initialInnerBlocks = [ [ 'core/paragraph' ] ];\n\n\tconst props = useInnerBlocksProps(\n\t\tuseBlockProps( { className: 'entry-content' } ),\n\t\t{\n\t\t\tvalue: blocks,\n\t\t\tonInput,\n\t\t\tonChange,\n\t\t\ttemplate: ! hasInnerBlocks ? initialInnerBlocks : undefined,\n\t\t}\n\t);\n\treturn <div { ...props } />;\n}\n\nfunction Content( props ) {\n\tconst { context: { queryId, postType, postId } = {}, layoutClassNames } =\n\t\tprops;\n\tconst userCanEdit = useCanEditEntity( 'postType', postType, postId );\n\tif ( userCanEdit === undefined ) {\n\t\treturn null;\n\t}\n\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\tconst isEditable = userCanEdit && ! isDescendentOfQueryLoop;\n\n\treturn isEditable ? (\n\t\t<EditableContent { ...props } />\n\t) : (\n\t\t<ReadOnlyContent\n\t\t\tlayoutClassNames={ layoutClassNames }\n\t\t\tuserCanEdit={ userCanEdit }\n\t\t\tpostType={ postType }\n\t\t\tpostId={ postId }\n\t\t/>\n\t);\n}\n\nfunction Placeholder( { layoutClassNames } ) {\n\tconst blockProps = useBlockProps( { className: layoutClassNames } );\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'This is the Content block, it will display all the blocks in any single post or page.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t</div>\n\t);\n}\n\nfunction RecursionError() {\n\tconst blockProps = useBlockProps();\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<Warning>\n\t\t\t\t{ __( 'Block cannot be rendered inside itself.' ) }\n\t\t\t</Warning>\n\t\t</div>\n\t);\n}\n\nexport default function PostContentEdit( {\n\tcontext,\n\t__unstableLayoutClassNames: layoutClassNames,\n} ) {\n\tconst { postId: contextPostId, postType: contextPostType } = context;\n\tconst hasAlreadyRendered = useHasRecursion( contextPostId );\n\n\tif ( contextPostId && contextPostType && hasAlreadyRendered ) {\n\t\treturn <RecursionError />;\n\t}\n\n\treturn (\n\t\t<RecursionProvider uniqueId={ contextPostId }>\n\t\t\t{ contextPostId && contextPostType ? (\n\t\t\t\t<Content\n\t\t\t\t\tcontext={ context }\n\t\t\t\t\tlayoutClassNames={ layoutClassNames }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<Placeholder layoutClassNames={ layoutClassNames } />\n\t\t\t) }\n\t\t</RecursionProvider>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,aAAa,EACbC,mBAAmB,EACnBC,+BAA+B,IAAIC,iBAAiB,EACpDC,6BAA6B,IAAIC,eAAe,EAChDC,OAAO,QACD,yBAAyB;AAChC,SACCC,aAAa,EACbC,oBAAoB,EACpBC,KAAK,IAAIC,SAAS,QACZ,sBAAsB;AAC7B,SAASC,SAAS,QAAQ,iBAAiB;AAC3C;AACA;AACA;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B,EAAE,CACH,kIACD,CACE,CACC,CAAC;AAER;AAEA,SAASmD,cAAcA,CAAA,EAAG;EACzB,MAAM/B,UAAU,GAAGnB,aAAa,CAAC,CAAC;EAClC,OACCsB,aAAA;IAAA,GAAUH;EAAU,GACnBG,aAAA,CAAChB,OAAO,QACLP,EAAE,CAAE,yCAA0C,CACxC,CACL,CAAC;AAER;AAEA,eAAe,SAASoD,eAAeA,CAAE;EACxCxB,OAAO;EACPyB,0BAA0B,EAAEtC;AAC7B,CAAC,EAAG;EACH,MAAM;IAAEG,MAAM,EAAEoC,aAAa;IAAErC,QAAQ,EAAEsC;EAAgB,CAAC,GAAG3B,OAAO;EACpE,MAAM4B,kBAAkB,GAAGlD,eAAe,CAAEgD,aAAc,CAAC;EAE3D,IAAKA,aAAa,IAAIC,eAAe,IAAIC,kBAAkB,EAAG;IAC7D,OAAOjC,aAAA,CAAC4B,cAAc,MAAE,CAAC;EAC1B;EAEA,OACC5B,aAAA,CAACnB,iBAAiB;IAACqD,QAAQ,EAAGH;EAAe,GAC1CA,aAAa,IAAIC,eAAe,GACjChC,aAAA,CAACqB,OAAO;IACPhB,OAAO,EAAGA,OAAS;IACnBb,gBAAgB,EAAGA;EAAkB,CACrC,CAAC,GAEFQ,aAAA,CAAC2B,WAAW;IAACnC,gBAAgB,EAAGA;EAAkB,CAAE,CAEnC,CAAC;AAEtB"}
@@ -23,6 +23,9 @@ const metadata = {
23
23
  dimensions: {
24
24
  minHeight: true
25
25
  },
26
+ spacing: {
27
+ blockGap: true
28
+ },
26
29
  color: {
27
30
  gradients: true,
28
31
  link: true,
@@ -1 +1 @@
1
- {"version":3,"names":["postContent","icon","initBlock","metadata","$schema","apiVersion","name","title","category","description","textdomain","usesContext","supports","align","html","layout","dimensions","minHeight","color","gradients","link","__experimentalDefaultControls","background","text","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","editorStyle","edit","settings","init"],"sources":["@wordpress/block-library/src/post-content/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postContent as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,IAAI,QAAQ,kBAAkB;;AAEtD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,WAAA;EAAAC,QAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,MAAA;IAAAC,UAAA;MAAAC,SAAA;IAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAX,6BAAA;QAAAI,QAAA;MAAA;IAAA;EAAA;EAAAQ,WAAA;AAAA;AAE5C,OAAOC,IAAI,MAAM,QAAQ;AAEzB,MAAM;EAAE5B;AAAK,CAAC,GAAGH,QAAQ;AACzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAM6B,QAAQ,GAAG;EACvBlC,IAAI;EACJiC;AACD,CAAC;AAED,OAAO,MAAME,IAAI,GAAGA,CAAA,KAAMlC,SAAS,CAAE;EAAEI,IAAI;EAAEH,QAAQ;EAAEgC;AAAS,CAAE,CAAC"}
1
+ {"version":3,"names":["postContent","icon","initBlock","metadata","$schema","apiVersion","name","title","category","description","textdomain","usesContext","supports","align","html","layout","dimensions","minHeight","spacing","blockGap","color","gradients","link","__experimentalDefaultControls","background","text","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","editorStyle","edit","settings","init"],"sources":["@wordpress/block-library/src/post-content/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postContent as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,IAAI,QAAQ,kBAAkB;;AAEtD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,WAAA;EAAAC,QAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,MAAA;IAAAC,UAAA;MAAAC,SAAA;IAAA;IAAAC,OAAA;MAAAC,QAAA;IAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAX,6BAAA;QAAAI,QAAA;MAAA;IAAA;EAAA;EAAAQ,WAAA;AAAA;AAE5C,OAAOC,IAAI,MAAM,QAAQ;AAEzB,MAAM;EAAE9B;AAAK,CAAC,GAAGH,QAAQ;AACzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAM+B,QAAQ,GAAG;EACvBpC,IAAI;EACJmC;AACD,CAAC;AAED,OAAO,MAAME,IAAI,GAAGA,CAAA,KAAMpC,SAAS,CAAE;EAAEI,IAAI;EAAEH,QAAQ;EAAEkC;AAAS,CAAE,CAAC"}
@@ -91,7 +91,8 @@ const Overlay = ({
91
91
  min: 0,
92
92
  max: 100,
93
93
  step: 10,
94
- required: true
94
+ required: true,
95
+ __next40pxDefaultSize: true
95
96
  }))));
96
97
  };
97
98
  export default compose([withColors({
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","RangeControl","__experimentalToolsPanelItem","ToolsPanelItem","InspectorControls","withColors","__experimentalColorGradientSettingsDropdown","ColorGradientSettingsDropdown","__experimentalUseGradient","__experimentalUseMultipleOriginColorsAndGradients","useMultipleOriginColorsAndGradients","__experimentalUseBorderProps","useBorderProps","compose","__","dimRatioToClass","Overlay","clientId","attributes","setAttributes","overlayColor","setOverlayColor","dimRatio","gradientClass","gradientValue","setGradient","colorGradientSettings","borderProps","overlayStyles","backgroundColor","color","backgroundImage","style","hasColorsOrGradients","createElement","Fragment","className","class","undefined","group","__experimentalIsRenderedInSidebar","settings","colorValue","label","onColorChange","onGradientChange","isShownByDefault","resetAllFilter","customOverlayColor","gradient","customGradient","panelId","hasValue","onDeselect","__nextHasNoMarginBottom","value","onChange","newDimRatio","min","max","step","required"],"sources":["@wordpress/block-library/src/post-featured-image/overlay.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRangeControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport {\n\tInspectorControls,\n\twithColors,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseGradient,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n\t__experimentalUseBorderProps as useBorderProps,\n} from '@wordpress/block-editor';\nimport { compose } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { dimRatioToClass } from './utils';\n\nconst Overlay = ( {\n\tclientId,\n\tattributes,\n\tsetAttributes,\n\toverlayColor,\n\tsetOverlayColor,\n} ) => {\n\tconst { dimRatio } = attributes;\n\tconst { gradientClass, gradientValue, setGradient } =\n\t\t__experimentalUseGradient();\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\tconst borderProps = useBorderProps( attributes );\n\tconst overlayStyles = {\n\t\tbackgroundColor: overlayColor.color,\n\t\tbackgroundImage: gradientValue,\n\t\t...borderProps.style,\n\t};\n\n\tif ( ! colorGradientSettings.hasColorsOrGradients ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ !! dimRatio && (\n\t\t\t\t<span\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'wp-block-post-featured-image__overlay',\n\t\t\t\t\t\tdimRatioToClass( dimRatio ),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ overlayColor.class ]: overlayColor.class,\n\t\t\t\t\t\t\t'has-background-dim': dimRatio !== undefined,\n\t\t\t\t\t\t\t'has-background-gradient': gradientValue,\n\t\t\t\t\t\t\t[ gradientClass ]: gradientClass,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tborderProps.className\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ overlayStyles }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcolorValue: overlayColor.color,\n\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\tlabel: __( 'Overlay' ),\n\t\t\t\t\t\t\tonColorChange: setOverlayColor,\n\t\t\t\t\t\t\tonGradientChange: setGradient,\n\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\tresetAllFilter: () => ( {\n\t\t\t\t\t\t\t\toverlayColor: undefined,\n\t\t\t\t\t\t\t\tcustomOverlayColor: undefined,\n\t\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t\t\tcustomGradient: undefined,\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\tpanelId={ clientId }\n\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t/>\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => dimRatio !== undefined }\n\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\tonDeselect={ () => setAttributes( { dimRatio: 0 } ) }\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\tdimRatio: 0,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\tonChange={ ( newDimRatio ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tdimRatio: newDimRatio,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\tstep={ 10 }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n};\n\nexport default compose( [\n\twithColors( { overlayColor: 'background-color' } ),\n] )( Overlay );\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,YAAY,EACZC,4BAA4B,IAAIC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C;AAED,eAAehD,OAAO,CAAE,CACvBR,UAAU,CAAE;EAAEe,YAAY,EAAE;AAAmB,CAAE,CAAC,CACjD,CAAC,CAAEJ,OAAQ,CAAC"}
1
+ {"version":3,"names":["classnames","RangeControl","__experimentalToolsPanelItem","ToolsPanelItem","InspectorControls","withColors","__experimentalColorGradientSettingsDropdown","ColorGradientSettingsDropdown","__experimentalUseGradient","__experimentalUseMultipleOriginColorsAndGradients","useMultipleOriginColorsAndGradients","__experimentalUseBorderProps","useBorderProps","compose","__","dimRatioToClass","Overlay","clientId","attributes","setAttributes","overlayColor","setOverlayColor","dimRatio","gradientClass","gradientValue","setGradient","colorGradientSettings","borderProps","overlayStyles","backgroundColor","color","backgroundImage","style","hasColorsOrGradients","createElement","Fragment","className","class","undefined","group","__experimentalIsRenderedInSidebar","settings","colorValue","label","onColorChange","onGradientChange","isShownByDefault","resetAllFilter","customOverlayColor","gradient","customGradient","panelId","hasValue","onDeselect","__nextHasNoMarginBottom","value","onChange","newDimRatio","min","max","step","required","__next40pxDefaultSize"],"sources":["@wordpress/block-library/src/post-featured-image/overlay.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRangeControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport {\n\tInspectorControls,\n\twithColors,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseGradient,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n\t__experimentalUseBorderProps as useBorderProps,\n} from '@wordpress/block-editor';\nimport { compose } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { dimRatioToClass } from './utils';\n\nconst Overlay = ( {\n\tclientId,\n\tattributes,\n\tsetAttributes,\n\toverlayColor,\n\tsetOverlayColor,\n} ) => {\n\tconst { dimRatio } = attributes;\n\tconst { gradientClass, gradientValue, setGradient } =\n\t\t__experimentalUseGradient();\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\tconst borderProps = useBorderProps( attributes );\n\tconst overlayStyles = {\n\t\tbackgroundColor: overlayColor.color,\n\t\tbackgroundImage: gradientValue,\n\t\t...borderProps.style,\n\t};\n\n\tif ( ! colorGradientSettings.hasColorsOrGradients ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ !! dimRatio && (\n\t\t\t\t<span\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'wp-block-post-featured-image__overlay',\n\t\t\t\t\t\tdimRatioToClass( dimRatio ),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ overlayColor.class ]: overlayColor.class,\n\t\t\t\t\t\t\t'has-background-dim': dimRatio !== undefined,\n\t\t\t\t\t\t\t'has-background-gradient': gradientValue,\n\t\t\t\t\t\t\t[ gradientClass ]: gradientClass,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tborderProps.className\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ overlayStyles }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcolorValue: overlayColor.color,\n\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\tlabel: __( 'Overlay' ),\n\t\t\t\t\t\t\tonColorChange: setOverlayColor,\n\t\t\t\t\t\t\tonGradientChange: setGradient,\n\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\tresetAllFilter: () => ( {\n\t\t\t\t\t\t\t\toverlayColor: undefined,\n\t\t\t\t\t\t\t\tcustomOverlayColor: undefined,\n\t\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t\t\tcustomGradient: undefined,\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\tpanelId={ clientId }\n\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t/>\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => dimRatio !== undefined }\n\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\tonDeselect={ () => setAttributes( { dimRatio: 0 } ) }\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\tdimRatio: 0,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\tonChange={ ( newDimRatio ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tdimRatio: newDimRatio,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\tstep={ 10 }\n\t\t\t\t\t\trequired\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n};\n\nexport default compose( [\n\twithColors( { overlayColor: 'background-color' } ),\n] )( Overlay );\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,YAAY,EACZC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SACCC,iBAAiB,EACjBC,UAAU,EACVC,2CAA2C,IAAIC,6BAA6B,EAC5EC,yBAAyB,EACzBC,iDAAiD,IAAIC,mCAAmC,EACxFC,4BAA4B,IAAIC,cAAc,QACxC,yB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element";
4
4
  */
5
5
  import { __ } from '@wordpress/i18n';
6
6
  import { RichText, useBlockProps } from '@wordpress/block-editor';
7
+ import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
7
8
  export default function PreformattedEdit({
8
9
  attributes,
9
10
  mergeBlocks,
10
11
  setAttributes,
11
12
  onRemove,
13
+ insertBlocksAfter,
12
14
  style
13
15
  }) {
14
16
  const {
@@ -32,7 +34,8 @@ export default function PreformattedEdit({
32
34
  placeholder: __('Write preformatted text…'),
33
35
  onMerge: mergeBlocks,
34
36
  ...blockProps,
35
- __unstablePastePlainText: true
37
+ __unstablePastePlainText: true,
38
+ __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter(createBlock(getDefaultBlockName()))
36
39
  });
37
40
  }
38
41
  //# sourceMappingURL=edit.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__","RichText","useBlockProps","PreformattedEdit","attributes","mergeBlocks","setAttributes","onRemove","style","content","blockProps","createElement","tagName","identifier","preserveWhiteSpace","value","onChange","nextContent","placeholder","onMerge","__unstablePastePlainText"],"sources":["@wordpress/block-library/src/preformatted/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\n\nexport default function PreformattedEdit( {\n\tattributes,\n\tmergeBlocks,\n\tsetAttributes,\n\tonRemove,\n\tstyle,\n} ) {\n\tconst { content } = attributes;\n\tconst blockProps = useBlockProps( { style } );\n\n\treturn (\n\t\t<RichText\n\t\t\ttagName=\"pre\"\n\t\t\tidentifier=\"content\"\n\t\t\tpreserveWhiteSpace\n\t\t\tvalue={ content }\n\t\t\tonChange={ ( nextContent ) => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tcontent: nextContent,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tonRemove={ onRemove }\n\t\t\taria-label={ __( 'Preformatted text' ) }\n\t\t\tplaceholder={ __( 'Write preformatted text…' ) }\n\t\t\tonMerge={ mergeBlocks }\n\t\t\t{ ...blockProps }\n\t\t\t__unstablePastePlainText\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,EAAEC,aAAa,QAAQ,yBAAyB;AAEjE,eAAe,SAASC,gBAAgBA,CAAE;EACzCC,UAAU;EACVC,WAAW;EACXC,aAAa;EACbC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAQ,CAAC,GAAGL,UAAU;EAC9B,MAAMM,UAAU,GAAGR,aAAa,CAAE;IAAEM;EAAM,CAAE,CAAC;EAE7C,OACCG,aAAA,CAACV,QAAQ;IACRW,OAAO,EAAC,KAAK;IACbC,UAAU,EAAC,SAAS;IACpBC,kBAAkB;IAClBC,KAAK,EAAGN,OAAS;IACjBO,QAAQ,EAAKC,WAAW,IAAM;MAC7BX,aAAa,CAAE;QACdG,OAAO,EAAEQ;MACV,CAAE,CAAC;IACJ,CAAG;IACHV,QAAQ,EAAGA,QAAU;IACrB,cAAaP,EAAE,CAAE,mBAAoB,CAAG;IACxCkB,WAAW,EAAGlB,EAAE,CAAE,0BAA2B,CAAG;IAChDmB,OAAO,EAAGd,WAAa;IAAA,GAClBK,UAAU;IACfU,wBAAwB;EAAA,CACxB,CAAC;AAEJ"}
1
+ {"version":3,"names":["__","RichText","useBlockProps","createBlock","getDefaultBlockName","PreformattedEdit","attributes","mergeBlocks","setAttributes","onRemove","insertBlocksAfter","style","content","blockProps","createElement","tagName","identifier","preserveWhiteSpace","value","onChange","nextContent","placeholder","onMerge","__unstablePastePlainText","__unstableOnSplitAtDoubleLineEnd"],"sources":["@wordpress/block-library/src/preformatted/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\nexport default function PreformattedEdit( {\n\tattributes,\n\tmergeBlocks,\n\tsetAttributes,\n\tonRemove,\n\tinsertBlocksAfter,\n\tstyle,\n} ) {\n\tconst { content } = attributes;\n\tconst blockProps = useBlockProps( { style } );\n\n\treturn (\n\t\t<RichText\n\t\t\ttagName=\"pre\"\n\t\t\tidentifier=\"content\"\n\t\t\tpreserveWhiteSpace\n\t\t\tvalue={ content }\n\t\t\tonChange={ ( nextContent ) => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tcontent: nextContent,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tonRemove={ onRemove }\n\t\t\taria-label={ __( 'Preformatted text' ) }\n\t\t\tplaceholder={ __( 'Write preformatted text…' ) }\n\t\t\tonMerge={ mergeBlocks }\n\t\t\t{ ...blockProps }\n\t\t\t__unstablePastePlainText\n\t\t\t__unstableOnSplitAtDoubleLineEnd={ () =>\n\t\t\t\tinsertBlocksAfter( createBlock( getDefaultBlockName() ) )\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,EAAEC,aAAa,QAAQ,yBAAyB;AACjE,SAASC,WAAW,EAAEC,mBAAmB,QAAQ,mBAAmB;AAEpE,eAAe,SAASC,gBAAgBA,CAAE;EACzCC,UAAU;EACVC,WAAW;EACXC,aAAa;EACbC,QAAQ;EACRC,iBAAiB;EACjBC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAQ,CAAC,GAAGN,UAAU;EAC9B,MAAMO,UAAU,GAAGX,aAAa,CAAE;IAAES;EAAM,CAAE,CAAC;EAE7C,OACCG,aAAA,CAACb,QAAQ;IACRc,OAAO,EAAC,KAAK;IACbC,UAAU,EAAC,SAAS;IACpBC,kBAAkB;IAClBC,KAAK,EAAGN,OAAS;IACjBO,QAAQ,EAAKC,WAAW,IAAM;MAC7BZ,aAAa,CAAE;QACdI,OAAO,EAAEQ;MACV,CAAE,CAAC;IACJ,CAAG;IACHX,QAAQ,EAAGA,QAAU;IACrB,cAAaT,EAAE,CAAE,mBAAoB,CAAG;IACxCqB,WAAW,EAAGrB,EAAE,CAAE,0BAA2B,CAAG;IAChDsB,OAAO,EAAGf,WAAa;IAAA,GAClBM,UAAU;IACfU,wBAAwB;IACxBC,gCAAgC,EAAGA,CAAA,KAClCd,iBAAiB,CAAEP,WAAW,CAAEC,mBAAmB,CAAC,CAAE,CAAE;EACxD,CACD,CAAC;AAEJ"}
@@ -78,7 +78,7 @@ export const settings = {
78
78
  save,
79
79
  merge(attributes, attributesToMerge) {
80
80
  return {
81
- content: attributes.content + attributesToMerge.content
81
+ content: attributes.content + '\n\n' + attributesToMerge.content
82
82
  };
83
83
  }
84
84
  };
@@ -1 +1 @@
1
- {"version":3,"names":["__","preformatted","icon","initBlock","edit","metadata","$schema","apiVersion","name","title","category","description","textdomain","attributes","content","type","source","selector","__unstablePreserveWhiteSpace","__experimentalRole","supports","anchor","color","gradients","__experimentalDefaultControls","background","text","spacing","padding","margin","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","style","save","transforms","settings","example","merge","attributesToMerge","init"],"sources":["@wordpress/block-library/src/preformatted/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { preformatted as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\t/* eslint-disable @wordpress/i18n-no-collapsible-whitespace */\n\t\t\t// translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work.\n\t\t\tcontent: __(\n\t\t\t\t'EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\\nWindow, very small in the distance, illuminated.\\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;'\n\t\t\t),\n\t\t\t/* eslint-enable @wordpress/i18n-no-collapsible-whitespace */\n\t\t},\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent: attributes.content + attributesToMerge.content,\n\t\t};\n\t},\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,IAAIC,IAAI,QAAQ,kBAAkB;;AAEvD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,OAAA;MAAAC,IAAA;MAAAC,MAAA;MAAAC,QAAA;MAAA;MAAAC,4BAAA;MAAAC,kBAAA;IAAA;EAAA;EAAAC,QAAA;IAAAC,MAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;IAAAC,OAAA;MAAAC,OAAA;MAAAC,MAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAd,6BAAA;QAAAO,QAAA;MAAA;IAAA;EAAA;EAAAQ,KAAA;AAAA;AAE1B,OAAOC,IAAI,MAAM,QAAQ;AACzB,OAAOC,UAAU,MAAM,cAAc;AAErC,MAAM;EAAEjC;AAAK,CAAC,GAAGH,QAAQ;AAEzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAMkC,QAAQ,GAAG;EACvBxC,IAAI;EACJyC,OAAO,EAAE;IACR9B,UAAU,EAAE;MACX;MACA;MACAC,OAAO,EAAEd,EAAE,CACV,wQACD;MACA;IACD;EACD,CAAC;;EACDyC,UAAU;EACVrC,IAAI;EACJoC,IAAI;EACJI,KAAKA,CAAE/B,UAAU,EAAEgC,iBAAiB,EAAG;IACtC,OAAO;MACN/B,OAAO,EAAED,UAAU,CAACC,OAAO,GAAG+B,iBAAiB,CAAC/B;IACjD,CAAC;EACF;AACD,CAAC;AAED,OAAO,MAAMgC,IAAI,GAAGA,CAAA,KAAM3C,SAAS,CAAE;EAAEK,IAAI;EAAEH,QAAQ;EAAEqC;AAAS,CAAE,CAAC"}
1
+ {"version":3,"names":["__","preformatted","icon","initBlock","edit","metadata","$schema","apiVersion","name","title","category","description","textdomain","attributes","content","type","source","selector","__unstablePreserveWhiteSpace","__experimentalRole","supports","anchor","color","gradients","__experimentalDefaultControls","background","text","spacing","padding","margin","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","style","save","transforms","settings","example","merge","attributesToMerge","init"],"sources":["@wordpress/block-library/src/preformatted/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { preformatted as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\t/* eslint-disable @wordpress/i18n-no-collapsible-whitespace */\n\t\t\t// translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work.\n\t\t\tcontent: __(\n\t\t\t\t'EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\\nWindow, very small in the distance, illuminated.\\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;'\n\t\t\t),\n\t\t\t/* eslint-enable @wordpress/i18n-no-collapsible-whitespace */\n\t\t},\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent: attributes.content + '\\n\\n' + attributesToMerge.content,\n\t\t};\n\t},\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,IAAIC,IAAI,QAAQ,kBAAkB;;AAEvD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,OAAA;MAAAC,IAAA;MAAAC,MAAA;MAAAC,QAAA;MAAA;MAAAC,4BAAA;MAAAC,kBAAA;IAAA;EAAA;EAAAC,QAAA;IAAAC,MAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;IAAAC,OAAA;MAAAC,OAAA;MAAAC,MAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAd,6BAAA;QAAAO,QAAA;MAAA;IAAA;EAAA;EAAAQ,KAAA;AAAA;AAE1B,OAAOC,IAAI,MAAM,QAAQ;AACzB,OAAOC,UAAU,MAAM,cAAc;AAErC,MAAM;EAAEjC;AAAK,CAAC,GAAGH,QAAQ;AAEzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAMkC,QAAQ,GAAG;EACvBxC,IAAI;EACJyC,OAAO,EAAE;IACR9B,UAAU,EAAE;MACX;MACA;MACAC,OAAO,EAAEd,EAAE,CACV,wQACD;MACA;IACD;EACD,CAAC;;EACDyC,UAAU;EACVrC,IAAI;EACJoC,IAAI;EACJI,KAAKA,CAAE/B,UAAU,EAAEgC,iBAAiB,EAAG;IACtC,OAAO;MACN/B,OAAO,EAAED,UAAU,CAACC,OAAO,GAAG,MAAM,GAAG+B,iBAAiB,CAAC/B;IAC1D,CAAC;EACF;AACD,CAAC;AAED,OAAO,MAAMgC,IAAI,GAAGA,CAAA,KAAM3C,SAAS,CAAE;EAAEK,IAAI;EAAEH,QAAQ;EAAEqC;AAAS,CAAE,CAAC"}
@@ -9,7 +9,6 @@ import classnames from 'classnames';
9
9
  */
10
10
  import { getColorClassName, getColorObjectByAttributeValues, RichText, store as blockEditorStore, useBlockProps } from '@wordpress/block-editor';
11
11
  import { select } from '@wordpress/data';
12
- import { create, replace, toHTMLString, __UNSTABLE_LINE_SEPARATOR } from '@wordpress/rich-text';
13
12
 
14
13
  /**
15
14
  * Internal dependencies
@@ -51,12 +50,12 @@ function parseBorderColor(styleString) {
51
50
  }
52
51
  }
53
52
  function multilineToInline(value) {
54
- return toHTMLString({
55
- value: replace(create({
56
- html: value,
57
- multilineTag: 'p'
58
- }), new RegExp(__UNSTABLE_LINE_SEPARATOR, 'g'), '\n')
59
- });
53
+ value = value || `<p></p>`;
54
+ const padded = `</p>${value}<p>`;
55
+ const values = padded.split(`</p><p>`);
56
+ values.shift();
57
+ values.pop();
58
+ return values.join('<br>');
60
59
  }
61
60
  const v5 = {
62
61
  attributes: {
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","getColorClassName","getColorObjectByAttributeValues","RichText","store","blockEditorStore","useBlockProps","select","create","replace","toHTMLString","__UNSTABLE_LINE_SEPARATOR","SOLID_COLOR_CLASS","blockAttributes","value","type","source","selector","multiline","citation","default","mainColor","customMainColor","textColor","customTextColor","parseBorderColor","styleString","matches","match","multilineToInline","html","multilineTag","RegExp","v5","attributes","__experimentalRole","textAlign","save","shouldShowCitation","isEmpty","createElement","className","Content","tagName","migrate","v4","isSolidColorStyle","includes","figureClasses","figureStyles","backgroundClass","backgroundColor","undefined","borderColor","blockquoteTextColorClass","blockquoteClasses","blockquoteStyles","color","style","border","background","text","v3","figureStyle","attribute","v2","figureClass","_select$getSettings$c","colors","getSettings","colorObject","blockquoteStyle","v1","v0","align"],"sources":["@wordpress/block-library/src/pullquote/deprecated.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n\tRichText,\n\tstore as blockEditorStore,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { select } from '@wordpress/data';\nimport {\n\tcreate,\n\treplace,\n\ttoHTMLString,\n\t__UNSTABLE_LINE_SEPARATOR,\n} from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { SOLID_COLOR_CLASS } from './shared';\n\nconst blockAttributes = {\n\tvalue: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'blockquote',\n\t\tmultiline: 'p',\n\t},\n\tcitation: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'cite',\n\t\tdefault: '',\n\t},\n\tmainColor: {\n\t\ttype: 'string',\n\t},\n\tcustomMainColor: {\n\t\ttype: 'string',\n\t},\n\ttextColor: {\n\t\ttype: 'string',\n\t},\n\tcustomTextColor: {\n\t\ttype: 'string',\n\t},\n};\n\nfunction parseBorderColor( styleString ) {\n\tif ( ! styleString ) {\n\t\treturn;\n\t}\n\tconst matches = styleString.match( /border-color:([^;]+)[;]?/ );\n\tif ( matches && matches[ 1 ] ) {\n\t\treturn matches[ 1 ];\n\t}\n}\n\nfunction multilineToInline( value ) {\n\treturn toHTMLString( {\n\t\tvalue: replace(\n\t\t\tcreate( { html: value, multilineTag: 'p' } ),\n\t\t\tnew RegExp( __UNSTABLE_LINE_SEPARATOR, 'g' ),\n\t\t\t'\\n'\n\t\t),\n\t} );\n}\n\nconst v5 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\ttextAlign: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { textAlign, citation, value } = attributes;\n\t\tconst shouldShowCitation = ! RichText.isEmpty( citation );\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\t{ ...useBlockProps.save( {\n\t\t\t\t\tclassName: classnames( {\n\t\t\t\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t\t\t} ),\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<blockquote>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\n// TODO: this is ripe for a bit of a clean up according to the example in https://developer.wordpress.org/block-editor/reference-guides/block-api/block-deprecation/#example\n\nconst v4 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\tcustomTextColor,\n\t\t\ttextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t} = attributes;\n\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\n\t\tlet figureClasses, figureStyles;\n\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tmainColor\n\t\t\t);\n\n\t\t\tfigureClasses = classnames( {\n\t\t\t\t'has-background': backgroundClass || customMainColor,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tfigureStyles = {\n\t\t\t\tbackgroundColor: backgroundClass ? undefined : customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses = classnames( {\n\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t} );\n\n\t\tconst blockquoteStyles = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\t{ ...useBlockProps.save( {\n\t\t\t\t\tclassName: figureClasses,\n\t\t\t\t\tstyle: figureStyles,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyles }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\t\tlet style;\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v3 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t\t// figureStyle is an attribute that never existed.\n\t\t// We are using it as a way to access the styles previously applied to the figure.\n\t\tfigureStyle: {\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure',\n\t\t\tattribute: 'style',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\ttextColor,\n\t\t\tcustomTextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t\tfigureStyle,\n\t\t} = attributes;\n\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\n\t\tlet figureClasses, figureStyles;\n\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tmainColor\n\t\t\t);\n\n\t\t\tfigureClasses = classnames( {\n\t\t\t\t'has-background': backgroundClass || customMainColor,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tfigureStyles = {\n\t\t\t\tbackgroundColor: backgroundClass ? undefined : customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t\t// If normal style and a named color are being used, we need to retrieve the color value to set the style,\n\t\t\t// as there is no expectation that themes create classes that set border colors.\n\t\t} else if ( mainColor ) {\n\t\t\t// Previously here we queried the color settings to know the color value\n\t\t\t// of a named color. This made the save function impure and the block was refactored,\n\t\t\t// because meanwhile a change in the editor made it impossible to query color settings in the save function.\n\t\t\t// Here instead of querying the color settings to know the color value, we retrieve the value\n\t\t\t// directly from the style previously serialized.\n\t\t\tconst borderColor = parseBorderColor( figureStyle );\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses =\n\t\t\t( textColor || customTextColor ) &&\n\t\t\tclassnames( 'has-text-color', {\n\t\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t\t} );\n\n\t\tconst blockquoteStyles = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\n\t\treturn (\n\t\t\t<figure className={ figureClasses } style={ figureStyles }>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyles }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tfigureStyle,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\t\tlet style;\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\t\t// If is the default style, and a main color is set,\n\t\t// migrate the main color value into a custom border color.\n\t\t// The custom border color value is retrieved by parsing the figure styles.\n\t\tif ( ! isSolidColorStyle && mainColor && figureStyle ) {\n\t\t\tconst borderColor = parseBorderColor( figureStyle );\n\t\t\tif ( borderColor ) {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: multilineToInline( value ),\n\t\t\t\t\t...attributes,\n\t\t\t\t\tclassName,\n\t\t\t\t\t// Block supports: Set style.border.color if a deprecated block has `mainColor`, inline border CSS and is not a solid color style.\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tborder: {\n\t\t\t\t\t\t\tcolor: borderColor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v2 = {\n\tattributes: blockAttributes,\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\ttextColor,\n\t\t\tcustomTextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t} = attributes;\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\n\t\tlet figureClass, figureStyles;\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tfigureClass = getColorClassName( 'background-color', mainColor );\n\t\t\tif ( ! figureClass ) {\n\t\t\t\tfigureStyles = {\n\t\t\t\t\tbackgroundColor: customMainColor,\n\t\t\t\t};\n\t\t\t}\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a named color is being used, we need to retrieve the color value to set the style,\n\t\t\t// as there is no expectation that themes create classes that set border colors.\n\t\t} else if ( mainColor ) {\n\t\t\tconst colors =\n\t\t\t\tselect( blockEditorStore ).getSettings().colors ?? [];\n\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\tcolors,\n\t\t\t\tmainColor\n\t\t\t);\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: colorObject.color,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses =\n\t\t\ttextColor || customTextColor\n\t\t\t\t? classnames( 'has-text-color', {\n\t\t\t\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t\t\t } )\n\t\t\t\t: undefined;\n\t\tconst blockquoteStyle = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\t\treturn (\n\t\t\t<figure className={ figureClass } style={ figureStyles }>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyle }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\t\tlet style = {};\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v1 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t},\n\tsave( { attributes } ) {\n\t\tconst { value, citation } = attributes;\n\t\treturn (\n\t\t\t<blockquote>\n\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v0 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'footer',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'none',\n\t\t},\n\t},\n\n\tsave( { attributes } ) {\n\t\tconst { value, citation, align } = attributes;\n\n\t\treturn (\n\t\t\t<blockquote className={ `align${ align }` }>\n\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"footer\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\n/**\n * New deprecations need to be placed first\n * for them to have higher priority.\n *\n * Old deprecations may need to be updated as well.\n *\n * See block-deprecation.md\n */\nexport default [ v5, v4, v3, v2, v1, v0 ];\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,iBAAiB,EACjBC,+BAA+B,EAC/BC,QAAQ,EACRC,KAAK,IAAIC,gBAAgB,EACzBC,aAAa,QACP,yBAAyB;AAChC,SAASC,MAAM,QAAQ,iBAAiB;AACxC,SACCC,MAAM,EACNC,OAAO,EACPC,YAAY,EACZC,yBAAyB,QACnB,sBAAsB;;AAE7B;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,UAAU;AAE5C,MAAMC,eAAe,GAAG;EACvBC,KAAK,EAAE;IACNC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,MAAM;IACdC,QAAQ,EAAE,YAAY;IACtBC,SAAS,EAAE;EACZ,CAAC;EACDC,QAAQ,EAAE;IACTJ,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,MAAM;IACdC,QAAQ,EAAE,MAAM;IAChBG,OAAO,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACVN,IAAI,EAAE;EACP,CAAC;EACDO,eAAe,EAAE;IAChBP,IAAI,EAAE;EACP,CAAC;EACDQ,SAAS,EAAE;IACVR,IAAI,EAAE;EACP,CAAC;EACDS,eAAe,EAAE;IAChBT,IAAI,EAAE;EACP;AACD,CAAC;AAED,SAASU,gBAAgBA,CAAEC,WAAW,EAAG;EACxC,IAAK,CAAEA,WAAW,EAAG;IACpB;EACD;EACA,MAAMC,OAAO,GAAGD,WAAW,CAACE,KAAK,CAAE,0BAA2B,CAAC;EAC/D,IAAKD,OAAO,IAAIA,OAAO,CAAE,CAAC,CAAE,EAAG;IAC9B,OAAOA,OAAO,CAAE,CAAC,CAAE;EACpB;AACD;AAEA,SAASE,iBAAiBA,CAAEf,KAAK,EAAG;EACnC,OAAOJ,YAAY,CAAE;IACpBI,KAAK,EAAEL,OAAO,CACbD,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jectByAttributeValues","RichText","store","blockEditorStore","useBlockProps","select","SOLID_COLOR_CLASS","blockAttributes","value","type","source","selector","multiline","citation","default","mainColor","customMainColor","textColor","customTextColor","parseBorderColor","styleString","matches","match","multilineToInline","padded","values","split","shift","pop","join","v5","attributes","__experimentalRole","textAlign","save","shouldShowCitation","isEmpty","createElement","className","Content","tagName","migrate","v4","isSolidColorStyle","includes","figureClasses","figureStyles","backgroundClass","backgroundColor","undefined","borderColor","blockquoteTextColorClass","blockquoteClasses","blockquoteStyles","color","style","border","background","text","v3","figureStyle","attribute","v2","figureClass","_select$getSettings$c","colors","getSettings","colorObject","blockquoteStyle","v1","v0","align"],"sources":["@wordpress/block-library/src/pullquote/deprecated.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n\tRichText,\n\tstore as blockEditorStore,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { select } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { SOLID_COLOR_CLASS } from './shared';\n\nconst blockAttributes = {\n\tvalue: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'blockquote',\n\t\tmultiline: 'p',\n\t},\n\tcitation: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'cite',\n\t\tdefault: '',\n\t},\n\tmainColor: {\n\t\ttype: 'string',\n\t},\n\tcustomMainColor: {\n\t\ttype: 'string',\n\t},\n\ttextColor: {\n\t\ttype: 'string',\n\t},\n\tcustomTextColor: {\n\t\ttype: 'string',\n\t},\n};\n\nfunction parseBorderColor( styleString ) {\n\tif ( ! styleString ) {\n\t\treturn;\n\t}\n\tconst matches = styleString.match( /border-color:([^;]+)[;]?/ );\n\tif ( matches && matches[ 1 ] ) {\n\t\treturn matches[ 1 ];\n\t}\n}\n\nfunction multilineToInline( value ) {\n\tvalue = value || `<p></p>`;\n\tconst padded = `</p>${ value }<p>`;\n\tconst values = padded.split( `</p><p>` );\n\n\tvalues.shift();\n\tvalues.pop();\n\n\treturn values.join( '<br>' );\n}\n\nconst v5 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\ttextAlign: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { textAlign, citation, value } = attributes;\n\t\tconst shouldShowCitation = ! RichText.isEmpty( citation );\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\t{ ...useBlockProps.save( {\n\t\t\t\t\tclassName: classnames( {\n\t\t\t\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t\t\t} ),\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<blockquote>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\n// TODO: this is ripe for a bit of a clean up according to the example in https://developer.wordpress.org/block-editor/reference-guides/block-api/block-deprecation/#example\n\nconst v4 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\tcustomTextColor,\n\t\t\ttextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t} = attributes;\n\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\n\t\tlet figureClasses, figureStyles;\n\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tmainColor\n\t\t\t);\n\n\t\t\tfigureClasses = classnames( {\n\t\t\t\t'has-background': backgroundClass || customMainColor,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tfigureStyles = {\n\t\t\t\tbackgroundColor: backgroundClass ? undefined : customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses = classnames( {\n\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t} );\n\n\t\tconst blockquoteStyles = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\t{ ...useBlockProps.save( {\n\t\t\t\t\tclassName: figureClasses,\n\t\t\t\t\tstyle: figureStyles,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyles }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\t\tlet style;\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v3 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t\t// figureStyle is an attribute that never existed.\n\t\t// We are using it as a way to access the styles previously applied to the figure.\n\t\tfigureStyle: {\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure',\n\t\t\tattribute: 'style',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\ttextColor,\n\t\t\tcustomTextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t\tfigureStyle,\n\t\t} = attributes;\n\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\n\t\tlet figureClasses, figureStyles;\n\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tmainColor\n\t\t\t);\n\n\t\t\tfigureClasses = classnames( {\n\t\t\t\t'has-background': backgroundClass || customMainColor,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tfigureStyles = {\n\t\t\t\tbackgroundColor: backgroundClass ? undefined : customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t\t// If normal style and a named color are being used, we need to retrieve the color value to set the style,\n\t\t\t// as there is no expectation that themes create classes that set border colors.\n\t\t} else if ( mainColor ) {\n\t\t\t// Previously here we queried the color settings to know the color value\n\t\t\t// of a named color. This made the save function impure and the block was refactored,\n\t\t\t// because meanwhile a change in the editor made it impossible to query color settings in the save function.\n\t\t\t// Here instead of querying the color settings to know the color value, we retrieve the value\n\t\t\t// directly from the style previously serialized.\n\t\t\tconst borderColor = parseBorderColor( figureStyle );\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses =\n\t\t\t( textColor || customTextColor ) &&\n\t\t\tclassnames( 'has-text-color', {\n\t\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t\t} );\n\n\t\tconst blockquoteStyles = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\n\t\treturn (\n\t\t\t<figure className={ figureClasses } style={ figureStyles }>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyles }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tfigureStyle,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\t\tlet style;\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\t\t// If is the default style, and a main color is set,\n\t\t// migrate the main color value into a custom border color.\n\t\t// The custom border color value is retrieved by parsing the figure styles.\n\t\tif ( ! isSolidColorStyle && mainColor && figureStyle ) {\n\t\t\tconst borderColor = parseBorderColor( figureStyle );\n\t\t\tif ( borderColor ) {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: multilineToInline( value ),\n\t\t\t\t\t...attributes,\n\t\t\t\t\tclassName,\n\t\t\t\t\t// Block supports: Set style.border.color if a deprecated block has `mainColor`, inline border CSS and is not a solid color style.\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tborder: {\n\t\t\t\t\t\t\tcolor: borderColor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v2 = {\n\tattributes: blockAttributes,\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\ttextColor,\n\t\t\tcustomTextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t} = attributes;\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\n\t\tlet figureClass, figureStyles;\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tfigureClass = getColorClassName( 'background-color', mainColor );\n\t\t\tif ( ! figureClass ) {\n\t\t\t\tfigureStyles = {\n\t\t\t\t\tbackgroundColor: customMainColor,\n\t\t\t\t};\n\t\t\t}\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a named color is being used, we need to retrieve the color value to set the style,\n\t\t\t// as there is no expectation that themes create classes that set border colors.\n\t\t} else if ( mainColor ) {\n\t\t\tconst colors =\n\t\t\t\tselect( blockEditorStore ).getSettings().colors ?? [];\n\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\tcolors,\n\t\t\t\tmainColor\n\t\t\t);\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: colorObject.color,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses =\n\t\t\ttextColor || customTextColor\n\t\t\t\t? classnames( 'has-text-color', {\n\t\t\t\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t\t\t } )\n\t\t\t\t: undefined;\n\t\tconst blockquoteStyle = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\t\treturn (\n\t\t\t<figure className={ figureClass } style={ figureStyles }>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyle }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\t\tlet style = {};\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v1 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t},\n\tsave( { attributes } ) {\n\t\tconst { value, citation } = attributes;\n\t\treturn (\n\t\t\t<blockquote>\n\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v0 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'footer',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'none',\n\t\t},\n\t},\n\n\tsave( { attributes } ) {\n\t\tconst { value, citation, align } = attributes;\n\n\t\treturn (\n\t\t\t<blockquote className={ `align${ align }` }>\n\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"footer\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\n/**\n * New deprecations need to be placed first\n * for them to have higher priority.\n *\n * Old deprecations may need to be updated as well.\n *\n * See block-deprecation.md\n */\nexport default [ v5, v4, v3, v2, v1, v0 ];\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,iBAAiB,EACjBC,+BAA+B,EAC/BC,QAAQ,EACRC,KAAK,IAAIC,gBAAgB,EACzBC,aAAa,QACP,yBAAyB;AAChC,SAASC,MAAM,QAAQ,iBAAiB;;AAExC;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,UAAU;AAE5C,MAAMC,eAAe,GAAG;EACvBC,KAAK,EAAE;IACNC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,MAAM;IACdC,QAAQ,EAAE,YAAY;IACtBC,SAAS,EAAE;EACZ,CAAC;EACDC,QAAQ,EAAE;IACTJ,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,MAAM;IACdC,QAAQ,EAAE,MAAM;IAChBG,OAAO,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACVN,IAAI,EAAE;EACP,CAAC;EACDO,eAAe,EAAE;IAChBP,IAAI,EAAE;EACP,CAAC;EACDQ,SAAS,EAAE;IACVR,IAAI,EAAE;EACP,CAAC;EACDS,eAAe,EAAE;IAChBT,IAAI,EAAE;EACP;AACD,CAAC;AAED,SAASU,gBAAgBA,CAAEC,WAAW,EAAG;EACxC,IAAK,CAAEA,WAAW,EAAG;IACpB;EACD;EACA,MAAMC,OAAO,GAAGD,WAAW,CAACE,KAAK,CAAE,0BAA2B,CAAC;EAC/D,IAAKD,OAAO,IAAIA,OAAO,CAAE,CAAC,CAAE,EAAG;IAC9B,OAAOA,OAAO,CAAE,CAAC,CAAE;EACpB;AACD;AAEA,SAASE,iBAAiBA,CAAEf,KAAK,EAAG;EACnCA,KAAK,GAAGA,KAAK,IAAK,SAAQ;EAC1B,MAAMgB,MAAM,GA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E,CAAE"}
@@ -0,0 +1,50 @@
1
+ import { createElement } from "@wordpress/element";
2
+ /**
3
+ * WordPress dependencies
4
+ */
5
+ import { Button, Modal, __experimentalVStack as VStack } from '@wordpress/components';
6
+ import { __ } from '@wordpress/i18n';
7
+ import { useState, useEffect } from '@wordpress/element';
8
+
9
+ /**
10
+ * Internal dependencies
11
+ */
12
+ import { useContainsThirdPartyBlocks } from '../utils';
13
+ const disableEnhancedPaginationDescription = __('Plugin blocks are not supported yet. For the enhanced pagination to work, remove the plugin block, then re-enable "Enhanced pagination" in the Query Block settings.');
14
+ const modalDescriptionId = 'wp-block-query-enhanced-pagination-modal__description';
15
+ export default function EnhancedPaginationModal({
16
+ clientId,
17
+ attributes: {
18
+ enhancedPagination
19
+ },
20
+ setAttributes
21
+ }) {
22
+ const [isOpen, setOpen] = useState(false);
23
+ const containsThirdPartyBlocks = useContainsThirdPartyBlocks(clientId);
24
+ useEffect(() => {
25
+ setOpen(containsThirdPartyBlocks && enhancedPagination);
26
+ }, [containsThirdPartyBlocks, enhancedPagination, setOpen]);
27
+ return isOpen && createElement(Modal, {
28
+ title: __('Enhanced pagination will be disabled'),
29
+ className: "wp-block-query__enhanced-pagination-modal",
30
+ aria: {
31
+ describedby: modalDescriptionId
32
+ },
33
+ isDismissible: false,
34
+ shouldCloseOnEsc: false,
35
+ shouldCloseOnClickOutside: false
36
+ }, createElement(VStack, {
37
+ alignment: "right",
38
+ spacing: 5
39
+ }, createElement("span", {
40
+ id: modalDescriptionId
41
+ }, disableEnhancedPaginationDescription), createElement(Button, {
42
+ variant: "primary",
43
+ onClick: () => {
44
+ setAttributes({
45
+ enhancedPagination: false
46
+ });
47
+ }
48
+ }, __('OK'))));
49
+ }
50
+ //# sourceMappingURL=enhanced-pagination-modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Button","Modal","__experimentalVStack","VStack","__","useState","useEffect","useContainsThirdPartyBlocks","disableEnhancedPaginationDescription","modalDescriptionId","EnhancedPaginationModal","clientId","attributes","enhancedPagination","setAttributes","isOpen","setOpen","containsThirdPartyBlocks","createElement","title","className","aria","describedby","isDismissible","shouldCloseOnEsc","shouldCloseOnClickOutside","alignment","spacing","id","variant","onClick"],"sources":["@wordpress/block-library/src/query/edit/enhanced-pagination-modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tModal,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContainsThirdPartyBlocks } from '../utils';\n\nconst disableEnhancedPaginationDescription = __(\n\t'Plugin blocks are not supported yet. For the enhanced pagination to work, remove the plugin block, then re-enable \"Enhanced pagination\" in the Query Block settings.'\n);\n\nconst modalDescriptionId =\n\t'wp-block-query-enhanced-pagination-modal__description';\n\nexport default function EnhancedPaginationModal( {\n\tclientId,\n\tattributes: { enhancedPagination },\n\tsetAttributes,\n} ) {\n\tconst [ isOpen, setOpen ] = useState( false );\n\n\tconst containsThirdPartyBlocks = useContainsThirdPartyBlocks( clientId );\n\n\tuseEffect( () => {\n\t\tsetOpen( containsThirdPartyBlocks && enhancedPagination );\n\t}, [ containsThirdPartyBlocks, enhancedPagination, setOpen ] );\n\n\treturn (\n\t\tisOpen && (\n\t\t\t<Modal\n\t\t\t\ttitle={ __( 'Enhanced pagination will be disabled' ) }\n\t\t\t\tclassName=\"wp-block-query__enhanced-pagination-modal\"\n\t\t\t\taria={ {\n\t\t\t\t\tdescribedby: modalDescriptionId,\n\t\t\t\t} }\n\t\t\t\tisDismissible={ false }\n\t\t\t\tshouldCloseOnEsc={ false }\n\t\t\t\tshouldCloseOnClickOutside={ false }\n\t\t\t>\n\t\t\t\t<VStack alignment=\"right\" spacing={ 5 }>\n\t\t\t\t\t<span id={ modalDescriptionId }>\n\t\t\t\t\t\t{ disableEnhancedPaginationDescription }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\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EAAC,OAAO;IAACC,OAAO,EAAG;EAAG,GACtCT,aAAA;IAAMU,EAAE,EAAGnB;EAAoB,GAC5BD,oCACG,CAAC,EACPU,aAAA,CAAClB,MAAM;IACN6B,OAAO,EAAC,SAAS;IACjBC,OAAO,EAAGA,CAAA,KAAM;MACfhB,aAAa,CAAE;QAAED,kBAAkB,EAAE;MAAM,CAAE,CAAC;IAC/C;EAAG,GAEDT,EAAE,CAAE,IAAK,CACJ,CACD,CACF,CACP;AAEH"}
@@ -0,0 +1,35 @@
1
+ import { createElement, Fragment } from "@wordpress/element";
2
+ /**
3
+ * WordPress dependencies
4
+ */
5
+ import { ToggleControl, Notice } from '@wordpress/components';
6
+ import { __ } from '@wordpress/i18n';
7
+
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+ import { useContainsThirdPartyBlocks } from '../../utils';
12
+ export default function EnhancedPaginationControl({
13
+ enhancedPagination,
14
+ setAttributes,
15
+ clientId
16
+ }) {
17
+ const enhancedPaginationNotice = __("Enhanced pagination doesn't support plugin blocks yet. If you want to enable it, you have to remove all plugin blocks from the Query Loop.");
18
+ const containsThirdPartyBlocks = useContainsThirdPartyBlocks(clientId);
19
+ return createElement(Fragment, null, createElement(ToggleControl, {
20
+ label: __('Enhanced pagination'),
21
+ help: __('Browsing between pages won’t require a full page reload.'),
22
+ checked: !!enhancedPagination,
23
+ disabled: containsThirdPartyBlocks,
24
+ onChange: value => {
25
+ setAttributes({
26
+ enhancedPagination: !!value
27
+ });
28
+ }
29
+ }), containsThirdPartyBlocks && createElement(Notice, {
30
+ status: "warning",
31
+ isDismissible: false,
32
+ className: "wp-block-query__enhanced-pagination-notice"
33
+ }, enhancedPaginationNotice));
34
+ }
35
+ //# sourceMappingURL=enhanced-pagination-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ToggleControl","Notice","__","useContainsThirdPartyBlocks","EnhancedPaginationControl","enhancedPagination","setAttributes","clientId","enhancedPaginationNotice","containsThirdPartyBlocks","createElement","Fragment","label","help","checked","disabled","onChange","value","status","isDismissible","className"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToggleControl, Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useContainsThirdPartyBlocks } from '../../utils';\n\nexport default function EnhancedPaginationControl( {\n\tenhancedPagination,\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst enhancedPaginationNotice = __(\n\t\t\"Enhanced pagination doesn't support plugin blocks yet. If you want to enable it, you have to remove all plugin blocks from the Query Loop.\"\n\t);\n\n\tconst containsThirdPartyBlocks = useContainsThirdPartyBlocks( clientId );\n\n\treturn (\n\t\t<>\n\t\t\t<ToggleControl\n\t\t\t\tlabel={ __( 'Enhanced pagination' ) }\n\t\t\t\thelp={ __(\n\t\t\t\t\t'Browsing between pages won’t require a full page reload.'\n\t\t\t\t) }\n\t\t\t\tchecked={ !! enhancedPagination }\n\t\t\t\tdisabled={ containsThirdPartyBlocks }\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tenhancedPagination: !! value,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t{ containsThirdPartyBlocks && (\n\t\t\t\t<Notice\n\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\tclassName=\"wp-block-query__enhanced-pagination-notice\"\n\t\t\t\t>\n\t\t\t\t\t{ enhancedPaginationNotice }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,aAAa,EAAEC,MAAM,QAAQ,uBAAuB;AAC7D,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,2BAA2B,QAAQ,aAAa;AAEzD,eAAe,SAASC,yBAAyBA,CAAE;EAClDC,kBAAkB;EAClBC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,MAAMC,wBAAwB,GAAGN,EAAE,CAClC,4IACD,CAAC;EAED,MAAMO,wBAAwB,GAAGN,2BAA2B,CAAEI,QAAS,CAAC;EAExE,OACCG,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACV,aAAa;IACbY,KAAK,EAAGV,EAAE,CAAE,qBAAsB,CAAG;IACrCW,IAAI,EAAGX,EAAE,CACR,0DACD,CAAG;IACHY,OAAO,EAAG,CAAC,CAAET,kBAAoB;IACjCU,QAAQ,EAAGN,wBAA0B;IACrCO,QAAQ,EAAKC,KAAK,IAAM;MACvBX,aAAa,CAAE;QACdD,kBAAkB,EAAE,CAAC,CAAEY;MACxB,CAAE,CAAC;IACJ;EAAG,CACH,CAAC,EACAR,wBAAwB,IACzBC,aAAA,CAACT,MAAM;IACNiB,MAAM,EAAC,SAAS;IAChBC,aAAa,EAAG,KAAO;IACvBC,SAAS,EAAC;EAA4C,GAEpDZ,wBACK,CAER,CAAC;AAEL"}
@@ -6,8 +6,7 @@ import { PanelBody, TextControl, SelectControl, RangeControl, ToggleControl, Not
6
6
  import { __ } from '@wordpress/i18n';
7
7
  import { InspectorControls, privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
8
8
  import { debounce } from '@wordpress/compose';
9
- import { useEffect, useState, useCallback, useRef } from '@wordpress/element';
10
- import { speak } from '@wordpress/a11y';
9
+ import { useEffect, useState, useCallback } from '@wordpress/element';
11
10
 
12
11
  /**
13
12
  * Internal dependencies
@@ -17,6 +16,7 @@ import AuthorControl from './author-control';
17
16
  import ParentControl from './parent-control';
18
17
  import { TaxonomyControls } from './taxonomy-controls';
19
18
  import StickyControl from './sticky-control';
19
+ import EnhancedPaginationControl from './enhanced-pagination-control';
20
20
  import CreateNewPostLink from './create-new-post-link';
21
21
  import { unlock } from '../../../lock-unlock';
22
22
  import { usePostTypes, useIsPostTypeHierarchical, useAllowedControls, isControlAllowed, useTaxonomies } from '../../utils';
@@ -28,7 +28,8 @@ export default function QueryInspectorControls(props) {
28
28
  attributes,
29
29
  setQuery,
30
30
  setDisplayLayout,
31
- setAttributes
31
+ setAttributes,
32
+ clientId
32
33
  } = props;
33
34
  const {
34
35
  query,
@@ -99,14 +100,6 @@ export default function QueryInspectorControls(props) {
99
100
  const showAuthorControl = isControlAllowed(allowedControls, 'author');
100
101
  const showSearchControl = isControlAllowed(allowedControls, 'search');
101
102
  const showParentControl = isControlAllowed(allowedControls, 'parents') && isPostTypeHierarchical;
102
- const enhancedPaginationNotice = __('Enhanced Pagination might cause interactive blocks within the Post Template to stop working. Disable it if you experience any issues.');
103
- const isFirstRender = useRef(true); // Don't speak on first render.
104
- useEffect(() => {
105
- if (!isFirstRender.current && enhancedPagination) {
106
- speak(enhancedPaginationNotice);
107
- }
108
- isFirstRender.current = false;
109
- }, [enhancedPagination, enhancedPaginationNotice]);
110
103
  const showFiltersPanel = showTaxControl || showAuthorControl || showSearchControl || showParentControl;
111
104
  return createElement(Fragment, null, createElement(BlockInfo, null, createElement(CreateNewPostLink, {
112
105
  ...props
@@ -148,6 +141,10 @@ export default function QueryInspectorControls(props) {
148
141
  onChange: value => setQuery({
149
142
  sticky: value
150
143
  })
144
+ }), createElement(EnhancedPaginationControl, {
145
+ enhancedPagination: enhancedPagination,
146
+ setAttributes: setAttributes,
147
+ clientId: clientId
151
148
  }))), !inherit && showFiltersPanel && createElement(InspectorControls, null, createElement(ToolsPanel, {
152
149
  className: "block-library-query-toolspanel__filters",
153
150
  label: __('Filters'),
@@ -197,20 +194,6 @@ export default function QueryInspectorControls(props) {
197
194
  parents: parents,
198
195
  postType: postType,
199
196
  onChange: setQuery
200
- })))), createElement(InspectorControls, null, createElement(PanelBody, {
201
- title: __('User Experience'),
202
- initialOpen: false
203
- }, createElement(ToggleControl, {
204
- label: __('Enhanced pagination'),
205
- help: __("Don't refresh the page when paginating to another page."),
206
- checked: !!enhancedPagination,
207
- onChange: value => setAttributes({
208
- enhancedPagination: !!value
209
- })
210
- }), enhancedPagination && createElement("div", null, createElement(Notice, {
211
- spokenMessage: null,
212
- status: "warning",
213
- isDismissible: false
214
- }, enhancedPaginationNotice)))));
197
+ })))));
215
198
  }
216
199
  //# sourceMappingURL=index.js.map