@wordpress/block-editor 12.10.2 → 12.11.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 (1275) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +13 -11
  3. package/build/autocompleters/block.js +3 -2
  4. package/build/autocompleters/block.js.map +1 -1
  5. package/build/autocompleters/link.js +3 -3
  6. package/build/autocompleters/link.js.map +1 -1
  7. package/build/components/alignment-control/index.js +3 -3
  8. package/build/components/alignment-control/index.js.map +1 -1
  9. package/build/components/alignment-control/ui.js +2 -2
  10. package/build/components/alignment-control/ui.js.map +1 -1
  11. package/build/components/autocomplete/index.js +3 -2
  12. package/build/components/autocomplete/index.js.map +1 -1
  13. package/build/components/block-actions/index.js +2 -2
  14. package/build/components/block-actions/index.js.map +1 -1
  15. package/build/components/block-alignment-control/index.js +3 -3
  16. package/build/components/block-alignment-control/index.js.map +1 -1
  17. package/build/components/block-alignment-control/ui.js +4 -4
  18. package/build/components/block-alignment-control/ui.js.map +1 -1
  19. package/build/components/block-alignment-control/ui.native.js +2 -2
  20. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  21. package/build/components/block-alignment-matrix-control/index.js +5 -5
  22. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  23. package/build/components/block-breadcrumb/index.js +12 -12
  24. package/build/components/block-breadcrumb/index.js.map +1 -1
  25. package/build/components/block-canvas/index.js +13 -15
  26. package/build/components/block-canvas/index.js.map +1 -1
  27. package/build/components/block-caption/index.native.js +3 -3
  28. package/build/components/block-caption/index.native.js.map +1 -1
  29. package/build/components/block-card/index.js +7 -7
  30. package/build/components/block-card/index.js.map +1 -1
  31. package/build/components/block-compare/block-view.js +9 -8
  32. package/build/components/block-compare/block-view.js.map +1 -1
  33. package/build/components/block-compare/index.js +5 -5
  34. package/build/components/block-compare/index.js.map +1 -1
  35. package/build/components/block-context/index.js +2 -1
  36. package/build/components/block-context/index.js.map +1 -1
  37. package/build/components/block-controls/fill.js +5 -5
  38. package/build/components/block-controls/fill.js.map +1 -1
  39. package/build/components/block-controls/index.js +3 -3
  40. package/build/components/block-controls/index.js.map +1 -1
  41. package/build/components/block-controls/slot.js +3 -2
  42. package/build/components/block-controls/slot.js.map +1 -1
  43. package/build/components/block-controls/slot.native.js +4 -4
  44. package/build/components/block-controls/slot.native.js.map +1 -1
  45. package/build/components/block-draggable/draggable-chip.js +6 -6
  46. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  47. package/build/components/block-draggable/draggable-chip.native.js +4 -4
  48. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  49. package/build/components/block-draggable/dropping-insertion-point.native.js +2 -2
  50. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  51. package/build/components/block-draggable/index.js +4 -3
  52. package/build/components/block-draggable/index.js.map +1 -1
  53. package/build/components/block-draggable/index.native.js +9 -8
  54. package/build/components/block-draggable/index.native.js.map +1 -1
  55. package/build/components/block-edit/edit.js +5 -4
  56. package/build/components/block-edit/edit.js.map +1 -1
  57. package/build/components/block-edit/edit.native.js +3 -2
  58. package/build/components/block-edit/edit.native.js.map +1 -1
  59. package/build/components/block-edit/index.js +3 -2
  60. package/build/components/block-edit/index.js.map +1 -1
  61. package/build/components/block-edit-visually-button/index.js +2 -2
  62. package/build/components/block-edit-visually-button/index.js.map +1 -1
  63. package/build/components/block-full-height-alignment-control/index.js +2 -2
  64. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  65. package/build/components/block-heading-level-dropdown/heading-level-icon.js +4 -4
  66. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  67. package/build/components/block-heading-level-dropdown/index.js +6 -6
  68. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  69. package/build/components/block-heading-level-dropdown/index.native.js +6 -6
  70. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  71. package/build/components/block-icon/index.js +4 -3
  72. package/build/components/block-icon/index.js.map +1 -1
  73. package/build/components/block-icon/index.native.js +3 -3
  74. package/build/components/block-icon/index.native.js.map +1 -1
  75. package/build/components/block-info-slot-fill/index.js +3 -3
  76. package/build/components/block-info-slot-fill/index.js.map +1 -1
  77. package/build/components/block-inspector/index.js +34 -34
  78. package/build/components/block-inspector/index.js.map +1 -1
  79. package/build/components/block-list/block-crash-warning.js +2 -2
  80. package/build/components/block-list/block-crash-warning.js.map +1 -1
  81. package/build/components/block-list/block-html.js +3 -2
  82. package/build/components/block-list/block-html.js.map +1 -1
  83. package/build/components/block-list/block-invalid-warning.js +6 -5
  84. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  85. package/build/components/block-list/block-invalid-warning.native.js +3 -3
  86. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  87. package/build/components/block-list/block-list-item-cell.native.js +3 -2
  88. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  89. package/build/components/block-list/block-list-item.native.js +10 -10
  90. package/build/components/block-list/block-list-item.native.js.map +1 -1
  91. package/build/components/block-list/block-outline.native.js +2 -2
  92. package/build/components/block-list/block-outline.native.js.map +1 -1
  93. package/build/components/block-list/block-selection-button.native.js +9 -9
  94. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  95. package/build/components/block-list/block.js +16 -15
  96. package/build/components/block-list/block.js.map +1 -1
  97. package/build/components/block-list/block.native.js +10 -9
  98. package/build/components/block-list/block.native.js.map +1 -1
  99. package/build/components/block-list/grid-item.native.js +2 -2
  100. package/build/components/block-list/grid-item.native.js.map +1 -1
  101. package/build/components/block-list/index.js +14 -13
  102. package/build/components/block-list/index.js.map +1 -1
  103. package/build/components/block-list/index.native.js +21 -20
  104. package/build/components/block-list/index.native.js.map +1 -1
  105. package/build/components/block-list/insertion-point.native.js +5 -5
  106. package/build/components/block-list/insertion-point.native.js.map +1 -1
  107. package/build/components/block-list/layout.js +3 -2
  108. package/build/components/block-list/layout.js.map +1 -1
  109. package/build/components/block-list/subdirectory-icon.js +3 -3
  110. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  111. package/build/components/block-list-appender/index.js +5 -5
  112. package/build/components/block-list-appender/index.js.map +1 -1
  113. package/build/components/block-list-appender/index.native.js +4 -4
  114. package/build/components/block-list-appender/index.native.js.map +1 -1
  115. package/build/components/block-lock/menu-item.js +4 -3
  116. package/build/components/block-lock/menu-item.js.map +1 -1
  117. package/build/components/block-lock/modal.js +21 -20
  118. package/build/components/block-lock/modal.js.map +1 -1
  119. package/build/components/block-lock/toolbar.js +5 -4
  120. package/build/components/block-lock/toolbar.js.map +1 -1
  121. package/build/components/block-media-update-progress/index.native.js +5 -4
  122. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  123. package/build/components/block-mover/button.js +6 -5
  124. package/build/components/block-mover/button.js.map +1 -1
  125. package/build/components/block-mover/index.js +7 -7
  126. package/build/components/block-mover/index.js.map +1 -1
  127. package/build/components/block-mover/index.native.js +5 -4
  128. package/build/components/block-mover/index.native.js.map +1 -1
  129. package/build/components/block-navigation/dropdown.js +8 -7
  130. package/build/components/block-navigation/dropdown.js.map +1 -1
  131. package/build/components/block-parent-selector/index.js +6 -5
  132. package/build/components/block-parent-selector/index.js.map +1 -1
  133. package/build/components/block-pattern-setup/index.js +20 -19
  134. package/build/components/block-pattern-setup/index.js.map +1 -1
  135. package/build/components/block-pattern-setup/setup-toolbar.js +12 -12
  136. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  137. package/build/components/block-patterns-list/index.js +19 -18
  138. package/build/components/block-patterns-list/index.js.map +1 -1
  139. package/build/components/block-patterns-paging/index.js +12 -12
  140. package/build/components/block-patterns-paging/index.js.map +1 -1
  141. package/build/components/block-popover/drop-zone.js +3 -3
  142. package/build/components/block-popover/drop-zone.js.map +1 -1
  143. package/build/components/block-popover/inbetween.js +4 -3
  144. package/build/components/block-popover/inbetween.js.map +1 -1
  145. package/build/components/block-popover/index.js +4 -3
  146. package/build/components/block-popover/index.js.map +1 -1
  147. package/build/components/block-preview/auto.js +9 -8
  148. package/build/components/block-preview/auto.js.map +1 -1
  149. package/build/components/block-preview/index.js +7 -6
  150. package/build/components/block-preview/index.js.map +1 -1
  151. package/build/components/block-quick-navigation/index.js +7 -7
  152. package/build/components/block-quick-navigation/index.js.map +1 -1
  153. package/build/components/block-removal-warning-modal/index.js +7 -6
  154. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  155. package/build/components/block-selection-clearer/index.js +2 -2
  156. package/build/components/block-selection-clearer/index.js.map +1 -1
  157. package/build/components/block-settings/button.native.js +3 -3
  158. package/build/components/block-settings/button.native.js.map +1 -1
  159. package/build/components/block-settings/container.native.js +12 -12
  160. package/build/components/block-settings/container.native.js.map +1 -1
  161. package/build/components/block-settings-menu/block-html-convert-button.js +21 -17
  162. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  163. package/build/components/block-settings-menu/block-mode-toggle.js +2 -2
  164. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  165. package/build/components/block-settings-menu/block-settings-dropdown.js +17 -16
  166. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  167. package/build/components/block-settings-menu/index.js +2 -2
  168. package/build/components/block-settings-menu/index.js.map +1 -1
  169. package/build/components/block-settings-menu-controls/index.js +9 -9
  170. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  171. package/build/components/block-styles/index.js +9 -8
  172. package/build/components/block-styles/index.js.map +1 -1
  173. package/build/components/block-styles/index.native.js +4 -3
  174. package/build/components/block-styles/index.native.js.map +1 -1
  175. package/build/components/block-styles/menu-items.js +4 -4
  176. package/build/components/block-styles/menu-items.js.map +1 -1
  177. package/build/components/block-styles/preview-panel.js +3 -2
  178. package/build/components/block-styles/preview-panel.js.map +1 -1
  179. package/build/components/block-styles/preview.native.js +8 -7
  180. package/build/components/block-styles/preview.native.js.map +1 -1
  181. package/build/components/block-switcher/block-styles-menu.js +3 -3
  182. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  183. package/build/components/block-switcher/block-transformations-menu.js +11 -10
  184. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  185. package/build/components/block-switcher/block-transformations-menu.native.js +2 -2
  186. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  187. package/build/components/block-switcher/block-variation-transformations.js +6 -5
  188. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  189. package/build/components/block-switcher/index.js +17 -17
  190. package/build/components/block-switcher/index.js.map +1 -1
  191. package/build/components/block-switcher/pattern-transformations-menu.js +18 -17
  192. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  193. package/build/components/block-switcher/preview-block-popover.js +7 -7
  194. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  195. package/build/components/block-toolbar/block-toolbar-menu.native.js +6 -5
  196. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  197. package/build/components/block-toolbar/index.js +16 -15
  198. package/build/components/block-toolbar/index.js.map +1 -1
  199. package/build/components/block-toolbar/index.native.js +8 -7
  200. package/build/components/block-toolbar/index.native.js.map +1 -1
  201. package/build/components/block-tools/back-compat.js +3 -2
  202. package/build/components/block-tools/back-compat.js.map +1 -1
  203. package/build/components/block-tools/block-contextual-toolbar.js +6 -5
  204. package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
  205. package/build/components/block-tools/block-selection-button.js +11 -10
  206. package/build/components/block-tools/block-selection-button.js.map +1 -1
  207. package/build/components/block-tools/index.js +10 -9
  208. package/build/components/block-tools/index.js.map +1 -1
  209. package/build/components/block-tools/insertion-point.js +9 -8
  210. package/build/components/block-tools/insertion-point.js.map +1 -1
  211. package/build/components/block-tools/selected-block-popover.js +9 -8
  212. package/build/components/block-tools/selected-block-popover.js.map +1 -1
  213. package/build/components/block-tools/zoom-out-mode-inserters.js +5 -4
  214. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  215. package/build/components/block-types-list/index.js +4 -4
  216. package/build/components/block-types-list/index.js.map +1 -1
  217. package/build/components/block-types-list/index.native.js +11 -10
  218. package/build/components/block-types-list/index.native.js.map +1 -1
  219. package/build/components/block-variation-picker/index.js +8 -8
  220. package/build/components/block-variation-picker/index.js.map +1 -1
  221. package/build/components/block-variation-picker/index.native.js +8 -8
  222. package/build/components/block-variation-picker/index.native.js.map +1 -1
  223. package/build/components/block-variation-transforms/index.js +10 -9
  224. package/build/components/block-variation-transforms/index.js.map +1 -1
  225. package/build/components/block-vertical-alignment-control/icons.js +11 -11
  226. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  227. package/build/components/block-vertical-alignment-control/index.js +3 -3
  228. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  229. package/build/components/block-vertical-alignment-control/ui.js +2 -2
  230. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  231. package/build/components/border-radius-control/all-input-control.js +2 -2
  232. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  233. package/build/components/border-radius-control/index.js +10 -9
  234. package/build/components/border-radius-control/index.js.map +1 -1
  235. package/build/components/border-radius-control/input-controls.js +5 -5
  236. package/build/components/border-radius-control/input-controls.js.map +1 -1
  237. package/build/components/border-radius-control/linked-button.js +3 -3
  238. package/build/components/border-radius-control/linked-button.js.map +1 -1
  239. package/build/components/button-block-appender/index.js +7 -6
  240. package/build/components/button-block-appender/index.js.map +1 -1
  241. package/build/components/button-block-appender/index.native.js +5 -5
  242. package/build/components/button-block-appender/index.native.js.map +1 -1
  243. package/build/components/caption/index.native.js +3 -3
  244. package/build/components/caption/index.native.js.map +1 -1
  245. package/build/components/child-layout-control/index.js +8 -7
  246. package/build/components/child-layout-control/index.js.map +1 -1
  247. package/build/components/color-palette/control.js +2 -2
  248. package/build/components/color-palette/control.js.map +1 -1
  249. package/build/components/color-palette/with-color-context.js +2 -2
  250. package/build/components/color-palette/with-color-context.js.map +1 -1
  251. package/build/components/color-style-selector/index.js +9 -9
  252. package/build/components/color-style-selector/index.js.map +1 -1
  253. package/build/components/colors/with-colors.js +5 -4
  254. package/build/components/colors/with-colors.js.map +1 -1
  255. package/build/components/colors-gradients/control.js +12 -12
  256. package/build/components/colors-gradients/control.js.map +1 -1
  257. package/build/components/colors-gradients/dropdown.js +13 -13
  258. package/build/components/colors-gradients/dropdown.js.map +1 -1
  259. package/build/components/colors-gradients/panel-color-gradient-settings.js +7 -7
  260. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  261. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +5 -4
  262. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  263. package/build/components/contrast-checker/index.js +3 -3
  264. package/build/components/contrast-checker/index.js.map +1 -1
  265. package/build/components/contrast-checker/index.native.js +6 -5
  266. package/build/components/contrast-checker/index.native.js.map +1 -1
  267. package/build/components/convert-to-group-buttons/index.js +3 -3
  268. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  269. package/build/components/convert-to-group-buttons/toolbar.js +4 -4
  270. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  271. package/build/components/copy-handler/index.js +29 -209
  272. package/build/components/copy-handler/index.js.map +1 -1
  273. package/build/components/date-format-picker/index.js +9 -8
  274. package/build/components/date-format-picker/index.js.map +1 -1
  275. package/build/components/default-block-appender/index.js +4 -4
  276. package/build/components/default-block-appender/index.js.map +1 -1
  277. package/build/components/default-block-appender/index.native.js +4 -4
  278. package/build/components/default-block-appender/index.native.js.map +1 -1
  279. package/build/components/default-style-picker/index.js +4 -3
  280. package/build/components/default-style-picker/index.js.map +1 -1
  281. package/build/components/dimensions-tool/aspect-ratio-tool.js +3 -3
  282. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  283. package/build/components/dimensions-tool/index.js +5 -4
  284. package/build/components/dimensions-tool/index.js.map +1 -1
  285. package/build/components/dimensions-tool/scale-tool.js +6 -5
  286. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  287. package/build/components/dimensions-tool/width-height-tool.js +7 -7
  288. package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
  289. package/build/components/duotone-control/index.js +18 -10
  290. package/build/components/duotone-control/index.js.map +1 -1
  291. package/build/components/editable-text/index.js +3 -2
  292. package/build/components/editable-text/index.js.map +1 -1
  293. package/build/components/editor-styles/index.js +5 -4
  294. package/build/components/editor-styles/index.js.map +1 -1
  295. package/build/components/floating-toolbar/index.native.js +8 -7
  296. package/build/components/floating-toolbar/index.native.js.map +1 -1
  297. package/build/components/floating-toolbar/nav-up-icon.js +4 -4
  298. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  299. package/build/components/font-appearance-control/index.js +4 -3
  300. package/build/components/font-appearance-control/index.js.map +1 -1
  301. package/build/components/font-family/index.js +2 -2
  302. package/build/components/font-family/index.js.map +1 -1
  303. package/build/components/font-sizes/font-size-picker.js +2 -2
  304. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  305. package/build/components/font-sizes/with-font-sizes.js +4 -3
  306. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  307. package/build/components/global-styles/advanced-panel.js +7 -6
  308. package/build/components/global-styles/advanced-panel.js.map +1 -1
  309. package/build/components/global-styles/border-panel.js +8 -7
  310. package/build/components/global-styles/border-panel.js.map +1 -1
  311. package/build/components/global-styles/color-panel.js +21 -20
  312. package/build/components/global-styles/color-panel.js.map +1 -1
  313. package/build/components/global-styles/color-panel.native.js +4 -3
  314. package/build/components/global-styles/color-panel.native.js.map +1 -1
  315. package/build/components/global-styles/dimensions-panel.js +27 -26
  316. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  317. package/build/components/global-styles/effects-panel.js +23 -22
  318. package/build/components/global-styles/effects-panel.js.map +1 -1
  319. package/build/components/global-styles/filters-panel.js +17 -16
  320. package/build/components/global-styles/filters-panel.js.map +1 -1
  321. package/build/components/global-styles/hooks.js +1 -1
  322. package/build/components/global-styles/hooks.js.map +1 -1
  323. package/build/components/global-styles/image-settings-panel.js +4 -4
  324. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  325. package/build/components/global-styles/typography-panel.js +22 -21
  326. package/build/components/global-styles/typography-panel.js.map +1 -1
  327. package/build/components/global-styles/use-global-styles-output.js +17 -5
  328. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  329. package/build/components/global-styles/utils.js +22 -0
  330. package/build/components/global-styles/utils.js.map +1 -1
  331. package/build/components/gradients/with-gradient.js +2 -2
  332. package/build/components/gradients/with-gradient.js.map +1 -1
  333. package/build/components/height-control/index.js +9 -8
  334. package/build/components/height-control/index.js.map +1 -1
  335. package/build/components/iframe/index.js +6 -5
  336. package/build/components/iframe/index.js.map +1 -1
  337. package/build/components/image-editor/aspect-ratio-dropdown.js +7 -7
  338. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  339. package/build/components/image-editor/context.js +2 -1
  340. package/build/components/image-editor/context.js.map +1 -1
  341. package/build/components/image-editor/cropper.js +4 -4
  342. package/build/components/image-editor/cropper.js.map +1 -1
  343. package/build/components/image-editor/form-controls.js +3 -3
  344. package/build/components/image-editor/form-controls.js.map +1 -1
  345. package/build/components/image-editor/index.js +5 -5
  346. package/build/components/image-editor/index.js.map +1 -1
  347. package/build/components/image-editor/rotation-button.js +2 -2
  348. package/build/components/image-editor/rotation-button.js.map +1 -1
  349. package/build/components/image-editor/zoom-dropdown.js +4 -4
  350. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  351. package/build/components/image-size-control/index.js +9 -9
  352. package/build/components/image-size-control/index.js.map +1 -1
  353. package/build/components/index.js +1 -1
  354. package/build/components/index.js.map +1 -1
  355. package/build/components/inner-blocks/button-block-appender.js +2 -2
  356. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  357. package/build/components/inner-blocks/constants.native.js +13 -0
  358. package/build/components/inner-blocks/constants.native.js.map +1 -0
  359. package/build/components/inner-blocks/default-block-appender.js +2 -2
  360. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  361. package/build/components/inner-blocks/index.js +9 -8
  362. package/build/components/inner-blocks/index.js.map +1 -1
  363. package/build/components/inner-blocks/index.native.js +21 -8
  364. package/build/components/inner-blocks/index.native.js.map +1 -1
  365. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js +95 -0
  366. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -0
  367. package/build/components/inner-blocks/with-client-id.js +2 -2
  368. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  369. package/build/components/inserter/block-patterns-explorer/explorer.js +7 -6
  370. package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  371. package/build/components/inserter/block-patterns-explorer/patterns-list.js +6 -5
  372. package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
  373. package/build/components/inserter/block-patterns-explorer/sidebar.js +8 -8
  374. package/build/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
  375. package/build/components/inserter/block-patterns-filter.js +21 -19
  376. package/build/components/inserter/block-patterns-filter.js.map +1 -1
  377. package/build/components/inserter/block-patterns-tab.js +19 -18
  378. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  379. package/build/components/inserter/block-types-tab.js +10 -9
  380. package/build/components/inserter/block-types-tab.js.map +1 -1
  381. package/build/components/inserter/block-types-tab.native.js +2 -1
  382. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  383. package/build/components/inserter/index.js +9 -8
  384. package/build/components/inserter/index.js.map +1 -1
  385. package/build/components/inserter/index.native.js +11 -10
  386. package/build/components/inserter/index.native.js.map +1 -1
  387. package/build/components/inserter/library.js +3 -2
  388. package/build/components/inserter/library.js.map +1 -1
  389. package/build/components/inserter/media-tab/hooks.js +4 -33
  390. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  391. package/build/components/inserter/media-tab/media-list.js +3 -3
  392. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  393. package/build/components/inserter/media-tab/media-panel.js +7 -6
  394. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  395. package/build/components/inserter/media-tab/media-preview.js +18 -17
  396. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  397. package/build/components/inserter/media-tab/media-tab.js +12 -11
  398. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  399. package/build/components/inserter/media-tab/utils.js +2 -2
  400. package/build/components/inserter/media-tab/utils.js.map +1 -1
  401. package/build/components/inserter/menu.js +19 -18
  402. package/build/components/inserter/menu.js.map +1 -1
  403. package/build/components/inserter/menu.native.js +9 -8
  404. package/build/components/inserter/menu.native.js.map +1 -1
  405. package/build/components/inserter/mobile-tab-navigation.js +12 -12
  406. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  407. package/build/components/inserter/no-results.js +4 -4
  408. package/build/components/inserter/no-results.js.map +1 -1
  409. package/build/components/inserter/no-results.native.js +4 -4
  410. package/build/components/inserter/no-results.native.js.map +1 -1
  411. package/build/components/inserter/panel.js +5 -5
  412. package/build/components/inserter/panel.js.map +1 -1
  413. package/build/components/inserter/preview-panel.js +8 -7
  414. package/build/components/inserter/preview-panel.js.map +1 -1
  415. package/build/components/inserter/quick-inserter.js +7 -6
  416. package/build/components/inserter/quick-inserter.js.map +1 -1
  417. package/build/components/inserter/reusable-block-rename-hint.js +5 -4
  418. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  419. package/build/components/inserter/reusable-blocks-tab.native.js +3 -2
  420. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  421. package/build/components/inserter/search-results.js +11 -10
  422. package/build/components/inserter/search-results.js.map +1 -1
  423. package/build/components/inserter/search-results.native.js +4 -3
  424. package/build/components/inserter/search-results.native.js.map +1 -1
  425. package/build/components/inserter/tabs.js +2 -1
  426. package/build/components/inserter/tabs.js.map +1 -1
  427. package/build/components/inserter/tabs.native.js +7 -6
  428. package/build/components/inserter/tabs.native.js.map +1 -1
  429. package/build/components/inserter/tips.js +6 -5
  430. package/build/components/inserter/tips.js.map +1 -1
  431. package/build/components/inserter-draggable-blocks/index.js +3 -3
  432. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  433. package/build/components/inserter-list-item/index.js +9 -8
  434. package/build/components/inserter-list-item/index.js.map +1 -1
  435. package/build/components/inserter-listbox/group.js +2 -1
  436. package/build/components/inserter-listbox/group.js.map +1 -1
  437. package/build/components/inserter-listbox/index.js +2 -2
  438. package/build/components/inserter-listbox/index.js.map +1 -1
  439. package/build/components/inserter-listbox/item.js +5 -4
  440. package/build/components/inserter-listbox/item.js.map +1 -1
  441. package/build/components/inserter-listbox/row.js +2 -1
  442. package/build/components/inserter-listbox/row.js.map +1 -1
  443. package/build/components/inspector-controls/block-support-slot-container.js +3 -2
  444. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  445. package/build/components/inspector-controls/block-support-tools-panel.js +3 -2
  446. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  447. package/build/components/inspector-controls/fill.js +7 -6
  448. package/build/components/inspector-controls/fill.js.map +1 -1
  449. package/build/components/inspector-controls/fill.native.js +4 -3
  450. package/build/components/inspector-controls/fill.native.js.map +1 -1
  451. package/build/components/inspector-controls/index.js +3 -3
  452. package/build/components/inspector-controls/index.js.map +1 -1
  453. package/build/components/inspector-controls/slot.js +5 -4
  454. package/build/components/inspector-controls/slot.js.map +1 -1
  455. package/build/components/inspector-controls/slot.native.js +2 -2
  456. package/build/components/inspector-controls/slot.native.js.map +1 -1
  457. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +3 -3
  458. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  459. package/build/components/inspector-controls-tabs/index.js +5 -5
  460. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  461. package/build/components/inspector-controls-tabs/position-controls-panel.js +5 -4
  462. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  463. package/build/components/inspector-controls-tabs/settings-tab-hint.js +5 -4
  464. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  465. package/build/components/inspector-controls-tabs/settings-tab.js +2 -2
  466. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  467. package/build/components/inspector-controls-tabs/styles-tab.js +11 -11
  468. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  469. package/build/components/inspector-popover-header/index.js +8 -8
  470. package/build/components/inspector-popover-header/index.js.map +1 -1
  471. package/build/components/justify-content-control/index.js +3 -3
  472. package/build/components/justify-content-control/index.js.map +1 -1
  473. package/build/components/justify-content-control/ui.js +2 -2
  474. package/build/components/justify-content-control/ui.js.map +1 -1
  475. package/build/components/letter-spacing-control/index.js +3 -3
  476. package/build/components/letter-spacing-control/index.js.map +1 -1
  477. package/build/components/line-height-control/index.js +3 -3
  478. package/build/components/line-height-control/index.js.map +1 -1
  479. package/build/components/line-height-control/index.native.js +2 -2
  480. package/build/components/line-height-control/index.native.js.map +1 -1
  481. package/build/components/link-control/index.js +18 -17
  482. package/build/components/link-control/index.js.map +1 -1
  483. package/build/components/link-control/link-preview.js +20 -20
  484. package/build/components/link-control/link-preview.js.map +1 -1
  485. package/build/components/link-control/search-create-button.js +4 -3
  486. package/build/components/link-control/search-create-button.js.map +1 -1
  487. package/build/components/link-control/search-input.js +5 -4
  488. package/build/components/link-control/search-input.js.map +1 -1
  489. package/build/components/link-control/search-item.js +41 -6
  490. package/build/components/link-control/search-item.js.map +1 -1
  491. package/build/components/link-control/search-results.js +7 -7
  492. package/build/components/link-control/search-results.js.map +1 -1
  493. package/build/components/link-control/settings-drawer.js +5 -4
  494. package/build/components/link-control/settings-drawer.js.map +1 -1
  495. package/build/components/link-control/settings.js +4 -4
  496. package/build/components/link-control/settings.js.map +1 -1
  497. package/build/components/list-view/appender.js +5 -4
  498. package/build/components/list-view/appender.js.map +1 -1
  499. package/build/components/list-view/aria-referenced-text.js +2 -1
  500. package/build/components/list-view/aria-referenced-text.js.map +1 -1
  501. package/build/components/list-view/block-contents.js +5 -4
  502. package/build/components/list-view/block-contents.js.map +1 -1
  503. package/build/components/list-view/block-select-button.js +16 -15
  504. package/build/components/list-view/block-select-button.js.map +1 -1
  505. package/build/components/list-view/block.js +15 -45
  506. package/build/components/list-view/block.js.map +1 -1
  507. package/build/components/list-view/branch.js +17 -9
  508. package/build/components/list-view/branch.js.map +1 -1
  509. package/build/components/list-view/drop-indicator.js +4 -3
  510. package/build/components/list-view/drop-indicator.js.map +1 -1
  511. package/build/components/list-view/expander.js +3 -3
  512. package/build/components/list-view/expander.js.map +1 -1
  513. package/build/components/list-view/index.js +16 -10
  514. package/build/components/list-view/index.js.map +1 -1
  515. package/build/components/list-view/leaf.js +3 -2
  516. package/build/components/list-view/leaf.js.map +1 -1
  517. package/build/components/list-view/utils.js +35 -0
  518. package/build/components/list-view/utils.js.map +1 -1
  519. package/build/components/media-placeholder/index.js +22 -21
  520. package/build/components/media-placeholder/index.js.map +1 -1
  521. package/build/components/media-placeholder/index.native.js +13 -12
  522. package/build/components/media-placeholder/index.native.js.map +1 -1
  523. package/build/components/media-replace-flow/index.js +14 -13
  524. package/build/components/media-replace-flow/index.js.map +1 -1
  525. package/build/components/media-replace-flow/index.native.js +2 -2
  526. package/build/components/media-replace-flow/index.native.js.map +1 -1
  527. package/build/components/media-upload/{constants.js → constants.native.js} +2 -4
  528. package/build/components/media-upload/constants.native.js.map +1 -0
  529. package/build/components/media-upload/index.js +1 -1
  530. package/build/components/media-upload/index.js.map +1 -1
  531. package/build/components/media-upload/index.native.js +12 -11
  532. package/build/components/media-upload/index.native.js.map +1 -1
  533. package/build/components/media-upload-progress/index.native.js +5 -4
  534. package/build/components/media-upload-progress/index.native.js.map +1 -1
  535. package/build/components/multi-selection-inspector/index.js +6 -6
  536. package/build/components/multi-selection-inspector/index.js.map +1 -1
  537. package/build/components/navigable-toolbar/index.js +4 -3
  538. package/build/components/navigable-toolbar/index.js.map +1 -1
  539. package/build/components/observe-typing/index.js +2 -2
  540. package/build/components/observe-typing/index.js.map +1 -1
  541. package/build/components/panel-color-settings/index.js +2 -2
  542. package/build/components/panel-color-settings/index.js.map +1 -1
  543. package/build/components/plain-text/index.js +4 -3
  544. package/build/components/plain-text/index.js.map +1 -1
  545. package/build/components/plain-text/index.native.js +4 -3
  546. package/build/components/plain-text/index.native.js.map +1 -1
  547. package/build/components/preview-options/index.js +5 -5
  548. package/build/components/preview-options/index.js.map +1 -1
  549. package/build/components/provider/block-refs-provider.js +2 -1
  550. package/build/components/provider/block-refs-provider.js.map +1 -1
  551. package/build/components/provider/index.js +4 -3
  552. package/build/components/provider/index.js.map +1 -1
  553. package/build/components/provider/index.native.js +3 -2
  554. package/build/components/provider/index.native.js.map +1 -1
  555. package/build/components/provider/use-block-sync.js +1 -1
  556. package/build/components/provider/use-block-sync.js.map +1 -1
  557. package/build/components/provider/with-registry-provider.js +4 -3
  558. package/build/components/provider/with-registry-provider.js.map +1 -1
  559. package/build/components/publish-date-time-picker/index.js +5 -4
  560. package/build/components/publish-date-time-picker/index.js.map +1 -1
  561. package/build/components/recursion-provider/index.js +2 -1
  562. package/build/components/recursion-provider/index.js.map +1 -1
  563. package/build/components/resizable-box-popover/index.js +3 -3
  564. package/build/components/resizable-box-popover/index.js.map +1 -1
  565. package/build/components/resolution-tool/index.js +3 -3
  566. package/build/components/resolution-tool/index.js.map +1 -1
  567. package/build/components/responsive-block-control/index.js +10 -9
  568. package/build/components/responsive-block-control/index.js.map +1 -1
  569. package/build/components/responsive-block-control/label.js +3 -3
  570. package/build/components/responsive-block-control/label.js.map +1 -1
  571. package/build/components/rich-text/content.js +3 -2
  572. package/build/components/rich-text/content.js.map +1 -1
  573. package/build/components/rich-text/embed-handler-picker.native.js +2 -1
  574. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  575. package/build/components/rich-text/format-edit.js +4 -3
  576. package/build/components/rich-text/format-edit.js.map +1 -1
  577. package/build/components/rich-text/format-toolbar/index.js +4 -4
  578. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  579. package/build/components/rich-text/format-toolbar/index.native.js +3 -3
  580. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  581. package/build/components/rich-text/format-toolbar-container.js +9 -9
  582. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  583. package/build/components/rich-text/format-toolbar-container.native.js +3 -3
  584. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  585. package/build/components/rich-text/get-rich-text-values.js +2 -1
  586. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  587. package/build/components/rich-text/index.js +9 -8
  588. package/build/components/rich-text/index.js.map +1 -1
  589. package/build/components/rich-text/index.native.js +8 -15
  590. package/build/components/rich-text/index.native.js.map +1 -1
  591. package/build/components/rich-text/multiline.js +3 -2
  592. package/build/components/rich-text/multiline.js.map +1 -1
  593. package/build/components/rich-text/toolbar-button.js +3 -3
  594. package/build/components/rich-text/toolbar-button.js.map +1 -1
  595. package/build/components/rich-text/use-paste-handler.js +5 -87
  596. package/build/components/rich-text/use-paste-handler.js.map +1 -1
  597. package/build/components/rich-text/utils.js +2 -5
  598. package/build/components/rich-text/utils.js.map +1 -1
  599. package/build/components/skip-to-selected-block/index.js +2 -2
  600. package/build/components/skip-to-selected-block/index.js.map +1 -1
  601. package/build/components/spacing-sizes-control/index.js +9 -8
  602. package/build/components/spacing-sizes-control/index.js.map +1 -1
  603. package/build/components/spacing-sizes-control/input-controls/axial.js +3 -3
  604. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  605. package/build/components/spacing-sizes-control/input-controls/separated.js +3 -3
  606. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  607. package/build/components/spacing-sizes-control/input-controls/single.js +2 -2
  608. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  609. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +9 -8
  610. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  611. package/build/components/spacing-sizes-control/sides-dropdown/index.js +6 -6
  612. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  613. package/build/components/text-decoration-control/index.js +6 -6
  614. package/build/components/text-decoration-control/index.js.map +1 -1
  615. package/build/components/text-transform-control/index.js +6 -6
  616. package/build/components/text-transform-control/index.js.map +1 -1
  617. package/build/components/tool-selector/index.js +13 -11
  618. package/build/components/tool-selector/index.js.map +1 -1
  619. package/build/components/typewriter/index.js +3 -3
  620. package/build/components/typewriter/index.js.map +1 -1
  621. package/build/components/ungroup-button/index.native.js +2 -2
  622. package/build/components/ungroup-button/index.native.js.map +1 -1
  623. package/build/components/unit-control/index.js +2 -2
  624. package/build/components/unit-control/index.js.map +1 -1
  625. package/build/components/unsupported-block-details/index.native.js +127 -0
  626. package/build/components/unsupported-block-details/index.native.js.map +1 -0
  627. package/build/components/url-input/button.js +9 -8
  628. package/build/components/url-input/button.js.map +1 -1
  629. package/build/components/url-input/index.js +9 -8
  630. package/build/components/url-input/index.js.map +1 -1
  631. package/build/components/url-input/index.native.js +2 -2
  632. package/build/components/url-input/index.native.js.map +1 -1
  633. package/build/components/url-popover/image-url-input-ui.js +19 -18
  634. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  635. package/build/components/url-popover/index.js +8 -7
  636. package/build/components/url-popover/index.js.map +1 -1
  637. package/build/components/url-popover/link-editor.js +4 -4
  638. package/build/components/url-popover/link-editor.js.map +1 -1
  639. package/build/components/url-popover/link-viewer-url.js +3 -3
  640. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  641. package/build/components/url-popover/link-viewer.js +4 -4
  642. package/build/components/url-popover/link-viewer.js.map +1 -1
  643. package/build/components/use-on-block-drop/index.js +2 -2
  644. package/build/components/use-on-block-drop/index.js.map +1 -1
  645. package/build/components/use-unsupported-block-editor/index.native.js +57 -0
  646. package/build/components/use-unsupported-block-editor/index.native.js.map +1 -0
  647. package/build/components/video-player/gridicon-play.native.js +3 -3
  648. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  649. package/build/components/video-player/index.native.js +6 -5
  650. package/build/components/video-player/index.native.js.map +1 -1
  651. package/build/components/warning/index.js +10 -9
  652. package/build/components/warning/index.js.map +1 -1
  653. package/build/components/warning/index.native.js +6 -6
  654. package/build/components/warning/index.native.js.map +1 -1
  655. package/build/components/writing-flow/index.js +7 -5
  656. package/build/components/writing-flow/index.js.map +1 -1
  657. package/build/components/writing-flow/use-clipboard-handler.js +179 -0
  658. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -0
  659. package/build/components/writing-flow/use-tab-nav.js +4 -3
  660. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  661. package/build/components/writing-mode-control/index.js +6 -6
  662. package/build/components/writing-mode-control/index.js.map +1 -1
  663. package/build/hooks/align.js +6 -6
  664. package/build/hooks/align.js.map +1 -1
  665. package/build/hooks/anchor.js +10 -9
  666. package/build/hooks/anchor.js.map +1 -1
  667. package/build/hooks/background.js +17 -16
  668. package/build/hooks/background.js.map +1 -1
  669. package/build/hooks/block-hooks.js +11 -10
  670. package/build/hooks/block-hooks.js.map +1 -1
  671. package/build/hooks/block-rename-ui.js +22 -18
  672. package/build/hooks/block-rename-ui.js.map +1 -1
  673. package/build/hooks/border.js +6 -5
  674. package/build/hooks/border.js.map +1 -1
  675. package/build/hooks/color.js +7 -6
  676. package/build/hooks/color.js.map +1 -1
  677. package/build/hooks/content-lock-ui.js +9 -8
  678. package/build/hooks/content-lock-ui.js.map +1 -1
  679. package/build/hooks/contrast-checker.js +2 -1
  680. package/build/hooks/contrast-checker.js.map +1 -1
  681. package/build/hooks/custom-class-name.js +7 -7
  682. package/build/hooks/custom-class-name.js.map +1 -1
  683. package/build/hooks/custom-fields.js +8 -8
  684. package/build/hooks/custom-fields.js.map +1 -1
  685. package/build/hooks/dimensions.js +5 -4
  686. package/build/hooks/dimensions.js.map +1 -1
  687. package/build/hooks/duotone.js +10 -9
  688. package/build/hooks/duotone.js.map +1 -1
  689. package/build/hooks/font-size.js +5 -5
  690. package/build/hooks/font-size.js.map +1 -1
  691. package/build/hooks/layout.js +14 -13
  692. package/build/hooks/layout.js.map +1 -1
  693. package/build/hooks/line-height.js +3 -3
  694. package/build/hooks/line-height.js.map +1 -1
  695. package/build/hooks/margin.js +3 -2
  696. package/build/hooks/margin.js.map +1 -1
  697. package/build/hooks/padding.js +3 -2
  698. package/build/hooks/padding.js.map +1 -1
  699. package/build/hooks/position.js +10 -9
  700. package/build/hooks/position.js.map +1 -1
  701. package/build/hooks/style.js +11 -10
  702. package/build/hooks/style.js.map +1 -1
  703. package/build/hooks/typography.js +4 -3
  704. package/build/hooks/typography.js.map +1 -1
  705. package/build/hooks/typography.native.js +4 -4
  706. package/build/hooks/typography.native.js.map +1 -1
  707. package/build/layouts/constrained.js +11 -11
  708. package/build/layouts/constrained.js.map +1 -1
  709. package/build/layouts/flex.js +18 -18
  710. package/build/layouts/flex.js.map +1 -1
  711. package/build/layouts/grid.js +10 -10
  712. package/build/layouts/grid.js.map +1 -1
  713. package/build/private-apis.js +2 -0
  714. package/build/private-apis.js.map +1 -1
  715. package/build/store/actions.js +8 -12
  716. package/build/store/actions.js.map +1 -1
  717. package/build/store/private-selectors.js +55 -1
  718. package/build/store/private-selectors.js.map +1 -1
  719. package/build/store/reducer.js +19 -1
  720. package/build/store/reducer.js.map +1 -1
  721. package/build/store/selectors.js +1 -1
  722. package/build/store/selectors.js.map +1 -1
  723. package/build/utils/pasting.js +46 -0
  724. package/build/utils/pasting.js.map +1 -1
  725. package/build/utils/transform-styles/transforms/wrap.js +5 -0
  726. package/build/utils/transform-styles/transforms/wrap.js.map +1 -1
  727. package/build/utils/use-notify-copy.js +53 -0
  728. package/build/utils/use-notify-copy.js.map +1 -0
  729. package/build-module/autocompleters/block.js +1 -1
  730. package/build-module/autocompleters/link.js +1 -1
  731. package/build-module/components/alignment-control/index.js +1 -1
  732. package/build-module/components/alignment-control/ui.js +1 -1
  733. package/build-module/components/autocomplete/index.js +1 -1
  734. package/build-module/components/block-actions/index.js +1 -1
  735. package/build-module/components/block-actions/index.js.map +1 -1
  736. package/build-module/components/block-alignment-control/index.js +1 -1
  737. package/build-module/components/block-alignment-control/ui.js +1 -1
  738. package/build-module/components/block-alignment-control/ui.native.js +1 -1
  739. package/build-module/components/block-alignment-matrix-control/index.js +1 -1
  740. package/build-module/components/block-breadcrumb/index.js +2 -2
  741. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  742. package/build-module/components/block-canvas/index.js +7 -9
  743. package/build-module/components/block-canvas/index.js.map +1 -1
  744. package/build-module/components/block-caption/index.native.js +1 -1
  745. package/build-module/components/block-card/index.js +1 -1
  746. package/build-module/components/block-compare/block-view.js +1 -1
  747. package/build-module/components/block-compare/index.js +1 -1
  748. package/build-module/components/block-context/index.js +1 -1
  749. package/build-module/components/block-controls/fill.js +1 -1
  750. package/build-module/components/block-controls/index.js +1 -1
  751. package/build-module/components/block-controls/slot.js +1 -1
  752. package/build-module/components/block-controls/slot.native.js +1 -1
  753. package/build-module/components/block-draggable/draggable-chip.js +1 -1
  754. package/build-module/components/block-draggable/draggable-chip.native.js +1 -1
  755. package/build-module/components/block-draggable/dropping-insertion-point.native.js +1 -1
  756. package/build-module/components/block-draggable/index.js +1 -1
  757. package/build-module/components/block-draggable/index.native.js +1 -1
  758. package/build-module/components/block-edit/edit.js +1 -1
  759. package/build-module/components/block-edit/edit.native.js +1 -1
  760. package/build-module/components/block-edit/index.js +1 -1
  761. package/build-module/components/block-edit-visually-button/index.js +1 -1
  762. package/build-module/components/block-full-height-alignment-control/index.js +1 -1
  763. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js +3 -3
  764. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  765. package/build-module/components/block-heading-level-dropdown/index.js +3 -3
  766. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  767. package/build-module/components/block-heading-level-dropdown/index.native.js +3 -3
  768. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  769. package/build-module/components/block-icon/index.js +1 -1
  770. package/build-module/components/block-icon/index.native.js +1 -1
  771. package/build-module/components/block-info-slot-fill/index.js +1 -1
  772. package/build-module/components/block-inspector/index.js +1 -1
  773. package/build-module/components/block-list/block-crash-warning.js +1 -1
  774. package/build-module/components/block-list/block-html.js +1 -1
  775. package/build-module/components/block-list/block-invalid-warning.js +1 -1
  776. package/build-module/components/block-list/block-invalid-warning.native.js +1 -1
  777. package/build-module/components/block-list/block-list-item-cell.native.js +1 -1
  778. package/build-module/components/block-list/block-list-item.native.js +3 -3
  779. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  780. package/build-module/components/block-list/block-outline.native.js +1 -1
  781. package/build-module/components/block-list/block-selection-button.native.js +1 -1
  782. package/build-module/components/block-list/block.js +1 -1
  783. package/build-module/components/block-list/block.native.js +1 -1
  784. package/build-module/components/block-list/grid-item.native.js +1 -1
  785. package/build-module/components/block-list/index.js +1 -1
  786. package/build-module/components/block-list/index.native.js +1 -1
  787. package/build-module/components/block-list/insertion-point.native.js +1 -1
  788. package/build-module/components/block-list/layout.js +1 -1
  789. package/build-module/components/block-list/subdirectory-icon.js +1 -1
  790. package/build-module/components/block-list-appender/index.js +1 -1
  791. package/build-module/components/block-list-appender/index.native.js +1 -1
  792. package/build-module/components/block-lock/menu-item.js +1 -1
  793. package/build-module/components/block-lock/modal.js +1 -1
  794. package/build-module/components/block-lock/toolbar.js +1 -1
  795. package/build-module/components/block-media-update-progress/index.native.js +1 -1
  796. package/build-module/components/block-mover/button.js +1 -1
  797. package/build-module/components/block-mover/index.js +1 -1
  798. package/build-module/components/block-mover/index.native.js +1 -1
  799. package/build-module/components/block-navigation/dropdown.js +1 -1
  800. package/build-module/components/block-parent-selector/index.js +2 -2
  801. package/build-module/components/block-parent-selector/index.js.map +1 -1
  802. package/build-module/components/block-pattern-setup/index.js +1 -1
  803. package/build-module/components/block-pattern-setup/setup-toolbar.js +1 -1
  804. package/build-module/components/block-patterns-list/index.js +1 -1
  805. package/build-module/components/block-patterns-paging/index.js +1 -1
  806. package/build-module/components/block-popover/drop-zone.js +1 -1
  807. package/build-module/components/block-popover/inbetween.js +1 -1
  808. package/build-module/components/block-popover/index.js +1 -1
  809. package/build-module/components/block-preview/auto.js +1 -1
  810. package/build-module/components/block-preview/index.js +2 -2
  811. package/build-module/components/block-preview/index.js.map +1 -1
  812. package/build-module/components/block-quick-navigation/index.js +1 -1
  813. package/build-module/components/block-removal-warning-modal/index.js +1 -1
  814. package/build-module/components/block-selection-clearer/index.js +1 -1
  815. package/build-module/components/block-settings/button.native.js +1 -1
  816. package/build-module/components/block-settings/container.native.js +1 -1
  817. package/build-module/components/block-settings-menu/block-html-convert-button.js +20 -17
  818. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  819. package/build-module/components/block-settings-menu/block-mode-toggle.js +1 -1
  820. package/build-module/components/block-settings-menu/block-settings-dropdown.js +1 -1
  821. package/build-module/components/block-settings-menu/index.js +1 -1
  822. package/build-module/components/block-settings-menu-controls/index.js +2 -2
  823. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  824. package/build-module/components/block-styles/index.js +1 -1
  825. package/build-module/components/block-styles/index.native.js +1 -1
  826. package/build-module/components/block-styles/menu-items.js +1 -1
  827. package/build-module/components/block-styles/preview-panel.js +1 -1
  828. package/build-module/components/block-styles/preview.native.js +1 -1
  829. package/build-module/components/block-switcher/block-styles-menu.js +1 -1
  830. package/build-module/components/block-switcher/block-transformations-menu.js +1 -1
  831. package/build-module/components/block-switcher/block-transformations-menu.native.js +1 -1
  832. package/build-module/components/block-switcher/block-variation-transformations.js +1 -1
  833. package/build-module/components/block-switcher/index.js +6 -6
  834. package/build-module/components/block-switcher/index.js.map +1 -1
  835. package/build-module/components/block-switcher/pattern-transformations-menu.js +1 -1
  836. package/build-module/components/block-switcher/preview-block-popover.js +1 -1
  837. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +1 -1
  838. package/build-module/components/block-toolbar/index.js +1 -1
  839. package/build-module/components/block-toolbar/index.native.js +1 -1
  840. package/build-module/components/block-tools/back-compat.js +1 -1
  841. package/build-module/components/block-tools/block-contextual-toolbar.js +1 -1
  842. package/build-module/components/block-tools/block-selection-button.js +2 -2
  843. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  844. package/build-module/components/block-tools/index.js +1 -1
  845. package/build-module/components/block-tools/insertion-point.js +1 -1
  846. package/build-module/components/block-tools/selected-block-popover.js +1 -1
  847. package/build-module/components/block-tools/zoom-out-mode-inserters.js +1 -1
  848. package/build-module/components/block-types-list/index.js +1 -1
  849. package/build-module/components/block-types-list/index.native.js +1 -1
  850. package/build-module/components/block-variation-picker/index.js +1 -1
  851. package/build-module/components/block-variation-picker/index.native.js +1 -1
  852. package/build-module/components/block-variation-transforms/index.js +1 -1
  853. package/build-module/components/block-vertical-alignment-control/icons.js +1 -1
  854. package/build-module/components/block-vertical-alignment-control/index.js +1 -1
  855. package/build-module/components/block-vertical-alignment-control/ui.js +1 -1
  856. package/build-module/components/border-radius-control/all-input-control.js +1 -1
  857. package/build-module/components/border-radius-control/index.js +2 -2
  858. package/build-module/components/border-radius-control/index.js.map +1 -1
  859. package/build-module/components/border-radius-control/input-controls.js +1 -1
  860. package/build-module/components/border-radius-control/linked-button.js +1 -1
  861. package/build-module/components/button-block-appender/index.js +1 -1
  862. package/build-module/components/button-block-appender/index.native.js +1 -1
  863. package/build-module/components/caption/index.native.js +1 -1
  864. package/build-module/components/child-layout-control/index.js +2 -2
  865. package/build-module/components/child-layout-control/index.js.map +1 -1
  866. package/build-module/components/color-palette/control.js +1 -1
  867. package/build-module/components/color-palette/with-color-context.js +1 -1
  868. package/build-module/components/color-style-selector/index.js +1 -1
  869. package/build-module/components/colors/with-colors.js +2 -2
  870. package/build-module/components/colors/with-colors.js.map +1 -1
  871. package/build-module/components/colors-gradients/control.js +1 -1
  872. package/build-module/components/colors-gradients/dropdown.js +1 -1
  873. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +1 -1
  874. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +1 -1
  875. package/build-module/components/contrast-checker/index.js +1 -1
  876. package/build-module/components/contrast-checker/index.native.js +1 -1
  877. package/build-module/components/convert-to-group-buttons/index.js +1 -1
  878. package/build-module/components/convert-to-group-buttons/toolbar.js +1 -1
  879. package/build-module/components/copy-handler/index.js +25 -205
  880. package/build-module/components/copy-handler/index.js.map +1 -1
  881. package/build-module/components/date-format-picker/index.js +1 -1
  882. package/build-module/components/default-block-appender/index.js +1 -1
  883. package/build-module/components/default-block-appender/index.native.js +1 -1
  884. package/build-module/components/default-style-picker/index.js +1 -1
  885. package/build-module/components/dimensions-tool/aspect-ratio-tool.js +1 -1
  886. package/build-module/components/dimensions-tool/index.js +2 -2
  887. package/build-module/components/dimensions-tool/index.js.map +1 -1
  888. package/build-module/components/dimensions-tool/scale-tool.js +2 -2
  889. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  890. package/build-module/components/dimensions-tool/width-height-tool.js +3 -3
  891. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  892. package/build-module/components/duotone-control/index.js +10 -2
  893. package/build-module/components/duotone-control/index.js.map +1 -1
  894. package/build-module/components/editable-text/index.js +1 -1
  895. package/build-module/components/editor-styles/index.js +1 -1
  896. package/build-module/components/floating-toolbar/index.native.js +1 -1
  897. package/build-module/components/floating-toolbar/nav-up-icon.js +1 -1
  898. package/build-module/components/font-appearance-control/index.js +2 -2
  899. package/build-module/components/font-appearance-control/index.js.map +1 -1
  900. package/build-module/components/font-family/index.js +1 -1
  901. package/build-module/components/font-sizes/font-size-picker.js +1 -1
  902. package/build-module/components/font-sizes/with-font-sizes.js +1 -1
  903. package/build-module/components/global-styles/advanced-panel.js +1 -1
  904. package/build-module/components/global-styles/border-panel.js +1 -1
  905. package/build-module/components/global-styles/color-panel.js +1 -1
  906. package/build-module/components/global-styles/color-panel.native.js +1 -1
  907. package/build-module/components/global-styles/dimensions-panel.js +1 -1
  908. package/build-module/components/global-styles/effects-panel.js +1 -1
  909. package/build-module/components/global-styles/filters-panel.js +1 -1
  910. package/build-module/components/global-styles/hooks.js +1 -1
  911. package/build-module/components/global-styles/hooks.js.map +1 -1
  912. package/build-module/components/global-styles/image-settings-panel.js +1 -1
  913. package/build-module/components/global-styles/typography-panel.js +1 -1
  914. package/build-module/components/global-styles/use-global-styles-output.js +17 -6
  915. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  916. package/build-module/components/global-styles/utils.js +21 -0
  917. package/build-module/components/global-styles/utils.js.map +1 -1
  918. package/build-module/components/gradients/with-gradient.js +1 -1
  919. package/build-module/components/height-control/index.js +2 -2
  920. package/build-module/components/height-control/index.js.map +1 -1
  921. package/build-module/components/iframe/index.js +1 -1
  922. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -1
  923. package/build-module/components/image-editor/context.js +1 -1
  924. package/build-module/components/image-editor/cropper.js +1 -1
  925. package/build-module/components/image-editor/form-controls.js +1 -1
  926. package/build-module/components/image-editor/index.js +1 -1
  927. package/build-module/components/image-editor/rotation-button.js +1 -1
  928. package/build-module/components/image-editor/zoom-dropdown.js +1 -1
  929. package/build-module/components/image-size-control/index.js +1 -1
  930. package/build-module/components/index.js +1 -1
  931. package/build-module/components/index.js.map +1 -1
  932. package/build-module/components/inner-blocks/button-block-appender.js +1 -1
  933. package/build-module/components/inner-blocks/constants.native.js +6 -0
  934. package/build-module/components/inner-blocks/constants.native.js.map +1 -0
  935. package/build-module/components/inner-blocks/default-block-appender.js +1 -1
  936. package/build-module/components/inner-blocks/index.js +1 -1
  937. package/build-module/components/inner-blocks/index.native.js +13 -1
  938. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  939. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js +86 -0
  940. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -0
  941. package/build-module/components/inner-blocks/with-client-id.js +1 -1
  942. package/build-module/components/inserter/block-patterns-explorer/explorer.js +1 -1
  943. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +1 -1
  944. package/build-module/components/inserter/block-patterns-explorer/sidebar.js +1 -1
  945. package/build-module/components/inserter/block-patterns-filter.js +14 -13
  946. package/build-module/components/inserter/block-patterns-filter.js.map +1 -1
  947. package/build-module/components/inserter/block-patterns-tab.js +2 -2
  948. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  949. package/build-module/components/inserter/block-types-tab.js +1 -1
  950. package/build-module/components/inserter/block-types-tab.native.js +1 -1
  951. package/build-module/components/inserter/index.js +3 -3
  952. package/build-module/components/inserter/index.js.map +1 -1
  953. package/build-module/components/inserter/index.native.js +3 -3
  954. package/build-module/components/inserter/index.native.js.map +1 -1
  955. package/build-module/components/inserter/library.js +1 -1
  956. package/build-module/components/inserter/media-tab/hooks.js +5 -34
  957. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  958. package/build-module/components/inserter/media-tab/media-list.js +1 -1
  959. package/build-module/components/inserter/media-tab/media-panel.js +1 -1
  960. package/build-module/components/inserter/media-tab/media-preview.js +1 -1
  961. package/build-module/components/inserter/media-tab/media-tab.js +1 -1
  962. package/build-module/components/inserter/media-tab/utils.js +1 -1
  963. package/build-module/components/inserter/menu.js +1 -1
  964. package/build-module/components/inserter/menu.native.js +1 -1
  965. package/build-module/components/inserter/mobile-tab-navigation.js +1 -1
  966. package/build-module/components/inserter/no-results.js +1 -1
  967. package/build-module/components/inserter/no-results.native.js +1 -1
  968. package/build-module/components/inserter/panel.js +1 -1
  969. package/build-module/components/inserter/preview-panel.js +1 -1
  970. package/build-module/components/inserter/quick-inserter.js +1 -1
  971. package/build-module/components/inserter/reusable-block-rename-hint.js +1 -1
  972. package/build-module/components/inserter/reusable-blocks-tab.native.js +1 -1
  973. package/build-module/components/inserter/search-results.js +1 -1
  974. package/build-module/components/inserter/search-results.native.js +1 -1
  975. package/build-module/components/inserter/tabs.js +1 -1
  976. package/build-module/components/inserter/tabs.native.js +1 -1
  977. package/build-module/components/inserter/tips.js +1 -1
  978. package/build-module/components/inserter-draggable-blocks/index.js +1 -1
  979. package/build-module/components/inserter-list-item/index.js +1 -1
  980. package/build-module/components/inserter-listbox/group.js +1 -1
  981. package/build-module/components/inserter-listbox/index.js +1 -1
  982. package/build-module/components/inserter-listbox/item.js +1 -1
  983. package/build-module/components/inserter-listbox/row.js +1 -1
  984. package/build-module/components/inspector-controls/block-support-slot-container.js +1 -1
  985. package/build-module/components/inspector-controls/block-support-tools-panel.js +1 -1
  986. package/build-module/components/inspector-controls/fill.js +1 -1
  987. package/build-module/components/inspector-controls/fill.native.js +1 -1
  988. package/build-module/components/inspector-controls/index.js +1 -1
  989. package/build-module/components/inspector-controls/slot.js +1 -1
  990. package/build-module/components/inspector-controls/slot.native.js +1 -1
  991. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  992. package/build-module/components/inspector-controls-tabs/index.js +1 -1
  993. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +1 -1
  994. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +1 -1
  995. package/build-module/components/inspector-controls-tabs/settings-tab.js +1 -1
  996. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -1
  997. package/build-module/components/inspector-popover-header/index.js +1 -1
  998. package/build-module/components/justify-content-control/index.js +1 -1
  999. package/build-module/components/justify-content-control/ui.js +1 -1
  1000. package/build-module/components/letter-spacing-control/index.js +2 -2
  1001. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  1002. package/build-module/components/line-height-control/index.js +1 -1
  1003. package/build-module/components/line-height-control/index.native.js +1 -1
  1004. package/build-module/components/link-control/index.js +1 -1
  1005. package/build-module/components/link-control/link-preview.js +1 -1
  1006. package/build-module/components/link-control/search-create-button.js +1 -1
  1007. package/build-module/components/link-control/search-input.js +1 -1
  1008. package/build-module/components/link-control/search-item.js +38 -3
  1009. package/build-module/components/link-control/search-item.js.map +1 -1
  1010. package/build-module/components/link-control/search-results.js +1 -1
  1011. package/build-module/components/link-control/settings-drawer.js +1 -1
  1012. package/build-module/components/link-control/settings.js +1 -1
  1013. package/build-module/components/list-view/appender.js +1 -1
  1014. package/build-module/components/list-view/aria-referenced-text.js +1 -1
  1015. package/build-module/components/list-view/block-contents.js +1 -1
  1016. package/build-module/components/list-view/block-select-button.js +1 -1
  1017. package/build-module/components/list-view/block.js +4 -35
  1018. package/build-module/components/list-view/block.js.map +1 -1
  1019. package/build-module/components/list-view/branch.js +9 -2
  1020. package/build-module/components/list-view/branch.js.map +1 -1
  1021. package/build-module/components/list-view/drop-indicator.js +1 -1
  1022. package/build-module/components/list-view/expander.js +1 -1
  1023. package/build-module/components/list-view/index.js +9 -4
  1024. package/build-module/components/list-view/index.js.map +1 -1
  1025. package/build-module/components/list-view/leaf.js +1 -1
  1026. package/build-module/components/list-view/utils.js +34 -0
  1027. package/build-module/components/list-view/utils.js.map +1 -1
  1028. package/build-module/components/media-placeholder/index.js +1 -1
  1029. package/build-module/components/media-placeholder/index.native.js +1 -1
  1030. package/build-module/components/media-replace-flow/index.js +1 -1
  1031. package/build-module/components/media-replace-flow/index.native.js +1 -1
  1032. package/build-module/components/media-upload/{constants.js → constants.native.js} +1 -2
  1033. package/build-module/components/media-upload/constants.native.js.map +1 -0
  1034. package/build-module/components/media-upload/index.js +1 -1
  1035. package/build-module/components/media-upload/index.js.map +1 -1
  1036. package/build-module/components/media-upload/index.native.js +7 -7
  1037. package/build-module/components/media-upload/index.native.js.map +1 -1
  1038. package/build-module/components/media-upload-progress/index.native.js +1 -1
  1039. package/build-module/components/multi-selection-inspector/index.js +1 -1
  1040. package/build-module/components/navigable-toolbar/index.js +1 -1
  1041. package/build-module/components/observe-typing/index.js +1 -1
  1042. package/build-module/components/panel-color-settings/index.js +1 -1
  1043. package/build-module/components/plain-text/index.js +1 -1
  1044. package/build-module/components/plain-text/index.native.js +1 -1
  1045. package/build-module/components/preview-options/index.js +1 -1
  1046. package/build-module/components/provider/block-refs-provider.js +1 -1
  1047. package/build-module/components/provider/index.js +1 -1
  1048. package/build-module/components/provider/index.native.js +1 -1
  1049. package/build-module/components/provider/use-block-sync.js +1 -1
  1050. package/build-module/components/provider/use-block-sync.js.map +1 -1
  1051. package/build-module/components/provider/with-registry-provider.js +1 -1
  1052. package/build-module/components/publish-date-time-picker/index.js +1 -1
  1053. package/build-module/components/recursion-provider/index.js +1 -1
  1054. package/build-module/components/resizable-box-popover/index.js +1 -1
  1055. package/build-module/components/resolution-tool/index.js +1 -1
  1056. package/build-module/components/responsive-block-control/index.js +1 -1
  1057. package/build-module/components/responsive-block-control/label.js +1 -1
  1058. package/build-module/components/rich-text/content.js +1 -1
  1059. package/build-module/components/rich-text/embed-handler-picker.native.js +1 -1
  1060. package/build-module/components/rich-text/format-edit.js +1 -1
  1061. package/build-module/components/rich-text/format-toolbar/index.js +1 -1
  1062. package/build-module/components/rich-text/format-toolbar/index.native.js +1 -1
  1063. package/build-module/components/rich-text/format-toolbar-container.js +1 -1
  1064. package/build-module/components/rich-text/format-toolbar-container.native.js +1 -1
  1065. package/build-module/components/rich-text/get-rich-text-values.js +1 -1
  1066. package/build-module/components/rich-text/index.js +1 -1
  1067. package/build-module/components/rich-text/index.native.js +2 -10
  1068. package/build-module/components/rich-text/index.native.js.map +1 -1
  1069. package/build-module/components/rich-text/multiline.js +1 -1
  1070. package/build-module/components/rich-text/toolbar-button.js +1 -1
  1071. package/build-module/components/rich-text/use-paste-handler.js +7 -89
  1072. package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
  1073. package/build-module/components/rich-text/utils.js +1 -3
  1074. package/build-module/components/rich-text/utils.js.map +1 -1
  1075. package/build-module/components/skip-to-selected-block/index.js +1 -1
  1076. package/build-module/components/spacing-sizes-control/index.js +1 -1
  1077. package/build-module/components/spacing-sizes-control/input-controls/axial.js +1 -1
  1078. package/build-module/components/spacing-sizes-control/input-controls/separated.js +1 -1
  1079. package/build-module/components/spacing-sizes-control/input-controls/single.js +1 -1
  1080. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -1
  1081. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +1 -1
  1082. package/build-module/components/text-decoration-control/index.js +2 -2
  1083. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1084. package/build-module/components/text-transform-control/index.js +2 -2
  1085. package/build-module/components/text-transform-control/index.js.map +1 -1
  1086. package/build-module/components/tool-selector/index.js +3 -2
  1087. package/build-module/components/tool-selector/index.js.map +1 -1
  1088. package/build-module/components/typewriter/index.js +2 -2
  1089. package/build-module/components/typewriter/index.js.map +1 -1
  1090. package/build-module/components/ungroup-button/index.native.js +1 -1
  1091. package/build-module/components/unit-control/index.js +1 -1
  1092. package/build-module/components/unsupported-block-details/index.native.js +118 -0
  1093. package/build-module/components/unsupported-block-details/index.native.js.map +1 -0
  1094. package/build-module/components/url-input/button.js +1 -1
  1095. package/build-module/components/url-input/index.js +1 -1
  1096. package/build-module/components/url-input/index.native.js +1 -1
  1097. package/build-module/components/url-popover/image-url-input-ui.js +1 -1
  1098. package/build-module/components/url-popover/index.js +1 -1
  1099. package/build-module/components/url-popover/link-editor.js +1 -1
  1100. package/build-module/components/url-popover/link-viewer-url.js +1 -1
  1101. package/build-module/components/url-popover/link-viewer.js +1 -1
  1102. package/build-module/components/use-on-block-drop/index.js +2 -2
  1103. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  1104. package/build-module/components/use-unsupported-block-editor/index.native.js +51 -0
  1105. package/build-module/components/use-unsupported-block-editor/index.native.js.map +1 -0
  1106. package/build-module/components/video-player/gridicon-play.native.js +1 -1
  1107. package/build-module/components/video-player/index.native.js +1 -1
  1108. package/build-module/components/warning/index.js +1 -1
  1109. package/build-module/components/warning/index.native.js +1 -1
  1110. package/build-module/components/writing-flow/index.js +5 -4
  1111. package/build-module/components/writing-flow/index.js.map +1 -1
  1112. package/build-module/components/writing-flow/use-clipboard-handler.js +172 -0
  1113. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -0
  1114. package/build-module/components/writing-flow/use-tab-nav.js +1 -1
  1115. package/build-module/components/writing-mode-control/index.js +2 -2
  1116. package/build-module/components/writing-mode-control/index.js.map +1 -1
  1117. package/build-module/hooks/align.js +1 -1
  1118. package/build-module/hooks/anchor.js +3 -3
  1119. package/build-module/hooks/anchor.js.map +1 -1
  1120. package/build-module/hooks/background.js +1 -1
  1121. package/build-module/hooks/block-hooks.js +1 -1
  1122. package/build-module/hooks/block-rename-ui.js +6 -3
  1123. package/build-module/hooks/block-rename-ui.js.map +1 -1
  1124. package/build-module/hooks/border.js +1 -1
  1125. package/build-module/hooks/color.js +1 -1
  1126. package/build-module/hooks/content-lock-ui.js +1 -1
  1127. package/build-module/hooks/contrast-checker.js +1 -1
  1128. package/build-module/hooks/custom-class-name.js +3 -3
  1129. package/build-module/hooks/custom-class-name.js.map +1 -1
  1130. package/build-module/hooks/custom-fields.js +3 -3
  1131. package/build-module/hooks/custom-fields.js.map +1 -1
  1132. package/build-module/hooks/dimensions.js +1 -1
  1133. package/build-module/hooks/duotone.js +1 -1
  1134. package/build-module/hooks/font-size.js +2 -2
  1135. package/build-module/hooks/font-size.js.map +1 -1
  1136. package/build-module/hooks/layout.js +1 -1
  1137. package/build-module/hooks/line-height.js +2 -2
  1138. package/build-module/hooks/line-height.js.map +1 -1
  1139. package/build-module/hooks/margin.js +1 -1
  1140. package/build-module/hooks/padding.js +1 -1
  1141. package/build-module/hooks/position.js +3 -3
  1142. package/build-module/hooks/position.js.map +1 -1
  1143. package/build-module/hooks/style.js +1 -1
  1144. package/build-module/hooks/typography.js +1 -1
  1145. package/build-module/hooks/typography.native.js +1 -1
  1146. package/build-module/layouts/constrained.js +1 -1
  1147. package/build-module/layouts/flex.js +1 -1
  1148. package/build-module/layouts/grid.js +1 -1
  1149. package/build-module/private-apis.js +2 -0
  1150. package/build-module/private-apis.js.map +1 -1
  1151. package/build-module/store/actions.js +8 -12
  1152. package/build-module/store/actions.js.map +1 -1
  1153. package/build-module/store/private-selectors.js +52 -0
  1154. package/build-module/store/private-selectors.js.map +1 -1
  1155. package/build-module/store/reducer.js +18 -1
  1156. package/build-module/store/reducer.js.map +1 -1
  1157. package/build-module/store/selectors.js +1 -1
  1158. package/build-module/store/selectors.js.map +1 -1
  1159. package/build-module/utils/pasting.js +47 -0
  1160. package/build-module/utils/pasting.js.map +1 -1
  1161. package/build-module/utils/transform-styles/transforms/wrap.js +5 -0
  1162. package/build-module/utils/transform-styles/transforms/wrap.js.map +1 -1
  1163. package/build-module/utils/use-notify-copy.js +46 -0
  1164. package/build-module/utils/use-notify-copy.js.map +1 -0
  1165. package/build-style/content-rtl.css +10 -11
  1166. package/build-style/content.css +10 -11
  1167. package/build-style/default-editor-styles-rtl.css +1 -1
  1168. package/build-style/default-editor-styles.css +1 -1
  1169. package/build-style/style-rtl.css +11 -12
  1170. package/build-style/style.css +11 -12
  1171. package/package.json +31 -32
  1172. package/src/components/block-actions/index.js +1 -1
  1173. package/src/components/block-breadcrumb/index.js +1 -1
  1174. package/src/components/block-canvas/index.js +6 -12
  1175. package/src/components/block-context/README.md +1 -1
  1176. package/src/components/block-heading-level-dropdown/heading-level-icon.js +2 -2
  1177. package/src/components/block-heading-level-dropdown/index.js +2 -2
  1178. package/src/components/block-heading-level-dropdown/index.native.js +2 -2
  1179. package/src/components/block-list/block-list-item.native.js +2 -2
  1180. package/src/components/block-parent-selector/index.js +1 -1
  1181. package/src/components/block-preview/index.js +1 -1
  1182. package/src/components/block-settings-menu/block-html-convert-button.js +28 -19
  1183. package/src/components/block-settings-menu-controls/index.js +1 -1
  1184. package/src/components/block-switcher/index.js +17 -18
  1185. package/src/components/block-switcher/test/__snapshots__/index.js.snap +2 -2
  1186. package/src/components/block-tools/block-selection-button.js +1 -1
  1187. package/src/components/border-radius-control/index.js +1 -1
  1188. package/src/components/child-layout-control/index.js +1 -1
  1189. package/src/components/color-palette/test/__snapshots__/control.js.snap +1 -1
  1190. package/src/components/colors/with-colors.js +1 -1
  1191. package/src/components/copy-handler/README.md +2 -0
  1192. package/src/components/copy-handler/index.js +21 -291
  1193. package/src/components/dimensions-tool/index.js +1 -1
  1194. package/src/components/dimensions-tool/scale-tool.js +1 -1
  1195. package/src/components/dimensions-tool/width-height-tool.js +1 -1
  1196. package/src/components/duotone-control/index.js +14 -2
  1197. package/src/components/editable-text/README.md +2 -2
  1198. package/src/components/font-appearance-control/index.js +1 -1
  1199. package/src/components/font-family/README.md +1 -1
  1200. package/src/components/global-styles/hooks.js +1 -1
  1201. package/src/components/global-styles/test/use-global-styles-output.js +39 -0
  1202. package/src/components/global-styles/use-global-styles-output.js +26 -6
  1203. package/src/components/global-styles/utils.js +21 -0
  1204. package/src/components/height-control/README.md +1 -1
  1205. package/src/components/height-control/index.js +1 -1
  1206. package/src/components/image-size-control/README.md +2 -2
  1207. package/src/components/index.js +1 -1
  1208. package/src/components/inner-blocks/constants.native.js +5 -0
  1209. package/src/components/inner-blocks/index.native.js +15 -0
  1210. package/src/components/inner-blocks/warning-max-depth-exceeded.native.js +100 -0
  1211. package/src/components/inserter/block-patterns-filter.js +22 -10
  1212. package/src/components/inserter/block-patterns-tab.js +0 -3
  1213. package/src/components/inserter/index.js +2 -2
  1214. package/src/components/inserter/index.native.js +2 -2
  1215. package/src/components/inserter/media-tab/hooks.js +10 -44
  1216. package/src/components/inserter/style.scss +1 -1
  1217. package/src/components/letter-spacing-control/index.js +1 -1
  1218. package/src/components/link-control/search-item.js +55 -2
  1219. package/src/components/list-view/block.js +3 -43
  1220. package/src/components/list-view/branch.js +11 -1
  1221. package/src/components/list-view/index.js +8 -4
  1222. package/src/components/list-view/utils.js +37 -0
  1223. package/src/components/media-placeholder/README.md +3 -3
  1224. package/src/components/media-upload/{constants.js → constants.native.js} +0 -1
  1225. package/src/components/media-upload/index.js +1 -1
  1226. package/src/components/media-upload/index.native.js +9 -5
  1227. package/src/components/panel-color-settings/README.md +5 -1
  1228. package/src/components/plain-text/README.md +1 -1
  1229. package/src/components/provider/README.md +1 -1
  1230. package/src/components/provider/use-block-sync.js +1 -1
  1231. package/src/components/publish-date-time-picker/README.md +1 -1
  1232. package/src/components/responsive-block-control/README.md +1 -3
  1233. package/src/components/rich-text/README.md +3 -3
  1234. package/src/components/rich-text/index.native.js +0 -13
  1235. package/src/components/rich-text/use-paste-handler.js +5 -99
  1236. package/src/components/rich-text/utils.js +0 -3
  1237. package/src/components/text-decoration-control/index.js +1 -1
  1238. package/src/components/text-transform-control/index.js +1 -1
  1239. package/src/components/tool-selector/index.js +1 -1
  1240. package/src/components/typewriter/index.js +1 -1
  1241. package/src/components/unit-control/README.md +1 -1
  1242. package/src/components/unsupported-block-details/index.native.js +183 -0
  1243. package/src/components/unsupported-block-details/style.native.scss +56 -0
  1244. package/src/components/url-input/README.md +4 -4
  1245. package/src/components/use-on-block-drop/index.js +2 -2
  1246. package/src/components/use-unsupported-block-editor/index.native.js +59 -0
  1247. package/src/components/writing-flow/index.js +4 -2
  1248. package/src/components/writing-flow/use-clipboard-handler.js +242 -0
  1249. package/src/components/writing-mode-control/index.js +1 -1
  1250. package/src/hooks/anchor.js +2 -2
  1251. package/src/hooks/block-rename-ui.js +14 -10
  1252. package/src/hooks/custom-class-name.js +2 -2
  1253. package/src/hooks/custom-fields.js +2 -2
  1254. package/src/hooks/font-size.js +1 -1
  1255. package/src/hooks/line-height.js +1 -1
  1256. package/src/hooks/position.js +2 -2
  1257. package/src/private-apis.js +2 -0
  1258. package/src/store/actions.js +7 -11
  1259. package/src/store/private-selectors.js +72 -0
  1260. package/src/store/reducer.js +17 -0
  1261. package/src/store/selectors.js +1 -1
  1262. package/src/store/test/actions.js +10 -16
  1263. package/src/utils/pasting.js +51 -0
  1264. package/src/utils/transform-styles/transforms/test/__snapshots__/wrap.js.snap +13 -6
  1265. package/src/utils/transform-styles/transforms/test/wrap.js +9 -0
  1266. package/src/utils/transform-styles/transforms/wrap.js +5 -0
  1267. package/src/utils/use-notify-copy.js +63 -0
  1268. package/tsconfig.tsbuildinfo +1 -1
  1269. package/build/components/block-settings-menu/block-convert-button.js +0 -27
  1270. package/build/components/block-settings-menu/block-convert-button.js.map +0 -1
  1271. package/build/components/media-upload/constants.js.map +0 -1
  1272. package/build-module/components/block-settings-menu/block-convert-button.js +0 -20
  1273. package/build-module/components/block-settings-menu/block-convert-button.js.map +0 -1
  1274. package/build-module/components/media-upload/constants.js.map +0 -1
  1275. package/src/components/block-settings-menu/block-convert-button.js +0 -14
