@wordpress/block-editor 12.16.0 → 12.17.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 (646) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/LICENSE.md +1 -1
  3. package/README.md +3 -6
  4. package/build/components/block-canvas/index.js +0 -2
  5. package/build/components/block-canvas/index.js.map +1 -1
  6. package/build/components/block-card/index.js +1 -1
  7. package/build/components/block-card/index.js.map +1 -1
  8. package/build/components/block-draggable/draggable-chip.js +6 -1
  9. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  10. package/build/components/block-draggable/index.js +76 -6
  11. package/build/components/block-draggable/index.js.map +1 -1
  12. package/build/components/block-draggable/index.native.js +0 -6
  13. package/build/components/block-draggable/index.native.js.map +1 -1
  14. package/build/components/block-draggable/use-scroll-when-dragging.native.js +1 -1
  15. package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  16. package/build/components/block-editing-mode/index.js +2 -3
  17. package/build/components/block-editing-mode/index.js.map +1 -1
  18. package/build/components/block-inspector/index.js +1 -1
  19. package/build/components/block-inspector/index.js.map +1 -1
  20. package/build/components/block-list/block-list-item-cell.native.js +1 -0
  21. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  22. package/build/components/block-list/block.js +245 -102
  23. package/build/components/block-list/block.js.map +1 -1
  24. package/build/components/block-list/block.native.js +46 -20
  25. package/build/components/block-list/block.native.js.map +1 -1
  26. package/build/components/block-list/index.native.js +3 -5
  27. package/build/components/block-list/index.native.js.map +1 -1
  28. package/build/components/block-list/private-block-context.js +14 -0
  29. package/build/components/block-list/private-block-context.js.map +1 -0
  30. package/build/components/block-list/use-block-props/index.js +33 -96
  31. package/build/components/block-list/use-block-props/index.js.map +1 -1
  32. package/build/components/block-list/use-in-between-inserter.js +3 -2
  33. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  34. package/build/components/block-list/use-scroll-upon-insertion.native.js +41 -0
  35. package/build/components/block-list/use-scroll-upon-insertion.native.js.map +1 -0
  36. package/build/components/block-lock/toolbar.js +15 -27
  37. package/build/components/block-lock/toolbar.js.map +1 -1
  38. package/build/components/block-mover/index.js +2 -1
  39. package/build/components/block-mover/index.js.map +1 -1
  40. package/build/components/block-patterns-list/index.js +4 -4
  41. package/build/components/block-patterns-list/index.js.map +1 -1
  42. package/build/components/block-switcher/index.js +4 -4
  43. package/build/components/block-switcher/index.js.map +1 -1
  44. package/build/components/block-toolbar/index.js +1 -2
  45. package/build/components/block-toolbar/index.js.map +1 -1
  46. package/build/components/block-tools/block-toolbar-popover.js +0 -2
  47. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  48. package/build/components/block-variation-transforms/index.js +29 -2
  49. package/build/components/block-variation-transforms/index.js.map +1 -1
  50. package/build/components/border-radius-control/linked-button.js +1 -1
  51. package/build/components/border-radius-control/linked-button.js.map +1 -1
  52. package/build/components/colors/utils.js +10 -2
  53. package/build/components/colors/utils.js.map +1 -1
  54. package/build/components/colors/with-colors.js +6 -2
  55. package/build/components/colors/with-colors.js.map +1 -1
  56. package/build/components/font-sizes/utils.js +10 -2
  57. package/build/components/font-sizes/utils.js.map +1 -1
  58. package/build/components/global-styles/border-panel.js +2 -1
  59. package/build/components/global-styles/border-panel.js.map +1 -1
  60. package/build/components/global-styles/color-panel.js +2 -1
  61. package/build/components/global-styles/color-panel.js.map +1 -1
  62. package/build/components/global-styles/dimensions-panel.js +4 -3
  63. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  64. package/build/components/global-styles/effects-panel.js +2 -1
  65. package/build/components/global-styles/effects-panel.js.map +1 -1
  66. package/build/components/global-styles/filters-panel.js +1 -4
  67. package/build/components/global-styles/filters-panel.js.map +1 -1
  68. package/build/components/global-styles/get-global-styles-changes.js +192 -0
  69. package/build/components/global-styles/get-global-styles-changes.js.map +1 -0
  70. package/build/components/global-styles/hooks.js +1 -1
  71. package/build/components/global-styles/hooks.js.map +1 -1
  72. package/build/components/global-styles/image-settings-panel.js +7 -1
  73. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  74. package/build/components/global-styles/index.js +7 -0
  75. package/build/components/global-styles/index.js.map +1 -1
  76. package/build/components/global-styles/typography-panel.js +2 -1
  77. package/build/components/global-styles/typography-panel.js.map +1 -1
  78. package/build/components/global-styles/use-global-styles-output.js +22 -8
  79. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  80. package/build/components/global-styles/utils.js +8 -1
  81. package/build/components/global-styles/utils.js.map +1 -1
  82. package/build/components/height-control/index.js +6 -2
  83. package/build/components/height-control/index.js.map +1 -1
  84. package/build/components/image-size-control/index.js +2 -2
  85. package/build/components/image-size-control/index.js.map +1 -1
  86. package/build/components/index.native.js +6 -5
  87. package/build/components/index.native.js.map +1 -1
  88. package/build/components/inner-blocks/index.js +61 -22
  89. package/build/components/inner-blocks/index.js.map +1 -1
  90. package/build/components/inner-blocks/index.native.js +18 -4
  91. package/build/components/inner-blocks/index.native.js.map +1 -1
  92. package/build/components/inner-blocks/use-inner-block-template-sync.js +5 -6
  93. package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  94. package/build/components/inner-blocks/use-nested-settings-update.js +5 -9
  95. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  96. package/build/components/inserter/block-patterns-explorer/pattern-list.js +1 -1
  97. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  98. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +10 -9
  99. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  100. package/build/components/inserter/block-patterns-tab/patterns-filter.js +10 -10
  101. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  102. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +9 -9
  103. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  104. package/build/components/inserter/block-patterns-tab/utils.js +10 -14
  105. package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
  106. package/build/components/inserter/hooks/use-block-types-state.js +4 -14
  107. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  108. package/build/components/inserter/hooks/use-patterns-state.js +1 -1
  109. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  110. package/build/components/inserter/index.js +1 -2
  111. package/build/components/inserter/index.js.map +1 -1
  112. package/build/components/inserter/library.js +3 -7
  113. package/build/components/inserter/library.js.map +1 -1
  114. package/build/components/inserter/menu.js +14 -28
  115. package/build/components/inserter/menu.js.map +1 -1
  116. package/build/components/inserter/tabs.js +21 -21
  117. package/build/components/inserter/tabs.js.map +1 -1
  118. package/build/components/inserter-draggable-blocks/index.js +1 -1
  119. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  120. package/build/components/inserter-list-item/index.js +2 -4
  121. package/build/components/inserter-list-item/index.js.map +1 -1
  122. package/build/components/inspector-controls/block-support-tools-panel.js +3 -1
  123. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  124. package/build/components/inspector-controls-tabs/index.js +34 -23
  125. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  126. package/build/components/list-view/block-select-button.js +4 -0
  127. package/build/components/list-view/block-select-button.js.map +1 -1
  128. package/build/components/list-view/block.js +57 -3
  129. package/build/components/list-view/block.js.map +1 -1
  130. package/build/components/media-upload-progress/constants.js +19 -0
  131. package/build/components/media-upload-progress/constants.js.map +1 -0
  132. package/build/components/media-upload-progress/index.native.js +42 -17
  133. package/build/components/media-upload-progress/index.native.js.map +1 -1
  134. package/build/components/navigable-toolbar/index.js +9 -14
  135. package/build/components/navigable-toolbar/index.js.map +1 -1
  136. package/build/components/plain-text/index.native.js +8 -3
  137. package/build/components/plain-text/index.native.js.map +1 -1
  138. package/build/components/provider/index.js +3 -1
  139. package/build/components/provider/index.js.map +1 -1
  140. package/build/components/provider/use-block-sync.js +7 -1
  141. package/build/components/provider/use-block-sync.js.map +1 -1
  142. package/build/components/rich-text/index.js +17 -7
  143. package/build/components/rich-text/index.js.map +1 -1
  144. package/build/components/rich-text/native/index.native.js +16 -24
  145. package/build/components/rich-text/native/index.native.js.map +1 -1
  146. package/build/components/rich-text/use-input-rules.js +2 -2
  147. package/build/components/rich-text/use-input-rules.js.map +1 -1
  148. package/build/components/rich-text/use-mark-persistent.js +1 -1
  149. package/build/components/rich-text/use-mark-persistent.js.map +1 -1
  150. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -1
  151. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  152. package/build/components/url-input/index.js +9 -6
  153. package/build/components/url-input/index.js.map +1 -1
  154. package/build/components/use-block-commands/index.js +14 -18
  155. package/build/components/use-block-commands/index.js.map +1 -1
  156. package/build/components/use-block-drop-zone/index.js +51 -22
  157. package/build/components/use-block-drop-zone/index.js.map +1 -1
  158. package/build/components/use-moving-animation/index.js +100 -92
  159. package/build/components/use-moving-animation/index.js.map +1 -1
  160. package/build/components/use-on-block-drop/index.js +8 -11
  161. package/build/components/use-on-block-drop/index.js.map +1 -1
  162. package/build/components/writing-flow/index.js +0 -1
  163. package/build/components/writing-flow/index.js.map +1 -1
  164. package/build/components/writing-flow/use-drag-selection.js +15 -4
  165. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  166. package/build/components/writing-flow/use-selection-observer.js +73 -27
  167. package/build/components/writing-flow/use-selection-observer.js.map +1 -1
  168. package/build/components/writing-flow/use-tab-nav.js +7 -4
  169. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  170. package/build/hooks/align.js +1 -1
  171. package/build/hooks/align.js.map +1 -1
  172. package/build/hooks/anchor.js +1 -1
  173. package/build/hooks/anchor.js.map +1 -1
  174. package/build/hooks/aria-label.js +9 -1
  175. package/build/hooks/aria-label.js.map +1 -1
  176. package/build/hooks/background.js +185 -20
  177. package/build/hooks/background.js.map +1 -1
  178. package/build/hooks/border.js +5 -10
  179. package/build/hooks/border.js.map +1 -1
  180. package/build/hooks/color.js +13 -11
  181. package/build/hooks/color.js.map +1 -1
  182. package/build/hooks/custom-class-name.js +1 -1
  183. package/build/hooks/custom-class-name.js.map +1 -1
  184. package/build/hooks/custom-class-name.native.js +9 -1
  185. package/build/hooks/custom-class-name.native.js.map +1 -1
  186. package/build/hooks/dimensions.js +4 -9
  187. package/build/hooks/dimensions.js.map +1 -1
  188. package/build/hooks/font-family.js +7 -3
  189. package/build/hooks/font-family.js.map +1 -1
  190. package/build/hooks/font-size.js +1 -1
  191. package/build/hooks/font-size.js.map +1 -1
  192. package/build/hooks/index.js +4 -3
  193. package/build/hooks/index.js.map +1 -1
  194. package/build/hooks/index.native.js +5 -3
  195. package/build/hooks/index.native.js.map +1 -1
  196. package/build/hooks/layout.js +10 -4
  197. package/build/hooks/layout.js.map +1 -1
  198. package/build/hooks/style.js +1 -1
  199. package/build/hooks/style.js.map +1 -1
  200. package/build/hooks/typography.js +4 -9
  201. package/build/hooks/typography.js.map +1 -1
  202. package/build/hooks/typography.native.js +43 -18
  203. package/build/hooks/typography.native.js.map +1 -1
  204. package/build/hooks/use-typography-props.js +10 -2
  205. package/build/hooks/use-typography-props.js.map +1 -1
  206. package/build/hooks/utils.js +44 -4
  207. package/build/hooks/utils.js.map +1 -1
  208. package/build/private-apis.js +2 -4
  209. package/build/private-apis.js.map +1 -1
  210. package/build/private-apis.native.js +0 -2
  211. package/build/private-apis.native.js.map +1 -1
  212. package/build/store/actions.js +0 -16
  213. package/build/store/actions.js.map +1 -1
  214. package/build/store/private-actions.js +51 -5
  215. package/build/store/private-actions.js.map +1 -1
  216. package/build/store/private-selectors.js +12 -0
  217. package/build/store/private-selectors.js.map +1 -1
  218. package/build/store/reducer.js +14 -6
  219. package/build/store/reducer.js.map +1 -1
  220. package/build/store/selectors.js +1 -13
  221. package/build/store/selectors.js.map +1 -1
  222. package/build/store/undo-ignore.js +12 -0
  223. package/build/store/undo-ignore.js.map +1 -0
  224. package/build/store/utils.js +1 -1
  225. package/build/store/utils.js.map +1 -1
  226. package/build/utils/get-px-from-css-unit.js +16 -0
  227. package/build/utils/get-px-from-css-unit.js.map +1 -0
  228. package/build/utils/index.js +2 -2
  229. package/build/utils/index.js.map +1 -1
  230. package/build/utils/object.js +0 -38
  231. package/build/utils/object.js.map +1 -1
  232. package/build/utils/use-can-block-toolbar-be-focused.js +46 -0
  233. package/build/utils/use-can-block-toolbar-be-focused.js.map +1 -0
  234. package/build-module/components/block-canvas/index.js +0 -2
  235. package/build-module/components/block-canvas/index.js.map +1 -1
  236. package/build-module/components/block-card/index.js +1 -1
  237. package/build-module/components/block-card/index.js.map +1 -1
  238. package/build-module/components/block-draggable/draggable-chip.js +6 -1
  239. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  240. package/build-module/components/block-draggable/index.js +76 -6
  241. package/build-module/components/block-draggable/index.js.map +1 -1
  242. package/build-module/components/block-draggable/index.native.js +1 -7
  243. package/build-module/components/block-draggable/index.native.js.map +1 -1
  244. package/build-module/components/block-draggable/use-scroll-when-dragging.native.js +1 -1
  245. package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  246. package/build-module/components/block-editing-mode/index.js +3 -4
  247. package/build-module/components/block-editing-mode/index.js.map +1 -1
  248. package/build-module/components/block-inspector/index.js +1 -1
  249. package/build-module/components/block-inspector/index.js.map +1 -1
  250. package/build-module/components/block-list/block-list-item-cell.native.js +1 -0
  251. package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
  252. package/build-module/components/block-list/block.js +249 -106
  253. package/build-module/components/block-list/block.js.map +1 -1
  254. package/build-module/components/block-list/block.native.js +48 -22
  255. package/build-module/components/block-list/block.native.js.map +1 -1
  256. package/build-module/components/block-list/index.native.js +3 -5
  257. package/build-module/components/block-list/index.native.js.map +1 -1
  258. package/build-module/components/block-list/private-block-context.js +6 -0
  259. package/build-module/components/block-list/private-block-context.js.map +1 -0
  260. package/build-module/components/block-list/use-block-props/index.js +34 -97
  261. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  262. package/build-module/components/block-list/use-in-between-inserter.js +3 -2
  263. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  264. package/build-module/components/block-list/use-scroll-upon-insertion.native.js +33 -0
  265. package/build-module/components/block-list/use-scroll-upon-insertion.native.js.map +1 -0
  266. package/build-module/components/block-lock/toolbar.js +16 -28
  267. package/build-module/components/block-lock/toolbar.js.map +1 -1
  268. package/build-module/components/block-mover/index.js +2 -1
  269. package/build-module/components/block-mover/index.js.map +1 -1
  270. package/build-module/components/block-patterns-list/index.js +5 -5
  271. package/build-module/components/block-patterns-list/index.js.map +1 -1
  272. package/build-module/components/block-switcher/index.js +4 -4
  273. package/build-module/components/block-switcher/index.js.map +1 -1
  274. package/build-module/components/block-toolbar/index.js +1 -2
  275. package/build-module/components/block-toolbar/index.js.map +1 -1
  276. package/build-module/components/block-tools/block-toolbar-popover.js +0 -2
  277. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  278. package/build-module/components/block-variation-transforms/index.js +30 -3
  279. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  280. package/build-module/components/border-radius-control/linked-button.js +1 -1
  281. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  282. package/build-module/components/colors/utils.js +9 -1
  283. package/build-module/components/colors/utils.js.map +1 -1
  284. package/build-module/components/colors/with-colors.js +5 -1
  285. package/build-module/components/colors/with-colors.js.map +1 -1
  286. package/build-module/components/font-sizes/utils.js +9 -1
  287. package/build-module/components/font-sizes/utils.js.map +1 -1
  288. package/build-module/components/global-styles/border-panel.js +3 -2
  289. package/build-module/components/global-styles/border-panel.js.map +1 -1
  290. package/build-module/components/global-styles/color-panel.js +3 -2
  291. package/build-module/components/global-styles/color-panel.js.map +1 -1
  292. package/build-module/components/global-styles/dimensions-panel.js +5 -4
  293. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  294. package/build-module/components/global-styles/effects-panel.js +3 -2
  295. package/build-module/components/global-styles/effects-panel.js.map +1 -1
  296. package/build-module/components/global-styles/filters-panel.js +2 -5
  297. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  298. package/build-module/components/global-styles/get-global-styles-changes.js +184 -0
  299. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -0
  300. package/build-module/components/global-styles/hooks.js +1 -1
  301. package/build-module/components/global-styles/hooks.js.map +1 -1
  302. package/build-module/components/global-styles/image-settings-panel.js +7 -1
  303. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  304. package/build-module/components/global-styles/index.js +1 -0
  305. package/build-module/components/global-styles/index.js.map +1 -1
  306. package/build-module/components/global-styles/typography-panel.js +3 -2
  307. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  308. package/build-module/components/global-styles/use-global-styles-output.js +15 -1
  309. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  310. package/build-module/components/global-styles/utils.js +7 -0
  311. package/build-module/components/global-styles/utils.js.map +1 -1
  312. package/build-module/components/height-control/index.js +6 -2
  313. package/build-module/components/height-control/index.js.map +1 -1
  314. package/build-module/components/image-size-control/index.js +2 -2
  315. package/build-module/components/image-size-control/index.js.map +1 -1
  316. package/build-module/components/index.native.js +2 -1
  317. package/build-module/components/index.native.js.map +1 -1
  318. package/build-module/components/inner-blocks/index.js +62 -23
  319. package/build-module/components/inner-blocks/index.js.map +1 -1
  320. package/build-module/components/inner-blocks/index.native.js +18 -4
  321. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  322. package/build-module/components/inner-blocks/use-inner-block-template-sync.js +5 -6
  323. package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  324. package/build-module/components/inner-blocks/use-nested-settings-update.js +6 -10
  325. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  326. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +2 -2
  327. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  328. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +11 -10
  329. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  330. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +11 -11
  331. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  332. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +11 -11
  333. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  334. package/build-module/components/inserter/block-patterns-tab/utils.js +7 -11
  335. package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
  336. package/build-module/components/inserter/hooks/use-block-types-state.js +4 -14
  337. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  338. package/build-module/components/inserter/hooks/use-patterns-state.js +2 -2
  339. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  340. package/build-module/components/inserter/index.js +1 -2
  341. package/build-module/components/inserter/index.js.map +1 -1
  342. package/build-module/components/inserter/library.js +3 -7
  343. package/build-module/components/inserter/library.js.map +1 -1
  344. package/build-module/components/inserter/menu.js +14 -28
  345. package/build-module/components/inserter/menu.js.map +1 -1
  346. package/build-module/components/inserter/tabs.js +22 -22
  347. package/build-module/components/inserter/tabs.js.map +1 -1
  348. package/build-module/components/inserter-draggable-blocks/index.js +2 -2
  349. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  350. package/build-module/components/inserter-list-item/index.js +2 -4
  351. package/build-module/components/inserter-list-item/index.js.map +1 -1
  352. package/build-module/components/inspector-controls/block-support-tools-panel.js +3 -1
  353. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  354. package/build-module/components/inspector-controls-tabs/index.js +35 -24
  355. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  356. package/build-module/components/list-view/block-select-button.js +4 -0
  357. package/build-module/components/list-view/block-select-button.js.map +1 -1
  358. package/build-module/components/list-view/block.js +58 -4
  359. package/build-module/components/list-view/block.js.map +1 -1
  360. package/build-module/components/media-upload-progress/constants.js +7 -0
  361. package/build-module/components/media-upload-progress/constants.js.map +1 -0
  362. package/build-module/components/media-upload-progress/index.native.js +37 -8
  363. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  364. package/build-module/components/navigable-toolbar/index.js +9 -14
  365. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  366. package/build-module/components/plain-text/index.native.js +6 -1
  367. package/build-module/components/plain-text/index.native.js.map +1 -1
  368. package/build-module/components/provider/index.js +3 -1
  369. package/build-module/components/provider/index.js.map +1 -1
  370. package/build-module/components/provider/use-block-sync.js +7 -1
  371. package/build-module/components/provider/use-block-sync.js.map +1 -1
  372. package/build-module/components/rich-text/index.js +17 -7
  373. package/build-module/components/rich-text/index.js.map +1 -1
  374. package/build-module/components/rich-text/native/index.native.js +16 -23
  375. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  376. package/build-module/components/rich-text/use-input-rules.js +2 -2
  377. package/build-module/components/rich-text/use-input-rules.js.map +1 -1
  378. package/build-module/components/rich-text/use-mark-persistent.js +1 -1
  379. package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
  380. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -1
  381. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  382. package/build-module/components/url-input/index.js +9 -6
  383. package/build-module/components/url-input/index.js.map +1 -1
  384. package/build-module/components/use-block-commands/index.js +14 -18
  385. package/build-module/components/use-block-commands/index.js.map +1 -1
  386. package/build-module/components/use-block-drop-zone/index.js +51 -23
  387. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  388. package/build-module/components/use-moving-animation/index.js +102 -94
  389. package/build-module/components/use-moving-animation/index.js.map +1 -1
  390. package/build-module/components/use-on-block-drop/index.js +8 -11
  391. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  392. package/build-module/components/writing-flow/index.js +0 -1
  393. package/build-module/components/writing-flow/index.js.map +1 -1
  394. package/build-module/components/writing-flow/use-drag-selection.js +15 -4
  395. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  396. package/build-module/components/writing-flow/use-selection-observer.js +73 -27
  397. package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
  398. package/build-module/components/writing-flow/use-tab-nav.js +7 -4
  399. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  400. package/build-module/hooks/align.js +1 -1
  401. package/build-module/hooks/align.js.map +1 -1
  402. package/build-module/hooks/anchor.js +1 -1
  403. package/build-module/hooks/anchor.js.map +1 -1
  404. package/build-module/hooks/aria-label.js +7 -1
  405. package/build-module/hooks/aria-label.js.map +1 -1
  406. package/build-module/hooks/background.js +181 -19
  407. package/build-module/hooks/background.js.map +1 -1
  408. package/build-module/hooks/border.js +2 -8
  409. package/build-module/hooks/border.js.map +1 -1
  410. package/build-module/hooks/color.js +11 -9
  411. package/build-module/hooks/color.js.map +1 -1
  412. package/build-module/hooks/custom-class-name.js +1 -1
  413. package/build-module/hooks/custom-class-name.js.map +1 -1
  414. package/build-module/hooks/custom-class-name.native.js +7 -1
  415. package/build-module/hooks/custom-class-name.native.js.map +1 -1
  416. package/build-module/hooks/dimensions.js +1 -7
  417. package/build-module/hooks/dimensions.js.map +1 -1
  418. package/build-module/hooks/font-family.js +6 -2
  419. package/build-module/hooks/font-family.js.map +1 -1
  420. package/build-module/hooks/font-size.js +1 -1
  421. package/build-module/hooks/font-size.js.map +1 -1
  422. package/build-module/hooks/index.js +5 -4
  423. package/build-module/hooks/index.js.map +1 -1
  424. package/build-module/hooks/index.native.js +6 -4
  425. package/build-module/hooks/index.native.js.map +1 -1
  426. package/build-module/hooks/layout.js +9 -3
  427. package/build-module/hooks/layout.js.map +1 -1
  428. package/build-module/hooks/style.js +1 -1
  429. package/build-module/hooks/style.js.map +1 -1
  430. package/build-module/hooks/typography.js +1 -7
  431. package/build-module/hooks/typography.js.map +1 -1
  432. package/build-module/hooks/typography.native.js +43 -17
  433. package/build-module/hooks/typography.native.js.map +1 -1
  434. package/build-module/hooks/use-typography-props.js +9 -1
  435. package/build-module/hooks/use-typography-props.js.map +1 -1
  436. package/build-module/hooks/utils.js +43 -4
  437. package/build-module/hooks/utils.js.map +1 -1
  438. package/build-module/private-apis.js +2 -4
  439. package/build-module/private-apis.js.map +1 -1
  440. package/build-module/private-apis.native.js +0 -2
  441. package/build-module/private-apis.native.js.map +1 -1
  442. package/build-module/store/actions.js +0 -15
  443. package/build-module/store/actions.js.map +1 -1
  444. package/build-module/store/private-actions.js +49 -4
  445. package/build-module/store/private-actions.js.map +1 -1
  446. package/build-module/store/private-selectors.js +11 -0
  447. package/build-module/store/private-selectors.js.map +1 -1
  448. package/build-module/store/reducer.js +14 -6
  449. package/build-module/store/reducer.js.map +1 -1
  450. package/build-module/store/selectors.js +1 -12
  451. package/build-module/store/selectors.js.map +1 -1
  452. package/build-module/store/undo-ignore.js +5 -0
  453. package/build-module/store/undo-ignore.js.map +1 -0
  454. package/build-module/store/utils.js +2 -2
  455. package/build-module/store/utils.js.map +1 -1
  456. package/build-module/utils/get-px-from-css-unit.js +9 -0
  457. package/build-module/utils/get-px-from-css-unit.js.map +1 -0
  458. package/build-module/utils/index.js +1 -1
  459. package/build-module/utils/index.js.map +1 -1
  460. package/build-module/utils/object.js +0 -37
  461. package/build-module/utils/object.js.map +1 -1
  462. package/build-module/utils/use-can-block-toolbar-be-focused.js +40 -0
  463. package/build-module/utils/use-can-block-toolbar-be-focused.js.map +1 -0
  464. package/build-style/content-rtl.css +7 -6
  465. package/build-style/content.css +7 -6
  466. package/build-style/style-rtl.css +51 -8
  467. package/build-style/style.css +51 -8
  468. package/package.json +31 -31
  469. package/src/components/alignment-control/README.md +0 -5
  470. package/src/components/block-alignment-control/README.md +0 -5
  471. package/src/components/block-alignment-matrix-control/README.md +0 -10
  472. package/src/components/block-breadcrumb/README.md +0 -5
  473. package/src/components/block-canvas/index.js +0 -2
  474. package/src/components/block-canvas/style.scss +6 -0
  475. package/src/components/block-caption/README.md +0 -5
  476. package/src/components/block-card/README.md +0 -5
  477. package/src/components/block-card/index.js +1 -1
  478. package/src/components/block-draggable/draggable-chip.js +11 -1
  479. package/src/components/block-draggable/index.js +116 -4
  480. package/src/components/block-draggable/index.native.js +0 -5
  481. package/src/components/block-draggable/style.scss +35 -0
  482. package/src/components/block-draggable/test/helpers.native.js +8 -7
  483. package/src/components/block-draggable/use-scroll-when-dragging.native.js +1 -1
  484. package/src/components/block-editing-mode/index.js +3 -3
  485. package/src/components/block-icon/README.md +0 -5
  486. package/src/components/block-inspector/README.md +0 -5
  487. package/src/components/block-inspector/index.js +3 -1
  488. package/src/components/block-list/block-list-item-cell.native.js +5 -1
  489. package/src/components/block-list/block.js +290 -119
  490. package/src/components/block-list/block.native.js +55 -21
  491. package/src/components/block-list/content.scss +14 -10
  492. package/src/components/block-list/index.native.js +3 -5
  493. package/src/components/block-list/{block-list-block-context.js → private-block-context.js} +1 -1
  494. package/src/components/block-list/use-block-props/index.js +32 -128
  495. package/src/components/block-list/use-in-between-inserter.js +4 -1
  496. package/src/components/block-list/use-scroll-upon-insertion.native.js +52 -0
  497. package/src/components/block-lock/toolbar.js +15 -34
  498. package/src/components/block-mover/README.md +0 -5
  499. package/src/components/block-mover/index.js +1 -1
  500. package/src/components/block-parent-selector/README.md +0 -5
  501. package/src/components/block-patterns-list/README.md +0 -5
  502. package/src/components/block-patterns-list/index.js +8 -5
  503. package/src/components/block-switcher/index.js +49 -59
  504. package/src/components/block-toolbar/README.md +0 -5
  505. package/src/components/block-toolbar/index.js +1 -2
  506. package/src/components/block-tools/block-toolbar-popover.js +4 -10
  507. package/src/components/block-types-list/README.md +0 -5
  508. package/src/components/block-variation-picker/README.md +0 -5
  509. package/src/components/block-variation-transforms/README.md +0 -5
  510. package/src/components/block-variation-transforms/index.js +49 -3
  511. package/src/components/border-radius-control/linked-button.js +1 -1
  512. package/src/components/caption/README.md +0 -5
  513. package/src/components/color-palette/test/__snapshots__/control.js.snap +0 -1
  514. package/src/components/colors/utils.js +8 -1
  515. package/src/components/colors/with-colors.js +3 -1
  516. package/src/components/contrast-checker/README.md +0 -4
  517. package/src/components/copy-handler/README.md +0 -10
  518. package/src/components/font-sizes/utils.js +7 -1
  519. package/src/components/global-styles/border-panel.js +2 -1
  520. package/src/components/global-styles/color-panel.js +2 -1
  521. package/src/components/global-styles/dimensions-panel.js +4 -3
  522. package/src/components/global-styles/effects-panel.js +2 -1
  523. package/src/components/global-styles/filters-panel.js +2 -5
  524. package/src/components/global-styles/get-global-styles-changes.js +210 -0
  525. package/src/components/global-styles/hooks.js +3 -0
  526. package/src/components/global-styles/image-settings-panel.js +6 -0
  527. package/src/components/global-styles/index.js +1 -0
  528. package/src/components/global-styles/test/get-global-styles-changes.js +234 -0
  529. package/src/components/global-styles/typography-panel.js +2 -1
  530. package/src/components/global-styles/use-global-styles-output.js +9 -5
  531. package/src/components/global-styles/utils.js +7 -0
  532. package/src/components/height-control/README.md +2 -7
  533. package/src/components/height-control/index.js +4 -0
  534. package/src/components/image-size-control/index.js +5 -2
  535. package/src/components/index.native.js +2 -2
  536. package/src/components/inner-blocks/index.js +68 -29
  537. package/src/components/inner-blocks/index.native.js +19 -7
  538. package/src/components/inner-blocks/use-inner-block-template-sync.js +5 -7
  539. package/src/components/inner-blocks/use-nested-settings-update.js +6 -13
  540. package/src/components/inserter/block-patterns-explorer/pattern-list.js +2 -2
  541. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +15 -15
  542. package/src/components/inserter/block-patterns-tab/patterns-filter.js +15 -13
  543. package/src/components/inserter/block-patterns-tab/use-pattern-categories.js +15 -18
  544. package/src/components/inserter/block-patterns-tab/utils.js +11 -12
  545. package/src/components/inserter/hooks/use-block-types-state.js +9 -11
  546. package/src/components/inserter/hooks/use-patterns-state.js +2 -2
  547. package/src/components/inserter/index.js +0 -1
  548. package/src/components/inserter/library.js +2 -8
  549. package/src/components/inserter/menu.js +13 -31
  550. package/src/components/inserter/style.scss +6 -4
  551. package/src/components/inserter/tabs.js +34 -25
  552. package/src/components/inserter-draggable-blocks/index.js +2 -2
  553. package/src/components/inserter-list-item/index.js +6 -6
  554. package/src/components/inspector-controls/block-support-tools-panel.js +2 -0
  555. package/src/components/inspector-controls-tabs/index.js +39 -28
  556. package/src/components/inspector-controls-tabs/style.scss +3 -2
  557. package/src/components/letter-spacing-control/README.md +0 -5
  558. package/src/components/line-height-control/README.md +0 -5
  559. package/src/components/list-view/README.md +0 -5
  560. package/src/components/list-view/block-select-button.js +4 -0
  561. package/src/components/list-view/block.js +73 -2
  562. package/src/components/list-view/style.scss +6 -0
  563. package/src/components/media-upload-progress/constants.js +6 -0
  564. package/src/components/media-upload-progress/index.native.js +66 -14
  565. package/src/components/media-upload-progress/test/index.native.js +2 -2
  566. package/src/components/multi-selection-inspector/README.md +0 -5
  567. package/src/components/navigable-toolbar/index.js +13 -11
  568. package/src/components/plain-text/index.native.js +6 -1
  569. package/src/components/provider/index.js +1 -1
  570. package/src/components/provider/test/use-block-sync.js +20 -17
  571. package/src/components/provider/use-block-sync.js +6 -0
  572. package/src/components/rich-text/index.js +18 -6
  573. package/src/components/rich-text/native/index.native.js +16 -24
  574. package/src/components/rich-text/native/test/__snapshots__/index.native.js.snap +3 -3
  575. package/src/components/rich-text/native/test/index.native.js +72 -5
  576. package/src/components/rich-text/use-input-rules.js +2 -2
  577. package/src/components/rich-text/use-mark-persistent.js +1 -2
  578. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -1
  579. package/src/components/text-decoration-control/README.md +40 -0
  580. package/src/components/text-transform-control/README.md +0 -4
  581. package/src/components/ungroup-button/README.md +0 -5
  582. package/src/components/unit-control/README.md +0 -4
  583. package/src/components/url-input/index.js +11 -11
  584. package/src/components/use-block-commands/index.js +18 -21
  585. package/src/components/use-block-drop-zone/index.js +85 -34
  586. package/src/components/use-moving-animation/index.js +107 -103
  587. package/src/components/use-on-block-drop/index.js +7 -23
  588. package/src/components/use-on-block-drop/test/index.js +12 -26
  589. package/src/components/use-resize-canvas/README.md +0 -4
  590. package/src/components/use-settings/README.md +0 -4
  591. package/src/components/writing-flow/index.js +0 -1
  592. package/src/components/writing-flow/use-drag-selection.js +18 -4
  593. package/src/components/writing-flow/use-selection-observer.js +99 -37
  594. package/src/components/writing-flow/use-tab-nav.js +7 -7
  595. package/src/hooks/align.js +1 -5
  596. package/src/hooks/anchor.js +1 -5
  597. package/src/hooks/aria-label.js +8 -5
  598. package/src/hooks/background.js +253 -21
  599. package/src/hooks/border.js +2 -13
  600. package/src/hooks/color.js +19 -14
  601. package/src/hooks/custom-class-name.js +1 -5
  602. package/src/hooks/custom-class-name.native.js +8 -5
  603. package/src/hooks/dimensions.js +1 -7
  604. package/src/hooks/font-family.js +4 -7
  605. package/src/hooks/font-size.js +1 -6
  606. package/src/hooks/index.js +19 -3
  607. package/src/hooks/index.native.js +17 -4
  608. package/src/hooks/layout.js +5 -2
  609. package/src/hooks/style.js +1 -6
  610. package/src/hooks/test/anchor.js +4 -9
  611. package/src/hooks/test/custom-class-name.js +3 -8
  612. package/src/hooks/test/style.js +4 -14
  613. package/src/hooks/typography.js +1 -7
  614. package/src/hooks/typography.native.js +31 -33
  615. package/src/hooks/use-typography-props.js +7 -1
  616. package/src/hooks/utils.js +60 -2
  617. package/src/private-apis.js +2 -4
  618. package/src/private-apis.native.js +0 -2
  619. package/src/store/actions.js +0 -15
  620. package/src/store/private-actions.js +44 -4
  621. package/src/store/private-selectors.js +11 -0
  622. package/src/store/reducer.js +16 -5
  623. package/src/store/selectors.js +5 -13
  624. package/src/store/undo-ignore.js +4 -0
  625. package/src/store/utils.js +2 -2
  626. package/src/style.scss +1 -0
  627. package/src/utils/get-px-from-css-unit.js +8 -0
  628. package/src/utils/index.js +1 -1
  629. package/src/utils/object.js +0 -35
  630. package/src/utils/test/object.js +1 -96
  631. package/src/utils/use-can-block-toolbar-be-focused.js +48 -0
  632. package/build/components/block-list/block-list-block-context.js +0 -14
  633. package/build/components/block-list/block-list-block-context.js.map +0 -1
  634. package/build/utils/parse-css-unit-to-px.js +0 -302
  635. package/build/utils/parse-css-unit-to-px.js.map +0 -1
  636. package/build/utils/use-should-contextual-toolbar-show.js +0 -63
  637. package/build/utils/use-should-contextual-toolbar-show.js.map +0 -1
  638. package/build-module/components/block-list/block-list-block-context.js +0 -6
  639. package/build-module/components/block-list/block-list-block-context.js.map +0 -1
  640. package/build-module/utils/parse-css-unit-to-px.js +0 -294
  641. package/build-module/utils/parse-css-unit-to-px.js.map +0 -1
  642. package/build-module/utils/use-should-contextual-toolbar-show.js +0 -57
  643. package/build-module/utils/use-should-contextual-toolbar-show.js.map +0 -1
  644. package/src/utils/parse-css-unit-to-px.js +0 -329
  645. package/src/utils/test/parse-css-unit-to-px.js +0 -172
  646. package/src/utils/use-should-contextual-toolbar-show.js +0 -85
