@wordpress/block-editor 11.1.0 → 11.3.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 (765) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE.md +1 -1
  3. package/README.md +28 -4
  4. package/build/components/alignment-control/ui.js +1 -1
  5. package/build/components/alignment-control/ui.js.map +1 -1
  6. package/build/components/autocomplete/index.js +2 -7
  7. package/build/components/autocomplete/index.js.map +1 -1
  8. package/build/components/block-actions/index.js +9 -0
  9. package/build/components/block-actions/index.js.map +1 -1
  10. package/build/components/block-alignment-matrix-control/index.js +2 -2
  11. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  12. package/build/components/block-card/index.js +2 -4
  13. package/build/components/block-card/index.js.map +1 -1
  14. package/build/components/block-edit/index.js +8 -0
  15. package/build/components/block-edit/index.js.map +1 -1
  16. package/build/components/block-inspector/index.js +18 -15
  17. package/build/components/block-inspector/index.js.map +1 -1
  18. package/build/components/block-list/use-in-between-inserter.js +5 -0
  19. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  20. package/build/components/block-lock/modal.js +0 -1
  21. package/build/components/block-lock/modal.js.map +1 -1
  22. package/build/components/block-mover/mover-description.js +2 -2
  23. package/build/components/block-mover/mover-description.js.map +1 -1
  24. package/build/components/block-navigation/dropdown.js +3 -1
  25. package/build/components/block-navigation/dropdown.js.map +1 -1
  26. package/build/components/block-pattern-setup/index.js +1 -1
  27. package/build/components/block-pattern-setup/index.js.map +1 -1
  28. package/build/components/block-pattern-setup/use-patterns-setup.js +2 -2
  29. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  30. package/build/components/block-patterns-list/index.js +31 -3
  31. package/build/components/block-patterns-list/index.js.map +1 -1
  32. package/build/components/block-preview/auto.js +9 -14
  33. package/build/components/block-preview/auto.js.map +1 -1
  34. package/build/components/block-preview/index.js +32 -8
  35. package/build/components/block-preview/index.js.map +1 -1
  36. package/build/components/block-selection-clearer/index.js +1 -1
  37. package/build/components/block-selection-clearer/index.js.map +1 -1
  38. package/build/components/block-settings/container.native.js +7 -33
  39. package/build/components/block-settings/container.native.js.map +1 -1
  40. package/build/components/block-settings-menu/block-settings-dropdown.js +12 -3
  41. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  42. package/build/components/block-settings-menu-controls/index.js +2 -8
  43. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  44. package/build/components/block-styles/index.js +3 -1
  45. package/build/components/block-styles/index.js.map +1 -1
  46. package/build/components/block-switcher/utils.js +1 -1
  47. package/build/components/block-switcher/utils.js.map +1 -1
  48. package/build/components/block-tools/selected-block-popover.js +55 -47
  49. package/build/components/block-tools/selected-block-popover.js.map +1 -1
  50. package/build/components/block-tools/use-block-toolbar-popover-props.js +43 -10
  51. package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  52. package/build/components/block-vertical-alignment-control/icons.js +15 -1
  53. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  54. package/build/components/block-vertical-alignment-control/ui.js +9 -4
  55. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  56. package/build/components/color-style-selector/index.js +3 -1
  57. package/build/components/color-style-selector/index.js.map +1 -1
  58. package/build/components/date-format-picker/index.js +3 -4
  59. package/build/components/date-format-picker/index.js.map +1 -1
  60. package/build/components/default-style-picker/index.js +1 -0
  61. package/build/components/default-style-picker/index.js.map +1 -1
  62. package/build/components/font-family/index.js +1 -7
  63. package/build/components/font-family/index.js.map +1 -1
  64. package/build/components/font-sizes/fluid-utils.js +1 -1
  65. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  66. package/build/components/font-sizes/utils.js +1 -1
  67. package/build/components/font-sizes/utils.js.map +1 -1
  68. package/build/components/font-sizes/with-font-sizes.js +5 -8
  69. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  70. package/build/components/global-styles/context.js +22 -0
  71. package/build/components/global-styles/context.js.map +1 -0
  72. package/build/components/global-styles/hooks.js +142 -0
  73. package/build/components/global-styles/hooks.js.map +1 -0
  74. package/build/components/global-styles/index.js +42 -0
  75. package/build/components/global-styles/index.js.map +1 -0
  76. package/build/components/global-styles/typography-utils.js +92 -0
  77. package/build/components/global-styles/typography-utils.js.map +1 -0
  78. package/build/components/global-styles/use-global-styles-output.js +974 -0
  79. package/build/components/global-styles/use-global-styles-output.js.map +1 -0
  80. package/build/components/global-styles/utils.js +340 -0
  81. package/build/components/global-styles/utils.js.map +1 -0
  82. package/build/components/height-control/index.js +13 -1
  83. package/build/components/height-control/index.js.map +1 -1
  84. package/build/components/iframe/index.js +37 -8
  85. package/build/components/iframe/index.js.map +1 -1
  86. package/build/components/iframe/use-compatibility-styles.js +6 -1
  87. package/build/components/iframe/use-compatibility-styles.js.map +1 -1
  88. package/build/components/image-editor/constants.js +1 -1
  89. package/build/components/image-editor/constants.js.map +1 -1
  90. package/build/components/image-editor/context.js +1 -2
  91. package/build/components/image-editor/context.js.map +1 -1
  92. package/build/components/image-editor/cropper.js +3 -1
  93. package/build/components/image-editor/cropper.js.map +1 -1
  94. package/build/components/image-editor/index.js +13 -9
  95. package/build/components/image-editor/index.js.map +1 -1
  96. package/build/components/image-editor/use-transform-image.js +11 -35
  97. package/build/components/image-editor/use-transform-image.js.map +1 -1
  98. package/build/components/image-size-control/index.js +2 -7
  99. package/build/components/image-size-control/index.js.map +1 -1
  100. package/build/components/index.js +8 -24
  101. package/build/components/index.js.map +1 -1
  102. package/build/components/inner-blocks/index.js +22 -32
  103. package/build/components/inner-blocks/index.js.map +1 -1
  104. package/build/components/inner-blocks/index.native.js +8 -23
  105. package/build/components/inner-blocks/index.native.js.map +1 -1
  106. package/build/components/inner-blocks/use-block-context.js +53 -0
  107. package/build/components/inner-blocks/use-block-context.js.map +1 -0
  108. package/build/components/inserter/block-patterns-explorer/explorer.js +0 -1
  109. package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  110. package/build/components/inserter/block-patterns-tab.js +11 -5
  111. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  112. package/build/components/inserter/block-types-tab.js +2 -2
  113. package/build/components/inserter/block-types-tab.js.map +1 -1
  114. package/build/components/inserter/hooks/use-patterns-state.js +1 -7
  115. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  116. package/build/components/inserter/index.js +8 -6
  117. package/build/components/inserter/index.js.map +1 -1
  118. package/build/components/inserter/media-tab/hooks.js +142 -56
  119. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  120. package/build/components/inserter/media-tab/media-list.js +74 -21
  121. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  122. package/build/components/inserter/media-tab/media-panel.js +11 -13
  123. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  124. package/build/components/inserter/media-tab/media-tab.js +6 -3
  125. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  126. package/build/components/inserter/media-tab/utils.js +26 -15
  127. package/build/components/inserter/media-tab/utils.js.map +1 -1
  128. package/build/components/inserter/menu.js +12 -5
  129. package/build/components/inserter/menu.js.map +1 -1
  130. package/build/components/inserter/preview-panel.js +5 -3
  131. package/build/components/inserter/preview-panel.js.map +1 -1
  132. package/build/components/inserter/search-results.js +2 -7
  133. package/build/components/inserter/search-results.js.map +1 -1
  134. package/build/components/inserter-list-item/index.js +1 -9
  135. package/build/components/inserter-list-item/index.js.map +1 -1
  136. package/build/components/inspector-controls/fill.js +15 -2
  137. package/build/components/inspector-controls/fill.js.map +1 -1
  138. package/build/components/inspector-controls/fill.native.js +14 -1
  139. package/build/components/inspector-controls/fill.native.js.map +1 -1
  140. package/build/components/inspector-controls/groups.js +7 -1
  141. package/build/components/inspector-controls/groups.js.map +1 -1
  142. package/build/components/inspector-controls/index.js +2 -2
  143. package/build/components/inspector-controls/index.js.map +1 -1
  144. package/build/components/inspector-controls/slot.js +14 -1
  145. package/build/components/inspector-controls/slot.js.map +1 -1
  146. package/build/components/inspector-controls/slot.native.js +14 -1
  147. package/build/components/inspector-controls/slot.native.js.map +1 -1
  148. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  149. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  150. package/build/components/inspector-controls-tabs/index.js +2 -2
  151. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  152. package/build/components/inspector-controls-tabs/position-controls-panel.js +46 -0
  153. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -0
  154. package/build/components/inspector-controls-tabs/settings-tab.js +3 -1
  155. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  156. package/build/components/inspector-controls-tabs/styles-tab.js +6 -4
  157. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  158. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +20 -22
  159. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  160. package/build/components/justify-content-control/ui.js +8 -1
  161. package/build/components/justify-content-control/ui.js.map +1 -1
  162. package/build/components/link-control/index.js +45 -17
  163. package/build/components/link-control/index.js.map +1 -1
  164. package/build/components/link-control/search-input.js +1 -0
  165. package/build/components/link-control/search-input.js.map +1 -1
  166. package/build/components/list-view/block.js +1 -1
  167. package/build/components/list-view/block.js.map +1 -1
  168. package/build/components/list-view/use-list-view-drop-zone.js +1 -1
  169. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  170. package/build/components/media-upload/index.native.js +4 -1
  171. package/build/components/media-upload/index.native.js.map +1 -1
  172. package/build/components/off-canvas-editor/appender.js +49 -38
  173. package/build/components/off-canvas-editor/appender.js.map +1 -1
  174. package/build/components/off-canvas-editor/block-contents.js +38 -5
  175. package/build/components/off-canvas-editor/block-contents.js.map +1 -1
  176. package/build/components/off-canvas-editor/block-select-button.js +10 -4
  177. package/build/components/off-canvas-editor/block-select-button.js.map +1 -1
  178. package/build/components/off-canvas-editor/block.js +13 -52
  179. package/build/components/off-canvas-editor/block.js.map +1 -1
  180. package/build/components/off-canvas-editor/branch.js +25 -10
  181. package/build/components/off-canvas-editor/branch.js.map +1 -1
  182. package/build/components/off-canvas-editor/index.js +15 -17
  183. package/build/components/off-canvas-editor/index.js.map +1 -1
  184. package/build/components/off-canvas-editor/link-ui.js +2 -2
  185. package/build/components/off-canvas-editor/link-ui.js.map +1 -1
  186. package/build/components/off-canvas-editor/use-list-view-drop-zone.js +1 -1
  187. package/build/components/off-canvas-editor/use-list-view-drop-zone.js.map +1 -1
  188. package/build/components/provider/index.js +22 -8
  189. package/build/components/provider/index.js.map +1 -1
  190. package/build/components/provider/index.native.js +5 -6
  191. package/build/components/provider/index.native.js.map +1 -1
  192. package/build/components/rich-text/use-before-input-rules.js +11 -3
  193. package/build/components/rich-text/use-before-input-rules.js.map +1 -1
  194. package/build/components/rich-text/use-enter.js +4 -5
  195. package/build/components/rich-text/use-enter.js.map +1 -1
  196. package/build/components/rich-text/utils.js +1 -1
  197. package/build/components/rich-text/utils.js.map +1 -1
  198. package/build/components/spacing-sizes-control/utils.js +2 -8
  199. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  200. package/build/components/tool-selector/index.js +3 -1
  201. package/build/components/tool-selector/index.js.map +1 -1
  202. package/build/components/url-input/button.js +1 -0
  203. package/build/components/url-input/button.js.map +1 -1
  204. package/build/components/url-input/index.js +15 -1
  205. package/build/components/url-input/index.js.map +1 -1
  206. package/build/components/url-popover/image-url-input-ui.js +7 -8
  207. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  208. package/build/components/url-popover/link-editor.js +1 -0
  209. package/build/components/url-popover/link-editor.js.map +1 -1
  210. package/build/components/use-block-display-information/index.js +1 -1
  211. package/build/components/use-block-display-information/index.js.map +1 -1
  212. package/build/components/use-paste-styles/index.js +188 -0
  213. package/build/components/use-paste-styles/index.js.map +1 -0
  214. package/build/components/writing-flow/use-arrow-nav.js +22 -29
  215. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  216. package/build/experiments.js +45 -0
  217. package/build/experiments.js.map +1 -0
  218. package/build/experiments.native.js +40 -0
  219. package/build/experiments.native.js.map +1 -0
  220. package/build/hooks/anchor.js +2 -1
  221. package/build/hooks/anchor.js.map +1 -1
  222. package/build/hooks/border.js +1 -1
  223. package/build/hooks/border.js.map +1 -1
  224. package/build/hooks/child-layout.js +5 -1
  225. package/build/hooks/child-layout.js.map +1 -1
  226. package/build/hooks/color-panel.js +1 -1
  227. package/build/hooks/color-panel.js.map +1 -1
  228. package/build/hooks/color.js +3 -3
  229. package/build/hooks/color.js.map +1 -1
  230. package/build/hooks/custom-class-name.js +2 -1
  231. package/build/hooks/custom-class-name.js.map +1 -1
  232. package/build/hooks/dimensions.js +7 -5
  233. package/build/hooks/dimensions.js.map +1 -1
  234. package/build/hooks/index.js +2 -0
  235. package/build/hooks/index.js.map +1 -1
  236. package/build/hooks/margin.js +1 -0
  237. package/build/hooks/margin.js.map +1 -1
  238. package/build/hooks/metadata.js +1 -1
  239. package/build/hooks/metadata.js.map +1 -1
  240. package/build/hooks/padding.js +1 -0
  241. package/build/hooks/padding.js.map +1 -1
  242. package/build/hooks/position.js +395 -0
  243. package/build/hooks/position.js.map +1 -0
  244. package/build/hooks/supports.js +328 -0
  245. package/build/hooks/supports.js.map +1 -0
  246. package/build/hooks/typography.js +1 -1
  247. package/build/hooks/typography.js.map +1 -1
  248. package/build/hooks/use-color-props.js +3 -3
  249. package/build/hooks/use-color-props.js.map +1 -1
  250. package/build/hooks/utils.js +69 -3
  251. package/build/hooks/utils.js.map +1 -1
  252. package/build/index.js +10 -1
  253. package/build/index.js.map +1 -1
  254. package/build/layouts/constrained.js +3 -0
  255. package/build/layouts/constrained.js.map +1 -1
  256. package/build/layouts/flex.js +59 -9
  257. package/build/layouts/flex.js.map +1 -1
  258. package/build/layouts/flow.js +0 -18
  259. package/build/layouts/flow.js.map +1 -1
  260. package/build/store/actions.js +3 -30
  261. package/build/store/actions.js.map +1 -1
  262. package/build/store/defaults.js +5 -2
  263. package/build/store/defaults.js.map +1 -1
  264. package/build/store/index.js +11 -2
  265. package/build/store/index.js.map +1 -1
  266. package/build/store/private-actions.js +78 -0
  267. package/build/store/private-actions.js.map +1 -0
  268. package/build/store/private-selectors.js +18 -0
  269. package/build/store/private-selectors.js.map +1 -0
  270. package/build/store/reducer.js +7 -3
  271. package/build/store/reducer.js.map +1 -1
  272. package/build/store/selectors.js +68 -40
  273. package/build/store/selectors.js.map +1 -1
  274. package/build/utils/block-variation-transforms.js +1 -1
  275. package/build/utils/block-variation-transforms.js.map +1 -1
  276. package/build/utils/parse-css-unit-to-px.js +1 -1
  277. package/build/utils/parse-css-unit-to-px.js.map +1 -1
  278. package/build/utils/transform-styles/index.js +1 -7
  279. package/build/utils/transform-styles/index.js.map +1 -1
  280. package/build-module/components/alignment-control/ui.js +1 -1
  281. package/build-module/components/alignment-control/ui.js.map +1 -1
  282. package/build-module/components/autocomplete/index.js +2 -6
  283. package/build-module/components/autocomplete/index.js.map +1 -1
  284. package/build-module/components/block-actions/index.js +6 -0
  285. package/build-module/components/block-actions/index.js.map +1 -1
  286. package/build-module/components/block-alignment-matrix-control/index.js +2 -2
  287. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  288. package/build-module/components/block-card/index.js +2 -4
  289. package/build-module/components/block-card/index.js.map +1 -1
  290. package/build-module/components/block-edit/index.js +7 -0
  291. package/build-module/components/block-edit/index.js.map +1 -1
  292. package/build-module/components/block-inspector/index.js +17 -15
  293. package/build-module/components/block-inspector/index.js.map +1 -1
  294. package/build-module/components/block-list/use-in-between-inserter.js +5 -0
  295. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  296. package/build-module/components/block-lock/modal.js +0 -1
  297. package/build-module/components/block-lock/modal.js.map +1 -1
  298. package/build-module/components/block-mover/mover-description.js +2 -2
  299. package/build-module/components/block-mover/mover-description.js.map +1 -1
  300. package/build-module/components/block-navigation/dropdown.js +3 -1
  301. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  302. package/build-module/components/block-pattern-setup/index.js +1 -1
  303. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  304. package/build-module/components/block-pattern-setup/use-patterns-setup.js +2 -2
  305. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  306. package/build-module/components/block-patterns-list/index.js +32 -3
  307. package/build-module/components/block-patterns-list/index.js.map +1 -1
  308. package/build-module/components/block-preview/auto.js +9 -14
  309. package/build-module/components/block-preview/auto.js.map +1 -1
  310. package/build-module/components/block-preview/index.js +31 -8
  311. package/build-module/components/block-preview/index.js.map +1 -1
  312. package/build-module/components/block-selection-clearer/index.js +1 -1
  313. package/build-module/components/block-selection-clearer/index.js.map +1 -1
  314. package/build-module/components/block-settings/container.native.js +6 -30
  315. package/build-module/components/block-settings/container.native.js.map +1 -1
  316. package/build-module/components/block-settings-menu/block-settings-dropdown.js +12 -3
  317. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  318. package/build-module/components/block-settings-menu-controls/index.js +2 -7
  319. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  320. package/build-module/components/block-styles/index.js +2 -1
  321. package/build-module/components/block-styles/index.js.map +1 -1
  322. package/build-module/components/block-switcher/utils.js +1 -1
  323. package/build-module/components/block-switcher/utils.js.map +1 -1
  324. package/build-module/components/block-tools/selected-block-popover.js +55 -48
  325. package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
  326. package/build-module/components/block-tools/use-block-toolbar-popover-props.js +42 -11
  327. package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  328. package/build-module/components/block-vertical-alignment-control/icons.js +12 -0
  329. package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
  330. package/build-module/components/block-vertical-alignment-control/ui.js +10 -5
  331. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  332. package/build-module/components/color-style-selector/index.js +3 -1
  333. package/build-module/components/color-style-selector/index.js.map +1 -1
  334. package/build-module/components/date-format-picker/index.js +4 -5
  335. package/build-module/components/date-format-picker/index.js.map +1 -1
  336. package/build-module/components/default-style-picker/index.js +1 -0
  337. package/build-module/components/default-style-picker/index.js.map +1 -1
  338. package/build-module/components/font-family/index.js +1 -6
  339. package/build-module/components/font-family/index.js.map +1 -1
  340. package/build-module/components/font-sizes/fluid-utils.js +1 -1
  341. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  342. package/build-module/components/font-sizes/utils.js +1 -1
  343. package/build-module/components/font-sizes/utils.js.map +1 -1
  344. package/build-module/components/font-sizes/with-font-sizes.js +5 -7
  345. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  346. package/build-module/components/global-styles/context.js +12 -0
  347. package/build-module/components/global-styles/context.js.map +1 -0
  348. package/build-module/components/global-styles/hooks.js +121 -0
  349. package/build-module/components/global-styles/hooks.js.map +1 -0
  350. package/build-module/components/global-styles/index.js +4 -0
  351. package/build-module/components/global-styles/index.js.map +1 -0
  352. package/build-module/components/global-styles/typography-utils.js +84 -0
  353. package/build-module/components/global-styles/typography-utils.js.map +1 -0
  354. package/build-module/components/global-styles/use-global-styles-output.js +930 -0
  355. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -0
  356. package/build-module/components/global-styles/utils.js +321 -0
  357. package/build-module/components/global-styles/utils.js.map +1 -0
  358. package/build-module/components/height-control/index.js +14 -1
  359. package/build-module/components/height-control/index.js.map +1 -1
  360. package/build-module/components/iframe/index.js +36 -9
  361. package/build-module/components/iframe/index.js.map +1 -1
  362. package/build-module/components/iframe/use-compatibility-styles.js +6 -1
  363. package/build-module/components/iframe/use-compatibility-styles.js.map +1 -1
  364. package/build-module/components/image-editor/constants.js +1 -1
  365. package/build-module/components/image-editor/constants.js.map +1 -1
  366. package/build-module/components/image-editor/context.js +1 -2
  367. package/build-module/components/image-editor/context.js.map +1 -1
  368. package/build-module/components/image-editor/cropper.js +3 -1
  369. package/build-module/components/image-editor/cropper.js.map +1 -1
  370. package/build-module/components/image-editor/index.js +13 -3
  371. package/build-module/components/image-editor/index.js.map +1 -1
  372. package/build-module/components/image-editor/use-transform-image.js +12 -37
  373. package/build-module/components/image-editor/use-transform-image.js.map +1 -1
  374. package/build-module/components/image-size-control/index.js +2 -6
  375. package/build-module/components/image-size-control/index.js.map +1 -1
  376. package/build-module/components/index.js +2 -3
  377. package/build-module/components/index.js.map +1 -1
  378. package/build-module/components/inner-blocks/index.js +21 -32
  379. package/build-module/components/inner-blocks/index.js.map +1 -1
  380. package/build-module/components/inner-blocks/index.native.js +9 -22
  381. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  382. package/build-module/components/inner-blocks/use-block-context.js +43 -0
  383. package/build-module/components/inner-blocks/use-block-context.js.map +1 -0
  384. package/build-module/components/inserter/block-patterns-explorer/explorer.js +0 -1
  385. package/build-module/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  386. package/build-module/components/inserter/block-patterns-tab.js +11 -5
  387. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  388. package/build-module/components/inserter/block-types-tab.js +3 -3
  389. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  390. package/build-module/components/inserter/hooks/use-patterns-state.js +1 -6
  391. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  392. package/build-module/components/inserter/index.js +8 -6
  393. package/build-module/components/inserter/index.js.map +1 -1
  394. package/build-module/components/inserter/media-tab/hooks.js +145 -56
  395. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  396. package/build-module/components/inserter/media-tab/media-list.js +74 -24
  397. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  398. package/build-module/components/inserter/media-tab/media-panel.js +14 -14
  399. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  400. package/build-module/components/inserter/media-tab/media-tab.js +7 -4
  401. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  402. package/build-module/components/inserter/media-tab/utils.js +27 -15
  403. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  404. package/build-module/components/inserter/menu.js +12 -5
  405. package/build-module/components/inserter/menu.js.map +1 -1
  406. package/build-module/components/inserter/preview-panel.js +5 -3
  407. package/build-module/components/inserter/preview-panel.js.map +1 -1
  408. package/build-module/components/inserter/search-results.js +2 -6
  409. package/build-module/components/inserter/search-results.js.map +1 -1
  410. package/build-module/components/inserter-list-item/index.js +1 -9
  411. package/build-module/components/inserter-list-item/index.js.map +1 -1
  412. package/build-module/components/inspector-controls/fill.js +14 -2
  413. package/build-module/components/inspector-controls/fill.js.map +1 -1
  414. package/build-module/components/inspector-controls/fill.native.js +13 -1
  415. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  416. package/build-module/components/inspector-controls/groups.js +7 -1
  417. package/build-module/components/inspector-controls/groups.js.map +1 -1
  418. package/build-module/components/inspector-controls/index.js +2 -2
  419. package/build-module/components/inspector-controls/index.js.map +1 -1
  420. package/build-module/components/inspector-controls/slot.js +13 -1
  421. package/build-module/components/inspector-controls/slot.js.map +1 -1
  422. package/build-module/components/inspector-controls/slot.native.js +13 -1
  423. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  424. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  425. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  426. package/build-module/components/inspector-controls-tabs/index.js +2 -2
  427. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  428. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +33 -0
  429. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -0
  430. package/build-module/components/inspector-controls-tabs/settings-tab.js +2 -1
  431. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  432. package/build-module/components/inspector-controls-tabs/styles-tab.js +6 -4
  433. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  434. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +20 -22
  435. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  436. package/build-module/components/justify-content-control/ui.js +9 -2
  437. package/build-module/components/justify-content-control/ui.js.map +1 -1
  438. package/build-module/components/link-control/index.js +45 -16
  439. package/build-module/components/link-control/index.js.map +1 -1
  440. package/build-module/components/link-control/search-input.js +1 -0
  441. package/build-module/components/link-control/search-input.js.map +1 -1
  442. package/build-module/components/list-view/block.js +1 -1
  443. package/build-module/components/list-view/block.js.map +1 -1
  444. package/build-module/components/list-view/use-list-view-drop-zone.js +1 -1
  445. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  446. package/build-module/components/media-upload/index.native.js +4 -1
  447. package/build-module/components/media-upload/index.native.js.map +1 -1
  448. package/build-module/components/off-canvas-editor/appender.js +46 -36
  449. package/build-module/components/off-canvas-editor/appender.js.map +1 -1
  450. package/build-module/components/off-canvas-editor/block-contents.js +37 -7
  451. package/build-module/components/off-canvas-editor/block-contents.js.map +1 -1
  452. package/build-module/components/off-canvas-editor/block-select-button.js +9 -4
  453. package/build-module/components/off-canvas-editor/block-select-button.js.map +1 -1
  454. package/build-module/components/off-canvas-editor/block.js +15 -52
  455. package/build-module/components/off-canvas-editor/block.js.map +1 -1
  456. package/build-module/components/off-canvas-editor/branch.js +23 -11
  457. package/build-module/components/off-canvas-editor/branch.js.map +1 -1
  458. package/build-module/components/off-canvas-editor/index.js +15 -16
  459. package/build-module/components/off-canvas-editor/index.js.map +1 -1
  460. package/build-module/components/off-canvas-editor/link-ui.js +2 -2
  461. package/build-module/components/off-canvas-editor/link-ui.js.map +1 -1
  462. package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js +1 -1
  463. package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js.map +1 -1
  464. package/build-module/components/provider/index.js +17 -8
  465. package/build-module/components/provider/index.js.map +1 -1
  466. package/build-module/components/provider/index.native.js +4 -4
  467. package/build-module/components/provider/index.native.js.map +1 -1
  468. package/build-module/components/rich-text/use-before-input-rules.js +10 -2
  469. package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
  470. package/build-module/components/rich-text/use-enter.js +4 -5
  471. package/build-module/components/rich-text/use-enter.js.map +1 -1
  472. package/build-module/components/rich-text/utils.js +1 -1
  473. package/build-module/components/rich-text/utils.js.map +1 -1
  474. package/build-module/components/spacing-sizes-control/utils.js +2 -7
  475. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  476. package/build-module/components/tool-selector/index.js +3 -1
  477. package/build-module/components/tool-selector/index.js.map +1 -1
  478. package/build-module/components/url-input/button.js +1 -0
  479. package/build-module/components/url-input/button.js.map +1 -1
  480. package/build-module/components/url-input/index.js +14 -1
  481. package/build-module/components/url-input/index.js.map +1 -1
  482. package/build-module/components/url-popover/image-url-input-ui.js +8 -8
  483. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  484. package/build-module/components/url-popover/link-editor.js +1 -0
  485. package/build-module/components/url-popover/link-editor.js.map +1 -1
  486. package/build-module/components/use-block-display-information/index.js +1 -1
  487. package/build-module/components/use-block-display-information/index.js.map +1 -1
  488. package/build-module/components/use-paste-styles/index.js +174 -0
  489. package/build-module/components/use-paste-styles/index.js.map +1 -0
  490. package/build-module/components/writing-flow/use-arrow-nav.js +22 -29
  491. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  492. package/build-module/experiments.js +25 -0
  493. package/build-module/experiments.js.map +1 -0
  494. package/build-module/experiments.native.js +23 -0
  495. package/build-module/experiments.native.js.map +1 -0
  496. package/build-module/hooks/anchor.js +2 -1
  497. package/build-module/hooks/anchor.js.map +1 -1
  498. package/build-module/hooks/border.js +1 -1
  499. package/build-module/hooks/border.js.map +1 -1
  500. package/build-module/hooks/child-layout.js +5 -1
  501. package/build-module/hooks/child-layout.js.map +1 -1
  502. package/build-module/hooks/color-panel.js +1 -1
  503. package/build-module/hooks/color-panel.js.map +1 -1
  504. package/build-module/hooks/color.js +3 -3
  505. package/build-module/hooks/color.js.map +1 -1
  506. package/build-module/hooks/custom-class-name.js +2 -1
  507. package/build-module/hooks/custom-class-name.js.map +1 -1
  508. package/build-module/hooks/dimensions.js +6 -5
  509. package/build-module/hooks/dimensions.js.map +1 -1
  510. package/build-module/hooks/index.js +1 -0
  511. package/build-module/hooks/index.js.map +1 -1
  512. package/build-module/hooks/margin.js +1 -0
  513. package/build-module/hooks/margin.js.map +1 -1
  514. package/build-module/hooks/metadata.js +1 -1
  515. package/build-module/hooks/metadata.js.map +1 -1
  516. package/build-module/hooks/padding.js +1 -0
  517. package/build-module/hooks/padding.js.map +1 -1
  518. package/build-module/hooks/position.js +354 -0
  519. package/build-module/hooks/position.js.map +1 -0
  520. package/build-module/hooks/supports.js +257 -0
  521. package/build-module/hooks/supports.js.map +1 -0
  522. package/build-module/hooks/typography.js +1 -1
  523. package/build-module/hooks/typography.js.map +1 -1
  524. package/build-module/hooks/use-color-props.js +3 -3
  525. package/build-module/hooks/use-color-props.js.map +1 -1
  526. package/build-module/hooks/utils.js +70 -4
  527. package/build-module/hooks/utils.js.map +1 -1
  528. package/build-module/index.js +1 -0
  529. package/build-module/index.js.map +1 -1
  530. package/build-module/layouts/constrained.js +3 -0
  531. package/build-module/layouts/constrained.js.map +1 -1
  532. package/build-module/layouts/flex.js +60 -10
  533. package/build-module/layouts/flex.js.map +1 -1
  534. package/build-module/layouts/flow.js +0 -18
  535. package/build-module/layouts/flow.js.map +1 -1
  536. package/build-module/store/actions.js +2 -26
  537. package/build-module/store/actions.js.map +1 -1
  538. package/build-module/store/defaults.js +5 -2
  539. package/build-module/store/defaults.js.map +1 -1
  540. package/build-module/store/index.js +8 -2
  541. package/build-module/store/index.js.map +1 -1
  542. package/build-module/store/private-actions.js +66 -0
  543. package/build-module/store/private-actions.js.map +1 -0
  544. package/build-module/store/private-selectors.js +11 -0
  545. package/build-module/store/private-selectors.js.map +1 -0
  546. package/build-module/store/reducer.js +7 -3
  547. package/build-module/store/reducer.js.map +1 -1
  548. package/build-module/store/selectors.js +55 -30
  549. package/build-module/store/selectors.js.map +1 -1
  550. package/build-module/utils/block-variation-transforms.js +1 -1
  551. package/build-module/utils/block-variation-transforms.js.map +1 -1
  552. package/build-module/utils/parse-css-unit-to-px.js +1 -1
  553. package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
  554. package/build-module/utils/transform-styles/index.js +1 -6
  555. package/build-module/utils/transform-styles/index.js.map +1 -1
  556. package/build-style/content-rtl.css +340 -3
  557. package/build-style/content.css +340 -3
  558. package/build-style/style-rtl.css +125 -272
  559. package/build-style/style.css +125 -272
  560. package/package.json +30 -29
  561. package/src/components/alignment-control/test/__snapshots__/index.js.snap +3 -3
  562. package/src/components/alignment-control/test/index.js +5 -15
  563. package/src/components/alignment-control/ui.js +1 -1
  564. package/src/components/autocomplete/index.js +3 -6
  565. package/src/components/block-actions/index.js +5 -0
  566. package/src/components/block-alignment-control/test/index.js +3 -11
  567. package/src/components/block-alignment-matrix-control/index.js +1 -2
  568. package/src/components/block-card/index.js +1 -4
  569. package/src/components/block-content-overlay/content.scss +4 -4
  570. package/src/components/block-edit/index.js +15 -1
  571. package/src/components/block-icon/content.scss +31 -0
  572. package/src/components/block-inspector/index.js +15 -17
  573. package/src/components/block-list/use-in-between-inserter.js +5 -0
  574. package/src/components/block-lock/modal.js +0 -1
  575. package/src/components/block-mover/mover-description.js +2 -2
  576. package/src/components/block-mover/stories/index.js +3 -3
  577. package/src/components/block-navigation/dropdown.js +1 -1
  578. package/src/components/block-pattern-setup/index.js +1 -4
  579. package/src/components/block-pattern-setup/use-patterns-setup.js +2 -5
  580. package/src/components/block-patterns-list/index.js +29 -3
  581. package/src/components/block-preview/README.md +9 -9
  582. package/src/components/block-preview/auto.js +10 -14
  583. package/src/components/block-preview/content.scss +23 -0
  584. package/src/components/block-preview/index.js +40 -10
  585. package/src/components/block-preview/style.scss +0 -23
  586. package/src/components/block-selection-clearer/index.js +1 -1
  587. package/src/components/block-selection-clearer/test/index.js +6 -6
  588. package/src/components/block-settings/container.native.js +7 -26
  589. package/src/components/block-settings-menu/block-settings-dropdown.js +14 -2
  590. package/src/components/block-settings-menu-controls/index.js +2 -10
  591. package/src/components/block-styles/index.js +4 -1
  592. package/src/components/block-switcher/test/index.js +43 -44
  593. package/src/components/block-switcher/utils.js +1 -1
  594. package/src/components/block-tools/selected-block-popover.js +77 -80
  595. package/src/components/block-tools/style.scss +0 -1
  596. package/src/components/block-tools/use-block-toolbar-popover-props.js +68 -12
  597. package/src/components/block-variation-picker/{style.scss → content.scss} +0 -0
  598. package/src/components/block-vertical-alignment-control/icons.js +12 -0
  599. package/src/components/block-vertical-alignment-control/test/index.js +3 -11
  600. package/src/components/block-vertical-alignment-control/ui.js +16 -6
  601. package/src/components/button-block-appender/{style.scss → content.scss} +0 -0
  602. package/src/components/color-style-selector/index.js +1 -1
  603. package/src/components/colors/test/with-colors.js +2 -8
  604. package/src/components/date-format-picker/index.js +23 -24
  605. package/src/components/date-format-picker/style.scss +0 -6
  606. package/src/components/default-block-appender/content.scss +18 -0
  607. package/src/components/default-block-appender/test/index.js +2 -8
  608. package/src/components/default-style-picker/index.js +1 -0
  609. package/src/components/font-family/index.js +1 -6
  610. package/src/components/font-sizes/fluid-utils.js +1 -1
  611. package/src/components/font-sizes/utils.js +1 -1
  612. package/src/components/font-sizes/with-font-sizes.js +33 -33
  613. package/src/components/global-styles/README.md +77 -0
  614. package/src/components/global-styles/context.js +15 -0
  615. package/src/components/global-styles/hooks.js +145 -0
  616. package/src/components/global-styles/index.js +7 -0
  617. package/src/components/global-styles/test/typography-utils.js +393 -0
  618. package/src/components/global-styles/test/use-global-styles-output.js +814 -0
  619. package/src/components/global-styles/test/utils.js +206 -0
  620. package/src/components/global-styles/typography-utils.js +87 -0
  621. package/src/components/global-styles/use-global-styles-output.js +1088 -0
  622. package/src/components/global-styles/utils.js +373 -0
  623. package/src/components/height-control/README.md +55 -0
  624. package/src/components/height-control/index.js +13 -1
  625. package/src/components/iframe/index.js +52 -19
  626. package/src/components/iframe/use-compatibility-styles.js +6 -0
  627. package/src/components/image-editor/constants.js +1 -1
  628. package/src/components/image-editor/context.js +5 -9
  629. package/src/components/image-editor/cropper.js +3 -1
  630. package/src/components/image-editor/index.js +13 -4
  631. package/src/components/image-editor/use-transform-image.js +14 -55
  632. package/src/components/image-size-control/index.js +2 -6
  633. package/src/components/index.js +2 -6
  634. package/src/components/inner-blocks/index.js +29 -33
  635. package/src/components/inner-blocks/index.native.js +27 -47
  636. package/src/components/inner-blocks/use-block-context.js +47 -0
  637. package/src/components/inserter/block-patterns-explorer/explorer.js +0 -1
  638. package/src/components/inserter/block-patterns-tab.js +14 -4
  639. package/src/components/inserter/block-types-tab.js +3 -4
  640. package/src/components/inserter/hooks/use-patterns-state.js +1 -6
  641. package/src/components/inserter/index.js +46 -42
  642. package/src/components/inserter/media-tab/hooks.js +167 -65
  643. package/src/components/inserter/media-tab/media-list.js +94 -26
  644. package/src/components/inserter/media-tab/media-panel.js +9 -20
  645. package/src/components/inserter/media-tab/media-tab.js +12 -4
  646. package/src/components/inserter/media-tab/utils.js +20 -10
  647. package/src/components/inserter/menu.js +9 -4
  648. package/src/components/inserter/preview-panel.js +4 -2
  649. package/src/components/inserter/search-results.js +2 -6
  650. package/src/components/inserter/stories/index.js +9 -9
  651. package/src/components/inserter/style.scss +58 -11
  652. package/src/components/inserter/test/__snapshots__/index.native.js.snap +117 -0
  653. package/src/components/inserter/test/index.native.js +255 -1
  654. package/src/components/inserter-list-item/index.js +0 -7
  655. package/src/components/inspector-controls/README.md +3 -7
  656. package/src/components/inspector-controls/fill.js +15 -1
  657. package/src/components/inspector-controls/fill.native.js +14 -1
  658. package/src/components/inspector-controls/groups.js +5 -0
  659. package/src/components/inspector-controls/index.js +2 -6
  660. package/src/components/inspector-controls/slot.js +14 -1
  661. package/src/components/inspector-controls/slot.native.js +14 -1
  662. package/src/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  663. package/src/components/inspector-controls-tabs/index.js +2 -4
  664. package/src/components/inspector-controls-tabs/position-controls-panel.js +37 -0
  665. package/src/components/inspector-controls-tabs/settings-tab.js +2 -0
  666. package/src/components/inspector-controls-tabs/style.scss +15 -0
  667. package/src/components/inspector-controls-tabs/styles-tab.js +5 -7
  668. package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +24 -18
  669. package/src/components/justify-content-control/ui.js +9 -0
  670. package/src/components/link-control/index.js +59 -23
  671. package/src/components/link-control/search-input.js +1 -0
  672. package/src/components/link-control/style.scss +8 -24
  673. package/src/components/link-control/test/index.js +134 -5
  674. package/src/components/list-view/block.js +1 -1
  675. package/src/components/list-view/style.scss +13 -3
  676. package/src/components/list-view/use-list-view-drop-zone.js +1 -1
  677. package/src/components/media-replace-flow/test/index.js +4 -12
  678. package/src/components/media-upload/index.native.js +2 -2
  679. package/src/components/off-canvas-editor/README.md +2 -2
  680. package/src/components/off-canvas-editor/appender.js +82 -76
  681. package/src/components/off-canvas-editor/block-contents.js +84 -23
  682. package/src/components/off-canvas-editor/block-select-button.js +12 -1
  683. package/src/components/off-canvas-editor/block.js +31 -102
  684. package/src/components/off-canvas-editor/branch.js +32 -5
  685. package/src/components/off-canvas-editor/index.js +19 -24
  686. package/src/components/off-canvas-editor/link-ui.js +2 -2
  687. package/src/components/off-canvas-editor/style.scss +5 -1
  688. package/src/components/off-canvas-editor/use-list-view-drop-zone.js +1 -1
  689. package/src/components/provider/index.js +33 -11
  690. package/src/components/provider/index.native.js +4 -3
  691. package/src/components/provider/test/experimental-provider.js +94 -0
  692. package/src/components/provider/test/use-block-sync.js +10 -0
  693. package/src/components/responsive-block-control/test/index.js +1 -5
  694. package/src/components/rich-text/use-before-input-rules.js +10 -2
  695. package/src/components/rich-text/use-enter.js +4 -4
  696. package/src/components/rich-text/utils.js +1 -1
  697. package/src/components/spacing-sizes-control/utils.js +2 -7
  698. package/src/components/tool-selector/index.js +1 -1
  699. package/src/components/url-input/README.md +5 -0
  700. package/src/components/url-input/button.js +1 -0
  701. package/src/components/url-input/index.js +15 -1
  702. package/src/components/url-input/test/button.js +24 -24
  703. package/src/components/url-popover/image-url-input-ui.js +7 -8
  704. package/src/components/url-popover/link-editor.js +1 -0
  705. package/src/components/url-popover/style.scss +0 -10
  706. package/src/components/use-block-display-information/index.js +1 -1
  707. package/src/components/use-paste-styles/index.js +230 -0
  708. package/src/components/warning/{style.scss → content.scss} +0 -0
  709. package/src/components/warning/test/index.js +1 -5
  710. package/src/components/writing-flow/use-arrow-nav.js +20 -28
  711. package/src/content.scss +8 -0
  712. package/src/experiments.js +27 -0
  713. package/src/experiments.native.js +25 -0
  714. package/src/hooks/anchor.js +2 -1
  715. package/src/hooks/border.js +1 -1
  716. package/src/hooks/child-layout.js +6 -1
  717. package/src/hooks/color-panel.js +1 -1
  718. package/src/hooks/color.js +3 -3
  719. package/src/hooks/custom-class-name.js +2 -1
  720. package/src/hooks/dimensions.js +6 -6
  721. package/src/hooks/index.js +1 -0
  722. package/src/hooks/layout.scss +4 -0
  723. package/src/hooks/margin.js +1 -0
  724. package/src/hooks/metadata.js +1 -2
  725. package/src/hooks/padding.js +1 -0
  726. package/src/hooks/position.js +391 -0
  727. package/src/hooks/position.scss +18 -0
  728. package/src/hooks/supports.js +302 -0
  729. package/src/hooks/test/__snapshots__/align.native.js.snap +73 -0
  730. package/src/hooks/test/align.native.js +133 -0
  731. package/src/hooks/test/utils.js +104 -0
  732. package/src/hooks/typography.js +1 -1
  733. package/src/hooks/use-color-props.js +3 -3
  734. package/src/hooks/utils.js +68 -2
  735. package/src/index.js +1 -0
  736. package/src/layouts/constrained.js +3 -0
  737. package/src/layouts/flex.js +66 -14
  738. package/src/layouts/flow.js +0 -9
  739. package/src/store/actions.js +2 -26
  740. package/src/store/defaults.js +7 -2
  741. package/src/store/index.js +8 -2
  742. package/src/store/private-actions.js +65 -0
  743. package/src/store/private-selectors.js +10 -0
  744. package/src/store/reducer.js +8 -3
  745. package/src/store/selectors.js +108 -57
  746. package/src/store/test/actions.js +0 -18
  747. package/src/store/test/private-actions.js +22 -0
  748. package/src/store/test/private-selectors.js +24 -0
  749. package/src/store/test/reducer.js +45 -3
  750. package/src/store/test/selectors.js +64 -39
  751. package/src/style.scss +5 -6
  752. package/src/utils/block-variation-transforms.js +1 -1
  753. package/src/utils/parse-css-unit-to-px.js +3 -1
  754. package/src/utils/test/parse-css-unit-to-px.js +16 -24
  755. package/src/utils/transform-styles/index.js +1 -6
  756. package/build/components/inner-blocks/get-block-context.js +0 -45
  757. package/build/components/inner-blocks/get-block-context.js.map +0 -1
  758. package/build/components/off-canvas-editor/block-edit-button.js +0 -50
  759. package/build/components/off-canvas-editor/block-edit-button.js.map +0 -1
  760. package/build-module/components/inner-blocks/get-block-context.js +0 -37
  761. package/build-module/components/inner-blocks/get-block-context.js.map +0 -1
  762. package/build-module/components/off-canvas-editor/block-edit-button.js +0 -35
  763. package/build-module/components/off-canvas-editor/block-edit-button.js.map +0 -1
  764. package/src/components/inner-blocks/get-block-context.js +0 -39
  765. package/src/components/off-canvas-editor/block-edit-button.js +0 -27
