@wordpress/block-editor 11.6.0 → 11.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +46 -55
  3. package/build/components/block-list/block-html.js +1 -3
  4. package/build/components/block-list/block-html.js.map +1 -1
  5. package/build/components/block-list/block.native.js +4 -3
  6. package/build/components/block-list/block.native.js.map +1 -1
  7. package/build/components/block-list/index.native.js +11 -21
  8. package/build/components/block-list/index.native.js.map +1 -1
  9. package/build/components/block-list/use-in-between-inserter.js +3 -1
  10. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  11. package/build/components/block-popover/inbetween.js +2 -9
  12. package/build/components/block-popover/inbetween.js.map +1 -1
  13. package/build/components/block-preview/auto.js +6 -23
  14. package/build/components/block-preview/auto.js.map +1 -1
  15. package/build/components/block-settings-menu/block-settings-dropdown.js +1 -10
  16. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  17. package/build/components/caption/index.native.js +0 -1
  18. package/build/components/caption/index.native.js.map +1 -1
  19. package/build/components/date-format-picker/index.js +1 -1
  20. package/build/components/date-format-picker/index.js.map +1 -1
  21. package/build/components/editor-styles/index.js +20 -2
  22. package/build/components/editor-styles/index.js.map +1 -1
  23. package/build/components/global-styles/border-panel.js +15 -29
  24. package/build/components/global-styles/border-panel.js.map +1 -1
  25. package/build/components/global-styles/color-panel.js +583 -0
  26. package/build/components/global-styles/color-panel.js.map +1 -0
  27. package/build/components/global-styles/dimensions-panel.js +23 -44
  28. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  29. package/build/components/global-styles/effects-panel.js +244 -0
  30. package/build/components/global-styles/effects-panel.js.map +1 -0
  31. package/build/components/global-styles/filters-panel.js +151 -0
  32. package/build/components/global-styles/filters-panel.js.map +1 -0
  33. package/build/components/global-styles/get-block-css-selector.js +118 -0
  34. package/build/components/global-styles/get-block-css-selector.js.map +1 -0
  35. package/build/components/global-styles/hooks.js +60 -1
  36. package/build/components/global-styles/hooks.js.map +1 -1
  37. package/build/components/global-styles/index.js +46 -2
  38. package/build/components/global-styles/index.js.map +1 -1
  39. package/build/components/global-styles/typography-panel.js +9 -35
  40. package/build/components/global-styles/typography-panel.js.map +1 -1
  41. package/build/components/global-styles/use-global-styles-output.js +173 -91
  42. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  43. package/build/components/global-styles/utils.js +2 -1
  44. package/build/components/global-styles/utils.js.map +1 -1
  45. package/build/components/iframe/index.js +1 -1
  46. package/build/components/iframe/index.js.map +1 -1
  47. package/build/components/image-size-control/index.js +8 -5
  48. package/build/components/image-size-control/index.js.map +1 -1
  49. package/build/components/image-size-control/use-dimension-handler.js +5 -3
  50. package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
  51. package/build/components/index.js +16 -0
  52. package/build/components/index.js.map +1 -1
  53. package/build/components/inserter/block-patterns-tab.js +4 -2
  54. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  55. package/build/components/inspector-controls-tabs/position-controls-panel.js +43 -7
  56. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  57. package/build/components/inspector-controls-tabs/utils.js +5 -3
  58. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  59. package/build/components/line-height-control/index.js +15 -1
  60. package/build/components/line-height-control/index.js.map +1 -1
  61. package/build/components/list-view/appender.js +105 -0
  62. package/build/components/list-view/appender.js.map +1 -0
  63. package/build/components/list-view/block.js +6 -5
  64. package/build/components/list-view/block.js.map +1 -1
  65. package/build/components/list-view/branch.js +25 -5
  66. package/build/components/list-view/branch.js.map +1 -1
  67. package/build/components/list-view/index.js +56 -14
  68. package/build/components/list-view/index.js.map +1 -1
  69. package/build/components/list-view/use-list-view-client-ids.js +7 -3
  70. package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
  71. package/build/components/list-view/use-list-view-drop-zone.js +8 -2
  72. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  73. package/build/components/media-replace-flow/index.js +13 -4
  74. package/build/components/media-replace-flow/index.js.map +1 -1
  75. package/build/components/off-canvas-editor/block-contents.js +6 -1
  76. package/build/components/off-canvas-editor/block-contents.js.map +1 -1
  77. package/build/components/off-canvas-editor/index.js +17 -14
  78. package/build/components/off-canvas-editor/index.js.map +1 -1
  79. package/build/components/resizable-box-popover/index.js +38 -0
  80. package/build/components/resizable-box-popover/index.js.map +1 -0
  81. package/build/components/rich-text/format-edit.js +2 -30
  82. package/build/components/rich-text/format-edit.js.map +1 -1
  83. package/build/components/rich-text/index.js +0 -1
  84. package/build/components/rich-text/index.js.map +1 -1
  85. package/build/components/rich-text/index.native.js +7 -11
  86. package/build/components/rich-text/index.native.js.map +1 -1
  87. package/build/components/spacing-sizes-control/spacing-input-control.js +8 -0
  88. package/build/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
  89. package/build/components/writing-flow/use-input.js +4 -8
  90. package/build/components/writing-flow/use-input.js.map +1 -1
  91. package/build/hooks/anchor.js +1 -1
  92. package/build/hooks/anchor.js.map +1 -1
  93. package/build/hooks/border.js +1 -2
  94. package/build/hooks/border.js.map +1 -1
  95. package/build/hooks/color.js +92 -229
  96. package/build/hooks/color.js.map +1 -1
  97. package/build/hooks/content-lock-ui.js +4 -2
  98. package/build/hooks/content-lock-ui.js.map +1 -1
  99. package/build/hooks/{color-panel.js → contrast-checker.js} +11 -49
  100. package/build/hooks/contrast-checker.js.map +1 -0
  101. package/build/hooks/dimensions.js +0 -1
  102. package/build/hooks/dimensions.js.map +1 -1
  103. package/build/hooks/duotone.js +92 -64
  104. package/build/hooks/duotone.js.map +1 -1
  105. package/build/hooks/margin.js +27 -17
  106. package/build/hooks/margin.js.map +1 -1
  107. package/build/hooks/padding.js +19 -9
  108. package/build/hooks/padding.js.map +1 -1
  109. package/build/hooks/position.js +2 -2
  110. package/build/hooks/position.js.map +1 -1
  111. package/build/hooks/style.js +23 -26
  112. package/build/hooks/style.js.map +1 -1
  113. package/build/hooks/typography.js +0 -1
  114. package/build/hooks/typography.js.map +1 -1
  115. package/build/hooks/utils.js +28 -76
  116. package/build/hooks/utils.js.map +1 -1
  117. package/build/layouts/grid.js +165 -0
  118. package/build/layouts/grid.js.map +1 -0
  119. package/build/layouts/index.js +3 -1
  120. package/build/layouts/index.js.map +1 -1
  121. package/build/layouts/utils.js +3 -2
  122. package/build/layouts/utils.js.map +1 -1
  123. package/build/private-apis.js +7 -1
  124. package/build/private-apis.js.map +1 -1
  125. package/build/store/actions.js +1 -1
  126. package/build/store/actions.js.map +1 -1
  127. package/build/utils/object.js +76 -0
  128. package/build/utils/object.js.map +1 -0
  129. package/build-module/components/block-list/block-html.js +1 -3
  130. package/build-module/components/block-list/block-html.js.map +1 -1
  131. package/build-module/components/block-list/block.native.js +4 -3
  132. package/build-module/components/block-list/block.native.js.map +1 -1
  133. package/build-module/components/block-list/index.native.js +11 -19
  134. package/build-module/components/block-list/index.native.js.map +1 -1
  135. package/build-module/components/block-list/use-in-between-inserter.js +2 -1
  136. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  137. package/build-module/components/block-popover/inbetween.js +2 -9
  138. package/build-module/components/block-popover/inbetween.js.map +1 -1
  139. package/build-module/components/block-preview/auto.js +6 -22
  140. package/build-module/components/block-preview/auto.js.map +1 -1
  141. package/build-module/components/block-settings-menu/block-settings-dropdown.js +1 -9
  142. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  143. package/build-module/components/caption/index.native.js +0 -1
  144. package/build-module/components/caption/index.native.js.map +1 -1
  145. package/build-module/components/date-format-picker/index.js +1 -1
  146. package/build-module/components/date-format-picker/index.js.map +1 -1
  147. package/build-module/components/editor-styles/index.js +19 -2
  148. package/build-module/components/editor-styles/index.js.map +1 -1
  149. package/build-module/components/global-styles/border-panel.js +15 -29
  150. package/build-module/components/global-styles/border-panel.js.map +1 -1
  151. package/build-module/components/global-styles/color-panel.js +554 -0
  152. package/build-module/components/global-styles/color-panel.js.map +1 -0
  153. package/build-module/components/global-styles/dimensions-panel.js +22 -44
  154. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  155. package/build-module/components/global-styles/effects-panel.js +228 -0
  156. package/build-module/components/global-styles/effects-panel.js.map +1 -0
  157. package/build-module/components/global-styles/filters-panel.js +139 -0
  158. package/build-module/components/global-styles/filters-panel.js.map +1 -0
  159. package/build-module/components/global-styles/get-block-css-selector.js +109 -0
  160. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -0
  161. package/build-module/components/global-styles/hooks.js +58 -1
  162. package/build-module/components/global-styles/hooks.js.map +1 -1
  163. package/build-module/components/global-styles/index.js +5 -1
  164. package/build-module/components/global-styles/index.js.map +1 -1
  165. package/build-module/components/global-styles/typography-panel.js +8 -35
  166. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  167. package/build-module/components/global-styles/use-global-styles-output.js +175 -93
  168. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  169. package/build-module/components/global-styles/utils.js +2 -1
  170. package/build-module/components/global-styles/utils.js.map +1 -1
  171. package/build-module/components/iframe/index.js +1 -1
  172. package/build-module/components/iframe/index.js.map +1 -1
  173. package/build-module/components/image-size-control/index.js +8 -5
  174. package/build-module/components/image-size-control/index.js.map +1 -1
  175. package/build-module/components/image-size-control/use-dimension-handler.js +5 -3
  176. package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
  177. package/build-module/components/index.js +1 -0
  178. package/build-module/components/index.js.map +1 -1
  179. package/build-module/components/inserter/block-patterns-tab.js +5 -2
  180. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  181. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +42 -7
  182. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  183. package/build-module/components/inspector-controls-tabs/utils.js +4 -3
  184. package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
  185. package/build-module/components/line-height-control/index.js +15 -1
  186. package/build-module/components/line-height-control/index.js.map +1 -1
  187. package/build-module/components/list-view/appender.js +88 -0
  188. package/build-module/components/list-view/appender.js.map +1 -0
  189. package/build-module/components/list-view/block.js +6 -4
  190. package/build-module/components/list-view/block.js.map +1 -1
  191. package/build-module/components/list-view/branch.js +22 -5
  192. package/build-module/components/list-view/branch.js.map +1 -1
  193. package/build-module/components/list-view/index.js +50 -13
  194. package/build-module/components/list-view/index.js.map +1 -1
  195. package/build-module/components/list-view/use-list-view-client-ids.js +7 -3
  196. package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
  197. package/build-module/components/list-view/use-list-view-drop-zone.js +8 -4
  198. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  199. package/build-module/components/media-replace-flow/index.js +12 -4
  200. package/build-module/components/media-replace-flow/index.js.map +1 -1
  201. package/build-module/components/off-canvas-editor/block-contents.js +5 -1
  202. package/build-module/components/off-canvas-editor/block-contents.js.map +1 -1
  203. package/build-module/components/off-canvas-editor/index.js +17 -14
  204. package/build-module/components/off-canvas-editor/index.js.map +1 -1
  205. package/build-module/components/resizable-box-popover/index.js +26 -0
  206. package/build-module/components/resizable-box-popover/index.js.map +1 -0
  207. package/build-module/components/rich-text/format-edit.js +3 -31
  208. package/build-module/components/rich-text/format-edit.js.map +1 -1
  209. package/build-module/components/rich-text/index.js +0 -1
  210. package/build-module/components/rich-text/index.js.map +1 -1
  211. package/build-module/components/rich-text/index.native.js +7 -10
  212. package/build-module/components/rich-text/index.native.js.map +1 -1
  213. package/build-module/components/spacing-sizes-control/spacing-input-control.js +7 -0
  214. package/build-module/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
  215. package/build-module/components/writing-flow/use-input.js +4 -8
  216. package/build-module/components/writing-flow/use-input.js.map +1 -1
  217. package/build-module/hooks/anchor.js +1 -1
  218. package/build-module/hooks/anchor.js.map +1 -1
  219. package/build-module/hooks/border.js +1 -2
  220. package/build-module/hooks/border.js.map +1 -1
  221. package/build-module/hooks/color.js +90 -232
  222. package/build-module/hooks/color.js.map +1 -1
  223. package/build-module/hooks/content-lock-ui.js +4 -2
  224. package/build-module/hooks/content-lock-ui.js.map +1 -1
  225. package/build-module/hooks/{color-panel.js → contrast-checker.js} +10 -44
  226. package/build-module/hooks/contrast-checker.js.map +1 -0
  227. package/build-module/hooks/dimensions.js +0 -1
  228. package/build-module/hooks/dimensions.js.map +1 -1
  229. package/build-module/hooks/duotone.js +91 -65
  230. package/build-module/hooks/duotone.js.map +1 -1
  231. package/build-module/hooks/margin.js +29 -18
  232. package/build-module/hooks/margin.js.map +1 -1
  233. package/build-module/hooks/padding.js +21 -10
  234. package/build-module/hooks/padding.js.map +1 -1
  235. package/build-module/hooks/position.js +3 -3
  236. package/build-module/hooks/position.js.map +1 -1
  237. package/build-module/hooks/style.js +23 -26
  238. package/build-module/hooks/style.js.map +1 -1
  239. package/build-module/hooks/typography.js +0 -1
  240. package/build-module/hooks/typography.js.map +1 -1
  241. package/build-module/hooks/utils.js +27 -74
  242. package/build-module/hooks/utils.js.map +1 -1
  243. package/build-module/layouts/grid.js +151 -0
  244. package/build-module/layouts/grid.js.map +1 -0
  245. package/build-module/layouts/index.js +2 -1
  246. package/build-module/layouts/index.js.map +1 -1
  247. package/build-module/layouts/utils.js +3 -2
  248. package/build-module/layouts/utils.js.map +1 -1
  249. package/build-module/private-apis.js +5 -1
  250. package/build-module/private-apis.js.map +1 -1
  251. package/build-module/store/actions.js +1 -1
  252. package/build-module/store/actions.js.map +1 -1
  253. package/build-module/utils/object.js +69 -0
  254. package/build-module/utils/object.js.map +1 -0
  255. package/build-style/style-rtl.css +77 -16
  256. package/build-style/style.css +77 -16
  257. package/package.json +31 -31
  258. package/src/components/block-draggable/content.scss +1 -1
  259. package/src/components/block-inspector/style.scss +6 -4
  260. package/src/components/block-list/block-html.js +1 -1
  261. package/src/components/block-list/block.native.js +3 -2
  262. package/src/components/block-list/index.native.js +19 -38
  263. package/src/components/block-list/use-in-between-inserter.js +4 -1
  264. package/src/components/block-popover/inbetween.js +2 -13
  265. package/src/components/block-preview/auto.js +2 -17
  266. package/src/components/block-settings-menu/block-settings-dropdown.js +2 -12
  267. package/src/components/caption/index.native.js +0 -1
  268. package/src/components/colors-gradients/style.scss +8 -8
  269. package/src/components/date-format-picker/index.js +1 -1
  270. package/src/components/editor-styles/index.js +29 -1
  271. package/src/components/global-styles/README.md +129 -16
  272. package/src/components/global-styles/border-panel.js +13 -32
  273. package/src/components/global-styles/color-panel.js +706 -0
  274. package/src/components/global-styles/dimensions-panel.js +43 -55
  275. package/src/components/global-styles/effects-panel.js +228 -0
  276. package/src/components/global-styles/filters-panel.js +157 -0
  277. package/src/components/global-styles/get-block-css-selector.js +118 -0
  278. package/src/components/global-styles/hooks.js +90 -0
  279. package/src/components/global-styles/index.js +4 -1
  280. package/src/components/global-styles/style.scss +42 -0
  281. package/src/components/global-styles/test/use-global-styles-output.js +34 -5
  282. package/src/components/global-styles/typography-panel.js +26 -51
  283. package/src/components/global-styles/use-global-styles-output.js +188 -89
  284. package/src/components/global-styles/utils.js +3 -0
  285. package/src/components/iframe/index.js +1 -1
  286. package/src/components/image-size-control/index.js +4 -3
  287. package/src/components/image-size-control/test/index.js +2 -2
  288. package/src/components/image-size-control/use-dimension-handler.js +4 -3
  289. package/src/components/index.js +4 -1
  290. package/src/components/inner-blocks/README.md +1 -1
  291. package/src/components/inserter/block-patterns-tab.js +3 -1
  292. package/src/components/inspector-controls-tabs/position-controls-panel.js +40 -9
  293. package/src/components/inspector-controls-tabs/utils.js +4 -3
  294. package/src/components/line-height-control/index.js +10 -1
  295. package/src/components/list-view/README.md +2 -0
  296. package/src/components/list-view/appender.js +101 -0
  297. package/src/components/list-view/block.js +6 -4
  298. package/src/components/list-view/branch.js +30 -1
  299. package/src/components/list-view/index.js +60 -11
  300. package/src/components/list-view/style.scss +22 -1
  301. package/src/components/list-view/test/use-list-view-drop-zone.js +188 -0
  302. package/src/components/list-view/use-list-view-client-ids.js +5 -3
  303. package/src/components/list-view/use-list-view-drop-zone.js +9 -3
  304. package/src/components/media-replace-flow/index.js +36 -24
  305. package/src/components/media-replace-flow/style.scss +5 -2
  306. package/src/components/off-canvas-editor/block-contents.js +4 -0
  307. package/src/components/off-canvas-editor/index.js +15 -11
  308. package/src/components/resizable-box-popover/index.js +27 -0
  309. package/src/components/rich-text/format-edit.js +2 -32
  310. package/src/components/rich-text/index.js +0 -1
  311. package/src/components/rich-text/index.native.js +2 -5
  312. package/src/components/spacing-sizes-control/spacing-input-control.js +10 -0
  313. package/src/components/spacing-sizes-control/style.scss +7 -7
  314. package/src/components/writing-flow/use-input.js +4 -5
  315. package/src/hooks/anchor.js +1 -1
  316. package/src/hooks/border.js +1 -2
  317. package/src/hooks/color.js +120 -296
  318. package/src/hooks/content-lock-ui.js +6 -2
  319. package/src/hooks/{color-panel.js → contrast-checker.js} +10 -46
  320. package/src/hooks/dimensions.js +0 -1
  321. package/src/hooks/duotone.js +121 -76
  322. package/src/hooks/margin.js +31 -26
  323. package/src/hooks/padding.js +24 -18
  324. package/src/hooks/position.js +3 -3
  325. package/src/hooks/style.js +29 -28
  326. package/src/hooks/test/utils.js +0 -104
  327. package/src/hooks/typography.js +0 -1
  328. package/src/hooks/utils.js +31 -74
  329. package/src/layouts/grid.js +172 -0
  330. package/src/layouts/index.js +2 -1
  331. package/src/layouts/test/grid.js +21 -0
  332. package/src/layouts/utils.js +2 -2
  333. package/src/private-apis.js +4 -0
  334. package/src/store/actions.js +1 -1
  335. package/src/style.scss +1 -0
  336. package/src/utils/object.js +69 -0
  337. package/src/utils/test/object.js +145 -0
  338. package/tsconfig.tsbuildinfo +1 -1
  339. package/build/components/rich-text/use-native-props.js +0 -11
  340. package/build/components/rich-text/use-native-props.js.map +0 -1
  341. package/build/components/rich-text/use-native-props.native.js +0 -24
  342. package/build/components/rich-text/use-native-props.native.js.map +0 -1
  343. package/build/hooks/color-panel.js.map +0 -1
  344. package/build-module/components/rich-text/use-native-props.js +0 -4
  345. package/build-module/components/rich-text/use-native-props.js.map +0 -1
  346. package/build-module/components/rich-text/use-native-props.native.js +0 -15
  347. package/build-module/components/rich-text/use-native-props.native.js.map +0 -1
  348. package/build-module/hooks/color-panel.js.map +0 -1
  349. package/src/components/rich-text/use-native-props.js +0 -3
  350. package/src/components/rich-text/use-native-props.native.js +0 -17
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 11.8.0 (2023-04-12)
6
+
7
+ ## 11.7.0 (2023-03-29)
8
+
9
+ - `ImageSizeControl`: Update image size label ([#49112](https://github.com/WordPress/gutenberg/pull/49112)).
10
+
5
11
  ## 11.6.0 (2023-03-15)
6
12
 
7
13
  ## 11.5.0 (2023-03-01)
package/README.md CHANGED
@@ -76,6 +76,10 @@ registerCoreBlocks();
76
76
 
77
77
  ## API
78
78
 
79
+ Any components in this package that have a counterpart in [@wordpress/components](/packages/components/README.md) are an extension of those components.
80
+
81
+ Unless you're [creating an editor](docs/how-to-guides/platform/custom-block-editor/README.md), it is recommended that the components in @wordpress/components should be used rather than the ones in this package as these components have been customized for use in an editor and may result in unexpected behaviour if used outside of this context.
82
+
79
83
  <!-- START TOKEN(Autogenerated API docs) -->
80
84
 
81
85
  ### AlignmentControl
@@ -229,8 +233,7 @@ Undocumented declaration.
229
233
 
230
234
  ### BlockTitle
231
235
 
232
- Renders the block's configured title as a string, or empty if the title
233
- cannot be determined.
236
+ Renders the block's configured title as a string, or empty if the title cannot be determined.
234
237
 
235
238
  _Usage_
236
239
 
@@ -260,9 +263,7 @@ _Related_
260
263
 
261
264
  ### BlockTools
262
265
 
263
- Renders block tools (the block toolbar, select/navigation mode toolbar, the
264
- insertion point and a slot for the inline rich text toolbar). Must be wrapped
265
- around the block content and editor styles wrapper or iframe.
266
+ Renders block tools (the block toolbar, select/navigation mode toolbar, the insertion point and a slot for the inline rich text toolbar). Must be wrapped around the block content and editor styles wrapper or iframe.
266
267
 
267
268
  _Parameters_
268
269
 
@@ -316,8 +317,7 @@ _Related_
316
317
 
317
318
  ### createCustomColorsHOC
318
319
 
319
- A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic
320
- for class generation color value, retrieval and color attribute setting.
320
+ A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic for class generation color value, retrieval and color attribute setting.
321
321
 
322
322
  Use this higher-order component to work with a custom set of colors.
323
323
 
@@ -369,8 +369,7 @@ _Returns_
369
369
 
370
370
  ### getColorObjectByAttributeValues
371
371
 
372
- Provided an array of color objects as set by the theme or by the editor defaults,
373
- and the values of the defined color or custom color returns a color object describing the color.
372
+ Provided an array of color objects as set by the theme or by the editor defaults, and the values of the defined color or custom color returns a color object describing the color.
374
373
 
375
374
  _Parameters_
376
375
 
@@ -397,12 +396,9 @@ _Returns_
397
396
 
398
397
  ### getComputedFluidTypographyValue
399
398
 
400
- Computes a fluid font-size value that uses clamp(). A minimum and maximum
401
- font size OR a single font size can be specified.
399
+ Computes a fluid font-size value that uses clamp(). A minimum and maximum font size OR a single font size can be specified.
402
400
 
403
- If a single font size is specified, it is scaled up and down by
404
- minimumFontSizeFactor and maximumFontSizeFactor to arrive at the minimum and
405
- maximum sizes.
401
+ If a single font size is specified, it is scaled up and down by minimumFontSizeFactor and maximumFontSizeFactor to arrive at the minimum and maximum sizes.
406
402
 
407
403
  _Usage_
408
404
 
@@ -436,8 +432,7 @@ _Returns_
436
432
 
437
433
  ### getFontSize
438
434
 
439
- Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values.
440
- If namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned.
435
+ Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values. If namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned.
441
436
 
442
437
  _Parameters_
443
438
 
@@ -513,10 +508,21 @@ _Returns_
513
508
 
514
509
  - `string`: returns the cssUnit value in a simple px format.
515
510
 
511
+ ### getSpacingPresetCssVar
512
+
513
+ Converts a spacing preset into a custom value.
514
+
515
+ _Parameters_
516
+
517
+ - _value_ `string`: Value to convert.
518
+
519
+ _Returns_
520
+
521
+ - `string | undefined`: CSS var string for given spacing preset value.
522
+
516
523
  ### getTypographyClassesAndStyles
517
524
 
518
- Provides the CSS class names and inline styles for a block's typography support
519
- attributes.
525
+ Provides the CSS class names and inline styles for a block's typography support attributes.
520
526
 
521
527
  _Parameters_
522
528
 
@@ -566,6 +572,18 @@ _Related_
566
572
 
567
573
  - <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inspector-controls/README.md>
568
574
 
575
+ ### isValueSpacingPreset
576
+
577
+ Checks is given value is a spacing preset.
578
+
579
+ _Parameters_
580
+
581
+ - _value_ `string`: Value to check
582
+
583
+ _Returns_
584
+
585
+ - `boolean`: Return true if value is string in format var:preset|spacing|.
586
+
569
587
  ### JustifyContentControl
570
588
 
571
589
  _Related_
@@ -612,8 +630,7 @@ _Related_
612
630
 
613
631
  > **Deprecated**
614
632
 
615
- Scrolls the multi block selection end into view if not in view already. This
616
- is important to do after selection by keyboard.
633
+ Scrolls the multi block selection end into view if not in view already. This is important to do after selection by keyboard.
617
634
 
618
635
  ### NavigableToolbar
619
636
 
@@ -727,9 +744,7 @@ _Returns_
727
744
 
728
745
  ### Typewriter
729
746
 
730
- Ensures that the text selection keeps the same vertical distance from the
731
- viewport during keyboard events within this component. The vertical distance
732
- can vary. It is the last clicked or scrolled to position.
747
+ Ensures that the text selection keeps the same vertical distance from the viewport during keyboard events within this component. The vertical distance can vary. It is the last clicked or scrolled to position.
733
748
 
734
749
  ### URLInput
735
750
 
@@ -751,15 +766,9 @@ _Related_
751
766
 
752
767
  ### useBlockDisplayInformation
753
768
 
754
- Hook used to try to find a matching block variation and return
755
- the appropriate information for display reasons. In order to
756
- to try to find a match we need to things:
757
- 1\. Block's client id to extract it's current attributes.
758
- 2\. A block variation should have set `isActive` prop to a proper function.
769
+ Hook used to try to find a matching block variation and return the appropriate information for display reasons. In order to to try to find a match we need to things: 1. Block's client id to extract it's current attributes. 2. A block variation should have set `isActive` prop to a proper function.
759
770
 
760
- If for any reason a block variation match cannot be found,
761
- the returned information come from the Block Type.
762
- If no blockType is found with the provided clientId, returns null.
771
+ If for any reason a block variation match cannot be found, the returned information come from the Block Type. If no blockType is found with the provided clientId, returns null.
763
772
 
764
773
  _Parameters_
765
774
 
@@ -771,10 +780,7 @@ _Returns_
771
780
 
772
781
  ### useBlockEditContext
773
782
 
774
- The `useBlockEditContext` hook provides information about the block this hook is being used in.
775
- It returns an object with the `name`, `isSelected` state, and the `clientId` of the block.
776
- It is useful if you want to create custom hooks that need access to the current blocks clientId
777
- but don't want to rely on the data getting passed in as a parameter.
783
+ The `useBlockEditContext` hook provides information about the block this hook is being used in. It returns an object with the `name`, `isSelected` state, and the `clientId` of the block. It is useful if you want to create custom hooks that need access to the current blocks clientId but don't want to rely on the data getting passed in as a parameter.
778
784
 
779
785
  _Returns_
780
786
 
@@ -782,13 +788,7 @@ _Returns_
782
788
 
783
789
  ### useBlockProps
784
790
 
785
- This hook is used to lightly mark an element as a block element. The element
786
- should be the outermost element of a block. Call this hook and pass the
787
- returned props to the element to mark as a block. If you define a ref for the
788
- element, it is important to pass the ref to this hook, which the hook in turn
789
- will pass to the component through the props it returns. Optionally, you can
790
- also pass any other props through this hook, and they will be merged and
791
- returned.
791
+ This hook is used to lightly mark an element as a block element. The element should be the outermost element of a block. Call this hook and pass the returned props to the element to mark as a block. If you define a ref for the element, it is important to pass the ref to this hook, which the hook in turn will pass to the component through the props it returns. Optionally, you can also pass any other props through this hook, and they will be merged and returned.
792
792
 
793
793
  _Parameters_
794
794
 
@@ -814,13 +814,7 @@ _Returns_
814
814
 
815
815
  ### useInnerBlocksProps
816
816
 
817
- This hook is used to lightly mark an element as an inner blocks wrapper
818
- element. Call this hook and pass the returned props to the element to mark as
819
- an inner blocks wrapper, automatically rendering inner blocks as children. If
820
- you define a ref for the element, it is important to pass the ref to this
821
- hook, which the hook in turn will pass to the component through the props it
822
- returns. Optionally, you can also pass any other props through this hook, and
823
- they will be merged and returned.
817
+ This hook is used to lightly mark an element as an inner blocks wrapper element. Call this hook and pass the returned props to the element to mark as an inner blocks wrapper, automatically rendering inner blocks as children. If you define a ref for the element, it is important to pass the ref to this hook, which the hook in turn will pass to the component through the props it returns. Optionally, you can also pass any other props through this hook, and they will be merged and returned.
824
818
 
825
819
  _Related_
826
820
 
@@ -835,8 +829,7 @@ _Parameters_
835
829
 
836
830
  Hook that retrieves the given setting for the block instance in use.
837
831
 
838
- It looks up the settings first in the block instance hierarchy.
839
- If none is found, it'll look it up in the block editor store.
832
+ It looks up the settings first in the block instance hierarchy. If none is found, it'll look it up in the block editor store.
840
833
 
841
834
  _Usage_
842
835
 
@@ -887,8 +880,7 @@ _Returns_
887
880
 
888
881
  ### withFontSizes
889
882
 
890
- Higher-order component, which handles font size logic for class generation,
891
- font size value retrieval, and font size change handling.
883
+ Higher-order component, which handles font size logic for class generation, font size value retrieval, and font size change handling.
892
884
 
893
885
  _Parameters_
894
886
 
@@ -900,8 +892,7 @@ _Returns_
900
892
 
901
893
  ### WritingFlow
902
894
 
903
- Handles selection and navigation across blocks. This component should be
904
- wrapped around BlockList.
895
+ Handles selection and navigation across blocks. This component should be wrapped around BlockList.
905
896
 
906
897
  _Parameters_
907
898
 
@@ -59,9 +59,7 @@ function BlockHTML(_ref) {
59
59
  }); // Ensure the state is updated if we reset so it displays the default content.
60
60
 
61
61
  if (!html) {
62
- setHtml({
63
- content
64
- });
62
+ setHtml(content);
65
63
  }
66
64
  };
