@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
@@ -5,242 +5,314 @@ var _interactivity = require("@wordpress/interactivity");
5
5
  * WordPress dependencies
6
6
  */
7
7
 
8
- const focusableSelectors = ['a[href]', 'area[href]', 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', 'select:not([disabled]):not([aria-hidden])', 'textarea:not([disabled]):not([aria-hidden])', 'button:not([disabled]):not([aria-hidden])', 'iframe', 'object', 'embed', '[contenteditable]', '[tabindex]:not([tabindex^="-"])'];
9
-
10
- /**
11
- * Stores a context-bound scroll handler.
12
- *
13
- * This callback could be defined inline inside of the store
14
- * object but it's created externally to avoid confusion about
15
- * how its logic is called. This logic is not referenced directly
16
- * by the directives in the markup because the scroll event we
17
- * need to listen to is triggered on the window; so by defining it
18
- * outside of the store, we signal that the behavior here is different.
19
- * If we find a compelling reason to move it to the store, feel free.
20
- *
21
- * @type {Function}
22
- */
23
- let scrollCallback;
24
-
25
8
  /**
26
- * Tracks whether user is touching screen; used to
27
- * differentiate behavior for touch and mouse input.
9
+ * Tracks whether user is touching screen; used to differentiate behavior for
10
+ * touch and mouse input.
28
11
  *
29
12
  * @type {boolean}
30
13
  */
31
14
  let isTouching = false;
32
15
 
33
16
  /**
34
- * Tracks the last time the screen was touched; used to
35
- * differentiate behavior for touch and mouse input.
17
+ * Tracks the last time the screen was touched; used to differentiate behavior
18
+ * for touch and mouse input.
36
19
  *
37
20
  * @type {number}
38
21
  */
39
22
  let lastTouchTime = 0;
40
23
 
41
24
  /**
42
- * Lightbox page-scroll handler: prevents scrolling.
25
+ * Stores the image reference of the currently opened lightbox.
43
26
  *
44
- * This handler is added to prevent scrolling behaviors that
45
- * trigger content shift while the lightbox is open.
46
- *
47
- * It would be better to accomplish this through CSS alone, but
48
- * using overflow: hidden is currently the only way to do so, and
49
- * that causes the layout to shift and prevents the zoom animation
50
- * from working in some cases because we're unable to account for
51
- * the layout shift when doing the animation calculations. Instead,
52
- * here we use JavaScript to prevent and reset the scrolling
53
- * behavior. In the future, we may be able to use CSS or overflow: hidden
54
- * instead to not rely on JavaScript, but this seems to be the best approach
55
- * for now that provides the best visual experience.
27
+ * @type {HTMLElement}
28
+ */
29
+ let imageRef;
30
+
31
+ /**
32
+ * Stores the button reference of the currently opened lightbox.
56
33
  *
57
- * @param {Object} ctx Context object with the `core/image` namespace.
34
+ * @type {HTMLElement}
58
35
  */
59
- function handleScroll(ctx) {
60
- // We can't override the scroll behavior on mobile devices
61
- // because doing so breaks the pinch to zoom functionality, and we
62
- // want to allow users to zoom in further on the high-res image.
63
- if (!isTouching && Date.now() - lastTouchTime > 450) {
64
- // We are unable to use event.preventDefault() to prevent scrolling
65
- // because the scroll event can't be canceled, so we reset the position instead.
66
- window.scrollTo(ctx.scrollLeftReset, ctx.scrollTopReset);
67
- }
68
- }
36
+ let buttonRef;
69
37
  const {
70
38
  state,
71
39
  actions,
72
40
  callbacks
73
41
  } = (0, _interactivity.store)('core/image', {
74
42
  state: {
75
- windowWidth: window.innerWidth,
76
- windowHeight: window.innerHeight,
43
+ currentImage: {},
44
+ get overlayOpened() {
45
+ return state.currentImage.currentSrc;
46
+ },
77
47
  get roleAttribute() {
78
- const ctx = (0, _interactivity.getContext)();
79
- return ctx.lightboxEnabled ? 'dialog' : null;
48
+ return state.overlayOpened ? 'dialog' : null;
80
49
  },
81
50
  get ariaModal() {
82
- const ctx = (0, _interactivity.getContext)();
83
- return ctx.lightboxEnabled ? 'true' : null;
51
+ return state.overlayOpened ? 'true' : null;
84
52
  },
85
- get dialogLabel() {
86
- const ctx = (0, _interactivity.getContext)();
87
- return ctx.lightboxEnabled ? ctx.dialogLabel : null;
53
+ get enlargedSrc() {
54
+ return state.currentImage.uploadedSrc || 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
88
55
  },
89
- get lightboxObjectFit() {
90
- const ctx = (0, _interactivity.getContext)();
91
- if (ctx.initialized) {
92
- return 'cover';
93
- }
94
- },
95
- get enlargedImgSrc() {
96
- const ctx = (0, _interactivity.getContext)();
97
- return ctx.initialized ? ctx.imageUploadedSrc : 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
56
+ get imgStyles() {
57
+ return state.overlayOpened && `${state.currentImage.imgStyles?.replace(/;$/, '')}; object-fit:cover;`;
98
58
  }
99
59
  },
100
60
  actions: {
101
- showLightbox(event) {
61
+ showLightbox() {
102
62
  const ctx = (0, _interactivity.getContext)();
103
- // We can't initialize the lightbox until the reference
104
- // image is loaded, otherwise the UX is broken.
105
- if (!ctx.imageLoaded) {
63
+
64
+ // Bails out if the image has not loaded yet.
65
+ if (!ctx.imageRef?.complete) {
106
66
  return;
107
67
  }
108
- ctx.initialized = true;
109
- ctx.lastFocusedElement = window.document.activeElement;
110
- ctx.scrollDelta = 0;
111
- ctx.pointerType = event.pointerType;
112
- ctx.lightboxEnabled = true;
113
- setStyles(ctx, ctx.imageRef);
114
- ctx.scrollTopReset = window.pageYOffset || document.documentElement.scrollTop;
115
68
 
116
- // In most cases, this value will be 0, but this is included
117
- // in case a user has created a page with horizontal scrolling.
118
- ctx.scrollLeftReset = window.pageXOffset || document.documentElement.scrollLeft;
69
+ // Stores the positons of the scroll to fix it until the overlay is
70
+ // closed.
71
+ state.scrollTopReset = document.documentElement.scrollTop;
72
+ state.scrollLeftReset = document.documentElement.scrollLeft;
119
73
 
120
- // We define and bind the scroll callback here so
121
- // that we can pass the context and as an argument.
122
- // We may be able to change this in the future if we
123
- // define the scroll callback in the store instead, but
124
- // this approach seems to tbe clearest for now.
125
- scrollCallback = handleScroll.bind(null, ctx);
74
+ // Moves the information of the expaned image to the state.
75
+ ctx.currentSrc = ctx.imageRef.currentSrc;
76
+ imageRef = ctx.imageRef;
77
+ buttonRef = ctx.buttonRef;
78
+ state.currentImage = ctx;
79
+ state.overlayEnabled = true;
126
80
 
127
- // We need to add a scroll event listener to the window
128
- // here because we are unable to otherwise access it via
129
- // the Interactivity API directives. If we add a native way
130
- // to access the window, we can remove this.
131
- window.addEventListener('scroll', scrollCallback, false);
81
+ // Computes the styles of the overlay for the animation.
82
+ callbacks.setOverlayStyles();
132
83
  },
133
84
  hideLightbox() {
134
- const ctx = (0, _interactivity.getContext)();
135
- ctx.hideAnimationEnabled = true;
136
- if (ctx.lightboxEnabled) {
137
- // We want to wait until the close animation is completed
138
- // before allowing a user to scroll again. The duration of this
139
- // animation is defined in the styles.scss and depends on if the
140
- // animation is 'zoom' or 'fade', but in any case we should wait
141
- // a few milliseconds longer than the duration, otherwise a user
142
- // may scroll too soon and cause the animation to look sloppy.
85
+ if (state.overlayEnabled) {
86
+ // Waits until the close animation has completed before allowing a
87
+ // user to scroll again. The duration of this animation is defined in
88
+ // the `styles.scss` file, but in any case we should wait a few
89
+ // milliseconds longer than the duration, otherwise a user may scroll
90
+ // too soon and cause the animation to look sloppy.
143
91
  setTimeout(function () {
144
- window.removeEventListener('scroll', scrollCallback);
145
- // If we don't delay before changing the focus,
146
- // the focus ring will appear on Firefox before
147
- // the image has finished animating, which looks broken.
148
- ctx.lightboxTriggerRef.focus({
92
+ // Delays before changing the focus. Otherwise the focus ring will
93
+ // appear on Firefox before the image has finished animating, which
94
+ // looks broken.
95
+ buttonRef.focus({
149
96
  preventScroll: true
150
97
  });
98
+
99
+ // Resets the current image to mark the overlay as closed.
100
+ state.currentImage = {};
101
+ imageRef = null;
102
+ buttonRef = null;
151
103
  }, 450);
152
- ctx.lightboxEnabled = false;
104
+
105
+ // Starts the overlay closing animation. The showClosingAnimation
106
+ // class is used to avoid showing it on page load.
107
+ state.showClosingAnimation = true;
108
+ state.overlayEnabled = false;
153
109
  }
154
110
  },
155
111
  handleKeydown(event) {
156
- const ctx = (0, _interactivity.getContext)();
157
- if (ctx.lightboxEnabled) {
158
- if (event.key === 'Tab' || event.keyCode === 9) {
159
- // If shift + tab it change the direction
160
- if (event.shiftKey && window.document.activeElement === ctx.firstFocusableElement) {
161
- event.preventDefault();
162
- ctx.lastFocusableElement.focus();
163
- } else if (!event.shiftKey && window.document.activeElement === ctx.lastFocusableElement) {
164
- event.preventDefault();
165
- ctx.firstFocusableElement.focus();
166
- }
112
+ if (state.overlayEnabled) {
113
+ // Focuses the close button when the user presses the tab key.
114
+ if (event.key === 'Tab') {
115
+ event.preventDefault();
116
+ const {
117
+ ref
118
+ } = (0, _interactivity.getElement)();
119
+ ref.querySelector('button').focus();
167
120
  }
168
- if (event.key === 'Escape' || event.keyCode === 27) {
169
- actions.hideLightbox(event);
121
+ // Closes the lightbox when the user presses the escape key.
122
+ if (event.key === 'Escape') {
123
+ actions.hideLightbox();
170
124
  }
171
125
  }
172
126
  },
173
- // This is fired just by lazily loaded
174
- // images on the page, not all images.
175
- handleLoad() {
176
- const ctx = (0, _interactivity.getContext)();
177
- const {
178
- ref
179
- } = (0, _interactivity.getElement)();
180
- ctx.imageLoaded = true;
181
- ctx.imageCurrentSrc = ref.currentSrc;
182
- callbacks.setButtonStyles();
183
- },
184
- handleTouchStart() {
185
- isTouching = true;
186
- },
187
127
  handleTouchMove(event) {
188
- const ctx = (0, _interactivity.getContext)();
189
- // On mobile devices, we want to prevent triggering the
190
- // scroll event because otherwise the page jumps around as
191
- // we reset the scroll position. This also means that closing
192
- // the lightbox requires that a user perform a simple tap. This
193
- // may be changed in the future if we find a better alternative
194
- // to override or reset the scroll position during swipe actions.
195
- if (ctx.lightboxEnabled) {
128
+ // On mobile devices, prevents triggering the scroll event because
129
+ // otherwise the page jumps around when it resets the scroll position.
130
+ // This also means that closing the lightbox requires that a user
131
+ // perform a simple tap. This may be changed in the future if there is a
132
+ // better alternative to override or reset the scroll position during
133
+ // swipe actions.
134
+ if (state.overlayEnabled) {
196
135
  event.preventDefault();
197
136
  }
198
137
  },
138
+ handleTouchStart() {
139
+ isTouching = true;
140
+ },
199
141
  handleTouchEnd() {
200
- // We need to wait a few milliseconds before resetting
201
- // to ensure that pinch to zoom works consistently
202
- // on mobile devices when the lightbox is open.
142
+ // Waits a few milliseconds before resetting to ensure that pinch to
143
+ // zoom works consistently on mobile devices when the lightbox is open.
203
144
  lastTouchTime = Date.now();
204
145
  isTouching = false;
146
+ },
147
+ handleScroll() {
148
+ // Prevents scrolling behaviors that trigger content shift while the
149
+ // lightbox is open. It would be better to accomplish through CSS alone,
150
+ // but using overflow: hidden is currently the only way to do so and
151
+ // that causes a layout to shift and prevents the zoom animation from
152
+ // working in some cases because it's not possible to account for the
153
+ // layout shift when doing the animation calculations. Instead, it uses
154
+ // JavaScript to prevent and reset the scrolling behavior.
155
+ if (state.overlayOpened) {
156
+ // Avoids overriding the scroll behavior on mobile devices because
157
+ // doing so breaks the pinch to zoom functionality, and users should
158
+ // be able to zoom in further on the high-res image.
159
+ if (!isTouching && Date.now() - lastTouchTime > 450) {
160
+ // It doesn't rely on `event.preventDefault()` to prevent scrolling
161
+ // because the scroll event can't be canceled, so it resets the
162
+ // position instead.
163
+ window.scrollTo(state.scrollLeftReset, state.scrollTopReset);
164
+ }
165
+ }
205
166
  }
206
167
  },
207
168
  callbacks: {
208
- initOriginImage() {
209
- const ctx = (0, _interactivity.getContext)();
210
- const {
211
- ref
212
- } = (0, _interactivity.getElement)();
213
- ctx.imageRef = ref;
214
- if (ref.complete) {
215
- ctx.imageLoaded = true;
216
- ctx.imageCurrentSrc = ref.currentSrc;
169
+ setOverlayStyles() {
170
+ if (!imageRef) return;
171
+ let {
172
+ naturalWidth,
173
+ naturalHeight,
174
+ offsetWidth: originalWidth,
175
+ offsetHeight: originalHeight
176
+ } = imageRef;
177
+ let {
178
+ x: screenPosX,
179
+ y: screenPosY
180
+ } = imageRef.getBoundingClientRect();
181
+
182
+ // Natural ratio of the image clicked to open the lightbox.
183
+ const naturalRatio = naturalWidth / naturalHeight;
184
+ // Original ratio of the image clicked to open the lightbox.
185
+ let originalRatio = originalWidth / originalHeight;
186
+
187
+ // If it has object-fit: contain, recalculates the original sizes
188
+ // and the screen position without the blank spaces.
189
+ if (state.currentImage.scaleAttr === 'contain') {
190
+ if (naturalRatio > originalRatio) {
191
+ const heightWithoutSpace = originalWidth / naturalRatio;
192
+ // Recalculates screen position without the top space.
193
+ screenPosY += (originalHeight - heightWithoutSpace) / 2;
194
+ originalHeight = heightWithoutSpace;
195
+ } else {
196
+ const widthWithoutSpace = originalHeight * naturalRatio;
197
+ // Recalculates screen position without the left space.
198
+ screenPosX += (originalWidth - widthWithoutSpace) / 2;
199
+ originalWidth = widthWithoutSpace;
200
+ }
217
201
  }
218
- },
219
- initTriggerButton() {
220
- const ctx = (0, _interactivity.getContext)();
221
- const {
222
- ref
223
- } = (0, _interactivity.getElement)();
224
- ctx.lightboxTriggerRef = ref;
225
- },
226
- initLightbox() {
227
- const ctx = (0, _interactivity.getContext)();
228
- const {
229
- ref
230
- } = (0, _interactivity.getElement)();
231
- if (ctx.lightboxEnabled) {
232
- const focusableElements = ref.querySelectorAll(focusableSelectors);
233
- ctx.firstFocusableElement = focusableElements[0];
234
- ctx.lastFocusableElement = focusableElements[focusableElements.length - 1];
202
+ originalRatio = originalWidth / originalHeight;
235
203
 
236
- // Move focus to the dialog when opening it.
237
- ref.focus();
204
+ // Typically, it uses the image's full-sized dimensions. If those
205
+ // dimensions have not been set (i.e. an external image with only one
206
+ // size), the image's dimensions in the lightbox are the same
207
+ // as those of the image in the content.
208
+ let imgMaxWidth = parseFloat(state.currentImage.targetWidth !== 'none' ? state.currentImage.targetWidth : naturalWidth);
209
+ let imgMaxHeight = parseFloat(state.currentImage.targetHeight !== 'none' ? state.currentImage.targetHeight : naturalHeight);
210
+
211
+ // Ratio of the biggest image stored in the database.
212
+ let imgRatio = imgMaxWidth / imgMaxHeight;
213
+ let containerMaxWidth = imgMaxWidth;
214
+ let containerMaxHeight = imgMaxHeight;
215
+ let containerWidth = imgMaxWidth;
216
+ let containerHeight = imgMaxHeight;
217
+ // Checks if the target image has a different ratio than the original
218
+ // one (thumbnail). Recalculates the width and height.
219
+ if (naturalRatio.toFixed(2) !== imgRatio.toFixed(2)) {
220
+ if (naturalRatio > imgRatio) {
221
+ // If the width is reached before the height, it keeps the maxWidth
222
+ // and recalculates the height unless the difference between the
223
+ // maxHeight and the reducedHeight is higher than the maxWidth,
224
+ // where it keeps the reducedHeight and recalculate the width.
225
+ const reducedHeight = imgMaxWidth / naturalRatio;
226
+ if (imgMaxHeight - reducedHeight > imgMaxWidth) {
227
+ imgMaxHeight = reducedHeight;
228
+ imgMaxWidth = reducedHeight * naturalRatio;
229
+ } else {
230
+ imgMaxHeight = imgMaxWidth / naturalRatio;
231
+ }
232
+ } else {
233
+ // If the height is reached before the width, it keeps the maxHeight
234
+ // and recalculate the width unlesss the difference between the
235
+ // maxWidth and the reducedWidth is higher than the maxHeight, where
236
+ // it keeps the reducedWidth and recalculate the height.
237
+ const reducedWidth = imgMaxHeight * naturalRatio;
238
+ if (imgMaxWidth - reducedWidth > imgMaxHeight) {
239
+ imgMaxWidth = reducedWidth;
240
+ imgMaxHeight = reducedWidth / naturalRatio;
241
+ } else {
242
+ imgMaxWidth = imgMaxHeight * naturalRatio;
243
+ }
244
+ }
245
+ containerWidth = imgMaxWidth;
246
+ containerHeight = imgMaxHeight;
247
+ imgRatio = imgMaxWidth / imgMaxHeight;
248
+
249
+ // Calculates the max size of the container.
250
+ if (originalRatio > imgRatio) {
251
+ containerMaxWidth = imgMaxWidth;
252
+ containerMaxHeight = containerMaxWidth / originalRatio;
253
+ } else {
254
+ containerMaxHeight = imgMaxHeight;
255
+ containerMaxWidth = containerMaxHeight * originalRatio;
256
+ }
257
+ }
258
+
259
+ // If the image has been pixelated on purpose, it keeps that size.
260
+ if (originalWidth > containerWidth || originalHeight > containerHeight) {
261
+ containerWidth = originalWidth;
262
+ containerHeight = originalHeight;
238
263
  }
264
+
265
+ // Calculates the final lightbox image size and the scale factor.
266
+ // MaxWidth is either the window container (accounting for padding) or
267
+ // the image resolution.
268
+ let horizontalPadding = 0;
269
+ if (window.innerWidth > 480) {
270
+ horizontalPadding = 80;
271
+ } else if (window.innerWidth > 1920) {
272
+ horizontalPadding = 160;
273
+ }
274
+ const verticalPadding = 80;
275
+ const targetMaxWidth = Math.min(window.innerWidth - horizontalPadding, containerWidth);
276
+ const targetMaxHeight = Math.min(window.innerHeight - verticalPadding, containerHeight);
277
+ const targetContainerRatio = targetMaxWidth / targetMaxHeight;
278
+ if (originalRatio > targetContainerRatio) {
279
+ // If targetMaxWidth is reached before targetMaxHeight.
280
+ containerWidth = targetMaxWidth;
281
+ containerHeight = containerWidth / originalRatio;
282
+ } else {
283
+ // If targetMaxHeight is reached before targetMaxWidth.
284
+ containerHeight = targetMaxHeight;
285
+ containerWidth = containerHeight * originalRatio;
286
+ }
287
+ const containerScale = originalWidth / containerWidth;
288
+ const lightboxImgWidth = imgMaxWidth * (containerWidth / containerMaxWidth);
289
+ const lightboxImgHeight = imgMaxHeight * (containerHeight / containerMaxHeight);
290
+
291
+ // As of this writing, using the calculations above will render the
292
+ // lightbox with a small, erroneous whitespace on the left side of the
293
+ // image in iOS Safari, perhaps due to an inconsistency in how browsers
294
+ // handle absolute positioning and CSS transformation. In any case,
295
+ // adding 1 pixel to the container width and height solves the problem,
296
+ // though this can be removed if the issue is fixed in the future.
297
+ state.overlayStyles = `
298
+ :root {
299
+ --wp--lightbox-initial-top-position: ${screenPosY}px;
300
+ --wp--lightbox-initial-left-position: ${screenPosX}px;
301
+ --wp--lightbox-container-width: ${containerWidth + 1}px;
302
+ --wp--lightbox-container-height: ${containerHeight + 1}px;
303
+ --wp--lightbox-image-width: ${lightboxImgWidth}px;
304
+ --wp--lightbox-image-height: ${lightboxImgHeight}px;
305
+ --wp--lightbox-scale: ${containerScale};
306
+ --wp--lightbox-scrollbar-width: ${window.innerWidth - document.documentElement.clientWidth}px;
307
+ }
308
+ `;
239
309
  },
240
310
  setButtonStyles() {
311
+ const ctx = (0, _interactivity.getContext)();
241
312
  const {
242
313
  ref
243
314
  } = (0, _interactivity.getElement)();
315
+ ctx.imageRef = ref;
244
316
  const {
245
317
  naturalWidth,
246
318
  naturalHeight,
@@ -248,18 +320,17 @@ const {
248
320
  offsetHeight
249
321
  } = ref;
250
322
 
251
- // If the image isn't loaded yet, we can't
252
- // calculate where the button should be.
323
+ // If the image isn't loaded yet, it can't calculate where the button
324
+ // should be.
253
325
  if (naturalWidth === 0 || naturalHeight === 0) {
254
326
  return;
255
327
  }
256
328
  const figure = ref.parentElement;
257
329
  const figureWidth = ref.parentElement.clientWidth;
258
330
 
259
- // We need special handling for the height because
260
- // a caption will cause the figure to be taller than
261
- // the image, which means we need to account for that
262
- // when calculating the placement of the button in the
331
+ // It needs special handling for the height because a caption will cause
332
+ // the figure to be taller than the image, which means it needs to
333
+ // account for that when calculating the placement of the button in the
263
334
  // top right corner of the image.
264
335
  let figureHeight = ref.parentElement.clientHeight;
265
336
  const caption = figure.querySelector('figcaption');
@@ -271,25 +342,24 @@ const {
271
342
  }
272
343
  const buttonOffsetTop = figureHeight - offsetHeight;
273
344
  const buttonOffsetRight = figureWidth - offsetWidth;
274
- const ctx = (0, _interactivity.getContext)();
275
345
 
276
- // In the case of an image with object-fit: contain, the
277
- // size of the <img> element can be larger than the image itself,
278
- // so we need to calculate where to place the button.
346
+ // In the case of an image with object-fit: contain, the size of the
347
+ // <img> element can be larger than the image itself, so it needs to
348
+ // calculate where to place the button.
279
349
  if (ctx.scaleAttr === 'contain') {
280
350
  // Natural ratio of the image.
281
351
  const naturalRatio = naturalWidth / naturalHeight;
282
352
  // Offset ratio of the image.
283
353
  const offsetRatio = offsetWidth / offsetHeight;
284
354
  if (naturalRatio >= offsetRatio) {
285
- // If it reaches the width first, keep
286
- // the width and compute the height.
355
+ // If it reaches the width first, it keeps the width and compute the
356
+ // height.
287
357
  const referenceHeight = offsetWidth / naturalRatio;
288
358
  ctx.imageButtonTop = (offsetHeight - referenceHeight) / 2 + buttonOffsetTop + 16;
289
359
  ctx.imageButtonRight = buttonOffsetRight + 16;
290
360
  } else {
291
- // If it reaches the height first, keep
292
- // the height and compute the width.
361
+ // If it reaches the height first, it keeps the height and compute
362
+ // the width.
293
363
  const referenceWidth = offsetHeight * naturalRatio;
294
364
  ctx.imageButtonTop = buttonOffsetTop + 16;
295
365
  ctx.imageButtonRight = (offsetWidth - referenceWidth) / 2 + buttonOffsetRight + 16;
@@ -299,197 +369,24 @@ const {
299
369
  ctx.imageButtonRight = buttonOffsetRight + 16;
300
370
  }
301
371
  },
302
- setStylesOnResize() {
372
+ setOverlayFocus() {
373
+ if (state.overlayEnabled) {
374
+ // Moves the focus to the dialog when it opens.
375
+ const {
376
+ ref
377
+ } = (0, _interactivity.getElement)();
378
+ ref.focus();
379
+ }
380
+ },
381
+ initTriggerButton() {
303
382
  const ctx = (0, _interactivity.getContext)();
304
383
  const {
305
384
  ref
306
385
  } = (0, _interactivity.getElement)();
307
- if (ctx.lightboxEnabled && (state.windowWidth || state.windowHeight)) {
308
- setStyles(ctx, ref);
309
- }
386
+ ctx.buttonRef = ref;
310
387
  }
311
388
  }
389
+ }, {
390
+ lock: true
312
391
  });
313
- window.addEventListener('resize', debounce(() => {
314
- state.windowWidth = window.innerWidth;
315
- state.windowHeight = window.innerHeight;
316
- }));
317
-
318
- /**
319
- * Computes styles for the lightbox and adds them to the document.
320
- *
321
- * @function
322
- * @param {Object} ctx - Context for the `core/image` namespace.
323
- * @param {Object} ref - The element reference.
324
- */
325
- function setStyles(ctx, ref) {
326
- // The reference img element lies adjacent
327
- // to the event target button in the DOM.
328
- let {
329
- naturalWidth,
330
- naturalHeight,
331
- offsetWidth: originalWidth,
332
- offsetHeight: originalHeight
333
- } = ref;
334
- let {
335
- x: screenPosX,
336
- y: screenPosY
337
- } = ref.getBoundingClientRect();
338
-
339
- // Natural ratio of the image clicked to open the lightbox.
340
- const naturalRatio = naturalWidth / naturalHeight;
341
- // Original ratio of the image clicked to open the lightbox.
342
- let originalRatio = originalWidth / originalHeight;
343
-
344
- // If it has object-fit: contain, recalculate the original sizes
345
- // and the screen position without the blank spaces.
346
- if (ctx.scaleAttr === 'contain') {
347
- if (naturalRatio > originalRatio) {
348
- const heightWithoutSpace = originalWidth / naturalRatio;
349
- // Recalculate screen position without the top space.
350
- screenPosY += (originalHeight - heightWithoutSpace) / 2;
351
- originalHeight = heightWithoutSpace;
352
- } else {
353
- const widthWithoutSpace = originalHeight * naturalRatio;
354
- // Recalculate screen position without the left space.
355
- screenPosX += (originalWidth - widthWithoutSpace) / 2;
356
- originalWidth = widthWithoutSpace;
357
- }
358
- }
359
- originalRatio = originalWidth / originalHeight;
360
-
361
- // Typically, we use the image's full-sized dimensions. If those
362
- // dimensions have not been set (i.e. an external image with only one size),
363
- // the image's dimensions in the lightbox are the same
364
- // as those of the image in the content.
365
- let imgMaxWidth = parseFloat(ctx.targetWidth !== 'none' ? ctx.targetWidth : naturalWidth);
366
- let imgMaxHeight = parseFloat(ctx.targetHeight !== 'none' ? ctx.targetHeight : naturalHeight);
367
-
368
- // Ratio of the biggest image stored in the database.
369
- let imgRatio = imgMaxWidth / imgMaxHeight;
370
- let containerMaxWidth = imgMaxWidth;
371
- let containerMaxHeight = imgMaxHeight;
372
- let containerWidth = imgMaxWidth;
373
- let containerHeight = imgMaxHeight;
374
- // Check if the target image has a different ratio than the original one (thumbnail).
375
- // Recalculate the width and height.
376
- if (naturalRatio.toFixed(2) !== imgRatio.toFixed(2)) {
377
- if (naturalRatio > imgRatio) {
378
- // If the width is reached before the height, we keep the maxWidth
379
- // and recalculate the height.
380
- // Unless the difference between the maxHeight and the reducedHeight
381
- // is higher than the maxWidth, where we keep the reducedHeight and
382
- // recalculate the width.
383
- const reducedHeight = imgMaxWidth / naturalRatio;
384
- if (imgMaxHeight - reducedHeight > imgMaxWidth) {
385
- imgMaxHeight = reducedHeight;
386
- imgMaxWidth = reducedHeight * naturalRatio;
387
- } else {
388
- imgMaxHeight = imgMaxWidth / naturalRatio;
389
- }
390
- } else {
391
- // If the height is reached before the width, we keep the maxHeight
392
- // and recalculate the width.
393
- // Unless the difference between the maxWidth and the reducedWidth
394
- // is higher than the maxHeight, where we keep the reducedWidth and
395
- // recalculate the height.
396
- const reducedWidth = imgMaxHeight * naturalRatio;
397
- if (imgMaxWidth - reducedWidth > imgMaxHeight) {
398
- imgMaxWidth = reducedWidth;
399
- imgMaxHeight = reducedWidth / naturalRatio;
400
- } else {
401
- imgMaxWidth = imgMaxHeight * naturalRatio;
402
- }
403
- }
404
- containerWidth = imgMaxWidth;
405
- containerHeight = imgMaxHeight;
406
- imgRatio = imgMaxWidth / imgMaxHeight;
407
-
408
- // Calculate the max size of the container.
409
- if (originalRatio > imgRatio) {
410
- containerMaxWidth = imgMaxWidth;
411
- containerMaxHeight = containerMaxWidth / originalRatio;
412
- } else {
413
- containerMaxHeight = imgMaxHeight;
414
- containerMaxWidth = containerMaxHeight * originalRatio;
415
- }
416
- }
417
-
418
- // If the image has been pixelated on purpose, keep that size.
419
- if (originalWidth > containerWidth || originalHeight > containerHeight) {
420
- containerWidth = originalWidth;
421
- containerHeight = originalHeight;
422
- }
423
-
424
- // Calculate the final lightbox image size and the
425
- // scale factor. MaxWidth is either the window container
426
- // (accounting for padding) or the image resolution.
427
- let horizontalPadding = 0;
428
- if (window.innerWidth > 480) {
429
- horizontalPadding = 80;
430
- } else if (window.innerWidth > 1920) {
431
- horizontalPadding = 160;
432
- }
433
- const verticalPadding = 80;
434
- const targetMaxWidth = Math.min(window.innerWidth - horizontalPadding, containerWidth);
435
- const targetMaxHeight = Math.min(window.innerHeight - verticalPadding, containerHeight);
436
- const targetContainerRatio = targetMaxWidth / targetMaxHeight;
437
- if (originalRatio > targetContainerRatio) {
438
- // If targetMaxWidth is reached before targetMaxHeight
439
- containerWidth = targetMaxWidth;
440
- containerHeight = containerWidth / originalRatio;
441
- } else {
442
- // If targetMaxHeight is reached before targetMaxWidth
443
- containerHeight = targetMaxHeight;
444
- containerWidth = containerHeight * originalRatio;
445
- }
446
- const containerScale = originalWidth / containerWidth;
447
- const lightboxImgWidth = imgMaxWidth * (containerWidth / containerMaxWidth);
448
- const lightboxImgHeight = imgMaxHeight * (containerHeight / containerMaxHeight);
449
-
450
- // Add the CSS variables needed.
451
- let styleTag = document.getElementById('wp-lightbox-styles');
452
- if (!styleTag) {
453
- styleTag = document.createElement('style');
454
- styleTag.id = 'wp-lightbox-styles';
455
- document.head.appendChild(styleTag);
456
- }
457
-
458
- // As of this writing, using the calculations above will render the lightbox
459
- // with a small, erroneous whitespace on the left side of the image in iOS Safari,
460
- // perhaps due to an inconsistency in how browsers handle absolute positioning and CSS
461
- // transformation. In any case, adding 1 pixel to the container width and height solves
462
- // the problem, though this can be removed if the issue is fixed in the future.
463
- styleTag.innerHTML = `
464
- :root {
465
- --wp--lightbox-initial-top-position: ${screenPosY}px;
466
- --wp--lightbox-initial-left-position: ${screenPosX}px;
467
- --wp--lightbox-container-width: ${containerWidth + 1}px;
468
- --wp--lightbox-container-height: ${containerHeight + 1}px;
469
- --wp--lightbox-image-width: ${lightboxImgWidth}px;
470
- --wp--lightbox-image-height: ${lightboxImgHeight}px;
471
- --wp--lightbox-scale: ${containerScale};
472
- --wp--lightbox-scrollbar-width: ${window.innerWidth - document.documentElement.clientWidth}px;
473
- }
474
- `;
475
- }
476
-
477
- /**
478
- * Debounces a function call.
479
- *
480
- * @function
481
- * @param {Function} func - A function to be called
482
- * @param {number} wait - The time to wait before calling the function
483
- */
484
- function debounce(func, wait = 50) {
485
- let timeout;
486
- return () => {
487
- const later = () => {
488
- timeout = null;
489
- func();
490
- };
491
- clearTimeout(timeout);
492
- timeout = setTimeout(later, wait);
493
- };
494
- }
495
392
  //# sourceMappingURL=view.js.map