@wordpress/block-library 8.27.2 → 8.28.1

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 (1455) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/archives/index.js +5 -4
  3. package/build/archives/index.js.map +1 -1
  4. package/build/archives/init.js +1 -2
  5. package/build/archives/init.js.map +1 -1
  6. package/build/audio/deprecated.js +1 -2
  7. package/build/audio/deprecated.js.map +1 -1
  8. package/build/audio/edit.js +1 -2
  9. package/build/audio/edit.js.map +1 -1
  10. package/build/audio/edit.native.js +1 -2
  11. package/build/audio/edit.native.js.map +1 -1
  12. package/build/audio/index.js +5 -4
  13. package/build/audio/index.js.map +1 -1
  14. package/build/audio/init.js +1 -2
  15. package/build/audio/init.js.map +1 -1
  16. package/build/audio/transforms.js +1 -2
  17. package/build/audio/transforms.js.map +1 -1
  18. package/build/audio/transforms.native.js +1 -2
  19. package/build/audio/transforms.native.js.map +1 -1
  20. package/build/avatar/index.js +5 -4
  21. package/build/avatar/index.js.map +1 -1
  22. package/build/avatar/init.js +1 -2
  23. package/build/avatar/init.js.map +1 -1
  24. package/build/avatar/user-control.js +1 -2
  25. package/build/avatar/user-control.js.map +1 -1
  26. package/build/block/deprecated.js +65 -0
  27. package/build/block/deprecated.js.map +1 -0
  28. package/build/block/edit-title.native.js +1 -2
  29. package/build/block/edit-title.native.js.map +1 -1
  30. package/build/block/edit.js +92 -101
  31. package/build/block/edit.js.map +1 -1
  32. package/build/block/index.js +26 -8
  33. package/build/block/index.js.map +1 -1
  34. package/build/block/init.js +1 -2
  35. package/build/block/init.js.map +1 -1
  36. package/build/button/color-background.native.js +1 -2
  37. package/build/button/color-background.native.js.map +1 -1
  38. package/build/button/constants.js +3 -6
  39. package/build/button/constants.js.map +1 -1
  40. package/build/button/deprecated.js +1 -2
  41. package/build/button/deprecated.js.map +1 -1
  42. package/build/button/edit.js +2 -3
  43. package/build/button/edit.js.map +1 -1
  44. package/build/button/edit.native.js +1 -3
  45. package/build/button/edit.native.js.map +1 -1
  46. package/build/button/index.js +9 -6
  47. package/build/button/index.js.map +1 -1
  48. package/build/button/init.js +1 -2
  49. package/build/button/init.js.map +1 -1
  50. package/build/buttons/deprecated.js +1 -2
  51. package/build/buttons/deprecated.js.map +1 -1
  52. package/build/buttons/edit.js +5 -13
  53. package/build/buttons/edit.js.map +1 -1
  54. package/build/buttons/edit.native.js +2 -5
  55. package/build/buttons/edit.native.js.map +1 -1
  56. package/build/buttons/index.js +6 -4
  57. package/build/buttons/index.js.map +1 -1
  58. package/build/buttons/init.js +1 -2
  59. package/build/buttons/init.js.map +1 -1
  60. package/build/buttons/transforms.js +1 -2
  61. package/build/buttons/transforms.js.map +1 -1
  62. package/build/buttons/transforms.native.js +1 -2
  63. package/build/buttons/transforms.native.js.map +1 -1
  64. package/build/calendar/index.js +5 -4
  65. package/build/calendar/index.js.map +1 -1
  66. package/build/calendar/init.js +1 -2
  67. package/build/calendar/init.js.map +1 -1
  68. package/build/calendar/transforms.js +1 -2
  69. package/build/calendar/transforms.js.map +1 -1
  70. package/build/categories/index.js +5 -4
  71. package/build/categories/index.js.map +1 -1
  72. package/build/categories/init.js +1 -2
  73. package/build/categories/init.js.map +1 -1
  74. package/build/code/edit.native.js +1 -2
  75. package/build/code/edit.native.js.map +1 -1
  76. package/build/code/index.js +5 -5
  77. package/build/code/index.js.map +1 -1
  78. package/build/code/init.js +1 -2
  79. package/build/code/init.js.map +1 -1
  80. package/build/code/transforms.js +1 -2
  81. package/build/code/transforms.js.map +1 -1
  82. package/build/code/transforms.native.js +1 -2
  83. package/build/code/transforms.native.js.map +1 -1
  84. package/build/column/column-preview.native.js +1 -2
  85. package/build/column/column-preview.native.js.map +1 -1
  86. package/build/column/deprecated.js +1 -2
  87. package/build/column/deprecated.js.map +1 -1
  88. package/build/column/edit.js +1 -2
  89. package/build/column/edit.js.map +1 -1
  90. package/build/column/edit.native.js +1 -2
  91. package/build/column/edit.native.js.map +1 -1
  92. package/build/column/index.js +7 -5
  93. package/build/column/index.js.map +1 -1
  94. package/build/column/init.js +1 -2
  95. package/build/column/init.js.map +1 -1
  96. package/build/columns/deprecated.js +1 -2
  97. package/build/columns/deprecated.js.map +1 -1
  98. package/build/columns/edit.js +53 -76
  99. package/build/columns/edit.js.map +1 -1
  100. package/build/columns/edit.native.js +1 -14
  101. package/build/columns/edit.native.js.map +1 -1
  102. package/build/columns/index.js +8 -5
  103. package/build/columns/index.js.map +1 -1
  104. package/build/columns/init.js +1 -2
  105. package/build/columns/init.js.map +1 -1
  106. package/build/columns/transforms.js +1 -2
  107. package/build/columns/transforms.js.map +1 -1
  108. package/build/columns/transforms.native.js +1 -2
  109. package/build/columns/transforms.native.js.map +1 -1
  110. package/build/columns/variations.js +1 -2
  111. package/build/columns/variations.js.map +1 -1
  112. package/build/comment-author-avatar/index.js +5 -4
  113. package/build/comment-author-avatar/index.js.map +1 -1
  114. package/build/comment-author-avatar/init.js +1 -2
  115. package/build/comment-author-avatar/init.js.map +1 -1
  116. package/build/comment-author-name/deprecated.js +1 -2
  117. package/build/comment-author-name/deprecated.js.map +1 -1
  118. package/build/comment-author-name/index.js +5 -4
  119. package/build/comment-author-name/index.js.map +1 -1
  120. package/build/comment-author-name/init.js +1 -2
  121. package/build/comment-author-name/init.js.map +1 -1
  122. package/build/comment-content/index.js +2 -4
  123. package/build/comment-content/index.js.map +1 -1
  124. package/build/comment-content/init.js +1 -2
  125. package/build/comment-content/init.js.map +1 -1
  126. package/build/comment-date/deprecated.js +1 -2
  127. package/build/comment-date/deprecated.js.map +1 -1
  128. package/build/comment-date/index.js +5 -4
  129. package/build/comment-date/index.js.map +1 -1
  130. package/build/comment-date/init.js +1 -2
  131. package/build/comment-date/init.js.map +1 -1
  132. package/build/comment-edit-link/index.js +5 -4
  133. package/build/comment-edit-link/index.js.map +1 -1
  134. package/build/comment-edit-link/init.js +1 -2
  135. package/build/comment-edit-link/init.js.map +1 -1
  136. package/build/comment-reply-link/edit.js +1 -2
  137. package/build/comment-reply-link/edit.js.map +1 -1
  138. package/build/comment-reply-link/index.js +2 -4
  139. package/build/comment-reply-link/index.js.map +1 -1
  140. package/build/comment-reply-link/init.js +1 -2
  141. package/build/comment-reply-link/init.js.map +1 -1
  142. package/build/comment-template/index.js +5 -4
  143. package/build/comment-template/index.js.map +1 -1
  144. package/build/comment-template/init.js +1 -2
  145. package/build/comment-template/init.js.map +1 -1
  146. package/build/comments/deprecated.js +1 -2
  147. package/build/comments/deprecated.js.map +1 -1
  148. package/build/comments/edit/template.js +1 -2
  149. package/build/comments/edit/template.js.map +1 -1
  150. package/build/comments/index.js +2 -4
  151. package/build/comments/index.js.map +1 -1
  152. package/build/comments/init.js +1 -2
  153. package/build/comments/init.js.map +1 -1
  154. package/build/comments-pagination/edit.js +1 -3
  155. package/build/comments-pagination/edit.js.map +1 -1
  156. package/build/comments-pagination/index.js +6 -4
  157. package/build/comments-pagination/index.js.map +1 -1
  158. package/build/comments-pagination/init.js +1 -2
  159. package/build/comments-pagination/init.js.map +1 -1
  160. package/build/comments-pagination-next/index.js +5 -4
  161. package/build/comments-pagination-next/index.js.map +1 -1
  162. package/build/comments-pagination-next/init.js +1 -2
  163. package/build/comments-pagination-next/init.js.map +1 -1
  164. package/build/comments-pagination-numbers/index.js +5 -4
  165. package/build/comments-pagination-numbers/index.js.map +1 -1
  166. package/build/comments-pagination-numbers/init.js +1 -2
  167. package/build/comments-pagination-numbers/init.js.map +1 -1
  168. package/build/comments-pagination-previous/index.js +5 -4
  169. package/build/comments-pagination-previous/index.js.map +1 -1
  170. package/build/comments-pagination-previous/init.js +1 -2
  171. package/build/comments-pagination-previous/init.js.map +1 -1
  172. package/build/comments-title/deprecated.js +4 -2
  173. package/build/comments-title/deprecated.js.map +1 -1
  174. package/build/comments-title/index.js +5 -4
  175. package/build/comments-title/index.js.map +1 -1
  176. package/build/comments-title/init.js +1 -2
  177. package/build/comments-title/init.js.map +1 -1
  178. package/build/cover/controls.native.js +1 -2
  179. package/build/cover/controls.native.js.map +1 -1
  180. package/build/cover/deprecated.js +1 -2
  181. package/build/cover/deprecated.js.map +1 -1
  182. package/build/cover/edit/color-utils.js +3 -6
  183. package/build/cover/edit/color-utils.js.map +1 -1
  184. package/build/cover/edit/index.js +1 -2
  185. package/build/cover/edit/index.js.map +1 -1
  186. package/build/cover/edit/inspector-controls.js +3 -3
  187. package/build/cover/edit/inspector-controls.js.map +1 -1
  188. package/build/cover/edit.native.js +1 -2
  189. package/build/cover/edit.native.js.map +1 -1
  190. package/build/cover/focal-point-settings-button.native.js +1 -2
  191. package/build/cover/focal-point-settings-button.native.js.map +1 -1
  192. package/build/cover/index.js +5 -4
  193. package/build/cover/index.js.map +1 -1
  194. package/build/cover/init.js +1 -2
  195. package/build/cover/init.js.map +1 -1
  196. package/build/cover/overlay-color-settings.native.js +1 -2
  197. package/build/cover/overlay-color-settings.native.js.map +1 -1
  198. package/build/cover/shared.js +7 -14
  199. package/build/cover/shared.js.map +1 -1
  200. package/build/cover/transforms.js +1 -2
  201. package/build/cover/transforms.js.map +1 -1
  202. package/build/cover/transforms.native.js +1 -2
  203. package/build/cover/transforms.native.js.map +1 -1
  204. package/build/cover/variations.js +1 -2
  205. package/build/cover/variations.js.map +1 -1
  206. package/build/details/edit.js +1 -2
  207. package/build/details/edit.js.map +1 -1
  208. package/build/details/index.js +5 -4
  209. package/build/details/index.js.map +1 -1
  210. package/build/details/init.js +1 -2
  211. package/build/details/init.js.map +1 -1
  212. package/build/embed/constants.js +2 -4
  213. package/build/embed/constants.js.map +1 -1
  214. package/build/embed/deprecated.js +4 -2
  215. package/build/embed/deprecated.js.map +1 -1
  216. package/build/embed/edit.js +1 -2
  217. package/build/embed/edit.js.map +1 -1
  218. package/build/embed/edit.native.js +1 -2
  219. package/build/embed/edit.native.js.map +1 -1
  220. package/build/embed/embed-controls.js +1 -2
  221. package/build/embed/embed-controls.js.map +1 -1
  222. package/build/embed/embed-controls.native.js +1 -2
  223. package/build/embed/embed-controls.native.js.map +1 -1
  224. package/build/embed/embed-link-settings.native.js +1 -2
  225. package/build/embed/embed-link-settings.native.js.map +1 -1
  226. package/build/embed/embed-loading.js +1 -2
  227. package/build/embed/embed-loading.js.map +1 -1
  228. package/build/embed/embed-loading.native.js +1 -2
  229. package/build/embed/embed-loading.native.js.map +1 -1
  230. package/build/embed/embed-no-preview.native.js +1 -2
  231. package/build/embed/embed-no-preview.native.js.map +1 -1
  232. package/build/embed/embed-placeholder.js +2 -3
  233. package/build/embed/embed-placeholder.js.map +1 -1
  234. package/build/embed/embed-placeholder.native.js +1 -2
  235. package/build/embed/embed-placeholder.native.js.map +1 -1
  236. package/build/embed/embed-preview.js +1 -2
  237. package/build/embed/embed-preview.js.map +1 -1
  238. package/build/embed/embed-preview.native.js +1 -2
  239. package/build/embed/embed-preview.native.js.map +1 -1
  240. package/build/embed/icons.js +20 -40
  241. package/build/embed/icons.js.map +1 -1
  242. package/build/embed/index.js +5 -4
  243. package/build/embed/index.js.map +1 -1
  244. package/build/embed/init.js +1 -2
  245. package/build/embed/init.js.map +1 -1
  246. package/build/embed/transforms.js +4 -2
  247. package/build/embed/transforms.js.map +1 -1
  248. package/build/embed/transforms.native.js +1 -2
  249. package/build/embed/transforms.native.js.map +1 -1
  250. package/build/embed/util.js +4 -2
  251. package/build/embed/util.js.map +1 -1
  252. package/build/embed/variations.js +1 -2
  253. package/build/embed/variations.js.map +1 -1
  254. package/build/embed/wp-embed-preview.native.js +1 -2
  255. package/build/embed/wp-embed-preview.native.js.map +1 -1
  256. package/build/file/deprecated.js +1 -2
  257. package/build/file/deprecated.js.map +1 -1
  258. package/build/file/edit.js +3 -6
  259. package/build/file/edit.js.map +1 -1
  260. package/build/file/edit.native.js +1 -2
  261. package/build/file/edit.native.js.map +1 -1
  262. package/build/file/index.js +2 -4
  263. package/build/file/index.js.map +1 -1
  264. package/build/file/init.js +1 -2
  265. package/build/file/init.js.map +1 -1
  266. package/build/file/transforms.js +1 -2
  267. package/build/file/transforms.js.map +1 -1
  268. package/build/file/transforms.native.js +1 -2
  269. package/build/file/transforms.native.js.map +1 -1
  270. package/build/file/view.js +2 -0
  271. package/build/file/view.js.map +1 -1
  272. package/build/footnotes/format.js +6 -4
  273. package/build/footnotes/format.js.map +1 -1
  274. package/build/footnotes/index.js +5 -4
  275. package/build/footnotes/index.js.map +1 -1
  276. package/build/footnotes/init.js +1 -2
  277. package/build/footnotes/init.js.map +1 -1
  278. package/build/form/edit.js +1 -4
  279. package/build/form/edit.js.map +1 -1
  280. package/build/form/index.js +3 -4
  281. package/build/form/index.js.map +1 -1
  282. package/build/form/init.js +1 -2
  283. package/build/form/init.js.map +1 -1
  284. package/build/form/save.js +1 -2
  285. package/build/form/save.js.map +1 -1
  286. package/build/form/utils.js +2 -4
  287. package/build/form/utils.js.map +1 -1
  288. package/build/form/variations.js +1 -2
  289. package/build/form/variations.js.map +1 -1
  290. package/build/form/view.js +2 -0
  291. package/build/form/view.js.map +1 -1
  292. package/build/form-input/deprecated.js +1 -3
  293. package/build/form-input/deprecated.js.map +1 -1
  294. package/build/form-input/edit.js +1 -2
  295. package/build/form-input/edit.js.map +1 -1
  296. package/build/form-input/index.js +2 -4
  297. package/build/form-input/index.js.map +1 -1
  298. package/build/form-input/init.js +1 -2
  299. package/build/form-input/init.js.map +1 -1
  300. package/build/form-input/variations.js +1 -2
  301. package/build/form-input/variations.js.map +1 -1
  302. package/build/form-submission-notification/edit.js +1 -2
  303. package/build/form-submission-notification/edit.js.map +1 -1
  304. package/build/form-submission-notification/index.js +2 -4
  305. package/build/form-submission-notification/index.js.map +1 -1
  306. package/build/form-submission-notification/init.js +1 -2
  307. package/build/form-submission-notification/init.js.map +1 -1
  308. package/build/form-submission-notification/variations.js +1 -2
  309. package/build/form-submission-notification/variations.js.map +1 -1
  310. package/build/form-submit-button/edit.js +1 -3
  311. package/build/form-submit-button/edit.js.map +1 -1
  312. package/build/form-submit-button/index.js +3 -4
  313. package/build/form-submit-button/index.js.map +1 -1
  314. package/build/form-submit-button/init.js +1 -2
  315. package/build/form-submit-button/init.js.map +1 -1
  316. package/build/form-submit-button/save.js +1 -2
  317. package/build/form-submit-button/save.js.map +1 -1
  318. package/build/freeform/convert-to-blocks-button.js +1 -2
  319. package/build/freeform/convert-to-blocks-button.js.map +1 -1
  320. package/build/freeform/edit.native.js +1 -2
  321. package/build/freeform/edit.native.js.map +1 -1
  322. package/build/freeform/index.js +2 -4
  323. package/build/freeform/index.js.map +1 -1
  324. package/build/freeform/init.js +1 -2
  325. package/build/freeform/init.js.map +1 -1
  326. package/build/gallery/constants.js +5 -10
  327. package/build/gallery/constants.js.map +1 -1
  328. package/build/gallery/deprecated.js +1 -2
  329. package/build/gallery/deprecated.js.map +1 -1
  330. package/build/gallery/edit-wrapper.js +1 -2
  331. package/build/gallery/edit-wrapper.js.map +1 -1
  332. package/build/gallery/edit.js +20 -27
  333. package/build/gallery/edit.js.map +1 -1
  334. package/build/gallery/gallery.native.js +1 -3
  335. package/build/gallery/gallery.native.js.map +1 -1
  336. package/build/gallery/index.js +6 -4
  337. package/build/gallery/index.js.map +1 -1
  338. package/build/gallery/init.js +1 -2
  339. package/build/gallery/init.js.map +1 -1
  340. package/build/gallery/shared-icon.js +1 -2
  341. package/build/gallery/shared-icon.js.map +1 -1
  342. package/build/gallery/transforms.js +1 -2
  343. package/build/gallery/transforms.js.map +1 -1
  344. package/build/gallery/transforms.native.js +1 -2
  345. package/build/gallery/transforms.native.js.map +1 -1
  346. package/build/gallery/v1/constants.js +3 -6
  347. package/build/gallery/v1/constants.js.map +1 -1
  348. package/build/gallery/v1/edit.js +1 -2
  349. package/build/gallery/v1/edit.js.map +1 -1
  350. package/build/gallery/v1/gallery-button.native.js +1 -2
  351. package/build/gallery/v1/gallery-button.native.js.map +1 -1
  352. package/build/gallery/v1/gallery-image.js +1 -3
  353. package/build/gallery/v1/gallery-image.js.map +1 -1
  354. package/build/gallery/v1/gallery-image.native.js +1 -2
  355. package/build/gallery/v1/gallery-image.native.js.map +1 -1
  356. package/build/gallery/v1/gallery.js +1 -2
  357. package/build/gallery/v1/gallery.js.map +1 -1
  358. package/build/gallery/v1/gallery.native.js +1 -2
  359. package/build/gallery/v1/gallery.native.js.map +1 -1
  360. package/build/gallery/v1/tiles.native.js +1 -2
  361. package/build/gallery/v1/tiles.native.js.map +1 -1
  362. package/build/group/deprecated.js +1 -2
  363. package/build/group/deprecated.js.map +1 -1
  364. package/build/group/edit.js +3 -4
  365. package/build/group/edit.js.map +1 -1
  366. package/build/group/edit.native.js +1 -2
  367. package/build/group/edit.native.js.map +1 -1
  368. package/build/group/index.js +5 -4
  369. package/build/group/index.js.map +1 -1
  370. package/build/group/init.js +1 -2
  371. package/build/group/init.js.map +1 -1
  372. package/build/group/placeholder.js +1 -2
  373. package/build/group/placeholder.js.map +1 -1
  374. package/build/group/transforms.js +1 -2
  375. package/build/group/transforms.js.map +1 -1
  376. package/build/group/variations.js +1 -2
  377. package/build/group/variations.js.map +1 -1
  378. package/build/heading/deprecated.js +1 -2
  379. package/build/heading/deprecated.js.map +1 -1
  380. package/build/heading/edit.js +1 -2
  381. package/build/heading/edit.js.map +1 -1
  382. package/build/heading/edit.native.js +1 -2
  383. package/build/heading/edit.native.js.map +1 -1
  384. package/build/heading/index.js +6 -5
  385. package/build/heading/index.js.map +1 -1
  386. package/build/heading/init.js +1 -2
  387. package/build/heading/init.js.map +1 -1
  388. package/build/heading/transforms.js +1 -2
  389. package/build/heading/transforms.js.map +1 -1
  390. package/build/heading/transforms.native.js +1 -2
  391. package/build/heading/transforms.native.js.map +1 -1
  392. package/build/home-link/index.js +5 -4
  393. package/build/home-link/index.js.map +1 -1
  394. package/build/home-link/init.js +1 -2
  395. package/build/home-link/init.js.map +1 -1
  396. package/build/html/index.js +6 -5
  397. package/build/html/index.js.map +1 -1
  398. package/build/html/init.js +1 -2
  399. package/build/html/init.js.map +1 -1
  400. package/build/html/transforms.js +1 -2
  401. package/build/html/transforms.js.map +1 -1
  402. package/build/html/transforms.native.js +1 -2
  403. package/build/html/transforms.native.js.map +1 -1
  404. package/build/image/constants.js +8 -16
  405. package/build/image/constants.js.map +1 -1
  406. package/build/image/deprecated.js +1 -2
  407. package/build/image/deprecated.js.map +1 -1
  408. package/build/image/edit.js +22 -22
  409. package/build/image/edit.js.map +1 -1
  410. package/build/image/edit.native.js +1 -2
  411. package/build/image/edit.native.js.map +1 -1
  412. package/build/image/image.js +44 -46
  413. package/build/image/image.js.map +1 -1
  414. package/build/image/index.js +6 -4
  415. package/build/image/index.js.map +1 -1
  416. package/build/image/init.js +1 -2
  417. package/build/image/init.js.map +1 -1
  418. package/build/image/save.js +2 -0
  419. package/build/image/save.js.map +1 -1
  420. package/build/image/transforms.js +1 -2
  421. package/build/image/transforms.js.map +1 -1
  422. package/build/image/transforms.native.js +1 -2
  423. package/build/image/transforms.native.js.map +1 -1
  424. package/build/image/view.js +266 -369
  425. package/build/image/view.js.map +1 -1
  426. package/build/index.js +3 -4
  427. package/build/index.js.map +1 -1
  428. package/build/index.native.js +4 -6
  429. package/build/index.native.js.map +1 -1
  430. package/build/latest-comments/index.js +5 -4
  431. package/build/latest-comments/index.js.map +1 -1
  432. package/build/latest-comments/init.js +1 -2
  433. package/build/latest-comments/init.js.map +1 -1
  434. package/build/latest-posts/constants.js +3 -6
  435. package/build/latest-posts/constants.js.map +1 -1
  436. package/build/latest-posts/deprecated.js +4 -2
  437. package/build/latest-posts/deprecated.js.map +1 -1
  438. package/build/latest-posts/edit.native.js +1 -2
  439. package/build/latest-posts/edit.native.js.map +1 -1
  440. package/build/latest-posts/index.js +5 -4
  441. package/build/latest-posts/index.js.map +1 -1
  442. package/build/latest-posts/init.js +1 -2
  443. package/build/latest-posts/init.js.map +1 -1
  444. package/build/list/deprecated.js +1 -2
  445. package/build/list/deprecated.js.map +1 -1
  446. package/build/list/edit.js +0 -1
  447. package/build/list/edit.js.map +1 -1
  448. package/build/list/index.js +7 -5
  449. package/build/list/index.js.map +1 -1
  450. package/build/list/init.js +1 -2
  451. package/build/list/init.js.map +1 -1
  452. package/build/list/ordered-list-settings.js +1 -2
  453. package/build/list/ordered-list-settings.js.map +1 -1
  454. package/build/list/tag-name.js +1 -2
  455. package/build/list/tag-name.js.map +1 -1
  456. package/build/list/tag-name.native.js +1 -2
  457. package/build/list/tag-name.native.js.map +1 -1
  458. package/build/list/transforms.js +1 -2
  459. package/build/list/transforms.js.map +1 -1
  460. package/build/list/transforms.native.js +1 -2
  461. package/build/list/transforms.native.js.map +1 -1
  462. package/build/list-item/edit.js +0 -1
  463. package/build/list-item/edit.js.map +1 -1
  464. package/build/list-item/edit.native.js +0 -1
  465. package/build/list-item/edit.native.js.map +1 -1
  466. package/build/list-item/index.js +6 -4
  467. package/build/list-item/index.js.map +1 -1
  468. package/build/list-item/init.js +1 -2
  469. package/build/list-item/init.js.map +1 -1
  470. package/build/list-item/transforms.js +1 -2
  471. package/build/list-item/transforms.js.map +1 -1
  472. package/build/loginout/index.js +5 -4
  473. package/build/loginout/index.js.map +1 -1
  474. package/build/loginout/init.js +1 -2
  475. package/build/loginout/init.js.map +1 -1
  476. package/build/media-text/constants.js +5 -10
  477. package/build/media-text/constants.js.map +1 -1
  478. package/build/media-text/deprecated.js +1 -2
  479. package/build/media-text/deprecated.js.map +1 -1
  480. package/build/media-text/edit.js +13 -12
  481. package/build/media-text/edit.js.map +1 -1
  482. package/build/media-text/edit.native.js +2 -3
  483. package/build/media-text/edit.native.js.map +1 -1
  484. package/build/media-text/icon-retry.native.js +1 -2
  485. package/build/media-text/icon-retry.native.js.map +1 -1
  486. package/build/media-text/index.js +5 -4
  487. package/build/media-text/index.js.map +1 -1
  488. package/build/media-text/init.js +1 -2
  489. package/build/media-text/init.js.map +1 -1
  490. package/build/media-text/media-container.js +1 -2
  491. package/build/media-text/media-container.js.map +1 -1
  492. package/build/media-text/media-container.native.js +1 -2
  493. package/build/media-text/media-container.native.js.map +1 -1
  494. package/build/media-text/transforms.js +1 -2
  495. package/build/media-text/transforms.js.map +1 -1
  496. package/build/media-text/transforms.native.js +1 -2
  497. package/build/media-text/transforms.native.js.map +1 -1
  498. package/build/missing/edit.js +1 -2
  499. package/build/missing/edit.js.map +1 -1
  500. package/build/missing/edit.native.js +1 -2
  501. package/build/missing/edit.native.js.map +1 -1
  502. package/build/missing/index.js +6 -5
  503. package/build/missing/index.js.map +1 -1
  504. package/build/missing/init.js +1 -2
  505. package/build/missing/init.js.map +1 -1
  506. package/build/more/edit.native.js +1 -2
  507. package/build/more/edit.native.js.map +1 -1
  508. package/build/more/index.js +6 -5
  509. package/build/more/index.js.map +1 -1
  510. package/build/more/init.js +1 -2
  511. package/build/more/init.js.map +1 -1
  512. package/build/more/transforms.js +1 -2
  513. package/build/more/transforms.js.map +1 -1
  514. package/build/more/transforms.native.js +1 -2
  515. package/build/more/transforms.native.js.map +1 -1
  516. package/build/navigation/constants.js +6 -13
  517. package/build/navigation/constants.js.map +1 -1
  518. package/build/navigation/deprecated.js +1 -2
  519. package/build/navigation/deprecated.js.map +1 -1
  520. package/build/navigation/edit/deleted-navigation-warning.js +1 -2
  521. package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
  522. package/build/navigation/edit/index.js +3 -5
  523. package/build/navigation/edit/index.js.map +1 -1
  524. package/build/navigation/edit/inner-blocks.js +1 -5
  525. package/build/navigation/edit/inner-blocks.js.map +1 -1
  526. package/build/navigation/edit/manage-menus-button.js +1 -2
  527. package/build/navigation/edit/manage-menus-button.js.map +1 -1
  528. package/build/navigation/edit/menu-inspector-controls.js +1 -2
  529. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  530. package/build/navigation/edit/navigation-menu-selector.js +1 -2
  531. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  532. package/build/navigation/edit/placeholder/placeholder-preview.js +1 -2
  533. package/build/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
  534. package/build/navigation/edit/unsaved-inner-blocks.js +1 -5
  535. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  536. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +5 -10
  537. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  538. package/build/navigation/edit/use-create-navigation-menu.js +4 -8
  539. package/build/navigation/edit/use-create-navigation-menu.js.map +1 -1
  540. package/build/navigation/edit/use-navigation-notice.js +1 -2
  541. package/build/navigation/edit/use-navigation-notice.js.map +1 -1
  542. package/build/navigation/index.js +3 -4
  543. package/build/navigation/index.js.map +1 -1
  544. package/build/navigation/init.js +1 -2
  545. package/build/navigation/init.js.map +1 -1
  546. package/build/navigation/view.js +2 -0
  547. package/build/navigation/view.js.map +1 -1
  548. package/build/navigation-link/edit.js +12 -6
  549. package/build/navigation-link/edit.js.map +1 -1
  550. package/build/navigation-link/index.js +7 -5
  551. package/build/navigation-link/index.js.map +1 -1
  552. package/build/navigation-link/init.js +1 -2
  553. package/build/navigation-link/init.js.map +1 -1
  554. package/build/navigation-link/link-ui.js +114 -47
  555. package/build/navigation-link/link-ui.js.map +1 -1
  556. package/build/navigation-link/transforms.js +1 -2
  557. package/build/navigation-link/transforms.js.map +1 -1
  558. package/build/navigation-submenu/index.js +21 -8
  559. package/build/navigation-submenu/index.js.map +1 -1
  560. package/build/navigation-submenu/init.js +1 -2
  561. package/build/navigation-submenu/init.js.map +1 -1
  562. package/build/navigation-submenu/transforms.js +1 -2
  563. package/build/navigation-submenu/transforms.js.map +1 -1
  564. package/build/nextpage/edit.native.js +1 -2
  565. package/build/nextpage/edit.native.js.map +1 -1
  566. package/build/nextpage/index.js +6 -5
  567. package/build/nextpage/index.js.map +1 -1
  568. package/build/nextpage/init.js +1 -2
  569. package/build/nextpage/init.js.map +1 -1
  570. package/build/nextpage/transforms.js +1 -2
  571. package/build/nextpage/transforms.js.map +1 -1
  572. package/build/nextpage/transforms.native.js +1 -2
  573. package/build/nextpage/transforms.native.js.map +1 -1
  574. package/build/page-list/convert-to-links-modal.js +1 -2
  575. package/build/page-list/convert-to-links-modal.js.map +1 -1
  576. package/build/page-list/edit.js +0 -1
  577. package/build/page-list/edit.js.map +1 -1
  578. package/build/page-list/index.js +6 -4
  579. package/build/page-list/index.js.map +1 -1
  580. package/build/page-list/init.js +1 -2
  581. package/build/page-list/init.js.map +1 -1
  582. package/build/page-list-item/index.js +6 -5
  583. package/build/page-list-item/index.js.map +1 -1
  584. package/build/page-list-item/init.js +1 -2
  585. package/build/page-list-item/init.js.map +1 -1
  586. package/build/paragraph/deprecated.js +1 -2
  587. package/build/paragraph/deprecated.js.map +1 -1
  588. package/build/paragraph/edit.js +4 -5
  589. package/build/paragraph/edit.js.map +1 -1
  590. package/build/paragraph/edit.native.js +1 -2
  591. package/build/paragraph/edit.native.js.map +1 -1
  592. package/build/paragraph/index.js +6 -5
  593. package/build/paragraph/index.js.map +1 -1
  594. package/build/paragraph/init.js +1 -2
  595. package/build/paragraph/init.js.map +1 -1
  596. package/build/paragraph/transforms.js +5 -3
  597. package/build/paragraph/transforms.js.map +1 -1
  598. package/build/paragraph/transforms.native.js +1 -2
  599. package/build/paragraph/transforms.native.js.map +1 -1
  600. package/build/pattern/edit.js +1 -2
  601. package/build/pattern/edit.js.map +1 -1
  602. package/build/pattern/index.js +6 -5
  603. package/build/pattern/index.js.map +1 -1
  604. package/build/pattern/init.js +1 -2
  605. package/build/pattern/init.js.map +1 -1
  606. package/build/post-author/edit.js +1 -2
  607. package/build/post-author/edit.js.map +1 -1
  608. package/build/post-author/index.js +5 -4
  609. package/build/post-author/index.js.map +1 -1
  610. package/build/post-author/init.js +1 -2
  611. package/build/post-author/init.js.map +1 -1
  612. package/build/post-author-biography/edit.js +1 -2
  613. package/build/post-author-biography/edit.js.map +1 -1
  614. package/build/post-author-biography/index.js +5 -4
  615. package/build/post-author-biography/index.js.map +1 -1
  616. package/build/post-author-biography/init.js +1 -2
  617. package/build/post-author-biography/init.js.map +1 -1
  618. package/build/post-author-name/edit.js +1 -2
  619. package/build/post-author-name/edit.js.map +1 -1
  620. package/build/post-author-name/index.js +5 -4
  621. package/build/post-author-name/index.js.map +1 -1
  622. package/build/post-author-name/init.js +1 -2
  623. package/build/post-author-name/init.js.map +1 -1
  624. package/build/post-author-name/transforms.js +1 -2
  625. package/build/post-author-name/transforms.js.map +1 -1
  626. package/build/post-comment/edit.js +1 -3
  627. package/build/post-comment/edit.js.map +1 -1
  628. package/build/post-comment/index.js +7 -5
  629. package/build/post-comment/index.js.map +1 -1
  630. package/build/post-comment/init.js +1 -2
  631. package/build/post-comment/init.js.map +1 -1
  632. package/build/post-comments-count/index.js +5 -4
  633. package/build/post-comments-count/index.js.map +1 -1
  634. package/build/post-comments-count/init.js +1 -2
  635. package/build/post-comments-count/init.js.map +1 -1
  636. package/build/post-comments-form/form.js +1 -2
  637. package/build/post-comments-form/form.js.map +1 -1
  638. package/build/post-comments-form/index.js +2 -4
  639. package/build/post-comments-form/index.js.map +1 -1
  640. package/build/post-comments-form/init.js +1 -2
  641. package/build/post-comments-form/init.js.map +1 -1
  642. package/build/post-comments-link/edit.js +1 -2
  643. package/build/post-comments-link/edit.js.map +1 -1
  644. package/build/post-comments-link/index.js +5 -4
  645. package/build/post-comments-link/index.js.map +1 -1
  646. package/build/post-comments-link/init.js +1 -2
  647. package/build/post-comments-link/init.js.map +1 -1
  648. package/build/post-content/index.js +2 -4
  649. package/build/post-content/index.js.map +1 -1
  650. package/build/post-content/init.js +1 -2
  651. package/build/post-content/init.js.map +1 -1
  652. package/build/post-date/deprecated.js +1 -2
  653. package/build/post-date/deprecated.js.map +1 -1
  654. package/build/post-date/index.js +5 -4
  655. package/build/post-date/index.js.map +1 -1
  656. package/build/post-date/init.js +1 -2
  657. package/build/post-date/init.js.map +1 -1
  658. package/build/post-date/variations.js +1 -2
  659. package/build/post-date/variations.js.map +1 -1
  660. package/build/post-excerpt/index.js +5 -4
  661. package/build/post-excerpt/index.js.map +1 -1
  662. package/build/post-excerpt/init.js +1 -2
  663. package/build/post-excerpt/init.js.map +1 -1
  664. package/build/post-excerpt/transforms.js +1 -2
  665. package/build/post-excerpt/transforms.js.map +1 -1
  666. package/build/post-featured-image/dimension-controls.js +1 -2
  667. package/build/post-featured-image/dimension-controls.js.map +1 -1
  668. package/build/post-featured-image/index.js +5 -4
  669. package/build/post-featured-image/index.js.map +1 -1
  670. package/build/post-featured-image/init.js +1 -2
  671. package/build/post-featured-image/init.js.map +1 -1
  672. package/build/post-featured-image/overlay.js +1 -2
  673. package/build/post-featured-image/overlay.js.map +1 -1
  674. package/build/post-navigation-link/edit.js +5 -5
  675. package/build/post-navigation-link/edit.js.map +1 -1
  676. package/build/post-navigation-link/index.js +5 -7
  677. package/build/post-navigation-link/index.js.map +1 -1
  678. package/build/post-navigation-link/init.js +1 -2
  679. package/build/post-navigation-link/init.js.map +1 -1
  680. package/build/post-navigation-link/variations.js +1 -2
  681. package/build/post-navigation-link/variations.js.map +1 -1
  682. package/build/post-template/edit.js +5 -6
  683. package/build/post-template/edit.js.map +1 -1
  684. package/build/post-template/index.js +5 -4
  685. package/build/post-template/index.js.map +1 -1
  686. package/build/post-template/init.js +1 -2
  687. package/build/post-template/init.js.map +1 -1
  688. package/build/post-terms/index.js +5 -4
  689. package/build/post-terms/index.js.map +1 -1
  690. package/build/post-terms/init.js +1 -2
  691. package/build/post-terms/init.js.map +1 -1
  692. package/build/post-time-to-read/edit.js +1 -2
  693. package/build/post-time-to-read/edit.js.map +1 -1
  694. package/build/post-time-to-read/icon.js +1 -2
  695. package/build/post-time-to-read/icon.js.map +1 -1
  696. package/build/post-time-to-read/index.js +5 -4
  697. package/build/post-time-to-read/index.js.map +1 -1
  698. package/build/post-time-to-read/init.js +1 -2
  699. package/build/post-time-to-read/init.js.map +1 -1
  700. package/build/post-title/deprecated.js +1 -2
  701. package/build/post-title/deprecated.js.map +1 -1
  702. package/build/post-title/index.js +5 -4
  703. package/build/post-title/index.js.map +1 -1
  704. package/build/post-title/init.js +1 -2
  705. package/build/post-title/init.js.map +1 -1
  706. package/build/preformatted/index.js +5 -5
  707. package/build/preformatted/index.js.map +1 -1
  708. package/build/preformatted/init.js +1 -2
  709. package/build/preformatted/init.js.map +1 -1
  710. package/build/preformatted/transforms.js +1 -2
  711. package/build/preformatted/transforms.js.map +1 -1
  712. package/build/preformatted/transforms.native.js +1 -2
  713. package/build/preformatted/transforms.native.js.map +1 -1
  714. package/build/pullquote/blockquote.js +1 -2
  715. package/build/pullquote/blockquote.js.map +1 -1
  716. package/build/pullquote/deprecated.js +1 -2
  717. package/build/pullquote/deprecated.js.map +1 -1
  718. package/build/pullquote/edit.js +1 -2
  719. package/build/pullquote/edit.js.map +1 -1
  720. package/build/pullquote/edit.native.js +1 -2
  721. package/build/pullquote/edit.native.js.map +1 -1
  722. package/build/pullquote/figure.js +1 -2
  723. package/build/pullquote/figure.js.map +1 -1
  724. package/build/pullquote/index.js +5 -4
  725. package/build/pullquote/index.js.map +1 -1
  726. package/build/pullquote/init.js +1 -2
  727. package/build/pullquote/init.js.map +1 -1
  728. package/build/pullquote/shared.js +1 -2
  729. package/build/pullquote/shared.js.map +1 -1
  730. package/build/pullquote/transforms.js +1 -2
  731. package/build/pullquote/transforms.js.map +1 -1
  732. package/build/pullquote/transforms.native.js +1 -2
  733. package/build/pullquote/transforms.native.js.map +1 -1
  734. package/build/query/deprecated.js +1 -2
  735. package/build/query/deprecated.js.map +1 -1
  736. package/build/query/edit/index.js +1 -2
  737. package/build/query/edit/index.js.map +1 -1
  738. package/build/query/edit/inspector-controls/author-control.js +1 -2
  739. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  740. package/build/query/edit/inspector-controls/create-new-post-link.js +1 -2
  741. package/build/query/edit/inspector-controls/create-new-post-link.js.map +1 -1
  742. package/build/query/edit/inspector-controls/order-control.js +1 -2
  743. package/build/query/edit/inspector-controls/order-control.js.map +1 -1
  744. package/build/query/edit/inspector-controls/parent-control.js +1 -2
  745. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  746. package/build/query/icons.js +4 -8
  747. package/build/query/icons.js.map +1 -1
  748. package/build/query/index.js +5 -7
  749. package/build/query/index.js.map +1 -1
  750. package/build/query/init.js +1 -2
  751. package/build/query/init.js.map +1 -1
  752. package/build/query/variations.js +1 -2
  753. package/build/query/variations.js.map +1 -1
  754. package/build/query/view.js +7 -42
  755. package/build/query/view.js.map +1 -1
  756. package/build/query-no-results/index.js +5 -4
  757. package/build/query-no-results/index.js.map +1 -1
  758. package/build/query-no-results/init.js +1 -2
  759. package/build/query-no-results/init.js.map +1 -1
  760. package/build/query-pagination/deprecated.js +1 -2
  761. package/build/query-pagination/deprecated.js.map +1 -1
  762. package/build/query-pagination/edit.js +1 -3
  763. package/build/query-pagination/edit.js.map +1 -1
  764. package/build/query-pagination/index.js +7 -5
  765. package/build/query-pagination/index.js.map +1 -1
  766. package/build/query-pagination/init.js +1 -2
  767. package/build/query-pagination/init.js.map +1 -1
  768. package/build/query-pagination-next/index.js +5 -4
  769. package/build/query-pagination-next/index.js.map +1 -1
  770. package/build/query-pagination-next/init.js +1 -2
  771. package/build/query-pagination-next/init.js.map +1 -1
  772. package/build/query-pagination-numbers/index.js +5 -4
  773. package/build/query-pagination-numbers/index.js.map +1 -1
  774. package/build/query-pagination-numbers/init.js +1 -2
  775. package/build/query-pagination-numbers/init.js.map +1 -1
  776. package/build/query-pagination-previous/index.js +5 -4
  777. package/build/query-pagination-previous/index.js.map +1 -1
  778. package/build/query-pagination-previous/init.js +1 -2
  779. package/build/query-pagination-previous/init.js.map +1 -1
  780. package/build/query-title/deprecated.js +1 -2
  781. package/build/query-title/deprecated.js.map +1 -1
  782. package/build/query-title/index.js +5 -4
  783. package/build/query-title/index.js.map +1 -1
  784. package/build/query-title/init.js +1 -2
  785. package/build/query-title/init.js.map +1 -1
  786. package/build/query-title/variations.js +1 -2
  787. package/build/query-title/variations.js.map +1 -1
  788. package/build/quote/deprecated.js +1 -2
  789. package/build/quote/deprecated.js.map +1 -1
  790. package/build/quote/index.js +5 -4
  791. package/build/quote/index.js.map +1 -1
  792. package/build/quote/init.js +1 -2
  793. package/build/quote/init.js.map +1 -1
  794. package/build/quote/transforms.js +1 -2
  795. package/build/quote/transforms.js.map +1 -1
  796. package/build/quote/transforms.native.js +1 -2
  797. package/build/quote/transforms.native.js.map +1 -1
  798. package/build/read-more/index.js +5 -4
  799. package/build/read-more/index.js.map +1 -1
  800. package/build/read-more/init.js +1 -2
  801. package/build/read-more/init.js.map +1 -1
  802. package/build/rss/index.js +6 -5
  803. package/build/rss/index.js.map +1 -1
  804. package/build/rss/init.js +1 -2
  805. package/build/rss/init.js.map +1 -1
  806. package/build/search/icons.js +6 -12
  807. package/build/search/icons.js.map +1 -1
  808. package/build/search/index.js +2 -4
  809. package/build/search/index.js.map +1 -1
  810. package/build/search/init.js +1 -2
  811. package/build/search/init.js.map +1 -1
  812. package/build/search/utils.js +3 -6
  813. package/build/search/utils.js.map +1 -1
  814. package/build/search/variations.js +1 -2
  815. package/build/search/variations.js.map +1 -1
  816. package/build/search/view.js +2 -0
  817. package/build/search/view.js.map +1 -1
  818. package/build/separator/deprecated.js +1 -2
  819. package/build/separator/deprecated.js.map +1 -1
  820. package/build/separator/index.js +5 -4
  821. package/build/separator/index.js.map +1 -1
  822. package/build/separator/init.js +1 -2
  823. package/build/separator/init.js.map +1 -1
  824. package/build/separator/separator-settings.native.js +1 -2
  825. package/build/separator/separator-settings.native.js.map +1 -1
  826. package/build/separator/transforms.js +1 -2
  827. package/build/separator/transforms.js.map +1 -1
  828. package/build/separator/transforms.native.js +1 -2
  829. package/build/separator/transforms.native.js.map +1 -1
  830. package/build/shortcode/edit.native.js +1 -2
  831. package/build/shortcode/edit.native.js.map +1 -1
  832. package/build/shortcode/index.js +2 -4
  833. package/build/shortcode/index.js.map +1 -1
  834. package/build/shortcode/init.js +1 -2
  835. package/build/shortcode/init.js.map +1 -1
  836. package/build/shortcode/transforms.js +1 -2
  837. package/build/shortcode/transforms.js.map +1 -1
  838. package/build/shortcode/transforms.native.js +1 -2
  839. package/build/shortcode/transforms.native.js.map +1 -1
  840. package/build/site-logo/edit.js +0 -1
  841. package/build/site-logo/edit.js.map +1 -1
  842. package/build/site-logo/index.js +5 -4
  843. package/build/site-logo/index.js.map +1 -1
  844. package/build/site-logo/init.js +1 -2
  845. package/build/site-logo/init.js.map +1 -1
  846. package/build/site-logo/transforms.js +1 -2
  847. package/build/site-logo/transforms.js.map +1 -1
  848. package/build/site-tagline/deprecated.js +1 -2
  849. package/build/site-tagline/deprecated.js.map +1 -1
  850. package/build/site-tagline/icon.js +1 -2
  851. package/build/site-tagline/icon.js.map +1 -1
  852. package/build/site-tagline/index.js +5 -4
  853. package/build/site-tagline/index.js.map +1 -1
  854. package/build/site-tagline/init.js +1 -2
  855. package/build/site-tagline/init.js.map +1 -1
  856. package/build/site-title/deprecated.js +1 -2
  857. package/build/site-title/deprecated.js.map +1 -1
  858. package/build/site-title/index.js +5 -4
  859. package/build/site-title/index.js.map +1 -1
  860. package/build/site-title/init.js +1 -2
  861. package/build/site-title/init.js.map +1 -1
  862. package/build/site-title/transforms.js +1 -2
  863. package/build/site-title/transforms.js.map +1 -1
  864. package/build/social-link/edit.js +1 -2
  865. package/build/social-link/edit.js.map +1 -1
  866. package/build/social-link/edit.native.js +1 -2
  867. package/build/social-link/edit.native.js.map +1 -1
  868. package/build/social-link/icons/patreon.js +3 -10
  869. package/build/social-link/icons/patreon.js.map +1 -1
  870. package/build/social-link/index.js +6 -5
  871. package/build/social-link/index.js.map +1 -1
  872. package/build/social-link/init.js +1 -2
  873. package/build/social-link/init.js.map +1 -1
  874. package/build/social-link/variations.js +1 -2
  875. package/build/social-link/variations.js.map +1 -1
  876. package/build/social-links/deprecated.js +1 -2
  877. package/build/social-links/deprecated.js.map +1 -1
  878. package/build/social-links/edit.js +1 -4
  879. package/build/social-links/edit.js.map +1 -1
  880. package/build/social-links/edit.native.js +1 -6
  881. package/build/social-links/edit.native.js.map +1 -1
  882. package/build/social-links/index.js +6 -4
  883. package/build/social-links/index.js.map +1 -1
  884. package/build/social-links/init.js +1 -2
  885. package/build/social-links/init.js.map +1 -1
  886. package/build/spacer/constants.js +1 -2
  887. package/build/spacer/constants.js.map +1 -1
  888. package/build/spacer/controls.native.js +2 -4
  889. package/build/spacer/controls.native.js.map +1 -1
  890. package/build/spacer/deprecated.js +1 -2
  891. package/build/spacer/deprecated.js.map +1 -1
  892. package/build/spacer/edit.js +6 -4
  893. package/build/spacer/edit.js.map +1 -1
  894. package/build/spacer/edit.native.js +3 -4
  895. package/build/spacer/edit.native.js.map +1 -1
  896. package/build/spacer/index.js +5 -4
  897. package/build/spacer/index.js.map +1 -1
  898. package/build/spacer/init.js +1 -2
  899. package/build/spacer/init.js.map +1 -1
  900. package/build/table/deprecated.js +1 -2
  901. package/build/table/deprecated.js.map +1 -1
  902. package/build/table/edit.js +1 -2
  903. package/build/table/edit.js.map +1 -1
  904. package/build/table/index.js +6 -5
  905. package/build/table/index.js.map +1 -1
  906. package/build/table/init.js +1 -2
  907. package/build/table/init.js.map +1 -1
  908. package/build/table/transforms.js +1 -2
  909. package/build/table/transforms.js.map +1 -1
  910. package/build/table/transforms.native.js +1 -2
  911. package/build/table/transforms.native.js.map +1 -1
  912. package/build/table-of-contents/index.js +5 -4
  913. package/build/table-of-contents/index.js.map +1 -1
  914. package/build/table-of-contents/init.js +1 -2
  915. package/build/table-of-contents/init.js.map +1 -1
  916. package/build/tag-cloud/edit.js +1 -2
  917. package/build/tag-cloud/edit.js.map +1 -1
  918. package/build/tag-cloud/index.js +5 -4
  919. package/build/tag-cloud/index.js.map +1 -1
  920. package/build/tag-cloud/init.js +1 -2
  921. package/build/tag-cloud/init.js.map +1 -1
  922. package/build/tag-cloud/transforms.js +1 -2
  923. package/build/tag-cloud/transforms.js.map +1 -1
  924. package/build/template-part/edit/index.js +6 -10
  925. package/build/template-part/edit/index.js.map +1 -1
  926. package/build/template-part/index.js +9 -8
  927. package/build/template-part/index.js.map +1 -1
  928. package/build/template-part/init.js +1 -2
  929. package/build/template-part/init.js.map +1 -1
  930. package/build/term-description/index.js +5 -4
  931. package/build/term-description/index.js.map +1 -1
  932. package/build/term-description/init.js +1 -2
  933. package/build/term-description/init.js.map +1 -1
  934. package/build/text-columns/index.js +6 -5
  935. package/build/text-columns/index.js.map +1 -1
  936. package/build/text-columns/init.js +1 -2
  937. package/build/text-columns/init.js.map +1 -1
  938. package/build/text-columns/transforms.js +1 -2
  939. package/build/text-columns/transforms.js.map +1 -1
  940. package/build/text-columns/transforms.native.js +1 -2
  941. package/build/text-columns/transforms.native.js.map +1 -1
  942. package/build/utils/constants.js +1 -2
  943. package/build/utils/constants.js.map +1 -1
  944. package/build/utils/hooks.js +1 -2
  945. package/build/utils/hooks.js.map +1 -1
  946. package/build/utils/transformation-categories.native.js +1 -2
  947. package/build/utils/transformation-categories.native.js.map +1 -1
  948. package/build/verse/deprecated.js +1 -2
  949. package/build/verse/deprecated.js.map +1 -1
  950. package/build/verse/index.js +5 -5
  951. package/build/verse/index.js.map +1 -1
  952. package/build/verse/init.js +1 -2
  953. package/build/verse/init.js.map +1 -1
  954. package/build/verse/transforms.js +1 -2
  955. package/build/verse/transforms.js.map +1 -1
  956. package/build/verse/transforms.native.js +1 -2
  957. package/build/verse/transforms.native.js.map +1 -1
  958. package/build/video/deprecated.js +4 -2
  959. package/build/video/deprecated.js.map +1 -1
  960. package/build/video/edit-common-settings.js +1 -2
  961. package/build/video/edit-common-settings.js.map +1 -1
  962. package/build/video/edit.js +1 -2
  963. package/build/video/edit.js.map +1 -1
  964. package/build/video/edit.native.js +1 -2
  965. package/build/video/edit.native.js.map +1 -1
  966. package/build/video/icon-retry.native.js +1 -2
  967. package/build/video/icon-retry.native.js.map +1 -1
  968. package/build/video/index.js +5 -4
  969. package/build/video/index.js.map +1 -1
  970. package/build/video/init.js +1 -2
  971. package/build/video/init.js.map +1 -1
  972. package/build/video/transforms.js +1 -2
  973. package/build/video/transforms.js.map +1 -1
  974. package/build/video/transforms.native.js +1 -2
  975. package/build/video/transforms.native.js.map +1 -1
  976. package/build-module/archives/index.js +3 -0
  977. package/build-module/archives/index.js.map +1 -1
  978. package/build-module/audio/index.js +3 -0
  979. package/build-module/audio/index.js.map +1 -1
  980. package/build-module/avatar/index.js +3 -0
  981. package/build-module/avatar/index.js.map +1 -1
  982. package/build-module/block/deprecated.js +59 -0
  983. package/build-module/block/deprecated.js.map +1 -0
  984. package/build-module/block/edit.js +92 -101
  985. package/build-module/block/edit.js.map +1 -1
  986. package/build-module/block/index.js +24 -4
  987. package/build-module/block/index.js.map +1 -1
  988. package/build-module/button/edit.js +1 -1
  989. package/build-module/button/edit.js.map +1 -1
  990. package/build-module/button/edit.native.js +0 -1
  991. package/build-module/button/edit.native.js.map +1 -1
  992. package/build-module/button/index.js +7 -2
  993. package/build-module/button/index.js.map +1 -1
  994. package/build-module/buttons/edit.js +4 -11
  995. package/build-module/buttons/edit.js.map +1 -1
  996. package/build-module/buttons/edit.native.js +2 -5
  997. package/build-module/buttons/edit.native.js.map +1 -1
  998. package/build-module/buttons/index.js +4 -0
  999. package/build-module/buttons/index.js.map +1 -1
  1000. package/build-module/calendar/index.js +3 -0
  1001. package/build-module/calendar/index.js.map +1 -1
  1002. package/build-module/categories/index.js +3 -0
  1003. package/build-module/categories/index.js.map +1 -1
  1004. package/build-module/code/index.js +3 -1
  1005. package/build-module/code/index.js.map +1 -1
  1006. package/build-module/column/index.js +5 -1
  1007. package/build-module/column/index.js.map +1 -1
  1008. package/build-module/columns/edit.js +53 -76
  1009. package/build-module/columns/edit.js.map +1 -1
  1010. package/build-module/columns/edit.native.js +0 -12
  1011. package/build-module/columns/edit.native.js.map +1 -1
  1012. package/build-module/columns/index.js +6 -1
  1013. package/build-module/columns/index.js.map +1 -1
  1014. package/build-module/comment-author-avatar/index.js +3 -0
  1015. package/build-module/comment-author-avatar/index.js.map +1 -1
  1016. package/build-module/comment-author-name/index.js +3 -0
  1017. package/build-module/comment-author-name/index.js.map +1 -1
  1018. package/build-module/comment-date/index.js +3 -0
  1019. package/build-module/comment-date/index.js.map +1 -1
  1020. package/build-module/comment-edit-link/index.js +3 -0
  1021. package/build-module/comment-edit-link/index.js.map +1 -1
  1022. package/build-module/comment-template/index.js +3 -0
  1023. package/build-module/comment-template/index.js.map +1 -1
  1024. package/build-module/comments-pagination/edit.js +1 -3
  1025. package/build-module/comments-pagination/edit.js.map +1 -1
  1026. package/build-module/comments-pagination/index.js +4 -0
  1027. package/build-module/comments-pagination/index.js.map +1 -1
  1028. package/build-module/comments-pagination-next/index.js +3 -0
  1029. package/build-module/comments-pagination-next/index.js.map +1 -1
  1030. package/build-module/comments-pagination-numbers/index.js +3 -0
  1031. package/build-module/comments-pagination-numbers/index.js.map +1 -1
  1032. package/build-module/comments-pagination-previous/index.js +3 -0
  1033. package/build-module/comments-pagination-previous/index.js.map +1 -1
  1034. package/build-module/comments-title/deprecated.js +3 -0
  1035. package/build-module/comments-title/deprecated.js.map +1 -1
  1036. package/build-module/comments-title/index.js +3 -0
  1037. package/build-module/comments-title/index.js.map +1 -1
  1038. package/build-module/cover/edit/inspector-controls.js +3 -3
  1039. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  1040. package/build-module/cover/index.js +3 -0
  1041. package/build-module/cover/index.js.map +1 -1
  1042. package/build-module/details/index.js +3 -0
  1043. package/build-module/details/index.js.map +1 -1
  1044. package/build-module/embed/deprecated.js +3 -0
  1045. package/build-module/embed/deprecated.js.map +1 -1
  1046. package/build-module/embed/embed-placeholder.js +1 -1
  1047. package/build-module/embed/embed-placeholder.js.map +1 -1
  1048. package/build-module/embed/index.js +3 -0
  1049. package/build-module/embed/index.js.map +1 -1
  1050. package/build-module/embed/transforms.js +3 -0
  1051. package/build-module/embed/transforms.js.map +1 -1
  1052. package/build-module/embed/util.js +3 -0
  1053. package/build-module/embed/util.js.map +1 -1
  1054. package/build-module/file/view.js +2 -0
  1055. package/build-module/file/view.js.map +1 -1
  1056. package/build-module/footnotes/format.js +4 -0
  1057. package/build-module/footnotes/format.js.map +1 -1
  1058. package/build-module/footnotes/index.js +3 -0
  1059. package/build-module/footnotes/index.js.map +1 -1
  1060. package/build-module/form/edit.js +0 -2
  1061. package/build-module/form/edit.js.map +1 -1
  1062. package/build-module/form/index.js +1 -0
  1063. package/build-module/form/index.js.map +1 -1
  1064. package/build-module/form/view.js +2 -0
  1065. package/build-module/form/view.js.map +1 -1
  1066. package/build-module/form-input/deprecated.js +0 -1
  1067. package/build-module/form-input/deprecated.js.map +1 -1
  1068. package/build-module/form-submit-button/edit.js +0 -1
  1069. package/build-module/form-submit-button/edit.js.map +1 -1
  1070. package/build-module/form-submit-button/index.js +1 -0
  1071. package/build-module/form-submit-button/index.js.map +1 -1
  1072. package/build-module/gallery/edit.js +19 -25
  1073. package/build-module/gallery/edit.js.map +1 -1
  1074. package/build-module/gallery/gallery.native.js +0 -1
  1075. package/build-module/gallery/gallery.native.js.map +1 -1
  1076. package/build-module/gallery/index.js +4 -0
  1077. package/build-module/gallery/index.js.map +1 -1
  1078. package/build-module/gallery/v1/gallery-image.js +0 -1
  1079. package/build-module/gallery/v1/gallery-image.js.map +1 -1
  1080. package/build-module/group/index.js +3 -0
  1081. package/build-module/group/index.js.map +1 -1
  1082. package/build-module/heading/index.js +4 -1
  1083. package/build-module/heading/index.js.map +1 -1
  1084. package/build-module/home-link/index.js +3 -0
  1085. package/build-module/home-link/index.js.map +1 -1
  1086. package/build-module/html/index.js +4 -1
  1087. package/build-module/html/index.js.map +1 -1
  1088. package/build-module/image/edit.js +22 -21
  1089. package/build-module/image/edit.js.map +1 -1
  1090. package/build-module/image/image.js +45 -47
  1091. package/build-module/image/image.js.map +1 -1
  1092. package/build-module/image/index.js +4 -0
  1093. package/build-module/image/index.js.map +1 -1
  1094. package/build-module/image/save.js +3 -1
  1095. package/build-module/image/save.js.map +1 -1
  1096. package/build-module/image/view.js +266 -368
  1097. package/build-module/image/view.js.map +1 -1
  1098. package/build-module/latest-comments/index.js +3 -0
  1099. package/build-module/latest-comments/index.js.map +1 -1
  1100. package/build-module/latest-posts/deprecated.js +3 -0
  1101. package/build-module/latest-posts/deprecated.js.map +1 -1
  1102. package/build-module/latest-posts/index.js +3 -0
  1103. package/build-module/latest-posts/index.js.map +1 -1
  1104. package/build-module/list/edit.js +0 -1
  1105. package/build-module/list/edit.js.map +1 -1
  1106. package/build-module/list/index.js +5 -1
  1107. package/build-module/list/index.js.map +1 -1
  1108. package/build-module/list-item/edit.js +0 -1
  1109. package/build-module/list-item/edit.js.map +1 -1
  1110. package/build-module/list-item/edit.native.js +0 -1
  1111. package/build-module/list-item/edit.native.js.map +1 -1
  1112. package/build-module/list-item/index.js +4 -0
  1113. package/build-module/list-item/index.js.map +1 -1
  1114. package/build-module/loginout/index.js +3 -0
  1115. package/build-module/loginout/index.js.map +1 -1
  1116. package/build-module/media-text/edit.js +12 -10
  1117. package/build-module/media-text/edit.js.map +1 -1
  1118. package/build-module/media-text/edit.native.js +1 -1
  1119. package/build-module/media-text/edit.native.js.map +1 -1
  1120. package/build-module/media-text/index.js +3 -0
  1121. package/build-module/media-text/index.js.map +1 -1
  1122. package/build-module/missing/index.js +4 -1
  1123. package/build-module/missing/index.js.map +1 -1
  1124. package/build-module/more/index.js +4 -1
  1125. package/build-module/more/index.js.map +1 -1
  1126. package/build-module/navigation/constants.js +0 -1
  1127. package/build-module/navigation/constants.js.map +1 -1
  1128. package/build-module/navigation/edit/index.js +0 -1
  1129. package/build-module/navigation/edit/index.js.map +1 -1
  1130. package/build-module/navigation/edit/inner-blocks.js +2 -6
  1131. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  1132. package/build-module/navigation/edit/unsaved-inner-blocks.js +3 -7
  1133. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  1134. package/build-module/navigation/index.js +1 -0
  1135. package/build-module/navigation/index.js.map +1 -1
  1136. package/build-module/navigation/view.js +2 -0
  1137. package/build-module/navigation/view.js.map +1 -1
  1138. package/build-module/navigation-link/edit.js +11 -6
  1139. package/build-module/navigation-link/edit.js.map +1 -1
  1140. package/build-module/navigation-link/index.js +5 -1
  1141. package/build-module/navigation-link/index.js.map +1 -1
  1142. package/build-module/navigation-link/link-ui.js +116 -51
  1143. package/build-module/navigation-link/link-ui.js.map +1 -1
  1144. package/build-module/navigation-submenu/index.js +19 -4
  1145. package/build-module/navigation-submenu/index.js.map +1 -1
  1146. package/build-module/nextpage/index.js +4 -1
  1147. package/build-module/nextpage/index.js.map +1 -1
  1148. package/build-module/page-list/edit.js +0 -1
  1149. package/build-module/page-list/edit.js.map +1 -1
  1150. package/build-module/page-list/index.js +4 -0
  1151. package/build-module/page-list/index.js.map +1 -1
  1152. package/build-module/page-list-item/index.js +4 -1
  1153. package/build-module/page-list-item/index.js.map +1 -1
  1154. package/build-module/paragraph/edit.js +3 -3
  1155. package/build-module/paragraph/edit.js.map +1 -1
  1156. package/build-module/paragraph/index.js +4 -1
  1157. package/build-module/paragraph/index.js.map +1 -1
  1158. package/build-module/paragraph/transforms.js +4 -1
  1159. package/build-module/paragraph/transforms.js.map +1 -1
  1160. package/build-module/pattern/index.js +4 -1
  1161. package/build-module/pattern/index.js.map +1 -1
  1162. package/build-module/post-author/index.js +3 -0
  1163. package/build-module/post-author/index.js.map +1 -1
  1164. package/build-module/post-author-biography/index.js +3 -0
  1165. package/build-module/post-author-biography/index.js.map +1 -1
  1166. package/build-module/post-author-name/index.js +3 -0
  1167. package/build-module/post-author-name/index.js.map +1 -1
  1168. package/build-module/post-comment/edit.js +1 -3
  1169. package/build-module/post-comment/edit.js.map +1 -1
  1170. package/build-module/post-comment/index.js +5 -1
  1171. package/build-module/post-comment/index.js.map +1 -1
  1172. package/build-module/post-comments-count/index.js +3 -0
  1173. package/build-module/post-comments-count/index.js.map +1 -1
  1174. package/build-module/post-comments-link/index.js +3 -0
  1175. package/build-module/post-comments-link/index.js.map +1 -1
  1176. package/build-module/post-date/index.js +3 -0
  1177. package/build-module/post-date/index.js.map +1 -1
  1178. package/build-module/post-excerpt/index.js +3 -0
  1179. package/build-module/post-excerpt/index.js.map +1 -1
  1180. package/build-module/post-featured-image/index.js +3 -0
  1181. package/build-module/post-featured-image/index.js.map +1 -1
  1182. package/build-module/post-navigation-link/edit.js +5 -5
  1183. package/build-module/post-navigation-link/edit.js.map +1 -1
  1184. package/build-module/post-navigation-link/index.js +3 -3
  1185. package/build-module/post-navigation-link/index.js.map +1 -1
  1186. package/build-module/post-template/edit.js +5 -6
  1187. package/build-module/post-template/edit.js.map +1 -1
  1188. package/build-module/post-template/index.js +3 -0
  1189. package/build-module/post-template/index.js.map +1 -1
  1190. package/build-module/post-terms/index.js +3 -0
  1191. package/build-module/post-terms/index.js.map +1 -1
  1192. package/build-module/post-time-to-read/index.js +3 -0
  1193. package/build-module/post-time-to-read/index.js.map +1 -1
  1194. package/build-module/post-title/index.js +3 -0
  1195. package/build-module/post-title/index.js.map +1 -1
  1196. package/build-module/preformatted/index.js +3 -1
  1197. package/build-module/preformatted/index.js.map +1 -1
  1198. package/build-module/pullquote/index.js +3 -0
  1199. package/build-module/pullquote/index.js.map +1 -1
  1200. package/build-module/query/index.js +3 -3
  1201. package/build-module/query/index.js.map +1 -1
  1202. package/build-module/query/view.js +5 -40
  1203. package/build-module/query/view.js.map +1 -1
  1204. package/build-module/query-no-results/index.js +3 -0
  1205. package/build-module/query-no-results/index.js.map +1 -1
  1206. package/build-module/query-pagination/edit.js +1 -3
  1207. package/build-module/query-pagination/edit.js.map +1 -1
  1208. package/build-module/query-pagination/index.js +5 -1
  1209. package/build-module/query-pagination/index.js.map +1 -1
  1210. package/build-module/query-pagination-next/index.js +3 -0
  1211. package/build-module/query-pagination-next/index.js.map +1 -1
  1212. package/build-module/query-pagination-numbers/index.js +3 -0
  1213. package/build-module/query-pagination-numbers/index.js.map +1 -1
  1214. package/build-module/query-pagination-previous/index.js +3 -0
  1215. package/build-module/query-pagination-previous/index.js.map +1 -1
  1216. package/build-module/query-title/index.js +3 -0
  1217. package/build-module/query-title/index.js.map +1 -1
  1218. package/build-module/quote/index.js +3 -0
  1219. package/build-module/quote/index.js.map +1 -1
  1220. package/build-module/read-more/index.js +3 -0
  1221. package/build-module/read-more/index.js.map +1 -1
  1222. package/build-module/rss/index.js +4 -1
  1223. package/build-module/rss/index.js.map +1 -1
  1224. package/build-module/search/view.js +2 -0
  1225. package/build-module/search/view.js.map +1 -1
  1226. package/build-module/separator/index.js +3 -0
  1227. package/build-module/separator/index.js.map +1 -1
  1228. package/build-module/site-logo/edit.js +0 -1
  1229. package/build-module/site-logo/edit.js.map +1 -1
  1230. package/build-module/site-logo/index.js +3 -0
  1231. package/build-module/site-logo/index.js.map +1 -1
  1232. package/build-module/site-tagline/index.js +3 -0
  1233. package/build-module/site-tagline/index.js.map +1 -1
  1234. package/build-module/site-title/index.js +3 -0
  1235. package/build-module/site-title/index.js.map +1 -1
  1236. package/build-module/social-link/icons/patreon.js +4 -11
  1237. package/build-module/social-link/icons/patreon.js.map +1 -1
  1238. package/build-module/social-link/index.js +4 -1
  1239. package/build-module/social-link/index.js.map +1 -1
  1240. package/build-module/social-links/edit.js +0 -2
  1241. package/build-module/social-links/edit.js.map +1 -1
  1242. package/build-module/social-links/edit.native.js +0 -3
  1243. package/build-module/social-links/edit.native.js.map +1 -1
  1244. package/build-module/social-links/index.js +4 -0
  1245. package/build-module/social-links/index.js.map +1 -1
  1246. package/build-module/spacer/edit.js +5 -2
  1247. package/build-module/spacer/edit.js.map +1 -1
  1248. package/build-module/spacer/index.js +3 -0
  1249. package/build-module/spacer/index.js.map +1 -1
  1250. package/build-module/table/index.js +4 -1
  1251. package/build-module/table/index.js.map +1 -1
  1252. package/build-module/table-of-contents/index.js +3 -0
  1253. package/build-module/table-of-contents/index.js.map +1 -1
  1254. package/build-module/tag-cloud/index.js +3 -0
  1255. package/build-module/tag-cloud/index.js.map +1 -1
  1256. package/build-module/template-part/edit/index.js +6 -10
  1257. package/build-module/template-part/edit/index.js.map +1 -1
  1258. package/build-module/template-part/index.js +7 -4
  1259. package/build-module/template-part/index.js.map +1 -1
  1260. package/build-module/term-description/index.js +3 -0
  1261. package/build-module/term-description/index.js.map +1 -1
  1262. package/build-module/text-columns/index.js +4 -1
  1263. package/build-module/text-columns/index.js.map +1 -1
  1264. package/build-module/verse/index.js +3 -1
  1265. package/build-module/verse/index.js.map +1 -1
  1266. package/build-module/video/deprecated.js +3 -0
  1267. package/build-module/video/deprecated.js.map +1 -1
  1268. package/build-module/video/index.js +3 -0
  1269. package/build-module/video/index.js.map +1 -1
  1270. package/build-style/editor-rtl.css +11 -1
  1271. package/build-style/editor.css +11 -1
  1272. package/build-style/embed/editor-rtl.css +5 -1
  1273. package/build-style/embed/editor.css +5 -1
  1274. package/build-style/image/style-rtl.css +6 -6
  1275. package/build-style/image/style.css +6 -6
  1276. package/build-style/navigation-link/style-rtl.css +22 -0
  1277. package/build-style/navigation-link/style.css +22 -0
  1278. package/build-style/{query/style.css → post-content/editor-rtl.css} +3 -41
  1279. package/build-style/{query/style-rtl.css → post-content/editor.css} +3 -41
  1280. package/build-style/separator/style-rtl.css +2 -2
  1281. package/build-style/separator/style.css +2 -2
  1282. package/build-style/social-links/style-rtl.css +2 -2
  1283. package/build-style/social-links/style.css +2 -2
  1284. package/build-style/spacer/editor-rtl.css +1 -0
  1285. package/build-style/spacer/editor.css +1 -0
  1286. package/build-style/style-rtl.css +32 -10
  1287. package/build-style/style.css +32 -10
  1288. package/package.json +34 -34
  1289. package/src/archives/block.json +3 -0
  1290. package/src/audio/block.json +3 -0
  1291. package/src/avatar/block.json +3 -0
  1292. package/src/block/block.json +6 -3
  1293. package/src/block/deprecated.js +57 -0
  1294. package/src/block/edit.js +150 -148
  1295. package/src/block/index.js +21 -0
  1296. package/src/block/index.php +15 -2
  1297. package/src/button/block.json +7 -2
  1298. package/src/button/edit.js +1 -1
  1299. package/src/buttons/block.json +4 -0
  1300. package/src/buttons/edit.js +4 -13
  1301. package/src/buttons/edit.native.js +2 -6
  1302. package/src/calendar/block.json +3 -0
  1303. package/src/categories/block.json +3 -0
  1304. package/src/code/block.json +3 -0
  1305. package/src/column/block.json +5 -1
  1306. package/src/columns/block.json +6 -1
  1307. package/src/columns/edit.js +91 -123
  1308. package/src/columns/edit.native.js +0 -12
  1309. package/src/comment-author-avatar/block.json +3 -0
  1310. package/src/comment-author-name/block.json +3 -0
  1311. package/src/comment-date/block.json +3 -0
  1312. package/src/comment-edit-link/block.json +3 -0
  1313. package/src/comment-template/block.json +3 -0
  1314. package/src/comments-pagination/block.json +8 -0
  1315. package/src/comments-pagination/edit.js +0 -6
  1316. package/src/comments-pagination-next/block.json +3 -0
  1317. package/src/comments-pagination-numbers/block.json +3 -0
  1318. package/src/comments-pagination-previous/block.json +3 -0
  1319. package/src/comments-title/block.json +3 -0
  1320. package/src/cover/block.json +3 -0
  1321. package/src/cover/edit/inspector-controls.js +3 -2
  1322. package/src/cover/test/edit.js +2 -2
  1323. package/src/details/block.json +3 -0
  1324. package/src/editor.scss +1 -0
  1325. package/src/embed/block.json +3 -0
  1326. package/src/embed/editor.scss +8 -2
  1327. package/src/embed/embed-placeholder.js +1 -1
  1328. package/src/file/index.php +12 -8
  1329. package/src/file/view.js +9 -5
  1330. package/src/footnotes/block.json +3 -0
  1331. package/src/footnotes/format.js +10 -0
  1332. package/src/form/block.json +9 -0
  1333. package/src/form/edit.js +0 -11
  1334. package/src/form/index.php +2 -2
  1335. package/src/form/view.js +2 -0
  1336. package/src/form-submit-button/block.json +1 -0
  1337. package/src/form-submit-button/edit.js +0 -1
  1338. package/src/gallery/block.json +4 -0
  1339. package/src/gallery/edit.js +26 -35
  1340. package/src/gallery/gallery.native.js +0 -1
  1341. package/src/gallery/index.php +51 -21
  1342. package/src/gallery/test/index.native.js +1 -1
  1343. package/src/group/block.json +3 -0
  1344. package/src/heading/block.json +4 -1
  1345. package/src/heading/test/__snapshots__/index.native.js.snap +6 -0
  1346. package/src/heading/test/index.native.js +24 -9
  1347. package/src/home-link/block.json +3 -0
  1348. package/src/home-link/index.php +4 -1
  1349. package/src/html/block.json +4 -1
  1350. package/src/image/block.json +4 -0
  1351. package/src/image/edit.js +17 -15
  1352. package/src/image/image.js +61 -77
  1353. package/src/image/index.php +123 -166
  1354. package/src/image/save.js +3 -0
  1355. package/src/image/style.scss +2 -2
  1356. package/src/image/view.js +392 -499
  1357. package/src/latest-comments/block.json +3 -0
  1358. package/src/latest-posts/block.json +3 -0
  1359. package/src/list/block.json +5 -1
  1360. package/src/list/edit.js +0 -1
  1361. package/src/list-item/block.json +4 -0
  1362. package/src/list-item/edit.js +0 -1
  1363. package/src/list-item/edit.native.js +0 -1
  1364. package/src/loginout/block.json +3 -0
  1365. package/src/media-text/block.json +3 -0
  1366. package/src/media-text/edit.js +12 -12
  1367. package/src/media-text/edit.native.js +1 -1
  1368. package/src/missing/block.json +4 -1
  1369. package/src/more/block.json +4 -1
  1370. package/src/navigation/block.json +13 -0
  1371. package/src/navigation/constants.js +0 -14
  1372. package/src/navigation/edit/inner-blocks.js +2 -18
  1373. package/src/navigation/edit/unsaved-inner-blocks.js +3 -19
  1374. package/src/navigation/index.php +82 -47
  1375. package/src/navigation/view.js +184 -171
  1376. package/src/navigation-link/block.json +9 -1
  1377. package/src/navigation-link/edit.js +10 -11
  1378. package/src/navigation-link/index.php +31 -110
  1379. package/src/navigation-link/link-ui.js +216 -111
  1380. package/src/navigation-link/style.scss +26 -0
  1381. package/src/navigation-submenu/block.json +4 -1
  1382. package/src/navigation-submenu/index.js +11 -4
  1383. package/src/nextpage/block.json +4 -1
  1384. package/src/page-list/block.json +4 -0
  1385. package/src/page-list/edit.js +0 -1
  1386. package/src/page-list-item/block.json +4 -1
  1387. package/src/paragraph/block.json +4 -1
  1388. package/src/paragraph/edit.js +3 -3
  1389. package/src/pattern/block.json +4 -1
  1390. package/src/post-author/block.json +3 -0
  1391. package/src/post-author-biography/block.json +3 -0
  1392. package/src/post-author-name/block.json +3 -0
  1393. package/src/post-comment/block.json +12 -1
  1394. package/src/post-comment/edit.js +0 -9
  1395. package/src/post-comments-count/block.json +3 -0
  1396. package/src/post-comments-link/block.json +3 -0
  1397. package/src/post-content/editor.scss +4 -0
  1398. package/src/post-date/block.json +3 -0
  1399. package/src/post-excerpt/block.json +3 -0
  1400. package/src/post-featured-image/block.json +3 -0
  1401. package/src/post-navigation-link/block.json +3 -3
  1402. package/src/post-navigation-link/edit.js +1 -7
  1403. package/src/post-navigation-link/index.php +2 -5
  1404. package/src/post-template/block.json +3 -0
  1405. package/src/post-template/edit.js +5 -5
  1406. package/src/post-terms/block.json +3 -0
  1407. package/src/post-terms/index.php +2 -2
  1408. package/src/post-time-to-read/block.json +3 -0
  1409. package/src/post-title/block.json +3 -0
  1410. package/src/preformatted/block.json +3 -0
  1411. package/src/pullquote/block.json +3 -0
  1412. package/src/query/block.json +3 -3
  1413. package/src/query/index.php +42 -66
  1414. package/src/query/view.js +43 -71
  1415. package/src/query-no-results/block.json +3 -0
  1416. package/src/query-pagination/block.json +9 -1
  1417. package/src/query-pagination/edit.js +0 -6
  1418. package/src/query-pagination-next/block.json +3 -0
  1419. package/src/query-pagination-numbers/block.json +3 -0
  1420. package/src/query-pagination-numbers/index.php +9 -6
  1421. package/src/query-pagination-previous/block.json +3 -0
  1422. package/src/query-title/block.json +3 -0
  1423. package/src/quote/block.json +3 -0
  1424. package/src/read-more/block.json +3 -0
  1425. package/src/rss/block.json +4 -1
  1426. package/src/search/index.php +25 -13
  1427. package/src/search/view.js +64 -60
  1428. package/src/separator/block.json +3 -0
  1429. package/src/separator/style.scss +3 -3
  1430. package/src/site-logo/block.json +3 -0
  1431. package/src/site-tagline/block.json +3 -0
  1432. package/src/site-title/block.json +3 -0
  1433. package/src/social-link/block.json +4 -1
  1434. package/src/social-link/icons/patreon.js +3 -4
  1435. package/src/social-link/index.php +1 -1
  1436. package/src/social-link/socials-with-bg.scss +1 -1
  1437. package/src/social-link/socials-without-bg.scss +1 -1
  1438. package/src/social-links/block.json +4 -0
  1439. package/src/social-links/edit.js +0 -3
  1440. package/src/social-links/edit.native.js +0 -6
  1441. package/src/spacer/block.json +3 -0
  1442. package/src/spacer/edit.js +7 -2
  1443. package/src/spacer/editor.scss +2 -0
  1444. package/src/table/block.json +4 -1
  1445. package/src/table-of-contents/block.json +3 -0
  1446. package/src/tag-cloud/block.json +3 -0
  1447. package/src/template-part/block.json +4 -1
  1448. package/src/template-part/edit/index.js +6 -9
  1449. package/src/template-part/index.js +4 -4
  1450. package/src/template-part/index.php +9 -9
  1451. package/src/term-description/block.json +3 -0
  1452. package/src/text-columns/block.json +4 -1
  1453. package/src/verse/block.json +3 -0
  1454. package/src/video/block.json +3 -0
  1455. package/src/query/style.scss +0 -52
