@wordpress/block-editor 12.16.1-next.79a6196f.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 (376) hide show
  1. package/CHANGELOG.md +6 -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-popover/inbetween.js +15 -3
  24. package/build/components/block-popover/inbetween.js.map +1 -1
  25. package/build/components/block-preview/auto.js +1 -1
  26. package/build/components/block-preview/auto.js.map +1 -1
  27. package/build/components/block-removal-warning-modal/index.js +3 -2
  28. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  29. package/build/components/block-settings-menu/block-settings-dropdown.js +2 -4
  30. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  31. package/build/components/block-switcher/block-transformations-menu.js +12 -1
  32. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  33. package/build/components/block-switcher/index.js +119 -90
  34. package/build/components/block-switcher/index.js.map +1 -1
  35. package/build/components/block-tools/insertion-point.js +10 -3
  36. package/build/components/block-tools/insertion-point.js.map +1 -1
  37. package/build/components/font-sizes/fluid-utils.js +7 -1
  38. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  39. package/build/components/global-styles/border-panel.js +5 -14
  40. package/build/components/global-styles/border-panel.js.map +1 -1
  41. package/build/components/global-styles/effects-panel.js +7 -1
  42. package/build/components/global-styles/effects-panel.js.map +1 -1
  43. package/build/components/iframe/get-compatibility-styles.js +99 -0
  44. package/build/components/iframe/get-compatibility-styles.js.map +1 -0
  45. package/build/components/iframe/index.js +2 -3
  46. package/build/components/iframe/index.js.map +1 -1
  47. package/build/components/index.js +16 -2
  48. package/build/components/index.js.map +1 -1
  49. package/build/components/index.native.js +16 -2
  50. package/build/components/index.native.js.map +1 -1
  51. package/build/components/inspector-controls/groups.js +2 -0
  52. package/build/components/inspector-controls/groups.js.map +1 -1
  53. package/build/components/inspector-controls-tabs/styles-tab.js +3 -0
  54. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  55. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +3 -2
  56. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  57. package/build/components/link-control/link-preview.js +30 -26
  58. package/build/components/link-control/link-preview.js.map +1 -1
  59. package/build/components/link-control/search-input.js +1 -9
  60. package/build/components/link-control/search-input.js.map +1 -1
  61. package/build/components/list-view/block-contents.js +3 -1
  62. package/build/components/list-view/block-contents.js.map +1 -1
  63. package/build/components/list-view/block.js +10 -1
  64. package/build/components/list-view/block.js.map +1 -1
  65. package/build/components/list-view/branch.js +29 -8
  66. package/build/components/list-view/branch.js.map +1 -1
  67. package/build/components/list-view/drop-indicator.js +100 -32
  68. package/build/components/list-view/drop-indicator.js.map +1 -1
  69. package/build/components/list-view/index.js +52 -4
  70. package/build/components/list-view/index.js.map +1 -1
  71. package/build/components/list-view/leaf.js +2 -2
  72. package/build/components/list-view/leaf.js.map +1 -1
  73. package/build/components/list-view/use-list-view-block-indexes.js +30 -0
  74. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -0
  75. package/build/components/list-view/use-list-view-drop-zone.js +56 -5
  76. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  77. package/build/components/list-view/utils.js +92 -0
  78. package/build/components/list-view/utils.js.map +1 -1
  79. package/build/components/provider/index.js +1 -1
  80. package/build/components/provider/index.js.map +1 -1
  81. package/build/components/recursion-provider/index.js +21 -0
  82. package/build/components/recursion-provider/index.js.map +1 -1
  83. package/build/components/rich-text/index.js +30 -6
  84. package/build/components/rich-text/index.js.map +1 -1
  85. package/build/components/rich-text/native/index.native.js +9 -9
  86. package/build/components/rich-text/native/index.native.js.map +1 -1
  87. package/build/components/use-block-drop-zone/index.js +30 -7
  88. package/build/components/use-block-drop-zone/index.js.map +1 -1
  89. package/build/components/use-on-block-drop/index.js +50 -8
  90. package/build/components/use-on-block-drop/index.js.map +1 -1
  91. package/build/hooks/block-hooks.js +5 -14
  92. package/build/hooks/block-hooks.js.map +1 -1
  93. package/build/hooks/content-lock-ui.js +17 -42
  94. package/build/hooks/content-lock-ui.js.map +1 -1
  95. package/build/hooks/effects.js +66 -0
  96. package/build/hooks/effects.js.map +1 -0
  97. package/build/hooks/index.js +14 -0
  98. package/build/hooks/index.js.map +1 -1
  99. package/build/hooks/index.native.js +13 -0
  100. package/build/hooks/index.native.js.map +1 -1
  101. package/build/hooks/style.js +6 -2
  102. package/build/hooks/style.js.map +1 -1
  103. package/build/hooks/supports.js +2 -1
  104. package/build/hooks/supports.js.map +1 -1
  105. package/build/hooks/typography.native.js +2 -2
  106. package/build/hooks/typography.native.js.map +1 -1
  107. package/build/hooks/use-bindings-attributes.js +115 -0
  108. package/build/hooks/use-bindings-attributes.js.map +1 -0
  109. package/build/hooks/use-shadow-props.js +46 -0
  110. package/build/hooks/use-shadow-props.js.map +1 -0
  111. package/build/hooks/utils.js +7 -6
  112. package/build/hooks/utils.js.map +1 -1
  113. package/build/index.js +14 -0
  114. package/build/index.js.map +1 -1
  115. package/build/store/actions.js +10 -6
  116. package/build/store/actions.js.map +1 -1
  117. package/build/store/index.js +2 -0
  118. package/build/store/index.js.map +1 -1
  119. package/build/store/private-actions.js +37 -0
  120. package/build/store/private-actions.js.map +1 -1
  121. package/build/store/private-selectors.js +60 -9
  122. package/build/store/private-selectors.js.map +1 -1
  123. package/build/store/reducer.js +44 -3
  124. package/build/store/reducer.js.map +1 -1
  125. package/build/store/resolvers.js +27 -0
  126. package/build/store/resolvers.js.map +1 -0
  127. package/build/store/selectors.js +94 -56
  128. package/build/store/selectors.js.map +1 -1
  129. package/build/store/utils.js +5 -26
  130. package/build/store/utils.js.map +1 -1
  131. package/build/utils/index.js +0 -16
  132. package/build/utils/index.js.map +1 -1
  133. package/build/utils/math.js +13 -0
  134. package/build/utils/math.js.map +1 -1
  135. package/build/utils/transform-styles/index.js +37 -27
  136. package/build/utils/transform-styles/index.js.map +1 -1
  137. package/build-module/components/block-draggable/index.js +11 -3
  138. package/build-module/components/block-draggable/index.js.map +1 -1
  139. package/build-module/components/block-edit/context.js +1 -0
  140. package/build-module/components/block-edit/context.js.map +1 -1
  141. package/build-module/components/block-edit/index.js +5 -3
  142. package/build-module/components/block-edit/index.js.map +1 -1
  143. package/build-module/components/block-editing-mode/index.js +7 -4
  144. package/build-module/components/block-editing-mode/index.js.map +1 -1
  145. package/build-module/components/block-inspector/index.js +5 -2
  146. package/build-module/components/block-inspector/index.js.map +1 -1
  147. package/build-module/components/block-list/block.js +6 -5
  148. package/build-module/components/block-list/block.js.map +1 -1
  149. package/build-module/components/block-list/block.native.js +11 -7
  150. package/build-module/components/block-list/block.native.js.map +1 -1
  151. package/build-module/components/block-list/index.js +31 -5
  152. package/build-module/components/block-list/index.js.map +1 -1
  153. package/build-module/components/block-list/private-block-context.js +1 -1
  154. package/build-module/components/block-list/private-block-context.js.map +1 -1
  155. package/build-module/components/block-list/use-in-between-inserter.js +1 -1
  156. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  157. package/build-module/components/block-popover/inbetween.js +15 -3
  158. package/build-module/components/block-popover/inbetween.js.map +1 -1
  159. package/build-module/components/block-preview/auto.js +3 -3
  160. package/build-module/components/block-preview/auto.js.map +1 -1
  161. package/build-module/components/block-removal-warning-modal/index.js +3 -2
  162. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  163. package/build-module/components/block-settings-menu/block-settings-dropdown.js +2 -4
  164. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  165. package/build-module/components/block-switcher/block-transformations-menu.js +12 -1
  166. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  167. package/build-module/components/block-switcher/index.js +116 -86
  168. package/build-module/components/block-switcher/index.js.map +1 -1
  169. package/build-module/components/block-tools/insertion-point.js +10 -3
  170. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  171. package/build-module/components/font-sizes/fluid-utils.js +7 -1
  172. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  173. package/build-module/components/global-styles/border-panel.js +5 -14
  174. package/build-module/components/global-styles/border-panel.js.map +1 -1
  175. package/build-module/components/global-styles/effects-panel.js +7 -1
  176. package/build-module/components/global-styles/effects-panel.js.map +1 -1
  177. package/build-module/components/iframe/get-compatibility-styles.js +93 -0
  178. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -0
  179. package/build-module/components/iframe/index.js +2 -3
  180. package/build-module/components/iframe/index.js.map +1 -1
  181. package/build-module/components/index.js +1 -1
  182. package/build-module/components/index.js.map +1 -1
  183. package/build-module/components/index.native.js +1 -1
  184. package/build-module/components/index.native.js.map +1 -1
  185. package/build-module/components/inspector-controls/groups.js +2 -0
  186. package/build-module/components/inspector-controls/groups.js.map +1 -1
  187. package/build-module/components/inspector-controls-tabs/styles-tab.js +3 -0
  188. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  189. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +3 -2
  190. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  191. package/build-module/components/link-control/link-preview.js +32 -28
  192. package/build-module/components/link-control/link-preview.js.map +1 -1
  193. package/build-module/components/link-control/search-input.js +1 -8
  194. package/build-module/components/link-control/search-input.js.map +1 -1
  195. package/build-module/components/list-view/block-contents.js +3 -1
  196. package/build-module/components/list-view/block-contents.js.map +1 -1
  197. package/build-module/components/list-view/block.js +10 -1
  198. package/build-module/components/list-view/block.js.map +1 -1
  199. package/build-module/components/list-view/branch.js +30 -9
  200. package/build-module/components/list-view/branch.js.map +1 -1
  201. package/build-module/components/list-view/drop-indicator.js +99 -32
  202. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  203. package/build-module/components/list-view/index.js +54 -6
  204. package/build-module/components/list-view/index.js.map +1 -1
  205. package/build-module/components/list-view/leaf.js +2 -2
  206. package/build-module/components/list-view/leaf.js.map +1 -1
  207. package/build-module/components/list-view/use-list-view-block-indexes.js +23 -0
  208. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -0
  209. package/build-module/components/list-view/use-list-view-drop-zone.js +58 -7
  210. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  211. package/build-module/components/list-view/utils.js +91 -0
  212. package/build-module/components/list-view/utils.js.map +1 -1
  213. package/build-module/components/provider/index.js +1 -1
  214. package/build-module/components/provider/index.js.map +1 -1
  215. package/build-module/components/recursion-provider/index.js +17 -0
  216. package/build-module/components/recursion-provider/index.js.map +1 -1
  217. package/build-module/components/rich-text/index.js +30 -6
  218. package/build-module/components/rich-text/index.js.map +1 -1
  219. package/build-module/components/rich-text/native/index.native.js +9 -9
  220. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  221. package/build-module/components/use-block-drop-zone/index.js +31 -8
  222. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  223. package/build-module/components/use-on-block-drop/index.js +51 -9
  224. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  225. package/build-module/hooks/block-hooks.js +5 -14
  226. package/build-module/hooks/block-hooks.js.map +1 -1
  227. package/build-module/hooks/content-lock-ui.js +19 -43
  228. package/build-module/hooks/content-lock-ui.js.map +1 -1
  229. package/build-module/hooks/effects.js +51 -0
  230. package/build-module/hooks/effects.js.map +1 -0
  231. package/build-module/hooks/index.js +2 -0
  232. package/build-module/hooks/index.js.map +1 -1
  233. package/build-module/hooks/index.native.js +1 -0
  234. package/build-module/hooks/index.native.js.map +1 -1
  235. package/build-module/hooks/style.js +6 -2
  236. package/build-module/hooks/style.js.map +1 -1
  237. package/build-module/hooks/supports.js +2 -1
  238. package/build-module/hooks/supports.js.map +1 -1
  239. package/build-module/hooks/typography.native.js +2 -2
  240. package/build-module/hooks/typography.native.js.map +1 -1
  241. package/build-module/hooks/use-bindings-attributes.js +112 -0
  242. package/build-module/hooks/use-bindings-attributes.js.map +1 -0
  243. package/build-module/hooks/use-shadow-props.js +39 -0
  244. package/build-module/hooks/use-shadow-props.js.map +1 -0
  245. package/build-module/hooks/utils.js +9 -8
  246. package/build-module/hooks/utils.js.map +1 -1
  247. package/build-module/index.js +1 -1
  248. package/build-module/index.js.map +1 -1
  249. package/build-module/store/actions.js +10 -6
  250. package/build-module/store/actions.js.map +1 -1
  251. package/build-module/store/index.js +2 -0
  252. package/build-module/store/index.js.map +1 -1
  253. package/build-module/store/private-actions.js +35 -0
  254. package/build-module/store/private-actions.js.map +1 -1
  255. package/build-module/store/private-selectors.js +53 -8
  256. package/build-module/store/private-selectors.js.map +1 -1
  257. package/build-module/store/reducer.js +43 -3
  258. package/build-module/store/reducer.js.map +1 -1
  259. package/build-module/store/resolvers.js +20 -0
  260. package/build-module/store/resolvers.js.map +1 -0
  261. package/build-module/store/selectors.js +89 -52
  262. package/build-module/store/selectors.js.map +1 -1
  263. package/build-module/store/utils.js +3 -23
  264. package/build-module/store/utils.js.map +1 -1
  265. package/build-module/utils/index.js +0 -1
  266. package/build-module/utils/index.js.map +1 -1
  267. package/build-module/utils/math.js +12 -0
  268. package/build-module/utils/math.js.map +1 -1
  269. package/build-module/utils/transform-styles/index.js +36 -27
  270. package/build-module/utils/transform-styles/index.js.map +1 -1
  271. package/build-style/content-rtl.css +33 -16
  272. package/build-style/content.css +33 -16
  273. package/build-style/default-editor-styles-rtl.css +1 -1
  274. package/build-style/default-editor-styles.css +1 -1
  275. package/build-style/style-rtl.css +169 -114
  276. package/build-style/style.css +169 -114
  277. package/package.json +31 -31
  278. package/src/components/block-canvas/style.scss +8 -1
  279. package/src/components/block-draggable/index.js +16 -5
  280. package/src/components/block-edit/context.js +1 -0
  281. package/src/components/block-edit/index.js +4 -0
  282. package/src/components/block-editing-mode/index.js +12 -7
  283. package/src/components/block-inspector/index.js +5 -2
  284. package/src/components/block-list/block.js +5 -4
  285. package/src/components/block-list/block.native.js +13 -3
  286. package/src/components/block-list/content.scss +34 -5
  287. package/src/components/block-list/index.js +52 -16
  288. package/src/components/block-list/private-block-context.js +1 -1
  289. package/src/components/block-list/use-in-between-inserter.js +1 -2
  290. package/src/components/block-popover/inbetween.js +22 -2
  291. package/src/components/block-preview/auto.js +3 -3
  292. package/src/components/block-removal-warning-modal/index.js +3 -2
  293. package/src/components/block-settings-menu/block-settings-dropdown.js +2 -7
  294. package/src/components/block-switcher/block-transformations-menu.js +18 -1
  295. package/src/components/block-switcher/index.js +133 -111
  296. package/src/components/block-switcher/style.scss +6 -4
  297. package/src/components/block-switcher/test/index.js +113 -230
  298. package/src/components/block-toolbar/style.scss +22 -18
  299. package/src/components/block-tools/insertion-point.js +15 -2
  300. package/src/components/block-tools/style.scss +8 -7
  301. package/src/components/font-sizes/fluid-utils.js +8 -2
  302. package/src/components/font-sizes/test/fluid-utils.js +9 -0
  303. package/src/components/global-styles/border-panel.js +7 -17
  304. package/src/components/global-styles/effects-panel.js +16 -1
  305. package/src/components/iframe/get-compatibility-styles.js +120 -0
  306. package/src/components/iframe/index.js +2 -3
  307. package/src/components/index.js +4 -2
  308. package/src/components/index.native.js +4 -2
  309. package/src/components/inspector-controls/groups.js +2 -0
  310. package/src/components/inspector-controls-tabs/styles-tab.js +1 -0
  311. package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +2 -0
  312. package/src/components/link-control/link-preview.js +31 -55
  313. package/src/components/link-control/search-input.js +1 -9
  314. package/src/components/link-control/style.scss +31 -85
  315. package/src/components/link-control/test/index.js +2 -1
  316. package/src/components/list-view/block-contents.js +5 -1
  317. package/src/components/list-view/block.js +9 -0
  318. package/src/components/list-view/branch.js +30 -10
  319. package/src/components/list-view/drop-indicator.js +139 -46
  320. package/src/components/list-view/index.js +74 -3
  321. package/src/components/list-view/leaf.js +2 -2
  322. package/src/components/list-view/style.scss +102 -13
  323. package/src/components/list-view/test/use-list-view-drop-zone.js +4 -0
  324. package/src/components/list-view/test/utils.js +218 -1
  325. package/src/components/list-view/use-list-view-block-indexes.js +29 -0
  326. package/src/components/list-view/use-list-view-drop-zone.js +78 -6
  327. package/src/components/list-view/utils.js +116 -0
  328. package/src/components/provider/index.js +3 -1
  329. package/src/components/recursion-provider/README.md +2 -2
  330. package/src/components/recursion-provider/index.js +17 -0
  331. package/src/components/rich-text/index.js +48 -10
  332. package/src/components/rich-text/native/index.native.js +10 -10
  333. package/src/components/use-block-drop-zone/index.js +60 -19
  334. package/src/components/use-block-drop-zone/test/index.js +32 -61
  335. package/src/components/use-on-block-drop/index.js +92 -11
  336. package/src/hooks/block-hooks.js +5 -17
  337. package/src/hooks/content-lock-ui.js +15 -55
  338. package/src/hooks/effects.js +57 -0
  339. package/src/hooks/index.js +2 -0
  340. package/src/hooks/index.native.js +1 -0
  341. package/src/hooks/style.js +8 -0
  342. package/src/hooks/supports.js +2 -0
  343. package/src/hooks/test/effects.js +39 -0
  344. package/src/hooks/typography.native.js +2 -2
  345. package/src/hooks/use-bindings-attributes.js +148 -0
  346. package/src/hooks/use-shadow-props.js +37 -0
  347. package/src/hooks/utils.js +10 -6
  348. package/src/index.js +2 -0
  349. package/src/store/actions.js +9 -4
  350. package/src/store/index.js +2 -0
  351. package/src/store/private-actions.js +32 -0
  352. package/src/store/private-selectors.js +78 -21
  353. package/src/store/reducer.js +49 -2
  354. package/src/store/resolvers.js +17 -0
  355. package/src/store/selectors.js +169 -161
  356. package/src/store/test/registry-selectors.js +431 -0
  357. package/src/store/test/selectors.js +14 -400
  358. package/src/store/utils.js +10 -33
  359. package/src/style.scss +0 -1
  360. package/src/utils/index.js +0 -1
  361. package/src/utils/math.js +12 -0
  362. package/src/utils/transform-styles/index.js +52 -37
  363. package/tsconfig.tsbuildinfo +1 -1
  364. package/build/components/iframe/use-compatibility-styles.js +0 -100
  365. package/build/components/iframe/use-compatibility-styles.js.map +0 -1
  366. package/build/utils/block-variation-transforms.js +0 -42
  367. package/build/utils/block-variation-transforms.js.map +0 -1
  368. package/build-module/components/iframe/use-compatibility-styles.js +0 -94
  369. package/build-module/components/iframe/use-compatibility-styles.js.map +0 -1
  370. package/build-module/utils/block-variation-transforms.js +0 -35
  371. package/build-module/utils/block-variation-transforms.js.map +0 -1
  372. package/src/components/block-switcher/test/__snapshots__/index.js.snap +0 -116
  373. package/src/components/contrast-checker/style.scss +0 -3
  374. package/src/components/iframe/use-compatibility-styles.js +0 -122
  375. package/src/utils/block-variation-transforms.js +0 -38
  376. package/src/utils/test/block-variation-transforms.js +0 -94
