@wordpress/block-library 8.27.2 → 8.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1445) 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 +1 -2
  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 +21 -21
  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 +41 -43
  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 +1 -2
  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.native.js +0 -1
  989. package/build-module/button/edit.native.js.map +1 -1
  990. package/build-module/button/index.js +7 -2
  991. package/build-module/button/index.js.map +1 -1
  992. package/build-module/buttons/edit.js +4 -11
  993. package/build-module/buttons/edit.js.map +1 -1
  994. package/build-module/buttons/edit.native.js +2 -5
  995. package/build-module/buttons/edit.native.js.map +1 -1
  996. package/build-module/buttons/index.js +4 -0
  997. package/build-module/buttons/index.js.map +1 -1
  998. package/build-module/calendar/index.js +3 -0
  999. package/build-module/calendar/index.js.map +1 -1
  1000. package/build-module/categories/index.js +3 -0
  1001. package/build-module/categories/index.js.map +1 -1
  1002. package/build-module/code/index.js +3 -1
  1003. package/build-module/code/index.js.map +1 -1
  1004. package/build-module/column/index.js +5 -1
  1005. package/build-module/column/index.js.map +1 -1
  1006. package/build-module/columns/edit.js +53 -76
  1007. package/build-module/columns/edit.js.map +1 -1
  1008. package/build-module/columns/edit.native.js +0 -12
  1009. package/build-module/columns/edit.native.js.map +1 -1
  1010. package/build-module/columns/index.js +6 -1
  1011. package/build-module/columns/index.js.map +1 -1
  1012. package/build-module/comment-author-avatar/index.js +3 -0
  1013. package/build-module/comment-author-avatar/index.js.map +1 -1
  1014. package/build-module/comment-author-name/index.js +3 -0
  1015. package/build-module/comment-author-name/index.js.map +1 -1
  1016. package/build-module/comment-date/index.js +3 -0
  1017. package/build-module/comment-date/index.js.map +1 -1
  1018. package/build-module/comment-edit-link/index.js +3 -0
  1019. package/build-module/comment-edit-link/index.js.map +1 -1
  1020. package/build-module/comment-template/index.js +3 -0
  1021. package/build-module/comment-template/index.js.map +1 -1
  1022. package/build-module/comments-pagination/edit.js +1 -3
  1023. package/build-module/comments-pagination/edit.js.map +1 -1
  1024. package/build-module/comments-pagination/index.js +4 -0
  1025. package/build-module/comments-pagination/index.js.map +1 -1
  1026. package/build-module/comments-pagination-next/index.js +3 -0
  1027. package/build-module/comments-pagination-next/index.js.map +1 -1
  1028. package/build-module/comments-pagination-numbers/index.js +3 -0
  1029. package/build-module/comments-pagination-numbers/index.js.map +1 -1
  1030. package/build-module/comments-pagination-previous/index.js +3 -0
  1031. package/build-module/comments-pagination-previous/index.js.map +1 -1
  1032. package/build-module/comments-title/deprecated.js +3 -0
  1033. package/build-module/comments-title/deprecated.js.map +1 -1
  1034. package/build-module/comments-title/index.js +3 -0
  1035. package/build-module/comments-title/index.js.map +1 -1
  1036. package/build-module/cover/edit/inspector-controls.js +3 -3
  1037. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  1038. package/build-module/cover/index.js +3 -0
  1039. package/build-module/cover/index.js.map +1 -1
  1040. package/build-module/details/index.js +3 -0
  1041. package/build-module/details/index.js.map +1 -1
  1042. package/build-module/embed/deprecated.js +3 -0
  1043. package/build-module/embed/deprecated.js.map +1 -1
  1044. package/build-module/embed/embed-placeholder.js +1 -1
  1045. package/build-module/embed/embed-placeholder.js.map +1 -1
  1046. package/build-module/embed/index.js +3 -0
  1047. package/build-module/embed/index.js.map +1 -1
  1048. package/build-module/embed/transforms.js +3 -0
  1049. package/build-module/embed/transforms.js.map +1 -1
  1050. package/build-module/embed/util.js +3 -0
  1051. package/build-module/embed/util.js.map +1 -1
  1052. package/build-module/file/view.js +2 -0
  1053. package/build-module/file/view.js.map +1 -1
  1054. package/build-module/footnotes/format.js +4 -0
  1055. package/build-module/footnotes/format.js.map +1 -1
  1056. package/build-module/footnotes/index.js +3 -0
  1057. package/build-module/footnotes/index.js.map +1 -1
  1058. package/build-module/form/edit.js +0 -2
  1059. package/build-module/form/edit.js.map +1 -1
  1060. package/build-module/form/index.js +1 -0
  1061. package/build-module/form/index.js.map +1 -1
  1062. package/build-module/form/view.js +2 -0
  1063. package/build-module/form/view.js.map +1 -1
  1064. package/build-module/form-input/deprecated.js +0 -1
  1065. package/build-module/form-input/deprecated.js.map +1 -1
  1066. package/build-module/form-submit-button/edit.js +0 -1
  1067. package/build-module/form-submit-button/edit.js.map +1 -1
  1068. package/build-module/form-submit-button/index.js +1 -0
  1069. package/build-module/form-submit-button/index.js.map +1 -1
  1070. package/build-module/gallery/edit.js +19 -25
  1071. package/build-module/gallery/edit.js.map +1 -1
  1072. package/build-module/gallery/gallery.native.js +0 -1
  1073. package/build-module/gallery/gallery.native.js.map +1 -1
  1074. package/build-module/gallery/index.js +4 -0
  1075. package/build-module/gallery/index.js.map +1 -1
  1076. package/build-module/gallery/v1/gallery-image.js +0 -1
  1077. package/build-module/gallery/v1/gallery-image.js.map +1 -1
  1078. package/build-module/group/index.js +3 -0
  1079. package/build-module/group/index.js.map +1 -1
  1080. package/build-module/heading/index.js +4 -1
  1081. package/build-module/heading/index.js.map +1 -1
  1082. package/build-module/home-link/index.js +3 -0
  1083. package/build-module/home-link/index.js.map +1 -1
  1084. package/build-module/html/index.js +4 -1
  1085. package/build-module/html/index.js.map +1 -1
  1086. package/build-module/image/edit.js +21 -20
  1087. package/build-module/image/edit.js.map +1 -1
  1088. package/build-module/image/image.js +42 -44
  1089. package/build-module/image/image.js.map +1 -1
  1090. package/build-module/image/index.js +4 -0
  1091. package/build-module/image/index.js.map +1 -1
  1092. package/build-module/image/save.js +3 -1
  1093. package/build-module/image/save.js.map +1 -1
  1094. package/build-module/image/view.js +266 -368
  1095. package/build-module/image/view.js.map +1 -1
  1096. package/build-module/latest-comments/index.js +3 -0
  1097. package/build-module/latest-comments/index.js.map +1 -1
  1098. package/build-module/latest-posts/deprecated.js +3 -0
  1099. package/build-module/latest-posts/deprecated.js.map +1 -1
  1100. package/build-module/latest-posts/index.js +3 -0
  1101. package/build-module/latest-posts/index.js.map +1 -1
  1102. package/build-module/list/edit.js +0 -1
  1103. package/build-module/list/edit.js.map +1 -1
  1104. package/build-module/list/index.js +5 -1
  1105. package/build-module/list/index.js.map +1 -1
  1106. package/build-module/list-item/edit.js +0 -1
  1107. package/build-module/list-item/edit.js.map +1 -1
  1108. package/build-module/list-item/edit.native.js +0 -1
  1109. package/build-module/list-item/edit.native.js.map +1 -1
  1110. package/build-module/list-item/index.js +4 -0
  1111. package/build-module/list-item/index.js.map +1 -1
  1112. package/build-module/loginout/index.js +3 -0
  1113. package/build-module/loginout/index.js.map +1 -1
  1114. package/build-module/media-text/edit.js +12 -10
  1115. package/build-module/media-text/edit.js.map +1 -1
  1116. package/build-module/media-text/edit.native.js +1 -1
  1117. package/build-module/media-text/edit.native.js.map +1 -1
  1118. package/build-module/media-text/index.js +3 -0
  1119. package/build-module/media-text/index.js.map +1 -1
  1120. package/build-module/missing/index.js +4 -1
  1121. package/build-module/missing/index.js.map +1 -1
  1122. package/build-module/more/index.js +4 -1
  1123. package/build-module/more/index.js.map +1 -1
  1124. package/build-module/navigation/constants.js +0 -1
  1125. package/build-module/navigation/constants.js.map +1 -1
  1126. package/build-module/navigation/edit/index.js +0 -1
  1127. package/build-module/navigation/edit/index.js.map +1 -1
  1128. package/build-module/navigation/edit/inner-blocks.js +2 -6
  1129. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  1130. package/build-module/navigation/edit/unsaved-inner-blocks.js +3 -7
  1131. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  1132. package/build-module/navigation/index.js +1 -0
  1133. package/build-module/navigation/index.js.map +1 -1
  1134. package/build-module/navigation/view.js +2 -0
  1135. package/build-module/navigation/view.js.map +1 -1
  1136. package/build-module/navigation-link/edit.js +11 -6
  1137. package/build-module/navigation-link/edit.js.map +1 -1
  1138. package/build-module/navigation-link/index.js +5 -1
  1139. package/build-module/navigation-link/index.js.map +1 -1
  1140. package/build-module/navigation-link/link-ui.js +116 -51
  1141. package/build-module/navigation-link/link-ui.js.map +1 -1
  1142. package/build-module/navigation-submenu/index.js +19 -4
  1143. package/build-module/navigation-submenu/index.js.map +1 -1
  1144. package/build-module/nextpage/index.js +4 -1
  1145. package/build-module/nextpage/index.js.map +1 -1
  1146. package/build-module/page-list/edit.js +0 -1
  1147. package/build-module/page-list/edit.js.map +1 -1
  1148. package/build-module/page-list/index.js +4 -0
  1149. package/build-module/page-list/index.js.map +1 -1
  1150. package/build-module/page-list-item/index.js +4 -1
  1151. package/build-module/page-list-item/index.js.map +1 -1
  1152. package/build-module/paragraph/edit.js +3 -3
  1153. package/build-module/paragraph/edit.js.map +1 -1
  1154. package/build-module/paragraph/index.js +4 -1
  1155. package/build-module/paragraph/index.js.map +1 -1
  1156. package/build-module/paragraph/transforms.js +4 -1
  1157. package/build-module/paragraph/transforms.js.map +1 -1
  1158. package/build-module/pattern/index.js +4 -1
  1159. package/build-module/pattern/index.js.map +1 -1
  1160. package/build-module/post-author/index.js +3 -0
  1161. package/build-module/post-author/index.js.map +1 -1
  1162. package/build-module/post-author-biography/index.js +3 -0
  1163. package/build-module/post-author-biography/index.js.map +1 -1
  1164. package/build-module/post-author-name/index.js +3 -0
  1165. package/build-module/post-author-name/index.js.map +1 -1
  1166. package/build-module/post-comment/edit.js +1 -3
  1167. package/build-module/post-comment/edit.js.map +1 -1
  1168. package/build-module/post-comment/index.js +5 -1
  1169. package/build-module/post-comment/index.js.map +1 -1
  1170. package/build-module/post-comments-count/index.js +3 -0
  1171. package/build-module/post-comments-count/index.js.map +1 -1
  1172. package/build-module/post-comments-link/index.js +3 -0
  1173. package/build-module/post-comments-link/index.js.map +1 -1
  1174. package/build-module/post-date/index.js +3 -0
  1175. package/build-module/post-date/index.js.map +1 -1
  1176. package/build-module/post-excerpt/index.js +3 -0
  1177. package/build-module/post-excerpt/index.js.map +1 -1
  1178. package/build-module/post-featured-image/index.js +3 -0
  1179. package/build-module/post-featured-image/index.js.map +1 -1
  1180. package/build-module/post-navigation-link/edit.js +5 -5
  1181. package/build-module/post-navigation-link/edit.js.map +1 -1
  1182. package/build-module/post-navigation-link/index.js +3 -3
  1183. package/build-module/post-navigation-link/index.js.map +1 -1
  1184. package/build-module/post-template/edit.js +5 -6
  1185. package/build-module/post-template/edit.js.map +1 -1
  1186. package/build-module/post-template/index.js +3 -0
  1187. package/build-module/post-template/index.js.map +1 -1
  1188. package/build-module/post-terms/index.js +3 -0
  1189. package/build-module/post-terms/index.js.map +1 -1
  1190. package/build-module/post-time-to-read/index.js +3 -0
  1191. package/build-module/post-time-to-read/index.js.map +1 -1
  1192. package/build-module/post-title/index.js +3 -0
  1193. package/build-module/post-title/index.js.map +1 -1
  1194. package/build-module/preformatted/index.js +3 -1
  1195. package/build-module/preformatted/index.js.map +1 -1
  1196. package/build-module/pullquote/index.js +3 -0
  1197. package/build-module/pullquote/index.js.map +1 -1
  1198. package/build-module/query/index.js +3 -3
  1199. package/build-module/query/index.js.map +1 -1
  1200. package/build-module/query/view.js +5 -40
  1201. package/build-module/query/view.js.map +1 -1
  1202. package/build-module/query-no-results/index.js +3 -0
  1203. package/build-module/query-no-results/index.js.map +1 -1
  1204. package/build-module/query-pagination/edit.js +1 -3
  1205. package/build-module/query-pagination/edit.js.map +1 -1
  1206. package/build-module/query-pagination/index.js +5 -1
  1207. package/build-module/query-pagination/index.js.map +1 -1
  1208. package/build-module/query-pagination-next/index.js +3 -0
  1209. package/build-module/query-pagination-next/index.js.map +1 -1
  1210. package/build-module/query-pagination-numbers/index.js +3 -0
  1211. package/build-module/query-pagination-numbers/index.js.map +1 -1
  1212. package/build-module/query-pagination-previous/index.js +3 -0
  1213. package/build-module/query-pagination-previous/index.js.map +1 -1
  1214. package/build-module/query-title/index.js +3 -0
  1215. package/build-module/query-title/index.js.map +1 -1
  1216. package/build-module/quote/index.js +3 -0
  1217. package/build-module/quote/index.js.map +1 -1
  1218. package/build-module/read-more/index.js +3 -0
  1219. package/build-module/read-more/index.js.map +1 -1
  1220. package/build-module/rss/index.js +4 -1
  1221. package/build-module/rss/index.js.map +1 -1
  1222. package/build-module/search/view.js +2 -0
  1223. package/build-module/search/view.js.map +1 -1
  1224. package/build-module/separator/index.js +3 -0
  1225. package/build-module/separator/index.js.map +1 -1
  1226. package/build-module/site-logo/edit.js +0 -1
  1227. package/build-module/site-logo/edit.js.map +1 -1
  1228. package/build-module/site-logo/index.js +3 -0
  1229. package/build-module/site-logo/index.js.map +1 -1
  1230. package/build-module/site-tagline/index.js +3 -0
  1231. package/build-module/site-tagline/index.js.map +1 -1
  1232. package/build-module/site-title/index.js +3 -0
  1233. package/build-module/site-title/index.js.map +1 -1
  1234. package/build-module/social-link/icons/patreon.js +4 -11
  1235. package/build-module/social-link/icons/patreon.js.map +1 -1
  1236. package/build-module/social-link/index.js +4 -1
  1237. package/build-module/social-link/index.js.map +1 -1
  1238. package/build-module/social-links/edit.js +0 -2
  1239. package/build-module/social-links/edit.js.map +1 -1
  1240. package/build-module/social-links/edit.native.js +0 -3
  1241. package/build-module/social-links/edit.native.js.map +1 -1
  1242. package/build-module/social-links/index.js +4 -0
  1243. package/build-module/social-links/index.js.map +1 -1
  1244. package/build-module/spacer/index.js +3 -0
  1245. package/build-module/spacer/index.js.map +1 -1
  1246. package/build-module/table/index.js +4 -1
  1247. package/build-module/table/index.js.map +1 -1
  1248. package/build-module/table-of-contents/index.js +3 -0
  1249. package/build-module/table-of-contents/index.js.map +1 -1
  1250. package/build-module/tag-cloud/index.js +3 -0
  1251. package/build-module/tag-cloud/index.js.map +1 -1
  1252. package/build-module/template-part/edit/index.js +6 -10
  1253. package/build-module/template-part/edit/index.js.map +1 -1
  1254. package/build-module/template-part/index.js +7 -4
  1255. package/build-module/template-part/index.js.map +1 -1
  1256. package/build-module/term-description/index.js +3 -0
  1257. package/build-module/term-description/index.js.map +1 -1
  1258. package/build-module/text-columns/index.js +4 -1
  1259. package/build-module/text-columns/index.js.map +1 -1
  1260. package/build-module/verse/index.js +3 -1
  1261. package/build-module/verse/index.js.map +1 -1
  1262. package/build-module/video/deprecated.js +3 -0
  1263. package/build-module/video/deprecated.js.map +1 -1
  1264. package/build-module/video/index.js +3 -0
  1265. package/build-module/video/index.js.map +1 -1
  1266. package/build-style/editor-rtl.css +10 -1
  1267. package/build-style/editor.css +10 -1
  1268. package/build-style/embed/editor-rtl.css +5 -1
  1269. package/build-style/embed/editor.css +5 -1
  1270. package/build-style/image/style-rtl.css +6 -6
  1271. package/build-style/image/style.css +6 -6
  1272. package/build-style/navigation-link/style-rtl.css +22 -0
  1273. package/build-style/navigation-link/style.css +22 -0
  1274. package/build-style/{query/style.css → post-content/editor-rtl.css} +3 -41
  1275. package/build-style/{query/style-rtl.css → post-content/editor.css} +3 -41
  1276. package/build-style/separator/style-rtl.css +2 -2
  1277. package/build-style/separator/style.css +2 -2
  1278. package/build-style/social-links/style-rtl.css +2 -2
  1279. package/build-style/social-links/style.css +2 -2
  1280. package/build-style/style-rtl.css +32 -10
  1281. package/build-style/style.css +32 -10
  1282. package/package.json +34 -34
  1283. package/src/archives/block.json +3 -0
  1284. package/src/audio/block.json +3 -0
  1285. package/src/avatar/block.json +3 -0
  1286. package/src/block/block.json +6 -3
  1287. package/src/block/deprecated.js +57 -0
  1288. package/src/block/edit.js +150 -148
  1289. package/src/block/index.js +21 -0
  1290. package/src/block/index.php +15 -2
  1291. package/src/button/block.json +7 -2
  1292. package/src/buttons/block.json +4 -0
  1293. package/src/buttons/edit.js +4 -13
  1294. package/src/buttons/edit.native.js +2 -6
  1295. package/src/calendar/block.json +3 -0
  1296. package/src/categories/block.json +3 -0
  1297. package/src/code/block.json +3 -0
  1298. package/src/column/block.json +5 -1
  1299. package/src/columns/block.json +6 -1
  1300. package/src/columns/edit.js +91 -123
  1301. package/src/columns/edit.native.js +0 -12
  1302. package/src/comment-author-avatar/block.json +3 -0
  1303. package/src/comment-author-name/block.json +3 -0
  1304. package/src/comment-date/block.json +3 -0
  1305. package/src/comment-edit-link/block.json +3 -0
  1306. package/src/comment-template/block.json +3 -0
  1307. package/src/comments-pagination/block.json +8 -0
  1308. package/src/comments-pagination/edit.js +0 -6
  1309. package/src/comments-pagination-next/block.json +3 -0
  1310. package/src/comments-pagination-numbers/block.json +3 -0
  1311. package/src/comments-pagination-previous/block.json +3 -0
  1312. package/src/comments-title/block.json +3 -0
  1313. package/src/cover/block.json +3 -0
  1314. package/src/cover/edit/inspector-controls.js +3 -2
  1315. package/src/cover/test/edit.js +2 -2
  1316. package/src/details/block.json +3 -0
  1317. package/src/editor.scss +1 -0
  1318. package/src/embed/block.json +3 -0
  1319. package/src/embed/editor.scss +8 -2
  1320. package/src/embed/embed-placeholder.js +1 -1
  1321. package/src/file/index.php +11 -7
  1322. package/src/file/view.js +9 -5
  1323. package/src/footnotes/block.json +3 -0
  1324. package/src/footnotes/format.js +10 -0
  1325. package/src/form/block.json +9 -0
  1326. package/src/form/edit.js +0 -11
  1327. package/src/form/index.php +2 -2
  1328. package/src/form/view.js +2 -0
  1329. package/src/form-submit-button/block.json +1 -0
  1330. package/src/form-submit-button/edit.js +0 -1
  1331. package/src/gallery/block.json +4 -0
  1332. package/src/gallery/edit.js +26 -35
  1333. package/src/gallery/gallery.native.js +0 -1
  1334. package/src/gallery/index.php +51 -21
  1335. package/src/gallery/test/index.native.js +1 -1
  1336. package/src/group/block.json +3 -0
  1337. package/src/heading/block.json +4 -1
  1338. package/src/heading/test/__snapshots__/index.native.js.snap +6 -0
  1339. package/src/heading/test/index.native.js +24 -9
  1340. package/src/home-link/block.json +3 -0
  1341. package/src/home-link/index.php +4 -1
  1342. package/src/html/block.json +4 -1
  1343. package/src/image/block.json +4 -0
  1344. package/src/image/edit.js +16 -14
  1345. package/src/image/image.js +58 -74
  1346. package/src/image/index.php +123 -166
  1347. package/src/image/save.js +3 -0
  1348. package/src/image/style.scss +2 -2
  1349. package/src/image/view.js +392 -499
  1350. package/src/latest-comments/block.json +3 -0
  1351. package/src/latest-posts/block.json +3 -0
  1352. package/src/list/block.json +5 -1
  1353. package/src/list/edit.js +0 -1
  1354. package/src/list-item/block.json +4 -0
  1355. package/src/list-item/edit.js +0 -1
  1356. package/src/list-item/edit.native.js +0 -1
  1357. package/src/loginout/block.json +3 -0
  1358. package/src/media-text/block.json +3 -0
  1359. package/src/media-text/edit.js +12 -12
  1360. package/src/media-text/edit.native.js +1 -1
  1361. package/src/missing/block.json +4 -1
  1362. package/src/more/block.json +4 -1
  1363. package/src/navigation/block.json +13 -0
  1364. package/src/navigation/constants.js +0 -14
  1365. package/src/navigation/edit/inner-blocks.js +2 -18
  1366. package/src/navigation/edit/unsaved-inner-blocks.js +3 -19
  1367. package/src/navigation/index.php +77 -40
  1368. package/src/navigation/view.js +184 -171
  1369. package/src/navigation-link/block.json +9 -1
  1370. package/src/navigation-link/edit.js +10 -11
  1371. package/src/navigation-link/index.php +31 -110
  1372. package/src/navigation-link/link-ui.js +216 -111
  1373. package/src/navigation-link/style.scss +26 -0
  1374. package/src/navigation-submenu/block.json +4 -1
  1375. package/src/navigation-submenu/index.js +11 -4
  1376. package/src/nextpage/block.json +4 -1
  1377. package/src/page-list/block.json +4 -0
  1378. package/src/page-list/edit.js +0 -1
  1379. package/src/page-list-item/block.json +4 -1
  1380. package/src/paragraph/block.json +4 -1
  1381. package/src/paragraph/edit.js +3 -3
  1382. package/src/pattern/block.json +4 -1
  1383. package/src/post-author/block.json +3 -0
  1384. package/src/post-author-biography/block.json +3 -0
  1385. package/src/post-author-name/block.json +3 -0
  1386. package/src/post-comment/block.json +12 -1
  1387. package/src/post-comment/edit.js +0 -9
  1388. package/src/post-comments-count/block.json +3 -0
  1389. package/src/post-comments-link/block.json +3 -0
  1390. package/src/post-content/editor.scss +4 -0
  1391. package/src/post-date/block.json +3 -0
  1392. package/src/post-excerpt/block.json +3 -0
  1393. package/src/post-featured-image/block.json +3 -0
  1394. package/src/post-navigation-link/block.json +3 -3
  1395. package/src/post-navigation-link/edit.js +1 -7
  1396. package/src/post-navigation-link/index.php +2 -5
  1397. package/src/post-template/block.json +3 -0
  1398. package/src/post-template/edit.js +5 -5
  1399. package/src/post-terms/block.json +3 -0
  1400. package/src/post-terms/index.php +2 -2
  1401. package/src/post-time-to-read/block.json +3 -0
  1402. package/src/post-title/block.json +3 -0
  1403. package/src/preformatted/block.json +3 -0
  1404. package/src/pullquote/block.json +3 -0
  1405. package/src/query/block.json +3 -3
  1406. package/src/query/index.php +41 -65
  1407. package/src/query/view.js +43 -71
  1408. package/src/query-no-results/block.json +3 -0
  1409. package/src/query-pagination/block.json +9 -1
  1410. package/src/query-pagination/edit.js +0 -6
  1411. package/src/query-pagination-next/block.json +3 -0
  1412. package/src/query-pagination-numbers/block.json +3 -0
  1413. package/src/query-pagination-previous/block.json +3 -0
  1414. package/src/query-title/block.json +3 -0
  1415. package/src/quote/block.json +3 -0
  1416. package/src/read-more/block.json +3 -0
  1417. package/src/rss/block.json +4 -1
  1418. package/src/search/index.php +11 -7
  1419. package/src/search/view.js +64 -60
  1420. package/src/separator/block.json +3 -0
  1421. package/src/separator/style.scss +3 -3
  1422. package/src/site-logo/block.json +3 -0
  1423. package/src/site-tagline/block.json +3 -0
  1424. package/src/site-title/block.json +3 -0
  1425. package/src/social-link/block.json +4 -1
  1426. package/src/social-link/icons/patreon.js +3 -4
  1427. package/src/social-link/index.php +1 -1
  1428. package/src/social-link/socials-with-bg.scss +1 -1
  1429. package/src/social-link/socials-without-bg.scss +1 -1
  1430. package/src/social-links/block.json +4 -0
  1431. package/src/social-links/edit.js +0 -3
  1432. package/src/social-links/edit.native.js +0 -6
  1433. package/src/spacer/block.json +3 -0
  1434. package/src/table/block.json +4 -1
  1435. package/src/table-of-contents/block.json +3 -0
  1436. package/src/tag-cloud/block.json +3 -0
  1437. package/src/template-part/block.json +4 -1
  1438. package/src/template-part/edit/index.js +6 -9
  1439. package/src/template-part/index.js +4 -4
  1440. package/src/template-part/index.php +9 -9
  1441. package/src/term-description/block.json +3 -0
  1442. package/src/text-columns/block.json +4 -1
  1443. package/src/verse/block.json +3 -0
  1444. package/src/video/block.json +3 -0
  1445. package/src/query/style.scss +0 -52
