@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
@@ -64,7 +64,7 @@ exports[`File block renders file error state without crashing 1`] = `
64
64
  ]
65
65
  }
66
66
  >
67
- <View
67
+ <RCTAztecView
68
68
  accessibilityState={
69
69
  {
70
70
  "busy": undefined,
@@ -74,73 +74,59 @@ exports[`File block renders file error state without crashing 1`] = `
74
74
  "selected": undefined,
75
75
  }
76
76
  }
77
- accessibilityValue={
77
+ accessible={true}
78
+ activeFormats={[]}
79
+ blockType={
78
80
  {
79
- "max": undefined,
80
- "min": undefined,
81
- "now": undefined,
82
- "text": undefined,
81
+ "tag": "p",
83
82
  }
84
83
  }
85
- accessible={false}
86
- collapsable={false}
84
+ deleteEnter={true}
85
+ disableEditingMenu={false}
87
86
  focusable={true}
87
+ fontFamily="serif"
88
+ fontSize={16}
89
+ isMultiline={false}
90
+ maxImagesWidth={200}
91
+ onBackspace={[Function]}
88
92
  onBlur={[Function]}
93
+ onChange={[Function]}
89
94
  onClick={[Function]}
95
+ onContentSizeChange={[Function]}
96
+ onEnter={[Function]}
90
97
  onFocus={[Function]}
98
+ onHTMLContentWithCursor={[Function]}
99
+ onKeyDown={[Function]}
100
+ onPaste={[Function]}
91
101
  onResponderGrant={[Function]}
92
102
  onResponderMove={[Function]}
93
103
  onResponderRelease={[Function]}
94
104
  onResponderTerminate={[Function]}
95
105
  onResponderTerminationRequest={[Function]}
106
+ onSelectionChange={[Function]}
96
107
  onStartShouldSetResponder={[Function]}
97
- >
98
- <RCTAztecView
99
- activeFormats={[]}
100
- blockType={
101
- {
102
- "tag": "p",
103
- }
104
- }
105
- deleteEnter={true}
106
- disableEditingMenu={false}
107
- fontFamily="serif"
108
- fontSize={16}
109
- isMultiline={false}
110
- maxImagesWidth={200}
111
- onBackspace={[Function]}
112
- onBlur={[Function]}
113
- onChange={[Function]}
114
- onContentSizeChange={[Function]}
115
- onEnter={[Function]}
116
- onFocus={[Function]}
117
- onHTMLContentWithCursor={[Function]}
118
- onKeyDown={[Function]}
119
- onPaste={[Function]}
120
- onSelectionChange={[Function]}
121
- placeholder="File name"
122
- placeholderTextColor="gray"
123
- selectionColor="black"
124
- style={
125
- {
126
- "backgroundColor": undefined,
127
- "maxWidth": undefined,
128
- "minHeight": 0,
129
- }
108
+ placeholder="File name"
109
+ placeholderTextColor="gray"
110
+ selectionColor="black"
111
+ style={
112
+ {
113
+ "backgroundColor": undefined,
114
+ "maxWidth": undefined,
115
+ "minHeight": 0,
130
116
  }
131
- text={
132
- {
133
- "eventCount": undefined,
134
- "linkTextColor": undefined,
135
- "selection": null,
136
- "tag": "p",
137
- "text": "<p>File name</p>",
138
- }
117
+ }
118
+ text={
119
+ {
120
+ "eventCount": undefined,
121
+ "linkTextColor": undefined,
122
+ "selection": null,
123
+ "tag": "p",
124
+ "text": "<p>File name</p>",
139
125
  }
140
- textAlign="left"
141
- triggerKeyCodes={[]}
142
- />
143
- </View>
126
+ }
127
+ textAlign="left"
128
+ triggerKeyCodes={[]}
129
+ />
144
130
  </View>
145
131
  <View>
146
132
  <Svg
@@ -193,7 +179,7 @@ exports[`File block renders file error state without crashing 1`] = `
193
179
  ]
194
180
  }
195
181
  >
196
- <View
182
+ <RCTAztecView
197
183
  accessibilityState={
198
184
  {
199
185
  "busy": undefined,
@@ -203,76 +189,62 @@ exports[`File block renders file error state without crashing 1`] = `
203
189
  "selected": undefined,
204
190
  }
205
191
  }
206
- accessibilityValue={
192
+ accessible={true}
193
+ activeFormats={[]}
194
+ blockType={
207
195
  {
208
- "max": undefined,
209
- "min": undefined,
210
- "now": undefined,
211
- "text": undefined,
196
+ "tag": "p",
212
197
  }
213
198
  }
214
- accessible={false}
215
- collapsable={false}
199
+ color="white"
200
+ deleteEnter={true}
201
+ disableEditingMenu={false}
216
202
  focusable={true}
203
+ fontFamily="serif"
204
+ fontSize={16}
205
+ isMultiline={false}
206
+ maxImagesWidth={200}
207
+ minWidth={40}
208
+ onBackspace={[Function]}
217
209
  onBlur={[Function]}
210
+ onChange={[Function]}
218
211
  onClick={[Function]}
212
+ onContentSizeChange={[Function]}
213
+ onEnter={[Function]}
219
214
  onFocus={[Function]}
215
+ onHTMLContentWithCursor={[Function]}
216
+ onKeyDown={[Function]}
217
+ onPaste={[Function]}
220
218
  onResponderGrant={[Function]}
221
219
  onResponderMove={[Function]}
222
220
  onResponderRelease={[Function]}
223
221
  onResponderTerminate={[Function]}
224
222
  onResponderTerminationRequest={[Function]}
223
+ onSelectionChange={[Function]}
225
224
  onStartShouldSetResponder={[Function]}
226
- >
227
- <RCTAztecView
228
- activeFormats={[]}
229
- blockType={
230
- {
231
- "tag": "p",
232
- }
233
- }
234
- color="white"
235
- deleteEnter={true}
236
- disableEditingMenu={false}
237
- fontFamily="serif"
238
- fontSize={16}
239
- isMultiline={false}
240
- maxImagesWidth={200}
241
- minWidth={40}
242
- onBackspace={[Function]}
243
- onBlur={[Function]}
244
- onChange={[Function]}
245
- onContentSizeChange={[Function]}
246
- onEnter={[Function]}
247
- onFocus={[Function]}
248
- onHTMLContentWithCursor={[Function]}
249
- onKeyDown={[Function]}
250
- onPaste={[Function]}
251
- onSelectionChange={[Function]}
252
- placeholder=""
253
- placeholderTextColor="white"
254
- selectionColor="white"
255
- style={
256
- {
257
- "backgroundColor": undefined,
258
- "color": "white",
259
- "maxWidth": 80,
260
- "minHeight": 0,
261
- }
225
+ placeholder=""
226
+ placeholderTextColor="white"
227
+ selectionColor="white"
228
+ style={
229
+ {
230
+ "backgroundColor": undefined,
231
+ "color": "white",
232
+ "maxWidth": 80,
233
+ "minHeight": 0,
262
234
  }
263
- text={
264
- {
265
- "eventCount": undefined,
266
- "linkTextColor": undefined,
267
- "selection": null,
268
- "tag": "p",
269
- "text": "<p>Download</p>",
270
- }
235
+ }
236
+ text={
237
+ {
238
+ "eventCount": undefined,
239
+ "linkTextColor": undefined,
240
+ "selection": null,
241
+ "tag": "p",
242
+ "text": "<p>Download</p>",
271
243
  }
272
- textAlign="center"
273
- triggerKeyCodes={[]}
274
- />
275
- </View>
244
+ }
245
+ textAlign="center"
246
+ triggerKeyCodes={[]}
247
+ />
276
248
  </View>
277
249
  </View>
278
250
  </View>
@@ -343,7 +315,7 @@ exports[`File block renders file without crashing 1`] = `
343
315
  ]
344
316
  }
345
317
  >
346
- <View
318
+ <RCTAztecView
347
319
  accessibilityState={
348
320
  {
349
321
  "busy": undefined,
@@ -353,73 +325,59 @@ exports[`File block renders file without crashing 1`] = `
353
325
  "selected": undefined,
354
326
  }
355
327
  }
356
- accessibilityValue={
328
+ accessible={true}
329
+ activeFormats={[]}
330
+ blockType={
357
331
  {
358
- "max": undefined,
359
- "min": undefined,
360
- "now": undefined,
361
- "text": undefined,
332
+ "tag": "p",
362
333
  }
363
334
  }
364
- accessible={false}
365
- collapsable={false}
335
+ deleteEnter={true}
336
+ disableEditingMenu={false}
366
337
  focusable={true}
338
+ fontFamily="serif"
339
+ fontSize={16}
340
+ isMultiline={false}
341
+ maxImagesWidth={200}
342
+ onBackspace={[Function]}
367
343
  onBlur={[Function]}
344
+ onChange={[Function]}
368
345
  onClick={[Function]}
346
+ onContentSizeChange={[Function]}
347
+ onEnter={[Function]}
369
348
  onFocus={[Function]}
349
+ onHTMLContentWithCursor={[Function]}
350
+ onKeyDown={[Function]}
351
+ onPaste={[Function]}
370
352
  onResponderGrant={[Function]}
371
353
  onResponderMove={[Function]}
372
354
  onResponderRelease={[Function]}
373
355
  onResponderTerminate={[Function]}
374
356
  onResponderTerminationRequest={[Function]}
357
+ onSelectionChange={[Function]}
375
358
  onStartShouldSetResponder={[Function]}
376
- >
377
- <RCTAztecView
378
- activeFormats={[]}
379
- blockType={
380
- {
381
- "tag": "p",
382
- }
383
- }
384
- deleteEnter={true}
385
- disableEditingMenu={false}
386
- fontFamily="serif"
387
- fontSize={16}
388
- isMultiline={false}
389
- maxImagesWidth={200}
390
- onBackspace={[Function]}
391
- onBlur={[Function]}
392
- onChange={[Function]}
393
- onContentSizeChange={[Function]}
394
- onEnter={[Function]}
395
- onFocus={[Function]}
396
- onHTMLContentWithCursor={[Function]}
397
- onKeyDown={[Function]}
398
- onPaste={[Function]}
399
- onSelectionChange={[Function]}
400
- placeholder="File name"
401
- placeholderTextColor="gray"
402
- selectionColor="black"
403
- style={
404
- {
405
- "backgroundColor": undefined,
406
- "maxWidth": undefined,
407
- "minHeight": 0,
408
- }
359
+ placeholder="File name"
360
+ placeholderTextColor="gray"
361
+ selectionColor="black"
362
+ style={
363
+ {
364
+ "backgroundColor": undefined,
365
+ "maxWidth": undefined,
366
+ "minHeight": 0,
409
367
  }
410
- text={
411
- {
412
- "eventCount": undefined,
413
- "linkTextColor": undefined,
414
- "selection": null,
415
- "tag": "p",
416
- "text": "<p>File name</p>",
417
- }
368
+ }
369
+ text={
370
+ {
371
+ "eventCount": undefined,
372
+ "linkTextColor": undefined,
373
+ "selection": null,
374
+ "tag": "p",
375
+ "text": "<p>File name</p>",
418
376
  }
419
- textAlign="left"
420
- triggerKeyCodes={[]}
421
- />
422
- </View>
377
+ }
378
+ textAlign="left"
379
+ triggerKeyCodes={[]}
380
+ />
423
381
  </View>
424
382
  </View>
425
383
  <View
@@ -446,7 +404,7 @@ exports[`File block renders file without crashing 1`] = `
446
404
  ]
447
405
  }
448
406
  >
449
- <View
407
+ <RCTAztecView
450
408
  accessibilityState={
451
409
  {
452
410
  "busy": undefined,
@@ -456,76 +414,62 @@ exports[`File block renders file without crashing 1`] = `
456
414
  "selected": undefined,
457
415
  }
458
416
  }
459
- accessibilityValue={
417
+ accessible={true}
418
+ activeFormats={[]}
419
+ blockType={
460
420
  {
461
- "max": undefined,
462
- "min": undefined,
463
- "now": undefined,
464
- "text": undefined,
421
+ "tag": "p",
465
422
  }
466
423
  }
467
- accessible={false}
468
- collapsable={false}
424
+ color="white"
425
+ deleteEnter={true}
426
+ disableEditingMenu={false}
469
427
  focusable={true}
428
+ fontFamily="serif"
429
+ fontSize={16}
430
+ isMultiline={false}
431
+ maxImagesWidth={200}
432
+ minWidth={40}
433
+ onBackspace={[Function]}
470
434
  onBlur={[Function]}
435
+ onChange={[Function]}
471
436
  onClick={[Function]}
437
+ onContentSizeChange={[Function]}
438
+ onEnter={[Function]}
472
439
  onFocus={[Function]}
440
+ onHTMLContentWithCursor={[Function]}
441
+ onKeyDown={[Function]}
442
+ onPaste={[Function]}
473
443
  onResponderGrant={[Function]}
474
444
  onResponderMove={[Function]}
475
445
  onResponderRelease={[Function]}
476
446
  onResponderTerminate={[Function]}
477
447
  onResponderTerminationRequest={[Function]}
448
+ onSelectionChange={[Function]}
478
449
  onStartShouldSetResponder={[Function]}
479
- >
480
- <RCTAztecView
481
- activeFormats={[]}
482
- blockType={
483
- {
484
- "tag": "p",
485
- }
486
- }
487
- color="white"
488
- deleteEnter={true}
489
- disableEditingMenu={false}
490
- fontFamily="serif"
491
- fontSize={16}
492
- isMultiline={false}
493
- maxImagesWidth={200}
494
- minWidth={40}
495
- onBackspace={[Function]}
496
- onBlur={[Function]}
497
- onChange={[Function]}
498
- onContentSizeChange={[Function]}
499
- onEnter={[Function]}
500
- onFocus={[Function]}
501
- onHTMLContentWithCursor={[Function]}
502
- onKeyDown={[Function]}
503
- onPaste={[Function]}
504
- onSelectionChange={[Function]}
505
- placeholder=""
506
- placeholderTextColor="white"
507
- selectionColor="white"
508
- style={
509
- {
510
- "backgroundColor": undefined,
511
- "color": "white",
512
- "maxWidth": 80,
513
- "minHeight": 0,
514
- }
450
+ placeholder=""
451
+ placeholderTextColor="white"
452
+ selectionColor="white"
453
+ style={
454
+ {
455
+ "backgroundColor": undefined,
456
+ "color": "white",
457
+ "maxWidth": 80,
458
+ "minHeight": 0,
515
459
  }
516
- text={
517
- {
518
- "eventCount": undefined,
519
- "linkTextColor": undefined,
520
- "selection": null,
521
- "tag": "p",
522
- "text": "<p>Download</p>",
523
- }
460
+ }
461
+ text={
462
+ {
463
+ "eventCount": undefined,
464
+ "linkTextColor": undefined,
465
+ "selection": null,
466
+ "tag": "p",
467
+ "text": "<p>Download</p>",
524
468
  }
525
- textAlign="center"
526
- triggerKeyCodes={[]}
527
- />
528
- </View>
469
+ }
470
+ textAlign="center"
471
+ triggerKeyCodes={[]}
472
+ />
529
473
  </View>
530
474
  </View>
531
475
  </View>
@@ -54,18 +54,3 @@ const createActiveXObject = ( type ) => {
54
54
  }
55
55
  return ax;
56
56
  };
57
-
58
- /**
59
- * Hides all .wp-block-file__embed elements on the document. This function is only intended
60
- * to be run on the front-end, it may have weird side effects running in the block editor.
61
- */
62
- export const hidePdfEmbedsOnUnsupportedBrowsers = () => {
63
- if ( ! browserSupportsPdfs() ) {
64
- const embeds = document.getElementsByClassName(
65
- 'wp-block-file__embed'
66
- );
67
- Array.from( embeds ).forEach( ( embed ) => {
68
- embed.style.display = 'none';
69
- } );
70
- }
71
- };
package/src/file/view.js CHANGED
@@ -1,9 +1,18 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { store } from '@wordpress/interactivity';
1
5
  /**
2
6
  * Internal dependencies
3
7
  */
4
- import { hidePdfEmbedsOnUnsupportedBrowsers } from './utils';
8
+ import { browserSupportsPdfs } from './utils';
5
9
 
6
- document.addEventListener(
7
- 'DOMContentLoaded',
8
- hidePdfEmbedsOnUnsupportedBrowsers
9
- );
10
+ store( {
11
+ selectors: {
12
+ core: {
13
+ file: {
14
+ hasPdfPreview: browserSupportsPdfs() ? 'inherit' : 'none',
15
+ },
16
+ },
17
+ },
18
+ } );
@@ -48,7 +48,19 @@ export default function FootnotesEdit( { context: { postType, postId } } ) {
48
48
  return (
49
49
  <ol { ...blockProps }>
50
50
  { footnotes.map( ( { id, content } ) => (
51
- <li key={ id }>
51
+ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
52
+ <li
53
+ key={ id }
54
+ onMouseDown={ ( event ) => {
55
+ // When clicking on the list item (not on descendants),
56
+ // focus the rich text element since it's only 1px wide when
57
+ // empty.
58
+ if ( event.target === event.currentTarget ) {
59
+ event.target.firstElementChild.focus();
60
+ event.preventDefault();
61
+ }
62
+ } }
63
+ >
52
64
  <RichText
53
65
  id={ id }
54
66
  tagName="span"
@@ -75,7 +75,7 @@ const ALLOWED_MEDIA_TYPES = [ 'image' ];
75
75
  const allowedBlocks = [ 'core/image' ];
76
76
 
77
77
  const PLACEHOLDER_TEXT = Platform.isNative
78
- ? __( 'ADD MEDIA' )
78
+ ? __( 'Add media' )
79
79
  : __( 'Drag images, upload new ones or select files from your library.' );
80
80
 
81
81
  const MOBILE_CONTROL_PROPS_RANGE_CONTROL = Platform.isNative
@@ -44,7 +44,7 @@ add_filter( 'render_block_data', 'block_core_gallery_data_id_backcompatibility'
44
44
  * @return string The content of the block being rendered.
45
45
  */
46
46
  function block_core_gallery_render( $attributes, $content ) {
47
- $gap = _wp_array_get( $attributes, array( 'style', 'spacing', 'blockGap' ) );
47
+ $gap = $attributes['style']['spacing']['blockGap'] ?? null;
48
48
  // Skip if gap value contains unsupported characters.
49
49
  // Regex for CSS value borrowed from `safecss_filter_attr`, and used here
50
50
  // because we only want to match against the value, not the CSS attribute.
@@ -24,10 +24,14 @@
24
24
  "__experimentalOnEnter": true,
25
25
  "__experimentalOnMerge": true,
26
26
  "__experimentalSettings": true,
27
+ "__experimentalMetadata": true,
27
28
  "align": [ "wide", "full" ],
28
29
  "anchor": true,
29
30
  "ariaLabel": true,
30
31
  "html": false,
32
+ "background": {
33
+ "backgroundImage": true
34
+ },
31
35
  "color": {
32
36
  "gradients": true,
33
37
  "heading": true,
package/src/group/edit.js CHANGED
@@ -162,7 +162,6 @@ function GroupEdit( {
162
162
  <View>
163
163
  { innerBlocksProps.children }
164
164
  <GroupPlaceHolder
165
- clientId={ clientId }
166
165
  name={ name }
167
166
  onSelect={ selectVariation }
168
167
  />
@@ -55,12 +55,14 @@
55
55
  "__experimentalLetterSpacing": true,
56
56
  "__experimentalTextTransform": true,
57
57
  "__experimentalTextDecoration": true,
58
+ "__experimentalWritingMode": true,
58
59
  "__experimentalDefaultControls": {
59
60
  "fontSize": true,
60
61
  "fontAppearance": true,
61
62
  "textTransform": true
62
63
  }
63
64
  },
65
+ "__unstablePasteTextInline": true,
64
66
  "__experimentalSlashInserter": true
65
67
  },
66
68
  "editorStyle": "wp-block-heading-editor",
@@ -132,7 +132,6 @@ function HeadingEdit( {
132
132
  } }
133
133
  onReplace={ onReplace }
134
134
  onRemove={ () => onReplace( [] ) }
135
- aria-label={ __( 'Heading text' ) }
136
135
  placeholder={ placeholder || __( 'Heading' ) }
137
136
  textAlign={ textAlign }
138
137
  { ...( Platform.isNative && { deleteEnter: true } ) } // setup RichText on native mobile to delete the "Enter" key as it's handled by the JS/RN side
@@ -7,4 +7,8 @@ h6 {
7
7
  &.has-background {
8
8
  padding: $block-bg-padding--v $block-bg-padding--h;
9
9
  }
10
+ &.has-text-align-right[style*="writing-mode"]:where([style*="vertical-rl"]),
11
+ &.has-text-align-left[style*="writing-mode"]:where([style*="vertical-lr"]) {
12
+ rotate: 180deg;
13
+ }
10
14
  }
@@ -73,12 +73,7 @@ const transforms = {
73
73
  ...[ 1, 2, 3, 4, 5, 6 ].map( ( level ) => ( {
74
74
  type: 'enter',
75
75
  regExp: new RegExp( `^/(h|H)${ level }$` ),
76
- transform( content ) {
77
- return createBlock( 'core/heading', {
78
- level,
79
- content,
80
- } );
81
- },
76
+ transform: () => createBlock( 'core/heading', { level } ),
82
77
  } ) ),
83
78
  ],
84
79
  to: [