package/src/image/view.js CHANGED
@@ -3,540 +3,433 @@
3
3
  */
4
4
  import { store, getContext, getElement } from '@wordpress/interactivity';
5
5
 
6
- const focusableSelectors = [
7
- 'a[href]',
8
- 'area[href]',
9
- 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
10
- 'select:not([disabled]):not([aria-hidden])',
11
- 'textarea:not([disabled]):not([aria-hidden])',
12
- 'button:not([disabled]):not([aria-hidden])',
13
- 'iframe',
14
- 'object',
15
- 'embed',
16
- '[contenteditable]',
17
- '[tabindex]:not([tabindex^="-"])',
18
- ];
19
-
20
- /**
21
- * Stores a context-bound scroll handler.
22
- *
23
- * This callback could be defined inline inside of the store
24
- * object but it's created externally to avoid confusion about
25
- * how its logic is called. This logic is not referenced directly
26
- * by the directives in the markup because the scroll event we
27
- * need to listen to is triggered on the window; so by defining it
28
- * outside of the store, we signal that the behavior here is different.
29
- * If we find a compelling reason to move it to the store, feel free.
30
- *
31
- * @type {Function}
32
- */
33
- let scrollCallback;
34
-
35
6
  /**
36
- * Tracks whether user is touching screen; used to
37
- * differentiate behavior for touch and mouse input.
7
+ * Tracks whether user is touching screen; used to differentiate behavior for
8
+ * touch and mouse input.
38
9
  *
39
10
  * @type {boolean}
40
11
  */