@@ -2,242 +2,315 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { store, getContext, getElement } from '@wordpress/interactivity';
5
- 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^="-"])'];
6
5
 
7
6
  /**
8
- * Stores a context-bound scroll handler.
9
- *
10
- * This callback could be defined inline inside of the store
11
- * object but it's created externally to avoid confusion about
12
- * how its logic is called. This logic is not referenced directly
13
- * by the directives in the markup because the scroll event we
14
- * need to listen to is triggered on the window; so by defining it
15
- * outside of the store, we signal that the behavior here is different.
16
- * If we find a compelling reason to move it to the store, feel free.
17
- *
18
- * @type {Function}
19
- */
20
- let scrollCallback;
21
-
22
- /**
23
- * Tracks whether user is touching screen; used to
24
- * differentiate behavior for touch and mouse input.
7
+ * Tracks whether user is touching screen; used to differentiate behavior for
8
+ * touch and mouse input.
25
9
  *
26
10
  * @type {boolean}
27
11
  */
28
12
  let isTouching = false;
29
13
 
30
14
  /**
31
- * Tracks the last time the screen was touched; used to
32
- * differentiate behavior for touch and mouse input.
15
+ * Tracks the last time the screen was touched; used to differentiate behavior
16
+ * for touch and mouse input.
33
17
  *
34
18
  * @type {number}
35
19
  */
