@wordpress/block-editor 12.17.0 → 12.18.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 (401) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +32 -0
  3. package/build/components/block-draggable/index.js +11 -3
  4. package/build/components/block-draggable/index.js.map +1 -1
  5. package/build/components/block-edit/context.js +3 -1
  6. package/build/components/block-edit/context.js.map +1 -1
  7. package/build/components/block-edit/index.js +4 -2
  8. package/build/components/block-edit/index.js.map +1 -1
  9. package/build/components/block-editing-mode/index.js +6 -3
  10. package/build/components/block-editing-mode/index.js.map +1 -1
  11. package/build/components/block-inspector/index.js +5 -2
  12. package/build/components/block-inspector/index.js.map +1 -1
  13. package/build/components/block-list/block.js +4 -3
  14. package/build/components/block-list/block.js.map +1 -1
  15. package/build/components/block-list/block.native.js +9 -5
  16. package/build/components/block-list/block.native.js.map +1 -1
  17. package/build/components/block-list/index.js +30 -4
  18. package/build/components/block-list/index.js.map +1 -1
  19. package/build/components/block-list/private-block-context.js +1 -1
  20. package/build/components/block-list/private-block-context.js.map +1 -1
  21. package/build/components/block-list/use-in-between-inserter.js +1 -1
  22. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  23. package/build/components/block-lock/toolbar.js +8 -2
  24. package/build/components/block-lock/toolbar.js.map +1 -1
  25. package/build/components/block-popover/inbetween.js +15 -3
  26. package/build/components/block-popover/inbetween.js.map +1 -1
  27. package/build/components/block-preview/auto.js +1 -1
  28. package/build/components/block-preview/auto.js.map +1 -1
  29. package/build/components/block-removal-warning-modal/index.js +3 -2
  30. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  31. package/build/components/block-settings-menu/block-settings-dropdown.js +2 -4
  32. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  33. package/build/components/block-switcher/block-transformations-menu.js +12 -1
  34. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  35. package/build/components/block-switcher/index.js +119 -90
  36. package/build/components/block-switcher/index.js.map +1 -1
  37. package/build/components/block-tools/insertion-point.js +10 -3
  38. package/build/components/block-tools/insertion-point.js.map +1 -1
  39. package/build/components/font-sizes/fluid-utils.js +7 -1
  40. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  41. package/build/components/global-styles/border-panel.js +5 -14
  42. package/build/components/global-styles/border-panel.js.map +1 -1
  43. package/build/components/global-styles/effects-panel.js +7 -1
  44. package/build/components/global-styles/effects-panel.js.map +1 -1
  45. package/build/components/global-styles/hooks.js +3 -2
  46. package/build/components/global-styles/hooks.js.map +1 -1
  47. package/build/components/global-styles/typography-panel.js +31 -14
  48. package/build/components/global-styles/typography-panel.js.map +1 -1
  49. package/build/components/iframe/get-compatibility-styles.js +99 -0
  50. package/build/components/iframe/get-compatibility-styles.js.map +1 -0
  51. package/build/components/iframe/index.js +2 -3
  52. package/build/components/iframe/index.js.map +1 -1
  53. package/build/components/index.js +16 -2
  54. package/build/components/index.js.map +1 -1
  55. package/build/components/index.native.js +16 -2
  56. package/build/components/index.native.js.map +1 -1
  57. package/build/components/inspector-controls/groups.js +2 -0
  58. package/build/components/inspector-controls/groups.js.map +1 -1
  59. package/build/components/inspector-controls-tabs/styles-tab.js +3 -0
  60. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  61. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +3 -2
  62. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  63. package/build/components/link-control/link-preview.js +30 -26
  64. package/build/components/link-control/link-preview.js.map +1 -1
  65. package/build/components/link-control/search-input.js +1 -9
  66. package/build/components/link-control/search-input.js.map +1 -1
  67. package/build/components/list-view/block-contents.js +3 -1
  68. package/build/components/list-view/block-contents.js.map +1 -1
  69. package/build/components/list-view/block.js +10 -1
  70. package/build/components/list-view/block.js.map +1 -1
  71. package/build/components/list-view/branch.js +29 -8
  72. package/build/components/list-view/branch.js.map +1 -1
  73. package/build/components/list-view/drop-indicator.js +100 -32
  74. package/build/components/list-view/drop-indicator.js.map +1 -1
  75. package/build/components/list-view/index.js +52 -4
  76. package/build/components/list-view/index.js.map +1 -1
  77. package/build/components/list-view/leaf.js +2 -2
  78. package/build/components/list-view/leaf.js.map +1 -1
  79. package/build/components/list-view/use-list-view-block-indexes.js +30 -0
  80. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -0
  81. package/build/components/list-view/use-list-view-drop-zone.js +56 -5
  82. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  83. package/build/components/list-view/utils.js +92 -0
  84. package/build/components/list-view/utils.js.map +1 -1
  85. package/build/components/provider/index.js +1 -1
  86. package/build/components/provider/index.js.map +1 -1
  87. package/build/components/recursion-provider/index.js +21 -0
  88. package/build/components/recursion-provider/index.js.map +1 -1
  89. package/build/components/rich-text/index.js +30 -6
  90. package/build/components/rich-text/index.js.map +1 -1
  91. package/build/components/rich-text/native/index.native.js +9 -9
  92. package/build/components/rich-text/native/index.native.js.map +1 -1
  93. package/build/components/use-block-drop-zone/index.js +30 -7
  94. package/build/components/use-block-drop-zone/index.js.map +1 -1
  95. package/build/components/use-on-block-drop/index.js +50 -8
  96. package/build/components/use-on-block-drop/index.js.map +1 -1
  97. package/build/hooks/block-hooks.js +5 -14
  98. package/build/hooks/block-hooks.js.map +1 -1
  99. package/build/hooks/content-lock-ui.js +17 -42
  100. package/build/hooks/content-lock-ui.js.map +1 -1
  101. package/build/hooks/effects.js +66 -0
  102. package/build/hooks/effects.js.map +1 -0
  103. package/build/hooks/index.js +15 -2
  104. package/build/hooks/index.js.map +1 -1
  105. package/build/hooks/index.native.js +13 -0
  106. package/build/hooks/index.native.js.map +1 -1
  107. package/build/hooks/style.js +6 -2
  108. package/build/hooks/style.js.map +1 -1
  109. package/build/hooks/supports.js +2 -1
  110. package/build/hooks/supports.js.map +1 -1
  111. package/build/hooks/typography.native.js +2 -2
  112. package/build/hooks/typography.native.js.map +1 -1
  113. package/build/hooks/use-bindings-attributes.js +115 -0
  114. package/build/hooks/use-bindings-attributes.js.map +1 -0
  115. package/build/hooks/use-shadow-props.js +46 -0
  116. package/build/hooks/use-shadow-props.js.map +1 -0
  117. package/build/hooks/utils.js +11 -7
  118. package/build/hooks/utils.js.map +1 -1
  119. package/build/index.js +14 -0
  120. package/build/index.js.map +1 -1
  121. package/build/store/actions.js +10 -6
  122. package/build/store/actions.js.map +1 -1
  123. package/build/store/index.js +2 -0
  124. package/build/store/index.js.map +1 -1
  125. package/build/store/private-actions.js +37 -0
  126. package/build/store/private-actions.js.map +1 -1
  127. package/build/store/private-selectors.js +60 -9
  128. package/build/store/private-selectors.js.map +1 -1
  129. package/build/store/reducer.js +44 -3
  130. package/build/store/reducer.js.map +1 -1
  131. package/build/store/resolvers.js +27 -0
  132. package/build/store/resolvers.js.map +1 -0
  133. package/build/store/selectors.js +94 -56
  134. package/build/store/selectors.js.map +1 -1
  135. package/build/store/utils.js +5 -26
  136. package/build/store/utils.js.map +1 -1
  137. package/build/utils/index.js +0 -16
  138. package/build/utils/index.js.map +1 -1
  139. package/build/utils/math.js +13 -0
  140. package/build/utils/math.js.map +1 -1
  141. package/build/utils/object.js +17 -0
  142. package/build/utils/object.js.map +1 -1
  143. package/build/utils/transform-styles/index.js +37 -27
  144. package/build/utils/transform-styles/index.js.map +1 -1
  145. package/build-module/components/block-draggable/index.js +11 -3
  146. package/build-module/components/block-draggable/index.js.map +1 -1
  147. package/build-module/components/block-edit/context.js +1 -0
  148. package/build-module/components/block-edit/context.js.map +1 -1
  149. package/build-module/components/block-edit/index.js +5 -3
  150. package/build-module/components/block-edit/index.js.map +1 -1
  151. package/build-module/components/block-editing-mode/index.js +7 -4
  152. package/build-module/components/block-editing-mode/index.js.map +1 -1
  153. package/build-module/components/block-inspector/index.js +5 -2
  154. package/build-module/components/block-inspector/index.js.map +1 -1
  155. package/build-module/components/block-list/block.js +6 -5
  156. package/build-module/components/block-list/block.js.map +1 -1
  157. package/build-module/components/block-list/block.native.js +11 -7
  158. package/build-module/components/block-list/block.native.js.map +1 -1
  159. package/build-module/components/block-list/index.js +31 -5
  160. package/build-module/components/block-list/index.js.map +1 -1
  161. package/build-module/components/block-list/private-block-context.js +1 -1
  162. package/build-module/components/block-list/private-block-context.js.map +1 -1
  163. package/build-module/components/block-list/use-in-between-inserter.js +1 -1
  164. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  165. package/build-module/components/block-lock/toolbar.js +8 -2
  166. package/build-module/components/block-lock/toolbar.js.map +1 -1
  167. package/build-module/components/block-popover/inbetween.js +15 -3
  168. package/build-module/components/block-popover/inbetween.js.map +1 -1
  169. package/build-module/components/block-preview/auto.js +3 -3
  170. package/build-module/components/block-preview/auto.js.map +1 -1
  171. package/build-module/components/block-removal-warning-modal/index.js +3 -2
  172. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  173. package/build-module/components/block-settings-menu/block-settings-dropdown.js +2 -4
  174. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  175. package/build-module/components/block-switcher/block-transformations-menu.js +12 -1
  176. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  177. package/build-module/components/block-switcher/index.js +116 -86
  178. package/build-module/components/block-switcher/index.js.map +1 -1
  179. package/build-module/components/block-tools/insertion-point.js +10 -3
  180. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  181. package/build-module/components/font-sizes/fluid-utils.js +7 -1
  182. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  183. package/build-module/components/global-styles/border-panel.js +5 -14
  184. package/build-module/components/global-styles/border-panel.js.map +1 -1
  185. package/build-module/components/global-styles/effects-panel.js +7 -1
  186. package/build-module/components/global-styles/effects-panel.js.map +1 -1
  187. package/build-module/components/global-styles/hooks.js +3 -2
  188. package/build-module/components/global-styles/hooks.js.map +1 -1
  189. package/build-module/components/global-styles/typography-panel.js +32 -15
  190. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  191. package/build-module/components/iframe/get-compatibility-styles.js +93 -0
  192. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -0
  193. package/build-module/components/iframe/index.js +2 -3
  194. package/build-module/components/iframe/index.js.map +1 -1
  195. package/build-module/components/index.js +1 -1
  196. package/build-module/components/index.js.map +1 -1
  197. package/build-module/components/index.native.js +1 -1
  198. package/build-module/components/index.native.js.map +1 -1
  199. package/build-module/components/inspector-controls/groups.js +2 -0
  200. package/build-module/components/inspector-controls/groups.js.map +1 -1
  201. package/build-module/components/inspector-controls-tabs/styles-tab.js +3 -0
  202. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  203. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +3 -2
  204. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  205. package/build-module/components/link-control/link-preview.js +32 -28
  206. package/build-module/components/link-control/link-preview.js.map +1 -1
  207. package/build-module/components/link-control/search-input.js +1 -8
  208. package/build-module/components/link-control/search-input.js.map +1 -1
  209. package/build-module/components/list-view/block-contents.js +3 -1
  210. package/build-module/components/list-view/block-contents.js.map +1 -1
  211. package/build-module/components/list-view/block.js +10 -1
  212. package/build-module/components/list-view/block.js.map +1 -1
  213. package/build-module/components/list-view/branch.js +30 -9
  214. package/build-module/components/list-view/branch.js.map +1 -1
  215. package/build-module/components/list-view/drop-indicator.js +99 -32
  216. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  217. package/build-module/components/list-view/index.js +54 -6
  218. package/build-module/components/list-view/index.js.map +1 -1
  219. package/build-module/components/list-view/leaf.js +2 -2
  220. package/build-module/components/list-view/leaf.js.map +1 -1
  221. package/build-module/components/list-view/use-list-view-block-indexes.js +23 -0
  222. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -0
  223. package/build-module/components/list-view/use-list-view-drop-zone.js +58 -7
  224. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  225. package/build-module/components/list-view/utils.js +91 -0
  226. package/build-module/components/list-view/utils.js.map +1 -1
  227. package/build-module/components/provider/index.js +1 -1
  228. package/build-module/components/provider/index.js.map +1 -1
  229. package/build-module/components/recursion-provider/index.js +17 -0
  230. package/build-module/components/recursion-provider/index.js.map +1 -1
  231. package/build-module/components/rich-text/index.js +30 -6
  232. package/build-module/components/rich-text/index.js.map +1 -1
  233. package/build-module/components/rich-text/native/index.native.js +9 -9
  234. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  235. package/build-module/components/use-block-drop-zone/index.js +31 -8
  236. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  237. package/build-module/components/use-on-block-drop/index.js +51 -9
  238. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  239. package/build-module/hooks/block-hooks.js +5 -14
  240. package/build-module/hooks/block-hooks.js.map +1 -1
  241. package/build-module/hooks/content-lock-ui.js +19 -43
  242. package/build-module/hooks/content-lock-ui.js.map +1 -1
  243. package/build-module/hooks/effects.js +51 -0
  244. package/build-module/hooks/effects.js.map +1 -0
  245. package/build-module/hooks/index.js +3 -2
  246. package/build-module/hooks/index.js.map +1 -1
  247. package/build-module/hooks/index.native.js +1 -0
  248. package/build-module/hooks/index.native.js.map +1 -1
  249. package/build-module/hooks/style.js +6 -2
  250. package/build-module/hooks/style.js.map +1 -1
  251. package/build-module/hooks/supports.js +2 -1
  252. package/build-module/hooks/supports.js.map +1 -1
  253. package/build-module/hooks/typography.native.js +2 -2
  254. package/build-module/hooks/typography.native.js.map +1 -1
  255. package/build-module/hooks/use-bindings-attributes.js +112 -0
  256. package/build-module/hooks/use-bindings-attributes.js.map +1 -0
  257. package/build-module/hooks/use-shadow-props.js +39 -0
  258. package/build-module/hooks/use-shadow-props.js.map +1 -0
  259. package/build-module/hooks/utils.js +13 -9
  260. package/build-module/hooks/utils.js.map +1 -1
  261. package/build-module/index.js +1 -1
  262. package/build-module/index.js.map +1 -1
  263. package/build-module/store/actions.js +10 -6
  264. package/build-module/store/actions.js.map +1 -1
  265. package/build-module/store/index.js +2 -0
  266. package/build-module/store/index.js.map +1 -1
  267. package/build-module/store/private-actions.js +35 -0
  268. package/build-module/store/private-actions.js.map +1 -1
  269. package/build-module/store/private-selectors.js +53 -8
  270. package/build-module/store/private-selectors.js.map +1 -1
  271. package/build-module/store/reducer.js +43 -3
  272. package/build-module/store/reducer.js.map +1 -1
  273. package/build-module/store/resolvers.js +20 -0
  274. package/build-module/store/resolvers.js.map +1 -0
  275. package/build-module/store/selectors.js +89 -52
  276. package/build-module/store/selectors.js.map +1 -1
  277. package/build-module/store/utils.js +3 -23
  278. package/build-module/store/utils.js.map +1 -1
  279. package/build-module/utils/index.js +0 -1
  280. package/build-module/utils/index.js.map +1 -1
  281. package/build-module/utils/math.js +12 -0
  282. package/build-module/utils/math.js.map +1 -1
  283. package/build-module/utils/object.js +16 -0
  284. package/build-module/utils/object.js.map +1 -1
  285. package/build-module/utils/transform-styles/index.js +36 -27
  286. package/build-module/utils/transform-styles/index.js.map +1 -1
  287. package/build-style/content-rtl.css +33 -16
  288. package/build-style/content.css +33 -16
  289. package/build-style/default-editor-styles-rtl.css +1 -1
  290. package/build-style/default-editor-styles.css +1 -1
  291. package/build-style/style-rtl.css +169 -114
  292. package/build-style/style.css +169 -114
  293. package/package.json +31 -31
  294. package/src/components/block-canvas/style.scss +8 -1
  295. package/src/components/block-draggable/index.js +16 -5
  296. package/src/components/block-edit/context.js +1 -0
  297. package/src/components/block-edit/index.js +4 -0
  298. package/src/components/block-editing-mode/index.js +12 -7
  299. package/src/components/block-inspector/index.js +5 -2
  300. package/src/components/block-list/block.js +5 -4
  301. package/src/components/block-list/block.native.js +13 -3
  302. package/src/components/block-list/content.scss +34 -5
  303. package/src/components/block-list/index.js +52 -16
  304. package/src/components/block-list/private-block-context.js +1 -1
  305. package/src/components/block-list/use-in-between-inserter.js +1 -2
  306. package/src/components/block-lock/toolbar.js +10 -2
  307. package/src/components/block-popover/inbetween.js +22 -2
  308. package/src/components/block-preview/auto.js +3 -3
  309. package/src/components/block-removal-warning-modal/index.js +3 -2
  310. package/src/components/block-settings-menu/block-settings-dropdown.js +2 -7
  311. package/src/components/block-switcher/block-transformations-menu.js +18 -1
  312. package/src/components/block-switcher/index.js +133 -111
  313. package/src/components/block-switcher/style.scss +6 -4
  314. package/src/components/block-switcher/test/index.js +113 -230
  315. package/src/components/block-toolbar/style.scss +22 -18
  316. package/src/components/block-tools/insertion-point.js +15 -2
  317. package/src/components/block-tools/style.scss +8 -7
  318. package/src/components/font-sizes/fluid-utils.js +8 -2
  319. package/src/components/font-sizes/test/fluid-utils.js +9 -0
  320. package/src/components/global-styles/border-panel.js +7 -17
  321. package/src/components/global-styles/effects-panel.js +16 -1
  322. package/src/components/global-styles/hooks.js +2 -0
  323. package/src/components/global-styles/typography-panel.js +45 -13
  324. package/src/components/iframe/get-compatibility-styles.js +120 -0
  325. package/src/components/iframe/index.js +2 -3
  326. package/src/components/index.js +4 -2
  327. package/src/components/index.native.js +4 -2
  328. package/src/components/inspector-controls/groups.js +2 -0
  329. package/src/components/inspector-controls-tabs/styles-tab.js +1 -0
  330. package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +2 -0
  331. package/src/components/link-control/link-preview.js +31 -55
  332. package/src/components/link-control/search-input.js +1 -9
  333. package/src/components/link-control/style.scss +31 -85
  334. package/src/components/link-control/test/index.js +2 -1
  335. package/src/components/list-view/block-contents.js +5 -1
  336. package/src/components/list-view/block.js +9 -0
  337. package/src/components/list-view/branch.js +30 -10
  338. package/src/components/list-view/drop-indicator.js +139 -46
  339. package/src/components/list-view/index.js +74 -3
  340. package/src/components/list-view/leaf.js +2 -2
  341. package/src/components/list-view/style.scss +102 -13
  342. package/src/components/list-view/test/use-list-view-drop-zone.js +4 -0
  343. package/src/components/list-view/test/utils.js +218 -1
  344. package/src/components/list-view/use-list-view-block-indexes.js +29 -0
  345. package/src/components/list-view/use-list-view-drop-zone.js +78 -6
  346. package/src/components/list-view/utils.js +116 -0
  347. package/src/components/provider/index.js +3 -1
  348. package/src/components/recursion-provider/README.md +2 -2
  349. package/src/components/recursion-provider/index.js +17 -0
  350. package/src/components/rich-text/index.js +48 -10
  351. package/src/components/rich-text/native/index.native.js +10 -10
  352. package/src/components/use-block-drop-zone/index.js +60 -19
  353. package/src/components/use-block-drop-zone/test/index.js +32 -61
  354. package/src/components/use-on-block-drop/index.js +92 -11
  355. package/src/hooks/block-hooks.js +5 -17
  356. package/src/hooks/content-lock-ui.js +15 -55
  357. package/src/hooks/effects.js +57 -0
  358. package/src/hooks/index.js +2 -2
  359. package/src/hooks/index.native.js +1 -0
  360. package/src/hooks/style.js +8 -0
  361. package/src/hooks/supports.js +2 -0
  362. package/src/hooks/test/effects.js +39 -0
  363. package/src/hooks/typography.native.js +2 -2
  364. package/src/hooks/use-bindings-attributes.js +148 -0
  365. package/src/hooks/use-shadow-props.js +37 -0
  366. package/src/hooks/utils.js +26 -10
  367. package/src/index.js +2 -0
  368. package/src/store/actions.js +9 -4
  369. package/src/store/index.js +2 -0
  370. package/src/store/private-actions.js +32 -0
  371. package/src/store/private-selectors.js +78 -21
  372. package/src/store/reducer.js +49 -2
  373. package/src/store/resolvers.js +17 -0
  374. package/src/store/selectors.js +169 -161
  375. package/src/store/test/registry-selectors.js +431 -0
  376. package/src/store/test/selectors.js +14 -400
  377. package/src/store/utils.js +10 -33
  378. package/src/style.scss +0 -1
  379. package/src/utils/index.js +0 -1
  380. package/src/utils/math.js +12 -0
  381. package/src/utils/object.js +16 -0
  382. package/src/utils/transform-styles/index.js +52 -37
  383. package/tsconfig.tsbuildinfo +1 -1
  384. package/build/components/iframe/use-compatibility-styles.js +0 -100
  385. package/build/components/iframe/use-compatibility-styles.js.map +0 -1
  386. package/build/hooks/custom-fields.js +0 -106
  387. package/build/hooks/custom-fields.js.map +0 -1
  388. package/build/utils/block-variation-transforms.js +0 -42
  389. package/build/utils/block-variation-transforms.js.map +0 -1
  390. package/build-module/components/iframe/use-compatibility-styles.js +0 -94
  391. package/build-module/components/iframe/use-compatibility-styles.js.map +0 -1
  392. package/build-module/hooks/custom-fields.js +0 -99
  393. package/build-module/hooks/custom-fields.js.map +0 -1
  394. package/build-module/utils/block-variation-transforms.js +0 -35
  395. package/build-module/utils/block-variation-transforms.js.map +0 -1
  396. package/src/components/block-switcher/test/__snapshots__/index.js.snap +0 -116
  397. package/src/components/contrast-checker/style.scss +0 -3
  398. package/src/components/iframe/use-compatibility-styles.js +0 -122
  399. package/src/hooks/custom-fields.js +0 -115
  400. package/src/utils/block-variation-transforms.js +0 -38
  401. package/src/utils/test/block-variation-transforms.js +0 -94