@@ -3,9 +3,9 @@ import { createElement } from "react";
3
3
  * WordPress dependencies
4
4
  */
5
5
  import { getBlockSupport } from '@wordpress/blocks';
6
- import { useMemo, useEffect, useId, useState } from '@wordpress/element';
6
+ import { memo, useMemo, useEffect, useId, useState } from '@wordpress/element';
7
7
  import { useDispatch } from '@wordpress/data';
8
- import { createHigherOrderComponent, pure } from '@wordpress/compose';
8
+ import { createHigherOrderComponent } from '@wordpress/compose';
9
9
  import { addFilter } from '@wordpress/hooks';
10
10
 
11
11
  /**
@@ -133,7 +133,7 @@ export function useStyleOverride({
133
133
  * @return {Object} Settings object.
134
134
  */
135
135
  export function useBlockSettings(name, parentLayout) {
136
- const [backgroundImage, backgroundSize, fontFamilies, userFontSizes, themeFontSizes, defaultFontSizes, defaultFontSizesEnabled, customFontSize, fontStyle, fontWeight, lineHeight, textColumns, textDecoration, writingMode, textTransform, letterSpacing, padding, margin, blockGap, spacingSizes, units, minHeight, layout, borderColor, borderRadius, borderStyle, borderWidth, customColorsEnabled, customColors, customDuotone, themeColors, defaultColors, defaultPalette, defaultDuotone, userDuotonePalette, themeDuotonePalette, defaultDuotonePalette, userGradientPalette, themeGradientPalette, defaultGradientPalette, defaultGradients, areCustomGradientsEnabled, isBackgroundEnabled, isLinkEnabled, isTextEnabled, isHeadingEnabled, isButtonEnabled] = useSettings('background.backgroundImage', 'background.backgroundSize', 'typography.fontFamilies', 'typography.fontSizes.custom', 'typography.fontSizes.theme', 'typography.fontSizes.default', 'typography.defaultFontSizes', 'typography.customFontSize', 'typography.fontStyle', 'typography.fontWeight', 'typography.lineHeight', 'typography.textColumns', 'typography.textDecoration', 'typography.writingMode', 'typography.textTransform', 'typography.letterSpacing', 'spacing.padding', 'spacing.margin', 'spacing.blockGap', 'spacing.spacingSizes', 'spacing.units', 'dimensions.minHeight', 'layout', 'border.color', 'border.radius', 'border.style', 'border.width', 'color.custom', 'color.palette.custom', 'color.customDuotone', 'color.palette.theme', 'color.palette.default', 'color.defaultPalette', 'color.defaultDuotone', 'color.duotone.custom', 'color.duotone.theme', 'color.duotone.default', 'color.gradients.custom', 'color.gradients.theme', 'color.gradients.default', 'color.defaultGradients', 'color.customGradient', 'color.background', 'color.link', 'color.text', 'color.heading', 'color.button');
136
+ const [backgroundImage, backgroundSize, fontFamilies, userFontSizes, themeFontSizes, defaultFontSizes, defaultFontSizesEnabled, customFontSize, fontStyle, fontWeight, lineHeight, textColumns, textDecoration, writingMode, textTransform, letterSpacing, padding, margin, blockGap, spacingSizes, units, minHeight, layout, borderColor, borderRadius, borderStyle, borderWidth, customColorsEnabled, customColors, customDuotone, themeColors, defaultColors, defaultPalette, defaultDuotone, userDuotonePalette, themeDuotonePalette, defaultDuotonePalette, userGradientPalette, themeGradientPalette, defaultGradientPalette, defaultGradients, areCustomGradientsEnabled, isBackgroundEnabled, isLinkEnabled, isTextEnabled, isHeadingEnabled, isButtonEnabled, shadow] = useSettings('background.backgroundImage', 'background.backgroundSize', 'typography.fontFamilies', 'typography.fontSizes.custom', 'typography.fontSizes.theme', 'typography.fontSizes.default', 'typography.defaultFontSizes', 'typography.customFontSize', 'typography.fontStyle', 'typography.fontWeight', 'typography.lineHeight', 'typography.textColumns', 'typography.textDecoration', 'typography.writingMode', 'typography.textTransform', 'typography.letterSpacing', 'spacing.padding', 'spacing.margin', 'spacing.blockGap', 'spacing.spacingSizes', 'spacing.units', 'dimensions.minHeight', 'layout', 'border.color', 'border.radius', 'border.style', 'border.width', 'color.custom', 'color.palette.custom', 'color.customDuotone', 'color.palette.theme', 'color.palette.default', 'color.defaultPalette', 'color.defaultDuotone', 'color.duotone.custom', 'color.duotone.theme', 'color.duotone.default', 'color.gradients.custom', 'color.gradients.theme', 'color.gradients.default', 'color.defaultGradients', 'color.customGradient', 'color.background', 'color.link', 'color.text', 'color.heading', 'color.button', 'shadow');
137
137
  const rawSettings = useMemo(() => {
138
138
  return {
139
139
  background: {
@@ -207,19 +207,20 @@ export function useBlockSettings(name, parentLayout) {
207
207
  minHeight
208
208
  },
209
209
  layout,
210
- parentLayout
210
+ parentLayout,
211
+ shadow
211
212
  };
212
- }, [backgroundImage, backgroundSize, fontFamilies, userFontSizes, themeFontSizes, defaultFontSizes, defaultFontSizesEnabled, customFontSize, fontStyle, fontWeight, lineHeight, textColumns, textDecoration, textTransform, letterSpacing, writingMode, padding, margin, blockGap, spacingSizes, units, minHeight, layout, parentLayout, borderColor, borderRadius, borderStyle, borderWidth, customColorsEnabled, customColors, customDuotone, themeColors, defaultColors, defaultPalette, defaultDuotone, userDuotonePalette, themeDuotonePalette, defaultDuotonePalette, userGradientPalette, themeGradientPalette, defaultGradientPalette, defaultGradients, areCustomGradientsEnabled, isBackgroundEnabled, isLinkEnabled, isTextEnabled, isHeadingEnabled, isButtonEnabled]);
213
+ }, [backgroundImage, backgroundSize, fontFamilies, userFontSizes, themeFontSizes, defaultFontSizes, defaultFontSizesEnabled, customFontSize, fontStyle, fontWeight, lineHeight, textColumns, textDecoration, textTransform, letterSpacing, writingMode, padding, margin, blockGap, spacingSizes, units, minHeight, layout, parentLayout, borderColor, borderRadius, borderStyle, borderWidth, customColorsEnabled, customColors, customDuotone, themeColors, defaultColors, defaultPalette, defaultDuotone, userDuotonePalette, themeDuotonePalette, defaultDuotonePalette, userGradientPalette, themeGradientPalette, defaultGradientPalette, defaultGradients, areCustomGradientsEnabled, isBackgroundEnabled, isLinkEnabled, isTextEnabled, isHeadingEnabled, isButtonEnabled, shadow]);
213
214
  return useSettingsForBlockElement(rawSettings, name);
