@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
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_blocks","require","_compose","_data","_hooks","_store","_context","_lockUnlock","BLOCK_BINDINGS_ALLOWED_BLOCKS","createEditFunctionWithBindingsAttribute","createHigherOrderComponent","BlockEdit","props","clientId","name","blockName","useBlockEditContext","getBlockBindingsSource","unlock","useSelect","blockEditorStore","getBlockAttributes","updateBlockAttributes","updatedAttributes","metadata","bindings","Object","entries","forEach","attributeName","settings","source","placeholder","useValue","metaValue","useSource","attributes","htmlAttribute","getBlockType","attribute","registry","useRegistry","_react","createElement","Fragment","key","setAttributes","newAttributes","blockId","batch","shimAttributeSource","edit","addFilter","contextItems","usesContextArray","usesContext","oldUsesContextArray","Set","item","has","push"],"sources":["@wordpress/block-editor/src/hooks/use-bindings-attributes.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { addFilter } from '@wordpress/hooks';\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { useBlockEditContext } from '../components/block-edit/context';\nimport { unlock } from '../lock-unlock';\n\n/** @typedef {import('@wordpress/compose').WPHigherOrderComponent} WPHigherOrderComponent */\n/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */\n\n/**\n * Given a binding of block attributes, returns a higher order component that\n * overrides its `attributes` and `setAttributes` props to sync any changes needed.\n *\n * @return {WPHigherOrderComponent} Higher-order component.\n */\n\nconst BLOCK_BINDINGS_ALLOWED_BLOCKS = {\n\t'core/paragraph': [ 'content' ],\n\t'core/heading': [ 'content' ],\n\t'core/image': [ 'url', 'title', 'alt' ],\n\t'core/button': [ 'url', 'text', 'linkTarget' ],\n};\n\nconst createEditFunctionWithBindingsAttribute = () =>\n\tcreateHigherOrderComponent(\n\t\t( BlockEdit ) => ( props ) => {\n\t\t\tconst { clientId, name: blockName } = useBlockEditContext();\n\t\t\tconst { getBlockBindingsSource } = unlock(\n\t\t\t\tuseSelect( blockEditorStore )\n\t\t\t);\n\t\t\tconst { getBlockAttributes, updateBlockAttributes } =\n\t\t\t\tuseSelect( blockEditorStore );\n\n\t\t\tconst updatedAttributes = getBlockAttributes( clientId );\n\t\t\tif ( updatedAttributes?.metadata?.bindings ) {\n\t\t\t\tObject.entries( updatedAttributes.metadata.bindings ).forEach(\n\t\t\t\t\t( [ attributeName, settings ] ) => {\n\t\t\t\t\t\tconst source = getBlockBindingsSource(\n\t\t\t\t\t\t\tsettings.source.name\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ( source ) {\n\t\t\t\t\t\t\t// Second argument (`updateMetaValue`) will be used to update the value in the future.\n\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\tplaceholder,\n\t\t\t\t\t\t\t\tuseValue: [ metaValue = null ] = [],\n\t\t\t\t\t\t\t} = source.useSource(\n\t\t\t\t\t\t\t\tprops,\n\t\t\t\t\t\t\t\tsettings.source.attributes\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif ( placeholder && ! metaValue ) {\n\t\t\t\t\t\t\t\t// If the attribute is `src` or `href`, a placeholder can't be used because it is not a valid url.\n\t\t\t\t\t\t\t\t// Adding this workaround until attributes and metadata fields types are improved and include `url`.\n\t\t\t\t\t\t\t\tconst htmlAttribute =\n\t\t\t\t\t\t\t\t\tgetBlockType( blockName ).attributes[\n\t\t\t\t\t\t\t\t\t\tattributeName\n\t\t\t\t\t\t\t\t\t].attribute;\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\thtmlAttribute === 'src' ||\n\t\t\t\t\t\t\t\t\thtmlAttribute === 'href'\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tupdatedAttributes[ attributeName ] = null;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tupdatedAttributes[ attributeName ] =\n\t\t\t\t\t\t\t\t\t\tplaceholder;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( metaValue ) {\n\t\t\t\t\t\t\t\tupdatedAttributes[ attributeName ] = metaValue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst registry = useRegistry();\n\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<BlockEdit\n\t\t\t\t\t\tkey=\"edit\"\n\t\t\t\t\t\tattributes={ updatedAttributes }\n\t\t\t\t\t\tsetAttributes={ ( newAttributes, blockId ) =>\n\t\t\t\t\t\t\tregistry.batch( () =>\n\t\t\t\t\t\t\t\tupdateBlockAttributes( blockId, newAttributes )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t);\n\t\t},\n\t\t'useBoundAttributes'\n\t);\n\n/**\n * Filters a registered block's settings to enhance a block's `edit` component\n * to upgrade bound attributes.\n *\n * @param {WPBlockSettings} settings Registered block settings.\n *\n * @return {WPBlockSettings} Filtered block settings.\n */\nfunction shimAttributeSource( settings ) {\n\tif ( ! ( settings.name in BLOCK_BINDINGS_ALLOWED_BLOCKS ) ) {\n\t\treturn settings;\n\t}\n\tsettings.edit = createEditFunctionWithBindingsAttribute()( settings.edit );\n\n\treturn settings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/editor/custom-sources-backwards-compatibility/shim-attribute-source',\n\tshimAttributeSource\n);\n\n// Add the context to all blocks.\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/block-bindings-ui',\n\t( settings, name ) => {\n\t\tif ( ! ( name in BLOCK_BINDINGS_ALLOWED_BLOCKS ) ) {\n\t\t\treturn settings;\n\t\t}\n\t\tconst contextItems = [ 'postId', 'postType', 'queryId' ];\n\t\tconst usesContextArray = settings.usesContext;\n\t\tconst oldUsesContextArray = new Set( usesContextArray );\n\t\tcontextItems.forEach( ( item ) => {\n\t\t\tif ( ! oldUsesContextArray.has( item ) ) {\n\t\t\t\tusesContextArray.push( item );\n\t\t\t}\n\t\t} );\n\t\tsettings.usesContext = usesContextArray;\n\t\treturn settings;\n\t}\n);\n"],"mappings":";;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAIA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAZA;AACA;AACA;;AAKA;AACA;AACA;;AAKA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMO,6BAA6B,GAAG;EACrC,gBAAgB,EAAE,CAAE,SAAS,CAAE;EAC/B,cAAc,EAAE,CAAE,SAAS,CAAE;EAC7B,YAAY,EAAE,CAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAE;EACvC,aAAa,EAAE,CAAE,KAAK,EAAE,MAAM,EAAE,YAAY;AAC7C,CAAC;AAED,MAAMC,uCAAuC,GAAGA,CAAA,KAC/C,IAAAC,mCAA0B,EACvBC,SAAS,IAAQC,KAAK,IAAM;EAC7B,MAAM;IAAEC,QAAQ;IAAEC,IAAI,EAAEC;EAAU,CAAC,GAAG,IAAAC,4BAAmB,EAAC,CAAC;EAC3D,MAAM;IAAEC;EAAuB,CAAC,GAAG,IAAAC,kBAAM,EACxC,IAAAC,eAA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BAAgB;EACvC,OAAOxB,QAAQ;AAChB,CACD,CAAC"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getShadowClassesAndStyles = getShadowClassesAndStyles;
7
+ exports.useShadowProps = useShadowProps;
8
+ var _style = require("./style");
9
+ /**
10
+ * Internal dependencies
11
+ */
12
+
13
+ // This utility is intended to assist where the serialization of the shadow
14
+ // block support is being skipped for a block but the shadow related CSS classes
15
+ // & styles still need to be generated so they can be applied to inner elements.
16
+
17
+ /**
18
+ * Provides the CSS class names and inline styles for a block's shadow support
19
+ * attributes.
20
+ *
21
+ * @param {Object} attributes Block attributes.
22
+ * @return {Object} Shadow block support derived CSS classes & styles.
23
+ */
24
+ function getShadowClassesAndStyles(attributes) {
25
+ const shadow = attributes.style?.shadow || '';
26
+ return {
27
+ className: undefined,
28
+ style: (0, _style.getInlineStyles)({
29
+ shadow
30
+ })
31
+ };
32
+ }
33
+
34
+ /**
35
+ * Derives the shadow related props for a block from its shadow block support
36
+ * attributes.
37
+ *
38
+ * @param {Object} attributes Block attributes.
39
+ *
40
+ * @return {Object} ClassName & style props from shadow block support.
41
+ */
42
+ function useShadowProps(attributes) {
43
+ const shadowProps = getShadowClassesAndStyles(attributes);
44
+ return shadowProps;
45
+ }
46
+ //# sourceMappingURL=use-shadow-props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_style","require","getShadowClassesAndStyles","attributes","shadow","style","className","undefined","getInlineStyles","useShadowProps","shadowProps"],"sources":["@wordpress/block-editor/src/hooks/use-shadow-props.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\n\n// This utility is intended to assist where the serialization of the shadow\n// block support is being skipped for a block but the shadow related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's shadow support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n * @return {Object} Shadow block support derived CSS classes & styles.\n */\nexport function getShadowClassesAndStyles( attributes ) {\n\tconst shadow = attributes.style?.shadow || '';\n\n\treturn {\n\t\tclassName: undefined,\n\t\tstyle: getInlineStyles( { shadow } ),\n\t};\n}\n\n/**\n * Derives the shadow related props for a block from its shadow block support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from shadow block support.\n */\nexport function useShadowProps( attributes ) {\n\tconst shadowProps = getShadowClassesAndStyles( attributes );\n\treturn shadowProps;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,yBAAyBA,CAAEC,UAAU,EAAG;EACvD,MAAMC,MAAM,GAAGD,UAAU,CAACE,KAAK,EAAED,MAAM,IAAI,EAAE;EAE7C,OAAO;IACNE,SAAS,EAAEC,SAAS;IACpBF,KAAK,EAAE,IAAAG,sBAAe,EAAE;MAAEJ;IAAO,CAAE;EACpC,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,cAAcA,CAAEN,UAAU,EAAG;EAC5C,MAAMO,WAAW,GAAGR,yBAAyB,CAAEC,UAAW,CAAC;EAC3D,OAAOO,WAAW;AACnB"}
@@ -149,7 +149,7 @@ function useStyleOverride({
149
149
  * @return {Object} Settings object.
150
150
  */
151
151
  function useBlockSettings(name, parentLayout) {
152
- const [backgroundImage, backgroundSize, fontFamilies, fontSizes, 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] = (0, _components.useSettings)('background.backgroundImage', 'background.backgroundSize', 'typography.fontFamilies', 'typography.fontSizes', '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');
152
+ 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] = (0, _components.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');
153
153
  const rawSettings = (0, _element.useMemo)(() => {
154
154
  return {
155
155
  background: {
@@ -189,9 +189,12 @@ function useBlockSettings(name, parentLayout) {
189
189
  custom: fontFamilies
190
190
  },
191
191
  fontSizes: {
192
- custom: fontSizes
192
+ custom: userFontSizes,
193
+ theme: themeFontSizes,
194
+ default: defaultFontSizes
193
195
  },
194
196
  customFontSize,
197
+ defaultFontSizes: defaultFontSizesEnabled,
195
198
  fontStyle,
196
199
  fontWeight,
197
200
  lineHeight,
@@ -220,19 +223,20 @@ function useBlockSettings(name, parentLayout) {
220
223
  minHeight
221
224
  },
222
225
  layout,
223
- parentLayout
226
+ parentLayout,
227
+ shadow
224
228
  };
225
- }, [backgroundImage, backgroundSize, fontFamilies, fontSizes, 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]);
229
+ }, [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]);
226
230
  return (0, _hooks2.useSettingsForBlockElement)(rawSettings, name);
227
231
  }
228
232
  function createBlockEditFilter(features) {
229
233
  // We don't want block controls to re-render when typing inside a block.
230
- // `pure` will prevent re-renders unless props change, so only pass the
234
+ // `memo` will prevent re-renders unless props change, so only pass the
231
235
  // needed props and not the whole attributes object.
232
236
  features = features.map(settings => {
233
237
  return {
234
238
  ...settings,
235
- Edit: (0, _compose.pure)(settings.edit)
239
+ Edit: (0, _element.memo)(settings.edit)
236
240
  };
237
241
  });
238
242
  const withBlockEditHooks = (0, _compose.createHigherOrderComponent)(OriginalBlockEdit => props => {
@@ -304,7 +308,7 @@ function BlockProps({
304
308
  });
305
309
  return null;
306
310
  }
307
- const BlockPropsPure = (0, _compose.pure)(BlockProps);
311
+ const BlockPropsPure = (0, _element.memo)(BlockProps);
308
312
  function createBlockListBlockFilter(features) {
309
313
  const withBlockListBlockHooks = (0, _compose.createHigherOrderComponent)(BlockListBlock => props => {
310
314
  const [allWrapperProps, setAllWrapperProps] = (0, _element.useState)(Array(features.length).fill(undefined));
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_element","_data","_compose","_hooks","_context","_components","_hooks2","_object","_store","_lockUnlock","_classnames","_interopRequireDefault","cleanEmptyObject","object","Array","isArray","cleanedNestedObjects","Object","entries","map","key","value","filter","undefined","length","fromEntries","exports","transformStyles","activeSupports","migrationPaths","result","source","index","results","values","every","isActive","innerBlocks","referenceBlockAttributes","attributes","returnBlock","forEach","support","path","styleValue","getValueFromObjectPath","setImmutably","shouldSkipSerialization","blockNameOrType","featureSet","feature","getBlockSupport","skipSerialization","__experimentalSkipSerialization","includes","useStyleOverride","id","css","assets","__unstableType","setStyleOverride","deleteStyleOverride","unlock","useDispatch","blockEditorStore","fallbackId","useId","useEffect","_id","useBlockSettings","name","parentLayout","backgroundImage","backgroundSize","fontFamilies","fontSizes","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","rawSettings","useMemo","background","color","palette","custom","theme","default","gradients","duotone","customGradient","link","heading","button","text","typography","spacing","border","radius","style","width","dimensions","useSettingsForBlockElement","createBlockEditFilter","features","settings","Edit","pure","edit","withBlockEditHooks","createHigherOrderComponent","OriginalBlockEdit","props","context","useBlockEditContext","i","hasSupport","attributeKeys","shareWithChildBlocks","shouldDisplayControls","mayDisplayControlsKey","mayDisplayParentControlsKey","neededProps","_react","createElement","isSelected","clientId","setAttributes","__unstableParentLayout","addFilter","BlockProps","useBlockProps","setAllWrapperProps","wrapperProps","setWrapperProps","next","prev","nextAll","BlockPropsPure","createBlockListBlockFilter","withBlockListBlockHooks","BlockListBlock","allWrapperProps","useState","fill","keys","Boolean","reduce","acc","className","classnames","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\tfontSizes,\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',\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: fontSizes,\n\t\t\t\t},\n\t\t\t\tcustomFontSize,\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\tfontSizes,\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":";;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAKA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAIA,IAAAW,WAAA,GAAAC,sBAAA,CAAAZ,OAAA;AAzBA;AACA;AACA;;AAOA;AACA;AACA;;AAWA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMa,gBAAgB,GAAKC,MAAM,IAAM;EAC7C,IACCA,MAAM,KAAK,IAAI,IACf,OAAOA,MAAM,KAAK,QAAQ,IAC1BC,KAAK,CAACC,OAAO,CAAEF,MAAO,CAAC,EACtB;IACD,OAAOA,MAAM;EACd;EAEA,MAAMG,oBAAoB,GAAGC,MAAM,CAACC,OAAO,CAAEL,MAAO,CAAC,CACnDM,GAAG,CAAE,CAAE,CAAEC,GAAG,EAAEC,KAAK,CAAE,KAAM,CAAED,GAAG,EAAER,gBAAgB,CAAES,KAAM,CAAC,CAAG,CAAC,CAC/DC,MAA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vB,mBAAmB,EACnBW,uBACD,CAAC;AACF;AAEO,SAASW,qBAAqBA,CAAE/C,QAAQ,EAAG;EACjD,SAASgD,mBAAmBA,CAAExC,KAAK,EAAE/E,IAAI,EAAE/B,UAAU,EAAG;IACvD,OAAOsG,QAAQ,CAAC2C,MAAM,CAAE,CAAEM,IAAI,EAAE5I,OAAO,KAAM;MAC5C,MAAM;QAAEuG,UAAU;QAAEC,aAAa,GAAG,EAAE;QAAEqC;MAAa,CAAC,GAAG7I,OAAO;MAEhE,MAAM8I,gBAAgB,GAAG,CAAC,CAAC;MAC3B,KAAM,MAAM5K,GAAG,IAAIsI,aAAa,EAAG;QAClC,IAAKnH,UAAU,CAAEnB,GAAG,CAAE,EAAG;UACxB4K,gBAAgB,CAAE5K,GAAG,CAAE,GAAGmB,UAAU,CAAEnB,GAAG,CAAE;QAC5C;MACD;MAEA;MACC;MACA;MACA,CAAEH,MAAM,CAACqK,IAAI,CAAEU,gBAAiB,CAAC,CAACxK,MAAM,IACxC,CAAEiI,UAAU,CAAEnF,IAAK,CAAC,EACnB;QACD,OAAOwH,IAAI;MACZ;MAEA,OAAOC,YAAY,CAAED,IAAI,EAAExH,IAAI,EAAE0H,gBAAiB,CAAC;IACpD,CAAC,EAAE3C,KAAM,CAAC;EACX;EACA,IAAAiB,gBAAS,EACR,kCAAkC,EAClC,mBAAmB,EACnBuB,mBAAmB,EACnB,CACD,CAAC;EACD,IAAAvB,gBAAS,EACR,kCAAkC,EAClC,mBAAmB,EACjBjB,KAAK,IAAM;IACZ;IACA;IACA;IACA,IAAKA,KAAK,CAAC4C,cAAc,CAAE,WAAY,CAAC,IAAI,CAAE5C,KAAK,CAACqC,SAAS,EAAG;MAC/D,OAAOrC,KAAK,CAACqC,SAAS;IACvB;IAEA,OAAOrC,KAAK;EACb,CACD,CAAC;AACF"}
1
+ {"version":3,"names":["_blocks","require","_element","_data","_compose","_hooks","_context","_components","_hooks2","_object","_store","_lockUnlock","_classnames","_interopRequireDefault","cleanEmptyObject","object","Array","isArray","cleanedNestedObjects","Object","entries","map","key","value","filter","undefined","length","fromEntries","exports","transformStyles","activeSupports","migrationPaths","result","source","index","results","values","every","isActive","innerBlocks","referenceBlockAttributes","attributes","returnBlock","forEach","support","path","styleValue","getValueFromObjectPath","setImmutably","shouldSkipSerialization","blockNameOrType","featureSet","feature","getBlockSupport","skipSerialization","__experimentalSkipSerialization","includes","useStyleOverride","id","css","assets","__unstableType","setStyleOverride","deleteStyleOverride","unlock","useDispatch","blockEditorStore","fallbackId","useId","useEffect","_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","useSettings","rawSettings","useMemo","background","color","palette","custom","theme","default","gradients","duotone","customGradient","link","heading","button","text","typography","fontSizes","spacing","border","radius","style","width","dimensions","useSettingsForBlockElement","createBlockEditFilter","features","settings","Edit","memo","edit","withBlockEditHooks","createHigherOrderComponent","OriginalBlockEdit","props","context","useBlockEditContext","i","hasSupport","attributeKeys","shareWithChildBlocks","shouldDisplayControls","mayDisplayControlsKey","mayDisplayParentControlsKey","neededProps","_react","createElement","isSelected","clientId","setAttributes","__unstableParentLayout","addFilter","BlockProps","useBlockProps","setAllWrapperProps","wrapperProps","setWrapperProps","next","prev","nextAll","BlockPropsPure","createBlockListBlockFilter","withBlockListBlockHooks","BlockListBlock","allWrapperProps","useState","fill","keys","Boolean","reduce","acc","className","classnames","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\t}\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAKA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAC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AG,IAAI2I,aAAa,EAAG;QAClC,IAAKxH,UAAU,CAAEnB,GAAG,CAAE,EAAG;UACxBiL,gBAAgB,CAAEjL,GAAG,CAAE,GAAGmB,UAAU,CAAEnB,GAAG,CAAE;QAC5C;MACD;MAEA;MACC;MACA;MACA,CAAEH,MAAM,CAAC0K,IAAI,CAAEU,gBAAiB,CAAC,CAAC7K,MAAM,IACxC,CAAEsI,UAAU,CAAExF,IAAK,CAAC,EACnB;QACD,OAAO6H,IAAI;MACZ;MAEA,OAAOC,YAAY,CAAED,IAAI,EAAE7H,IAAI,EAAE+H,gBAAiB,CAAC;IACpD,CAAC,EAAE3C,KAAM,CAAC;EACX;EACA,IAAAiB,gBAAS,EACR,kCAAkC,EAClC,mBAAmB,EACnBuB,mBAAmB,EACnB,CACD,CAAC;EACD,IAAAvB,gBAAS,EACR,kCAAkC,EAClC,mBAAmB,EACjBjB,KAAK,IAAM;IACZ;IACA;IACA;IACA,IAAKA,KAAK,CAAC4C,cAAc,CAAE,WAAY,CAAC,IAAI,CAAE5C,KAAK,CAACqC,SAAS,EAAG;MAC/D,OAAOrC,KAAK,CAACqC,SAAS;IACvB;IAEA,OAAOrC,KAAK;EACb,CACD,CAAC;AACF"}
package/build/index.js CHANGED
@@ -12,6 +12,8 @@ var _exportNames = {
12
12
  __experimentalUseCustomSides: true,
13
13
  __experimentalGetSpacingClassesAndStyles: true,
14
14
  __experimentalGetGapCSSValue: true,
15
+ __experimentalGetShadowClassesAndStyles: true,
16
+ __experimentalUseShadowProps: true,
15
17
  useCachedTruthy: true,
16
18
  storeConfig: true,
17
19
  store: true,
@@ -42,6 +44,12 @@ Object.defineProperty(exports, "__experimentalGetGapCSSValue", {
42
44
  return _hooks.getGapCSSValue;
43
45
  }
44
46
  });
47
+ Object.defineProperty(exports, "__experimentalGetShadowClassesAndStyles", {
48
+ enumerable: true,
49
+ get: function () {
50
+ return _hooks.getShadowClassesAndStyles;
51
+ }
52
+ });
45
53
  Object.defineProperty(exports, "__experimentalGetSpacingClassesAndStyles", {
46
54
  enumerable: true,
47
55
  get: function () {
@@ -66,6 +74,12 @@ Object.defineProperty(exports, "__experimentalUseCustomSides", {
66
74
  return _hooks.useCustomSides;
67
75
  }
68
76
  });
77
+ Object.defineProperty(exports, "__experimentalUseShadowProps", {
78
+ enumerable: true,
79
+ get: function () {
80
+ return _hooks.useShadowProps;
81
+ }
82
+ });
69
83
  Object.defineProperty(exports, "getTypographyClassesAndStyles", {
70
84
  enumerable: true,
71
85
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"names":["_hooks","require","_components","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_elements","_utils","_store","_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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAYA,IAAAC,WAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,WAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA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OAAA;AACA,IAAAiB,SAAA,GAAAjB,OAAA;AACA,IAAAkB,YAAA,GAAAlB,OAAA"}
1
+ {"version":3,"names":["_hooks","require","_components","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_elements","_utils","_store","_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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAcA,IAAAC,WAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,WAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,WAAA,CAAAI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
618
  const {
619
619
  __unstableWithInserter,
620
- operation
620
+ operation,
621
+ nearestSide
621
622
  } = __unstableOptions;
622
623
  return {
623
624
  type: 'SHOW_INSERTION_POINT',
624
625
  rootClientId,
625
626
  index,
626
627
  __unstableWithInserter,
627
- operation
628
+ operation,
629
+ nearestSide
628
630
  };
629
631
  }
630
632
  /**
@@ -1507,18 +1509,20 @@ function setBlockVisibility(updates) {
1507
1509
  }
1508
1510
 
1509
1511
  /**
1510
- * Action that sets whether a block is being temporaritly edited as blocks.
1512
+ * Action that sets whether a block is being temporarily edited as blocks.
1511
1513
  *
1512
1514
  * DO-NOT-USE in production.
1513
1515
  * This action is created for internal/experimental only usage and may be
1514
1516
  * removed anytime without any warning, causing breakage on any plugin or theme invoking it.
1515
1517
  *
1516
- * @param {?string} temporarilyEditingAsBlocks The block's clientId being temporaritly edited as blocks.
1518
+ * @param {?string} temporarilyEditingAsBlocks The block's clientId being temporarily edited as blocks.
1519
+ * @param {?string} focusModeToRevert The focus mode to revert after temporarily edit as blocks finishes.
1517
1520
  */
1518
- function __unstableSetTemporarilyEditingAsBlocks(temporarilyEditingAsBlocks) {
1521
+ function __unstableSetTemporarilyEditingAsBlocks(temporarilyEditingAsBlocks, focusModeToRevert) {
1519
1522
  return {
1520
1523
  type: 'SET_TEMPORARILY_EDITING_AS_BLOCKS',
1521
- temporarilyEditingAsBlocks
1524
+ temporarilyEditingAsBlocks,
1525
+ focusModeToRevert
1522
1526
  };
1523
1527
  }
1524
1528