@@ -1599,13 +1599,19 @@ export function blocksMode( state = {}, action ) {
1599
1599
  export function insertionPoint( state = null, action ) {
1600
1600
  switch ( action.type ) {
1601
1601
  case 'SHOW_INSERTION_POINT': {
1602
- const { rootClientId, index, __unstableWithInserter, operation } =
1603
- action;
1602
+ const {
1603
+ rootClientId,
1604
+ index,
1605
+ __unstableWithInserter,
1606
+ operation,
1607
+ nearestSide,
1608
+ } = action;
1604
1609
  const nextState = {
1605
1610
  rootClientId,
1606
1611
  index,
1607
1612
  __unstableWithInserter,
1608
1613
  operation,
1614
+ nearestSide,
1609
1615
  };
1610
1616
 
1611
1617
  // Bail out updates if the states are the same.
@@ -1906,6 +1912,21 @@ export function temporarilyEditingAsBlocks( state = '', action ) {
1906
1912
  return state;
1907
1913
  }
1908
1914
 
1915
+ /**
1916
+ * Reducer returning the focus mode that should be used when temporarily edit as blocks finishes.
1917
+ *
1918
+ * @param {Object} state Current state.
1919
+ * @param {Object} action Dispatched action.
1920
+ *
1921
+ * @return {Object} Updated state.
1922
+ */
1923
+ export function temporarilyEditingFocusModeRevert( state = '', action ) {
1924
+ if ( action.type === 'SET_TEMPORARILY_EDITING_AS_BLOCKS' ) {
1925
+ return action.focusModeToRevert;
1926
+ }
1927
+ return state;
1928
+ }
1929
+
1909
1930
  /**
1910
1931
  * Reducer returning a map of block client IDs to block editing modes.
1911
1932
  *
@@ -2002,6 +2023,29 @@ export function lastFocus( state = false, action ) {
2002
2023
  return state;
2003
2024
  }
2004
2025
 
2026
+ function blockBindingsSources( state = {}, action ) {
2027
+ if ( action.type === 'REGISTER_BLOCK_BINDINGS_SOURCE' ) {
2028
+ return {
2029
+ ...state,
2030
+ [ action.sourceName ]: {
2031
+ label: action.sourceLabel,
2032
+ useSource: action.useSource,
2033
+ lockAttributesEditing: action.lockAttributesEditing,
2034
+ },
2035
+ };
2036
+ }
2037
+ return state;
2038
+ }
2039
+
2040
+ function blockPatterns( state = [], action ) {
2041
+ switch ( action.type ) {
2042
+ case 'RECEIVE_BLOCK_PATTERNS':
2043
+ return action.patterns;
2044
+ }
2045
+
2046
+ return state;
2047
+ }
2048
+
2005
2049
  const combinedReducers = combineReducers( {
2006
2050
  blocks,
2007
2051
  isTyping,
@@ -2024,6 +2068,7 @@ const combinedReducers = combineReducers( {
2024
2068
  highlightedBlock,
2025
2069
  lastBlockInserted,
2026
2070
  temporarilyEditingAsBlocks,
2071
+ temporarilyEditingFocusModeRevert,
2027
2072
  blockVisibility,
2028
2073
  blockEditingModes,
2029
2074
  styleOverrides,
@@ -2031,6 +2076,8 @@ const combinedReducers = combineReducers( {
2031
2076
  blockRemovalRules,
2032
2077
  openedBlockSettingsMenu,
2033
2078
  registeredInserterMediaCategories,
2079
+ blockBindingsSources,
2080
+ blockPatterns,
2034
2081
  } );
2035
2082
 
2036
2083
  function withAutomaticChangeReset( reducer ) {
@@ -0,0 +1,17 @@
1
+ export const getFetchedPatterns =
2
+ () =>
3
+ async ( { dispatch, select } ) => {
4
+ const { __experimentalFetchBlockPatterns } = select.getSettings();
5
+ if ( ! __experimentalFetchBlockPatterns ) {
6
+ return [];
7
+ }
8
+ const patterns = await __experimentalFetchBlockPatterns();
9
+ dispatch( { type: 'RECEIVE_BLOCK_PATTERNS', patterns } );
10
+ };
11
+
12
+ getFetchedPatterns.shouldInvalidate = ( action ) => {
13
+ return (
14
+ action.type === 'UPDATE_SETTINGS' &&
15
+ !! action.settings.__experimentalFetchBlockPatterns
16
+ );
17
+ };
@@ -27,11 +27,13 @@ import { createRegistrySelector } from '@wordpress/data';
27
27
  * Internal dependencies
28
28
  */
29
29
  import {
30
- getUserPatterns,
31
30
  checkAllowListRecursive,
32
31
  checkAllowList,
32
+ getAllPatternsDependants,
33
33
  } from './utils';
34
34
  import { orderBy } from '../utils/sorting';
35
+ import { STORE_NAME } from './constants';
36
+ import { unlock } from '../lock-unlock';
35
37
 
36
38
  /**
37
39
  * A block selection object.
@@ -318,14 +320,14 @@ export const getGlobalBlockCount = createSelector(
318
320
  );
319
321
 
320
322
  /**
321
- * Returns all global blocks that match a blockName. Results include nested blocks.
323
+ * Returns all blocks that match a blockName. Results include nested blocks.
322
324
  *
323
325
  * @param {Object} state Global application state.
324
326
  * @param {?string} blockName Optional block name, if not specified, returns an empty array.
325
327
  *
326
328
  * @return {Array} Array of clientIds of blocks with name equal to blockName.
327
329
  */
328
- export const __experimentalGetGlobalBlocksByName = createSelector(
330
+ export const getBlocksByName = createSelector(
329
331
  ( state, blockName ) => {
330
332
  if ( ! blockName ) {
331
333
  return EMPTY_ARRAY;
@@ -343,6 +345,27 @@ export const __experimentalGetGlobalBlocksByName = createSelector(
343
345
  ( state ) => [ state.blocks.order, state.blocks.byClientId ]
344
346
  );
345
347
 
348
+ /**
349
+ * Returns all global blocks that match a blockName. Results include nested blocks.
350
+ *
351
+ * @deprecated
352
+ *
353
+ * @param {Object} state Global application state.
354
+ * @param {?string} blockName Optional block name, if not specified, returns an empty array.
355
+ *
356
+ * @return {Array} Array of clientIds of blocks with name equal to blockName.
357
+ */
358
+ export function __experimentalGetGlobalBlocksByName( state, blockName ) {
359
+ deprecated(
360
+ "wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",
361
+ {
362
+ since: '6.5',
363
+ alternative: `wp.data.select( 'core/block-editor' ).getBlocksByName`,
364
+ }
365
+ );
366
+ return getBlocksByName( state, blockName );
367
+ }
368
+
346
369
  /**
347
370
  * Given an array of block client IDs, returns the corresponding array of block
348
371
  * objects.
@@ -2015,7 +2038,7 @@ export const getInserterItems = createSelector(
2015
2038
  },
2016
2039
  ( state, rootClientId ) => [
2017
2040
  state.blockListSettings[ rootClientId ],
2018
- state.blocks.byClientId,
2041
+ state.blocks.byClientId.get( rootClientId ),
2019
2042
  state.blocks.order,
2020
2043
  state.preferences.insertUsage,
2021
2044
  state.settings.allowedBlockTypes,
@@ -2086,7 +2109,7 @@ export const getBlockTransformItems = createSelector(
2086
2109
  },
2087
2110
  ( state, blocks, rootClientId ) => [
2088
2111
  state.blockListSettings[ rootClientId ],
2089
- state.blocks.byClientId,
2112
+ state.blocks.byClientId.get( rootClientId ),
2090
2113
  state.preferences.insertUsage,
2091
2114
  state.settings.allowedBlockTypes,
2092
2115
  state.settings.templateLock,
@@ -2118,7 +2141,7 @@ export const hasInserterItems = createSelector(
2118
2141
  },
2119
2142
  ( state, rootClientId ) => [
2120
2143
  state.blockListSettings[ rootClientId ],
2121
- state.blocks.byClientId,
2144
+ state.blocks.byClientId.get( rootClientId ),
2122
2145
  state.settings.allowedBlockTypes,
2123
2146
  state.settings.templateLock,
2124
2147
  getReusableBlocks( state ),
@@ -2143,18 +2166,20 @@ export const getAllowedBlocks = createSelector(
2143
2166
  const blockTypes = getBlockTypes().filter( ( blockType ) =>
2144
2167
  canIncludeBlockTypeInInserter( state, blockType, rootClientId )
2145
2168
  );
2169
+
2146
2170
  const hasReusableBlock =
2147
2171
  canInsertBlockTypeUnmemoized( state, 'core/block', rootClientId ) &&
2148
2172
  getReusableBlocks( state ).length > 0;
2149
2173
 
2150
- return [
2151
- ...blockTypes,
2152
- ...( hasReusableBlock ? [ 'core/block' ] : [] ),
2153
- ];
2174
+ if ( hasReusableBlock ) {
2175
+ blockTypes.push( 'core/block' );
2176
+ }
2177
+
2178
+ return blockTypes;
2154
2179
  },
2155
2180
  ( state, rootClientId ) => [
2156
2181
  state.blockListSettings[ rootClientId ],
2157
- state.blocks.byClientId,
2182
+ state.blocks.byClientId.get( rootClientId ),
2158
2183
  state.settings.allowedBlockTypes,
2159
2184
  state.settings.templateLock,
2160
2185
  getReusableBlocks( state ),
@@ -2237,62 +2262,35 @@ export const __experimentalGetDirectInsertBlock = createSelector(
2237
2262
  ]
2238
2263
  );
2239
2264
 
2240
- export const __experimentalUserPatternCategories = createSelector(
2241
- ( state ) => {
2242
- return state?.settings?.__experimentalUserPatternCategories;
2243
- },
2244
- ( state ) => [ state.settings.__experimentalUserPatternCategories ]
2245
- );
2246
-
2247
- export const __experimentalGetParsedPattern = createSelector(
2248
- ( state, patternName ) => {
2249
- const patterns = state.settings.__experimentalBlockPatterns;
2250
- const userPatterns = getUserPatterns( state );
2251
-
2252
- const pattern = [ ...patterns, ...userPatterns ].find(
2253
- ( { name } ) => name === patternName
2254
- );
2255
- if ( ! pattern ) {
2256
- return null;
2257
- }
2258
- return {
2259
- ...pattern,
2260
- blocks: parse( pattern.content, {
2261
- __unstableSkipMigrationLogs: true,
2262
- } ),
2263
- };
2264
- },
2265
- ( state ) => [
2266
- state.settings.__experimentalBlockPatterns,
2267
- state.settings.__experimentalReusableBlocks,
2268
- state?.settings?.__experimentalUserPatternCategories,
2269
- ]
2265
+ export const __experimentalGetParsedPattern = createRegistrySelector(
2266
+ ( select ) =>
2267
+ createSelector( ( state, patternName ) => {
2268
+ const { getAllPatterns } = unlock( select( STORE_NAME ) );
2269
+ const patterns = getAllPatterns();
2270
+ const pattern = patterns.find(
2271
+ ( { name } ) => name === patternName
2272
+ );
2273
+ if ( ! pattern ) {
2274
+ return null;
2275
+ }
2276
+ return {
2277
+ ...pattern,
2278
+ blocks: parse( pattern.content, {
2279
+ __unstableSkipMigrationLogs: true,
2280
+ } ),
2281
+ };
2282
+ }, getAllPatternsDependants )
2270
2283
  );
2271
2284
 
2272
- const getAllAllowedPatterns = createSelector(
2273
- ( state ) => {
2274
- const patterns = state.settings.__experimentalBlockPatterns;
2275
- const userPatterns = getUserPatterns( state );
2276
-
2277
- const { allowedBlockTypes } = getSettings( state );
2278
-
2279
- const parsedPatterns = [ ...userPatterns, ...patterns ]
2280
- .filter( ( { inserter = true } ) => !! inserter )
2281
- .map( ( { name } ) =>
2282
- __experimentalGetParsedPattern( state, name )
2283
- );
2284
- const allowedPatterns = parsedPatterns.filter( ( { blocks } ) =>
2285
- checkAllowListRecursive( blocks, allowedBlockTypes )
2286
- );
2287
- return allowedPatterns;
2288
- },
2289
- ( state ) => [
2290
- state.settings.__experimentalBlockPatterns,
2291
- state.settings.__experimentalReusableBlocks,
2285
+ const getAllowedPatternsDependants = ( state, rootClientId ) => {
2286
+ return [
2287
+ ...getAllPatternsDependants( state ),
2292
2288
  state.settings.allowedBlockTypes,
2293
- state?.settings?.__experimentalUserPatternCategories,
2294
- ]
2295
- );
2289
+ state.settings.templateLock,
2290
+ state.blockListSettings[ rootClientId ],
2291
+ state.blocks.byClientId.get( rootClientId ),
2292
+ ];
2293
+ };
2296
2294
 
2297
2295
  /**
2298
2296
  * Returns the list of allowed patterns for inner blocks children.
@@ -2302,26 +2300,33 @@ const getAllAllowedPatterns = createSelector(
2302
2300
  *
2303
2301
  * @return {Array?} The list of allowed patterns.
2304
2302
  */
2305
- export const __experimentalGetAllowedPatterns = createSelector(
2306
- ( state, rootClientId = null ) => {
2307
- const availableParsedPatterns = getAllAllowedPatterns( state );
2308
- const patternsAllowed = availableParsedPatterns.filter(
2309
- ( { blocks } ) =>
2310
- blocks.every( ( { name } ) =>
2311
- canInsertBlockType( state, name, rootClientId )
2312
- )
2313
- );
2303
+ export const __experimentalGetAllowedPatterns = createRegistrySelector(
2304
+ ( select ) => {
2305
+ return createSelector( ( state, rootClientId = null ) => {
2306
+ const {
2307
+ getAllPatterns,
2308
+ __experimentalGetParsedPattern: getParsedPattern,
2309
+ } = unlock( select( STORE_NAME ) );
2310
+ const patterns = getAllPatterns();
2311
+ const { allowedBlockTypes } = getSettings( state );
2312
+
2313
+ const parsedPatterns = patterns
2314
+ .filter( ( { inserter = true } ) => !! inserter )
2315
+ .map( ( { name } ) => getParsedPattern( name ) );
2316
+ const availableParsedPatterns = parsedPatterns.filter(
2317
+ ( { blocks } ) =>
2318
+ checkAllowListRecursive( blocks, allowedBlockTypes )
2319
+ );
2320
+ const patternsAllowed = availableParsedPatterns.filter(
2321
+ ( { blocks } ) =>
2322
+ blocks.every( ( { name } ) =>
2323
+ canInsertBlockType( state, name, rootClientId )
2324
+ )
2325
+ );
2314
2326
 
2315
- return patternsAllowed;
2316
- },
2317
- ( state, rootClientId ) => [
2318
- state.settings.__experimentalBlockPatterns,
2319
- state.settings.__experimentalReusableBlocks,
2320
- state.settings.allowedBlockTypes,
2321
- state.settings.templateLock,
2322
- state.blockListSettings[ rootClientId ],
2323
- state.blocks.byClientId.get( rootClientId ),
2324
- ]
2327
+ return patternsAllowed;
2328
+ }, getAllowedPatternsDependants );
2329
+ }
2325
2330
  );
2326
2331
 
2327
2332
  /**
@@ -2337,36 +2342,34 @@ export const __experimentalGetAllowedPatterns = createSelector(
2337
2342
  *
2338
2343
  * @return {Array} The list of matched block patterns based on declared `blockTypes` and block name.
2339
2344
  */
2340
- export const getPatternsByBlockTypes = createSelector(
2341
- ( state, blockNames, rootClientId = null ) => {
2342
- if ( ! blockNames ) return EMPTY_ARRAY;
2343
- const patterns = __experimentalGetAllowedPatterns(
2344
- state,
2345
- rootClientId
2346
- );
2347
- const normalizedBlockNames = Array.isArray( blockNames )
2348
- ? blockNames
2349
- : [ blockNames ];
2350
- const filteredPatterns = patterns.filter( ( pattern ) =>
2351
- pattern?.blockTypes?.some?.( ( blockName ) =>
2352
- normalizedBlockNames.includes( blockName )
2353
- )
2354
- );
2355
- if ( filteredPatterns.length === 0 ) {
2356
- return EMPTY_ARRAY;
2357
- }
2358
- return filteredPatterns;
2359
- },
2360
- ( state, blockNames, rootClientId ) => [
2361
- ...__experimentalGetAllowedPatterns.getDependants(
2362
- state,
2363
- rootClientId
2364
- ),
2365
- ]
2345
+ export const getPatternsByBlockTypes = createRegistrySelector( ( select ) =>
2346
+ createSelector(
2347
+ ( state, blockNames, rootClientId = null ) => {
2348
+ if ( ! blockNames ) return EMPTY_ARRAY;
2349
+ const patterns =
2350
+ select( STORE_NAME ).__experimentalGetAllowedPatterns(
2351
+ rootClientId
2352
+ );
2353
+ const normalizedBlockNames = Array.isArray( blockNames )
2354
+ ? blockNames
2355
+ : [ blockNames ];
2356
+ const filteredPatterns = patterns.filter( ( pattern ) =>
2357
+ pattern?.blockTypes?.some?.( ( blockName ) =>
2358
+ normalizedBlockNames.includes( blockName )
2359
+ )
2360
+ );
2361
+ if ( filteredPatterns.length === 0 ) {
2362
+ return EMPTY_ARRAY;
2363
+ }
2364
+ return filteredPatterns;
2365
+ },
2366
+ ( state, blockNames, rootClientId ) =>
2367
+ getAllowedPatternsDependants( state, rootClientId )
2368
+ )
2366
2369
  );
2367
2370
 
2368
- export const __experimentalGetPatternsByBlockTypes = createSelector(
2369
- ( state, blockNames, rootClientId = null ) => {
2371
+ export const __experimentalGetPatternsByBlockTypes = createRegistrySelector(
2372
+ ( select ) => {
2370
2373
  deprecated(
2371
2374
  'wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',
2372
2375
  {
@@ -2376,14 +2379,8 @@ export const __experimentalGetPatternsByBlockTypes = createSelector(
2376
2379
  version: '6.4',
2377
2380
  }
2378
2381
  );
2379
- return getPatternsByBlockTypes( state, blockNames, rootClientId );
2380
- },
2381
- ( state, blockNames, rootClientId ) => [
2382
- ...__experimentalGetAllowedPatterns.getDependants(
2383
- state,
2384
- rootClientId
2385
- ),
2386
- ]
2382
+ return select( STORE_NAME ).getPatternsByBlockTypes;
2383
+ }
2387
2384
  );
2388
2385
 
2389
2386
  /**
@@ -2403,45 +2400,46 @@ export const __experimentalGetPatternsByBlockTypes = createSelector(
2403
2400
  *
2404
2401
  * @return {WPBlockPattern[]} Items that are eligible for a pattern transformation.
2405
2402
  */
2406
- export const __experimentalGetPatternTransformItems = createSelector(
2407
- ( state, blocks, rootClientId = null ) => {
2408
- if ( ! blocks ) return EMPTY_ARRAY;
2409
- /**
2410
- * For now we only handle blocks without InnerBlocks and take into account
2411
- * the `__experimentalRole` property of blocks' attributes for the transformation.
2412
- * Note that the blocks have been retrieved through `getBlock`, which doesn't
2413
- * return the inner blocks of an inner block controller, so we still need
2414
- * to check for this case too.
2415
- */
2416
- if (
2417
- blocks.some(
2418
- ( { clientId, innerBlocks } ) =>
2419
- innerBlocks.length ||
2420
- areInnerBlocksControlled( state, clientId )
2421
- )
2422
- ) {
2423
- return EMPTY_ARRAY;
2424
- }
2425
-
2426
- // Create a Set of the selected block names that is used in patterns filtering.
2427
- const selectedBlockNames = Array.from(
2428
- new Set( blocks.map( ( { name } ) => name ) )
2429
- );
2430
- /**
2431
- * Here we will return first set of possible eligible block patterns,
2432
- * by checking the `blockTypes` property. We still have to recurse through
2433
- * block pattern's blocks and try to find matches from the selected blocks.
2434
- * Now this happens in the consumer to avoid heavy operations in the selector.
2435
- */
2436
- return getPatternsByBlockTypes(
2437
- state,
2438
- selectedBlockNames,
2439
- rootClientId
2440
- );
2441
- },
2442
- ( state, blocks, rootClientId ) => [
2443
- ...getPatternsByBlockTypes.getDependants( state, rootClientId ),
2444
- ]
2403
+ export const __experimentalGetPatternTransformItems = createRegistrySelector(
2404
+ ( select ) =>
2405
+ createSelector(
2406
+ ( state, blocks, rootClientId = null ) => {
2407
+ if ( ! blocks ) return EMPTY_ARRAY;
2408
+ /**
2409
+ * For now we only handle blocks without InnerBlocks and take into account
2410
+ * the `__experimentalRole` property of blocks' attributes for the transformation.
2411
+ * Note that the blocks have been retrieved through `getBlock`, which doesn't
2412
+ * return the inner blocks of an inner block controller, so we still need
2413
+ * to check for this case too.
2414
+ */
2415
+ if (
2416
+ blocks.some(
2417
+ ( { clientId, innerBlocks } ) =>
2418
+ innerBlocks.length ||
2419
+ areInnerBlocksControlled( state, clientId )
2420
+ )
2421
+ ) {
2422
+ return EMPTY_ARRAY;
2423
+ }
2424
+
2425
+ // Create a Set of the selected block names that is used in patterns filtering.
2426
+ const selectedBlockNames = Array.from(
2427
+ new Set( blocks.map( ( { name } ) => name ) )
2428
+ );
2429
+ /**
2430
+ * Here we will return first set of possible eligible block patterns,
2431
+ * by checking the `blockTypes` property. We still have to recurse through
2432
+ * block pattern's blocks and try to find matches from the selected blocks.
2433
+ * Now this happens in the consumer to avoid heavy operations in the selector.
2434
+ */
2435
+ return select( STORE_NAME ).getPatternsByBlockTypes(
2436
+ selectedBlockNames,
2437
+ rootClientId
2438
+ );
2439
+ },
2440
+ ( state, blocks, rootClientId ) =>
2441
+ getAllowedPatternsDependants( state, rootClientId )
2442
+ )
2445
2443
  );
2446
2444
 
2447
2445
  /**
@@ -2566,7 +2564,7 @@ export function __experimentalGetLastBlockAttributeChanges( state ) {
2566
2564
  * @return {Array} Reusable blocks
2567
2565
  */
2568
2566
  function getReusableBlocks( state ) {
2569
- return state?.settings?.__experimentalReusableBlocks ?? EMPTY_ARRAY;
2567
+ return state.settings.__experimentalReusableBlocks ?? EMPTY_ARRAY;
2570
2568
  }
2571
2569
 
2572
2570
  /**
@@ -2743,8 +2741,7 @@ export const __unstableGetContentLockingParent = createSelector(
2743
2741
  current = state.blocks.parents.get( current );
2744
2742
  if (
2745
2743
  ( current &&
2746
- getBlockName( state, current ) === 'core/block' &&
2747
- window.__experimentalPatternPartialSyncing ) ||
2744
+ getBlockName( state, current ) === 'core/block' ) ||
2748
2745
  ( current &&
2749
2746
  getTemplateLock( state, current ) === 'contentOnly' )
2750
2747
  ) {
@@ -2767,6 +2764,17 @@ export function __unstableGetTemporarilyEditingAsBlocks( state ) {
2767
2764
  return state.temporarilyEditingAsBlocks;
2768
2765
  }
2769
2766
 
2767
+ /**
2768
+ * DO-NOT-USE in production.
2769
+ * This selector is created for internal/experimental only usage and may be
2770
+ * removed anytime without any warning, causing breakage on any plugin or theme invoking it.
2771
+ *
2772
+ * @param {Object} state Global application state.
2773
+ */
2774
+ export function __unstableGetTemporarilyEditingFocusModeToRevert( state ) {
2775
+ return state.temporarilyEditingFocusModeRevert;
2776
+ }
2777
+
2770
2778
  export function __unstableHasActiveBlockOverlayActive( state, clientId ) {
2771
2779
  // Prevent overlay on blocks with a non-default editing mode. If the mdoe is
2772
2780
  // 'disabled' then the overlay is redundant since the block can't be