@wordpress/block-editor 12.2.0 → 12.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 (1673) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/autocompleters/block.js +1 -3
  3. package/build/autocompleters/block.js.map +1 -1
  4. package/build/components/alignment-control/ui.js +9 -11
  5. package/build/components/alignment-control/ui.js.map +1 -1
  6. package/build/components/autocomplete/index.js +3 -4
  7. package/build/components/autocomplete/index.js.map +1 -1
  8. package/build/components/block-actions/index.js +8 -12
  9. package/build/components/block-actions/index.js.map +1 -1
  10. package/build/components/block-alignment-control/ui.js +17 -21
  11. package/build/components/block-alignment-control/ui.js.map +1 -1
  12. package/build/components/block-alignment-control/ui.native.js +14 -17
  13. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  14. package/build/components/block-alignment-control/use-available-alignments.js +5 -10
  15. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  16. package/build/components/block-alignment-matrix-control/index.js +4 -6
  17. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  18. package/build/components/block-breadcrumb/index.js +3 -4
  19. package/build/components/block-breadcrumb/index.js.map +1 -1
  20. package/build/components/block-caption/index.native.js +30 -35
  21. package/build/components/block-caption/index.native.js.map +1 -1
  22. package/build/components/block-card/index.js +7 -9
  23. package/build/components/block-card/index.js.map +1 -1
  24. package/build/components/block-compare/block-view.js +8 -9
  25. package/build/components/block-compare/block-view.js.map +1 -1
  26. package/build/components/block-compare/index.js +7 -9
  27. package/build/components/block-compare/index.js.map +1 -1
  28. package/build/components/block-context/index.js +4 -5
  29. package/build/components/block-context/index.js.map +1 -1
  30. package/build/components/block-controls/fill.js +15 -22
  31. package/build/components/block-controls/fill.js.map +1 -1
  32. package/build/components/block-controls/hook.js +1 -3
  33. package/build/components/block-controls/hook.js.map +1 -1
  34. package/build/components/block-controls/slot.js +28 -18
  35. package/build/components/block-controls/slot.js.map +1 -1
  36. package/build/components/block-controls/slot.native.js +7 -17
  37. package/build/components/block-controls/slot.native.js.map +1 -1
  38. package/build/components/block-draggable/draggable-chip.js +5 -6
  39. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  40. package/build/components/block-draggable/draggable-chip.native.js +3 -4
  41. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  42. package/build/components/block-draggable/dropping-insertion-point.native.js +6 -7
  43. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  44. package/build/components/block-draggable/index.js +15 -16
  45. package/build/components/block-draggable/index.js.map +1 -1
  46. package/build/components/block-draggable/index.native.js +43 -58
  47. package/build/components/block-draggable/index.native.js.map +1 -1
  48. package/build/components/block-edit/edit.js +1 -4
  49. package/build/components/block-edit/edit.js.map +1 -1
  50. package/build/components/block-edit/edit.native.js +1 -4
  51. package/build/components/block-edit/edit.native.js.map +1 -1
  52. package/build/components/block-edit-visually-button/index.js +3 -4
  53. package/build/components/block-edit-visually-button/index.js.map +1 -1
  54. package/build/components/block-full-height-alignment-control/index.js +6 -7
  55. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  56. package/build/components/block-icon/index.js +7 -11
  57. package/build/components/block-icon/index.js.map +1 -1
  58. package/build/components/block-icon/index.native.js +9 -13
  59. package/build/components/block-icon/index.native.js.map +1 -1
  60. package/build/components/block-inspector/index.js +36 -46
  61. package/build/components/block-inspector/index.js.map +1 -1
  62. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
  63. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  64. package/build/components/block-list/block-html.js +3 -4
  65. package/build/components/block-list/block-html.js.map +1 -1
  66. package/build/components/block-list/block-invalid-warning.js +3 -4
  67. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  68. package/build/components/block-list/block-invalid-warning.native.js +10 -15
  69. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  70. package/build/components/block-list/block-list-context.native.js +5 -11
  71. package/build/components/block-list/block-list-context.native.js.map +1 -1
  72. package/build/components/block-list/block-list-item-cell.native.js +5 -6
  73. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  74. package/build/components/block-list/block-list-item.native.js +17 -18
  75. package/build/components/block-list/block-list-item.native.js.map +1 -1
  76. package/build/components/block-list/block-outline.native.js +8 -9
  77. package/build/components/block-list/block-outline.native.js.map +1 -1
  78. package/build/components/block-list/block-selection-button.native.js +10 -12
  79. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  80. package/build/components/block-list/block.js +39 -46
  81. package/build/components/block-list/block.js.map +1 -1
  82. package/build/components/block-list/block.native.js +55 -68
  83. package/build/components/block-list/block.native.js.map +1 -1
  84. package/build/components/block-list/index.js +12 -15
  85. package/build/components/block-list/index.js.map +1 -1
  86. package/build/components/block-list/index.native.js +77 -86
  87. package/build/components/block-list/index.native.js.map +1 -1
  88. package/build/components/block-list/insertion-point.native.js +4 -5
  89. package/build/components/block-list/insertion-point.native.js.map +1 -1
  90. package/build/components/block-list/layout.js +6 -9
  91. package/build/components/block-list/layout.js.map +1 -1
  92. package/build/components/block-list/subdirectory-icon.js +10 -13
  93. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  94. package/build/components/block-list/use-block-props/index.js +15 -11
  95. package/build/components/block-list/use-block-props/index.js.map +1 -1
  96. package/build/components/block-list/use-block-props/index.native.js +1 -2
  97. package/build/components/block-list/use-block-props/index.native.js.map +1 -1
  98. package/build/components/block-list/use-block-props/use-block-custom-class-name.js +2 -2
  99. package/build/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
  100. package/build/components/block-list/use-block-props/use-block-default-class-name.js +1 -1
  101. package/build/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
  102. package/build/components/block-list/use-in-between-inserter.js +1 -3
  103. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  104. package/build/components/block-list-appender/index.js +16 -15
  105. package/build/components/block-list-appender/index.js.map +1 -1
  106. package/build/components/block-list-appender/index.native.js +9 -11
  107. package/build/components/block-list-appender/index.native.js.map +1 -1
  108. package/build/components/block-lock/menu-item.js +3 -4
  109. package/build/components/block-lock/menu-item.js.map +1 -1
  110. package/build/components/block-lock/modal.js +6 -9
  111. package/build/components/block-lock/modal.js.map +1 -1
  112. package/build/components/block-lock/toolbar.js +4 -10
  113. package/build/components/block-lock/toolbar.js.map +1 -1
  114. package/build/components/block-mobile-toolbar/block-actions-menu.native.js +49 -67
  115. package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
  116. package/build/components/block-mobile-toolbar/index.native.js +26 -34
  117. package/build/components/block-mobile-toolbar/index.native.js.map +1 -1
  118. package/build/components/block-mover/button.js +6 -7
  119. package/build/components/block-mover/button.js.map +1 -1
  120. package/build/components/block-mover/index.js +5 -8
  121. package/build/components/block-mover/index.js.map +1 -1
  122. package/build/components/block-mover/index.native.js +23 -46
  123. package/build/components/block-mover/index.native.js.map +1 -1
  124. package/build/components/block-mover/mover-description.native.js +7 -10
  125. package/build/components/block-mover/mover-description.native.js.map +1 -1
  126. package/build/components/block-navigation/dropdown.js +20 -25
  127. package/build/components/block-navigation/dropdown.js.map +1 -1
  128. package/build/components/block-parent-selector/index.js +2 -2
  129. package/build/components/block-parent-selector/index.js.map +1 -1
  130. package/build/components/block-pattern-setup/index.js +27 -31
  131. package/build/components/block-pattern-setup/index.js.map +1 -1
  132. package/build/components/block-pattern-setup/setup-toolbar.js +35 -42
  133. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  134. package/build/components/block-patterns-list/index.js +74 -81
  135. package/build/components/block-patterns-list/index.js.map +1 -1
  136. package/build/components/block-popover/drop-zone.js +4 -5
  137. package/build/components/block-popover/drop-zone.js.map +1 -1
  138. package/build/components/block-popover/inbetween.js +10 -15
  139. package/build/components/block-popover/inbetween.js.map +1 -1
  140. package/build/components/block-popover/index.js +14 -15
  141. package/build/components/block-popover/index.js.map +1 -1
  142. package/build/components/block-preview/auto.js +6 -8
  143. package/build/components/block-preview/auto.js.map +1 -1
  144. package/build/components/block-preview/index.js +15 -18
  145. package/build/components/block-preview/index.js.map +1 -1
  146. package/build/components/block-settings/button.native.js +7 -10
  147. package/build/components/block-settings/button.native.js.map +1 -1
  148. package/build/components/block-settings-menu/block-convert-button.js +5 -7
  149. package/build/components/block-settings-menu/block-convert-button.js.map +1 -1
  150. package/build/components/block-settings-menu/block-html-convert-button.js +10 -14
  151. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  152. package/build/components/block-settings-menu/block-mode-toggle.js +19 -25
  153. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  154. package/build/components/block-settings-menu/block-settings-dropdown.js +132 -111
  155. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  156. package/build/components/block-settings-menu/index.js +4 -5
  157. package/build/components/block-settings-menu/index.js.map +1 -1
  158. package/build/components/block-settings-menu-controls/index.js +14 -16
  159. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  160. package/build/components/block-styles/index.js +6 -7
  161. package/build/components/block-styles/index.js.map +1 -1
  162. package/build/components/block-styles/index.native.js +5 -7
  163. package/build/components/block-styles/index.native.js.map +1 -1
  164. package/build/components/block-styles/menu-items.js +4 -5
  165. package/build/components/block-styles/menu-items.js.map +1 -1
  166. package/build/components/block-styles/preview-panel.js +7 -10
  167. package/build/components/block-styles/preview-panel.js.map +1 -1
  168. package/build/components/block-styles/preview.native.js +6 -7
  169. package/build/components/block-styles/preview.native.js.map +1 -1
  170. package/build/components/block-styles/use-styles-for-block.js +7 -9
  171. package/build/components/block-styles/use-styles-for-block.js.map +1 -1
  172. package/build/components/block-styles/utils.js +4 -7
  173. package/build/components/block-styles/utils.js.map +1 -1
  174. package/build/components/block-switcher/block-styles-menu.js +4 -5
  175. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  176. package/build/components/block-switcher/block-transformations-menu.js +24 -29
  177. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  178. package/build/components/block-switcher/block-transformations-menu.native.js +9 -10
  179. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  180. package/build/components/block-switcher/block-variation-transformations.js +21 -30
  181. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  182. package/build/components/block-switcher/index.js +47 -60
  183. package/build/components/block-switcher/index.js.map +1 -1
  184. package/build/components/block-switcher/pattern-transformations-menu.js +18 -22
  185. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  186. package/build/components/block-switcher/preview-block-popover.js +3 -4
  187. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  188. package/build/components/block-switcher/utils.js +2 -3
  189. package/build/components/block-switcher/utils.js.map +1 -1
  190. package/build/components/block-title/index.js +5 -6
  191. package/build/components/block-title/index.js.map +1 -1
  192. package/build/components/block-title/use-block-display-title.js +5 -6
  193. package/build/components/block-title/use-block-display-title.js.map +1 -1
  194. package/build/components/block-toolbar/index.js +4 -5
  195. package/build/components/block-toolbar/index.js.map +1 -1
  196. package/build/components/block-toolbar/utils.js +14 -16
  197. package/build/components/block-toolbar/utils.js.map +1 -1
  198. package/build/components/block-tools/back-compat.js +3 -4
  199. package/build/components/block-tools/back-compat.js.map +1 -1
  200. package/build/components/block-tools/block-contextual-toolbar.js +5 -6
  201. package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
  202. package/build/components/block-tools/block-selection-button.js +6 -9
  203. package/build/components/block-tools/block-selection-button.js.map +1 -1
  204. package/build/components/block-tools/index.js +6 -7
  205. package/build/components/block-tools/index.js.map +1 -1
  206. package/build/components/block-tools/insertion-point.js +7 -10
  207. package/build/components/block-tools/insertion-point.js.map +1 -1
  208. package/build/components/block-tools/selected-block-popover.js +19 -20
  209. package/build/components/block-tools/selected-block-popover.js.map +1 -1
  210. package/build/components/block-tools/use-block-toolbar-popover-props.js +9 -14
  211. package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  212. package/build/components/block-tools/zoom-out-mode-inserters.js +3 -4
  213. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  214. package/build/components/block-types-list/index.js +8 -9
  215. package/build/components/block-types-list/index.js.map +1 -1
  216. package/build/components/block-types-list/index.native.js +22 -27
  217. package/build/components/block-types-list/index.native.js.map +1 -1
  218. package/build/components/block-variation-picker/index.js +8 -9
  219. package/build/components/block-variation-picker/index.js.map +1 -1
  220. package/build/components/block-variation-picker/index.native.js +7 -9
  221. package/build/components/block-variation-picker/index.native.js.map +1 -1
  222. package/build/components/block-variation-transforms/index.js +30 -41
  223. package/build/components/block-variation-transforms/index.js.map +1 -1
  224. package/build/components/block-vertical-alignment-control/ui.js +7 -9
  225. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  226. package/build/components/border-radius-control/all-input-control.js +7 -8
  227. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  228. package/build/components/border-radius-control/index.js +9 -10
  229. package/build/components/border-radius-control/index.js.map +1 -1
  230. package/build/components/border-radius-control/input-controls.js +8 -11
  231. package/build/components/border-radius-control/input-controls.js.map +1 -1
  232. package/build/components/border-radius-control/linked-button.js +4 -5
  233. package/build/components/border-radius-control/linked-button.js.map +1 -1
  234. package/build/components/border-radius-control/utils.js +3 -7
  235. package/build/components/border-radius-control/utils.js.map +1 -1
  236. package/build/components/button-block-appender/index.js +13 -15
  237. package/build/components/button-block-appender/index.js.map +1 -1
  238. package/build/components/button-block-appender/index.native.js +25 -29
  239. package/build/components/button-block-appender/index.native.js.map +1 -1
  240. package/build/components/caption/index.native.js +40 -43
  241. package/build/components/caption/index.native.js.map +1 -1
  242. package/build/components/child-layout-control/index.js +5 -6
  243. package/build/components/child-layout-control/index.js.map +1 -1
  244. package/build/components/color-palette/control.js +5 -6
  245. package/build/components/color-palette/control.js.map +1 -1
  246. package/build/components/color-palette/with-color-context.js +1 -7
  247. package/build/components/color-palette/with-color-context.js.map +1 -1
  248. package/build/components/color-style-selector/index.js +28 -35
  249. package/build/components/color-style-selector/index.js.map +1 -1
  250. package/build/components/colors/utils.js +5 -8
  251. package/build/components/colors/utils.js.map +1 -1
  252. package/build/components/colors/with-colors.js +9 -24
  253. package/build/components/colors/with-colors.js.map +1 -1
  254. package/build/components/colors-gradients/control.js +19 -22
  255. package/build/components/colors-gradients/control.js.map +1 -1
  256. package/build/components/colors-gradients/dropdown.js +32 -39
  257. package/build/components/colors-gradients/dropdown.js.map +1 -1
  258. package/build/components/colors-gradients/panel-color-gradient-settings.js +20 -25
  259. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  260. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +27 -31
  261. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  262. package/build/components/contrast-checker/index.js +12 -13
  263. package/build/components/contrast-checker/index.js.map +1 -1
  264. package/build/components/contrast-checker/index.native.js +16 -18
  265. package/build/components/contrast-checker/index.native.js.map +1 -1
  266. package/build/components/convert-to-group-buttons/index.js +9 -10
  267. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  268. package/build/components/convert-to-group-buttons/index.native.js +6 -7
  269. package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
  270. package/build/components/convert-to-group-buttons/toolbar.js +6 -12
  271. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  272. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js +4 -6
  273. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  274. package/build/components/copy-handler/index.js +4 -7
  275. package/build/components/copy-handler/index.js.map +1 -1
  276. package/build/components/date-format-picker/index.js +12 -16
  277. package/build/components/date-format-picker/index.js.map +1 -1
  278. package/build/components/default-block-appender/index.js +7 -9
  279. package/build/components/default-block-appender/index.js.map +1 -1
  280. package/build/components/default-block-appender/index.native.js +8 -10
  281. package/build/components/default-block-appender/index.native.js.map +1 -1
  282. package/build/components/default-style-picker/index.js +14 -22
  283. package/build/components/default-style-picker/index.js.map +1 -1
  284. package/build/components/duotone/components.js +14 -18
  285. package/build/components/duotone/components.js.map +1 -1
  286. package/build/components/duotone/utils.js +1 -2
  287. package/build/components/duotone/utils.js.map +1 -1
  288. package/build/components/duotone-control/index.js +12 -15
  289. package/build/components/duotone-control/index.js.map +1 -1
  290. package/build/components/editable-text/index.js +5 -6
  291. package/build/components/editable-text/index.js.map +1 -1
  292. package/build/components/editor-styles/index.js +4 -5
  293. package/build/components/editor-styles/index.js.map +1 -1
  294. package/build/components/floating-toolbar/index.native.js +7 -8
  295. package/build/components/floating-toolbar/index.native.js.map +1 -1
  296. package/build/components/font-appearance-control/index.js +19 -26
  297. package/build/components/font-appearance-control/index.js.map +1 -1
  298. package/build/components/font-family/index.js +10 -12
  299. package/build/components/font-family/index.js.map +1 -1
  300. package/build/components/font-sizes/fluid-utils.js +17 -21
  301. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  302. package/build/components/font-sizes/utils.js +6 -12
  303. package/build/components/font-sizes/utils.js.map +1 -1
  304. package/build/components/font-sizes/with-font-sizes.js +11 -30
  305. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  306. package/build/components/global-styles/advanced-panel.js +7 -10
  307. package/build/components/global-styles/advanced-panel.js.map +1 -1
  308. package/build/components/global-styles/border-panel.js +45 -78
  309. package/build/components/global-styles/border-panel.js.map +1 -1
  310. package/build/components/global-styles/color-panel.js +104 -147
  311. package/build/components/global-styles/color-panel.js.map +1 -1
  312. package/build/components/global-styles/color-panel.native.js +25 -42
  313. package/build/components/global-styles/color-panel.native.js.map +1 -1
  314. package/build/components/global-styles/dimensions-panel.js +78 -109
  315. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  316. package/build/components/global-styles/effects-panel.js +58 -72
  317. package/build/components/global-styles/effects-panel.js.map +1 -1
  318. package/build/components/global-styles/filters-panel.js +53 -71
  319. package/build/components/global-styles/filters-panel.js.map +1 -1
  320. package/build/components/global-styles/get-block-css-selector.js +4 -7
  321. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  322. package/build/components/global-styles/hooks.js +22 -37
  323. package/build/components/global-styles/hooks.js.map +1 -1
  324. package/build/components/global-styles/typography-panel.js +69 -125
  325. package/build/components/global-styles/typography-panel.js.map +1 -1
  326. package/build/components/global-styles/typography-utils.js +49 -26
  327. package/build/components/global-styles/typography-utils.js.map +1 -1
  328. package/build/components/global-styles/use-global-styles-output.js +140 -235
  329. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  330. package/build/components/global-styles/utils.js +11 -27
  331. package/build/components/global-styles/utils.js.map +1 -1
  332. package/build/components/gradients/use-gradient.js +6 -7
  333. package/build/components/gradients/use-gradient.js.map +1 -1
  334. package/build/components/height-control/index.js +9 -10
  335. package/build/components/height-control/index.js.map +1 -1
  336. package/build/components/iframe/index.js +50 -85
  337. package/build/components/iframe/index.js.map +1 -1
  338. package/build/components/iframe/use-compatibility-styles.js +29 -20
  339. package/build/components/iframe/use-compatibility-styles.js.map +1 -1
  340. package/build/components/image-editor/aspect-ratio-dropdown.js +83 -91
  341. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  342. package/build/components/image-editor/context.js +9 -10
  343. package/build/components/image-editor/context.js.map +1 -1
  344. package/build/components/image-editor/cropper.js +11 -12
  345. package/build/components/image-editor/cropper.js.map +1 -1
  346. package/build/components/image-editor/index.js +12 -13
  347. package/build/components/image-editor/index.js.map +1 -1
  348. package/build/components/image-editor/use-save-image.js +11 -12
  349. package/build/components/image-editor/use-save-image.js.map +1 -1
  350. package/build/components/image-editor/use-transform-image.js +5 -6
  351. package/build/components/image-editor/use-transform-image.js.map +1 -1
  352. package/build/components/image-editor/zoom-dropdown.js +10 -13
  353. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  354. package/build/components/image-size-control/index.js +12 -13
  355. package/build/components/image-size-control/index.js.map +1 -1
  356. package/build/components/inner-blocks/button-block-appender.js +7 -8
  357. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  358. package/build/components/inner-blocks/default-block-appender.js +6 -8
  359. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  360. package/build/components/inner-blocks/index.js +2 -6
  361. package/build/components/inner-blocks/index.js.map +1 -1
  362. package/build/components/inner-blocks/index.native.js +1 -3
  363. package/build/components/inner-blocks/index.native.js.map +1 -1
  364. package/build/components/inner-blocks/use-block-context.js +1 -4
  365. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  366. package/build/components/inner-blocks/use-nested-settings-update.js +2 -4
  367. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  368. package/build/components/inserter/block-patterns-explorer/explorer.js +9 -11
  369. package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  370. package/build/components/inserter/block-patterns-explorer/patterns-list.js +11 -18
  371. package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
  372. package/build/components/inserter/block-patterns-explorer/sidebar.js +20 -24
  373. package/build/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
  374. package/build/components/inserter/block-patterns-tab.js +29 -40
  375. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  376. package/build/components/inserter/block-types-tab.js +7 -9
  377. package/build/components/inserter/block-types-tab.js.map +1 -1
  378. package/build/components/inserter/block-types-tab.native.js +8 -9
  379. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  380. package/build/components/inserter/hooks/use-block-type-impressions.native.js +3 -5
  381. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  382. package/build/components/inserter/hooks/use-block-types-state.js +5 -6
  383. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  384. package/build/components/inserter/hooks/use-clipboard-block.native.js +2 -2
  385. package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  386. package/build/components/inserter/hooks/use-debounced-input.js +1 -2
  387. package/build/components/inserter/hooks/use-debounced-input.js.map +1 -1
  388. package/build/components/inserter/hooks/use-insertion-point.js +10 -12
  389. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  390. package/build/components/inserter/index.js +37 -51
  391. package/build/components/inserter/index.js.map +1 -1
  392. package/build/components/inserter/index.native.js +24 -31
  393. package/build/components/inserter/index.native.js.map +1 -1
  394. package/build/components/inserter/library.js +11 -12
  395. package/build/components/inserter/library.js.map +1 -1
  396. package/build/components/inserter/media-tab/hooks.js +2 -5
  397. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  398. package/build/components/inserter/media-tab/media-list.js +6 -7
  399. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  400. package/build/components/inserter/media-tab/media-panel.js +12 -14
  401. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  402. package/build/components/inserter/media-tab/media-preview.js +47 -58
  403. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  404. package/build/components/inserter/media-tab/media-tab.js +24 -28
  405. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  406. package/build/components/inserter/media-tab/utils.js +3 -5
  407. package/build/components/inserter/media-tab/utils.js.map +1 -1
  408. package/build/components/inserter/menu.js +15 -19
  409. package/build/components/inserter/menu.js.map +1 -1
  410. package/build/components/inserter/menu.native.js +27 -31
  411. package/build/components/inserter/menu.native.js.map +1 -1
  412. package/build/components/inserter/mobile-tab-navigation.js +7 -9
  413. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  414. package/build/components/inserter/panel.js +5 -6
  415. package/build/components/inserter/panel.js.map +1 -1
  416. package/build/components/inserter/preview-panel.js +4 -5
  417. package/build/components/inserter/preview-panel.js.map +1 -1
  418. package/build/components/inserter/quick-inserter.js +8 -9
  419. package/build/components/inserter/quick-inserter.js.map +1 -1
  420. package/build/components/inserter/reusable-blocks-tab.js +13 -18
  421. package/build/components/inserter/reusable-blocks-tab.js.map +1 -1
  422. package/build/components/inserter/reusable-blocks-tab.native.js +5 -6
  423. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  424. package/build/components/inserter/search-items.js +12 -40
  425. package/build/components/inserter/search-items.js.map +1 -1
  426. package/build/components/inserter/search-results.js +17 -18
  427. package/build/components/inserter/search-results.js.map +1 -1
  428. package/build/components/inserter/search-results.native.js +11 -12
  429. package/build/components/inserter/search-results.native.js.map +1 -1
  430. package/build/components/inserter/tabs.js +8 -9
  431. package/build/components/inserter/tabs.js.map +1 -1
  432. package/build/components/inserter/tabs.native.js +37 -55
  433. package/build/components/inserter/tabs.native.js.map +1 -1
  434. package/build/components/inserter/utils.native.js +13 -17
  435. package/build/components/inserter/utils.native.js.map +1 -1
  436. package/build/components/inserter-draggable-blocks/index.js +11 -13
  437. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  438. package/build/components/inserter-list-item/index.js +68 -72
  439. package/build/components/inserter-list-item/index.js.map +1 -1
  440. package/build/components/inserter-listbox/index.js +3 -4
  441. package/build/components/inserter-listbox/index.js.map +1 -1
  442. package/build/components/inserter-listbox/item.js +6 -7
  443. package/build/components/inserter-listbox/item.js.map +1 -1
  444. package/build/components/inspector-controls/block-support-slot-container.js +4 -5
  445. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  446. package/build/components/inspector-controls/block-support-tools-panel.js +6 -8
  447. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  448. package/build/components/inspector-controls/fill.js +13 -24
  449. package/build/components/inspector-controls/fill.js.map +1 -1
  450. package/build/components/inspector-controls/fill.native.js +7 -11
  451. package/build/components/inspector-controls/fill.native.js.map +1 -1
  452. package/build/components/inspector-controls/slot.js +9 -13
  453. package/build/components/inspector-controls/slot.js.map +1 -1
  454. package/build/components/inspector-controls/slot.native.js +6 -10
  455. package/build/components/inspector-controls/slot.native.js.map +1 -1
  456. package/build/components/inspector-controls-tabs/index.js +6 -7
  457. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  458. package/build/components/inspector-controls-tabs/position-controls-panel.js +3 -8
  459. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  460. package/build/components/inspector-controls-tabs/settings-tab-hint.js +1 -1
  461. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  462. package/build/components/inspector-controls-tabs/settings-tab.js +3 -6
  463. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  464. package/build/components/inspector-controls-tabs/styles-tab.js +5 -6
  465. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  466. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +1 -3
  467. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  468. package/build/components/inspector-popover-header/index.js +18 -22
  469. package/build/components/inspector-popover-header/index.js.map +1 -1
  470. package/build/components/justify-content-control/ui.js +8 -10
  471. package/build/components/justify-content-control/ui.js.map +1 -1
  472. package/build/components/letter-spacing-control/index.js +6 -7
  473. package/build/components/letter-spacing-control/index.js.map +1 -1
  474. package/build/components/line-height-control/index.js +13 -18
  475. package/build/components/line-height-control/index.js.map +1 -1
  476. package/build/components/line-height-control/index.native.js +4 -5
  477. package/build/components/line-height-control/index.native.js.map +1 -1
  478. package/build/components/link-control/index.js +84 -63
  479. package/build/components/link-control/index.js.map +1 -1
  480. package/build/components/link-control/is-url-like.js +32 -2
  481. package/build/components/link-control/is-url-like.js.map +1 -1
  482. package/build/components/link-control/link-preview.js +24 -27
  483. package/build/components/link-control/link-preview.js.map +1 -1
  484. package/build/components/link-control/search-create-button.js +7 -9
  485. package/build/components/link-control/search-create-button.js.map +1 -1
  486. package/build/components/link-control/search-input.js +22 -27
  487. package/build/components/link-control/search-input.js.map +1 -1
  488. package/build/components/link-control/search-item.js +13 -15
  489. package/build/components/link-control/search-item.js.map +1 -1
  490. package/build/components/link-control/search-results.js +22 -28
  491. package/build/components/link-control/search-results.js.map +1 -1
  492. package/build/components/link-control/settings-drawer.js +6 -35
  493. package/build/components/link-control/settings-drawer.js.map +1 -1
  494. package/build/components/link-control/settings.js +6 -8
  495. package/build/components/link-control/settings.js.map +1 -1
  496. package/build/components/link-control/use-internal-value.js +54 -0
  497. package/build/components/link-control/use-internal-value.js.map +1 -0
  498. package/build/components/link-control/use-rich-url-data.js +1 -1
  499. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  500. package/build/components/link-control/use-search-handler.js +10 -23
  501. package/build/components/link-control/use-search-handler.js.map +1 -1
  502. package/build/components/list-view/appender.js +12 -12
  503. package/build/components/list-view/appender.js.map +1 -1
  504. package/build/components/list-view/aria-referenced-text.js +44 -0
  505. package/build/components/list-view/aria-referenced-text.js.map +1 -0
  506. package/build/components/list-view/block-contents.js +38 -38
  507. package/build/components/list-view/block-contents.js.map +1 -1
  508. package/build/components/list-view/block-select-button.js +67 -21
  509. package/build/components/list-view/block-select-button.js.map +1 -1
  510. package/build/components/list-view/block.js +119 -101
  511. package/build/components/list-view/block.js.map +1 -1
  512. package/build/components/list-view/branch.js +5 -5
  513. package/build/components/list-view/branch.js.map +1 -1
  514. package/build/components/list-view/drop-indicator.js +4 -5
  515. package/build/components/list-view/drop-indicator.js.map +1 -1
  516. package/build/components/list-view/expander.js +3 -4
  517. package/build/components/list-view/expander.js.map +1 -1
  518. package/build/components/list-view/index.js +46 -43
  519. package/build/components/list-view/index.js.map +1 -1
  520. package/build/components/list-view/leaf.js +10 -11
  521. package/build/components/list-view/leaf.js.map +1 -1
  522. package/build/components/list-view/use-block-selection.js +4 -6
  523. package/build/components/list-view/use-block-selection.js.map +1 -1
  524. package/build/components/list-view/use-list-view-client-ids.js +9 -12
  525. package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
  526. package/build/components/list-view/use-list-view-drop-zone.js +25 -13
  527. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  528. package/build/components/list-view/use-list-view-expand-selected-item.js +4 -5
  529. package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  530. package/build/components/list-view/use-list-view-scroll-into-view.js +5 -6
  531. package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  532. package/build/components/media-placeholder/index.js +71 -92
  533. package/build/components/media-placeholder/index.js.map +1 -1
  534. package/build/components/media-placeholder/index.native.js +5 -6
  535. package/build/components/media-placeholder/index.native.js.map +1 -1
  536. package/build/components/media-replace-flow/index.js +94 -107
  537. package/build/components/media-replace-flow/index.js.map +1 -1
  538. package/build/components/media-upload/check.js +4 -5
  539. package/build/components/media-upload/check.js.map +1 -1
  540. package/build/components/media-upload/index.native.js +1 -1
  541. package/build/components/media-upload/index.native.js.map +1 -1
  542. package/build/components/multi-selection-inspector/index.js +3 -4
  543. package/build/components/multi-selection-inspector/index.js.map +1 -1
  544. package/build/components/navigable-toolbar/index.js +16 -15
  545. package/build/components/navigable-toolbar/index.js.map +1 -1
  546. package/build/components/observe-typing/index.js +3 -4
  547. package/build/components/observe-typing/index.js.map +1 -1
  548. package/build/components/panel-color-settings/index.js +4 -5
  549. package/build/components/panel-color-settings/index.js.map +1 -1
  550. package/build/components/plain-text/index.js +4 -6
  551. package/build/components/plain-text/index.js.map +1 -1
  552. package/build/components/plain-text/index.native.js +8 -14
  553. package/build/components/plain-text/index.native.js.map +1 -1
  554. package/build/components/preview-options/index.js +8 -9
  555. package/build/components/preview-options/index.js.map +1 -1
  556. package/build/components/provider/block-refs-provider.js +3 -4
  557. package/build/components/provider/block-refs-provider.js.map +1 -1
  558. package/build/components/provider/use-block-sync.js +7 -8
  559. package/build/components/provider/use-block-sync.js.map +1 -1
  560. package/build/components/provider/with-registry-provider.js +5 -7
  561. package/build/components/provider/with-registry-provider.js.map +1 -1
  562. package/build/components/publish-date-time-picker/index.js +6 -7
  563. package/build/components/publish-date-time-picker/index.js.map +1 -1
  564. package/build/components/recursion-provider/index.js +7 -11
  565. package/build/components/recursion-provider/index.js.map +1 -1
  566. package/build/components/resizable-box-popover/index.js +5 -6
  567. package/build/components/resizable-box-popover/index.js.map +1 -1
  568. package/build/components/responsive-block-control/label.js +5 -6
  569. package/build/components/responsive-block-control/label.js.map +1 -1
  570. package/build/components/rich-text/embed-handler-picker.native.js +6 -10
  571. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  572. package/build/components/rich-text/format-edit.js +7 -8
  573. package/build/components/rich-text/format-edit.js.map +1 -1
  574. package/build/components/rich-text/format-toolbar/index.js +9 -18
  575. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  576. package/build/components/rich-text/format-toolbar-container.js +13 -16
  577. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  578. package/build/components/rich-text/index.js +43 -47
  579. package/build/components/rich-text/index.js.map +1 -1
  580. package/build/components/rich-text/index.native.js +130 -157
  581. package/build/components/rich-text/index.native.js.map +1 -1
  582. package/build/components/rich-text/input-event.js +4 -5
  583. package/build/components/rich-text/input-event.js.map +1 -1
  584. package/build/components/rich-text/shortcut.js +5 -6
  585. package/build/components/rich-text/shortcut.js.map +1 -1
  586. package/build/components/rich-text/split-value.js +8 -10
  587. package/build/components/rich-text/split-value.js.map +1 -1
  588. package/build/components/rich-text/toolbar-button.js +6 -7
  589. package/build/components/rich-text/toolbar-button.js.map +1 -1
  590. package/build/components/rich-text/use-before-input-rules.js +1 -4
  591. package/build/components/rich-text/use-before-input-rules.js.map +1 -1
  592. package/build/components/rich-text/use-enter.js +3 -6
  593. package/build/components/rich-text/use-enter.js.map +1 -1
  594. package/build/components/rich-text/use-firefox-compat.js +32 -1
  595. package/build/components/rich-text/use-firefox-compat.js.map +1 -1
  596. package/build/components/rich-text/use-format-types.js +11 -17
  597. package/build/components/rich-text/use-format-types.js.map +1 -1
  598. package/build/components/rich-text/use-input-rules.js +9 -15
  599. package/build/components/rich-text/use-input-rules.js.map +1 -1
  600. package/build/components/rich-text/use-mark-persistent.js +4 -5
  601. package/build/components/rich-text/use-mark-persistent.js.map +1 -1
  602. package/build/components/rich-text/use-paste-handler.js +5 -7
  603. package/build/components/rich-text/use-paste-handler.js.map +1 -1
  604. package/build/components/rich-text/utils.js +5 -7
  605. package/build/components/rich-text/utils.js.map +1 -1
  606. package/build/components/skip-to-selected-block/index.js +3 -4
  607. package/build/components/skip-to-selected-block/index.js.map +1 -1
  608. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +38 -0
  609. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -0
  610. package/build/components/spacing-sizes-control/index.js +60 -62
  611. package/build/components/spacing-sizes-control/index.js.map +1 -1
  612. package/build/components/spacing-sizes-control/{axial-input-controls.js → input-controls/axial.js} +21 -22
  613. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -0
  614. package/build/components/spacing-sizes-control/{input-controls.js → input-controls/separated.js} +22 -22
  615. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -0
  616. package/build/components/spacing-sizes-control/input-controls/single.js +51 -0
  617. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -0
  618. package/build/components/spacing-sizes-control/{spacing-input-control.js → input-controls/spacing-input-control.js} +51 -69
  619. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -0
  620. package/build/components/spacing-sizes-control/sides-dropdown/index.js +84 -0
  621. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -0
  622. package/build/components/spacing-sizes-control/utils.js +213 -31
  623. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  624. package/build/components/text-decoration-control/index.js +5 -6
  625. package/build/components/text-decoration-control/index.js.map +1 -1
  626. package/build/components/text-transform-control/index.js +5 -6
  627. package/build/components/text-transform-control/index.js.map +1 -1
  628. package/build/components/tool-selector/index.js +13 -16
  629. package/build/components/tool-selector/index.js.map +1 -1
  630. package/build/components/typewriter/index.js +6 -9
  631. package/build/components/typewriter/index.js.map +1 -1
  632. package/build/components/ungroup-button/index.native.js +11 -16
  633. package/build/components/ungroup-button/index.native.js.map +1 -1
  634. package/build/components/unit-control/index.js +4 -5
  635. package/build/components/unit-control/index.js.map +1 -1
  636. package/build/components/url-input/index.js +15 -26
  637. package/build/components/url-input/index.js.map +1 -1
  638. package/build/components/url-input/index.native.js +6 -8
  639. package/build/components/url-input/index.native.js.map +1 -1
  640. package/build/components/url-popover/image-url-input-ui.js +12 -15
  641. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  642. package/build/components/url-popover/index.js +12 -14
  643. package/build/components/url-popover/index.js.map +1 -1
  644. package/build/components/url-popover/link-editor.js +7 -8
  645. package/build/components/url-popover/link-editor.js.map +1 -1
  646. package/build/components/url-popover/link-viewer-url.js +5 -6
  647. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  648. package/build/components/url-popover/link-viewer.js +8 -9
  649. package/build/components/url-popover/link-viewer.js.map +1 -1
  650. package/build/components/use-block-display-information/index.js +2 -2
  651. package/build/components/use-block-display-information/index.js.map +1 -1
  652. package/build/components/use-block-drop-zone/index.js +16 -23
  653. package/build/components/use-block-drop-zone/index.js.map +1 -1
  654. package/build/components/use-block-drop-zone/index.native.js +8 -11
  655. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  656. package/build/components/use-moving-animation/index.js +9 -12
  657. package/build/components/use-moving-animation/index.js.map +1 -1
  658. package/build/components/use-on-block-drop/index.js +2 -6
  659. package/build/components/use-on-block-drop/index.js.map +1 -1
  660. package/build/components/use-on-block-drop/index.native.js +8 -10
  661. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  662. package/build/components/use-paste-styles/index.js +2 -6
  663. package/build/components/use-paste-styles/index.js.map +1 -1
  664. package/build/components/warning/index.js +6 -7
  665. package/build/components/warning/index.js.map +1 -1
  666. package/build/components/warning/index.native.js +9 -10
  667. package/build/components/warning/index.native.js.map +1 -1
  668. package/build/components/writing-flow/index.js +4 -5
  669. package/build/components/writing-flow/index.js.map +1 -1
  670. package/build/components/writing-flow/use-drag-selection.js +4 -6
  671. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  672. package/build/components/writing-flow/use-tab-nav.js +9 -6
  673. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  674. package/build/hooks/align.js +7 -14
  675. package/build/hooks/align.js.map +1 -1
  676. package/build/hooks/anchor.js +6 -3
  677. package/build/hooks/anchor.js.map +1 -1
  678. package/build/hooks/aria-label.js +1 -3
  679. package/build/hooks/aria-label.js.map +1 -1
  680. package/build/hooks/behaviors.js +91 -58
  681. package/build/hooks/behaviors.js.map +1 -1
  682. package/build/hooks/border.js +25 -38
  683. package/build/hooks/border.js.map +1 -1
  684. package/build/hooks/color.js +22 -37
  685. package/build/hooks/color.js.map +1 -1
  686. package/build/hooks/content-lock-ui.js +26 -30
  687. package/build/hooks/content-lock-ui.js.map +1 -1
  688. package/build/hooks/contrast-checker.js +4 -7
  689. package/build/hooks/contrast-checker.js.map +1 -1
  690. package/build/hooks/custom-class-name.js +5 -4
  691. package/build/hooks/custom-class-name.js.map +1 -1
  692. package/build/hooks/dimensions.js +6 -9
  693. package/build/hooks/dimensions.js.map +1 -1
  694. package/build/hooks/duotone.js +32 -44
  695. package/build/hooks/duotone.js.map +1 -1
  696. package/build/hooks/font-family.js +5 -6
  697. package/build/hooks/font-family.js.map +1 -1
  698. package/build/hooks/font-size.js +14 -21
  699. package/build/hooks/font-size.js.map +1 -1
  700. package/build/hooks/gap.js +5 -6
  701. package/build/hooks/gap.js.map +1 -1
  702. package/build/hooks/layout.js +42 -59
  703. package/build/hooks/layout.js.map +1 -1
  704. package/build/hooks/line-height.js +5 -8
  705. package/build/hooks/line-height.js.map +1 -1
  706. package/build/hooks/lock.js +2 -2
  707. package/build/hooks/lock.js.map +1 -1
  708. package/build/hooks/margin.js +6 -9
  709. package/build/hooks/margin.js.map +1 -1
  710. package/build/hooks/metadata-name.js +4 -5
  711. package/build/hooks/metadata-name.js.map +1 -1
  712. package/build/hooks/metadata.js +3 -7
  713. package/build/hooks/metadata.js.map +1 -1
  714. package/build/hooks/padding.js +6 -9
  715. package/build/hooks/padding.js.map +1 -1
  716. package/build/hooks/position.js +26 -40
  717. package/build/hooks/position.js.map +1 -1
  718. package/build/hooks/settings.js +1 -3
  719. package/build/hooks/settings.js.map +1 -1
  720. package/build/hooks/style.js +12 -19
  721. package/build/hooks/style.js.map +1 -1
  722. package/build/hooks/supports.js +3 -5
  723. package/build/hooks/supports.js.map +1 -1
  724. package/build/hooks/typography.js +18 -27
  725. package/build/hooks/typography.js.map +1 -1
  726. package/build/hooks/typography.native.js +1 -2
  727. package/build/hooks/typography.native.js.map +1 -1
  728. package/build/hooks/use-border-props.js +1 -3
  729. package/build/hooks/use-border-props.js.map +1 -1
  730. package/build/hooks/use-color-props.js +6 -8
  731. package/build/hooks/use-color-props.js.map +1 -1
  732. package/build/hooks/use-editor-wrapper-styles.native.js +34 -39
  733. package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  734. package/build/hooks/use-spacing-props.js +1 -1
  735. package/build/hooks/use-spacing-props.js.map +1 -1
  736. package/build/hooks/use-typography-props.js +8 -12
  737. package/build/hooks/use-typography-props.js.map +1 -1
  738. package/build/hooks/utils.js +6 -18
  739. package/build/hooks/utils.js.map +1 -1
  740. package/build/layouts/constrained.js +22 -27
  741. package/build/layouts/constrained.js.map +1 -1
  742. package/build/layouts/flex.js +43 -54
  743. package/build/layouts/flex.js.map +1 -1
  744. package/build/layouts/flow.js +10 -13
  745. package/build/layouts/flow.js.map +1 -1
  746. package/build/layouts/grid.js +45 -25
  747. package/build/layouts/grid.js.map +1 -1
  748. package/build/layouts/index.js +1 -2
  749. package/build/layouts/index.js.map +1 -1
  750. package/build/layouts/utils.js +3 -9
  751. package/build/layouts/utils.js.map +1 -1
  752. package/build/store/actions.js +251 -334
  753. package/build/store/actions.js.map +1 -1
  754. package/build/store/array.js +1 -2
  755. package/build/store/array.js.map +1 -1
  756. package/build/store/private-actions.js +3 -7
  757. package/build/store/private-actions.js.map +1 -1
  758. package/build/store/private-selectors.js +41 -24
  759. package/build/store/private-selectors.js.map +1 -1
  760. package/build/store/reducer.js +67 -169
  761. package/build/store/reducer.js.map +1 -1
  762. package/build/store/selectors.js +145 -215
  763. package/build/store/selectors.js.map +1 -1
  764. package/build/utils/block-variation-transforms.js +4 -7
  765. package/build/utils/block-variation-transforms.js.map +1 -1
  766. package/build/utils/math.js +1 -2
  767. package/build/utils/math.js.map +1 -1
  768. package/build/utils/object.js +1 -4
  769. package/build/utils/object.js.map +1 -1
  770. package/build/utils/order-inserter-block-items.js +5 -7
  771. package/build/utils/order-inserter-block-items.js.map +1 -1
  772. package/build/utils/parse-css-unit-to-px.js +3 -6
  773. package/build/utils/parse-css-unit-to-px.js.map +1 -1
  774. package/build/utils/pasting.js +5 -8
  775. package/build/utils/pasting.js.map +1 -1
  776. package/build/utils/pre-parse-patterns.js +1 -1
  777. package/build/utils/pre-parse-patterns.js.map +1 -1
  778. package/build/utils/sorting.js +1 -2
  779. package/build/utils/sorting.js.map +1 -1
  780. package/build/utils/transform-styles/index.js +5 -7
  781. package/build/utils/transform-styles/index.js.map +1 -1
  782. package/build/utils/transform-styles/transforms/wrap.js +28 -31
  783. package/build/utils/transform-styles/transforms/wrap.js.map +1 -1
  784. package/build-module/autocompleters/block.js +1 -3
  785. package/build-module/autocompleters/block.js.map +1 -1
  786. package/build-module/components/alignment-control/ui.js +9 -11
  787. package/build-module/components/alignment-control/ui.js.map +1 -1
  788. package/build-module/components/autocomplete/index.js +3 -4
  789. package/build-module/components/autocomplete/index.js.map +1 -1
  790. package/build-module/components/block-actions/index.js +8 -12
  791. package/build-module/components/block-actions/index.js.map +1 -1
  792. package/build-module/components/block-alignment-control/ui.js +17 -21
  793. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  794. package/build-module/components/block-alignment-control/ui.native.js +14 -17
  795. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  796. package/build-module/components/block-alignment-control/use-available-alignments.js +5 -10
  797. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  798. package/build-module/components/block-alignment-matrix-control/index.js +4 -6
  799. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  800. package/build-module/components/block-breadcrumb/index.js +3 -4
  801. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  802. package/build-module/components/block-caption/index.native.js +29 -34
  803. package/build-module/components/block-caption/index.native.js.map +1 -1
  804. package/build-module/components/block-card/index.js +7 -9
  805. package/build-module/components/block-card/index.js.map +1 -1
  806. package/build-module/components/block-compare/block-view.js +8 -9
  807. package/build-module/components/block-compare/block-view.js.map +1 -1
  808. package/build-module/components/block-compare/index.js +7 -9
  809. package/build-module/components/block-compare/index.js.map +1 -1
  810. package/build-module/components/block-context/index.js +4 -5
  811. package/build-module/components/block-context/index.js.map +1 -1
  812. package/build-module/components/block-controls/fill.js +17 -23
  813. package/build-module/components/block-controls/fill.js.map +1 -1
  814. package/build-module/components/block-controls/hook.js +1 -3
  815. package/build-module/components/block-controls/hook.js.map +1 -1
  816. package/build-module/components/block-controls/slot.js +29 -21
  817. package/build-module/components/block-controls/slot.js.map +1 -1
  818. package/build-module/components/block-controls/slot.native.js +8 -18
  819. package/build-module/components/block-controls/slot.native.js.map +1 -1
  820. package/build-module/components/block-draggable/draggable-chip.js +5 -7
  821. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  822. package/build-module/components/block-draggable/draggable-chip.native.js +3 -4
  823. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  824. package/build-module/components/block-draggable/dropping-insertion-point.native.js +6 -7
  825. package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  826. package/build-module/components/block-draggable/index.js +16 -17
  827. package/build-module/components/block-draggable/index.js.map +1 -1
  828. package/build-module/components/block-draggable/index.native.js +43 -58
  829. package/build-module/components/block-draggable/index.native.js.map +1 -1
  830. package/build-module/components/block-edit/edit.js +1 -4
  831. package/build-module/components/block-edit/edit.js.map +1 -1
  832. package/build-module/components/block-edit/edit.native.js +1 -4
  833. package/build-module/components/block-edit/edit.native.js.map +1 -1
  834. package/build-module/components/block-edit-visually-button/index.js +3 -4
  835. package/build-module/components/block-edit-visually-button/index.js.map +1 -1
  836. package/build-module/components/block-full-height-alignment-control/index.js +6 -7
  837. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  838. package/build-module/components/block-icon/index.js +7 -11
  839. package/build-module/components/block-icon/index.js.map +1 -1
  840. package/build-module/components/block-icon/index.native.js +9 -13
  841. package/build-module/components/block-icon/index.native.js.map +1 -1
  842. package/build-module/components/block-inspector/index.js +36 -46
  843. package/build-module/components/block-inspector/index.js.map +1 -1
  844. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
  845. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  846. package/build-module/components/block-list/block-html.js +3 -4
  847. package/build-module/components/block-list/block-html.js.map +1 -1
  848. package/build-module/components/block-list/block-invalid-warning.js +3 -4
  849. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  850. package/build-module/components/block-list/block-invalid-warning.native.js +10 -15
  851. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  852. package/build-module/components/block-list/block-list-context.native.js +5 -11
  853. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  854. package/build-module/components/block-list/block-list-item-cell.native.js +5 -6
  855. package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
  856. package/build-module/components/block-list/block-list-item.native.js +17 -18
  857. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  858. package/build-module/components/block-list/block-outline.native.js +8 -9
  859. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  860. package/build-module/components/block-list/block-selection-button.native.js +10 -12
  861. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  862. package/build-module/components/block-list/block.js +39 -46
  863. package/build-module/components/block-list/block.js.map +1 -1
  864. package/build-module/components/block-list/block.native.js +55 -68
  865. package/build-module/components/block-list/block.native.js.map +1 -1
  866. package/build-module/components/block-list/index.js +12 -15
  867. package/build-module/components/block-list/index.js.map +1 -1
  868. package/build-module/components/block-list/index.native.js +77 -86
  869. package/build-module/components/block-list/index.native.js.map +1 -1
  870. package/build-module/components/block-list/insertion-point.native.js +4 -5
  871. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  872. package/build-module/components/block-list/layout.js +6 -9
  873. package/build-module/components/block-list/layout.js.map +1 -1
  874. package/build-module/components/block-list/subdirectory-icon.js +10 -13
  875. package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
  876. package/build-module/components/block-list/use-block-props/index.js +14 -11
  877. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  878. package/build-module/components/block-list/use-block-props/index.native.js +1 -2
  879. package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
  880. package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js +2 -2
  881. package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
  882. package/build-module/components/block-list/use-block-props/use-block-default-class-name.js +1 -1
  883. package/build-module/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
  884. package/build-module/components/block-list/use-in-between-inserter.js +1 -3
  885. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  886. package/build-module/components/block-list-appender/index.js +15 -15
  887. package/build-module/components/block-list-appender/index.js.map +1 -1
  888. package/build-module/components/block-list-appender/index.native.js +9 -11
  889. package/build-module/components/block-list-appender/index.native.js.map +1 -1
  890. package/build-module/components/block-lock/menu-item.js +3 -4
  891. package/build-module/components/block-lock/menu-item.js.map +1 -1
  892. package/build-module/components/block-lock/modal.js +6 -9
  893. package/build-module/components/block-lock/modal.js.map +1 -1
  894. package/build-module/components/block-lock/toolbar.js +5 -10
  895. package/build-module/components/block-lock/toolbar.js.map +1 -1
  896. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +49 -67
  897. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
  898. package/build-module/components/block-mobile-toolbar/index.native.js +26 -34
  899. package/build-module/components/block-mobile-toolbar/index.native.js.map +1 -1
  900. package/build-module/components/block-mover/button.js +6 -7
  901. package/build-module/components/block-mover/button.js.map +1 -1
  902. package/build-module/components/block-mover/index.js +5 -8
  903. package/build-module/components/block-mover/index.js.map +1 -1
  904. package/build-module/components/block-mover/index.native.js +23 -46
  905. package/build-module/components/block-mover/index.native.js.map +1 -1
  906. package/build-module/components/block-mover/mover-description.native.js +7 -10
  907. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  908. package/build-module/components/block-navigation/dropdown.js +20 -25
  909. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  910. package/build-module/components/block-parent-selector/index.js +2 -2
  911. package/build-module/components/block-parent-selector/index.js.map +1 -1
  912. package/build-module/components/block-pattern-setup/index.js +27 -31
  913. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  914. package/build-module/components/block-pattern-setup/setup-toolbar.js +35 -42
  915. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  916. package/build-module/components/block-patterns-list/index.js +71 -78
  917. package/build-module/components/block-patterns-list/index.js.map +1 -1
  918. package/build-module/components/block-popover/drop-zone.js +4 -5
  919. package/build-module/components/block-popover/drop-zone.js.map +1 -1
  920. package/build-module/components/block-popover/inbetween.js +10 -15
  921. package/build-module/components/block-popover/inbetween.js.map +1 -1
  922. package/build-module/components/block-popover/index.js +14 -15
  923. package/build-module/components/block-popover/index.js.map +1 -1
  924. package/build-module/components/block-preview/auto.js +6 -8
  925. package/build-module/components/block-preview/auto.js.map +1 -1
  926. package/build-module/components/block-preview/index.js +15 -18
  927. package/build-module/components/block-preview/index.js.map +1 -1
  928. package/build-module/components/block-settings/button.native.js +7 -10
  929. package/build-module/components/block-settings/button.native.js.map +1 -1
  930. package/build-module/components/block-settings-menu/block-convert-button.js +5 -7
  931. package/build-module/components/block-settings-menu/block-convert-button.js.map +1 -1
  932. package/build-module/components/block-settings-menu/block-html-convert-button.js +10 -14
  933. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  934. package/build-module/components/block-settings-menu/block-mode-toggle.js +19 -25
  935. package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  936. package/build-module/components/block-settings-menu/block-settings-dropdown.js +135 -113
  937. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  938. package/build-module/components/block-settings-menu/index.js +4 -5
  939. package/build-module/components/block-settings-menu/index.js.map +1 -1
  940. package/build-module/components/block-settings-menu-controls/index.js +14 -16
  941. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  942. package/build-module/components/block-styles/index.js +6 -7
  943. package/build-module/components/block-styles/index.js.map +1 -1
  944. package/build-module/components/block-styles/index.native.js +5 -7
  945. package/build-module/components/block-styles/index.native.js.map +1 -1
  946. package/build-module/components/block-styles/menu-items.js +4 -5
  947. package/build-module/components/block-styles/menu-items.js.map +1 -1
  948. package/build-module/components/block-styles/preview-panel.js +7 -10
  949. package/build-module/components/block-styles/preview-panel.js.map +1 -1
  950. package/build-module/components/block-styles/preview.native.js +6 -7
  951. package/build-module/components/block-styles/preview.native.js.map +1 -1
  952. package/build-module/components/block-styles/use-styles-for-block.js +7 -9
  953. package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
  954. package/build-module/components/block-styles/utils.js +4 -7
  955. package/build-module/components/block-styles/utils.js.map +1 -1
  956. package/build-module/components/block-switcher/block-styles-menu.js +4 -5
  957. package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
  958. package/build-module/components/block-switcher/block-transformations-menu.js +24 -29
  959. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  960. package/build-module/components/block-switcher/block-transformations-menu.native.js +9 -10
  961. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  962. package/build-module/components/block-switcher/block-variation-transformations.js +21 -30
  963. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  964. package/build-module/components/block-switcher/index.js +47 -60
  965. package/build-module/components/block-switcher/index.js.map +1 -1
  966. package/build-module/components/block-switcher/pattern-transformations-menu.js +18 -22
  967. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  968. package/build-module/components/block-switcher/preview-block-popover.js +3 -4
  969. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  970. package/build-module/components/block-switcher/utils.js +2 -3
  971. package/build-module/components/block-switcher/utils.js.map +1 -1
  972. package/build-module/components/block-title/index.js +5 -6
  973. package/build-module/components/block-title/index.js.map +1 -1
  974. package/build-module/components/block-title/use-block-display-title.js +5 -6
  975. package/build-module/components/block-title/use-block-display-title.js.map +1 -1
  976. package/build-module/components/block-toolbar/index.js +4 -5
  977. package/build-module/components/block-toolbar/index.js.map +1 -1
  978. package/build-module/components/block-toolbar/utils.js +14 -16
  979. package/build-module/components/block-toolbar/utils.js.map +1 -1
  980. package/build-module/components/block-tools/back-compat.js +3 -4
  981. package/build-module/components/block-tools/back-compat.js.map +1 -1
  982. package/build-module/components/block-tools/block-contextual-toolbar.js +5 -6
  983. package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
  984. package/build-module/components/block-tools/block-selection-button.js +6 -9
  985. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  986. package/build-module/components/block-tools/index.js +6 -7
  987. package/build-module/components/block-tools/index.js.map +1 -1
  988. package/build-module/components/block-tools/insertion-point.js +7 -10
  989. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  990. package/build-module/components/block-tools/selected-block-popover.js +19 -20
  991. package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
  992. package/build-module/components/block-tools/use-block-toolbar-popover-props.js +9 -14
  993. package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  994. package/build-module/components/block-tools/zoom-out-mode-inserters.js +3 -4
  995. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  996. package/build-module/components/block-types-list/index.js +8 -9
  997. package/build-module/components/block-types-list/index.js.map +1 -1
  998. package/build-module/components/block-types-list/index.native.js +22 -27
  999. package/build-module/components/block-types-list/index.native.js.map +1 -1
  1000. package/build-module/components/block-variation-picker/index.js +8 -9
  1001. package/build-module/components/block-variation-picker/index.js.map +1 -1
  1002. package/build-module/components/block-variation-picker/index.native.js +7 -9
  1003. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  1004. package/build-module/components/block-variation-transforms/index.js +30 -41
  1005. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  1006. package/build-module/components/block-vertical-alignment-control/ui.js +7 -9
  1007. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  1008. package/build-module/components/border-radius-control/all-input-control.js +7 -8
  1009. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  1010. package/build-module/components/border-radius-control/index.js +9 -10
  1011. package/build-module/components/border-radius-control/index.js.map +1 -1
  1012. package/build-module/components/border-radius-control/input-controls.js +8 -11
  1013. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  1014. package/build-module/components/border-radius-control/linked-button.js +4 -5
  1015. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  1016. package/build-module/components/border-radius-control/utils.js +3 -7
  1017. package/build-module/components/border-radius-control/utils.js.map +1 -1
  1018. package/build-module/components/button-block-appender/index.js +13 -15
  1019. package/build-module/components/button-block-appender/index.js.map +1 -1
  1020. package/build-module/components/button-block-appender/index.native.js +25 -29
  1021. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  1022. package/build-module/components/caption/index.native.js +40 -43
  1023. package/build-module/components/caption/index.native.js.map +1 -1
  1024. package/build-module/components/child-layout-control/index.js +5 -6
  1025. package/build-module/components/child-layout-control/index.js.map +1 -1
  1026. package/build-module/components/color-palette/control.js +5 -6
  1027. package/build-module/components/color-palette/control.js.map +1 -1
  1028. package/build-module/components/color-palette/with-color-context.js +1 -6
  1029. package/build-module/components/color-palette/with-color-context.js.map +1 -1
  1030. package/build-module/components/color-style-selector/index.js +28 -35
  1031. package/build-module/components/color-style-selector/index.js.map +1 -1
  1032. package/build-module/components/colors/utils.js +5 -8
  1033. package/build-module/components/colors/utils.js.map +1 -1
  1034. package/build-module/components/colors/with-colors.js +9 -24
  1035. package/build-module/components/colors/with-colors.js.map +1 -1
  1036. package/build-module/components/colors-gradients/control.js +19 -21
  1037. package/build-module/components/colors-gradients/control.js.map +1 -1
  1038. package/build-module/components/colors-gradients/dropdown.js +32 -39
  1039. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  1040. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +20 -24
  1041. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  1042. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +27 -31
  1043. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  1044. package/build-module/components/contrast-checker/index.js +12 -13
  1045. package/build-module/components/contrast-checker/index.js.map +1 -1
  1046. package/build-module/components/contrast-checker/index.native.js +16 -18
  1047. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  1048. package/build-module/components/convert-to-group-buttons/index.js +9 -10
  1049. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  1050. package/build-module/components/convert-to-group-buttons/index.native.js +6 -7
  1051. package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
  1052. package/build-module/components/convert-to-group-buttons/toolbar.js +6 -12
  1053. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  1054. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js +4 -6
  1055. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  1056. package/build-module/components/copy-handler/index.js +4 -7
  1057. package/build-module/components/copy-handler/index.js.map +1 -1
  1058. package/build-module/components/date-format-picker/index.js +12 -16
  1059. package/build-module/components/date-format-picker/index.js.map +1 -1
  1060. package/build-module/components/default-block-appender/index.js +7 -9
  1061. package/build-module/components/default-block-appender/index.js.map +1 -1
  1062. package/build-module/components/default-block-appender/index.native.js +8 -10
  1063. package/build-module/components/default-block-appender/index.native.js.map +1 -1
  1064. package/build-module/components/default-style-picker/index.js +14 -22
  1065. package/build-module/components/default-style-picker/index.js.map +1 -1
  1066. package/build-module/components/duotone/components.js +14 -18
  1067. package/build-module/components/duotone/components.js.map +1 -1
  1068. package/build-module/components/duotone/utils.js +1 -2
  1069. package/build-module/components/duotone/utils.js.map +1 -1
  1070. package/build-module/components/duotone-control/index.js +12 -15
  1071. package/build-module/components/duotone-control/index.js.map +1 -1
  1072. package/build-module/components/editable-text/index.js +5 -6
  1073. package/build-module/components/editable-text/index.js.map +1 -1
  1074. package/build-module/components/editor-styles/index.js +4 -5
  1075. package/build-module/components/editor-styles/index.js.map +1 -1
  1076. package/build-module/components/floating-toolbar/index.native.js +7 -8
  1077. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  1078. package/build-module/components/font-appearance-control/index.js +19 -26
  1079. package/build-module/components/font-appearance-control/index.js.map +1 -1
  1080. package/build-module/components/font-family/index.js +10 -12
  1081. package/build-module/components/font-family/index.js.map +1 -1
  1082. package/build-module/components/font-sizes/fluid-utils.js +17 -21
  1083. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  1084. package/build-module/components/font-sizes/utils.js +6 -12
  1085. package/build-module/components/font-sizes/utils.js.map +1 -1
  1086. package/build-module/components/font-sizes/with-font-sizes.js +11 -30
  1087. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  1088. package/build-module/components/global-styles/advanced-panel.js +7 -10
  1089. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  1090. package/build-module/components/global-styles/border-panel.js +45 -78
  1091. package/build-module/components/global-styles/border-panel.js.map +1 -1
  1092. package/build-module/components/global-styles/color-panel.js +104 -147
  1093. package/build-module/components/global-styles/color-panel.js.map +1 -1
  1094. package/build-module/components/global-styles/color-panel.native.js +25 -42
  1095. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  1096. package/build-module/components/global-styles/dimensions-panel.js +78 -109
  1097. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  1098. package/build-module/components/global-styles/effects-panel.js +58 -72
  1099. package/build-module/components/global-styles/effects-panel.js.map +1 -1
  1100. package/build-module/components/global-styles/filters-panel.js +53 -71
  1101. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  1102. package/build-module/components/global-styles/get-block-css-selector.js +5 -8
  1103. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  1104. package/build-module/components/global-styles/hooks.js +22 -37
  1105. package/build-module/components/global-styles/hooks.js.map +1 -1
  1106. package/build-module/components/global-styles/typography-panel.js +69 -125
  1107. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  1108. package/build-module/components/global-styles/typography-utils.js +48 -26
  1109. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  1110. package/build-module/components/global-styles/use-global-styles-output.js +142 -237
  1111. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  1112. package/build-module/components/global-styles/utils.js +12 -28
  1113. package/build-module/components/global-styles/utils.js.map +1 -1
  1114. package/build-module/components/gradients/use-gradient.js +6 -7
  1115. package/build-module/components/gradients/use-gradient.js.map +1 -1
  1116. package/build-module/components/height-control/index.js +9 -10
  1117. package/build-module/components/height-control/index.js.map +1 -1
  1118. package/build-module/components/iframe/index.js +51 -86
  1119. package/build-module/components/iframe/index.js.map +1 -1
  1120. package/build-module/components/iframe/use-compatibility-styles.js +29 -20
  1121. package/build-module/components/iframe/use-compatibility-styles.js.map +1 -1
  1122. package/build-module/components/image-editor/aspect-ratio-dropdown.js +83 -91
  1123. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  1124. package/build-module/components/image-editor/context.js +9 -10
  1125. package/build-module/components/image-editor/context.js.map +1 -1
  1126. package/build-module/components/image-editor/cropper.js +11 -12
  1127. package/build-module/components/image-editor/cropper.js.map +1 -1
  1128. package/build-module/components/image-editor/index.js +12 -13
  1129. package/build-module/components/image-editor/index.js.map +1 -1
  1130. package/build-module/components/image-editor/use-save-image.js +11 -12
  1131. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  1132. package/build-module/components/image-editor/use-transform-image.js +5 -6
  1133. package/build-module/components/image-editor/use-transform-image.js.map +1 -1
  1134. package/build-module/components/image-editor/zoom-dropdown.js +10 -13
  1135. package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
  1136. package/build-module/components/image-size-control/index.js +12 -13
  1137. package/build-module/components/image-size-control/index.js.map +1 -1
  1138. package/build-module/components/inner-blocks/button-block-appender.js +7 -8
  1139. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  1140. package/build-module/components/inner-blocks/default-block-appender.js +6 -8
  1141. package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
  1142. package/build-module/components/inner-blocks/index.js +2 -6
  1143. package/build-module/components/inner-blocks/index.js.map +1 -1
  1144. package/build-module/components/inner-blocks/index.native.js +1 -3
  1145. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  1146. package/build-module/components/inner-blocks/use-block-context.js +1 -4
  1147. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  1148. package/build-module/components/inner-blocks/use-nested-settings-update.js +2 -4
  1149. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  1150. package/build-module/components/inserter/block-patterns-explorer/explorer.js +9 -11
  1151. package/build-module/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  1152. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +11 -18
  1153. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
  1154. package/build-module/components/inserter/block-patterns-explorer/sidebar.js +20 -24
  1155. package/build-module/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
  1156. package/build-module/components/inserter/block-patterns-tab.js +29 -40
  1157. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  1158. package/build-module/components/inserter/block-types-tab.js +7 -9
  1159. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  1160. package/build-module/components/inserter/block-types-tab.native.js +8 -9
  1161. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  1162. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +3 -5
  1163. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  1164. package/build-module/components/inserter/hooks/use-block-types-state.js +5 -6
  1165. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  1166. package/build-module/components/inserter/hooks/use-clipboard-block.native.js +2 -2
  1167. package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  1168. package/build-module/components/inserter/hooks/use-debounced-input.js +1 -2
  1169. package/build-module/components/inserter/hooks/use-debounced-input.js.map +1 -1
  1170. package/build-module/components/inserter/hooks/use-insertion-point.js +10 -12
  1171. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  1172. package/build-module/components/inserter/index.js +37 -51
  1173. package/build-module/components/inserter/index.js.map +1 -1
  1174. package/build-module/components/inserter/index.native.js +24 -31
  1175. package/build-module/components/inserter/index.native.js.map +1 -1
  1176. package/build-module/components/inserter/library.js +11 -12
  1177. package/build-module/components/inserter/library.js.map +1 -1
  1178. package/build-module/components/inserter/media-tab/hooks.js +2 -5
  1179. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  1180. package/build-module/components/inserter/media-tab/media-list.js +6 -7
  1181. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  1182. package/build-module/components/inserter/media-tab/media-panel.js +12 -14
  1183. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  1184. package/build-module/components/inserter/media-tab/media-preview.js +47 -58
  1185. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  1186. package/build-module/components/inserter/media-tab/media-tab.js +24 -28
  1187. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  1188. package/build-module/components/inserter/media-tab/utils.js +3 -5
  1189. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  1190. package/build-module/components/inserter/menu.js +15 -19
  1191. package/build-module/components/inserter/menu.js.map +1 -1
  1192. package/build-module/components/inserter/menu.native.js +27 -31
  1193. package/build-module/components/inserter/menu.native.js.map +1 -1
  1194. package/build-module/components/inserter/mobile-tab-navigation.js +7 -9
  1195. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  1196. package/build-module/components/inserter/panel.js +5 -6
  1197. package/build-module/components/inserter/panel.js.map +1 -1
  1198. package/build-module/components/inserter/preview-panel.js +4 -5
  1199. package/build-module/components/inserter/preview-panel.js.map +1 -1
  1200. package/build-module/components/inserter/quick-inserter.js +8 -9
  1201. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  1202. package/build-module/components/inserter/reusable-blocks-tab.js +13 -18
  1203. package/build-module/components/inserter/reusable-blocks-tab.js.map +1 -1
  1204. package/build-module/components/inserter/reusable-blocks-tab.native.js +5 -6
  1205. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  1206. package/build-module/components/inserter/search-items.js +12 -40
  1207. package/build-module/components/inserter/search-items.js.map +1 -1
  1208. package/build-module/components/inserter/search-results.js +17 -18
  1209. package/build-module/components/inserter/search-results.js.map +1 -1
  1210. package/build-module/components/inserter/search-results.native.js +11 -12
  1211. package/build-module/components/inserter/search-results.native.js.map +1 -1
  1212. package/build-module/components/inserter/tabs.js +8 -9
  1213. package/build-module/components/inserter/tabs.js.map +1 -1
  1214. package/build-module/components/inserter/tabs.native.js +37 -55
  1215. package/build-module/components/inserter/tabs.native.js.map +1 -1
  1216. package/build-module/components/inserter/utils.native.js +13 -17
  1217. package/build-module/components/inserter/utils.native.js.map +1 -1
  1218. package/build-module/components/inserter-draggable-blocks/index.js +11 -13
  1219. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  1220. package/build-module/components/inserter-list-item/index.js +65 -69
  1221. package/build-module/components/inserter-list-item/index.js.map +1 -1
  1222. package/build-module/components/inserter-listbox/index.js +3 -4
  1223. package/build-module/components/inserter-listbox/index.js.map +1 -1
  1224. package/build-module/components/inserter-listbox/item.js +6 -7
  1225. package/build-module/components/inserter-listbox/item.js.map +1 -1
  1226. package/build-module/components/inspector-controls/block-support-slot-container.js +4 -5
  1227. package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
  1228. package/build-module/components/inspector-controls/block-support-tools-panel.js +6 -8
  1229. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  1230. package/build-module/components/inspector-controls/fill.js +13 -23
  1231. package/build-module/components/inspector-controls/fill.js.map +1 -1
  1232. package/build-module/components/inspector-controls/fill.native.js +7 -11
  1233. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  1234. package/build-module/components/inspector-controls/slot.js +9 -13
  1235. package/build-module/components/inspector-controls/slot.js.map +1 -1
  1236. package/build-module/components/inspector-controls/slot.native.js +6 -10
  1237. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  1238. package/build-module/components/inspector-controls-tabs/index.js +6 -7
  1239. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  1240. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +3 -8
  1241. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  1242. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +1 -1
  1243. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  1244. package/build-module/components/inspector-controls-tabs/settings-tab.js +3 -6
  1245. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  1246. package/build-module/components/inspector-controls-tabs/styles-tab.js +5 -6
  1247. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  1248. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +1 -3
  1249. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  1250. package/build-module/components/inspector-popover-header/index.js +18 -22
  1251. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  1252. package/build-module/components/justify-content-control/ui.js +8 -10
  1253. package/build-module/components/justify-content-control/ui.js.map +1 -1
  1254. package/build-module/components/letter-spacing-control/index.js +6 -7
  1255. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  1256. package/build-module/components/line-height-control/index.js +13 -18
  1257. package/build-module/components/line-height-control/index.js.map +1 -1
  1258. package/build-module/components/line-height-control/index.native.js +4 -5
  1259. package/build-module/components/line-height-control/index.native.js.map +1 -1
  1260. package/build-module/components/link-control/index.js +83 -64
  1261. package/build-module/components/link-control/index.js.map +1 -1
  1262. package/build-module/components/link-control/is-url-like.js +32 -3
  1263. package/build-module/components/link-control/is-url-like.js.map +1 -1
  1264. package/build-module/components/link-control/link-preview.js +24 -27
  1265. package/build-module/components/link-control/link-preview.js.map +1 -1
  1266. package/build-module/components/link-control/search-create-button.js +7 -9
  1267. package/build-module/components/link-control/search-create-button.js.map +1 -1
  1268. package/build-module/components/link-control/search-input.js +22 -27
  1269. package/build-module/components/link-control/search-input.js.map +1 -1
  1270. package/build-module/components/link-control/search-item.js +13 -15
  1271. package/build-module/components/link-control/search-item.js.map +1 -1
  1272. package/build-module/components/link-control/search-results.js +21 -27
  1273. package/build-module/components/link-control/search-results.js.map +1 -1
  1274. package/build-module/components/link-control/settings-drawer.js +7 -33
  1275. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  1276. package/build-module/components/link-control/settings.js +7 -9
  1277. package/build-module/components/link-control/settings.js.map +1 -1
  1278. package/build-module/components/link-control/use-internal-value.js +46 -0
  1279. package/build-module/components/link-control/use-internal-value.js.map +1 -0
  1280. package/build-module/components/link-control/use-rich-url-data.js +1 -1
  1281. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  1282. package/build-module/components/link-control/use-search-handler.js +10 -23
  1283. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  1284. package/build-module/components/list-view/appender.js +11 -12
  1285. package/build-module/components/list-view/appender.js.map +1 -1
  1286. package/build-module/components/list-view/aria-referenced-text.js +35 -0
  1287. package/build-module/components/list-view/aria-referenced-text.js.map +1 -0
  1288. package/build-module/components/list-view/block-contents.js +38 -38
  1289. package/build-module/components/list-view/block-contents.js.map +1 -1
  1290. package/build-module/components/list-view/block-select-button.js +65 -22
  1291. package/build-module/components/list-view/block-select-button.js.map +1 -1
  1292. package/build-module/components/list-view/block.js +117 -101
  1293. package/build-module/components/list-view/block.js.map +1 -1
  1294. package/build-module/components/list-view/branch.js +5 -5
  1295. package/build-module/components/list-view/branch.js.map +1 -1
  1296. package/build-module/components/list-view/drop-indicator.js +4 -5
  1297. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  1298. package/build-module/components/list-view/expander.js +3 -4
  1299. package/build-module/components/list-view/expander.js.map +1 -1
  1300. package/build-module/components/list-view/index.js +46 -43
  1301. package/build-module/components/list-view/index.js.map +1 -1
  1302. package/build-module/components/list-view/leaf.js +10 -11
  1303. package/build-module/components/list-view/leaf.js.map +1 -1
  1304. package/build-module/components/list-view/use-block-selection.js +4 -6
  1305. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  1306. package/build-module/components/list-view/use-list-view-client-ids.js +9 -12
  1307. package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
  1308. package/build-module/components/list-view/use-list-view-drop-zone.js +25 -13
  1309. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  1310. package/build-module/components/list-view/use-list-view-expand-selected-item.js +4 -5
  1311. package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  1312. package/build-module/components/list-view/use-list-view-scroll-into-view.js +5 -6
  1313. package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  1314. package/build-module/components/media-placeholder/index.js +71 -92
  1315. package/build-module/components/media-placeholder/index.js.map +1 -1
  1316. package/build-module/components/media-placeholder/index.native.js +5 -6
  1317. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  1318. package/build-module/components/media-replace-flow/index.js +94 -107
  1319. package/build-module/components/media-replace-flow/index.js.map +1 -1
  1320. package/build-module/components/media-upload/check.js +4 -5
  1321. package/build-module/components/media-upload/check.js.map +1 -1
  1322. package/build-module/components/media-upload/index.native.js +1 -1
  1323. package/build-module/components/media-upload/index.native.js.map +1 -1
  1324. package/build-module/components/multi-selection-inspector/index.js +3 -4
  1325. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  1326. package/build-module/components/navigable-toolbar/index.js +16 -15
  1327. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  1328. package/build-module/components/observe-typing/index.js +3 -4
  1329. package/build-module/components/observe-typing/index.js.map +1 -1
  1330. package/build-module/components/panel-color-settings/index.js +4 -5
  1331. package/build-module/components/panel-color-settings/index.js.map +1 -1
  1332. package/build-module/components/plain-text/index.js +4 -6
  1333. package/build-module/components/plain-text/index.js.map +1 -1
  1334. package/build-module/components/plain-text/index.native.js +8 -14
  1335. package/build-module/components/plain-text/index.native.js.map +1 -1
  1336. package/build-module/components/preview-options/index.js +8 -9
  1337. package/build-module/components/preview-options/index.js.map +1 -1
  1338. package/build-module/components/provider/block-refs-provider.js +3 -4
  1339. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  1340. package/build-module/components/provider/use-block-sync.js +7 -8
  1341. package/build-module/components/provider/use-block-sync.js.map +1 -1
  1342. package/build-module/components/provider/with-registry-provider.js +5 -7
  1343. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  1344. package/build-module/components/publish-date-time-picker/index.js +6 -7
  1345. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  1346. package/build-module/components/recursion-provider/index.js +7 -11
  1347. package/build-module/components/recursion-provider/index.js.map +1 -1
  1348. package/build-module/components/resizable-box-popover/index.js +5 -6
  1349. package/build-module/components/resizable-box-popover/index.js.map +1 -1
  1350. package/build-module/components/responsive-block-control/label.js +5 -6
  1351. package/build-module/components/responsive-block-control/label.js.map +1 -1
  1352. package/build-module/components/rich-text/embed-handler-picker.native.js +6 -10
  1353. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  1354. package/build-module/components/rich-text/format-edit.js +7 -8
  1355. package/build-module/components/rich-text/format-edit.js.map +1 -1
  1356. package/build-module/components/rich-text/format-toolbar/index.js +9 -18
  1357. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  1358. package/build-module/components/rich-text/format-toolbar-container.js +13 -16
  1359. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  1360. package/build-module/components/rich-text/index.js +43 -47
  1361. package/build-module/components/rich-text/index.js.map +1 -1
  1362. package/build-module/components/rich-text/index.native.js +130 -157
  1363. package/build-module/components/rich-text/index.native.js.map +1 -1
  1364. package/build-module/components/rich-text/input-event.js +4 -5
  1365. package/build-module/components/rich-text/input-event.js.map +1 -1
  1366. package/build-module/components/rich-text/shortcut.js +5 -6
  1367. package/build-module/components/rich-text/shortcut.js.map +1 -1
  1368. package/build-module/components/rich-text/split-value.js +8 -10
  1369. package/build-module/components/rich-text/split-value.js.map +1 -1
  1370. package/build-module/components/rich-text/toolbar-button.js +6 -7
  1371. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  1372. package/build-module/components/rich-text/use-before-input-rules.js +1 -4
  1373. package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
  1374. package/build-module/components/rich-text/use-enter.js +3 -6
  1375. package/build-module/components/rich-text/use-enter.js.map +1 -1
  1376. package/build-module/components/rich-text/use-firefox-compat.js +29 -1
  1377. package/build-module/components/rich-text/use-firefox-compat.js.map +1 -1
  1378. package/build-module/components/rich-text/use-format-types.js +11 -17
  1379. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  1380. package/build-module/components/rich-text/use-input-rules.js +9 -15
  1381. package/build-module/components/rich-text/use-input-rules.js.map +1 -1
  1382. package/build-module/components/rich-text/use-mark-persistent.js +4 -5
  1383. package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
  1384. package/build-module/components/rich-text/use-paste-handler.js +5 -7
  1385. package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
  1386. package/build-module/components/rich-text/utils.js +5 -7
  1387. package/build-module/components/rich-text/utils.js.map +1 -1
  1388. package/build-module/components/skip-to-selected-block/index.js +3 -4
  1389. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  1390. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +27 -0
  1391. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -0
  1392. package/build-module/components/spacing-sizes-control/index.js +62 -63
  1393. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  1394. package/build-module/components/spacing-sizes-control/{axial-input-controls.js → input-controls/axial.js} +21 -22
  1395. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -0
  1396. package/build-module/components/spacing-sizes-control/{input-controls.js → input-controls/separated.js} +21 -21
  1397. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -0
  1398. package/build-module/components/spacing-sizes-control/input-controls/single.js +40 -0
  1399. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -0
  1400. package/build-module/components/spacing-sizes-control/{spacing-input-control.js → input-controls/spacing-input-control.js} +53 -70
  1401. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -0
  1402. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +73 -0
  1403. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -0
  1404. package/build-module/components/spacing-sizes-control/utils.js +196 -25
  1405. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  1406. package/build-module/components/text-decoration-control/index.js +5 -6
  1407. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1408. package/build-module/components/text-transform-control/index.js +5 -6
  1409. package/build-module/components/text-transform-control/index.js.map +1 -1
  1410. package/build-module/components/tool-selector/index.js +13 -16
  1411. package/build-module/components/tool-selector/index.js.map +1 -1
  1412. package/build-module/components/typewriter/index.js +6 -9
  1413. package/build-module/components/typewriter/index.js.map +1 -1
  1414. package/build-module/components/ungroup-button/index.native.js +11 -14
  1415. package/build-module/components/ungroup-button/index.native.js.map +1 -1
  1416. package/build-module/components/unit-control/index.js +4 -5
  1417. package/build-module/components/unit-control/index.js.map +1 -1
  1418. package/build-module/components/url-input/index.js +15 -26
  1419. package/build-module/components/url-input/index.js.map +1 -1
  1420. package/build-module/components/url-input/index.native.js +6 -8
  1421. package/build-module/components/url-input/index.native.js.map +1 -1
  1422. package/build-module/components/url-popover/image-url-input-ui.js +12 -15
  1423. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  1424. package/build-module/components/url-popover/index.js +12 -14
  1425. package/build-module/components/url-popover/index.js.map +1 -1
  1426. package/build-module/components/url-popover/link-editor.js +7 -8
  1427. package/build-module/components/url-popover/link-editor.js.map +1 -1
  1428. package/build-module/components/url-popover/link-viewer-url.js +5 -6
  1429. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  1430. package/build-module/components/url-popover/link-viewer.js +8 -9
  1431. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  1432. package/build-module/components/use-block-display-information/index.js +2 -2
  1433. package/build-module/components/use-block-display-information/index.js.map +1 -1
  1434. package/build-module/components/use-block-drop-zone/index.js +16 -23
  1435. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  1436. package/build-module/components/use-block-drop-zone/index.native.js +8 -11
  1437. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  1438. package/build-module/components/use-moving-animation/index.js +9 -12
  1439. package/build-module/components/use-moving-animation/index.js.map +1 -1
  1440. package/build-module/components/use-on-block-drop/index.js +2 -6
  1441. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  1442. package/build-module/components/use-on-block-drop/index.native.js +8 -10
  1443. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  1444. package/build-module/components/use-paste-styles/index.js +2 -6
  1445. package/build-module/components/use-paste-styles/index.js.map +1 -1
  1446. package/build-module/components/warning/index.js +6 -7
  1447. package/build-module/components/warning/index.js.map +1 -1
  1448. package/build-module/components/warning/index.native.js +9 -10
  1449. package/build-module/components/warning/index.native.js.map +1 -1
  1450. package/build-module/components/writing-flow/index.js +4 -5
  1451. package/build-module/components/writing-flow/index.js.map +1 -1
  1452. package/build-module/components/writing-flow/use-drag-selection.js +4 -6
  1453. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  1454. package/build-module/components/writing-flow/use-tab-nav.js +9 -6
  1455. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  1456. package/build-module/hooks/align.js +7 -14
  1457. package/build-module/hooks/align.js.map +1 -1
  1458. package/build-module/hooks/anchor.js +5 -3
  1459. package/build-module/hooks/anchor.js.map +1 -1
  1460. package/build-module/hooks/aria-label.js +1 -3
  1461. package/build-module/hooks/aria-label.js.map +1 -1
  1462. package/build-module/hooks/behaviors.js +90 -58
  1463. package/build-module/hooks/behaviors.js.map +1 -1
  1464. package/build-module/hooks/border.js +25 -38
  1465. package/build-module/hooks/border.js.map +1 -1
  1466. package/build-module/hooks/color.js +22 -37
  1467. package/build-module/hooks/color.js.map +1 -1
  1468. package/build-module/hooks/content-lock-ui.js +23 -27
  1469. package/build-module/hooks/content-lock-ui.js.map +1 -1
  1470. package/build-module/hooks/contrast-checker.js +4 -7
  1471. package/build-module/hooks/contrast-checker.js.map +1 -1
  1472. package/build-module/hooks/custom-class-name.js +4 -4
  1473. package/build-module/hooks/custom-class-name.js.map +1 -1
  1474. package/build-module/hooks/dimensions.js +6 -9
  1475. package/build-module/hooks/dimensions.js.map +1 -1
  1476. package/build-module/hooks/duotone.js +32 -44
  1477. package/build-module/hooks/duotone.js.map +1 -1
  1478. package/build-module/hooks/font-family.js +5 -6
  1479. package/build-module/hooks/font-family.js.map +1 -1
  1480. package/build-module/hooks/font-size.js +14 -21
  1481. package/build-module/hooks/font-size.js.map +1 -1
  1482. package/build-module/hooks/gap.js +5 -6
  1483. package/build-module/hooks/gap.js.map +1 -1
  1484. package/build-module/hooks/layout.js +42 -59
  1485. package/build-module/hooks/layout.js.map +1 -1
  1486. package/build-module/hooks/line-height.js +5 -8
  1487. package/build-module/hooks/line-height.js.map +1 -1
  1488. package/build-module/hooks/lock.js +2 -2
  1489. package/build-module/hooks/lock.js.map +1 -1
  1490. package/build-module/hooks/margin.js +6 -9
  1491. package/build-module/hooks/margin.js.map +1 -1
  1492. package/build-module/hooks/metadata-name.js +4 -5
  1493. package/build-module/hooks/metadata-name.js.map +1 -1
  1494. package/build-module/hooks/metadata.js +3 -7
  1495. package/build-module/hooks/metadata.js.map +1 -1
  1496. package/build-module/hooks/padding.js +6 -9
  1497. package/build-module/hooks/padding.js.map +1 -1
  1498. package/build-module/hooks/position.js +26 -40
  1499. package/build-module/hooks/position.js.map +1 -1
  1500. package/build-module/hooks/settings.js +1 -3
  1501. package/build-module/hooks/settings.js.map +1 -1
  1502. package/build-module/hooks/style.js +11 -19
  1503. package/build-module/hooks/style.js.map +1 -1
  1504. package/build-module/hooks/supports.js +3 -5
  1505. package/build-module/hooks/supports.js.map +1 -1
  1506. package/build-module/hooks/typography.js +18 -27
  1507. package/build-module/hooks/typography.js.map +1 -1
  1508. package/build-module/hooks/typography.native.js +1 -2
  1509. package/build-module/hooks/typography.native.js.map +1 -1
  1510. package/build-module/hooks/use-border-props.js +1 -3
  1511. package/build-module/hooks/use-border-props.js.map +1 -1
  1512. package/build-module/hooks/use-color-props.js +6 -8
  1513. package/build-module/hooks/use-color-props.js.map +1 -1
  1514. package/build-module/hooks/use-editor-wrapper-styles.native.js +34 -39
  1515. package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  1516. package/build-module/hooks/use-spacing-props.js +1 -1
  1517. package/build-module/hooks/use-spacing-props.js.map +1 -1
  1518. package/build-module/hooks/use-typography-props.js +8 -12
  1519. package/build-module/hooks/use-typography-props.js.map +1 -1
  1520. package/build-module/hooks/utils.js +7 -19
  1521. package/build-module/hooks/utils.js.map +1 -1
  1522. package/build-module/layouts/constrained.js +22 -27
  1523. package/build-module/layouts/constrained.js.map +1 -1
  1524. package/build-module/layouts/flex.js +43 -54
  1525. package/build-module/layouts/flex.js.map +1 -1
  1526. package/build-module/layouts/flow.js +10 -13
  1527. package/build-module/layouts/flow.js.map +1 -1
  1528. package/build-module/layouts/grid.js +45 -25
  1529. package/build-module/layouts/grid.js.map +1 -1
  1530. package/build-module/layouts/index.js +1 -2
  1531. package/build-module/layouts/index.js.map +1 -1
  1532. package/build-module/layouts/utils.js +3 -9
  1533. package/build-module/layouts/utils.js.map +1 -1
  1534. package/build-module/store/actions.js +253 -336
  1535. package/build-module/store/actions.js.map +1 -1
  1536. package/build-module/store/array.js +1 -2
  1537. package/build-module/store/array.js.map +1 -1
  1538. package/build-module/store/private-actions.js +3 -7
  1539. package/build-module/store/private-actions.js.map +1 -1
  1540. package/build-module/store/private-selectors.js +40 -25
  1541. package/build-module/store/private-selectors.js.map +1 -1
  1542. package/build-module/store/reducer.js +67 -169
  1543. package/build-module/store/reducer.js.map +1 -1
  1544. package/build-module/store/selectors.js +144 -215
  1545. package/build-module/store/selectors.js.map +1 -1
  1546. package/build-module/utils/block-variation-transforms.js +4 -7
  1547. package/build-module/utils/block-variation-transforms.js.map +1 -1
  1548. package/build-module/utils/math.js +1 -2
  1549. package/build-module/utils/math.js.map +1 -1
  1550. package/build-module/utils/object.js +1 -4
  1551. package/build-module/utils/object.js.map +1 -1
  1552. package/build-module/utils/order-inserter-block-items.js +5 -7
  1553. package/build-module/utils/order-inserter-block-items.js.map +1 -1
  1554. package/build-module/utils/parse-css-unit-to-px.js +3 -6
  1555. package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
  1556. package/build-module/utils/pasting.js +5 -8
  1557. package/build-module/utils/pasting.js.map +1 -1
  1558. package/build-module/utils/pre-parse-patterns.js +1 -1
  1559. package/build-module/utils/pre-parse-patterns.js.map +1 -1
  1560. package/build-module/utils/sorting.js +1 -2
  1561. package/build-module/utils/sorting.js.map +1 -1
  1562. package/build-module/utils/transform-styles/index.js +5 -7
  1563. package/build-module/utils/transform-styles/index.js.map +1 -1
  1564. package/build-module/utils/transform-styles/transforms/wrap.js +25 -28
  1565. package/build-module/utils/transform-styles/transforms/wrap.js.map +1 -1
  1566. package/build-style/content-rtl.css +7 -10
  1567. package/build-style/content.css +7 -10
  1568. package/build-style/style-rtl.css +35 -101
  1569. package/build-style/style.css +35 -101
  1570. package/package.json +31 -31
  1571. package/src/components/block-controls/fill.js +15 -17
  1572. package/src/components/block-controls/slot.js +21 -18
  1573. package/src/components/block-controls/slot.native.js +3 -8
  1574. package/src/components/block-draggable/index.js +2 -1
  1575. package/src/components/block-edit/test/edit.js +1 -1
  1576. package/src/components/block-inspector/index.js +1 -0
  1577. package/src/components/block-list/content.scss +8 -12
  1578. package/src/components/block-list/use-block-props/index.js +6 -1
  1579. package/src/components/block-list-appender/index.js +4 -1
  1580. package/src/components/block-lock/toolbar.js +2 -8
  1581. package/src/components/block-settings-menu/block-settings-dropdown.js +81 -41
  1582. package/src/components/block-tools/selected-block-popover.js +6 -0
  1583. package/src/components/color-palette/test/__snapshots__/control.js.snap +66 -50
  1584. package/src/components/color-palette/with-color-context.js +2 -6
  1585. package/src/components/colors-gradients/control.js +3 -3
  1586. package/src/components/colors-gradients/panel-color-gradient-settings.js +4 -5
  1587. package/src/components/global-styles/dimensions-panel.js +14 -5
  1588. package/src/components/global-styles/get-block-css-selector.js +2 -2
  1589. package/src/components/global-styles/test/typography-utils.js +139 -1
  1590. package/src/components/global-styles/typography-utils.js +53 -28
  1591. package/src/components/global-styles/use-global-styles-output.js +18 -8
  1592. package/src/components/global-styles/utils.js +9 -3
  1593. package/src/components/iframe/index.js +46 -68
  1594. package/src/components/iframe/use-compatibility-styles.js +34 -18
  1595. package/src/components/inspector-controls/README.md +1 -1
  1596. package/src/components/inspector-controls/fill.js +2 -6
  1597. package/src/components/inspector-controls-tabs/index.js +0 -1
  1598. package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +0 -1
  1599. package/src/components/link-control/index.js +71 -33
  1600. package/src/components/link-control/is-url-like.js +40 -3
  1601. package/src/components/link-control/search-results.js +4 -14
  1602. package/src/components/link-control/settings-drawer.js +2 -37
  1603. package/src/components/link-control/settings.js +2 -2
  1604. package/src/components/link-control/style.scss +5 -6
  1605. package/src/components/link-control/test/index.js +169 -61
  1606. package/src/components/link-control/test/is-url-like.js +66 -0
  1607. package/src/components/link-control/use-internal-value.js +60 -0
  1608. package/src/components/link-control/use-search-handler.js +10 -27
  1609. package/src/components/list-view/appender.js +3 -5
  1610. package/src/components/list-view/aria-referenced-text.js +30 -0
  1611. package/src/components/list-view/block-contents.js +9 -8
  1612. package/src/components/list-view/block-select-button.js +59 -1
  1613. package/src/components/list-view/block.js +40 -10
  1614. package/src/components/list-view/index.js +29 -19
  1615. package/src/components/list-view/style.scss +0 -5
  1616. package/src/components/list-view/test/use-list-view-drop-zone.js +38 -1
  1617. package/src/components/list-view/use-block-selection.js +2 -2
  1618. package/src/components/list-view/use-list-view-drop-zone.js +22 -4
  1619. package/src/components/media-replace-flow/test/index.js +1 -1
  1620. package/src/components/navigable-toolbar/index.js +7 -5
  1621. package/src/components/rich-text/index.js +1 -1
  1622. package/src/components/rich-text/use-firefox-compat.js +27 -1
  1623. package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +26 -0
  1624. package/src/components/spacing-sizes-control/index.js +85 -71
  1625. package/src/components/spacing-sizes-control/{axial-input-controls.js → input-controls/axial.js} +14 -13
  1626. package/src/components/spacing-sizes-control/{input-controls.js → input-controls/separated.js} +15 -14
  1627. package/src/components/spacing-sizes-control/input-controls/single.js +40 -0
  1628. package/src/components/spacing-sizes-control/{spacing-input-control.js → input-controls/spacing-input-control.js} +55 -80
  1629. package/src/components/spacing-sizes-control/sides-dropdown/index.js +91 -0
  1630. package/src/components/spacing-sizes-control/style.scss +28 -100
  1631. package/src/components/spacing-sizes-control/test/utils.js +233 -4
  1632. package/src/components/spacing-sizes-control/utils.js +203 -20
  1633. package/src/components/ungroup-button/index.native.js +2 -2
  1634. package/src/components/writing-flow/use-tab-nav.js +14 -3
  1635. package/src/hooks/anchor.js +3 -1
  1636. package/src/hooks/behaviors.js +116 -60
  1637. package/src/hooks/custom-class-name.js +23 -19
  1638. package/src/hooks/layout.js +4 -1
  1639. package/src/hooks/style.js +3 -1
  1640. package/src/hooks/utils.js +8 -7
  1641. package/src/layouts/grid.js +29 -3
  1642. package/src/store/private-selectors.js +54 -32
  1643. package/src/store/reducer.js +6 -8
  1644. package/src/store/selectors.js +31 -20
  1645. package/src/store/test/private-selectors.js +237 -62
  1646. package/src/store/test/reducer.js +0 -7
  1647. package/src/store/test/selectors.js +99 -0
  1648. package/build/components/link-control/use-internal-input-value.js +0 -27
  1649. package/build/components/link-control/use-internal-input-value.js.map +0 -1
  1650. package/build/components/spacing-sizes-control/all-input-control.js +0 -57
  1651. package/build/components/spacing-sizes-control/all-input-control.js.map +0 -1
  1652. package/build/components/spacing-sizes-control/axial-input-controls.js.map +0 -1
  1653. package/build/components/spacing-sizes-control/input-controls.js.map +0 -1
  1654. package/build/components/spacing-sizes-control/linked-button.js +0 -37
  1655. package/build/components/spacing-sizes-control/linked-button.js.map +0 -1
  1656. package/build/components/spacing-sizes-control/spacing-input-control.js.map +0 -1
  1657. package/build/components/ungroup-button/icon.js +0 -31
  1658. package/build/components/ungroup-button/icon.js.map +0 -1
  1659. package/build-module/components/link-control/use-internal-input-value.js +0 -19
  1660. package/build-module/components/link-control/use-internal-input-value.js.map +0 -1
  1661. package/build-module/components/spacing-sizes-control/all-input-control.js +0 -45
  1662. package/build-module/components/spacing-sizes-control/all-input-control.js.map +0 -1
  1663. package/build-module/components/spacing-sizes-control/axial-input-controls.js.map +0 -1
  1664. package/build-module/components/spacing-sizes-control/input-controls.js.map +0 -1
  1665. package/build-module/components/spacing-sizes-control/linked-button.js +0 -27
  1666. package/build-module/components/spacing-sizes-control/linked-button.js.map +0 -1
  1667. package/build-module/components/spacing-sizes-control/spacing-input-control.js.map +0 -1
  1668. package/build-module/components/ungroup-button/icon.js +0 -22
  1669. package/build-module/components/ungroup-button/icon.js.map +0 -1
  1670. package/src/components/link-control/use-internal-input-value.js +0 -23
  1671. package/src/components/spacing-sizes-control/all-input-control.js +0 -44
  1672. package/src/components/spacing-sizes-control/linked-button.js +0 -24
  1673. package/src/components/ungroup-button/icon.js +0 -26
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/hooks/supports.js"],"names":["getBlockSupport","hasBlockSupport","Platform","ALIGN_SUPPORT_KEY","ALIGN_WIDE_SUPPORT_KEY","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","CUSTOM_CLASS_NAME_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","LINE_HEIGHT_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","LETTER_SPACING_SUPPORT_KEY","LAYOUT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","SPACING_SUPPORT_KEY","styleSupportKeys","hasAlignSupport","nameOrType","getAlignSupport","hasAlignWideSupport","getAlignWideSupport","hasBorderSupport","feature","OS","support","color","radius","width","style","getBorderSupport","hasColorSupport","colorSupport","link","gradient","background","text","hasLinkColorSupport","hasGradientSupport","gradients","hasBackgroundColorSupport","hasTextColorSupport","getColorSupport","hasCustomClassNameSupport","getCustomClassNameSupport","hasFontFamilySupport","getFontFamilySupport","hasFontSizeSupport","getFontSizeSupport","hasLayoutSupport","getLayoutSupport","hasStyleSupport","some","key"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,eAA1B,QAAiD,mBAAjD;AACA,SAASC,QAAT,QAAyB,oBAAzB;AAEA,MAAMC,iBAAiB,GAAG,OAA1B;AACA,MAAMC,sBAAsB,GAAG,WAA/B;AACA,MAAMC,kBAAkB,GAAG,sBAA3B;AACA,MAAMC,iBAAiB,GAAG,OAA1B;AACA,MAAMC,6BAA6B,GAAG,iBAAtC;AACA,MAAMC,uBAAuB,GAAG,qCAAhC;AACA,MAAMC,qBAAqB,GAAG,qBAA9B;AACA,MAAMC,uBAAuB,GAAG,uBAAhC;AACA;AACA;AACA;;AACA,MAAMC,sBAAsB,GAAG,oCAA/B;AACA;AACA;AACA;;AACA,MAAMC,uBAAuB,GAAG,qCAAhC;AACA;AACA;AACA;AACA;;AACA,MAAMC,wBAAwB,GAAG,wBAAjC;AACA;AACA;AACA;AACA;;AACA,MAAMC,2BAA2B,GAAG,yCAApC;AACA;AACA;AACA;AACA;;AACA,MAAMC,0BAA0B,GAAG,wCAAnC;AACA;AACA;AACA;AACA;;AACA,MAAMC,0BAA0B,GAAG,wCAAnC;AACA,MAAMC,kBAAkB,GAAG,sBAA3B;AACA,MAAMC,uBAAuB,GAAG,CAC/BR,uBAD+B,EAE/BD,qBAF+B,EAG/BE,sBAH+B,EAI/BC,uBAJ+B,EAK/BJ,uBAL+B,EAM/BK,wBAN+B,EAO/BC,2BAP+B,EAQ/BC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CrB,eAAe,CAAEqB,UAAF,EAAcb,qBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM2C,kBAAkB,GAAK9B,UAAF,IACjCtB,eAAe,CAAEsB,UAAF,EAAcb,qBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM4C,gBAAgB,GAAK/B,UAAF,IAC/BrB,eAAe,CAAEqB,UAAF,EAAcL,kBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMqC,gBAAgB,GAAKhC,UAAF,IAC/BtB,eAAe,CAAEsB,UAAF,EAAcL,kBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMsC,eAAe,GAAKjC,UAAF,IAC9BF,gBAAgB,CAACoC,IAAjB,CAAyBC,GAAF,IAAWxD,eAAe,CAAEqB,UAAF,EAAcmC,GAAd,CAAjD,CADM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\n\nconst ALIGN_SUPPORT_KEY = 'align';\nconst ALIGN_WIDE_SUPPORT_KEY = 'alignWide';\nconst BORDER_SUPPORT_KEY = '__experimentalBorder';\nconst COLOR_SUPPORT_KEY = 'color';\nconst CUSTOM_CLASS_NAME_SUPPORT_KEY = 'customClassName';\nconst FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';\nconst FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\nconst LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n/**\n * Key within block settings' support array indicating support for font style.\n */\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\n/**\n * Key within block settings' support array indicating support for font weight.\n */\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\n/**\n * Key within block settings' supports array indicating support for text\n * columns e.g. settings found in `block.json`.\n */\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\n/**\n * Key within block settings' supports array indicating support for text\n * decorations e.g. settings found in `block.json`.\n */\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\n/**\n * Key within block settings' supports array indicating support for text\n * transforms e.g. settings found in `block.json`.\n */\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\n/**\n * Key within block settings' supports array indicating support for letter-spacing\n * e.g. settings found in `block.json`.\n */\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst LAYOUT_SUPPORT_KEY = '__experimentalLayout';\nconst TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\nconst SPACING_SUPPORT_KEY = 'spacing';\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n];\n\n/**\n * Returns true if the block defines support for align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for align wide.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignWideSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align wide, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignWideSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Determine whether there is block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to check support for.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasBorderSupport( nameOrType, feature = 'any' ) {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst support = getBlockSupport( nameOrType, BORDER_SUPPORT_KEY );\n\n\tif ( support === true ) {\n\t\treturn true;\n\t}\n\n\tif ( feature === 'any' ) {\n\t\treturn !! (\n\t\t\tsupport?.color ||\n\t\t\tsupport?.radius ||\n\t\t\tsupport?.width ||\n\t\t\tsupport?.style\n\t\t);\n\t}\n\n\treturn !! support?.[ feature ];\n}\n\n/**\n * Get block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getBorderSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ BORDER_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\treturn (\n\t\tcolorSupport &&\n\t\t( colorSupport.link === true ||\n\t\t\tcolorSupport.gradient === true ||\n\t\t\tcolorSupport.background !== false ||\n\t\t\tcolorSupport.text !== false )\n\t);\n};\n\n/**\n * Returns true if the block defines support for link color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLinkColorSupport = ( nameOrType ) => {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.link\n\t);\n};\n\n/**\n * Returns true if the block defines support for gradient color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasGradientSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.gradients\n\t);\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasBackgroundColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.background !== false;\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.text !== false;\n};\n\n/**\n * Get block support for color properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Color feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getColorSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ COLOR_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for custom class name.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasCustomClassNameSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns the block support value for custom class name, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getCustomClassNameSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns true if the block defines support for font family.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontFamilySupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font family, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontFamilySupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for font size.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontSizeSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font size, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontSizeSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for layout.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLayoutSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns the block support value for layout, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getLayoutSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for style.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/hooks/supports.js"],"names":["getBlockSupport","hasBlockSupport","Platform","ALIGN_SUPPORT_KEY","ALIGN_WIDE_SUPPORT_KEY","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","CUSTOM_CLASS_NAME_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","LINE_HEIGHT_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","LETTER_SPACING_SUPPORT_KEY","LAYOUT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","SPACING_SUPPORT_KEY","styleSupportKeys","hasAlignSupport","nameOrType","getAlignSupport","hasAlignWideSupport","getAlignWideSupport","hasBorderSupport","feature","OS","support","color","radius","width","style","getBorderSupport","hasColorSupport","colorSupport","link","gradient","background","text","hasLinkColorSupport","hasGradientSupport","gradients","hasBackgroundColorSupport","hasTextColorSupport","getColorSupport","hasCustomClassNameSupport","getCustomClassNameSupport","hasFontFamilySupport","getFontFamilySupport","hasFontSizeSupport","getFontSizeSupport","hasLayoutSupport","getLayoutSupport","hasStyleSupport","some","key"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,eAA1B,QAAiD,mBAAjD;AACA,SAASC,QAAT,QAAyB,oBAAzB;AAEA,MAAMC,iBAAiB,GAAG,OAA1B;AACA,MAAMC,sBAAsB,GAAG,WAA/B;AACA,MAAMC,kBAAkB,GAAG,sBAA3B;AACA,MAAMC,iBAAiB,GAAG,OAA1B;AACA,MAAMC,6BAA6B,GAAG,iBAAtC;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,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMyC,yBAAyB,GAAK1B,UAAF,IACxCtB,eAAe,CAAEsB,UAAF,EAAcf,6BAAd,EAA6C,IAA7C,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM0C,oBAAoB,GAAK3B,UAAF,IACnCrB,eAAe,CAAEqB,UAAF,EAAcd,uBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM0C,oBAAoB,GAAK5B,UAAF,IACnCtB,eAAe,CAAEsB,UAAF,EAAcd,uBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM2C,kBAAkB,GAAK7B,UAAF,IACjCrB,eAAe,CAAEqB,UAAF,EAAcb,qBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM2C,kBAAkB,GAAK9B,UAAF,IACjCtB,eAAe,CAAEsB,UAAF,EAAcb,qBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM4C,gBAAgB,GAAK/B,UAAF,IAC/BrB,eAAe,CAAEqB,UAAF,EAAcL,kBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMqC,gBAAgB,GAAKhC,UAAF,IAC/BtB,eAAe,CAAEsB,UAAF,EAAcL,kBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMsC,eAAe,GAAKjC,UAAF,IAC9BF,gBAAgB,CAACoC,IAAjB,CAAyBC,GAAF,IAAWxD,eAAe,CAAEqB,UAAF,EAAcmC,GAAd,CAAjD,CADM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\n\nconst ALIGN_SUPPORT_KEY = 'align';\nconst ALIGN_WIDE_SUPPORT_KEY = 'alignWide';\nconst BORDER_SUPPORT_KEY = '__experimentalBorder';\nconst COLOR_SUPPORT_KEY = 'color';\nconst CUSTOM_CLASS_NAME_SUPPORT_KEY = 'customClassName';\nconst FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';\nconst FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\nconst LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n/**\n * Key within block settings' support array indicating support for font style.\n */\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\n/**\n * Key within block settings' support array indicating support for font weight.\n */\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\n/**\n * Key within block settings' supports array indicating support for text\n * columns e.g. settings found in `block.json`.\n */\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\n/**\n * Key within block settings' supports array indicating support for text\n * decorations e.g. settings found in `block.json`.\n */\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\n/**\n * Key within block settings' supports array indicating support for text\n * transforms e.g. settings found in `block.json`.\n */\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\n/**\n * Key within block settings' supports array indicating support for letter-spacing\n * e.g. settings found in `block.json`.\n */\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst LAYOUT_SUPPORT_KEY = '__experimentalLayout';\nconst TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\nconst SPACING_SUPPORT_KEY = 'spacing';\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n];\n\n/**\n * Returns true if the block defines support for align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for align wide.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignWideSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align wide, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignWideSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Determine whether there is block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to check support for.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasBorderSupport( nameOrType, feature = 'any' ) {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst support = getBlockSupport( nameOrType, BORDER_SUPPORT_KEY );\n\n\tif ( support === true ) {\n\t\treturn true;\n\t}\n\n\tif ( feature === 'any' ) {\n\t\treturn !! (\n\t\t\tsupport?.color ||\n\t\t\tsupport?.radius ||\n\t\t\tsupport?.width ||\n\t\t\tsupport?.style\n\t\t);\n\t}\n\n\treturn !! support?.[ feature ];\n}\n\n/**\n * Get block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getBorderSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ BORDER_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\treturn (\n\t\tcolorSupport &&\n\t\t( colorSupport.link === true ||\n\t\t\tcolorSupport.gradient === true ||\n\t\t\tcolorSupport.background !== false ||\n\t\t\tcolorSupport.text !== false )\n\t);\n};\n\n/**\n * Returns true if the block defines support for link color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLinkColorSupport = ( nameOrType ) => {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.link\n\t);\n};\n\n/**\n * Returns true if the block defines support for gradient color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasGradientSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.gradients\n\t);\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasBackgroundColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.background !== false;\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.text !== false;\n};\n\n/**\n * Get block support for color properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Color feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getColorSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ COLOR_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for custom class name.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasCustomClassNameSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns the block support value for custom class name, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getCustomClassNameSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns true if the block defines support for font family.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontFamilySupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font family, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontFamilySupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for font size.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontSizeSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font size, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontSizeSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for layout.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLayoutSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns the block support value for layout, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getLayoutSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for style.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n"]}
@@ -17,10 +17,7 @@ import { FONT_SIZE_SUPPORT_KEY } from './font-size';
17
17
  import { cleanEmptyObject, useBlockSettings } from './utils';
18
18
 
19
19
  function omit(object, keys) {
20
- return Object.fromEntries(Object.entries(object).filter(_ref => {
21
- let [key] = _ref;
22
- return !keys.includes(key);
23
- }));
20
+ return Object.fromEntries(Object.entries(object).filter(([key]) => !keys.includes(key)));
24
21
  }
25
22
 
26
23
  const LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';
@@ -33,14 +30,12 @@ export const TYPOGRAPHY_SUPPORT_KEY = 'typography';
33
30
  export const TYPOGRAPHY_SUPPORT_KEYS = [LINE_HEIGHT_SUPPORT_KEY, FONT_SIZE_SUPPORT_KEY, FONT_STYLE_SUPPORT_KEY, FONT_WEIGHT_SUPPORT_KEY, FONT_FAMILY_SUPPORT_KEY, TEXT_COLUMNS_SUPPORT_KEY, TEXT_DECORATION_SUPPORT_KEY, TEXT_TRANSFORM_SUPPORT_KEY, LETTER_SPACING_SUPPORT_KEY];
34
31
 
35
32
  function styleToAttributes(style) {
36
- var _style$typography, _style$typography2;
37
-
38
33
  const updatedStyle = { ...omit(style, ['fontFamily'])
39
34
  };
40
- const fontSizeValue = style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.fontSize;
41
- const fontFamilyValue = style === null || style === void 0 ? void 0 : (_style$typography2 = style.typography) === null || _style$typography2 === void 0 ? void 0 : _style$typography2.fontFamily;
42
- const fontSizeSlug = fontSizeValue !== null && fontSizeValue !== void 0 && fontSizeValue.startsWith('var:preset|font-size|') ? fontSizeValue.substring('var:preset|font-size|'.length) : undefined;
43
- const fontFamilySlug = fontFamilyValue !== null && fontFamilyValue !== void 0 && fontFamilyValue.startsWith('var:preset|font-family|') ? fontFamilyValue.substring('var:preset|font-family|'.length) : undefined;
35
+ const fontSizeValue = style?.typography?.fontSize;
36
+ const fontFamilyValue = style?.typography?.fontFamily;
37
+ const fontSizeSlug = fontSizeValue?.startsWith('var:preset|font-size|') ? fontSizeValue.substring('var:preset|font-size|'.length) : undefined;
38
+ const fontFamilySlug = fontFamilyValue?.startsWith('var:preset|font-family|') ? fontFamilyValue.substring('var:preset|font-family|'.length) : undefined;
44
39
  updatedStyle.typography = { ...omit(updatedStyle.typography, ['fontFamily']),
45
40
  fontSize: fontSizeSlug ? undefined : fontSizeValue
46
41
  };
@@ -52,21 +47,18 @@ function styleToAttributes(style) {
52
47
  }
53
48
 
54
49
  function attributesToStyle(attributes) {
55
- var _attributes$style, _attributes$style2, _attributes$style2$ty;
56
-
57
50
  return { ...attributes.style,
58
- typography: { ...((_attributes$style = attributes.style) === null || _attributes$style === void 0 ? void 0 : _attributes$style.typography),
51
+ typography: { ...attributes.style?.typography,
59
52
  fontFamily: attributes.fontFamily ? 'var:preset|font-family|' + attributes.fontFamily : undefined,
60
- fontSize: attributes.fontSize ? 'var:preset|font-size|' + attributes.fontSize : (_attributes$style2 = attributes.style) === null || _attributes$style2 === void 0 ? void 0 : (_attributes$style2$ty = _attributes$style2.typography) === null || _attributes$style2$ty === void 0 ? void 0 : _attributes$style2$ty.fontSize
53
+ fontSize: attributes.fontSize ? 'var:preset|font-size|' + attributes.fontSize : attributes.style?.typography?.fontSize
61
54
  }
62
55
  };
63
56
  }
64
57
 
65
- function TypographyInspectorControl(_ref2) {
66
- let {
67
- children,
68
- resetAllFilter
69
- } = _ref2;
58
+ function TypographyInspectorControl({
59
+ children,
60
+ resetAllFilter
61
+ }) {
70
62
  const attributesResetAllFilter = useCallback(attributes => {
71
63
  const existingStyle = attributesToStyle(attributes);
72
64
  const updatedStyle = resetAllFilter(existingStyle);
@@ -80,14 +72,13 @@ function TypographyInspectorControl(_ref2) {
80
72
  }, children);
81
73
  }
82
74
 
83
- export function TypographyPanel(_ref3) {
84
- let {
85
- clientId,
86
- name,
87
- attributes,
88
- setAttributes,
89
- __unstableParentLayout
90
- } = _ref3;
75
+ export function TypographyPanel({
76
+ clientId,
77
+ name,
78
+ attributes,
79
+ setAttributes,
80
+ __unstableParentLayout
81
+ }) {
91
82
  const settings = useBlockSettings(name, __unstableParentLayout);
92
83
  const isEnabled = useHasTypographyPanel(settings);
93
84
  const value = useMemo(() => {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/hooks/typography.js"],"names":["getBlockSupport","hasBlockSupport","useMemo","useCallback","InspectorControls","default","StylesTypographyPanel","useHasTypographyPanel","LINE_HEIGHT_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","cleanEmptyObject","useBlockSettings","omit","object","keys","Object","fromEntries","entries","filter","key","includes","LETTER_SPACING_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","styleToAttributes","style","updatedStyle","fontSizeValue","typography","fontSize","fontFamilyValue","fontFamily","fontSizeSlug","startsWith","substring","length","undefined","fontFamilySlug","attributesToStyle","attributes","TypographyInspectorControl","children","resetAllFilter","attributesResetAllFilter","existingStyle","TypographyPanel","clientId","name","setAttributes","__unstableParentLayout","settings","isEnabled","value","onChange","newStyle","defaultControls","hasTypographySupport","blockName","some"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,eAA1B,QAAiD,mBAAjD;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,oBAArC;AAEA;AACA;AACA;;AACA,OAAOC,iBAAP,MAA8B,kCAA9B;AACA,SACCC,OAAO,IAAIC,qBADZ,EAECC,qBAFD,QAGO,8CAHP;AAKA,SAASC,uBAAT,QAAwC,eAAxC;AACA,SAASC,uBAAT,QAAwC,eAAxC;AACA,SAASC,qBAAT,QAAsC,aAAtC;AACA,SAASC,gBAAT,EAA2BC,gBAA3B,QAAmD,SAAnD;;AAEA,SAASC,IAAT,CAAeC,MAAf,EAAuBC,IAAvB,EAA8B;AAC7B,SAAOC,MAAM,CAACC,WAAP,CACND,MAAM,CAACE,OAAP,CAAgBJ,MAAhB,EAAyBK,MAAzB,CAAiC;AAAA,QAAE,CAAEC,GAAF,CAAF;AAAA,WAAe,CAAEL,IAAI,CAACM,QAAL,CAAeD,GAAf,CAAjB;AAAA,GAAjC,CADM,CAAP;AAGA;;AAED,MAAME,0BAA0B,GAAG,wCAAnC;AACA,MAAMC,0BAA0B,GAAG,wCAAnC;AACA,MAAMC,2BAA2B,GAAG,yCAApC;AACA,MAAMC,wBAAwB,GAAG,wBAAjC;AACA,MAAMC,sBAAsB,GAAG,oCAA/B;AACA,MAAMC,uBAAuB,GAAG,qCAAhC;AACA,OAAO,MAAMC,sBAAsB,GAAG,YAA/B;AACP,OAAO,MAAMC,uBAAuB,GAAG,CACtCrB,uBADsC,EAEtCE,qBAFsC,EAGtCgB,sBAHsC,EAItCC,uBAJsC,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AEQ,UAAU,CAACR,UAFE;AAGzBF,MAAAA,QAAQ,EAAEU,UAAU,CAACV;AAHI,KAAF,CAAxB;AAKA,GANoB,EAMlB,CAAEU,UAAU,CAACd,KAAb,EAAoBc,UAAU,CAACV,QAA/B,EAAyCU,UAAU,CAACR,UAApD,CANkB,CAArB;;AAQA,QAAMsB,QAAQ,GAAKC,QAAF,IAAgB;AAChCN,IAAAA,aAAa,CAAExB,iBAAiB,CAAE8B,QAAF,CAAnB,CAAb;AACA,GAFD;;AAIA,MAAK,CAAEH,SAAP,EAAmB;AAClB,WAAO,IAAP;AACA;;AAED,QAAMI,eAAe,GAAG7D,eAAe,CAAEqD,IAAF,EAAQ,CAC9CzB,sBAD8C,EAE9C,+BAF8C,CAAR,CAAvC;AAKA,SACC,cAAC,qBAAD;AACC,IAAA,EAAE,EAAGkB,0BADN;AAEC,IAAA,OAAO,EAAGM,QAFX;AAGC,IAAA,QAAQ,EAAGI,QAHZ;AAIC,IAAA,KAAK,EAAGE,KAJT;AAKC,IAAA,QAAQ,EAAGC,QALZ;AAMC,IAAA,eAAe,EAAGE;AANnB,IADD;AAUA;AAED,OAAO,MAAMC,oBAAoB,GAAKC,SAAF,IAAiB;AACpD,SAAOlC,uBAAuB,CAACmC,IAAxB,CAAgC5C,GAAF,IACpCnB,eAAe,CAAE8D,SAAF,EAAa3C,GAAb,CADT,CAAP;AAGA,CAJM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\nimport {\n\tdefault as StylesTypographyPanel,\n\tuseHasTypographyPanel,\n} from '../components/global-styles/typography-panel';\n\nimport { LINE_HEIGHT_SUPPORT_KEY } from './line-height';\nimport { FONT_FAMILY_SUPPORT_KEY } from './font-family';\nimport { FONT_SIZE_SUPPORT_KEY } from './font-size';\nimport { cleanEmptyObject, useBlockSettings } from './utils';\n\nfunction omit( object, keys ) {\n\treturn Object.fromEntries(\n\t\tObject.entries( object ).filter( ( [ key ] ) => ! keys.includes( key ) )\n\t);\n}\n\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\n\nfunction styleToAttributes( style ) {\n\tconst updatedStyle = { ...omit( style, [ 'fontFamily' ] ) };\n\tconst fontSizeValue = style?.typography?.fontSize;\n\tconst fontFamilyValue = style?.typography?.fontFamily;\n\tconst fontSizeSlug = fontSizeValue?.startsWith( 'var:preset|font-size|' )\n\t\t? fontSizeValue.substring( 'var:preset|font-size|'.length )\n\t\t: undefined;\n\tconst fontFamilySlug = fontFamilyValue?.startsWith(\n\t\t'var:preset|font-family|'\n\t)\n\t\t? fontFamilyValue.substring( 'var:preset|font-family|'.length )\n\t\t: undefined;\n\tupdatedStyle.typography = {\n\t\t...omit( updatedStyle.typography, [ 'fontFamily' ] ),\n\t\tfontSize: fontSizeSlug ? undefined : fontSizeValue,\n\t};\n\treturn {\n\t\tstyle: cleanEmptyObject( updatedStyle ),\n\t\tfontFamily: fontFamilySlug,\n\t\tfontSize: fontSizeSlug,\n\t};\n}\n\nfunction attributesToStyle( attributes ) {\n\treturn {\n\t\t...attributes.style,\n\t\ttypography: {\n\t\t\t...attributes.style?.typography,\n\t\t\tfontFamily: attributes.fontFamily\n\t\t\t\t? 'var:preset|font-family|' + attributes.fontFamily\n\t\t\t\t: undefined,\n\t\t\tfontSize: attributes.fontSize\n\t\t\t\t? 'var:preset|font-size|' + attributes.fontSize\n\t\t\t\t: attributes.style?.typography?.fontSize,\n\t\t},\n\t};\n}\n\nfunction TypographyInspectorControl( { children, resetAllFilter } ) {\n\tconst attributesResetAllFilter = useCallback(\n\t\t( attributes ) => {\n\t\t\tconst existingStyle = attributesToStyle( attributes );\n\t\t\tconst updatedStyle = resetAllFilter( existingStyle );\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\t...styleToAttributes( updatedStyle ),\n\t\t\t};\n\t\t},\n\t\t[ resetAllFilter ]\n\t);\n\n\treturn (\n\t\t<InspectorControls\n\t\t\tgroup=\"typography\"\n\t\t\tresetAllFilter={ attributesResetAllFilter }\n\t\t>\n\t\t\t{ children }\n\t\t</InspectorControls>\n\t);\n}\n\nexport function TypographyPanel( {\n\tclientId,\n\tname,\n\tattributes,\n\tsetAttributes,\n\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst isEnabled = useHasTypographyPanel( settings );\n\tconst value = useMemo( () => {\n\t\treturn attributesToStyle( {\n\t\t\tstyle: attributes.style,\n\t\t\tfontFamily: attributes.fontFamily,\n\t\t\tfontSize: attributes.fontSize,\n\t\t} );\n\t}, [ attributes.style, attributes.fontSize, attributes.fontFamily ] );\n\n\tconst onChange = ( newStyle ) => {\n\t\tsetAttributes( styleToAttributes( newStyle ) );\n\t};\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst defaultControls = getBlockSupport( name, [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t'__experimentalDefaultControls',\n\t] );\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tas={ TypographyInspectorControl }\n\t\t\tpanelId={ clientId }\n\t\t\tsettings={ settings }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tdefaultControls={ defaultControls }\n\t\t/>\n\t);\n}\n\nexport const hasTypographySupport = ( blockName ) => {\n\treturn TYPOGRAPHY_SUPPORT_KEYS.some( ( key ) =>\n\t\thasBlockSupport( blockName, key )\n\t);\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/hooks/typography.js"],"names":["getBlockSupport","hasBlockSupport","useMemo","useCallback","InspectorControls","default","StylesTypographyPanel","useHasTypographyPanel","LINE_HEIGHT_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","cleanEmptyObject","useBlockSettings","omit","object","keys","Object","fromEntries","entries","filter","key","includes","LETTER_SPACING_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","styleToAttributes","style","updatedStyle","fontSizeValue","typography","fontSize","fontFamilyValue","fontFamily","fontSizeSlug","startsWith","substring","length","undefined","fontFamilySlug","attributesToStyle","attributes","TypographyInspectorControl","children","resetAllFilter","attributesResetAllFilter","existingStyle","TypographyPanel","clientId","name","setAttributes","__unstableParentLayout","settings","isEnabled","value","onChange","newStyle","defaultControls","hasTypographySupport","blockName","some"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,eAA1B,QAAiD,mBAAjD;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,oBAArC;AAEA;AACA;AACA;;AACA,OAAOC,iBAAP,MAA8B,kCAA9B;AACA,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QALZ;AAMC,IAAA,eAAe,EAAGE;AANnB,IADD;AAUA;AAED,OAAO,MAAMC,oBAAoB,GAAKC,SAAF,IAAiB;AACpD,SAAOlC,uBAAuB,CAACmC,IAAxB,CAAgC5C,GAAF,IACpCnB,eAAe,CAAE8D,SAAF,EAAa3C,GAAb,CADT,CAAP;AAGA,CAJM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\nimport {\n\tdefault as StylesTypographyPanel,\n\tuseHasTypographyPanel,\n} from '../components/global-styles/typography-panel';\n\nimport { LINE_HEIGHT_SUPPORT_KEY } from './line-height';\nimport { FONT_FAMILY_SUPPORT_KEY } from './font-family';\nimport { FONT_SIZE_SUPPORT_KEY } from './font-size';\nimport { cleanEmptyObject, useBlockSettings } from './utils';\n\nfunction omit( object, keys ) {\n\treturn Object.fromEntries(\n\t\tObject.entries( object ).filter( ( [ key ] ) => ! keys.includes( key ) )\n\t);\n}\n\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\n\nfunction styleToAttributes( style ) {\n\tconst updatedStyle = { ...omit( style, [ 'fontFamily' ] ) };\n\tconst fontSizeValue = style?.typography?.fontSize;\n\tconst fontFamilyValue = style?.typography?.fontFamily;\n\tconst fontSizeSlug = fontSizeValue?.startsWith( 'var:preset|font-size|' )\n\t\t? fontSizeValue.substring( 'var:preset|font-size|'.length )\n\t\t: undefined;\n\tconst fontFamilySlug = fontFamilyValue?.startsWith(\n\t\t'var:preset|font-family|'\n\t)\n\t\t? fontFamilyValue.substring( 'var:preset|font-family|'.length )\n\t\t: undefined;\n\tupdatedStyle.typography = {\n\t\t...omit( updatedStyle.typography, [ 'fontFamily' ] ),\n\t\tfontSize: fontSizeSlug ? undefined : fontSizeValue,\n\t};\n\treturn {\n\t\tstyle: cleanEmptyObject( updatedStyle ),\n\t\tfontFamily: fontFamilySlug,\n\t\tfontSize: fontSizeSlug,\n\t};\n}\n\nfunction attributesToStyle( attributes ) {\n\treturn {\n\t\t...attributes.style,\n\t\ttypography: {\n\t\t\t...attributes.style?.typography,\n\t\t\tfontFamily: attributes.fontFamily\n\t\t\t\t? 'var:preset|font-family|' + attributes.fontFamily\n\t\t\t\t: undefined,\n\t\t\tfontSize: attributes.fontSize\n\t\t\t\t? 'var:preset|font-size|' + attributes.fontSize\n\t\t\t\t: attributes.style?.typography?.fontSize,\n\t\t},\n\t};\n}\n\nfunction TypographyInspectorControl( { children, resetAllFilter } ) {\n\tconst attributesResetAllFilter = useCallback(\n\t\t( attributes ) => {\n\t\t\tconst existingStyle = attributesToStyle( attributes );\n\t\t\tconst updatedStyle = resetAllFilter( existingStyle );\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\t...styleToAttributes( updatedStyle ),\n\t\t\t};\n\t\t},\n\t\t[ resetAllFilter ]\n\t);\n\n\treturn (\n\t\t<InspectorControls\n\t\t\tgroup=\"typography\"\n\t\t\tresetAllFilter={ attributesResetAllFilter }\n\t\t>\n\t\t\t{ children }\n\t\t</InspectorControls>\n\t);\n}\n\nexport function TypographyPanel( {\n\tclientId,\n\tname,\n\tattributes,\n\tsetAttributes,\n\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst isEnabled = useHasTypographyPanel( settings );\n\tconst value = useMemo( () => {\n\t\treturn attributesToStyle( {\n\t\t\tstyle: attributes.style,\n\t\t\tfontFamily: attributes.fontFamily,\n\t\t\tfontSize: attributes.fontSize,\n\t\t} );\n\t}, [ attributes.style, attributes.fontSize, attributes.fontFamily ] );\n\n\tconst onChange = ( newStyle ) => {\n\t\tsetAttributes( styleToAttributes( newStyle ) );\n\t};\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst defaultControls = getBlockSupport( name, [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t'__experimentalDefaultControls',\n\t] );\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tas={ TypographyInspectorControl }\n\t\t\tpanelId={ clientId }\n\t\t\tsettings={ settings }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tdefaultControls={ defaultControls }\n\t\t/>\n\t);\n}\n\nexport const hasTypographySupport = ( blockName ) => {\n\treturn TYPOGRAPHY_SUPPORT_KEYS.some( ( key ) =>\n\t\thasBlockSupport( blockName, key )\n\t);\n};\n"]}
@@ -32,8 +32,7 @@ const hasTypographySupport = blockName => {
32
32
  return TYPOGRAPHY_SUPPORT_KEYS.some(key => hasBlockSupport(blockName, key));
33
33
  };
34
34
 
35
- function useIsTypographyDisabled() {
36
- let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
35
+ function useIsTypographyDisabled(props = {}) {
37
36
  const configs = [useIsFontSizeDisabled(props), useIsLineHeightDisabled(props)];
38
37
  return configs.filter(Boolean).length === configs.length;
39
38
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/hooks/typography.native.js"],"names":["hasBlockSupport","PanelBody","__","InspectorControls","LINE_HEIGHT_SUPPORT_KEY","LineHeightEdit","useIsLineHeightDisabled","FONT_SIZE_SUPPORT_KEY","FontSizeEdit","useIsFontSizeDisabled","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","TypographyPanel","props","isDisabled","useIsTypographyDisabled","isSupported","hasTypographySupport","name","blockName","some","key","configs","filter","Boolean","length"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,mBAAhC;AACA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA;;AACA,OAAOC,iBAAP,MAA8B,kCAA9B;AAEA,SACCC,uBADD,EAECC,cAFD,EAGCC,uBAHD,QAIO,eAJP;AAKA,SACCC,qBADD,EAECC,YAFD,EAGCC,qBAHD,QAIO,aAJP;AAMA,OAAO,MAAMC,sBAAsB,GAAG,YAA/B;AACP,OAAO,MAAMC,uBAAuB,GAAG,CACtCP,uBADsC,EAEtCG,qBAFsC,CAAhC;AAKP,OAAO,SAASK,eAAT,CAA0BC,KAA1B,EAAkC;AACxC,QAAMC,UAAU,GAAGC,uBAAuB,CAAEF,KAAF,CAA1C;AACA,QAAMG,WAAW,GAAGC,oBAAoB,CAAEJ,KAAK,CAACK,IAAR,CAAxC;AAEA,MAAKJ,UAAU,IAAI,CAAEE,WAArB,EAAmC,OAAO,IAAP;AAEnC,SACC,cAAC,iBAAD,QACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGd,EAAE,CAAE,YAAF;AAArB,KACC,cAAC,YAAD,EAAmBW,KAAnB,CADD,EAEC,cAAC,cAAD,EAAqBA,KAArB,CAFD,CADD,CADD;AAQA;;AAED,MAAMI,oBAAoB,GAAKE,SAAF,IAAiB;AAC7C,SAAOR,uBAAuB,CAACS,IAAxB,CAAgCC,GAAF,IACpCrB,eAAe,CAAEmB,SAAF,EAAaE,GAAb,CADT,CAAP;AAGA,CAJD;;AAMA,SAASN,uBAAT,GAA+C;AAAA,MAAbF,KAAa,uEAAL,EAAK;AAC9C,QAAMS,OAAO,GAAG,CACfb,qBAAqB,CAAEI,KAAF,CADN,EAEfP,uBAAuB,CAAEO,KAAF,CAFR,CAAhB;AAKA,SAAOS,OAAO,CAACC,MAAR,CAAgBC,OAAhB,EAA0BC,MAA1B,KAAqCH,OAAO,CAACG,MAApD;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { hasBlockSupport } from '@wordpress/blocks';\n/**\n * External dependencies\n */\nimport { PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\n\nimport {\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tLineHeightEdit,\n\tuseIsLineHeightDisabled,\n} from './line-height';\nimport {\n\tFONT_SIZE_SUPPORT_KEY,\n\tFontSizeEdit,\n\tuseIsFontSizeDisabled,\n} from './font-size';\n\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n];\n\nexport function TypographyPanel( props ) {\n\tconst isDisabled = useIsTypographyDisabled( props );\n\tconst isSupported = hasTypographySupport( props.name );\n\n\tif ( isDisabled || ! isSupported ) return null;\n\n\treturn (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Typography' ) }>\n\t\t\t\t<FontSizeEdit { ...props } />\n\t\t\t\t<LineHeightEdit { ...props } />\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n}\n\nconst hasTypographySupport = ( blockName ) => {\n\treturn TYPOGRAPHY_SUPPORT_KEYS.some( ( key ) =>\n\t\thasBlockSupport( blockName, key )\n\t);\n};\n\nfunction useIsTypographyDisabled( props = {} ) {\n\tconst configs = [\n\t\tuseIsFontSizeDisabled( props ),\n\t\tuseIsLineHeightDisabled( props ),\n\t];\n\n\treturn configs.filter( Boolean ).length === configs.length;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/hooks/typography.native.js"],"names":["hasBlockSupport","PanelBody","__","InspectorControls","LINE_HEIGHT_SUPPORT_KEY","LineHeightEdit","useIsLineHeightDisabled","FONT_SIZE_SUPPORT_KEY","FontSizeEdit","useIsFontSizeDisabled","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","TypographyPanel","props","isDisabled","useIsTypographyDisabled","isSupported","hasTypographySupport","name","blockName","some","key","configs","filter","Boolean","length"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,mBAAhC;AACA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA;;AACA,OAAOC,iBAAP,MAA8B,kCAA9B;AAEA,SACCC,uBADD,EAECC,cAFD,EAGCC,uBAHD,QAIO,eAJP;AAKA,SACCC,qBADD,EAECC,YAFD,EAGCC,qBAHD,QAIO,aAJP;AAMA,OAAO,MAAMC,sBAAsB,GAAG,YAA/B;AACP,OAAO,MAAMC,uBAAuB,GAAG,CACtCP,uBADsC,EAEtCG,qBAFsC,CAAhC;AAKP,OAAO,SAASK,eAAT,CAA0BC,KAA1B,EAAkC;AACxC,QAAMC,UAAU,GAAGC,uBAAuB,CAAEF,KAAF,CAA1C;AACA,QAAMG,WAAW,GAAGC,oBAAoB,CAAEJ,KAAK,CAACK,IAAR,CAAxC;AAEA,MAAKJ,UAAU,IAAI,CAAEE,WAArB,EAAmC,OAAO,IAAP;AAEnC,SACC,cAAC,iBAAD,QACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGd,EAAE,CAAE,YAAF;AAArB,KACC,cAAC,YAAD,EAAmBW,KAAnB,CADD,EAEC,cAAC,cAAD,EAAqBA,KAArB,CAFD,CADD,CADD;AAQA;;AAED,MAAMI,oBAAoB,GAAKE,SAAF,IAAiB;AAC7C,SAAOR,uBAAuB,CAACS,IAAxB,CAAgCC,GAAF,IACpCrB,eAAe,CAAEmB,SAAF,EAAaE,GAAb,CADT,CAAP;AAGA,CAJD;;AAMA,SAASN,uBAAT,CAAkCF,KAAK,GAAG,EAA1C,EAA+C;AAC9C,QAAMS,OAAO,GAAG,CACfb,qBAAqB,CAAEI,KAAF,CADN,EAEfP,uBAAuB,CAAEO,KAAF,CAFR,CAAhB;AAKA,SAAOS,OAAO,CAACC,MAAR,CAAgBC,OAAhB,EAA0BC,MAA1B,KAAqCH,OAAO,CAACG,MAApD;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { hasBlockSupport } from '@wordpress/blocks';\n/**\n * External dependencies\n */\nimport { PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\n\nimport {\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tLineHeightEdit,\n\tuseIsLineHeightDisabled,\n} from './line-height';\nimport {\n\tFONT_SIZE_SUPPORT_KEY,\n\tFontSizeEdit,\n\tuseIsFontSizeDisabled,\n} from './font-size';\n\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n];\n\nexport function TypographyPanel( props ) {\n\tconst isDisabled = useIsTypographyDisabled( props );\n\tconst isSupported = hasTypographySupport( props.name );\n\n\tif ( isDisabled || ! isSupported ) return null;\n\n\treturn (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Typography' ) }>\n\t\t\t\t<FontSizeEdit { ...props } />\n\t\t\t\t<LineHeightEdit { ...props } />\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n}\n\nconst hasTypographySupport = ( blockName ) => {\n\treturn TYPOGRAPHY_SUPPORT_KEYS.some( ( key ) =>\n\t\thasBlockSupport( blockName, key )\n\t);\n};\n\nfunction useIsTypographyDisabled( props = {} ) {\n\tconst configs = [\n\t\tuseIsFontSizeDisabled( props ),\n\t\tuseIsLineHeightDisabled( props ),\n\t];\n\n\treturn configs.filter( Boolean ).length === configs.length;\n}\n"]}
@@ -16,9 +16,7 @@ import useMultipleOriginColorsAndGradients from '../components/colors-gradients/
16
16
  */