@@ -1 +1 @@
1
- {"version":3,"names":["fastDeepEqual","useContext","useCallback","useMemo","useSelect","store","blocksStore","_x","getValueFromVariable","getPresetVariableFromValue","getValueFromObjectPath","setImmutably","GlobalStylesContext","unlock","EMPTY_CONFIG","settings","styles","VALID_SETTINGS","useGlobalStylesReset","user","config","setUserConfig","canReset","useGlobalSetting","propertyPath","blockName","source","configs","appendedBlockPath","appendedPropertyPath","contextualPath","globalPath","sourceKey","settingValue","configToUse","_getValueFromObjectPa","result","forEach","setting","_getValueFromObjectPa2","value","split","setSetting","newValue","currentConfig","useGlobalStyle","path","shouldDecodeEncode","merged","mergedConfig","base","baseConfig","userConfig","appendedPath","finalPath","setStyle","rawResult","useSettingsForBlockElement","parentSettings","element","supportedStyles","supports","select","getSupportedStyles","getBlockType","updatedSettings","includes","typography","fontSizes","customFontSize","fontFamilies","color","text","background","button","heading","link","caption","gradients","customGradient","defaultDuotone","customDuotone","key","textColumns","layout","spacing","sides","Array","isArray","length","dimensions","minHeight","charAt","toUpperCase","slice","border","shadow","useColorsPerOrigin","customColors","palette","custom","themeColors","theme","defaultColors","default","shouldDisplayDefaultColors","defaultPalette","push","name","colors","useGradientsPerOrigin","customGradients","themeGradients","defaultGradients","shouldDisplayDefaultGradients"],"sources":["@wordpress/block-editor/src/components/global-styles/hooks.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, useCallback, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { getValueFromVariable, getPresetVariableFromValue } from './utils';\nimport { getValueFromObjectPath, setImmutably } from '../../utils/object';\nimport { GlobalStylesContext } from './context';\nimport { unlock } from '../../lock-unlock';\n\nconst EMPTY_CONFIG = { settings: {}, styles: {} };\n\nconst VALID_SETTINGS = [\n\t'appearanceTools',\n\t'useRootPaddingAwareAlignments',\n\t'border.color',\n\t'border.radius',\n\t'border.style',\n\t'border.width',\n\t'shadow.presets',\n\t'shadow.defaultPresets',\n\t'color.background',\n\t'color.button',\n\t'color.caption',\n\t'color.custom',\n\t'color.customDuotone',\n\t'color.customGradient',\n\t'color.defaultDuotone',\n\t'color.defaultGradients',\n\t'color.defaultPalette',\n\t'color.duotone',\n\t'color.gradients',\n\t'color.heading',\n\t'color.link',\n\t'color.palette',\n\t'color.text',\n\t'custom',\n\t'dimensions.minHeight',\n\t'layout.contentSize',\n\t'layout.definitions',\n\t'layout.wideSize',\n\t'lightbox.enabled',\n\t'lightbox.allowEditing',\n\t'position.fixed',\n\t'position.sticky',\n\t'spacing.customSpacingSize',\n\t'spacing.spacingSizes',\n\t'spacing.spacingScale',\n\t'spacing.blockGap',\n\t'spacing.margin',\n\t'spacing.padding',\n\t'spacing.units',\n\t'typography.fluid',\n\t'typography.customFontSize',\n\t'typography.dropCap',\n\t'typography.fontFamilies',\n\t'typography.fontSizes',\n\t'typography.fontStyle',\n\t'typography.fontWeight',\n\t'typography.letterSpacing',\n\t'typography.lineHeight',\n\t'typography.textColumns',\n\t'typography.textDecoration',\n\t'typography.textTransform',\n\t'typography.writingMode',\n];\n\nexport const useGlobalStylesReset = () => {\n\tconst { user: config, setUserConfig } = useContext( GlobalStylesContext );\n\tconst canReset = !! config && ! fastDeepEqual( config, EMPTY_CONFIG );\n\treturn [\n\t\tcanReset,\n\t\tuseCallback(\n\t\t\t() => setUserConfig( () => EMPTY_CONFIG ),\n\t\t\t[ setUserConfig ]\n\t\t),\n\t];\n};\n\nexport function useGlobalSetting( propertyPath, blockName, source = 'all' ) {\n\tconst { setUserConfig, ...configs } = useContext( GlobalStylesContext );\n\tconst appendedBlockPath = blockName ? '.blocks.' + blockName : '';\n\tconst appendedPropertyPath = propertyPath ? '.' + propertyPath : '';\n\tconst contextualPath = `settings${ appendedBlockPath }${ appendedPropertyPath }`;\n\tconst globalPath = `settings${ appendedPropertyPath }`;\n\tconst sourceKey = source === 'all' ? 'merged' : source;\n\n\tconst settingValue = useMemo( () => {\n\t\tconst configToUse = configs[ sourceKey ];\n\t\tif ( ! configToUse ) {\n\t\t\tthrow 'Unsupported source';\n\t\t}\n\n\t\tif ( propertyPath ) {\n\t\t\treturn (\n\t\t\t\tgetValueFromObjectPath( configToUse, contextualPath ) ??\n\t\t\t\tgetValueFromObjectPath( configToUse, globalPath )\n\t\t\t);\n\t\t}\n\n\t\tlet result = {};\n\t\tVALID_SETTINGS.forEach( ( setting ) => {\n\t\t\tconst value =\n\t\t\t\tgetValueFromObjectPath(\n\t\t\t\t\tconfigToUse,\n\t\t\t\t\t`settings${ appendedBlockPath }.${ setting }`\n\t\t\t\t) ??\n\t\t\t\tgetValueFromObjectPath( configToUse, `settings.${ setting }` );\n\t\t\tif ( value ) {\n\t\t\t\tresult = setImmutably( result, setting.split( '.' ), value );\n\t\t\t}\n\t\t} );\n\t\treturn result;\n\t}, [\n\t\tconfigs,\n\t\tsourceKey,\n\t\tpropertyPath,\n\t\tcontextualPath,\n\t\tglobalPath,\n\t\tappendedBlockPath,\n\t] );\n\n\tconst setSetting = ( newValue ) => {\n\t\tsetUserConfig( ( currentConfig ) =>\n\t\t\tsetImmutably( currentConfig, contextualPath.split( '.' ), newValue )\n\t\t);\n\t};\n\treturn [ settingValue, setSetting ];\n}\n\nexport function useGlobalStyle(\n\tpath,\n\tblockName,\n\tsource = 'all',\n\t{ shouldDecodeEncode = true } = {}\n) {\n\tconst {\n\t\tmerged: mergedConfig,\n\t\tbase: baseConfig,\n\t\tuser: userConfig,\n\t\tsetUserConfig,\n\t} = useContext( GlobalStylesContext );\n\tconst appendedPath = path ? '.' + path : '';\n\tconst finalPath = ! blockName\n\t\t? `styles${ appendedPath }`\n\t\t: `styles.blocks.${ blockName }${ appendedPath }`;\n\n\tconst setStyle = ( newValue ) => {\n\t\tsetUserConfig( ( currentConfig ) =>\n\t\t\tsetImmutably(\n\t\t\t\tcurrentConfig,\n\t\t\t\tfinalPath.split( '.' ),\n\t\t\t\tshouldDecodeEncode\n\t\t\t\t\t? getPresetVariableFromValue(\n\t\t\t\t\t\t\tmergedConfig.settings,\n\t\t\t\t\t\t\tblockName,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tnewValue\n\t\t\t\t\t )\n\t\t\t\t\t: newValue\n\t\t\t)\n\t\t);\n\t};\n\n\tlet rawResult, result;\n\tswitch ( source ) {\n\t\tcase 'all':\n\t\t\trawResult = getValueFromObjectPath( mergedConfig, finalPath );\n\t\t\tresult = shouldDecodeEncode\n\t\t\t\t? getValueFromVariable( mergedConfig, blockName, rawResult )\n\t\t\t\t: rawResult;\n\t\t\tbreak;\n\t\tcase 'user':\n\t\t\trawResult = getValueFromObjectPath( userConfig, finalPath );\n\t\t\tresult = shouldDecodeEncode\n\t\t\t\t? getValueFromVariable( mergedConfig, blockName, rawResult )\n\t\t\t\t: rawResult;\n\t\t\tbreak;\n\t\tcase 'base':\n\t\t\trawResult = getValueFromObjectPath( baseConfig, finalPath );\n\t\t\tresult = shouldDecodeEncode\n\t\t\t\t? getValueFromVariable( baseConfig, blockName, rawResult )\n\t\t\t\t: rawResult;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow 'Unsupported source';\n\t}\n\n\treturn [ result, setStyle ];\n}\n\n/**\n * React hook that overrides a global settings object with block and element specific settings.\n *\n * @param {Object} parentSettings Settings object.\n * @param {blockName?} blockName Block name.\n * @param {element?} element Element name.\n *\n * @return {Object} Merge of settings and supports.\n */\nexport function useSettingsForBlockElement(\n\tparentSettings,\n\tblockName,\n\telement\n) {\n\tconst { supportedStyles, supports } = useSelect(\n\t\t( select ) => {\n\t\t\treturn {\n\t\t\t\tsupportedStyles: unlock(\n\t\t\t\t\tselect( blocksStore )\n\t\t\t\t).getSupportedStyles( blockName, element ),\n\t\t\t\tsupports:\n\t\t\t\t\tselect( blocksStore ).getBlockType( blockName )?.supports,\n\t\t\t};\n\t\t},\n\t\t[ blockName, element ]\n\t);\n\n\treturn useMemo( () => {\n\t\tconst updatedSettings = { ...parentSettings };\n\n\t\tif ( ! supportedStyles.includes( 'fontSize' ) ) {\n\t\t\tupdatedSettings.typography = {\n\t\t\t\t...updatedSettings.typography,\n\t\t\t\tfontSizes: {},\n\t\t\t\tcustomFontSize: false,\n\t\t\t};\n\t\t}\n\n\t\tif ( ! supportedStyles.includes( 'fontFamily' ) ) {\n\t\t\tupdatedSettings.typography = {\n\t\t\t\t...updatedSettings.typography,\n\t\t\t\tfontFamilies: {},\n\t\t\t};\n\t\t}\n\n\t\tupdatedSettings.color = {\n\t\t\t...updatedSettings.color,\n\t\t\ttext:\n\t\t\t\tupdatedSettings.color?.text &&\n\t\t\t\tsupportedStyles.includes( 'color' ),\n\t\t\tbackground:\n\t\t\t\tupdatedSettings.color?.background &&\n\t\t\t\t( supportedStyles.includes( 'background' ) ||\n\t\t\t\t\tsupportedStyles.includes( 'backgroundColor' ) ),\n\t\t\tbutton:\n\t\t\t\tupdatedSettings.color?.button &&\n\t\t\t\tsupportedStyles.includes( 'buttonColor' ),\n\t\t\theading:\n\t\t\t\tupdatedSettings.color?.heading &&\n\t\t\t\tsupportedStyles.includes( 'headingColor' ),\n\t\t\tlink:\n\t\t\t\tupdatedSettings.color?.link &&\n\t\t\t\tsupportedStyles.includes( 'linkColor' ),\n\t\t\tcaption:\n\t\t\t\tupdatedSettings.color?.caption &&\n\t\t\t\tsupportedStyles.includes( 'captionColor' ),\n\t\t};\n\n\t\t// Some blocks can enable background colors but disable gradients.\n\t\tif ( ! supportedStyles.includes( 'background' ) ) {\n\t\t\tupdatedSettings.color.gradients = [];\n\t\t\tupdatedSettings.color.customGradient = false;\n\t\t}\n\n\t\t// If filters are not supported by the block/element, disable duotone.\n\t\tif ( ! supportedStyles.includes( 'filter' ) ) {\n\t\t\tupdatedSettings.color.defaultDuotone = false;\n\t\t\tupdatedSettings.color.customDuotone = false;\n\t\t}\n\n\t\t[\n\t\t\t'lineHeight',\n\t\t\t'fontStyle',\n\t\t\t'fontWeight',\n\t\t\t'letterSpacing',\n\t\t\t'textTransform',\n\t\t\t'textDecoration',\n\t\t\t'writingMode',\n\t\t].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.typography = {\n\t\t\t\t\t...updatedSettings.typography,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t// The column-count style is named text column to reduce confusion with\n\t\t// the columns block and manage expectations from the support.\n\t\t// See: https://github.com/WordPress/gutenberg/pull/33587\n\t\tif ( ! supportedStyles.includes( 'columnCount' ) ) {\n\t\t\tupdatedSettings.typography = {\n\t\t\t\t...updatedSettings.typography,\n\t\t\t\ttextColumns: false,\n\t\t\t};\n\t\t}\n\n\t\t[ 'contentSize', 'wideSize' ].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.layout = {\n\t\t\t\t\t...updatedSettings.layout,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t[ 'padding', 'margin', 'blockGap' ].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.spacing = {\n\t\t\t\t\t...updatedSettings.spacing,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst sides = Array.isArray( supports?.spacing?.[ key ] )\n\t\t\t\t? supports?.spacing?.[ key ]\n\t\t\t\t: supports?.spacing?.[ key ]?.sides;\n\t\t\t// Check if spacing type is supported before adding sides.\n\t\t\tif ( sides?.length && updatedSettings.spacing?.[ key ] ) {\n\t\t\t\tupdatedSettings.spacing = {\n\t\t\t\t\t...updatedSettings.spacing,\n\t\t\t\t\t[ key ]: {\n\t\t\t\t\t\t...updatedSettings.spacing?.[ key ],\n\t\t\t\t\t\tsides,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\tif ( ! supportedStyles.includes( 'minHeight' ) ) {\n\t\t\tupdatedSettings.dimensions = {\n\t\t\t\t...updatedSettings.dimensions,\n\t\t\t\tminHeight: false,\n\t\t\t};\n\t\t}\n\n\t\t[ 'radius', 'color', 'style', 'width' ].forEach( ( key ) => {\n\t\t\tif (\n\t\t\t\t! supportedStyles.includes(\n\t\t\t\t\t'border' + key.charAt( 0 ).toUpperCase() + key.slice( 1 )\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tupdatedSettings.border = {\n\t\t\t\t\t...updatedSettings.border,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\tupdatedSettings.shadow = supportedStyles.includes( 'shadow' )\n\t\t\t? updatedSettings.shadow\n\t\t\t: false;\n\n\t\treturn updatedSettings;\n\t}, [ parentSettings, supportedStyles, supports ] );\n}\n\nexport function useColorsPerOrigin( settings ) {\n\tconst customColors = settings?.color?.palette?.custom;\n\tconst themeColors = settings?.color?.palette?.theme;\n\tconst defaultColors = settings?.color?.palette?.default;\n\tconst shouldDisplayDefaultColors = settings?.color?.defaultPalette;\n\n\treturn useMemo( () => {\n\t\tconst result = [];\n\t\tif ( themeColors && themeColors.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates this palette comes from the theme.'\n\t\t\t\t),\n\t\t\t\tcolors: themeColors,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tshouldDisplayDefaultColors &&\n\t\t\tdefaultColors &&\n\t\t\tdefaultColors.length\n\t\t) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates this palette comes from WordPress.'\n\t\t\t\t),\n\t\t\t\tcolors: defaultColors,\n\t\t\t} );\n\t\t}\n\t\tif ( customColors && customColors.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates this palette is created by the user.'\n\t\t\t\t),\n\t\t\t\tcolors: customColors,\n\t\t\t} );\n\t\t}\n\t\treturn result;\n\t}, [\n\t\tcustomColors,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tshouldDisplayDefaultColors,\n\t] );\n}\n\nexport function useGradientsPerOrigin( settings ) {\n\tconst customGradients = settings?.color?.gradients?.custom;\n\tconst themeGradients = settings?.color?.gradients?.theme;\n\tconst defaultGradients = settings?.color?.gradients?.default;\n\tconst shouldDisplayDefaultGradients = settings?.color?.defaultGradients;\n\n\treturn useMemo( () => {\n\t\tconst result = [];\n\t\tif ( themeGradients && themeGradients.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates this palette comes from the theme.'\n\t\t\t\t),\n\t\t\t\tgradients: themeGradients,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tshouldDisplayDefaultGradients &&\n\t\t\tdefaultGradients &&\n\t\t\tdefaultGradients.length\n\t\t) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates this palette comes from WordPress.'\n\t\t\t\t),\n\t\t\t\tgradients: defaultGradients,\n\t\t\t} );\n\t\t}\n\t\tif ( customGradients && customGradients.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates this palette is created by the user.'\n\t\t\t\t),\n\t\t\t\tgradients: customGradients,\n\t\t\t} );\n\t\t}\n\t\treturn result;\n\t}, [\n\t\tcustomGradients,\n\t\tthemeGradients,\n\t\tdefaultGradients,\n\t\tshouldDisplayDefaultGradients,\n\t] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,qBAAqB;;AAE/C;AACA;AACA;AACA,SAASC,UAAU,EAAEC,WAAW,EAAEC,OAAO,QAAQ,oBAAoB;AACrE,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SA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"version":3,"names":["fastDeepEqual","useContext","useCallback","useMemo","useSelect","store","blocksStore","_x","getValueFromVariable","getPresetVariableFromValue","getValueFromObjectPath","setImmutably","GlobalStylesContext","unlock","EMPTY_CONFIG","settings","styles","VALID_SETTINGS","useGlobalStylesReset","user","config","setUserConfig","canReset","useGlobalSetting","propertyPath","blockName","source","configs","appendedBlockPath","appendedPropertyPath","contextualPath","globalPath","sourceKey","settingValue","configToUse","_getValueFromObjectPa","result","forEach","setting","_getValueFromObjectPa2","value","undefined","split","setSetting","newValue","currentConfig","useGlobalStyle","path","shouldDecodeEncode","merged","mergedConfig","base","baseConfig","userConfig","appendedPath","finalPath","setStyle","rawResult","useSettingsForBlockElement","parentSettings","element","supportedStyles","supports","select","getSupportedStyles","getBlockType","updatedSettings","includes","typography","fontSizes","customFontSize","fontFamilies","color","text","background","button","heading","link","caption","gradients","customGradient","defaultDuotone","customDuotone","key","textColumns","layout","spacing","sides","Array","isArray","length","dimensions","minHeight","charAt","toUpperCase","slice","border","shadow","useColorsPerOrigin","customColors","palette","custom","themeColors","theme","defaultColors","default","shouldDisplayDefaultColors","defaultPalette","push","name","colors","useGradientsPerOrigin","customGradients","themeGradients","defaultGradients","shouldDisplayDefaultGradients"],"sources":["@wordpress/block-editor/src/components/global-styles/hooks.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, useCallback, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { getValueFromVariable, getPresetVariableFromValue } from './utils';\nimport { getValueFromObjectPath, setImmutably } from '../../utils/object';\nimport { GlobalStylesContext } from './context';\nimport { unlock } from '../../lock-unlock';\n\nconst EMPTY_CONFIG = { settings: {}, styles: {} };\n\nconst VALID_SETTINGS = [\n\t'appearanceTools',\n\t'useRootPaddingAwareAlignments',\n\t'border.color',\n\t'border.radius',\n\t'border.style',\n\t'border.width',\n\t'shadow.presets',\n\t'shadow.defaultPresets',\n\t'color.background',\n\t'color.button',\n\t'color.caption',\n\t'color.custom',\n\t'color.customDuotone',\n\t'color.customGradient',\n\t'color.defaultDuotone',\n\t'color.defaultGradients',\n\t'color.defaultPalette',\n\t'color.duotone',\n\t'color.gradients',\n\t'color.heading',\n\t'color.link',\n\t'color.palette',\n\t'color.text',\n\t'custom',\n\t'dimensions.minHeight',\n\t'layout.contentSize',\n\t'layout.definitions',\n\t'layout.wideSize',\n\t'lightbox.enabled',\n\t'lightbox.allowEditing',\n\t'position.fixed',\n\t'position.sticky',\n\t'spacing.customSpacingSize',\n\t'spacing.spacingSizes',\n\t'spacing.spacingScale',\n\t'spacing.blockGap',\n\t'spacing.margin',\n\t'spacing.padding',\n\t'spacing.units',\n\t'typography.fluid',\n\t'typography.customFontSize',\n\t'typography.dropCap',\n\t'typography.fontFamilies',\n\t'typography.fontSizes',\n\t'typography.fontStyle',\n\t'typography.fontWeight',\n\t'typography.letterSpacing',\n\t'typography.lineHeight',\n\t'typography.textColumns',\n\t'typography.textDecoration',\n\t'typography.textTransform',\n\t'typography.writingMode',\n];\n\nexport const useGlobalStylesReset = () => {\n\tconst { user: config, setUserConfig } = useContext( GlobalStylesContext );\n\tconst canReset = !! config && ! fastDeepEqual( config, EMPTY_CONFIG );\n\treturn [\n\t\tcanReset,\n\t\tuseCallback(\n\t\t\t() => setUserConfig( () => EMPTY_CONFIG ),\n\t\t\t[ setUserConfig ]\n\t\t),\n\t];\n};\n\nexport function useGlobalSetting( propertyPath, blockName, source = 'all' ) {\n\tconst { setUserConfig, ...configs } = useContext( GlobalStylesContext );\n\tconst appendedBlockPath = blockName ? '.blocks.' + blockName : '';\n\tconst appendedPropertyPath = propertyPath ? '.' + propertyPath : '';\n\tconst contextualPath = `settings${ appendedBlockPath }${ appendedPropertyPath }`;\n\tconst globalPath = `settings${ appendedPropertyPath }`;\n\tconst sourceKey = source === 'all' ? 'merged' : source;\n\n\tconst settingValue = useMemo( () => {\n\t\tconst configToUse = configs[ sourceKey ];\n\t\tif ( ! configToUse ) {\n\t\t\tthrow 'Unsupported source';\n\t\t}\n\n\t\tif ( propertyPath ) {\n\t\t\treturn (\n\t\t\t\tgetValueFromObjectPath( configToUse, contextualPath ) ??\n\t\t\t\tgetValueFromObjectPath( configToUse, globalPath )\n\t\t\t);\n\t\t}\n\n\t\tlet result = {};\n\t\tVALID_SETTINGS.forEach( ( setting ) => {\n\t\t\tconst value =\n\t\t\t\tgetValueFromObjectPath(\n\t\t\t\t\tconfigToUse,\n\t\t\t\t\t`settings${ appendedBlockPath }.${ setting }`\n\t\t\t\t) ??\n\t\t\t\tgetValueFromObjectPath( configToUse, `settings.${ setting }` );\n\t\t\tif ( value !== undefined ) {\n\t\t\t\tresult = setImmutably( result, setting.split( '.' ), value );\n\t\t\t}\n\t\t} );\n\t\treturn result;\n\t}, [\n\t\tconfigs,\n\t\tsourceKey,\n\t\tpropertyPath,\n\t\tcontextualPath,\n\t\tglobalPath,\n\t\tappendedBlockPath,\n\t] );\n\n\tconst setSetting = ( newValue ) => {\n\t\tsetUserConfig( ( currentConfig ) =>\n\t\t\tsetImmutably( currentConfig, contextualPath.split( '.' ), newValue )\n\t\t);\n\t};\n\treturn [ settingValue, setSetting ];\n}\n\nexport function useGlobalStyle(\n\tpath,\n\tblockName,\n\tsource = 'all',\n\t{ shouldDecodeEncode = true } = {}\n) {\n\tconst {\n\t\tmerged: mergedConfig,\n\t\tbase: baseConfig,\n\t\tuser: userConfig,\n\t\tsetUserConfig,\n\t} = useContext( GlobalStylesContext );\n\tconst appendedPath = path ? '.' + path : '';\n\tconst finalPath = ! blockName\n\t\t? `styles${ appendedPath }`\n\t\t: `styles.blocks.${ blockName }${ appendedPath }`;\n\n\tconst setStyle = ( newValue ) => {\n\t\tsetUserConfig( ( currentConfig ) =>\n\t\t\tsetImmutably(\n\t\t\t\tcurrentConfig,\n\t\t\t\tfinalPath.split( '.' ),\n\t\t\t\tshouldDecodeEncode\n\t\t\t\t\t? getPresetVariableFromValue(\n\t\t\t\t\t\t\tmergedConfig.settings,\n\t\t\t\t\t\t\tblockName,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tnewValue\n\t\t\t\t\t )\n\t\t\t\t\t: newValue\n\t\t\t)\n\t\t);\n\t};\n\n\tlet rawResult, result;\n\tswitch ( source ) {\n\t\tcase 'all':\n\t\t\trawResult = getValueFromObjectPath( mergedConfig, finalPath );\n\t\t\tresult = shouldDecodeEncode\n\t\t\t\t? getValueFromVariable( mergedConfig, blockName, rawResult )\n\t\t\t\t: rawResult;\n\t\t\tbreak;\n\t\tcase 'user':\n\t\t\trawResult = getValueFromObjectPath( userConfig, finalPath );\n\t\t\tresult = shouldDecodeEncode\n\t\t\t\t? getValueFromVariable( mergedConfig, blockName, rawResult )\n\t\t\t\t: rawResult;\n\t\t\tbreak;\n\t\tcase 'base':\n\t\t\trawResult = getValueFromObjectPath( baseConfig, finalPath );\n\t\t\tresult = shouldDecodeEncode\n\t\t\t\t? getValueFromVariable( baseConfig, blockName, rawResult )\n\t\t\t\t: rawResult;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow 'Unsupported source';\n\t}\n\n\treturn [ result, setStyle ];\n}\n\n/**\n * React hook that overrides a global settings object with block and element specific settings.\n *\n * @param {Object} parentSettings Settings object.\n * @param {blockName?} blockName Block name.\n * @param {element?} element Element name.\n *\n * @return {Object} Merge of settings and supports.\n */\nexport function useSettingsForBlockElement(\n\tparentSettings,\n\tblockName,\n\telement\n) {\n\tconst { supportedStyles, supports } = useSelect(\n\t\t( select ) => {\n\t\t\treturn {\n\t\t\t\tsupportedStyles: unlock(\n\t\t\t\t\tselect( blocksStore )\n\t\t\t\t).getSupportedStyles( blockName, element ),\n\t\t\t\tsupports:\n\t\t\t\t\tselect( blocksStore ).getBlockType( blockName )?.supports,\n\t\t\t};\n\t\t},\n\t\t[ blockName, element ]\n\t);\n\n\treturn useMemo( () => {\n\t\tconst updatedSettings = { ...parentSettings };\n\n\t\tif ( ! supportedStyles.includes( 'fontSize' ) ) {\n\t\t\tupdatedSettings.typography = {\n\t\t\t\t...updatedSettings.typography,\n\t\t\t\tfontSizes: {},\n\t\t\t\tcustomFontSize: false,\n\t\t\t};\n\t\t}\n\n\t\tif ( ! supportedStyles.includes( 'fontFamily' ) ) {\n\t\t\tupdatedSettings.typography = {\n\t\t\t\t...updatedSettings.typography,\n\t\t\t\tfontFamilies: {},\n\t\t\t};\n\t\t}\n\n\t\tupdatedSettings.color = {\n\t\t\t...updatedSettings.color,\n\t\t\ttext:\n\t\t\t\tupdatedSettings.color?.text &&\n\t\t\t\tsupportedStyles.includes( 'color' ),\n\t\t\tbackground:\n\t\t\t\tupdatedSettings.color?.background &&\n\t\t\t\t( supportedStyles.includes( 'background' ) ||\n\t\t\t\t\tsupportedStyles.includes( 'backgroundColor' ) ),\n\t\t\tbutton:\n\t\t\t\tupdatedSettings.color?.button &&\n\t\t\t\tsupportedStyles.includes( 'buttonColor' ),\n\t\t\theading:\n\t\t\t\tupdatedSettings.color?.heading &&\n\t\t\t\tsupportedStyles.includes( 'headingColor' ),\n\t\t\tlink:\n\t\t\t\tupdatedSettings.color?.link &&\n\t\t\t\tsupportedStyles.includes( 'linkColor' ),\n\t\t\tcaption:\n\t\t\t\tupdatedSettings.color?.caption &&\n\t\t\t\tsupportedStyles.includes( 'captionColor' ),\n\t\t};\n\n\t\t// Some blocks can enable background colors but disable gradients.\n\t\tif ( ! supportedStyles.includes( 'background' ) ) {\n\t\t\tupdatedSettings.color.gradients = [];\n\t\t\tupdatedSettings.color.customGradient = false;\n\t\t}\n\n\t\t// If filters are not supported by the block/element, disable duotone.\n\t\tif ( ! supportedStyles.includes( 'filter' ) ) {\n\t\t\tupdatedSettings.color.defaultDuotone = false;\n\t\t\tupdatedSettings.color.customDuotone = false;\n\t\t}\n\n\t\t[\n\t\t\t'lineHeight',\n\t\t\t'fontStyle',\n\t\t\t'fontWeight',\n\t\t\t'letterSpacing',\n\t\t\t'textTransform',\n\t\t\t'textDecoration',\n\t\t\t'writingMode',\n\t\t].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.typography = {\n\t\t\t\t\t...updatedSettings.typography,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t// The column-count style is named text column to reduce confusion with\n\t\t// the columns block and manage expectations from the support.\n\t\t// See: https://github.com/WordPress/gutenberg/pull/33587\n\t\tif ( ! supportedStyles.includes( 'columnCount' ) ) {\n\t\t\tupdatedSettings.typography = {\n\t\t\t\t...updatedSettings.typography,\n\t\t\t\ttextColumns: false,\n\t\t\t};\n\t\t}\n\n\t\t[ 'contentSize', 'wideSize' ].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.layout = {\n\t\t\t\t\t...updatedSettings.layout,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t[ 'padding', 'margin', 'blockGap' ].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.spacing = {\n\t\t\t\t\t...updatedSettings.spacing,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst sides = Array.isArray( supports?.spacing?.[ key ] )\n\t\t\t\t? supports?.spacing?.[ key ]\n\t\t\t\t: supports?.spacing?.[ key ]?.sides;\n\t\t\t// Check if spacing type is supported before adding sides.\n\t\t\tif ( sides?.length && updatedSettings.spacing?.[ key ] ) {\n\t\t\t\tupdatedSettings.spacing = {\n\t\t\t\t\t...updatedSettings.spacing,\n\t\t\t\t\t[ key ]: {\n\t\t\t\t\t\t...updatedSettings.spacing?.[ key ],\n\t\t\t\t\t\tsides,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\tif ( ! supportedStyles.includes( 'minHeight' ) ) {\n\t\t\tupdatedSettings.dimensions = {\n\t\t\t\t...updatedSettings.dimensions,\n\t\t\t\tminHeight: false,\n\t\t\t};\n\t\t}\n\n\t\t[ 'radius', 'color', 'style', 'width' ].forEach( ( key ) => {\n\t\t\tif (\n\t\t\t\t! supportedStyles.includes(\n\t\t\t\t\t'border' + key.charAt( 0 ).toUpperCase() + key.slice( 1 )\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tupdatedSettings.border = {\n\t\t\t\t\t...updatedSettings.border,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\tupdatedSettings.shadow = supportedStyles.includes( 'shadow' )\n\t\t\t? updatedSettings.shadow\n\t\t\t: false;\n\n\t\treturn updatedSettings;\n\t}, [ parentSettings, supportedStyles, supports ] );\n}\n\nexport function useColorsPerOrigin( settings ) {\n\tconst customColors = settings?.color?.palette?.custom;\n\tconst themeColors = settings?.color?.palette?.theme;\n\tconst defaultColors = settings?.color?.palette?.default;\n\tconst shouldDisplayDefaultColors = settings?.color?.defaultPalette;\n\n\treturn useMemo( () => {\n\t\tconst result = [];\n\t\tif ( themeColors && themeColors.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates this palette comes from the theme.'\n\t\t\t\t),\n\t\t\t\tcolors: themeColors,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tshouldDisplayDefaultColors &&\n\t\t\tdefaultColors &&\n\t\t\tdefaultColors.length\n\t\t) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates this palette comes from WordPress.'\n\t\t\t\t),\n\t\t\t\tcolors: defaultColors,\n\t\t\t} );\n\t\t}\n\t\tif ( customColors && customColors.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates this palette is created by the user.'\n\t\t\t\t),\n\t\t\t\tcolors: customColors,\n\t\t\t} );\n\t\t}\n\t\treturn result;\n\t}, [\n\t\tcustomColors,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tshouldDisplayDefaultColors,\n\t] );\n}\n\nexport function useGradientsPerOrigin( settings ) {\n\tconst customGradients = settings?.color?.gradients?.custom;\n\tconst themeGradients = settings?.color?.gradients?.theme;\n\tconst defaultGradients = settings?.color?.gradients?.default;\n\tconst shouldDisplayDefaultGradients = settings?.color?.defaultGradients;\n\n\treturn useMemo( () => {\n\t\tconst result = [];\n\t\tif ( themeGradients && themeGradients.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates this palette comes from the theme.'\n\t\t\t\t),\n\t\t\t\tgradients: themeGradients,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tshouldDisplayDefaultGradients &&\n\t\t\tdefaultGradients &&\n\t\t\tdefaultGradients.length\n\t\t) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates this palette comes from WordPress.'\n\t\t\t\t),\n\t\t\t\tgradients: defaultGradients,\n\t\t\t} );\n\t\t}\n\t\tif ( customGradients && customGradients.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates this palette is created by the user.'\n\t\t\t\t),\n\t\t\t\tgradients: customGradients,\n\t\t\t} );\n\t\t}\n\t\treturn result;\n\t}, [\n\t\tcustomGradients,\n\t\tthemeGradients,\n\t\tdefaultGradients,\n\t\tshouldDisplayDefaultGradients,\n\t] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,qBAAqB;;AAE/C;AACA;AACA;AACA,SAASC,UAAU,EAAEC,WAAW,EAAEC,OAAO,QAAQ,oBAAoB;AACrE,SAASC,S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EACdC,gBAAgB,EAChBC,6BAA6B,CAC5B,CAAC;AACJ"}
@@ -1,4 +1,4 @@
1
- import { createElement, Fragment } from "@wordpress/element";
1
+ import { createElement, Fragment } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */
@@ -9,7 +9,7 @@ import { getCSSRules } from '@wordpress/style-engine';
9
9
  /**
10
10
  * Internal dependencies
11
11
  */
12
- import { PRESET_METADATA, ROOT_BLOCK_SELECTOR, scopeSelector } from './utils';
12
+ import { PRESET_METADATA, ROOT_BLOCK_SELECTOR, scopeSelector, appendToSelector } from './utils';
13
13
  import { getBlockCSSSelector } from './get-block-css-selector';
14
14
  import { getTypographyFontSizeValue, getFluidTypographyOptionsFromSettings } from './typography-utils';
15
15
  import { GlobalStylesContext } from './context';
@@ -798,18 +798,29 @@ function updateConfigWithSeparator(config) {
798
798
  }
799
799
  return config;
800
800
  }
801
- const processCSSNesting = (css, blockSelector) => {
801
+ export function processCSSNesting(css, blockSelector) {
802
802
  let processedCSS = '';
803
803
 
804
804
  // Split CSS nested rules.
805
805
  const parts = css.split('&');
806
806
  parts.forEach(part => {
807
- processedCSS += !part.includes('{') ? blockSelector + '{' + part + '}' // If the part doesn't contain braces, it applies to the root level.
808
- : blockSelector + part; // Prepend the selector, which effectively replaces the "&" character.
807
+ const isRootCss = !part.includes('{');
808
+ if (isRootCss) {
809
+ // If the part doesn't contain braces, it applies to the root level.
810
+ processedCSS += `${blockSelector}{${part.trim()}}`;
811
+ } else {
812
+ // If the part contains braces, it's a nested CSS rule.
813
+ const splittedPart = part.replace('}', '').split('{');
814
+ if (splittedPart.length !== 2) {
815
+ return;
816
+ }
817
+ const [nestedSelector, cssValue] = splittedPart;
818
+ const combinedSelector = nestedSelector.startsWith(' ') ? scopeSelector(blockSelector, nestedSelector) : appendToSelector(blockSelector, nestedSelector);
819
+ processedCSS += `${combinedSelector}{${cssValue.trim()}}`;
820
+ }
809
821
  });
810
-
811
822
  return processedCSS;
812
- };
823
+ }
813
824
 
814
825
  /**
815
826
  * Returns the global styles output using a global styles configuration.
@@ -1 +1 @@
1
- {"version":3,"names":["__EXPERIMENTAL_STYLE_PROPERTY","STYLE_PROPERTY","__EXPERIMENTAL_ELEMENTS","ELEMENTS","getBlockSupport","getBlockTypes","store","blocksStore","useSelect","useContext","useMemo","getCSSRules","PRESET_METADATA","ROOT_BLOCK_SELECTOR","scopeSelector","getBlockCSSSelector","getTypographyFontSizeValue","getFluidTypographyOptionsFromSettings","GlobalStylesContext","useGlobalSetting","getDuotoneFilter","getGapCSSValue","blockEditorStore","LAYOUT_DEFINITIONS","getValueFromObjectPath","kebabCase","setImmutably","BlockContext","BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS","__experimentalBorder","color","spacing","typography","compileStyleValue","uncompiledValue","VARIABLE_REFERENCE_PREFIX","VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE","VARIABLE_PATH_SEPARATOR_TOKEN_STYLE","startsWith","variable","slice","length","split","join","getPresetsDeclarations","blockPresets","mergedSettings","reduce","declarations","path","valueKey","valueFunc","cssVarInfix","presetByOrigin","forEach","origin","value","push","slug","getPresetsClasses","blockSelector","classes","classSuffix","propertyName","classSelectorToUse","selectorToUse","map","selector","getPresetsSvgFilters","filter","metadata","at","flatMap","preset","colors","flattenTree","input","prefix","token","result","Object","keys","key","newKey","replace","newLeaf","newPrefix","concatFeatureVariationSelectorString","featureSelector","styleVariationSelector","featureSelectors","combinedSelectors","trim","getFeatureDeclarations","selectors","styles","entries","feature","isShorthand","subfeature","subfeatureSelector","subfeatureStyles","newDeclarations","getStylesDeclarations","root","featureStyles","blockStyles","useRootPaddingAlign","tree","isTemplate","isRoot","output","properties","useEngine","rootOnly","pathToValue","styleValue","entry","name","prop","cssProperty","extraRules","rule","ruleValue","ref","refPath","size","settings","getLayoutStyles","layoutDefinitions","style","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","ruleset","gapValue","blockGap","values","className","spacingStyles","spacingStyle","rules","cssValue","combinedSelector","validDisplayModes","displayMode","baseStyles","includes","baseStyle","STYLE_KEYS","pickStyleKeys","treeToPickFrom","pickedEntries","clonedEntries","JSON","parse","stringify","fromEntries","getNodesWithStyles","blockSelectors","_tree$styles$blocks","nodes","elements","blocks","blockName","node","_node$elements","variations","variation","duotoneSelector","hasLayoutSupport","styleVariationSelectors","elementName","sel","elementSelectors","elementSelector","getNodesWithSettings","_tree$settings$blocks","pickPresets","presets","custom","blockCustom","toCustomProperties","customProps","toStyles","disableLayoutStyles","nodesWithStyles","nodesWithSettings","useRootPaddingAwareAlignments","contentSize","wideSize","layout","featureDeclarations","cssSelector","styleVariationName","styleVariations","baseSelector","styleVariationDeclarations","duotoneStyles","duotoneDeclarations","pseudoSelectorStyles","pseudoKey","pseudoStyle","pseudoDeclarations","_selector","pseudoRule","toSvgFilters","getSelectorsConfig","blockType","rootSelector","config","featureKey","featureName","getBlockSelectors","blockTypes","getBlockStyles","duotoneSupport","supports","__experimentalLayout","__experimentalDefault","blockStyleVariations","undefined","updateConfigWithSeparator","needsSeparatorStyleUpdate","background","text","border","processCSSNesting","css","processedCSS","parts","part","useGlobalStylesOutputWithConfig","mergedConfig","select","getSettings","blockContext","templateSlug","_mergedConfig$styles$","customProperties","globalStyles","svgs","isGlobalStyles","assets","__unstableType","useGlobalStylesOutput","merged"],"sources":["@wordpress/block-editor/src/components/global-styles/use-global-styles-output.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__EXPERIMENTAL_STYLE_PROPERTY as STYLE_PROPERTY,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n\tgetBlockSupport,\n\tgetBlockTypes,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { getCSSRules } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport { PRESET_METADATA, ROOT_BLOCK_SELECTOR, scopeSelector } from './utils';\nimport { getBlockCSSSelector } from './get-block-css-selector';\nimport {\n\tgetTypographyFontSizeValue,\n\tgetFluidTypographyOptionsFromSettings,\n} from './typography-utils';\nimport { GlobalStylesContext } from './context';\nimport { useGlobalSetting } from './hooks';\nimport { getDuotoneFilter } from '../duotone/utils';\nimport { getGapCSSValue } from '../../hooks/gap';\nimport { store as blockEditorStore } from '../../store';\nimport { LAYOUT_DEFINITIONS } from '../../layouts/definitions';\nimport {\n\tgetValueFromObjectPath,\n\tkebabCase,\n\tsetImmutably,\n} from '../../utils/object';\nimport BlockContext from '../block-context';\n\n// List of block support features that can have their related styles\n// generated under their own feature level selector rather than the block's.\nconst BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS = {\n\t__experimentalBorder: 'border',\n\tcolor: 'color',\n\tspacing: 'spacing',\n\ttypography: 'typography',\n};\n\nfunction compileStyleValue( uncompiledValue ) {\n\tconst VARIABLE_REFERENCE_PREFIX = 'var:';\n\tconst VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|';\n\tconst VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--';\n\n\tif ( uncompiledValue?.startsWith?.( VARIABLE_REFERENCE_PREFIX ) ) {\n\t\tconst variable = uncompiledValue\n\t\t\t.slice( VARIABLE_REFERENCE_PREFIX.length )\n\t\t\t.split( VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE )\n\t\t\t.join( VARIABLE_PATH_SEPARATOR_TOKEN_STYLE );\n\t\treturn `var(--wp--${ variable })`;\n\t}\n\treturn uncompiledValue;\n}\n\n/**\n * Transform given preset tree into a set of style declarations.\n *\n * @param {Object} blockPresets\n * @param {Object} mergedSettings Merged theme.json settings.\n *\n * @return {Array<Object>} An array of style declarations.\n */\nfunction getPresetsDeclarations( blockPresets = {}, mergedSettings ) {\n\treturn PRESET_METADATA.reduce(\n\t\t( declarations, { path, valueKey, valueFunc, cssVarInfix } ) => {\n\t\t\tconst presetByOrigin = getValueFromObjectPath(\n\t\t\t\tblockPresets,\n\t\t\t\tpath,\n\t\t\t\t[]\n\t\t\t);\n\t\t\t[ 'default', 'theme', 'custom' ].forEach( ( origin ) => {\n\t\t\t\tif ( presetByOrigin[ origin ] ) {\n\t\t\t\t\tpresetByOrigin[ origin ].forEach( ( value ) => {\n\t\t\t\t\t\tif ( valueKey && ! valueFunc ) {\n\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t`--wp--preset--${ cssVarInfix }--${ kebabCase(\n\t\t\t\t\t\t\t\t\tvalue.slug\n\t\t\t\t\t\t\t\t) }: ${ value[ valueKey ] }`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tvalueFunc &&\n\t\t\t\t\t\t\ttypeof valueFunc === 'function'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t`--wp--preset--${ cssVarInfix }--${ kebabCase(\n\t\t\t\t\t\t\t\t\tvalue.slug\n\t\t\t\t\t\t\t\t) }: ${ valueFunc( value, mergedSettings ) }`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn declarations;\n\t\t},\n\t\t[]\n\t);\n}\n\n/**\n * Transform given preset tree into a set of preset class declarations.\n *\n * @param {?string} blockSelector\n * @param {Object} blockPresets\n * @return {string} CSS declarations for the preset classes.\n */\nfunction getPresetsClasses( blockSelector = '*', blockPresets = {} ) {\n\treturn PRESET_METADATA.reduce(\n\t\t( declarations, { path, cssVarInfix, classes } ) => {\n\t\t\tif ( ! classes ) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\n\t\t\tconst presetByOrigin = getValueFromObjectPath(\n\t\t\t\tblockPresets,\n\t\t\t\tpath,\n\t\t\t\t[]\n\t\t\t);\n\t\t\t[ 'default', 'theme', 'custom' ].forEach( ( origin ) => {\n\t\t\t\tif ( presetByOrigin[ origin ] ) {\n\t\t\t\t\tpresetByOrigin[ origin ].forEach( ( { slug } ) => {\n\t\t\t\t\t\tclasses.forEach( ( { classSuffix, propertyName } ) => {\n\t\t\t\t\t\t\tconst classSelectorToUse = `.has-${ kebabCase(\n\t\t\t\t\t\t\t\tslug\n\t\t\t\t\t\t\t) }-${ classSuffix }`;\n\t\t\t\t\t\t\tconst selectorToUse = blockSelector\n\t\t\t\t\t\t\t\t.split( ',' ) // Selector can be \"h1, h2, h3\"\n\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t( selector ) =>\n\t\t\t\t\t\t\t\t\t\t`${ selector }${ classSelectorToUse }`\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.join( ',' );\n\t\t\t\t\t\t\tconst value = `var(--wp--preset--${ cssVarInfix }--${ kebabCase(\n\t\t\t\t\t\t\t\tslug\n\t\t\t\t\t\t\t) })`;\n\t\t\t\t\t\t\tdeclarations += `${ selectorToUse }{${ propertyName }: ${ value } !important;}`;\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\treturn declarations;\n\t\t},\n\t\t''\n\t);\n}\n\nfunction getPresetsSvgFilters( blockPresets = {} ) {\n\treturn PRESET_METADATA.filter(\n\t\t// Duotone are the only type of filters for now.\n\t\t( metadata ) => metadata.path.at( -1 ) === 'duotone'\n\t).flatMap( ( metadata ) => {\n\t\tconst presetByOrigin = getValueFromObjectPath(\n\t\t\tblockPresets,\n\t\t\tmetadata.path,\n\t\t\t{}\n\t\t);\n\t\treturn [ 'default', 'theme' ]\n\t\t\t.filter( ( origin ) => presetByOrigin[ origin ] )\n\t\t\t.flatMap( ( origin ) =>\n\t\t\t\tpresetByOrigin[ origin ].map( ( preset ) =>\n\t\t\t\t\tgetDuotoneFilter(\n\t\t\t\t\t\t`wp-duotone-${ preset.slug }`,\n\t\t\t\t\t\tpreset.colors\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t\t.join( '' );\n\t} );\n}\n\nfunction flattenTree( input = {}, prefix, token ) {\n\tlet result = [];\n\tObject.keys( input ).forEach( ( key ) => {\n\t\tconst newKey = prefix + kebabCase( key.replace( '/', '-' ) );\n\t\tconst newLeaf = input[ key ];\n\n\t\tif ( newLeaf instanceof Object ) {\n\t\t\tconst newPrefix = newKey + token;\n\t\t\tresult = [ ...result, ...flattenTree( newLeaf, newPrefix, token ) ];\n\t\t} else {\n\t\t\tresult.push( `${ newKey }: ${ newLeaf }` );\n\t\t}\n\t} );\n\treturn result;\n}\n\n/**\n * Gets variation selector string from feature selector.\n *\n * @param {string} featureSelector The feature selector.\n *\n * @param {string} styleVariationSelector The style variation selector.\n * @return {string} Combined selector string.\n */\nfunction concatFeatureVariationSelectorString(\n\tfeatureSelector,\n\tstyleVariationSelector\n) {\n\tconst featureSelectors = featureSelector.split( ',' );\n\tconst combinedSelectors = [];\n\tfeatureSelectors.forEach( ( selector ) => {\n\t\tcombinedSelectors.push(\n\t\t\t`${ styleVariationSelector.trim() }${ selector.trim() }`\n\t\t);\n\t} );\n\treturn combinedSelectors.join( ', ' );\n}\n\n/**\n * Generate style declarations for a block's custom feature and subfeature\n * selectors.\n *\n * NOTE: The passed `styles` object will be mutated by this function.\n *\n * @param {Object} selectors Custom selectors object for a block.\n * @param {Object} styles A block's styles object.\n *\n * @return {Object} Style declarations.\n */\nconst getFeatureDeclarations = ( selectors, styles ) => {\n\tconst declarations = {};\n\n\tObject.entries( selectors ).forEach( ( [ feature, selector ] ) => {\n\t\t// We're only processing features/subfeatures that have styles.\n\t\tif ( feature === 'root' || ! styles?.[ feature ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isShorthand = typeof selector === 'string';\n\n\t\t// If we have a selector object instead of shorthand process it.\n\t\tif ( ! isShorthand ) {\n\t\t\tObject.entries( selector ).forEach(\n\t\t\t\t( [ subfeature, subfeatureSelector ] ) => {\n\t\t\t\t\t// Don't process root feature selector yet or any\n\t\t\t\t\t// subfeature that doesn't have a style.\n\t\t\t\t\tif (\n\t\t\t\t\t\tsubfeature === 'root' ||\n\t\t\t\t\t\t! styles?.[ feature ][ subfeature ]\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create a temporary styles object and build\n\t\t\t\t\t// declarations for subfeature.\n\t\t\t\t\tconst subfeatureStyles = {\n\t\t\t\t\t\t[ feature ]: {\n\t\t\t\t\t\t\t[ subfeature ]: styles[ feature ][ subfeature ],\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\tconst newDeclarations =\n\t\t\t\t\t\tgetStylesDeclarations( subfeatureStyles );\n\n\t\t\t\t\t// Merge new declarations in with any others that\n\t\t\t\t\t// share the same selector.\n\t\t\t\t\tdeclarations[ subfeatureSelector ] = [\n\t\t\t\t\t\t...( declarations[ subfeatureSelector ] || [] ),\n\t\t\t\t\t\t...newDeclarations,\n\t\t\t\t\t];\n\n\t\t\t\t\t// Remove the subfeature's style now it will be\n\t\t\t\t\t// included under its own selector not the block's.\n\t\t\t\t\tdelete styles[ feature ][ subfeature ];\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\t// Now subfeatures have been processed and removed, we can\n\t\t// process root, or shorthand, feature selectors.\n\t\tif ( isShorthand || selector.root ) {\n\t\t\tconst featureSelector = isShorthand ? selector : selector.root;\n\n\t\t\t// Create temporary style object and build declarations for feature.\n\t\t\tconst featureStyles = { [ feature ]: styles[ feature ] };\n\t\t\tconst newDeclarations = getStylesDeclarations( featureStyles );\n\n\t\t\t// Merge new declarations with any others that share the selector.\n\t\t\tdeclarations[ featureSelector ] = [\n\t\t\t\t...( declarations[ featureSelector ] || [] ),\n\t\t\t\t...newDeclarations,\n\t\t\t];\n\n\t\t\t// Remove the feature from the block's styles now as it will be\n\t\t\t// included under its own selector not the block's.\n\t\t\tdelete styles[ feature ];\n\t\t}\n\t} );\n\n\treturn declarations;\n};\n\n/**\n * Transform given style tree into a set of style declarations.\n *\n * @param {Object} blockStyles Block styles.\n *\n * @param {string} selector The selector these declarations should attach to.\n *\n * @param {boolean} useRootPaddingAlign Whether to use CSS custom properties in root selector.\n *\n * @param {Object} tree A theme.json tree containing layout definitions.\n *\n * @param {boolean} isTemplate Whether the entity being edited is a full template or a pattern.\n * @return {Array} An array of style declarations.\n */\nexport function getStylesDeclarations(\n\tblockStyles = {},\n\tselector = '',\n\tuseRootPaddingAlign,\n\ttree = {},\n\tisTemplate = true\n) {\n\tconst isRoot = ROOT_BLOCK_SELECTOR === selector;\n\tconst output = Object.entries( STYLE_PROPERTY ).reduce(\n\t\t(\n\t\t\tdeclarations,\n\t\t\t[ key, { value, properties, useEngine, rootOnly } ]\n\t\t) => {\n\t\t\tif ( rootOnly && ! isRoot ) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\t\t\tconst pathToValue = value;\n\t\t\tif ( pathToValue[ 0 ] === 'elements' || useEngine ) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\n\t\t\tconst styleValue = getValueFromObjectPath(\n\t\t\t\tblockStyles,\n\t\t\t\tpathToValue\n\t\t\t);\n\n\t\t\t// Root-level padding styles don't currently support strings with CSS shorthand values.\n\t\t\t// This may change: https://github.com/WordPress/gutenberg/issues/40132.\n\t\t\tif (\n\t\t\t\tkey === '--wp--style--root--padding' &&\n\t\t\t\t( typeof styleValue === 'string' || ! useRootPaddingAlign )\n\t\t\t) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\n\t\t\tif ( properties && typeof styleValue !== 'string' ) {\n\t\t\t\tObject.entries( properties ).forEach( ( entry ) => {\n\t\t\t\t\tconst [ name, prop ] = entry;\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! getValueFromObjectPath( styleValue, [ prop ], false )\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Do not create a declaration\n\t\t\t\t\t\t// for sub-properties that don't have any value.\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst cssProperty = name.startsWith( '--' )\n\t\t\t\t\t\t? name\n\t\t\t\t\t\t: kebabCase( name );\n\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t`${ cssProperty }: ${ compileStyleValue(\n\t\t\t\t\t\t\tgetValueFromObjectPath( styleValue, [ prop ] )\n\t\t\t\t\t\t) }`\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t} else if (\n\t\t\t\tgetValueFromObjectPath( blockStyles, pathToValue, false )\n\t\t\t) {\n\t\t\t\tconst cssProperty = key.startsWith( '--' )\n\t\t\t\t\t? key\n\t\t\t\t\t: kebabCase( key );\n\t\t\t\tdeclarations.push(\n\t\t\t\t\t`${ cssProperty }: ${ compileStyleValue(\n\t\t\t\t\t\tgetValueFromObjectPath( blockStyles, pathToValue )\n\t\t\t\t\t) }`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn declarations;\n\t\t},\n\t\t[]\n\t);\n\n\t// The goal is to move everything to server side generated engine styles\n\t// This is temporary as we absorb more and more styles into the engine.\n\tconst extraRules = getCSSRules( blockStyles );\n\textraRules.forEach( ( rule ) => {\n\t\t// Don't output padding properties if padding variables are set or if we're not editing a full template.\n\t\tif (\n\t\t\tisRoot &&\n\t\t\t( useRootPaddingAlign || ! isTemplate ) &&\n\t\t\trule.key.startsWith( 'padding' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst cssProperty = rule.key.startsWith( '--' )\n\t\t\t? rule.key\n\t\t\t: kebabCase( rule.key );\n\n\t\tlet ruleValue = rule.value;\n\t\tif ( typeof ruleValue !== 'string' && ruleValue?.ref ) {\n\t\t\tconst refPath = ruleValue.ref.split( '.' );\n\t\t\truleValue = getValueFromObjectPath( tree, refPath );\n\t\t\t// Presence of another ref indicates a reference to another dynamic value.\n\t\t\t// Pointing to another dynamic value is not supported.\n\t\t\tif ( ! ruleValue || ruleValue?.ref ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Calculate fluid typography rules where available.\n\t\tif ( cssProperty === 'font-size' ) {\n\t\t\t/*\n\t\t\t * getTypographyFontSizeValue() will check\n\t\t\t * if fluid typography has been activated and also\n\t\t\t * whether the incoming value can be converted to a fluid value.\n\t\t\t * Values that already have a \"clamp()\" function will not pass the test,\n\t\t\t * and therefore the original $value will be returned.\n\t\t\t */\n\t\t\truleValue = getTypographyFontSizeValue(\n\t\t\t\t{ size: ruleValue },\n\t\t\t\tgetFluidTypographyOptionsFromSettings( tree?.settings )\n\t\t\t);\n\t\t}\n\n\t\toutput.push( `${ cssProperty }: ${ ruleValue }` );\n\t} );\n\n\treturn output;\n}\n\n/**\n * Get generated CSS for layout styles by looking up layout definitions provided\n * in theme.json, and outputting common layout styles, and specific blockGap values.\n *\n * @param {Object} props\n * @param {Object} props.layoutDefinitions Layout definitions, keyed by layout type.\n * @param {Object} props.style A style object containing spacing values.\n * @param {string} props.selector Selector used to group together layout styling rules.\n * @param {boolean} props.hasBlockGapSupport Whether or not the theme opts-in to blockGap support.\n * @param {boolean} props.hasFallbackGapSupport Whether or not the theme allows fallback gap styles.\n * @param {?string} props.fallbackGapValue An optional fallback gap value if no real gap value is available.\n * @return {string} Generated CSS rules for the layout styles.\n */\nexport function getLayoutStyles( {\n\tlayoutDefinitions = LAYOUT_DEFINITIONS,\n\tstyle,\n\tselector,\n\thasBlockGapSupport,\n\thasFallbackGapSupport,\n\tfallbackGapValue,\n} ) {\n\tlet ruleset = '';\n\tlet gapValue = hasBlockGapSupport\n\t\t? getGapCSSValue( style?.spacing?.blockGap )\n\t\t: '';\n\n\t// Ensure a fallback gap value for the root layout definitions,\n\t// and use a fallback value if one is provided for the current block.\n\tif ( hasFallbackGapSupport ) {\n\t\tif ( selector === ROOT_BLOCK_SELECTOR ) {\n\t\t\tgapValue = ! gapValue ? '0.5em' : gapValue;\n\t\t} else if ( ! hasBlockGapSupport && fallbackGapValue ) {\n\t\t\tgapValue = fallbackGapValue;\n\t\t}\n\t}\n\n\tif ( gapValue && layoutDefinitions ) {\n\t\tObject.values( layoutDefinitions ).forEach(\n\t\t\t( { className, name, spacingStyles } ) => {\n\t\t\t\t// Allow outputting fallback gap styles for flex layout type when block gap support isn't available.\n\t\t\t\tif (\n\t\t\t\t\t! hasBlockGapSupport &&\n\t\t\t\t\t'flex' !== name &&\n\t\t\t\t\t'grid' !== name\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( spacingStyles?.length ) {\n\t\t\t\t\tspacingStyles.forEach( ( spacingStyle ) => {\n\t\t\t\t\t\tconst declarations = [];\n\n\t\t\t\t\t\tif ( spacingStyle.rules ) {\n\t\t\t\t\t\t\tObject.entries( spacingStyle.rules ).forEach(\n\t\t\t\t\t\t\t\t( [ cssProperty, cssValue ] ) => {\n\t\t\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t\t\t`${ cssProperty }: ${\n\t\t\t\t\t\t\t\t\t\t\tcssValue ? cssValue : gapValue\n\t\t\t\t\t\t\t\t\t\t}`\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\tlet combinedSelector = '';\n\n\t\t\t\t\t\t\tif ( ! hasBlockGapSupport ) {\n\t\t\t\t\t\t\t\t// For fallback gap styles, use lower specificity, to ensure styles do not unintentionally override theme styles.\n\t\t\t\t\t\t\t\tcombinedSelector =\n\t\t\t\t\t\t\t\t\tselector === ROOT_BLOCK_SELECTOR\n\t\t\t\t\t\t\t\t\t\t? `:where(.${ className }${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t })`\n\t\t\t\t\t\t\t\t\t\t: `:where(${ selector }.${ className }${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t })`;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcombinedSelector =\n\t\t\t\t\t\t\t\t\tselector === ROOT_BLOCK_SELECTOR\n\t\t\t\t\t\t\t\t\t\t? `:where(${ selector } .${ className })${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t }`\n\t\t\t\t\t\t\t\t\t\t: `${ selector }-${ className }${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t }`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\truleset += `${ combinedSelector } { ${ declarations.join(\n\t\t\t\t\t\t\t\t'; '\n\t\t\t\t\t\t\t) }; }`;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\t// For backwards compatibility, ensure the legacy block gap CSS variable is still available.\n\t\tif ( selector === ROOT_BLOCK_SELECTOR && hasBlockGapSupport ) {\n\t\t\truleset += `${ selector } { --wp--style--block-gap: ${ gapValue }; }`;\n\t\t}\n\t}\n\n\t// Output base styles\n\tif ( selector === ROOT_BLOCK_SELECTOR && layoutDefinitions ) {\n\t\tconst validDisplayModes = [ 'block', 'flex', 'grid' ];\n\t\tObject.values( layoutDefinitions ).forEach(\n\t\t\t( { className, displayMode, baseStyles } ) => {\n\t\t\t\tif (\n\t\t\t\t\tdisplayMode &&\n\t\t\t\t\tvalidDisplayModes.includes( displayMode )\n\t\t\t\t) {\n\t\t\t\t\truleset += `${ selector } .${ className } { display:${ displayMode }; }`;\n\t\t\t\t}\n\n\t\t\t\tif ( baseStyles?.length ) {\n\t\t\t\t\tbaseStyles.forEach( ( baseStyle ) => {\n\t\t\t\t\t\tconst declarations = [];\n\n\t\t\t\t\t\tif ( baseStyle.rules ) {\n\t\t\t\t\t\t\tObject.entries( baseStyle.rules ).forEach(\n\t\t\t\t\t\t\t\t( [ cssProperty, cssValue ] ) => {\n\t\t\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t\t\t`${ cssProperty }: ${ cssValue }`\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\tconst combinedSelector = `${ selector } .${ className }${\n\t\t\t\t\t\t\t\tbaseStyle?.selector || ''\n\t\t\t\t\t\t\t}`;\n\t\t\t\t\t\t\truleset += `${ combinedSelector } { ${ declarations.join(\n\t\t\t\t\t\t\t\t'; '\n\t\t\t\t\t\t\t) }; }`;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\treturn ruleset;\n}\n\nconst STYLE_KEYS = [\n\t'border',\n\t'color',\n\t'dimensions',\n\t'spacing',\n\t'typography',\n\t'filter',\n\t'outline',\n\t'shadow',\n];\n\nfunction pickStyleKeys( treeToPickFrom ) {\n\tif ( ! treeToPickFrom ) {\n\t\treturn {};\n\t}\n\tconst entries = Object.entries( treeToPickFrom );\n\tconst pickedEntries = entries.filter( ( [ key ] ) =>\n\t\tSTYLE_KEYS.includes( key )\n\t);\n\t// clone the style objects so that `getFeatureDeclarations` can remove consumed keys from it\n\tconst clonedEntries = pickedEntries.map( ( [ key, style ] ) => [\n\t\tkey,\n\t\tJSON.parse( JSON.stringify( style ) ),\n\t] );\n\treturn Object.fromEntries( clonedEntries );\n}\n\nexport const getNodesWithStyles = ( tree, blockSelectors ) => {\n\tconst nodes = [];\n\n\tif ( ! tree?.styles ) {\n\t\treturn nodes;\n\t}\n\n\t// Top-level.\n\tconst styles = pickStyleKeys( tree.styles );\n\tif ( styles ) {\n\t\tnodes.push( {\n\t\t\tstyles,\n\t\t\tselector: ROOT_BLOCK_SELECTOR,\n\t\t} );\n\t}\n\n\tObject.entries( ELEMENTS ).forEach( ( [ name, selector ] ) => {\n\t\tif ( tree.styles?.elements?.[ name ] ) {\n\t\t\tnodes.push( {\n\t\t\t\tstyles: tree.styles?.elements?.[ name ],\n\t\t\t\tselector,\n\t\t\t} );\n\t\t}\n\t} );\n\n\t// Iterate over blocks: they can have styles & elements.\n\tObject.entries( tree.styles?.blocks ?? {} ).forEach(\n\t\t( [ blockName, node ] ) => {\n\t\t\tconst blockStyles = pickStyleKeys( node );\n\n\t\t\tif ( node?.variations ) {\n\t\t\t\tconst variations = {};\n\t\t\t\tObject.keys( node.variations ).forEach( ( variation ) => {\n\t\t\t\t\tvariations[ variation ] = pickStyleKeys(\n\t\t\t\t\t\tnode.variations[ variation ]\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t\tblockStyles.variations = variations;\n\t\t\t}\n\t\t\tif ( blockStyles && blockSelectors?.[ blockName ]?.selector ) {\n\t\t\t\tnodes.push( {\n\t\t\t\t\tduotoneSelector:\n\t\t\t\t\t\tblockSelectors[ blockName ].duotoneSelector,\n\t\t\t\t\tfallbackGapValue:\n\t\t\t\t\t\tblockSelectors[ blockName ].fallbackGapValue,\n\t\t\t\t\thasLayoutSupport:\n\t\t\t\t\t\tblockSelectors[ blockName ].hasLayoutSupport,\n\t\t\t\t\tselector: blockSelectors[ blockName ].selector,\n\t\t\t\t\tstyles: blockStyles,\n\t\t\t\t\tfeatureSelectors:\n\t\t\t\t\t\tblockSelectors[ blockName ].featureSelectors,\n\t\t\t\t\tstyleVariationSelectors:\n\t\t\t\t\t\tblockSelectors[ blockName ].styleVariationSelectors,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tObject.entries( node?.elements ?? {} ).forEach(\n\t\t\t\t( [ elementName, value ] ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tvalue &&\n\t\t\t\t\t\tblockSelectors?.[ blockName ] &&\n\t\t\t\t\t\tELEMENTS[ elementName ]\n\t\t\t\t\t) {\n\t\t\t\t\t\tnodes.push( {\n\t\t\t\t\t\t\tstyles: value,\n\t\t\t\t\t\t\tselector: blockSelectors[ blockName ]?.selector\n\t\t\t\t\t\t\t\t.split( ',' )\n\t\t\t\t\t\t\t\t.map( ( sel ) => {\n\t\t\t\t\t\t\t\t\tconst elementSelectors =\n\t\t\t\t\t\t\t\t\t\tELEMENTS[ elementName ].split( ',' );\n\t\t\t\t\t\t\t\t\treturn elementSelectors.map(\n\t\t\t\t\t\t\t\t\t\t( elementSelector ) =>\n\t\t\t\t\t\t\t\t\t\t\tsel + ' ' + elementSelector\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t.join( ',' ),\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\n\treturn nodes;\n};\n\nexport const getNodesWithSettings = ( tree, blockSelectors ) => {\n\tconst nodes = [];\n\n\tif ( ! tree?.settings ) {\n\t\treturn nodes;\n\t}\n\n\tconst pickPresets = ( treeToPickFrom ) => {\n\t\tlet presets = {};\n\t\tPRESET_METADATA.forEach( ( { path } ) => {\n\t\t\tconst value = getValueFromObjectPath( treeToPickFrom, path, false );\n\t\t\tif ( value !== false ) {\n\t\t\t\tpresets = setImmutably( presets, path, value );\n\t\t\t}\n\t\t} );\n\t\treturn presets;\n\t};\n\n\t// Top-level.\n\tconst presets = pickPresets( tree.settings );\n\tconst custom = tree.settings?.custom;\n\tif ( Object.keys( presets ).length > 0 || custom ) {\n\t\tnodes.push( {\n\t\t\tpresets,\n\t\t\tcustom,\n\t\t\tselector: ROOT_BLOCK_SELECTOR,\n\t\t} );\n\t}\n\n\t// Blocks.\n\tObject.entries( tree.settings?.blocks ?? {} ).forEach(\n\t\t( [ blockName, node ] ) => {\n\t\t\tconst blockPresets = pickPresets( node );\n\t\t\tconst blockCustom = node.custom;\n\t\t\tif ( Object.keys( blockPresets ).length > 0 || blockCustom ) {\n\t\t\t\tnodes.push( {\n\t\t\t\t\tpresets: blockPresets,\n\t\t\t\t\tcustom: blockCustom,\n\t\t\t\t\tselector: blockSelectors[ blockName ]?.selector,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t);\n\n\treturn nodes;\n};\n\nexport const toCustomProperties = ( tree, blockSelectors ) => {\n\tconst settings = getNodesWithSettings( tree, blockSelectors );\n\tlet ruleset = '';\n\tsettings.forEach( ( { presets, custom, selector } ) => {\n\t\tconst declarations = getPresetsDeclarations( presets, tree?.settings );\n\t\tconst customProps = flattenTree( custom, '--wp--custom--', '--' );\n\t\tif ( customProps.length > 0 ) {\n\t\t\tdeclarations.push( ...customProps );\n\t\t}\n\n\t\tif ( declarations.length > 0 ) {\n\t\t\truleset += `${ selector }{${ declarations.join( ';' ) };}`;\n\t\t}\n\t} );\n\n\treturn ruleset;\n};\n\nexport const toStyles = (\n\ttree,\n\tblockSelectors,\n\thasBlockGapSupport,\n\thasFallbackGapSupport,\n\tdisableLayoutStyles = false,\n\tisTemplate = true\n) => {\n\tconst nodesWithStyles = getNodesWithStyles( tree, blockSelectors );\n\tconst nodesWithSettings = getNodesWithSettings( tree, blockSelectors );\n\tconst useRootPaddingAlign = tree?.settings?.useRootPaddingAwareAlignments;\n\tconst { contentSize, wideSize } = tree?.settings?.layout || {};\n\n\t/*\n\t * Reset default browser margin on the root body element.\n\t * This is set on the root selector **before** generating the ruleset\n\t * from the `theme.json`. This is to ensure that if the `theme.json` declares\n\t * `margin` in its `spacing` declaration for the `body` element then these\n\t * user-generated values take precedence in the CSS cascade.\n\t * @link https://github.com/WordPress/gutenberg/issues/36147.\n\t */\n\tlet ruleset = 'body {margin: 0;';\n\n\tif ( contentSize ) {\n\t\truleset += ` --wp--style--global--content-size: ${ contentSize };`;\n\t}\n\n\tif ( wideSize ) {\n\t\truleset += ` --wp--style--global--wide-size: ${ wideSize };`;\n\t}\n\n\t// Root padding styles should only be output for full templates, not patterns or template parts.\n\tif ( useRootPaddingAlign && isTemplate ) {\n\t\t/*\n\t\t * These rules reproduce the ones from https://github.com/WordPress/gutenberg/blob/79103f124925d1f457f627e154f52a56228ed5ad/lib/class-wp-theme-json-gutenberg.php#L2508\n\t\t * almost exactly, but for the selectors that target block wrappers in the front end. This code only runs in the editor, so it doesn't need those selectors.\n\t\t */\n\t\truleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding:not(.wp-block-block)) { padding-right: 0; padding-left: 0; }\n\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t.has-global-padding :where(.has-global-padding:not(.wp-block-block)) > .alignfull { margin-right: 0; margin-left: 0; }\n\t\t\t.has-global-padding > .alignfull:where(:not(.has-global-padding):not(.is-layout-flex):not(.is-layout-grid)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;`;\n\t}\n\n\truleset += '}';\n\n\tnodesWithStyles.forEach(\n\t\t( {\n\t\t\tselector,\n\t\t\tduotoneSelector,\n\t\t\tstyles,\n\t\t\tfallbackGapValue,\n\t\t\thasLayoutSupport,\n\t\t\tfeatureSelectors,\n\t\t\tstyleVariationSelectors,\n\t\t} ) => {\n\t\t\t// Process styles for block support features with custom feature level\n\t\t\t// CSS selectors set.\n\t\t\tif ( featureSelectors ) {\n\t\t\t\tconst featureDeclarations = getFeatureDeclarations(\n\t\t\t\t\tfeatureSelectors,\n\t\t\t\t\tstyles\n\t\t\t\t);\n\n\t\t\t\tObject.entries( featureDeclarations ).forEach(\n\t\t\t\t\t( [ cssSelector, declarations ] ) => {\n\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\tconst rules = declarations.join( ';' );\n\t\t\t\t\t\t\truleset += `${ cssSelector }{${ rules };}`;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( styleVariationSelectors ) {\n\t\t\t\tObject.entries( styleVariationSelectors ).forEach(\n\t\t\t\t\t( [ styleVariationName, styleVariationSelector ] ) => {\n\t\t\t\t\t\tconst styleVariations =\n\t\t\t\t\t\t\tstyles?.variations?.[ styleVariationName ];\n\t\t\t\t\t\tif ( styleVariations ) {\n\t\t\t\t\t\t\t// If the block uses any custom selectors for block support, add those first.\n\t\t\t\t\t\t\tif ( featureSelectors ) {\n\t\t\t\t\t\t\t\tconst featureDeclarations =\n\t\t\t\t\t\t\t\t\tgetFeatureDeclarations(\n\t\t\t\t\t\t\t\t\t\tfeatureSelectors,\n\t\t\t\t\t\t\t\t\t\tstyleVariations\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tObject.entries( featureDeclarations ).forEach(\n\t\t\t\t\t\t\t\t\t( [ baseSelector, declarations ] ) => {\n\t\t\t\t\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\t\t\t\t\tconst cssSelector =\n\t\t\t\t\t\t\t\t\t\t\t\tconcatFeatureVariationSelectorString(\n\t\t\t\t\t\t\t\t\t\t\t\t\tbaseSelector,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyleVariationSelector\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tconst rules =\n\t\t\t\t\t\t\t\t\t\t\t\tdeclarations.join( ';' );\n\t\t\t\t\t\t\t\t\t\t\truleset += `${ cssSelector }{${ rules };}`;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Otherwise add regular selectors.\n\t\t\t\t\t\t\tconst styleVariationDeclarations =\n\t\t\t\t\t\t\t\tgetStylesDeclarations(\n\t\t\t\t\t\t\t\t\tstyleVariations,\n\t\t\t\t\t\t\t\t\tstyleVariationSelector,\n\t\t\t\t\t\t\t\t\tuseRootPaddingAlign,\n\t\t\t\t\t\t\t\t\ttree\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif ( styleVariationDeclarations.length ) {\n\t\t\t\t\t\t\t\truleset += `${ styleVariationSelector }{${ styleVariationDeclarations.join(\n\t\t\t\t\t\t\t\t\t';'\n\t\t\t\t\t\t\t\t) };}`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Process duotone styles.\n\t\t\tif ( duotoneSelector ) {\n\t\t\t\tconst duotoneStyles = {};\n\t\t\t\tif ( styles?.filter ) {\n\t\t\t\t\tduotoneStyles.filter = styles.filter;\n\t\t\t\t\tdelete styles.filter;\n\t\t\t\t}\n\t\t\t\tconst duotoneDeclarations =\n\t\t\t\t\tgetStylesDeclarations( duotoneStyles );\n\t\t\t\tif ( duotoneDeclarations.length ) {\n\t\t\t\t\truleset += `${ duotoneSelector }{${ duotoneDeclarations.join(\n\t\t\t\t\t\t';'\n\t\t\t\t\t) };}`;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Process blockGap and layout styles.\n\t\t\tif (\n\t\t\t\t! disableLayoutStyles &&\n\t\t\t\t( ROOT_BLOCK_SELECTOR === selector || hasLayoutSupport )\n\t\t\t) {\n\t\t\t\truleset += getLayoutStyles( {\n\t\t\t\t\tstyle: styles,\n\t\t\t\t\tselector,\n\t\t\t\t\thasBlockGapSupport,\n\t\t\t\t\thasFallbackGapSupport,\n\t\t\t\t\tfallbackGapValue,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Process the remaining block styles (they use either normal block class or __experimentalSelector).\n\t\t\tconst declarations = getStylesDeclarations(\n\t\t\t\tstyles,\n\t\t\t\tselector,\n\t\t\t\tuseRootPaddingAlign,\n\t\t\t\ttree,\n\t\t\t\tisTemplate\n\t\t\t);\n\t\t\tif ( declarations?.length ) {\n\t\t\t\truleset += `${ selector }{${ declarations.join( ';' ) };}`;\n\t\t\t}\n\n\t\t\t// Check for pseudo selector in `styles` and handle separately.\n\t\t\tconst pseudoSelectorStyles = Object.entries( styles ).filter(\n\t\t\t\t( [ key ] ) => key.startsWith( ':' )\n\t\t\t);\n\n\t\t\tif ( pseudoSelectorStyles?.length ) {\n\t\t\t\tpseudoSelectorStyles.forEach(\n\t\t\t\t\t( [ pseudoKey, pseudoStyle ] ) => {\n\t\t\t\t\t\tconst pseudoDeclarations =\n\t\t\t\t\t\t\tgetStylesDeclarations( pseudoStyle );\n\n\t\t\t\t\t\tif ( ! pseudoDeclarations?.length ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// `selector` maybe provided in a form\n\t\t\t\t\t\t// where block level selectors have sub element\n\t\t\t\t\t\t// selectors appended to them as a comma separated\n\t\t\t\t\t\t// string.\n\t\t\t\t\t\t// e.g. `h1 a,h2 a,h3 a,h4 a,h5 a,h6 a`;\n\t\t\t\t\t\t// Split and append pseudo selector to create\n\t\t\t\t\t\t// the proper rules to target the elements.\n\t\t\t\t\t\tconst _selector = selector\n\t\t\t\t\t\t\t.split( ',' )\n\t\t\t\t\t\t\t.map( ( sel ) => sel + pseudoKey )\n\t\t\t\t\t\t\t.join( ',' );\n\n\t\t\t\t\t\tconst pseudoRule = `${ _selector }{${ pseudoDeclarations.join(\n\t\t\t\t\t\t\t';'\n\t\t\t\t\t\t) };}`;\n\n\t\t\t\t\t\truleset += pseudoRule;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t);\n\n\t/* Add alignment / layout styles */\n\truleset =\n\t\truleset +\n\t\t'.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }';\n\truleset =\n\t\truleset +\n\t\t'.wp-site-blocks > .alignright { float: right; margin-left: 2em; }';\n\truleset =\n\t\truleset +\n\t\t'.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }';\n\n\tif ( hasBlockGapSupport ) {\n\t\t// Use fallback of `0.5em` just in case, however if there is blockGap support, there should nearly always be a real value.\n\t\tconst gapValue =\n\t\t\tgetGapCSSValue( tree?.styles?.spacing?.blockGap ) || '0.5em';\n\t\truleset =\n\t\t\truleset +\n\t\t\t`:where(.wp-site-blocks) > * { margin-block-start: ${ gapValue }; margin-block-end: 0; }`;\n\t\truleset =\n\t\t\truleset +\n\t\t\t':where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }';\n\t\truleset =\n\t\t\truleset +\n\t\t\t':where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }';\n\t}\n\n\tnodesWithSettings.forEach( ( { selector, presets } ) => {\n\t\tif ( ROOT_BLOCK_SELECTOR === selector ) {\n\t\t\t// Do not add extra specificity for top-level classes.\n\t\t\tselector = '';\n\t\t}\n\n\t\tconst classes = getPresetsClasses( selector, presets );\n\t\tif ( classes.length > 0 ) {\n\t\t\truleset += classes;\n\t\t}\n\t} );\n\n\treturn ruleset;\n};\n\nexport function toSvgFilters( tree, blockSelectors ) {\n\tconst nodesWithSettings = getNodesWithSettings( tree, blockSelectors );\n\treturn nodesWithSettings.flatMap( ( { presets } ) => {\n\t\treturn getPresetsSvgFilters( presets );\n\t} );\n}\n\nconst getSelectorsConfig = ( blockType, rootSelector ) => {\n\tif (\n\t\tblockType?.selectors &&\n\t\tObject.keys( blockType.selectors ).length > 0\n\t) {\n\t\treturn blockType.selectors;\n\t}\n\n\tconst config = { root: rootSelector };\n\tObject.entries( BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS ).forEach(\n\t\t( [ featureKey, featureName ] ) => {\n\t\t\tconst featureSelector = getBlockCSSSelector(\n\t\t\t\tblockType,\n\t\t\t\tfeatureKey\n\t\t\t);\n\n\t\t\tif ( featureSelector ) {\n\t\t\t\tconfig[ featureName ] = featureSelector;\n\t\t\t}\n\t\t}\n\t);\n\n\treturn config;\n};\n\nexport const getBlockSelectors = ( blockTypes, getBlockStyles ) => {\n\tconst result = {};\n\tblockTypes.forEach( ( blockType ) => {\n\t\tconst name = blockType.name;\n\t\tconst selector = getBlockCSSSelector( blockType );\n\t\tlet duotoneSelector = getBlockCSSSelector(\n\t\t\tblockType,\n\t\t\t'filter.duotone'\n\t\t);\n\n\t\t// Keep backwards compatibility for support.color.__experimentalDuotone.\n\t\tif ( ! duotoneSelector ) {\n\t\t\tconst rootSelector = getBlockCSSSelector( blockType );\n\t\t\tconst duotoneSupport = getBlockSupport(\n\t\t\t\tblockType,\n\t\t\t\t'color.__experimentalDuotone',\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tduotoneSelector =\n\t\t\t\tduotoneSupport && scopeSelector( rootSelector, duotoneSupport );\n\t\t}\n\n\t\tconst hasLayoutSupport =\n\t\t\t!! blockType?.supports?.layout ||\n\t\t\t!! blockType?.supports?.__experimentalLayout;\n\t\tconst fallbackGapValue =\n\t\t\tblockType?.supports?.spacing?.blockGap?.__experimentalDefault;\n\n\t\tconst blockStyleVariations = getBlockStyles( name );\n\t\tconst styleVariationSelectors = {};\n\t\tif ( blockStyleVariations?.length ) {\n\t\t\tblockStyleVariations.forEach( ( variation ) => {\n\t\t\t\tconst styleVariationSelector = `.is-style-${ variation.name }${ selector }`;\n\t\t\t\tstyleVariationSelectors[ variation.name ] =\n\t\t\t\t\tstyleVariationSelector;\n\t\t\t} );\n\t\t}\n\t\t// For each block support feature add any custom selectors.\n\t\tconst featureSelectors = getSelectorsConfig( blockType, selector );\n\n\t\tresult[ name ] = {\n\t\t\tduotoneSelector,\n\t\t\tfallbackGapValue,\n\t\t\tfeatureSelectors: Object.keys( featureSelectors ).length\n\t\t\t\t? featureSelectors\n\t\t\t\t: undefined,\n\t\t\thasLayoutSupport,\n\t\t\tname,\n\t\t\tselector,\n\t\t\tstyleVariationSelectors: Object.keys( styleVariationSelectors )\n\t\t\t\t.length\n\t\t\t\t? styleVariationSelectors\n\t\t\t\t: undefined,\n\t\t};\n\t} );\n\n\treturn result;\n};\n\n/**\n * If there is a separator block whose color is defined in theme.json via background,\n * update the separator color to the same value by using border color.\n *\n * @param {Object} config Theme.json configuration file object.\n * @return {Object} configTheme.json configuration file object updated.\n */\nfunction updateConfigWithSeparator( config ) {\n\tconst needsSeparatorStyleUpdate =\n\t\tconfig.styles?.blocks?.[ 'core/separator' ] &&\n\t\tconfig.styles?.blocks?.[ 'core/separator' ].color?.background &&\n\t\t! config.styles?.blocks?.[ 'core/separator' ].color?.text &&\n\t\t! config.styles?.blocks?.[ 'core/separator' ].border?.color;\n\tif ( needsSeparatorStyleUpdate ) {\n\t\treturn {\n\t\t\t...config,\n\t\t\tstyles: {\n\t\t\t\t...config.styles,\n\t\t\t\tblocks: {\n\t\t\t\t\t...config.styles.blocks,\n\t\t\t\t\t'core/separator': {\n\t\t\t\t\t\t...config.styles.blocks[ 'core/separator' ],\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t...config.styles.blocks[ 'core/separator' ].color,\n\t\t\t\t\t\t\ttext: config.styles?.blocks[ 'core/separator' ]\n\t\t\t\t\t\t\t\t.color.background,\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 config;\n}\n\nconst processCSSNesting = ( css, blockSelector ) => {\n\tlet processedCSS = '';\n\n\t// Split CSS nested rules.\n\tconst parts = css.split( '&' );\n\tparts.forEach( ( part ) => {\n\t\tprocessedCSS += ! part.includes( '{' )\n\t\t\t? blockSelector + '{' + part + '}' // If the part doesn't contain braces, it applies to the root level.\n\t\t\t: blockSelector + part; // Prepend the selector, which effectively replaces the \"&\" character.\n\t} );\n\treturn processedCSS;\n};\n\n/**\n * Returns the global styles output using a global styles configuration.\n * If wishing to generate global styles and settings based on the\n * global styles config loaded in the editor context, use `useGlobalStylesOutput()`.\n * The use case for a custom config is to generate bespoke styles\n * and settings for previews, or other out-of-editor experiences.\n *\n * @param {Object} mergedConfig Global styles configuration.\n * @return {Array} Array of stylesheets and settings.\n */\nexport function useGlobalStylesOutputWithConfig( mergedConfig = {} ) {\n\tconst [ blockGap ] = useGlobalSetting( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGap !== null;\n\tconst hasFallbackGapSupport = ! hasBlockGapSupport; // This setting isn't useful yet: it exists as a placeholder for a future explicit fallback styles support.\n\tconst disableLayoutStyles = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn !! getSettings().disableLayoutStyles;\n\t} );\n\n\tconst blockContext = useContext( BlockContext );\n\n\tconst isTemplate = blockContext?.templateSlug !== undefined;\n\n\tconst getBlockStyles = useSelect( ( select ) => {\n\t\treturn select( blocksStore ).getBlockStyles;\n\t}, [] );\n\n\treturn useMemo( () => {\n\t\tif ( ! mergedConfig?.styles || ! mergedConfig?.settings ) {\n\t\t\treturn [];\n\t\t}\n\t\tmergedConfig = updateConfigWithSeparator( mergedConfig );\n\n\t\tconst blockSelectors = getBlockSelectors(\n\t\t\tgetBlockTypes(),\n\t\t\tgetBlockStyles\n\t\t);\n\n\t\tconst customProperties = toCustomProperties(\n\t\t\tmergedConfig,\n\t\t\tblockSelectors\n\t\t);\n\t\tconst globalStyles = toStyles(\n\t\t\tmergedConfig,\n\t\t\tblockSelectors,\n\t\t\thasBlockGapSupport,\n\t\t\thasFallbackGapSupport,\n\t\t\tdisableLayoutStyles,\n\t\t\tisTemplate\n\t\t);\n\t\tconst svgs = toSvgFilters( mergedConfig, blockSelectors );\n\n\t\tconst styles = [\n\t\t\t{\n\t\t\t\tcss: customProperties,\n\t\t\t\tisGlobalStyles: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tcss: globalStyles,\n\t\t\t\tisGlobalStyles: true,\n\t\t\t},\n\t\t\t// Load custom CSS in own stylesheet so that any invalid CSS entered in the input won't break all the global styles in the editor.\n\t\t\t{\n\t\t\t\tcss: mergedConfig.styles.css ?? '',\n\t\t\t\tisGlobalStyles: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tassets: svgs,\n\t\t\t\t__unstableType: 'svg',\n\t\t\t\tisGlobalStyles: true,\n\t\t\t},\n\t\t];\n\n\t\t// Loop through the blocks to check if there are custom CSS values.\n\t\t// If there are, get the block selector and push the selector together with\n\t\t// the CSS value to the 'stylesheets' array.\n\t\tgetBlockTypes().forEach( ( blockType ) => {\n\t\t\tif ( mergedConfig.styles.blocks[ blockType.name ]?.css ) {\n\t\t\t\tconst selector = blockSelectors[ blockType.name ].selector;\n\t\t\t\tstyles.push( {\n\t\t\t\t\tcss: processCSSNesting(\n\t\t\t\t\t\tmergedConfig.styles.blocks[ blockType.name ]?.css,\n\t\t\t\t\t\tselector\n\t\t\t\t\t),\n\t\t\t\t\tisGlobalStyles: true,\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\treturn [ styles, mergedConfig.settings ];\n\t}, [\n\t\thasBlockGapSupport,\n\t\thasFallbackGapSupport,\n\t\tmergedConfig,\n\t\tdisableLayoutStyles,\n\t] );\n}\n\n/**\n * Returns the global styles output based on the current state of global styles config loaded in the editor context.\n *\n * @return {Array} Array of stylesheets and settings.\n */\nexport function useGlobalStylesOutput() {\n\tconst { merged: mergedConfig } = useContext( GlobalStylesContext );\n\treturn useGlobalStylesOutputWithConfig( mergedConfig );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,6BAA6B,IAAIC,cAAc,EAC/CC,uBAAuB,IAAIC,QAAQ,EACnCC,eAAe,EACfC,aAAa,EACbC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;AACxD,SAASC,WAAW,QAAQ,yBAAyB;;AAErD;AACA;AACA;AACA,SAASC,eAAe,EAAEC,mBAAmB,EAAEC,aAAa,Q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AAY,EACZhD,mBAAmB,CAClB,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS4D,qBAAqBA,CAAA,EAAG;EACvC,MAAM;IAAEC,MAAM,EAAEb;EAAa,CAAC,GAAGhO,UAAU,CAAES,mBAAoB,CAAC;EAClE,OAAOsN,+BAA+B,CAAEC,YAAa,CAAC;AACvD"}
1
+ {"version":3,"names":["__EXPERIMENTAL_STYLE_PROPERTY","STYLE_PROPERTY","__EXPERIMENTAL_ELEMENTS","ELEMENTS","getBlockSupport","getBlockTypes","store","blocksStore","useSelect","useContext","useMemo","getCSSRules","PRESET_METADATA","ROOT_BLOCK_SELECTOR","scopeSelector","appendToSelector","getBlockCSSSelector","getTypographyFontSizeValue","getFluidTypographyOptionsFromSettings","GlobalStylesContext","useGlobalSetting","getDuotoneFilter","getGapCSSValue","blockEditorStore","LAYOUT_DEFINITIONS","getValueFromObjectPath","kebabCase","setImmutably","BlockContext","BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS","__experimentalBorder","color","spacing","typography","compileStyleValue","uncompiledValue","VARIABLE_REFERENCE_PREFIX","VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE","VARIABLE_PATH_SEPARATOR_TOKEN_STYLE","startsWith","variable","slice","length","split","join","getPresetsDeclarations","blockPresets","mergedSettings","reduce","declarations","path","valueKey","valueFunc","cssVarInfix","presetByOrigin","forEach","origin","value","push","slug","getPresetsClasses","blockSelector","classes","classSuffix","propertyName","classSelectorToUse","selectorToUse","map","selector","getPresetsSvgFilters","filter","metadata","at","flatMap","preset","colors","flattenTree","input","prefix","token","result","Object","keys","key","newKey","replace","newLeaf","newPrefix","concatFeatureVariationSelectorString","featureSelector","styleVariationSelector","featureSelectors","combinedSelectors","trim","getFeatureDeclarations","selectors","styles","entries","feature","isShorthand","subfeature","subfeatureSelector","subfeatureStyles","newDeclarations","getStylesDeclarations","root","featureStyles","blockStyles","useRootPaddingAlign","tree","isTemplate","isRoot","output","properties","useEngine","rootOnly","pathToValue","styleValue","entry","name","prop","cssProperty","extraRules","rule","ruleValue","ref","refPath","size","settings","getLayoutStyles","layoutDefinitions","style","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","ruleset","gapValue","blockGap","values","className","spacingStyles","spacingStyle","rules","cssValue","combinedSelector","validDisplayModes","displayMode","baseStyles","includes","baseStyle","STYLE_KEYS","pickStyleKeys","treeToPickFrom","pickedEntries","clonedEntries","JSON","parse","stringify","fromEntries","getNodesWithStyles","blockSelectors","_tree$styles$blocks","nodes","elements","blocks","blockName","node","_node$elements","variations","variation","duotoneSelector","hasLayoutSupport","styleVariationSelectors","elementName","sel","elementSelectors","elementSelector","getNodesWithSettings","_tree$settings$blocks","pickPresets","presets","custom","blockCustom","toCustomProperties","customProps","toStyles","disableLayoutStyles","nodesWithStyles","nodesWithSettings","useRootPaddingAwareAlignments","contentSize","wideSize","layout","featureDeclarations","cssSelector","styleVariationName","styleVariations","baseSelector","styleVariationDeclarations","duotoneStyles","duotoneDeclarations","pseudoSelectorStyles","pseudoKey","pseudoStyle","pseudoDeclarations","_selector","pseudoRule","toSvgFilters","getSelectorsConfig","blockType","rootSelector","config","featureKey","featureName","getBlockSelectors","blockTypes","getBlockStyles","duotoneSupport","supports","__experimentalLayout","__experimentalDefault","blockStyleVariations","undefined","updateConfigWithSeparator","needsSeparatorStyleUpdate","background","text","border","processCSSNesting","css","processedCSS","parts","part","isRootCss","splittedPart","nestedSelector","useGlobalStylesOutputWithConfig","mergedConfig","select","getSettings","blockContext","templateSlug","_mergedConfig$styles$","customProperties","globalStyles","svgs","isGlobalStyles","assets","__unstableType","useGlobalStylesOutput","merged"],"sources":["@wordpress/block-editor/src/components/global-styles/use-global-styles-output.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__EXPERIMENTAL_STYLE_PROPERTY as STYLE_PROPERTY,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n\tgetBlockSupport,\n\tgetBlockTypes,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { getCSSRules } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport {\n\tPRESET_METADATA,\n\tROOT_BLOCK_SELECTOR,\n\tscopeSelector,\n\tappendToSelector,\n} from './utils';\nimport { getBlockCSSSelector } from './get-block-css-selector';\nimport {\n\tgetTypographyFontSizeValue,\n\tgetFluidTypographyOptionsFromSettings,\n} from './typography-utils';\nimport { GlobalStylesContext } from './context';\nimport { useGlobalSetting } from './hooks';\nimport { getDuotoneFilter } from '../duotone/utils';\nimport { getGapCSSValue } from '../../hooks/gap';\nimport { store as blockEditorStore } from '../../store';\nimport { LAYOUT_DEFINITIONS } from '../../layouts/definitions';\nimport {\n\tgetValueFromObjectPath,\n\tkebabCase,\n\tsetImmutably,\n} from '../../utils/object';\nimport BlockContext from '../block-context';\n\n// List of block support features that can have their related styles\n// generated under their own feature level selector rather than the block's.\nconst BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS = {\n\t__experimentalBorder: 'border',\n\tcolor: 'color',\n\tspacing: 'spacing',\n\ttypography: 'typography',\n};\n\nfunction compileStyleValue( uncompiledValue ) {\n\tconst VARIABLE_REFERENCE_PREFIX = 'var:';\n\tconst VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|';\n\tconst VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--';\n\n\tif ( uncompiledValue?.startsWith?.( VARIABLE_REFERENCE_PREFIX ) ) {\n\t\tconst variable = uncompiledValue\n\t\t\t.slice( VARIABLE_REFERENCE_PREFIX.length )\n\t\t\t.split( VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE )\n\t\t\t.join( VARIABLE_PATH_SEPARATOR_TOKEN_STYLE );\n\t\treturn `var(--wp--${ variable })`;\n\t}\n\treturn uncompiledValue;\n}\n\n/**\n * Transform given preset tree into a set of style declarations.\n *\n * @param {Object} blockPresets\n * @param {Object} mergedSettings Merged theme.json settings.\n *\n * @return {Array<Object>} An array of style declarations.\n */\nfunction getPresetsDeclarations( blockPresets = {}, mergedSettings ) {\n\treturn PRESET_METADATA.reduce(\n\t\t( declarations, { path, valueKey, valueFunc, cssVarInfix } ) => {\n\t\t\tconst presetByOrigin = getValueFromObjectPath(\n\t\t\t\tblockPresets,\n\t\t\t\tpath,\n\t\t\t\t[]\n\t\t\t);\n\t\t\t[ 'default', 'theme', 'custom' ].forEach( ( origin ) => {\n\t\t\t\tif ( presetByOrigin[ origin ] ) {\n\t\t\t\t\tpresetByOrigin[ origin ].forEach( ( value ) => {\n\t\t\t\t\t\tif ( valueKey && ! valueFunc ) {\n\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t`--wp--preset--${ cssVarInfix }--${ kebabCase(\n\t\t\t\t\t\t\t\t\tvalue.slug\n\t\t\t\t\t\t\t\t) }: ${ value[ valueKey ] }`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tvalueFunc &&\n\t\t\t\t\t\t\ttypeof valueFunc === 'function'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t`--wp--preset--${ cssVarInfix }--${ kebabCase(\n\t\t\t\t\t\t\t\t\tvalue.slug\n\t\t\t\t\t\t\t\t) }: ${ valueFunc( value, mergedSettings ) }`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn declarations;\n\t\t},\n\t\t[]\n\t);\n}\n\n/**\n * Transform given preset tree into a set of preset class declarations.\n *\n * @param {?string} blockSelector\n * @param {Object} blockPresets\n * @return {string} CSS declarations for the preset classes.\n */\nfunction getPresetsClasses( blockSelector = '*', blockPresets = {} ) {\n\treturn PRESET_METADATA.reduce(\n\t\t( declarations, { path, cssVarInfix, classes } ) => {\n\t\t\tif ( ! classes ) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\n\t\t\tconst presetByOrigin = getValueFromObjectPath(\n\t\t\t\tblockPresets,\n\t\t\t\tpath,\n\t\t\t\t[]\n\t\t\t);\n\t\t\t[ 'default', 'theme', 'custom' ].forEach( ( origin ) => {\n\t\t\t\tif ( presetByOrigin[ origin ] ) {\n\t\t\t\t\tpresetByOrigin[ origin ].forEach( ( { slug } ) => {\n\t\t\t\t\t\tclasses.forEach( ( { classSuffix, propertyName } ) => {\n\t\t\t\t\t\t\tconst classSelectorToUse = `.has-${ kebabCase(\n\t\t\t\t\t\t\t\tslug\n\t\t\t\t\t\t\t) }-${ classSuffix }`;\n\t\t\t\t\t\t\tconst selectorToUse = blockSelector\n\t\t\t\t\t\t\t\t.split( ',' ) // Selector can be \"h1, h2, h3\"\n\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t( selector ) =>\n\t\t\t\t\t\t\t\t\t\t`${ selector }${ classSelectorToUse }`\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.join( ',' );\n\t\t\t\t\t\t\tconst value = `var(--wp--preset--${ cssVarInfix }--${ kebabCase(\n\t\t\t\t\t\t\t\tslug\n\t\t\t\t\t\t\t) })`;\n\t\t\t\t\t\t\tdeclarations += `${ selectorToUse }{${ propertyName }: ${ value } !important;}`;\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\treturn declarations;\n\t\t},\n\t\t''\n\t);\n}\n\nfunction getPresetsSvgFilters( blockPresets = {} ) {\n\treturn PRESET_METADATA.filter(\n\t\t// Duotone are the only type of filters for now.\n\t\t( metadata ) => metadata.path.at( -1 ) === 'duotone'\n\t).flatMap( ( metadata ) => {\n\t\tconst presetByOrigin = getValueFromObjectPath(\n\t\t\tblockPresets,\n\t\t\tmetadata.path,\n\t\t\t{}\n\t\t);\n\t\treturn [ 'default', 'theme' ]\n\t\t\t.filter( ( origin ) => presetByOrigin[ origin ] )\n\t\t\t.flatMap( ( origin ) =>\n\t\t\t\tpresetByOrigin[ origin ].map( ( preset ) =>\n\t\t\t\t\tgetDuotoneFilter(\n\t\t\t\t\t\t`wp-duotone-${ preset.slug }`,\n\t\t\t\t\t\tpreset.colors\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t\t.join( '' );\n\t} );\n}\n\nfunction flattenTree( input = {}, prefix, token ) {\n\tlet result = [];\n\tObject.keys( input ).forEach( ( key ) => {\n\t\tconst newKey = prefix + kebabCase( key.replace( '/', '-' ) );\n\t\tconst newLeaf = input[ key ];\n\n\t\tif ( newLeaf instanceof Object ) {\n\t\t\tconst newPrefix = newKey + token;\n\t\t\tresult = [ ...result, ...flattenTree( newLeaf, newPrefix, token ) ];\n\t\t} else {\n\t\t\tresult.push( `${ newKey }: ${ newLeaf }` );\n\t\t}\n\t} );\n\treturn result;\n}\n\n/**\n * Gets variation selector string from feature selector.\n *\n * @param {string} featureSelector The feature selector.\n *\n * @param {string} styleVariationSelector The style variation selector.\n * @return {string} Combined selector string.\n */\nfunction concatFeatureVariationSelectorString(\n\tfeatureSelector,\n\tstyleVariationSelector\n) {\n\tconst featureSelectors = featureSelector.split( ',' );\n\tconst combinedSelectors = [];\n\tfeatureSelectors.forEach( ( selector ) => {\n\t\tcombinedSelectors.push(\n\t\t\t`${ styleVariationSelector.trim() }${ selector.trim() }`\n\t\t);\n\t} );\n\treturn combinedSelectors.join( ', ' );\n}\n\n/**\n * Generate style declarations for a block's custom feature and subfeature\n * selectors.\n *\n * NOTE: The passed `styles` object will be mutated by this function.\n *\n * @param {Object} selectors Custom selectors object for a block.\n * @param {Object} styles A block's styles object.\n *\n * @return {Object} Style declarations.\n */\nconst getFeatureDeclarations = ( selectors, styles ) => {\n\tconst declarations = {};\n\n\tObject.entries( selectors ).forEach( ( [ feature, selector ] ) => {\n\t\t// We're only processing features/subfeatures that have styles.\n\t\tif ( feature === 'root' || ! styles?.[ feature ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isShorthand = typeof selector === 'string';\n\n\t\t// If we have a selector object instead of shorthand process it.\n\t\tif ( ! isShorthand ) {\n\t\t\tObject.entries( selector ).forEach(\n\t\t\t\t( [ subfeature, subfeatureSelector ] ) => {\n\t\t\t\t\t// Don't process root feature selector yet or any\n\t\t\t\t\t// subfeature that doesn't have a style.\n\t\t\t\t\tif (\n\t\t\t\t\t\tsubfeature === 'root' ||\n\t\t\t\t\t\t! styles?.[ feature ][ subfeature ]\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create a temporary styles object and build\n\t\t\t\t\t// declarations for subfeature.\n\t\t\t\t\tconst subfeatureStyles = {\n\t\t\t\t\t\t[ feature ]: {\n\t\t\t\t\t\t\t[ subfeature ]: styles[ feature ][ subfeature ],\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\tconst newDeclarations =\n\t\t\t\t\t\tgetStylesDeclarations( subfeatureStyles );\n\n\t\t\t\t\t// Merge new declarations in with any others that\n\t\t\t\t\t// share the same selector.\n\t\t\t\t\tdeclarations[ subfeatureSelector ] = [\n\t\t\t\t\t\t...( declarations[ subfeatureSelector ] || [] ),\n\t\t\t\t\t\t...newDeclarations,\n\t\t\t\t\t];\n\n\t\t\t\t\t// Remove the subfeature's style now it will be\n\t\t\t\t\t// included under its own selector not the block's.\n\t\t\t\t\tdelete styles[ feature ][ subfeature ];\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\t// Now subfeatures have been processed and removed, we can\n\t\t// process root, or shorthand, feature selectors.\n\t\tif ( isShorthand || selector.root ) {\n\t\t\tconst featureSelector = isShorthand ? selector : selector.root;\n\n\t\t\t// Create temporary style object and build declarations for feature.\n\t\t\tconst featureStyles = { [ feature ]: styles[ feature ] };\n\t\t\tconst newDeclarations = getStylesDeclarations( featureStyles );\n\n\t\t\t// Merge new declarations with any others that share the selector.\n\t\t\tdeclarations[ featureSelector ] = [\n\t\t\t\t...( declarations[ featureSelector ] || [] ),\n\t\t\t\t...newDeclarations,\n\t\t\t];\n\n\t\t\t// Remove the feature from the block's styles now as it will be\n\t\t\t// included under its own selector not the block's.\n\t\t\tdelete styles[ feature ];\n\t\t}\n\t} );\n\n\treturn declarations;\n};\n\n/**\n * Transform given style tree into a set of style declarations.\n *\n * @param {Object} blockStyles Block styles.\n *\n * @param {string} selector The selector these declarations should attach to.\n *\n * @param {boolean} useRootPaddingAlign Whether to use CSS custom properties in root selector.\n *\n * @param {Object} tree A theme.json tree containing layout definitions.\n *\n * @param {boolean} isTemplate Whether the entity being edited is a full template or a pattern.\n * @return {Array} An array of style declarations.\n */\nexport function getStylesDeclarations(\n\tblockStyles = {},\n\tselector = '',\n\tuseRootPaddingAlign,\n\ttree = {},\n\tisTemplate = true\n) {\n\tconst isRoot = ROOT_BLOCK_SELECTOR === selector;\n\tconst output = Object.entries( STYLE_PROPERTY ).reduce(\n\t\t(\n\t\t\tdeclarations,\n\t\t\t[ key, { value, properties, useEngine, rootOnly } ]\n\t\t) => {\n\t\t\tif ( rootOnly && ! isRoot ) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\t\t\tconst pathToValue = value;\n\t\t\tif ( pathToValue[ 0 ] === 'elements' || useEngine ) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\n\t\t\tconst styleValue = getValueFromObjectPath(\n\t\t\t\tblockStyles,\n\t\t\t\tpathToValue\n\t\t\t);\n\n\t\t\t// Root-level padding styles don't currently support strings with CSS shorthand values.\n\t\t\t// This may change: https://github.com/WordPress/gutenberg/issues/40132.\n\t\t\tif (\n\t\t\t\tkey === '--wp--style--root--padding' &&\n\t\t\t\t( typeof styleValue === 'string' || ! useRootPaddingAlign )\n\t\t\t) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\n\t\t\tif ( properties && typeof styleValue !== 'string' ) {\n\t\t\t\tObject.entries( properties ).forEach( ( entry ) => {\n\t\t\t\t\tconst [ name, prop ] = entry;\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! getValueFromObjectPath( styleValue, [ prop ], false )\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Do not create a declaration\n\t\t\t\t\t\t// for sub-properties that don't have any value.\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst cssProperty = name.startsWith( '--' )\n\t\t\t\t\t\t? name\n\t\t\t\t\t\t: kebabCase( name );\n\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t`${ cssProperty }: ${ compileStyleValue(\n\t\t\t\t\t\t\tgetValueFromObjectPath( styleValue, [ prop ] )\n\t\t\t\t\t\t) }`\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t} else if (\n\t\t\t\tgetValueFromObjectPath( blockStyles, pathToValue, false )\n\t\t\t) {\n\t\t\t\tconst cssProperty = key.startsWith( '--' )\n\t\t\t\t\t? key\n\t\t\t\t\t: kebabCase( key );\n\t\t\t\tdeclarations.push(\n\t\t\t\t\t`${ cssProperty }: ${ compileStyleValue(\n\t\t\t\t\t\tgetValueFromObjectPath( blockStyles, pathToValue )\n\t\t\t\t\t) }`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn declarations;\n\t\t},\n\t\t[]\n\t);\n\n\t// The goal is to move everything to server side generated engine styles\n\t// This is temporary as we absorb more and more styles into the engine.\n\tconst extraRules = getCSSRules( blockStyles );\n\textraRules.forEach( ( rule ) => {\n\t\t// Don't output padding properties if padding variables are set or if we're not editing a full template.\n\t\tif (\n\t\t\tisRoot &&\n\t\t\t( useRootPaddingAlign || ! isTemplate ) &&\n\t\t\trule.key.startsWith( 'padding' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst cssProperty = rule.key.startsWith( '--' )\n\t\t\t? rule.key\n\t\t\t: kebabCase( rule.key );\n\n\t\tlet ruleValue = rule.value;\n\t\tif ( typeof ruleValue !== 'string' && ruleValue?.ref ) {\n\t\t\tconst refPath = ruleValue.ref.split( '.' );\n\t\t\truleValue = getValueFromObjectPath( tree, refPath );\n\t\t\t// Presence of another ref indicates a reference to another dynamic value.\n\t\t\t// Pointing to another dynamic value is not supported.\n\t\t\tif ( ! ruleValue || ruleValue?.ref ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Calculate fluid typography rules where available.\n\t\tif ( cssProperty === 'font-size' ) {\n\t\t\t/*\n\t\t\t * getTypographyFontSizeValue() will check\n\t\t\t * if fluid typography has been activated and also\n\t\t\t * whether the incoming value can be converted to a fluid value.\n\t\t\t * Values that already have a \"clamp()\" function will not pass the test,\n\t\t\t * and therefore the original $value will be returned.\n\t\t\t */\n\t\t\truleValue = getTypographyFontSizeValue(\n\t\t\t\t{ size: ruleValue },\n\t\t\t\tgetFluidTypographyOptionsFromSettings( tree?.settings )\n\t\t\t);\n\t\t}\n\n\t\toutput.push( `${ cssProperty }: ${ ruleValue }` );\n\t} );\n\n\treturn output;\n}\n\n/**\n * Get generated CSS for layout styles by looking up layout definitions provided\n * in theme.json, and outputting common layout styles, and specific blockGap values.\n *\n * @param {Object} props\n * @param {Object} props.layoutDefinitions Layout definitions, keyed by layout type.\n * @param {Object} props.style A style object containing spacing values.\n * @param {string} props.selector Selector used to group together layout styling rules.\n * @param {boolean} props.hasBlockGapSupport Whether or not the theme opts-in to blockGap support.\n * @param {boolean} props.hasFallbackGapSupport Whether or not the theme allows fallback gap styles.\n * @param {?string} props.fallbackGapValue An optional fallback gap value if no real gap value is available.\n * @return {string} Generated CSS rules for the layout styles.\n */\nexport function getLayoutStyles( {\n\tlayoutDefinitions = LAYOUT_DEFINITIONS,\n\tstyle,\n\tselector,\n\thasBlockGapSupport,\n\thasFallbackGapSupport,\n\tfallbackGapValue,\n} ) {\n\tlet ruleset = '';\n\tlet gapValue = hasBlockGapSupport\n\t\t? getGapCSSValue( style?.spacing?.blockGap )\n\t\t: '';\n\n\t// Ensure a fallback gap value for the root layout definitions,\n\t// and use a fallback value if one is provided for the current block.\n\tif ( hasFallbackGapSupport ) {\n\t\tif ( selector === ROOT_BLOCK_SELECTOR ) {\n\t\t\tgapValue = ! gapValue ? '0.5em' : gapValue;\n\t\t} else if ( ! hasBlockGapSupport && fallbackGapValue ) {\n\t\t\tgapValue = fallbackGapValue;\n\t\t}\n\t}\n\n\tif ( gapValue && layoutDefinitions ) {\n\t\tObject.values( layoutDefinitions ).forEach(\n\t\t\t( { className, name, spacingStyles } ) => {\n\t\t\t\t// Allow outputting fallback gap styles for flex layout type when block gap support isn't available.\n\t\t\t\tif (\n\t\t\t\t\t! hasBlockGapSupport &&\n\t\t\t\t\t'flex' !== name &&\n\t\t\t\t\t'grid' !== name\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( spacingStyles?.length ) {\n\t\t\t\t\tspacingStyles.forEach( ( spacingStyle ) => {\n\t\t\t\t\t\tconst declarations = [];\n\n\t\t\t\t\t\tif ( spacingStyle.rules ) {\n\t\t\t\t\t\t\tObject.entries( spacingStyle.rules ).forEach(\n\t\t\t\t\t\t\t\t( [ cssProperty, cssValue ] ) => {\n\t\t\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t\t\t`${ cssProperty }: ${\n\t\t\t\t\t\t\t\t\t\t\tcssValue ? cssValue : gapValue\n\t\t\t\t\t\t\t\t\t\t}`\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\tlet combinedSelector = '';\n\n\t\t\t\t\t\t\tif ( ! hasBlockGapSupport ) {\n\t\t\t\t\t\t\t\t// For fallback gap styles, use lower specificity, to ensure styles do not unintentionally override theme styles.\n\t\t\t\t\t\t\t\tcombinedSelector =\n\t\t\t\t\t\t\t\t\tselector === ROOT_BLOCK_SELECTOR\n\t\t\t\t\t\t\t\t\t\t? `:where(.${ className }${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t })`\n\t\t\t\t\t\t\t\t\t\t: `:where(${ selector }.${ className }${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t })`;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcombinedSelector =\n\t\t\t\t\t\t\t\t\tselector === ROOT_BLOCK_SELECTOR\n\t\t\t\t\t\t\t\t\t\t? `:where(${ selector } .${ className })${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t }`\n\t\t\t\t\t\t\t\t\t\t: `${ selector }-${ className }${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t }`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\truleset += `${ combinedSelector } { ${ declarations.join(\n\t\t\t\t\t\t\t\t'; '\n\t\t\t\t\t\t\t) }; }`;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\t// For backwards compatibility, ensure the legacy block gap CSS variable is still available.\n\t\tif ( selector === ROOT_BLOCK_SELECTOR && hasBlockGapSupport ) {\n\t\t\truleset += `${ selector } { --wp--style--block-gap: ${ gapValue }; }`;\n\t\t}\n\t}\n\n\t// Output base styles\n\tif ( selector === ROOT_BLOCK_SELECTOR && layoutDefinitions ) {\n\t\tconst validDisplayModes = [ 'block', 'flex', 'grid' ];\n\t\tObject.values( layoutDefinitions ).forEach(\n\t\t\t( { className, displayMode, baseStyles } ) => {\n\t\t\t\tif (\n\t\t\t\t\tdisplayMode &&\n\t\t\t\t\tvalidDisplayModes.includes( displayMode )\n\t\t\t\t) {\n\t\t\t\t\truleset += `${ selector } .${ className } { display:${ displayMode }; }`;\n\t\t\t\t}\n\n\t\t\t\tif ( baseStyles?.length ) {\n\t\t\t\t\tbaseStyles.forEach( ( baseStyle ) => {\n\t\t\t\t\t\tconst declarations = [];\n\n\t\t\t\t\t\tif ( baseStyle.rules ) {\n\t\t\t\t\t\t\tObject.entries( baseStyle.rules ).forEach(\n\t\t\t\t\t\t\t\t( [ cssProperty, cssValue ] ) => {\n\t\t\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t\t\t`${ cssProperty }: ${ cssValue }`\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\tconst combinedSelector = `${ selector } .${ className }${\n\t\t\t\t\t\t\t\tbaseStyle?.selector || ''\n\t\t\t\t\t\t\t}`;\n\t\t\t\t\t\t\truleset += `${ combinedSelector } { ${ declarations.join(\n\t\t\t\t\t\t\t\t'; '\n\t\t\t\t\t\t\t) }; }`;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\treturn ruleset;\n}\n\nconst STYLE_KEYS = [\n\t'border',\n\t'color',\n\t'dimensions',\n\t'spacing',\n\t'typography',\n\t'filter',\n\t'outline',\n\t'shadow',\n];\n\nfunction pickStyleKeys( treeToPickFrom ) {\n\tif ( ! treeToPickFrom ) {\n\t\treturn {};\n\t}\n\tconst entries = Object.entries( treeToPickFrom );\n\tconst pickedEntries = entries.filter( ( [ key ] ) =>\n\t\tSTYLE_KEYS.includes( key )\n\t);\n\t// clone the style objects so that `getFeatureDeclarations` can remove consumed keys from it\n\tconst clonedEntries = pickedEntries.map( ( [ key, style ] ) => [\n\t\tkey,\n\t\tJSON.parse( JSON.stringify( style ) ),\n\t] );\n\treturn Object.fromEntries( clonedEntries );\n}\n\nexport const getNodesWithStyles = ( tree, blockSelectors ) => {\n\tconst nodes = [];\n\n\tif ( ! tree?.styles ) {\n\t\treturn nodes;\n\t}\n\n\t// Top-level.\n\tconst styles = pickStyleKeys( tree.styles );\n\tif ( styles ) {\n\t\tnodes.push( {\n\t\t\tstyles,\n\t\t\tselector: ROOT_BLOCK_SELECTOR,\n\t\t} );\n\t}\n\n\tObject.entries( ELEMENTS ).forEach( ( [ name, selector ] ) => {\n\t\tif ( tree.styles?.elements?.[ name ] ) {\n\t\t\tnodes.push( {\n\t\t\t\tstyles: tree.styles?.elements?.[ name ],\n\t\t\t\tselector,\n\t\t\t} );\n\t\t}\n\t} );\n\n\t// Iterate over blocks: they can have styles & elements.\n\tObject.entries( tree.styles?.blocks ?? {} ).forEach(\n\t\t( [ blockName, node ] ) => {\n\t\t\tconst blockStyles = pickStyleKeys( node );\n\n\t\t\tif ( node?.variations ) {\n\t\t\t\tconst variations = {};\n\t\t\t\tObject.keys( node.variations ).forEach( ( variation ) => {\n\t\t\t\t\tvariations[ variation ] = pickStyleKeys(\n\t\t\t\t\t\tnode.variations[ variation ]\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t\tblockStyles.variations = variations;\n\t\t\t}\n\t\t\tif ( blockStyles && blockSelectors?.[ blockName ]?.selector ) {\n\t\t\t\tnodes.push( {\n\t\t\t\t\tduotoneSelector:\n\t\t\t\t\t\tblockSelectors[ blockName ].duotoneSelector,\n\t\t\t\t\tfallbackGapValue:\n\t\t\t\t\t\tblockSelectors[ blockName ].fallbackGapValue,\n\t\t\t\t\thasLayoutSupport:\n\t\t\t\t\t\tblockSelectors[ blockName ].hasLayoutSupport,\n\t\t\t\t\tselector: blockSelectors[ blockName ].selector,\n\t\t\t\t\tstyles: blockStyles,\n\t\t\t\t\tfeatureSelectors:\n\t\t\t\t\t\tblockSelectors[ blockName ].featureSelectors,\n\t\t\t\t\tstyleVariationSelectors:\n\t\t\t\t\t\tblockSelectors[ blockName ].styleVariationSelectors,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tObject.entries( node?.elements ?? {} ).forEach(\n\t\t\t\t( [ elementName, value ] ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tvalue &&\n\t\t\t\t\t\tblockSelectors?.[ blockName ] &&\n\t\t\t\t\t\tELEMENTS[ elementName ]\n\t\t\t\t\t) {\n\t\t\t\t\t\tnodes.push( {\n\t\t\t\t\t\t\tstyles: value,\n\t\t\t\t\t\t\tselector: blockSelectors[ blockName ]?.selector\n\t\t\t\t\t\t\t\t.split( ',' )\n\t\t\t\t\t\t\t\t.map( ( sel ) => {\n\t\t\t\t\t\t\t\t\tconst elementSelectors =\n\t\t\t\t\t\t\t\t\t\tELEMENTS[ elementName ].split( ',' );\n\t\t\t\t\t\t\t\t\treturn elementSelectors.map(\n\t\t\t\t\t\t\t\t\t\t( elementSelector ) =>\n\t\t\t\t\t\t\t\t\t\t\tsel + ' ' + elementSelector\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t.join( ',' ),\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\n\treturn nodes;\n};\n\nexport const getNodesWithSettings = ( tree, blockSelectors ) => {\n\tconst nodes = [];\n\n\tif ( ! tree?.settings ) {\n\t\treturn nodes;\n\t}\n\n\tconst pickPresets = ( treeToPickFrom ) => {\n\t\tlet presets = {};\n\t\tPRESET_METADATA.forEach( ( { path } ) => {\n\t\t\tconst value = getValueFromObjectPath( treeToPickFrom, path, false );\n\t\t\tif ( value !== false ) {\n\t\t\t\tpresets = setImmutably( presets, path, value );\n\t\t\t}\n\t\t} );\n\t\treturn presets;\n\t};\n\n\t// Top-level.\n\tconst presets = pickPresets( tree.settings );\n\tconst custom = tree.settings?.custom;\n\tif ( Object.keys( presets ).length > 0 || custom ) {\n\t\tnodes.push( {\n\t\t\tpresets,\n\t\t\tcustom,\n\t\t\tselector: ROOT_BLOCK_SELECTOR,\n\t\t} );\n\t}\n\n\t// Blocks.\n\tObject.entries( tree.settings?.blocks ?? {} ).forEach(\n\t\t( [ blockName, node ] ) => {\n\t\t\tconst blockPresets = pickPresets( node );\n\t\t\tconst blockCustom = node.custom;\n\t\t\tif ( Object.keys( blockPresets ).length > 0 || blockCustom ) {\n\t\t\t\tnodes.push( {\n\t\t\t\t\tpresets: blockPresets,\n\t\t\t\t\tcustom: blockCustom,\n\t\t\t\t\tselector: blockSelectors[ blockName ]?.selector,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t);\n\n\treturn nodes;\n};\n\nexport const toCustomProperties = ( tree, blockSelectors ) => {\n\tconst settings = getNodesWithSettings( tree, blockSelectors );\n\tlet ruleset = '';\n\tsettings.forEach( ( { presets, custom, selector } ) => {\n\t\tconst declarations = getPresetsDeclarations( presets, tree?.settings );\n\t\tconst customProps = flattenTree( custom, '--wp--custom--', '--' );\n\t\tif ( customProps.length > 0 ) {\n\t\t\tdeclarations.push( ...customProps );\n\t\t}\n\n\t\tif ( declarations.length > 0 ) {\n\t\t\truleset += `${ selector }{${ declarations.join( ';' ) };}`;\n\t\t}\n\t} );\n\n\treturn ruleset;\n};\n\nexport const toStyles = (\n\ttree,\n\tblockSelectors,\n\thasBlockGapSupport,\n\thasFallbackGapSupport,\n\tdisableLayoutStyles = false,\n\tisTemplate = true\n) => {\n\tconst nodesWithStyles = getNodesWithStyles( tree, blockSelectors );\n\tconst nodesWithSettings = getNodesWithSettings( tree, blockSelectors );\n\tconst useRootPaddingAlign = tree?.settings?.useRootPaddingAwareAlignments;\n\tconst { contentSize, wideSize } = tree?.settings?.layout || {};\n\n\t/*\n\t * Reset default browser margin on the root body element.\n\t * This is set on the root selector **before** generating the ruleset\n\t * from the `theme.json`. This is to ensure that if the `theme.json` declares\n\t * `margin` in its `spacing` declaration for the `body` element then these\n\t * user-generated values take precedence in the CSS cascade.\n\t * @link https://github.com/WordPress/gutenberg/issues/36147.\n\t */\n\tlet ruleset = 'body {margin: 0;';\n\n\tif ( contentSize ) {\n\t\truleset += ` --wp--style--global--content-size: ${ contentSize };`;\n\t}\n\n\tif ( wideSize ) {\n\t\truleset += ` --wp--style--global--wide-size: ${ wideSize };`;\n\t}\n\n\t// Root padding styles should only be output for full templates, not patterns or template parts.\n\tif ( useRootPaddingAlign && isTemplate ) {\n\t\t/*\n\t\t * These rules reproduce the ones from https://github.com/WordPress/gutenberg/blob/79103f124925d1f457f627e154f52a56228ed5ad/lib/class-wp-theme-json-gutenberg.php#L2508\n\t\t * almost exactly, but for the selectors that target block wrappers in the front end. This code only runs in the editor, so it doesn't need those selectors.\n\t\t */\n\t\truleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding:not(.wp-block-block)) { padding-right: 0; padding-left: 0; }\n\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t.has-global-padding :where(.has-global-padding:not(.wp-block-block)) > .alignfull { margin-right: 0; margin-left: 0; }\n\t\t\t.has-global-padding > .alignfull:where(:not(.has-global-padding):not(.is-layout-flex):not(.is-layout-grid)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;`;\n\t}\n\n\truleset += '}';\n\n\tnodesWithStyles.forEach(\n\t\t( {\n\t\t\tselector,\n\t\t\tduotoneSelector,\n\t\t\tstyles,\n\t\t\tfallbackGapValue,\n\t\t\thasLayoutSupport,\n\t\t\tfeatureSelectors,\n\t\t\tstyleVariationSelectors,\n\t\t} ) => {\n\t\t\t// Process styles for block support features with custom feature level\n\t\t\t// CSS selectors set.\n\t\t\tif ( featureSelectors ) {\n\t\t\t\tconst featureDeclarations = getFeatureDeclarations(\n\t\t\t\t\tfeatureSelectors,\n\t\t\t\t\tstyles\n\t\t\t\t);\n\n\t\t\t\tObject.entries( featureDeclarations ).forEach(\n\t\t\t\t\t( [ cssSelector, declarations ] ) => {\n\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\tconst rules = declarations.join( ';' );\n\t\t\t\t\t\t\truleset += `${ cssSelector }{${ rules };}`;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( styleVariationSelectors ) {\n\t\t\t\tObject.entries( styleVariationSelectors ).forEach(\n\t\t\t\t\t( [ styleVariationName, styleVariationSelector ] ) => {\n\t\t\t\t\t\tconst styleVariations =\n\t\t\t\t\t\t\tstyles?.variations?.[ styleVariationName ];\n\t\t\t\t\t\tif ( styleVariations ) {\n\t\t\t\t\t\t\t// If the block uses any custom selectors for block support, add those first.\n\t\t\t\t\t\t\tif ( featureSelectors ) {\n\t\t\t\t\t\t\t\tconst featureDeclarations =\n\t\t\t\t\t\t\t\t\tgetFeatureDeclarations(\n\t\t\t\t\t\t\t\t\t\tfeatureSelectors,\n\t\t\t\t\t\t\t\t\t\tstyleVariations\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tObject.entries( featureDeclarations ).forEach(\n\t\t\t\t\t\t\t\t\t( [ baseSelector, declarations ] ) => {\n\t\t\t\t\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\t\t\t\t\tconst cssSelector =\n\t\t\t\t\t\t\t\t\t\t\t\tconcatFeatureVariationSelectorString(\n\t\t\t\t\t\t\t\t\t\t\t\t\tbaseSelector,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyleVariationSelector\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tconst rules =\n\t\t\t\t\t\t\t\t\t\t\t\tdeclarations.join( ';' );\n\t\t\t\t\t\t\t\t\t\t\truleset += `${ cssSelector }{${ rules };}`;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Otherwise add regular selectors.\n\t\t\t\t\t\t\tconst styleVariationDeclarations =\n\t\t\t\t\t\t\t\tgetStylesDeclarations(\n\t\t\t\t\t\t\t\t\tstyleVariations,\n\t\t\t\t\t\t\t\t\tstyleVariationSelector,\n\t\t\t\t\t\t\t\t\tuseRootPaddingAlign,\n\t\t\t\t\t\t\t\t\ttree\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif ( styleVariationDeclarations.length ) {\n\t\t\t\t\t\t\t\truleset += `${ styleVariationSelector }{${ styleVariationDeclarations.join(\n\t\t\t\t\t\t\t\t\t';'\n\t\t\t\t\t\t\t\t) };}`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Process duotone styles.\n\t\t\tif ( duotoneSelector ) {\n\t\t\t\tconst duotoneStyles = {};\n\t\t\t\tif ( styles?.filter ) {\n\t\t\t\t\tduotoneStyles.filter = styles.filter;\n\t\t\t\t\tdelete styles.filter;\n\t\t\t\t}\n\t\t\t\tconst duotoneDeclarations =\n\t\t\t\t\tgetStylesDeclarations( duotoneStyles );\n\t\t\t\tif ( duotoneDeclarations.length ) {\n\t\t\t\t\truleset += `${ duotoneSelector }{${ duotoneDeclarations.join(\n\t\t\t\t\t\t';'\n\t\t\t\t\t) };}`;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Process blockGap and layout styles.\n\t\t\tif (\n\t\t\t\t! disableLayoutStyles &&\n\t\t\t\t( ROOT_BLOCK_SELECTOR === selector || hasLayoutSupport )\n\t\t\t) {\n\t\t\t\truleset += getLayoutStyles( {\n\t\t\t\t\tstyle: styles,\n\t\t\t\t\tselector,\n\t\t\t\t\thasBlockGapSupport,\n\t\t\t\t\thasFallbackGapSupport,\n\t\t\t\t\tfallbackGapValue,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Process the remaining block styles (they use either normal block class or __experimentalSelector).\n\t\t\tconst declarations = getStylesDeclarations(\n\t\t\t\tstyles,\n\t\t\t\tselector,\n\t\t\t\tuseRootPaddingAlign,\n\t\t\t\ttree,\n\t\t\t\tisTemplate\n\t\t\t);\n\t\t\tif ( declarations?.length ) {\n\t\t\t\truleset += `${ selector }{${ declarations.join( ';' ) };}`;\n\t\t\t}\n\n\t\t\t// Check for pseudo selector in `styles` and handle separately.\n\t\t\tconst pseudoSelectorStyles = Object.entries( styles ).filter(\n\t\t\t\t( [ key ] ) => key.startsWith( ':' )\n\t\t\t);\n\n\t\t\tif ( pseudoSelectorStyles?.length ) {\n\t\t\t\tpseudoSelectorStyles.forEach(\n\t\t\t\t\t( [ pseudoKey, pseudoStyle ] ) => {\n\t\t\t\t\t\tconst pseudoDeclarations =\n\t\t\t\t\t\t\tgetStylesDeclarations( pseudoStyle );\n\n\t\t\t\t\t\tif ( ! pseudoDeclarations?.length ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// `selector` maybe provided in a form\n\t\t\t\t\t\t// where block level selectors have sub element\n\t\t\t\t\t\t// selectors appended to them as a comma separated\n\t\t\t\t\t\t// string.\n\t\t\t\t\t\t// e.g. `h1 a,h2 a,h3 a,h4 a,h5 a,h6 a`;\n\t\t\t\t\t\t// Split and append pseudo selector to create\n\t\t\t\t\t\t// the proper rules to target the elements.\n\t\t\t\t\t\tconst _selector = selector\n\t\t\t\t\t\t\t.split( ',' )\n\t\t\t\t\t\t\t.map( ( sel ) => sel + pseudoKey )\n\t\t\t\t\t\t\t.join( ',' );\n\n\t\t\t\t\t\tconst pseudoRule = `${ _selector }{${ pseudoDeclarations.join(\n\t\t\t\t\t\t\t';'\n\t\t\t\t\t\t) };}`;\n\n\t\t\t\t\t\truleset += pseudoRule;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t);\n\n\t/* Add alignment / layout styles */\n\truleset =\n\t\truleset +\n\t\t'.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }';\n\truleset =\n\t\truleset +\n\t\t'.wp-site-blocks > .alignright { float: right; margin-left: 2em; }';\n\truleset =\n\t\truleset +\n\t\t'.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }';\n\n\tif ( hasBlockGapSupport ) {\n\t\t// Use fallback of `0.5em` just in case, however if there is blockGap support, there should nearly always be a real value.\n\t\tconst gapValue =\n\t\t\tgetGapCSSValue( tree?.styles?.spacing?.blockGap ) || '0.5em';\n\t\truleset =\n\t\t\truleset +\n\t\t\t`:where(.wp-site-blocks) > * { margin-block-start: ${ gapValue }; margin-block-end: 0; }`;\n\t\truleset =\n\t\t\truleset +\n\t\t\t':where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }';\n\t\truleset =\n\t\t\truleset +\n\t\t\t':where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }';\n\t}\n\n\tnodesWithSettings.forEach( ( { selector, presets } ) => {\n\t\tif ( ROOT_BLOCK_SELECTOR === selector ) {\n\t\t\t// Do not add extra specificity for top-level classes.\n\t\t\tselector = '';\n\t\t}\n\n\t\tconst classes = getPresetsClasses( selector, presets );\n\t\tif ( classes.length > 0 ) {\n\t\t\truleset += classes;\n\t\t}\n\t} );\n\n\treturn ruleset;\n};\n\nexport function toSvgFilters( tree, blockSelectors ) {\n\tconst nodesWithSettings = getNodesWithSettings( tree, blockSelectors );\n\treturn nodesWithSettings.flatMap( ( { presets } ) => {\n\t\treturn getPresetsSvgFilters( presets );\n\t} );\n}\n\nconst getSelectorsConfig = ( blockType, rootSelector ) => {\n\tif (\n\t\tblockType?.selectors &&\n\t\tObject.keys( blockType.selectors ).length > 0\n\t) {\n\t\treturn blockType.selectors;\n\t}\n\n\tconst config = { root: rootSelector };\n\tObject.entries( BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS ).forEach(\n\t\t( [ featureKey, featureName ] ) => {\n\t\t\tconst featureSelector = getBlockCSSSelector(\n\t\t\t\tblockType,\n\t\t\t\tfeatureKey\n\t\t\t);\n\n\t\t\tif ( featureSelector ) {\n\t\t\t\tconfig[ featureName ] = featureSelector;\n\t\t\t}\n\t\t}\n\t);\n\n\treturn config;\n};\n\nexport const getBlockSelectors = ( blockTypes, getBlockStyles ) => {\n\tconst result = {};\n\tblockTypes.forEach( ( blockType ) => {\n\t\tconst name = blockType.name;\n\t\tconst selector = getBlockCSSSelector( blockType );\n\t\tlet duotoneSelector = getBlockCSSSelector(\n\t\t\tblockType,\n\t\t\t'filter.duotone'\n\t\t);\n\n\t\t// Keep backwards compatibility for support.color.__experimentalDuotone.\n\t\tif ( ! duotoneSelector ) {\n\t\t\tconst rootSelector = getBlockCSSSelector( blockType );\n\t\t\tconst duotoneSupport = getBlockSupport(\n\t\t\t\tblockType,\n\t\t\t\t'color.__experimentalDuotone',\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tduotoneSelector =\n\t\t\t\tduotoneSupport && scopeSelector( rootSelector, duotoneSupport );\n\t\t}\n\n\t\tconst hasLayoutSupport =\n\t\t\t!! blockType?.supports?.layout ||\n\t\t\t!! blockType?.supports?.__experimentalLayout;\n\t\tconst fallbackGapValue =\n\t\t\tblockType?.supports?.spacing?.blockGap?.__experimentalDefault;\n\n\t\tconst blockStyleVariations = getBlockStyles( name );\n\t\tconst styleVariationSelectors = {};\n\t\tif ( blockStyleVariations?.length ) {\n\t\t\tblockStyleVariations.forEach( ( variation ) => {\n\t\t\t\tconst styleVariationSelector = `.is-style-${ variation.name }${ selector }`;\n\t\t\t\tstyleVariationSelectors[ variation.name ] =\n\t\t\t\t\tstyleVariationSelector;\n\t\t\t} );\n\t\t}\n\t\t// For each block support feature add any custom selectors.\n\t\tconst featureSelectors = getSelectorsConfig( blockType, selector );\n\n\t\tresult[ name ] = {\n\t\t\tduotoneSelector,\n\t\t\tfallbackGapValue,\n\t\t\tfeatureSelectors: Object.keys( featureSelectors ).length\n\t\t\t\t? featureSelectors\n\t\t\t\t: undefined,\n\t\t\thasLayoutSupport,\n\t\t\tname,\n\t\t\tselector,\n\t\t\tstyleVariationSelectors: Object.keys( styleVariationSelectors )\n\t\t\t\t.length\n\t\t\t\t? styleVariationSelectors\n\t\t\t\t: undefined,\n\t\t};\n\t} );\n\n\treturn result;\n};\n\n/**\n * If there is a separator block whose color is defined in theme.json via background,\n * update the separator color to the same value by using border color.\n *\n * @param {Object} config Theme.json configuration file object.\n * @return {Object} configTheme.json configuration file object updated.\n */\nfunction updateConfigWithSeparator( config ) {\n\tconst needsSeparatorStyleUpdate =\n\t\tconfig.styles?.blocks?.[ 'core/separator' ] &&\n\t\tconfig.styles?.blocks?.[ 'core/separator' ].color?.background &&\n\t\t! config.styles?.blocks?.[ 'core/separator' ].color?.text &&\n\t\t! config.styles?.blocks?.[ 'core/separator' ].border?.color;\n\tif ( needsSeparatorStyleUpdate ) {\n\t\treturn {\n\t\t\t...config,\n\t\t\tstyles: {\n\t\t\t\t...config.styles,\n\t\t\t\tblocks: {\n\t\t\t\t\t...config.styles.blocks,\n\t\t\t\t\t'core/separator': {\n\t\t\t\t\t\t...config.styles.blocks[ 'core/separator' ],\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t...config.styles.blocks[ 'core/separator' ].color,\n\t\t\t\t\t\t\ttext: config.styles?.blocks[ 'core/separator' ]\n\t\t\t\t\t\t\t\t.color.background,\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 config;\n}\n\nexport function processCSSNesting( css, blockSelector ) {\n\tlet processedCSS = '';\n\n\t// Split CSS nested rules.\n\tconst parts = css.split( '&' );\n\tparts.forEach( ( part ) => {\n\t\tconst isRootCss = ! part.includes( '{' );\n\t\tif ( isRootCss ) {\n\t\t\t// If the part doesn't contain braces, it applies to the root level.\n\t\t\tprocessedCSS += `${ blockSelector }{${ part.trim() }}`;\n\t\t} else {\n\t\t\t// If the part contains braces, it's a nested CSS rule.\n\t\t\tconst splittedPart = part.replace( '}', '' ).split( '{' );\n\t\t\tif ( splittedPart.length !== 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst [ nestedSelector, cssValue ] = splittedPart;\n\t\t\tconst combinedSelector = nestedSelector.startsWith( ' ' )\n\t\t\t\t? scopeSelector( blockSelector, nestedSelector )\n\t\t\t\t: appendToSelector( blockSelector, nestedSelector );\n\n\t\t\tprocessedCSS += `${ combinedSelector }{${ cssValue.trim() }}`;\n\t\t}\n\t} );\n\treturn processedCSS;\n}\n\n/**\n * Returns the global styles output using a global styles configuration.\n * If wishing to generate global styles and settings based on the\n * global styles config loaded in the editor context, use `useGlobalStylesOutput()`.\n * The use case for a custom config is to generate bespoke styles\n * and settings for previews, or other out-of-editor experiences.\n *\n * @param {Object} mergedConfig Global styles configuration.\n * @return {Array} Array of stylesheets and settings.\n */\nexport function useGlobalStylesOutputWithConfig( mergedConfig = {} ) {\n\tconst [ blockGap ] = useGlobalSetting( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGap !== null;\n\tconst hasFallbackGapSupport = ! hasBlockGapSupport; // This setting isn't useful yet: it exists as a placeholder for a future explicit fallback styles support.\n\tconst disableLayoutStyles = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn !! getSettings().disableLayoutStyles;\n\t} );\n\n\tconst blockContext = useContext( BlockContext );\n\n\tconst isTemplate = blockContext?.templateSlug !== undefined;\n\n\tconst getBlockStyles = useSelect( ( select ) => {\n\t\treturn select( blocksStore ).getBlockStyles;\n\t}, [] );\n\n\treturn useMemo( () => {\n\t\tif ( ! mergedConfig?.styles || ! mergedConfig?.settings ) {\n\t\t\treturn [];\n\t\t}\n\t\tmergedConfig = updateConfigWithSeparator( mergedConfig );\n\n\t\tconst blockSelectors = getBlockSelectors(\n\t\t\tgetBlockTypes(),\n\t\t\tgetBlockStyles\n\t\t);\n\n\t\tconst customProperties = toCustomProperties(\n\t\t\tmergedConfig,\n\t\t\tblockSelectors\n\t\t);\n\t\tconst globalStyles = toStyles(\n\t\t\tmergedConfig,\n\t\t\tblockSelectors,\n\t\t\thasBlockGapSupport,\n\t\t\thasFallbackGapSupport,\n\t\t\tdisableLayoutStyles,\n\t\t\tisTemplate\n\t\t);\n\t\tconst svgs = toSvgFilters( mergedConfig, blockSelectors );\n\n\t\tconst styles = [\n\t\t\t{\n\t\t\t\tcss: customProperties,\n\t\t\t\tisGlobalStyles: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tcss: globalStyles,\n\t\t\t\tisGlobalStyles: true,\n\t\t\t},\n\t\t\t// Load custom CSS in own stylesheet so that any invalid CSS entered in the input won't break all the global styles in the editor.\n\t\t\t{\n\t\t\t\tcss: mergedConfig.styles.css ?? '',\n\t\t\t\tisGlobalStyles: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tassets: svgs,\n\t\t\t\t__unstableType: 'svg',\n\t\t\t\tisGlobalStyles: true,\n\t\t\t},\n\t\t];\n\n\t\t// Loop through the blocks to check if there are custom CSS values.\n\t\t// If there are, get the block selector and push the selector together with\n\t\t// the CSS value to the 'stylesheets' array.\n\t\tgetBlockTypes().forEach( ( blockType ) => {\n\t\t\tif ( mergedConfig.styles.blocks[ blockType.name ]?.css ) {\n\t\t\t\tconst selector = blockSelectors[ blockType.name ].selector;\n\t\t\t\tstyles.push( {\n\t\t\t\t\tcss: processCSSNesting(\n\t\t\t\t\t\tmergedConfig.styles.blocks[ blockType.name ]?.css,\n\t\t\t\t\t\tselector\n\t\t\t\t\t),\n\t\t\t\t\tisGlobalStyles: true,\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\treturn [ styles, mergedConfig.settings ];\n\t}, [\n\t\thasBlockGapSupport,\n\t\thasFallbackGapSupport,\n\t\tmergedConfig,\n\t\tdisableLayoutStyles,\n\t] );\n}\n\n/**\n * Returns the global styles output based on the current state of global styles config loaded in the editor context.\n *\n * @return {Array} Array of stylesheets and settings.\n */\nexport function useGlobalStylesOutput() {\n\tconst { merged: mergedConfig } = useContext( GlobalStylesContext );\n\treturn useGlobalStylesOutputWithConfig( mergedConfig );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,6BAA6B,IAAIC,cAAc,EAC/CC,uBAAuB,IAAIC,QAAQ,EACnCC,eAAe,EACfC,aAAa,EACbC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;AACxD,SAASC,WAAW,QAAQ,yBAAyB;;AAErD;AACA;AACA;AACA,SACCC,eAAe,EACfC,mBAAmB,EACnBC,aAAa,EACbC,gBAAgB,QACV,SAAS;AAChB,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9D,SACCC,0BAA0B,EAC1BC,qCAAqC,QAC/B,oBAAoB;AAC3B,SAASC,mBAAmB,QAAQ,WAAW;AAC/C,SAASC,gBAAgB,QAAQ,SAAS;AAC1C,SAASC,gBAAgB,QAAQ,kBAAkB;AACnD,SAASC,cAAc,QAAQ,iBAAiB;AAChD,SAAShB,KAAK,IAAIiB,gBAAgB,QAAQ,aAAa;AACvD,SAASC,kBAAkB,QAAQ,2BAA2B;AAC9D,SACCC,sBAAsB,EACtBC,SAAS,EACTC,YAAY,QACN,oBAAoB;AAC3B,OAAOC,YAAY,MAAM,kBAAkB;;AAE3C;AACA;AACA,MAAMC,qCAAqC,GAAG;EAC7CC,oBAAoB,EAAE,QAAQ;EAC9BC,KAAK,EAAE,OAAO;EACdC,OAAO,EAAE,SAAS;EAClBC,UAAU,EAAE;AACb,CAAC;AAED,SAASC,iBAAiBA,CAAEC,eAAe,EAAG;EAC7C,MAAMC,yBAAyB,GAAG,MAAM;EACxC,MAAMC,uCAAuC,GAAG,GAAG;EACnD,MAAMC,mCAAmC,GAAG,IAAI;EAEh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OyN,+BAA+B,CAAEC,YAAa,CAAC;AACvD"}
@@ -278,6 +278,27 @@ export function scopeSelector(scope, selector) {
278
278
  return selectorsScoped.join(', ');
279
279
  }
280
280
 
281
+ /**
282
+ * Appends a sub-selector to an existing one.
283
+ *
284
+ * Given the compounded `selector` "h1, h2, h3"
285
+ * and the `toAppend` selector ".some-class" the result will be
286
+ * "h1.some-class, h2.some-class, h3.some-class".
287
+ *
288
+ * @param {string} selector Original selector.
289
+ * @param {string} toAppend Selector to append.
290
+ *
291
+ * @return {string} The new selector.
292
+ */
293
+ export function appendToSelector(selector, toAppend) {
294
+ if (!selector.includes(',')) {
295
+ return selector + toAppend;
296
+ }
297
+ const selectors = selector.split(',');
298
+ const newSelectors = selectors.map(sel => sel + toAppend);
299
+ return newSelectors.join(',');
300
+ }
301
+
281
302
  /**
282
303
  * Compares global style variations according to their styles and settings properties.
283
304
  *