67
65
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/components/block-list/block-html.js"],"names":["BlockHTML","clientId","html","setHtml","block","select","blockEditorStore","getBlock","updateBlock","onChange","blockType","name","attributes","content","isValid","originalContent","event","target","value"],"mappings":";;;;;;;;;AAQA;;AALA;;AAMA;;AACA;;AAWA;;AArBA;AACA;AACA;;AAGA;AACA;AACA;;AAWA;AACA;AACA;AAGA,SAASA,SAAT,OAAmC;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AAClC,QAAM,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AAA,QAAQ,EAAKO,KAAF,IAAab,OAAO,CAAEa,KAAK,CAACC,MAAN,CAAaC,KAAf;AAJhC,IADD;AAQA;;eAEclB,S","sourcesContent":["/**\n * External dependencies\n */\nimport TextareaAutosize from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tgetBlockAttributes,\n\tgetBlockContent,\n\tgetBlockType,\n\tgetSaveContent,\n\tvalidateBlock,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nfunction BlockHTML( { clientId } ) {\n\tconst [ html, setHtml ] = useState( '' );\n\tconst block = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlock( clientId ),\n\t\t[ clientId ]\n\t);\n\tconst { updateBlock } = useDispatch( blockEditorStore );\n\tconst onChange = () => {\n\t\tconst blockType = getBlockType( block.name );\n\n\t\tif ( ! blockType ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst attributes = getBlockAttributes(\n\t\t\tblockType,\n\t\t\thtml,\n\t\t\tblock.attributes\n\t\t);\n\n\t\t// If html is empty we reset the block to the default HTML and mark it as valid to avoid triggering an error\n\t\tconst content = html ? html : getSaveContent( blockType, attributes );\n\t\tconst [ isValid ] = html\n\t\t\t? validateBlock( {\n\t\t\t\t\t...block,\n\t\t\t\t\tattributes,\n\t\t\t\t\toriginalContent: content,\n\t\t\t } )\n\t\t\t: [ true ];\n\n\t\tupdateBlock( clientId, {\n\t\t\tattributes,\n\t\t\toriginalContent: content,\n\t\t\tisValid,\n\t\t} );\n\n\t\t// Ensure the state is updated if we reset so it displays the default content.\n\t\tif ( ! html ) {\n\t\t\tsetHtml( { content } );\n\t\t}\n\t};\n\n\tuseEffect( () => {\n\t\tsetHtml( getBlockContent( block ) );\n\t}, [ block ] );\n\n\treturn (\n\t\t<TextareaAutosize\n\t\t\tclassName=\"block-editor-block-list__block-html-textarea\"\n\t\t\tvalue={ html }\n\t\t\tonBlur={ onChange }\n\t\t\tonChange={ ( event ) => setHtml( event.target.value ) }\n\t\t/>\n\t);\n}\n\nexport default BlockHTML;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/components/block-list/block-html.js"],"names":["BlockHTML","clientId","html","setHtml","block","select","blockEditorStore","getBlock","updateBlock","onChange","blockType","name","attributes","content","isValid","originalContent","event","target","value"],"mappings":";;;;;;;;;AAQA;;AALA;;AAMA;;AACA;;AAWA;;AArBA;AACA;AACA;;AAGA;AACA;AACA;;AAWA;AACA;AACA;AAGA,SAASA,SAAT,OAAmC;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AAClC,QAAM,CAAEC,IAAF,EAAQC,OAAR,IAAoB,uBAAU,EAAV,CAA1B;AACA,QAAMC,KAAK,GAAG,qBACXC,MAAF,IAAcA,MAAM,CAAEC,YAAF,CAAN,CAA2BC,QAA3B,CAAqCN,QAArC,CADD,EAEb,CAAEA,QAAF,CAFa,CAAd;AAIA,QAAM;AAAEO,IAAAA;AAAF,MAAkB,uBAAaF,YAAb,CAAxB;;AACA,QAAMG,QAAQ,GAAG,MAAM;AACtB,UAAMC,SAAS,GAAG,0BAAcN,KAAK,CAACO,IAApB,CAAlB;;AAEA,QAAK,CAAED,SAAP,EAAmB;AAClB;AACA;;AAED,UAAME,UAAU,GAAG,gCAClBF,SADkB,EAElBR,IAFkB,EAGlBE,KAAK,CAACQ,UAHY,CAAnB,CAPsB,CAatB;;AACA,UAAMC,OAAO,GAAGX,IAAI,GAAGA,IAAH,GAAU,4BAAgBQ,SAAhB,EAA2BE,UAA3B,CAA9B;AACA,UAAM,CAAEE,OAAF,IAAcZ,IAAI,GACrB,2BAAe,EACf,GAAGE,KADY;AAEfQ,MAAAA,UAFe;AAGfG,MAAAA,eAAe,EAAEF;AAHF,KAAf,CADqB,GAMrB,CAAE,IAAF,CANH;AAQAL,IAAAA,WAAW,CAAEP,QAAF,EAAY;AACtBW,MAAAA,UADsB;AAEtBG,MAAAA,eAAe,EAAEF,OAFK;AAGtBC,MAAAA;AAHsB,KAAZ,CAAX,CAvBsB,CA6BtB;;AACA,QAAK,CAAEZ,IAAP,EAAc;AACbC,MAAAA,OAAO,CAAEU,OAAF,CAAP;AACA;AACD,GAjCD;;AAmCA,0BAAW,MAAM;AAChBV,IAAAA,OAAO,CAAE,6BAAiBC,KAAjB,CAAF,CAAP;AACA,GAFD,EAEG,CAAEA,KAAF,CAFH;AAIA,SACC,4BAAC,8BAAD;AACC,IAAA,SAAS,EAAC,8CADX;AAEC,IAAA,KAAK,EAAGF,IAFT;AAGC,IAAA,MAAM,EAAGO,QAHV;AAIC,IAAA,QAAQ,EAAKO,KAAF,IAAab,OAAO,CAAEa,KAAK,CAACC,MAAN,CAAaC,KAAf;AAJhC,IADD;AAQA;;eAEclB,S","sourcesContent":["/**\n * External dependencies\n */\nimport TextareaAutosize from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tgetBlockAttributes,\n\tgetBlockContent,\n\tgetBlockType,\n\tgetSaveContent,\n\tvalidateBlock,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nfunction BlockHTML( { clientId } ) {\n\tconst [ html, setHtml ] = useState( '' );\n\tconst block = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlock( clientId ),\n\t\t[ clientId ]\n\t);\n\tconst { updateBlock } = useDispatch( blockEditorStore );\n\tconst onChange = () => {\n\t\tconst blockType = getBlockType( block.name );\n\n\t\tif ( ! blockType ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst attributes = getBlockAttributes(\n\t\t\tblockType,\n\t\t\thtml,\n\t\t\tblock.attributes\n\t\t);\n\n\t\t// If html is empty we reset the block to the default HTML and mark it as valid to avoid triggering an error\n\t\tconst content = html ? html : getSaveContent( blockType, attributes );\n\t\tconst [ isValid ] = html\n\t\t\t? validateBlock( {\n\t\t\t\t\t...block,\n\t\t\t\t\tattributes,\n\t\t\t\t\toriginalContent: content,\n\t\t\t } )\n\t\t\t: [ true ];\n\n\t\tupdateBlock( clientId, {\n\t\t\tattributes,\n\t\t\toriginalContent: content,\n\t\t\tisValid,\n\t\t} );\n\n\t\t// Ensure the state is updated if we reset so it displays the default content.\n\t\tif ( ! html ) {\n\t\t\tsetHtml( content );\n\t\t}\n\t};\n\n\tuseEffect( () => {\n\t\tsetHtml( getBlockContent( block ) );\n\t}, [ block ] );\n\n\treturn (\n\t\t<TextareaAutosize\n\t\t\tclassName=\"block-editor-block-list__block-html-textarea\"\n\t\t\tvalue={ html }\n\t\t\tonBlur={ onChange }\n\t\t\tonChange={ ( event ) => setHtml( event.target.value ) }\n\t\t/>\n\t);\n}\n\nexport default BlockHTML;\n"]}
@@ -222,15 +222,16 @@ class BlockListBlock extends _element.Component {
222
222
  isFullWidth,
223
223
  isContainerRelated
224
224
  } = _components.alignmentHelpers;
225
- const accessible = !(isSelected || isInnerBlockSelected);
225
+ const isFocused = isSelected || isInnerBlockSelected;
226
226
  const screenWidth = Math.floor(_reactNative.Dimensions.get('window').width);
227
227
  const isScreenWidthEqual = blockWidth === screenWidth;
228
228
  const isScreenWidthWider = blockWidth < screenWidth;
229
229
  const isFullWidthToolbar = isFullWidth(align) || isScreenWidthEqual;
230
230
  return (0, _element.createElement)(_reactNative.TouchableWithoutFeedback, {
231
231
  onPress: this.onFocus,
232
- accessible: accessible,
233
- accessibilityRole: 'button'
232
+ accessible: !isFocused,
233
+ accessibilityRole: 'button',
234
+ disabled: isFocused
234
235
  }, (0, _element.createElement)(_reactNative.View, {
235
236
  style: {
236
237
  flex: 1
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/components/block-list/block.native.js"],"names":["emptyArray","BlockForType","attributes","clientId","contentStyle","getBlockWidth","insertBlocksAfter","isSelected","onMerge","name","onBlockFocus","onChange","onDeleteBlock","onReplace","parentWidth","parentBlockAlignment","wrapperProps","blockWidth","baseGlobalStyles","defaultColors","fontSizes","globalStyle","mergedStyle","style","JSON","stringify","Object","fromEntries","entries","filter","key","GlobalStylesContext","BLOCK_STYLE_ATTRIBUTES","includes","parentLayout","BlockListBlock","Component","constructor","arguments","bind","onFocus","state","props","marginHorizontal","anchorNodeRef","firstToSelectId","onSelect","blocks","onInsertBlocks","order","nativeEvent","layout","layoutWidth","Math","floor","width","setState","getBlockForType","renderBlockTitle","styles","blockTitle","render","blockType","icon","isValid","title","isDimmed","isTouchable","isStackedHorizontally","isParentSelected","getStylesFromColorScheme","marginVertical","isInnerBlockSelected","draggingEnabled","draggingClientId","align","accessibilityLabel","isFullWidth","isContainerRelated","alignmentHelpers","accessible","screenWidth","Dimensions","get","isScreenWidthEqual","isScreenWidthWider","isFullWidthToolbar","flex","dimmed","solidBorder","borderFullWidth","containerBorderFullWidth","solidBorderColor","solidBorderColorDark","dashedBorder","dashedBorderColor","dashedBorderColorDark","neutralToolbar","current","wrapperPropsCache","WeakMap","emptyObj","getWrapperProps","value","getWrapperPropsFunction","cachedValue","set","select","getBlockIndex","getBlockCount","getSettings","isBlockSelected","getBlock","getSelectedBlockClientId","getLowestCommonAncestorWithSelectedBlock","getBlockParents","hasSelectedInnerBlock","getBlockHierarchyRootClientId","blockEditorStore","block","parents","parentId","selectedBlockClientId","commonAncestor","commonAncestorIndex","indexOf","length","selectedParents","isDescendantOfParentSelected","__experimentalGlobalStylesBaseStyles","hasInnerBlocks","getEditWrapperProps","dispatch","ownProps","registry","insertBlocks","mergeBlocks","replaceBlocks","selectBlock","updateBlockAttributes","moveBlocksToPosition","removeBlock","forward","rootClientId","getPreviousBlockClientId","getNextBlockClientId","getBlockAttributes","getBlockName","getBlockOrder","getBlockRootClientId","canInsertBlockType","moveFirstItemUp","_clientId","changeSelection","targetRootClientId","blockOrder","firstClientId","replacement","batch","nextRootClientId","rootAttributes","previousRootAttributes","keys","every","nextBlockClientId","previousBlockClientId","previousRootClientId","index","initialPosition","indexToSelect","withPreferredColorScheme"],"mappings":";;;;;;;;;AAQA;;;;AALA;;AAMA;;AAOA;;AACA;;AACA;;AAOA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AApCA;AACA;AACA;;AAGA;AACA;AACA;;AAoBA;AACA;AACA;AASA,MAAMA,UAAU,GAAG,EAAnB;;AACA,SAASC,YAAT,OAkBI;AAAA,MAlBmB;AACtBC,IAAAA,UADsB;AAEtBC,IAAAA,QAFsB;AAGtBC,IAAAA,YAHsB;AAItBC,IAAAA,aAJsB;AAKtBC,IAAAA,iBALsB;AAMtBC,IAAAA,UANsB;AAOtBC,IAAAA,OAPsB;AAQtBC,IAAAA,IARsB;AAStBC,IAAAA,YATsB;AAUtBC,IAAAA,QAVsB;AAWtBC,IAAAA,aAXsB;AAYtBC,IAAAA,SAZsB;AAatBC,IAAAA,WAbsB;AActBC,IAAAA,oBAdsB;AAetBC,IAAAA,YAfsB;AAgBtBC,IAAAA,UAhBsB;AAiBtBC,IAAAA;AAjBsB,GAkBnB;AACH,QAAMC,aAAa,GAAG,8CAAtB;AACA,QAAMC,SAAS,GAAG,6BAAY,sBAAZ,KAAwCpB,UAA1D;AACA,QAAMqB,WAAW,GAAG,kCAApB;AACA,QAAMC,WAAW,GAAG,sBAAS,MAAM;AAClC,WAAO,uCACNJ,gBADM,EAENG,WAFM,EAGNL,YAAY,CAACO,KAHP,EAINrB,UAJM,EAKNiB,aALM,EAMNV,IANM,EAONW,SAPM,CAAP;AASA,GAVmB,EAUjB,CACFD,aADE,EAEFE,WAFE,EAGF;AACA;AACAG,EAAAA,IAAI,CAACC,SAAL,CAAgBT,YAAY,CAACO,KAA7B,CALE,EAMFC,IAAI,CAACC,SAAL,CACCC,MAAM,CAACC,WAAP,CACCD,MAAM,CAACE,OAAP,CAAgB1B,UAAhB,aAAgBA,UAAhB,cAAgBA,UAAhB,GAA8B,EAA9B,EAAmC2B,MAAnC,CAA2C;AA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,GAAF,IACCkI,cAAc,CAAElI,GAAF,CAAd,KACAmI,sBAAsB,CAAEnI,GAAF,CAHxB,CADD,EAME;AACDwG,cAAAA,QAAQ,CAACwB,KAAT,CAAgB,MAAM;AACrBlB,gBAAAA,oBAAoB,CACnBQ,aAAa,CAAEL,YAAF,CADM,EAEnBA,YAFmB,EAGnBuB,oBAHmB,CAApB;AAKAzB,gBAAAA,WAAW,CAAEE,YAAF,EAAgB,KAAhB,CAAX;AACA,eAPD;AAQA;AACA;AACD;;AAEDQ,UAAAA,eAAe,CAAER,YAAF,CAAf;AACA;AACD;AACD,KA/KK;;AAgLN/F,IAAAA,cAAc,CAAED,MAAF,EAAUwH,KAAV,EAAkB;AAC/BhC,MAAAA,YAAY,CAAExF,MAAF,EAAUwH,KAAV,EAAiBlC,QAAQ,CAACU,YAA1B,CAAZ;AACA,KAlLK;;AAmLNjG,IAAAA,QAAQ,GAAkD;AAAA,UAAhD3C,QAAgD,uEAArCkI,QAAQ,CAAClI,QAA4B;AAAA,UAAlBqK,eAAkB;AACzD9B,MAAAA,WAAW,CAAEvI,QAAF,EAAYqK,eAAZ,CAAX;AACA,KArLK;;AAsLN7J,IAAAA,QAAQ,EAAIT,UAAF,IAAkB;AAC3ByI,MAAAA,qBAAqB,CAAEN,QAAQ,CAAClI,QAAX,EAAqBD,UAArB,CAArB;AACA,KAxLK;;AAyLNW,IAAAA,SAAS,CAAEkC,MAAF,EAAU0H,aAAV,EAA0B;AAClChC,MAAAA,aAAa,CAAE,CAAEJ,QAAQ,CAAClI,QAAX,CAAF,EAAyB4C,MAAzB,EAAiC0H,aAAjC,CAAb;AACA;;AA3LK,GAAP;AA6LA,CAxMD,CAzFuB,EAkSvBC,iCAlSuB,CAAT,EAmSVvI,cAnSU,C","sourcesContent":["/**\n * External dependencies\n */\nimport { View, Text, TouchableWithoutFeedback, Dimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component, createRef, useMemo } from '@wordpress/element';\nimport {\n\tGlobalStylesContext,\n\tgetMergedGlobalStyles,\n\tuseMobileGlobalStylesColors,\n\talignmentHelpers,\n\tuseGlobalStyles,\n} from '@wordpress/components';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport {\n\tgetBlockType,\n\t__experimentalGetAccessibleBlockLabel as getAccessibleBlockLabel,\n\tswitchToBlockType,\n\tgetDefaultBlockName,\n\tisUnmodifiedBlock,\n} from '@wordpress/blocks';\nimport { useSetting } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport styles from './block.scss';\nimport BlockEdit from '../block-edit';\nimport BlockInvalidWarning from './block-invalid-warning';\nimport BlockMobileToolbar from '../block-mobile-toolbar';\nimport { store as blockEditorStore } from '../../store';\nimport BlockDraggable from '../block-draggable';\nimport { useLayout } from './layout';\n\nconst emptyArray = [];\nfunction BlockForType( {\n\tattributes,\n\tclientId,\n\tcontentStyle,\n\tgetBlockWidth,\n\tinsertBlocksAfter,\n\tisSelected,\n\tonMerge,\n\tname,\n\tonBlockFocus,\n\tonChange,\n\tonDeleteBlock,\n\tonReplace,\n\tparentWidth,\n\tparentBlockAlignment,\n\twrapperProps,\n\tblockWidth,\n\tbaseGlobalStyles,\n} ) {\n\tconst defaultColors = useMobileGlobalStylesColors();\n\tconst fontSizes = useSetting( 'typography.fontSizes' ) || emptyArray;\n\tconst globalStyle = useGlobalStyles();\n\tconst mergedStyle = useMemo( () => {\n\t\treturn getMergedGlobalStyles(\n\t\t\tbaseGlobalStyles,\n\t\t\tglobalStyle,\n\t\t\twrapperProps.style,\n\t\t\tattributes,\n\t\t\tdefaultColors,\n\t\t\tname,\n\t\t\tfontSizes\n\t\t);\n\t}, [\n\t\tdefaultColors,\n\t\tglobalStyle,\n\t\t// I couldn't simply use attributes and wrapperProps.styles as a dependency because they are almost always a new reference.\n\t\t// Thanks to the JSON.stringify we check if the value is the same instead of reference.\n\t\tJSON.stringify( wrapperProps.style ),\n\t\tJSON.stringify(\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries( attributes ?? {} ).filter( ( [ key ] ) =>\n\t\t\t\t\tGlobalStylesContext.BLOCK_STYLE_ATTRIBUTES.includes( key )\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t] );\n\n\tconst parentLayout = useLayout();\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ mergedStyle }>\n\t\t\t<BlockEdit\n\t\t\t\tname={ name }\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ onChange }\n\t\t\t\tonFocus={ onBlockFocus }\n\t\t\t\tonReplace={ onReplace }\n\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\tmergeBlocks={ onMerge }\n\t\t\t\t// Block level styles.\n\t\t\t\twrapperProps={ wrapperProps }\n\t\t\t\t// Inherited styles merged with block level styles.\n\t\t\t\tstyle={ mergedStyle }\n\t\t\t\tclientId={ clientId }\n\t\t\t\tparentWidth={ parentWidth }\n\t\t\t\tcontentStyle={ contentStyle }\n\t\t\t\tonDeleteBlock={ onDeleteBlock }\n\t\t\t\tblockWidth={ blockWidth }\n\t\t\t\tparentBlockAlignment={ parentBlockAlignment }\n\t\t\t\t__unstableParentLayout={ parentLayout }\n\t\t\t/>\n\t\t\t<View onLayout={ getBlockWidth } />\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n\nclass BlockListBlock extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.insertBlocksAfter = this.insertBlocksAfter.bind( this );\n\t\tthis.onFocus = this.onFocus.bind( this );\n\t\tthis.getBlockWidth = this.getBlockWidth.bind( this );\n\n\t\tthis.state = {\n\t\t\tblockWidth: this.props.blockWidth - 2 * this.props.marginHorizontal,\n\t\t};\n\n\t\tthis.anchorNodeRef = createRef();\n\t}\n\n\tonFocus() {\n\t\tconst { firstToSelectId, isSelected, onSelect } = this.props;\n\t\tif ( ! isSelected ) {\n\t\t\tonSelect( firstToSelectId );\n\t\t}\n\t}\n\n\tinsertBlocksAfter( blocks ) {\n\t\tthis.props.onInsertBlocks( blocks, this.props.order + 1 );\n\n\t\tif ( blocks[ 0 ] ) {\n\t\t\t// Focus on the first block inserted.\n\t\t\tthis.props.onSelect( blocks[ 0 ].clientId );\n\t\t}\n\t}\n\n\tgetBlockWidth( { nativeEvent } ) {\n\t\tconst { layout } = nativeEvent;\n\t\tconst { blockWidth } = this.state;\n\t\tconst layoutWidth = Math.floor( layout.width );\n\n\t\tif ( ! blockWidth || ! layoutWidth ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( blockWidth !== layoutWidth ) {\n\t\t\tthis.setState( { blockWidth: layoutWidth } );\n\t\t}\n\t}\n\n\tgetBlockForType() {\n\t\tconst { blockWidth } = this.state;\n\t\treturn (\n\t\t\t<BlockForType\n\t\t\t\t{ ...this.props }\n\t\t\t\tonBlockFocus={ this.onFocus }\n\t\t\t\tinsertBlocksAfter={ this.insertBlocksAfter }\n\t\t\t\tgetBlockWidth={ this.getBlockWidth }\n\t\t\t\tblockWidth={ blockWidth }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderBlockTitle() {\n\t\treturn (\n\t\t\t<View style={ styles.blockTitle }>\n\t\t\t\t<Text>BlockType: { this.props.name }</Text>\n\t\t\t</View>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tattributes,\n\t\t\tblockType,\n\t\t\tclientId,\n\t\t\ticon,\n\t\t\tisSelected,\n\t\t\tisValid,\n\t\t\torder,\n\t\t\ttitle,\n\t\t\tisDimmed,\n\t\t\tisTouchable,\n\t\t\tonDeleteBlock,\n\t\t\tisStackedHorizontally,\n\t\t\tisParentSelected,\n\t\t\tgetStylesFromColorScheme,\n\t\t\tmarginVertical,\n\t\t\tmarginHorizontal,\n\t\t\tisInnerBlockSelected,\n\t\t\tname,\n\t\t\tdraggingEnabled,\n\t\t\tdraggingClientId,\n\t\t} = this.props;\n\n\t\tif ( ! attributes || ! blockType ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst { blockWidth } = this.state;\n\t\tconst { align } = attributes;\n\t\tconst accessibilityLabel = getAccessibleBlockLabel(\n\t\t\tblockType,\n\t\t\tattributes,\n\t\t\torder + 1\n\t\t);\n\t\tconst { isFullWidth, isContainerRelated } = alignmentHelpers;\n\t\tconst accessible = ! ( isSelected || isInnerBlockSelected );\n\t\tconst screenWidth = Math.floor( Dimensions.get( 'window' ).width );\n\t\tconst isScreenWidthEqual = blockWidth === screenWidth;\n\t\tconst isScreenWidthWider = blockWidth < screenWidth;\n\t\tconst isFullWidthToolbar = isFullWidth( align ) || isScreenWidthEqual;\n\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback\n\t\t\t\tonPress={ this.onFocus }\n\t\t\t\taccessible={ accessible }\n\t\t\t\taccessibilityRole={ 'button' }\n\t\t\t>\n\t\t\t\t<View\n\t\t\t\t\tstyle={ { flex: 1 } }\n\t\t\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\t\t>\n\t\t\t\t\t<View\n\t\t\t\t\t\tpointerEvents={ isTouchable ? 'auto' : 'box-only' }\n\t\t\t\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t{ marginVertical, marginHorizontal, flex: 1 },\n\t\t\t\t\t\t\tisDimmed && styles.dimmed,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tpointerEvents=\"box-none\"\n\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\tstyles.solidBorder,\n\t\t\t\t\t\t\t\t\tisFullWidth( align ) &&\n\t\t\t\t\t\t\t\t\t\tisScreenWidthWider &&\n\t\t\t\t\t\t\t\t\t\tstyles.borderFullWidth,\n\t\t\t\t\t\t\t\t\tisFullWidth( align ) &&\n\t\t\t\t\t\t\t\t\t\tisContainerRelated( name ) &&\n\t\t\t\t\t\t\t\t\t\tisScreenWidthWider &&\n\t\t\t\t\t\t\t\t\t\tstyles.containerBorderFullWidth,\n\t\t\t\t\t\t\t\t\tgetStylesFromColorScheme(\n\t\t\t\t\t\t\t\t\t\tstyles.solidBorderColor,\n\t\t\t\t\t\t\t\t\t\tstyles.solidBorderColorDark\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isParentSelected && (\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\tstyles.dashedBorder,\n\t\t\t\t\t\t\t\t\tgetStylesFromColorScheme(\n\t\t\t\t\t\t\t\t\t\tstyles.dashedBorderColor,\n\t\t\t\t\t\t\t\t\t\tstyles.dashedBorderColorDark\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<BlockDraggable\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\tdraggingClientId={ draggingClientId }\n\t\t\t\t\t\t\tenabled={ draggingEnabled }\n\t\t\t\t\t\t\ttestID=\"draggable-trigger-content\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ () =>\n\t\t\t\t\t\t\t\tisValid ? (\n\t\t\t\t\t\t\t\t\tthis.getBlockForType()\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<BlockInvalidWarning\n\t\t\t\t\t\t\t\t\t\tblockTitle={ title }\n\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</BlockDraggable>\n\t\t\t\t\t\t<View\n\t\t\t\t\t\t\tstyle={ styles.neutralToolbar }\n\t\t\t\t\t\t\tref={ this.anchorNodeRef }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t\t\t<BlockMobileToolbar\n\t\t\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\t\t\tonDelete={ onDeleteBlock }\n\t\t\t\t\t\t\t\t\tisStackedHorizontally={\n\t\t\t\t\t\t\t\t\t\tisStackedHorizontally\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tblockWidth={ blockWidth }\n\t\t\t\t\t\t\t\t\tanchorNodeRef={ this.anchorNodeRef.current }\n\t\t\t\t\t\t\t\t\tisFullWidth={ isFullWidthToolbar }\n\t\t\t\t\t\t\t\t\tdraggingClientId={ draggingClientId }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</View>\n\t\t\t\t</View>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t}\n}\n\n// Helper function to memoize the wrapperProps since getEditWrapperProps always returns a new reference.\nconst wrapperPropsCache = new WeakMap();\nconst emptyObj = {};\nfunction getWrapperProps( value, getWrapperPropsFunction ) {\n\tif ( ! getWrapperPropsFunction ) {\n\t\treturn emptyObj;\n\t}\n\tconst cachedValue = wrapperPropsCache.get( value );\n\tif ( ! cachedValue ) {\n\t\tconst wrapperProps = getWrapperPropsFunction( value );\n\t\twrapperPropsCache.set( value, wrapperProps );\n\t\treturn wrapperProps;\n\t}\n\treturn cachedValue;\n}\n\nexport default compose( [\n\twithSelect( ( select, { clientId } ) => {\n\t\tconst {\n\t\t\tgetBlockIndex,\n\t\t\tgetBlockCount,\n\t\t\tgetSettings,\n\t\t\tisBlockSelected,\n\t\t\tgetBlock,\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetLowestCommonAncestorWithSelectedBlock,\n\t\t\tgetBlockParents,\n\t\t\thasSelectedInnerBlock,\n\t\t\tgetBlockHierarchyRootClientId,\n\t\t} = select( blockEditorStore );\n\n\t\tconst order = getBlockIndex( clientId );\n\t\tconst isSelected = isBlockSelected( clientId );\n\t\tconst isInnerBlockSelected = hasSelectedInnerBlock( clientId );\n\t\tconst block = getBlock( clientId );\n\t\tconst { name, attributes, isValid } = block || {};\n\n\t\tconst blockType = getBlockType( name || 'core/missing' );\n\t\tconst title = blockType?.title;\n\t\tconst icon = blockType?.icon;\n\n\t\tconst parents = getBlockParents( clientId, true );\n\t\tconst parentId = parents[ 0 ] || '';\n\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\n\t\tconst commonAncestor =\n\t\t\tgetLowestCommonAncestorWithSelectedBlock( clientId );\n\t\tconst commonAncestorIndex = parents.indexOf( commonAncestor ) - 1;\n\t\tconst firstToSelectId = commonAncestor\n\t\t\t? parents[ commonAncestorIndex ]\n\t\t\t: parents[ parents.length - 1 ];\n\n\t\tconst isParentSelected =\n\t\t\t// Set false as a default value to prevent re-render when it's changed from null to false.\n\t\t\t( selectedBlockClientId || false ) &&\n\t\t\tselectedBlockClientId === parentId;\n\n\t\tconst selectedParents = selectedBlockClientId\n\t\t\t? getBlockParents( selectedBlockClientId )\n\t\t\t: [];\n\t\tconst isDescendantOfParentSelected =\n\t\t\tselectedParents.includes( parentId );\n\t\tconst isTouchable =\n\t\t\tisSelected ||\n\t\t\tisDescendantOfParentSelected ||\n\t\t\tisParentSelected ||\n\t\t\tparentId === '';\n\t\tconst baseGlobalStyles =\n\t\t\tgetSettings()?.__experimentalGlobalStylesBaseStyles;\n\n\t\tconst hasInnerBlocks = getBlockCount( clientId ) > 0;\n\t\t// For blocks with inner blocks, we only enable the dragging in the nested\n\t\t// blocks if any of them are selected. This way we prevent the long-press\n\t\t// gesture from being disabled for elements within the block UI.\n\t\tconst draggingEnabled =\n\t\t\t! hasInnerBlocks ||\n\t\t\tisSelected ||\n\t\t\t! hasSelectedInnerBlock( clientId, true );\n\t\t// Dragging nested blocks is not supported yet. For this reason, the block to be dragged\n\t\t// will be the top in the hierarchy.\n\t\tconst draggingClientId = getBlockHierarchyRootClientId( clientId );\n\n\t\treturn {\n\t\t\ticon,\n\t\t\tname: name || 'core/missing',\n\t\t\torder,\n\t\t\ttitle,\n\t\t\tattributes,\n\t\t\tblockType,\n\t\t\tdraggingClientId,\n\t\t\tdraggingEnabled,\n\t\t\tisSelected,\n\t\t\tisInnerBlockSelected,\n\t\t\tisValid,\n\t\t\tisParentSelected,\n\t\t\tfirstToSelectId,\n\t\t\tisTouchable,\n\t\t\tbaseGlobalStyles,\n\t\t\twrapperProps: getWrapperProps(\n\t\t\t\tattributes,\n\t\t\t\tblockType.getEditWrapperProps\n\t\t\t),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps, registry ) => {\n\t\tconst {\n\t\t\tinsertBlocks,\n\t\t\tmergeBlocks,\n\t\t\treplaceBlocks,\n\t\t\tselectBlock,\n\t\t\tupdateBlockAttributes,\n\t\t\tmoveBlocksToPosition,\n\t\t\tremoveBlock,\n\t\t} = dispatch( blockEditorStore );\n\n\t\treturn {\n\t\t\tonMerge( forward ) {\n\t\t\t\tconst { clientId, rootClientId } = ownProps;\n\t\t\t\tconst {\n\t\t\t\t\tgetPreviousBlockClientId,\n\t\t\t\t\tgetNextBlockClientId,\n\t\t\t\t\tgetBlock,\n\t\t\t\t\tgetBlockAttributes,\n\t\t\t\t\tgetBlockName,\n\t\t\t\t\tgetBlockOrder,\n\t\t\t\t\tgetBlockIndex,\n\t\t\t\t\tgetBlockRootClientId,\n\t\t\t\t\tcanInsertBlockType,\n\t\t\t\t} = registry.select( blockEditorStore );\n\n\t\t\t\t/**\n\t\t\t\t * Moves the block with clientId up one level. If the block type\n\t\t\t\t * cannot be inserted at the new location, it will be attempted to\n\t\t\t\t * convert to the default block type.\n\t\t\t\t *\n\t\t\t\t * @param {string} _clientId The block to move.\n\t\t\t\t * @param {boolean} changeSelection Whether to change the selection\n\t\t\t\t * to the moved block.\n\t\t\t\t */\n\t\t\t\tfunction moveFirstItemUp( _clientId, changeSelection = true ) {\n\t\t\t\t\tconst targetRootClientId =\n\t\t\t\t\t\tgetBlockRootClientId( _clientId );\n\t\t\t\t\tconst blockOrder = getBlockOrder( _clientId );\n\t\t\t\t\tconst [ firstClientId ] = blockOrder;\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tblockOrder.length === 1 &&\n\t\t\t\t\t\tisUnmodifiedBlock( getBlock( firstClientId ) )\n\t\t\t\t\t) {\n\t\t\t\t\t\tremoveBlock( _clientId );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\t\tgetBlockName( firstClientId ),\n\t\t\t\t\t\t\t\ttargetRootClientId\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\t\t\t\t[ firstClientId ],\n\t\t\t\t\t\t\t\t_clientId,\n\t\t\t\t\t\t\t\ttargetRootClientId,\n\t\t\t\t\t\t\t\tgetBlockIndex( _clientId )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst replacement = switchToBlockType(\n\t\t\t\t\t\t\t\tgetBlock( firstClientId ),\n\t\t\t\t\t\t\t\tgetDefaultBlockName()\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif ( replacement && replacement.length ) {\n\t\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\tinsertBlocks(\n\t\t\t\t\t\t\t\t\t\treplacement,\n\t\t\t\t\t\t\t\t\t\tgetBlockIndex( _clientId ),\n\t\t\t\t\t\t\t\t\t\ttargetRootClientId,\n\t\t\t\t\t\t\t\t\t\tchangeSelection\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tremoveBlock( firstClientId, false );\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! getBlockOrder( _clientId ).length &&\n\t\t\t\t\t\t\tisUnmodifiedBlock( getBlock( _clientId ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tremoveBlock( _clientId, false );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// For `Delete` or forward merge, we should do the exact same thing\n\t\t\t\t// as `Backspace`, but from the other block.\n\t\t\t\tif ( forward ) {\n\t\t\t\t\tif ( rootClientId ) {\n\t\t\t\t\t\tconst nextRootClientId =\n\t\t\t\t\t\t\tgetNextBlockClientId( rootClientId );\n\n\t\t\t\t\t\tif ( nextRootClientId ) {\n\t\t\t\t\t\t\t// If there is a block that follows with the same parent\n\t\t\t\t\t\t\t// block name and the same attributes, merge the inner\n\t\t\t\t\t\t\t// blocks.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tgetBlockName( rootClientId ) ===\n\t\t\t\t\t\t\t\tgetBlockName( nextRootClientId )\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tconst rootAttributes =\n\t\t\t\t\t\t\t\t\tgetBlockAttributes( rootClientId );\n\t\t\t\t\t\t\t\tconst previousRootAttributes =\n\t\t\t\t\t\t\t\t\tgetBlockAttributes( nextRootClientId );\n\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tObject.keys( rootAttributes ).every(\n\t\t\t\t\t\t\t\t\t\t( key ) =>\n\t\t\t\t\t\t\t\t\t\t\trootAttributes[ key ] ===\n\t\t\t\t\t\t\t\t\t\t\tpreviousRootAttributes[ key ]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\t\t\t\t\t\t\tgetBlockOrder( nextRootClientId ),\n\t\t\t\t\t\t\t\t\t\t\tnextRootClientId,\n\t\t\t\t\t\t\t\t\t\t\trootClientId\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tremoveBlock( nextRootClientId, false );\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmergeBlocks( rootClientId, nextRootClientId );\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tconst nextBlockClientId = getNextBlockClientId( clientId );\n\n\t\t\t\t\tif ( ! nextBlockClientId ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( getBlockOrder( nextBlockClientId ).length ) {\n\t\t\t\t\t\tmoveFirstItemUp( nextBlockClientId, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmergeBlocks( clientId, nextBlockClientId );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst previousBlockClientId =\n\t\t\t\t\t\tgetPreviousBlockClientId( clientId );\n\n\t\t\t\t\tif ( previousBlockClientId ) {\n\t\t\t\t\t\tmergeBlocks( previousBlockClientId, clientId );\n\t\t\t\t\t} else if ( rootClientId ) {\n\t\t\t\t\t\tconst previousRootClientId =\n\t\t\t\t\t\t\tgetPreviousBlockClientId( rootClientId );\n\n\t\t\t\t\t\t// If there is a preceding block with the same parent block\n\t\t\t\t\t\t// name and the same attributes, merge the inner blocks.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tpreviousRootClientId &&\n\t\t\t\t\t\t\tgetBlockName( rootClientId ) ===\n\t\t\t\t\t\t\t\tgetBlockName( previousRootClientId )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tconst rootAttributes =\n\t\t\t\t\t\t\t\tgetBlockAttributes( rootClientId );\n\t\t\t\t\t\t\tconst previousRootAttributes =\n\t\t\t\t\t\t\t\tgetBlockAttributes( previousRootClientId );\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tObject.keys( rootAttributes ).every(\n\t\t\t\t\t\t\t\t\t( key ) =>\n\t\t\t\t\t\t\t\t\t\trootAttributes[ key ] ===\n\t\t\t\t\t\t\t\t\t\tpreviousRootAttributes[ key ]\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\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\t\t\t\t\t\tgetBlockOrder( rootClientId ),\n\t\t\t\t\t\t\t\t\t\trootClientId,\n\t\t\t\t\t\t\t\t\t\tpreviousRootClientId\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tremoveBlock( rootClientId, false );\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmoveFirstItemUp( rootClientId );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tonInsertBlocks( blocks, index ) {\n\t\t\t\tinsertBlocks( blocks, index, ownProps.rootClientId );\n\t\t\t},\n\t\t\tonSelect( clientId = ownProps.clientId, initialPosition ) {\n\t\t\t\tselectBlock( clientId, initialPosition );\n\t\t\t},\n\t\t\tonChange: ( attributes ) => {\n\t\t\t\tupdateBlockAttributes( ownProps.clientId, attributes );\n\t\t\t},\n\t\t\tonReplace( blocks, indexToSelect ) {\n\t\t\t\treplaceBlocks( [ ownProps.clientId ], blocks, indexToSelect );\n\t\t\t},\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n] )( BlockListBlock );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/components/block-list/block.native.js"],"names":["emptyArray","BlockForType","attributes","clientId","contentStyle","getBlockWidth","insertBlocksAfter","isSelected","onMerge","name","onBlockFocus","onChange","onDeleteBlock","onReplace","parentWidth","parentBlockAlignment","wrapperProps","blockWidth","baseGlobalStyles","defaultColors","fontSizes","globalStyle","mergedStyle","style","JSON","stringify","Object","fromEntries","entries","filter","key","GlobalStylesContext","BLOCK_STYLE_ATTRIBUTES","includes","parentLayout","BlockListBlock","Component","constructor","arguments","bind","onFocus","state","props","marginHorizontal","anchorNodeRef","firstToSelectId","onSelect","blocks","onInsertBlocks","order","nativeEvent","layout","layoutWidth","Math","floor","width","setState","getBlockForType","renderBlockTitle","styles","blockTitle","render","blockType","icon","isValid","title","isDimmed","isTouchable","isStackedHorizontally","isParentSelected","getStylesFromColorScheme","marginVertical","isInnerBlockSelected","draggingEnabled","draggingClientId","align","accessibilityLabel","isFullWidth","isContainerRelated","alignmentHelpers","isFocused","screenWidth","Dimensions","get","isScreenWidthEqual","isScreenWidthWider","isFullWidthToolbar","flex","dimmed","solidBorder","borderFullWidth","containerBorderFullWidth","solidBorderColor","solidBorderColorDark","dashedBorder","dashedBorderColor","dashedBorderColorDark","neutralToolbar","current","wrapperPropsCache","WeakMap","emptyObj","getWrapperProps","value","getWrapperPropsFunction","cachedValue","set","select","getBlockIndex","getBlockCount","getSettings","isBlockSelected","getBlock","getSelectedBlockClientId","getLowestCommonAncestorWithSelectedBlock","getBlockParents","hasSelectedInnerBlock","getBlockHierarchyRootClientId","blockEditorStore","block","parents","parentId","selectedBlockClientId","commonAncestor","commonAncestorIndex","indexOf","length","selectedParents","isDescendantOfParentSelected","__experimentalGlobalStylesBaseStyles","hasInnerBlocks","getEditWrapperProps","dispatch","ownProps","registry","insertBlocks","mergeBlocks","replaceBlocks","selectBlock","updateBlockAttributes","moveBlocksToPosition","removeBlock","forward","rootClientId","getPreviousBlockClientId","getNextBlockClientId","getBlockAttributes","getBlockName","getBlockOrder","getBlockRootClientId","canInsertBlockType","moveFirstItemUp","_clientId","changeSelection","targetRootClientId","blockOrder","firstClientId","replacement","batch","nextRootClientId","rootAttributes","previousRootAttributes","keys","every","nextBlockClientId","previousBlockClientId","previousRootClientId","index","initialPosition","indexToSelect","withPreferredColorScheme"],"mappings":";;;;;;;;;AAQA;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BAAsB,CAAEnI,GAAF,CAHxB,CADD,EAME;AACDwG,cAAAA,QAAQ,CAACwB,KAAT,CAAgB,MAAM;AACrBlB,gBAAAA,oBAAoB,CACnBQ,aAAa,CAAEL,YAAF,CADM,EAEnBA,YAFmB,EAGnBuB,oBAHmB,CAApB;AAKAzB,gBAAAA,WAAW,CAAEE,YAAF,EAAgB,KAAhB,CAAX;AACA,eAPD;AAQA;AACA;AACD;;AAEDQ,UAAAA,eAAe,CAAER,YAAF,CAAf;AACA;AACD;AACD,KA/KK;;AAgLN/F,IAAAA,cAAc,CAAED,MAAF,EAAUwH,KAAV,EAAkB;AAC/BhC,MAAAA,YAAY,CAAExF,MAAF,EAAUwH,KAAV,EAAiBlC,QAAQ,CAACU,YAA1B,CAAZ;AACA,KAlLK;;AAmLNjG,IAAAA,QAAQ,GAAkD;AAAA,UAAhD3C,QAAgD,uEAArCkI,QAAQ,CAAClI,QAA4B;AAAA,UAAlBqK,eAAkB;AACzD9B,MAAAA,WAAW,CAAEvI,QAAF,EAAYqK,eAAZ,CAAX;AACA,KArLK;;AAsLN7J,IAAAA,QAAQ,EAAIT,UAAF,IAAkB;AAC3ByI,MAAAA,qBAAqB,CAAEN,QAAQ,CAAClI,QAAX,EAAqBD,UAArB,CAArB;AACA,KAxLK;;AAyLNW,IAAAA,SAAS,CAAEkC,MAAF,EAAU0H,aAAV,EAA0B;AAClChC,MAAAA,aAAa,CAAE,CAAEJ,QAAQ,CAAClI,QAAX,CAAF,EAAyB4C,MAAzB,EAAiC0H,aAAjC,CAAb;AACA;;AA3LK,GAAP;AA6LA,CAxMD,CAzFuB,EAkSvBC,iCAlSuB,CAAT,EAmSVvI,cAnSU,C","sourcesContent":["/**\n * External dependencies\n */\nimport { View, Text, TouchableWithoutFeedback, Dimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component, createRef, useMemo } from '@wordpress/element';\nimport {\n\tGlobalStylesContext,\n\tgetMergedGlobalStyles,\n\tuseMobileGlobalStylesColors,\n\talignmentHelpers,\n\tuseGlobalStyles,\n} from '@wordpress/components';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport {\n\tgetBlockType,\n\t__experimentalGetAccessibleBlockLabel as getAccessibleBlockLabel,\n\tswitchToBlockType,\n\tgetDefaultBlockName,\n\tisUnmodifiedBlock,\n} from '@wordpress/blocks';\nimport { useSetting } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport styles from './block.scss';\nimport BlockEdit from '../block-edit';\nimport BlockInvalidWarning from './block-invalid-warning';\nimport BlockMobileToolbar from '../block-mobile-toolbar';\nimport { store as blockEditorStore } from '../../store';\nimport BlockDraggable from '../block-draggable';\nimport { useLayout } from './layout';\n\nconst emptyArray = [];\nfunction BlockForType( {\n\tattributes,\n\tclientId,\n\tcontentStyle,\n\tgetBlockWidth,\n\tinsertBlocksAfter,\n\tisSelected,\n\tonMerge,\n\tname,\n\tonBlockFocus,\n\tonChange,\n\tonDeleteBlock,\n\tonReplace,\n\tparentWidth,\n\tparentBlockAlignment,\n\twrapperProps,\n\tblockWidth,\n\tbaseGlobalStyles,\n} ) {\n\tconst defaultColors = useMobileGlobalStylesColors();\n\tconst fontSizes = useSetting( 'typography.fontSizes' ) || emptyArray;\n\tconst globalStyle = useGlobalStyles();\n\tconst mergedStyle = useMemo( () => {\n\t\treturn getMergedGlobalStyles(\n\t\t\tbaseGlobalStyles,\n\t\t\tglobalStyle,\n\t\t\twrapperProps.style,\n\t\t\tattributes,\n\t\t\tdefaultColors,\n\t\t\tname,\n\t\t\tfontSizes\n\t\t);\n\t}, [\n\t\tdefaultColors,\n\t\tglobalStyle,\n\t\t// I couldn't simply use attributes and wrapperProps.styles as a dependency because they are almost always a new reference.\n\t\t// Thanks to the JSON.stringify we check if the value is the same instead of reference.\n\t\tJSON.stringify( wrapperProps.style ),\n\t\tJSON.stringify(\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries( attributes ?? {} ).filter( ( [ key ] ) =>\n\t\t\t\t\tGlobalStylesContext.BLOCK_STYLE_ATTRIBUTES.includes( key )\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t] );\n\n\tconst parentLayout = useLayout();\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ mergedStyle }>\n\t\t\t<BlockEdit\n\t\t\t\tname={ name }\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ onChange }\n\t\t\t\tonFocus={ onBlockFocus }\n\t\t\t\tonReplace={ onReplace }\n\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\tmergeBlocks={ onMerge }\n\t\t\t\t// Block level styles.\n\t\t\t\twrapperProps={ wrapperProps }\n\t\t\t\t// Inherited styles merged with block level styles.\n\t\t\t\tstyle={ mergedStyle }\n\t\t\t\tclientId={ clientId }\n\t\t\t\tparentWidth={ parentWidth }\n\t\t\t\tcontentStyle={ contentStyle }\n\t\t\t\tonDeleteBlock={ onDeleteBlock }\n\t\t\t\tblockWidth={ blockWidth }\n\t\t\t\tparentBlockAlignment={ parentBlockAlignment }\n\t\t\t\t__unstableParentLayout={ parentLayout }\n\t\t\t/>\n\t\t\t<View onLayout={ getBlockWidth } />\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n\nclass BlockListBlock extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.insertBlocksAfter = this.insertBlocksAfter.bind( this );\n\t\tthis.onFocus = this.onFocus.bind( this );\n\t\tthis.getBlockWidth = this.getBlockWidth.bind( this );\n\n\t\tthis.state = {\n\t\t\tblockWidth: this.props.blockWidth - 2 * this.props.marginHorizontal,\n\t\t};\n\n\t\tthis.anchorNodeRef = createRef();\n\t}\n\n\tonFocus() {\n\t\tconst { firstToSelectId, isSelected, onSelect } = this.props;\n\t\tif ( ! isSelected ) {\n\t\t\tonSelect( firstToSelectId );\n\t\t}\n\t}\n\n\tinsertBlocksAfter( blocks ) {\n\t\tthis.props.onInsertBlocks( blocks, this.props.order + 1 );\n\n\t\tif ( blocks[ 0 ] ) {\n\t\t\t// Focus on the first block inserted.\n\t\t\tthis.props.onSelect( blocks[ 0 ].clientId );\n\t\t}\n\t}\n\n\tgetBlockWidth( { nativeEvent } ) {\n\t\tconst { layout } = nativeEvent;\n\t\tconst { blockWidth } = this.state;\n\t\tconst layoutWidth = Math.floor( layout.width );\n\n\t\tif ( ! blockWidth || ! layoutWidth ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( blockWidth !== layoutWidth ) {\n\t\t\tthis.setState( { blockWidth: layoutWidth } );\n\t\t}\n\t}\n\n\tgetBlockForType() {\n\t\tconst { blockWidth } = this.state;\n\t\treturn (\n\t\t\t<BlockForType\n\t\t\t\t{ ...this.props }\n\t\t\t\tonBlockFocus={ this.onFocus }\n\t\t\t\tinsertBlocksAfter={ this.insertBlocksAfter }\n\t\t\t\tgetBlockWidth={ this.getBlockWidth }\n\t\t\t\tblockWidth={ blockWidth }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderBlockTitle() {\n\t\treturn (\n\t\t\t<View style={ styles.blockTitle }>\n\t\t\t\t<Text>BlockType: { this.props.name }</Text>\n\t\t\t</View>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tattributes,\n\t\t\tblockType,\n\t\t\tclientId,\n\t\t\ticon,\n\t\t\tisSelected,\n\t\t\tisValid,\n\t\t\torder,\n\t\t\ttitle,\n\t\t\tisDimmed,\n\t\t\tisTouchable,\n\t\t\tonDeleteBlock,\n\t\t\tisStackedHorizontally,\n\t\t\tisParentSelected,\n\t\t\tgetStylesFromColorScheme,\n\t\t\tmarginVertical,\n\t\t\tmarginHorizontal,\n\t\t\tisInnerBlockSelected,\n\t\t\tname,\n\t\t\tdraggingEnabled,\n\t\t\tdraggingClientId,\n\t\t} = this.props;\n\n\t\tif ( ! attributes || ! blockType ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst { blockWidth } = this.state;\n\t\tconst { align } = attributes;\n\t\tconst accessibilityLabel = getAccessibleBlockLabel(\n\t\t\tblockType,\n\t\t\tattributes,\n\t\t\torder + 1\n\t\t);\n\t\tconst { isFullWidth, isContainerRelated } = alignmentHelpers;\n\t\tconst isFocused = isSelected || isInnerBlockSelected;\n\t\tconst screenWidth = Math.floor( Dimensions.get( 'window' ).width );\n\t\tconst isScreenWidthEqual = blockWidth === screenWidth;\n\t\tconst isScreenWidthWider = blockWidth < screenWidth;\n\t\tconst isFullWidthToolbar = isFullWidth( align ) || isScreenWidthEqual;\n\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback\n\t\t\t\tonPress={ this.onFocus }\n\t\t\t\taccessible={ ! isFocused }\n\t\t\t\taccessibilityRole={ 'button' }\n\t\t\t\tdisabled={ isFocused }\n\t\t\t>\n\t\t\t\t<View\n\t\t\t\t\tstyle={ { flex: 1 } }\n\t\t\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\t\t>\n\t\t\t\t\t<View\n\t\t\t\t\t\tpointerEvents={ isTouchable ? 'auto' : 'box-only' }\n\t\t\t\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t{ marginVertical, marginHorizontal, flex: 1 },\n\t\t\t\t\t\t\tisDimmed && styles.dimmed,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tpointerEvents=\"box-none\"\n\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\tstyles.solidBorder,\n\t\t\t\t\t\t\t\t\tisFullWidth( align ) &&\n\t\t\t\t\t\t\t\t\t\tisScreenWidthWider &&\n\t\t\t\t\t\t\t\t\t\tstyles.borderFullWidth,\n\t\t\t\t\t\t\t\t\tisFullWidth( align ) &&\n\t\t\t\t\t\t\t\t\t\tisContainerRelated( name ) &&\n\t\t\t\t\t\t\t\t\t\tisScreenWidthWider &&\n\t\t\t\t\t\t\t\t\t\tstyles.containerBorderFullWidth,\n\t\t\t\t\t\t\t\t\tgetStylesFromColorScheme(\n\t\t\t\t\t\t\t\t\t\tstyles.solidBorderColor,\n\t\t\t\t\t\t\t\t\t\tstyles.solidBorderColorDark\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isParentSelected && (\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\tstyles.dashedBorder,\n\t\t\t\t\t\t\t\t\tgetStylesFromColorScheme(\n\t\t\t\t\t\t\t\t\t\tstyles.dashedBorderColor,\n\t\t\t\t\t\t\t\t\t\tstyles.dashedBorderColorDark\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<BlockDraggable\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\tdraggingClientId={ draggingClientId }\n\t\t\t\t\t\t\tenabled={ draggingEnabled }\n\t\t\t\t\t\t\ttestID=\"draggable-trigger-content\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ () =>\n\t\t\t\t\t\t\t\tisValid ? (\n\t\t\t\t\t\t\t\t\tthis.getBlockForType()\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<BlockInvalidWarning\n\t\t\t\t\t\t\t\t\t\tblockTitle={ title }\n\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</BlockDraggable>\n\t\t\t\t\t\t<View\n\t\t\t\t\t\t\tstyle={ styles.neutralToolbar }\n\t\t\t\t\t\t\tref={ this.anchorNodeRef }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t\t\t<BlockMobileToolbar\n\t\t\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\t\t\tonDelete={ onDeleteBlock }\n\t\t\t\t\t\t\t\t\tisStackedHorizontally={\n\t\t\t\t\t\t\t\t\t\tisStackedHorizontally\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tblockWidth={ blockWidth }\n\t\t\t\t\t\t\t\t\tanchorNodeRef={ this.anchorNodeRef.current }\n\t\t\t\t\t\t\t\t\tisFullWidth={ isFullWidthToolbar }\n\t\t\t\t\t\t\t\t\tdraggingClientId={ draggingClientId }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</View>\n\t\t\t\t</View>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t}\n}\n\n// Helper function to memoize the wrapperProps since getEditWrapperProps always returns a new reference.\nconst wrapperPropsCache = new WeakMap();\nconst emptyObj = {};\nfunction getWrapperProps( value, getWrapperPropsFunction ) {\n\tif ( ! getWrapperPropsFunction ) {\n\t\treturn emptyObj;\n\t}\n\tconst cachedValue = wrapperPropsCache.get( value );\n\tif ( ! cachedValue ) {\n\t\tconst wrapperProps = getWrapperPropsFunction( value );\n\t\twrapperPropsCache.set( value, wrapperProps );\n\t\treturn wrapperProps;\n\t}\n\treturn cachedValue;\n}\n\nexport default compose( [\n\twithSelect( ( select, { clientId } ) => {\n\t\tconst {\n\t\t\tgetBlockIndex,\n\t\t\tgetBlockCount,\n\t\t\tgetSettings,\n\t\t\tisBlockSelected,\n\t\t\tgetBlock,\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetLowestCommonAncestorWithSelectedBlock,\n\t\t\tgetBlockParents,\n\t\t\thasSelectedInnerBlock,\n\t\t\tgetBlockHierarchyRootClientId,\n\t\t} = select( blockEditorStore );\n\n\t\tconst order = getBlockIndex( clientId );\n\t\tconst isSelected = isBlockSelected( clientId );\n\t\tconst isInnerBlockSelected = hasSelectedInnerBlock( clientId );\n\t\tconst block = getBlock( clientId );\n\t\tconst { name, attributes, isValid } = block || {};\n\n\t\tconst blockType = getBlockType( name || 'core/missing' );\n\t\tconst title = blockType?.title;\n\t\tconst icon = blockType?.icon;\n\n\t\tconst parents = getBlockParents( clientId, true );\n\t\tconst parentId = parents[ 0 ] || '';\n\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\n\t\tconst commonAncestor =\n\t\t\tgetLowestCommonAncestorWithSelectedBlock( clientId );\n\t\tconst commonAncestorIndex = parents.indexOf( commonAncestor ) - 1;\n\t\tconst firstToSelectId = commonAncestor\n\t\t\t? parents[ commonAncestorIndex ]\n\t\t\t: parents[ parents.length - 1 ];\n\n\t\tconst isParentSelected =\n\t\t\t// Set false as a default value to prevent re-render when it's changed from null to false.\n\t\t\t( selectedBlockClientId || false ) &&\n\t\t\tselectedBlockClientId === parentId;\n\n\t\tconst selectedParents = selectedBlockClientId\n\t\t\t? getBlockParents( selectedBlockClientId )\n\t\t\t: [];\n\t\tconst isDescendantOfParentSelected =\n\t\t\tselectedParents.includes( parentId );\n\t\tconst isTouchable =\n\t\t\tisSelected ||\n\t\t\tisDescendantOfParentSelected ||\n\t\t\tisParentSelected ||\n\t\t\tparentId === '';\n\t\tconst baseGlobalStyles =\n\t\t\tgetSettings()?.__experimentalGlobalStylesBaseStyles;\n\n\t\tconst hasInnerBlocks = getBlockCount( clientId ) > 0;\n\t\t// For blocks with inner blocks, we only enable the dragging in the nested\n\t\t// blocks if any of them are selected. This way we prevent the long-press\n\t\t// gesture from being disabled for elements within the block UI.\n\t\tconst draggingEnabled =\n\t\t\t! hasInnerBlocks ||\n\t\t\tisSelected ||\n\t\t\t! hasSelectedInnerBlock( clientId, true );\n\t\t// Dragging nested blocks is not supported yet. For this reason, the block to be dragged\n\t\t// will be the top in the hierarchy.\n\t\tconst draggingClientId = getBlockHierarchyRootClientId( clientId );\n\n\t\treturn {\n\t\t\ticon,\n\t\t\tname: name || 'core/missing',\n\t\t\torder,\n\t\t\ttitle,\n\t\t\tattributes,\n\t\t\tblockType,\n\t\t\tdraggingClientId,\n\t\t\tdraggingEnabled,\n\t\t\tisSelected,\n\t\t\tisInnerBlockSelected,\n\t\t\tisValid,\n\t\t\tisParentSelected,\n\t\t\tfirstToSelectId,\n\t\t\tisTouchable,\n\t\t\tbaseGlobalStyles,\n\t\t\twrapperProps: getWrapperProps(\n\t\t\t\tattributes,\n\t\t\t\tblockType.getEditWrapperProps\n\t\t\t),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps, registry ) => {\n\t\tconst {\n\t\t\tinsertBlocks,\n\t\t\tmergeBlocks,\n\t\t\treplaceBlocks,\n\t\t\tselectBlock,\n\t\t\tupdateBlockAttributes,\n\t\t\tmoveBlocksToPosition,\n\t\t\tremoveBlock,\n\t\t} = dispatch( blockEditorStore );\n\n\t\treturn {\n\t\t\tonMerge( forward ) {\n\t\t\t\tconst { clientId, rootClientId } = ownProps;\n\t\t\t\tconst {\n\t\t\t\t\tgetPreviousBlockClientId,\n\t\t\t\t\tgetNextBlockClientId,\n\t\t\t\t\tgetBlock,\n\t\t\t\t\tgetBlockAttributes,\n\t\t\t\t\tgetBlockName,\n\t\t\t\t\tgetBlockOrder,\n\t\t\t\t\tgetBlockIndex,\n\t\t\t\t\tgetBlockRootClientId,\n\t\t\t\t\tcanInsertBlockType,\n\t\t\t\t} = registry.select( blockEditorStore );\n\n\t\t\t\t/**\n\t\t\t\t * Moves the block with clientId up one level. If the block type\n\t\t\t\t * cannot be inserted at the new location, it will be attempted to\n\t\t\t\t * convert to the default block type.\n\t\t\t\t *\n\t\t\t\t * @param {string} _clientId The block to move.\n\t\t\t\t * @param {boolean} changeSelection Whether to change the selection\n\t\t\t\t * to the moved block.\n\t\t\t\t */\n\t\t\t\tfunction moveFirstItemUp( _clientId, changeSelection = true ) {\n\t\t\t\t\tconst targetRootClientId =\n\t\t\t\t\t\tgetBlockRootClientId( _clientId );\n\t\t\t\t\tconst blockOrder = getBlockOrder( _clientId );\n\t\t\t\t\tconst [ firstClientId ] = blockOrder;\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tblockOrder.length === 1 &&\n\t\t\t\t\t\tisUnmodifiedBlock( getBlock( firstClientId ) )\n\t\t\t\t\t) {\n\t\t\t\t\t\tremoveBlock( _clientId );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\t\tgetBlockName( firstClientId ),\n\t\t\t\t\t\t\t\ttargetRootClientId\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\t\t\t\t[ firstClientId ],\n\t\t\t\t\t\t\t\t_clientId,\n\t\t\t\t\t\t\t\ttargetRootClientId,\n\t\t\t\t\t\t\t\tgetBlockIndex( _clientId )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst replacement = switchToBlockType(\n\t\t\t\t\t\t\t\tgetBlock( firstClientId ),\n\t\t\t\t\t\t\t\tgetDefaultBlockName()\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif ( replacement && replacement.length ) {\n\t\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\tinsertBlocks(\n\t\t\t\t\t\t\t\t\t\treplacement,\n\t\t\t\t\t\t\t\t\t\tgetBlockIndex( _clientId ),\n\t\t\t\t\t\t\t\t\t\ttargetRootClientId,\n\t\t\t\t\t\t\t\t\t\tchangeSelection\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tremoveBlock( firstClientId, false );\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! getBlockOrder( _clientId ).length &&\n\t\t\t\t\t\t\tisUnmodifiedBlock( getBlock( _clientId ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tremoveBlock( _clientId, false );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// For `Delete` or forward merge, we should do the exact same thing\n\t\t\t\t// as `Backspace`, but from the other block.\n\t\t\t\tif ( forward ) {\n\t\t\t\t\tif ( rootClientId ) {\n\t\t\t\t\t\tconst nextRootClientId =\n\t\t\t\t\t\t\tgetNextBlockClientId( rootClientId );\n\n\t\t\t\t\t\tif ( nextRootClientId ) {\n\t\t\t\t\t\t\t// If there is a block that follows with the same parent\n\t\t\t\t\t\t\t// block name and the same attributes, merge the inner\n\t\t\t\t\t\t\t// blocks.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tgetBlockName( rootClientId ) ===\n\t\t\t\t\t\t\t\tgetBlockName( nextRootClientId )\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tconst rootAttributes =\n\t\t\t\t\t\t\t\t\tgetBlockAttributes( rootClientId );\n\t\t\t\t\t\t\t\tconst previousRootAttributes =\n\t\t\t\t\t\t\t\t\tgetBlockAttributes( nextRootClientId );\n\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tObject.keys( rootAttributes ).every(\n\t\t\t\t\t\t\t\t\t\t( key ) =>\n\t\t\t\t\t\t\t\t\t\t\trootAttributes[ key ] ===\n\t\t\t\t\t\t\t\t\t\t\tpreviousRootAttributes[ key ]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\t\t\t\t\t\t\tgetBlockOrder( nextRootClientId ),\n\t\t\t\t\t\t\t\t\t\t\tnextRootClientId,\n\t\t\t\t\t\t\t\t\t\t\trootClientId\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tremoveBlock( nextRootClientId, false );\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmergeBlocks( rootClientId, nextRootClientId );\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tconst nextBlockClientId = getNextBlockClientId( clientId );\n\n\t\t\t\t\tif ( ! nextBlockClientId ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( getBlockOrder( nextBlockClientId ).length ) {\n\t\t\t\t\t\tmoveFirstItemUp( nextBlockClientId, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmergeBlocks( clientId, nextBlockClientId );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst previousBlockClientId =\n\t\t\t\t\t\tgetPreviousBlockClientId( clientId );\n\n\t\t\t\t\tif ( previousBlockClientId ) {\n\t\t\t\t\t\tmergeBlocks( previousBlockClientId, clientId );\n\t\t\t\t\t} else if ( rootClientId ) {\n\t\t\t\t\t\tconst previousRootClientId =\n\t\t\t\t\t\t\tgetPreviousBlockClientId( rootClientId );\n\n\t\t\t\t\t\t// If there is a preceding block with the same parent block\n\t\t\t\t\t\t// name and the same attributes, merge the inner blocks.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tpreviousRootClientId &&\n\t\t\t\t\t\t\tgetBlockName( rootClientId ) ===\n\t\t\t\t\t\t\t\tgetBlockName( previousRootClientId )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tconst rootAttributes =\n\t\t\t\t\t\t\t\tgetBlockAttributes( rootClientId );\n\t\t\t\t\t\t\tconst previousRootAttributes =\n\t\t\t\t\t\t\t\tgetBlockAttributes( previousRootClientId );\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tObject.keys( rootAttributes ).every(\n\t\t\t\t\t\t\t\t\t( key ) =>\n\t\t\t\t\t\t\t\t\t\trootAttributes[ key ] ===\n\t\t\t\t\t\t\t\t\t\tpreviousRootAttributes[ key ]\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\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\t\t\t\t\t\tgetBlockOrder( rootClientId ),\n\t\t\t\t\t\t\t\t\t\trootClientId,\n\t\t\t\t\t\t\t\t\t\tpreviousRootClientId\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tremoveBlock( rootClientId, false );\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmoveFirstItemUp( rootClientId );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tonInsertBlocks( blocks, index ) {\n\t\t\t\tinsertBlocks( blocks, index, ownProps.rootClientId );\n\t\t\t},\n\t\t\tonSelect( clientId = ownProps.clientId, initialPosition ) {\n\t\t\t\tselectBlock( clientId, initialPosition );\n\t\t\t},\n\t\t\tonChange: ( attributes ) => {\n\t\t\t\tupdateBlockAttributes( ownProps.clientId, attributes );\n\t\t\t},\n\t\t\tonReplace( blocks, indexToSelect ) {\n\t\t\t\treplaceBlocks( [ ownProps.clientId ], blocks, indexToSelect );\n\t\t\t},\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n] )( BlockListBlock );\n"]}
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.default = exports.OnCaretVerticalPositionChange = exports.BlockList = void 0;
8
+ exports.default = exports.BlockList = void 0;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
@@ -48,9 +48,6 @@ var _store = require("../../store");
48
48
  /**
49
49
  * Internal dependencies
50
50
  */
51
- const OnCaretVerticalPositionChange = (0, _element.createContext)();
52
- exports.OnCaretVerticalPositionChange = OnCaretVerticalPositionChange;
53
-
54
51
  const identity = x => x;
55
52
 
56
53
  const stylesMemo = {};
@@ -83,7 +80,6 @@ class BlockList extends _element.Component {
83
80
  };
84
81
  this.renderItem = this.renderItem.bind(this);
85
82
  this.renderBlockListFooter = this.renderBlockListFooter.bind(this);
86
- this.onCaretVerticalPositionChange = this.onCaretVerticalPositionChange.bind(this);
87
83
  this.scrollViewInnerRef = this.scrollViewInnerRef.bind(this);
88
84
  this.addBlockToEndOfPost = this.addBlockToEndOfPost.bind(this);
89
85
  this.shouldFlatListPreventAutomaticScroll = this.shouldFlatListPreventAutomaticScroll.bind(this);
@@ -101,10 +97,6 @@ class BlockList extends _element.Component {
101
97
  this.props.insertBlock(newBlock, this.props.blockCount);
102
98
  }
103
99
 
104
- onCaretVerticalPositionChange(targetId, caretY, previousCaretY) {
105
- _components.KeyboardAwareFlatList.handleCaretVerticalPositionChange(this.scrollViewRef, targetId, caretY, previousCaretY);
106
- }
107
-
108
100
  scrollViewInnerRef(ref) {
109
101
  this.scrollViewRef = ref;
110
102
  }
@@ -228,9 +220,7 @@ class BlockList extends _element.Component {
228
220
  parentScrollRef: scrollRef
229
221
  });
230
222
  });
231
- return (0, _element.createElement)(OnCaretVerticalPositionChange.Provider, {
232
- value: this.onCaretVerticalPositionChange
233
- }, blockList);
223
+ return blockList;
234
224
  }
235
225
 
236
226
  renderList() {
@@ -257,7 +247,6 @@ class BlockList extends _element.Component {
257
247
  } = extraProps;
258
248
  const {
259
249
  blockToolbar,
260
- blockBorder,
261
250
  headerToolbar,
262
251
  floatingToolbar
263
252
  } = _style.default;
@@ -272,6 +261,10 @@ class BlockList extends _element.Component {
272
261
  const {
273
262
  isWider
274
263
  } = _components.alignmentHelpers;
264
+ const extraScrollHeight = headerToolbar.height + blockToolbar.height + (isFloatingToolbarVisible ? floatingToolbar.height : 0);
265
+ const scrollViewStyle = [{
266
+ flex: isRootList ? 1 : 0
267
+ }, !isRootList && _style.default.overflowVisible];
275
268
  return (0, _element.createElement)(_reactNative.View, {
276
269
  style: containerStyle,
277
270
  onAccessibilityEscape: clearSelectedBlock,
@@ -282,16 +275,12 @@ class BlockList extends _element.Component {
282
275
  } : {}, {
283
276
  // Disable clipping on Android to fix focus losing. See https://github.com/wordpress-mobile/gutenberg-mobile/pull/741#issuecomment-472746541
284
277
  accessibilityLabel: "block-list",
285
- autoScroll: this.props.autoScroll,
286
278
  innerRef: ref => {
287
279
  this.scrollViewInnerRef(parentScrollRef || ref);
288
280
  },
289
- extraScrollHeight: blockToolbar.height + blockBorder.width,
290
- inputAccessoryViewHeight: headerToolbar.height + (isFloatingToolbarVisible ? floatingToolbar.height : 0),
281
+ extraScrollHeight: extraScrollHeight,
291
282
  keyboardShouldPersistTaps: "always",
292
- scrollViewStyle: [{
293
- flex: isRootList ? 1 : 0
294
- }, !isRootList && _style.default.overflowVisible],
283
+ scrollViewStyle: scrollViewStyle,
295
284
  extraData: this.getExtraData(),
296
285
  scrollEnabled: isRootList,
297
286
  contentContainerStyle: [horizontal && _style.default.horizontalContentContainer, isWider(blockWidth, 'medium') && (isContentStretch && isMultiBlocks ? _style.default.horizontalContentContainerStretch : _style.default.horizontalContentContainerCenter)],
@@ -399,6 +388,7 @@ var _default = (0, _compose.compose)([(0, _data.withSelect)((select, _ref6) => {
399
388
  } = _ref6;
400
389
  const {
401
390
  getBlockCount,
391
+ getBlockHierarchyRootClientId,
402
392
  getBlockOrder,
403
393
  getSelectedBlockClientId,
404
394
  isBlockInsertionPointVisible,
@@ -417,8 +407,8 @@ var _default = (0, _compose.compose)([(0, _data.withSelect)((select, _ref6) => {
417
407
  } = getSettings();
418
408
  const isReadOnly = getSettings().readOnly;
419
409
  const blockCount = getBlockCount();
420
- const hasRootInnerBlocks = !!blockCount;
421
- const isFloatingToolbarVisible = !!selectedBlockClientId && hasRootInnerBlocks;
410
+ const rootBlockId = getBlockHierarchyRootClientId(selectedBlockClientId);
411
+ const isFloatingToolbarVisible = !!selectedBlockClientId && !!getBlockCount(rootBlockId);
422
412
  const isRTL = getSettings().isRTL;
423
413
  return {
424
414
  blockClientIds,