@@ -3,13 +3,18 @@
3
3
  */
4
4
  import classnames from 'classnames';
5
5
 
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { privateApis as componentsPrivateApis } from '@wordpress/components';
10
+
6
11
  /**
7
12
  * Internal dependencies
8
13
  */
9
14
  import { getInlineStyles } from './style';
10
15
  import { getFontSizeClass } from '../components/font-sizes';
11
16
  import { getTypographyFontSizeValue, getFluidTypographyOptionsFromSettings } from '../components/global-styles/typography-utils';
12
- import { kebabCase } from '../utils/object';
17
+ import { unlock } from '../lock-unlock';
13
18
 
14
19
  /*
15
20
  * This utility is intended to assist where the serialization of the typography
@@ -26,6 +31,9 @@ import { kebabCase } from '../utils/object';
26
31
  * @return {Object} Typography block support derived CSS classes & styles.
27
32
  */
28
33
  export function getTypographyClassesAndStyles(attributes, settings) {
34
+ const {
35
+ kebabCase
36
+ } = unlock(componentsPrivateApis);
29
37
  let typographyStyles = attributes?.style?.typography || {};
30
38
  const fluidTypographySettings = getFluidTypographyOptionsFromSettings(settings);
31
39
  typographyStyles = {
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","getInlineStyles","getFontSizeClass","getTypographyFontSizeValue","getFluidTypographyOptionsFromSettings","kebabCase","getTypographyClassesAndStyles","attributes","settings","typographyStyles","style","typography","fluidTypographySettings","fontSize","size","fontFamilyClassName","fontFamily","className"],"sources":["@wordpress/block-editor/src/hooks/use-typography-props.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport { getFontSizeClass } from '../components/font-sizes';\nimport {\n\tgetTypographyFontSizeValue,\n\tgetFluidTypographyOptionsFromSettings,\n} from '../components/global-styles/typography-utils';\nimport { kebabCase } from '../utils/object';\n\n/*\n * This utility is intended to assist where the serialization of the typography\n * block support is being skipped for a block but the typography related CSS\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 typography support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n * @param {Object|boolean} settings Merged theme.json settings\n *\n * @return {Object} Typography block support derived CSS classes & styles.\n */\nexport function getTypographyClassesAndStyles( attributes, settings ) {\n\tlet typographyStyles = attributes?.style?.typography || {};\n\tconst fluidTypographySettings =\n\t\tgetFluidTypographyOptionsFromSettings( settings );\n\n\ttypographyStyles = {\n\t\t...typographyStyles,\n\t\tfontSize: getTypographyFontSizeValue(\n\t\t\t{ size: attributes?.style?.typography?.fontSize },\n\t\t\tfluidTypographySettings\n\t\t),\n\t};\n\n\tconst style = getInlineStyles( { typography: typographyStyles } );\n\tconst fontFamilyClassName = !! attributes?.fontFamily\n\t\t? `has-${ kebabCase( attributes.fontFamily ) }-font-family`\n\t\t: '';\n\n\tconst className = classnames(\n\t\tfontFamilyClassName,\n\t\tgetFontSizeClass( attributes?.fontSize )\n\t);\n\n\treturn {\n\t\tclassName,\n\t\tstyle,\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,eAAe,QAAQ,SAAS;AACzC,SAASC,gBAAgB,QAAQ,0BAA0B;AAC3D,SACCC,0BAA0B,EAC1BC,qCAAqC,QAC/B,8CAA8C;AACrD,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,6BAA6BA,CAAEC,UAAU,EAAEC,QAAQ,EAAG;EACrE,IAAIC,gBAAgB,GAAGF,UAAU,EAAEG,KAAK,EAAEC,UAAU,IAAI,CAAC,CAAC;EAC1D,MAAMC,uBAAuB,GAC5BR,qCAAqC,CAAEI,QAAS,CAAC;EAElDC,gBAAgB,GAAG;IAClB,GAAGA,gBAAgB;IACnBI,QAAQ,EAAEV,0BAA0B,CACnC;MAAEW,IAAI,EAAEP,UAAU,EAAEG,KAAK,EAAEC,UAAU,EAAEE;IAAS,CAAC,EACjDD,uBACD;EACD,CAAC;EAED,MAAMF,KAAK,GAAGT,eAAe,CAAE;IAAEU,UAAU,EAAEF;EAAiB,CAAE,CAAC;EACjE,MAAMM,mBAAmB,GAAG,CAAC,CAAER,UAAU,EAAES,UAAU,GACjD,OAAOX,SAAS,CAAEE,UAAU,CAACS,UAAW,CAAG,cAAa,GACzD,EAAE;EAEL,MAAMC,SAAS,GAAGjB,UAAU,CAC3Be,mBAAmB,EACnBb,gBAAgB,CAAEK,UAAU,EAAEM,QAAS,CACxC,CAAC;EAED,OAAO;IACNI,SAAS;IACTP;EACD,CAAC;AACF"}
1
+ {"version":3,"names":["classnames","privateApis","componentsPrivateApis","getInlineStyles","getFontSizeClass","getTypographyFontSizeValue","getFluidTypographyOptionsFromSettings","unlock","getTypographyClassesAndStyles","attributes","settings","kebabCase","typographyStyles","style","typography","fluidTypographySettings","fontSize","size","fontFamilyClassName","fontFamily","className"],"sources":["@wordpress/block-editor/src/hooks/use-typography-props.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport { getFontSizeClass } from '../components/font-sizes';\nimport {\n\tgetTypographyFontSizeValue,\n\tgetFluidTypographyOptionsFromSettings,\n} from '../components/global-styles/typography-utils';\nimport { unlock } from '../lock-unlock';\n\n/*\n * This utility is intended to assist where the serialization of the typography\n * block support is being skipped for a block but the typography related CSS\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 typography support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n * @param {Object|boolean} settings Merged theme.json settings\n *\n * @return {Object} Typography block support derived CSS classes & styles.\n */\nexport function getTypographyClassesAndStyles( attributes, settings ) {\n\tconst { kebabCase } = unlock( componentsPrivateApis );\n\tlet typographyStyles = attributes?.style?.typography || {};\n\tconst fluidTypographySettings =\n\t\tgetFluidTypographyOptionsFromSettings( settings );\n\n\ttypographyStyles = {\n\t\t...typographyStyles,\n\t\tfontSize: getTypographyFontSizeValue(\n\t\t\t{ size: attributes?.style?.typography?.fontSize },\n\t\t\tfluidTypographySettings\n\t\t),\n\t};\n\n\tconst style = getInlineStyles( { typography: typographyStyles } );\n\tconst fontFamilyClassName = !! attributes?.fontFamily\n\t\t? `has-${ kebabCase( attributes.fontFamily ) }-font-family`\n\t\t: '';\n\n\tconst className = classnames(\n\t\tfontFamilyClassName,\n\t\tgetFontSizeClass( attributes?.fontSize )\n\t);\n\n\treturn {\n\t\tclassName,\n\t\tstyle,\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,WAAW,IAAIC,qBAAqB,QAAQ,uBAAuB;;AAE5E;AACA;AACA;AACA,SAASC,eAAe,QAAQ,SAAS;AACzC,SAASC,gBAAgB,QAAQ,0BAA0B;AAC3D,SACCC,0BAA0B,EAC1BC,qCAAqC,QAC/B,8CAA8C;AACrD,SAASC,MAAM,QAAQ,gBAAgB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,6BAA6BA,CAAEC,UAAU,EAAEC,QAAQ,EAAG;EACrE,MAAM;IAAEC;EAAU,CAAC,GAAGJ,MAAM,CAAEL,qBAAsB,CAAC;EACrD,IAAIU,gBAAgB,GAAGH,UAAU,EAAEI,KAAK,EAAEC,UAAU,IAAI,CAAC,CAAC;EAC1D,MAAMC,uBAAuB,GAC5BT,qCAAqC,CAAEI,QAAS,CAAC;EAElDE,gBAAgB,GAAG;IAClB,GAAGA,gBAAgB;IACnBI,QAAQ,EAAEX,0BAA0B,CACnC;MAAEY,IAAI,EAAER,UAAU,EAAEI,KAAK,EAAEC,UAAU,EAAEE;IAAS,CAAC,EACjDD,uBACD;EACD,CAAC;EAED,MAAMF,KAAK,GAAGV,eAAe,CAAE;IAAEW,UAAU,EAAEF;EAAiB,CAAE,CAAC;EACjE,MAAMM,mBAAmB,GAAG,CAAC,CAAET,UAAU,EAAEU,UAAU,GACjD,OAAOR,SAAS,CAAEF,UAAU,CAACU,UAAW,CAAG,cAAa,GACzD,EAAE;EAEL,MAAMC,SAAS,GAAGpB,UAAU,CAC3BkB,mBAAmB,EACnBd,gBAAgB,CAAEK,UAAU,EAAEO,QAAS,CACxC,CAAC;EAED,OAAO;IACNI,SAAS;IACTP;EACD,CAAC;AACF"}
@@ -133,9 +133,13 @@ export function useStyleOverride({
133
133
  * @return {Object} Settings object.
134
134
  */
135
135
  export function useBlockSettings(name, parentLayout) {
136
- const [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('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');
136
+ 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] = 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');
137
137
  const rawSettings = useMemo(() => {
138
138
  return {
139
+ background: {
140
+ backgroundImage,
141
+ backgroundSize
142
+ },
139
143
  color: {
140
144
  palette: {
141
145
  custom: customColors,
@@ -202,7 +206,7 @@ export function useBlockSettings(name, parentLayout) {
202
206
  layout,
203
207
  parentLayout
204
208
  };
205
- }, [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]);
209
+ }, [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]);
206
210
  return useSettingsForBlockElement(rawSettings, name);
207
211
  }
208
212
  export function createBlockEditFilter(features) {
@@ -244,6 +248,7 @@ export function createBlockEditFilter(features) {
244
248
  , {
245
249
  key: i,
246
250
  name: props.name,
251
+ isSelected: props.isSelected,
247
252
  clientId: props.clientId,
248
253
  setAttributes: props.setAttributes,
249
254
  __unstableParentLayout: props.__unstableParentLayout
@@ -299,10 +304,10 @@ export function createBlockListBlockFilter(features) {
299
304
  neededProps[key] = props.attributes[key];
300
305
  }
301
306
  }
302
- if (!hasSupport(props.name) ||
307
+ if (
303
308
  // Skip rendering if none of the needed attributes are
304
309
  // set.
305
- !Object.keys(neededProps).length) {
310
+ !Object.keys(neededProps).length || !hasSupport(props.name)) {
306
311
  return null;
307
312
  }
308
313
  return createElement(BlockPropsPure
@@ -340,4 +345,38 @@ export function createBlockListBlockFilter(features) {
340
345
  }, 'withBlockListBlockHooks');
341
346
  addFilter('editor.BlockListBlock', 'core/editor/hooks', withBlockListBlockHooks);
342
347
  }
348
+ export function createBlockSaveFilter(features) {
349
+ function extraPropsFromHooks(props, name, attributes) {
350
+ return features.reduce((accu, feature) => {
351
+ const {
352
+ hasSupport,
353
+ attributeKeys = [],
354
+ addSaveProps
355
+ } = feature;
356
+ const neededAttributes = {};
357
+ for (const key of attributeKeys) {
358
+ if (attributes[key]) {
359
+ neededAttributes[key] = attributes[key];
360
+ }
361
+ }
362
+ if (
363
+ // Skip rendering if none of the needed attributes are
364
+ // set.
365
+ !Object.keys(neededAttributes).length || !hasSupport(name)) {
366
+ return accu;
367
+ }
368
+ return addSaveProps(accu, name, neededAttributes);
369
+ }, props);
370
+ }
371
+ addFilter('blocks.getSaveContent.extraProps', 'core/editor/hooks', extraPropsFromHooks, 0);
372
+ addFilter('blocks.getSaveContent.extraProps', 'core/editor/hooks', props => {
373
+ // Previously we had a filter deleting the className if it was an empty
374
+ // string. That filter is no longer running, so now we need to delete it
375
+ // here.
376
+ if (props.hasOwnProperty('className') && !props.className) {
377
+ delete props.className;
378
+ }
379
+ return props;
380
+ });
381
+ }
343
382
  //# sourceMappingURL=utils.js.map
@@ -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","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","rawSettings","color","palette","custom","theme","default","gradients","duotone","customGradient","background","link","heading","button","text","typography","spacing","border","radius","style","width","dimensions","createBlockEditFilter","features","settings","Edit","edit","withBlockEditHooks","OriginalBlockEdit","props","context","i","hasSupport","attributeKeys","shareWithChildBlocks","shouldDisplayControls","neededProps","createElement","clientId","setAttributes","__unstableParentLayout","BlockProps","useBlockProps","setAllWrapperProps","wrapperProps","setWrapperProps","next","prev","nextAll","BlockPropsPure","createBlockListBlockFilter","withBlockListBlockHooks","BlockListBlock","allWrapperProps","fill","keys","Boolean","reduce","acc","className"],"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\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'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\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\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\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\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! hasSupport( props.name ) ||\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) {\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"],"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,YAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,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,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AK,CAAC/F,UAAU,CAAElB,GAAG,CAAE;QAC7C;MACD;MAEA,IACC,CAAEoH,UAAU,CAAEH,KAAK,CAACxE,IAAK,CAAC;MAC1B;MACA;MACA,CAAE5C,MAAM,CAAC8I,IAAI,CAAEnB,WAAY,CAAC,CAACpH,MAAM,EAClC;QACD,OAAO,IAAI;MACZ;MAEA,OACCqH,aAAA,CAACY;MACA;MACA;MAAA;QACArI,GAAG,EAAGmH,CAAG;QACTxG,KAAK,EAAGwG,CAAG;QACXW,aAAa,EAAGA;QAChB;QACA;QAAA;QACAC,kBAAkB,EAAGA,kBAAoB;QACzCtF,IAAI,EAAGwE,KAAK,CAACxE;QACb;QACA;QAAA;QAAA,GACK+E;MAAW,CAChB,CAAC;IAEJ,CAAE,CAAC,EACHC,aAAA,CAACe,cAAc;MACdxI,GAAG,EAAC,MAAM;MAAA,GACLiH,KAAK;MACVe,YAAY,EAAGS,eAAe,CAC5BvI,MAAM,CAAE0I,OAAQ,CAAC,CACjBC,MAAM,CAAE,CAAEC,GAAG,EAAEd,YAAY,KAAM;QACjC,OAAO;UACN,GAAGc,GAAG;UACN,GAAGd,YAAY;UACfe,SAAS,EAAExJ,UAAU,CACpBuJ,GAAG,CAACC,SAAS,EACbf,YAAY,CAACe,SACd,CAAC;UACDxC,KAAK,EAAE;YACN,GAAGuC,GAAG,CAACvC,KAAK;YACZ,GAAGyB,YAAY,CAACzB;UACjB;QACD,CAAC;MACF,CAAC,EAAEU,KAAK,CAACe,YAAY,IAAI,CAAC,CAAE;IAAG,CAChC,CAAC,CACF;EACF,CAAC,EACD,yBACD,CAAC;EACDpJ,SAAS,CACR,uBAAuB,EACvB,mBAAmB,EACnB2J,uBACD,CAAC;AACF"}
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","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","rawSettings","background","color","palette","custom","theme","default","gradients","duotone","customGradient","link","heading","button","text","typography","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\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":";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,YAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,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,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BAAmBA,CAAEjC,KAAK,EAAE1E,IAAI,EAAEvB,UAAU,EAAG;IACvD,OAAO2F,QAAQ,CAACmC,MAAM,CAAE,CAAEK,IAAI,EAAE1H,OAAO,KAAM;MAC5C,MAAM;QAAE2F,UAAU;QAAEC,aAAa,GAAG,EAAE;QAAE+B;MAAa,CAAC,GAAG3H,OAAO;MAEhE,MAAM4H,gBAAgB,GAAG,CAAC,CAAC;MAC3B,KAAM,MAAMvJ,GAAG,IAAIuH,aAAa,EAAG;QAClC,IAAKrG,UAAU,CAAElB,GAAG,CAAE,EAAG;UACxBuJ,gBAAgB,CAAEvJ,GAAG,CAAE,GAAGkB,UAAU,CAAElB,GAAG,CAAE;QAC5C;MACD;MAEA;MACC;MACA;MACA,CAAEH,MAAM,CAACiJ,IAAI,CAAES,gBAAiB,CAAC,CAACnJ,MAAM,IACxC,CAAEkH,UAAU,CAAE7E,IAAK,CAAC,EACnB;QACD,OAAO4G,IAAI;MACZ;MAEA,OAAOC,YAAY,CAAED,IAAI,EAAE5G,IAAI,EAAE8G,gBAAiB,CAAC;IACpD,CAAC,EAAEpC,KAAM,CAAC;EACX;EACAvI,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACnBwK,mBAAmB,EACnB,CACD,CAAC;EACDxK,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACjBuI,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"}
@@ -5,12 +5,11 @@ import * as globalStyles from './components/global-styles';
5
5
  import { ExperimentalBlockEditorProvider } from './components/provider';
6
6
  import { lock } from './lock-unlock';
7
7
  import { getRichTextValues } from './components/rich-text/get-rich-text-values';
8
- import { kebabCase } from './utils/object';
9
8
  import ResizableBoxPopover from './components/resizable-box-popover';
10
9
  import { ComposedPrivateInserter as PrivateInserter } from './components/inserter';
11
10
  import { PrivateListView } from './components/list-view';
12
11
  import BlockInfo from './components/block-info-slot-fill';
13
- import { useShouldContextualToolbarShow } from './utils/use-should-contextual-toolbar-show';
12
+ import { useCanBlockToolbarBeFocused } from './utils/use-can-block-toolbar-be-focused';
14
13
  import { cleanEmptyObject, useStyleOverride } from './hooks/utils';
15
14
  import BlockQuickNavigation from './components/block-quick-navigation';
16
15
  import { LayoutStyle } from './components/block-list/layout';
@@ -33,12 +32,11 @@ lock(privateApis, {
33
32
  ExperimentalBlockEditorProvider,
34
33
  getDuotoneFilter,
35
34
  getRichTextValues,
36
- kebabCase,
37
35
  PrivateInserter,
38
36
  PrivateListView,
39
37
  ResizableBoxPopover,
40
38
  BlockInfo,
41
- useShouldContextualToolbarShow,
39
+ useCanBlockToolbarBeFocused,
42
40
  cleanEmptyObject,
43
41
  useStyleOverride,
44
42
  BlockQuickNavigation,
@@ -1 +1 @@
1
- {"version":3,"names":["globalStyles","ExperimentalBlockEditorProvider","lock","getRichTextValues","kebabCase","ResizableBoxPopover","ComposedPrivateInserter","PrivateInserter","PrivateListView","BlockInfo","useShouldContextualToolbarShow","cleanEmptyObject","useStyleOverride","BlockQuickNavigation","LayoutStyle","BlockRemovalWarningModal","useLayoutClasses","useLayoutStyles","DimensionsTool","ResolutionTool","default","ReusableBlocksRenameHint","useReusableBlocksRenameHint","usesContextKey","ExperimentalBlockCanvas","getDuotoneFilter","privateApis"],"sources":["@wordpress/block-editor/src/private-apis.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport * as globalStyles from './components/global-styles';\nimport { ExperimentalBlockEditorProvider } from './components/provider';\nimport { lock } from './lock-unlock';\nimport { getRichTextValues } from './components/rich-text/get-rich-text-values';\nimport { kebabCase } from './utils/object';\nimport ResizableBoxPopover from './components/resizable-box-popover';\nimport { ComposedPrivateInserter as PrivateInserter } from './components/inserter';\nimport { PrivateListView } from './components/list-view';\nimport BlockInfo from './components/block-info-slot-fill';\nimport { useShouldContextualToolbarShow } from './utils/use-should-contextual-toolbar-show';\nimport { cleanEmptyObject, useStyleOverride } from './hooks/utils';\nimport BlockQuickNavigation from './components/block-quick-navigation';\nimport { LayoutStyle } from './components/block-list/layout';\nimport { BlockRemovalWarningModal } from './components/block-removal-warning-modal';\nimport { useLayoutClasses, useLayoutStyles } from './hooks';\nimport DimensionsTool from './components/dimensions-tool';\nimport ResolutionTool from './components/resolution-tool';\nimport {\n\tdefault as ReusableBlocksRenameHint,\n\tuseReusableBlocksRenameHint,\n} from './components/inserter/reusable-block-rename-hint';\nimport { usesContextKey } from './components/rich-text/format-edit';\nimport { ExperimentalBlockCanvas } from './components/block-canvas';\nimport { getDuotoneFilter } from './components/duotone/utils';\n\n/**\n * Private @wordpress/block-editor APIs.\n */\nexport const privateApis = {};\nlock( privateApis, {\n\t...globalStyles,\n\tExperimentalBlockCanvas,\n\tExperimentalBlockEditorProvider,\n\tgetDuotoneFilter,\n\tgetRichTextValues,\n\tkebabCase,\n\tPrivateInserter,\n\tPrivateListView,\n\tResizableBoxPopover,\n\tBlockInfo,\n\tuseShouldContextualToolbarShow,\n\tcleanEmptyObject,\n\tuseStyleOverride,\n\tBlockQuickNavigation,\n\tLayoutStyle,\n\tBlockRemovalWarningModal,\n\tuseLayoutClasses,\n\tuseLayoutStyles,\n\tDimensionsTool,\n\tResolutionTool,\n\tReusableBlocksRenameHint,\n\tuseReusableBlocksRenameHint,\n\tusesContextKey,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,YAAY,MAAM,4BAA4B;AAC1D,SAASC,+BAA+B,QAAQ,uBAAuB;AACvE,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,iBAAiB,QAAQ,6CAA6C;AAC/E,SAASC,SAAS,QAAQ,gBAAgB;AAC1C,OAAOC,mBAAmB,MAAM,oCAAoC;AACpE,SAASC,uBAAuB,IAAIC,eAAe,QAAQ,uBAAuB;AAClF,SAASC,eAAe,QAAQ,wBAAwB;AACxD,OAAOC,SAAS,MAAM,mCAAmC;AACzD,SAASC,8BAA8B,QAAQ,4CAA4C;AAC3F,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,eAAe;AAClE,OAAOC,oBAAoB,MAAM,qCAAqC;AACtE,SAASC,WAAW,QAAQ,gCAAgC;AAC5D,SAASC,wBAAwB,QAAQ,0CAA0C;AACnF,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,SAAS;AAC3D,OAAOC,cAAc,MAAM,8BAA8B;AACzD,OAAOC,cAAc,MAAM,8BAA8B;AACzD,SACCC,OAAO,IAAIC,wBAAwB,EACnCC,2BAA2B,QACrB,kDAAkD;AACzD,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,gBAAgB,QAAQ,4BAA4B;;AAE7D;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,CAAC,CAAC;AAC7BxB,IAAI,CAAEwB,WAAW,EAAE;EAClB,GAAG1B,YAAY;EACfwB,uBAAuB;EACvBvB,+BAA+B;EAC/BwB,gBAAgB;EAChBtB,iBAAiB;EACjBC,SAAS;EACTG,eAAe;EACfC,eAAe;EACfH,mBAAmB;EACnBI,SAAS;EACTC,8BAA8B;EAC9BC,gBAAgB;EAChBC,gBAAgB;EAChBC,oBAAoB;EACpBC,WAAW;EACXC,wBAAwB;EACxBC,gBAAgB;EAChBC,eAAe;EACfC,cAAc;EACdC,cAAc;EACdE,wBAAwB;EACxBC,2BAA2B;EAC3BC;AACD,CAAE,CAAC"}
1
+ {"version":3,"names":["globalStyles","ExperimentalBlockEditorProvider","lock","getRichTextValues","ResizableBoxPopover","ComposedPrivateInserter","PrivateInserter","PrivateListView","BlockInfo","useCanBlockToolbarBeFocused","cleanEmptyObject","useStyleOverride","BlockQuickNavigation","LayoutStyle","BlockRemovalWarningModal","useLayoutClasses","useLayoutStyles","DimensionsTool","ResolutionTool","default","ReusableBlocksRenameHint","useReusableBlocksRenameHint","usesContextKey","ExperimentalBlockCanvas","getDuotoneFilter","privateApis"],"sources":["@wordpress/block-editor/src/private-apis.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport * as globalStyles from './components/global-styles';\nimport { ExperimentalBlockEditorProvider } from './components/provider';\nimport { lock } from './lock-unlock';\nimport { getRichTextValues } from './components/rich-text/get-rich-text-values';\nimport ResizableBoxPopover from './components/resizable-box-popover';\nimport { ComposedPrivateInserter as PrivateInserter } from './components/inserter';\nimport { PrivateListView } from './components/list-view';\nimport BlockInfo from './components/block-info-slot-fill';\nimport { useCanBlockToolbarBeFocused } from './utils/use-can-block-toolbar-be-focused';\nimport { cleanEmptyObject, useStyleOverride } from './hooks/utils';\nimport BlockQuickNavigation from './components/block-quick-navigation';\nimport { LayoutStyle } from './components/block-list/layout';\nimport { BlockRemovalWarningModal } from './components/block-removal-warning-modal';\nimport { useLayoutClasses, useLayoutStyles } from './hooks';\nimport DimensionsTool from './components/dimensions-tool';\nimport ResolutionTool from './components/resolution-tool';\nimport {\n\tdefault as ReusableBlocksRenameHint,\n\tuseReusableBlocksRenameHint,\n} from './components/inserter/reusable-block-rename-hint';\nimport { usesContextKey } from './components/rich-text/format-edit';\nimport { ExperimentalBlockCanvas } from './components/block-canvas';\nimport { getDuotoneFilter } from './components/duotone/utils';\n\n/**\n * Private @wordpress/block-editor APIs.\n */\nexport const privateApis = {};\nlock( privateApis, {\n\t...globalStyles,\n\tExperimentalBlockCanvas,\n\tExperimentalBlockEditorProvider,\n\tgetDuotoneFilter,\n\tgetRichTextValues,\n\tPrivateInserter,\n\tPrivateListView,\n\tResizableBoxPopover,\n\tBlockInfo,\n\tuseCanBlockToolbarBeFocused,\n\tcleanEmptyObject,\n\tuseStyleOverride,\n\tBlockQuickNavigation,\n\tLayoutStyle,\n\tBlockRemovalWarningModal,\n\tuseLayoutClasses,\n\tuseLayoutStyles,\n\tDimensionsTool,\n\tResolutionTool,\n\tReusableBlocksRenameHint,\n\tuseReusableB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,2BAA2B;EAC3BC;AACD,CAAE,CAAC"}
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import * as globalStyles from './components/global-styles';
5
5
  import { ExperimentalBlockEditorProvider } from './components/provider';
6
- import { kebabCase } from './utils/object';
7
6
  import { lock } from './lock-unlock';
8
7
 
9
8
  /**
@@ -12,7 +11,6 @@ import { lock } from './lock-unlock';
12
11
  export const privateApis = {};
13
12
  lock(privateApis, {
14
13
  ...globalStyles,
15
- kebabCase,
16
14
  ExperimentalBlockEditorProvider
17
15
  });
18
16
  //# sourceMappingURL=private-apis.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["globalStyles","ExperimentalBlockEditorProvider","kebabCase","lock","privateApis"],"sources":["@wordpress/block-editor/src/private-apis.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport * as globalStyles from './components/global-styles';\nimport { ExperimentalBlockEditorProvider } from './components/provider';\nimport { kebabCase } from './utils/object';\nimport { lock } from './lock-unlock';\n\n/**\n * Private @wordpress/block-editor APIs.\n */\nexport const privateApis = {};\nlock( privateApis, {\n\t...globalStyles,\n\tkebabCase,\n\tExperimentalBlockEditorProvider,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,YAAY,MAAM,4BAA4B;AAC1D,SAASC,+BAA+B,QAAQ,uBAAuB;AACvE,SAASC,SAAS,QAAQ,gBAAgB;AAC1C,SAASC,IAAI,QAAQ,eAAe;;AAEpC;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,CAAC,CAAC;AAC7BD,IAAI,CAAEC,WAAW,EAAE;EAClB,GAAGJ,YAAY;EACfE,SAAS;EACTD;AACD,CAAE,CAAC"}
1
+ {"version":3,"names":["globalStyles","ExperimentalBlockEditorProvider","lock","privateApis"],"sources":["@wordpress/block-editor/src/private-apis.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport * as globalStyles from './components/global-styles';\nimport { ExperimentalBlockEditorProvider } from './components/provider';\nimport { lock } from './lock-unlock';\n\n/**\n * Private @wordpress/block-editor APIs.\n */\nexport const privateApis = {};\nlock( privateApis, {\n\t...globalStyles,\n\tExperimentalBlockEditorProvider,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,YAAY,MAAM,4BAA4B;AAC1D,SAASC,+BAA+B,QAAQ,uBAAuB;AACvE,SAASC,IAAI,QAAQ,eAAe;;AAEpC;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,CAAC,CAAC;AAC7BD,IAAI,CAAEC,WAAW,EAAE;EAClB,GAAGH,YAAY;EACfC;AACD,CAAE,CAAC"}
@@ -1651,19 +1651,4 @@ export function unsetBlockEditingMode(clientId = '') {
1651
1651
  clientId
1652
1652
  };
1653
1653
  }
1654
-
1655
- /**
1656
- * Action that sets the element that had focus when focus leaves the editor canvas.
1657
- *
1658
- * @param {Object} lastFocus The last focused element.
1659
- *
1660
- *
1661
- * @return {Object} Action object.
1662
- */
1663
- export function setLastFocus(lastFocus = null) {
1664
- return {
1665
- type: 'LAST_FOCUS',
1666
- lastFocus
1667
- };
1668
- }
1669
1654
  //# sourceMappingURL=actions.js.map