@@ -0,0 +1,974 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getBlockSelectors = void 0;
7
+ exports.getLayoutStyles = getLayoutStyles;
8
+ exports.getNodesWithStyles = exports.getNodesWithSettings = void 0;
9
+ exports.getStylesDeclarations = getStylesDeclarations;
10
+ exports.toStyles = exports.toCustomProperties = void 0;
11
+ exports.toSvgFilters = toSvgFilters;
12
+ exports.useGlobalStylesOutput = useGlobalStylesOutput;
13
+
14
+ var _element = require("@wordpress/element");
15
+
16
+ var _lodash = require("lodash");
17
+
18
+ var _blocks = require("@wordpress/blocks");
19
+
20
+ var _data = require("@wordpress/data");
21
+
22
+ var _styleEngine = require("@wordpress/style-engine");
23
+
24
+ var _utils = require("./utils");
25
+
26
+ var _typographyUtils = require("./typography-utils");
27
+
28
+ var _context = require("./context");
29
+
30
+ var _hooks = require("./hooks");
31
+
32
+ var _components = require("../duotone/components");
33
+
34
+ var _gap = require("../../hooks/gap");
35
+
36
+ var _store = require("../../store");
37
+
38
+ /**
39
+ * External dependencies
40
+ */
41
+
42
+ /**
43
+ * WordPress dependencies
44
+ */
45
+
46
+ /**
47
+ * Internal dependencies
48
+ */
49
+ // List of block support features that can have their related styles
50
+ // generated under their own feature level selector rather than the block's.
51
+ const BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS = {
52
+ __experimentalBorder: 'border',
53
+ color: 'color',
54
+ spacing: 'spacing',
55
+ typography: 'typography'
56
+ };
57
+
58
+ function compileStyleValue(uncompiledValue) {
59
+ var _uncompiledValue$star;
60
+
61
+ const VARIABLE_REFERENCE_PREFIX = 'var:';
62
+ const VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|';
63
+ const VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--';
64
+
65
+ if (uncompiledValue !== null && uncompiledValue !== void 0 && (_uncompiledValue$star = uncompiledValue.startsWith) !== null && _uncompiledValue$star !== void 0 && _uncompiledValue$star.call(uncompiledValue, VARIABLE_REFERENCE_PREFIX)) {
66
+ const variable = uncompiledValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE);
67
+ return `var(--wp--${variable})`;
68
+ }
69
+
70
+ return uncompiledValue;
71
+ }
72
+ /**
73
+ * Transform given preset tree into a set of style declarations.
74
+ *
75
+ * @param {Object} blockPresets
76
+ * @param {Object} mergedSettings Merged theme.json settings.
77
+ *
78
+ * @return {Array<Object>} An array of style declarations.
79
+ */
80
+
81
+
82
+ function getPresetsDeclarations() {
83
+ let blockPresets = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
84
+ let mergedSettings = arguments.length > 1 ? arguments[1] : undefined;
85
+ return _utils.PRESET_METADATA.reduce((declarations, _ref) => {
86
+ let {
87
+ path,
88
+ valueKey,
89
+ valueFunc,
90
+ cssVarInfix
91
+ } = _ref;
92
+ const presetByOrigin = (0, _lodash.get)(blockPresets, path, []);
93
+ ['default', 'theme', 'custom'].forEach(origin => {
94
+ if (presetByOrigin[origin]) {
95
+ presetByOrigin[origin].forEach(value => {
96
+ if (valueKey && !valueFunc) {
97
+ declarations.push(`--wp--preset--${cssVarInfix}--${(0, _lodash.kebabCase)(value.slug)}: ${value[valueKey]}`);
98
+ } else if (valueFunc && typeof valueFunc === 'function') {
99
+ declarations.push(`--wp--preset--${cssVarInfix}--${(0, _lodash.kebabCase)(value.slug)}: ${valueFunc(value, mergedSettings)}`);
100
+ }
101
+ });
102
+ }
103
+ });
104
+ return declarations;
105
+ }, []);
106
+ }
107
+ /**
108
+ * Transform given preset tree into a set of preset class declarations.
109
+ *
110
+ * @param {string} blockSelector
111
+ * @param {Object} blockPresets
112
+ * @return {string} CSS declarations for the preset classes.
113
+ */
114
+
115
+
116
+ function getPresetsClasses(blockSelector) {
117
+ let blockPresets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
118
+ return _utils.PRESET_METADATA.reduce((declarations, _ref2) => {
119
+ let {
120
+ path,
121
+ cssVarInfix,
122
+ classes
123
+ } = _ref2;
124
+
125
+ if (!classes) {
126
+ return declarations;
127
+ }
128
+
129
+ const presetByOrigin = (0, _lodash.get)(blockPresets, path, []);
130
+ ['default', 'theme', 'custom'].forEach(origin => {
131
+ if (presetByOrigin[origin]) {
132
+ presetByOrigin[origin].forEach(_ref3 => {
133
+ let {
134
+ slug
135
+ } = _ref3;
136
+ classes.forEach(_ref4 => {
137
+ let {
138
+ classSuffix,
139
+ propertyName
140
+ } = _ref4;
141
+ const classSelectorToUse = `.has-${(0, _lodash.kebabCase)(slug)}-${classSuffix}`;
142
+ const selectorToUse = blockSelector.split(',') // Selector can be "h1, h2, h3"
143
+ .map(selector => `${selector}${classSelectorToUse}`).join(',');
144
+ const value = `var(--wp--preset--${cssVarInfix}--${(0, _lodash.kebabCase)(slug)})`;
145
+ declarations += `${selectorToUse}{${propertyName}: ${value} !important;}`;
146
+ });
147
+ });
148
+ }
149
+ });
150
+ return declarations;
151
+ }, '');
152
+ }
153
+
154
+ function getPresetsSvgFilters() {
155
+ let blockPresets = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
156
+ return _utils.PRESET_METADATA.filter( // Duotone are the only type of filters for now.
157
+ metadata => metadata.path.at(-1) === 'duotone').flatMap(metadata => {
158
+ const presetByOrigin = (0, _lodash.get)(blockPresets, metadata.path, {});
159
+ return ['default', 'theme'].filter(origin => presetByOrigin[origin]).flatMap(origin => presetByOrigin[origin].map(preset => (0, _element.createElement)(_components.PresetDuotoneFilter, {
160
+ preset: preset,
161
+ key: preset.slug
162
+ })));
163
+ });
164
+ }
165
+
166
+ function flattenTree() {
167
+ let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
168
+ let prefix = arguments.length > 1 ? arguments[1] : undefined;
169
+ let token = arguments.length > 2 ? arguments[2] : undefined;
170
+ let result = [];
171
+ Object.keys(input).forEach(key => {
172
+ const newKey = prefix + (0, _lodash.kebabCase)(key.replace('/', '-'));
173
+ const newLeaf = input[key];
174
+
175
+ if (newLeaf instanceof Object) {
176
+ const newPrefix = newKey + token;
177
+ result = [...result, ...flattenTree(newLeaf, newPrefix, token)];
178
+ } else {
179
+ result.push(`${newKey}: ${newLeaf}`);
180
+ }
181
+ });
182
+ return result;
183
+ }
184
+ /**
185
+ * Gets variation selector string from feature selector.
186
+ *
187
+ * @param {string} featureSelector The feature selector.
188
+ *
189
+ * @param {string} styleVariationSelector The style variation selector.
190
+ * @return {string} Combined selector string.
191
+ *
192
+ */
193
+
194
+
195
+ function concatFeatureVariationSelectorString(featureSelector, styleVariationSelector) {
196
+ const featureSelectors = featureSelector.split(',');
197
+ const combinedSelectors = [];
198
+ featureSelectors.forEach(selector => {
199
+ combinedSelectors.push(`${styleVariationSelector.trim()}${selector.trim()}`);
200
+ });
201
+ return combinedSelectors.join(', ');
202
+ }
203
+ /**
204
+ * Transform given style tree into a set of style declarations.
205
+ *
206
+ * @param {Object} blockStyles Block styles.
207
+ *
208
+ * @param {string} selector The selector these declarations should attach to.
209
+ *
210
+ * @param {boolean} useRootPaddingAlign Whether to use CSS custom properties in root selector.
211
+ *
212
+ * @param {Object} tree A theme.json tree containing layout definitions.
213
+ *
214
+ * @return {Array} An array of style declarations.
215
+ */
216
+
217
+
218
+ function getStylesDeclarations() {
219
+ let blockStyles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
220
+ let selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
221
+ let useRootPaddingAlign = arguments.length > 2 ? arguments[2] : undefined;
222
+ let tree = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
223
+ const isRoot = _utils.ROOT_BLOCK_SELECTOR === selector;
224
+ const output = Object.entries(_blocks.__EXPERIMENTAL_STYLE_PROPERTY).reduce((declarations, _ref5) => {
225
+ let [key, {
226
+ value,
227
+ properties,
228
+ useEngine,
229
+ rootOnly
230
+ }] = _ref5;
231
+
232
+ if (rootOnly && !isRoot) {
233
+ return declarations;
234
+ }
235
+
236
+ const pathToValue = value;
237
+
238
+ if (pathToValue[0] === 'elements' || useEngine) {
239
+ return declarations;
240
+ }
241
+
242
+ const styleValue = (0, _lodash.get)(blockStyles, pathToValue); // Root-level padding styles don't currently support strings with CSS shorthand values.
243
+ // This may change: https://github.com/WordPress/gutenberg/issues/40132.
244
+
245
+ if (key === '--wp--style--root--padding' && (typeof styleValue === 'string' || !useRootPaddingAlign)) {
246
+ return declarations;
247
+ }
248
+
249
+ if (!!properties && typeof styleValue !== 'string') {
250
+ Object.entries(properties).forEach(entry => {
251
+ const [name, prop] = entry;
252
+
253
+ if (!(0, _lodash.get)(styleValue, [prop], false)) {
254
+ // Do not create a declaration
255
+ // for sub-properties that don't have any value.
256
+ return;
257
+ }
258
+
259
+ const cssProperty = name.startsWith('--') ? name : (0, _lodash.kebabCase)(name);
260
+ declarations.push(`${cssProperty}: ${compileStyleValue((0, _lodash.get)(styleValue, [prop]))}`);
261
+ });
262
+ } else if ((0, _lodash.get)(blockStyles, pathToValue, false)) {
263
+ const cssProperty = key.startsWith('--') ? key : (0, _lodash.kebabCase)(key);
264
+ declarations.push(`${cssProperty}: ${compileStyleValue((0, _lodash.get)(blockStyles, pathToValue))}`);
265
+ }
266
+
267
+ return declarations;
268
+ }, []); // The goal is to move everything to server side generated engine styles
269
+ // This is temporary as we absorb more and more styles into the engine.
270
+
271
+ const extraRules = (0, _styleEngine.getCSSRules)(blockStyles);
272
+ extraRules.forEach(rule => {
273
+ var _ruleValue;
274
+
275
+ // Don't output padding properties if padding variables are set.
276
+ if (isRoot && useRootPaddingAlign && rule.key.startsWith('padding')) {
277
+ return;
278
+ }
279
+
280
+ const cssProperty = rule.key.startsWith('--') ? rule.key : (0, _lodash.kebabCase)(rule.key);
281
+ let ruleValue = rule.value;
282
+
283
+ if (typeof ruleValue !== 'string' && (_ruleValue = ruleValue) !== null && _ruleValue !== void 0 && _ruleValue.ref) {
284
+ var _ruleValue2;
285
+
286
+ const refPath = ruleValue.ref.split('.');
287
+ ruleValue = (0, _lodash.get)(tree, refPath); // Presence of another ref indicates a reference to another dynamic value.
288
+ // Pointing to another dynamic value is not supported.
289
+
290
+ if (!ruleValue || !!((_ruleValue2 = ruleValue) !== null && _ruleValue2 !== void 0 && _ruleValue2.ref)) {
291
+ return;
292
+ }
293
+ } // Calculate fluid typography rules where available.
294
+
295
+
296
+ if (cssProperty === 'font-size') {
297
+ var _tree$settings;
298
+
299
+ /*
300
+ * getTypographyFontSizeValue() will check
301
+ * if fluid typography has been activated and also
302
+ * whether the incoming value can be converted to a fluid value.
303
+ * Values that already have a "clamp()" function will not pass the test,
304
+ * and therefore the original $value will be returned.
305
+ */
306
+ ruleValue = (0, _typographyUtils.getTypographyFontSizeValue)({
307
+ size: ruleValue
308
+ }, tree === null || tree === void 0 ? void 0 : (_tree$settings = tree.settings) === null || _tree$settings === void 0 ? void 0 : _tree$settings.typography);
309
+ }
310
+
311
+ output.push(`${cssProperty}: ${ruleValue}`);
312
+ });
313
+ return output;
314
+ }
315
+ /**
316
+ * Get generated CSS for layout styles by looking up layout definitions provided
317
+ * in theme.json, and outputting common layout styles, and specific blockGap values.
318
+ *
319
+ * @param {Object} props
320
+ * @param {Object} props.tree A theme.json tree containing layout definitions.
321
+ * @param {Object} props.style A style object containing spacing values.
322
+ * @param {string} props.selector Selector used to group together layout styling rules.
323
+ * @param {boolean} props.hasBlockGapSupport Whether or not the theme opts-in to blockGap support.
324
+ * @param {boolean} props.hasFallbackGapSupport Whether or not the theme allows fallback gap styles.
325
+ * @param {?string} props.fallbackGapValue An optional fallback gap value if no real gap value is available.
326
+ * @return {string} Generated CSS rules for the layout styles.
327
+ */
328
+
329
+
330
+ function getLayoutStyles(_ref6) {
331
+ var _style$spacing, _tree$settings2, _tree$settings2$layou, _tree$settings3, _tree$settings3$layou;
332
+
333
+ let {
334
+ tree,
335
+ style,
336
+ selector,
337
+ hasBlockGapSupport,
338
+ hasFallbackGapSupport,
339
+ fallbackGapValue
340
+ } = _ref6;
341
+ let ruleset = '';
342
+ let gapValue = hasBlockGapSupport ? (0, _gap.getGapCSSValue)(style === null || style === void 0 ? void 0 : (_style$spacing = style.spacing) === null || _style$spacing === void 0 ? void 0 : _style$spacing.blockGap) : ''; // Ensure a fallback gap value for the root layout definitions,
343
+ // and use a fallback value if one is provided for the current block.
344
+
345
+ if (hasFallbackGapSupport) {
346
+ if (selector === _utils.ROOT_BLOCK_SELECTOR) {
347
+ gapValue = !gapValue ? '0.5em' : gapValue;
348
+ } else if (!hasBlockGapSupport && fallbackGapValue) {
349
+ gapValue = fallbackGapValue;
350
+ }
351
+ }
352
+
353
+ if (gapValue && tree !== null && tree !== void 0 && (_tree$settings2 = tree.settings) !== null && _tree$settings2 !== void 0 && (_tree$settings2$layou = _tree$settings2.layout) !== null && _tree$settings2$layou !== void 0 && _tree$settings2$layou.definitions) {
354
+ Object.values(tree.settings.layout.definitions).forEach(_ref7 => {
355
+ let {
356
+ className,
357
+ name,
358
+ spacingStyles
359
+ } = _ref7;
360
+
361
+ // Allow outputting fallback gap styles for flex layout type when block gap support isn't available.
362
+ if (!hasBlockGapSupport && 'flex' !== name) {
363
+ return;
364
+ }
365
+
366
+ if (spacingStyles !== null && spacingStyles !== void 0 && spacingStyles.length) {
367
+ spacingStyles.forEach(spacingStyle => {
368
+ const declarations = [];
369
+
370
+ if (spacingStyle.rules) {
371
+ Object.entries(spacingStyle.rules).forEach(_ref8 => {
372
+ let [cssProperty, cssValue] = _ref8;
373
+ declarations.push(`${cssProperty}: ${cssValue ? cssValue : gapValue}`);
374
+ });
375
+ }
376
+
377
+ if (declarations.length) {
378
+ let combinedSelector = '';
379
+
380
+ if (!hasBlockGapSupport) {
381
+ // For fallback gap styles, use lower specificity, to ensure styles do not unintentionally override theme styles.
382
+ combinedSelector = selector === _utils.ROOT_BLOCK_SELECTOR ? `:where(.${className}${(spacingStyle === null || spacingStyle === void 0 ? void 0 : spacingStyle.selector) || ''})` : `:where(${selector}.${className}${(spacingStyle === null || spacingStyle === void 0 ? void 0 : spacingStyle.selector) || ''})`;
383
+ } else {
384
+ combinedSelector = selector === _utils.ROOT_BLOCK_SELECTOR ? `${selector} .${className}${(spacingStyle === null || spacingStyle === void 0 ? void 0 : spacingStyle.selector) || ''}` : `${selector}.${className}${(spacingStyle === null || spacingStyle === void 0 ? void 0 : spacingStyle.selector) || ''}`;
385
+ }
386
+
387
+ ruleset += `${combinedSelector} { ${declarations.join('; ')}; }`;
388
+ }
389
+ });
390
+ }
391
+ }); // For backwards compatibility, ensure the legacy block gap CSS variable is still available.
392
+
393
+ if (selector === _utils.ROOT_BLOCK_SELECTOR && hasBlockGapSupport) {
394
+ ruleset += `${selector} { --wp--style--block-gap: ${gapValue}; }`;
395
+ }
396
+ } // Output base styles
397
+
398
+
399
+ if (selector === _utils.ROOT_BLOCK_SELECTOR && tree !== null && tree !== void 0 && (_tree$settings3 = tree.settings) !== null && _tree$settings3 !== void 0 && (_tree$settings3$layou = _tree$settings3.layout) !== null && _tree$settings3$layou !== void 0 && _tree$settings3$layou.definitions) {
400
+ const validDisplayModes = ['block', 'flex', 'grid'];
401
+ Object.values(tree.settings.layout.definitions).forEach(_ref9 => {
402
+ let {
403
+ className,
404
+ displayMode,
405
+ baseStyles
406
+ } = _ref9;
407
+
408
+ if (displayMode && validDisplayModes.includes(displayMode)) {
409
+ ruleset += `${selector} .${className} { display:${displayMode}; }`;
410
+ }
411
+
412
+ if (baseStyles !== null && baseStyles !== void 0 && baseStyles.length) {
413
+ baseStyles.forEach(baseStyle => {
414
+ const declarations = [];
415
+
416
+ if (baseStyle.rules) {
417
+ Object.entries(baseStyle.rules).forEach(_ref10 => {
418
+ let [cssProperty, cssValue] = _ref10;
419
+ declarations.push(`${cssProperty}: ${cssValue}`);
420
+ });
421
+ }
422
+
423
+ if (declarations.length) {
424
+ const combinedSelector = `${selector} .${className}${(baseStyle === null || baseStyle === void 0 ? void 0 : baseStyle.selector) || ''}`;
425
+ ruleset += `${combinedSelector} { ${declarations.join('; ')}; }`;
426
+ }
427
+ });
428
+ }
429
+ });
430
+ }
431
+
432
+ return ruleset;
433
+ }
434
+
435
+ const getNodesWithStyles = (tree, blockSelectors) => {
436
+ var _tree$styles$blocks, _tree$styles3;
437
+
438
+ const nodes = [];
439
+
440
+ if (!(tree !== null && tree !== void 0 && tree.styles)) {
441
+ return nodes;
442
+ }
443
+
444
+ const pickStyleKeys = treeToPickFrom => Object.fromEntries(Object.entries(treeToPickFrom !== null && treeToPickFrom !== void 0 ? treeToPickFrom : {}).filter(_ref11 => {
445
+ let [key] = _ref11;
446
+ return ['border', 'color', 'dimensions', 'spacing', 'typography', 'filter', 'outline', 'shadow'].includes(key);
447
+ })); // Top-level.
448
+
449
+
450
+ const styles = pickStyleKeys(tree.styles);
451
+
452
+ if (!!styles) {
453
+ nodes.push({
454
+ styles,
455
+ selector: _utils.ROOT_BLOCK_SELECTOR
456
+ });
457
+ }
458
+
459
+ Object.entries(_blocks.__EXPERIMENTAL_ELEMENTS).forEach(_ref12 => {
460
+ var _tree$styles;
461
+
462
+ let [name, selector] = _ref12;
463
+
464
+ if (!!((_tree$styles = tree.styles) !== null && _tree$styles !== void 0 && _tree$styles.elements[name])) {
465
+ var _tree$styles2;
466
+
467
+ nodes.push({
468
+ styles: (_tree$styles2 = tree.styles) === null || _tree$styles2 === void 0 ? void 0 : _tree$styles2.elements[name],
469
+ selector
470
+ });
471
+ }
472
+ }); // Iterate over blocks: they can have styles & elements.
473
+
474
+ Object.entries((_tree$styles$blocks = (_tree$styles3 = tree.styles) === null || _tree$styles3 === void 0 ? void 0 : _tree$styles3.blocks) !== null && _tree$styles$blocks !== void 0 ? _tree$styles$blocks : {}).forEach(_ref13 => {
475
+ var _blockSelectors$block, _node$elements;
476
+
477
+ let [blockName, node] = _ref13;
478
+ const blockStyles = pickStyleKeys(node);
479
+
480
+ if (node !== null && node !== void 0 && node.variations) {
481
+ const variations = {};
482
+ Object.keys(node.variations).forEach(variation => {
483
+ variations[variation] = pickStyleKeys(node.variations[variation]);
484
+ });
485
+ blockStyles.variations = variations;
486
+ }
487
+
488
+ if (!!blockStyles && !!(blockSelectors !== null && blockSelectors !== void 0 && (_blockSelectors$block = blockSelectors[blockName]) !== null && _blockSelectors$block !== void 0 && _blockSelectors$block.selector)) {
489
+ nodes.push({
490
+ duotoneSelector: blockSelectors[blockName].duotoneSelector,
491
+ fallbackGapValue: blockSelectors[blockName].fallbackGapValue,
492
+ hasLayoutSupport: blockSelectors[blockName].hasLayoutSupport,
493
+ selector: blockSelectors[blockName].selector,
494
+ styles: blockStyles,
495
+ featureSelectors: blockSelectors[blockName].featureSelectors,
496
+ styleVariationSelectors: blockSelectors[blockName].styleVariationSelectors
497
+ });
498
+ }
499
+
500
+ Object.entries((_node$elements = node === null || node === void 0 ? void 0 : node.elements) !== null && _node$elements !== void 0 ? _node$elements : {}).forEach(_ref14 => {
501
+ let [elementName, value] = _ref14;
502
+
503
+ if (!!value && !!(blockSelectors !== null && blockSelectors !== void 0 && blockSelectors[blockName]) && !!(_blocks.__EXPERIMENTAL_ELEMENTS !== null && _blocks.__EXPERIMENTAL_ELEMENTS !== void 0 && _blocks.__EXPERIMENTAL_ELEMENTS[elementName])) {
504
+ nodes.push({
505
+ styles: value,
506
+ selector: blockSelectors[blockName].selector.split(',').map(sel => {
507
+ const elementSelectors = _blocks.__EXPERIMENTAL_ELEMENTS[elementName].split(',');
508
+
509
+ return elementSelectors.map(elementSelector => sel + ' ' + elementSelector);
510
+ }).join(',')
511
+ });
512
+ }
513
+ });
514
+ });
515
+ return nodes;
516
+ };
517
+
518
+ exports.getNodesWithStyles = getNodesWithStyles;
519
+
520
+ const getNodesWithSettings = (tree, blockSelectors) => {
521
+ var _tree$settings4, _tree$settings$blocks, _tree$settings5;
522
+
523
+ const nodes = [];
524
+
525
+ if (!(tree !== null && tree !== void 0 && tree.settings)) {
526
+ return nodes;
527
+ }
528
+
529
+ const pickPresets = treeToPickFrom => {
530
+ const presets = {};
531
+
532
+ _utils.PRESET_METADATA.forEach(_ref15 => {
533
+ let {
534
+ path
535
+ } = _ref15;
536
+ const value = (0, _lodash.get)(treeToPickFrom, path, false);
537
+
538
+ if (value !== false) {
539
+ (0, _lodash.set)(presets, path, value);
540
+ }
541
+ });
542
+
543
+ return presets;
544
+ }; // Top-level.
545
+
546
+
547
+ const presets = pickPresets(tree.settings);
548
+ const custom = (_tree$settings4 = tree.settings) === null || _tree$settings4 === void 0 ? void 0 : _tree$settings4.custom;
549
+
550
+ if (!(0, _lodash.isEmpty)(presets) || !!custom) {
551
+ nodes.push({
552
+ presets,
553
+ custom,
554
+ selector: _utils.ROOT_BLOCK_SELECTOR
555
+ });
556
+ } // Blocks.
557
+
558
+
559
+ Object.entries((_tree$settings$blocks = (_tree$settings5 = tree.settings) === null || _tree$settings5 === void 0 ? void 0 : _tree$settings5.blocks) !== null && _tree$settings$blocks !== void 0 ? _tree$settings$blocks : {}).forEach(_ref16 => {
560
+ let [blockName, node] = _ref16;
561
+ const blockPresets = pickPresets(node);
562
+ const blockCustom = node.custom;
563
+
564
+ if (!(0, _lodash.isEmpty)(blockPresets) || !!blockCustom) {
565
+ nodes.push({
566
+ presets: blockPresets,
567
+ custom: blockCustom,
568
+ selector: blockSelectors[blockName].selector
569
+ });
570
+ }
571
+ });
572
+ return nodes;
573
+ };
574
+
575
+ exports.getNodesWithSettings = getNodesWithSettings;
576
+
577
+ const toCustomProperties = (tree, blockSelectors) => {
578
+ const settings = getNodesWithSettings(tree, blockSelectors);
579
+ let ruleset = '';
580
+ settings.forEach(_ref17 => {
581
+ let {
582
+ presets,
583
+ custom,
584
+ selector
585
+ } = _ref17;
586
+ const declarations = getPresetsDeclarations(presets, tree === null || tree === void 0 ? void 0 : tree.settings);
587
+ const customProps = flattenTree(custom, '--wp--custom--', '--');
588
+
589
+ if (customProps.length > 0) {
590
+ declarations.push(...customProps);
591
+ }
592
+
593
+ if (declarations.length > 0) {
594
+ ruleset = ruleset + `${selector}{${declarations.join(';')};}`;
595
+ }
596
+ });
597
+ return ruleset;
598
+ };
599
+
600
+ exports.toCustomProperties = toCustomProperties;
601
+
602
+ const toStyles = function (tree, blockSelectors, hasBlockGapSupport, hasFallbackGapSupport) {
603
+ var _tree$settings6, _tree$settings7;
604
+
605
+ let disableLayoutStyles = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
606
+ const nodesWithStyles = getNodesWithStyles(tree, blockSelectors);
607
+ const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
608
+ const useRootPaddingAlign = tree === null || tree === void 0 ? void 0 : (_tree$settings6 = tree.settings) === null || _tree$settings6 === void 0 ? void 0 : _tree$settings6.useRootPaddingAwareAlignments;
609
+ const {
610
+ contentSize,
611
+ wideSize
612
+ } = (tree === null || tree === void 0 ? void 0 : (_tree$settings7 = tree.settings) === null || _tree$settings7 === void 0 ? void 0 : _tree$settings7.layout) || {};
613
+ /*
614
+ * Reset default browser margin on the root body element.
615
+ * This is set on the root selector **before** generating the ruleset
616
+ * from the `theme.json`. This is to ensure that if the `theme.json` declares
617
+ * `margin` in its `spacing` declaration for the `body` element then these
618
+ * user-generated values take precedence in the CSS cascade.
619
+ * @link https://github.com/WordPress/gutenberg/issues/36147.
620
+ */
621
+
622
+ let ruleset = 'body {margin: 0;';
623
+
624
+ if (contentSize) {
625
+ ruleset += ` --wp--style--global--content-size: ${contentSize};`;
626
+ }
627
+
628
+ if (wideSize) {
629
+ ruleset += ` --wp--style--global--wide-size: ${wideSize};`;
630
+ }
631
+
632
+ if (useRootPaddingAlign) {
633
+ ruleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
634
+ .has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
635
+ .has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; }
636
+ .has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
637
+ .has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; }
638
+ .has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),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); }
639
+ .has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;`;
640
+ }
641
+
642
+ ruleset += '}';
643
+ nodesWithStyles.forEach(_ref18 => {
644
+ let {
645
+ selector,
646
+ duotoneSelector,
647
+ styles,
648
+ fallbackGapValue,
649
+ hasLayoutSupport,
650
+ featureSelectors,
651
+ styleVariationSelectors
652
+ } = _ref18;
653
+
654
+ // Process styles for block support features with custom feature level
655
+ // CSS selectors set.
656
+ if (featureSelectors) {
657
+ Object.entries(featureSelectors).forEach(_ref19 => {
658
+ let [featureName, featureSelector] = _ref19;
659
+
660
+ if (styles !== null && styles !== void 0 && styles[featureName]) {
661
+ const featureStyles = {
662
+ [featureName]: styles[featureName]
663
+ };
664
+ const featureDeclarations = getStylesDeclarations(featureStyles);
665
+ delete styles[featureName];
666
+
667
+ if (!!featureDeclarations.length) {
668
+ ruleset = ruleset + `${featureSelector}{${featureDeclarations.join(';')} }`;
669
+ }
670
+ }
671
+ });
672
+ }
673
+
674
+ if (styleVariationSelectors) {
675
+ Object.entries(styleVariationSelectors).forEach(_ref20 => {
676
+ var _styles$variations;
677
+
678
+ let [styleVariationName, styleVariationSelector] = _ref20;
679
+
680
+ if (styles !== null && styles !== void 0 && (_styles$variations = styles.variations) !== null && _styles$variations !== void 0 && _styles$variations[styleVariationName]) {
681
+ var _styles$variations3;
682
+
683
+ // If the block uses any custom selectors for block support, add those first.
684
+ if (featureSelectors) {
685
+ Object.entries(featureSelectors).forEach(_ref21 => {
686
+ var _styles$variations2, _styles$variations2$s;
687
+
688
+ let [featureName, featureSelector] = _ref21;
689
+
690
+ if (styles !== null && styles !== void 0 && (_styles$variations2 = styles.variations) !== null && _styles$variations2 !== void 0 && (_styles$variations2$s = _styles$variations2[styleVariationName]) !== null && _styles$variations2$s !== void 0 && _styles$variations2$s[featureName]) {
691
+ const featureStyles = {
692
+ [featureName]: styles.variations[styleVariationName][featureName]
693
+ };
694
+ const featureDeclarations = getStylesDeclarations(featureStyles);
695
+ delete styles.variations[styleVariationName][featureName];
696
+
697
+ if (!!featureDeclarations.length) {
698
+ ruleset = ruleset + `${concatFeatureVariationSelectorString(featureSelector, styleVariationSelector)}{${featureDeclarations.join(';')} }`;
699
+ }
700
+ }
701
+ });
702
+ } // Otherwise add regular selectors.
703
+
704
+
705
+ const styleVariationDeclarations = getStylesDeclarations(styles === null || styles === void 0 ? void 0 : (_styles$variations3 = styles.variations) === null || _styles$variations3 === void 0 ? void 0 : _styles$variations3[styleVariationName], styleVariationSelector, useRootPaddingAlign, tree);
706
+
707
+ if (!!styleVariationDeclarations.length) {
708
+ ruleset = ruleset + `${styleVariationSelector}{${styleVariationDeclarations.join(';')}}`;
709
+ }
710
+ }
711
+ });
712
+ }
713
+
714
+ const duotoneStyles = {};
715
+
716
+ if (styles !== null && styles !== void 0 && styles.filter) {
717
+ duotoneStyles.filter = styles.filter;
718
+ delete styles.filter;
719
+ } // Process duotone styles (they use color.__experimentalDuotone selector).
720
+
721
+
722
+ if (duotoneSelector) {
723
+ const duotoneDeclarations = getStylesDeclarations(duotoneStyles);
724
+
725
+ if (duotoneDeclarations.length > 0) {
726
+ ruleset = ruleset + `${duotoneSelector}{${duotoneDeclarations.join(';')};}`;
727
+ }
728
+ } // Process blockGap and layout styles.
729
+
730
+
731
+ if (!disableLayoutStyles && (_utils.ROOT_BLOCK_SELECTOR === selector || hasLayoutSupport)) {
732
+ ruleset += getLayoutStyles({
733
+ tree,
734
+ style: styles,
735
+ selector,
736
+ hasBlockGapSupport,
737
+ hasFallbackGapSupport,
738
+ fallbackGapValue
739
+ });
740
+ } // Process the remaining block styles (they use either normal block class or __experimentalSelector).
741
+
742
+
743
+ const declarations = getStylesDeclarations(styles, selector, useRootPaddingAlign, tree);
744
+
745
+ if (declarations !== null && declarations !== void 0 && declarations.length) {
746
+ ruleset = ruleset + `${selector}{${declarations.join(';')};}`;
747
+ } // Check for pseudo selector in `styles` and handle separately.
748
+
749
+
750
+ const pseudoSelectorStyles = Object.entries(styles).filter(_ref22 => {
751
+ let [key] = _ref22;
752
+ return key.startsWith(':');
753
+ });
754
+
755
+ if (pseudoSelectorStyles !== null && pseudoSelectorStyles !== void 0 && pseudoSelectorStyles.length) {
756
+ pseudoSelectorStyles.forEach(_ref23 => {
757
+ let [pseudoKey, pseudoStyle] = _ref23;
758
+ const pseudoDeclarations = getStylesDeclarations(pseudoStyle);
759
+
760
+ if (!(pseudoDeclarations !== null && pseudoDeclarations !== void 0 && pseudoDeclarations.length)) {
761
+ return;
762
+ } // `selector` maybe provided in a form
763
+ // where block level selectors have sub element
764
+ // selectors appended to them as a comma separated
765
+ // string.
766
+ // e.g. `h1 a,h2 a,h3 a,h4 a,h5 a,h6 a`;
767
+ // Split and append pseudo selector to create
768
+ // the proper rules to target the elements.
769
+
770
+
771
+ const _selector = selector.split(',').map(sel => sel + pseudoKey).join(',');
772
+
773
+ const pseudoRule = `${_selector}{${pseudoDeclarations.join(';')};}`;
774
+ ruleset = ruleset + pseudoRule;
775
+ });
776
+ }
777
+ });
778
+ /* Add alignment / layout styles */
779
+
780
+ ruleset = ruleset + '.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }';
781
+ ruleset = ruleset + '.wp-site-blocks > .alignright { float: right; margin-left: 2em; }';
782
+ ruleset = ruleset + '.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }';
783
+
784
+ if (hasBlockGapSupport) {
785
+ var _tree$styles4, _tree$styles4$spacing;
786
+
787
+ // Use fallback of `0.5em` just in case, however if there is blockGap support, there should nearly always be a real value.
788
+ const gapValue = (0, _gap.getGapCSSValue)(tree === null || tree === void 0 ? void 0 : (_tree$styles4 = tree.styles) === null || _tree$styles4 === void 0 ? void 0 : (_tree$styles4$spacing = _tree$styles4.spacing) === null || _tree$styles4$spacing === void 0 ? void 0 : _tree$styles4$spacing.blockGap) || '0.5em';
789
+ ruleset = ruleset + '.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }';
790
+ ruleset = ruleset + `.wp-site-blocks > * + * { margin-block-start: ${gapValue}; }`;
791
+ }
792
+
793
+ nodesWithSettings.forEach(_ref24 => {
794
+ let {
795
+ selector,
796
+ presets
797
+ } = _ref24;
798
+
799
+ if (_utils.ROOT_BLOCK_SELECTOR === selector) {
800
+ // Do not add extra specificity for top-level classes.
801
+ selector = '';
802
+ }
803
+
804
+ const classes = getPresetsClasses(selector, presets);
805
+
806
+ if (!(0, _lodash.isEmpty)(classes)) {
807
+ ruleset = ruleset + classes;
808
+ }
809
+ });
810
+ return ruleset;
811
+ };
812
+
813
+ exports.toStyles = toStyles;
814
+
815
+ function toSvgFilters(tree, blockSelectors) {
816
+ const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
817
+ return nodesWithSettings.flatMap(_ref25 => {
818
+ let {
819
+ presets
820
+ } = _ref25;
821
+ return getPresetsSvgFilters(presets);
822
+ });
823
+ }
824
+
825
+ const getBlockSelectors = (blockTypes, getBlockStyles) => {
826
+ const result = {};
827
+ blockTypes.forEach(blockType => {
828
+ var _blockType$supports$_, _blockType$supports, _blockType$supports$c, _blockType$supports2, _blockType$supports2$, _blockType$supports3, _blockType$supports4, _blockType$supports4$, _blockType$supports4$2;
829
+
830
+ const name = blockType.name;
831
+ const selector = (_blockType$supports$_ = blockType === null || blockType === void 0 ? void 0 : (_blockType$supports = blockType.supports) === null || _blockType$supports === void 0 ? void 0 : _blockType$supports.__experimentalSelector) !== null && _blockType$supports$_ !== void 0 ? _blockType$supports$_ : '.wp-block-' + name.replace('core/', '').replace('/', '-');
832
+ const duotoneSelector = (_blockType$supports$c = blockType === null || blockType === void 0 ? void 0 : (_blockType$supports2 = blockType.supports) === null || _blockType$supports2 === void 0 ? void 0 : (_blockType$supports2$ = _blockType$supports2.color) === null || _blockType$supports2$ === void 0 ? void 0 : _blockType$supports2$.__experimentalDuotone) !== null && _blockType$supports$c !== void 0 ? _blockType$supports$c : null;
833
+ const hasLayoutSupport = !!(blockType !== null && blockType !== void 0 && (_blockType$supports3 = blockType.supports) !== null && _blockType$supports3 !== void 0 && _blockType$supports3.__experimentalLayout);
834
+ const fallbackGapValue = blockType === null || blockType === void 0 ? void 0 : (_blockType$supports4 = blockType.supports) === null || _blockType$supports4 === void 0 ? void 0 : (_blockType$supports4$ = _blockType$supports4.spacing) === null || _blockType$supports4$ === void 0 ? void 0 : (_blockType$supports4$2 = _blockType$supports4$.blockGap) === null || _blockType$supports4$2 === void 0 ? void 0 : _blockType$supports4$2.__experimentalDefault;
835
+ const blockStyleVariations = getBlockStyles(name);
836
+ const styleVariationSelectors = {};
837
+
838
+ if (blockStyleVariations !== null && blockStyleVariations !== void 0 && blockStyleVariations.length) {
839
+ blockStyleVariations.forEach(variation => {
840
+ const styleVariationSelector = `.is-style-${variation.name}${selector}`;
841
+ styleVariationSelectors[variation.name] = styleVariationSelector;
842
+ });
843
+ } // For each block support feature add any custom selectors.
844
+
845
+
846
+ const featureSelectors = {};
847
+ Object.entries(BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS).forEach(_ref26 => {
848
+ var _blockType$supports5, _blockType$supports5$;
849
+
850
+ let [featureKey, featureName] = _ref26;
851
+ const featureSelector = blockType === null || blockType === void 0 ? void 0 : (_blockType$supports5 = blockType.supports) === null || _blockType$supports5 === void 0 ? void 0 : (_blockType$supports5$ = _blockType$supports5[featureKey]) === null || _blockType$supports5$ === void 0 ? void 0 : _blockType$supports5$.__experimentalSelector;
852
+
853
+ if (featureSelector) {
854
+ featureSelectors[featureName] = (0, _utils.scopeSelector)(selector, featureSelector);
855
+ }
856
+ });
857
+ result[name] = {
858
+ duotoneSelector,
859
+ fallbackGapValue,
860
+ featureSelectors: Object.keys(featureSelectors).length ? featureSelectors : undefined,
861
+ hasLayoutSupport,
862
+ name,
863
+ selector,
864
+ styleVariationSelectors: Object.keys(styleVariationSelectors).length ? styleVariationSelectors : undefined
865
+ };
866
+ });
867
+ return result;
868
+ };
869
+ /**
870
+ * If there is a separator block whose color is defined in theme.json via background,
871
+ * update the separator color to the same value by using border color.
872
+ *
873
+ * @param {Object} config Theme.json configuration file object.
874
+ * @return {Object} configTheme.json configuration file object updated.
875
+ */
876
+
877
+
878
+ exports.getBlockSelectors = getBlockSelectors;
879
+
880
+ function updateConfigWithSeparator(config) {
881
+ var _config$styles, _config$styles2, _config$styles2$block, _config$styles3, _config$styles3$block, _config$styles4, _config$styles4$block;
882
+
883
+ const needsSeparatorStyleUpdate = ((_config$styles = config.styles) === null || _config$styles === void 0 ? void 0 : _config$styles.blocks['core/separator']) && ((_config$styles2 = config.styles) === null || _config$styles2 === void 0 ? void 0 : (_config$styles2$block = _config$styles2.blocks['core/separator'].color) === null || _config$styles2$block === void 0 ? void 0 : _config$styles2$block.background) && !((_config$styles3 = config.styles) !== null && _config$styles3 !== void 0 && (_config$styles3$block = _config$styles3.blocks['core/separator'].color) !== null && _config$styles3$block !== void 0 && _config$styles3$block.text) && !((_config$styles4 = config.styles) !== null && _config$styles4 !== void 0 && (_config$styles4$block = _config$styles4.blocks['core/separator'].border) !== null && _config$styles4$block !== void 0 && _config$styles4$block.color);
884
+
885
+ if (needsSeparatorStyleUpdate) {
886
+ var _config$styles5;
887
+
888
+ return { ...config,
889
+ styles: { ...config.styles,
890
+ blocks: { ...config.styles.blocks,
891
+ 'core/separator': { ...config.styles.blocks['core/separator'],
892
+ color: { ...config.styles.blocks['core/separator'].color,
893
+ text: (_config$styles5 = config.styles) === null || _config$styles5 === void 0 ? void 0 : _config$styles5.blocks['core/separator'].color.background
894
+ }
895
+ }
896
+ }
897
+ }
898
+ };
899
+ }
900
+
901
+ return config;
902
+ }
903
+
904
+ const processCSSNesting = (css, blockSelector) => {
905
+ let processedCSS = ''; // Split CSS nested rules.
906
+
907
+ const parts = css.split('&');
908
+ parts.forEach(part => {
909
+ processedCSS += !part.includes('{') ? blockSelector + '{' + part + '}' // If the part doesn't contain braces, it applies to the root level.
910
+ : blockSelector + part; // Prepend the selector, which effectively replaces the "&" character.
911
+ });
912
+ return processedCSS;
913
+ };
914
+
915
+ function useGlobalStylesOutput() {
916
+ let {
917
+ merged: mergedConfig
918
+ } = (0, _element.useContext)(_context.GlobalStylesContext);
919
+ const [blockGap] = (0, _hooks.useGlobalSetting)('spacing.blockGap');
920
+ const hasBlockGapSupport = blockGap !== null;
921
+ const hasFallbackGapSupport = !hasBlockGapSupport; // This setting isn't useful yet: it exists as a placeholder for a future explicit fallback styles support.
922
+
923
+ const disableLayoutStyles = (0, _data.useSelect)(select => {
924
+ const {
925
+ getSettings
926
+ } = select(_store.store);
927
+ return !!getSettings().disableLayoutStyles;
928
+ });
929
+ const getBlockStyles = (0, _data.useSelect)(select => {
930
+ return select(_blocks.store).getBlockStyles;
931
+ }, []);
932
+ return (0, _element.useMemo)(() => {
933
+ var _mergedConfig, _mergedConfig2, _mergedConfig$styles$;
934
+
935
+ if (!((_mergedConfig = mergedConfig) !== null && _mergedConfig !== void 0 && _mergedConfig.styles) || !((_mergedConfig2 = mergedConfig) !== null && _mergedConfig2 !== void 0 && _mergedConfig2.settings)) {
936
+ return [];
937
+ }
938
+
939
+ mergedConfig = updateConfigWithSeparator(mergedConfig);
940
+ const blockSelectors = getBlockSelectors((0, _blocks.getBlockTypes)(), getBlockStyles);
941
+ const customProperties = toCustomProperties(mergedConfig, blockSelectors);
942
+ const globalStyles = toStyles(mergedConfig, blockSelectors, hasBlockGapSupport, hasFallbackGapSupport, disableLayoutStyles);
943
+ const filters = toSvgFilters(mergedConfig, blockSelectors);
944
+ const stylesheets = [{
945
+ css: customProperties,
946
+ isGlobalStyles: true
947
+ }, {
948
+ css: globalStyles,
949
+ isGlobalStyles: true
950
+ }, // 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.
951
+ {
952
+ css: (_mergedConfig$styles$ = mergedConfig.styles.css) !== null && _mergedConfig$styles$ !== void 0 ? _mergedConfig$styles$ : '',
953
+ isGlobalStyles: true
954
+ }]; // Loop through the blocks to check if there are custom CSS values.
955
+ // If there are, get the block selector and push the selector together with
956
+ // the CSS value to the 'stylesheets' array.
957
+
958
+ (0, _blocks.getBlockTypes)().forEach(blockType => {
959
+ var _mergedConfig$styles$2;
960
+
961
+ if ((_mergedConfig$styles$2 = mergedConfig.styles.blocks[blockType.name]) !== null && _mergedConfig$styles$2 !== void 0 && _mergedConfig$styles$2.css) {
962
+ var _mergedConfig$styles$3;
963
+
964
+ const selector = blockSelectors[blockType.name].selector;
965
+ stylesheets.push({
966
+ css: processCSSNesting((_mergedConfig$styles$3 = mergedConfig.styles.blocks[blockType.name]) === null || _mergedConfig$styles$3 === void 0 ? void 0 : _mergedConfig$styles$3.css, selector),
967
+ isGlobalStyles: true
968
+ });
969
+ }
970
+ });
971
+ return [stylesheets, mergedConfig.settings, filters];
972
+ }, [hasBlockGapSupport, hasFallbackGapSupport, mergedConfig, disableLayoutStyles]);
973
+ }
974
+ //# sourceMappingURL=use-global-styles-output.js.map