41
12
  let isTouching = false;
42
13
 
43
14
  /**
44
- * Tracks the last time the screen was touched; used to
45
- * differentiate behavior for touch and mouse input.
15
+ * Tracks the last time the screen was touched; used to differentiate behavior
16
+ * for touch and mouse input.
46
17
  *
47
18
  * @type {number}
48
19
  */
49
20
  let lastTouchTime = 0;
50
21
 
51
22
  /**
52
- * Lightbox page-scroll handler: prevents scrolling.
23
+ * Stores the image reference of the currently opened lightbox.
53
24
  *
54
- * This handler is added to prevent scrolling behaviors that
55
- * trigger content shift while the lightbox is open.
56
- *
57
- * It would be better to accomplish this through CSS alone, but
58
- * using overflow: hidden is currently the only way to do so, and
59
- * that causes the layout to shift and prevents the zoom animation
60
- * from working in some cases because we're unable to account for
61
- * the layout shift when doing the animation calculations. Instead,
62
- * here we use JavaScript to prevent and reset the scrolling
63
- * behavior. In the future, we may be able to use CSS or overflow: hidden
64
- * instead to not rely on JavaScript, but this seems to be the best approach
65
- * for now that provides the best visual experience.
66
- *
67
- * @param {Object} ctx Context object with the `core/image` namespace.
25
+ * @type {HTMLElement}
68
26
  */
