@wordpress/block-library 8.12.0 → 8.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1306) hide show
  1. package/build/archives/edit.js +2 -1
  2. package/build/archives/edit.js.map +1 -1
  3. package/build/archives/index.js +0 -1
  4. package/build/archives/index.js.map +1 -1
  5. package/build/audio/edit.js +4 -2
  6. package/build/audio/edit.js.map +1 -1
  7. package/build/audio/save.js +2 -1
  8. package/build/audio/save.js.map +1 -1
  9. package/build/avatar/edit.js +6 -3
  10. package/build/avatar/edit.js.map +1 -1
  11. package/build/avatar/index.js +0 -1
  12. package/build/avatar/index.js.map +1 -1
  13. package/build/block/edit.js +8 -4
  14. package/build/block/edit.js.map +1 -1
  15. package/build/block/index.js +1 -1
  16. package/build/button/deprecated.js +20 -15
  17. package/build/button/deprecated.js.map +1 -1
  18. package/build/button/edit.js +2 -4
  19. package/build/button/edit.js.map +1 -1
  20. package/build/button/save.js +4 -3
  21. package/build/button/save.js.map +1 -1
  22. package/build/buttons/deprecated.js +6 -5
  23. package/build/buttons/deprecated.js.map +1 -1
  24. package/build/buttons/edit.js +2 -1
  25. package/build/buttons/edit.js.map +1 -1
  26. package/build/buttons/edit.native.js +6 -6
  27. package/build/buttons/edit.native.js.map +1 -1
  28. package/build/buttons/index.js +1 -1
  29. package/build/buttons/save.js +2 -1
  30. package/build/buttons/save.js.map +1 -1
  31. package/build/buttons/transforms.js +1 -1
  32. package/build/calendar/edit.js +4 -2
  33. package/build/calendar/edit.js.map +1 -1
  34. package/build/calendar/index.js +0 -1
  35. package/build/calendar/index.js.map +1 -1
  36. package/build/categories/edit.js +2 -1
  37. package/build/categories/edit.js.map +1 -1
  38. package/build/categories/index.js +0 -1
  39. package/build/categories/index.js.map +1 -1
  40. package/build/code/edit.js +2 -1
  41. package/build/code/edit.js.map +1 -1
  42. package/build/code/save.js +2 -1
  43. package/build/code/save.js.map +1 -1
  44. package/build/column/edit.js +2 -1
  45. package/build/column/edit.js.map +1 -1
  46. package/build/column/edit.native.js +2 -1
  47. package/build/column/edit.native.js.map +1 -1
  48. package/build/column/index.js +1 -1
  49. package/build/column/save.js +2 -1
  50. package/build/column/save.js.map +1 -1
  51. package/build/columns/edit.js +6 -3
  52. package/build/columns/edit.js.map +1 -1
  53. package/build/columns/edit.native.js +4 -5
  54. package/build/columns/edit.native.js.map +1 -1
  55. package/build/columns/index.js +1 -1
  56. package/build/columns/save.js +2 -1
  57. package/build/columns/save.js.map +1 -1
  58. package/build/comment-author-avatar/edit.js +6 -8
  59. package/build/comment-author-avatar/edit.js.map +1 -1
  60. package/build/comment-author-avatar/index.js +0 -1
  61. package/build/comment-author-avatar/index.js.map +1 -1
  62. package/build/comment-author-name/edit.js +2 -1
  63. package/build/comment-author-name/edit.js.map +1 -1
  64. package/build/comment-author-name/index.js +0 -1
  65. package/build/comment-author-name/index.js.map +1 -1
  66. package/build/comment-content/edit.js +4 -2
  67. package/build/comment-content/edit.js.map +1 -1
  68. package/build/comment-content/index.js +0 -1
  69. package/build/comment-content/index.js.map +1 -1
  70. package/build/comment-date/edit.js +2 -1
  71. package/build/comment-date/edit.js.map +1 -1
  72. package/build/comment-date/index.js +0 -1
  73. package/build/comment-date/index.js.map +1 -1
  74. package/build/comment-edit-link/edit.js +2 -1
  75. package/build/comment-edit-link/edit.js.map +1 -1
  76. package/build/comment-edit-link/index.js +0 -1
  77. package/build/comment-edit-link/index.js.map +1 -1
  78. package/build/comment-reply-link/edit.js +2 -1
  79. package/build/comment-reply-link/edit.js.map +1 -1
  80. package/build/comment-reply-link/index.js +0 -1
  81. package/build/comment-reply-link/index.js.map +1 -1
  82. package/build/comment-template/edit.js +10 -10
  83. package/build/comment-template/edit.js.map +1 -1
  84. package/build/comment-template/index.js +0 -1
  85. package/build/comment-template/index.js.map +1 -1
  86. package/build/comments/deprecated.js +2 -1
  87. package/build/comments/deprecated.js.map +1 -1
  88. package/build/comments/edit/comments-legacy.js +2 -1
  89. package/build/comments/edit/comments-legacy.js.map +1 -1
  90. package/build/comments/edit/index.js +4 -2
  91. package/build/comments/edit/index.js.map +1 -1
  92. package/build/comments/index.js +0 -1
  93. package/build/comments/index.js.map +1 -1
  94. package/build/comments/save.js +2 -1
  95. package/build/comments/save.js.map +1 -1
  96. package/build/comments-pagination/edit.js +2 -1
  97. package/build/comments-pagination/edit.js.map +1 -1
  98. package/build/comments-pagination/index.js +1 -2
  99. package/build/comments-pagination/index.js.map +1 -1
  100. package/build/comments-pagination-next/edit.js +4 -7
  101. package/build/comments-pagination-next/edit.js.map +1 -1
  102. package/build/comments-pagination-next/index.js +0 -1
  103. package/build/comments-pagination-next/index.js.map +1 -1
  104. package/build/comments-pagination-numbers/edit.js +2 -1
  105. package/build/comments-pagination-numbers/edit.js.map +1 -1
  106. package/build/comments-pagination-numbers/index.js +0 -1
  107. package/build/comments-pagination-numbers/index.js.map +1 -1
  108. package/build/comments-pagination-previous/edit.js +4 -7
  109. package/build/comments-pagination-previous/edit.js.map +1 -1
  110. package/build/comments-pagination-previous/index.js +0 -1
  111. package/build/comments-pagination-previous/index.js.map +1 -1
  112. package/build/comments-title/edit.js +4 -9
  113. package/build/comments-title/edit.js.map +1 -1
  114. package/build/cover/deprecated.js +46 -36
  115. package/build/cover/deprecated.js.map +1 -1
  116. package/build/cover/edit/index.js +8 -7
  117. package/build/cover/edit/index.js.map +1 -1
  118. package/build/cover/edit/inspector-controls.js +4 -7
  119. package/build/cover/edit/inspector-controls.js.map +1 -1
  120. package/build/cover/edit/resizable-cover-popover.js +6 -7
  121. package/build/cover/edit/resizable-cover-popover.js.map +1 -1
  122. package/build/cover/edit.native.js +12 -11
  123. package/build/cover/edit.native.js.map +1 -1
  124. package/build/cover/index.js +1 -1
  125. package/build/cover/save.js +9 -7
  126. package/build/cover/save.js.map +1 -1
  127. package/build/cover/transforms.js +2 -2
  128. package/build/cover/transforms.js.map +1 -1
  129. package/build/details/edit.js +3 -7
  130. package/build/details/edit.js.map +1 -1
  131. package/build/details/index.js +1 -1
  132. package/build/details/init.js +16 -0
  133. package/build/details/init.js.map +1 -0
  134. package/build/details/save.js +2 -6
  135. package/build/details/save.js.map +1 -1
  136. package/build/embed/deprecated.js +4 -3
  137. package/build/embed/deprecated.js.map +1 -1
  138. package/build/embed/edit.js +6 -3
  139. package/build/embed/edit.js.map +1 -1
  140. package/build/embed/edit.native.js +6 -3
  141. package/build/embed/edit.native.js.map +1 -1
  142. package/build/embed/save.js +4 -3
  143. package/build/embed/save.js.map +1 -1
  144. package/build/embed/wp-embed-preview.js +4 -7
  145. package/build/embed/wp-embed-preview.js.map +1 -1
  146. package/build/embed/wp-embed-preview.native.js +4 -7
  147. package/build/embed/wp-embed-preview.native.js.map +1 -1
  148. package/build/file/deprecated.js +6 -3
  149. package/build/file/deprecated.js.map +1 -1
  150. package/build/file/edit.js +4 -2
  151. package/build/file/edit.js.map +1 -1
  152. package/build/file/index.js +1 -1
  153. package/build/file/save.js +2 -1
  154. package/build/file/save.js.map +1 -1
  155. package/build/file/view.js +9 -0
  156. package/build/file/view.js.map +1 -0
  157. package/build/footnotes/edit.js +57 -0
  158. package/build/footnotes/edit.js.map +1 -0
  159. package/build/footnotes/format.js +142 -0
  160. package/build/footnotes/format.js.map +1 -0
  161. package/build/footnotes/index.js +67 -0
  162. package/build/footnotes/index.js.map +1 -0
  163. package/build/freeform/edit.js +6 -3
  164. package/build/freeform/edit.js.map +1 -1
  165. package/build/freeform/edit.native.js +2 -4
  166. package/build/freeform/edit.native.js.map +1 -1
  167. package/build/freeform/modal.js +2 -1
  168. package/build/freeform/modal.js.map +1 -1
  169. package/build/gallery/deprecated.js +6 -4
  170. package/build/gallery/deprecated.js.map +1 -1
  171. package/build/gallery/edit-wrapper.js +4 -2
  172. package/build/gallery/edit-wrapper.js.map +1 -1
  173. package/build/gallery/edit.js +16 -13
  174. package/build/gallery/edit.js.map +1 -1
  175. package/build/gallery/gallery.js +2 -4
  176. package/build/gallery/gallery.js.map +1 -1
  177. package/build/gallery/gallery.native.js +3 -2
  178. package/build/gallery/gallery.native.js.map +1 -1
  179. package/build/gallery/index.js +1 -1
  180. package/build/gallery/save.js +2 -1
  181. package/build/gallery/save.js.map +1 -1
  182. package/build/gallery/shared-icon.native.js +4 -5
  183. package/build/gallery/shared-icon.native.js.map +1 -1
  184. package/build/gallery/v1/edit.js +8 -9
  185. package/build/gallery/v1/edit.js.map +1 -1
  186. package/build/gallery/v1/gallery.js +7 -7
  187. package/build/gallery/v1/gallery.js.map +1 -1
  188. package/build/gallery/v1/save.js +4 -3
  189. package/build/gallery/v1/save.js.map +1 -1
  190. package/build/group/deprecated.js +5 -3
  191. package/build/group/deprecated.js.map +1 -1
  192. package/build/group/edit.js +4 -1
  193. package/build/group/edit.js.map +1 -1
  194. package/build/group/index.js +1 -1
  195. package/build/group/placeholder.js +2 -1
  196. package/build/group/placeholder.js.map +1 -1
  197. package/build/group/save.js +2 -1
  198. package/build/group/save.js.map +1 -1
  199. package/build/heading/deprecated.js +8 -6
  200. package/build/heading/deprecated.js.map +1 -1
  201. package/build/heading/edit.js +9 -11
  202. package/build/heading/edit.js.map +1 -1
  203. package/build/heading/save.js +4 -3
  204. package/build/heading/save.js.map +1 -1
  205. package/build/home-link/edit.js +2 -1
  206. package/build/home-link/edit.js.map +1 -1
  207. package/build/home-link/index.js +0 -1
  208. package/build/home-link/index.js.map +1 -1
  209. package/build/html/edit.js +4 -3
  210. package/build/html/edit.js.map +1 -1
  211. package/build/image/deprecated.js +14 -12
  212. package/build/image/deprecated.js.map +1 -1
  213. package/build/image/edit.js +4 -3
  214. package/build/image/edit.js.map +1 -1
  215. package/build/image/edit.native.js +8 -8
  216. package/build/image/edit.native.js.map +1 -1
  217. package/build/image/image.js +16 -9
  218. package/build/image/image.js.map +1 -1
  219. package/build/image/interactivity.js +119 -6
  220. package/build/image/interactivity.js.map +1 -1
  221. package/build/image/save.js +4 -3
  222. package/build/image/save.js.map +1 -1
  223. package/build/index.js +3 -1
  224. package/build/index.js.map +1 -1
  225. package/build/latest-comments/edit.js +2 -1
  226. package/build/latest-comments/edit.js.map +1 -1
  227. package/build/latest-comments/index.js +0 -1
  228. package/build/latest-comments/index.js.map +1 -1
  229. package/build/latest-posts/deprecated.js +0 -1
  230. package/build/latest-posts/deprecated.js.map +1 -1
  231. package/build/latest-posts/edit.js +14 -7
  232. package/build/latest-posts/edit.js.map +1 -1
  233. package/build/latest-posts/edit.native.js +4 -5
  234. package/build/latest-posts/edit.native.js.map +1 -1
  235. package/build/latest-posts/index.js +0 -1
  236. package/build/latest-posts/index.js.map +1 -1
  237. package/build/list/deprecated.js +12 -10
  238. package/build/list/deprecated.js.map +1 -1
  239. package/build/list/edit.js +4 -5
  240. package/build/list/edit.js.map +1 -1
  241. package/build/list/ordered-list-settings.js +25 -1
  242. package/build/list/ordered-list-settings.js.map +1 -1
  243. package/build/list/save.js +6 -5
  244. package/build/list/save.js.map +1 -1
  245. package/build/list/tag-name.js +4 -7
  246. package/build/list/tag-name.js.map +1 -1
  247. package/build/list/tag-name.native.js +4 -7
  248. package/build/list/tag-name.native.js.map +1 -1
  249. package/build/list-item/edit.js +2 -1
  250. package/build/list-item/edit.js.map +1 -1
  251. package/build/list-item/edit.native.js +2 -1
  252. package/build/list-item/edit.native.js.map +1 -1
  253. package/build/list-item/save.js +2 -1
  254. package/build/list-item/save.js.map +1 -1
  255. package/build/{private-apis.js → lock-unlock.js} +1 -1
  256. package/build/lock-unlock.js.map +1 -0
  257. package/build/loginout/edit.js +4 -3
  258. package/build/loginout/edit.js.map +1 -1
  259. package/build/loginout/index.js +0 -1
  260. package/build/loginout/index.js.map +1 -1
  261. package/build/media-text/deprecated.js +43 -33
  262. package/build/media-text/deprecated.js.map +1 -1
  263. package/build/media-text/edit.js +7 -4
  264. package/build/media-text/edit.js.map +1 -1
  265. package/build/media-text/media-container.js +8 -7
  266. package/build/media-text/media-container.js.map +1 -1
  267. package/build/media-text/media-container.native.js +8 -8
  268. package/build/media-text/media-container.native.js.map +1 -1
  269. package/build/media-text/save.js +17 -13
  270. package/build/media-text/save.js.map +1 -1
  271. package/build/missing/edit.js +4 -3
  272. package/build/missing/edit.js.map +1 -1
  273. package/build/more/edit.js +2 -1
  274. package/build/more/edit.js.map +1 -1
  275. package/build/navigation/constants.js +8 -1
  276. package/build/navigation/constants.js.map +1 -1
  277. package/build/navigation/deprecated.js +1 -1
  278. package/build/navigation/deprecated.js.map +1 -1
  279. package/build/navigation/edit/index.js +35 -21
  280. package/build/navigation/edit/index.js.map +1 -1
  281. package/build/navigation/edit/inner-blocks.js +2 -1
  282. package/build/navigation/edit/inner-blocks.js.map +1 -1
  283. package/build/navigation/edit/leaf-more-menu.js +5 -9
  284. package/build/navigation/edit/leaf-more-menu.js.map +1 -1
  285. package/build/navigation/edit/menu-inspector-controls.js +12 -16
  286. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  287. package/build/navigation/edit/navigation-menu-selector.js +15 -7
  288. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  289. package/build/navigation/edit/responsive-wrapper.js +2 -1
  290. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  291. package/build/navigation/edit/unsaved-inner-blocks.js +3 -5
  292. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  293. package/build/navigation/index.js +2 -3
  294. package/build/navigation/index.js.map +1 -1
  295. package/build/navigation/use-navigation-menu.js +9 -7
  296. package/build/navigation/use-navigation-menu.js.map +1 -1
  297. package/build/navigation/view-modal.js +64 -0
  298. package/build/navigation/view-modal.js.map +1 -0
  299. package/build/navigation/view.js +61 -0
  300. package/build/navigation/view.js.map +1 -0
  301. package/build/navigation-link/edit.js +4 -2
  302. package/build/navigation-link/edit.js.map +1 -1
  303. package/build/navigation-submenu/edit.js +4 -2
  304. package/build/navigation-submenu/edit.js.map +1 -1
  305. package/build/nextpage/edit.js +2 -1
  306. package/build/nextpage/edit.js.map +1 -1
  307. package/build/page-list/edit.js +12 -6
  308. package/build/page-list/edit.js.map +1 -1
  309. package/build/page-list/index.js +0 -1
  310. package/build/page-list/index.js.map +1 -1
  311. package/build/page-list-item/edit.js +2 -1
  312. package/build/page-list-item/edit.js.map +1 -1
  313. package/build/paragraph/deprecated.js +5 -4
  314. package/build/paragraph/deprecated.js.map +1 -1
  315. package/build/paragraph/edit.js +4 -6
  316. package/build/paragraph/edit.js.map +1 -1
  317. package/build/paragraph/save.js +5 -4
  318. package/build/paragraph/save.js.map +1 -1
  319. package/build/pattern/edit.js +7 -32
  320. package/build/pattern/edit.js.map +1 -1
  321. package/build/pattern/index.js +3 -11
  322. package/build/pattern/index.js.map +1 -1
  323. package/build/post-author/edit.js +4 -2
  324. package/build/post-author/edit.js.map +1 -1
  325. package/build/post-author/index.js +0 -1
  326. package/build/post-author/index.js.map +1 -1
  327. package/build/post-author-biography/edit.js +2 -4
  328. package/build/post-author-biography/edit.js.map +1 -1
  329. package/build/post-author-biography/index.js +0 -1
  330. package/build/post-author-biography/index.js.map +1 -1
  331. package/build/post-author-name/edit.js +2 -1
  332. package/build/post-author-name/edit.js.map +1 -1
  333. package/build/post-author-name/index.js +0 -1
  334. package/build/post-author-name/index.js.map +1 -1
  335. package/build/post-comment/edit.js +4 -2
  336. package/build/post-comment/edit.js.map +1 -1
  337. package/build/post-comment/save.js +2 -1
  338. package/build/post-comment/save.js.map +1 -1
  339. package/build/post-comments-count/edit.js +2 -4
  340. package/build/post-comments-count/edit.js.map +1 -1
  341. package/build/post-comments-count/index.js +0 -1
  342. package/build/post-comments-count/index.js.map +1 -1
  343. package/build/post-comments-form/edit.js +2 -1
  344. package/build/post-comments-form/edit.js.map +1 -1
  345. package/build/post-comments-form/index.js +0 -1
  346. package/build/post-comments-form/index.js.map +1 -1
  347. package/build/post-comments-link/edit.js +2 -1
  348. package/build/post-comments-link/edit.js.map +1 -1
  349. package/build/post-comments-link/index.js +0 -1
  350. package/build/post-comments-link/index.js.map +1 -1
  351. package/build/post-content/edit.js +11 -10
  352. package/build/post-content/edit.js.map +1 -1
  353. package/build/post-content/index.js +1 -2
  354. package/build/post-content/index.js.map +1 -1
  355. package/build/post-date/edit.js +2 -1
  356. package/build/post-date/edit.js.map +1 -1
  357. package/build/post-date/index.js +0 -1
  358. package/build/post-date/index.js.map +1 -1
  359. package/build/post-excerpt/edit.js +6 -3
  360. package/build/post-excerpt/edit.js.map +1 -1
  361. package/build/post-excerpt/index.js +0 -1
  362. package/build/post-excerpt/index.js.map +1 -1
  363. package/build/post-featured-image/edit.js +4 -2
  364. package/build/post-featured-image/edit.js.map +1 -1
  365. package/build/post-featured-image/index.js +0 -1
  366. package/build/post-featured-image/index.js.map +1 -1
  367. package/build/post-featured-image/overlay.js +4 -5
  368. package/build/post-featured-image/overlay.js.map +1 -1
  369. package/build/post-navigation-link/edit.js +2 -1
  370. package/build/post-navigation-link/edit.js.map +1 -1
  371. package/build/post-navigation-link/index.js +0 -1
  372. package/build/post-navigation-link/index.js.map +1 -1
  373. package/build/post-template/edit.js +14 -9
  374. package/build/post-template/edit.js.map +1 -1
  375. package/build/post-template/index.js +1 -2
  376. package/build/post-template/index.js.map +1 -1
  377. package/build/post-terms/edit.js +4 -8
  378. package/build/post-terms/edit.js.map +1 -1
  379. package/build/post-terms/hooks.js +9 -5
  380. package/build/post-terms/hooks.js.map +1 -1
  381. package/build/post-terms/index.js +0 -1
  382. package/build/post-terms/index.js.map +1 -1
  383. package/build/post-time-to-read/edit.js +2 -1
  384. package/build/post-time-to-read/edit.js.map +1 -1
  385. package/build/post-time-to-read/init.js +16 -0
  386. package/build/post-time-to-read/init.js.map +1 -0
  387. package/build/post-title/edit.js +16 -16
  388. package/build/post-title/edit.js.map +1 -1
  389. package/build/post-title/index.js +0 -1
  390. package/build/post-title/index.js.map +1 -1
  391. package/build/preformatted/edit.js +4 -8
  392. package/build/preformatted/edit.js.map +1 -1
  393. package/build/preformatted/edit.native.js +2 -1
  394. package/build/preformatted/edit.native.js.map +1 -1
  395. package/build/preformatted/save.js +2 -1
  396. package/build/preformatted/save.js.map +1 -1
  397. package/build/pullquote/deprecated.js +10 -8
  398. package/build/pullquote/deprecated.js.map +1 -1
  399. package/build/pullquote/edit.js +2 -1
  400. package/build/pullquote/edit.js.map +1 -1
  401. package/build/pullquote/edit.native.js +2 -1
  402. package/build/pullquote/edit.native.js.map +1 -1
  403. package/build/pullquote/save.js +5 -4
  404. package/build/pullquote/save.js.map +1 -1
  405. package/build/query/deprecated.js +16 -10
  406. package/build/query/deprecated.js.map +1 -1
  407. package/build/query/edit/index.js +2 -4
  408. package/build/query/edit/index.js.map +1 -1
  409. package/build/query/edit/inspector-controls/index.js +4 -3
  410. package/build/query/edit/inspector-controls/index.js.map +1 -1
  411. package/build/query/edit/query-content.js +20 -6
  412. package/build/query/edit/query-content.js.map +1 -1
  413. package/build/query/edit/query-placeholder.js +4 -2
  414. package/build/query/edit/query-placeholder.js.map +1 -1
  415. package/build/query/index.js +1 -2
  416. package/build/query/index.js.map +1 -1
  417. package/build/query/save.js +2 -1
  418. package/build/query/save.js.map +1 -1
  419. package/build/query/utils.js +1 -2
  420. package/build/query/utils.js.map +1 -1
  421. package/build/query-no-results/edit.js +2 -1
  422. package/build/query-no-results/edit.js.map +1 -1
  423. package/build/query-no-results/index.js +0 -1
  424. package/build/query-no-results/index.js.map +1 -1
  425. package/build/query-pagination/deprecated.js +2 -1
  426. package/build/query-pagination/deprecated.js.map +1 -1
  427. package/build/query-pagination/edit.js +2 -1
  428. package/build/query-pagination/edit.js.map +1 -1
  429. package/build/query-pagination/index.js +1 -2
  430. package/build/query-pagination/index.js.map +1 -1
  431. package/build/query-pagination-next/edit.js +4 -7
  432. package/build/query-pagination-next/edit.js.map +1 -1
  433. package/build/query-pagination-next/index.js +0 -1
  434. package/build/query-pagination-next/index.js.map +1 -1
  435. package/build/query-pagination-numbers/edit.js +2 -1
  436. package/build/query-pagination-numbers/edit.js.map +1 -1
  437. package/build/query-pagination-numbers/index.js +0 -1
  438. package/build/query-pagination-numbers/index.js.map +1 -1
  439. package/build/query-pagination-previous/edit.js +4 -7
  440. package/build/query-pagination-previous/edit.js.map +1 -1
  441. package/build/query-pagination-previous/index.js +0 -1
  442. package/build/query-pagination-previous/index.js.map +1 -1
  443. package/build/query-title/edit.js +8 -11
  444. package/build/query-title/edit.js.map +1 -1
  445. package/build/query-title/index.js +0 -1
  446. package/build/query-title/index.js.map +1 -1
  447. package/build/quote/deprecated.js +4 -3
  448. package/build/quote/deprecated.js.map +1 -1
  449. package/build/quote/edit.js +7 -7
  450. package/build/quote/edit.js.map +1 -1
  451. package/build/quote/save.js +4 -3
  452. package/build/quote/save.js.map +1 -1
  453. package/build/read-more/edit.js +4 -7
  454. package/build/read-more/edit.js.map +1 -1
  455. package/build/read-more/index.js +0 -1
  456. package/build/read-more/index.js.map +1 -1
  457. package/build/rss/edit.js +4 -2
  458. package/build/rss/edit.js.map +1 -1
  459. package/build/rss/index.js +0 -1
  460. package/build/rss/index.js.map +1 -1
  461. package/build/search/edit.js +4 -3
  462. package/build/search/edit.js.map +1 -1
  463. package/build/search/edit.native.js +6 -8
  464. package/build/search/edit.native.js.map +1 -1
  465. package/build/search/index.js +0 -1
  466. package/build/search/index.js.map +1 -1
  467. package/build/separator/deprecated.js +5 -4
  468. package/build/separator/deprecated.js.map +1 -1
  469. package/build/separator/edit.js +5 -4
  470. package/build/separator/edit.js.map +1 -1
  471. package/build/separator/save.js +5 -4
  472. package/build/separator/save.js.map +1 -1
  473. package/build/shortcode/edit.js +4 -3
  474. package/build/shortcode/edit.js.map +1 -1
  475. package/build/site-logo/edit.js +10 -10
  476. package/build/site-logo/edit.js.map +1 -1
  477. package/build/site-logo/index.js +0 -1
  478. package/build/site-logo/index.js.map +1 -1
  479. package/build/site-tagline/edit.js +5 -5
  480. package/build/site-tagline/edit.js.map +1 -1
  481. package/build/site-tagline/icon.js +0 -3
  482. package/build/site-tagline/icon.js.map +1 -1
  483. package/build/site-tagline/index.js +0 -1
  484. package/build/site-tagline/index.js.map +1 -1
  485. package/build/site-title/edit/index.js +8 -9
  486. package/build/site-title/edit/index.js.map +1 -1
  487. package/build/site-title/index.js +0 -1
  488. package/build/site-title/index.js.map +1 -1
  489. package/build/social-link/edit.js +2 -1
  490. package/build/social-link/edit.js.map +1 -1
  491. package/build/social-link/index.js +0 -1
  492. package/build/social-link/index.js.map +1 -1
  493. package/build/social-links/deprecated.js +5 -4
  494. package/build/social-links/deprecated.js.map +1 -1
  495. package/build/social-links/edit.js +6 -6
  496. package/build/social-links/edit.js.map +1 -1
  497. package/build/social-links/index.js +1 -1
  498. package/build/social-links/save.js +2 -1
  499. package/build/social-links/save.js.map +1 -1
  500. package/build/spacer/deprecated.js +8 -7
  501. package/build/spacer/deprecated.js.map +1 -1
  502. package/build/spacer/edit.js +10 -10
  503. package/build/spacer/edit.js.map +1 -1
  504. package/build/spacer/edit.native.js +4 -5
  505. package/build/spacer/edit.native.js.map +1 -1
  506. package/build/spacer/save.js +21 -11
  507. package/build/spacer/save.js.map +1 -1
  508. package/build/spacer/save.native.js +8 -7
  509. package/build/spacer/save.native.js.map +1 -1
  510. package/build/table/deprecated.js +4 -2
  511. package/build/table/deprecated.js.map +1 -1
  512. package/build/table/edit.js +6 -4
  513. package/build/table/edit.js.map +1 -1
  514. package/build/table/save.js +2 -1
  515. package/build/table/save.js.map +1 -1
  516. package/build/table-of-contents/edit.js +4 -2
  517. package/build/table-of-contents/edit.js.map +1 -1
  518. package/build/table-of-contents/save.js +2 -1
  519. package/build/table-of-contents/save.js.map +1 -1
  520. package/build/tag-cloud/edit.js +2 -1
  521. package/build/tag-cloud/edit.js.map +1 -1
  522. package/build/tag-cloud/index.js +0 -1
  523. package/build/tag-cloud/index.js.map +1 -1
  524. package/build/template-part/edit/index.js +8 -4
  525. package/build/template-part/edit/index.js.map +1 -1
  526. package/build/template-part/edit/inner-blocks.js +3 -2
  527. package/build/template-part/edit/inner-blocks.js.map +1 -1
  528. package/build/template-part/index.js +0 -1
  529. package/build/template-part/index.js.map +1 -1
  530. package/build/term-description/edit.js +2 -1
  531. package/build/term-description/edit.js.map +1 -1
  532. package/build/term-description/index.js +0 -1
  533. package/build/term-description/index.js.map +1 -1
  534. package/build/text-columns/edit.js +4 -3
  535. package/build/text-columns/edit.js.map +1 -1
  536. package/build/text-columns/save.js +4 -3
  537. package/build/text-columns/save.js.map +1 -1
  538. package/build/utils/interactivity/directives.js +4 -7
  539. package/build/utils/interactivity/directives.js.map +1 -1
  540. package/build/utils/interactivity/index.js +1 -3
  541. package/build/utils/interactivity/index.js.map +1 -1
  542. package/build/utils/migrate-font-family.js +2 -2
  543. package/build/utils/migrate-font-family.js.map +1 -1
  544. package/build/verse/deprecated.js +4 -3
  545. package/build/verse/deprecated.js.map +1 -1
  546. package/build/verse/edit.js +4 -6
  547. package/build/verse/edit.js.map +1 -1
  548. package/build/verse/save.js +4 -3
  549. package/build/verse/save.js.map +1 -1
  550. package/build/video/deprecated.js +2 -1
  551. package/build/video/deprecated.js.map +1 -1
  552. package/build/video/edit.js +4 -2
  553. package/build/video/edit.js.map +1 -1
  554. package/build/video/edit.native.js +8 -8
  555. package/build/video/edit.native.js.map +1 -1
  556. package/build/video/save.js +2 -1
  557. package/build/video/save.js.map +1 -1
  558. package/build/video/tracks.js +4 -7
  559. package/build/video/tracks.js.map +1 -1
  560. package/build-module/archives/edit.js +2 -1
  561. package/build-module/archives/edit.js.map +1 -1
  562. package/build-module/archives/index.js +0 -1
  563. package/build-module/archives/index.js.map +1 -1
  564. package/build-module/audio/edit.js +4 -2
  565. package/build-module/audio/edit.js.map +1 -1
  566. package/build-module/audio/save.js +2 -1
  567. package/build-module/audio/save.js.map +1 -1
  568. package/build-module/avatar/edit.js +6 -3
  569. package/build-module/avatar/edit.js.map +1 -1
  570. package/build-module/avatar/index.js +0 -1
  571. package/build-module/avatar/index.js.map +1 -1
  572. package/build-module/block/edit.js +8 -4
  573. package/build-module/block/edit.js.map +1 -1
  574. package/build-module/block/index.js +1 -1
  575. package/build-module/button/deprecated.js +20 -15
  576. package/build-module/button/deprecated.js.map +1 -1
  577. package/build-module/button/edit.js +2 -3
  578. package/build-module/button/edit.js.map +1 -1
  579. package/build-module/button/save.js +4 -3
  580. package/build-module/button/save.js.map +1 -1
  581. package/build-module/buttons/deprecated.js +6 -5
  582. package/build-module/buttons/deprecated.js.map +1 -1
  583. package/build-module/buttons/edit.js +2 -1
  584. package/build-module/buttons/edit.js.map +1 -1
  585. package/build-module/buttons/edit.native.js +6 -6
  586. package/build-module/buttons/edit.native.js.map +1 -1
  587. package/build-module/buttons/index.js +1 -1
  588. package/build-module/buttons/save.js +2 -1
  589. package/build-module/buttons/save.js.map +1 -1
  590. package/build-module/buttons/transforms.js +1 -1
  591. package/build-module/calendar/edit.js +4 -2
  592. package/build-module/calendar/edit.js.map +1 -1
  593. package/build-module/calendar/index.js +0 -1
  594. package/build-module/calendar/index.js.map +1 -1
  595. package/build-module/categories/edit.js +2 -1
  596. package/build-module/categories/edit.js.map +1 -1
  597. package/build-module/categories/index.js +0 -1
  598. package/build-module/categories/index.js.map +1 -1
  599. package/build-module/code/edit.js +2 -1
  600. package/build-module/code/edit.js.map +1 -1
  601. package/build-module/code/save.js +2 -1
  602. package/build-module/code/save.js.map +1 -1
  603. package/build-module/column/edit.js +2 -1
  604. package/build-module/column/edit.js.map +1 -1
  605. package/build-module/column/edit.native.js +2 -1
  606. package/build-module/column/edit.native.js.map +1 -1
  607. package/build-module/column/index.js +1 -1
  608. package/build-module/column/save.js +2 -1
  609. package/build-module/column/save.js.map +1 -1
  610. package/build-module/columns/edit.js +6 -3
  611. package/build-module/columns/edit.js.map +1 -1
  612. package/build-module/columns/edit.native.js +4 -4
  613. package/build-module/columns/edit.native.js.map +1 -1
  614. package/build-module/columns/index.js +1 -1
  615. package/build-module/columns/save.js +2 -1
  616. package/build-module/columns/save.js.map +1 -1
  617. package/build-module/comment-author-avatar/edit.js +6 -5
  618. package/build-module/comment-author-avatar/edit.js.map +1 -1
  619. package/build-module/comment-author-avatar/index.js +0 -1
  620. package/build-module/comment-author-avatar/index.js.map +1 -1
  621. package/build-module/comment-author-name/edit.js +2 -1
  622. package/build-module/comment-author-name/edit.js.map +1 -1
  623. package/build-module/comment-author-name/index.js +0 -1
  624. package/build-module/comment-author-name/index.js.map +1 -1
  625. package/build-module/comment-content/edit.js +4 -2
  626. package/build-module/comment-content/edit.js.map +1 -1
  627. package/build-module/comment-content/index.js +0 -1
  628. package/build-module/comment-content/index.js.map +1 -1
  629. package/build-module/comment-date/edit.js +2 -1
  630. package/build-module/comment-date/edit.js.map +1 -1
  631. package/build-module/comment-date/index.js +0 -1
  632. package/build-module/comment-date/index.js.map +1 -1
  633. package/build-module/comment-edit-link/edit.js +2 -1
  634. package/build-module/comment-edit-link/edit.js.map +1 -1
  635. package/build-module/comment-edit-link/index.js +0 -1
  636. package/build-module/comment-edit-link/index.js.map +1 -1
  637. package/build-module/comment-reply-link/edit.js +2 -1
  638. package/build-module/comment-reply-link/edit.js.map +1 -1
  639. package/build-module/comment-reply-link/index.js +0 -1
  640. package/build-module/comment-reply-link/index.js.map +1 -1
  641. package/build-module/comment-template/edit.js +10 -7
  642. package/build-module/comment-template/edit.js.map +1 -1
  643. package/build-module/comment-template/index.js +0 -1
  644. package/build-module/comment-template/index.js.map +1 -1
  645. package/build-module/comments/deprecated.js +2 -1
  646. package/build-module/comments/deprecated.js.map +1 -1
  647. package/build-module/comments/edit/comments-legacy.js +2 -1
  648. package/build-module/comments/edit/comments-legacy.js.map +1 -1
  649. package/build-module/comments/edit/index.js +4 -2
  650. package/build-module/comments/edit/index.js.map +1 -1
  651. package/build-module/comments/index.js +0 -1
  652. package/build-module/comments/index.js.map +1 -1
  653. package/build-module/comments/save.js +2 -1
  654. package/build-module/comments/save.js.map +1 -1
  655. package/build-module/comments-pagination/edit.js +2 -1
  656. package/build-module/comments-pagination/edit.js.map +1 -1
  657. package/build-module/comments-pagination/index.js +1 -2
  658. package/build-module/comments-pagination/index.js.map +1 -1
  659. package/build-module/comments-pagination-next/edit.js +4 -4
  660. package/build-module/comments-pagination-next/edit.js.map +1 -1
  661. package/build-module/comments-pagination-next/index.js +0 -1
  662. package/build-module/comments-pagination-next/index.js.map +1 -1
  663. package/build-module/comments-pagination-numbers/edit.js +2 -1
  664. package/build-module/comments-pagination-numbers/edit.js.map +1 -1
  665. package/build-module/comments-pagination-numbers/index.js +0 -1
  666. package/build-module/comments-pagination-numbers/index.js.map +1 -1
  667. package/build-module/comments-pagination-previous/edit.js +4 -4
  668. package/build-module/comments-pagination-previous/edit.js.map +1 -1
  669. package/build-module/comments-pagination-previous/index.js +0 -1
  670. package/build-module/comments-pagination-previous/index.js.map +1 -1
  671. package/build-module/comments-title/edit.js +4 -8
  672. package/build-module/comments-title/edit.js.map +1 -1
  673. package/build-module/cover/deprecated.js +46 -36
  674. package/build-module/cover/deprecated.js.map +1 -1
  675. package/build-module/cover/edit/index.js +8 -6
  676. package/build-module/cover/edit/index.js.map +1 -1
  677. package/build-module/cover/edit/inspector-controls.js +4 -4
  678. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  679. package/build-module/cover/edit/resizable-cover-popover.js +5 -5
  680. package/build-module/cover/edit/resizable-cover-popover.js.map +1 -1
  681. package/build-module/cover/edit.native.js +12 -10
  682. package/build-module/cover/edit.native.js.map +1 -1
  683. package/build-module/cover/index.js +1 -1
  684. package/build-module/cover/save.js +9 -7
  685. package/build-module/cover/save.js.map +1 -1
  686. package/build-module/cover/transforms.js +1 -1
  687. package/build-module/cover/transforms.js.map +1 -1
  688. package/build-module/details/edit.js +3 -4
  689. package/build-module/details/edit.js.map +1 -1
  690. package/build-module/details/index.js +1 -1
  691. package/build-module/details/init.js +6 -0
  692. package/build-module/details/init.js.map +1 -0
  693. package/build-module/details/save.js +2 -3
  694. package/build-module/details/save.js.map +1 -1
  695. package/build-module/embed/deprecated.js +4 -3
  696. package/build-module/embed/deprecated.js.map +1 -1
  697. package/build-module/embed/edit.js +6 -3
  698. package/build-module/embed/edit.js.map +1 -1
  699. package/build-module/embed/edit.native.js +6 -3
  700. package/build-module/embed/edit.native.js.map +1 -1
  701. package/build-module/embed/save.js +4 -3
  702. package/build-module/embed/save.js.map +1 -1
  703. package/build-module/embed/wp-embed-preview.js +4 -4
  704. package/build-module/embed/wp-embed-preview.js.map +1 -1
  705. package/build-module/embed/wp-embed-preview.native.js +4 -4
  706. package/build-module/embed/wp-embed-preview.native.js.map +1 -1
  707. package/build-module/file/deprecated.js +6 -3
  708. package/build-module/file/deprecated.js.map +1 -1
  709. package/build-module/file/edit.js +4 -2
  710. package/build-module/file/edit.js.map +1 -1
  711. package/build-module/file/index.js +1 -1
  712. package/build-module/file/save.js +2 -1
  713. package/build-module/file/save.js.map +1 -1
  714. package/build-module/file/view.js +6 -0
  715. package/build-module/file/view.js.map +1 -0
  716. package/build-module/footnotes/edit.js +48 -0
  717. package/build-module/footnotes/edit.js.map +1 -0
  718. package/build-module/footnotes/format.js +126 -0
  719. package/build-module/footnotes/format.js.map +1 -0
  720. package/build-module/footnotes/index.js +48 -0
  721. package/build-module/footnotes/index.js.map +1 -0
  722. package/build-module/freeform/edit.js +6 -3
  723. package/build-module/freeform/edit.js.map +1 -1
  724. package/build-module/freeform/edit.native.js +2 -3
  725. package/build-module/freeform/edit.native.js.map +1 -1
  726. package/build-module/freeform/modal.js +2 -1
  727. package/build-module/freeform/modal.js.map +1 -1
  728. package/build-module/gallery/deprecated.js +6 -4
  729. package/build-module/gallery/deprecated.js.map +1 -1
  730. package/build-module/gallery/edit-wrapper.js +4 -2
  731. package/build-module/gallery/edit-wrapper.js.map +1 -1
  732. package/build-module/gallery/edit.js +16 -12
  733. package/build-module/gallery/edit.js.map +1 -1
  734. package/build-module/gallery/gallery.js +2 -3
  735. package/build-module/gallery/gallery.js.map +1 -1
  736. package/build-module/gallery/gallery.native.js +3 -2
  737. package/build-module/gallery/gallery.native.js.map +1 -1
  738. package/build-module/gallery/index.js +1 -1
  739. package/build-module/gallery/save.js +2 -1
  740. package/build-module/gallery/save.js.map +1 -1
  741. package/build-module/gallery/shared-icon.native.js +4 -4
  742. package/build-module/gallery/shared-icon.native.js.map +1 -1
  743. package/build-module/gallery/v1/edit.js +8 -8
  744. package/build-module/gallery/v1/edit.js.map +1 -1
  745. package/build-module/gallery/v1/gallery.js +7 -6
  746. package/build-module/gallery/v1/gallery.js.map +1 -1
  747. package/build-module/gallery/v1/save.js +4 -3
  748. package/build-module/gallery/v1/save.js.map +1 -1
  749. package/build-module/group/deprecated.js +5 -3
  750. package/build-module/group/deprecated.js.map +1 -1
  751. package/build-module/group/edit.js +4 -1
  752. package/build-module/group/edit.js.map +1 -1
  753. package/build-module/group/index.js +1 -1
  754. package/build-module/group/placeholder.js +2 -1
  755. package/build-module/group/placeholder.js.map +1 -1
  756. package/build-module/group/save.js +2 -1
  757. package/build-module/group/save.js.map +1 -1
  758. package/build-module/heading/deprecated.js +8 -6
  759. package/build-module/heading/deprecated.js.map +1 -1
  760. package/build-module/heading/edit.js +9 -9
  761. package/build-module/heading/edit.js.map +1 -1
  762. package/build-module/heading/save.js +4 -3
  763. package/build-module/heading/save.js.map +1 -1
  764. package/build-module/home-link/edit.js +2 -1
  765. package/build-module/home-link/edit.js.map +1 -1
  766. package/build-module/home-link/index.js +0 -1
  767. package/build-module/home-link/index.js.map +1 -1
  768. package/build-module/html/edit.js +4 -3
  769. package/build-module/html/edit.js.map +1 -1
  770. package/build-module/image/deprecated.js +14 -11
  771. package/build-module/image/deprecated.js.map +1 -1
  772. package/build-module/image/edit.js +3 -2
  773. package/build-module/image/edit.js.map +1 -1
  774. package/build-module/image/edit.native.js +8 -7
  775. package/build-module/image/edit.native.js.map +1 -1
  776. package/build-module/image/image.js +17 -10
  777. package/build-module/image/image.js.map +1 -1
  778. package/build-module/image/interactivity.js +119 -6
  779. package/build-module/image/interactivity.js.map +1 -1
  780. package/build-module/image/save.js +4 -3
  781. package/build-module/image/save.js.map +1 -1
  782. package/build-module/index.js +2 -1
  783. package/build-module/index.js.map +1 -1
  784. package/build-module/latest-comments/edit.js +2 -1
  785. package/build-module/latest-comments/edit.js.map +1 -1
  786. package/build-module/latest-comments/index.js +0 -1
  787. package/build-module/latest-comments/index.js.map +1 -1
  788. package/build-module/latest-posts/deprecated.js +0 -1
  789. package/build-module/latest-posts/deprecated.js.map +1 -1
  790. package/build-module/latest-posts/edit.js +15 -7
  791. package/build-module/latest-posts/edit.js.map +1 -1
  792. package/build-module/latest-posts/edit.native.js +4 -4
  793. package/build-module/latest-posts/edit.native.js.map +1 -1
  794. package/build-module/latest-posts/index.js +0 -1
  795. package/build-module/latest-posts/index.js.map +1 -1
  796. package/build-module/list/deprecated.js +12 -10
  797. package/build-module/list/deprecated.js.map +1 -1
  798. package/build-module/list/edit.js +4 -4
  799. package/build-module/list/edit.js.map +1 -1
  800. package/build-module/list/ordered-list-settings.js +26 -2
  801. package/build-module/list/ordered-list-settings.js.map +1 -1
  802. package/build-module/list/save.js +6 -5
  803. package/build-module/list/save.js.map +1 -1
  804. package/build-module/list/tag-name.js +4 -4
  805. package/build-module/list/tag-name.js.map +1 -1
  806. package/build-module/list/tag-name.native.js +4 -4
  807. package/build-module/list/tag-name.native.js.map +1 -1
  808. package/build-module/list-item/edit.js +2 -1
  809. package/build-module/list-item/edit.js.map +1 -1
  810. package/build-module/list-item/edit.native.js +2 -1
  811. package/build-module/list-item/edit.native.js.map +1 -1
  812. package/build-module/list-item/save.js +2 -1
  813. package/build-module/list-item/save.js.map +1 -1
  814. package/build-module/{private-apis.js → lock-unlock.js} +1 -1
  815. package/build-module/lock-unlock.js.map +1 -0
  816. package/build-module/loginout/edit.js +4 -3
  817. package/build-module/loginout/edit.js.map +1 -1
  818. package/build-module/loginout/index.js +0 -1
  819. package/build-module/loginout/index.js.map +1 -1
  820. package/build-module/media-text/deprecated.js +43 -33
  821. package/build-module/media-text/deprecated.js.map +1 -1
  822. package/build-module/media-text/edit.js +6 -3
  823. package/build-module/media-text/edit.js.map +1 -1
  824. package/build-module/media-text/media-container.js +8 -6
  825. package/build-module/media-text/media-container.js.map +1 -1
  826. package/build-module/media-text/media-container.native.js +8 -7
  827. package/build-module/media-text/media-container.native.js.map +1 -1
  828. package/build-module/media-text/save.js +17 -13
  829. package/build-module/media-text/save.js.map +1 -1
  830. package/build-module/missing/edit.js +4 -3
  831. package/build-module/missing/edit.js.map +1 -1
  832. package/build-module/more/edit.js +2 -1
  833. package/build-module/more/edit.js.map +1 -1
  834. package/build-module/navigation/constants.js +6 -0
  835. package/build-module/navigation/constants.js.map +1 -1
  836. package/build-module/navigation/deprecated.js +1 -1
  837. package/build-module/navigation/deprecated.js.map +1 -1
  838. package/build-module/navigation/edit/index.js +34 -21
  839. package/build-module/navigation/edit/index.js.map +1 -1
  840. package/build-module/navigation/edit/inner-blocks.js +2 -1
  841. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  842. package/build-module/navigation/edit/leaf-more-menu.js +5 -6
  843. package/build-module/navigation/edit/leaf-more-menu.js.map +1 -1
  844. package/build-module/navigation/edit/menu-inspector-controls.js +12 -16
  845. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  846. package/build-module/navigation/edit/navigation-menu-selector.js +15 -7
  847. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  848. package/build-module/navigation/edit/responsive-wrapper.js +2 -1
  849. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  850. package/build-module/navigation/edit/unsaved-inner-blocks.js +4 -6
  851. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  852. package/build-module/navigation/index.js +2 -3
  853. package/build-module/navigation/index.js.map +1 -1
  854. package/build-module/navigation/use-navigation-menu.js +8 -7
  855. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  856. package/build-module/navigation/view-modal.js +58 -0
  857. package/build-module/navigation/view-modal.js.map +1 -0
  858. package/build-module/navigation/view.js +59 -0
  859. package/build-module/navigation/view.js.map +1 -0
  860. package/build-module/navigation-link/edit.js +4 -2
  861. package/build-module/navigation-link/edit.js.map +1 -1
  862. package/build-module/navigation-submenu/edit.js +4 -2
  863. package/build-module/navigation-submenu/edit.js.map +1 -1
  864. package/build-module/nextpage/edit.js +2 -1
  865. package/build-module/nextpage/edit.js.map +1 -1
  866. package/build-module/page-list/edit.js +12 -6
  867. package/build-module/page-list/edit.js.map +1 -1
  868. package/build-module/page-list/index.js +0 -1
  869. package/build-module/page-list/index.js.map +1 -1
  870. package/build-module/page-list-item/edit.js +2 -1
  871. package/build-module/page-list-item/edit.js.map +1 -1
  872. package/build-module/paragraph/deprecated.js +5 -4
  873. package/build-module/paragraph/deprecated.js.map +1 -1
  874. package/build-module/paragraph/edit.js +4 -5
  875. package/build-module/paragraph/edit.js.map +1 -1
  876. package/build-module/paragraph/save.js +5 -4
  877. package/build-module/paragraph/save.js.map +1 -1
  878. package/build-module/pattern/edit.js +8 -33
  879. package/build-module/pattern/edit.js.map +1 -1
  880. package/build-module/pattern/index.js +4 -11
  881. package/build-module/pattern/index.js.map +1 -1
  882. package/build-module/post-author/edit.js +4 -2
  883. package/build-module/post-author/edit.js.map +1 -1
  884. package/build-module/post-author/index.js +0 -1
  885. package/build-module/post-author/index.js.map +1 -1
  886. package/build-module/post-author-biography/edit.js +2 -3
  887. package/build-module/post-author-biography/edit.js.map +1 -1
  888. package/build-module/post-author-biography/index.js +0 -1
  889. package/build-module/post-author-biography/index.js.map +1 -1
  890. package/build-module/post-author-name/edit.js +2 -1
  891. package/build-module/post-author-name/edit.js.map +1 -1
  892. package/build-module/post-author-name/index.js +0 -1
  893. package/build-module/post-author-name/index.js.map +1 -1
  894. package/build-module/post-comment/edit.js +4 -2
  895. package/build-module/post-comment/edit.js.map +1 -1
  896. package/build-module/post-comment/save.js +2 -1
  897. package/build-module/post-comment/save.js.map +1 -1
  898. package/build-module/post-comments-count/edit.js +2 -3
  899. package/build-module/post-comments-count/edit.js.map +1 -1
  900. package/build-module/post-comments-count/index.js +0 -1
  901. package/build-module/post-comments-count/index.js.map +1 -1
  902. package/build-module/post-comments-form/edit.js +2 -1
  903. package/build-module/post-comments-form/edit.js.map +1 -1
  904. package/build-module/post-comments-form/index.js +0 -1
  905. package/build-module/post-comments-form/index.js.map +1 -1
  906. package/build-module/post-comments-link/edit.js +2 -1
  907. package/build-module/post-comments-link/edit.js.map +1 -1
  908. package/build-module/post-comments-link/index.js +0 -1
  909. package/build-module/post-comments-link/index.js.map +1 -1
  910. package/build-module/post-content/edit.js +11 -7
  911. package/build-module/post-content/edit.js.map +1 -1
  912. package/build-module/post-content/index.js +1 -2
  913. package/build-module/post-content/index.js.map +1 -1
  914. package/build-module/post-date/edit.js +2 -1
  915. package/build-module/post-date/edit.js.map +1 -1
  916. package/build-module/post-date/index.js +0 -1
  917. package/build-module/post-date/index.js.map +1 -1
  918. package/build-module/post-excerpt/edit.js +6 -3
  919. package/build-module/post-excerpt/edit.js.map +1 -1
  920. package/build-module/post-excerpt/index.js +0 -1
  921. package/build-module/post-excerpt/index.js.map +1 -1
  922. package/build-module/post-featured-image/edit.js +4 -2
  923. package/build-module/post-featured-image/edit.js.map +1 -1
  924. package/build-module/post-featured-image/index.js +0 -1
  925. package/build-module/post-featured-image/index.js.map +1 -1
  926. package/build-module/post-featured-image/overlay.js +4 -4
  927. package/build-module/post-featured-image/overlay.js.map +1 -1
  928. package/build-module/post-navigation-link/edit.js +2 -1
  929. package/build-module/post-navigation-link/edit.js.map +1 -1
  930. package/build-module/post-navigation-link/index.js +0 -1
  931. package/build-module/post-navigation-link/index.js.map +1 -1
  932. package/build-module/post-template/edit.js +14 -8
  933. package/build-module/post-template/edit.js.map +1 -1
  934. package/build-module/post-template/index.js +1 -2
  935. package/build-module/post-template/index.js.map +1 -1
  936. package/build-module/post-terms/edit.js +4 -8
  937. package/build-module/post-terms/edit.js.map +1 -1
  938. package/build-module/post-terms/hooks.js +9 -5
  939. package/build-module/post-terms/hooks.js.map +1 -1
  940. package/build-module/post-terms/index.js +0 -1
  941. package/build-module/post-terms/index.js.map +1 -1
  942. package/build-module/post-time-to-read/edit.js +2 -1
  943. package/build-module/post-time-to-read/edit.js.map +1 -1
  944. package/build-module/post-time-to-read/init.js +6 -0
  945. package/build-module/post-time-to-read/init.js.map +1 -0
  946. package/build-module/post-title/edit.js +15 -13
  947. package/build-module/post-title/edit.js.map +1 -1
  948. package/build-module/post-title/index.js +0 -1
  949. package/build-module/post-title/index.js.map +1 -1
  950. package/build-module/preformatted/edit.js +4 -5
  951. package/build-module/preformatted/edit.js.map +1 -1
  952. package/build-module/preformatted/edit.native.js +2 -1
  953. package/build-module/preformatted/edit.native.js.map +1 -1
  954. package/build-module/preformatted/save.js +2 -1
  955. package/build-module/preformatted/save.js.map +1 -1
  956. package/build-module/pullquote/deprecated.js +10 -8
  957. package/build-module/pullquote/deprecated.js.map +1 -1
  958. package/build-module/pullquote/edit.js +2 -1
  959. package/build-module/pullquote/edit.js.map +1 -1
  960. package/build-module/pullquote/edit.native.js +2 -1
  961. package/build-module/pullquote/edit.native.js.map +1 -1
  962. package/build-module/pullquote/save.js +5 -4
  963. package/build-module/pullquote/save.js.map +1 -1
  964. package/build-module/query/deprecated.js +15 -9
  965. package/build-module/query/deprecated.js.map +1 -1
  966. package/build-module/query/edit/index.js +2 -3
  967. package/build-module/query/edit/index.js.map +1 -1
  968. package/build-module/query/edit/inspector-controls/index.js +3 -2
  969. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  970. package/build-module/query/edit/query-content.js +19 -6
  971. package/build-module/query/edit/query-content.js.map +1 -1
  972. package/build-module/query/edit/query-placeholder.js +4 -2
  973. package/build-module/query/edit/query-placeholder.js.map +1 -1
  974. package/build-module/query/index.js +1 -2
  975. package/build-module/query/index.js.map +1 -1
  976. package/build-module/query/save.js +2 -1
  977. package/build-module/query/save.js.map +1 -1
  978. package/build-module/query/utils.js +1 -2
  979. package/build-module/query/utils.js.map +1 -1
  980. package/build-module/query-no-results/edit.js +2 -1
  981. package/build-module/query-no-results/edit.js.map +1 -1
  982. package/build-module/query-no-results/index.js +0 -1
  983. package/build-module/query-no-results/index.js.map +1 -1
  984. package/build-module/query-pagination/deprecated.js +2 -1
  985. package/build-module/query-pagination/deprecated.js.map +1 -1
  986. package/build-module/query-pagination/edit.js +2 -1
  987. package/build-module/query-pagination/edit.js.map +1 -1
  988. package/build-module/query-pagination/index.js +1 -2
  989. package/build-module/query-pagination/index.js.map +1 -1
  990. package/build-module/query-pagination-next/edit.js +4 -4
  991. package/build-module/query-pagination-next/edit.js.map +1 -1
  992. package/build-module/query-pagination-next/index.js +0 -1
  993. package/build-module/query-pagination-next/index.js.map +1 -1
  994. package/build-module/query-pagination-numbers/edit.js +2 -1
  995. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  996. package/build-module/query-pagination-numbers/index.js +0 -1
  997. package/build-module/query-pagination-numbers/index.js.map +1 -1
  998. package/build-module/query-pagination-previous/edit.js +4 -4
  999. package/build-module/query-pagination-previous/edit.js.map +1 -1
  1000. package/build-module/query-pagination-previous/index.js +0 -1
  1001. package/build-module/query-pagination-previous/index.js.map +1 -1
  1002. package/build-module/query-title/edit.js +8 -10
  1003. package/build-module/query-title/edit.js.map +1 -1
  1004. package/build-module/query-title/index.js +0 -1
  1005. package/build-module/query-title/index.js.map +1 -1
  1006. package/build-module/quote/deprecated.js +4 -3
  1007. package/build-module/quote/deprecated.js.map +1 -1
  1008. package/build-module/quote/edit.js +7 -6
  1009. package/build-module/quote/edit.js.map +1 -1
  1010. package/build-module/quote/save.js +4 -3
  1011. package/build-module/quote/save.js.map +1 -1
  1012. package/build-module/read-more/edit.js +4 -4
  1013. package/build-module/read-more/edit.js.map +1 -1
  1014. package/build-module/read-more/index.js +0 -1
  1015. package/build-module/read-more/index.js.map +1 -1
  1016. package/build-module/rss/edit.js +4 -2
  1017. package/build-module/rss/edit.js.map +1 -1
  1018. package/build-module/rss/index.js +0 -1
  1019. package/build-module/rss/index.js.map +1 -1
  1020. package/build-module/search/edit.js +4 -3
  1021. package/build-module/search/edit.js.map +1 -1
  1022. package/build-module/search/edit.native.js +6 -7
  1023. package/build-module/search/edit.native.js.map +1 -1
  1024. package/build-module/search/index.js +0 -1
  1025. package/build-module/search/index.js.map +1 -1
  1026. package/build-module/separator/deprecated.js +5 -4
  1027. package/build-module/separator/deprecated.js.map +1 -1
  1028. package/build-module/separator/edit.js +5 -4
  1029. package/build-module/separator/edit.js.map +1 -1
  1030. package/build-module/separator/save.js +5 -4
  1031. package/build-module/separator/save.js.map +1 -1
  1032. package/build-module/shortcode/edit.js +4 -3
  1033. package/build-module/shortcode/edit.js.map +1 -1
  1034. package/build-module/site-logo/edit.js +10 -9
  1035. package/build-module/site-logo/edit.js.map +1 -1
  1036. package/build-module/site-logo/index.js +0 -1
  1037. package/build-module/site-logo/index.js.map +1 -1
  1038. package/build-module/site-tagline/edit.js +5 -4
  1039. package/build-module/site-tagline/edit.js.map +1 -1
  1040. package/build-module/site-tagline/icon.js +0 -3
  1041. package/build-module/site-tagline/icon.js.map +1 -1
  1042. package/build-module/site-tagline/index.js +0 -1
  1043. package/build-module/site-tagline/index.js.map +1 -1
  1044. package/build-module/site-title/edit/index.js +9 -10
  1045. package/build-module/site-title/edit/index.js.map +1 -1
  1046. package/build-module/site-title/index.js +0 -1
  1047. package/build-module/site-title/index.js.map +1 -1
  1048. package/build-module/social-link/edit.js +2 -1
  1049. package/build-module/social-link/edit.js.map +1 -1
  1050. package/build-module/social-link/index.js +0 -1
  1051. package/build-module/social-link/index.js.map +1 -1
  1052. package/build-module/social-links/deprecated.js +5 -4
  1053. package/build-module/social-links/deprecated.js.map +1 -1
  1054. package/build-module/social-links/edit.js +6 -5
  1055. package/build-module/social-links/edit.js.map +1 -1
  1056. package/build-module/social-links/index.js +1 -1
  1057. package/build-module/social-links/save.js +2 -1
  1058. package/build-module/social-links/save.js.map +1 -1
  1059. package/build-module/spacer/deprecated.js +8 -7
  1060. package/build-module/spacer/deprecated.js.map +1 -1
  1061. package/build-module/spacer/edit.js +10 -9
  1062. package/build-module/spacer/edit.js.map +1 -1
  1063. package/build-module/spacer/edit.native.js +4 -4
  1064. package/build-module/spacer/edit.native.js.map +1 -1
  1065. package/build-module/spacer/save.js +21 -11
  1066. package/build-module/spacer/save.js.map +1 -1
  1067. package/build-module/spacer/save.native.js +8 -7
  1068. package/build-module/spacer/save.native.js.map +1 -1
  1069. package/build-module/table/deprecated.js +4 -2
  1070. package/build-module/table/deprecated.js.map +1 -1
  1071. package/build-module/table/edit.js +6 -4
  1072. package/build-module/table/edit.js.map +1 -1
  1073. package/build-module/table/save.js +2 -1
  1074. package/build-module/table/save.js.map +1 -1
  1075. package/build-module/table-of-contents/edit.js +4 -2
  1076. package/build-module/table-of-contents/edit.js.map +1 -1
  1077. package/build-module/table-of-contents/save.js +2 -1
  1078. package/build-module/table-of-contents/save.js.map +1 -1
  1079. package/build-module/tag-cloud/edit.js +2 -1
  1080. package/build-module/tag-cloud/edit.js.map +1 -1
  1081. package/build-module/tag-cloud/index.js +0 -1
  1082. package/build-module/tag-cloud/index.js.map +1 -1
  1083. package/build-module/template-part/edit/index.js +8 -4
  1084. package/build-module/template-part/edit/index.js.map +1 -1
  1085. package/build-module/template-part/edit/inner-blocks.js +3 -2
  1086. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  1087. package/build-module/template-part/index.js +0 -1
  1088. package/build-module/template-part/index.js.map +1 -1
  1089. package/build-module/term-description/edit.js +2 -1
  1090. package/build-module/term-description/edit.js.map +1 -1
  1091. package/build-module/term-description/index.js +0 -1
  1092. package/build-module/term-description/index.js.map +1 -1
  1093. package/build-module/text-columns/edit.js +4 -3
  1094. package/build-module/text-columns/edit.js.map +1 -1
  1095. package/build-module/text-columns/save.js +4 -3
  1096. package/build-module/text-columns/save.js.map +1 -1
  1097. package/build-module/utils/interactivity/directives.js +4 -4
  1098. package/build-module/utils/interactivity/directives.js.map +1 -1
  1099. package/build-module/utils/interactivity/index.js +1 -3
  1100. package/build-module/utils/interactivity/index.js.map +1 -1
  1101. package/build-module/utils/migrate-font-family.js +1 -1
  1102. package/build-module/utils/migrate-font-family.js.map +1 -1
  1103. package/build-module/verse/deprecated.js +4 -3
  1104. package/build-module/verse/deprecated.js.map +1 -1
  1105. package/build-module/verse/edit.js +4 -5
  1106. package/build-module/verse/edit.js.map +1 -1
  1107. package/build-module/verse/save.js +4 -3
  1108. package/build-module/verse/save.js.map +1 -1
  1109. package/build-module/video/deprecated.js +2 -1
  1110. package/build-module/video/deprecated.js.map +1 -1
  1111. package/build-module/video/edit.js +4 -2
  1112. package/build-module/video/edit.js.map +1 -1
  1113. package/build-module/video/edit.native.js +8 -7
  1114. package/build-module/video/edit.native.js.map +1 -1
  1115. package/build-module/video/save.js +2 -1
  1116. package/build-module/video/save.js.map +1 -1
  1117. package/build-module/video/tracks.js +4 -4
  1118. package/build-module/video/tracks.js.map +1 -1
  1119. package/build-style/avatar/style-rtl.css +1 -0
  1120. package/build-style/avatar/style.css +1 -0
  1121. package/build-style/editor-rtl.css +0 -17
  1122. package/build-style/editor.css +0 -17
  1123. package/build-style/footnotes/style-rtl.css +106 -0
  1124. package/build-style/footnotes/style.css +106 -0
  1125. package/build-style/image/style-rtl.css +71 -11
  1126. package/build-style/image/style.css +71 -11
  1127. package/build-style/navigation/editor-rtl.css +0 -17
  1128. package/build-style/navigation/editor.css +0 -17
  1129. package/build-style/style-rtl.css +91 -12
  1130. package/build-style/style.css +91 -12
  1131. package/package.json +33 -32
  1132. package/src/archives/block.json +0 -1
  1133. package/src/avatar/block.json +0 -1
  1134. package/src/avatar/style.scss +1 -0
  1135. package/src/block/block.json +1 -1
  1136. package/src/block/edit.js +1 -0
  1137. package/src/block/test/__snapshots__/transforms.native.js.snap +2 -2
  1138. package/src/block/test/edit.native.js +5 -7
  1139. package/src/block/test/transforms.native.js +1 -1
  1140. package/src/buttons/block.json +1 -1
  1141. package/src/buttons/edit.native.js +7 -6
  1142. package/src/buttons/test/__snapshots__/edit.native.js.snap +6 -0
  1143. package/src/buttons/test/edit.native.js +30 -2
  1144. package/src/calendar/block.json +0 -1
  1145. package/src/categories/block.json +0 -1
  1146. package/src/column/block.json +1 -1
  1147. package/src/columns/block.json +1 -1
  1148. package/src/columns/test/edit.native.js +36 -32
  1149. package/src/comment-author-avatar/block.json +0 -1
  1150. package/src/comment-author-name/block.json +0 -1
  1151. package/src/comment-content/block.json +0 -1
  1152. package/src/comment-date/block.json +0 -1
  1153. package/src/comment-edit-link/block.json +0 -1
  1154. package/src/comment-reply-link/block.json +0 -1
  1155. package/src/comment-template/block.json +0 -1
  1156. package/src/comments/block.json +0 -1
  1157. package/src/comments-pagination/block.json +1 -2
  1158. package/src/comments-pagination-next/block.json +0 -1
  1159. package/src/comments-pagination-numbers/block.json +0 -1
  1160. package/src/comments-pagination-previous/block.json +0 -1
  1161. package/src/comments-title/edit.js +2 -6
  1162. package/src/cover/block.json +1 -1
  1163. package/src/cover/edit/resizable-cover-popover.js +1 -1
  1164. package/src/cover/test/edit.native.js +45 -31
  1165. package/src/cover/transforms.js +1 -1
  1166. package/src/details/block.json +1 -1
  1167. package/src/details/edit.js +12 -9
  1168. package/src/details/init.js +6 -0
  1169. package/src/embed/test/index.native.js +38 -44
  1170. package/src/file/block.json +1 -1
  1171. package/src/file/index.php +18 -1
  1172. package/src/file/view.js +9 -0
  1173. package/src/footnotes/block.json +18 -0
  1174. package/src/footnotes/edit.js +52 -0
  1175. package/src/footnotes/format.js +112 -0
  1176. package/src/footnotes/index.js +29 -0
  1177. package/src/footnotes/index.php +78 -0
  1178. package/src/footnotes/style.scss +18 -0
  1179. package/src/gallery/block.json +1 -1
  1180. package/src/gallery/edit.js +4 -1
  1181. package/src/gallery/gallery.native.js +1 -1
  1182. package/src/gallery/test/__snapshots__/index.native.js.snap +6 -0
  1183. package/src/gallery/test/index.native.js +23 -1
  1184. package/src/group/block.json +1 -1
  1185. package/src/group/deprecated.js +1 -1
  1186. package/src/group/test/edit.native.js +2 -4
  1187. package/src/heading/edit.js +2 -2
  1188. package/src/home-link/block.json +0 -1
  1189. package/src/image/edit.js +1 -1
  1190. package/src/image/image.js +23 -11
  1191. package/src/image/interactivity.js +155 -13
  1192. package/src/image/style.scss +79 -9
  1193. package/src/image/test/edit.native.js +3 -13
  1194. package/src/index.js +2 -0
  1195. package/src/latest-comments/block.json +0 -1
  1196. package/src/latest-posts/block.json +0 -1
  1197. package/src/latest-posts/edit.js +17 -9
  1198. package/src/latest-posts/index.php +8 -0
  1199. package/src/list/ordered-list-settings.js +20 -2
  1200. package/src/list/test/edit.native.js +5 -0
  1201. package/src/loginout/block.json +0 -1
  1202. package/src/media-text/edit.js +1 -1
  1203. package/src/navigation/block.json +2 -3
  1204. package/src/navigation/constants.js +11 -0
  1205. package/src/navigation/deprecated.js +1 -1
  1206. package/src/navigation/edit/index.js +15 -6
  1207. package/src/navigation/edit/leaf-more-menu.js +1 -2
  1208. package/src/navigation/edit/menu-inspector-controls.js +24 -26
  1209. package/src/navigation/edit/navigation-menu-selector.js +17 -7
  1210. package/src/navigation/edit/unsaved-inner-blocks.js +6 -6
  1211. package/src/navigation/editor.scss +0 -24
  1212. package/src/navigation/index.php +85 -70
  1213. package/src/navigation/test/use-navigation-menu.js +15 -3
  1214. package/src/navigation/use-navigation-menu.js +11 -8
  1215. package/src/navigation/view-modal.js +78 -0
  1216. package/src/navigation/view.js +74 -0
  1217. package/src/page-list/block.json +0 -1
  1218. package/src/paragraph/test/__snapshots__/edit.native.js.snap +39 -0
  1219. package/src/paragraph/test/edit.native.js +3 -3
  1220. package/src/pattern/block.json +1 -5
  1221. package/src/pattern/edit.js +14 -40
  1222. package/src/pattern/index.js +4 -5
  1223. package/src/pattern/index.php +1 -13
  1224. package/src/post-author/block.json +0 -1
  1225. package/src/post-author/edit.js +3 -3
  1226. package/src/post-author-biography/block.json +0 -1
  1227. package/src/post-author-name/block.json +0 -1
  1228. package/src/post-comments-count/block.json +0 -1
  1229. package/src/post-comments-form/block.json +0 -1
  1230. package/src/post-comments-link/block.json +0 -1
  1231. package/src/post-content/block.json +1 -2
  1232. package/src/post-date/block.json +0 -1
  1233. package/src/post-excerpt/block.json +0 -1
  1234. package/src/post-featured-image/block.json +0 -1
  1235. package/src/post-navigation-link/block.json +0 -1
  1236. package/src/post-template/block.json +1 -2
  1237. package/src/post-template/edit.js +4 -1
  1238. package/src/post-template/index.php +5 -0
  1239. package/src/post-terms/block.json +0 -1
  1240. package/src/post-terms/edit.js +8 -7
  1241. package/src/post-terms/hooks.js +3 -3
  1242. package/src/post-time-to-read/init.js +6 -0
  1243. package/src/post-title/block.json +0 -1
  1244. package/src/post-title/edit.js +4 -4
  1245. package/src/post-title/index.php +1 -1
  1246. package/src/preformatted/test/edit.native.js +1 -13
  1247. package/src/query/block.json +1 -2
  1248. package/src/query/deprecated.js +7 -5
  1249. package/src/query/edit/inspector-controls/index.js +1 -1
  1250. package/src/query/edit/query-content.js +13 -4
  1251. package/src/query-no-results/block.json +0 -1
  1252. package/src/query-pagination/block.json +1 -2
  1253. package/src/query-pagination-next/block.json +0 -1
  1254. package/src/query-pagination-numbers/block.json +0 -1
  1255. package/src/query-pagination-previous/block.json +0 -1
  1256. package/src/query-title/block.json +0 -1
  1257. package/src/query-title/edit.js +2 -6
  1258. package/src/read-more/block.json +0 -1
  1259. package/src/rss/block.json +0 -1
  1260. package/src/search/block.json +0 -1
  1261. package/src/search/edit.js +3 -3
  1262. package/src/site-logo/block.json +0 -1
  1263. package/src/site-tagline/block.json +0 -1
  1264. package/src/site-tagline/icon.js +0 -1
  1265. package/src/site-title/block.json +0 -1
  1266. package/src/site-title/edit/index.js +5 -6
  1267. package/src/social-link/block.json +0 -1
  1268. package/src/social-links/block.json +1 -1
  1269. package/src/spacer/save.js +7 -2
  1270. package/src/spacer/test/index.native.js +33 -29
  1271. package/src/style.scss +1 -0
  1272. package/src/tag-cloud/block.json +0 -1
  1273. package/src/template-part/block.json +0 -1
  1274. package/src/template-part/edit/inner-blocks.js +1 -1
  1275. package/src/template-part/index.php +18 -11
  1276. package/src/term-description/block.json +0 -1
  1277. package/src/utils/interactivity/index.js +0 -2
  1278. package/src/utils/migrate-font-family.js +1 -1
  1279. package/build/heading/heading-level-dropdown.js +0 -81
  1280. package/build/heading/heading-level-dropdown.js.map +0 -1
  1281. package/build/heading/heading-level-dropdown.native.js +0 -72
  1282. package/build/heading/heading-level-dropdown.native.js.map +0 -1
  1283. package/build/pattern/v1/edit.js +0 -56
  1284. package/build/pattern/v1/edit.js.map +0 -1
  1285. package/build/private-apis.js.map +0 -1
  1286. package/build/site-title/edit/level-icon.js +0 -40
  1287. package/build/site-title/edit/level-icon.js.map +0 -1
  1288. package/build/site-title/edit/level-toolbar.js +0 -51
  1289. package/build/site-title/edit/level-toolbar.js.map +0 -1
  1290. package/build-module/heading/heading-level-dropdown.js +0 -69
  1291. package/build-module/heading/heading-level-dropdown.js.map +0 -1
  1292. package/build-module/heading/heading-level-dropdown.native.js +0 -60
  1293. package/build-module/heading/heading-level-dropdown.native.js.map +0 -1
  1294. package/build-module/pattern/v1/edit.js +0 -47
  1295. package/build-module/pattern/v1/edit.js.map +0 -1
  1296. package/build-module/private-apis.js.map +0 -1
  1297. package/build-module/site-title/edit/level-icon.js +0 -31
  1298. package/build-module/site-title/edit/level-icon.js.map +0 -1
  1299. package/build-module/site-title/edit/level-toolbar.js +0 -39
  1300. package/build-module/site-title/edit/level-toolbar.js.map +0 -1
  1301. package/src/heading/heading-level-dropdown.js +0 -69
  1302. package/src/heading/heading-level-dropdown.native.js +0 -63
  1303. package/src/pattern/v1/edit.js +0 -57
  1304. package/src/site-title/edit/level-icon.js +0 -28
  1305. package/src/site-title/edit/level-toolbar.js +0 -34
  1306. /package/src/{private-apis.js → lock-unlock.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/search/edit.js"],"names":["DEFAULT_INNER_PADDING","BUTTON_BEHAVIOR_EXPAND","SearchEdit","className","attributes","setAttributes","toggleSelection","isSelected","clientId","label","showLabel","placeholder","width","widthUnit","align","buttonText","buttonPosition","buttonUseIcon","buttonBehavior","isSearchFieldHidden","style","insertedInNavigationBlock","select","getBlockParentsByBlockName","wasBlockJustInserted","blockEditorStore","length","__unstableMarkNextChangeAsNotPersistent","borderRadius","border","radius","borderProps","colorProps","fluidTypographySettings","layout","typographyProps","typography","fluid","wideSize","unitControlInstanceId","UnitControl","unitControlInputId","isButtonPositionInside","isButtonPositionOutside","hasNoButton","hasOnlyButton","searchFieldRef","buttonRef","units","availableUnits","defaultValues","PC_WIDTH_DEFAULT","px","PX_WIDTH_DEFAULT","getBlockClassNames","undefined","buttonPositionControls","role","title","isActive","icon","buttonOutside","onClick","buttonInside","noButton","buttonOnly","getButtonPositionIcon","getResizableSides","right","left","renderTextField","textFieldClasses","textFieldStyles","textDecoration","event","target","value","renderButton","buttonClasses","buttonStyles","handleButtonClick","search","html","controls","toggleLabel","buttonWithIcon","MIN_WIDTH","MIN_WIDTH_UNIT","newWidth","filteredWidth","parseInt","newUnit","map","widthValue","padBorderRadius","getWrapperStyles","styles","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","isNonZeroBorderRadius","topLeft","topRight","bottomLeft","bottomRight","Number","isInteger","blockProps","labelClassnames","direction","elt","offsetWidth","delta"],"mappings":";;;;;;;;;AAqBA;;AAlBA;;AAKA;;AAYA;;AAEA;;AAYA;;AACA;;AACA;;AACA;;AAKA;;AAQA;;AAlDA;AACA;AACA;;AAGA;AACA;AACA;;AAgCA;AACA;AACA;AAgBA;AACA;AACA,MAAMA,qBAAqB,GAAG,KAA9B;AAEA,MAAMC,sBAAsB,GAAG,oBAA/B;;AAEe,SAASC,UAAT,CAAqB;AACnCC,EAAAA,SADmC;AAEnCC,EAAAA,UAFmC;AAGnCC,EAAAA,aAHmC;AAInCC,EAAAA,eAJmC;AAKnCC,EAAAA,UALmC;AAMnCC,EAAAA;AANmC,CAArB,EAOX;AACH,QAAM;AACLC,IAAAA,KADK;AAELC,IAAAA,SAFK;AAGLC,IAAAA,WAHK;AAILC,IAAAA,KAJK;AAKLC,IAAAA,SALK;AAMLC,IAAAA,KANK;AAOLC,IAAAA,UAPK;AAQLC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AAF,CANrC;AAOC,IAAA,KAAK,EAAG/C,eAAe,CAACf;AAPzB,IAJF,EAeC,4BAAC,wBAAD;AACC,IAAA,IAAI,EAAG;AACNR,MAAAA,KAAK,EAAG,GAAGA,KAAO,GAAGC,SAAW;AAD1B,KADR;AAIC,IAAA,SAAS,EAAG,yBACX,iCADW,EAEX6B,sBAAsB,GAAGX,WAAW,CAAC5B,SAAf,GAA2BoD,SAFtC,CAJb;AAQC,IAAA,KAAK,EAAGwC,gBAAgB,EARzB;AASC,IAAA,QAAQ,EAAGT,gBATZ;AAUC,IAAA,MAAM,EAAGnB,iBAAiB,EAV3B;AAWC,IAAA,aAAa,EAAG,CAAEO,KAAF,EAASoC,SAAT,EAAoBC,GAApB,KAA6B;AAC5C1G,MAAAA,aAAa,CAAE;AACdO,QAAAA,KAAK,EAAE8E,QAAQ,CAAEqB,GAAG,CAACC,WAAN,EAAmB,EAAnB,CADD;AAEdnG,QAAAA,SAAS,EAAE;AAFG,OAAF,CAAb;AAIAP,MAAAA,eAAe,CAAE,KAAF,CAAf;AACA,KAjBF;AAkBC,IAAA,YAAY,EAAG,CAAEoE,KAAF,EAASoC,SAAT,EAAoBC,GAApB,EAAyBE,KAAzB,KAAoC;AAClD5G,MAAAA,aAAa,CAAE;AACdO,QAAAA,KAAK,EAAE8E,QAAQ,CAAE9E,KAAK,GAAGqG,KAAK,CAACrG,KAAhB,EAAuB,EAAvB;AADD,OAAF,CAAb;AAGAN,MAAAA,eAAe,CAAE,IAAF,CAAf;AACA,KAvBF;AAwBC,IAAA,UAAU,EAAGC;AAxBd,KA0BG,CAAEmC,sBAAsB,IACzBC,uBADG,IAEHE,aAFC,KAGD,qDACGyB,eAAe,EADlB,EAEGO,YAAY,EAFf,CA7BF,EAmCGjC,WAAW,IAAI0B,eAAe,EAnCjC,CAfD,CADD;AAuDA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseBlockProps,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalUseColorProps as useColorProps,\n\tgetTypographyClassesAndStyles as useTypographyProps,\n\tstore as blockEditorStore,\n\t__experimentalGetElementClassName,\n\tuseSetting,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport {\n\tToolbarDropdownMenu,\n\tToolbarGroup,\n\tButton,\n\tButtonGroup,\n\tToolbarButton,\n\tResizableBox,\n\tPanelBody,\n\tBaseControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as UnitControl,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { Icon, search } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport {\n\tbuttonOnly,\n\tbuttonOutside,\n\tbuttonInside,\n\tnoButton,\n\tbuttonWithIcon,\n\ttoggleLabel,\n} from './icons';\nimport {\n\tPC_WIDTH_DEFAULT,\n\tPX_WIDTH_DEFAULT,\n\tMIN_WIDTH,\n\tMIN_WIDTH_UNIT,\n} from './utils.js';\n\n// Used to calculate border radius adjustment to avoid \"fat\" corners when\n// button is placed inside wrapper.\nconst DEFAULT_INNER_PADDING = '4px';\n\nconst BUTTON_BEHAVIOR_EXPAND = 'expand-searchfield';\n\nexport default function SearchEdit( {\n\tclassName,\n\tattributes,\n\tsetAttributes,\n\ttoggleSelection,\n\tisSelected,\n\tclientId,\n} ) {\n\tconst {\n\t\tlabel,\n\t\tshowLabel,\n\t\tplaceholder,\n\t\twidth,\n\t\twidthUnit,\n\t\talign,\n\t\tbuttonText,\n\t\tbuttonPosition,\n\t\tbuttonUseIcon,\n\t\tbuttonBehavior,\n\t\tisSearchFieldHidden,\n\t\tstyle,\n\t} = attributes;\n\n\tconst insertedInNavigationBlock = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockParentsByBlockName, wasBlockJustInserted } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn (\n\t\t\t\t!! getBlockParentsByBlockName( clientId, 'core/navigation' )\n\t\t\t\t\t?.length && wasBlockJustInserted( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tuseEffect( () => {\n\t\tif ( ! insertedInNavigationBlock ) return;\n\t\t// This side-effect should not create an undo level.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tsetAttributes( {\n\t\t\tshowLabel: false,\n\t\t\tbuttonUseIcon: true,\n\t\t\tbuttonPosition: 'button-inside',\n\t\t} );\n\t}, [ insertedInNavigationBlock ] );\n\tconst borderRadius = style?.border?.radius;\n\tconst borderProps = useBorderProps( attributes );\n\n\t// Check for old deprecated numerical border radius. Done as a separate\n\t// check so that a borderRadius style won't overwrite the longhand\n\t// per-corner styles.\n\tif ( typeof borderRadius === 'number' ) {\n\t\tborderProps.style.borderRadius = `${ borderRadius }px`;\n\t}\n\n\tconst colorProps = useColorProps( attributes );\n\tconst fluidTypographySettings = useSetting( 'typography.fluid' );\n\tconst layout = useSetting( 'layout' );\n\tconst typographyProps = useTypographyProps( attributes, {\n\t\ttypography: {\n\t\t\tfluid: fluidTypographySettings,\n\t\t},\n\t\tlayout: {\n\t\t\twideSize: layout?.wideSize,\n\t\t},\n\t} );\n\tconst unitControlInstanceId = useInstanceId( UnitControl );\n\tconst unitControlInputId = `wp-block-search__width-${ unitControlInstanceId }`;\n\tconst isButtonPositionInside = 'button-inside' === buttonPosition;\n\tconst isButtonPositionOutside = 'button-outside' === buttonPosition;\n\tconst hasNoButton = 'no-button' === buttonPosition;\n\tconst hasOnlyButton = 'button-only' === buttonPosition;\n\tconst searchFieldRef = useRef();\n\tconst buttonRef = useRef();\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: [ '%', 'px' ],\n\t\tdefaultValues: { '%': PC_WIDTH_DEFAULT, px: PX_WIDTH_DEFAULT },\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( hasOnlyButton && ! isSelected ) {\n\t\t\tsetAttributes( {\n\t\t\t\tisSearchFieldHidden: true,\n\t\t\t} );\n\t\t}\n\t}, [ hasOnlyButton, isSelected, setAttributes ] );\n\n\t// Show the search field when width changes.\n\tuseEffect( () => {\n\t\tif ( ! hasOnlyButton || ! isSelected ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetAttributes( {\n\t\t\tisSearchFieldHidden: false,\n\t\t} );\n\t}, [ hasOnlyButton, isSelected, setAttributes, width ] );\n\n\tconst getBlockClassNames = () => {\n\t\treturn classnames(\n\t\t\tclassName,\n\t\t\tisButtonPositionInside\n\t\t\t\t? 'wp-block-search__button-inside'\n\t\t\t\t: undefined,\n\t\t\tisButtonPositionOutside\n\t\t\t\t? 'wp-block-search__button-outside'\n\t\t\t\t: undefined,\n\t\t\thasNoButton ? 'wp-block-search__no-button' : undefined,\n\t\t\thasOnlyButton ? 'wp-block-search__button-only' : undefined,\n\t\t\t! buttonUseIcon && ! hasNoButton\n\t\t\t\t? 'wp-block-search__text-button'\n\t\t\t\t: undefined,\n\t\t\tbuttonUseIcon && ! hasNoButton\n\t\t\t\t? 'wp-block-search__icon-button'\n\t\t\t\t: undefined,\n\t\t\thasOnlyButton && BUTTON_BEHAVIOR_EXPAND === buttonBehavior\n\t\t\t\t? 'wp-block-search__button-behavior-expand'\n\t\t\t\t: undefined,\n\t\t\thasOnlyButton && isSearchFieldHidden\n\t\t\t\t? 'wp-block-search__searchfield-hidden'\n\t\t\t\t: undefined\n\t\t);\n\t};\n\n\tconst buttonPositionControls = [\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'Button outside' ),\n\t\t\tisActive: buttonPosition === 'button-outside',\n\t\t\ticon: buttonOutside,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'button-outside',\n\t\t\t\t\tisSearchFieldHidden: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'Button inside' ),\n\t\t\tisActive: buttonPosition === 'button-inside',\n\t\t\ticon: buttonInside,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'button-inside',\n\t\t\t\t\tisSearchFieldHidden: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'No button' ),\n\t\t\tisActive: buttonPosition === 'no-button',\n\t\t\ticon: noButton,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'no-button',\n\t\t\t\t\tisSearchFieldHidden: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'Button Only' ),\n\t\t\tisActive: buttonPosition === 'button-only',\n\t\t\ticon: buttonOnly,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'button-only',\n\t\t\t\t\tisSearchFieldHidden: true,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t];\n\n\tconst getButtonPositionIcon = () => {\n\t\tswitch ( buttonPosition ) {\n\t\t\tcase 'button-inside':\n\t\t\t\treturn buttonInside;\n\t\t\tcase 'button-outside':\n\t\t\t\treturn buttonOutside;\n\t\t\tcase 'no-button':\n\t\t\t\treturn noButton;\n\t\t\tcase 'button-only':\n\t\t\t\treturn buttonOnly;\n\t\t}\n\t};\n\n\tconst getResizableSides = () => {\n\t\tif ( hasOnlyButton ) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn {\n\t\t\tright: align !== 'right',\n\t\t\tleft: align === 'right',\n\t\t};\n\t};\n\n\tconst renderTextField = () => {\n\t\t// If the input is inside the wrapper, the wrapper gets the border color styles/classes, not the input control.\n\t\tconst textFieldClasses = classnames(\n\t\t\t'wp-block-search__input',\n\t\t\tisButtonPositionInside ? undefined : borderProps.className,\n\t\t\ttypographyProps.className\n\t\t);\n\t\tconst textFieldStyles = {\n\t\t\t...( isButtonPositionInside\n\t\t\t\t? { borderRadius }\n\t\t\t\t: borderProps.style ),\n\t\t\t...typographyProps.style,\n\t\t\ttextDecoration: undefined,\n\t\t};\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype=\"search\"\n\t\t\t\tclassName={ textFieldClasses }\n\t\t\t\tstyle={ textFieldStyles }\n\t\t\t\taria-label={ __( 'Optional placeholder text' ) }\n\t\t\t\t// We hide the placeholder field's placeholder when there is a value. This\n\t\t\t\t// stops screen readers from reading the placeholder field's placeholder\n\t\t\t\t// which is confusing.\n\t\t\t\tplaceholder={\n\t\t\t\t\tplaceholder ? undefined : __( 'Optional placeholder…' )\n\t\t\t\t}\n\t\t\t\tvalue={ placeholder }\n\t\t\t\tonChange={ ( event ) =>\n\t\t\t\t\tsetAttributes( { placeholder: event.target.value } )\n\t\t\t\t}\n\t\t\t\tref={ searchFieldRef }\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst renderButton = () => {\n\t\t// If the button is inside the wrapper, the wrapper gets the border color styles/classes, not the button.\n\t\tconst buttonClasses = classnames(\n\t\t\t'wp-block-search__button',\n\t\t\tcolorProps.className,\n\t\t\ttypographyProps.className,\n\t\t\tisButtonPositionInside ? undefined : borderProps.className,\n\t\t\tbuttonUseIcon ? 'has-icon' : undefined,\n\t\t\t__experimentalGetElementClassName( 'button' )\n\t\t);\n\t\tconst buttonStyles = {\n\t\t\t...colorProps.style,\n\t\t\t...typographyProps.style,\n\t\t\t...( isButtonPositionInside\n\t\t\t\t? { borderRadius }\n\t\t\t\t: borderProps.style ),\n\t\t};\n\t\tconst handleButtonClick = () => {\n\t\t\tif ( hasOnlyButton && BUTTON_BEHAVIOR_EXPAND === buttonBehavior ) {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tisSearchFieldHidden: ! isSearchFieldHidden,\n\t\t\t\t} );\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ buttonUseIcon && (\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\tstyle={ buttonStyles }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\tbuttonText\n\t\t\t\t\t\t\t\t? stripHTML( buttonText )\n\t\t\t\t\t\t\t\t: __( 'Search' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={ handleButtonClick }\n\t\t\t\t\t\tref={ buttonRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon icon={ search } />\n\t\t\t\t\t</button>\n\t\t\t\t) }\n\n\t\t\t\t{ ! buttonUseIcon && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\tstyle={ buttonStyles }\n\t\t\t\t\t\taria-label={ __( 'Button text' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Add button text…' ) }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ buttonText }\n\t\t\t\t\t\tonChange={ ( html ) =>\n\t\t\t\t\t\t\tsetAttributes( { buttonText: html } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={ handleButtonClick }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t};\n\n\tconst controls = (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ttitle={ __( 'Toggle search label' ) }\n\t\t\t\t\t\ticon={ toggleLabel }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowLabel: ! showLabel,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tclassName={ showLabel ? 'is-pressed' : undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolbarDropdownMenu\n\t\t\t\t\t\ticon={ getButtonPositionIcon() }\n\t\t\t\t\t\tlabel={ __( 'Change button position' ) }\n\t\t\t\t\t\tcontrols={ buttonPositionControls }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! hasNoButton && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\ttitle={ __( 'Use button with icon' ) }\n\t\t\t\t\t\t\ticon={ buttonWithIcon }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tbuttonUseIcon: ! buttonUseIcon,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\tbuttonUseIcon ? 'is-pressed' : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolbarGroup>\n\t\t\t</BlockControls>\n\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Display Settings' ) }>\n\t\t\t\t\t<BaseControl\n\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\tid={ unitControlInputId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tid={ unitControlInputId }\n\t\t\t\t\t\t\tmin={ `${ MIN_WIDTH }${ MIN_WIDTH_UNIT }` }\n\t\t\t\t\t\t\tonChange={ ( newWidth ) => {\n\t\t\t\t\t\t\t\tconst filteredWidth =\n\t\t\t\t\t\t\t\t\twidthUnit === '%' &&\n\t\t\t\t\t\t\t\t\tparseInt( newWidth, 10 ) > 100\n\t\t\t\t\t\t\t\t\t\t? 100\n\t\t\t\t\t\t\t\t\t\t: newWidth;\n\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\twidth: parseInt( filteredWidth, 10 ),\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonUnitChange={ ( newUnit ) => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\t\t\t\t'%' === newUnit\n\t\t\t\t\t\t\t\t\t\t\t? PC_WIDTH_DEFAULT\n\t\t\t\t\t\t\t\t\t\t\t: PX_WIDTH_DEFAULT,\n\t\t\t\t\t\t\t\t\twidthUnit: newUnit,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t__unstableInputWidth={ '80px' }\n\t\t\t\t\t\t\tvalue={ `${ width }${ widthUnit }` }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<ButtonGroup\n\t\t\t\t\t\t\tclassName=\"wp-block-search__components-button-group\"\n\t\t\t\t\t\t\taria-label={ __( 'Percentage Width' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ [ 25, 50, 75, 100 ].map( ( widthValue ) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tkey={ widthValue }\n\t\t\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t`${ widthValue }%` ===\n\t\t\t\t\t\t\t\t\t\t\t`${ width }${ widthUnit }`\n\t\t\t\t\t\t\t\t\t\t\t\t? 'primary'\n\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\t\twidth: widthValue,\n\t\t\t\t\t\t\t\t\t\t\t\twidthUnit: '%',\n\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ widthValue }%\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t</ButtonGroup>\n\t\t\t\t\t</BaseControl>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n\n\tconst padBorderRadius = ( radius ) =>\n\t\tradius ? `calc(${ radius } + ${ DEFAULT_INNER_PADDING })` : undefined;\n\n\tconst getWrapperStyles = () => {\n\t\tconst styles = isButtonPositionInside\n\t\t\t? borderProps.style\n\t\t\t: {\n\t\t\t\t\tborderRadius: borderProps.style?.borderRadius,\n\t\t\t\t\tborderTopLeftRadius: borderProps.style?.borderTopLeftRadius,\n\t\t\t\t\tborderTopRightRadius:\n\t\t\t\t\t\tborderProps.style?.borderTopRightRadius,\n\t\t\t\t\tborderBottomLeftRadius:\n\t\t\t\t\t\tborderProps.style?.borderBottomLeftRadius,\n\t\t\t\t\tborderBottomRightRadius:\n\t\t\t\t\t\tborderProps.style?.borderBottomRightRadius,\n\t\t\t };\n\n\t\tconst isNonZeroBorderRadius =\n\t\t\tborderRadius !== undefined && parseInt( borderRadius, 10 ) !== 0;\n\n\t\tif ( isButtonPositionInside && isNonZeroBorderRadius ) {\n\t\t\t// We have button inside wrapper and a border radius value to apply.\n\t\t\t// Add default padding so we don't get \"fat\" corners.\n\t\t\t//\n\t\t\t// CSS calc() is used here to support non-pixel units. The inline\n\t\t\t// style using calc() will only apply if both values have units.\n\n\t\t\tif ( typeof borderRadius === 'object' ) {\n\t\t\t\t// Individual corner border radii present.\n\t\t\t\tconst { topLeft, topRight, bottomLeft, bottomRight } =\n\t\t\t\t\tborderRadius;\n\n\t\t\t\treturn {\n\t\t\t\t\t...styles,\n\t\t\t\t\tborderTopLeftRadius: padBorderRadius( topLeft ),\n\t\t\t\t\tborderTopRightRadius: padBorderRadius( topRight ),\n\t\t\t\t\tborderBottomLeftRadius: padBorderRadius( bottomLeft ),\n\t\t\t\t\tborderBottomRightRadius: padBorderRadius( bottomRight ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// The inline style using calc() will only apply if both values\n\t\t\t// supplied to calc() have units. Deprecated block's may have\n\t\t\t// unitless integer.\n\t\t\tconst radius = Number.isInteger( borderRadius )\n\t\t\t\t? `${ borderRadius }px`\n\t\t\t\t: borderRadius;\n\n\t\t\tstyles.borderRadius = `calc(${ radius } + ${ DEFAULT_INNER_PADDING })`;\n\t\t}\n\n\t\treturn styles;\n\t};\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: getBlockClassNames(),\n\t\tstyle: {\n\t\t\t...typographyProps.style,\n\t\t\t// Input opts out of text decoration.\n\t\t\ttextDecoration: undefined,\n\t\t},\n\t} );\n\n\tconst labelClassnames = classnames(\n\t\t'wp-block-search__label',\n\t\ttypographyProps.className\n\t);\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t{ controls }\n\n\t\t\t{ showLabel && (\n\t\t\t\t<RichText\n\t\t\t\t\tclassName={ labelClassnames }\n\t\t\t\t\taria-label={ __( 'Label text' ) }\n\t\t\t\t\tplaceholder={ __( 'Add label…' ) }\n\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\tonChange={ ( html ) => setAttributes( { label: html } ) }\n\t\t\t\t\tstyle={ typographyProps.style }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<ResizableBox\n\t\t\t\tsize={ {\n\t\t\t\t\twidth: `${ width }${ widthUnit }`,\n\t\t\t\t} }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'wp-block-search__inside-wrapper',\n\t\t\t\t\tisButtonPositionInside ? borderProps.className : undefined\n\t\t\t\t) }\n\t\t\t\tstyle={ getWrapperStyles() }\n\t\t\t\tminWidth={ MIN_WIDTH }\n\t\t\t\tenable={ getResizableSides() }\n\t\t\t\tonResizeStart={ ( event, direction, elt ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: parseInt( elt.offsetWidth, 10 ),\n\t\t\t\t\t\twidthUnit: 'px',\n\t\t\t\t\t} );\n\t\t\t\t\ttoggleSelection( false );\n\t\t\t\t} }\n\t\t\t\tonResizeStop={ ( event, direction, elt, delta ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: parseInt( width + delta.width, 10 ),\n\t\t\t\t\t} );\n\t\t\t\t\ttoggleSelection( true );\n\t\t\t\t} }\n\t\t\t\tshowHandle={ isSelected }\n\t\t\t>\n\t\t\t\t{ ( isButtonPositionInside ||\n\t\t\t\t\tisButtonPositionOutside ||\n\t\t\t\t\thasOnlyButton ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ renderTextField() }\n\t\t\t\t\t\t{ renderButton() }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\n\t\t\t\t{ hasNoButton && renderTextField() }\n\t\t\t</ResizableBox>\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/search/edit.js"],"names":["DEFAULT_INNER_PADDING","BUTTON_BEHAVIOR_EXPAND","SearchEdit","className","attributes","setAttributes","toggleSelection","isSelected","clientId","label","showLabel","placeholder","width","widthUnit","align","buttonText","buttonPosition","buttonUseIcon","buttonBehavior","isSearchFieldHidden","style","insertedInNavigationBlock","select","getBlockParentsByBlockName","wasBlockJustInserted","blockEditorStore","length","__unstableMarkNextChangeAsNotPersistent","borderRadius","border","radius","borderProps","colorProps","fluidTypographySettings","layout","typographyProps","typography","fluid","wideSize","unitControlInstanceId","UnitControl","unitControlInputId","isButtonPositionInside","isButtonPositionOutside","hasNoButton","hasOnlyButton","searchFieldRef","buttonRef","units","availableUnits","defaultValues","PC_WIDTH_DEFAULT","px","PX_WIDTH_DEFAULT","getBlockClassNames","undefined","buttonPositionControls","role","title","isActive","icon","buttonOutside","onClick","buttonInside","noButton","buttonOnly","getButtonPositionIcon","getResizableSides","right","left","renderTextField","textFieldClasses","textFieldStyles","textDecoration","event","target","value","renderButton","buttonClasses","buttonStyles","handleButtonClick","search","html","controls","toggleLabel","buttonWithIcon","MIN_WIDTH","MIN_WIDTH_UNIT","newWidth","filteredWidth","parseInt","newUnit","map","widthValue","padBorderRadius","getWrapperStyles","styles","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","isNonZeroBorderRadius","topLeft","topRight","bottomLeft","bottomRight","Number","isInteger","blockProps","labelClassnames","direction","elt","offsetWidth","delta"],"mappings":";;;;;;;;;AAqBA;;AAlBA;;AAKA;;AAYA;;AAEA;;AAYA;;AACA;;AACA;;AACA;;AAKA;;AAQA;;AAlDA;AACA;AACA;;AAGA;AACA;AACA;;AAgCA;AACA;AACA;AAgBA;AACA;AACA,MAAMA,qBAAqB,GAAG,KAA9B;AAEA,MAAMC,sBAAsB,GAAG,oBAA/B;;AAEe,SAASC,UAAT,CAAqB;AACnCC,EAAAA,SADmC;AAEnCC,EAAAA,UAFmC;AAGnCC,EAAAA,aAHmC;AAInCC,EAAAA,eAJmC;AAKnCC,EAAAA,UALmC;AAMnCC,EAAAA;AANmC,CAArB,EAOX;AACH,QAAM;AACLC,IAAAA,KADK;AAELC,IAAAA,SAFK;AAGLC,IAAAA,WAHK;AAILC,IAAAA,KAJK;AAKLC,IAAAA,SALK;AAMLC,IAAAA,KANK;AAOLC,IAAAA,UAPK;AAQLC,IAAAA,cARK;AASLC,IAAAA,aATK;AAULC,IAAAA,cAVK;AAWLC,IAAAA,mBAXK;AAYLC,IAAAA;AAZK,MAaFhB,UAbJ;AAeA,QAAMiB,yBAAyB,GAAG,qBAC/BC,MAAF,IAAc;AACb,UAAM;AAAEC,MAAAA,0BAAF;AAA8BC,MAAAA;AAA9B,QACLF,MAAM,CAAEG,kBAAF,CADP;AAEA,WACC,CAAC,CAAEF,0BAA0B,CAAEf,QAAF,EAAY,iBAAZ,CAA1B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AAQ,EAAGT,gBATZ;AAUC,IAAA,MAAM,EAAGnB,iBAAiB,EAV3B;AAWC,IAAA,aAAa,EAAG,CAAEO,KAAF,EAASoC,SAAT,EAAoBC,GAApB,KAA6B;AAC5C1G,MAAAA,aAAa,CAAE;AACdO,QAAAA,KAAK,EAAE8E,QAAQ,CAAEqB,GAAG,CAACC,WAAN,EAAmB,EAAnB,CADD;AAEdnG,QAAAA,SAAS,EAAE;AAFG,OAAF,CAAb;AAIAP,MAAAA,eAAe,CAAE,KAAF,CAAf;AACA,KAjBF;AAkBC,IAAA,YAAY,EAAG,CAAEoE,KAAF,EAASoC,SAAT,EAAoBC,GAApB,EAAyBE,KAAzB,KAAoC;AAClD5G,MAAAA,aAAa,CAAE;AACdO,QAAAA,KAAK,EAAE8E,QAAQ,CAAE9E,KAAK,GAAGqG,KAAK,CAACrG,KAAhB,EAAuB,EAAvB;AADD,OAAF,CAAb;AAGAN,MAAAA,eAAe,CAAE,IAAF,CAAf;AACA,KAvBF;AAwBC,IAAA,UAAU,EAAGC;AAxBd,KA0BG,CAAEmC,sBAAsB,IACzBC,uBADG,IAEHE,aAFC,KAGD,qDACGyB,eAAe,EADlB,EAEGO,YAAY,EAFf,CA7BF,EAmCGjC,WAAW,IAAI0B,eAAe,EAnCjC,CAfD,CADD;AAuDA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseBlockProps,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalUseColorProps as useColorProps,\n\tgetTypographyClassesAndStyles as useTypographyProps,\n\tstore as blockEditorStore,\n\t__experimentalGetElementClassName,\n\tuseSetting,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport {\n\tToolbarDropdownMenu,\n\tToolbarGroup,\n\tButton,\n\tButtonGroup,\n\tToolbarButton,\n\tResizableBox,\n\tPanelBody,\n\tBaseControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as UnitControl,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { Icon, search } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport {\n\tbuttonOnly,\n\tbuttonOutside,\n\tbuttonInside,\n\tnoButton,\n\tbuttonWithIcon,\n\ttoggleLabel,\n} from './icons';\nimport {\n\tPC_WIDTH_DEFAULT,\n\tPX_WIDTH_DEFAULT,\n\tMIN_WIDTH,\n\tMIN_WIDTH_UNIT,\n} from './utils.js';\n\n// Used to calculate border radius adjustment to avoid \"fat\" corners when\n// button is placed inside wrapper.\nconst DEFAULT_INNER_PADDING = '4px';\n\nconst BUTTON_BEHAVIOR_EXPAND = 'expand-searchfield';\n\nexport default function SearchEdit( {\n\tclassName,\n\tattributes,\n\tsetAttributes,\n\ttoggleSelection,\n\tisSelected,\n\tclientId,\n} ) {\n\tconst {\n\t\tlabel,\n\t\tshowLabel,\n\t\tplaceholder,\n\t\twidth,\n\t\twidthUnit,\n\t\talign,\n\t\tbuttonText,\n\t\tbuttonPosition,\n\t\tbuttonUseIcon,\n\t\tbuttonBehavior,\n\t\tisSearchFieldHidden,\n\t\tstyle,\n\t} = attributes;\n\n\tconst insertedInNavigationBlock = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockParentsByBlockName, wasBlockJustInserted } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn (\n\t\t\t\t!! getBlockParentsByBlockName( clientId, 'core/navigation' )\n\t\t\t\t\t?.length && wasBlockJustInserted( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tuseEffect( () => {\n\t\tif ( ! insertedInNavigationBlock ) return;\n\t\t// This side-effect should not create an undo level.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tsetAttributes( {\n\t\t\tshowLabel: false,\n\t\t\tbuttonUseIcon: true,\n\t\t\tbuttonPosition: 'button-inside',\n\t\t} );\n\t}, [ insertedInNavigationBlock ] );\n\tconst borderRadius = style?.border?.radius;\n\tconst borderProps = useBorderProps( attributes );\n\n\t// Check for old deprecated numerical border radius. Done as a separate\n\t// check so that a borderRadius style won't overwrite the longhand\n\t// per-corner styles.\n\tif ( typeof borderRadius === 'number' ) {\n\t\tborderProps.style.borderRadius = `${ borderRadius }px`;\n\t}\n\n\tconst colorProps = useColorProps( attributes );\n\tconst fluidTypographySettings = useSetting( 'typography.fluid' );\n\tconst layout = useSetting( 'layout' );\n\tconst typographyProps = useTypographyProps( attributes, {\n\t\ttypography: {\n\t\t\tfluid: fluidTypographySettings,\n\t\t},\n\t\tlayout: {\n\t\t\twideSize: layout?.wideSize,\n\t\t},\n\t} );\n\tconst unitControlInstanceId = useInstanceId( UnitControl );\n\tconst unitControlInputId = `wp-block-search__width-${ unitControlInstanceId }`;\n\tconst isButtonPositionInside = 'button-inside' === buttonPosition;\n\tconst isButtonPositionOutside = 'button-outside' === buttonPosition;\n\tconst hasNoButton = 'no-button' === buttonPosition;\n\tconst hasOnlyButton = 'button-only' === buttonPosition;\n\tconst searchFieldRef = useRef();\n\tconst buttonRef = useRef();\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: [ '%', 'px' ],\n\t\tdefaultValues: { '%': PC_WIDTH_DEFAULT, px: PX_WIDTH_DEFAULT },\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( hasOnlyButton && ! isSelected ) {\n\t\t\tsetAttributes( {\n\t\t\t\tisSearchFieldHidden: true,\n\t\t\t} );\n\t\t}\n\t}, [ hasOnlyButton, isSelected, setAttributes ] );\n\n\t// Show the search field when width changes.\n\tuseEffect( () => {\n\t\tif ( ! hasOnlyButton || ! isSelected ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetAttributes( {\n\t\t\tisSearchFieldHidden: false,\n\t\t} );\n\t}, [ hasOnlyButton, isSelected, setAttributes, width ] );\n\n\tconst getBlockClassNames = () => {\n\t\treturn classnames(\n\t\t\tclassName,\n\t\t\tisButtonPositionInside\n\t\t\t\t? 'wp-block-search__button-inside'\n\t\t\t\t: undefined,\n\t\t\tisButtonPositionOutside\n\t\t\t\t? 'wp-block-search__button-outside'\n\t\t\t\t: undefined,\n\t\t\thasNoButton ? 'wp-block-search__no-button' : undefined,\n\t\t\thasOnlyButton ? 'wp-block-search__button-only' : undefined,\n\t\t\t! buttonUseIcon && ! hasNoButton\n\t\t\t\t? 'wp-block-search__text-button'\n\t\t\t\t: undefined,\n\t\t\tbuttonUseIcon && ! hasNoButton\n\t\t\t\t? 'wp-block-search__icon-button'\n\t\t\t\t: undefined,\n\t\t\thasOnlyButton && BUTTON_BEHAVIOR_EXPAND === buttonBehavior\n\t\t\t\t? 'wp-block-search__button-behavior-expand'\n\t\t\t\t: undefined,\n\t\t\thasOnlyButton && isSearchFieldHidden\n\t\t\t\t? 'wp-block-search__searchfield-hidden'\n\t\t\t\t: undefined\n\t\t);\n\t};\n\n\tconst buttonPositionControls = [\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'Button outside' ),\n\t\t\tisActive: buttonPosition === 'button-outside',\n\t\t\ticon: buttonOutside,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'button-outside',\n\t\t\t\t\tisSearchFieldHidden: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'Button inside' ),\n\t\t\tisActive: buttonPosition === 'button-inside',\n\t\t\ticon: buttonInside,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'button-inside',\n\t\t\t\t\tisSearchFieldHidden: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'No button' ),\n\t\t\tisActive: buttonPosition === 'no-button',\n\t\t\ticon: noButton,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'no-button',\n\t\t\t\t\tisSearchFieldHidden: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'Button only' ),\n\t\t\tisActive: buttonPosition === 'button-only',\n\t\t\ticon: buttonOnly,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'button-only',\n\t\t\t\t\tisSearchFieldHidden: true,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t];\n\n\tconst getButtonPositionIcon = () => {\n\t\tswitch ( buttonPosition ) {\n\t\t\tcase 'button-inside':\n\t\t\t\treturn buttonInside;\n\t\t\tcase 'button-outside':\n\t\t\t\treturn buttonOutside;\n\t\t\tcase 'no-button':\n\t\t\t\treturn noButton;\n\t\t\tcase 'button-only':\n\t\t\t\treturn buttonOnly;\n\t\t}\n\t};\n\n\tconst getResizableSides = () => {\n\t\tif ( hasOnlyButton ) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn {\n\t\t\tright: align !== 'right',\n\t\t\tleft: align === 'right',\n\t\t};\n\t};\n\n\tconst renderTextField = () => {\n\t\t// If the input is inside the wrapper, the wrapper gets the border color styles/classes, not the input control.\n\t\tconst textFieldClasses = classnames(\n\t\t\t'wp-block-search__input',\n\t\t\tisButtonPositionInside ? undefined : borderProps.className,\n\t\t\ttypographyProps.className\n\t\t);\n\t\tconst textFieldStyles = {\n\t\t\t...( isButtonPositionInside\n\t\t\t\t? { borderRadius }\n\t\t\t\t: borderProps.style ),\n\t\t\t...typographyProps.style,\n\t\t\ttextDecoration: undefined,\n\t\t};\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype=\"search\"\n\t\t\t\tclassName={ textFieldClasses }\n\t\t\t\tstyle={ textFieldStyles }\n\t\t\t\taria-label={ __( 'Optional placeholder text' ) }\n\t\t\t\t// We hide the placeholder field's placeholder when there is a value. This\n\t\t\t\t// stops screen readers from reading the placeholder field's placeholder\n\t\t\t\t// which is confusing.\n\t\t\t\tplaceholder={\n\t\t\t\t\tplaceholder ? undefined : __( 'Optional placeholder…' )\n\t\t\t\t}\n\t\t\t\tvalue={ placeholder }\n\t\t\t\tonChange={ ( event ) =>\n\t\t\t\t\tsetAttributes( { placeholder: event.target.value } )\n\t\t\t\t}\n\t\t\t\tref={ searchFieldRef }\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst renderButton = () => {\n\t\t// If the button is inside the wrapper, the wrapper gets the border color styles/classes, not the button.\n\t\tconst buttonClasses = classnames(\n\t\t\t'wp-block-search__button',\n\t\t\tcolorProps.className,\n\t\t\ttypographyProps.className,\n\t\t\tisButtonPositionInside ? undefined : borderProps.className,\n\t\t\tbuttonUseIcon ? 'has-icon' : undefined,\n\t\t\t__experimentalGetElementClassName( 'button' )\n\t\t);\n\t\tconst buttonStyles = {\n\t\t\t...colorProps.style,\n\t\t\t...typographyProps.style,\n\t\t\t...( isButtonPositionInside\n\t\t\t\t? { borderRadius }\n\t\t\t\t: borderProps.style ),\n\t\t};\n\t\tconst handleButtonClick = () => {\n\t\t\tif ( hasOnlyButton && BUTTON_BEHAVIOR_EXPAND === buttonBehavior ) {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tisSearchFieldHidden: ! isSearchFieldHidden,\n\t\t\t\t} );\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ buttonUseIcon && (\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\tstyle={ buttonStyles }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\tbuttonText\n\t\t\t\t\t\t\t\t? stripHTML( buttonText )\n\t\t\t\t\t\t\t\t: __( 'Search' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={ handleButtonClick }\n\t\t\t\t\t\tref={ buttonRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon icon={ search } />\n\t\t\t\t\t</button>\n\t\t\t\t) }\n\n\t\t\t\t{ ! buttonUseIcon && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\tstyle={ buttonStyles }\n\t\t\t\t\t\taria-label={ __( 'Button text' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Add button text…' ) }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ buttonText }\n\t\t\t\t\t\tonChange={ ( html ) =>\n\t\t\t\t\t\t\tsetAttributes( { buttonText: html } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={ handleButtonClick }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t};\n\n\tconst controls = (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ttitle={ __( 'Toggle search label' ) }\n\t\t\t\t\t\ticon={ toggleLabel }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowLabel: ! showLabel,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tclassName={ showLabel ? 'is-pressed' : undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolbarDropdownMenu\n\t\t\t\t\t\ticon={ getButtonPositionIcon() }\n\t\t\t\t\t\tlabel={ __( 'Change button position' ) }\n\t\t\t\t\t\tcontrols={ buttonPositionControls }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! hasNoButton && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\ttitle={ __( 'Use button with icon' ) }\n\t\t\t\t\t\t\ticon={ buttonWithIcon }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tbuttonUseIcon: ! buttonUseIcon,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\tbuttonUseIcon ? 'is-pressed' : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolbarGroup>\n\t\t\t</BlockControls>\n\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Display Settings' ) }>\n\t\t\t\t\t<BaseControl\n\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\tid={ unitControlInputId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tid={ unitControlInputId }\n\t\t\t\t\t\t\tmin={ `${ MIN_WIDTH }${ MIN_WIDTH_UNIT }` }\n\t\t\t\t\t\t\tonChange={ ( newWidth ) => {\n\t\t\t\t\t\t\t\tconst filteredWidth =\n\t\t\t\t\t\t\t\t\twidthUnit === '%' &&\n\t\t\t\t\t\t\t\t\tparseInt( newWidth, 10 ) > 100\n\t\t\t\t\t\t\t\t\t\t? 100\n\t\t\t\t\t\t\t\t\t\t: newWidth;\n\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\twidth: parseInt( filteredWidth, 10 ),\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonUnitChange={ ( newUnit ) => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\t\t\t\t'%' === newUnit\n\t\t\t\t\t\t\t\t\t\t\t? PC_WIDTH_DEFAULT\n\t\t\t\t\t\t\t\t\t\t\t: PX_WIDTH_DEFAULT,\n\t\t\t\t\t\t\t\t\twidthUnit: newUnit,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t__unstableInputWidth={ '80px' }\n\t\t\t\t\t\t\tvalue={ `${ width }${ widthUnit }` }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<ButtonGroup\n\t\t\t\t\t\t\tclassName=\"wp-block-search__components-button-group\"\n\t\t\t\t\t\t\taria-label={ __( 'Percentage Width' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ [ 25, 50, 75, 100 ].map( ( widthValue ) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tkey={ widthValue }\n\t\t\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\twidthValue === width &&\n\t\t\t\t\t\t\t\t\t\t\twidthUnit === '%'\n\t\t\t\t\t\t\t\t\t\t\t\t? 'primary'\n\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\t\twidth: widthValue,\n\t\t\t\t\t\t\t\t\t\t\t\twidthUnit: '%',\n\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ widthValue }%\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t</ButtonGroup>\n\t\t\t\t\t</BaseControl>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n\n\tconst padBorderRadius = ( radius ) =>\n\t\tradius ? `calc(${ radius } + ${ DEFAULT_INNER_PADDING })` : undefined;\n\n\tconst getWrapperStyles = () => {\n\t\tconst styles = isButtonPositionInside\n\t\t\t? borderProps.style\n\t\t\t: {\n\t\t\t\t\tborderRadius: borderProps.style?.borderRadius,\n\t\t\t\t\tborderTopLeftRadius: borderProps.style?.borderTopLeftRadius,\n\t\t\t\t\tborderTopRightRadius:\n\t\t\t\t\t\tborderProps.style?.borderTopRightRadius,\n\t\t\t\t\tborderBottomLeftRadius:\n\t\t\t\t\t\tborderProps.style?.borderBottomLeftRadius,\n\t\t\t\t\tborderBottomRightRadius:\n\t\t\t\t\t\tborderProps.style?.borderBottomRightRadius,\n\t\t\t };\n\n\t\tconst isNonZeroBorderRadius =\n\t\t\tborderRadius !== undefined && parseInt( borderRadius, 10 ) !== 0;\n\n\t\tif ( isButtonPositionInside && isNonZeroBorderRadius ) {\n\t\t\t// We have button inside wrapper and a border radius value to apply.\n\t\t\t// Add default padding so we don't get \"fat\" corners.\n\t\t\t//\n\t\t\t// CSS calc() is used here to support non-pixel units. The inline\n\t\t\t// style using calc() will only apply if both values have units.\n\n\t\t\tif ( typeof borderRadius === 'object' ) {\n\t\t\t\t// Individual corner border radii present.\n\t\t\t\tconst { topLeft, topRight, bottomLeft, bottomRight } =\n\t\t\t\t\tborderRadius;\n\n\t\t\t\treturn {\n\t\t\t\t\t...styles,\n\t\t\t\t\tborderTopLeftRadius: padBorderRadius( topLeft ),\n\t\t\t\t\tborderTopRightRadius: padBorderRadius( topRight ),\n\t\t\t\t\tborderBottomLeftRadius: padBorderRadius( bottomLeft ),\n\t\t\t\t\tborderBottomRightRadius: padBorderRadius( bottomRight ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// The inline style using calc() will only apply if both values\n\t\t\t// supplied to calc() have units. Deprecated block's may have\n\t\t\t// unitless integer.\n\t\t\tconst radius = Number.isInteger( borderRadius )\n\t\t\t\t? `${ borderRadius }px`\n\t\t\t\t: borderRadius;\n\n\t\t\tstyles.borderRadius = `calc(${ radius } + ${ DEFAULT_INNER_PADDING })`;\n\t\t}\n\n\t\treturn styles;\n\t};\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: getBlockClassNames(),\n\t\tstyle: {\n\t\t\t...typographyProps.style,\n\t\t\t// Input opts out of text decoration.\n\t\t\ttextDecoration: undefined,\n\t\t},\n\t} );\n\n\tconst labelClassnames = classnames(\n\t\t'wp-block-search__label',\n\t\ttypographyProps.className\n\t);\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t{ controls }\n\n\t\t\t{ showLabel && (\n\t\t\t\t<RichText\n\t\t\t\t\tclassName={ labelClassnames }\n\t\t\t\t\taria-label={ __( 'Label text' ) }\n\t\t\t\t\tplaceholder={ __( 'Add label…' ) }\n\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\tonChange={ ( html ) => setAttributes( { label: html } ) }\n\t\t\t\t\tstyle={ typographyProps.style }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<ResizableBox\n\t\t\t\tsize={ {\n\t\t\t\t\twidth: `${ width }${ widthUnit }`,\n\t\t\t\t} }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'wp-block-search__inside-wrapper',\n\t\t\t\t\tisButtonPositionInside ? borderProps.className : undefined\n\t\t\t\t) }\n\t\t\t\tstyle={ getWrapperStyles() }\n\t\t\t\tminWidth={ MIN_WIDTH }\n\t\t\t\tenable={ getResizableSides() }\n\t\t\t\tonResizeStart={ ( event, direction, elt ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: parseInt( elt.offsetWidth, 10 ),\n\t\t\t\t\t\twidthUnit: 'px',\n\t\t\t\t\t} );\n\t\t\t\t\ttoggleSelection( false );\n\t\t\t\t} }\n\t\t\t\tonResizeStop={ ( event, direction, elt, delta ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: parseInt( width + delta.width, 10 ),\n\t\t\t\t\t} );\n\t\t\t\t\ttoggleSelection( true );\n\t\t\t\t} }\n\t\t\t\tshowHandle={ isSelected }\n\t\t\t>\n\t\t\t\t{ ( isButtonPositionInside ||\n\t\t\t\t\tisButtonPositionOutside ||\n\t\t\t\t\thasOnlyButton ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ renderTextField() }\n\t\t\t\t\t\t{ renderButton() }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\n\t\t\t\t{ hasNoButton && renderTextField() }\n\t\t\t</ResizableBox>\n\t\t</div>\n\t);\n}\n"]}
@@ -9,8 +9,6 @@ exports.default = SearchEdit;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _reactNative = require("react-native");
15
13
 
16
14
  var _classnames = _interopRequireDefault(require("classnames"));
@@ -307,11 +305,11 @@ function SearchEdit({
307
305
  const renderButton = () => {
308
306
  return (0, _element.createElement)(_reactNative.View, {
309
307
  style: richTextButtonContainerStyle
310
- }, buttonUseIcon && (0, _element.createElement)(_components.Icon, (0, _extends2.default)({
311
- icon: _icons.search
312
- }, iconStyles, {
308
+ }, buttonUseIcon && (0, _element.createElement)(_components.Icon, {
309
+ icon: _icons.search,
310
+ ...iconStyles,
313
311
  onLayout: onLayoutButton
314
- })), !buttonUseIcon && (0, _element.createElement)(_reactNative.View, {
312
+ }), !buttonUseIcon && (0, _element.createElement)(_reactNative.View, {
315
313
  accessible: true,
316
314
  accessibilityRole: "none",
317
315
  accessibilityHint: isScreenReaderEnabled ? (0, _i18n.__)('Double tap to edit button text') : undefined,
@@ -343,11 +341,11 @@ function SearchEdit({
343
341
  })));
344
342
  };
345
343
 
346
- return (0, _element.createElement)(_reactNative.View, (0, _extends2.default)({}, blockProps, {
344
+ return (0, _element.createElement)(_reactNative.View, { ...blockProps,
347
345
  style: _style.default.searchBlockContainer,
348
346
  importantForAccessibility: isSelected ? 'yes' : 'no-hide-descendants',
349
347
  accessibilityElementsHidden: isSelected ? false : true
350
- }), isSelected && controls, showLabel && (0, _element.createElement)(_reactNative.View, {
348
+ }, isSelected && controls, showLabel && (0, _element.createElement)(_reactNative.View, {
351
349
  accessible: true,
352
350
  accessibilityRole: "none",
353
351
  accessibilityHint: isScreenReaderEnabled ? (0, _i18n.__)('Double tap to edit label text') : undefined,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/search/edit.native.js"],"names":["MIN_BUTTON_WIDTH","MARGINS","styles","widthMargin","marginLeft","paddingLeft","BUTTON_OPTIONS","value","label","useIsScreenReaderEnabled","isScreenReaderEnabled","setIsScreenReaderEnabled","mounted","changeListener","AccessibilityInfo","addEventListener","enabled","then","screenReaderEnabled","remove","SearchEdit","onFocus","isSelected","attributes","setAttributes","className","blockWidth","style","isButtonSelected","setIsButtonSelected","isLabelSelected","setIsLabelSelected","isPlaceholderSelected","setIsPlaceholderSelected","isLongButton","setIsLongButton","buttonWidth","setButtonWidth","textInputRef","showLabel","buttonPosition","buttonUseIcon","placeholder","buttonText","hasTextInput","current","blur","maxButtonWidth","Math","floor","tempIsLongButton","onLayoutButton","nativeEvent","width","layout","getBlockClassNames","undefined","getSelectedButtonPositionLabel","option","blockProps","controls","position","isButtonInside","borderStyle","border","borderDark","inputStyle","plainTextInput","plainTextInputDark","baseColors","color","text","placeholderStyle","plainTextPlaceholder","plainTextPlaceholderDark","searchBarStyle","searchBarContainer","flexDirection","getAccessibilityLabelForButton","getAccessibilityLabelForPlaceholder","title","description","getAccessibilityLabelForLabel","renderTextField","searchInputContainer","newVal","buttonPlaceholderText","baseButtonStyles","blocks","richTextButtonContainerStyle","buttonContainer","buttonContainerWide","background","backgroundColor","borderWidth","richTextButtonStyle","richTextButton","placeholderColor","iconStyles","icon","fill","renderButton","search","html","richTextButtonCursor","searchBlockContainer","richTextLabel"],"mappings":";;;;;;;;;AAuBA;;;;AApBA;;AACA;;AAKA;;AAMA;;AAMA;;AACA;;AAEA;;AAKA;;AA7BA;AACA;AACA;;AA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B,MAN7B;AAOC,IAAA,KAAK,EAAGlG,KAPT;AAQC,IAAA,QAAQ,EAAK+F,IAAF,IACV/E,aAAa,CAAE;AAAEhB,MAAAA,KAAK,EAAE+F;AAAT,KAAF,CATf;AAWC,IAAA,UAAU,EAAGzE,eAXd;AAYC,IAAA,8BAA8B,EAAG,CAAER,UAZpC;AAaC,IAAA,eAAe,EAAG,MAAM;AACvBS,MAAAA,kBAAkB,CAAE,IAAF,CAAlB;AACA,KAfF;AAgBC,IAAA,MAAM,EAAG,MAAM;AACdA,MAAAA,kBAAkB,CAAE,KAAF,CAAlB;AACA,KAlBF;AAmBC,IAAA,cAAc,EAAG7B,eAAOsG,oBAAP,EAA6BlC;AAnB/C,IAVD,CAXF,EA6CG,CAAE,oBAAoB9B,cAApB,IACH,qBAAqBA,cADpB,KAED,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGmC;AAAd,KACGQ,eAAe,EADlB,EAEGkB,YAAY,EAFf,CA/CF,EAqDG,kBAAkB7D,cAAlB,IAAoC6D,YAAY,EArDnD,EAsDG,gBAAgB7D,cAAhB,IAAkC2C,eAAe,EAtDpD,CADD;AA0DA","sourcesContent":["/**\n * External dependencies\n */\nimport { View, AccessibilityInfo } from 'react-native';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tPlainText,\n\tuseBlockProps,\n\tInspectorControls,\n} from '@wordpress/block-editor';\nimport {\n\tPanelBody,\n\tSelectControl,\n\tToggleControl,\n\tIcon,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { search } from '@wordpress/icons';\nimport { useRef, useEffect, useState } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\n/**\n * Constants\n */\nconst MIN_BUTTON_WIDTH = 75;\nconst MARGINS =\n\tstyles.widthMargin?.marginLeft + styles.widthMargin?.paddingLeft;\n\nconst BUTTON_OPTIONS = [\n\t{ value: 'button-inside', label: __( 'Button inside' ) },\n\t{ value: 'button-outside', label: __( 'Button outside' ) },\n\t{ value: 'no-button', label: __( 'No button' ) },\n];\n\nfunction useIsScreenReaderEnabled() {\n\tconst [ isScreenReaderEnabled, setIsScreenReaderEnabled ] =\n\t\tuseState( false );\n\n\tuseEffect( () => {\n\t\tlet mounted = true;\n\n\t\tconst changeListener = AccessibilityInfo.addEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\t( enabled ) => setIsScreenReaderEnabled( enabled )\n\t\t);\n\n\t\tAccessibilityInfo.isScreenReaderEnabled().then(\n\t\t\t( screenReaderEnabled ) => {\n\t\t\t\tif ( mounted && screenReaderEnabled ) {\n\t\t\t\t\tsetIsScreenReaderEnabled( screenReaderEnabled );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn () => {\n\t\t\tmounted = false;\n\n\t\t\tchangeListener.remove();\n\t\t};\n\t}, [] );\n\n\treturn isScreenReaderEnabled;\n}\n\nexport default function SearchEdit( {\n\tonFocus,\n\tisSelected,\n\tattributes,\n\tsetAttributes,\n\tclassName,\n\tblockWidth,\n\tstyle,\n} ) {\n\tconst [ isButtonSelected, setIsButtonSelected ] = useState( false );\n\tconst [ isLabelSelected, setIsLabelSelected ] = useState( false );\n\tconst [ isPlaceholderSelected, setIsPlaceholderSelected ] =\n\t\tuseState( false );\n\tconst [ isLongButton, setIsLongButton ] = useState( false );\n\tconst [ buttonWidth, setButtonWidth ] = useState( MIN_BUTTON_WIDTH );\n\tconst isScreenReaderEnabled = useIsScreenReaderEnabled();\n\n\tconst textInputRef = useRef( null );\n\n\tconst {\n\t\tlabel,\n\t\tshowLabel,\n\t\tbuttonPosition,\n\t\tbuttonUseIcon,\n\t\tplaceholder,\n\t\tbuttonText,\n\t} = attributes;\n\n\t/*\n\t * Called when the value of isSelected changes. Blurs the PlainText component\n\t * used by the placeholder when this block loses focus.\n\t */\n\tuseEffect( () => {\n\t\tif ( hasTextInput() && isPlaceholderSelected && ! isSelected ) {\n\t\t\ttextInputRef.current.blur();\n\t\t}\n\t}, [ isSelected ] );\n\n\tuseEffect( () => {\n\t\tconst maxButtonWidth = Math.floor( blockWidth / 2 - MARGINS );\n\t\tconst tempIsLongButton = buttonWidth > maxButtonWidth;\n\n\t\t// Update this value only if it has changed to avoid flickering.\n\t\tif ( isLongButton !== tempIsLongButton ) {\n\t\t\tsetIsLongButton( tempIsLongButton );\n\t\t}\n\t}, [ blockWidth, buttonWidth ] );\n\n\tconst hasTextInput = () => {\n\t\treturn textInputRef && textInputRef.current;\n\t};\n\n\tconst onLayoutButton = ( { nativeEvent } ) => {\n\t\tconst { width } = nativeEvent?.layout;\n\n\t\tif ( width ) {\n\t\t\tsetButtonWidth( width );\n\t\t}\n\t};\n\n\tconst getBlockClassNames = () => {\n\t\treturn classnames(\n\t\t\tclassName,\n\t\t\t'button-inside' === buttonPosition\n\t\t\t\t? 'wp-block-search__button-inside'\n\t\t\t\t: undefined,\n\t\t\t'button-outside' === buttonPosition\n\t\t\t\t? 'wp-block-search__button-outside'\n\t\t\t\t: undefined,\n\t\t\t'no-button' === buttonPosition\n\t\t\t\t? 'wp-block-search__no-button'\n\t\t\t\t: undefined,\n\t\t\t'button-only' === buttonPosition\n\t\t\t\t? 'wp-block-search__button-only'\n\t\t\t\t: undefined,\n\t\t\t! buttonUseIcon && 'no-button' !== buttonPosition\n\t\t\t\t? 'wp-block-search__text-button'\n\t\t\t\t: undefined,\n\t\t\tbuttonUseIcon && 'no-button' !== buttonPosition\n\t\t\t\t? 'wp-block-search__icon-button'\n\t\t\t\t: undefined\n\t\t);\n\t};\n\n\tconst getSelectedButtonPositionLabel = ( option ) => {\n\t\tswitch ( option ) {\n\t\t\tcase 'button-inside':\n\t\t\t\treturn __( 'Inside' );\n\t\t\tcase 'button-outside':\n\t\t\t\treturn __( 'Outside' );\n\t\t\tcase 'no-button':\n\t\t\t\treturn __( 'No button' );\n\t\t}\n\t};\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: getBlockClassNames(),\n\t} );\n\n\tconst controls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Search settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Hide search heading' ) }\n\t\t\t\t\tchecked={ ! showLabel }\n\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tshowLabel: ! showLabel,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Button position' ) }\n\t\t\t\t\tvalue={ getSelectedButtonPositionLabel( buttonPosition ) }\n\t\t\t\t\tonChange={ ( position ) => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tbuttonPosition: position,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\toptions={ BUTTON_OPTIONS }\n\t\t\t\t\thideCancelButton={ true }\n\t\t\t\t/>\n\t\t\t\t{ buttonPosition !== 'no-button' && (\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Use icon button' ) }\n\t\t\t\t\t\tchecked={ buttonUseIcon }\n\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tbuttonUseIcon: ! buttonUseIcon,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst isButtonInside = buttonPosition === 'button-inside';\n\n\tconst borderStyle = usePreferredColorSchemeStyle(\n\t\tstyles.border,\n\t\tstyles.borderDark\n\t);\n\n\tconst inputStyle = [\n\t\t! isButtonInside && borderStyle,\n\t\tusePreferredColorSchemeStyle(\n\t\t\tstyles.plainTextInput,\n\t\t\tstyles.plainTextInputDark\n\t\t),\n\t\tstyle?.baseColors?.color && { color: style?.baseColors?.color?.text },\n\t];\n\n\tconst placeholderStyle = {\n\t\t...usePreferredColorSchemeStyle(\n\t\t\tstyles.plainTextPlaceholder,\n\t\t\tstyles.plainTextPlaceholderDark\n\t\t),\n\t\t...( style?.baseColors?.color && {\n\t\t\tcolor: style?.baseColors?.color?.text,\n\t\t} ),\n\t};\n\n\tconst searchBarStyle = [\n\t\tstyles.searchBarContainer,\n\t\tisButtonInside && borderStyle,\n\t\tisLongButton && { flexDirection: 'column' },\n\t];\n\n\t/**\n\t * If a screenreader is enabled, create a descriptive label for this field. If\n\t * not, return a label that is used during automated UI tests.\n\t *\n\t * @return {string} The accessibilityLabel for the Search Button\n\t */\n\tconst getAccessibilityLabelForButton = () => {\n\t\tif ( ! isScreenReaderEnabled ) {\n\t\t\treturn 'search-block-button';\n\t\t}\n\n\t\treturn `${ __(\n\t\t\t'Search button. Current button text is'\n\t\t) } ${ buttonText }`;\n\t};\n\n\t/**\n\t * If a screenreader is enabled, create a descriptive label for this field. If\n\t * not, return a label that is used during automated UI tests.\n\t *\n\t * @return {string} The accessibilityLabel for the Search Input\n\t * \t\t\t\t\t placeholder field.\n\t */\n\tconst getAccessibilityLabelForPlaceholder = () => {\n\t\tif ( ! isScreenReaderEnabled ) {\n\t\t\treturn 'search-block-input';\n\t\t}\n\n\t\tconst title = __( 'Search input field.' );\n\t\tconst description = placeholder\n\t\t\t? `${ __( 'Current placeholder text is' ) } ${ placeholder }`\n\t\t\t: __( 'No custom placeholder set' );\n\t\treturn `${ title } ${ description }`;\n\t};\n\n\t/**\n\t * If a screenreader is enabled, create a descriptive label for this field. If\n\t * not, return a label that is used during automated UI tests.\n\t *\n\t * @return {string} The accessibilityLabel for the Search Label field\n\t */\n\tconst getAccessibilityLabelForLabel = () => {\n\t\tif ( ! isScreenReaderEnabled ) {\n\t\t\treturn 'search-block-label';\n\t\t}\n\n\t\treturn `${ __( 'Search block label. Current text is' ) } ${ label }`;\n\t};\n\n\tconst renderTextField = () => {\n\t\treturn (\n\t\t\t<View\n\t\t\t\tstyle={ styles.searchInputContainer }\n\t\t\t\taccessible={ true }\n\t\t\t\taccessibilityRole=\"none\"\n\t\t\t\taccessibilityHint={\n\t\t\t\t\tisScreenReaderEnabled\n\t\t\t\t\t\t? __( 'Double tap to edit placeholder text' )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\taccessibilityLabel={ getAccessibilityLabelForPlaceholder() }\n\t\t\t>\n\t\t\t\t<PlainText\n\t\t\t\t\tref={ textInputRef }\n\t\t\t\t\tisSelected={ isPlaceholderSelected }\n\t\t\t\t\tclassName=\"wp-block-search__input\"\n\t\t\t\t\tstyle={ inputStyle }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tellipsizeMode=\"tail\" // Currently only works on ios.\n\t\t\t\t\tlabel={ null }\n\t\t\t\t\tvalue={ placeholder }\n\t\t\t\t\tplaceholder={\n\t\t\t\t\t\tplaceholder ? undefined : __( 'Optional placeholder…' )\n\t\t\t\t\t}\n\t\t\t\t\tonChange={ ( newVal ) =>\n\t\t\t\t\t\tsetAttributes( { placeholder: newVal } )\n\t\t\t\t\t}\n\t\t\t\t\tonFocus={ () => {\n\t\t\t\t\t\tsetIsPlaceholderSelected( true );\n\t\t\t\t\t\tonFocus();\n\t\t\t\t\t} }\n\t\t\t\t\tonBlur={ () => setIsPlaceholderSelected( false ) }\n\t\t\t\t\tplaceholderTextColor={ placeholderStyle?.color }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t};\n\n\t// To achieve proper expanding and shrinking `RichText` on Android, there is a need to set\n\t// a `placeholder` as an empty string when `RichText` is focused,\n\t// because `AztecView` is calculating a `minWidth` based on placeholder text.\n\tconst buttonPlaceholderText =\n\t\tisButtonSelected ||\n\t\t( ! isButtonSelected && buttonText && buttonText !== '' )\n\t\t\t? ''\n\t\t\t: __( 'Add button text' );\n\n\tconst baseButtonStyles = {\n\t\t...style?.baseColors?.blocks?.[ 'core/button' ]?.color,\n\t\t...attributes?.style?.color,\n\t\t...( style?.color && { text: style.color } ),\n\t};\n\n\tconst richTextButtonContainerStyle = [\n\t\tstyles.buttonContainer,\n\t\tisLongButton && styles.buttonContainerWide,\n\t\tbaseButtonStyles?.background && {\n\t\t\tbackgroundColor: baseButtonStyles.background,\n\t\t\tborderWidth: 0,\n\t\t},\n\t\tstyle?.backgroundColor && {\n\t\t\tbackgroundColor: style.backgroundColor,\n\t\t\tborderWidth: 0,\n\t\t},\n\t];\n\n\tconst richTextButtonStyle = {\n\t\t...styles.richTextButton,\n\t\t...( baseButtonStyles?.text && {\n\t\t\tcolor: baseButtonStyles.text,\n\t\t\tplaceholderColor: baseButtonStyles.text,\n\t\t} ),\n\t};\n\n\tconst iconStyles = {\n\t\t...styles.icon,\n\t\t...( baseButtonStyles?.text && { fill: baseButtonStyles.text } ),\n\t};\n\n\tconst renderButton = () => {\n\t\treturn (\n\t\t\t<View style={ richTextButtonContainerStyle }>\n\t\t\t\t{ buttonUseIcon && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t{ ...iconStyles }\n\t\t\t\t\t\tonLayout={ onLayoutButton }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ ! buttonUseIcon && (\n\t\t\t\t\t<View\n\t\t\t\t\t\taccessible={ true }\n\t\t\t\t\t\taccessibilityRole=\"none\"\n\t\t\t\t\t\taccessibilityHint={\n\t\t\t\t\t\t\tisScreenReaderEnabled\n\t\t\t\t\t\t\t\t? __( 'Double tap to edit button text' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taccessibilityLabel={ getAccessibilityLabelForButton() }\n\t\t\t\t\t\tonLayout={ onLayoutButton }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tclassName=\"wp-block-search__button\"\n\t\t\t\t\t\t\tidentifier=\"text\"\n\t\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\t\tstyle={ richTextButtonStyle }\n\t\t\t\t\t\t\tplaceholder={ buttonPlaceholderText }\n\t\t\t\t\t\t\tvalue={ buttonText }\n\t\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\t\tonChange={ ( html ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { buttonText: html } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tminWidth={ MIN_BUTTON_WIDTH }\n\t\t\t\t\t\t\tmaxWidth={ blockWidth - MARGINS }\n\t\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t\t\tisSelected={ isButtonSelected }\n\t\t\t\t\t\t\t__unstableMobileNoFocusOnMount={ ! isSelected }\n\t\t\t\t\t\t\tunstableOnFocus={ () => {\n\t\t\t\t\t\t\t\tsetIsButtonSelected( true );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\t\t\tsetIsButtonSelected( false );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tselectionColor={\n\t\t\t\t\t\t\t\tstyles.richTextButtonCursor?.color\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t) }\n\t\t\t</View>\n\t\t);\n\t};\n\n\treturn (\n\t\t<View\n\t\t\t{ ...blockProps }\n\t\t\tstyle={ styles.searchBlockContainer }\n\t\t\timportantForAccessibility={\n\t\t\t\tisSelected ? 'yes' : 'no-hide-descendants'\n\t\t\t}\n\t\t\taccessibilityElementsHidden={ isSelected ? false : true }\n\t\t>\n\t\t\t{ isSelected && controls }\n\n\t\t\t{ showLabel && (\n\t\t\t\t<View\n\t\t\t\t\taccessible={ true }\n\t\t\t\t\taccessibilityRole=\"none\"\n\t\t\t\t\taccessibilityHint={\n\t\t\t\t\t\tisScreenReaderEnabled\n\t\t\t\t\t\t\t? __( 'Double tap to edit label text' )\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\taccessibilityLabel={ getAccessibilityLabelForLabel() }\n\t\t\t\t>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tclassName=\"wp-block-search__label\"\n\t\t\t\t\t\tidentifier=\"text\"\n\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\tstyle={ styles.richTextLabel }\n\t\t\t\t\t\tplaceholder={ __( 'Add label…' ) }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\tonChange={ ( html ) =>\n\t\t\t\t\t\t\tsetAttributes( { label: html } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisSelected={ isLabelSelected }\n\t\t\t\t\t\t__unstableMobileNoFocusOnMount={ ! isSelected }\n\t\t\t\t\t\tunstableOnFocus={ () => {\n\t\t\t\t\t\t\tsetIsLabelSelected( true );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\t\tsetIsLabelSelected( false );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tselectionColor={ styles.richTextButtonCursor?.color }\n\t\t\t\t\t/>\n\t\t\t\t</View>\n\t\t\t) }\n\n\t\t\t{ ( 'button-inside' === buttonPosition ||\n\t\t\t\t'button-outside' === buttonPosition ) && (\n\t\t\t\t<View style={ searchBarStyle }>\n\t\t\t\t\t{ renderTextField() }\n\t\t\t\t\t{ renderButton() }\n\t\t\t\t</View>\n\t\t\t) }\n\n\t\t\t{ 'button-only' === buttonPosition && renderButton() }\n\t\t\t{ 'no-button' === buttonPosition && renderTextField() }\n\t\t</View>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/search/edit.native.js"],"names":["MIN_BUTTON_WIDTH","MARGINS","styles","widthMargin","marginLeft","paddingLeft","BUTTON_OPTIONS","value","label","useIsScreenReaderEnabled","isScreenReaderEnabled","setIsScreenReaderEnabled","mounted","changeListener","AccessibilityInfo","addEventListener","enabled","then","screenReaderEnabled","remove","SearchEdit","onFocus","isSelected","attributes","setAttributes","className","blockWidth","style","isButtonSelected","setIsButtonSelected","isLabelSelected","setIsLabelSelected","isPlaceholderSelected","setIsPlaceholderSelected","isLongButton","setIsLongButton","buttonWidth","setButtonWidth","textInputRef","showLabel","buttonPosition","buttonUseIcon","placeholder","buttonText","hasTextInput","current","blur","maxButtonWidth","Math","floor","tempIsLongButton","onLayoutButton","nativeEvent","width","layout","getBlockClassNames","undefined","getSelectedButtonPositionLabel","option","blockProps","controls","position","isButtonInside","borderStyle","border","borderDark","inputStyle","plainTextInput","plainTextInputDark","baseColors","color","text","placeholderStyle","plainTextPlaceholder","plainTextPlaceholderDark","searchBarStyle","searchBarContainer","flexDirection","getAccessibilityLabelForButton","getAccessibilityLabelForPlaceholder","title","description","getAccessibilityLabelForLabel","renderTextField","searchInputContainer","newVal","buttonPlaceholderText","baseButtonStyles","blocks","richTextButtonContainerStyle","buttonContainer","buttonContainerWide","background","backgroundColor","borderWidth","richTextButtonStyle","richTextButton","placeholderColor","iconStyles","icon","fill","renderButton","search","html","richTextButtonCursor","searchBlockContainer","richTextLabel"],"mappings":";;;;;;;;;AAuBA;;AApBA;;AACA;;AAKA;;AAMA;;AAMA;;AACA;;AAEA;;AAKA;;AA7BA;AACA;AACA;;AAIA;AACA;AACA;;AAkBA;AACA;AACA;;AAGA;AACA;AACA;AACA,MAAMA,gBAAgB,GAAG,EAAzB;AACA,MAAMC,OAAO,GACZC,eAAOC,WAAP,EAAoBC,UAApB,GAAiCF,eAAOC,WAAP,EAAoBE,WADtD;AAGA,MAAMC,cAAc,GAAG,CACtB;AAAEC,EAAAA,KAAK,EAAE,eAAT;AAA0BC,EAAAA,KAAK,EAAE,cAAI,eAAJ;AAAjC,CADsB,EAEtB;AAAED,EAAAA,KAAK,EAAE,gBAAT;AAA2BC,EAAAA,KAAK,EAAE,cAAI,gBAAJ;AAAlC,CAFsB,EAGtB;AAAED,EAAAA,KAAK,EAAE,WAAT;AAAsBC,EAAAA,KAAK,EAAE,cAAI,WAAJ;AAA7B,CAHsB,CAAvB;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AApB,IACH,qBAAqBA,cADpB,KAED,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGmC;AAAd,KACGQ,eAAe,EADlB,EAEGkB,YAAY,EAFf,CA/CF,EAqDG,kBAAkB7D,cAAlB,IAAoC6D,YAAY,EArDnD,EAsDG,gBAAgB7D,cAAhB,IAAkC2C,eAAe,EAtDpD,CADD;AA0DA","sourcesContent":["/**\n * External dependencies\n */\nimport { View, AccessibilityInfo } from 'react-native';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tPlainText,\n\tuseBlockProps,\n\tInspectorControls,\n} from '@wordpress/block-editor';\nimport {\n\tPanelBody,\n\tSelectControl,\n\tToggleControl,\n\tIcon,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { search } from '@wordpress/icons';\nimport { useRef, useEffect, useState } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\n/**\n * Constants\n */\nconst MIN_BUTTON_WIDTH = 75;\nconst MARGINS =\n\tstyles.widthMargin?.marginLeft + styles.widthMargin?.paddingLeft;\n\nconst BUTTON_OPTIONS = [\n\t{ value: 'button-inside', label: __( 'Button inside' ) },\n\t{ value: 'button-outside', label: __( 'Button outside' ) },\n\t{ value: 'no-button', label: __( 'No button' ) },\n];\n\nfunction useIsScreenReaderEnabled() {\n\tconst [ isScreenReaderEnabled, setIsScreenReaderEnabled ] =\n\t\tuseState( false );\n\n\tuseEffect( () => {\n\t\tlet mounted = true;\n\n\t\tconst changeListener = AccessibilityInfo.addEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\t( enabled ) => setIsScreenReaderEnabled( enabled )\n\t\t);\n\n\t\tAccessibilityInfo.isScreenReaderEnabled().then(\n\t\t\t( screenReaderEnabled ) => {\n\t\t\t\tif ( mounted && screenReaderEnabled ) {\n\t\t\t\t\tsetIsScreenReaderEnabled( screenReaderEnabled );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn () => {\n\t\t\tmounted = false;\n\n\t\t\tchangeListener.remove();\n\t\t};\n\t}, [] );\n\n\treturn isScreenReaderEnabled;\n}\n\nexport default function SearchEdit( {\n\tonFocus,\n\tisSelected,\n\tattributes,\n\tsetAttributes,\n\tclassName,\n\tblockWidth,\n\tstyle,\n} ) {\n\tconst [ isButtonSelected, setIsButtonSelected ] = useState( false );\n\tconst [ isLabelSelected, setIsLabelSelected ] = useState( false );\n\tconst [ isPlaceholderSelected, setIsPlaceholderSelected ] =\n\t\tuseState( false );\n\tconst [ isLongButton, setIsLongButton ] = useState( false );\n\tconst [ buttonWidth, setButtonWidth ] = useState( MIN_BUTTON_WIDTH );\n\tconst isScreenReaderEnabled = useIsScreenReaderEnabled();\n\n\tconst textInputRef = useRef( null );\n\n\tconst {\n\t\tlabel,\n\t\tshowLabel,\n\t\tbuttonPosition,\n\t\tbuttonUseIcon,\n\t\tplaceholder,\n\t\tbuttonText,\n\t} = attributes;\n\n\t/*\n\t * Called when the value of isSelected changes. Blurs the PlainText component\n\t * used by the placeholder when this block loses focus.\n\t */\n\tuseEffect( () => {\n\t\tif ( hasTextInput() && isPlaceholderSelected && ! isSelected ) {\n\t\t\ttextInputRef.current.blur();\n\t\t}\n\t}, [ isSelected ] );\n\n\tuseEffect( () => {\n\t\tconst maxButtonWidth = Math.floor( blockWidth / 2 - MARGINS );\n\t\tconst tempIsLongButton = buttonWidth > maxButtonWidth;\n\n\t\t// Update this value only if it has changed to avoid flickering.\n\t\tif ( isLongButton !== tempIsLongButton ) {\n\t\t\tsetIsLongButton( tempIsLongButton );\n\t\t}\n\t}, [ blockWidth, buttonWidth ] );\n\n\tconst hasTextInput = () => {\n\t\treturn textInputRef && textInputRef.current;\n\t};\n\n\tconst onLayoutButton = ( { nativeEvent } ) => {\n\t\tconst { width } = nativeEvent?.layout;\n\n\t\tif ( width ) {\n\t\t\tsetButtonWidth( width );\n\t\t}\n\t};\n\n\tconst getBlockClassNames = () => {\n\t\treturn classnames(\n\t\t\tclassName,\n\t\t\t'button-inside' === buttonPosition\n\t\t\t\t? 'wp-block-search__button-inside'\n\t\t\t\t: undefined,\n\t\t\t'button-outside' === buttonPosition\n\t\t\t\t? 'wp-block-search__button-outside'\n\t\t\t\t: undefined,\n\t\t\t'no-button' === buttonPosition\n\t\t\t\t? 'wp-block-search__no-button'\n\t\t\t\t: undefined,\n\t\t\t'button-only' === buttonPosition\n\t\t\t\t? 'wp-block-search__button-only'\n\t\t\t\t: undefined,\n\t\t\t! buttonUseIcon && 'no-button' !== buttonPosition\n\t\t\t\t? 'wp-block-search__text-button'\n\t\t\t\t: undefined,\n\t\t\tbuttonUseIcon && 'no-button' !== buttonPosition\n\t\t\t\t? 'wp-block-search__icon-button'\n\t\t\t\t: undefined\n\t\t);\n\t};\n\n\tconst getSelectedButtonPositionLabel = ( option ) => {\n\t\tswitch ( option ) {\n\t\t\tcase 'button-inside':\n\t\t\t\treturn __( 'Inside' );\n\t\t\tcase 'button-outside':\n\t\t\t\treturn __( 'Outside' );\n\t\t\tcase 'no-button':\n\t\t\t\treturn __( 'No button' );\n\t\t}\n\t};\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: getBlockClassNames(),\n\t} );\n\n\tconst controls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Search settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Hide search heading' ) }\n\t\t\t\t\tchecked={ ! showLabel }\n\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tshowLabel: ! showLabel,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Button position' ) }\n\t\t\t\t\tvalue={ getSelectedButtonPositionLabel( buttonPosition ) }\n\t\t\t\t\tonChange={ ( position ) => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tbuttonPosition: position,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\toptions={ BUTTON_OPTIONS }\n\t\t\t\t\thideCancelButton={ true }\n\t\t\t\t/>\n\t\t\t\t{ buttonPosition !== 'no-button' && (\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Use icon button' ) }\n\t\t\t\t\t\tchecked={ buttonUseIcon }\n\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tbuttonUseIcon: ! buttonUseIcon,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst isButtonInside = buttonPosition === 'button-inside';\n\n\tconst borderStyle = usePreferredColorSchemeStyle(\n\t\tstyles.border,\n\t\tstyles.borderDark\n\t);\n\n\tconst inputStyle = [\n\t\t! isButtonInside && borderStyle,\n\t\tusePreferredColorSchemeStyle(\n\t\t\tstyles.plainTextInput,\n\t\t\tstyles.plainTextInputDark\n\t\t),\n\t\tstyle?.baseColors?.color && { color: style?.baseColors?.color?.text },\n\t];\n\n\tconst placeholderStyle = {\n\t\t...usePreferredColorSchemeStyle(\n\t\t\tstyles.plainTextPlaceholder,\n\t\t\tstyles.plainTextPlaceholderDark\n\t\t),\n\t\t...( style?.baseColors?.color && {\n\t\t\tcolor: style?.baseColors?.color?.text,\n\t\t} ),\n\t};\n\n\tconst searchBarStyle = [\n\t\tstyles.searchBarContainer,\n\t\tisButtonInside && borderStyle,\n\t\tisLongButton && { flexDirection: 'column' },\n\t];\n\n\t/**\n\t * If a screenreader is enabled, create a descriptive label for this field. If\n\t * not, return a label that is used during automated UI tests.\n\t *\n\t * @return {string} The accessibilityLabel for the Search Button\n\t */\n\tconst getAccessibilityLabelForButton = () => {\n\t\tif ( ! isScreenReaderEnabled ) {\n\t\t\treturn 'search-block-button';\n\t\t}\n\n\t\treturn `${ __(\n\t\t\t'Search button. Current button text is'\n\t\t) } ${ buttonText }`;\n\t};\n\n\t/**\n\t * If a screenreader is enabled, create a descriptive label for this field. If\n\t * not, return a label that is used during automated UI tests.\n\t *\n\t * @return {string} The accessibilityLabel for the Search Input\n\t * \t\t\t\t\t placeholder field.\n\t */\n\tconst getAccessibilityLabelForPlaceholder = () => {\n\t\tif ( ! isScreenReaderEnabled ) {\n\t\t\treturn 'search-block-input';\n\t\t}\n\n\t\tconst title = __( 'Search input field.' );\n\t\tconst description = placeholder\n\t\t\t? `${ __( 'Current placeholder text is' ) } ${ placeholder }`\n\t\t\t: __( 'No custom placeholder set' );\n\t\treturn `${ title } ${ description }`;\n\t};\n\n\t/**\n\t * If a screenreader is enabled, create a descriptive label for this field. If\n\t * not, return a label that is used during automated UI tests.\n\t *\n\t * @return {string} The accessibilityLabel for the Search Label field\n\t */\n\tconst getAccessibilityLabelForLabel = () => {\n\t\tif ( ! isScreenReaderEnabled ) {\n\t\t\treturn 'search-block-label';\n\t\t}\n\n\t\treturn `${ __( 'Search block label. Current text is' ) } ${ label }`;\n\t};\n\n\tconst renderTextField = () => {\n\t\treturn (\n\t\t\t<View\n\t\t\t\tstyle={ styles.searchInputContainer }\n\t\t\t\taccessible={ true }\n\t\t\t\taccessibilityRole=\"none\"\n\t\t\t\taccessibilityHint={\n\t\t\t\t\tisScreenReaderEnabled\n\t\t\t\t\t\t? __( 'Double tap to edit placeholder text' )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\taccessibilityLabel={ getAccessibilityLabelForPlaceholder() }\n\t\t\t>\n\t\t\t\t<PlainText\n\t\t\t\t\tref={ textInputRef }\n\t\t\t\t\tisSelected={ isPlaceholderSelected }\n\t\t\t\t\tclassName=\"wp-block-search__input\"\n\t\t\t\t\tstyle={ inputStyle }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tellipsizeMode=\"tail\" // Currently only works on ios.\n\t\t\t\t\tlabel={ null }\n\t\t\t\t\tvalue={ placeholder }\n\t\t\t\t\tplaceholder={\n\t\t\t\t\t\tplaceholder ? undefined : __( 'Optional placeholder…' )\n\t\t\t\t\t}\n\t\t\t\t\tonChange={ ( newVal ) =>\n\t\t\t\t\t\tsetAttributes( { placeholder: newVal } )\n\t\t\t\t\t}\n\t\t\t\t\tonFocus={ () => {\n\t\t\t\t\t\tsetIsPlaceholderSelected( true );\n\t\t\t\t\t\tonFocus();\n\t\t\t\t\t} }\n\t\t\t\t\tonBlur={ () => setIsPlaceholderSelected( false ) }\n\t\t\t\t\tplaceholderTextColor={ placeholderStyle?.color }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t};\n\n\t// To achieve proper expanding and shrinking `RichText` on Android, there is a need to set\n\t// a `placeholder` as an empty string when `RichText` is focused,\n\t// because `AztecView` is calculating a `minWidth` based on placeholder text.\n\tconst buttonPlaceholderText =\n\t\tisButtonSelected ||\n\t\t( ! isButtonSelected && buttonText && buttonText !== '' )\n\t\t\t? ''\n\t\t\t: __( 'Add button text' );\n\n\tconst baseButtonStyles = {\n\t\t...style?.baseColors?.blocks?.[ 'core/button' ]?.color,\n\t\t...attributes?.style?.color,\n\t\t...( style?.color && { text: style.color } ),\n\t};\n\n\tconst richTextButtonContainerStyle = [\n\t\tstyles.buttonContainer,\n\t\tisLongButton && styles.buttonContainerWide,\n\t\tbaseButtonStyles?.background && {\n\t\t\tbackgroundColor: baseButtonStyles.background,\n\t\t\tborderWidth: 0,\n\t\t},\n\t\tstyle?.backgroundColor && {\n\t\t\tbackgroundColor: style.backgroundColor,\n\t\t\tborderWidth: 0,\n\t\t},\n\t];\n\n\tconst richTextButtonStyle = {\n\t\t...styles.richTextButton,\n\t\t...( baseButtonStyles?.text && {\n\t\t\tcolor: baseButtonStyles.text,\n\t\t\tplaceholderColor: baseButtonStyles.text,\n\t\t} ),\n\t};\n\n\tconst iconStyles = {\n\t\t...styles.icon,\n\t\t...( baseButtonStyles?.text && { fill: baseButtonStyles.text } ),\n\t};\n\n\tconst renderButton = () => {\n\t\treturn (\n\t\t\t<View style={ richTextButtonContainerStyle }>\n\t\t\t\t{ buttonUseIcon && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t{ ...iconStyles }\n\t\t\t\t\t\tonLayout={ onLayoutButton }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ ! buttonUseIcon && (\n\t\t\t\t\t<View\n\t\t\t\t\t\taccessible={ true }\n\t\t\t\t\t\taccessibilityRole=\"none\"\n\t\t\t\t\t\taccessibilityHint={\n\t\t\t\t\t\t\tisScreenReaderEnabled\n\t\t\t\t\t\t\t\t? __( 'Double tap to edit button text' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taccessibilityLabel={ getAccessibilityLabelForButton() }\n\t\t\t\t\t\tonLayout={ onLayoutButton }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tclassName=\"wp-block-search__button\"\n\t\t\t\t\t\t\tidentifier=\"text\"\n\t\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\t\tstyle={ richTextButtonStyle }\n\t\t\t\t\t\t\tplaceholder={ buttonPlaceholderText }\n\t\t\t\t\t\t\tvalue={ buttonText }\n\t\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\t\tonChange={ ( html ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { buttonText: html } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tminWidth={ MIN_BUTTON_WIDTH }\n\t\t\t\t\t\t\tmaxWidth={ blockWidth - MARGINS }\n\t\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t\t\tisSelected={ isButtonSelected }\n\t\t\t\t\t\t\t__unstableMobileNoFocusOnMount={ ! isSelected }\n\t\t\t\t\t\t\tunstableOnFocus={ () => {\n\t\t\t\t\t\t\t\tsetIsButtonSelected( true );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\t\t\tsetIsButtonSelected( false );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tselectionColor={\n\t\t\t\t\t\t\t\tstyles.richTextButtonCursor?.color\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t) }\n\t\t\t</View>\n\t\t);\n\t};\n\n\treturn (\n\t\t<View\n\t\t\t{ ...blockProps }\n\t\t\tstyle={ styles.searchBlockContainer }\n\t\t\timportantForAccessibility={\n\t\t\t\tisSelected ? 'yes' : 'no-hide-descendants'\n\t\t\t}\n\t\t\taccessibilityElementsHidden={ isSelected ? false : true }\n\t\t>\n\t\t\t{ isSelected && controls }\n\n\t\t\t{ showLabel && (\n\t\t\t\t<View\n\t\t\t\t\taccessible={ true }\n\t\t\t\t\taccessibilityRole=\"none\"\n\t\t\t\t\taccessibilityHint={\n\t\t\t\t\t\tisScreenReaderEnabled\n\t\t\t\t\t\t\t? __( 'Double tap to edit label text' )\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\taccessibilityLabel={ getAccessibilityLabelForLabel() }\n\t\t\t\t>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tclassName=\"wp-block-search__label\"\n\t\t\t\t\t\tidentifier=\"text\"\n\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\tstyle={ styles.richTextLabel }\n\t\t\t\t\t\tplaceholder={ __( 'Add label…' ) }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\tonChange={ ( html ) =>\n\t\t\t\t\t\t\tsetAttributes( { label: html } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisSelected={ isLabelSelected }\n\t\t\t\t\t\t__unstableMobileNoFocusOnMount={ ! isSelected }\n\t\t\t\t\t\tunstableOnFocus={ () => {\n\t\t\t\t\t\t\tsetIsLabelSelected( true );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\t\tsetIsLabelSelected( false );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tselectionColor={ styles.richTextButtonCursor?.color }\n\t\t\t\t\t/>\n\t\t\t\t</View>\n\t\t\t) }\n\n\t\t\t{ ( 'button-inside' === buttonPosition ||\n\t\t\t\t'button-outside' === buttonPosition ) && (\n\t\t\t\t<View style={ searchBarStyle }>\n\t\t\t\t\t{ renderTextField() }\n\t\t\t\t\t{ renderButton() }\n\t\t\t\t</View>\n\t\t\t) }\n\n\t\t\t{ 'button-only' === buttonPosition && renderButton() }\n\t\t\t{ 'no-button' === buttonPosition && renderTextField() }\n\t\t</View>\n\t);\n}\n"]}
@@ -80,7 +80,6 @@ const metadata = {
80
80
  },
81
81
  supports: {
82
82
  align: ["left", "center", "right"],
83
- anchor: true,
84
83
  color: {
85
84
  gradients: true,
86
85
  __experimentalSkipSerialization: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/search/index.js"],"names":["name","metadata","settings","icon","example","attributes","buttonText","label","viewportWidth","variations","edit","init"],"mappings":";;;;;;;;;AAGA;;AACA;;AAKA;;AAEA;;AACA;;AAZA;AACA;AACA;;AAIA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,aADuB;AAEvBC,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AAAEC,MAAAA,UAAU,EAAE,cAAI,QAAJ,CAAd;AAA8BC,MAAAA,KAAK,EAAE,cAAI,QAAJ;AAArC,KADJ;AAERC,IAAAA,aAAa,EAAE;AAFP,GAFc;AAMvBC,EAAAA,UAAU,EAAVA,mBANuB;AAOvBC,EAAAA,IAAI,EAAJA;AAPuB,CAAjB;;;AAUA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEX,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { search as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: { buttonText: __( 'Search' ), label: __( 'Search' ) },\n\t\tviewportWidth: 400,\n\t},\n\tvariations,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/search/index.js"],"names":["name","metadata","settings","icon","example","attributes","buttonText","label","viewportWidth","variations","edit","init"],"mappings":";;;;;;;;;AAGA;;AACA;;AAKA;;AAEA;;AACA;;AAZA;AACA;AACA;;AAIA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,aADuB;AAEvBC,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AAAEC,MAAAA,UAAU,EAAE,cAAI,QAAJ,CAAd;AAA8BC,MAAAA,KAAK,EAAE,cAAI,QAAJ;AAArC,KADJ;AAERC,IAAAA,aAAa,EAAE;AAFP,GAFc;AAMvBC,EAAAA,UAAU,EAAVA,mBANuB;AAOvBC,EAAAA,IAAI,EAAJA;AAPuB,CAAjB;;;AAUA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEX,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { search as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: { buttonText: __( 'Search' ), label: __( 'Search' ) },\n\t\tviewportWidth: 400,\n\t},\n\tvariations,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
@@ -52,10 +52,11 @@ const v1 = {
52
52
  backgroundColor: backgroundClass ? undefined : customColor,
53
53
  color: colorClass ? undefined : customColor
54
54
  };
55
- return (0, _element.createElement)("hr", _blockEditor.useBlockProps.save({
56
- className,
57
- style
58
- }));
55
+ return (0, _element.createElement)("hr", { ..._blockEditor.useBlockProps.save({
56
+ className,
57
+ style
58
+ })
59
+ });
59
60
  },
60
61
 
61
62
  migrate(attributes) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/separator/deprecated.js"],"names":["v1","attributes","color","type","customColor","save","backgroundClass","colorClass","className","style","backgroundColor","undefined","useBlockProps","migrate","restAttributes","opacity","background"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAMA,EAAE,GAAG;AACVC,EAAAA,UAAU,EAAE;AACXC,IAAAA,KAAK,EAAE;AACNC,MAAAA,IAAI,EAAE;AADA,KADI;AAIXC,IAAAA,WAAW,EAAE;AACZD,MAAAA,IAAI,EAAE;AADM;AAJF,GADF;;AASVE,EAAAA,IAAI,CAAE;AAAEJ,IAAAA;AAAF,GAAF,EAAmB;AACtB,UAAM;AAAEC,MAAAA,KAAF;AAASE,MAAAA;AAAT,QAAyBH,UAA/B,CADsB,CAGtB;AACA;;AACA,UAAMK,eAAe,GAAG,oCAAmB,kBAAnB,EAAuCJ,KAAvC,CAAxB,CALsB,CAMtB;AACA;;AACA,UAAMK,UAAU,GAAG,oCAAmB,OAAnB,EAA4BL,KAA5B,CAAnB;AAEA,UAAMM,SAAS,GAAG,yBAAY;AAC7B,uCAAiCN,KAAK,IAAIE,WADb;AAE7B,OAAEE,eAAF,GAAqBA,eAFQ;AAG7B,OAAEC,UAAF,GAAgBA;AAHa,KAAZ,CAAlB;AAMA,UAAME,KAAK,GAAG;AACbC,MAAAA,eAAe,EAAEJ,eAAe,GAAGK,SAAH,GAAeP,WADlC;AAEbF,MAAAA,KAAK,EAAEK,UAAU,GAAGI,SAAH,GAAeP;AAFnB,KAAd;AAKA,WAAO,kCAASQ,2BAAcP,IAAd,CAAoB;AAAEG,MAAAA,SAAF;AAAaC,MAAAA;AAAb,KAApB,CAAT,CAAP;AACA,GA/BS;;AAgCVI,EAAAA,OAAO,CAAEZ,UAAF,EAAe;AACrB,UAAM;AAAEC,MAAAA,KAAF;AAASE,MAAAA,WAAT;AAAsB,SAAGU;AAAzB,QAA4Cb,UAAlD;AACA,WAAO,EACN,GAAGa,cADG;AAENJ,MAAAA,eAAe,EAAER,KAAK,GAAGA,KAAH,GAAWS,SAF3B;AAGNI,MAAAA,OAAO,EAAE,KAHH;AAINN,MAAAA,KAAK,EAAEL,WAAW,GACf;AAAEF,QAAAA,KAAK,EAAE;AAAEc,UAAAA,UAAU,EAAEZ;AAAd;AAAT,OADe,GAEfO;AANG,KAAP;AAQA;;AA1CS,CAAX;eA6Ce,CAAEX,EAAF,C","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { getColorClassName, useBlockProps } from '@wordpress/block-editor';\n\nconst v1 = {\n\tattributes: {\n\t\tcolor: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tcustomColor: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { color, customColor } = attributes;\n\n\t\t// the hr support changing color using border-color, since border-color\n\t\t// is not yet supported in the color palette, we use background-color\n\t\tconst backgroundClass = getColorClassName( 'background-color', color );\n\t\t// the dots styles uses text for the dots, to change those dots color is\n\t\t// using color, not backgroundColor\n\t\tconst colorClass = getColorClassName( 'color', color );\n\n\t\tconst className = classnames( {\n\t\t\t'has-text-color has-background': color || customColor,\n\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t[ colorClass ]: colorClass,\n\t\t} );\n\n\t\tconst style = {\n\t\t\tbackgroundColor: backgroundClass ? undefined : customColor,\n\t\t\tcolor: colorClass ? undefined : customColor,\n\t\t};\n\n\t\treturn <hr { ...useBlockProps.save( { className, style } ) } />;\n\t},\n\tmigrate( attributes ) {\n\t\tconst { color, customColor, ...restAttributes } = attributes;\n\t\treturn {\n\t\t\t...restAttributes,\n\t\t\tbackgroundColor: color ? color : undefined,\n\t\t\topacity: 'css',\n\t\t\tstyle: customColor\n\t\t\t\t? { color: { background: customColor } }\n\t\t\t\t: undefined,\n\t\t};\n\t},\n};\n\nexport default [ v1 ];\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/separator/deprecated.js"],"names":["v1","attributes","color","type","customColor","save","backgroundClass","colorClass","className","style","backgroundColor","undefined","useBlockProps","migrate","restAttributes","opacity","background"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAMA,EAAE,GAAG;AACVC,EAAAA,UAAU,EAAE;AACXC,IAAAA,KAAK,EAAE;AACNC,MAAAA,IAAI,EAAE;AADA,KADI;AAIXC,IAAAA,WAAW,EAAE;AACZD,MAAAA,IAAI,EAAE;AADM;AAJF,GADF;;AASVE,EAAAA,IAAI,CAAE;AAAEJ,IAAAA;AAAF,GAAF,EAAmB;AACtB,UAAM;AAAEC,MAAAA,KAAF;AAASE,MAAAA;AAAT,QAAyBH,UAA/B,CADsB,CAGtB;AACA;;AACA,UAAMK,eAAe,GAAG,oCAAmB,kBAAnB,EAAuCJ,KAAvC,CAAxB,CALsB,CAMtB;AACA;;AACA,UAAMK,UAAU,GAAG,oCAAmB,OAAnB,EAA4BL,KAA5B,CAAnB;AAEA,UAAMM,SAAS,GAAG,yBAAY;AAC7B,uCAAiCN,KAAK,IAAIE,WADb;AAE7B,OAAEE,eAAF,GAAqBA,eAFQ;AAG7B,OAAEC,UAAF,GAAgBA;AAHa,KAAZ,CAAlB;AAMA,UAAME,KAAK,GAAG;AACbC,MAAAA,eAAe,EAAEJ,eAAe,GAAGK,SAAH,GAAeP,WADlC;AAEbF,MAAAA,KAAK,EAAEK,UAAU,GAAGI,SAAH,GAAeP;AAFnB,KAAd;AAKA,WAAO,uCAASQ,2BAAcP,IAAd,CAAoB;AAAEG,QAAAA,SAAF;AAAaC,QAAAA;AAAb,OAApB;AAAT,MAAP;AACA,GA/BS;;AAgCVI,EAAAA,OAAO,CAAEZ,UAAF,EAAe;AACrB,UAAM;AAAEC,MAAAA,KAAF;AAASE,MAAAA,WAAT;AAAsB,SAAGU;AAAzB,QAA4Cb,UAAlD;AACA,WAAO,EACN,GAAGa,cADG;AAENJ,MAAAA,eAAe,EAAER,KAAK,GAAGA,KAAH,GAAWS,SAF3B;AAGNI,MAAAA,OAAO,EAAE,KAHH;AAINN,MAAAA,KAAK,EAAEL,WAAW,GACf;AAAEF,QAAAA,KAAK,EAAE;AAAEc,UAAAA,UAAU,EAAEZ;AAAd;AAAT,OADe,GAEfO;AANG,KAAP;AAQA;;AA1CS,CAAX;eA6Ce,CAAEX,EAAF,C","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { getColorClassName, useBlockProps } from '@wordpress/block-editor';\n\nconst v1 = {\n\tattributes: {\n\t\tcolor: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tcustomColor: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { color, customColor } = attributes;\n\n\t\t// the hr support changing color using border-color, since border-color\n\t\t// is not yet supported in the color palette, we use background-color\n\t\tconst backgroundClass = getColorClassName( 'background-color', color );\n\t\t// the dots styles uses text for the dots, to change those dots color is\n\t\t// using color, not backgroundColor\n\t\tconst colorClass = getColorClassName( 'color', color );\n\n\t\tconst className = classnames( {\n\t\t\t'has-text-color has-background': color || customColor,\n\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t[ colorClass ]: colorClass,\n\t\t} );\n\n\t\tconst style = {\n\t\t\tbackgroundColor: backgroundClass ? undefined : customColor,\n\t\t\tcolor: colorClass ? undefined : customColor,\n\t\t};\n\n\t\treturn <hr { ...useBlockProps.save( { className, style } ) } />;\n\t},\n\tmigrate( attributes ) {\n\t\tconst { color, customColor, ...restAttributes } = attributes;\n\t\treturn {\n\t\t\t...restAttributes,\n\t\t\tbackgroundColor: color ? color : undefined,\n\t\t\topacity: 'css',\n\t\t\tstyle: customColor\n\t\t\t\t? { color: { background: customColor } }\n\t\t\t\t: undefined,\n\t\t};\n\t},\n};\n\nexport default [ v1 ];\n"]}
@@ -54,9 +54,10 @@ function SeparatorEdit({
54
54
  color: currentColor,
55
55
  backgroundColor: currentColor
56
56
  };
57
- return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_components.HorizontalRule, (0, _blockEditor.useBlockProps)({
58
- className,
59
- style: hasCustomColor ? styles : undefined
60
- })));
57
+ return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_components.HorizontalRule, { ...(0, _blockEditor.useBlockProps)({
58
+ className,
59
+ style: hasCustomColor ? styles : undefined
60
+ })
61
+ }));
61
62
  }
62
63
  //# sourceMappingURL=edit.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/separator/edit.js"],"names":["SeparatorEdit","attributes","setAttributes","backgroundColor","opacity","style","colorProps","currentColor","hasCustomColor","color","background","colorClass","className","styles","undefined"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AASA;;AAlBA;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;AAGe,SAASA,aAAT,CAAwB;AAAEC,EAAAA,UAAF;AAAcC,EAAAA;AAAd,CAAxB,EAAwD;AACtE,QAAM;AAAEC,IAAAA,eAAF;AAAmBC,IAAAA,OAAnB;AAA4BC,IAAAA;AAA5B,MAAsCJ,UAA5C;AACA,QAAMK,UAAU,GAAG,8CAAeL,UAAf,CAAnB;AACA,QAAMM,YAAY,GAAGD,UAAU,EAAED,KAAZ,EAAmBF,eAAxC;AACA,QAAMK,cAAc,GAAG,CAAC,CAAEH,KAAK,EAAEI,KAAP,EAAcC,UAAxC;AAEA,qCAAsBN,OAAtB,EAA+BG,YAA/B,EAA6CL,aAA7C,EANsE,CAQtE;AACA;;AACA,QAAMS,UAAU,GAAG,oCAAmB,OAAnB,EAA4BR,eAA5B,CAAnB;AAEA,QAAMS,SAAS,GAAG,yBACjB;AACC,sBAAkBT,eAAe,IAAII,YADtC;AAEC,KAAEI,UAAF,GAAgBA,UAFjB;AAGC,uBAAmBP,OAAO,KAAK,KAHhC;AAIC,iCAA6BA,OAAO,KAAK;AAJ1C,GADiB,EAOjBE,UAAU,CAACM,SAPM,CAAlB;AAUA,QAAMC,MAAM,GAAG;AACdJ,IAAAA,KAAK,EAAEF,YADO;AAEdJ,IAAAA,eAAe,EAAEI;AAFH,GAAf;AAKA,SACC,qDACC,4BAAC,0BAAD,EACM,gCAAe;AACnBK,IAAAA,SADmB;AAEnBP,IAAAA,KAAK,EAAEG,cAAc,GAAGK,MAAH,GAAYC;AAFd,GAAf,CADN,CADD,CADD;AAUA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { HorizontalRule } from '@wordpress/components';\nimport {\n\tuseBlockProps,\n\tgetColorClassName,\n\t__experimentalUseColorProps as useColorProps,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport useDeprecatedOpacity from './use-deprecated-opacity';\n\nexport default function SeparatorEdit( { attributes, setAttributes } ) {\n\tconst { backgroundColor, opacity, style } = attributes;\n\tconst colorProps = useColorProps( attributes );\n\tconst currentColor = colorProps?.style?.backgroundColor;\n\tconst hasCustomColor = !! style?.color?.background;\n\n\tuseDeprecatedOpacity( opacity, currentColor, setAttributes );\n\n\t// The dots styles uses text for the dots, to change those dots color is\n\t// using color, not backgroundColor.\n\tconst colorClass = getColorClassName( 'color', backgroundColor );\n\n\tconst className = classnames(\n\t\t{\n\t\t\t'has-text-color': backgroundColor || currentColor,\n\t\t\t[ colorClass ]: colorClass,\n\t\t\t'has-css-opacity': opacity === 'css',\n\t\t\t'has-alpha-channel-opacity': opacity === 'alpha-channel',\n\t\t},\n\t\tcolorProps.className\n\t);\n\n\tconst styles = {\n\t\tcolor: currentColor,\n\t\tbackgroundColor: currentColor,\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<HorizontalRule\n\t\t\t\t{ ...useBlockProps( {\n\t\t\t\t\tclassName,\n\t\t\t\t\tstyle: hasCustomColor ? styles : undefined,\n\t\t\t\t} ) }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/separator/edit.js"],"names":["SeparatorEdit","attributes","setAttributes","backgroundColor","opacity","style","colorProps","currentColor","hasCustomColor","color","background","colorClass","className","styles","undefined"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AASA;;AAlBA;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;AAGe,SAASA,aAAT,CAAwB;AAAEC,EAAAA,UAAF;AAAcC,EAAAA;AAAd,CAAxB,EAAwD;AACtE,QAAM;AAAEC,IAAAA,eAAF;AAAmBC,IAAAA,OAAnB;AAA4BC,IAAAA;AAA5B,MAAsCJ,UAA5C;AACA,QAAMK,UAAU,GAAG,8CAAeL,UAAf,CAAnB;AACA,QAAMM,YAAY,GAAGD,UAAU,EAAED,KAAZ,EAAmBF,eAAxC;AACA,QAAMK,cAAc,GAAG,CAAC,CAAEH,KAAK,EAAEI,KAAP,EAAcC,UAAxC;AAEA,qCAAsBN,OAAtB,EAA+BG,YAA/B,EAA6CL,aAA7C,EANsE,CAQtE;AACA;;AACA,QAAMS,UAAU,GAAG,oCAAmB,OAAnB,EAA4BR,eAA5B,CAAnB;AAEA,QAAMS,SAAS,GAAG,yBACjB;AACC,sBAAkBT,eAAe,IAAII,YADtC;AAEC,KAAEI,UAAF,GAAgBA,UAFjB;AAGC,uBAAmBP,OAAO,KAAK,KAHhC;AAIC,iCAA6BA,OAAO,KAAK;AAJ1C,GADiB,EAOjBE,UAAU,CAACM,SAPM,CAAlB;AAUA,QAAMC,MAAM,GAAG;AACdJ,IAAAA,KAAK,EAAEF,YADO;AAEdJ,IAAAA,eAAe,EAAEI;AAFH,GAAf;AAKA,SACC,qDACC,4BAAC,0BAAD,OACM,gCAAe;AACnBK,MAAAA,SADmB;AAEnBP,MAAAA,KAAK,EAAEG,cAAc,GAAGK,MAAH,GAAYC;AAFd,KAAf;AADN,IADD,CADD;AAUA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { HorizontalRule } from '@wordpress/components';\nimport {\n\tuseBlockProps,\n\tgetColorClassName,\n\t__experimentalUseColorProps as useColorProps,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport useDeprecatedOpacity from './use-deprecated-opacity';\n\nexport default function SeparatorEdit( { attributes, setAttributes } ) {\n\tconst { backgroundColor, opacity, style } = attributes;\n\tconst colorProps = useColorProps( attributes );\n\tconst currentColor = colorProps?.style?.backgroundColor;\n\tconst hasCustomColor = !! style?.color?.background;\n\n\tuseDeprecatedOpacity( opacity, currentColor, setAttributes );\n\n\t// The dots styles uses text for the dots, to change those dots color is\n\t// using color, not backgroundColor.\n\tconst colorClass = getColorClassName( 'color', backgroundColor );\n\n\tconst className = classnames(\n\t\t{\n\t\t\t'has-text-color': backgroundColor || currentColor,\n\t\t\t[ colorClass ]: colorClass,\n\t\t\t'has-css-opacity': opacity === 'css',\n\t\t\t'has-alpha-channel-opacity': opacity === 'alpha-channel',\n\t\t},\n\t\tcolorProps.className\n\t);\n\n\tconst styles = {\n\t\tcolor: currentColor,\n\t\tbackgroundColor: currentColor,\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<HorizontalRule\n\t\t\t\t{ ...useBlockProps( {\n\t\t\t\t\tclassName,\n\t\t\t\t\tstyle: hasCustomColor ? styles : undefined,\n\t\t\t\t} ) }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"]}
@@ -45,9 +45,10 @@ function separatorSave({
45
45
  backgroundColor: colorProps?.style?.backgroundColor,
46
46
  color: colorClass ? undefined : customColor
47
47
  };
48
- return (0, _element.createElement)("hr", _blockEditor.useBlockProps.save({
49
- className,
50
- style: styles
51
- }));
48
+ return (0, _element.createElement)("hr", { ..._blockEditor.useBlockProps.save({
49
+ className,
50
+ style: styles
51
+ })
52
+ });
52
53
  }
53
54
  //# sourceMappingURL=save.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/separator/save.js"],"names":["separatorSave","attributes","backgroundColor","style","opacity","customColor","color","background","colorProps","colorClass","className","styles","undefined","useBlockProps","save"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAOe,SAASA,aAAT,CAAwB;AAAEC,EAAAA;AAAF,CAAxB,EAAyC;AACvD,QAAM;AAAEC,IAAAA,eAAF;AAAmBC,IAAAA,KAAnB;AAA0BC,IAAAA;AAA1B,MAAsCH,UAA5C;AACA,QAAMI,WAAW,GAAGF,KAAK,EAAEG,KAAP,EAAcC,UAAlC;AACA,QAAMC,UAAU,GAAG,yDAA0BP,UAA1B,CAAnB,CAHuD,CAIvD;AACA;AAEA;AACA;;AACA,QAAMQ,UAAU,GAAG,oCAAmB,OAAnB,EAA4BP,eAA5B,CAAnB;AAEA,QAAMQ,SAAS,GAAG,yBACjB;AACC,sBAAkBR,eAAe,IAAIG,WADtC;AAEC,KAAEI,UAAF,GAAgBA,UAFjB;AAGC,uBAAmBL,OAAO,KAAK,KAHhC;AAIC,iCAA6BA,OAAO,KAAK;AAJ1C,GADiB,EAOjBI,UAAU,CAACE,SAPM,CAAlB;AAUA,QAAMC,MAAM,GAAG;AACdT,IAAAA,eAAe,EAAEM,UAAU,EAAEL,KAAZ,EAAmBD,eADtB;AAEdI,IAAAA,KAAK,EAAEG,UAAU,GAAGG,SAAH,GAAeP;AAFlB,GAAf;AAIA,SAAO,kCAASQ,2BAAcC,IAAd,CAAoB;AAAEJ,IAAAA,SAAF;AAAaP,IAAAA,KAAK,EAAEQ;AAApB,GAApB,CAAT,CAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetColorClassName,\n\tuseBlockProps,\n\t__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,\n} from '@wordpress/block-editor';\n\nexport default function separatorSave( { attributes } ) {\n\tconst { backgroundColor, style, opacity } = attributes;\n\tconst customColor = style?.color?.background;\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\t// The hr support changing color using border-color, since border-color\n\t// is not yet supported in the color palette, we use background-color.\n\n\t// The dots styles uses text for the dots, to change those dots color is\n\t// using color, not backgroundColor.\n\tconst colorClass = getColorClassName( 'color', backgroundColor );\n\n\tconst className = classnames(\n\t\t{\n\t\t\t'has-text-color': backgroundColor || customColor,\n\t\t\t[ colorClass ]: colorClass,\n\t\t\t'has-css-opacity': opacity === 'css',\n\t\t\t'has-alpha-channel-opacity': opacity === 'alpha-channel',\n\t\t},\n\t\tcolorProps.className\n\t);\n\n\tconst styles = {\n\t\tbackgroundColor: colorProps?.style?.backgroundColor,\n\t\tcolor: colorClass ? undefined : customColor,\n\t};\n\treturn <hr { ...useBlockProps.save( { className, style: styles } ) } />;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/separator/save.js"],"names":["separatorSave","attributes","backgroundColor","style","opacity","customColor","color","background","colorProps","colorClass","className","styles","undefined","useBlockProps","save"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAOe,SAASA,aAAT,CAAwB;AAAEC,EAAAA;AAAF,CAAxB,EAAyC;AACvD,QAAM;AAAEC,IAAAA,eAAF;AAAmBC,IAAAA,KAAnB;AAA0BC,IAAAA;AAA1B,MAAsCH,UAA5C;AACA,QAAMI,WAAW,GAAGF,KAAK,EAAEG,KAAP,EAAcC,UAAlC;AACA,QAAMC,UAAU,GAAG,yDAA0BP,UAA1B,CAAnB,CAHuD,CAIvD;AACA;AAEA;AACA;;AACA,QAAMQ,UAAU,GAAG,oCAAmB,OAAnB,EAA4BP,eAA5B,CAAnB;AAEA,QAAMQ,SAAS,GAAG,yBACjB;AACC,sBAAkBR,eAAe,IAAIG,WADtC;AAEC,KAAEI,UAAF,GAAgBA,UAFjB;AAGC,uBAAmBL,OAAO,KAAK,KAHhC;AAIC,iCAA6BA,OAAO,KAAK;AAJ1C,GADiB,EAOjBI,UAAU,CAACE,SAPM,CAAlB;AAUA,QAAMC,MAAM,GAAG;AACdT,IAAAA,eAAe,EAAEM,UAAU,EAAEL,KAAZ,EAAmBD,eADtB;AAEdI,IAAAA,KAAK,EAAEG,UAAU,GAAGG,SAAH,GAAeP;AAFlB,GAAf;AAIA,SAAO,uCAASQ,2BAAcC,IAAd,CAAoB;AAAEJ,MAAAA,SAAF;AAAaP,MAAAA,KAAK,EAAEQ;AAApB,KAApB;AAAT,IAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetColorClassName,\n\tuseBlockProps,\n\t__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,\n} from '@wordpress/block-editor';\n\nexport default function separatorSave( { attributes } ) {\n\tconst { backgroundColor, style, opacity } = attributes;\n\tconst customColor = style?.color?.background;\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\t// The hr support changing color using border-color, since border-color\n\t// is not yet supported in the color palette, we use background-color.\n\n\t// The dots styles uses text for the dots, to change those dots color is\n\t// using color, not backgroundColor.\n\tconst colorClass = getColorClassName( 'color', backgroundColor );\n\n\tconst className = classnames(\n\t\t{\n\t\t\t'has-text-color': backgroundColor || customColor,\n\t\t\t[ colorClass ]: colorClass,\n\t\t\t'has-css-opacity': opacity === 'css',\n\t\t\t'has-alpha-channel-opacity': opacity === 'alpha-channel',\n\t\t},\n\t\tcolorProps.className\n\t);\n\n\tconst styles = {\n\t\tbackgroundColor: colorProps?.style?.backgroundColor,\n\t\tcolor: colorClass ? undefined : customColor,\n\t};\n\treturn <hr { ...useBlockProps.save( { className, style: styles } ) } />;\n}\n"]}
@@ -24,9 +24,10 @@ function ShortcodeEdit({
24
24
  }) {
25
25
  const instanceId = (0, _compose.useInstanceId)(ShortcodeEdit);
26
26
  const inputId = `blocks-shortcode-input-${instanceId}`;
27
- return (0, _element.createElement)("div", (0, _blockEditor.useBlockProps)({
28
- className: 'components-placeholder'
29
- }), (0, _element.createElement)("label", {
27
+ return (0, _element.createElement)("div", { ...(0, _blockEditor.useBlockProps)({
28
+ className: 'components-placeholder'
29
+ })
30
+ }, (0, _element.createElement)("label", {
30
31
  htmlFor: inputId,
31
32
  className: "components-placeholder__label"
32
33
  }, (0, _element.createElement)(_icons.Icon, {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/shortcode/edit.js"],"names":["ShortcodeEdit","attributes","setAttributes","instanceId","inputId","className","shortcode","text"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AANA;AACA;AACA;AAMe,SAASA,aAAT,CAAwB;AAAEC,EAAAA,UAAF;AAAcC,EAAAA;AAAd,CAAxB,EAAwD;AACtE,QAAMC,UAAU,GAAG,4BAAeH,aAAf,CAAnB;AACA,QAAMI,OAAO,GAAI,0BAA0BD,UAAY,EAAvD;AAEA,SACC,mCAAU,gCAAe;AAAEE,IAAAA,SAAS,EAAE;AAAb,GAAf,CAAV,EACC;AACC,IAAA,OAAO,EAAGD,OADX;AAEC,IAAA,SAAS,EAAC;AAFX,KAIC,4BAAC,WAAD;AAAM,IAAA,IAAI,EAAGE;AAAb,IAJD,EAKG,cAAI,WAAJ,CALH,CADD,EAQC,4BAAC,sBAAD;AACC,IAAA,SAAS,EAAC,4BADX;AAEC,IAAA,EAAE,EAAGF,OAFN;AAGC,IAAA,KAAK,EAAGH,UAAU,CAACM,IAHpB;AAIC,kBAAa,cAAI,gBAAJ,CAJd;AAKC,IAAA,WAAW,EAAG,cAAI,uBAAJ,CALf;AAMC,IAAA,QAAQ,EAAKA,IAAF,IAAYL,aAAa,CAAE;AAAEK,MAAAA;AAAF,KAAF;AANrC,IARD,CADD;AAmBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PlainText, useBlockProps } from '@wordpress/block-editor';\nimport { useInstanceId } from '@wordpress/compose';\nimport { Icon, shortcode } from '@wordpress/icons';\n\nexport default function ShortcodeEdit( { attributes, setAttributes } ) {\n\tconst instanceId = useInstanceId( ShortcodeEdit );\n\tconst inputId = `blocks-shortcode-input-${ instanceId }`;\n\n\treturn (\n\t\t<div { ...useBlockProps( { className: 'components-placeholder' } ) }>\n\t\t\t<label\n\t\t\t\thtmlFor={ inputId }\n\t\t\t\tclassName=\"components-placeholder__label\"\n\t\t\t>\n\t\t\t\t<Icon icon={ shortcode } />\n\t\t\t\t{ __( 'Shortcode' ) }\n\t\t\t</label>\n\t\t\t<PlainText\n\t\t\t\tclassName=\"blocks-shortcode__textarea\"\n\t\t\t\tid={ inputId }\n\t\t\t\tvalue={ attributes.text }\n\t\t\t\taria-label={ __( 'Shortcode text' ) }\n\t\t\t\tplaceholder={ __( 'Write shortcode here…' ) }\n\t\t\t\tonChange={ ( text ) => setAttributes( { text } ) }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/shortcode/edit.js"],"names":["ShortcodeEdit","attributes","setAttributes","instanceId","inputId","className","shortcode","text"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AANA;AACA;AACA;AAMe,SAASA,aAAT,CAAwB;AAAEC,EAAAA,UAAF;AAAcC,EAAAA;AAAd,CAAxB,EAAwD;AACtE,QAAMC,UAAU,GAAG,4BAAeH,aAAf,CAAnB;AACA,QAAMI,OAAO,GAAI,0BAA0BD,UAAY,EAAvD;AAEA,SACC,wCAAU,gCAAe;AAAEE,MAAAA,SAAS,EAAE;AAAb,KAAf;AAAV,KACC;AACC,IAAA,OAAO,EAAGD,OADX;AAEC,IAAA,SAAS,EAAC;AAFX,KAIC,4BAAC,WAAD;AAAM,IAAA,IAAI,EAAGE;AAAb,IAJD,EAKG,cAAI,WAAJ,CALH,CADD,EAQC,4BAAC,sBAAD;AACC,IAAA,SAAS,EAAC,4BADX;AAEC,IAAA,EAAE,EAAGF,OAFN;AAGC,IAAA,KAAK,EAAGH,UAAU,CAACM,IAHpB;AAIC,kBAAa,cAAI,gBAAJ,CAJd;AAKC,IAAA,WAAW,EAAG,cAAI,uBAAJ,CALf;AAMC,IAAA,QAAQ,EAAKA,IAAF,IAAYL,aAAa,CAAE;AAAEK,MAAAA;AAAF,KAAF;AANrC,IARD,CADD;AAmBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PlainText, useBlockProps } from '@wordpress/block-editor';\nimport { useInstanceId } from '@wordpress/compose';\nimport { Icon, shortcode } from '@wordpress/icons';\n\nexport default function ShortcodeEdit( { attributes, setAttributes } ) {\n\tconst instanceId = useInstanceId( ShortcodeEdit );\n\tconst inputId = `blocks-shortcode-input-${ instanceId }`;\n\n\treturn (\n\t\t<div { ...useBlockProps( { className: 'components-placeholder' } ) }>\n\t\t\t<label\n\t\t\t\thtmlFor={ inputId }\n\t\t\t\tclassName=\"components-placeholder__label\"\n\t\t\t>\n\t\t\t\t<Icon icon={ shortcode } />\n\t\t\t\t{ __( 'Shortcode' ) }\n\t\t\t</label>\n\t\t\t<PlainText\n\t\t\t\tclassName=\"blocks-shortcode__textarea\"\n\t\t\t\tid={ inputId }\n\t\t\t\tvalue={ attributes.text }\n\t\t\t\taria-label={ __( 'Shortcode text' ) }\n\t\t\t\tplaceholder={ __( 'Write shortcode here…' ) }\n\t\t\t\tonChange={ ( text ) => setAttributes( { text } ) }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"]}
@@ -9,8 +9,6 @@ exports.default = LogoEdit;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _classnames = _interopRequireDefault(require("classnames"));
15
13
 
16
14
  var _blob = require("@wordpress/blob");
@@ -320,10 +318,10 @@ function SiteLogoReplaceFlow({
320
318
  onRemoveLogo,
321
319
  ...mediaReplaceProps
322
320
  }) {
323
- return (0, _element.createElement)(_blockEditor.MediaReplaceFlow, (0, _extends2.default)({}, mediaReplaceProps, {
321
+ return (0, _element.createElement)(_blockEditor.MediaReplaceFlow, { ...mediaReplaceProps,
324
322
  allowedTypes: ALLOWED_MEDIA_TYPES,
325
323
  accept: ACCEPT_MEDIA_STRING
326
- }), (0, _element.createElement)(_components.MenuItem, {
324
+ }, (0, _element.createElement)(_components.MenuItem, {
327
325
  onClick: onRemoveLogo
328
326
  }, (0, _i18n.__)('Reset')));
329
327
  }
@@ -339,9 +337,9 @@ const InspectorLogoPreview = ({
339
337
  media_details: logoMediaDetails
340
338
  } = mediaItemData;
341
339
  const logoLabel = logoMediaDetails?.sizes?.full?.file || logoSlug;
342
- return (0, _element.createElement)(_components.__experimentalItemGroup, (0, _extends2.default)({}, itemGroupProps, {
340
+ return (0, _element.createElement)(_components.__experimentalItemGroup, { ...itemGroupProps,
343
341
  as: "span"
344
- }), (0, _element.createElement)(_components.__experimentalHStack, {
342
+ }, (0, _element.createElement)(_components.__experimentalHStack, {
345
343
  justify: "flex-start",
346
344
  as: "span"
347
345
  }, (0, _element.createElement)("img", {
@@ -507,7 +505,8 @@ function LogoEdit({
507
505
  };
508
506
  const controls = canUserEdit && logoUrl && (0, _element.createElement)(_blockEditor.BlockControls, {
509
507
  group: "other"
510
- }, (0, _element.createElement)(SiteLogoReplaceFlow, mediaReplaceFlowProps));
508
+ }, (0, _element.createElement)(SiteLogoReplaceFlow, { ...mediaReplaceFlowProps
509
+ }));
511
510
  let logoImage;
512
511
  const isLoading = siteLogoId === undefined || isRequestingMediaItem;
513
512
 
@@ -563,12 +562,12 @@ function LogoEdit({
563
562
  isBordered: true,
564
563
  className: 'block-library-site-logo__inspector-readonly-logo-preview'
565
564
  }
566
- }), canUserEdit && !!logoUrl && (0, _element.createElement)(SiteLogoReplaceFlow, (0, _extends2.default)({}, mediaReplaceFlowProps, {
565
+ }), canUserEdit && !!logoUrl && (0, _element.createElement)(SiteLogoReplaceFlow, { ...mediaReplaceFlowProps,
567
566
  name: (0, _element.createElement)(InspectorLogoPreview, {
568
567
  mediaItemData: mediaItemData
569
568
  }),
570
569
  popoverProps: {}
571
- })), canUserEdit && !logoUrl && (0, _element.createElement)(_blockEditor.MediaUploadCheck, null, (0, _element.createElement)(_blockEditor.MediaUpload, {
570
+ }), canUserEdit && !logoUrl && (0, _element.createElement)(_blockEditor.MediaUploadCheck, null, (0, _element.createElement)(_blockEditor.MediaUpload, {
572
571
  onSelect: onInitialSelectLogo,
573
572
  allowedTypes: ALLOWED_MEDIA_TYPES,
574
573
  render: ({
@@ -582,7 +581,8 @@ function LogoEdit({
582
581
  onFilesDrop: onFilesDrop
583
582
  }))
584
583
  })))));
585
- return (0, _element.createElement)("div", blockProps, controls, mediaInspectorPanel, !!logoUrl && logoImage, !logoUrl && !canUserEdit && (0, _element.createElement)(_components.Placeholder, {
584
+ return (0, _element.createElement)("div", { ...blockProps
585
+ }, controls, mediaInspectorPanel, !!logoUrl && logoImage, !logoUrl && !canUserEdit && (0, _element.createElement)(_components.Placeholder, {
586
586
  className: "site-logo_placeholder"
587
587
  }, !!isLoading && (0, _element.createElement)("span", {
588
588
  className: "components-placeholder__preview"