17
17
 
18
18
  export function getBorderClassesAndStyles(attributes) {
19
- var _attributes$style;
20
-
21
- const border = ((_attributes$style = attributes.style) === null || _attributes$style === void 0 ? void 0 : _attributes$style.border) || {};
19
+ const border = attributes.style?.border || {};
22
20
  const className = getBorderClasses(attributes);
23
21
  return {
24
22
  className: className || undefined,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/hooks/use-border-props.js"],"names":["getInlineStyles","getBorderClasses","getMultiOriginColor","useMultipleOriginColorsAndGradients","getBorderClassesAndStyles","attributes","border","style","className","undefined","useBorderProps","colors","borderProps","borderColor","borderColorObject","namedColor","color"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,SAAhC;AACA,SAASC,gBAAT,EAA2BC,mBAA3B,QAAsD,UAAtD;AACA,OAAOC,mCAAP,MAAgD,yEAAhD,C,CAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,yBAAT,CAAoCC,UAApC,EAAiD;AAAA;;AACvD,QAAMC,MAAM,GAAG,sBAAAD,UAAU,CAACE,KAAX,wEAAkBD,MAAlB,KAA4B,EAA3C;AACA,QAAME,SAAS,GAAGP,gBAAgB,CAAEI,UAAF,CAAlC;AAEA,SAAO;AACNG,IAAAA,SAAS,EAAEA,SAAS,IAAIC,SADlB;AAENF,IAAAA,KAAK,EAAEP,eAAe,CAAE;AAAEM,MAAAA;AAAF,KAAF;AAFhB,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASI,cAAT,CAAyBL,UAAzB,EAAsC;AAC5C,QAAM;AAAEM,IAAAA;AAAF,MAAaR,mCAAmC,EAAtD;AACA,QAAMS,WAAW,GAAGR,yBAAyB,CAAEC,UAAF,CAA7C;AACA,QAAM;AAAEQ,IAAAA;AAAF,MAAkBR,UAAxB,CAH4C,CAK5C;AACA;;AACA,MAAKQ,WAAL,EAAmB;AAClB,UAAMC,iBAAiB,GAAGZ,mBAAmB,CAAE;AAC9CS,MAAAA,MAD8C;AAE9CI,MAAAA,UAAU,EAAEF;AAFkC,KAAF,CAA7C;AAKAD,IAAAA,WAAW,CAACL,KAAZ,CAAkBM,WAAlB,GAAgCC,iBAAiB,CAACE,KAAlD;AACA;;AAED,SAAOJ,WAAP;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport { getBorderClasses, getMultiOriginColor } from './border';\nimport useMultipleOriginColorsAndGradients from '../components/colors-gradients/use-multiple-origin-colors-and-gradients';\n\n// This utility is intended to assist where the serialization of the border\n// block support is being skipped for a block but the border related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's border support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n * @return {Object} Border block support derived CSS classes & styles.\n */\nexport function getBorderClassesAndStyles( attributes ) {\n\tconst border = attributes.style?.border || {};\n\tconst className = getBorderClasses( attributes );\n\n\treturn {\n\t\tclassName: className || undefined,\n\t\tstyle: getInlineStyles( { border } ),\n\t};\n}\n\n/**\n * Derives the border related props for a block from its border block support\n * attributes.\n *\n * Inline styles are forced for named colors to ensure these selections are\n * reflected when themes do not load their color stylesheets in the editor.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from border block support.\n */\nexport function useBorderProps( attributes ) {\n\tconst { colors } = useMultipleOriginColorsAndGradients();\n\tconst borderProps = getBorderClassesAndStyles( attributes );\n\tconst { borderColor } = attributes;\n\n\t// Force inline styles to apply named border colors when themes do not load\n\t// their color stylesheets in the editor.\n\tif ( borderColor ) {\n\t\tconst borderColorObject = getMultiOriginColor( {\n\t\t\tcolors,\n\t\t\tnamedColor: borderColor,\n\t\t} );\n\n\t\tborderProps.style.borderColor = borderColorObject.color;\n\t}\n\n\treturn borderProps;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/hooks/use-border-props.js"],"names":["getInlineStyles","getBorderClasses","getMultiOriginColor","useMultipleOriginColorsAndGradients","getBorderClassesAndStyles","attributes","border","style","className","undefined","useBorderProps","colors","borderProps","borderColor","borderColorObject","namedColor","color"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,SAAhC;AACA,SAASC,gBAAT,EAA2BC,mBAA3B,QAAsD,UAAtD;AACA,OAAOC,mCAAP,MAAgD,yEAAhD,C,CAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,yBAAT,CAAoCC,UAApC,EAAiD;AACvD,QAAMC,MAAM,GAAGD,UAAU,CAACE,KAAX,EAAkBD,MAAlB,IAA4B,EAA3C;AACA,QAAME,SAAS,GAAGP,gBAAgB,CAAEI,UAAF,CAAlC;AAEA,SAAO;AACNG,IAAAA,SAAS,EAAEA,SAAS,IAAIC,SADlB;AAENF,IAAAA,KAAK,EAAEP,eAAe,CAAE;AAAEM,MAAAA;AAAF,KAAF;AAFhB,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASI,cAAT,CAAyBL,UAAzB,EAAsC;AAC5C,QAAM;AAAEM,IAAAA;AAAF,MAAaR,mCAAmC,EAAtD;AACA,QAAMS,WAAW,GAAGR,yBAAyB,CAAEC,UAAF,CAA7C;AACA,QAAM;AAAEQ,IAAAA;AAAF,MAAkBR,UAAxB,CAH4C,CAK5C;AACA;;AACA,MAAKQ,WAAL,EAAmB;AAClB,UAAMC,iBAAiB,GAAGZ,mBAAmB,CAAE;AAC9CS,MAAAA,MAD8C;AAE9CI,MAAAA,UAAU,EAAEF;AAFkC,KAAF,CAA7C;AAKAD,IAAAA,WAAW,CAACL,KAAZ,CAAkBM,WAAlB,GAAgCC,iBAAiB,CAACE,KAAlD;AACA;;AAED,SAAOJ,WAAP;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport { getBorderClasses, getMultiOriginColor } from './border';\nimport useMultipleOriginColorsAndGradients from '../components/colors-gradients/use-multiple-origin-colors-and-gradients';\n\n// This utility is intended to assist where the serialization of the border\n// block support is being skipped for a block but the border related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's border support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n * @return {Object} Border block support derived CSS classes & styles.\n */\nexport function getBorderClassesAndStyles( attributes ) {\n\tconst border = attributes.style?.border || {};\n\tconst className = getBorderClasses( attributes );\n\n\treturn {\n\t\tclassName: className || undefined,\n\t\tstyle: getInlineStyles( { border } ),\n\t};\n}\n\n/**\n * Derives the border related props for a block from its border block support\n * attributes.\n *\n * Inline styles are forced for named colors to ensure these selections are\n * reflected when themes do not load their color stylesheets in the editor.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from border block support.\n */\nexport function useBorderProps( attributes ) {\n\tconst { colors } = useMultipleOriginColorsAndGradients();\n\tconst borderProps = getBorderClassesAndStyles( attributes );\n\tconst { borderColor } = attributes;\n\n\t// Force inline styles to apply named border colors when themes do not load\n\t// their color stylesheets in the editor.\n\tif ( borderColor ) {\n\t\tconst borderColorObject = getMultiOriginColor( {\n\t\t\tcolors,\n\t\t\tnamedColor: borderColor,\n\t\t} );\n\n\t\tborderProps.style.borderColor = borderColorObject.color;\n\t}\n\n\treturn borderProps;\n}\n"]}
@@ -31,8 +31,6 @@ import useSetting from '../components/use-setting'; // The code in this file has
31
31
  */
32
32
 
33
33
  export function getColorClassesAndStyles(attributes) {
34
- var _style$color, _style$color2, _style$color3, _style$color4, _style$elements, _style$elements$link;
35
-
36
34
  const {
37
35
  backgroundColor,
38
36
  textColor,
@@ -45,17 +43,17 @@ export function getColorClassesAndStyles(attributes) {
45
43
 
46
44
  const gradientClass = __experimentalGetGradientClass(gradient);
47
45
 
48
- const hasGradient = gradientClass || (style === null || style === void 0 ? void 0 : (_style$color = style.color) === null || _style$color === void 0 ? void 0 : _style$color.gradient); // Determine color CSS class name list.
46
+ const hasGradient = gradientClass || style?.color?.gradient; // Determine color CSS class name list.
49
47
 
50
48
  const className = classnames(textClass, gradientClass, {
51
49
  // Don't apply the background class if there's a gradient.
52
50
  [backgroundClass]: !hasGradient && !!backgroundClass,
53
- 'has-text-color': textColor || (style === null || style === void 0 ? void 0 : (_style$color2 = style.color) === null || _style$color2 === void 0 ? void 0 : _style$color2.text),
54
- 'has-background': backgroundColor || (style === null || style === void 0 ? void 0 : (_style$color3 = style.color) === null || _style$color3 === void 0 ? void 0 : _style$color3.background) || gradient || (style === null || style === void 0 ? void 0 : (_style$color4 = style.color) === null || _style$color4 === void 0 ? void 0 : _style$color4.gradient),
55
- 'has-link-color': style === null || style === void 0 ? void 0 : (_style$elements = style.elements) === null || _style$elements === void 0 ? void 0 : (_style$elements$link = _style$elements.link) === null || _style$elements$link === void 0 ? void 0 : _style$elements$link.color
51
+ 'has-text-color': textColor || style?.color?.text,
52
+ 'has-background': backgroundColor || style?.color?.background || gradient || style?.color?.gradient,
53
+ 'has-link-color': style?.elements?.link?.color
56
54
  }); // Collect inline styles for colors.
57
55
 
58
- const colorStyles = (style === null || style === void 0 ? void 0 : style.color) || {};
56
+ const colorStyles = style?.color || {};
59
57
  const styleProp = getInlineStyles({
60
58
  color: colorStyles
61
59
  });
@@ -91,7 +89,7 @@ export function useColorProps(attributes) {
91
89
  const defaultPalette = useSetting('color.palette.default');
92
90
  const gradientsPerOrigin = useSetting('color.gradients') || EMPTY_OBJECT;
93
91
  const colors = useMemo(() => [...(userPalette || []), ...(themePalette || []), ...(defaultPalette || [])], [userPalette, themePalette, defaultPalette]);
94
- const gradients = useMemo(() => [...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.custom) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.theme) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.default) || [])], [gradientsPerOrigin]);
92
+ const gradients = useMemo(() => [...(gradientsPerOrigin?.custom || []), ...(gradientsPerOrigin?.theme || []), ...(gradientsPerOrigin?.default || [])], [gradientsPerOrigin]);
95
93
  const colorProps = getColorClassesAndStyles(attributes); // Force inline styles to apply colors when themes do not load their color
96
94
  // stylesheets in the editor.
97
95
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/hooks/use-color-props.js"],"names":["classnames","useMemo","getInlineStyles","getColorClassName","getColorObjectByAttributeValues","__experimentalGetGradientClass","getGradientValueBySlug","useSetting","getColorClassesAndStyles","attributes","backgroundColor","textColor","gradient","style","backgroundClass","textClass","gradientClass","hasGradient","color","className","text","background","elements","link","colorStyles","styleProp","undefined","EMPTY_OBJECT","useColorProps","userPalette","themePalette","defaultPalette","gradientsPerOrigin","colors","gradients","custom","theme","default","colorProps","backgroundColorObject","textColorObject"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,eAAT,QAAgC,SAAhC;AACA,SACCC,iBADD,EAECC,+BAFD,QAGO,sBAHP;AAIA,SACCC,8BADD,EAECC,sBAFD,QAGO,yBAHP;AAIA,OAAOC,UAAP,MAAuB,2BAAvB,C,CAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,wBAAT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ANwB,CAAzB;AASA,QAAMM,UAAU,GAAG9B,wBAAwB,CAAEC,UAAF,CAA3C,CA3B2C,CA6B3C;AACA;;AACA,MAAKC,eAAL,EAAuB;AACtB,UAAM6B,qBAAqB,GAAGnC,+BAA+B,CAC5D6B,MAD4D,EAE5DvB,eAF4D,CAA7D;AAKA4B,IAAAA,UAAU,CAACzB,KAAX,CAAiBH,eAAjB,GAAmC6B,qBAAqB,CAACrB,KAAzD;AACA;;AAED,MAAKN,QAAL,EAAgB;AACf0B,IAAAA,UAAU,CAACzB,KAAX,CAAiBQ,UAAjB,GAA8Bf,sBAAsB,CACnD4B,SADmD,EAEnDtB,QAFmD,CAApD;AAIA;;AAED,MAAKD,SAAL,EAAiB;AAChB,UAAM6B,eAAe,GAAGpC,+BAA+B,CACtD6B,MADsD,EAEtDtB,SAFsD,CAAvD;AAKA2B,IAAAA,UAAU,CAACzB,KAAX,CAAiBK,KAAjB,GAAyBsB,eAAe,CAACtB,KAAzC;AACA;;AAED,SAAOoB,UAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n} from '../components/colors';\nimport {\n\t__experimentalGetGradientClass,\n\tgetGradientValueBySlug,\n} from '../components/gradients';\nimport useSetting from '../components/use-setting';\n\n// The code in this file has largely been lifted from the color block support\n// hook.\n//\n// This utility is intended to assist where the serialization of the colors\n// block support is being skipped for a block but the color related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's color support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Color block support derived CSS classes & styles.\n */\nexport function getColorClassesAndStyles( attributes ) {\n\tconst { backgroundColor, textColor, gradient, style } = attributes;\n\n\t// Collect color CSS classes.\n\tconst backgroundClass = getColorClassName(\n\t\t'background-color',\n\t\tbackgroundColor\n\t);\n\tconst textClass = getColorClassName( 'color', textColor );\n\n\tconst gradientClass = __experimentalGetGradientClass( gradient );\n\tconst hasGradient = gradientClass || style?.color?.gradient;\n\n\t// Determine color CSS class name list.\n\tconst className = classnames( textClass, gradientClass, {\n\t\t// Don't apply the background class if there's a gradient.\n\t\t[ backgroundClass ]: ! hasGradient && !! backgroundClass,\n\t\t'has-text-color': textColor || style?.color?.text,\n\t\t'has-background':\n\t\t\tbackgroundColor ||\n\t\t\tstyle?.color?.background ||\n\t\t\tgradient ||\n\t\t\tstyle?.color?.gradient,\n\t\t'has-link-color': style?.elements?.link?.color,\n\t} );\n\n\t// Collect inline styles for colors.\n\tconst colorStyles = style?.color || {};\n\tconst styleProp = getInlineStyles( { color: colorStyles } );\n\n\treturn {\n\t\tclassName: className || undefined,\n\t\tstyle: styleProp,\n\t};\n}\n\nconst EMPTY_OBJECT = {};\n\n/**\n * Determines the color related props for a block derived from its color block\n * support attributes.\n *\n * Inline styles are forced for named colors to ensure these selections are\n * reflected when themes do not load their color stylesheets in the editor.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from colors block support.\n */\nexport function useColorProps( attributes ) {\n\tconst { backgroundColor, textColor, gradient } = attributes;\n\n\t// Some color settings have a special handling for deprecated flags in `useSetting`,\n\t// so we can't unwrap them by doing const { ... } = useSetting('color')\n\t// until https://github.com/WordPress/gutenberg/issues/37094 is fixed.\n\tconst userPalette = useSetting( 'color.palette.custom' );\n\tconst themePalette = useSetting( 'color.palette.theme' );\n\tconst defaultPalette = useSetting( 'color.palette.default' );\n\tconst gradientsPerOrigin = useSetting( 'color.gradients' ) || EMPTY_OBJECT;\n\tconst colors = useMemo(\n\t\t() => [\n\t\t\t...( userPalette || [] ),\n\t\t\t...( themePalette || [] ),\n\t\t\t...( defaultPalette || [] ),\n\t\t],\n\t\t[ userPalette, themePalette, defaultPalette ]\n\t);\n\tconst gradients = useMemo(\n\t\t() => [\n\t\t\t...( gradientsPerOrigin?.custom || [] ),\n\t\t\t...( gradientsPerOrigin?.theme || [] ),\n\t\t\t...( gradientsPerOrigin?.default || [] ),\n\t\t],\n\t\t[ gradientsPerOrigin ]\n\t);\n\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\n\t// Force inline styles to apply colors when themes do not load their color\n\t// stylesheets in the editor.\n\tif ( backgroundColor ) {\n\t\tconst backgroundColorObject = getColorObjectByAttributeValues(\n\t\t\tcolors,\n\t\t\tbackgroundColor\n\t\t);\n\n\t\tcolorProps.style.backgroundColor = backgroundColorObject.color;\n\t}\n\n\tif ( gradient ) {\n\t\tcolorProps.style.background = getGradientValueBySlug(\n\t\t\tgradients,\n\t\t\tgradient\n\t\t);\n\t}\n\n\tif ( textColor ) {\n\t\tconst textColorObject = getColorObjectByAttributeValues(\n\t\t\tcolors,\n\t\t\ttextColor\n\t\t);\n\n\t\tcolorProps.style.color = textColorObject.color;\n\t}\n\n\treturn colorProps;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/hooks/use-color-props.js"],"names":["classnames","useMemo","getInlineStyles","getColorClassName","getColorObjectByAttributeValues","__experimentalGetGradientClass","getGradientValueBySlug","useSetting","getColorClassesAndStyles","attributes","backgroundColor","textColor","gradient","style","backgroundClass","textClass","gradientClass","hasGradient","color","className","text","background","elements","link","colorStyles","styleProp","undefined","EMPTY_OBJECT","useColorProps","userPalette","themePalette","defaultPalette","gradientsPerOrigin","colors","gradients","custom","theme","default","colorProps","backgroundColorObject","textColorObject"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,eAAT,QAAgC,SAAhC;AACA,SACCC,iBADD,EAECC,+BAFD,QAGO,sBAHP;AAIA,SACCC,8BADD,EAECC,sBAFD,QAGO,yBAHP;AAIA,OAAOC,UAAP,MAAuB,2BAAvB,C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,CAACzB,KAAX,CAAiBQ,UAAjB,GAA8Bf,sBAAsB,CACnD4B,SADmD,EAEnDtB,QAFmD,CAApD;AAIA;;AAED,MAAKD,SAAL,EAAiB;AAChB,UAAM6B,eAAe,GAAGpC,+BAA+B,CACtD6B,MADsD,EAEtDtB,SAFsD,CAAvD;AAKA2B,IAAAA,UAAU,CAACzB,KAAX,CAAiBK,KAAjB,GAAyBsB,eAAe,CAACtB,KAAzC;AACA;;AAED,SAAOoB,UAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n} from '../components/colors';\nimport {\n\t__experimentalGetGradientClass,\n\tgetGradientValueBySlug,\n} from '../components/gradients';\nimport useSetting from '../components/use-setting';\n\n// The code in this file has largely been lifted from the color block support\n// hook.\n//\n// This utility is intended to assist where the serialization of the colors\n// block support is being skipped for a block but the color related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's color support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Color block support derived CSS classes & styles.\n */\nexport function getColorClassesAndStyles( attributes ) {\n\tconst { backgroundColor, textColor, gradient, style } = attributes;\n\n\t// Collect color CSS classes.\n\tconst backgroundClass = getColorClassName(\n\t\t'background-color',\n\t\tbackgroundColor\n\t);\n\tconst textClass = getColorClassName( 'color', textColor );\n\n\tconst gradientClass = __experimentalGetGradientClass( gradient );\n\tconst hasGradient = gradientClass || style?.color?.gradient;\n\n\t// Determine color CSS class name list.\n\tconst className = classnames( textClass, gradientClass, {\n\t\t// Don't apply the background class if there's a gradient.\n\t\t[ backgroundClass ]: ! hasGradient && !! backgroundClass,\n\t\t'has-text-color': textColor || style?.color?.text,\n\t\t'has-background':\n\t\t\tbackgroundColor ||\n\t\t\tstyle?.color?.background ||\n\t\t\tgradient ||\n\t\t\tstyle?.color?.gradient,\n\t\t'has-link-color': style?.elements?.link?.color,\n\t} );\n\n\t// Collect inline styles for colors.\n\tconst colorStyles = style?.color || {};\n\tconst styleProp = getInlineStyles( { color: colorStyles } );\n\n\treturn {\n\t\tclassName: className || undefined,\n\t\tstyle: styleProp,\n\t};\n}\n\nconst EMPTY_OBJECT = {};\n\n/**\n * Determines the color related props for a block derived from its color block\n * support attributes.\n *\n * Inline styles are forced for named colors to ensure these selections are\n * reflected when themes do not load their color stylesheets in the editor.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from colors block support.\n */\nexport function useColorProps( attributes ) {\n\tconst { backgroundColor, textColor, gradient } = attributes;\n\n\t// Some color settings have a special handling for deprecated flags in `useSetting`,\n\t// so we can't unwrap them by doing const { ... } = useSetting('color')\n\t// until https://github.com/WordPress/gutenberg/issues/37094 is fixed.\n\tconst userPalette = useSetting( 'color.palette.custom' );\n\tconst themePalette = useSetting( 'color.palette.theme' );\n\tconst defaultPalette = useSetting( 'color.palette.default' );\n\tconst gradientsPerOrigin = useSetting( 'color.gradients' ) || EMPTY_OBJECT;\n\tconst colors = useMemo(\n\t\t() => [\n\t\t\t...( userPalette || [] ),\n\t\t\t...( themePalette || [] ),\n\t\t\t...( defaultPalette || [] ),\n\t\t],\n\t\t[ userPalette, themePalette, defaultPalette ]\n\t);\n\tconst gradients = useMemo(\n\t\t() => [\n\t\t\t...( gradientsPerOrigin?.custom || [] ),\n\t\t\t...( gradientsPerOrigin?.theme || [] ),\n\t\t\t...( gradientsPerOrigin?.default || [] ),\n\t\t],\n\t\t[ gradientsPerOrigin ]\n\t);\n\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\n\t// Force inline styles to apply colors when themes do not load their color\n\t// stylesheets in the editor.\n\tif ( backgroundColor ) {\n\t\tconst backgroundColorObject = getColorObjectByAttributeValues(\n\t\t\tcolors,\n\t\t\tbackgroundColor\n\t\t);\n\n\t\tcolorProps.style.backgroundColor = backgroundColorObject.color;\n\t}\n\n\tif ( gradient ) {\n\t\tcolorProps.style.background = getGradientValueBySlug(\n\t\t\tgradients,\n\t\t\tgradient\n\t\t);\n\t}\n\n\tif ( textColor ) {\n\t\tconst textColorObject = getColorObjectByAttributeValues(\n\t\t\tcolors,\n\t\t\ttextColor\n\t\t);\n\n\t\tcolorProps.style.color = textColorObject.color;\n\t}\n\n\treturn colorProps;\n}\n"]}
@@ -30,13 +30,11 @@ const BLOCK_DEFAULT_MARGIN = 16;
30
30
  * @return {Object} An object containing the styles for the wide width alignment.
31
31
  */
32
32
 
33
- function getWideWidthStyles() {
34
- let {
35
- align,
36
- isLandscape,
37
- width
38
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
39
-
33
+ function getWideWidthStyles({
34
+ align,
35
+ isLandscape,
36
+ width
37
+ } = {}) {
40
38
  if (align !== WIDE_ALIGNMENTS.alignments.wide) {
41
39
  return {};
42
40
  }
@@ -75,13 +73,12 @@ function getWideWidthStyles() {
75
73
  */
76
74
 
77
75
 
78
- function getFullWidthStyles() {
79
- let {
80
- align,
81
- blockName,
82
- hasParents,
83
- parentBlockName
84
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
76
+ function getFullWidthStyles({
77
+ align,
78
+ blockName,
79
+ hasParents,
80
+ parentBlockName
81
+ } = {}) {
85
82
  const {
86
83
  isContainerRelated,
87
84
  isFullWidth
@@ -113,18 +110,17 @@ function getFullWidthStyles() {
113
110
  */
114
111
 
115
112
 
116
- function getBlockMargin() {
117
- let {
118
- align,
119
- blockName,
120
- blockWidth,
121
- hasParents,
122
- marginHorizontal,
123
- parentBlockAlignment,
124
- parentBlockName,
125
- parentWidth,
126
- width
127
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
113
+ function getBlockMargin({
114
+ align,
115
+ blockName,
116
+ blockWidth,
117
+ hasParents,
118
+ marginHorizontal,
119
+ parentBlockAlignment,
120
+ parentBlockName,
121
+ parentWidth,
122
+ width
123
+ } = {}) {
128
124
  const {
129
125
  isContainerRelated,
130
126
  isWider,
@@ -180,19 +176,18 @@ function getBlockMargin() {
180
176
  */
181
177
 
182
178
 
183
- export function useEditorWrapperStyles() {
184
- let {
185
- align,
186
- blockName,
187
- blockWidth,
188
- contentResizeMode,
189
- hasParents,
190
- marginHorizontal,
191
- parentBlockAlignment,
192
- parentBlockName,
193
- parentWidth,
194
- reversed = false
195
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
179
+ export function useEditorWrapperStyles({
180
+ align,
181
+ blockName,
182
+ blockWidth,
183
+ contentResizeMode,
184
+ hasParents,
185
+ marginHorizontal,
186
+ parentBlockAlignment,
187
+ parentBlockName,
188
+ parentWidth,
189
+ reversed = false
190
+ } = {}) {
196
191
  const {
197
192
  width,
198
193
  height
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/hooks/use-editor-wrapper-styles.native.js"],"names":["useWindowDimensions","useMemo","ALIGNMENT_BREAKPOINTS","WIDE_ALIGNMENTS","alignmentHelpers","styles","ALIGNMENT_MAX_WIDTH","full","wide","wideMedium","wideLandscape","BLOCK_DEFAULT_MARGIN","getWideWidthStyles","align","isLandscape","width","alignments","large","maxWidth","small","medium","getFullWidthStyles","blockName","hasParents","parentBlockName","isContainerRelated","isFullWidth","fullWidthStyles","paddingHorizontal","getBlockMargin","blockWidth","marginHorizontal","parentBlockAlignment","parentWidth","isWider","isWideWidth","isScreenWidthEqual","useEditorWrapperStyles","contentResizeMode","reversed","height","blockMargin","wrapperStyles","canvasStyles","flex","alignmentStyles"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAT,QAAoC,cAApC;AAEA;AACA;AACA;;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SACCC,qBADD,EAECC,eAFD,EAGCC,gBAHD,QAIO,uBAJP;AAMA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,kCAAnB;AAEA,MAAMC,m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AJ;;AAEA,QAAKL,iBAAiB,KAAK,SAA3B,EAAuC;AACtC;AACAK,MAAAA,YAAY,GAAG;AAAEC,QAAAA,IAAI,EAAE;AAAR,OAAf;AACA,KAHD,MAGO,IAAKL,QAAL,EAAgB;AACtBI,MAAAA,YAAY,GAAGtC,MAAM,CAAE,qCAAF,CAArB;AACA,KAFM,MAEA;AACNsC,MAAAA,YAAY,GAAGtC,MAAM,CAAE,2BAAF,CAArB;AACA;;AAED,UAAMwC,eAAe,GAAG,EACvB,GAAGjC,kBAAkB,CAAE;AAAEC,QAAAA,KAAF;AAASC,QAAAA,WAAT;AAAsBC,QAAAA;AAAtB,OAAF,CADE;AAEvB,SAAGM,kBAAkB,CAAE;AACtBR,QAAAA,KADsB;AAEtBS,QAAAA,SAFsB;AAGtBC,QAAAA,UAHsB;AAItBC,QAAAA;AAJsB,OAAF;AAFE,KAAxB;AAUA,WAAO,CAAEmB,YAAF,EAAgBE,eAAhB,CAAP;AACA,GAvB4B,EAuB1B,CACFhC,KADE,EAEFS,SAFE,EAGFC,UAHE,EAIFC,eAJE,EAKFV,WALE,EAMFC,KANE,EAOFuB,iBAPE,EAQFC,QARE,CAvB0B,CAA7B;AAkCA,SAAO,CAAEG,aAAF,EAAiBD,WAAjB,CAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { useWindowDimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tALIGNMENT_BREAKPOINTS,\n\tWIDE_ALIGNMENTS,\n\talignmentHelpers,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport styles from './use-editor-wrapper-styles.scss';\n\nconst ALIGNMENT_MAX_WIDTH = {\n\tfull: '100%',\n\twide: 1054,\n\twideMedium: 770,\n\twideLandscape: 662,\n};\n\nconst BLOCK_DEFAULT_MARGIN = 16;\n\n/**\n * Get the styles for the wide width alignment.\n *\n * @param {Object} [options] The options for the helper.\n * @param {string} options.align The alignment value.\n * @param {boolean} options.isLandscape Whether the screen is in landscape mode.\n * @param {number} options.width The width of the screen.\n * @return {Object} An object containing the styles for the wide width alignment.\n */\nfunction getWideWidthStyles( { align, isLandscape, width } = {} ) {\n\tif ( align !== WIDE_ALIGNMENTS.alignments.wide ) {\n\t\treturn {};\n\t}\n\n\tif ( isLandscape && width < ALIGNMENT_BREAKPOINTS.large ) {\n\t\treturn { maxWidth: ALIGNMENT_MAX_WIDTH.wideLandscape };\n\t}\n\n\tif ( width <= ALIGNMENT_BREAKPOINTS.small ) {\n\t\treturn { maxWidth: width };\n\t}\n\n\tif (\n\t\twidth >= ALIGNMENT_BREAKPOINTS.medium &&\n\t\twidth < ALIGNMENT_BREAKPOINTS.wide\n\t) {\n\t\treturn { maxWidth: ALIGNMENT_MAX_WIDTH.wideMedium };\n\t}\n\n\treturn { maxWidth: ALIGNMENT_MAX_WIDTH.wide };\n}\n\n/**\n * Get the styles for the full width alignment.\n *\n * @param {Object} [options] The options for the helper.\n * @param {string} options.align The alignment value.\n * @param {string} options.blockName The name of the block.\n * @param {boolean} options.hasParents Whether the block has parents.\n * @param {string} options.parentBlockName The name of the parent block.\n * @return {Object} An object containing the styles for the full width alignment.\n */\nfunction getFullWidthStyles( {\n\talign,\n\tblockName,\n\thasParents,\n\tparentBlockName,\n} = {} ) {\n\tconst { isContainerRelated, isFullWidth } = alignmentHelpers;\n\tconst fullWidthStyles = isFullWidth( align )\n\t\t? { maxWidth: ALIGNMENT_MAX_WIDTH.full }\n\t\t: {};\n\n\tif (\n\t\t! align &&\n\t\thasParents &&\n\t\t! isContainerRelated( parentBlockName ) &&\n\t\tisContainerRelated( blockName )\n\t) {\n\t\tfullWidthStyles.paddingHorizontal = BLOCK_DEFAULT_MARGIN;\n\t}\n\n\treturn fullWidthStyles;\n}\n\n/**\n * Get the block margin based on various conditions.\n *\n * @param {Object} [options] The options for the helper.\n * @param {string} options.align The alignment value.\n * @param {string} options.blockName The name of the block.\n * @param {number} options.blockWidth The width of the block.\n * @param {boolean} options.hasParents Whether the block has parents.\n * @param {number} options.marginHorizontal Default horizontal margin.\n * @param {string} options.parentBlockAlignment The alignment of the parent block.\n * @param {string} options.parentBlockName The name of the parent block.\n * @param {number} options.parentWidth The width of the parent block.\n * @param {number} options.width The width of the screen.\n * @return {number} The calculated block margin.\n */\nfunction getBlockMargin( {\n\talign,\n\tblockName,\n\tblockWidth,\n\thasParents,\n\tmarginHorizontal,\n\tparentBlockAlignment,\n\tparentBlockName,\n\tparentWidth,\n\twidth,\n} = {} ) {\n\tconst { isContainerRelated, isWider, isWideWidth, isFullWidth } =\n\t\talignmentHelpers;\n\n\tif ( isFullWidth( align ) ) {\n\t\tif ( ! hasParents ) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn marginHorizontal;\n\t}\n\n\tif ( isWideWidth( align ) ) {\n\t\treturn marginHorizontal;\n\t}\n\n\tif (\n\t\tisFullWidth( parentBlockAlignment ) &&\n\t\t! isWider( blockWidth, 'medium' )\n\t) {\n\t\tif ( isContainerRelated( blockName ) || isWider( width, 'mobile' ) ) {\n\t\t\treturn marginHorizontal;\n\t\t}\n\t\treturn marginHorizontal * 2;\n\t}\n\n\tif (\n\t\tisContainerRelated( parentBlockName ) &&\n\t\t! isContainerRelated( blockName )\n\t) {\n\t\tconst isScreenWidthEqual = parentWidth === width;\n\t\tif ( isScreenWidthEqual || isWider( width, 'mobile' ) ) {\n\t\t\treturn marginHorizontal;\n\t\t}\n\t}\n\n\treturn marginHorizontal;\n}\n\n/**\n * Custom hook to get the styles and margin for the editor wrapper.\n *\n * @param {Object} [props] The props for the hook.\n * @param {string} props.align The alignment value.\n * @param {string} props.blockName The name of the block.\n * @param {number} props.blockWidth The width of the block.\n * @param {string} props.contentResizeMode The content resize mode.\n * @param {boolean} props.hasParents Whether the block has parents.\n * @param {number} props.marginHorizontal Default horizontal margin.\n * @param {string} props.parentBlockAlignment The alignment of the parent block.\n * @param {string} props.parentBlockName The name of the parent block.\n * @param {number} props.parentWidth The width of the parent block.\n * @param {boolean} [props.reversed=false] Whether the flex direction should be reversed.\n * @return {[Array, number]} An array containing the wrapper styles and block margin.\n */\nexport function useEditorWrapperStyles( {\n\talign,\n\tblockName,\n\tblockWidth,\n\tcontentResizeMode,\n\thasParents,\n\tmarginHorizontal,\n\tparentBlockAlignment,\n\tparentBlockName,\n\tparentWidth,\n\treversed = false,\n} = {} ) {\n\tconst { width, height } = useWindowDimensions();\n\tconst isLandscape = width >= height;\n\n\tconst blockMargin = useMemo(\n\t\t() =>\n\t\t\tgetBlockMargin( {\n\t\t\t\talign,\n\t\t\t\tblockName,\n\t\t\t\tblockWidth,\n\t\t\t\thasParents,\n\t\t\t\tmarginHorizontal,\n\t\t\t\tparentBlockAlignment,\n\t\t\t\tparentBlockName,\n\t\t\t\tparentWidth,\n\t\t\t\twidth,\n\t\t\t} ),\n\t\t[\n\t\t\talign,\n\t\t\tblockName,\n\t\t\tblockWidth,\n\t\t\thasParents,\n\t\t\tmarginHorizontal,\n\t\t\tparentBlockAlignment,\n\t\t\tparentBlockName,\n\t\t\tparentWidth,\n\t\t\twidth,\n\t\t]\n\t);\n\n\tconst wrapperStyles = useMemo( () => {\n\t\tlet canvasStyles;\n\n\t\tif ( contentResizeMode === 'stretch' ) {\n\t\t\t// For these cases, no width constraints should be added.\n\t\t\tcanvasStyles = { flex: 1 };\n\t\t} else if ( reversed ) {\n\t\t\tcanvasStyles = styles[ 'use-editor-wrapper-styles--reversed' ];\n\t\t} else {\n\t\t\tcanvasStyles = styles[ 'use-editor-wrapper-styles' ];\n\t\t}\n\n\t\tconst alignmentStyles = {\n\t\t\t...getWideWidthStyles( { align, isLandscape, width } ),\n\t\t\t...getFullWidthStyles( {\n\t\t\t\talign,\n\t\t\t\tblockName,\n\t\t\t\thasParents,\n\t\t\t\tparentBlockName,\n\t\t\t} ),\n\t\t};\n\n\t\treturn [ canvasStyles, alignmentStyles ];\n\t}, [\n\t\talign,\n\t\tblockName,\n\t\thasParents,\n\t\tparentBlockName,\n\t\tisLandscape,\n\t\twidth,\n\t\tcontentResizeMode,\n\t\treversed,\n\t] );\n\n\treturn [ wrapperStyles, blockMargin ];\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/hooks/use-editor-wrapper-styles.native.js"],"names":["useWindowDimensions","useMemo","ALIGNMENT_BREAKPOINTS","WIDE_ALIGNMENTS","alignmentHelpers","styles","ALIGNMENT_MAX_WIDTH","full","wide","wideMedium","wideLandscape","BLOCK_DEFAULT_MARGIN","getWideWidthStyles","align","isLandscape","width","alignments","large","maxWidth","small","medium","getFullWidthStyles","blockName","hasParents","parentBlockName","isContainerRelated","isFullWidth","fullWidthStyles","paddingHorizontal","getBlockMargin","blockWidth","marginHorizontal","parentBlockAlignment","parentWidth","isWider","isWideWidth","isScreenWidthEqual","useEditorWrapperStyles","contentResizeMode","reversed","height","blockMargin","wrapperStyles","canvasStyles","flex","alignmentStyles"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAT,QAAoC,cAApC;AAEA;AACA;AACA;;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SACCC,qBADD,EAECC,eAFD,EAGCC,gBAHD,QAIO,uBAJP;AAMA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,kCAAnB;AAEA,MAAMC,mBAAmB,GAAG;AAC3BC,EAAAA,IAAI,EAAE,MADqB;AAE3BC,EAAAA,IAAI,EAAE,IAFqB;AAG3BC,EAAAA,UAAU,EAAE,GAHe;AAI3BC,EAAAA,aAAa,EAAE;AAJY,CAA5B;AAOA,MAAMC,oBAAoB,GAAG,EAA7B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,kBAAT,CAA6B;AAAEC,EAAAA,KAAF;AAASC,EAAAA,WAAT;AAAsBC,EAAAA;AAAtB,IAAgC,EAA7D,EAAkE;AACjE,MAAKF,KAAK,KAAKV,eAAe,CAACa,UAAhB,CAA2BR,IAA1C,EAAiD;AAChD,WAAO,EAAP;AACA;;AAED,MAA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AAA,UAHsB;AAItBC,QAAAA;AAJsB,OAAF;AAFE,KAAxB;AAUA,WAAO,CAAEmB,YAAF,EAAgBE,eAAhB,CAAP;AACA,GAvB4B,EAuB1B,CACFhC,KADE,EAEFS,SAFE,EAGFC,UAHE,EAIFC,eAJE,EAKFV,WALE,EAMFC,KANE,EAOFuB,iBAPE,EAQFC,QARE,CAvB0B,CAA7B;AAkCA,SAAO,CAAEG,aAAF,EAAiBD,WAAjB,CAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { useWindowDimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tALIGNMENT_BREAKPOINTS,\n\tWIDE_ALIGNMENTS,\n\talignmentHelpers,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport styles from './use-editor-wrapper-styles.scss';\n\nconst ALIGNMENT_MAX_WIDTH = {\n\tfull: '100%',\n\twide: 1054,\n\twideMedium: 770,\n\twideLandscape: 662,\n};\n\nconst BLOCK_DEFAULT_MARGIN = 16;\n\n/**\n * Get the styles for the wide width alignment.\n *\n * @param {Object} [options] The options for the helper.\n * @param {string} options.align The alignment value.\n * @param {boolean} options.isLandscape Whether the screen is in landscape mode.\n * @param {number} options.width The width of the screen.\n * @return {Object} An object containing the styles for the wide width alignment.\n */\nfunction getWideWidthStyles( { align, isLandscape, width } = {} ) {\n\tif ( align !== WIDE_ALIGNMENTS.alignments.wide ) {\n\t\treturn {};\n\t}\n\n\tif ( isLandscape && width < ALIGNMENT_BREAKPOINTS.large ) {\n\t\treturn { maxWidth: ALIGNMENT_MAX_WIDTH.wideLandscape };\n\t}\n\n\tif ( width <= ALIGNMENT_BREAKPOINTS.small ) {\n\t\treturn { maxWidth: width };\n\t}\n\n\tif (\n\t\twidth >= ALIGNMENT_BREAKPOINTS.medium &&\n\t\twidth < ALIGNMENT_BREAKPOINTS.wide\n\t) {\n\t\treturn { maxWidth: ALIGNMENT_MAX_WIDTH.wideMedium };\n\t}\n\n\treturn { maxWidth: ALIGNMENT_MAX_WIDTH.wide };\n}\n\n/**\n * Get the styles for the full width alignment.\n *\n * @param {Object} [options] The options for the helper.\n * @param {string} options.align The alignment value.\n * @param {string} options.blockName The name of the block.\n * @param {boolean} options.hasParents Whether the block has parents.\n * @param {string} options.parentBlockName The name of the parent block.\n * @return {Object} An object containing the styles for the full width alignment.\n */\nfunction getFullWidthStyles( {\n\talign,\n\tblockName,\n\thasParents,\n\tparentBlockName,\n} = {} ) {\n\tconst { isContainerRelated, isFullWidth } = alignmentHelpers;\n\tconst fullWidthStyles = isFullWidth( align )\n\t\t? { maxWidth: ALIGNMENT_MAX_WIDTH.full }\n\t\t: {};\n\n\tif (\n\t\t! align &&\n\t\thasParents &&\n\t\t! isContainerRelated( parentBlockName ) &&\n\t\tisContainerRelated( blockName )\n\t) {\n\t\tfullWidthStyles.paddingHorizontal = BLOCK_DEFAULT_MARGIN;\n\t}\n\n\treturn fullWidthStyles;\n}\n\n/**\n * Get the block margin based on various conditions.\n *\n * @param {Object} [options] The options for the helper.\n * @param {string} options.align The alignment value.\n * @param {string} options.blockName The name of the block.\n * @param {number} options.blockWidth The width of the block.\n * @param {boolean} options.hasParents Whether the block has parents.\n * @param {number} options.marginHorizontal Default horizontal margin.\n * @param {string} options.parentBlockAlignment The alignment of the parent block.\n * @param {string} options.parentBlockName The name of the parent block.\n * @param {number} options.parentWidth The width of the parent block.\n * @param {number} options.width The width of the screen.\n * @return {number} The calculated block margin.\n */\nfunction getBlockMargin( {\n\talign,\n\tblockName,\n\tblockWidth,\n\thasParents,\n\tmarginHorizontal,\n\tparentBlockAlignment,\n\tparentBlockName,\n\tparentWidth,\n\twidth,\n} = {} ) {\n\tconst { isContainerRelated, isWider, isWideWidth, isFullWidth } =\n\t\talignmentHelpers;\n\n\tif ( isFullWidth( align ) ) {\n\t\tif ( ! hasParents ) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn marginHorizontal;\n\t}\n\n\tif ( isWideWidth( align ) ) {\n\t\treturn marginHorizontal;\n\t}\n\n\tif (\n\t\tisFullWidth( parentBlockAlignment ) &&\n\t\t! isWider( blockWidth, 'medium' )\n\t) {\n\t\tif ( isContainerRelated( blockName ) || isWider( width, 'mobile' ) ) {\n\t\t\treturn marginHorizontal;\n\t\t}\n\t\treturn marginHorizontal * 2;\n\t}\n\n\tif (\n\t\tisContainerRelated( parentBlockName ) &&\n\t\t! isContainerRelated( blockName )\n\t) {\n\t\tconst isScreenWidthEqual = parentWidth === width;\n\t\tif ( isScreenWidthEqual || isWider( width, 'mobile' ) ) {\n\t\t\treturn marginHorizontal;\n\t\t}\n\t}\n\n\treturn marginHorizontal;\n}\n\n/**\n * Custom hook to get the styles and margin for the editor wrapper.\n *\n * @param {Object} [props] The props for the hook.\n * @param {string} props.align The alignment value.\n * @param {string} props.blockName The name of the block.\n * @param {number} props.blockWidth The width of the block.\n * @param {string} props.contentResizeMode The content resize mode.\n * @param {boolean} props.hasParents Whether the block has parents.\n * @param {number} props.marginHorizontal Default horizontal margin.\n * @param {string} props.parentBlockAlignment The alignment of the parent block.\n * @param {string} props.parentBlockName The name of the parent block.\n * @param {number} props.parentWidth The width of the parent block.\n * @param {boolean} [props.reversed=false] Whether the flex direction should be reversed.\n * @return {[Array, number]} An array containing the wrapper styles and block margin.\n */\nexport function useEditorWrapperStyles( {\n\talign,\n\tblockName,\n\tblockWidth,\n\tcontentResizeMode,\n\thasParents,\n\tmarginHorizontal,\n\tparentBlockAlignment,\n\tparentBlockName,\n\tparentWidth,\n\treversed = false,\n} = {} ) {\n\tconst { width, height } = useWindowDimensions();\n\tconst isLandscape = width >= height;\n\n\tconst blockMargin = useMemo(\n\t\t() =>\n\t\t\tgetBlockMargin( {\n\t\t\t\talign,\n\t\t\t\tblockName,\n\t\t\t\tblockWidth,\n\t\t\t\thasParents,\n\t\t\t\tmarginHorizontal,\n\t\t\t\tparentBlockAlignment,\n\t\t\t\tparentBlockName,\n\t\t\t\tparentWidth,\n\t\t\t\twidth,\n\t\t\t} ),\n\t\t[\n\t\t\talign,\n\t\t\tblockName,\n\t\t\tblockWidth,\n\t\t\thasParents,\n\t\t\tmarginHorizontal,\n\t\t\tparentBlockAlignment,\n\t\t\tparentBlockName,\n\t\t\tparentWidth,\n\t\t\twidth,\n\t\t]\n\t);\n\n\tconst wrapperStyles = useMemo( () => {\n\t\tlet canvasStyles;\n\n\t\tif ( contentResizeMode === 'stretch' ) {\n\t\t\t// For these cases, no width constraints should be added.\n\t\t\tcanvasStyles = { flex: 1 };\n\t\t} else if ( reversed ) {\n\t\t\tcanvasStyles = styles[ 'use-editor-wrapper-styles--reversed' ];\n\t\t} else {\n\t\t\tcanvasStyles = styles[ 'use-editor-wrapper-styles' ];\n\t\t}\n\n\t\tconst alignmentStyles = {\n\t\t\t...getWideWidthStyles( { align, isLandscape, width } ),\n\t\t\t...getFullWidthStyles( {\n\t\t\t\talign,\n\t\t\t\tblockName,\n\t\t\t\thasParents,\n\t\t\t\tparentBlockName,\n\t\t\t} ),\n\t\t};\n\n\t\treturn [ canvasStyles, alignmentStyles ];\n\t}, [\n\t\talign,\n\t\tblockName,\n\t\thasParents,\n\t\tparentBlockName,\n\t\tisLandscape,\n\t\twidth,\n\t\tcontentResizeMode,\n\t\treversed,\n\t] );\n\n\treturn [ wrapperStyles, blockMargin ];\n}\n"]}
@@ -19,7 +19,7 @@ export function getSpacingClassesAndStyles(attributes) {
19
19
  style
20
20
  } = attributes; // Collect inline styles for spacing.
21
21
 
22
- const spacingStyles = (style === null || style === void 0 ? void 0 : style.spacing) || {};
22
+ const spacingStyles = style?.spacing || {};
23
23
  const styleProp = getInlineStyles({
24
24
  spacing: spacingStyles
25
25
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/hooks/use-spacing-props.js"],"names":["getInlineStyles","getSpacingClassesAndStyles","attributes","style","spacingStyles","spacing","styleProp"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,SAAhC,C,CAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,0BAAT,CAAqCC,UAArC,EAAkD;AACxD,QAAM;AAAEC,IAAAA;AAAF,MAAYD,UAAlB,CADwD,CAGxD;;AACA,QAAME,aAAa,GAAG,CAAAD,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAEE,OAAP,KAAkB,EAAxC;AACA,QAAMC,SAAS,GAAGN,eAAe,CAAE;AAAEK,IAAAA,OAAO,EAAED;AAAX,GAAF,CAAjC;AAEA,SAAO;AACND,IAAAA,KAAK,EAAEG;AADD,GAAP;AAGA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\n\n// This utility is intended to assist where the serialization of the spacing\n// block support is being skipped for a block but the spacing related CSS\n// styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's spacing support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Spacing block support derived CSS classes & styles.\n */\nexport function getSpacingClassesAndStyles( attributes ) {\n\tconst { style } = attributes;\n\n\t// Collect inline styles for spacing.\n\tconst spacingStyles = style?.spacing || {};\n\tconst styleProp = getInlineStyles( { spacing: spacingStyles } );\n\n\treturn {\n\t\tstyle: styleProp,\n\t};\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/hooks/use-spacing-props.js"],"names":["getInlineStyles","getSpacingClassesAndStyles","attributes","style","spacingStyles","spacing","styleProp"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,SAAhC,C,CAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,0BAAT,CAAqCC,UAArC,EAAkD;AACxD,QAAM;AAAEC,IAAAA;AAAF,MAAYD,UAAlB,CADwD,CAGxD;;AACA,QAAME,aAAa,GAAGD,KAAK,EAAEE,OAAP,IAAkB,EAAxC;AACA,QAAMC,SAAS,GAAGN,eAAe,CAAE;AAAEK,IAAAA,OAAO,EAAED;AAAX,GAAF,CAAjC;AAEA,SAAO;AACND,IAAAA,KAAK,EAAEG;AADD,GAAP;AAGA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\n\n// This utility is intended to assist where the serialization of the spacing\n// block support is being skipped for a block but the spacing related CSS\n// styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's spacing support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Spacing block support derived CSS classes & styles.\n */\nexport function getSpacingClassesAndStyles( attributes ) {\n\tconst { style } = attributes;\n\n\t// Collect inline styles for spacing.\n\tconst spacingStyles = style?.spacing || {};\n\tconst styleProp = getInlineStyles( { spacing: spacingStyles } );\n\n\treturn {\n\t\tstyle: styleProp,\n\t};\n}\n"]}
@@ -27,19 +27,15 @@ import { getComputedFluidTypographyValue } from '../components/font-sizes/fluid-
27
27
  */
28
28
 
29
29
  export function getTypographyClassesAndStyles(attributes, settings) {
30
- var _attributes$style, _settings$typography;
31
-
32
- let typographyStyles = (attributes === null || attributes === void 0 ? void 0 : (_attributes$style = attributes.style) === null || _attributes$style === void 0 ? void 0 : _attributes$style.typography) || {};
33
- const fluidTypographySettings = settings === null || settings === void 0 ? void 0 : (_settings$typography = settings.typography) === null || _settings$typography === void 0 ? void 0 : _settings$typography.fluid;
30
+ let typographyStyles = attributes?.style?.typography || {};
31
+ const fluidTypographySettings = settings?.typography?.fluid;
34
32
 
35
33
  if (!!fluidTypographySettings && (true === fluidTypographySettings || Object.keys(fluidTypographySettings).length !== 0)) {
36
- var _attributes$style2, _attributes$style2$ty, _settings$layout, _attributes$style3, _attributes$style3$ty;
37
-
38
34
  const newFontSize = getComputedFluidTypographyValue({
39
- fontSize: attributes === null || attributes === void 0 ? void 0 : (_attributes$style2 = attributes.style) === null || _attributes$style2 === void 0 ? void 0 : (_attributes$style2$ty = _attributes$style2.typography) === null || _attributes$style2$ty === void 0 ? void 0 : _attributes$style2$ty.fontSize,
40
- minimumFontSizeLimit: fluidTypographySettings === null || fluidTypographySettings === void 0 ? void 0 : fluidTypographySettings.minFontSize,
41
- maximumViewPortWidth: settings === null || settings === void 0 ? void 0 : (_settings$layout = settings.layout) === null || _settings$layout === void 0 ? void 0 : _settings$layout.wideSize
42
- }) || (attributes === null || attributes === void 0 ? void 0 : (_attributes$style3 = attributes.style) === null || _attributes$style3 === void 0 ? void 0 : (_attributes$style3$ty = _attributes$style3.typography) === null || _attributes$style3$ty === void 0 ? void 0 : _attributes$style3$ty.fontSize);
35
+ fontSize: attributes?.style?.typography?.fontSize,
36
+ minimumFontSizeLimit: fluidTypographySettings?.minFontSize,
37
+ maximumViewPortWidth: settings?.layout?.wideSize
38
+ }) || attributes?.style?.typography?.fontSize;
43
39
  typographyStyles = { ...typographyStyles,
44
40
  fontSize: newFontSize
45
41
  };
@@ -48,8 +44,8 @@ export function getTypographyClassesAndStyles(attributes, settings) {
48
44
  const style = getInlineStyles({
49
45
  typography: typographyStyles
50
46
  });
51
- const fontFamilyClassName = !!(attributes !== null && attributes !== void 0 && attributes.fontFamily) ? `has-${kebabCase(attributes.fontFamily)}-font-family` : '';
52
- const className = classnames(fontFamilyClassName, getFontSizeClass(attributes === null || attributes === void 0 ? void 0 : attributes.fontSize));
47
+ const fontFamilyClassName = !!attributes?.fontFamily ? `has-${kebabCase(attributes.fontFamily)}-font-family` : '';
48
+ const className = classnames(fontFamilyClassName, getFontSizeClass(attributes?.fontSize));
53
49
  return {
54
50
  className,
55
51
  style