36
20
  let lastTouchTime = 0;
37
21
 
38
22
  /**
39
- * Lightbox page-scroll handler: prevents scrolling.
40
- *
41
- * This handler is added to prevent scrolling behaviors that
42
- * trigger content shift while the lightbox is open.
23
+ * Stores the image reference of the currently opened lightbox.
43
24
  *
44
- * It would be better to accomplish this through CSS alone, but
45
- * using overflow: hidden is currently the only way to do so, and
46
- * that causes the layout to shift and prevents the zoom animation
47
- * from working in some cases because we're unable to account for
48
- * the layout shift when doing the animation calculations. Instead,
49
- * here we use JavaScript to prevent and reset the scrolling
50
- * behavior. In the future, we may be able to use CSS or overflow: hidden
51
- * instead to not rely on JavaScript, but this seems to be the best approach
52
- * for now that provides the best visual experience.
25
+ * @type {HTMLElement}
26
+ */
27
+ let imageRef;
28
+
29
+ /**
30
+ * Stores the button reference of the currently opened lightbox.
53
31
  *
54
- * @param {Object} ctx Context object with the `core/image` namespace.
32
+ * @type {HTMLElement}
55
33
  */
56
- function handleScroll(ctx) {
57
- // We can't override the scroll behavior on mobile devices
58
- // because doing so breaks the pinch to zoom functionality, and we
59
- // want to allow users to zoom in further on the high-res image.
60
- if (!isTouching && Date.now() - lastTouchTime > 450) {
61
- // We are unable to use event.preventDefault() to prevent scrolling
62
- // because the scroll event can't be canceled, so we reset the position instead.
63
- window.scrollTo(ctx.scrollLeftReset, ctx.scrollTopReset);
64
- }
65
- }
34
+ let buttonRef;
66
35
  const {
67
36
  state,
68
37
  actions,
69
38
  callbacks
70
39
  } = store('core/image', {
71
40
  state: {
72
- windowWidth: window.innerWidth,
73
- windowHeight: window.innerHeight,
41
+ currentImage: {},
42
+ get overlayOpened() {
43
+ return state.currentImage.currentSrc;
44
+ },
74
45
  get roleAttribute() {
75
- const ctx = getContext();
76
- return ctx.lightboxEnabled ? 'dialog' : null;
46
+ return state.overlayOpened ? 'dialog' : null;
77
47
  },
78
48
  get ariaModal() {
79
- const ctx = getContext();
80
- return ctx.lightboxEnabled ? 'true' : null;
49
+ return state.overlayOpened ? 'true' : null;
81
50
  },
82
- get dialogLabel() {
83
- const ctx = getContext();
84
- return ctx.lightboxEnabled ? ctx.dialogLabel : null;
51
+ get enlargedSrc() {
52
+ return state.currentImage.uploadedSrc || 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
85
53
  },
86
- get lightboxObjectFit() {
87
- const ctx = getContext();
88
- if (ctx.initialized) {
89
- return 'cover';
90
- }
91
- },
92
- get enlargedImgSrc() {
93
- const ctx = getContext();
94
- return ctx.initialized ? ctx.imageUploadedSrc : 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
54
+ get imgStyles() {
55
+ return state.overlayOpened && `${state.currentImage.imgStyles?.replace(/;$/, '')}; object-fit:cover;`;
95
56
  }
96
57
  },
97
58
  actions: {
98
- showLightbox(event) {
59
+ showLightbox() {
99
60
  const ctx = getContext();
100
- // We can't initialize the lightbox until the reference
101
- // image is loaded, otherwise the UX is broken.
102
- if (!ctx.imageLoaded) {
61
+
62
+ // Bails out if the image has not loaded yet.
63
+ if (!ctx.imageRef?.complete) {
103
64
  return;
104
65
  }
105
- ctx.initialized = true;
106
- ctx.lastFocusedElement = window.document.activeElement;
107
- ctx.scrollDelta = 0;
108
- ctx.pointerType = event.pointerType;
109
- ctx.lightboxEnabled = true;
110
- setStyles(ctx, ctx.imageRef);
111
- ctx.scrollTopReset = window.pageYOffset || document.documentElement.scrollTop;
112
66
 
113
- // In most cases, this value will be 0, but this is included
114
- // in case a user has created a page with horizontal scrolling.
115
- ctx.scrollLeftReset = window.pageXOffset || document.documentElement.scrollLeft;
67
+ // Stores the positons of the scroll to fix it until the overlay is
68
+ // closed.
69
+ state.scrollTopReset = document.documentElement.scrollTop;
70
+ state.scrollLeftReset = document.documentElement.scrollLeft;
116
71
 
117
- // We define and bind the scroll callback here so
118
- // that we can pass the context and as an argument.
119
- // We may be able to change this in the future if we
120
- // define the scroll callback in the store instead, but
121
- // this approach seems to tbe clearest for now.
122
- scrollCallback = handleScroll.bind(null, ctx);
72
+ // Moves the information of the expaned image to the state.
73
+ ctx.currentSrc = ctx.imageRef.currentSrc;
74
+ imageRef = ctx.imageRef;
75
+ buttonRef = ctx.buttonRef;
76
+ state.currentImage = ctx;
77
+ state.overlayEnabled = true;
123
78
 
124
- // We need to add a scroll event listener to the window
125
- // here because we are unable to otherwise access it via
126
- // the Interactivity API directives. If we add a native way
127
- // to access the window, we can remove this.
128
- window.addEventListener('scroll', scrollCallback, false);
79
+ // Computes the styles of the overlay for the animation.
80
+ callbacks.setOverlayStyles();
129
81
  },
130
82
  hideLightbox() {
131
- const ctx = getContext();
132
- ctx.hideAnimationEnabled = true;
133
- if (ctx.lightboxEnabled) {
134
- // We want to wait until the close animation is completed
135
- // before allowing a user to scroll again. The duration of this
136
- // animation is defined in the styles.scss and depends on if the
137
- // animation is 'zoom' or 'fade', but in any case we should wait
138
- // a few milliseconds longer than the duration, otherwise a user
139
- // may scroll too soon and cause the animation to look sloppy.
83
+ if (state.overlayEnabled) {
84
+ // Waits until the close animation has completed before allowing a
85
+ // user to scroll again. The duration of this animation is defined in
86
+ // the `styles.scss` file, but in any case we should wait a few
87
+ // milliseconds longer than the duration, otherwise a user may scroll
88
+ // too soon and cause the animation to look sloppy.
140
89
  setTimeout(function () {
141
- window.removeEventListener('scroll', scrollCallback);
142
- // If we don't delay before changing the focus,
143
- // the focus ring will appear on Firefox before
144
- // the image has finished animating, which looks broken.
145
- ctx.lightboxTriggerRef.focus({
90
+ // Delays before changing the focus. Otherwise the focus ring will
91
+ // appear on Firefox before the image has finished animating, which
92
+ // looks broken.
93
+ buttonRef.focus({
146
94
  preventScroll: true
147
95
  });
96
+
97
+ // Resets the current image to mark the overlay as closed.
98
+ state.currentImage = {};
99
+ imageRef = null;
100
+ buttonRef = null;
148
101
  }, 450);
149
- ctx.lightboxEnabled = false;
102
+
103
+ // Starts the overlay closing animation. The showClosingAnimation
104
+ // class is used to avoid showing it on page load.
105
+ state.showClosingAnimation = true;
106
+ state.overlayEnabled = false;
150
107
  }
151
108
  },
152
109
  handleKeydown(event) {
153
- const ctx = getContext();
154
- if (ctx.lightboxEnabled) {
155
- if (event.key === 'Tab' || event.keyCode === 9) {
156
- // If shift + tab it change the direction
157
- if (event.shiftKey && window.document.activeElement === ctx.firstFocusableElement) {
158
- event.preventDefault();
159
- ctx.lastFocusableElement.focus();
160
- } else if (!event.shiftKey && window.document.activeElement === ctx.lastFocusableElement) {
161
- event.preventDefault();
162
- ctx.firstFocusableElement.focus();
163
- }
110
+ if (state.overlayEnabled) {
111
+ // Focuses the close button when the user presses the tab key.
112
+ if (event.key === 'Tab') {
113
+ event.preventDefault();
114
+ const {
115
+ ref
116
+ } = getElement();
117
+ ref.querySelector('button').focus();
164
118
  }
165
- if (event.key === 'Escape' || event.keyCode === 27) {
166
- actions.hideLightbox(event);
119
+ // Closes the lightbox when the user presses the escape key.
120
+ if (event.key === 'Escape') {
121
+ actions.hideLightbox();
167
122
  }
168
123
  }
169
124
  },
170
- // This is fired just by lazily loaded
171
- // images on the page, not all images.
172
- handleLoad() {
173
- const ctx = getContext();
174
- const {
175
- ref
176
- } = getElement();
177
- ctx.imageLoaded = true;
178
- ctx.imageCurrentSrc = ref.currentSrc;
179
- callbacks.setButtonStyles();
180
- },
181
- handleTouchStart() {
182
- isTouching = true;
183
- },
184
125
  handleTouchMove(event) {
185
- const ctx = getContext();
186
- // On mobile devices, we want to prevent triggering the
187
- // scroll event because otherwise the page jumps around as
188
- // we reset the scroll position. This also means that closing
189
- // the lightbox requires that a user perform a simple tap. This
190
- // may be changed in the future if we find a better alternative
191
- // to override or reset the scroll position during swipe actions.
192
- if (ctx.lightboxEnabled) {
126
+ // On mobile devices, prevents triggering the scroll event because
127
+ // otherwise the page jumps around when it resets the scroll position.
128
+ // This also means that closing the lightbox requires that a user
129
+ // perform a simple tap. This may be changed in the future if there is a
130
+ // better alternative to override or reset the scroll position during
131
+ // swipe actions.
132
+ if (state.overlayEnabled) {
193
133
  event.preventDefault();
194
134
  }
195
135
  },
136
+ handleTouchStart() {
137
+ isTouching = true;
138
+ },
196
139
  handleTouchEnd() {
197
- // We need to wait a few milliseconds before resetting
198
- // to ensure that pinch to zoom works consistently
199
- // on mobile devices when the lightbox is open.
140
+ // Waits a few milliseconds before resetting to ensure that pinch to
141
+ // zoom works consistently on mobile devices when the lightbox is open.
200
142
  lastTouchTime = Date.now();
201
143
  isTouching = false;
144
+ },
145
+ handleScroll() {
146
+ // Prevents scrolling behaviors that trigger content shift while the
147
+ // lightbox is open. It would be better to accomplish through CSS alone,
148
+ // but using overflow: hidden is currently the only way to do so and
149
+ // that causes a layout to shift and prevents the zoom animation from
150
+ // working in some cases because it's not possible to account for the
151
+ // layout shift when doing the animation calculations. Instead, it uses
152
+ // JavaScript to prevent and reset the scrolling behavior.
153
+ if (state.overlayOpened) {
154
+ // Avoids overriding the scroll behavior on mobile devices because
155
+ // doing so breaks the pinch to zoom functionality, and users should
156
+ // be able to zoom in further on the high-res image.
157
+ if (!isTouching && Date.now() - lastTouchTime > 450) {
158
+ // It doesn't rely on `event.preventDefault()` to prevent scrolling
159
+ // because the scroll event can't be canceled, so it resets the
160
+ // position instead.
161
+ window.scrollTo(state.scrollLeftReset, state.scrollTopReset);
162
+ }
163
+ }
202
164
  }
203
165
  },
204
166
  callbacks: {
205
- initOriginImage() {
206
- const ctx = getContext();
207
- const {
208
- ref
209
- } = getElement();
210
- ctx.imageRef = ref;
211
- if (ref.complete) {
212
- ctx.imageLoaded = true;
213
- ctx.imageCurrentSrc = ref.currentSrc;
167
+ setOverlayStyles() {
168
+ if (!imageRef) return;
169
+ let {
170
+ naturalWidth,
171
+ naturalHeight,
172
+ offsetWidth: originalWidth,
173
+ offsetHeight: originalHeight
174
+ } = imageRef;
175
+ let {
176
+ x: screenPosX,
177
+ y: screenPosY
178
+ } = imageRef.getBoundingClientRect();
179
+
180
+ // Natural ratio of the image clicked to open the lightbox.
181
+ const naturalRatio = naturalWidth / naturalHeight;
182
+ // Original ratio of the image clicked to open the lightbox.
183
+ let originalRatio = originalWidth / originalHeight;
184
+
185
+ // If it has object-fit: contain, recalculates the original sizes
186
+ // and the screen position without the blank spaces.
187
+ if (state.currentImage.scaleAttr === 'contain') {
188
+ if (naturalRatio > originalRatio) {
189
+ const heightWithoutSpace = originalWidth / naturalRatio;
190
+ // Recalculates screen position without the top space.
191
+ screenPosY += (originalHeight - heightWithoutSpace) / 2;
192
+ originalHeight = heightWithoutSpace;
193
+ } else {
194
+ const widthWithoutSpace = originalHeight * naturalRatio;
195
+ // Recalculates screen position without the left space.
196
+ screenPosX += (originalWidth - widthWithoutSpace) / 2;
197
+ originalWidth = widthWithoutSpace;
198
+ }
214
199
  }
215
- },
216
- initTriggerButton() {
217
- const ctx = getContext();
218
- const {
219
- ref
220
- } = getElement();
221
- ctx.lightboxTriggerRef = ref;
222
- },
223
- initLightbox() {
224
- const ctx = getContext();
225
- const {
226
- ref
227
- } = getElement();
228
- if (ctx.lightboxEnabled) {
229
- const focusableElements = ref.querySelectorAll(focusableSelectors);
230
- ctx.firstFocusableElement = focusableElements[0];
231
- ctx.lastFocusableElement = focusableElements[focusableElements.length - 1];
200
+ originalRatio = originalWidth / originalHeight;
232
201
 
233
- // Move focus to the dialog when opening it.
234
- ref.focus();
202
+ // Typically, it uses the image's full-sized dimensions. If those
203
+ // dimensions have not been set (i.e. an external image with only one
204
+ // size), the image's dimensions in the lightbox are the same
205
+ // as those of the image in the content.
206
+ let imgMaxWidth = parseFloat(state.currentImage.targetWidth !== 'none' ? state.currentImage.targetWidth : naturalWidth);
207
+ let imgMaxHeight = parseFloat(state.currentImage.targetHeight !== 'none' ? state.currentImage.targetHeight : naturalHeight);
208
+
209
+ // Ratio of the biggest image stored in the database.
210
+ let imgRatio = imgMaxWidth / imgMaxHeight;
211
+ let containerMaxWidth = imgMaxWidth;
212
+ let containerMaxHeight = imgMaxHeight;
213
+ let containerWidth = imgMaxWidth;
214
+ let containerHeight = imgMaxHeight;
215
+ // Checks if the target image has a different ratio than the original
216
+ // one (thumbnail). Recalculates the width and height.
217
+ if (naturalRatio.toFixed(2) !== imgRatio.toFixed(2)) {
218
+ if (naturalRatio > imgRatio) {
219
+ // If the width is reached before the height, it keeps the maxWidth
220
+ // and recalculates the height unless the difference between the
221
+ // maxHeight and the reducedHeight is higher than the maxWidth,
222
+ // where it keeps the reducedHeight and recalculate the width.
223
+ const reducedHeight = imgMaxWidth / naturalRatio;
224
+ if (imgMaxHeight - reducedHeight > imgMaxWidth) {
225
+ imgMaxHeight = reducedHeight;
226
+ imgMaxWidth = reducedHeight * naturalRatio;
227
+ } else {
228
+ imgMaxHeight = imgMaxWidth / naturalRatio;
229
+ }
230
+ } else {
231
+ // If the height is reached before the width, it keeps the maxHeight
232
+ // and recalculate the width unlesss the difference between the
233
+ // maxWidth and the reducedWidth is higher than the maxHeight, where
234
+ // it keeps the reducedWidth and recalculate the height.
235
+ const reducedWidth = imgMaxHeight * naturalRatio;
236
+ if (imgMaxWidth - reducedWidth > imgMaxHeight) {
237
+ imgMaxWidth = reducedWidth;
238
+ imgMaxHeight = reducedWidth / naturalRatio;
239
+ } else {
240
+ imgMaxWidth = imgMaxHeight * naturalRatio;
241
+ }
242
+ }
243
+ containerWidth = imgMaxWidth;
244
+ containerHeight = imgMaxHeight;
245
+ imgRatio = imgMaxWidth / imgMaxHeight;
246
+
247
+ // Calculates the max size of the container.
248
+ if (originalRatio > imgRatio) {
249
+ containerMaxWidth = imgMaxWidth;
250
+ containerMaxHeight = containerMaxWidth / originalRatio;
251
+ } else {
252
+ containerMaxHeight = imgMaxHeight;
253
+ containerMaxWidth = containerMaxHeight * originalRatio;
254
+ }
235
255
  }
256
+
257
+ // If the image has been pixelated on purpose, it keeps that size.
258
+ if (originalWidth > containerWidth || originalHeight > containerHeight) {
259
+ containerWidth = originalWidth;
260
+ containerHeight = originalHeight;
261
+ }
262
+
263
+ // Calculates the final lightbox image size and the scale factor.
264
+ // MaxWidth is either the window container (accounting for padding) or
265
+ // the image resolution.
266
+ let horizontalPadding = 0;
267
+ if (window.innerWidth > 480) {
268
+ horizontalPadding = 80;
269
+ } else if (window.innerWidth > 1920) {
270
+ horizontalPadding = 160;
271
+ }
272
+ const verticalPadding = 80;
273
+ const targetMaxWidth = Math.min(window.innerWidth - horizontalPadding, containerWidth);
274
+ const targetMaxHeight = Math.min(window.innerHeight - verticalPadding, containerHeight);
275
+ const targetContainerRatio = targetMaxWidth / targetMaxHeight;
276
+ if (originalRatio > targetContainerRatio) {
277
+ // If targetMaxWidth is reached before targetMaxHeight.
278
+ containerWidth = targetMaxWidth;
279
+ containerHeight = containerWidth / originalRatio;
280
+ } else {
281
+ // If targetMaxHeight is reached before targetMaxWidth.
282
+ containerHeight = targetMaxHeight;
283
+ containerWidth = containerHeight * originalRatio;
284
+ }
285
+ const containerScale = originalWidth / containerWidth;
286
+ const lightboxImgWidth = imgMaxWidth * (containerWidth / containerMaxWidth);
287
+ const lightboxImgHeight = imgMaxHeight * (containerHeight / containerMaxHeight);
288
+
289
+ // As of this writing, using the calculations above will render the
290
+ // lightbox with a small, erroneous whitespace on the left side of the
291
+ // image in iOS Safari, perhaps due to an inconsistency in how browsers
292
+ // handle absolute positioning and CSS transformation. In any case,
293
+ // adding 1 pixel to the container width and height solves the problem,
294
+ // though this can be removed if the issue is fixed in the future.
295
+ state.overlayStyles = `
296
+ :root {
297
+ --wp--lightbox-initial-top-position: ${screenPosY}px;
298
+ --wp--lightbox-initial-left-position: ${screenPosX}px;
299
+ --wp--lightbox-container-width: ${containerWidth + 1}px;
300
+ --wp--lightbox-container-height: ${containerHeight + 1}px;
301
+ --wp--lightbox-image-width: ${lightboxImgWidth}px;
302
+ --wp--lightbox-image-height: ${lightboxImgHeight}px;
303
+ --wp--lightbox-scale: ${containerScale};
304
+ --wp--lightbox-scrollbar-width: ${window.innerWidth - document.documentElement.clientWidth}px;
305
+ }
306
+ `;
236
307
  },
237
308
  setButtonStyles() {
309
+ const ctx = getContext();
238
310
  const {
239
311
  ref
240
312
  } = getElement();
313
+ ctx.imageRef = ref;
241
314
  const {
242
315
  naturalWidth,
243
316
  naturalHeight,
@@ -245,18 +318,17 @@ const {
245
318
  offsetHeight
246
319
  } = ref;
247
320
 
248
- // If the image isn't loaded yet, we can't
249
- // calculate where the button should be.
321
+ // If the image isn't loaded yet, it can't calculate where the button
322
+ // should be.
250
323
  if (naturalWidth === 0 || naturalHeight === 0) {
251
324
  return;
252
325
  }
253
326
  const figure = ref.parentElement;
254
327
  const figureWidth = ref.parentElement.clientWidth;
255
328
 
256
- // We need special handling for the height because
257
- // a caption will cause the figure to be taller than
258
- // the image, which means we need to account for that
259
- // when calculating the placement of the button in the
329
+ // It needs special handling for the height because a caption will cause
330
+ // the figure to be taller than the image, which means it needs to
331
+ // account for that when calculating the placement of the button in the
260
332
  // top right corner of the image.
261
333
  let figureHeight = ref.parentElement.clientHeight;
262
334
  const caption = figure.querySelector('figcaption');
@@ -268,25 +340,24 @@ const {
268
340
  }
269
341
  const buttonOffsetTop = figureHeight - offsetHeight;
270
342
  const buttonOffsetRight = figureWidth - offsetWidth;
271
- const ctx = getContext();
272
343
 
273
- // In the case of an image with object-fit: contain, the
274
- // size of the <img> element can be larger than the image itself,
275
- // so we need to calculate where to place the button.
344
+ // In the case of an image with object-fit: contain, the size of the
345
+ // <img> element can be larger than the image itself, so it needs to
346
+ // calculate where to place the button.
276
347
  if (ctx.scaleAttr === 'contain') {
277
348
  // Natural ratio of the image.
278
349
  const naturalRatio = naturalWidth / naturalHeight;
279
350
  // Offset ratio of the image.
280
351
  const offsetRatio = offsetWidth / offsetHeight;
281
352
  if (naturalRatio >= offsetRatio) {
282
- // If it reaches the width first, keep
283
- // the width and compute the height.
353
+ // If it reaches the width first, it keeps the width and compute the
354
+ // height.
284
355
  const referenceHeight = offsetWidth / naturalRatio;
285
356
  ctx.imageButtonTop = (offsetHeight - referenceHeight) / 2 + buttonOffsetTop + 16;
286
357
  ctx.imageButtonRight = buttonOffsetRight + 16;
287
358
  } else {
288
- // If it reaches the height first, keep
289
- // the height and compute the width.
359
+ // If it reaches the height first, it keeps the height and compute
360
+ // the width.
290
361
  const referenceWidth = offsetHeight * naturalRatio;
291
362
  ctx.imageButtonTop = buttonOffsetTop + 16;
292
363
  ctx.imageButtonRight = (offsetWidth - referenceWidth) / 2 + buttonOffsetRight + 16;
@@ -296,197 +367,24 @@ const {
296
367
  ctx.imageButtonRight = buttonOffsetRight + 16;
297
368
  }
298
369
  },
299
- setStylesOnResize() {
370
+ setOverlayFocus() {
371
+ if (state.overlayEnabled) {
372
+ // Moves the focus to the dialog when it opens.
373
+ const {
374
+ ref
375
+ } = getElement();
376
+ ref.focus();
377
+ }
378
+ },
379
+ initTriggerButton() {
300
380
  const ctx = getContext();
301
381
  const {
302
382
  ref
303
383
  } = getElement();
304
- if (ctx.lightboxEnabled && (state.windowWidth || state.windowHeight)) {
305
- setStyles(ctx, ref);
306
- }
384
+ ctx.buttonRef = ref;
307
385
  }
308
386
  }
387
+ }, {
388
+ lock: true
309
389
  });
310
- window.addEventListener('resize', debounce(() => {
311
- state.windowWidth = window.innerWidth;
312
- state.windowHeight = window.innerHeight;
313
- }));
314
-
315
- /**
316
- * Computes styles for the lightbox and adds them to the document.
317
- *
318
- * @function
319
- * @param {Object} ctx - Context for the `core/image` namespace.
320
- * @param {Object} ref - The element reference.
321
- */
322
- function setStyles(ctx, ref) {
323
- // The reference img element lies adjacent
324
- // to the event target button in the DOM.
325
- let {
326
- naturalWidth,
327
- naturalHeight,
328
- offsetWidth: originalWidth,
329
- offsetHeight: originalHeight
330
- } = ref;
331
- let {
332
- x: screenPosX,
333
- y: screenPosY
334
- } = ref.getBoundingClientRect();
335
-
336
- // Natural ratio of the image clicked to open the lightbox.
337
- const naturalRatio = naturalWidth / naturalHeight;
338
- // Original ratio of the image clicked to open the lightbox.
339
- let originalRatio = originalWidth / originalHeight;
340
-
341
- // If it has object-fit: contain, recalculate the original sizes
342
- // and the screen position without the blank spaces.
343
- if (ctx.scaleAttr === 'contain') {
344
- if (naturalRatio > originalRatio) {
345
- const heightWithoutSpace = originalWidth / naturalRatio;
346
- // Recalculate screen position without the top space.
347
- screenPosY += (originalHeight - heightWithoutSpace) / 2;
348
- originalHeight = heightWithoutSpace;
349
- } else {
350
- const widthWithoutSpace = originalHeight * naturalRatio;
351
- // Recalculate screen position without the left space.
352
- screenPosX += (originalWidth - widthWithoutSpace) / 2;
353
- originalWidth = widthWithoutSpace;
354
- }
355
- }
356
- originalRatio = originalWidth / originalHeight;
357
-
358
- // Typically, we use the image's full-sized dimensions. If those
359
- // dimensions have not been set (i.e. an external image with only one size),
360
- // the image's dimensions in the lightbox are the same
361
- // as those of the image in the content.
362
- let imgMaxWidth = parseFloat(ctx.targetWidth !== 'none' ? ctx.targetWidth : naturalWidth);
363
- let imgMaxHeight = parseFloat(ctx.targetHeight !== 'none' ? ctx.targetHeight : naturalHeight);
364
-
365
- // Ratio of the biggest image stored in the database.
366
- let imgRatio = imgMaxWidth / imgMaxHeight;
367
- let containerMaxWidth = imgMaxWidth;
368
- let containerMaxHeight = imgMaxHeight;
369
- let containerWidth = imgMaxWidth;
370
- let containerHeight = imgMaxHeight;
371
- // Check if the target image has a different ratio than the original one (thumbnail).
372
- // Recalculate the width and height.
373
- if (naturalRatio.toFixed(2) !== imgRatio.toFixed(2)) {
374
- if (naturalRatio > imgRatio) {
375
- // If the width is reached before the height, we keep the maxWidth
376
- // and recalculate the height.
377
- // Unless the difference between the maxHeight and the reducedHeight
378
- // is higher than the maxWidth, where we keep the reducedHeight and
379
- // recalculate the width.
380
- const reducedHeight = imgMaxWidth / naturalRatio;
381
- if (imgMaxHeight - reducedHeight > imgMaxWidth) {
382
- imgMaxHeight = reducedHeight;
383
- imgMaxWidth = reducedHeight * naturalRatio;
384
- } else {
385
- imgMaxHeight = imgMaxWidth / naturalRatio;
386
- }
387
- } else {
388
- // If the height is reached before the width, we keep the maxHeight
389
- // and recalculate the width.
390
- // Unless the difference between the maxWidth and the reducedWidth
391
- // is higher than the maxHeight, where we keep the reducedWidth and
392
- // recalculate the height.
393
- const reducedWidth = imgMaxHeight * naturalRatio;
394
- if (imgMaxWidth - reducedWidth > imgMaxHeight) {
395
- imgMaxWidth = reducedWidth;
396
- imgMaxHeight = reducedWidth / naturalRatio;
397
- } else {
398
- imgMaxWidth = imgMaxHeight * naturalRatio;
399
- }
400
- }
401
- containerWidth = imgMaxWidth;
402
- containerHeight = imgMaxHeight;
403
- imgRatio = imgMaxWidth / imgMaxHeight;
404
-
405
- // Calculate the max size of the container.
406
- if (originalRatio > imgRatio) {
407
- containerMaxWidth = imgMaxWidth;
408
- containerMaxHeight = containerMaxWidth / originalRatio;
409
- } else {
410
- containerMaxHeight = imgMaxHeight;
411
- containerMaxWidth = containerMaxHeight * originalRatio;
412
- }
413
- }
414
-
415
- // If the image has been pixelated on purpose, keep that size.
416
- if (originalWidth > containerWidth || originalHeight > containerHeight) {
417
- containerWidth = originalWidth;
418
- containerHeight = originalHeight;
419
- }
420
-
421
- // Calculate the final lightbox image size and the
422
- // scale factor. MaxWidth is either the window container
423
- // (accounting for padding) or the image resolution.
424
- let horizontalPadding = 0;
425
- if (window.innerWidth > 480) {
426
- horizontalPadding = 80;
427
- } else if (window.innerWidth > 1920) {
428
- horizontalPadding = 160;
429
- }
430
- const verticalPadding = 80;
431
- const targetMaxWidth = Math.min(window.innerWidth - horizontalPadding, containerWidth);
432
- const targetMaxHeight = Math.min(window.innerHeight - verticalPadding, containerHeight);
433
- const targetContainerRatio = targetMaxWidth / targetMaxHeight;
434
- if (originalRatio > targetContainerRatio) {
435
- // If targetMaxWidth is reached before targetMaxHeight
436
- containerWidth = targetMaxWidth;
437
- containerHeight = containerWidth / originalRatio;
438
- } else {
439
- // If targetMaxHeight is reached before targetMaxWidth
440
- containerHeight = targetMaxHeight;
441
- containerWidth = containerHeight * originalRatio;
442
- }
443
- const containerScale = originalWidth / containerWidth;
444
- const lightboxImgWidth = imgMaxWidth * (containerWidth / containerMaxWidth);
445
- const lightboxImgHeight = imgMaxHeight * (containerHeight / containerMaxHeight);
446
-
447
- // Add the CSS variables needed.
448
- let styleTag = document.getElementById('wp-lightbox-styles');
449
- if (!styleTag) {
450
- styleTag = document.createElement('style');
451
- styleTag.id = 'wp-lightbox-styles';
452
- document.head.appendChild(styleTag);
453
- }
454
-
455
- // As of this writing, using the calculations above will render the lightbox
456
- // with a small, erroneous whitespace on the left side of the image in iOS Safari,
457
- // perhaps due to an inconsistency in how browsers handle absolute positioning and CSS
458
- // transformation. In any case, adding 1 pixel to the container width and height solves
459
- // the problem, though this can be removed if the issue is fixed in the future.
460
- styleTag.innerHTML = `
461
- :root {
462
- --wp--lightbox-initial-top-position: ${screenPosY}px;
463
- --wp--lightbox-initial-left-position: ${screenPosX}px;
464
- --wp--lightbox-container-width: ${containerWidth + 1}px;
465
- --wp--lightbox-container-height: ${containerHeight + 1}px;
466
- --wp--lightbox-image-width: ${lightboxImgWidth}px;
467
- --wp--lightbox-image-height: ${lightboxImgHeight}px;
468
- --wp--lightbox-scale: ${containerScale};
469
- --wp--lightbox-scrollbar-width: ${window.innerWidth - document.documentElement.clientWidth}px;
470
- }
471
- `;
472
- }
473
-
474
- /**
475
- * Debounces a function call.
476
- *
477
- * @function
478
- * @param {Function} func - A function to be called
479
- * @param {number} wait - The time to wait before calling the function
480
- */
481
- function debounce(func, wait = 50) {
482
- let timeout;
483
- return () => {
484
- const later = () => {
485
- timeout = null;
486
- func();
487
- };
488
- clearTimeout(timeout);
489
- timeout = setTimeout(later, wait);
490
- };
491
- }
492
390
  //# sourceMappingURL=view.js.map