69
- function handleScroll( ctx ) {
70
- // We can't override the scroll behavior on mobile devices
71
- // because doing so breaks the pinch to zoom functionality, and we
72
- // want to allow users to zoom in further on the high-res image.
73
- if ( ! isTouching && Date.now() - lastTouchTime > 450 ) {
74
- // We are unable to use event.preventDefault() to prevent scrolling
75
- // because the scroll event can't be canceled, so we reset the position instead.
76
- window.scrollTo( ctx.scrollLeftReset, ctx.scrollTopReset );
77
- }
78
- }
27
+ let imageRef;
79
28
 
80
- const { state, actions, callbacks } = store( 'core/image', {
81
- state: {
82
- windowWidth: window.innerWidth,
83
- windowHeight: window.innerHeight,
84
- get roleAttribute() {
85
- const ctx = getContext();
86
- return ctx.lightboxEnabled ? 'dialog' : null;
87
- },
88
- get ariaModal() {
89
- const ctx = getContext();
90
- return ctx.lightboxEnabled ? 'true' : null;
91
- },
92
- get dialogLabel() {
93
- const ctx = getContext();
94
- return ctx.lightboxEnabled ? ctx.dialogLabel : null;
95
- },
96
- get lightboxObjectFit() {
97
- const ctx = getContext();
98
- if ( ctx.initialized ) {
99
- return 'cover';
100
- }
101
- },
102
- get enlargedImgSrc() {
103
- const ctx = getContext();
104
- return ctx.initialized
105
- ? ctx.imageUploadedSrc
106
- : 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
29
+ /**
30
+ * Stores the button reference of the currently opened lightbox.
31
+ *
32
+ * @type {HTMLElement}
33
+ */
34
+ let buttonRef;
35
+
36
+ const { state, actions, callbacks } = store(
37
+ 'core/image',
38
+ {
39
+ state: {
40
+ currentImage: {},
41
+ get overlayOpened() {
42
+ return state.currentImage.currentSrc;
43
+ },
44
+ get roleAttribute() {
45
+ return state.overlayOpened ? 'dialog' : null;
46
+ },
47
+ get ariaModal() {
48
+ return state.overlayOpened ? 'true' : null;
49
+ },
50
+ get enlargedSrc() {
51
+ return (
52
+ state.currentImage.uploadedSrc ||
53
+ 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='
54
+ );
55
+ },
56
+ get imgStyles() {
57
+ return (
58
+ state.overlayOpened &&
59
+ `${ state.currentImage.imgStyles?.replace(
60
+ /;$/,
61
+ ''
62
+ ) }; object-fit:cover;`
63
+ );
64
+ },
107
65
  },
108
- },
109
- actions: {
110
- showLightbox( event ) {
111
- const ctx = getContext();
112
- // We can't initialize the lightbox until the reference
113
- // image is loaded, otherwise the UX is broken.
114
- if ( ! ctx.imageLoaded ) {
115
- return;
116
- }
117
- ctx.initialized = true;
118
- ctx.lastFocusedElement = window.document.activeElement;
119
- ctx.scrollDelta = 0;
120
- ctx.pointerType = event.pointerType;
121
-
122
- ctx.lightboxEnabled = true;
123
- setStyles( ctx, ctx.imageRef );
66
+ actions: {
67
+ showLightbox() {
68
+ const ctx = getContext();
124
69
 
125
- ctx.scrollTopReset =
126
- window.pageYOffset || document.documentElement.scrollTop;
127
-
128
- // In most cases, this value will be 0, but this is included
129
- // in case a user has created a page with horizontal scrolling.
130
- ctx.scrollLeftReset =
131
- window.pageXOffset || document.documentElement.scrollLeft;
132
-
133
- // We define and bind the scroll callback here so
134
- // that we can pass the context and as an argument.
135
- // We may be able to change this in the future if we
136
- // define the scroll callback in the store instead, but
137
- // this approach seems to tbe clearest for now.
138
- scrollCallback = handleScroll.bind( null, ctx );
139
-
140
- // We need to add a scroll event listener to the window
141
- // here because we are unable to otherwise access it via
142
- // the Interactivity API directives. If we add a native way
143
- // to access the window, we can remove this.
144
- window.addEventListener( 'scroll', scrollCallback, false );
145
- },
146
- hideLightbox() {
147
- const ctx = getContext();
148
- ctx.hideAnimationEnabled = true;
149
- if ( ctx.lightboxEnabled ) {
150
- // We want to wait until the close animation is completed
151
- // before allowing a user to scroll again. The duration of this
152
- // animation is defined in the styles.scss and depends on if the
153
- // animation is 'zoom' or 'fade', but in any case we should wait
154
- // a few milliseconds longer than the duration, otherwise a user
155
- // may scroll too soon and cause the animation to look sloppy.
156
- setTimeout( function () {
157
- window.removeEventListener( 'scroll', scrollCallback );
158
- // If we don't delay before changing the focus,
159
- // the focus ring will appear on Firefox before
160
- // the image has finished animating, which looks broken.
161
- ctx.lightboxTriggerRef.focus( {
162
- preventScroll: true,
163
- } );
164
- }, 450 );
70
+ // Bails out if the image has not loaded yet.
71
+ if ( ! ctx.imageRef?.complete ) {
72
+ return;
73
+ }
165
74
 
166
- ctx.lightboxEnabled = false;
167
- }
168
- },
169
- handleKeydown( event ) {
170
- const ctx = getContext();
171
- if ( ctx.lightboxEnabled ) {
172
- if ( event.key === 'Tab' || event.keyCode === 9 ) {
173
- // If shift + tab it change the direction
174
- if (
175
- event.shiftKey &&
176
- window.document.activeElement ===
177
- ctx.firstFocusableElement
178
- ) {
179
- event.preventDefault();
180
- ctx.lastFocusableElement.focus();
181
- } else if (
182
- ! event.shiftKey &&
183
- window.document.activeElement ===
184
- ctx.lastFocusableElement
185
- ) {
75
+ // Stores the positons of the scroll to fix it until the overlay is
76
+ // closed.
77
+ state.scrollTopReset = document.documentElement.scrollTop;
78
+ state.scrollLeftReset = document.documentElement.scrollLeft;
79
+
80
+ // Moves the information of the expaned image to the state.
81
+ ctx.currentSrc = ctx.imageRef.currentSrc;
82
+ imageRef = ctx.imageRef;
83
+ buttonRef = ctx.buttonRef;
84
+ state.currentImage = ctx;
85
+ state.overlayEnabled = true;
86
+
87
+ // Computes the styles of the overlay for the animation.
88
+ callbacks.setOverlayStyles();
89
+ },
90
+ hideLightbox() {
91
+ if ( state.overlayEnabled ) {
92
+ // Waits until the close animation has completed before allowing a
93
+ // user to scroll again. The duration of this animation is defined in
94
+ // the `styles.scss` file, but in any case we should wait a few
95
+ // milliseconds longer than the duration, otherwise a user may scroll
96
+ // too soon and cause the animation to look sloppy.
97
+ setTimeout( function () {
98
+ // Delays before changing the focus. Otherwise the focus ring will
99
+ // appear on Firefox before the image has finished animating, which
100
+ // looks broken.
101
+ buttonRef.focus( {
102
+ preventScroll: true,
103
+ } );
104
+
105
+ // Resets the current image to mark the overlay as closed.
106
+ state.currentImage = {};
107
+ imageRef = null;
108
+ buttonRef = null;
109
+ }, 450 );
110
+
111
+ // Starts the overlay closing animation. The showClosingAnimation
112
+ // class is used to avoid showing it on page load.
113
+ state.showClosingAnimation = true;
114
+ state.overlayEnabled = false;
115
+ }
116
+ },
117
+ handleKeydown( event ) {
118
+ if ( state.overlayEnabled ) {
119
+ // Focuses the close button when the user presses the tab key.
120
+ if ( event.key === 'Tab' ) {
186
121
  event.preventDefault();
187
- ctx.firstFocusableElement.focus();
122
+ const { ref } = getElement();
123
+ ref.querySelector( 'button' ).focus();
124
+ }
125
+ // Closes the lightbox when the user presses the escape key.
126
+ if ( event.key === 'Escape' ) {
127
+ actions.hideLightbox();
188
128
  }
189
129
  }
190
-
191
- if ( event.key === 'Escape' || event.keyCode === 27 ) {
192
- actions.hideLightbox( event );
130
+ },
131
+ handleTouchMove( event ) {
132
+ // On mobile devices, prevents triggering the scroll event because
133
+ // otherwise the page jumps around when it resets the scroll position.
134
+ // This also means that closing the lightbox requires that a user
135
+ // perform a simple tap. This may be changed in the future if there is a
136
+ // better alternative to override or reset the scroll position during
137
+ // swipe actions.
138
+ if ( state.overlayEnabled ) {
139
+ event.preventDefault();
193
140
  }
194
- }
195
- },
196
- // This is fired just by lazily loaded
197
- // images on the page, not all images.
198
- handleLoad() {
199
- const ctx = getContext();
200
- const { ref } = getElement();
201
- ctx.imageLoaded = true;
202
- ctx.imageCurrentSrc = ref.currentSrc;
203
- callbacks.setButtonStyles();
204
- },
205
- handleTouchStart() {
206
- isTouching = true;
207
- },
208
- handleTouchMove( event ) {
209
- const ctx = getContext();
210
- // On mobile devices, we want to prevent triggering the
211
- // scroll event because otherwise the page jumps around as
212
- // we reset the scroll position. This also means that closing
213
- // the lightbox requires that a user perform a simple tap. This
214
- // may be changed in the future if we find a better alternative
215
- // to override or reset the scroll position during swipe actions.
216
- if ( ctx.lightboxEnabled ) {
217
- event.preventDefault();
218
- }
219
- },
220
- handleTouchEnd() {
221
- // We need to wait a few milliseconds before resetting
222
- // to ensure that pinch to zoom works consistently
223
- // on mobile devices when the lightbox is open.
224
- lastTouchTime = Date.now();
225
- isTouching = false;
226
- },
227
- },
228
- callbacks: {
229
- initOriginImage() {
230
- const ctx = getContext();
231
- const { ref } = getElement();
232
- ctx.imageRef = ref;
233
- if ( ref.complete ) {
234
- ctx.imageLoaded = true;
235
- ctx.imageCurrentSrc = ref.currentSrc;
236
- }
237
- },
238
- initTriggerButton() {
239
- const ctx = getContext();
240
- const { ref } = getElement();
241
- ctx.lightboxTriggerRef = ref;
242
- },
243
- initLightbox() {
244
- const ctx = getContext();
245
- const { ref } = getElement();
246
- if ( ctx.lightboxEnabled ) {
247
- const focusableElements =
248
- ref.querySelectorAll( focusableSelectors );
249
- ctx.firstFocusableElement = focusableElements[ 0 ];
250
- ctx.lastFocusableElement =
251
- focusableElements[ focusableElements.length - 1 ];
252
-
253
- // Move focus to the dialog when opening it.
254
- ref.focus();
255
- }
141
+ },
142
+ handleTouchStart() {
143
+ isTouching = true;
144
+ },
145
+ handleTouchEnd() {
146
+ // Waits a few milliseconds before resetting to ensure that pinch to
147
+ // zoom works consistently on mobile devices when the lightbox is open.
148
+ lastTouchTime = Date.now();
149
+ isTouching = false;
150
+ },
151
+ handleScroll() {
152
+ // Prevents scrolling behaviors that trigger content shift while the
153
+ // lightbox is open. It would be better to accomplish through CSS alone,
154
+ // but using overflow: hidden is currently the only way to do so and
155
+ // that causes a layout to shift and prevents the zoom animation from
156
+ // working in some cases because it's not possible to account for the
157
+ // layout shift when doing the animation calculations. Instead, it uses
158
+ // JavaScript to prevent and reset the scrolling behavior.
159
+ if ( state.overlayOpened ) {
160
+ // Avoids overriding the scroll behavior on mobile devices because
161
+ // doing so breaks the pinch to zoom functionality, and users should
162
+ // be able to zoom in further on the high-res image.
163
+ if ( ! isTouching && Date.now() - lastTouchTime > 450 ) {
164
+ // It doesn't rely on `event.preventDefault()` to prevent scrolling
165
+ // because the scroll event can't be canceled, so it resets the
166
+ // position instead.
167
+ window.scrollTo(
168
+ state.scrollLeftReset,
169
+ state.scrollTopReset
170
+ );
171
+ }
172
+ }
173
+ },
256
174
  },
257
- setButtonStyles() {
258
- const { ref } = getElement();
259
- const { naturalWidth, naturalHeight, offsetWidth, offsetHeight } =
260
- ref;
261
-
262
- // If the image isn't loaded yet, we can't
263
- // calculate where the button should be.
264
- if ( naturalWidth === 0 || naturalHeight === 0 ) {
265
- return;
266
- }
267
-
268
- const figure = ref.parentElement;
269
- const figureWidth = ref.parentElement.clientWidth;
175
+ callbacks: {
176
+ setOverlayStyles() {
177
+ if ( ! imageRef ) return;
178
+
179
+ let {
180
+ naturalWidth,
181
+ naturalHeight,
182
+ offsetWidth: originalWidth,
183
+ offsetHeight: originalHeight,
184
+ } = imageRef;
185
+ let { x: screenPosX, y: screenPosY } =
186
+ imageRef.getBoundingClientRect();
187
+
188
+ // Natural ratio of the image clicked to open the lightbox.
189
+ const naturalRatio = naturalWidth / naturalHeight;
190
+ // Original ratio of the image clicked to open the lightbox.
191
+ let originalRatio = originalWidth / originalHeight;
192
+
193
+ // If it has object-fit: contain, recalculates the original sizes
194
+ // and the screen position without the blank spaces.
195
+ if ( state.currentImage.scaleAttr === 'contain' ) {
196
+ if ( naturalRatio > originalRatio ) {
197
+ const heightWithoutSpace = originalWidth / naturalRatio;
198
+ // Recalculates screen position without the top space.
199
+ screenPosY +=
200
+ ( originalHeight - heightWithoutSpace ) / 2;
201
+ originalHeight = heightWithoutSpace;
202
+ } else {
203
+ const widthWithoutSpace = originalHeight * naturalRatio;
204
+ // Recalculates screen position without the left space.
205
+ screenPosX += ( originalWidth - widthWithoutSpace ) / 2;
206
+ originalWidth = widthWithoutSpace;
207
+ }
208
+ }
209
+ originalRatio = originalWidth / originalHeight;
210
+
211
+ // Typically, it uses the image's full-sized dimensions. If those
212
+ // dimensions have not been set (i.e. an external image with only one
213
+ // size), the image's dimensions in the lightbox are the same
214
+ // as those of the image in the content.
215
+ let imgMaxWidth = parseFloat(
216
+ state.currentImage.targetWidth !== 'none'
217
+ ? state.currentImage.targetWidth
218
+ : naturalWidth
219
+ );
220
+ let imgMaxHeight = parseFloat(
221
+ state.currentImage.targetHeight !== 'none'
222
+ ? state.currentImage.targetHeight
223
+ : naturalHeight
224
+ );
225
+
226
+ // Ratio of the biggest image stored in the database.
227
+ let imgRatio = imgMaxWidth / imgMaxHeight;
228
+ let containerMaxWidth = imgMaxWidth;
229
+ let containerMaxHeight = imgMaxHeight;
230
+ let containerWidth = imgMaxWidth;
231
+ let containerHeight = imgMaxHeight;
232
+ // Checks if the target image has a different ratio than the original
233
+ // one (thumbnail). Recalculates the width and height.
234
+ if ( naturalRatio.toFixed( 2 ) !== imgRatio.toFixed( 2 ) ) {
235
+ if ( naturalRatio > imgRatio ) {
236
+ // If the width is reached before the height, it keeps the maxWidth
237
+ // and recalculates the height unless the difference between the
238
+ // maxHeight and the reducedHeight is higher than the maxWidth,
239
+ // where it keeps the reducedHeight and recalculate the width.
240
+ const reducedHeight = imgMaxWidth / naturalRatio;
241
+ if ( imgMaxHeight - reducedHeight > imgMaxWidth ) {
242
+ imgMaxHeight = reducedHeight;
243
+ imgMaxWidth = reducedHeight * naturalRatio;
244
+ } else {
245
+ imgMaxHeight = imgMaxWidth / naturalRatio;
246
+ }
247
+ } else {
248
+ // If the height is reached before the width, it keeps the maxHeight
249
+ // and recalculate the width unlesss the difference between the
250
+ // maxWidth and the reducedWidth is higher than the maxHeight, where
251
+ // it keeps the reducedWidth and recalculate the height.
252
+ const reducedWidth = imgMaxHeight * naturalRatio;
253
+ if ( imgMaxWidth - reducedWidth > imgMaxHeight ) {
254
+ imgMaxWidth = reducedWidth;
255
+ imgMaxHeight = reducedWidth / naturalRatio;
256
+ } else {
257
+ imgMaxWidth = imgMaxHeight * naturalRatio;
258
+ }
259
+ }
260
+ containerWidth = imgMaxWidth;
261
+ containerHeight = imgMaxHeight;
262
+ imgRatio = imgMaxWidth / imgMaxHeight;
263
+
264
+ // Calculates the max size of the container.
265
+ if ( originalRatio > imgRatio ) {
266
+ containerMaxWidth = imgMaxWidth;
267
+ containerMaxHeight = containerMaxWidth / originalRatio;
268
+ } else {
269
+ containerMaxHeight = imgMaxHeight;
270
+ containerMaxWidth = containerMaxHeight * originalRatio;
271
+ }
272
+ }
270
273
 
271
- // We need special handling for the height because
272
- // a caption will cause the figure to be taller than
273
- // the image, which means we need to account for that
274
- // when calculating the placement of the button in the
275
- // top right corner of the image.
276
- let figureHeight = ref.parentElement.clientHeight;
277
- const caption = figure.querySelector( 'figcaption' );
278
- if ( caption ) {
279
- const captionComputedStyle = window.getComputedStyle( caption );
274
+ // If the image has been pixelated on purpose, it keeps that size.
280
275
  if (
281
- ! [ 'absolute', 'fixed' ].includes(
282
- captionComputedStyle.position
283
- )
276
+ originalWidth > containerWidth ||
277
+ originalHeight > containerHeight
284
278
  ) {
285
- figureHeight =
286
- figureHeight -
287
- caption.offsetHeight -
288
- parseFloat( captionComputedStyle.marginTop ) -
289
- parseFloat( captionComputedStyle.marginBottom );
279
+ containerWidth = originalWidth;
280
+ containerHeight = originalHeight;
290
281
  }
291
- }
292
282
 
293
- const buttonOffsetTop = figureHeight - offsetHeight;
294
- const buttonOffsetRight = figureWidth - offsetWidth;
283
+ // Calculates the final lightbox image size and the scale factor.
284
+ // MaxWidth is either the window container (accounting for padding) or
285
+ // the image resolution.
286
+ let horizontalPadding = 0;
287
+ if ( window.innerWidth > 480 ) {
288
+ horizontalPadding = 80;
289
+ } else if ( window.innerWidth > 1920 ) {
290
+ horizontalPadding = 160;
291
+ }
292
+ const verticalPadding = 80;
293
+
294
+ const targetMaxWidth = Math.min(
295
+ window.innerWidth - horizontalPadding,
296
+ containerWidth
297
+ );
298
+ const targetMaxHeight = Math.min(
299
+ window.innerHeight - verticalPadding,
300
+ containerHeight
301
+ );
302
+ const targetContainerRatio = targetMaxWidth / targetMaxHeight;
303
+
304
+ if ( originalRatio > targetContainerRatio ) {
305
+ // If targetMaxWidth is reached before targetMaxHeight.
306
+ containerWidth = targetMaxWidth;
307
+ containerHeight = containerWidth / originalRatio;
308
+ } else {
309
+ // If targetMaxHeight is reached before targetMaxWidth.
310
+ containerHeight = targetMaxHeight;
311
+ containerWidth = containerHeight * originalRatio;
312
+ }
295
313
 
296
- const ctx = getContext();
314
+ const containerScale = originalWidth / containerWidth;
315
+ const lightboxImgWidth =
316
+ imgMaxWidth * ( containerWidth / containerMaxWidth );
317
+ const lightboxImgHeight =
318
+ imgMaxHeight * ( containerHeight / containerMaxHeight );
319
+
320
+ // As of this writing, using the calculations above will render the
321
+ // lightbox with a small, erroneous whitespace on the left side of the
322
+ // image in iOS Safari, perhaps due to an inconsistency in how browsers
323
+ // handle absolute positioning and CSS transformation. In any case,
324
+ // adding 1 pixel to the container width and height solves the problem,
325
+ // though this can be removed if the issue is fixed in the future.
326
+ state.overlayStyles = `
327
+ :root {
328
+ --wp--lightbox-initial-top-position: ${ screenPosY }px;
329
+ --wp--lightbox-initial-left-position: ${ screenPosX }px;
330
+ --wp--lightbox-container-width: ${ containerWidth + 1 }px;
331
+ --wp--lightbox-container-height: ${ containerHeight + 1 }px;
332
+ --wp--lightbox-image-width: ${ lightboxImgWidth }px;
333
+ --wp--lightbox-image-height: ${ lightboxImgHeight }px;
334
+ --wp--lightbox-scale: ${ containerScale };
335
+ --wp--lightbox-scrollbar-width: ${
336
+ window.innerWidth - document.documentElement.clientWidth
337
+ }px;
338
+ }
339
+ `;
340
+ },
341
+ setButtonStyles() {
342
+ const ctx = getContext();
343
+ const { ref } = getElement();
344
+ ctx.imageRef = ref;
345
+
346
+ const {
347
+ naturalWidth,
348
+ naturalHeight,
349
+ offsetWidth,
350
+ offsetHeight,
351
+ } = ref;
352
+
353
+ // If the image isn't loaded yet, it can't calculate where the button
354
+ // should be.
355
+ if ( naturalWidth === 0 || naturalHeight === 0 ) {
356
+ return;
357
+ }
297
358
 
298
- // In the case of an image with object-fit: contain, the
299
- // size of the <img> element can be larger than the image itself,
300
- // so we need to calculate where to place the button.
301
- if ( ctx.scaleAttr === 'contain' ) {
302
- // Natural ratio of the image.
303
- const naturalRatio = naturalWidth / naturalHeight;
304
- // Offset ratio of the image.
305
- const offsetRatio = offsetWidth / offsetHeight;
359
+ const figure = ref.parentElement;
360
+ const figureWidth = ref.parentElement.clientWidth;
361
+
362
+ // It needs special handling for the height because a caption will cause
363
+ // the figure to be taller than the image, which means it needs to
364
+ // account for that when calculating the placement of the button in the
365
+ // top right corner of the image.
366
+ let figureHeight = ref.parentElement.clientHeight;
367
+ const caption = figure.querySelector( 'figcaption' );
368
+ if ( caption ) {
369
+ const captionComputedStyle =
370
+ window.getComputedStyle( caption );
371
+ if (
372
+ ! [ 'absolute', 'fixed' ].includes(
373
+ captionComputedStyle.position
374
+ )
375
+ ) {
376
+ figureHeight =
377
+ figureHeight -
378
+ caption.offsetHeight -
379
+ parseFloat( captionComputedStyle.marginTop ) -
380
+ parseFloat( captionComputedStyle.marginBottom );
381
+ }
382
+ }
306
383
 
307
- if ( naturalRatio >= offsetRatio ) {
308
- // If it reaches the width first, keep
309
- // the width and compute the height.
310
- const referenceHeight = offsetWidth / naturalRatio;
311
- ctx.imageButtonTop =
312
- ( offsetHeight - referenceHeight ) / 2 +
313
- buttonOffsetTop +
314
- 16;
315
- ctx.imageButtonRight = buttonOffsetRight + 16;
384
+ const buttonOffsetTop = figureHeight - offsetHeight;
385
+ const buttonOffsetRight = figureWidth - offsetWidth;
386
+
387
+ // In the case of an image with object-fit: contain, the size of the
388
+ // <img> element can be larger than the image itself, so it needs to
389
+ // calculate where to place the button.
390
+ if ( ctx.scaleAttr === 'contain' ) {
391
+ // Natural ratio of the image.
392
+ const naturalRatio = naturalWidth / naturalHeight;
393
+ // Offset ratio of the image.
394
+ const offsetRatio = offsetWidth / offsetHeight;
395
+
396
+ if ( naturalRatio >= offsetRatio ) {
397
+ // If it reaches the width first, it keeps the width and compute the
398
+ // height.
399
+ const referenceHeight = offsetWidth / naturalRatio;
400
+ ctx.imageButtonTop =
401
+ ( offsetHeight - referenceHeight ) / 2 +
402
+ buttonOffsetTop +
403
+ 16;
404
+ ctx.imageButtonRight = buttonOffsetRight + 16;
405
+ } else {
406
+ // If it reaches the height first, it keeps the height and compute
407
+ // the width.
408
+ const referenceWidth = offsetHeight * naturalRatio;
409
+ ctx.imageButtonTop = buttonOffsetTop + 16;
410
+ ctx.imageButtonRight =
411
+ ( offsetWidth - referenceWidth ) / 2 +
412
+ buttonOffsetRight +
413
+ 16;
414
+ }
316
415
  } else {
317
- // If it reaches the height first, keep
318
- // the height and compute the width.
319
- const referenceWidth = offsetHeight * naturalRatio;
320
416
  ctx.imageButtonTop = buttonOffsetTop + 16;
321
- ctx.imageButtonRight =
322
- ( offsetWidth - referenceWidth ) / 2 +
323
- buttonOffsetRight +
324
- 16;
417
+ ctx.imageButtonRight = buttonOffsetRight + 16;
325
418
  }
326
- } else {
327
- ctx.imageButtonTop = buttonOffsetTop + 16;
328
- ctx.imageButtonRight = buttonOffsetRight + 16;
329
- }
330
- },
331
- setStylesOnResize() {
332
- const ctx = getContext();
333
- const { ref } = getElement();
334
- if (
335
- ctx.lightboxEnabled &&
336
- ( state.windowWidth || state.windowHeight )
337
- ) {
338
- setStyles( ctx, ref );
339
- }
419
+ },
420
+ setOverlayFocus() {
421
+ if ( state.overlayEnabled ) {
422
+ // Moves the focus to the dialog when it opens.
423
+ const { ref } = getElement();
424
+ ref.focus();
425
+ }
426
+ },
427
+ initTriggerButton() {
428
+ const ctx = getContext();
429
+ const { ref } = getElement();
430
+ ctx.buttonRef = ref;
431
+ },
340
432
  },
341
433
  },
342
- } );
343
-
344
- window.addEventListener(
345
- 'resize',
346
- debounce( () => {
347
- state.windowWidth = window.innerWidth;
348
- state.windowHeight = window.innerHeight;
349
- } )
434
+ { lock: true }
350
435
  );
351
-
352
- /**
353
- * Computes styles for the lightbox and adds them to the document.
354
- *
355
- * @function
356
- * @param {Object} ctx - Context for the `core/image` namespace.
357
- * @param {Object} ref - The element reference.
358
- */
359
- function setStyles( ctx, ref ) {
360
- // The reference img element lies adjacent
361
- // to the event target button in the DOM.
362
- let {
363
- naturalWidth,
364
- naturalHeight,
365
- offsetWidth: originalWidth,
366
- offsetHeight: originalHeight,
367
- } = ref;
368
- let { x: screenPosX, y: screenPosY } = ref.getBoundingClientRect();
369
-
370
- // Natural ratio of the image clicked to open the lightbox.
371
- const naturalRatio = naturalWidth / naturalHeight;
372
- // Original ratio of the image clicked to open the lightbox.
373
- let originalRatio = originalWidth / originalHeight;
374
-
375
- // If it has object-fit: contain, recalculate the original sizes
376
- // and the screen position without the blank spaces.
377
- if ( ctx.scaleAttr === 'contain' ) {
378
- if ( naturalRatio > originalRatio ) {
379
- const heightWithoutSpace = originalWidth / naturalRatio;
380
- // Recalculate screen position without the top space.
381
- screenPosY += ( originalHeight - heightWithoutSpace ) / 2;
382
- originalHeight = heightWithoutSpace;
383
- } else {
384
- const widthWithoutSpace = originalHeight * naturalRatio;
385
- // Recalculate screen position without the left space.
386
- screenPosX += ( originalWidth - widthWithoutSpace ) / 2;
387
- originalWidth = widthWithoutSpace;
388
- }
389
- }
390
- originalRatio = originalWidth / originalHeight;
391
-
392
- // Typically, we use the image's full-sized dimensions. If those
393
- // dimensions have not been set (i.e. an external image with only one size),
394
- // the image's dimensions in the lightbox are the same
395
- // as those of the image in the content.
396
- let imgMaxWidth = parseFloat(
397
- ctx.targetWidth !== 'none' ? ctx.targetWidth : naturalWidth
398
- );
399
- let imgMaxHeight = parseFloat(
400
- ctx.targetHeight !== 'none' ? ctx.targetHeight : naturalHeight
401
- );
402
-
403
- // Ratio of the biggest image stored in the database.
404
- let imgRatio = imgMaxWidth / imgMaxHeight;
405
- let containerMaxWidth = imgMaxWidth;
406
- let containerMaxHeight = imgMaxHeight;
407
- let containerWidth = imgMaxWidth;
408
- let containerHeight = imgMaxHeight;
409
- // Check if the target image has a different ratio than the original one (thumbnail).
410
- // Recalculate the width and height.
411
- if ( naturalRatio.toFixed( 2 ) !== imgRatio.toFixed( 2 ) ) {
412
- if ( naturalRatio > imgRatio ) {
413
- // If the width is reached before the height, we keep the maxWidth
414
- // and recalculate the height.
415
- // Unless the difference between the maxHeight and the reducedHeight
416
- // is higher than the maxWidth, where we keep the reducedHeight and
417
- // recalculate the width.
418
- const reducedHeight = imgMaxWidth / naturalRatio;
419
- if ( imgMaxHeight - reducedHeight > imgMaxWidth ) {
420
- imgMaxHeight = reducedHeight;
421
- imgMaxWidth = reducedHeight * naturalRatio;
422
- } else {
423
- imgMaxHeight = imgMaxWidth / naturalRatio;
424
- }
425
- } else {
426
- // If the height is reached before the width, we keep the maxHeight
427
- // and recalculate the width.
428
- // Unless the difference between the maxWidth and the reducedWidth
429
- // is higher than the maxHeight, where we keep the reducedWidth and
430
- // recalculate the height.
431
- const reducedWidth = imgMaxHeight * naturalRatio;
432
- if ( imgMaxWidth - reducedWidth > imgMaxHeight ) {
433
- imgMaxWidth = reducedWidth;
434
- imgMaxHeight = reducedWidth / naturalRatio;
435
- } else {
436
- imgMaxWidth = imgMaxHeight * naturalRatio;
437
- }
438
- }
439
- containerWidth = imgMaxWidth;
440
- containerHeight = imgMaxHeight;
441
- imgRatio = imgMaxWidth / imgMaxHeight;
442
-
443
- // Calculate the max size of the container.
444
- if ( originalRatio > imgRatio ) {
445
- containerMaxWidth = imgMaxWidth;
446
- containerMaxHeight = containerMaxWidth / originalRatio;
447
- } else {
448
- containerMaxHeight = imgMaxHeight;
449
- containerMaxWidth = containerMaxHeight * originalRatio;
450
- }
451
- }
452
-
453
- // If the image has been pixelated on purpose, keep that size.
454
- if ( originalWidth > containerWidth || originalHeight > containerHeight ) {
455
- containerWidth = originalWidth;
456
- containerHeight = originalHeight;
457
- }
458
-
459
- // Calculate the final lightbox image size and the
460
- // scale factor. MaxWidth is either the window container
461
- // (accounting for padding) or the image resolution.
462
- let horizontalPadding = 0;
463
- if ( window.innerWidth > 480 ) {
464
- horizontalPadding = 80;
465
- } else if ( window.innerWidth > 1920 ) {
466
- horizontalPadding = 160;
467
- }
468
- const verticalPadding = 80;
469
-
470
- const targetMaxWidth = Math.min(
471
- window.innerWidth - horizontalPadding,
472
- containerWidth
473
- );
474
- const targetMaxHeight = Math.min(
475
- window.innerHeight - verticalPadding,
476
- containerHeight
477
- );
478
- const targetContainerRatio = targetMaxWidth / targetMaxHeight;
479
-
480
- if ( originalRatio > targetContainerRatio ) {
481
- // If targetMaxWidth is reached before targetMaxHeight
482
- containerWidth = targetMaxWidth;
483
- containerHeight = containerWidth / originalRatio;
484
- } else {
485
- // If targetMaxHeight is reached before targetMaxWidth
486
- containerHeight = targetMaxHeight;
487
- containerWidth = containerHeight * originalRatio;
488
- }
489
-
490
- const containerScale = originalWidth / containerWidth;
491
- const lightboxImgWidth =
492
- imgMaxWidth * ( containerWidth / containerMaxWidth );
493
- const lightboxImgHeight =
494
- imgMaxHeight * ( containerHeight / containerMaxHeight );
495
-
496
- // Add the CSS variables needed.
497
- let styleTag = document.getElementById( 'wp-lightbox-styles' );
498
- if ( ! styleTag ) {
499
- styleTag = document.createElement( 'style' );
500
- styleTag.id = 'wp-lightbox-styles';
501
- document.head.appendChild( styleTag );
502
- }
503
-
504
- // As of this writing, using the calculations above will render the lightbox
505
- // with a small, erroneous whitespace on the left side of the image in iOS Safari,
506
- // perhaps due to an inconsistency in how browsers handle absolute positioning and CSS
507
- // transformation. In any case, adding 1 pixel to the container width and height solves
508
- // the problem, though this can be removed if the issue is fixed in the future.
509
- styleTag.innerHTML = `
510
- :root {
511
- --wp--lightbox-initial-top-position: ${ screenPosY }px;
512
- --wp--lightbox-initial-left-position: ${ screenPosX }px;
513
- --wp--lightbox-container-width: ${ containerWidth + 1 }px;
514
- --wp--lightbox-container-height: ${ containerHeight + 1 }px;
515
- --wp--lightbox-image-width: ${ lightboxImgWidth }px;
516
- --wp--lightbox-image-height: ${ lightboxImgHeight }px;
517
- --wp--lightbox-scale: ${ containerScale };
518
- --wp--lightbox-scrollbar-width: ${
519
- window.innerWidth - document.documentElement.clientWidth
520
- }px;
521
- }
522
- `;
523
- }
524
-
525
- /**
526
- * Debounces a function call.
527
- *
528
- * @function
529
- * @param {Function} func - A function to be called
530
- * @param {number} wait - The time to wait before calling the function
531
- */
532
- function debounce( func, wait = 50 ) {
533
- let timeout;
534
- return () => {
535
- const later = () => {
536
- timeout = null;
537
- func();
538
- };
539
- clearTimeout( timeout );
540
- timeout = setTimeout( later, wait );
541
- };
542
- }