214
215
  }
215
216
  export function createBlockEditFilter(features) {
216
217
  // We don't want block controls to re-render when typing inside a block.
217
- // `pure` will prevent re-renders unless props change, so only pass the
218
+ // `memo` will prevent re-renders unless props change, so only pass the
218
219
  // needed props and not the whole attributes object.
219
220
  features = features.map(settings => {
220
221
  return {
221
222
  ...settings,
222
- Edit: pure(settings.edit)
223
+ Edit: memo(settings.edit)
223
224
  };
224
225
  });
225
226
  const withBlockEditHooks = createHigherOrderComponent(OriginalBlockEdit => props => {
@@ -291,7 +292,7 @@ function BlockProps({
291
292
  });
292
293
  return null;
293
294
  }
294
- const BlockPropsPure = pure(BlockProps);
295
+ const BlockPropsPure = memo(BlockProps);
295
296
  export function createBlockListBlockFilter(features) {
296
297
  const withBlockListBlockHooks = createHigherOrderComponent(BlockListBlock => props => {
297
298
  const [allWrapperProps, setAllWrapperProps] = useState(Array(features.length).fill(undefined));
@@ -1 +1 @@
1
- {"version":3,"names":["getBlockSupport","useMemo","useEffect","useId","useState","useDispatch","createHigherOrderComponent","pure","addFilter","useBlockEditContext","mayDisplayControlsKey","mayDisplayParentControlsKey","useSettings","useSettingsForBlockElement","getValueFromObjectPath","setImmutably","store","blockEditorStore","unlock","classnames","cleanEmptyObject","object","Array","isArray","cleanedNestedObjects","Object","entries","map","key","value","filter","undefined","length","fromEntries","transformStyles","activeSupports","migrationPaths","result","source","index","results","values","every","isActive","innerBlocks","referenceBlockAttributes","attributes","returnBlock","forEach","support","path","styleValue","shouldSkipSerialization","blockNameOrType","featureSet","feature","skipSerialization","__experimentalSkipSerialization","includes","useStyleOverride","id","css","assets","__unstableType","setStyleOverride","deleteStyleOverride","fallbackId","_id","useBlockSettings","name","parentLayout","backgroundImage","backgroundSize","fontFamilies","userFontSizes","themeFontSizes","defaultFontSizes","defaultFontSizesEnabled","customFontSize","fontStyle","fontWeight","lineHeight","textColumns","textDecoration","writingMode","textTransform","letterSpacing","padding","margin","blockGap","spacingSizes","units","minHeight","layout","borderColor","borderRadius","borderStyle","borderWidth","customColorsEnabled","customColors","customDuotone","themeColors","defaultColors","defaultPalette","defaultDuotone","userDuotonePalette","themeDuotonePalette","defaultDuotonePalette","userGradientPalette","themeGradientPalette","defaultGradientPalette","defaultGradients","areCustomGradientsEnabled","isBackgroundEnabled","isLinkEnabled","isTextEnabled","isHeadingEnabled","isButtonEnabled","rawSettings","background","color","palette","custom","theme","default","gradients","duotone","customGradient","link","heading","button","text","typography","fontSizes","spacing","border","radius","style","width","dimensions","createBlockEditFilter","features","settings","Edit","edit","withBlockEditHooks","OriginalBlockEdit","props","context","i","hasSupport","attributeKeys","shareWithChildBlocks","shouldDisplayControls","neededProps","createElement","isSelected","clientId","setAttributes","__unstableParentLayout","BlockProps","useBlockProps","setAllWrapperProps","wrapperProps","setWrapperProps","next","prev","nextAll","BlockPropsPure","createBlockListBlockFilter","withBlockListBlockHooks","BlockListBlock","allWrapperProps","fill","keys","Boolean","reduce","acc","className","createBlockSaveFilter","extraPropsFromHooks","accu","addSaveProps","neededAttributes","hasOwnProperty"],"sources":["@wordpress/block-editor/src/hooks/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { useMemo, useEffect, useId, useState } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { createHigherOrderComponent, pure } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseBlockEditContext,\n\tmayDisplayControlsKey,\n\tmayDisplayParentControlsKey,\n} from '../components/block-edit/context';\nimport { useSettings } from '../components';\nimport { useSettingsForBlockElement } from '../components/global-styles/hooks';\nimport { getValueFromObjectPath, setImmutably } from '../utils/object';\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Removed falsy values from nested object.\n *\n * @param {*} object\n * @return {*} Object cleaned from falsy values\n */\nexport const cleanEmptyObject = ( object ) => {\n\tif (\n\t\tobject === null ||\n\t\ttypeof object !== 'object' ||\n\t\tArray.isArray( object )\n\t) {\n\t\treturn object;\n\t}\n\n\tconst cleanedNestedObjects = Object.entries( object )\n\t\t.map( ( [ key, value ] ) => [ key, cleanEmptyObject( value ) ] )\n\t\t.filter( ( [ , value ] ) => value !== undefined );\n\treturn ! cleanedNestedObjects.length\n\t\t? undefined\n\t\t: Object.fromEntries( cleanedNestedObjects );\n};\n\nexport function transformStyles(\n\tactiveSupports,\n\tmigrationPaths,\n\tresult,\n\tsource,\n\tindex,\n\tresults\n) {\n\t// If there are no active supports return early.\n\tif (\n\t\tObject.values( activeSupports ?? {} ).every(\n\t\t\t( isActive ) => ! isActive\n\t\t)\n\t) {\n\t\treturn result;\n\t}\n\t// If the condition verifies we are probably in the presence of a wrapping transform\n\t// e.g: nesting paragraphs in a group or columns and in that case the styles should not be transformed.\n\tif ( results.length === 1 && result.innerBlocks.length === source.length ) {\n\t\treturn result;\n\t}\n\t// For cases where we have a transform from one block to multiple blocks\n\t// or multiple blocks to one block we apply the styles of the first source block\n\t// to the result(s).\n\tlet referenceBlockAttributes = source[ 0 ]?.attributes;\n\t// If we are in presence of transform between more than one block in the source\n\t// that has more than one block in the result\n\t// we apply the styles on source N to the result N,\n\t// if source N does not exists we do nothing.\n\tif ( results.length > 1 && source.length > 1 ) {\n\t\tif ( source[ index ] ) {\n\t\t\treferenceBlockAttributes = source[ index ]?.attributes;\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n\tlet returnBlock = result;\n\tObject.entries( activeSupports ).forEach( ( [ support, isActive ] ) => {\n\t\tif ( isActive ) {\n\t\t\tmigrationPaths[ support ].forEach( ( path ) => {\n\t\t\t\tconst styleValue = getValueFromObjectPath(\n\t\t\t\t\treferenceBlockAttributes,\n\t\t\t\t\tpath\n\t\t\t\t);\n\t\t\t\tif ( styleValue ) {\n\t\t\t\t\treturnBlock = {\n\t\t\t\t\t\t...returnBlock,\n\t\t\t\t\t\tattributes: setImmutably(\n\t\t\t\t\t\t\treturnBlock.attributes,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tstyleValue\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\treturn returnBlock;\n}\n\n/**\n * Check whether serialization of specific block support feature or set should\n * be skipped.\n *\n * @param {string|Object} blockNameOrType Block name or block type object.\n * @param {string} featureSet Name of block support feature set.\n * @param {string} feature Name of the individual feature to check.\n *\n * @return {boolean} Whether serialization should occur.\n */\nexport function shouldSkipSerialization(\n\tblockNameOrType,\n\tfeatureSet,\n\tfeature\n) {\n\tconst support = getBlockSupport( blockNameOrType, featureSet );\n\tconst skipSerialization = support?.__experimentalSkipSerialization;\n\n\tif ( Array.isArray( skipSerialization ) ) {\n\t\treturn skipSerialization.includes( feature );\n\t}\n\n\treturn skipSerialization;\n}\n\nexport function useStyleOverride( { id, css, assets, __unstableType } = {} ) {\n\tconst { setStyleOverride, deleteStyleOverride } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst fallbackId = useId();\n\tuseEffect( () => {\n\t\t// Unmount if there is CSS and assets are empty.\n\t\tif ( ! css && ! assets ) return;\n\t\tconst _id = id || fallbackId;\n\t\tsetStyleOverride( _id, {\n\t\t\tid,\n\t\t\tcss,\n\t\t\tassets,\n\t\t\t__unstableType,\n\t\t} );\n\t\treturn () => {\n\t\t\tdeleteStyleOverride( _id );\n\t\t};\n\t}, [\n\t\tid,\n\t\tcss,\n\t\tassets,\n\t\t__unstableType,\n\t\tfallbackId,\n\t\tsetStyleOverride,\n\t\tdeleteStyleOverride,\n\t] );\n}\n\n/**\n * Based on the block and its context, returns an object of all the block settings.\n * This object can be passed as a prop to all the Styles UI components\n * (TypographyPanel, DimensionsPanel...).\n *\n * @param {string} name Block name.\n * @param {*} parentLayout Parent layout.\n *\n * @return {Object} Settings object.\n */\nexport function useBlockSettings( name, parentLayout ) {\n\tconst [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tfontFamilies,\n\t\tuserFontSizes,\n\t\tthemeFontSizes,\n\t\tdefaultFontSizes,\n\t\tdefaultFontSizesEnabled,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\twritingMode,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tspacingSizes,\n\t\tunits,\n\t\tminHeight,\n\t\tlayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t] = useSettings(\n\t\t'background.backgroundImage',\n\t\t'background.backgroundSize',\n\t\t'typography.fontFamilies',\n\t\t'typography.fontSizes.custom',\n\t\t'typography.fontSizes.theme',\n\t\t'typography.fontSizes.default',\n\t\t'typography.defaultFontSizes',\n\t\t'typography.customFontSize',\n\t\t'typography.fontStyle',\n\t\t'typography.fontWeight',\n\t\t'typography.lineHeight',\n\t\t'typography.textColumns',\n\t\t'typography.textDecoration',\n\t\t'typography.writingMode',\n\t\t'typography.textTransform',\n\t\t'typography.letterSpacing',\n\t\t'spacing.padding',\n\t\t'spacing.margin',\n\t\t'spacing.blockGap',\n\t\t'spacing.spacingSizes',\n\t\t'spacing.units',\n\t\t'dimensions.minHeight',\n\t\t'layout',\n\t\t'border.color',\n\t\t'border.radius',\n\t\t'border.style',\n\t\t'border.width',\n\t\t'color.custom',\n\t\t'color.palette.custom',\n\t\t'color.customDuotone',\n\t\t'color.palette.theme',\n\t\t'color.palette.default',\n\t\t'color.defaultPalette',\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default',\n\t\t'color.gradients.custom',\n\t\t'color.gradients.theme',\n\t\t'color.gradients.default',\n\t\t'color.defaultGradients',\n\t\t'color.customGradient',\n\t\t'color.background',\n\t\t'color.link',\n\t\t'color.text',\n\t\t'color.heading',\n\t\t'color.button'\n\t);\n\n\tconst rawSettings = useMemo( () => {\n\t\treturn {\n\t\t\tbackground: {\n\t\t\t\tbackgroundImage,\n\t\t\t\tbackgroundSize,\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\tpalette: {\n\t\t\t\t\tcustom: customColors,\n\t\t\t\t\ttheme: themeColors,\n\t\t\t\t\tdefault: defaultColors,\n\t\t\t\t},\n\t\t\t\tgradients: {\n\t\t\t\t\tcustom: userGradientPalette,\n\t\t\t\t\ttheme: themeGradientPalette,\n\t\t\t\t\tdefault: defaultGradientPalette,\n\t\t\t\t},\n\t\t\t\tduotone: {\n\t\t\t\t\tcustom: userDuotonePalette,\n\t\t\t\t\ttheme: themeDuotonePalette,\n\t\t\t\t\tdefault: defaultDuotonePalette,\n\t\t\t\t},\n\t\t\t\tdefaultGradients,\n\t\t\t\tdefaultPalette,\n\t\t\t\tdefaultDuotone,\n\t\t\t\tcustom: customColorsEnabled,\n\t\t\t\tcustomGradient: areCustomGradientsEnabled,\n\t\t\t\tcustomDuotone,\n\t\t\t\tbackground: isBackgroundEnabled,\n\t\t\t\tlink: isLinkEnabled,\n\t\t\t\theading: isHeadingEnabled,\n\t\t\t\tbutton: isButtonEnabled,\n\t\t\t\ttext: isTextEnabled,\n\t\t\t},\n\t\t\ttypography: {\n\t\t\t\tfontFamilies: {\n\t\t\t\t\tcustom: fontFamilies,\n\t\t\t\t},\n\t\t\t\tfontSizes: {\n\t\t\t\t\tcustom: userFontSizes,\n\t\t\t\t\ttheme: themeFontSizes,\n\t\t\t\t\tdefault: defaultFontSizes,\n\t\t\t\t},\n\t\t\t\tcustomFontSize,\n\t\t\t\tdefaultFontSizes: defaultFontSizesEnabled,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tlineHeight,\n\t\t\t\ttextColumns,\n\t\t\t\ttextDecoration,\n\t\t\t\ttextTransform,\n\t\t\t\tletterSpacing,\n\t\t\t\twritingMode,\n\t\t\t},\n\t\t\tspacing: {\n\t\t\t\tspacingSizes: {\n\t\t\t\t\tcustom: spacingSizes,\n\t\t\t\t},\n\t\t\t\tpadding,\n\t\t\t\tmargin,\n\t\t\t\tblockGap,\n\t\t\t\tunits,\n\t\t\t},\n\t\t\tborder: {\n\t\t\t\tcolor: borderColor,\n\t\t\t\tradius: borderRadius,\n\t\t\t\tstyle: borderStyle,\n\t\t\t\twidth: borderWidth,\n\t\t\t},\n\t\t\tdimensions: {\n\t\t\t\tminHeight,\n\t\t\t},\n\t\t\tlayout,\n\t\t\tparentLayout,\n\t\t};\n\t}, [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tfontFamilies,\n\t\tuserFontSizes,\n\t\tthemeFontSizes,\n\t\tdefaultFontSizes,\n\t\tdefaultFontSizesEnabled,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\twritingMode,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tspacingSizes,\n\t\tunits,\n\t\tminHeight,\n\t\tlayout,\n\t\tparentLayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t] );\n\n\treturn useSettingsForBlockElement( rawSettings, name );\n}\n\nexport function createBlockEditFilter( features ) {\n\t// We don't want block controls to re-render when typing inside a block.\n\t// `pure` will prevent re-renders unless props change, so only pass the\n\t// needed props and not the whole attributes object.\n\tfeatures = features.map( ( settings ) => {\n\t\treturn { ...settings, Edit: pure( settings.edit ) };\n\t} );\n\tconst withBlockEditHooks = createHigherOrderComponent(\n\t\t( OriginalBlockEdit ) => ( props ) => {\n\t\t\tconst context = useBlockEditContext();\n\t\t\t// CAUTION: code added before this line will be executed for all\n\t\t\t// blocks, not just those that support the feature! Code added\n\t\t\t// above this line should be carefully evaluated for its impact on\n\t\t\t// performance.\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tEdit,\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tshareWithChildBlocks,\n\t\t\t\t\t} = feature;\n\t\t\t\t\tconst shouldDisplayControls =\n\t\t\t\t\t\tcontext[ mayDisplayControlsKey ] ||\n\t\t\t\t\t\t( context[ mayDisplayParentControlsKey ] &&\n\t\t\t\t\t\t\tshareWithChildBlocks );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! shouldDisplayControls ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Edit\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\tisSelected={ props.isSelected }\n\t\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\t\tsetAttributes={ props.setAttributes }\n\t\t\t\t\t\t\t__unstableParentLayout={\n\t\t\t\t\t\t\t\tprops.__unstableParentLayout\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<OriginalBlockEdit key=\"edit\" { ...props } />,\n\t\t\t];\n\t\t},\n\t\t'withBlockEditHooks'\n\t);\n\taddFilter( 'editor.BlockEdit', 'core/editor/hooks', withBlockEditHooks );\n}\n\nfunction BlockProps( { index, useBlockProps, setAllWrapperProps, ...props } ) {\n\tconst wrapperProps = useBlockProps( props );\n\tconst setWrapperProps = ( next ) =>\n\t\tsetAllWrapperProps( ( prev ) => {\n\t\t\tconst nextAll = [ ...prev ];\n\t\t\tnextAll[ index ] = next;\n\t\t\treturn nextAll;\n\t\t} );\n\t// Setting state after every render is fine because this component is\n\t// pure and will only re-render when needed props change.\n\tuseEffect( () => {\n\t\t// We could shallow compare the props, but since this component only\n\t\t// changes when needed attributes change, the benefit is probably small.\n\t\tsetWrapperProps( wrapperProps );\n\t\treturn () => {\n\t\t\tsetWrapperProps( undefined );\n\t\t};\n\t} );\n\treturn null;\n}\n\nconst BlockPropsPure = pure( BlockProps );\n\nexport function createBlockListBlockFilter( features ) {\n\tconst withBlockListBlockHooks = createHigherOrderComponent(\n\t\t( BlockListBlock ) => ( props ) => {\n\t\t\tconst [ allWrapperProps, setAllWrapperProps ] = useState(\n\t\t\t\tArray( features.length ).fill( undefined )\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tuseBlockProps,\n\t\t\t\t\t} = feature;\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t\t\t// set.\n\t\t\t\t\t\t! Object.keys( neededProps ).length ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<BlockPropsPure\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tindex={ i }\n\t\t\t\t\t\t\tuseBlockProps={ useBlockProps }\n\t\t\t\t\t\t\t// This component is pure, so we must pass a stable\n\t\t\t\t\t\t\t// function reference.\n\t\t\t\t\t\t\tsetAllWrapperProps={ setAllWrapperProps }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<BlockListBlock\n\t\t\t\t\tkey=\"edit\"\n\t\t\t\t\t{ ...props }\n\t\t\t\t\twrapperProps={ allWrapperProps\n\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t.reduce( ( acc, wrapperProps ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t\t\t...wrapperProps,\n\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\tacc.className,\n\t\t\t\t\t\t\t\t\twrapperProps.className\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t...acc.style,\n\t\t\t\t\t\t\t\t\t...wrapperProps.style,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}, props.wrapperProps || {} ) }\n\t\t\t\t/>,\n\t\t\t];\n\t\t},\n\t\t'withBlockListBlockHooks'\n\t);\n\taddFilter(\n\t\t'editor.BlockListBlock',\n\t\t'core/editor/hooks',\n\t\twithBlockListBlockHooks\n\t);\n}\n\nexport function createBlockSaveFilter( features ) {\n\tfunction extraPropsFromHooks( props, name, attributes ) {\n\t\treturn features.reduce( ( accu, feature ) => {\n\t\t\tconst { hasSupport, attributeKeys = [], addSaveProps } = feature;\n\n\t\t\tconst neededAttributes = {};\n\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\tif ( attributes[ key ] ) {\n\t\t\t\t\tneededAttributes[ key ] = attributes[ key ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t// set.\n\t\t\t\t! Object.keys( neededAttributes ).length ||\n\t\t\t\t! hasSupport( name )\n\t\t\t) {\n\t\t\t\treturn accu;\n\t\t\t}\n\n\t\t\treturn addSaveProps( accu, name, neededAttributes );\n\t\t}, props );\n\t}\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\textraPropsFromHooks,\n\t\t0\n\t);\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\t( props ) => {\n\t\t\t// Previously we had a filter deleting the className if it was an empty\n\t\t\t// string. That filter is no longer running, so now we need to delete it\n\t\t\t// here.\n\t\t\tif ( props.hasOwnProperty( 'className' ) && ! props.className ) {\n\t\t\t\tdelete props.className;\n\t\t\t}\n\n\t\t\treturn props;\n\t\t}\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,mBAAmB;AACnD,SAASC,OAAO,EAAEC,SAAS,EAAEC,KAAK,EAAEC,QAAQ,QAAQ,oBAAoB;AACxE,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,0BAA0B,EAAEC,IAAI,QAAQ,oBAAoB;AACrE,SAASC,SAAS,QAAQ,kBAAkB;;AAE5C;AACA;AACA;AACA,SACCC,mBAAmB,EACnBC,qBAAqB,EACrBC,2BAA2B,QACrB,kCAAkC;AACzC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,0BAA0B,QAAQ,mCAAmC;AAC9E,SAASC,sBAAsB,EAAEC,YAAY,QAAQ,iBAAiB;AACtE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AACpD,SAASC,MAAM,QAAQ,gBAAgB;AACvC;AACA;AACA;AACA,OAAOC,UAAU,MAAM,Y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S,CACR,kCAAkC,EAClC,mBAAmB,EACnB4K,mBAAmB,EACnB,CACD,CAAC;EACD5K,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACjB2I,KAAK,IAAM;IACZ;IACA;IACA;IACA,IAAKA,KAAK,CAACqC,cAAc,CAAE,WAAY,CAAC,IAAI,CAAErC,KAAK,CAAC+B,SAAS,EAAG;MAC/D,OAAO/B,KAAK,CAAC+B,SAAS;IACvB;IAEA,OAAO/B,KAAK;EACb,CACD,CAAC;AACF"}
1
+ {"version":3,"names":["getBlockSupport","memo","useMemo","useEffect","useId","useState","useDispatch","createHigherOrderComponent","addFilter","useBlockEditContext","mayDisplayControlsKey","mayDisplayParentControlsKey","useSettings","useSettingsForBlockElement","getValueFromObjectPath","setImmutably","store","blockEditorStore","unlock","classnames","cleanEmptyObject","object","Array","isArray","cleanedNestedObjects","Object","entries","map","key","value","filter","undefined","length","fromEntries","transformStyles","activeSupports","migrationPaths","result","source","index","results","values","every","isActive","innerBlocks","referenceBlockAttributes","attributes","returnBlock","forEach","support","path","styleValue","shouldSkipSerialization","blockNameOrType","featureSet","feature","skipSerialization","__experimentalSkipSerialization","includes","useStyleOverride","id","css","assets","__unstableType","setStyleOverride","deleteStyleOverride","fallbackId","_id","useBlockSettings","name","parentLayout","backgroundImage","backgroundSize","fontFamilies","userFontSizes","themeFontSizes","defaultFontSizes","defaultFontSizesEnabled","customFontSize","fontStyle","fontWeight","lineHeight","textColumns","textDecoration","writingMode","textTransform","letterSpacing","padding","margin","blockGap","spacingSizes","units","minHeight","layout","borderColor","borderRadius","borderStyle","borderWidth","customColorsEnabled","customColors","customDuotone","themeColors","defaultColors","defaultPalette","defaultDuotone","userDuotonePalette","themeDuotonePalette","defaultDuotonePalette","userGradientPalette","themeGradientPalette","defaultGradientPalette","defaultGradients","areCustomGradientsEnabled","isBackgroundEnabled","isLinkEnabled","isTextEnabled","isHeadingEnabled","isButtonEnabled","shadow","rawSettings","background","color","palette","custom","theme","default","gradients","duotone","customGradient","link","heading","button","text","typography","fontSizes","spacing","border","radius","style","width","dimensions","createBlockEditFilter","features","settings","Edit","edit","withBlockEditHooks","OriginalBlockEdit","props","context","i","hasSupport","attributeKeys","shareWithChildBlocks","shouldDisplayControls","neededProps","createElement","isSelected","clientId","setAttributes","__unstableParentLayout","BlockProps","useBlockProps","setAllWrapperProps","wrapperProps","setWrapperProps","next","prev","nextAll","BlockPropsPure","createBlockListBlockFilter","withBlockListBlockHooks","BlockListBlock","allWrapperProps","fill","keys","Boolean","reduce","acc","className","createBlockSaveFilter","extraPropsFromHooks","accu","addSaveProps","neededAttributes","hasOwnProperty"],"sources":["@wordpress/block-editor/src/hooks/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { memo, useMemo, useEffect, useId, useState } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseBlockEditContext,\n\tmayDisplayControlsKey,\n\tmayDisplayParentControlsKey,\n} from '../components/block-edit/context';\nimport { useSettings } from '../components';\nimport { useSettingsForBlockElement } from '../components/global-styles/hooks';\nimport { getValueFromObjectPath, setImmutably } from '../utils/object';\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Removed falsy values from nested object.\n *\n * @param {*} object\n * @return {*} Object cleaned from falsy values\n */\nexport const cleanEmptyObject = ( object ) => {\n\tif (\n\t\tobject === null ||\n\t\ttypeof object !== 'object' ||\n\t\tArray.isArray( object )\n\t) {\n\t\treturn object;\n\t}\n\n\tconst cleanedNestedObjects = Object.entries( object )\n\t\t.map( ( [ key, value ] ) => [ key, cleanEmptyObject( value ) ] )\n\t\t.filter( ( [ , value ] ) => value !== undefined );\n\treturn ! cleanedNestedObjects.length\n\t\t? undefined\n\t\t: Object.fromEntries( cleanedNestedObjects );\n};\n\nexport function transformStyles(\n\tactiveSupports,\n\tmigrationPaths,\n\tresult,\n\tsource,\n\tindex,\n\tresults\n) {\n\t// If there are no active supports return early.\n\tif (\n\t\tObject.values( activeSupports ?? {} ).every(\n\t\t\t( isActive ) => ! isActive\n\t\t)\n\t) {\n\t\treturn result;\n\t}\n\t// If the condition verifies we are probably in the presence of a wrapping transform\n\t// e.g: nesting paragraphs in a group or columns and in that case the styles should not be transformed.\n\tif ( results.length === 1 && result.innerBlocks.length === source.length ) {\n\t\treturn result;\n\t}\n\t// For cases where we have a transform from one block to multiple blocks\n\t// or multiple blocks to one block we apply the styles of the first source block\n\t// to the result(s).\n\tlet referenceBlockAttributes = source[ 0 ]?.attributes;\n\t// If we are in presence of transform between more than one block in the source\n\t// that has more than one block in the result\n\t// we apply the styles on source N to the result N,\n\t// if source N does not exists we do nothing.\n\tif ( results.length > 1 && source.length > 1 ) {\n\t\tif ( source[ index ] ) {\n\t\t\treferenceBlockAttributes = source[ index ]?.attributes;\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n\tlet returnBlock = result;\n\tObject.entries( activeSupports ).forEach( ( [ support, isActive ] ) => {\n\t\tif ( isActive ) {\n\t\t\tmigrationPaths[ support ].forEach( ( path ) => {\n\t\t\t\tconst styleValue = getValueFromObjectPath(\n\t\t\t\t\treferenceBlockAttributes,\n\t\t\t\t\tpath\n\t\t\t\t);\n\t\t\t\tif ( styleValue ) {\n\t\t\t\t\treturnBlock = {\n\t\t\t\t\t\t...returnBlock,\n\t\t\t\t\t\tattributes: setImmutably(\n\t\t\t\t\t\t\treturnBlock.attributes,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tstyleValue\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\treturn returnBlock;\n}\n\n/**\n * Check whether serialization of specific block support feature or set should\n * be skipped.\n *\n * @param {string|Object} blockNameOrType Block name or block type object.\n * @param {string} featureSet Name of block support feature set.\n * @param {string} feature Name of the individual feature to check.\n *\n * @return {boolean} Whether serialization should occur.\n */\nexport function shouldSkipSerialization(\n\tblockNameOrType,\n\tfeatureSet,\n\tfeature\n) {\n\tconst support = getBlockSupport( blockNameOrType, featureSet );\n\tconst skipSerialization = support?.__experimentalSkipSerialization;\n\n\tif ( Array.isArray( skipSerialization ) ) {\n\t\treturn skipSerialization.includes( feature );\n\t}\n\n\treturn skipSerialization;\n}\n\nexport function useStyleOverride( { id, css, assets, __unstableType } = {} ) {\n\tconst { setStyleOverride, deleteStyleOverride } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst fallbackId = useId();\n\tuseEffect( () => {\n\t\t// Unmount if there is CSS and assets are empty.\n\t\tif ( ! css && ! assets ) return;\n\t\tconst _id = id || fallbackId;\n\t\tsetStyleOverride( _id, {\n\t\t\tid,\n\t\t\tcss,\n\t\t\tassets,\n\t\t\t__unstableType,\n\t\t} );\n\t\treturn () => {\n\t\t\tdeleteStyleOverride( _id );\n\t\t};\n\t}, [\n\t\tid,\n\t\tcss,\n\t\tassets,\n\t\t__unstableType,\n\t\tfallbackId,\n\t\tsetStyleOverride,\n\t\tdeleteStyleOverride,\n\t] );\n}\n\n/**\n * Based on the block and its context, returns an object of all the block settings.\n * This object can be passed as a prop to all the Styles UI components\n * (TypographyPanel, DimensionsPanel...).\n *\n * @param {string} name Block name.\n * @param {*} parentLayout Parent layout.\n *\n * @return {Object} Settings object.\n */\nexport function useBlockSettings( name, parentLayout ) {\n\tconst [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tfontFamilies,\n\t\tuserFontSizes,\n\t\tthemeFontSizes,\n\t\tdefaultFontSizes,\n\t\tdefaultFontSizesEnabled,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\twritingMode,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tspacingSizes,\n\t\tunits,\n\t\tminHeight,\n\t\tlayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] = useSettings(\n\t\t'background.backgroundImage',\n\t\t'background.backgroundSize',\n\t\t'typography.fontFamilies',\n\t\t'typography.fontSizes.custom',\n\t\t'typography.fontSizes.theme',\n\t\t'typography.fontSizes.default',\n\t\t'typography.defaultFontSizes',\n\t\t'typography.customFontSize',\n\t\t'typography.fontStyle',\n\t\t'typography.fontWeight',\n\t\t'typography.lineHeight',\n\t\t'typography.textColumns',\n\t\t'typography.textDecoration',\n\t\t'typography.writingMode',\n\t\t'typography.textTransform',\n\t\t'typography.letterSpacing',\n\t\t'spacing.padding',\n\t\t'spacing.margin',\n\t\t'spacing.blockGap',\n\t\t'spacing.spacingSizes',\n\t\t'spacing.units',\n\t\t'dimensions.minHeight',\n\t\t'layout',\n\t\t'border.color',\n\t\t'border.radius',\n\t\t'border.style',\n\t\t'border.width',\n\t\t'color.custom',\n\t\t'color.palette.custom',\n\t\t'color.customDuotone',\n\t\t'color.palette.theme',\n\t\t'color.palette.default',\n\t\t'color.defaultPalette',\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default',\n\t\t'color.gradients.custom',\n\t\t'color.gradients.theme',\n\t\t'color.gradients.default',\n\t\t'color.defaultGradients',\n\t\t'color.customGradient',\n\t\t'color.background',\n\t\t'color.link',\n\t\t'color.text',\n\t\t'color.heading',\n\t\t'color.button',\n\t\t'shadow'\n\t);\n\n\tconst rawSettings = useMemo( () => {\n\t\treturn {\n\t\t\tbackground: {\n\t\t\t\tbackgroundImage,\n\t\t\t\tbackgroundSize,\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\tpalette: {\n\t\t\t\t\tcustom: customColors,\n\t\t\t\t\ttheme: themeColors,\n\t\t\t\t\tdefault: defaultColors,\n\t\t\t\t},\n\t\t\t\tgradients: {\n\t\t\t\t\tcustom: userGradientPalette,\n\t\t\t\t\ttheme: themeGradientPalette,\n\t\t\t\t\tdefault: defaultGradientPalette,\n\t\t\t\t},\n\t\t\t\tduotone: {\n\t\t\t\t\tcustom: userDuotonePalette,\n\t\t\t\t\ttheme: themeDuotonePalette,\n\t\t\t\t\tdefault: defaultDuotonePalette,\n\t\t\t\t},\n\t\t\t\tdefaultGradients,\n\t\t\t\tdefaultPalette,\n\t\t\t\tdefaultDuotone,\n\t\t\t\tcustom: customColorsEnabled,\n\t\t\t\tcustomGradient: areCustomGradientsEnabled,\n\t\t\t\tcustomDuotone,\n\t\t\t\tbackground: isBackgroundEnabled,\n\t\t\t\tlink: isLinkEnabled,\n\t\t\t\theading: isHeadingEnabled,\n\t\t\t\tbutton: isButtonEnabled,\n\t\t\t\ttext: isTextEnabled,\n\t\t\t},\n\t\t\ttypography: {\n\t\t\t\tfontFamilies: {\n\t\t\t\t\tcustom: fontFamilies,\n\t\t\t\t},\n\t\t\t\tfontSizes: {\n\t\t\t\t\tcustom: userFontSizes,\n\t\t\t\t\ttheme: themeFontSizes,\n\t\t\t\t\tdefault: defaultFontSizes,\n\t\t\t\t},\n\t\t\t\tcustomFontSize,\n\t\t\t\tdefaultFontSizes: defaultFontSizesEnabled,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tlineHeight,\n\t\t\t\ttextColumns,\n\t\t\t\ttextDecoration,\n\t\t\t\ttextTransform,\n\t\t\t\tletterSpacing,\n\t\t\t\twritingMode,\n\t\t\t},\n\t\t\tspacing: {\n\t\t\t\tspacingSizes: {\n\t\t\t\t\tcustom: spacingSizes,\n\t\t\t\t},\n\t\t\t\tpadding,\n\t\t\t\tmargin,\n\t\t\t\tblockGap,\n\t\t\t\tunits,\n\t\t\t},\n\t\t\tborder: {\n\t\t\t\tcolor: borderColor,\n\t\t\t\tradius: borderRadius,\n\t\t\t\tstyle: borderStyle,\n\t\t\t\twidth: borderWidth,\n\t\t\t},\n\t\t\tdimensions: {\n\t\t\t\tminHeight,\n\t\t\t},\n\t\t\tlayout,\n\t\t\tparentLayout,\n\t\t\tshadow,\n\t\t};\n\t}, [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tfontFamilies,\n\t\tuserFontSizes,\n\t\tthemeFontSizes,\n\t\tdefaultFontSizes,\n\t\tdefaultFontSizesEnabled,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\twritingMode,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tspacingSizes,\n\t\tunits,\n\t\tminHeight,\n\t\tlayout,\n\t\tparentLayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] );\n\n\treturn useSettingsForBlockElement( rawSettings, name );\n}\n\nexport function createBlockEditFilter( features ) {\n\t// We don't want block controls to re-render when typing inside a block.\n\t// `memo` will prevent re-renders unless props change, so only pass the\n\t// needed props and not the whole attributes object.\n\tfeatures = features.map( ( settings ) => {\n\t\treturn { ...settings, Edit: memo( settings.edit ) };\n\t} );\n\tconst withBlockEditHooks = createHigherOrderComponent(\n\t\t( OriginalBlockEdit ) => ( props ) => {\n\t\t\tconst context = useBlockEditContext();\n\t\t\t// CAUTION: code added before this line will be executed for all\n\t\t\t// blocks, not just those that support the feature! Code added\n\t\t\t// above this line should be carefully evaluated for its impact on\n\t\t\t// performance.\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tEdit,\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tshareWithChildBlocks,\n\t\t\t\t\t} = feature;\n\t\t\t\t\tconst shouldDisplayControls =\n\t\t\t\t\t\tcontext[ mayDisplayControlsKey ] ||\n\t\t\t\t\t\t( context[ mayDisplayParentControlsKey ] &&\n\t\t\t\t\t\t\tshareWithChildBlocks );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! shouldDisplayControls ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Edit\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\tisSelected={ props.isSelected }\n\t\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\t\tsetAttributes={ props.setAttributes }\n\t\t\t\t\t\t\t__unstableParentLayout={\n\t\t\t\t\t\t\t\tprops.__unstableParentLayout\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<OriginalBlockEdit key=\"edit\" { ...props } />,\n\t\t\t];\n\t\t},\n\t\t'withBlockEditHooks'\n\t);\n\taddFilter( 'editor.BlockEdit', 'core/editor/hooks', withBlockEditHooks );\n}\n\nfunction BlockProps( { index, useBlockProps, setAllWrapperProps, ...props } ) {\n\tconst wrapperProps = useBlockProps( props );\n\tconst setWrapperProps = ( next ) =>\n\t\tsetAllWrapperProps( ( prev ) => {\n\t\t\tconst nextAll = [ ...prev ];\n\t\t\tnextAll[ index ] = next;\n\t\t\treturn nextAll;\n\t\t} );\n\t// Setting state after every render is fine because this component is\n\t// pure and will only re-render when needed props change.\n\tuseEffect( () => {\n\t\t// We could shallow compare the props, but since this component only\n\t\t// changes when needed attributes change, the benefit is probably small.\n\t\tsetWrapperProps( wrapperProps );\n\t\treturn () => {\n\t\t\tsetWrapperProps( undefined );\n\t\t};\n\t} );\n\treturn null;\n}\n\nconst BlockPropsPure = memo( BlockProps );\n\nexport function createBlockListBlockFilter( features ) {\n\tconst withBlockListBlockHooks = createHigherOrderComponent(\n\t\t( BlockListBlock ) => ( props ) => {\n\t\t\tconst [ allWrapperProps, setAllWrapperProps ] = useState(\n\t\t\t\tArray( features.length ).fill( undefined )\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tuseBlockProps,\n\t\t\t\t\t} = feature;\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t\t\t// set.\n\t\t\t\t\t\t! Object.keys( neededProps ).length ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<BlockPropsPure\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tindex={ i }\n\t\t\t\t\t\t\tuseBlockProps={ useBlockProps }\n\t\t\t\t\t\t\t// This component is pure, so we must pass a stable\n\t\t\t\t\t\t\t// function reference.\n\t\t\t\t\t\t\tsetAllWrapperProps={ setAllWrapperProps }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<BlockListBlock\n\t\t\t\t\tkey=\"edit\"\n\t\t\t\t\t{ ...props }\n\t\t\t\t\twrapperProps={ allWrapperProps\n\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t.reduce( ( acc, wrapperProps ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t\t\t...wrapperProps,\n\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\tacc.className,\n\t\t\t\t\t\t\t\t\twrapperProps.className\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t...acc.style,\n\t\t\t\t\t\t\t\t\t...wrapperProps.style,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}, props.wrapperProps || {} ) }\n\t\t\t\t/>,\n\t\t\t];\n\t\t},\n\t\t'withBlockListBlockHooks'\n\t);\n\taddFilter(\n\t\t'editor.BlockListBlock',\n\t\t'core/editor/hooks',\n\t\twithBlockListBlockHooks\n\t);\n}\n\nexport function createBlockSaveFilter( features ) {\n\tfunction extraPropsFromHooks( props, name, attributes ) {\n\t\treturn features.reduce( ( accu, feature ) => {\n\t\t\tconst { hasSupport, attributeKeys = [], addSaveProps } = feature;\n\n\t\t\tconst neededAttributes = {};\n\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\tif ( attributes[ key ] ) {\n\t\t\t\t\tneededAttributes[ key ] = attributes[ key ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t// set.\n\t\t\t\t! Object.keys( neededAttributes ).length ||\n\t\t\t\t! hasSupport( name )\n\t\t\t) {\n\t\t\t\treturn accu;\n\t\t\t}\n\n\t\t\treturn addSaveProps( accu, name, neededAttributes );\n\t\t}, props );\n\t}\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\textraPropsFromHooks,\n\t\t0\n\t);\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\t( props ) => {\n\t\t\t// Previously we had a filter deleting the className if it was an empty\n\t\t\t// string. That filter is no longer running, so now we need to delete it\n\t\t\t// here.\n\t\t\tif ( props.hasOwnProperty( 'className' ) && ! props.className ) {\n\t\t\t\tdelete props.className;\n\t\t\t}\n\n\t\t\treturn props;\n\t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OgG,QAAQ,CAACmC,MAAM,CAAE,CAAEK,IAAI,EAAE/H,OAAO,KAAM;MAC5C,MAAM;QAAEgG,UAAU;QAAEC,aAAa,GAAG,EAAE;QAAE+B;MAAa,CAAC,GAAGhI,OAAO;MAEhE,MAAMiI,gBAAgB,GAAG,CAAC,CAAC;MAC3B,KAAM,MAAM5J,GAAG,IAAI4H,aAAa,EAAG;QAClC,IAAK1G,UAAU,CAAElB,GAAG,CAAE,EAAG;UACxB4J,gBAAgB,CAAE5J,GAAG,CAAE,GAAGkB,UAAU,CAAElB,GAAG,CAAE;QAC5C;MACD;MAEA;MACC;MACA;MACA,CAAEH,MAAM,CAACsJ,IAAI,CAAES,gBAAiB,CAAC,CAACxJ,MAAM,IACxC,CAAEuH,UAAU,CAAElF,IAAK,CAAC,EACnB;QACD,OAAOiH,IAAI;MACZ;MAEA,OAAOC,YAAY,CAAED,IAAI,EAAEjH,IAAI,EAAEmH,gBAAiB,CAAC;IACpD,CAAC,EAAEpC,KAAM,CAAC;EACX;EACA5I,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACnB6K,mBAAmB,EACnB,CACD,CAAC;EACD7K,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACjB4I,KAAK,IAAM;IACZ;IACA;IACA;IACA,IAAKA,KAAK,CAACqC,cAAc,CAAE,WAAY,CAAC,IAAI,CAAErC,KAAK,CAAC+B,SAAS,EAAG;MAC/D,OAAO/B,KAAK,CAAC+B,SAAS;IACvB;IAEA,OAAO/B,KAAK;EACb,CACD,CAAC;AACF"}
@@ -2,7 +2,7 @@
2
2
  * Internal dependencies
3
3
  */
4
4
  import './hooks';
5
- export { getBorderClassesAndStyles as __experimentalGetBorderClassesAndStyles, useBorderProps as __experimentalUseBorderProps, getColorClassesAndStyles as __experimentalGetColorClassesAndStyles, getTypographyClassesAndStyles, useColorProps as __experimentalUseColorProps, useCustomSides as __experimentalUseCustomSides, getSpacingClassesAndStyles as __experimentalGetSpacingClassesAndStyles, getGapCSSValue as __experimentalGetGapCSSValue, useCachedTruthy } from './hooks';
5
+ export { getBorderClassesAndStyles as __experimentalGetBorderClassesAndStyles, useBorderProps as __experimentalUseBorderProps, getColorClassesAndStyles as __experimentalGetColorClassesAndStyles, getTypographyClassesAndStyles, useColorProps as __experimentalUseColorProps, useCustomSides as __experimentalUseCustomSides, getSpacingClassesAndStyles as __experimentalGetSpacingClassesAndStyles, getGapCSSValue as __experimentalGetGapCSSValue, getShadowClassesAndStyles as __experimentalGetShadowClassesAndStyles, useShadowProps as __experimentalUseShadowProps, useCachedTruthy } from './hooks';
6
6
  export * from './components';
7
7
  export * from './elements';
8
8
  export * from './utils';
@@ -1 +1 @@
1
- {"version":3,"names":["getBorderClassesAndStyles","__experimentalGetBorderClassesAndStyles","useBorderProps","__experimentalUseBorderProps","getColorClassesAndStyles","__experimentalGetColorClassesAndStyles","getTypographyClassesAndStyles","useColorProps","__experimentalUseColorProps","useCustomSides","__experimentalUseCustomSides","getSpacingClassesAndStyles","__experimentalGetSpacingClassesAndStyles","getGapCSSValue","__experimentalGetGapCSSValue","useCachedTruthy","storeConfig","store","SETTINGS_DEFAULTS","privateApis"],"sources":["@wordpress/block-editor/src/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport './hooks';\nexport {\n\tgetBorderClassesAndStyles as __experimentalGetBorderClassesAndStyles,\n\tuseBorderProps as __experimentalUseBorderProps,\n\tgetColorClassesAndStyles as __experimentalGetColorClassesAndStyles,\n\tgetTypographyClassesAndStyles,\n\tuseColorProps as __experimentalUseColorProps,\n\tuseCustomSides as __experimentalUseCustomSides,\n\tgetSpacingClassesAndStyles as __experimentalGetSpacingClassesAndStyles,\n\tgetGapCSSValue as __experimentalGetGapCSSValue,\n\tuseCachedTruthy,\n} from './hooks';\nexport * from './components';\nexport * from './elements';\nexport * from './utils';\nexport { storeConfig, store } from './store';\nexport { SETTINGS_DEFAULTS } from './store/defaults';\nexport { privateApis } from './private-apis';\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,SAAS;AAChB,SACCA,yBAAyB,IAAIC,uCAAuC,EACpEC,cAAc,IAAIC,4BAA4B,EAC9CC,wBAAwB,IAAIC,sCAAsC,EAClEC,6BAA6B,EAC7BC,aAAa,IAAIC,2BAA2B,EAC5CC,cAAc,IAAIC,4BAA4B,EAC9CC,0BAA0B,IAAIC,wCAAwC,EACtEC,cAAc,IAAIC,4BAA4B,EAC9CC,eAAe,QACT,SAAS;AAChB,cAAc,cAAc;AAC5B,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,SAASC,WAAW,EAAEC,KAAK,QAAQ,SAAS;AAC5C,SAASC,iBAAiB,QAAQ,kBAAkB;AACpD,SAASC,WAAW,QAAQ,gBAAgB"}
1
+ {"version":3,"names":["getBorderClassesAndStyles","__experimentalGetBorderClassesAndStyles","useBorderProps","__experimentalUseBorderProps","getColorClassesAndStyles","__experimentalGetColorClassesAndStyles","getTypographyClassesAndStyles","useColorProps","__experimentalUseColorProps","useCustomSides","__experimentalUseCustomSides","getSpacingClassesAndStyles","__experimentalGetSpacingClassesAndStyles","getGapCSSValue","__experimentalGetGapCSSValue","getShadowClassesAndStyles","__experimentalGetShadowClassesAndStyles","useShadowProps","__experimentalUseShadowProps","useCachedTruthy","storeConfig","store","SETTINGS_DEFAULTS","privateApis"],"sources":["@wordpress/block-editor/src/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport './hooks';\nexport {\n\tgetBorderClassesAndStyles as __experimentalGetBorderClassesAndStyles,\n\tuseBorderProps as __experimentalUseBorderProps,\n\tgetColorClassesAndStyles as __experimentalGetColorClassesAndStyles,\n\tgetTypographyClassesAndStyles,\n\tuseColorProps as __experimentalUseColorProps,\n\tuseCustomSides as __experimentalUseCustomSides,\n\tgetSpacingClassesAndStyles as __experimentalGetSpacingClassesAndStyles,\n\tgetGapCSSValue as __experimentalGetGapCSSValue,\n\tgetShadowClassesAndStyles as __experimentalGetShadowClassesAndStyles,\n\tuseShadowProps as __experimentalUseShadowProps,\n\tuseCachedTruthy,\n} from './hooks';\nexport * from './components';\nexport * from './elements';\nexport * from './utils';\nexport { storeConfig, store } from './store';\nexport { SETTINGS_DEFAULTS } from './store/defaults';\nexport { privateApis } from './private-apis';\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,SAAS;AAChB,SACCA,yBAAyB,IAAIC,uCAAuC,EACpEC,cAAc,IAAIC,4BAA4B,EAC9CC,wBAAwB,IAAIC,sCAAsC,EAClEC,6BAA6B,EAC7BC,aAAa,IAAIC,2BAA2B,EAC5CC,cAAc,IAAIC,4BAA4B,EAC9CC,0BAA0B,IAAIC,wCAAwC,EACtEC,cAAc,IAAIC,4BAA4B,EAC9CC,yBAAyB,IAAIC,uCAAuC,EACpEC,cAAc,IAAIC,4BAA4B,EAC9CC,eAAe,QACT,SAAS;AAChB,cAAc,cAAc;AAC5B,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,SAASC,WAAW,EAAEC,KAAK,QAAQ,SAAS;AAC5C,SAASC,iBAAiB,QAAQ,kBAAkB;AACpD,SAASC,WAAW,QAAQ,gBAAgB"}
@@ -550,14 +550,16 @@ export const insertBlocks = (blocks, index, rootClientId, updateSelection = true
550
550
  export function showInsertionPoint(rootClientId, index, __unstableOptions = {}) {
551
551
  const {
552
552
  __unstableWithInserter,
553
- operation
553
+ operation,
554
+ nearestSide
554
555
  } = __unstableOptions;
555
556
  return {
556
557
  type: 'SHOW_INSERTION_POINT',
557
558
  rootClientId,
558
559
  index,
559
560
  __unstableWithInserter,
560
- operation
561
+ operation,
562
+ nearestSide
561
563
  };
562
564
  }
563
565
  /**
@@ -1424,18 +1426,20 @@ export function setBlockVisibility(updates) {
1424
1426
  }
1425
1427
 
1426
1428
  /**
1427
- * Action that sets whether a block is being temporaritly edited as blocks.
1429
+ * Action that sets whether a block is being temporarily edited as blocks.
1428
1430
  *
1429
1431
  * DO-NOT-USE in production.
1430
1432
  * This action is created for internal/experimental only usage and may be
1431
1433
  * removed anytime without any warning, causing breakage on any plugin or theme invoking it.
1432
1434
  *
1433
- * @param {?string} temporarilyEditingAsBlocks The block's clientId being temporaritly edited as blocks.
1435
+ * @param {?string} temporarilyEditingAsBlocks The block's clientId being temporarily edited as blocks.
1436
+ * @param {?string} focusModeToRevert The focus mode to revert after temporarily edit as blocks finishes.
1434
1437
  */
1435
- export function __unstableSetTemporarilyEditingAsBlocks(temporarilyEditingAsBlocks) {
1438
+ export function __unstableSetTemporarilyEditingAsBlocks(temporarilyEditingAsBlocks, focusModeToRevert) {
1436
1439
  return {
1437
1440
  type: 'SET_TEMPORARILY_EDITING_AS_BLOCKS',
1438
- temporarilyEditingAsBlocks
1441
+ temporarilyEditingAsBlocks,
1442
+ focusModeToRevert
1439
1443
  };
1440
1444
  }
1441
1445