@wordpress/block-editor 12.26.0 → 13.0.1

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 (1712) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/build/autocompleters/block.js +7 -6
  4. package/build/autocompleters/block.js.map +1 -1
  5. package/build/autocompleters/link.js +10 -8
  6. package/build/autocompleters/link.js.map +1 -1
  7. package/build/components/alignment-control/index.js +3 -3
  8. package/build/components/alignment-control/index.js.map +1 -1
  9. package/build/components/alignment-control/ui.js +2 -2
  10. package/build/components/alignment-control/ui.js.map +1 -1
  11. package/build/components/audio-player/audio-url-parser.native.js +24 -0
  12. package/build/components/audio-player/audio-url-parser.native.js.map +1 -0
  13. package/build/components/audio-player/index.native.js +174 -0
  14. package/build/components/audio-player/index.native.js.map +1 -0
  15. package/build/components/autocomplete/index.js +3 -4
  16. package/build/components/autocomplete/index.js.map +1 -1
  17. package/build/components/block-alignment-control/index.js +3 -3
  18. package/build/components/block-alignment-control/index.js.map +1 -1
  19. package/build/components/block-alignment-control/ui.js +33 -30
  20. package/build/components/block-alignment-control/ui.js.map +1 -1
  21. package/build/components/block-alignment-control/ui.native.js +2 -2
  22. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  23. package/build/components/block-alignment-matrix-control/index.js +5 -5
  24. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  25. package/build/components/block-bindings-toolbar-indicator/index.js +92 -11
  26. package/build/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  27. package/build/components/block-breadcrumb/index.js +38 -34
  28. package/build/components/block-breadcrumb/index.js.map +1 -1
  29. package/build/components/block-canvas/index.js +36 -31
  30. package/build/components/block-canvas/index.js.map +1 -1
  31. package/build/components/block-caption/index.native.js +15 -14
  32. package/build/components/block-caption/index.native.js.map +1 -1
  33. package/build/components/block-card/index.js +32 -27
  34. package/build/components/block-card/index.js.map +1 -1
  35. package/build/components/block-compare/block-view.js +27 -18
  36. package/build/components/block-compare/block-view.js.map +1 -1
  37. package/build/components/block-compare/index.js +23 -22
  38. package/build/components/block-compare/index.js.map +1 -1
  39. package/build/components/block-context/index.js +3 -4
  40. package/build/components/block-context/index.js.map +1 -1
  41. package/build/components/block-controls/fill.js +22 -16
  42. package/build/components/block-controls/fill.js.map +1 -1
  43. package/build/components/block-controls/index.js +3 -3
  44. package/build/components/block-controls/index.js.map +1 -1
  45. package/build/components/block-controls/slot.js +6 -4
  46. package/build/components/block-controls/slot.js.map +1 -1
  47. package/build/components/block-controls/slot.native.js +12 -9
  48. package/build/components/block-controls/slot.native.js.map +1 -1
  49. package/build/components/block-controls/use-has-block-controls.js +1 -1
  50. package/build/components/block-controls/use-has-block-controls.js.map +1 -1
  51. package/build/components/block-draggable/draggable-chip.js +27 -19
  52. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  53. package/build/components/block-draggable/draggable-chip.native.js +9 -8
  54. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  55. package/build/components/block-draggable/dropping-insertion-point.native.js +3 -4
  56. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  57. package/build/components/block-draggable/index.js +14 -13
  58. package/build/components/block-draggable/index.js.map +1 -1
  59. package/build/components/block-draggable/index.native.js +37 -30
  60. package/build/components/block-draggable/index.native.js.map +1 -1
  61. package/build/components/block-edit/edit.js +5 -6
  62. package/build/components/block-edit/edit.js.map +1 -1
  63. package/build/components/block-edit/edit.native.js +3 -4
  64. package/build/components/block-edit/edit.native.js.map +1 -1
  65. package/build/components/block-edit/index.js +17 -9
  66. package/build/components/block-edit/index.js.map +1 -1
  67. package/build/components/block-edit/multiple-usage-warning.js +47 -0
  68. package/build/components/block-edit/multiple-usage-warning.js.map +1 -0
  69. package/build/components/block-edit-visually-button/index.js +9 -6
  70. package/build/components/block-edit-visually-button/index.js.map +1 -1
  71. package/build/components/block-full-height-alignment-control/index.js +2 -2
  72. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  73. package/build/components/block-heading-level-dropdown/heading-level-icon.js +3 -5
  74. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  75. package/build/components/block-heading-level-dropdown/index.js +4 -4
  76. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  77. package/build/components/block-heading-level-dropdown/index.native.js +4 -4
  78. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  79. package/build/components/block-icon/index.js +6 -5
  80. package/build/components/block-icon/index.js.map +1 -1
  81. package/build/components/block-icon/index.native.js +6 -5
  82. package/build/components/block-icon/index.native.js.map +1 -1
  83. package/build/components/block-info-slot-fill/index.js +3 -3
  84. package/build/components/block-info-slot-fill/index.js.map +1 -1
  85. package/build/components/block-inspector/index.js +102 -88
  86. package/build/components/block-inspector/index.js.map +1 -1
  87. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
  88. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  89. package/build/components/block-list/block-crash-warning.js +5 -4
  90. package/build/components/block-list/block-crash-warning.js.map +1 -1
  91. package/build/components/block-list/block-crash-warning.native.js +2 -2
  92. package/build/components/block-list/block-crash-warning.native.js.map +1 -1
  93. package/build/components/block-list/block-html.js +2 -2
  94. package/build/components/block-list/block-html.js.map +1 -1
  95. package/build/components/block-list/block-invalid-warning.js +25 -21
  96. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  97. package/build/components/block-list/block-invalid-warning.native.js +12 -11
  98. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  99. package/build/components/block-list/block-list-item-cell.native.js +5 -4
  100. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  101. package/build/components/block-list/block-list-item.native.js +29 -28
  102. package/build/components/block-list/block-list-item.native.js.map +1 -1
  103. package/build/components/block-list/block-outline.native.js +2 -2
  104. package/build/components/block-list/block-outline.native.js.map +1 -1
  105. package/build/components/block-list/block-selection-button.native.js +35 -33
  106. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  107. package/build/components/block-list/block.js +107 -62
  108. package/build/components/block-list/block.js.map +1 -1
  109. package/build/components/block-list/block.native.js +63 -54
  110. package/build/components/block-list/block.native.js.map +1 -1
  111. package/build/components/block-list/grid-item.native.js +5 -4
  112. package/build/components/block-list/grid-item.native.js.map +1 -1
  113. package/build/components/block-list/index.js +38 -34
  114. package/build/components/block-list/index.js.map +1 -1
  115. package/build/components/block-list/index.native.js +97 -85
  116. package/build/components/block-list/index.native.js.map +1 -1
  117. package/build/components/block-list/insertion-point.native.js +12 -10
  118. package/build/components/block-list/insertion-point.native.js.map +1 -1
  119. package/build/components/block-list/layout.js +7 -3
  120. package/build/components/block-list/layout.js.map +1 -1
  121. package/build/components/block-list/subdirectory-icon.js +8 -7
  122. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  123. package/build/components/block-list/use-block-props/index.js +1 -1
  124. package/build/components/block-list/use-block-props/index.js.map +1 -1
  125. package/build/components/block-list-appender/index.js +9 -8
  126. package/build/components/block-list-appender/index.js.map +1 -1
  127. package/build/components/block-list-appender/index.native.js +4 -4
  128. package/build/components/block-list-appender/index.native.js.map +1 -1
  129. package/build/components/block-lock/menu-item.js +13 -10
  130. package/build/components/block-lock/menu-item.js.map +1 -1
  131. package/build/components/block-lock/modal.js +107 -90
  132. package/build/components/block-lock/modal.js.map +1 -1
  133. package/build/components/block-lock/toolbar.js +18 -15
  134. package/build/components/block-lock/toolbar.js.map +1 -1
  135. package/build/components/block-media-update-progress/index.native.js +17 -15
  136. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  137. package/build/components/block-mover/button.js +19 -16
  138. package/build/components/block-mover/button.js.map +1 -1
  139. package/build/components/block-mover/index.js +34 -27
  140. package/build/components/block-mover/index.js.map +1 -1
  141. package/build/components/block-mover/index.native.js +29 -27
  142. package/build/components/block-mover/index.native.js.map +1 -1
  143. package/build/components/block-navigation/dropdown.js +11 -9
  144. package/build/components/block-navigation/dropdown.js.map +1 -1
  145. package/build/components/block-parent-selector/index.js +14 -15
  146. package/build/components/block-parent-selector/index.js.map +1 -1
  147. package/build/components/block-pattern-setup/index.js +88 -76
  148. package/build/components/block-pattern-setup/index.js.map +1 -1
  149. package/build/components/block-pattern-setup/setup-toolbar.js +50 -45
  150. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  151. package/build/components/block-patterns-list/index.js +96 -86
  152. package/build/components/block-patterns-list/index.js.map +1 -1
  153. package/build/components/block-patterns-paging/index.js +70 -52
  154. package/build/components/block-patterns-paging/index.js.map +1 -1
  155. package/build/components/block-popover/cover.js +13 -10
  156. package/build/components/block-popover/cover.js.map +1 -1
  157. package/build/components/block-popover/drop-zone.js +11 -10
  158. package/build/components/block-popover/drop-zone.js.map +1 -1
  159. package/build/components/block-popover/inbetween.js +8 -7
  160. package/build/components/block-popover/inbetween.js.map +1 -1
  161. package/build/components/block-popover/index.js +9 -7
  162. package/build/components/block-popover/index.js.map +1 -1
  163. package/build/components/block-preview/auto.js +53 -47
  164. package/build/components/block-preview/auto.js.map +1 -1
  165. package/build/components/block-preview/index.js +16 -14
  166. package/build/components/block-preview/index.js.map +1 -1
  167. package/build/components/block-quick-navigation/index.js +24 -16
  168. package/build/components/block-quick-navigation/index.js.map +1 -1
  169. package/build/components/block-removal-warning-modal/index.js +18 -12
  170. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  171. package/build/components/block-rename/modal.js +44 -37
  172. package/build/components/block-rename/modal.js.map +1 -1
  173. package/build/components/block-rename/rename-control.js +24 -21
  174. package/build/components/block-rename/rename-control.js.map +1 -1
  175. package/build/components/block-selection-clearer/index.js +2 -2
  176. package/build/components/block-selection-clearer/index.js.map +1 -1
  177. package/build/components/block-settings/button.native.js +13 -9
  178. package/build/components/block-settings/button.native.js.map +1 -1
  179. package/build/components/block-settings/container.native.js +40 -28
  180. package/build/components/block-settings/container.native.js.map +1 -1
  181. package/build/components/block-settings-menu/block-html-convert-button.js +5 -4
  182. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  183. package/build/components/block-settings-menu/block-mode-toggle.js +5 -4
  184. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  185. package/build/components/block-settings-menu/block-parent-selector-menu-item.js +7 -6
  186. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  187. package/build/components/block-settings-menu/block-settings-dropdown.js +93 -75
  188. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  189. package/build/components/block-settings-menu/index.js +10 -6
  190. package/build/components/block-settings-menu/index.js.map +1 -1
  191. package/build/components/block-settings-menu-controls/index.js +29 -24
  192. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  193. package/build/components/block-styles/index.js +43 -38
  194. package/build/components/block-styles/index.js.map +1 -1
  195. package/build/components/block-styles/index.native.js +7 -7
  196. package/build/components/block-styles/index.native.js.map +1 -1
  197. package/build/components/block-styles/menu-items.js +17 -14
  198. package/build/components/block-styles/menu-items.js.map +1 -1
  199. package/build/components/block-styles/preview-panel.js +2 -2
  200. package/build/components/block-styles/preview-panel.js.map +1 -1
  201. package/build/components/block-styles/preview.native.js +24 -21
  202. package/build/components/block-styles/preview.native.js.map +1 -1
  203. package/build/components/block-switcher/block-styles-menu.js +8 -7
  204. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  205. package/build/components/block-switcher/block-transformations-menu.js +32 -30
  206. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  207. package/build/components/block-switcher/block-transformations-menu.native.js +2 -2
  208. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  209. package/build/components/block-switcher/block-variation-transformations.js +19 -17
  210. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  211. package/build/components/block-switcher/index.js +85 -70
  212. package/build/components/block-switcher/index.js.map +1 -1
  213. package/build/components/block-switcher/pattern-transformations-menu.js +61 -51
  214. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  215. package/build/components/block-switcher/preview-block-popover.js +22 -17
  216. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  217. package/build/components/block-toolbar/block-toolbar-menu.native.js +38 -34
  218. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  219. package/build/components/block-toolbar/index.js +53 -43
  220. package/build/components/block-toolbar/index.js.map +1 -1
  221. package/build/components/block-toolbar/index.native.js +27 -21
  222. package/build/components/block-toolbar/index.native.js.map +1 -1
  223. package/build/components/block-toolbar/shuffle.js +7 -5
  224. package/build/components/block-toolbar/shuffle.js.map +1 -1
  225. package/build/components/block-tools/block-selection-button.js +61 -48
  226. package/build/components/block-tools/block-selection-button.js.map +1 -1
  227. package/build/components/block-tools/block-toolbar-breadcrumb.js +8 -7
  228. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  229. package/build/components/block-tools/block-toolbar-popover.js +15 -14
  230. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  231. package/build/components/block-tools/empty-block-inserter.js +13 -11
  232. package/build/components/block-tools/empty-block-inserter.js.map +1 -1
  233. package/build/components/block-tools/index.js +29 -26
  234. package/build/components/block-tools/index.js.map +1 -1
  235. package/build/components/block-tools/insertion-point.js +42 -40
  236. package/build/components/block-tools/insertion-point.js.map +1 -1
  237. package/build/components/block-tools/zoom-out-mode-inserters.js +33 -32
  238. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  239. package/build/components/block-types-list/index.js +15 -15
  240. package/build/components/block-types-list/index.js.map +1 -1
  241. package/build/components/block-types-list/index.native.js +30 -26
  242. package/build/components/block-types-list/index.native.js.map +1 -1
  243. package/build/components/block-variation-picker/index.js +30 -25
  244. package/build/components/block-variation-picker/index.js.map +1 -1
  245. package/build/components/block-variation-picker/index.native.js +32 -25
  246. package/build/components/block-variation-picker/index.native.js.map +1 -1
  247. package/build/components/block-variation-transforms/index.js +53 -47
  248. package/build/components/block-variation-transforms/index.js.map +1 -1
  249. package/build/components/block-vertical-alignment-control/icons.js +31 -26
  250. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  251. package/build/components/block-vertical-alignment-control/index.js +3 -3
  252. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  253. package/build/components/block-vertical-alignment-control/ui.js +2 -2
  254. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  255. package/build/components/border-radius-control/all-input-control.js +3 -3
  256. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  257. package/build/components/border-radius-control/index.js +43 -38
  258. package/build/components/border-radius-control/index.js.map +1 -1
  259. package/build/components/border-radius-control/input-controls.js +23 -21
  260. package/build/components/border-radius-control/input-controls.js.map +1 -1
  261. package/build/components/border-radius-control/linked-button.js +12 -11
  262. package/build/components/border-radius-control/linked-button.js.map +1 -1
  263. package/build/components/button-block-appender/index.js +19 -13
  264. package/build/components/button-block-appender/index.js.map +1 -1
  265. package/build/components/button-block-appender/index.native.js +28 -24
  266. package/build/components/button-block-appender/index.native.js.map +1 -1
  267. package/build/components/caption/index.native.js +22 -21
  268. package/build/components/caption/index.native.js.map +1 -1
  269. package/build/components/child-layout-control/index.js +137 -129
  270. package/build/components/child-layout-control/index.js.map +1 -1
  271. package/build/components/color-palette/control.js +2 -2
  272. package/build/components/color-palette/control.js.map +1 -1
  273. package/build/components/color-palette/with-color-context.js +2 -2
  274. package/build/components/color-palette/with-color-context.js.map +1 -1
  275. package/build/components/color-style-selector/index.js +29 -20
  276. package/build/components/color-style-selector/index.js.map +1 -1
  277. package/build/components/colors/utils.js +3 -3
  278. package/build/components/colors/utils.js.map +1 -1
  279. package/build/components/colors/with-colors.js +8 -7
  280. package/build/components/colors/with-colors.js.map +1 -1
  281. package/build/components/colors-gradients/control.js +53 -39
  282. package/build/components/colors-gradients/control.js.map +1 -1
  283. package/build/components/colors-gradients/dropdown.js +70 -61
  284. package/build/components/colors-gradients/dropdown.js.map +1 -1
  285. package/build/components/colors-gradients/panel-color-gradient-settings.js +21 -18
  286. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  287. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +11 -7
  288. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  289. package/build/components/contrast-checker/index.js +10 -8
  290. package/build/components/contrast-checker/index.js.map +1 -1
  291. package/build/components/contrast-checker/index.native.js +12 -10
  292. package/build/components/contrast-checker/index.native.js.map +1 -1
  293. package/build/components/convert-to-group-buttons/index.js +17 -13
  294. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  295. package/build/components/convert-to-group-buttons/toolbar.js +20 -18
  296. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  297. package/build/components/copy-handler/index.js +2 -2
  298. package/build/components/copy-handler/index.js.map +1 -1
  299. package/build/components/date-format-picker/index.js +44 -40
  300. package/build/components/date-format-picker/index.js.map +1 -1
  301. package/build/components/default-block-appender/index.js +32 -30
  302. package/build/components/default-block-appender/index.js.map +1 -1
  303. package/build/components/default-block-appender/index.native.js +14 -12
  304. package/build/components/default-block-appender/index.native.js.map +1 -1
  305. package/build/components/dimensions-tool/aspect-ratio-tool.js +13 -14
  306. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  307. package/build/components/dimensions-tool/index.js +116 -115
  308. package/build/components/dimensions-tool/index.js.map +1 -1
  309. package/build/components/dimensions-tool/scale-tool.js +16 -16
  310. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  311. package/build/components/dimensions-tool/width-height-tool.js +37 -33
  312. package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
  313. package/build/components/duotone-control/index.js +21 -18
  314. package/build/components/duotone-control/index.js.map +1 -1
  315. package/build/components/editable-text/index.js +6 -5
  316. package/build/components/editable-text/index.js.map +1 -1
  317. package/build/components/editor-styles/index.js +23 -21
  318. package/build/components/editor-styles/index.js.map +1 -1
  319. package/build/components/floating-toolbar/index.native.js +18 -16
  320. package/build/components/floating-toolbar/index.native.js.map +1 -1
  321. package/build/components/floating-toolbar/nav-up-icon.js +14 -13
  322. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  323. package/build/components/font-appearance-control/index.js +2 -2
  324. package/build/components/font-appearance-control/index.js.map +1 -1
  325. package/build/components/font-family/index.js +2 -2
  326. package/build/components/font-family/index.js.map +1 -1
  327. package/build/components/font-sizes/font-size-picker.js +2 -2
  328. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  329. package/build/components/font-sizes/utils.js +4 -3
  330. package/build/components/font-sizes/utils.js.map +1 -1
  331. package/build/components/font-sizes/with-font-sizes.js +3 -3
  332. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  333. package/build/components/global-styles/advanced-panel.js +17 -15
  334. package/build/components/global-styles/advanced-panel.js.map +1 -1
  335. package/build/components/global-styles/background-panel.js +187 -121
  336. package/build/components/global-styles/background-panel.js.map +1 -1
  337. package/build/components/global-styles/border-panel.js +62 -56
  338. package/build/components/global-styles/border-panel.js.map +1 -1
  339. package/build/components/global-styles/color-panel.js +111 -87
  340. package/build/components/global-styles/color-panel.js.map +1 -1
  341. package/build/components/global-styles/color-panel.native.js +14 -11
  342. package/build/components/global-styles/color-panel.native.js.map +1 -1
  343. package/build/components/global-styles/dimensions-panel.js +183 -171
  344. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  345. package/build/components/global-styles/filters-panel.js +78 -65
  346. package/build/components/global-styles/filters-panel.js.map +1 -1
  347. package/build/components/global-styles/hooks.js +15 -3
  348. package/build/components/global-styles/hooks.js.map +1 -1
  349. package/build/components/global-styles/image-settings-panel.js +26 -22
  350. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  351. package/build/components/global-styles/index.js +18 -0
  352. package/build/components/global-styles/index.js.map +1 -1
  353. package/build/components/global-styles/shadow-panel-components.js +74 -65
  354. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  355. package/build/components/global-styles/theme-file-uri-utils.js +80 -0
  356. package/build/components/global-styles/theme-file-uri-utils.js.map +1 -0
  357. package/build/components/global-styles/typography-panel.js +175 -134
  358. package/build/components/global-styles/typography-panel.js.map +1 -1
  359. package/build/components/global-styles/use-global-styles-context.native.js +450 -0
  360. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -0
  361. package/build/components/global-styles/use-global-styles-output.js +113 -78
  362. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  363. package/build/components/gradients/with-gradient.js +2 -2
  364. package/build/components/gradients/with-gradient.js.map +1 -1
  365. package/build/components/grid-visualizer/grid-item-resizer.js +59 -58
  366. package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  367. package/build/components/grid-visualizer/grid-visualizer.js +20 -15
  368. package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
  369. package/build/components/height-control/index.js +39 -32
  370. package/build/components/height-control/index.js.map +1 -1
  371. package/build/components/iframe/index.js +70 -62
  372. package/build/components/iframe/index.js.map +1 -1
  373. package/build/components/image-editor/aspect-ratio-dropdown.js +73 -69
  374. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  375. package/build/components/image-editor/context.js +5 -4
  376. package/build/components/image-editor/context.js.map +1 -1
  377. package/build/components/image-editor/cropper.js +24 -21
  378. package/build/components/image-editor/cropper.js.map +1 -1
  379. package/build/components/image-editor/form-controls.js +11 -7
  380. package/build/components/image-editor/form-controls.js.map +1 -1
  381. package/build/components/image-editor/index.js +22 -13
  382. package/build/components/image-editor/index.js.map +1 -1
  383. package/build/components/image-editor/rotation-button.js +2 -2
  384. package/build/components/image-editor/rotation-button.js.map +1 -1
  385. package/build/components/image-editor/zoom-dropdown.js +4 -4
  386. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  387. package/build/components/image-link-destinations/index.native.js +37 -27
  388. package/build/components/image-link-destinations/index.native.js.map +1 -1
  389. package/build/components/image-size-control/index.js +53 -45
  390. package/build/components/image-size-control/index.js.map +1 -1
  391. package/build/components/index.native.js +37 -0
  392. package/build/components/index.native.js.map +1 -1
  393. package/build/components/inner-blocks/button-block-appender.js +2 -2
  394. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  395. package/build/components/inner-blocks/default-block-appender.js +2 -2
  396. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  397. package/build/components/inner-blocks/index.js +19 -16
  398. package/build/components/inner-blocks/index.js.map +1 -1
  399. package/build/components/inner-blocks/index.native.js +31 -29
  400. package/build/components/inner-blocks/index.native.js.map +1 -1
  401. package/build/components/inner-blocks/use-nested-settings-update.js +10 -13
  402. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  403. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js +20 -17
  404. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  405. package/build/components/inner-blocks/with-client-id.js +2 -2
  406. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  407. package/build/components/inserter/block-patterns-explorer/index.js +22 -20
  408. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  409. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +39 -36
  410. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  411. package/build/components/inserter/block-patterns-explorer/pattern-list.js +25 -19
  412. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  413. package/build/components/inserter/block-patterns-tab/index.js +38 -31
  414. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  415. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +21 -4
  416. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  417. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +42 -31
  418. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  419. package/build/components/inserter/block-patterns-tab/patterns-filter.js +54 -42
  420. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  421. package/build/components/inserter/block-types-tab.js +108 -66
  422. package/build/components/inserter/block-types-tab.js.map +1 -1
  423. package/build/components/inserter/block-types-tab.native.js +2 -2
  424. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  425. package/build/components/inserter/category-tabs/index.js +26 -20
  426. package/build/components/inserter/category-tabs/index.js.map +1 -1
  427. package/build/components/inserter/hooks/use-block-types-state.js +10 -4
  428. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  429. package/build/components/inserter/hooks/use-insertion-point.js +33 -5
  430. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  431. package/build/components/inserter/index.js +6 -6
  432. package/build/components/inserter/index.js.map +1 -1
  433. package/build/components/inserter/index.native.js +21 -19
  434. package/build/components/inserter/index.native.js.map +1 -1
  435. package/build/components/inserter/library.js +15 -8
  436. package/build/components/inserter/library.js.map +1 -1
  437. package/build/components/inserter/media-tab/media-list.js +9 -9
  438. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  439. package/build/components/inserter/media-tab/media-panel.js +19 -17
  440. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  441. package/build/components/inserter/media-tab/media-preview.js +92 -66
  442. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  443. package/build/components/inserter/media-tab/media-tab.js +44 -36
  444. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  445. package/build/components/inserter/media-tab/utils.js +2 -2
  446. package/build/components/inserter/media-tab/utils.js.map +1 -1
  447. package/build/components/inserter/menu.js +101 -84
  448. package/build/components/inserter/menu.js.map +1 -1
  449. package/build/components/inserter/menu.native.js +34 -28
  450. package/build/components/inserter/menu.native.js.map +1 -1
  451. package/build/components/inserter/mobile-tab-navigation.js +56 -40
  452. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  453. package/build/components/inserter/no-results.js +10 -7
  454. package/build/components/inserter/no-results.js.map +1 -1
  455. package/build/components/inserter/no-results.native.js +13 -8
  456. package/build/components/inserter/no-results.native.js.map +1 -1
  457. package/build/components/inserter/panel.js +15 -10
  458. package/build/components/inserter/panel.js.map +1 -1
  459. package/build/components/inserter/preview-panel.js +24 -20
  460. package/build/components/inserter/preview-panel.js.map +1 -1
  461. package/build/components/inserter/quick-inserter.js +35 -31
  462. package/build/components/inserter/quick-inserter.js.map +1 -1
  463. package/build/components/inserter/reusable-block-rename-hint.js +20 -18
  464. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  465. package/build/components/inserter/reusable-blocks-tab.native.js +2 -2
  466. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  467. package/build/components/inserter/search-results.js +52 -41
  468. package/build/components/inserter/search-results.js.map +1 -1
  469. package/build/components/inserter/search-results.native.js +3 -3
  470. package/build/components/inserter/search-results.native.js.map +1 -1
  471. package/build/components/inserter/tabs.js +30 -26
  472. package/build/components/inserter/tabs.js.map +1 -1
  473. package/build/components/inserter/tabs.native.js +20 -18
  474. package/build/components/inserter/tabs.native.js.map +1 -1
  475. package/build/components/inserter/tips.js +7 -5
  476. package/build/components/inserter/tips.js.map +1 -1
  477. package/build/components/inserter-button/index.native.js +28 -23
  478. package/build/components/inserter-button/index.native.js.map +1 -1
  479. package/build/components/inserter-button/sparkles.js +8 -7
  480. package/build/components/inserter-button/sparkles.js.map +1 -1
  481. package/build/components/inserter-draggable-blocks/index.js +14 -13
  482. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  483. package/build/components/inserter-list-item/index.js +68 -62
  484. package/build/components/inserter-list-item/index.js.map +1 -1
  485. package/build/components/inserter-listbox/group.js +2 -2
  486. package/build/components/inserter-listbox/group.js.map +1 -1
  487. package/build/components/inserter-listbox/index.js +5 -4
  488. package/build/components/inserter-listbox/index.js.map +1 -1
  489. package/build/components/inserter-listbox/item.js +10 -8
  490. package/build/components/inserter-listbox/item.js.map +1 -1
  491. package/build/components/inserter-listbox/row.js +2 -2
  492. package/build/components/inserter-listbox/row.js.map +1 -1
  493. package/build/components/inspector-controls/block-support-slot-container.js +2 -2
  494. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  495. package/build/components/inspector-controls/block-support-tools-panel.js +5 -5
  496. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  497. package/build/components/inspector-controls/fill.js +22 -17
  498. package/build/components/inspector-controls/fill.js.map +1 -1
  499. package/build/components/inspector-controls/fill.native.js +12 -5
  500. package/build/components/inspector-controls/fill.native.js.map +1 -1
  501. package/build/components/inspector-controls/index.js +3 -3
  502. package/build/components/inspector-controls/index.js.map +1 -1
  503. package/build/components/inspector-controls/slot.js +11 -10
  504. package/build/components/inspector-controls/slot.js.map +1 -1
  505. package/build/components/inspector-controls/slot.native.js +3 -3
  506. package/build/components/inspector-controls/slot.native.js.map +1 -1
  507. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +7 -6
  508. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  509. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js +11 -9
  510. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  511. package/build/components/inspector-controls-tabs/index.js +44 -32
  512. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  513. package/build/components/inspector-controls-tabs/position-controls-panel.js +8 -7
  514. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  515. package/build/components/inspector-controls-tabs/settings-tab-hint.js +20 -18
  516. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  517. package/build/components/inspector-controls-tabs/settings-tab.js +6 -2
  518. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  519. package/build/components/inspector-controls-tabs/styles-tab.js +31 -26
  520. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  521. package/build/components/inspector-popover-header/index.js +31 -26
  522. package/build/components/inspector-popover-header/index.js.map +1 -1
  523. package/build/components/justify-content-control/index.js +3 -3
  524. package/build/components/justify-content-control/index.js.map +1 -1
  525. package/build/components/justify-content-control/ui.js +2 -2
  526. package/build/components/justify-content-control/ui.js.map +1 -1
  527. package/build/components/letter-spacing-control/index.js +3 -4
  528. package/build/components/letter-spacing-control/index.js.map +1 -1
  529. package/build/components/line-height-control/index.js +17 -16
  530. package/build/components/line-height-control/index.js.map +1 -1
  531. package/build/components/line-height-control/index.native.js +2 -2
  532. package/build/components/line-height-control/index.native.js.map +1 -1
  533. package/build/components/link-control/index.js +101 -84
  534. package/build/components/link-control/index.js.map +1 -1
  535. package/build/components/link-control/link-preview.js +62 -49
  536. package/build/components/link-control/link-preview.js.map +1 -1
  537. package/build/components/link-control/search-create-button.js +6 -5
  538. package/build/components/link-control/search-create-button.js.map +1 -1
  539. package/build/components/link-control/search-input.js +32 -31
  540. package/build/components/link-control/search-input.js.map +1 -1
  541. package/build/components/link-control/search-item.js +12 -11
  542. package/build/components/link-control/search-item.js.map +1 -1
  543. package/build/components/link-control/search-results.js +50 -46
  544. package/build/components/link-control/search-results.js.map +1 -1
  545. package/build/components/link-control/settings-drawer.js +37 -30
  546. package/build/components/link-control/settings-drawer.js.map +1 -1
  547. package/build/components/link-control/settings.js +10 -9
  548. package/build/components/link-control/settings.js.map +1 -1
  549. package/build/components/list-view/appender.js +24 -22
  550. package/build/components/list-view/appender.js.map +1 -1
  551. package/build/components/list-view/aria-referenced-text.js +6 -6
  552. package/build/components/list-view/aria-referenced-text.js.map +1 -1
  553. package/build/components/list-view/block-contents.js +32 -29
  554. package/build/components/list-view/block-contents.js.map +1 -1
  555. package/build/components/list-view/block-select-button.js +50 -42
  556. package/build/components/list-view/block-select-button.js.map +1 -1
  557. package/build/components/list-view/block.js +96 -84
  558. package/build/components/list-view/block.js.map +1 -1
  559. package/build/components/list-view/branch.js +101 -95
  560. package/build/components/list-view/branch.js.map +1 -1
  561. package/build/components/list-view/drop-indicator.js +38 -31
  562. package/build/components/list-view/drop-indicator.js.map +1 -1
  563. package/build/components/list-view/expander.js +8 -6
  564. package/build/components/list-view/expander.js.map +1 -1
  565. package/build/components/list-view/index.js +42 -38
  566. package/build/components/list-view/index.js.map +1 -1
  567. package/build/components/list-view/leaf.js +5 -4
  568. package/build/components/list-view/leaf.js.map +1 -1
  569. package/build/components/media-placeholder/index.js +99 -79
  570. package/build/components/media-placeholder/index.js.map +1 -1
  571. package/build/components/media-placeholder/index.native.js +63 -52
  572. package/build/components/media-placeholder/index.native.js.map +1 -1
  573. package/build/components/media-replace-flow/index.js +72 -60
  574. package/build/components/media-replace-flow/index.js.map +1 -1
  575. package/build/components/media-replace-flow/index.native.js +2 -2
  576. package/build/components/media-replace-flow/index.native.js.map +1 -1
  577. package/build/components/media-upload/index.native.js +44 -40
  578. package/build/components/media-upload/index.native.js.map +1 -1
  579. package/build/components/media-upload-progress/index.native.js +39 -15
  580. package/build/components/media-upload-progress/index.native.js.map +1 -1
  581. package/build/components/multi-selection-inspector/index.js +19 -15
  582. package/build/components/multi-selection-inspector/index.js.map +1 -1
  583. package/build/components/navigable-toolbar/index.js +9 -7
  584. package/build/components/navigable-toolbar/index.js.map +1 -1
  585. package/build/components/observe-typing/index.js +6 -6
  586. package/build/components/observe-typing/index.js.map +1 -1
  587. package/build/components/panel-color-settings/index.js +2 -2
  588. package/build/components/panel-color-settings/index.js.map +1 -1
  589. package/build/components/plain-text/index.js +4 -5
  590. package/build/components/plain-text/index.js.map +1 -1
  591. package/build/components/plain-text/index.native.js +3 -3
  592. package/build/components/plain-text/index.native.js.map +1 -1
  593. package/build/components/provider/block-refs-provider.js +5 -4
  594. package/build/components/provider/block-refs-provider.js.map +1 -1
  595. package/build/components/provider/index.js +11 -7
  596. package/build/components/provider/index.js.map +1 -1
  597. package/build/components/provider/index.native.js +5 -5
  598. package/build/components/provider/index.native.js.map +1 -1
  599. package/build/components/provider/with-registry-provider.js +30 -26
  600. package/build/components/provider/with-registry-provider.js.map +1 -1
  601. package/build/components/publish-date-time-picker/index.js +36 -15
  602. package/build/components/publish-date-time-picker/index.js.map +1 -1
  603. package/build/components/recursion-provider/index.js +6 -5
  604. package/build/components/recursion-provider/index.js.map +1 -1
  605. package/build/components/resizable-box-popover/index.js +7 -6
  606. package/build/components/resizable-box-popover/index.js.map +1 -1
  607. package/build/components/resolution-tool/index.js +12 -11
  608. package/build/components/resolution-tool/index.js.map +1 -1
  609. package/build/components/responsive-block-control/index.js +30 -26
  610. package/build/components/responsive-block-control/index.js.map +1 -1
  611. package/build/components/responsive-block-control/label.js +11 -7
  612. package/build/components/responsive-block-control/label.js.map +1 -1
  613. package/build/components/rich-text/content.js +8 -5
  614. package/build/components/rich-text/content.js.map +1 -1
  615. package/build/components/rich-text/embed-handler-picker.native.js +2 -2
  616. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  617. package/build/components/rich-text/format-edit.js +5 -5
  618. package/build/components/rich-text/format-edit.js.map +1 -1
  619. package/build/components/rich-text/format-toolbar/index.js +37 -33
  620. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  621. package/build/components/rich-text/format-toolbar/index.native.js +8 -7
  622. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  623. package/build/components/rich-text/format-toolbar-container.js +17 -12
  624. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  625. package/build/components/rich-text/format-toolbar-container.native.js +5 -4
  626. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  627. package/build/components/rich-text/get-rich-text-values.js +4 -4
  628. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  629. package/build/components/rich-text/index.js +87 -76
  630. package/build/components/rich-text/index.js.map +1 -1
  631. package/build/components/rich-text/index.native.js +51 -47
  632. package/build/components/rich-text/index.native.js.map +1 -1
  633. package/build/components/rich-text/multiline.js +62 -62
  634. package/build/components/rich-text/multiline.js.map +1 -1
  635. package/build/components/rich-text/native/format-edit.js +3 -4
  636. package/build/components/rich-text/native/format-edit.js.map +1 -1
  637. package/build/components/rich-text/native/index.native.js +87 -80
  638. package/build/components/rich-text/native/index.native.js.map +1 -1
  639. package/build/components/rich-text/native/toolbar-button-with-options.native.js +19 -16
  640. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  641. package/build/components/rich-text/toolbar-button.js +8 -7
  642. package/build/components/rich-text/toolbar-button.js.map +1 -1
  643. package/build/components/rich-text/utils.js +5 -4
  644. package/build/components/rich-text/utils.js.map +1 -1
  645. package/build/components/rich-text/with-deprecations.js +2 -2
  646. package/build/components/rich-text/with-deprecations.js.map +1 -1
  647. package/build/components/segmented-text-control/index.js +20 -19
  648. package/build/components/segmented-text-control/index.js.map +1 -1
  649. package/build/components/skip-to-selected-block/index.js +6 -6
  650. package/build/components/skip-to-selected-block/index.js.map +1 -1
  651. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +26 -14
  652. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  653. package/build/components/spacing-sizes-control/index.js +23 -19
  654. package/build/components/spacing-sizes-control/index.js.map +1 -1
  655. package/build/components/spacing-sizes-control/input-controls/axial.js +19 -18
  656. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  657. package/build/components/spacing-sizes-control/input-controls/separated.js +18 -17
  658. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  659. package/build/components/spacing-sizes-control/input-controls/single.js +2 -2
  660. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  661. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +103 -100
  662. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  663. package/build/components/spacing-sizes-control/sides-dropdown/index.js +42 -34
  664. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  665. package/build/components/spacing-sizes-control/utils.js +2 -1
  666. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  667. package/build/components/text-alignment-control/index.js +2 -2
  668. package/build/components/text-alignment-control/index.js.map +1 -1
  669. package/build/components/text-decoration-control/index.js +2 -2
  670. package/build/components/text-decoration-control/index.js.map +1 -1
  671. package/build/components/text-transform-control/index.js +2 -2
  672. package/build/components/text-transform-control/index.js.map +1 -1
  673. package/build/components/tool-selector/index.js +35 -26
  674. package/build/components/tool-selector/index.js.map +1 -1
  675. package/build/components/typewriter/index.js +5 -4
  676. package/build/components/typewriter/index.js.map +1 -1
  677. package/build/components/ungroup-button/index.native.js +8 -6
  678. package/build/components/ungroup-button/index.native.js.map +1 -1
  679. package/build/components/unit-control/index.js +2 -2
  680. package/build/components/unit-control/index.js.map +1 -1
  681. package/build/components/unsupported-block-details/index.native.js +31 -28
  682. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  683. package/build/components/url-input/button.js +31 -28
  684. package/build/components/url-input/button.js.map +1 -1
  685. package/build/components/url-input/index.js +27 -22
  686. package/build/components/url-input/index.js.map +1 -1
  687. package/build/components/url-input/index.native.js +2 -2
  688. package/build/components/url-input/index.native.js.map +1 -1
  689. package/build/components/url-popover/image-url-input-ui.js +104 -91
  690. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  691. package/build/components/url-popover/index.js +24 -19
  692. package/build/components/url-popover/index.js.map +1 -1
  693. package/build/components/url-popover/link-editor.js +15 -14
  694. package/build/components/url-popover/link-editor.js.map +1 -1
  695. package/build/components/url-popover/link-viewer-url.js +6 -5
  696. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  697. package/build/components/url-popover/link-viewer.js +14 -13
  698. package/build/components/url-popover/link-viewer.js.map +1 -1
  699. package/build/components/use-block-commands/index.js +2 -2
  700. package/build/components/use-block-commands/index.js.map +1 -1
  701. package/build/components/video-player/gridicon-play.native.js +8 -7
  702. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  703. package/build/components/video-player/index.native.js +43 -40
  704. package/build/components/video-player/index.native.js.map +1 -1
  705. package/build/components/warning/index.js +34 -26
  706. package/build/components/warning/index.js.map +1 -1
  707. package/build/components/warning/index.native.js +17 -13
  708. package/build/components/warning/index.native.js.map +1 -1
  709. package/build/components/writing-flow/index.js +9 -6
  710. package/build/components/writing-flow/index.js.map +1 -1
  711. package/build/components/writing-flow/use-clipboard-handler.js +41 -19
  712. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  713. package/build/components/writing-flow/use-tab-nav.js +3 -3
  714. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  715. package/build/components/writing-mode-control/index.js +2 -2
  716. package/build/components/writing-mode-control/index.js.map +1 -1
  717. package/build/hooks/align.js +10 -10
  718. package/build/hooks/align.js.map +1 -1
  719. package/build/hooks/anchor.js +29 -24
  720. package/build/hooks/anchor.js.map +1 -1
  721. package/build/hooks/background.js +6 -5
  722. package/build/hooks/background.js.map +1 -1
  723. package/build/hooks/block-bindings.js +89 -0
  724. package/build/hooks/block-bindings.js.map +1 -0
  725. package/build/hooks/block-hooks.js +41 -33
  726. package/build/hooks/block-hooks.js.map +1 -1
  727. package/build/hooks/block-style-variation.js +142 -0
  728. package/build/hooks/block-style-variation.js.map +1 -0
  729. package/build/hooks/border.js +6 -5
  730. package/build/hooks/border.js.map +1 -1
  731. package/build/hooks/color.js +11 -9
  732. package/build/hooks/color.js.map +1 -1
  733. package/build/hooks/content-lock-ui.js +23 -15
  734. package/build/hooks/content-lock-ui.js.map +1 -1
  735. package/build/hooks/contrast-checker.js +2 -2
  736. package/build/hooks/contrast-checker.js.map +1 -1
  737. package/build/hooks/custom-class-name.js +17 -16
  738. package/build/hooks/custom-class-name.js.map +1 -1
  739. package/build/hooks/dimensions.js +24 -21
  740. package/build/hooks/dimensions.js.map +1 -1
  741. package/build/hooks/duotone.js +49 -45
  742. package/build/hooks/duotone.js.map +1 -1
  743. package/build/hooks/font-family.js +3 -3
  744. package/build/hooks/font-family.js.map +1 -1
  745. package/build/hooks/font-size.js +2 -2
  746. package/build/hooks/font-size.js.map +1 -1
  747. package/build/hooks/index.js +4 -2
  748. package/build/hooks/index.js.map +1 -1
  749. package/build/hooks/layout-child.js +26 -24
  750. package/build/hooks/layout-child.js.map +1 -1
  751. package/build/hooks/layout.js +61 -55
  752. package/build/hooks/layout.js.map +1 -1
  753. package/build/hooks/line-height.js +2 -2
  754. package/build/hooks/line-height.js.map +1 -1
  755. package/build/hooks/position.js +28 -26
  756. package/build/hooks/position.js.map +1 -1
  757. package/build/hooks/spacing-visualizer.js +10 -9
  758. package/build/hooks/spacing-visualizer.js.map +1 -1
  759. package/build/hooks/style.js +23 -13
  760. package/build/hooks/style.js.map +1 -1
  761. package/build/hooks/text-align.js +19 -18
  762. package/build/hooks/text-align.js.map +1 -1
  763. package/build/hooks/typography.js +6 -5
  764. package/build/hooks/typography.js.map +1 -1
  765. package/build/hooks/typography.native.js +11 -8
  766. package/build/hooks/typography.native.js.map +1 -1
  767. package/build/hooks/use-bindings-attributes.js +47 -15
  768. package/build/hooks/use-bindings-attributes.js.map +1 -1
  769. package/build/hooks/use-typography-props.js +4 -3
  770. package/build/hooks/use-typography-props.js.map +1 -1
  771. package/build/hooks/use-zoom-out.js +2 -2
  772. package/build/hooks/use-zoom-out.js.map +1 -1
  773. package/build/hooks/utils.js +18 -17
  774. package/build/hooks/utils.js.map +1 -1
  775. package/build/layouts/constrained.js +66 -58
  776. package/build/layouts/constrained.js.map +1 -1
  777. package/build/layouts/flex.js +75 -61
  778. package/build/layouts/flex.js.map +1 -1
  779. package/build/layouts/grid.js +146 -125
  780. package/build/layouts/grid.js.map +1 -1
  781. package/build/private-apis.js +7 -1
  782. package/build/private-apis.js.map +1 -1
  783. package/build/store/actions.js +40 -8
  784. package/build/store/actions.js.map +1 -1
  785. package/build/store/get-block-settings.js +2 -49
  786. package/build/store/get-block-settings.js.map +1 -1
  787. package/build/store/reducer.js +21 -14
  788. package/build/store/reducer.js.map +1 -1
  789. package/build/store/selectors.js +34 -6
  790. package/build/store/selectors.js.map +1 -1
  791. package/build/store/utils.js +2 -0
  792. package/build/store/utils.js.map +1 -1
  793. package/build/utils/transform-styles/index.js +1 -1
  794. package/build/utils/transform-styles/index.js.map +1 -1
  795. package/build-module/autocompleters/block.js +9 -6
  796. package/build-module/autocompleters/block.js.map +1 -1
  797. package/build-module/autocompleters/link.js +12 -8
  798. package/build-module/autocompleters/link.js.map +1 -1
  799. package/build-module/components/alignment-control/index.js +3 -3
  800. package/build-module/components/alignment-control/index.js.map +1 -1
  801. package/build-module/components/alignment-control/ui.js +2 -2
  802. package/build-module/components/alignment-control/ui.js.map +1 -1
  803. package/build-module/components/audio-player/audio-url-parser.native.js +16 -0
  804. package/build-module/components/audio-player/audio-url-parser.native.js.map +1 -0
  805. package/build-module/components/audio-player/index.native.js +167 -0
  806. package/build-module/components/audio-player/index.native.js.map +1 -0
  807. package/build-module/components/autocomplete/index.js +2 -2
  808. package/build-module/components/autocomplete/index.js.map +1 -1
  809. package/build-module/components/block-alignment-control/index.js +3 -3
  810. package/build-module/components/block-alignment-control/index.js.map +1 -1
  811. package/build-module/components/block-alignment-control/ui.js +34 -30
  812. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  813. package/build-module/components/block-alignment-control/ui.native.js +2 -2
  814. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  815. package/build-module/components/block-alignment-matrix-control/index.js +5 -5
  816. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  817. package/build-module/components/block-bindings-toolbar-indicator/index.js +94 -13
  818. package/build-module/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  819. package/build-module/components/block-breadcrumb/index.js +38 -32
  820. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  821. package/build-module/components/block-canvas/index.js +37 -31
  822. package/build-module/components/block-canvas/index.js.map +1 -1
  823. package/build-module/components/block-caption/index.native.js +15 -14
  824. package/build-module/components/block-caption/index.native.js.map +1 -1
  825. package/build-module/components/block-card/index.js +34 -28
  826. package/build-module/components/block-card/index.js.map +1 -1
  827. package/build-module/components/block-compare/block-view.js +28 -18
  828. package/build-module/components/block-compare/block-view.js.map +1 -1
  829. package/build-module/components/block-compare/index.js +24 -22
  830. package/build-module/components/block-compare/index.js.map +1 -1
  831. package/build-module/components/block-context/index.js +2 -2
  832. package/build-module/components/block-context/index.js.map +1 -1
  833. package/build-module/components/block-controls/fill.js +24 -16
  834. package/build-module/components/block-controls/fill.js.map +1 -1
  835. package/build-module/components/block-controls/index.js +3 -3
  836. package/build-module/components/block-controls/index.js.map +1 -1
  837. package/build-module/components/block-controls/slot.js +6 -4
  838. package/build-module/components/block-controls/slot.js.map +1 -1
  839. package/build-module/components/block-controls/slot.native.js +12 -9
  840. package/build-module/components/block-controls/slot.native.js.map +1 -1
  841. package/build-module/components/block-controls/use-has-block-controls.js +1 -1
  842. package/build-module/components/block-controls/use-has-block-controls.js.map +1 -1
  843. package/build-module/components/block-draggable/draggable-chip.js +28 -19
  844. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  845. package/build-module/components/block-draggable/draggable-chip.native.js +10 -8
  846. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  847. package/build-module/components/block-draggable/dropping-insertion-point.native.js +2 -2
  848. package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  849. package/build-module/components/block-draggable/index.js +14 -13
  850. package/build-module/components/block-draggable/index.js.map +1 -1
  851. package/build-module/components/block-draggable/index.native.js +39 -30
  852. package/build-module/components/block-draggable/index.native.js.map +1 -1
  853. package/build-module/components/block-edit/edit.js +4 -4
  854. package/build-module/components/block-edit/edit.js.map +1 -1
  855. package/build-module/components/block-edit/edit.native.js +2 -2
  856. package/build-module/components/block-edit/edit.native.js.map +1 -1
  857. package/build-module/components/block-edit/index.js +19 -7
  858. package/build-module/components/block-edit/index.js.map +1 -1
  859. package/build-module/components/block-edit/multiple-usage-warning.js +40 -0
  860. package/build-module/components/block-edit/multiple-usage-warning.js.map +1 -0
  861. package/build-module/components/block-edit-visually-button/index.js +9 -6
  862. package/build-module/components/block-edit-visually-button/index.js.map +1 -1
  863. package/build-module/components/block-full-height-alignment-control/index.js +2 -2
  864. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  865. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js +2 -3
  866. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  867. package/build-module/components/block-heading-level-dropdown/index.js +4 -4
  868. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  869. package/build-module/components/block-heading-level-dropdown/index.native.js +4 -4
  870. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  871. package/build-module/components/block-icon/index.js +6 -5
  872. package/build-module/components/block-icon/index.js.map +1 -1
  873. package/build-module/components/block-icon/index.native.js +6 -5
  874. package/build-module/components/block-icon/index.native.js.map +1 -1
  875. package/build-module/components/block-info-slot-fill/index.js +3 -3
  876. package/build-module/components/block-info-slot-fill/index.js.map +1 -1
  877. package/build-module/components/block-inspector/index.js +104 -88
  878. package/build-module/components/block-inspector/index.js.map +1 -1
  879. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
  880. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  881. package/build-module/components/block-list/block-crash-warning.js +5 -4
  882. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  883. package/build-module/components/block-list/block-crash-warning.native.js +2 -2
  884. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
  885. package/build-module/components/block-list/block-html.js +2 -2
  886. package/build-module/components/block-list/block-html.js.map +1 -1
  887. package/build-module/components/block-list/block-invalid-warning.js +27 -21
  888. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  889. package/build-module/components/block-list/block-invalid-warning.native.js +12 -11
  890. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  891. package/build-module/components/block-list/block-list-item-cell.native.js +5 -4
  892. package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
  893. package/build-module/components/block-list/block-list-item.native.js +29 -26
  894. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  895. package/build-module/components/block-list/block-outline.native.js +2 -2
  896. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  897. package/build-module/components/block-list/block-selection-button.native.js +36 -33
  898. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  899. package/build-module/components/block-list/block.js +109 -61
  900. package/build-module/components/block-list/block.js.map +1 -1
  901. package/build-module/components/block-list/block.native.js +61 -51
  902. package/build-module/components/block-list/block.native.js.map +1 -1
  903. package/build-module/components/block-list/grid-item.native.js +5 -4
  904. package/build-module/components/block-list/grid-item.native.js.map +1 -1
  905. package/build-module/components/block-list/index.js +39 -34
  906. package/build-module/components/block-list/index.js.map +1 -1
  907. package/build-module/components/block-list/index.native.js +99 -85
  908. package/build-module/components/block-list/index.native.js.map +1 -1
  909. package/build-module/components/block-list/insertion-point.native.js +13 -10
  910. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  911. package/build-module/components/block-list/layout.js +7 -3
  912. package/build-module/components/block-list/layout.js.map +1 -1
  913. package/build-module/components/block-list/subdirectory-icon.js +8 -7
  914. package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
  915. package/build-module/components/block-list/use-block-props/index.js +1 -1
  916. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  917. package/build-module/components/block-list-appender/index.js +9 -8
  918. package/build-module/components/block-list-appender/index.js.map +1 -1
  919. package/build-module/components/block-list-appender/index.native.js +4 -4
  920. package/build-module/components/block-list-appender/index.native.js.map +1 -1
  921. package/build-module/components/block-lock/menu-item.js +15 -10
  922. package/build-module/components/block-lock/menu-item.js.map +1 -1
  923. package/build-module/components/block-lock/modal.js +108 -90
  924. package/build-module/components/block-lock/modal.js.map +1 -1
  925. package/build-module/components/block-lock/toolbar.js +20 -15
  926. package/build-module/components/block-lock/toolbar.js.map +1 -1
  927. package/build-module/components/block-media-update-progress/index.native.js +18 -15
  928. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  929. package/build-module/components/block-mover/button.js +21 -16
  930. package/build-module/components/block-mover/button.js.map +1 -1
  931. package/build-module/components/block-mover/index.js +35 -27
  932. package/build-module/components/block-mover/index.js.map +1 -1
  933. package/build-module/components/block-mover/index.native.js +30 -27
  934. package/build-module/components/block-mover/index.native.js.map +1 -1
  935. package/build-module/components/block-navigation/dropdown.js +12 -9
  936. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  937. package/build-module/components/block-parent-selector/index.js +13 -13
  938. package/build-module/components/block-parent-selector/index.js.map +1 -1
  939. package/build-module/components/block-pattern-setup/index.js +90 -76
  940. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  941. package/build-module/components/block-pattern-setup/setup-toolbar.js +51 -45
  942. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  943. package/build-module/components/block-patterns-list/index.js +98 -86
  944. package/build-module/components/block-patterns-list/index.js.map +1 -1
  945. package/build-module/components/block-patterns-paging/index.js +71 -52
  946. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  947. package/build-module/components/block-popover/cover.js +13 -10
  948. package/build-module/components/block-popover/cover.js.map +1 -1
  949. package/build-module/components/block-popover/drop-zone.js +11 -10
  950. package/build-module/components/block-popover/drop-zone.js.map +1 -1
  951. package/build-module/components/block-popover/inbetween.js +8 -7
  952. package/build-module/components/block-popover/inbetween.js.map +1 -1
  953. package/build-module/components/block-popover/index.js +9 -7
  954. package/build-module/components/block-popover/index.js.map +1 -1
  955. package/build-module/components/block-preview/auto.js +55 -47
  956. package/build-module/components/block-preview/auto.js.map +1 -1
  957. package/build-module/components/block-preview/index.js +17 -14
  958. package/build-module/components/block-preview/index.js.map +1 -1
  959. package/build-module/components/block-quick-navigation/index.js +25 -16
  960. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  961. package/build-module/components/block-removal-warning-modal/index.js +19 -12
  962. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  963. package/build-module/components/block-rename/modal.js +45 -37
  964. package/build-module/components/block-rename/modal.js.map +1 -1
  965. package/build-module/components/block-rename/rename-control.js +26 -21
  966. package/build-module/components/block-rename/rename-control.js.map +1 -1
  967. package/build-module/components/block-selection-clearer/index.js +2 -2
  968. package/build-module/components/block-selection-clearer/index.js.map +1 -1
  969. package/build-module/components/block-settings/button.native.js +13 -9
  970. package/build-module/components/block-settings/button.native.js.map +1 -1
  971. package/build-module/components/block-settings/container.native.js +42 -28
  972. package/build-module/components/block-settings/container.native.js.map +1 -1
  973. package/build-module/components/block-settings-menu/block-html-convert-button.js +5 -4
  974. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  975. package/build-module/components/block-settings-menu/block-mode-toggle.js +5 -4
  976. package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  977. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js +7 -6
  978. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  979. package/build-module/components/block-settings-menu/block-settings-dropdown.js +95 -75
  980. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  981. package/build-module/components/block-settings-menu/index.js +10 -6
  982. package/build-module/components/block-settings-menu/index.js.map +1 -1
  983. package/build-module/components/block-settings-menu-controls/index.js +30 -24
  984. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  985. package/build-module/components/block-styles/index.js +44 -38
  986. package/build-module/components/block-styles/index.js.map +1 -1
  987. package/build-module/components/block-styles/index.native.js +7 -7
  988. package/build-module/components/block-styles/index.native.js.map +1 -1
  989. package/build-module/components/block-styles/menu-items.js +18 -14
  990. package/build-module/components/block-styles/menu-items.js.map +1 -1
  991. package/build-module/components/block-styles/preview-panel.js +2 -2
  992. package/build-module/components/block-styles/preview-panel.js.map +1 -1
  993. package/build-module/components/block-styles/preview.native.js +25 -21
  994. package/build-module/components/block-styles/preview.native.js.map +1 -1
  995. package/build-module/components/block-switcher/block-styles-menu.js +8 -7
  996. package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
  997. package/build-module/components/block-switcher/block-transformations-menu.js +33 -28
  998. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  999. package/build-module/components/block-switcher/block-transformations-menu.native.js +2 -2
  1000. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  1001. package/build-module/components/block-switcher/block-variation-transformations.js +21 -17
  1002. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  1003. package/build-module/components/block-switcher/index.js +87 -70
  1004. package/build-module/components/block-switcher/index.js.map +1 -1
  1005. package/build-module/components/block-switcher/pattern-transformations-menu.js +62 -51
  1006. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  1007. package/build-module/components/block-switcher/preview-block-popover.js +23 -17
  1008. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  1009. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +39 -34
  1010. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  1011. package/build-module/components/block-toolbar/index.js +55 -43
  1012. package/build-module/components/block-toolbar/index.js.map +1 -1
  1013. package/build-module/components/block-toolbar/index.native.js +29 -21
  1014. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  1015. package/build-module/components/block-toolbar/shuffle.js +7 -5
  1016. package/build-module/components/block-toolbar/shuffle.js.map +1 -1
  1017. package/build-module/components/block-tools/block-selection-button.js +61 -46
  1018. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  1019. package/build-module/components/block-tools/block-toolbar-breadcrumb.js +8 -7
  1020. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  1021. package/build-module/components/block-tools/block-toolbar-popover.js +15 -14
  1022. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  1023. package/build-module/components/block-tools/empty-block-inserter.js +13 -11
  1024. package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
  1025. package/build-module/components/block-tools/index.js +30 -26
  1026. package/build-module/components/block-tools/index.js.map +1 -1
  1027. package/build-module/components/block-tools/insertion-point.js +43 -40
  1028. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  1029. package/build-module/components/block-tools/zoom-out-mode-inserters.js +34 -32
  1030. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  1031. package/build-module/components/block-types-list/index.js +16 -15
  1032. package/build-module/components/block-types-list/index.js.map +1 -1
  1033. package/build-module/components/block-types-list/index.native.js +31 -26
  1034. package/build-module/components/block-types-list/index.native.js.map +1 -1
  1035. package/build-module/components/block-variation-picker/index.js +31 -25
  1036. package/build-module/components/block-variation-picker/index.js.map +1 -1
  1037. package/build-module/components/block-variation-picker/index.native.js +33 -25
  1038. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  1039. package/build-module/components/block-variation-transforms/index.js +54 -47
  1040. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  1041. package/build-module/components/block-vertical-alignment-control/icons.js +31 -26
  1042. package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
  1043. package/build-module/components/block-vertical-alignment-control/index.js +3 -3
  1044. package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
  1045. package/build-module/components/block-vertical-alignment-control/ui.js +2 -2
  1046. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  1047. package/build-module/components/border-radius-control/all-input-control.js +3 -3
  1048. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  1049. package/build-module/components/border-radius-control/index.js +45 -38
  1050. package/build-module/components/border-radius-control/index.js.map +1 -1
  1051. package/build-module/components/border-radius-control/input-controls.js +23 -21
  1052. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  1053. package/build-module/components/border-radius-control/linked-button.js +12 -11
  1054. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  1055. package/build-module/components/button-block-appender/index.js +20 -13
  1056. package/build-module/components/button-block-appender/index.js.map +1 -1
  1057. package/build-module/components/button-block-appender/index.native.js +29 -24
  1058. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  1059. package/build-module/components/caption/index.native.js +22 -21
  1060. package/build-module/components/caption/index.native.js.map +1 -1
  1061. package/build-module/components/child-layout-control/index.js +139 -129
  1062. package/build-module/components/child-layout-control/index.js.map +1 -1
  1063. package/build-module/components/color-palette/control.js +2 -2
  1064. package/build-module/components/color-palette/control.js.map +1 -1
  1065. package/build-module/components/color-palette/with-color-context.js +2 -2
  1066. package/build-module/components/color-palette/with-color-context.js.map +1 -1
  1067. package/build-module/components/color-style-selector/index.js +29 -20
  1068. package/build-module/components/color-style-selector/index.js.map +1 -1
  1069. package/build-module/components/colors/utils.js +3 -3
  1070. package/build-module/components/colors/utils.js.map +1 -1
  1071. package/build-module/components/colors/with-colors.js +7 -7
  1072. package/build-module/components/colors/with-colors.js.map +1 -1
  1073. package/build-module/components/colors-gradients/control.js +54 -39
  1074. package/build-module/components/colors-gradients/control.js.map +1 -1
  1075. package/build-module/components/colors-gradients/dropdown.js +72 -61
  1076. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  1077. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +23 -18
  1078. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  1079. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +13 -7
  1080. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  1081. package/build-module/components/contrast-checker/index.js +10 -8
  1082. package/build-module/components/contrast-checker/index.js.map +1 -1
  1083. package/build-module/components/contrast-checker/index.native.js +13 -10
  1084. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  1085. package/build-module/components/convert-to-group-buttons/index.js +19 -13
  1086. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  1087. package/build-module/components/convert-to-group-buttons/toolbar.js +21 -18
  1088. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  1089. package/build-module/components/copy-handler/index.js +2 -2
  1090. package/build-module/components/copy-handler/index.js.map +1 -1
  1091. package/build-module/components/date-format-picker/index.js +45 -40
  1092. package/build-module/components/date-format-picker/index.js.map +1 -1
  1093. package/build-module/components/default-block-appender/index.js +33 -30
  1094. package/build-module/components/default-block-appender/index.js.map +1 -1
  1095. package/build-module/components/default-block-appender/index.native.js +14 -12
  1096. package/build-module/components/default-block-appender/index.native.js.map +1 -1
  1097. package/build-module/components/dimensions-tool/aspect-ratio-tool.js +12 -12
  1098. package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  1099. package/build-module/components/dimensions-tool/index.js +117 -113
  1100. package/build-module/components/dimensions-tool/index.js.map +1 -1
  1101. package/build-module/components/dimensions-tool/scale-tool.js +15 -14
  1102. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  1103. package/build-module/components/dimensions-tool/width-height-tool.js +39 -33
  1104. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  1105. package/build-module/components/duotone-control/index.js +22 -18
  1106. package/build-module/components/duotone-control/index.js.map +1 -1
  1107. package/build-module/components/editable-text/index.js +6 -5
  1108. package/build-module/components/editable-text/index.js.map +1 -1
  1109. package/build-module/components/editor-styles/index.js +25 -21
  1110. package/build-module/components/editor-styles/index.js.map +1 -1
  1111. package/build-module/components/floating-toolbar/index.native.js +19 -16
  1112. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  1113. package/build-module/components/floating-toolbar/nav-up-icon.js +15 -13
  1114. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  1115. package/build-module/components/font-appearance-control/index.js +2 -2
  1116. package/build-module/components/font-appearance-control/index.js.map +1 -1
  1117. package/build-module/components/font-family/index.js +2 -2
  1118. package/build-module/components/font-family/index.js.map +1 -1
  1119. package/build-module/components/font-sizes/font-size-picker.js +2 -2
  1120. package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
  1121. package/build-module/components/font-sizes/utils.js +3 -3
  1122. package/build-module/components/font-sizes/utils.js.map +1 -1
  1123. package/build-module/components/font-sizes/with-font-sizes.js +3 -3
  1124. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  1125. package/build-module/components/global-styles/advanced-panel.js +18 -15
  1126. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  1127. package/build-module/components/global-styles/background-panel.js +189 -122
  1128. package/build-module/components/global-styles/background-panel.js.map +1 -1
  1129. package/build-module/components/global-styles/border-panel.js +63 -56
  1130. package/build-module/components/global-styles/border-panel.js.map +1 -1
  1131. package/build-module/components/global-styles/color-panel.js +112 -87
  1132. package/build-module/components/global-styles/color-panel.js.map +1 -1
  1133. package/build-module/components/global-styles/color-panel.native.js +13 -10
  1134. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  1135. package/build-module/components/global-styles/dimensions-panel.js +184 -171
  1136. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  1137. package/build-module/components/global-styles/filters-panel.js +79 -65
  1138. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  1139. package/build-module/components/global-styles/hooks.js +14 -3
  1140. package/build-module/components/global-styles/hooks.js.map +1 -1
  1141. package/build-module/components/global-styles/image-settings-panel.js +27 -22
  1142. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  1143. package/build-module/components/global-styles/index.js +2 -2
  1144. package/build-module/components/global-styles/index.js.map +1 -1
  1145. package/build-module/components/global-styles/shadow-panel-components.js +74 -63
  1146. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  1147. package/build-module/components/global-styles/theme-file-uri-utils.js +73 -0
  1148. package/build-module/components/global-styles/theme-file-uri-utils.js.map +1 -0
  1149. package/build-module/components/global-styles/typography-panel.js +177 -135
  1150. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  1151. package/build-module/components/global-styles/use-global-styles-context.native.js +431 -0
  1152. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -0
  1153. package/build-module/components/global-styles/use-global-styles-output.js +114 -78
  1154. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  1155. package/build-module/components/gradients/with-gradient.js +2 -2
  1156. package/build-module/components/gradients/with-gradient.js.map +1 -1
  1157. package/build-module/components/grid-visualizer/grid-item-resizer.js +59 -58
  1158. package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  1159. package/build-module/components/grid-visualizer/grid-visualizer.js +20 -15
  1160. package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
  1161. package/build-module/components/height-control/index.js +40 -32
  1162. package/build-module/components/height-control/index.js.map +1 -1
  1163. package/build-module/components/iframe/index.js +72 -62
  1164. package/build-module/components/iframe/index.js.map +1 -1
  1165. package/build-module/components/image-editor/aspect-ratio-dropdown.js +75 -69
  1166. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  1167. package/build-module/components/image-editor/context.js +5 -4
  1168. package/build-module/components/image-editor/context.js.map +1 -1
  1169. package/build-module/components/image-editor/cropper.js +26 -21
  1170. package/build-module/components/image-editor/cropper.js.map +1 -1
  1171. package/build-module/components/image-editor/form-controls.js +13 -7
  1172. package/build-module/components/image-editor/form-controls.js.map +1 -1
  1173. package/build-module/components/image-editor/index.js +23 -13
  1174. package/build-module/components/image-editor/index.js.map +1 -1
  1175. package/build-module/components/image-editor/rotation-button.js +2 -2
  1176. package/build-module/components/image-editor/rotation-button.js.map +1 -1
  1177. package/build-module/components/image-editor/zoom-dropdown.js +4 -4
  1178. package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
  1179. package/build-module/components/image-link-destinations/index.native.js +39 -27
  1180. package/build-module/components/image-link-destinations/index.native.js.map +1 -1
  1181. package/build-module/components/image-size-control/index.js +55 -45
  1182. package/build-module/components/image-size-control/index.js.map +1 -1
  1183. package/build-module/components/index.native.js +2 -0
  1184. package/build-module/components/index.native.js.map +1 -1
  1185. package/build-module/components/inner-blocks/button-block-appender.js +2 -2
  1186. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  1187. package/build-module/components/inner-blocks/default-block-appender.js +2 -2
  1188. package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
  1189. package/build-module/components/inner-blocks/index.js +19 -16
  1190. package/build-module/components/inner-blocks/index.js.map +1 -1
  1191. package/build-module/components/inner-blocks/index.native.js +31 -29
  1192. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  1193. package/build-module/components/inner-blocks/use-nested-settings-update.js +11 -14
  1194. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  1195. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js +21 -17
  1196. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  1197. package/build-module/components/inner-blocks/with-client-id.js +2 -2
  1198. package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
  1199. package/build-module/components/inserter/block-patterns-explorer/index.js +23 -20
  1200. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  1201. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +40 -36
  1202. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  1203. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +27 -19
  1204. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  1205. package/build-module/components/inserter/block-patterns-tab/index.js +40 -31
  1206. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  1207. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +21 -5
  1208. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  1209. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +44 -31
  1210. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  1211. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +56 -42
  1212. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  1213. package/build-module/components/inserter/block-types-tab.js +110 -67
  1214. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  1215. package/build-module/components/inserter/block-types-tab.native.js +2 -2
  1216. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  1217. package/build-module/components/inserter/category-tabs/index.js +27 -20
  1218. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  1219. package/build-module/components/inserter/hooks/use-block-types-state.js +11 -5
  1220. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  1221. package/build-module/components/inserter/hooks/use-insertion-point.js +33 -6
  1222. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  1223. package/build-module/components/inserter/index.js +6 -6
  1224. package/build-module/components/inserter/index.js.map +1 -1
  1225. package/build-module/components/inserter/index.native.js +23 -19
  1226. package/build-module/components/inserter/index.native.js.map +1 -1
  1227. package/build-module/components/inserter/library.js +14 -6
  1228. package/build-module/components/inserter/library.js.map +1 -1
  1229. package/build-module/components/inserter/media-tab/media-list.js +9 -9
  1230. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  1231. package/build-module/components/inserter/media-tab/media-panel.js +20 -17
  1232. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  1233. package/build-module/components/inserter/media-tab/media-preview.js +94 -66
  1234. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  1235. package/build-module/components/inserter/media-tab/media-tab.js +46 -36
  1236. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  1237. package/build-module/components/inserter/media-tab/utils.js +2 -2
  1238. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  1239. package/build-module/components/inserter/menu.js +102 -83
  1240. package/build-module/components/inserter/menu.js.map +1 -1
  1241. package/build-module/components/inserter/menu.native.js +36 -28
  1242. package/build-module/components/inserter/menu.native.js.map +1 -1
  1243. package/build-module/components/inserter/mobile-tab-navigation.js +57 -40
  1244. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  1245. package/build-module/components/inserter/no-results.js +11 -7
  1246. package/build-module/components/inserter/no-results.js.map +1 -1
  1247. package/build-module/components/inserter/no-results.native.js +14 -8
  1248. package/build-module/components/inserter/no-results.native.js.map +1 -1
  1249. package/build-module/components/inserter/panel.js +17 -10
  1250. package/build-module/components/inserter/panel.js.map +1 -1
  1251. package/build-module/components/inserter/preview-panel.js +25 -20
  1252. package/build-module/components/inserter/preview-panel.js.map +1 -1
  1253. package/build-module/components/inserter/quick-inserter.js +36 -31
  1254. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  1255. package/build-module/components/inserter/reusable-block-rename-hint.js +21 -18
  1256. package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
  1257. package/build-module/components/inserter/reusable-blocks-tab.native.js +2 -2
  1258. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  1259. package/build-module/components/inserter/search-results.js +53 -41
  1260. package/build-module/components/inserter/search-results.js.map +1 -1
  1261. package/build-module/components/inserter/search-results.native.js +3 -3
  1262. package/build-module/components/inserter/search-results.native.js.map +1 -1
  1263. package/build-module/components/inserter/tabs.js +31 -26
  1264. package/build-module/components/inserter/tabs.js.map +1 -1
  1265. package/build-module/components/inserter/tabs.native.js +20 -18
  1266. package/build-module/components/inserter/tabs.native.js.map +1 -1
  1267. package/build-module/components/inserter/tips.js +7 -5
  1268. package/build-module/components/inserter/tips.js.map +1 -1
  1269. package/build-module/components/inserter-button/index.native.js +29 -23
  1270. package/build-module/components/inserter-button/index.native.js.map +1 -1
  1271. package/build-module/components/inserter-button/sparkles.js +8 -7
  1272. package/build-module/components/inserter-button/sparkles.js.map +1 -1
  1273. package/build-module/components/inserter-draggable-blocks/index.js +14 -13
  1274. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  1275. package/build-module/components/inserter-list-item/index.js +69 -62
  1276. package/build-module/components/inserter-list-item/index.js.map +1 -1
  1277. package/build-module/components/inserter-listbox/group.js +2 -2
  1278. package/build-module/components/inserter-listbox/group.js.map +1 -1
  1279. package/build-module/components/inserter-listbox/index.js +6 -4
  1280. package/build-module/components/inserter-listbox/index.js.map +1 -1
  1281. package/build-module/components/inserter-listbox/item.js +10 -8
  1282. package/build-module/components/inserter-listbox/item.js.map +1 -1
  1283. package/build-module/components/inserter-listbox/row.js +2 -2
  1284. package/build-module/components/inserter-listbox/row.js.map +1 -1
  1285. package/build-module/components/inspector-controls/block-support-slot-container.js +2 -2
  1286. package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
  1287. package/build-module/components/inspector-controls/block-support-tools-panel.js +5 -5
  1288. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  1289. package/build-module/components/inspector-controls/fill.js +22 -17
  1290. package/build-module/components/inspector-controls/fill.js.map +1 -1
  1291. package/build-module/components/inspector-controls/fill.native.js +14 -5
  1292. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  1293. package/build-module/components/inspector-controls/index.js +3 -3
  1294. package/build-module/components/inspector-controls/index.js.map +1 -1
  1295. package/build-module/components/inspector-controls/slot.js +11 -10
  1296. package/build-module/components/inspector-controls/slot.js.map +1 -1
  1297. package/build-module/components/inspector-controls/slot.native.js +3 -3
  1298. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  1299. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +7 -6
  1300. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  1301. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js +11 -9
  1302. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  1303. package/build-module/components/inspector-controls-tabs/index.js +45 -32
  1304. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  1305. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +8 -7
  1306. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  1307. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +21 -18
  1308. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  1309. package/build-module/components/inspector-controls-tabs/settings-tab.js +8 -2
  1310. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  1311. package/build-module/components/inspector-controls-tabs/styles-tab.js +33 -26
  1312. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  1313. package/build-module/components/inspector-popover-header/index.js +32 -26
  1314. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  1315. package/build-module/components/justify-content-control/index.js +3 -3
  1316. package/build-module/components/justify-content-control/index.js.map +1 -1
  1317. package/build-module/components/justify-content-control/ui.js +2 -2
  1318. package/build-module/components/justify-content-control/ui.js.map +1 -1
  1319. package/build-module/components/letter-spacing-control/index.js +2 -2
  1320. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  1321. package/build-module/components/line-height-control/index.js +17 -16
  1322. package/build-module/components/line-height-control/index.js.map +1 -1
  1323. package/build-module/components/line-height-control/index.native.js +2 -2
  1324. package/build-module/components/line-height-control/index.native.js.map +1 -1
  1325. package/build-module/components/link-control/index.js +102 -82
  1326. package/build-module/components/link-control/index.js.map +1 -1
  1327. package/build-module/components/link-control/link-preview.js +64 -49
  1328. package/build-module/components/link-control/link-preview.js.map +1 -1
  1329. package/build-module/components/link-control/search-create-button.js +6 -5
  1330. package/build-module/components/link-control/search-create-button.js.map +1 -1
  1331. package/build-module/components/link-control/search-input.js +33 -31
  1332. package/build-module/components/link-control/search-input.js.map +1 -1
  1333. package/build-module/components/link-control/search-item.js +12 -11
  1334. package/build-module/components/link-control/search-item.js.map +1 -1
  1335. package/build-module/components/link-control/search-results.js +51 -46
  1336. package/build-module/components/link-control/search-results.js.map +1 -1
  1337. package/build-module/components/link-control/settings-drawer.js +39 -30
  1338. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  1339. package/build-module/components/link-control/settings.js +11 -9
  1340. package/build-module/components/link-control/settings.js.map +1 -1
  1341. package/build-module/components/list-view/appender.js +25 -22
  1342. package/build-module/components/list-view/appender.js.map +1 -1
  1343. package/build-module/components/list-view/aria-referenced-text.js +5 -4
  1344. package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
  1345. package/build-module/components/list-view/block-contents.js +34 -29
  1346. package/build-module/components/list-view/block-contents.js.map +1 -1
  1347. package/build-module/components/list-view/block-select-button.js +51 -42
  1348. package/build-module/components/list-view/block-select-button.js.map +1 -1
  1349. package/build-module/components/list-view/block.js +98 -84
  1350. package/build-module/components/list-view/block.js.map +1 -1
  1351. package/build-module/components/list-view/branch.js +102 -93
  1352. package/build-module/components/list-view/branch.js.map +1 -1
  1353. package/build-module/components/list-view/drop-indicator.js +39 -31
  1354. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  1355. package/build-module/components/list-view/expander.js +8 -6
  1356. package/build-module/components/list-view/expander.js.map +1 -1
  1357. package/build-module/components/list-view/index.js +43 -38
  1358. package/build-module/components/list-view/index.js.map +1 -1
  1359. package/build-module/components/list-view/leaf.js +5 -4
  1360. package/build-module/components/list-view/leaf.js.map +1 -1
  1361. package/build-module/components/media-placeholder/index.js +101 -79
  1362. package/build-module/components/media-placeholder/index.js.map +1 -1
  1363. package/build-module/components/media-placeholder/index.native.js +65 -52
  1364. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  1365. package/build-module/components/media-replace-flow/index.js +74 -60
  1366. package/build-module/components/media-replace-flow/index.js.map +1 -1
  1367. package/build-module/components/media-replace-flow/index.native.js +2 -2
  1368. package/build-module/components/media-replace-flow/index.native.js.map +1 -1
  1369. package/build-module/components/media-upload/index.native.js +46 -40
  1370. package/build-module/components/media-upload/index.native.js.map +1 -1
  1371. package/build-module/components/media-upload-progress/index.native.js +41 -16
  1372. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  1373. package/build-module/components/multi-selection-inspector/index.js +20 -15
  1374. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  1375. package/build-module/components/navigable-toolbar/index.js +9 -7
  1376. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  1377. package/build-module/components/observe-typing/index.js +5 -4
  1378. package/build-module/components/observe-typing/index.js.map +1 -1
  1379. package/build-module/components/panel-color-settings/index.js +2 -2
  1380. package/build-module/components/panel-color-settings/index.js.map +1 -1
  1381. package/build-module/components/plain-text/index.js +3 -3
  1382. package/build-module/components/plain-text/index.js.map +1 -1
  1383. package/build-module/components/plain-text/index.native.js +3 -3
  1384. package/build-module/components/plain-text/index.native.js.map +1 -1
  1385. package/build-module/components/provider/block-refs-provider.js +5 -4
  1386. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  1387. package/build-module/components/provider/index.js +12 -8
  1388. package/build-module/components/provider/index.js.map +1 -1
  1389. package/build-module/components/provider/index.native.js +4 -3
  1390. package/build-module/components/provider/index.native.js.map +1 -1
  1391. package/build-module/components/provider/with-registry-provider.js +32 -28
  1392. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  1393. package/build-module/components/publish-date-time-picker/index.js +37 -17
  1394. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  1395. package/build-module/components/recursion-provider/index.js +6 -5
  1396. package/build-module/components/recursion-provider/index.js.map +1 -1
  1397. package/build-module/components/resizable-box-popover/index.js +7 -6
  1398. package/build-module/components/resizable-box-popover/index.js.map +1 -1
  1399. package/build-module/components/resolution-tool/index.js +12 -11
  1400. package/build-module/components/resolution-tool/index.js.map +1 -1
  1401. package/build-module/components/responsive-block-control/index.js +31 -26
  1402. package/build-module/components/responsive-block-control/index.js.map +1 -1
  1403. package/build-module/components/responsive-block-control/label.js +13 -7
  1404. package/build-module/components/responsive-block-control/label.js.map +1 -1
  1405. package/build-module/components/rich-text/content.js +8 -5
  1406. package/build-module/components/rich-text/content.js.map +1 -1
  1407. package/build-module/components/rich-text/embed-handler-picker.native.js +2 -2
  1408. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  1409. package/build-module/components/rich-text/format-edit.js +5 -5
  1410. package/build-module/components/rich-text/format-edit.js.map +1 -1
  1411. package/build-module/components/rich-text/format-toolbar/index.js +39 -33
  1412. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  1413. package/build-module/components/rich-text/format-toolbar/index.native.js +10 -7
  1414. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  1415. package/build-module/components/rich-text/format-toolbar-container.js +17 -12
  1416. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  1417. package/build-module/components/rich-text/format-toolbar-container.native.js +5 -4
  1418. package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
  1419. package/build-module/components/rich-text/get-rich-text-values.js +3 -2
  1420. package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
  1421. package/build-module/components/rich-text/index.js +90 -77
  1422. package/build-module/components/rich-text/index.js.map +1 -1
  1423. package/build-module/components/rich-text/index.native.js +53 -47
  1424. package/build-module/components/rich-text/index.native.js.map +1 -1
  1425. package/build-module/components/rich-text/multiline.js +62 -62
  1426. package/build-module/components/rich-text/multiline.js.map +1 -1
  1427. package/build-module/components/rich-text/native/format-edit.js +3 -4
  1428. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  1429. package/build-module/components/rich-text/native/index.native.js +89 -80
  1430. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  1431. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +20 -14
  1432. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  1433. package/build-module/components/rich-text/toolbar-button.js +8 -7
  1434. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  1435. package/build-module/components/rich-text/utils.js +5 -4
  1436. package/build-module/components/rich-text/utils.js.map +1 -1
  1437. package/build-module/components/rich-text/with-deprecations.js +2 -2
  1438. package/build-module/components/rich-text/with-deprecations.js.map +1 -1
  1439. package/build-module/components/segmented-text-control/index.js +20 -17
  1440. package/build-module/components/segmented-text-control/index.js.map +1 -1
  1441. package/build-module/components/skip-to-selected-block/index.js +5 -4
  1442. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  1443. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +26 -14
  1444. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  1445. package/build-module/components/spacing-sizes-control/index.js +24 -19
  1446. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  1447. package/build-module/components/spacing-sizes-control/input-controls/axial.js +20 -18
  1448. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  1449. package/build-module/components/spacing-sizes-control/input-controls/separated.js +19 -17
  1450. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  1451. package/build-module/components/spacing-sizes-control/input-controls/single.js +2 -2
  1452. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  1453. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +106 -101
  1454. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  1455. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +44 -34
  1456. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  1457. package/build-module/components/spacing-sizes-control/utils.js +1 -0
  1458. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  1459. package/build-module/components/text-alignment-control/index.js +2 -2
  1460. package/build-module/components/text-alignment-control/index.js.map +1 -1
  1461. package/build-module/components/text-decoration-control/index.js +2 -2
  1462. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1463. package/build-module/components/text-transform-control/index.js +2 -2
  1464. package/build-module/components/text-transform-control/index.js.map +1 -1
  1465. package/build-module/components/tool-selector/index.js +37 -26
  1466. package/build-module/components/tool-selector/index.js.map +1 -1
  1467. package/build-module/components/typewriter/index.js +5 -4
  1468. package/build-module/components/typewriter/index.js.map +1 -1
  1469. package/build-module/components/ungroup-button/index.native.js +8 -6
  1470. package/build-module/components/ungroup-button/index.native.js.map +1 -1
  1471. package/build-module/components/unit-control/index.js +2 -2
  1472. package/build-module/components/unit-control/index.js.map +1 -1
  1473. package/build-module/components/unsupported-block-details/index.native.js +32 -28
  1474. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  1475. package/build-module/components/url-input/button.js +32 -28
  1476. package/build-module/components/url-input/button.js.map +1 -1
  1477. package/build-module/components/url-input/index.js +28 -20
  1478. package/build-module/components/url-input/index.js.map +1 -1
  1479. package/build-module/components/url-input/index.native.js +2 -2
  1480. package/build-module/components/url-input/index.native.js.map +1 -1
  1481. package/build-module/components/url-popover/image-url-input-ui.js +106 -91
  1482. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  1483. package/build-module/components/url-popover/index.js +25 -19
  1484. package/build-module/components/url-popover/index.js.map +1 -1
  1485. package/build-module/components/url-popover/link-editor.js +16 -14
  1486. package/build-module/components/url-popover/link-editor.js.map +1 -1
  1487. package/build-module/components/url-popover/link-viewer-url.js +6 -5
  1488. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  1489. package/build-module/components/url-popover/link-viewer.js +15 -13
  1490. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  1491. package/build-module/components/use-block-commands/index.js +2 -2
  1492. package/build-module/components/use-block-commands/index.js.map +1 -1
  1493. package/build-module/components/video-player/gridicon-play.native.js +8 -7
  1494. package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
  1495. package/build-module/components/video-player/index.native.js +44 -40
  1496. package/build-module/components/video-player/index.native.js.map +1 -1
  1497. package/build-module/components/warning/index.js +35 -26
  1498. package/build-module/components/warning/index.js.map +1 -1
  1499. package/build-module/components/warning/index.native.js +18 -13
  1500. package/build-module/components/warning/index.native.js.map +1 -1
  1501. package/build-module/components/writing-flow/index.js +11 -6
  1502. package/build-module/components/writing-flow/index.js.map +1 -1
  1503. package/build-module/components/writing-flow/use-clipboard-handler.js +42 -20
  1504. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  1505. package/build-module/components/writing-flow/use-tab-nav.js +3 -3
  1506. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  1507. package/build-module/components/writing-mode-control/index.js +2 -2
  1508. package/build-module/components/writing-mode-control/index.js.map +1 -1
  1509. package/build-module/hooks/align.js +9 -8
  1510. package/build-module/hooks/align.js.map +1 -1
  1511. package/build-module/hooks/anchor.js +30 -22
  1512. package/build-module/hooks/anchor.js.map +1 -1
  1513. package/build-module/hooks/background.js +6 -5
  1514. package/build-module/hooks/background.js.map +1 -1
  1515. package/build-module/hooks/block-bindings.js +81 -0
  1516. package/build-module/hooks/block-bindings.js.map +1 -0
  1517. package/build-module/hooks/block-hooks.js +42 -33
  1518. package/build-module/hooks/block-hooks.js.map +1 -1
  1519. package/build-module/hooks/block-style-variation.js +136 -0
  1520. package/build-module/hooks/block-style-variation.js.map +1 -0
  1521. package/build-module/hooks/border.js +6 -5
  1522. package/build-module/hooks/border.js.map +1 -1
  1523. package/build-module/hooks/color.js +11 -9
  1524. package/build-module/hooks/color.js.map +1 -1
  1525. package/build-module/hooks/content-lock-ui.js +25 -15
  1526. package/build-module/hooks/content-lock-ui.js.map +1 -1
  1527. package/build-module/hooks/contrast-checker.js +2 -2
  1528. package/build-module/hooks/contrast-checker.js.map +1 -1
  1529. package/build-module/hooks/custom-class-name.js +17 -16
  1530. package/build-module/hooks/custom-class-name.js.map +1 -1
  1531. package/build-module/hooks/dimensions.js +26 -21
  1532. package/build-module/hooks/dimensions.js.map +1 -1
  1533. package/build-module/hooks/duotone.js +51 -45
  1534. package/build-module/hooks/duotone.js.map +1 -1
  1535. package/build-module/hooks/font-family.js +3 -3
  1536. package/build-module/hooks/font-family.js.map +1 -1
  1537. package/build-module/hooks/font-size.js +2 -2
  1538. package/build-module/hooks/font-size.js.map +1 -1
  1539. package/build-module/hooks/index.js +4 -2
  1540. package/build-module/hooks/index.js.map +1 -1
  1541. package/build-module/hooks/layout-child.js +28 -24
  1542. package/build-module/hooks/layout-child.js.map +1 -1
  1543. package/build-module/hooks/layout.js +63 -55
  1544. package/build-module/hooks/layout.js.map +1 -1
  1545. package/build-module/hooks/line-height.js +2 -2
  1546. package/build-module/hooks/line-height.js.map +1 -1
  1547. package/build-module/hooks/position.js +28 -26
  1548. package/build-module/hooks/position.js.map +1 -1
  1549. package/build-module/hooks/spacing-visualizer.js +10 -9
  1550. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  1551. package/build-module/hooks/style.js +25 -13
  1552. package/build-module/hooks/style.js.map +1 -1
  1553. package/build-module/hooks/text-align.js +20 -19
  1554. package/build-module/hooks/text-align.js.map +1 -1
  1555. package/build-module/hooks/typography.js +6 -5
  1556. package/build-module/hooks/typography.js.map +1 -1
  1557. package/build-module/hooks/typography.native.js +12 -8
  1558. package/build-module/hooks/typography.native.js.map +1 -1
  1559. package/build-module/hooks/use-bindings-attributes.js +48 -14
  1560. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  1561. package/build-module/hooks/use-typography-props.js +3 -3
  1562. package/build-module/hooks/use-typography-props.js.map +1 -1
  1563. package/build-module/hooks/use-zoom-out.js +2 -2
  1564. package/build-module/hooks/use-zoom-out.js.map +1 -1
  1565. package/build-module/hooks/utils.js +18 -17
  1566. package/build-module/hooks/utils.js.map +1 -1
  1567. package/build-module/layouts/constrained.js +68 -58
  1568. package/build-module/layouts/constrained.js.map +1 -1
  1569. package/build-module/layouts/flex.js +77 -61
  1570. package/build-module/layouts/flex.js.map +1 -1
  1571. package/build-module/layouts/grid.js +148 -125
  1572. package/build-module/layouts/grid.js.map +1 -1
  1573. package/build-module/private-apis.js +7 -1
  1574. package/build-module/private-apis.js.map +1 -1
  1575. package/build-module/store/actions.js +40 -8
  1576. package/build-module/store/actions.js.map +1 -1
  1577. package/build-module/store/get-block-settings.js +2 -46
  1578. package/build-module/store/get-block-settings.js.map +1 -1
  1579. package/build-module/store/reducer.js +21 -14
  1580. package/build-module/store/reducer.js.map +1 -1
  1581. package/build-module/store/selectors.js +35 -7
  1582. package/build-module/store/selectors.js.map +1 -1
  1583. package/build-module/store/utils.js +1 -0
  1584. package/build-module/store/utils.js.map +1 -1
  1585. package/build-module/utils/transform-styles/index.js +1 -1
  1586. package/build-module/utils/transform-styles/index.js.map +1 -1
  1587. package/build-style/content-rtl.css +5 -1
  1588. package/build-style/content.css +5 -1
  1589. package/build-style/style-rtl.css +96 -73
  1590. package/build-style/style.css +96 -73
  1591. package/package.json +33 -32
  1592. package/src/components/alignment-control/test/index.js +1 -1
  1593. package/src/components/audio-player/audio-url-parser.native.js +20 -0
  1594. package/src/components/audio-player/index.native.js +221 -0
  1595. package/src/components/audio-player/styles.native.scss +114 -0
  1596. package/src/components/audio-player/test/audio-url-parser.native.js +53 -0
  1597. package/src/components/block-bindings-toolbar-indicator/index.js +127 -10
  1598. package/src/components/block-bindings-toolbar-indicator/style.scss +7 -8
  1599. package/src/components/block-canvas/style.scss +2 -6
  1600. package/src/components/block-card/index.js +9 -5
  1601. package/src/components/block-card/style.scss +0 -11
  1602. package/src/components/block-edit/index.js +13 -2
  1603. package/src/components/block-edit/multiple-usage-warning.js +46 -0
  1604. package/src/components/block-inspector/index.js +2 -4
  1605. package/src/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -5
  1606. package/src/components/block-list/block-invalid-warning.native.js +1 -1
  1607. package/src/components/block-list/block.js +64 -18
  1608. package/src/components/block-list/block.native.js +17 -9
  1609. package/src/components/block-patterns-list/index.js +4 -1
  1610. package/src/components/block-patterns-list/style.scss +23 -20
  1611. package/src/components/block-preview/style.scss +0 -26
  1612. package/src/components/block-settings/container.native.js +2 -0
  1613. package/src/components/block-toolbar/index.js +1 -1
  1614. package/src/components/block-tools/index.js +6 -5
  1615. package/src/components/block-tools/style.scss +2 -2
  1616. package/src/components/block-tools/zoom-out-mode-inserters.js +4 -3
  1617. package/src/components/block-variation-picker/content.scss +1 -1
  1618. package/src/components/border-radius-control/all-input-control.js +1 -1
  1619. package/src/components/border-radius-control/input-controls.js +1 -1
  1620. package/src/components/button-block-appender/index.js +2 -0
  1621. package/src/components/child-layout-control/index.js +12 -12
  1622. package/src/components/colors/utils.js +2 -2
  1623. package/src/components/colors/with-colors.js +2 -1
  1624. package/src/components/colors-gradients/control.js +3 -11
  1625. package/src/components/contrast-checker/test/index.js +8 -8
  1626. package/src/components/dimensions-tool/aspect-ratio-tool.js +1 -1
  1627. package/src/components/dimensions-tool/scale-tool.js +1 -1
  1628. package/src/components/dimensions-tool/width-height-tool.js +2 -2
  1629. package/src/components/font-sizes/utils.js +2 -1
  1630. package/src/components/global-styles/background-panel.js +128 -49
  1631. package/src/components/global-styles/border-panel.js +8 -5
  1632. package/src/components/global-styles/color-panel.js +27 -22
  1633. package/src/components/global-styles/color-panel.native.js +1 -1
  1634. package/src/components/global-styles/dimensions-panel.js +7 -8
  1635. package/src/components/global-styles/hooks.js +14 -1
  1636. package/src/components/global-styles/index.js +3 -0
  1637. package/src/components/global-styles/shadow-panel-components.js +11 -5
  1638. package/src/components/global-styles/test/theme-file-uri-utils.js +66 -0
  1639. package/src/components/global-styles/test/use-global-styles-context.native.js +434 -0
  1640. package/src/components/global-styles/test/use-global-styles-output.js +11 -10
  1641. package/src/components/global-styles/theme-file-uri-utils.js +77 -0
  1642. package/src/components/global-styles/typography-panel.js +50 -5
  1643. package/src/components/global-styles/use-global-styles-context.native.js +586 -0
  1644. package/src/components/global-styles/use-global-styles-output.js +199 -101
  1645. package/src/components/grid-visualizer/grid-visualizer.js +8 -1
  1646. package/src/components/grid-visualizer/style.scss +2 -1
  1647. package/src/components/height-control/index.js +1 -1
  1648. package/src/components/iframe/content.scss +4 -0
  1649. package/src/components/index.native.js +7 -0
  1650. package/src/components/inner-blocks/use-nested-settings-update.js +9 -16
  1651. package/src/components/inner-blocks/warning-max-depth-exceeded.native.js +1 -1
  1652. package/src/components/inserter/block-patterns-explorer/pattern-list.js +1 -1
  1653. package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +16 -2
  1654. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +6 -1
  1655. package/src/components/inserter/block-patterns-tab/patterns-filter.js +3 -2
  1656. package/src/components/inserter/block-types-tab.js +119 -78
  1657. package/src/components/inserter/category-tabs/index.js +1 -1
  1658. package/src/components/inserter/hooks/use-block-types-state.js +27 -6
  1659. package/src/components/inserter/hooks/use-insertion-point.js +53 -7
  1660. package/src/components/inserter/library.js +17 -7
  1661. package/src/components/inserter/menu.js +24 -11
  1662. package/src/components/inserter/quick-inserter.js +3 -1
  1663. package/src/components/inserter/search-results.js +2 -1
  1664. package/src/components/inserter/style.scss +45 -18
  1665. package/src/components/inserter/tabs.js +2 -2
  1666. package/src/components/inspector-controls/fill.native.js +3 -5
  1667. package/src/components/inspector-controls-tabs/index.js +15 -3
  1668. package/src/components/inspector-controls-tabs/style.scss +2 -10
  1669. package/src/components/link-control/index.js +10 -1
  1670. package/src/components/link-control/link-preview.js +1 -0
  1671. package/src/components/link-control/search-input.js +1 -1
  1672. package/src/components/link-control/style.scss +9 -3
  1673. package/src/components/list-view/block-contents.js +1 -1
  1674. package/src/components/media-placeholder/index.js +1 -1
  1675. package/src/components/media-placeholder/index.native.js +2 -2
  1676. package/src/components/media-upload-progress/index.native.js +22 -2
  1677. package/src/components/provider/with-registry-provider.js +33 -38
  1678. package/src/components/publish-date-time-picker/index.js +43 -15
  1679. package/src/components/resolution-tool/index.js +1 -1
  1680. package/src/components/rich-text/index.js +11 -5
  1681. package/src/components/rich-text/native/index.native.js +3 -2
  1682. package/src/components/rich-text/native/test/index.native.js +13 -13
  1683. package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +58 -16
  1684. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -3
  1685. package/src/components/spacing-sizes-control/utils.js +2 -0
  1686. package/src/components/video-player/index.native.js +1 -1
  1687. package/src/components/writing-flow/use-clipboard-handler.js +48 -23
  1688. package/src/hooks/block-bindings.js +92 -0
  1689. package/src/hooks/block-bindings.scss +3 -0
  1690. package/src/hooks/block-style-variation.js +156 -0
  1691. package/src/hooks/font-family.js +1 -1
  1692. package/src/hooks/index.js +4 -0
  1693. package/src/hooks/layout.js +1 -2
  1694. package/src/hooks/position.js +1 -1
  1695. package/src/hooks/style.js +9 -1
  1696. package/src/hooks/text-align.js +17 -11
  1697. package/src/hooks/use-bindings-attributes.js +48 -5
  1698. package/src/hooks/use-typography-props.js +2 -1
  1699. package/src/hooks/use-zoom-out.js +9 -2
  1700. package/src/hooks/utils.js +21 -4
  1701. package/src/layouts/flex.js +2 -2
  1702. package/src/layouts/grid.js +5 -5
  1703. package/src/private-apis.js +6 -0
  1704. package/src/store/actions.js +46 -13
  1705. package/src/store/get-block-settings.js +1 -46
  1706. package/src/store/reducer.js +24 -11
  1707. package/src/store/selectors.js +68 -11
  1708. package/src/store/utils.js +2 -0
  1709. package/src/style.scss +1 -0
  1710. package/src/utils/test/__snapshots__/transform-styles.js.snap +1 -1
  1711. package/src/utils/test/transform-styles.js +2 -2
  1712. package/src/utils/transform-styles/index.js +3 -1
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -23,6 +22,7 @@ import useBlockDisplayInformation from '../components/use-block-display-informat
23
22
  import { cleanEmptyObject, useStyleOverride } from './utils';
24
23
  import { unlock } from '../lock-unlock';
25
24
  import { store as blockEditorStore } from '../store';
25
+ import { jsx as _jsx } from "react/jsx-runtime";
26
26
  const {
27
27
  CustomSelectControl
28
28
  } = unlock(componentsPrivateApis);
@@ -251,30 +251,32 @@ export function PositionPanelPure({
251
251
 
252
252
  // Only display position controls if there is at least one option to choose from.
253
253
  return Platform.select({
254
- web: options.length > 1 ? createElement(InspectorControls, {
255
- group: "position"
256
- }, createElement(BaseControl, {
257
- className: "block-editor-hooks__position-selection",
258
- __nextHasNoMarginBottom: true,
259
- help: stickyHelpText
260
- }, createElement(CustomSelectControl, {
261
- __next40pxDefaultSize: true,
262
- className: "block-editor-hooks__position-selection__select-control",
263
- label: __('Position'),
264
- hideLabelFromVision: true,
265
- describedBy: sprintf(
266
- // translators: %s: Currently selected position.
267
- __('Currently selected position: %s'), selectedOption.name),
268
- options: options,
269
- value: selectedOption,
270
- __experimentalShowSelectedHint: true,
271
- onChange: ({
272
- selectedItem
273
- }) => {
274
- onChangeType(selectedItem.value);
275
- },
276
- size: '__unstable-large'
277
- }))) : null,
254
+ web: options.length > 1 ? /*#__PURE__*/_jsx(InspectorControls, {
255
+ group: "position",
256
+ children: /*#__PURE__*/_jsx(BaseControl, {
257
+ className: "block-editor-hooks__position-selection",
258
+ __nextHasNoMarginBottom: true,
259
+ help: stickyHelpText,
260
+ children: /*#__PURE__*/_jsx(CustomSelectControl, {
261
+ __next40pxDefaultSize: true,
262
+ className: "block-editor-hooks__position-selection__select-control",
263
+ label: __('Position'),
264
+ hideLabelFromVision: true,
265
+ describedBy: sprintf(
266
+ // translators: %s: Currently selected position.
267
+ __('Currently selected position: %s'), selectedOption.name),
268
+ options: options,
269
+ value: selectedOption,
270
+ __experimentalShowSelectedHint: true,
271
+ onChange: ({
272
+ selectedItem
273
+ }) => {
274
+ onChangeType(selectedItem.value);
275
+ },
276
+ size: "__unstable-large"
277
+ })
278
+ })
279
+ }) : null,
278
280
  native: null
279
281
  });
280
282
  }
@@ -284,7 +286,7 @@ export default {
284
286
  if (isPositionDisabled) {
285
287
  return null;
286
288
  }
287
- return createElement(PositionPanelPure, {
289
+ return /*#__PURE__*/_jsx(PositionPanelPure, {
288
290
  ...props
289
291
  });
290
292
  },
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__","_x","sprintf","getBlockSupport","hasBlockSupport","BaseControl","privateApis","componentsPrivateApis","useInstanceId","useSelect","useMemo","Platform","useSettings","InspectorControls","useBlockDisplayInformation","cleanEmptyObject","useStyleOverride","unlock","store","blockEditorStore","CustomSelectControl","POSITION_SUPPORT_KEY","OPTION_CLASSNAME","DEFAULT_OPTION","key","value","name","className","STICKY_OPTION","__experimentalHint","FIXED_OPTION","POSITION_SIDES","VALID_POSITION_TYPES","getPositionCSS","selector","style","output","type","positionType","position","includes","forEach","side","undefined","hasStickyPositionSupport","blockType","support","sticky","hasFixedPositionSupport","fixed","hasPositionSupport","hasPositionValue","props","attributes","hasStickyOrFixedPositionValue","resetPosition","setAttributes","top","right","bottom","left","useIsPositionDisabled","blockName","allowFixed","allowSticky","isDisabled","PositionPanelPure","clientId","firstParentClientId","select","getBlockParents","parents","length","blockInformation","stickyHelpText","title","options","availableOptions","push","onChangeType","next","placementValue","newStyle","selectedOption","find","option","web","createElement","group","__nextHasNoMarginBottom","help","__next40pxDefaultSize","label","hideLabelFromVision","describedBy","__experimentalShowSelectedHint","onChange","selectedItem","size","native","edit","Edit","isPositionDisabled","useBlockProps","attributeKeys","hasSupport","hasPositionBlockSupport","allowPositionStyles","id","positionSelector","css"],"sources":["@wordpress/block-editor/src/hooks/position.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport {\n\tBaseControl,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useSettings } from '../components/use-settings';\nimport InspectorControls from '../components/inspector-controls';\nimport useBlockDisplayInformation from '../components/use-block-display-information';\nimport { cleanEmptyObject, useStyleOverride } from './utils';\nimport { unlock } from '../lock-unlock';\nimport { store as blockEditorStore } from '../store';\n\nconst { CustomSelectControl } = unlock( componentsPrivateApis );\n\nconst POSITION_SUPPORT_KEY = 'position';\n\nconst OPTION_CLASSNAME =\n\t'block-editor-hooks__position-selection__select-control__option';\n\nconst DEFAULT_OPTION = {\n\tkey: 'default',\n\tvalue: '',\n\tname: __( 'Default' ),\n\tclassName: OPTION_CLASSNAME,\n};\n\nconst STICKY_OPTION = {\n\tkey: 'sticky',\n\tvalue: 'sticky',\n\tname: _x( 'Sticky', 'Name for the value of the CSS position property' ),\n\tclassName: OPTION_CLASSNAME,\n\t__experimentalHint: __(\n\t\t'The block will stick to the top of the window instead of scrolling.'\n\t),\n};\n\nconst FIXED_OPTION = {\n\tkey: 'fixed',\n\tvalue: 'fixed',\n\tname: _x( 'Fixed', 'Name for the value of the CSS position property' ),\n\tclassName: OPTION_CLASSNAME,\n\t__experimentalHint: __(\n\t\t'The block will not move when the page is scrolled.'\n\t),\n};\n\nconst POSITION_SIDES = [ 'top', 'right', 'bottom', 'left' ];\nconst VALID_POSITION_TYPES = [ 'sticky', 'fixed' ];\n\n/**\n * Get calculated position CSS.\n *\n * @param {Object} props Component props.\n * @param {string} props.selector Selector to use.\n * @param {Object} props.style Style object.\n * @return {string} The generated CSS rules.\n */\nexport function getPositionCSS( { selector, style } ) {\n\tlet output = '';\n\n\tconst { type: positionType } = style?.position || {};\n\n\tif ( ! VALID_POSITION_TYPES.includes( positionType ) ) {\n\t\treturn output;\n\t}\n\n\toutput += `${ selector } {`;\n\toutput += `position: ${ positionType };`;\n\n\tPOSITION_SIDES.forEach( ( side ) => {\n\t\tif ( style?.position?.[ side ] !== undefined ) {\n\t\t\toutput += `${ side }: ${ style.position[ side ] };`;\n\t\t}\n\t} );\n\n\tif ( positionType === 'sticky' || positionType === 'fixed' ) {\n\t\t// TODO: Replace hard-coded z-index value with a z-index preset approach in theme.json.\n\t\toutput += `z-index: 10`;\n\t}\n\toutput += `}`;\n\n\treturn output;\n}\n\n/**\n * Determines if there is sticky position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasStickyPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! ( true === support || support?.sticky );\n}\n\n/**\n * Determines if there is fixed position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasFixedPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! ( true === support || support?.fixed );\n}\n\n/**\n * Determines if there is position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! support;\n}\n\n/**\n * Checks if there is a current value in the position block support attributes.\n *\n * @param {Object} props Block props.\n * @return {boolean} Whether or not the block has a position value set.\n */\nexport function hasPositionValue( props ) {\n\treturn props.attributes.style?.position?.type !== undefined;\n}\n\n/**\n * Checks if the block is currently set to a sticky or fixed position.\n * This check is helpful for determining how to position block toolbars or other elements.\n *\n * @param {Object} attributes Block attributes.\n * @return {boolean} Whether or not the block is set to a sticky or fixed position.\n */\nexport function hasStickyOrFixedPositionValue( attributes ) {\n\tconst positionType = attributes?.style?.position?.type;\n\treturn positionType === 'sticky' || positionType === 'fixed';\n}\n\n/**\n * Resets the position block support attributes. This can be used when disabling\n * the position support controls for a block via a `ToolsPanel`.\n *\n * @param {Object} props Block props.\n * @param {Object} props.attributes Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetPosition( { attributes = {}, setAttributes } ) {\n\tconst { style = {} } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\tposition: {\n\t\t\t\t...style?.position,\n\t\t\t\ttype: undefined,\n\t\t\t\ttop: undefined,\n\t\t\t\tright: undefined,\n\t\t\t\tbottom: undefined,\n\t\t\t\tleft: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n\n/**\n * Custom hook that checks if position settings have been disabled.\n *\n * @param {string} name The name of the block.\n *\n * @return {boolean} Whether padding setting is disabled.\n */\nexport function useIsPositionDisabled( { name: blockName } = {} ) {\n\tconst [ allowFixed, allowSticky ] = useSettings(\n\t\t'position.fixed',\n\t\t'position.sticky'\n\t);\n\tconst isDisabled = ! allowFixed && ! allowSticky;\n\n\treturn ! hasPositionSupport( blockName ) || isDisabled;\n}\n\n/*\n * Position controls rendered in an inspector control panel.\n *\n * @param {Object} props\n *\n * @return {Element} Position panel.\n */\nexport function PositionPanelPure( {\n\tstyle = {},\n\tclientId,\n\tname: blockName,\n\tsetAttributes,\n} ) {\n\tconst allowFixed = hasFixedPositionSupport( blockName );\n\tconst allowSticky = hasStickyPositionSupport( blockName );\n\tconst value = style?.position?.type;\n\n\tconst { firstParentClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockParents } = select( blockEditorStore );\n\t\t\tconst parents = getBlockParents( clientId );\n\t\t\treturn { firstParentClientId: parents[ parents.length - 1 ] };\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst blockInformation = useBlockDisplayInformation( firstParentClientId );\n\tconst stickyHelpText =\n\t\tallowSticky && value === STICKY_OPTION.value && blockInformation\n\t\t\t? sprintf(\n\t\t\t\t\t/* translators: %s: the name of the parent block. */\n\t\t\t\t\t__(\n\t\t\t\t\t\t'The block will stick to the scrollable area of the parent %s block.'\n\t\t\t\t\t),\n\t\t\t\t\tblockInformation.title\n\t\t\t )\n\t\t\t: null;\n\n\tconst options = useMemo( () => {\n\t\tconst availableOptions = [ DEFAULT_OPTION ];\n\t\t// Display options if they are allowed, or if a block already has a valid value set.\n\t\t// This allows for a block to be switched off from a position type that is not allowed.\n\t\tif ( allowSticky || value === STICKY_OPTION.value ) {\n\t\t\tavailableOptions.push( STICKY_OPTION );\n\t\t}\n\t\tif ( allowFixed || value === FIXED_OPTION.value ) {\n\t\t\tavailableOptions.push( FIXED_OPTION );\n\t\t}\n\t\treturn availableOptions;\n\t}, [ allowFixed, allowSticky, value ] );\n\n\tconst onChangeType = ( next ) => {\n\t\t// For now, use a hard-coded `0px` value for the position.\n\t\t// `0px` is preferred over `0` as it can be used in `calc()` functions.\n\t\t// In the future, it could be useful to allow for an offset value.\n\t\tconst placementValue = '0px';\n\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\tposition: {\n\t\t\t\t...style?.position,\n\t\t\t\ttype: next,\n\t\t\t\ttop:\n\t\t\t\t\tnext === 'sticky' || next === 'fixed'\n\t\t\t\t\t\t? placementValue\n\t\t\t\t\t\t: undefined,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t} );\n\t};\n\n\tconst selectedOption = value\n\t\t? options.find( ( option ) => option.value === value ) || DEFAULT_OPTION\n\t\t: DEFAULT_OPTION;\n\n\t// Only display position controls if there is at least one option to choose from.\n\treturn Platform.select( {\n\t\tweb:\n\t\t\toptions.length > 1 ? (\n\t\t\t\t<InspectorControls group=\"position\">\n\t\t\t\t\t<BaseControl\n\t\t\t\t\t\tclassName=\"block-editor-hooks__position-selection\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\thelp={ stickyHelpText }\n\t\t\t\t\t>\n\t\t\t\t\t\t<CustomSelectControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tclassName=\"block-editor-hooks__position-selection__select-control\"\n\t\t\t\t\t\t\tlabel={ __( 'Position' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tdescribedBy={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Currently selected position.\n\t\t\t\t\t\t\t\t__( 'Currently selected position: %s' ),\n\t\t\t\t\t\t\t\tselectedOption.name\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\t\tvalue={ selectedOption }\n\t\t\t\t\t\t\t__experimentalShowSelectedHint\n\t\t\t\t\t\t\tonChange={ ( { selectedItem } ) => {\n\t\t\t\t\t\t\t\tonChangeType( selectedItem.value );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BaseControl>\n\t\t\t\t</InspectorControls>\n\t\t\t) : null,\n\t\tnative: null,\n\t} );\n}\n\nexport default {\n\tedit: function Edit( props ) {\n\t\tconst isPositionDisabled = useIsPositionDisabled( props );\n\t\tif ( isPositionDisabled ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn <PositionPanelPure { ...props } />;\n\t},\n\tuseBlockProps,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, POSITION_SUPPORT_KEY );\n\t},\n};\n\nfunction useBlockProps( { name, style } ) {\n\tconst hasPositionBlockSupport = hasBlockSupport(\n\t\tname,\n\t\tPOSITION_SUPPORT_KEY\n\t);\n\tconst isPositionDisabled = useIsPositionDisabled( { name } );\n\tconst allowPositionStyles = hasPositionBlockSupport && ! isPositionDisabled;\n\n\tconst id = useInstanceId( useBlockProps );\n\n\t// Higher specificity to override defaults in editor UI.\n\tconst positionSelector = `.wp-container-${ id }.wp-container-${ id }`;\n\n\t// Get CSS string for the current position values.\n\tlet css;\n\tif ( allowPositionStyles ) {\n\t\tcss =\n\t\t\tgetPositionCSS( {\n\t\t\t\tselector: positionSelector,\n\t\t\t\tstyle,\n\t\t\t} ) || '';\n\t}\n\n\t// Attach a `wp-container-` id-based class name.\n\tconst className = clsx( {\n\t\t[ `wp-container-${ id }` ]: allowPositionStyles && !! css, // Only attach a container class if there is generated CSS to be attached.\n\t\t[ `is-position-${ style?.position?.type }` ]:\n\t\t\tallowPositionStyles && !! css && !! style?.position?.type,\n\t} );\n\n\tuseStyleOverride( { css } );\n\n\treturn { className };\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,eAAe,EAAEC,eAAe,QAAQ,mBAAmB;AACpE,SACCC,WAAW,EACXC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,OAAO,EAAEC,QAAQ,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA,SAASC,WAAW,QAAQ,4BAA4B;AACxD,OAAOC,iBAAiB,MAAM,kCAAkC;AAChE,OAAOC,0BAA0B,MAAM,6CAA6C;AACpF,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,SAAS;AAC5D,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AAEpD,MAAM;EAAEC;AAAoB,CAAC,GAAGH,MAAM,CAAEV,qBAAsB,CAAC;AAE/D,MAAMc,oBAAoB,GAAG,UAAU;AAEvC,MAAMC,gBAAgB,GACrB,gEAAgE;AAEjE,MAAMC,cAAc,GAAG;EACtBC,GAAG,EAAE,SAAS;EACdC,KAAK,EAAE,EAAE;EACTC,IAAI,EAAE1B,EAAE,CAAE,SAAU,CAAC;EACrB2B,SAAS,EAAEL;AACZ,CAAC;AAED,MAAMM,aAAa,GAAG;EACrBJ,GAAG,EAAE,QAAQ;EACbC,KAAK,EAAE,QAAQ;EACfC,IAAI,EAAEzB,EAAE,CAAE,QAAQ,EAAE,iDAAkD,CAAC;EACvE0B,SAAS,EAAEL,gBAAgB;EAC3BO,kBAAkB,EAA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AASkF,aAAaA,CAAE;EAAE7E,IAAI;EAAES;AAAM,CAAC,EAAG;EACzC,MAAMuE,uBAAuB,GAAGtG,eAAe,CAC9CsB,IAAI,EACJL,oBACD,CAAC;EACD,MAAMiF,kBAAkB,GAAGzC,qBAAqB,CAAE;IAAEnC;EAAK,CAAE,CAAC;EAC5D,MAAMiF,mBAAmB,GAAGD,uBAAuB,IAAI,CAAEJ,kBAAkB;EAE3E,MAAMM,EAAE,GAAGpG,aAAa,CAAE+F,aAAc,CAAC;;EAEzC;EACA,MAAMM,gBAAgB,GAAI,iBAAiBD,EAAI,iBAAiBA,EAAI,EAAC;;EAErE;EACA,IAAIE,GAAG;EACP,IAAKH,mBAAmB,EAAG;IAC1BG,GAAG,GACF7E,cAAc,CAAE;MACfC,QAAQ,EAAE2E,gBAAgB;MAC1B1E;IACD,CAAE,CAAC,IAAI,EAAE;EACX;;EAEA;EACA,MAAMR,SAAS,GAAG5B,IAAI,CAAE;IACvB,CAAG,gBAAgB6G,EAAI,EAAC,GAAID,mBAAmB,IAAI,CAAC,CAAEG,GAAG;IAAE;IAC3D,CAAG,eAAe3E,KAAK,EAAEI,QAAQ,EAAEF,IAAM,EAAC,GACzCsE,mBAAmB,IAAI,CAAC,CAAEG,GAAG,IAAI,CAAC,CAAE3E,KAAK,EAAEI,QAAQ,EAAEF;EACvD,CAAE,CAAC;EAEHrB,gBAAgB,CAAE;IAAE8F;EAAI,CAAE,CAAC;EAE3B,OAAO;IAAEnF;EAAU,CAAC;AACrB","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","_x","sprintf","getBlockSupport","hasBlockSupport","BaseControl","privateApis","componentsPrivateApis","useInstanceId","useSelect","useMemo","Platform","useSettings","InspectorControls","useBlockDisplayInformation","cleanEmptyObject","useStyleOverride","unlock","store","blockEditorStore","jsx","_jsx","CustomSelectControl","POSITION_SUPPORT_KEY","OPTION_CLASSNAME","DEFAULT_OPTION","key","value","name","className","STICKY_OPTION","__experimentalHint","FIXED_OPTION","POSITION_SIDES","VALID_POSITION_TYPES","getPositionCSS","selector","style","output","type","positionType","position","includes","forEach","side","undefined","hasStickyPositionSupport","blockType","support","sticky","hasFixedPositionSupport","fixed","hasPositionSupport","hasPositionValue","props","attributes","hasStickyOrFixedPositionValue","resetPosition","setAttributes","top","right","bottom","left","useIsPositionDisabled","blockName","allowFixed","allowSticky","isDisabled","PositionPanelPure","clientId","firstParentClientId","select","getBlockParents","parents","length","blockInformation","stickyHelpText","title","options","availableOptions","push","onChangeType","next","placementValue","newStyle","selectedOption","find","option","web","group","children","__nextHasNoMarginBottom","help","__next40pxDefaultSize","label","hideLabelFromVision","describedBy","__experimentalShowSelectedHint","onChange","selectedItem","size","native","edit","Edit","isPositionDisabled","useBlockProps","attributeKeys","hasSupport","hasPositionBlockSupport","allowPositionStyles","id","positionSelector","css"],"sources":["@wordpress/block-editor/src/hooks/position.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport {\n\tBaseControl,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useSettings } from '../components/use-settings';\nimport InspectorControls from '../components/inspector-controls';\nimport useBlockDisplayInformation from '../components/use-block-display-information';\nimport { cleanEmptyObject, useStyleOverride } from './utils';\nimport { unlock } from '../lock-unlock';\nimport { store as blockEditorStore } from '../store';\n\nconst { CustomSelectControl } = unlock( componentsPrivateApis );\n\nconst POSITION_SUPPORT_KEY = 'position';\n\nconst OPTION_CLASSNAME =\n\t'block-editor-hooks__position-selection__select-control__option';\n\nconst DEFAULT_OPTION = {\n\tkey: 'default',\n\tvalue: '',\n\tname: __( 'Default' ),\n\tclassName: OPTION_CLASSNAME,\n};\n\nconst STICKY_OPTION = {\n\tkey: 'sticky',\n\tvalue: 'sticky',\n\tname: _x( 'Sticky', 'Name for the value of the CSS position property' ),\n\tclassName: OPTION_CLASSNAME,\n\t__experimentalHint: __(\n\t\t'The block will stick to the top of the window instead of scrolling.'\n\t),\n};\n\nconst FIXED_OPTION = {\n\tkey: 'fixed',\n\tvalue: 'fixed',\n\tname: _x( 'Fixed', 'Name for the value of the CSS position property' ),\n\tclassName: OPTION_CLASSNAME,\n\t__experimentalHint: __(\n\t\t'The block will not move when the page is scrolled.'\n\t),\n};\n\nconst POSITION_SIDES = [ 'top', 'right', 'bottom', 'left' ];\nconst VALID_POSITION_TYPES = [ 'sticky', 'fixed' ];\n\n/**\n * Get calculated position CSS.\n *\n * @param {Object} props Component props.\n * @param {string} props.selector Selector to use.\n * @param {Object} props.style Style object.\n * @return {string} The generated CSS rules.\n */\nexport function getPositionCSS( { selector, style } ) {\n\tlet output = '';\n\n\tconst { type: positionType } = style?.position || {};\n\n\tif ( ! VALID_POSITION_TYPES.includes( positionType ) ) {\n\t\treturn output;\n\t}\n\n\toutput += `${ selector } {`;\n\toutput += `position: ${ positionType };`;\n\n\tPOSITION_SIDES.forEach( ( side ) => {\n\t\tif ( style?.position?.[ side ] !== undefined ) {\n\t\t\toutput += `${ side }: ${ style.position[ side ] };`;\n\t\t}\n\t} );\n\n\tif ( positionType === 'sticky' || positionType === 'fixed' ) {\n\t\t// TODO: Replace hard-coded z-index value with a z-index preset approach in theme.json.\n\t\toutput += `z-index: 10`;\n\t}\n\toutput += `}`;\n\n\treturn output;\n}\n\n/**\n * Determines if there is sticky position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasStickyPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! ( true === support || support?.sticky );\n}\n\n/**\n * Determines if there is fixed position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasFixedPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! ( true === support || support?.fixed );\n}\n\n/**\n * Determines if there is position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! support;\n}\n\n/**\n * Checks if there is a current value in the position block support attributes.\n *\n * @param {Object} props Block props.\n * @return {boolean} Whether or not the block has a position value set.\n */\nexport function hasPositionValue( props ) {\n\treturn props.attributes.style?.position?.type !== undefined;\n}\n\n/**\n * Checks if the block is currently set to a sticky or fixed position.\n * This check is helpful for determining how to position block toolbars or other elements.\n *\n * @param {Object} attributes Block attributes.\n * @return {boolean} Whether or not the block is set to a sticky or fixed position.\n */\nexport function hasStickyOrFixedPositionValue( attributes ) {\n\tconst positionType = attributes?.style?.position?.type;\n\treturn positionType === 'sticky' || positionType === 'fixed';\n}\n\n/**\n * Resets the position block support attributes. This can be used when disabling\n * the position support controls for a block via a `ToolsPanel`.\n *\n * @param {Object} props Block props.\n * @param {Object} props.attributes Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetPosition( { attributes = {}, setAttributes } ) {\n\tconst { style = {} } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\tposition: {\n\t\t\t\t...style?.position,\n\t\t\t\ttype: undefined,\n\t\t\t\ttop: undefined,\n\t\t\t\tright: undefined,\n\t\t\t\tbottom: undefined,\n\t\t\t\tleft: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n\n/**\n * Custom hook that checks if position settings have been disabled.\n *\n * @param {string} name The name of the block.\n *\n * @return {boolean} Whether padding setting is disabled.\n */\nexport function useIsPositionDisabled( { name: blockName } = {} ) {\n\tconst [ allowFixed, allowSticky ] = useSettings(\n\t\t'position.fixed',\n\t\t'position.sticky'\n\t);\n\tconst isDisabled = ! allowFixed && ! allowSticky;\n\n\treturn ! hasPositionSupport( blockName ) || isDisabled;\n}\n\n/*\n * Position controls rendered in an inspector control panel.\n *\n * @param {Object} props\n *\n * @return {Element} Position panel.\n */\nexport function PositionPanelPure( {\n\tstyle = {},\n\tclientId,\n\tname: blockName,\n\tsetAttributes,\n} ) {\n\tconst allowFixed = hasFixedPositionSupport( blockName );\n\tconst allowSticky = hasStickyPositionSupport( blockName );\n\tconst value = style?.position?.type;\n\n\tconst { firstParentClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockParents } = select( blockEditorStore );\n\t\t\tconst parents = getBlockParents( clientId );\n\t\t\treturn { firstParentClientId: parents[ parents.length - 1 ] };\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst blockInformation = useBlockDisplayInformation( firstParentClientId );\n\tconst stickyHelpText =\n\t\tallowSticky && value === STICKY_OPTION.value && blockInformation\n\t\t\t? sprintf(\n\t\t\t\t\t/* translators: %s: the name of the parent block. */\n\t\t\t\t\t__(\n\t\t\t\t\t\t'The block will stick to the scrollable area of the parent %s block.'\n\t\t\t\t\t),\n\t\t\t\t\tblockInformation.title\n\t\t\t )\n\t\t\t: null;\n\n\tconst options = useMemo( () => {\n\t\tconst availableOptions = [ DEFAULT_OPTION ];\n\t\t// Display options if they are allowed, or if a block already has a valid value set.\n\t\t// This allows for a block to be switched off from a position type that is not allowed.\n\t\tif ( allowSticky || value === STICKY_OPTION.value ) {\n\t\t\tavailableOptions.push( STICKY_OPTION );\n\t\t}\n\t\tif ( allowFixed || value === FIXED_OPTION.value ) {\n\t\t\tavailableOptions.push( FIXED_OPTION );\n\t\t}\n\t\treturn availableOptions;\n\t}, [ allowFixed, allowSticky, value ] );\n\n\tconst onChangeType = ( next ) => {\n\t\t// For now, use a hard-coded `0px` value for the position.\n\t\t// `0px` is preferred over `0` as it can be used in `calc()` functions.\n\t\t// In the future, it could be useful to allow for an offset value.\n\t\tconst placementValue = '0px';\n\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\tposition: {\n\t\t\t\t...style?.position,\n\t\t\t\ttype: next,\n\t\t\t\ttop:\n\t\t\t\t\tnext === 'sticky' || next === 'fixed'\n\t\t\t\t\t\t? placementValue\n\t\t\t\t\t\t: undefined,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t} );\n\t};\n\n\tconst selectedOption = value\n\t\t? options.find( ( option ) => option.value === value ) || DEFAULT_OPTION\n\t\t: DEFAULT_OPTION;\n\n\t// Only display position controls if there is at least one option to choose from.\n\treturn Platform.select( {\n\t\tweb:\n\t\t\toptions.length > 1 ? (\n\t\t\t\t<InspectorControls group=\"position\">\n\t\t\t\t\t<BaseControl\n\t\t\t\t\t\tclassName=\"block-editor-hooks__position-selection\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\thelp={ stickyHelpText }\n\t\t\t\t\t>\n\t\t\t\t\t\t<CustomSelectControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tclassName=\"block-editor-hooks__position-selection__select-control\"\n\t\t\t\t\t\t\tlabel={ __( 'Position' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tdescribedBy={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Currently selected position.\n\t\t\t\t\t\t\t\t__( 'Currently selected position: %s' ),\n\t\t\t\t\t\t\t\tselectedOption.name\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\t\tvalue={ selectedOption }\n\t\t\t\t\t\t\t__experimentalShowSelectedHint\n\t\t\t\t\t\t\tonChange={ ( { selectedItem } ) => {\n\t\t\t\t\t\t\t\tonChangeType( selectedItem.value );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BaseControl>\n\t\t\t\t</InspectorControls>\n\t\t\t) : null,\n\t\tnative: null,\n\t} );\n}\n\nexport default {\n\tedit: function Edit( props ) {\n\t\tconst isPositionDisabled = useIsPositionDisabled( props );\n\t\tif ( isPositionDisabled ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn <PositionPanelPure { ...props } />;\n\t},\n\tuseBlockProps,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, POSITION_SUPPORT_KEY );\n\t},\n};\n\nfunction useBlockProps( { name, style } ) {\n\tconst hasPositionBlockSupport = hasBlockSupport(\n\t\tname,\n\t\tPOSITION_SUPPORT_KEY\n\t);\n\tconst isPositionDisabled = useIsPositionDisabled( { name } );\n\tconst allowPositionStyles = hasPositionBlockSupport && ! isPositionDisabled;\n\n\tconst id = useInstanceId( useBlockProps );\n\n\t// Higher specificity to override defaults in editor UI.\n\tconst positionSelector = `.wp-container-${ id }.wp-container-${ id }`;\n\n\t// Get CSS string for the current position values.\n\tlet css;\n\tif ( allowPositionStyles ) {\n\t\tcss =\n\t\t\tgetPositionCSS( {\n\t\t\t\tselector: positionSelector,\n\t\t\t\tstyle,\n\t\t\t} ) || '';\n\t}\n\n\t// Attach a `wp-container-` id-based class name.\n\tconst className = clsx( {\n\t\t[ `wp-container-${ id }` ]: allowPositionStyles && !! css, // Only attach a container class if there is generated CSS to be attached.\n\t\t[ `is-position-${ style?.position?.type }` ]:\n\t\t\tallowPositionStyles && !! css && !! style?.position?.type,\n\t} );\n\n\tuseStyleOverride( { css } );\n\n\treturn { className };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,eAAe,EAAEC,eAAe,QAAQ,mBAAmB;AACpE,SACCC,WAAW,EACXC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC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C;;EAEzC;EACA,MAAMM,gBAAgB,GAAI,iBAAiBD,EAAI,iBAAiBA,EAAI,EAAC;;EAErE;EACA,IAAIE,GAAG;EACP,IAAKH,mBAAmB,EAAG;IAC1BG,GAAG,GACF7E,cAAc,CAAE;MACfC,QAAQ,EAAE2E,gBAAgB;MAC1B1E;IACD,CAAE,CAAC,IAAI,EAAE;EACX;;EAEA;EACA,MAAMR,SAAS,GAAG9B,IAAI,CAAE;IACvB,CAAG,gBAAgB+G,EAAI,EAAC,GAAID,mBAAmB,IAAI,CAAC,CAAEG,GAAG;IAAE;IAC3D,CAAG,eAAe3E,KAAK,EAAEI,QAAQ,EAAEF,IAAM,EAAC,GACzCsE,mBAAmB,IAAI,CAAC,CAAEG,GAAG,IAAI,CAAC,CAAE3E,KAAK,EAAEI,QAAQ,EAAEF;EACvD,CAAE,CAAC;EAEHvB,gBAAgB,CAAE;IAAEgG;EAAI,CAAE,CAAC;EAE3B,OAAO;IAAEnF;EAAU,CAAC;AACrB","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -10,6 +9,7 @@ import isShallowEqual from '@wordpress/is-shallow-equal';
10
9
  */
11
10
  import BlockPopoverCover from '../components/block-popover/cover';
12
11
  import { __unstableUseBlockElement as useBlockElement } from '../components/block-list/use-block-props/use-block-refs';
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  function SpacingVisualizer({
14
14
  clientId,
15
15
  value,
@@ -48,13 +48,14 @@ function SpacingVisualizer({
48
48
  if (!isActive && !forceShow) {
49
49
  return null;
50
50
  }
51
- return createElement(BlockPopoverCover, {
51
+ return /*#__PURE__*/_jsx(BlockPopoverCover, {
52
52
  clientId: clientId,
53
- __unstablePopoverSlot: "block-toolbar"
54
- }, createElement("div", {
55
- className: "block-editor__spacing-visualizer",
56
- style: style
57
- }));
53
+ __unstablePopoverSlot: "block-toolbar",
54
+ children: /*#__PURE__*/_jsx("div", {
55
+ className: "block-editor__spacing-visualizer",
56
+ style: style
57
+ })
58
+ });
58
59
  }
59
60
  function getComputedCSS(element, property) {
60
61
  return element.ownerDocument.defaultView.getComputedStyle(element).getPropertyValue(property);
@@ -64,7 +65,7 @@ export function MarginVisualizer({
64
65
  value,
65
66
  forceShow
66
67
  }) {
67
- return createElement(SpacingVisualizer, {
68
+ return /*#__PURE__*/_jsx(SpacingVisualizer, {
68
69
  clientId: clientId,
69
70
  value: value?.spacing?.margin,
70
71
  computeStyle: blockElement => {
@@ -91,7 +92,7 @@ export function PaddingVisualizer({
91
92
  value,
92
93
  forceShow
93
94
  }) {
94
- return createElement(SpacingVisualizer, {
95
+ return /*#__PURE__*/_jsx(SpacingVisualizer, {
95
96
  clientId: clientId,
96
97
  value: value?.spacing?.padding,
97
98
  computeStyle: blockElement => ({
@@ -1 +1 @@
1
- {"version":3,"names":["useState","useRef","useLayoutEffect","useEffect","useReducer","isShallowEqual","BlockPopoverCover","__unstableUseBlockElement","useBlockElement","SpacingVisualizer","clientId","value","computeStyle","forceShow","blockElement","style","updateStyle","window","requestAnimationFrame","previousValue","isActive","setIsActive","current","timeout","setTimeout","clearTimeout","createElement","__unstablePopoverSlot","className","getComputedCSS","element","property","ownerDocument","defaultView","getComputedStyle","getPropertyValue","MarginVisualizer","spacing","margin","top","right","bottom","left","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","PaddingVisualizer","padding"],"sources":["@wordpress/block-editor/src/hooks/spacing-visualizer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tuseRef,\n\tuseLayoutEffect,\n\tuseEffect,\n\tuseReducer,\n} from '@wordpress/element';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverCover from '../components/block-popover/cover';\nimport { __unstableUseBlockElement as useBlockElement } from '../components/block-list/use-block-props/use-block-refs';\n\nfunction SpacingVisualizer( { clientId, value, computeStyle, forceShow } ) {\n\tconst blockElement = useBlockElement( clientId );\n\tconst [ style, updateStyle ] = useReducer( () =>\n\t\tcomputeStyle( blockElement )\n\t);\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! blockElement ) {\n\t\t\treturn;\n\t\t}\n\t\t// It's not sufficient to read the computed spacing value when value.spacing changes as\n\t\t// useEffect may run before the browser recomputes CSS. We therefore combine\n\t\t// useLayoutEffect and two rAF calls to ensure that we read the spacing after the current\n\t\t// paint but before the next paint.\n\t\t// See https://github.com/WordPress/gutenberg/pull/59227.\n\t\twindow.requestAnimationFrame( () =>\n\t\t\twindow.requestAnimationFrame( updateStyle )\n\t\t);\n\t}, [ blockElement, value ] );\n\n\tconst previousValue = useRef( value );\n\tconst [ isActive, setIsActive ] = useState( false );\n\n\tuseEffect( () => {\n\t\tif ( isShallowEqual( value, previousValue.current ) || forceShow ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsActive( true );\n\t\tpreviousValue.current = value;\n\n\t\tconst timeout = setTimeout( () => {\n\t\t\tsetIsActive( false );\n\t\t}, 400 );\n\n\t\treturn () => {\n\t\t\tsetIsActive( false );\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [ value, forceShow ] );\n\n\tif ( ! isActive && ! forceShow ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockPopoverCover\n\t\t\tclientId={ clientId }\n\t\t\t__unstablePopoverSlot=\"block-toolbar\"\n\t\t>\n\t\t\t<div className=\"block-editor__spacing-visualizer\" style={ style } />\n\t\t</BlockPopoverCover>\n\t);\n}\n\nfunction getComputedCSS( element, property ) {\n\treturn element.ownerDocument.defaultView\n\t\t.getComputedStyle( element )\n\t\t.getPropertyValue( property );\n}\n\nexport function MarginVisualizer( { clientId, value, forceShow } ) {\n\treturn (\n\t\t<SpacingVisualizer\n\t\t\tclientId={ clientId }\n\t\t\tvalue={ value?.spacing?.margin }\n\t\t\tcomputeStyle={ ( blockElement ) => {\n\t\t\t\tconst top = getComputedCSS( blockElement, 'margin-top' );\n\t\t\t\tconst right = getComputedCSS( blockElement, 'margin-right' );\n\t\t\t\tconst bottom = getComputedCSS( blockElement, 'margin-bottom' );\n\t\t\t\tconst left = getComputedCSS( blockElement, 'margin-left' );\n\t\t\t\treturn {\n\t\t\t\t\tborderTopWidth: top,\n\t\t\t\t\tborderRightWidth: right,\n\t\t\t\t\tborderBottomWidth: bottom,\n\t\t\t\t\tborderLeftWidth: left,\n\t\t\t\t\ttop: top ? `-${ top }` : 0,\n\t\t\t\t\tright: right ? `-${ right }` : 0,\n\t\t\t\t\tbottom: bottom ? `-${ bottom }` : 0,\n\t\t\t\t\tleft: left ? `-${ left }` : 0,\n\t\t\t\t};\n\t\t\t} }\n\t\t\tforceShow={ forceShow }\n\t\t/>\n\t);\n}\n\nexport function PaddingVisualizer( { clientId, value, forceShow } ) {\n\treturn (\n\t\t<SpacingVisualizer\n\t\t\tclientId={ clientId }\n\t\t\tvalue={ value?.spacing?.padding }\n\t\t\tcomputeStyle={ ( blockElement ) => ( {\n\t\t\t\tborderTopWidth: getComputedCSS( blockElement, 'padding-top' ),\n\t\t\t\tborderRightWidth: getComputedCSS(\n\t\t\t\t\tblockElement,\n\t\t\t\t\t'padding-right'\n\t\t\t\t),\n\t\t\t\tborderBottomWidth: getComputedCSS(\n\t\t\t\t\tblockElement,\n\t\t\t\t\t'padding-bottom'\n\t\t\t\t),\n\t\t\t\tborderLeftWidth: getComputedCSS( blockElement, 'padding-left' ),\n\t\t\t} ) }\n\t\t\tforceShow={ forceShow }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,QAAQ,EACRC,MAAM,EACNC,eAAe,EACfC,SAAS,EACTC,UAAU,QACJ,oBAAoB;AAC3B,OAAOC,cAAc,MAAM,6BAA6B;;AAExD;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,mCAAmC;AACjE,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,yDAAyD;AAEtH,SAASC,iBAAiBA,CAAE;EAAEC,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EAAErC,QAAQ;EAAEC,KAAK;EAAEE;AAAU,CAAC,EAAG;EACnE,OACCa,aAAA,CAACjB,iBAAiB;IACjBC,QAAQ,EAAGA,QAAU;IACrBC,KAAK,EAAGA,KAAK,EAAE0B,OAAO,EAAEW,OAAS;IACjCpC,YAAY,EAAKE,YAAY,KAAQ;MACpC6B,cAAc,EAAEd,cAAc,CAAEf,YAAY,EAAE,aAAc,CAAC;MAC7D8B,gBAAgB,EAAEf,cAAc,CAC/Bf,YAAY,EACZ,eACD,CAAC;MACD+B,iBAAiB,EAAEhB,cAAc,CAChCf,YAAY,EACZ,gBACD,CAAC;MACDgC,eAAe,EAAEjB,cAAc,CAAEf,YAAY,EAAE,cAAe;IAC/D,CAAC,CAAI;IACLD,SAAS,EAAGA;EAAW,CACvB,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["useState","useRef","useLayoutEffect","useEffect","useReducer","isShallowEqual","BlockPopoverCover","__unstableUseBlockElement","useBlockElement","jsx","_jsx","SpacingVisualizer","clientId","value","computeStyle","forceShow","blockElement","style","updateStyle","window","requestAnimationFrame","previousValue","isActive","setIsActive","current","timeout","setTimeout","clearTimeout","__unstablePopoverSlot","children","className","getComputedCSS","element","property","ownerDocument","defaultView","getComputedStyle","getPropertyValue","MarginVisualizer","spacing","margin","top","right","bottom","left","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","PaddingVisualizer","padding"],"sources":["@wordpress/block-editor/src/hooks/spacing-visualizer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tuseRef,\n\tuseLayoutEffect,\n\tuseEffect,\n\tuseReducer,\n} from '@wordpress/element';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverCover from '../components/block-popover/cover';\nimport { __unstableUseBlockElement as useBlockElement } from '../components/block-list/use-block-props/use-block-refs';\n\nfunction SpacingVisualizer( { clientId, value, computeStyle, forceShow } ) {\n\tconst blockElement = useBlockElement( clientId );\n\tconst [ style, updateStyle ] = useReducer( () =>\n\t\tcomputeStyle( blockElement )\n\t);\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! blockElement ) {\n\t\t\treturn;\n\t\t}\n\t\t// It's not sufficient to read the computed spacing value when value.spacing changes as\n\t\t// useEffect may run before the browser recomputes CSS. We therefore combine\n\t\t// useLayoutEffect and two rAF calls to ensure that we read the spacing after the current\n\t\t// paint but before the next paint.\n\t\t// See https://github.com/WordPress/gutenberg/pull/59227.\n\t\twindow.requestAnimationFrame( () =>\n\t\t\twindow.requestAnimationFrame( updateStyle )\n\t\t);\n\t}, [ blockElement, value ] );\n\n\tconst previousValue = useRef( value );\n\tconst [ isActive, setIsActive ] = useState( false );\n\n\tuseEffect( () => {\n\t\tif ( isShallowEqual( value, previousValue.current ) || forceShow ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsActive( true );\n\t\tpreviousValue.current = value;\n\n\t\tconst timeout = setTimeout( () => {\n\t\t\tsetIsActive( false );\n\t\t}, 400 );\n\n\t\treturn () => {\n\t\t\tsetIsActive( false );\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [ value, forceShow ] );\n\n\tif ( ! isActive && ! forceShow ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockPopoverCover\n\t\t\tclientId={ clientId }\n\t\t\t__unstablePopoverSlot=\"block-toolbar\"\n\t\t>\n\t\t\t<div className=\"block-editor__spacing-visualizer\" style={ style } />\n\t\t</BlockPopoverCover>\n\t);\n}\n\nfunction getComputedCSS( element, property ) {\n\treturn element.ownerDocument.defaultView\n\t\t.getComputedStyle( element )\n\t\t.getPropertyValue( property );\n}\n\nexport function MarginVisualizer( { clientId, value, forceShow } ) {\n\treturn (\n\t\t<SpacingVisualizer\n\t\t\tclientId={ clientId }\n\t\t\tvalue={ value?.spacing?.margin }\n\t\t\tcomputeStyle={ ( blockElement ) => {\n\t\t\t\tconst top = getComputedCSS( blockElement, 'margin-top' );\n\t\t\t\tconst right = getComputedCSS( blockElement, 'margin-right' );\n\t\t\t\tconst bottom = getComputedCSS( blockElement, 'margin-bottom' );\n\t\t\t\tconst left = getComputedCSS( blockElement, 'margin-left' );\n\t\t\t\treturn {\n\t\t\t\t\tborderTopWidth: top,\n\t\t\t\t\tborderRightWidth: right,\n\t\t\t\t\tborderBottomWidth: bottom,\n\t\t\t\t\tborderLeftWidth: left,\n\t\t\t\t\ttop: top ? `-${ top }` : 0,\n\t\t\t\t\tright: right ? `-${ right }` : 0,\n\t\t\t\t\tbottom: bottom ? `-${ bottom }` : 0,\n\t\t\t\t\tleft: left ? `-${ left }` : 0,\n\t\t\t\t};\n\t\t\t} }\n\t\t\tforceShow={ forceShow }\n\t\t/>\n\t);\n}\n\nexport function PaddingVisualizer( { clientId, value, forceShow } ) {\n\treturn (\n\t\t<SpacingVisualizer\n\t\t\tclientId={ clientId }\n\t\t\tvalue={ value?.spacing?.padding }\n\t\t\tcomputeStyle={ ( blockElement ) => ( {\n\t\t\t\tborderTopWidth: getComputedCSS( blockElement, 'padding-top' ),\n\t\t\t\tborderRightWidth: getComputedCSS(\n\t\t\t\t\tblockElement,\n\t\t\t\t\t'padding-right'\n\t\t\t\t),\n\t\t\t\tborderBottomWidth: getComputedCSS(\n\t\t\t\t\tblockElement,\n\t\t\t\t\t'padding-bottom'\n\t\t\t\t),\n\t\t\t\tborderLeftWidth: getComputedCSS( blockElement, 'padding-left' ),\n\t\t\t} ) }\n\t\t\tforceShow={ forceShow }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,QAAQ,EACRC,MAAM,EACNC,eAAe,EACfC,SAAS,EACTC,UAAU,QACJ,oBAAoB;AAC3B,OAAOC,cAAc,MAAM,6BAA6B;;AAExD;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,mCAAmC;AACjE,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,yDAAyD;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEvH,S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CAAC;AAEJ;AAEA,OAAO,SAASkC,iBAAiBA,CAAE;EAAErC,QAAQ;EAAEC,KAAK;EAAEE;AAAU,CAAC,EAAG;EACnE,oBACCL,IAAA,CAACC,iBAAiB;IACjBC,QAAQ,EAAGA,QAAU;IACrBC,KAAK,EAAGA,KAAK,EAAE0B,OAAO,EAAEW,OAAS;IACjCpC,YAAY,EAAKE,YAAY,KAAQ;MACpC6B,cAAc,EAAEd,cAAc,CAAEf,YAAY,EAAE,aAAc,CAAC;MAC7D8B,gBAAgB,EAAEf,cAAc,CAC/Bf,YAAY,EACZ,eACD,CAAC;MACD+B,iBAAiB,EAAEhB,cAAc,CAChCf,YAAY,EACZ,gBACD,CAAC;MACDgC,eAAe,EAAEjB,cAAc,CAAEf,YAAY,EAAE,cAAe;IAC/D,CAAC,CAAI;IACLD,SAAS,EAAGA;EAAW,CACvB,CAAC;AAEJ","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -19,6 +18,9 @@ import { DIMENSIONS_SUPPORT_KEY, SPACING_SUPPORT_KEY, DimensionsPanel } from './
19
18
  import { shouldSkipSerialization, useStyleOverride, useBlockSettings } from './utils';
20
19
  import { scopeSelector } from '../components/global-styles/utils';
21
20
  import { useBlockEditingMode } from '../components/block-editing-mode';
21
+ import { jsx as _jsx } from "react/jsx-runtime";
22
+ import { Fragment as _Fragment } from "react/jsx-runtime";
23
+ import { jsxs as _jsxs } from "react/jsx-runtime";
22
24
  const styleSupportKeys = [...TYPOGRAPHY_SUPPORT_KEYS, BORDER_SUPPORT_KEY, COLOR_SUPPORT_KEY, DIMENSIONS_SUPPORT_KEY, BACKGROUND_SUPPORT_KEY, SPACING_SUPPORT_KEY, SHADOW_SUPPORT_KEY];
23
25
  const hasStyleSupport = nameOrType => styleSupportKeys.some(key => hasBlockSupport(nameOrType, key));
24
26
 
@@ -278,22 +280,32 @@ function BlockStyleControls({
278
280
  clientId,
279
281
  name,
280
282
  setAttributes,
281
- settings
283
+ settings: {
284
+ ...settings,
285
+ typography: {
286
+ ...settings.typography,
287
+ // The text alignment UI for individual blocks is rendered in
288
+ // the block toolbar, so disable it here.
289
+ textAlign: false
290
+ }
291
+ }
282
292
  };
283
293
  if (blockEditingMode !== 'default') {
284
294
  return null;
285
295
  }
286
- return createElement(Fragment, null, createElement(ColorEdit, {
287
- ...passedProps
288
- }), createElement(BackgroundImagePanel, {
289
- ...passedProps
290
- }), createElement(TypographyPanel, {
291
- ...passedProps
292
- }), createElement(BorderPanel, {
293
- ...passedProps
294
- }), createElement(DimensionsPanel, {
295
- ...passedProps
296
- }));
296
+ return /*#__PURE__*/_jsxs(_Fragment, {
297
+ children: [/*#__PURE__*/_jsx(ColorEdit, {
298
+ ...passedProps
299
+ }), /*#__PURE__*/_jsx(BackgroundImagePanel, {
300
+ ...passedProps
301
+ }), /*#__PURE__*/_jsx(TypographyPanel, {
302
+ ...passedProps
303
+ }), /*#__PURE__*/_jsx(BorderPanel, {
304
+ ...passedProps
305
+ }), /*#__PURE__*/_jsx(DimensionsPanel, {
306
+ ...passedProps
307
+ })]
308
+ });
297
309
  }
298
310
  export default {
299
311
  edit: BlockStyleControls,
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","addFilter","getBlockSupport","hasBlockSupport","__EXPERIMENTAL_ELEMENTS","ELEMENTS","useInstanceId","getCSSRules","compileCSS","BACKGROUND_SUPPORT_KEY","BackgroundImagePanel","BORDER_SUPPORT_KEY","BorderPanel","SHADOW_SUPPORT_KEY","COLOR_SUPPORT_KEY","ColorEdit","TypographyPanel","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","DIMENSIONS_SUPPORT_KEY","SPACING_SUPPORT_KEY","DimensionsPanel","shouldSkipSerialization","useStyleOverride","useBlockSettings","scopeSelector","useBlockEditingMode","styleSupportKeys","hasStyleSupport","nameOrType","some","key","getInlineStyles","styles","output","forEach","rule","value","addAttribute","settings","attributes","style","Object","assign","type","skipSerializationPathsEdit","skipSerializationPathsSave","skipSerializationPathsSaveChecks","renamedFeatures","gradients","omitStyle","paths","preserveReference","newStyle","JSON","parse","stringify","Array","isArray","path","split","length","firstSubpath","restPath","addSaveProps","props","blockNameOrType","skipPaths","entries","indicator","skipSerialization","featureName","feature","BlockStyleControls","clientId","name","setAttributes","__unstableParentLayout","blockEditingMode","passedProps","createElement","Fragment","edit","hasSupport","attributeKeys","useBlockProps","elementTypes","elementType","pseudo","elements","blockElementsContainerIdentifier","baseElementSelector","blockElementStyles","elementCSSRules","elementStyles","selector","push","pseudoSelector","element","join","undefined","css","className"],"sources":["@wordpress/block-editor/src/hooks/style.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport {\n\tgetBlockSupport,\n\thasBlockSupport,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n} from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { getCSSRules, compileCSS } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport { BACKGROUND_SUPPORT_KEY, BackgroundImagePanel } from './background';\nimport { BORDER_SUPPORT_KEY, BorderPanel, SHADOW_SUPPORT_KEY } from './border';\nimport { COLOR_SUPPORT_KEY, ColorEdit } from './color';\nimport {\n\tTypographyPanel,\n\tTYPOGRAPHY_SUPPORT_KEY,\n\tTYPOGRAPHY_SUPPORT_KEYS,\n} from './typography';\nimport {\n\tDIMENSIONS_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tDimensionsPanel,\n} from './dimensions';\nimport {\n\tshouldSkipSerialization,\n\tuseStyleOverride,\n\tuseBlockSettings,\n} from './utils';\nimport { scopeSelector } from '../components/global-styles/utils';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\n\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tDIMENSIONS_SUPPORT_KEY,\n\tBACKGROUND_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tSHADOW_SUPPORT_KEY,\n];\n\nconst hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n\n/**\n * Returns the inline styles to add depending on the style object\n *\n * @param {Object} styles Styles configuration.\n *\n * @return {Object} Flattened CSS variables declaration.\n */\nexport function getInlineStyles( styles = {} ) {\n\tconst output = {};\n\t// The goal is to move everything to server side generated engine styles\n\t// This is temporary as we absorb more and more styles into the engine.\n\tgetCSSRules( styles ).forEach( ( rule ) => {\n\t\toutput[ rule.key ] = rule.value;\n\t} );\n\n\treturn output;\n}\n\n/**\n * Filters registered block settings, extending attributes to include `style` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttribute( settings ) {\n\tif ( ! hasStyleSupport( settings ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( ! settings.attributes.style ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsEdit = {\n\t[ `${ BORDER_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [ 'border' ],\n\t[ `${ COLOR_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tCOLOR_SUPPORT_KEY,\n\t],\n\t[ `${ TYPOGRAPHY_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t],\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tDIMENSIONS_SUPPORT_KEY,\n\t],\n\t[ `${ SPACING_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSPACING_SUPPORT_KEY,\n\t],\n\t[ `${ SHADOW_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSHADOW_SUPPORT_KEY,\n\t],\n};\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * Extends the Edit skip paths to enable skipping additional paths in just\n * the Save component. This allows a block support to be serialized within the\n * editor, while using an alternate approach, such as server-side rendering, when\n * the support is saved.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsSave = {\n\t...skipSerializationPathsEdit,\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: [\n\t\t`${ DIMENSIONS_SUPPORT_KEY }.aspectRatio`,\n\t], // Skip serialization of aspect ratio in save mode.\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: [ BACKGROUND_SUPPORT_KEY ], // Skip serialization of background support in save mode.\n};\n\nconst skipSerializationPathsSaveChecks = {\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: true,\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: true,\n};\n\n/**\n * A dictionary used to normalize feature names between support flags, style\n * object properties and __experimentSkipSerialization configuration arrays.\n *\n * This allows not having to provide a migration for a support flag and possible\n * backwards compatibility bridges, while still achieving consistency between\n * the support flag and the skip serialization array.\n *\n * @constant\n * @type {Record<string, string>}\n */\nconst renamedFeatures = { gradients: 'gradient' };\n\n/**\n * A utility function used to remove one or more paths from a style object.\n * Works in a way similar to Lodash's `omit()`. See unit tests and examples below.\n *\n * It supports a single string path:\n *\n * ```\n * omitStyle( { color: 'red' }, 'color' ); // {}\n * ```\n *\n * or an array of paths:\n *\n * ```\n * omitStyle( { color: 'red', background: '#fff' }, [ 'color', 'background' ] ); // {}\n * ```\n *\n * It also allows you to specify paths at multiple levels in a string.\n *\n * ```\n * omitStyle( { typography: { textDecoration: 'underline' } }, 'typography.textDecoration' ); // {}\n * ```\n *\n * You can remove multiple paths at the same time:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t'typography.textDecoration',\n * \t\t\t'typography.textTransform',\n *\t\t]\n * );\n * // {}\n * ```\n *\n * You can also specify nested paths as arrays:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'typography', 'textDecoration' ],\n * \t\t\t[ 'typography', 'textTransform' ],\n *\t\t]\n * );\n * // {}\n * ```\n *\n * With regards to nesting of styles, infinite depth is supported:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\tborder: {\n * \t\t\t\tradius: {\n * \t\t\t\t\ttopLeft: '10px',\n * \t\t\t\t\ttopRight: '0.5rem',\n * \t\t\t\t}\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'border', 'radius', 'topRight' ],\n *\t\t]\n * );\n * // { border: { radius: { topLeft: '10px' } } }\n * ```\n *\n * The third argument, `preserveReference`, defines how to treat the input style object.\n * It is mostly necessary to properly handle mutation when recursively handling the style object.\n * Defaulting to `false`, this will always create a new object, avoiding to mutate `style`.\n * However, when recursing, we change that value to `true` in order to work with a single copy\n * of the original style object.\n *\n * @see https://lodash.com/docs/4.17.15#omit\n *\n * @param {Object} style Styles object.\n * @param {Array|string} paths Paths to remove.\n * @param {boolean} preserveReference True to mutate the `style` object, false otherwise.\n * @return {Object} Styles object with the specified paths removed.\n */\nexport function omitStyle( style, paths, preserveReference = false ) {\n\tif ( ! style ) {\n\t\treturn style;\n\t}\n\n\tlet newStyle = style;\n\tif ( ! preserveReference ) {\n\t\tnewStyle = JSON.parse( JSON.stringify( style ) );\n\t}\n\n\tif ( ! Array.isArray( paths ) ) {\n\t\tpaths = [ paths ];\n\t}\n\n\tpaths.forEach( ( path ) => {\n\t\tif ( ! Array.isArray( path ) ) {\n\t\t\tpath = path.split( '.' );\n\t\t}\n\n\t\tif ( path.length > 1 ) {\n\t\t\tconst [ firstSubpath, ...restPath ] = path;\n\t\t\tomitStyle( newStyle[ firstSubpath ], [ restPath ], true );\n\t\t} else if ( path.length === 1 ) {\n\t\t\tdelete newStyle[ path[ 0 ] ];\n\t\t}\n\t} );\n\n\treturn newStyle;\n}\n\n/**\n * Override props assigned to save component to inject the CSS variables definition.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object|string} blockNameOrType Block type.\n * @param {Object} attributes Block attributes.\n * @param {?Record<string, string[]>} skipPaths An object of keys and paths to skip serialization.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps(\n\tprops,\n\tblockNameOrType,\n\tattributes,\n\tskipPaths = skipSerializationPathsSave\n) {\n\tif ( ! hasStyleSupport( blockNameOrType ) ) {\n\t\treturn props;\n\t}\n\n\tlet { style } = attributes;\n\tObject.entries( skipPaths ).forEach( ( [ indicator, path ] ) => {\n\t\tconst skipSerialization =\n\t\t\tskipSerializationPathsSaveChecks[ indicator ] ||\n\t\t\tgetBlockSupport( blockNameOrType, indicator );\n\n\t\tif ( skipSerialization === true ) {\n\t\t\tstyle = omitStyle( style, path );\n\t\t}\n\n\t\tif ( Array.isArray( skipSerialization ) ) {\n\t\t\tskipSerialization.forEach( ( featureName ) => {\n\t\t\t\tconst feature = renamedFeatures[ featureName ] || featureName;\n\t\t\t\tstyle = omitStyle( style, [ [ ...path, feature ] ] );\n\t\t\t} );\n\t\t}\n\t} );\n\n\tprops.style = {\n\t\t...getInlineStyles( style ),\n\t\t...props.style,\n\t};\n\n\treturn props;\n}\n\nfunction BlockStyleControls( {\n\tclientId,\n\tname,\n\tsetAttributes,\n\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst passedProps = {\n\t\tclientId,\n\t\tname,\n\t\tsetAttributes,\n\t\tsettings,\n\t};\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<ColorEdit { ...passedProps } />\n\t\t\t<BackgroundImagePanel { ...passedProps } />\n\t\t\t<TypographyPanel { ...passedProps } />\n\t\t\t<BorderPanel { ...passedProps } />\n\t\t\t<DimensionsPanel { ...passedProps } />\n\t\t</>\n\t);\n}\n\nexport default {\n\tedit: BlockStyleControls,\n\thasSupport: hasStyleSupport,\n\taddSaveProps,\n\tattributeKeys: [ 'style' ],\n\tuseBlockProps,\n};\n\n// Defines which element types are supported, including their hover styles or\n// any other elements that have been included under a single element type\n// e.g. heading and h1-h6.\nconst elementTypes = [\n\t{ elementType: 'button' },\n\t{ elementType: 'link', pseudo: [ ':hover' ] },\n\t{\n\t\telementType: 'heading',\n\t\telements: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],\n\t},\n];\n\nfunction useBlockProps( { name, style } ) {\n\tconst blockElementsContainerIdentifier = `wp-elements-${ useInstanceId(\n\t\tuseBlockProps\n\t) }`;\n\n\t// The .editor-styles-wrapper selector is required on elements styles. As it is\n\t// added to all other editor styles, not providing it causes reset and global\n\t// styles to override element styles because of higher specificity.\n\tconst baseElementSelector = `.editor-styles-wrapper .${ blockElementsContainerIdentifier }`;\n\tconst blockElementStyles = style?.elements;\n\n\tconst styles = useMemo( () => {\n\t\tif ( ! blockElementStyles ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elementCSSRules = [];\n\n\t\telementTypes.forEach( ( { elementType, pseudo, elements } ) => {\n\t\t\tconst skipSerialization = shouldSkipSerialization(\n\t\t\t\tname,\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\telementType\n\t\t\t);\n\n\t\t\tif ( skipSerialization ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst elementStyles = blockElementStyles?.[ elementType ];\n\n\t\t\t// Process primary element type styles.\n\t\t\tif ( elementStyles ) {\n\t\t\t\tconst selector = scopeSelector(\n\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\tELEMENTS[ elementType ]\n\t\t\t\t);\n\n\t\t\t\telementCSSRules.push(\n\t\t\t\t\tcompileCSS( elementStyles, { selector } )\n\t\t\t\t);\n\n\t\t\t\t// Process any interactive states for the element type.\n\t\t\t\tif ( pseudo ) {\n\t\t\t\t\tpseudo.forEach( ( pseudoSelector ) => {\n\t\t\t\t\t\tif ( elementStyles[ pseudoSelector ] ) {\n\t\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\t\tcompileCSS( elementStyles[ pseudoSelector ], {\n\t\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\t\t`${ ELEMENTS[ elementType ] }${ pseudoSelector }`\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Process related elements e.g. h1-h6 for headings\n\t\t\tif ( elements ) {\n\t\t\t\telements.forEach( ( element ) => {\n\t\t\t\t\tif ( blockElementStyles[ element ] ) {\n\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\tcompileCSS( blockElementStyles[ element ], {\n\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\tELEMENTS[ element ]\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\treturn elementCSSRules.length > 0\n\t\t\t? elementCSSRules.join( '' )\n\t\t\t: undefined;\n\t}, [ baseElementSelector, blockElementStyles, name ] );\n\n\tuseStyleOverride( { css: styles } );\n\n\treturn addSaveProps(\n\t\t{ className: blockElementsContainerIdentifier },\n\t\tname,\n\t\t{ style },\n\t\tskipSerializationPathsEdit\n\t);\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/style/addAttribute',\n\taddAttribute\n);\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SACCC,eAAe,EACfC,eAAe,EACfC,uBAAuB,IAAIC,QAAQ,QAC7B,mBAAmB;AAC1B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,WAAW,EAAEC,UAAU,QAAQ,yBAAyB;;AAEjE;AACA;AACA;AACA,SAASC,sBAAsB,EAAEC,oBAAoB,QAAQ,cAAc;AAC3E,SAASC,kBAAkB,EAAEC,WAAW,EAAEC,kBAAkB,QAAQ,UAAU;AAC9E,SAASC,iBAAiB,EAAEC,SAAS,QAAQ,SAAS;AACtD,SACCC,eAAe,EACfC,sBAAsB,EACtBC,uBAAuB,QACjB,cAAc;AACrB,SACCC,sBAAsB,EACtBC,mBAAmB,EACnBC,eAAe,QACT,cAAc;AACrB,SACCC,uBAAuB,EACvBC,gBAAgB,EAChBC,gBAAgB,QACV,SAAS;AAChB,SAASC,aAAa,QAAQ,mCAAmC;AACjE,SAASC,mBAAmB,QAAQ,kCAAkC;AAEtE,MAAMC,gBAAgB,GAAG,CACxB,GAAGT,uBAAuB,EAC1BP,kBAAkB,EAClBG,iBAAiB,EACjBK,sBAAsB,EACtBV,sBAAsB,EACtBW,mBAAmB,EACnBP,kBAAkB,CAClB;AAED,MAAMe,eAAe,GAAKC,UAAU,IACnCF,gBAAgB,CAACG,IAAI,CAAIC,GAAG,IAAM5B,eAAe,CAAE0B,UAAU,EAAEE,GAAI,CAAE,CAAC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO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,cAAa,GAAI,CAC7C,GAAGA,sBAAwB,cAAa,CACzC;EAAE;EACH,CAAG,GAAGV,sBAAwB,EAAC,GAAI,CAAEA,sBAAsB,CAAE,CAAE;AAChE,CAAC;AAED,MAAMsC,gCAAgC,GAAG;EACxC,CAAG,GAAG5B,sBAAwB,cAAa,GAAI,IAAI;EACnD,CAAG,GAAGV,sBAAwB,EAAC,GAAI;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMuC,eAAe,GAAG;EAAEC,SAAS,EAAE;AAAW,CAAC;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAAET,KAAK,EAAEU,KAAK,EAAEC,iBAAiB,GAAG,KAAK,EAAG;EACpE,IAAK,CAAEX,KAAK,EAAG;IACd,OAAOA,KAAK;EACb;EAEA,IAAIY,QAAQ,GAAGZ,KAAK;EACpB,IAAK,CAAEW,iBAAiB,EAAG;IAC1BC,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAAED,IAAI,CAACE,SAAS,CAAEf,KAAM,CAAE,CAAC;EACjD;EAEA,IAAK,CAAEgB,KAAK,CAACC,OAAO,CAAEP,KAAM,CAAC,EAAG;IAC/BA,KAAK,GAAG,CAAEA,KAAK,CAAE;EAClB;EAEAA,KAAK,CA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a,CAAEG,cAAc,CAAE,EAAG;cACtCJ,eAAe,CAACG,IAAI,CACnBxF,UAAU,CAAEsF,aAAa,CAAEG,cAAc,CAAE,EAAE;gBAC5CF,QAAQ,EAAEtE,aAAa,CACtBkE,mBAAmB,EAClB,GAAGtF,QAAQ,CAAEkF,WAAW,CAAI,GAAGU,cAAgB,EACjD;cACD,CAAE,CACH,CAAC;YACF;UACD,CAAE,CAAC;QACJ;MACD;;MAEA;MACA,IAAKR,QAAQ,EAAG;QACfA,QAAQ,CAACtD,OAAO,CAAI+D,OAAO,IAAM;UAChC,IAAKN,kBAAkB,CAAEM,OAAO,CAAE,EAAG;YACpCL,eAAe,CAACG,IAAI,CACnBxF,UAAU,CAAEoF,kBAAkB,CAAEM,OAAO,CAAE,EAAE;cAC1CH,QAAQ,EAAEtE,aAAa,CACtBkE,mBAAmB,EACnBtF,QAAQ,CAAE6F,OAAO,CAClB;YACD,CAAE,CACH,CAAC;UACF;QACD,CAAE,CAAC;MACJ;IACD,CAAE,CAAC;IAEH,OAAOL,eAAe,CAAChC,MAAM,GAAG,CAAC,GAC9BgC,eAAe,CAACM,IAAI,CAAE,EAAG,CAAC,GAC1BC,SAAS;EACb,CAAC,EAAE,CAAET,mBAAmB,EAAEC,kBAAkB,EAAEjB,IAAI,CAAG,CAAC;EAEtDpD,gBAAgB,CAAE;IAAE8E,GAAG,EAAEpE;EAAO,CAAE,CAAC;EAEnC,OAAO+B,YAAY,CAClB;IAAEsC,SAAS,EAAEZ;EAAiC,CAAC,EAC/Cf,IAAI,EACJ;IAAElC;EAAM,CAAC,EACTI,0BACD,CAAC;AACF;AAEA5C,SAAS,CACR,0BAA0B,EAC1B,yBAAyB,EACzBqC,YACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useMemo","addFilter","getBlockSupport","hasBlockSupport","__EXPERIMENTAL_ELEMENTS","ELEMENTS","useInstanceId","getCSSRules","compileCSS","BACKGROUND_SUPPORT_KEY","BackgroundImagePanel","BORDER_SUPPORT_KEY","BorderPanel","SHADOW_SUPPORT_KEY","COLOR_SUPPORT_KEY","ColorEdit","TypographyPanel","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","DIMENSIONS_SUPPORT_KEY","SPACING_SUPPORT_KEY","DimensionsPanel","shouldSkipSerialization","useStyleOverride","useBlockSettings","scopeSelector","useBlockEditingMode","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","styleSupportKeys","hasStyleSupport","nameOrType","some","key","getInlineStyles","styles","output","forEach","rule","value","addAttribute","settings","attributes","style","Object","assign","type","skipSerializationPathsEdit","skipSerializationPathsSave","skipSerializationPathsSaveChecks","renamedFeatures","gradients","omitStyle","paths","preserveReference","newStyle","JSON","parse","stringify","Array","isArray","path","split","length","firstSubpath","restPath","addSaveProps","props","blockNameOrType","skipPaths","entries","indicator","skipSerialization","featureName","feature","BlockStyleControls","clientId","name","setAttributes","__unstableParentLayout","blockEditingMode","passedProps","typography","textAlign","children","edit","hasSupport","attributeKeys","useBlockProps","elementTypes","elementType","pseudo","elements","blockElementsContainerIdentifier","baseElementSelector","blockElementStyles","elementCSSRules","elementStyles","selector","push","pseudoSelector","element","join","undefined","css","className"],"sources":["@wordpress/block-editor/src/hooks/style.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport {\n\tgetBlockSupport,\n\thasBlockSupport,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n} from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { getCSSRules, compileCSS } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport { BACKGROUND_SUPPORT_KEY, BackgroundImagePanel } from './background';\nimport { BORDER_SUPPORT_KEY, BorderPanel, SHADOW_SUPPORT_KEY } from './border';\nimport { COLOR_SUPPORT_KEY, ColorEdit } from './color';\nimport {\n\tTypographyPanel,\n\tTYPOGRAPHY_SUPPORT_KEY,\n\tTYPOGRAPHY_SUPPORT_KEYS,\n} from './typography';\nimport {\n\tDIMENSIONS_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tDimensionsPanel,\n} from './dimensions';\nimport {\n\tshouldSkipSerialization,\n\tuseStyleOverride,\n\tuseBlockSettings,\n} from './utils';\nimport { scopeSelector } from '../components/global-styles/utils';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\n\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tDIMENSIONS_SUPPORT_KEY,\n\tBACKGROUND_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tSHADOW_SUPPORT_KEY,\n];\n\nconst hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n\n/**\n * Returns the inline styles to add depending on the style object\n *\n * @param {Object} styles Styles configuration.\n *\n * @return {Object} Flattened CSS variables declaration.\n */\nexport function getInlineStyles( styles = {} ) {\n\tconst output = {};\n\t// The goal is to move everything to server side generated engine styles\n\t// This is temporary as we absorb more and more styles into the engine.\n\tgetCSSRules( styles ).forEach( ( rule ) => {\n\t\toutput[ rule.key ] = rule.value;\n\t} );\n\n\treturn output;\n}\n\n/**\n * Filters registered block settings, extending attributes to include `style` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttribute( settings ) {\n\tif ( ! hasStyleSupport( settings ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( ! settings.attributes.style ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsEdit = {\n\t[ `${ BORDER_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [ 'border' ],\n\t[ `${ COLOR_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tCOLOR_SUPPORT_KEY,\n\t],\n\t[ `${ TYPOGRAPHY_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t],\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tDIMENSIONS_SUPPORT_KEY,\n\t],\n\t[ `${ SPACING_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSPACING_SUPPORT_KEY,\n\t],\n\t[ `${ SHADOW_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSHADOW_SUPPORT_KEY,\n\t],\n};\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * Extends the Edit skip paths to enable skipping additional paths in just\n * the Save component. This allows a block support to be serialized within the\n * editor, while using an alternate approach, such as server-side rendering, when\n * the support is saved.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsSave = {\n\t...skipSerializationPathsEdit,\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: [\n\t\t`${ DIMENSIONS_SUPPORT_KEY }.aspectRatio`,\n\t], // Skip serialization of aspect ratio in save mode.\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: [ BACKGROUND_SUPPORT_KEY ], // Skip serialization of background support in save mode.\n};\n\nconst skipSerializationPathsSaveChecks = {\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: true,\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: true,\n};\n\n/**\n * A dictionary used to normalize feature names between support flags, style\n * object properties and __experimentSkipSerialization configuration arrays.\n *\n * This allows not having to provide a migration for a support flag and possible\n * backwards compatibility bridges, while still achieving consistency between\n * the support flag and the skip serialization array.\n *\n * @constant\n * @type {Record<string, string>}\n */\nconst renamedFeatures = { gradients: 'gradient' };\n\n/**\n * A utility function used to remove one or more paths from a style object.\n * Works in a way similar to Lodash's `omit()`. See unit tests and examples below.\n *\n * It supports a single string path:\n *\n * ```\n * omitStyle( { color: 'red' }, 'color' ); // {}\n * ```\n *\n * or an array of paths:\n *\n * ```\n * omitStyle( { color: 'red', background: '#fff' }, [ 'color', 'background' ] ); // {}\n * ```\n *\n * It also allows you to specify paths at multiple levels in a string.\n *\n * ```\n * omitStyle( { typography: { textDecoration: 'underline' } }, 'typography.textDecoration' ); // {}\n * ```\n *\n * You can remove multiple paths at the same time:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t'typography.textDecoration',\n * \t\t\t'typography.textTransform',\n *\t\t]\n * );\n * // {}\n * ```\n *\n * You can also specify nested paths as arrays:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'typography', 'textDecoration' ],\n * \t\t\t[ 'typography', 'textTransform' ],\n *\t\t]\n * );\n * // {}\n * ```\n *\n * With regards to nesting of styles, infinite depth is supported:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\tborder: {\n * \t\t\t\tradius: {\n * \t\t\t\t\ttopLeft: '10px',\n * \t\t\t\t\ttopRight: '0.5rem',\n * \t\t\t\t}\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'border', 'radius', 'topRight' ],\n *\t\t]\n * );\n * // { border: { radius: { topLeft: '10px' } } }\n * ```\n *\n * The third argument, `preserveReference`, defines how to treat the input style object.\n * It is mostly necessary to properly handle mutation when recursively handling the style object.\n * Defaulting to `false`, this will always create a new object, avoiding to mutate `style`.\n * However, when recursing, we change that value to `true` in order to work with a single copy\n * of the original style object.\n *\n * @see https://lodash.com/docs/4.17.15#omit\n *\n * @param {Object} style Styles object.\n * @param {Array|string} paths Paths to remove.\n * @param {boolean} preserveReference True to mutate the `style` object, false otherwise.\n * @return {Object} Styles object with the specified paths removed.\n */\nexport function omitStyle( style, paths, preserveReference = false ) {\n\tif ( ! style ) {\n\t\treturn style;\n\t}\n\n\tlet newStyle = style;\n\tif ( ! preserveReference ) {\n\t\tnewStyle = JSON.parse( JSON.stringify( style ) );\n\t}\n\n\tif ( ! Array.isArray( paths ) ) {\n\t\tpaths = [ paths ];\n\t}\n\n\tpaths.forEach( ( path ) => {\n\t\tif ( ! Array.isArray( path ) ) {\n\t\t\tpath = path.split( '.' );\n\t\t}\n\n\t\tif ( path.length > 1 ) {\n\t\t\tconst [ firstSubpath, ...restPath ] = path;\n\t\t\tomitStyle( newStyle[ firstSubpath ], [ restPath ], true );\n\t\t} else if ( path.length === 1 ) {\n\t\t\tdelete newStyle[ path[ 0 ] ];\n\t\t}\n\t} );\n\n\treturn newStyle;\n}\n\n/**\n * Override props assigned to save component to inject the CSS variables definition.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object|string} blockNameOrType Block type.\n * @param {Object} attributes Block attributes.\n * @param {?Record<string, string[]>} skipPaths An object of keys and paths to skip serialization.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps(\n\tprops,\n\tblockNameOrType,\n\tattributes,\n\tskipPaths = skipSerializationPathsSave\n) {\n\tif ( ! hasStyleSupport( blockNameOrType ) ) {\n\t\treturn props;\n\t}\n\n\tlet { style } = attributes;\n\tObject.entries( skipPaths ).forEach( ( [ indicator, path ] ) => {\n\t\tconst skipSerialization =\n\t\t\tskipSerializationPathsSaveChecks[ indicator ] ||\n\t\t\tgetBlockSupport( blockNameOrType, indicator );\n\n\t\tif ( skipSerialization === true ) {\n\t\t\tstyle = omitStyle( style, path );\n\t\t}\n\n\t\tif ( Array.isArray( skipSerialization ) ) {\n\t\t\tskipSerialization.forEach( ( featureName ) => {\n\t\t\t\tconst feature = renamedFeatures[ featureName ] || featureName;\n\t\t\t\tstyle = omitStyle( style, [ [ ...path, feature ] ] );\n\t\t\t} );\n\t\t}\n\t} );\n\n\tprops.style = {\n\t\t...getInlineStyles( style ),\n\t\t...props.style,\n\t};\n\n\treturn props;\n}\n\nfunction BlockStyleControls( {\n\tclientId,\n\tname,\n\tsetAttributes,\n\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst passedProps = {\n\t\tclientId,\n\t\tname,\n\t\tsetAttributes,\n\t\tsettings: {\n\t\t\t...settings,\n\t\t\ttypography: {\n\t\t\t\t...settings.typography,\n\t\t\t\t// The text alignment UI for individual blocks is rendered in\n\t\t\t\t// the block toolbar, so disable it here.\n\t\t\t\ttextAlign: false,\n\t\t\t},\n\t\t},\n\t};\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<ColorEdit { ...passedProps } />\n\t\t\t<BackgroundImagePanel { ...passedProps } />\n\t\t\t<TypographyPanel { ...passedProps } />\n\t\t\t<BorderPanel { ...passedProps } />\n\t\t\t<DimensionsPanel { ...passedProps } />\n\t\t</>\n\t);\n}\n\nexport default {\n\tedit: BlockStyleControls,\n\thasSupport: hasStyleSupport,\n\taddSaveProps,\n\tattributeKeys: [ 'style' ],\n\tuseBlockProps,\n};\n\n// Defines which element types are supported, including their hover styles or\n// any other elements that have been included under a single element type\n// e.g. heading and h1-h6.\nconst elementTypes = [\n\t{ elementType: 'button' },\n\t{ elementType: 'link', pseudo: [ ':hover' ] },\n\t{\n\t\telementType: 'heading',\n\t\telements: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],\n\t},\n];\n\nfunction useBlockProps( { name, style } ) {\n\tconst blockElementsContainerIdentifier = `wp-elements-${ useInstanceId(\n\t\tuseBlockProps\n\t) }`;\n\n\t// The .editor-styles-wrapper selector is required on elements styles. As it is\n\t// added to all other editor styles, not providing it causes reset and global\n\t// styles to override element styles because of higher specificity.\n\tconst baseElementSelector = `.editor-styles-wrapper .${ blockElementsContainerIdentifier }`;\n\tconst blockElementStyles = style?.elements;\n\n\tconst styles = useMemo( () => {\n\t\tif ( ! blockElementStyles ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elementCSSRules = [];\n\n\t\telementTypes.forEach( ( { elementType, pseudo, elements } ) => {\n\t\t\tconst skipSerialization = shouldSkipSerialization(\n\t\t\t\tname,\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\telementType\n\t\t\t);\n\n\t\t\tif ( skipSerialization ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst elementStyles = blockElementStyles?.[ elementType ];\n\n\t\t\t// Process primary element type styles.\n\t\t\tif ( elementStyles ) {\n\t\t\t\tconst selector = scopeSelector(\n\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\tELEMENTS[ elementType ]\n\t\t\t\t);\n\n\t\t\t\telementCSSRules.push(\n\t\t\t\t\tcompileCSS( elementStyles, { selector } )\n\t\t\t\t);\n\n\t\t\t\t// Process any interactive states for the element type.\n\t\t\t\tif ( pseudo ) {\n\t\t\t\t\tpseudo.forEach( ( pseudoSelector ) => {\n\t\t\t\t\t\tif ( elementStyles[ pseudoSelector ] ) {\n\t\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\t\tcompileCSS( elementStyles[ pseudoSelector ], {\n\t\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\t\t`${ ELEMENTS[ elementType ] }${ pseudoSelector }`\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Process related elements e.g. h1-h6 for headings\n\t\t\tif ( elements ) {\n\t\t\t\telements.forEach( ( element ) => {\n\t\t\t\t\tif ( blockElementStyles[ element ] ) {\n\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\tcompileCSS( blockElementStyles[ element ], {\n\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\tELEMENTS[ element ]\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\treturn elementCSSRules.length > 0\n\t\t\t? elementCSSRules.join( '' )\n\t\t\t: undefined;\n\t}, [ baseElementSelector, blockElementStyles, name ] );\n\n\tuseStyleOverride( { css: styles } );\n\n\treturn addSaveProps(\n\t\t{ className: blockElementsContainerIdentifier },\n\t\tname,\n\t\t{ style },\n\t\tskipSerializationPathsEdit\n\t);\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/style/addAttribute',\n\taddAttribute\n);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SACCC,eAAe,EACfC,eAAe,EACfC,uBAAuB,IAAIC,QAAQ,QAC7B,mBAAmB;AAC1B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,WAAW,EAAEC,UAAU,QAAQ,yBAAyB;;AAEjE;AACA;AACA;AACA,SAASC,sBAAsB,EAAEC,oBAAoB,QAAQ,cAAc;AAC3E,SAASC,kBAAkB,EAAEC,WAAW,EAAEC,kBAAkB,QAAQ,UAAU;AAC9E,SAASC,iBAAiB,EAAEC,SAAS,QAAQ,SAAS;AACtD,SACCC,eAAe,EACfC,sBAAsB,EACtBC,uBAAuB,QACjB,cAAc;AACrB,SACCC,sBAAsB,E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AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,0BAA0B,GAAG;EAClC,CAAG,GAAGxC,kBAAoB,kCAAiC,GAAI,CAAE,QAAQ,CAAE;EAC3E,CAAG,GAAGG,iBAAmB,kCAAiC,GAAI,CAC7DA,iBAAiB,CACjB;EACD,CAAG,GAAGG,sBAAwB,kCAAiC,GAAI,CAClEA,sBAAsB,CACtB;EACD,CAAG,GAAGE,sBAAwB,kCAAiC,GAAI,CAClEA,sBAAsB,CACtB;EACD,CAAG,GAAGC,mBAAqB,kCAAiC,GAAI,CAC/DA,mBAAmB,CACnB;EACD,CAAG,GAAGP,kBAAoB,kCAAiC,GAAI,CAC9DA,kBAAkB;AAEpB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMuC,0BAA0B,GAAG;EAClC,GAAGD,0BAA0B;EAC7B,CAAG,GAAGhC,sBAAwB,cAAa,GAAI,CAC7C,GAAGA,sBAAwB,cAAa,CACzC;EAAE;EACH,CAAG,GAAGV,sBAAwB,EAAC,GAAI,CAAEA,sBAAsB,CAAE,CAAE;AAChE,CAAC;AAED,MAAM4C,gCAAgC,GAAG;EACxC,CAAG,GAAGlC,sBAAwB,cAAa,GAAI,IAAI;EACnD,CAAG,GAAGV,sBAAwB,EAAC,GAAI;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM6C,eAAe,GAAG;EAAEC,SAAS,EAAE;AAAW,CAAC;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;cAC1CH,QAAQ,EAAE7E,aAAa,CACtByE,mBAAmB,EACnB7F,QAAQ,CAAEoG,OAAO,CAClB;YACD,CAAE,CACH,CAAC;UACF;QACD,CAAE,CAAC;MACJ;IACD,CAAE,CAAC;IAEH,OAAOL,eAAe,CAACjC,MAAM,GAAG,CAAC,GAC9BiC,eAAe,CAACM,IAAI,CAAE,EAAG,CAAC,GAC1BC,SAAS;EACb,CAAC,EAAE,CAAET,mBAAmB,EAAEC,kBAAkB,EAAElB,IAAI,CAAG,CAAC;EAEtD1D,gBAAgB,CAAE;IAAEqF,GAAG,EAAErE;EAAO,CAAE,CAAC;EAEnC,OAAO+B,YAAY,CAClB;IAAEuC,SAAS,EAAEZ;EAAiC,CAAC,EAC/ChB,IAAI,EACJ;IAAElC;EAAM,CAAC,EACTI,0BACD,CAAC;AACF;AAEAlD,SAAS,CACR,0BAA0B,EAC1B,yBAAyB,EACzB2C,YACD,CAAC","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -16,8 +15,9 @@ import { alignLeft, alignRight, alignCenter } from '@wordpress/icons';
16
15
  */
17
16
  import { AlignmentControl, BlockControls } from '../components';
18
17
  import { useBlockEditingMode } from '../components/block-editing-mode';
19
- import { cleanEmptyObject, shouldSkipSerialization } from './utils';
18
+ import { cleanEmptyObject, shouldSkipSerialization, useBlockSettings } from './utils';
20
19
  import { TYPOGRAPHY_SUPPORT_KEY } from './typography';
20
+ import { jsx as _jsx } from "react/jsx-runtime";
21
21
  export const TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';
22
22
  const TEXT_ALIGNMENT_OPTIONS = [{
23
23
  icon: alignLeft,
@@ -33,6 +33,7 @@ const TEXT_ALIGNMENT_OPTIONS = [{
33
33
  align: 'right'
34
34
  }];
35
35
  const VALID_TEXT_ALIGNMENTS = ['left', 'center', 'right'];
36
+ const NO_TEXT_ALIGNMENTS = [];
36
37
 
37
38
  /**
38
39
  * Returns the valid text alignments.
@@ -44,25 +45,24 @@ const VALID_TEXT_ALIGNMENTS = ['left', 'center', 'right'];
44
45
  * @return {string[]} Valid text alignments.
45
46
  */
46
47
  export function getValidTextAlignments(blockTextAlign) {
47
- let validTextAlignments;
48
48
  if (Array.isArray(blockTextAlign)) {
49
- validTextAlignments = VALID_TEXT_ALIGNMENTS.filter(textAlign => blockTextAlign.includes(textAlign));
50
- } else if (blockTextAlign === true) {
51
- // `true` includes all alignments...
52
- validTextAlignments = [...VALID_TEXT_ALIGNMENTS];
53
- } else {
54
- validTextAlignments = [];
49
+ return VALID_TEXT_ALIGNMENTS.filter(textAlign => blockTextAlign.includes(textAlign));
55
50
  }
56
- return validTextAlignments;
51
+ return blockTextAlign === true ? VALID_TEXT_ALIGNMENTS : NO_TEXT_ALIGNMENTS;
57
52
  }
58
53
  function BlockEditTextAlignmentToolbarControlsPure({
59
54
  style,
60
55
  name: blockName,
61
56
  setAttributes
62
57
  }) {
63
- const validTextAlignments = getValidTextAlignments(getBlockSupport(blockName, TEXT_ALIGN_SUPPORT_KEY));
58
+ const settings = useBlockSettings(blockName);
59
+ const hasTextAlignControl = settings?.typography?.textAlign;
64
60
  const blockEditingMode = useBlockEditingMode();
65
- if (!validTextAlignments.length || blockEditingMode !== 'default') {
61
+ if (!hasTextAlignControl || blockEditingMode !== 'default') {
62
+ return null;
63
+ }
64
+ const validTextAlignments = getValidTextAlignments(getBlockSupport(blockName, TEXT_ALIGN_SUPPORT_KEY));
65
+ if (!validTextAlignments.length) {
66
66
  return null;
67
67
  }
68
68
  const textAlignmentControls = TEXT_ALIGNMENT_OPTIONS.filter(control => validTextAlignments.includes(control.align));
@@ -78,13 +78,14 @@ function BlockEditTextAlignmentToolbarControlsPure({
78
78
  style: cleanEmptyObject(newStyle)
79
79
  });
80
80
  };
81
- return createElement(BlockControls, {
82
- group: "block"
83
- }, createElement(AlignmentControl, {
84
- value: style?.typography?.textAlign,
85
- onChange: onChange,
86
- alignmentControls: textAlignmentControls
87
- }));
81
+ return /*#__PURE__*/_jsx(BlockControls, {
82
+ group: "block",
83
+ children: /*#__PURE__*/_jsx(AlignmentControl, {
84
+ value: style?.typography?.textAlign,
85
+ onChange: onChange,
86
+ alignmentControls: textAlignmentControls
87
+ })
88
+ });
88
89
  }
89
90
  export default {
90
91
  edit: BlockEditTextAlignmentToolbarControlsPure,
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__","getBlockSupport","hasBlockSupport","alignLeft","alignRight","alignCenter","AlignmentControl","BlockControls","useBlockEditingMode","cleanEmptyObject","shouldSkipSerialization","TYPOGRAPHY_SUPPORT_KEY","TEXT_ALIGN_SUPPORT_KEY","TEXT_ALIGNMENT_OPTIONS","icon","title","align","VALID_TEXT_ALIGNMENTS","getValidTextAlignments","blockTextAlign","validTextAlignments","Array","isArray","filter","textAlign","includes","BlockEditTextAlignmentToolbarControlsPure","style","name","blockName","setAttributes","blockEditingMode","length","textAlignmentControls","control","onChange","newTextAlignValue","newStyle","typography","createElement","group","value","alignmentControls","edit","useBlockProps","addSaveProps","addAssignedTextAlign","attributeKeys","hasSupport","className","props","blockType","attributes","isTextAlignValid"],"sources":["@wordpress/block-editor/src/hooks/text-align.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { alignLeft, alignRight, alignCenter } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { AlignmentControl, BlockControls } from '../components';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport { cleanEmptyObject, shouldSkipSerialization } from './utils';\nimport { TYPOGRAPHY_SUPPORT_KEY } from './typography';\n\nexport const TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';\n\nconst TEXT_ALIGNMENT_OPTIONS = [\n\t{\n\t\ticon: alignLeft,\n\t\ttitle: __( 'Align text left' ),\n\t\talign: 'left',\n\t},\n\t{\n\t\ticon: alignCenter,\n\t\ttitle: __( 'Align text center' ),\n\t\talign: 'center',\n\t},\n\t{\n\t\ticon: alignRight,\n\t\ttitle: __( 'Align text right' ),\n\t\talign: 'right',\n\t},\n];\n\nconst VALID_TEXT_ALIGNMENTS = [ 'left', 'center', 'right' ];\n\n/**\n * Returns the valid text alignments.\n * Takes into consideration the text aligns supported by a block.\n * Exported just for testing purposes, not exported outside the module.\n *\n * @param {?boolean|string[]} blockTextAlign Text aligns supported by the block.\n *\n * @return {string[]} Valid text alignments.\n */\nexport function getValidTextAlignments( blockTextAlign ) {\n\tlet validTextAlignments;\n\tif ( Array.isArray( blockTextAlign ) ) {\n\t\tvalidTextAlignments = VALID_TEXT_ALIGNMENTS.filter( ( textAlign ) =>\n\t\t\tblockTextAlign.includes( textAlign )\n\t\t);\n\t} else if ( blockTextAlign === true ) {\n\t\t// `true` includes all alignments...\n\t\tvalidTextAlignments = [ ...VALID_TEXT_ALIGNMENTS ];\n\t} else {\n\t\tvalidTextAlignments = [];\n\t}\n\n\treturn validTextAlignments;\n}\n\nfunction BlockEditTextAlignmentToolbarControlsPure( {\n\tstyle,\n\tname: blockName,\n\tsetAttributes,\n} ) {\n\tconst validTextAlignments = getValidTextAlignments(\n\t\tgetBlockSupport( blockName, TEXT_ALIGN_SUPPORT_KEY )\n\t);\n\tconst blockEditingMode = useBlockEditingMode();\n\tif ( ! validTextAlignments.length || blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\tconst textAlignmentControls = TEXT_ALIGNMENT_OPTIONS.filter( ( control ) =>\n\t\tvalidTextAlignments.includes( control.align )\n\t);\n\n\tconst onChange = ( newTextAlignValue ) => {\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\ttextAlign: newTextAlignValue,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( { style: cleanEmptyObject( newStyle ) } );\n\t};\n\n\treturn (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ style?.typography?.textAlign }\n\t\t\t\tonChange={ onChange }\n\t\t\t\talignmentControls={ textAlignmentControls }\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n}\n\nexport default {\n\tedit: BlockEditTextAlignmentToolbarControlsPure,\n\tuseBlockProps,\n\taddSaveProps: addAssignedTextAlign,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, TEXT_ALIGN_SUPPORT_KEY, false );\n\t},\n};\n\nfunction useBlockProps( { name, style } ) {\n\tif ( ! style?.typography?.textAlign ) {\n\t\treturn null;\n\t}\n\n\tconst validTextAlignments = getValidTextAlignments(\n\t\tgetBlockSupport( name, TEXT_ALIGN_SUPPORT_KEY )\n\t);\n\n\tif ( ! validTextAlignments.length ) {\n\t\treturn null;\n\t}\n\n\tif (\n\t\tshouldSkipSerialization( name, TYPOGRAPHY_SUPPORT_KEY, 'textAlign' )\n\t) {\n\t\treturn null;\n\t}\n\n\tconst textAlign = style.typography.textAlign;\n\n\tconst className = clsx( {\n\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t} );\n\treturn { className };\n}\n\n/**\n * Override props assigned to save component to inject text alignment class\n * name if block supports it.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object} blockType Block type.\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addAssignedTextAlign( props, blockType, attributes ) {\n\tif ( ! attributes?.style?.typography?.textAlign ) {\n\t\treturn props;\n\t}\n\n\tconst { textAlign } = attributes.style.typography;\n\tconst blockTextAlign = getBlockSupport( blockType, TEXT_ALIGN_SUPPORT_KEY );\n\tconst isTextAlignValid =\n\t\tgetValidTextAlignments( blockTextAlign ).includes( textAlign );\n\tif (\n\t\tisTextAlignValid &&\n\t\t! shouldSkipSerialization(\n\t\t\tblockType,\n\t\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t\t'textAlign'\n\t\t)\n\t) {\n\t\tprops.className = clsx(\n\t\t\t`has-text-align-${ textAlign }`,\n\t\t\tprops.className\n\t\t);\n\t}\n\treturn props;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,eAAe,EAAEC,eAAe,QAAQ,mBAAmB;AACpE,SAASC,SAAS,EAAEC,UAAU,EAAEC,WAAW,QAAQ,kBAAkB;;AAErE;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,eAAe;AAC/D,SAASC,mBAAmB,QAAQ,kCAAkC;AACtE,SAASC,gBAAgB,EAAEC,uBAAuB,QAAQ,SAAS;AACnE,SAASC,sBAAsB,QAAQ,cAAc;AAErD,OAAO,MAAMC,sBAAsB,GAAG,sBAAsB;AAE5D,MAAMC,sBAAsB,GAAG,CAC9B;EACCC,IAAI,EAAEX,SAAS;EACfY,KAAK,EAAEf,EAAE,CAAE,iBAAkB,CAAC;EAC9BgB,KAAK,EAAE;AACR,CAAC,EACD;EACCF,IAAI,EAAET,WAAW;EACjBU,KAAK,EAAEf,EAAE,CAAE,mBAAoB,CAAC;EAChCgB,KAAK,EAAE;AACR,CAAC,EACD;EACCF,IAAI,EAAEV,UAAU;EAChBW,KAAK,EAAEf,EAAE,CAAE,kBAAmB,CAAC;EAC/BgB,KAAK,EAAE;AACR,CAAC,CACD;AAED,MAAMC,qBAAqB,GAAG,CAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAE;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAEC,cAAc,EAAG;EACxD,IAAIC,mBAAmB;EACvB,IAAKC,KAAK,CAACC,OAAO,CAAEH,cAAe,CAAC,EAAG;IACtCC,mBAAmB,GAAGH,qBAAqB,CAACM,MAAM,CAAIC,SAAS,IAC9DL,cAAc,CAACM,QAAQ,CAAED,S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IACC6B,gBAAgB,IAChB,CAAE3C,uBAAuB,CACxByC,SAAS,EACTxC,sBAAsB,EACtB,WACD,CAAC,EACA;IACDuC,KAAK,CAACD,SAAS,GAAGlD,IAAI,CACpB,kBAAkByB,SAAW,EAAC,EAC/B0B,KAAK,CAACD,SACP,CAAC;EACF;EACA,OAAOC,KAAK;AACb","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","getBlockSupport","hasBlockSupport","alignLeft","alignRight","alignCenter","AlignmentControl","BlockControls","useBlockEditingMode","cleanEmptyObject","shouldSkipSerialization","useBlockSettings","TYPOGRAPHY_SUPPORT_KEY","jsx","_jsx","TEXT_ALIGN_SUPPORT_KEY","TEXT_ALIGNMENT_OPTIONS","icon","title","align","VALID_TEXT_ALIGNMENTS","NO_TEXT_ALIGNMENTS","getValidTextAlignments","blockTextAlign","Array","isArray","filter","textAlign","includes","BlockEditTextAlignmentToolbarControlsPure","style","name","blockName","setAttributes","settings","hasTextAlignControl","typography","blockEditingMode","validTextAlignments","length","textAlignmentControls","control","onChange","newTextAlignValue","newStyle","group","children","value","alignmentControls","edit","useBlockProps","addSaveProps","addAssignedTextAlign","attributeKeys","hasSupport","className","props","blockType","attributes","isTextAlignValid"],"sources":["@wordpress/block-editor/src/hooks/text-align.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { alignLeft, alignRight, alignCenter } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { AlignmentControl, BlockControls } from '../components';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport {\n\tcleanEmptyObject,\n\tshouldSkipSerialization,\n\tuseBlockSettings,\n} from './utils';\nimport { TYPOGRAPHY_SUPPORT_KEY } from './typography';\n\nexport const TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';\n\nconst TEXT_ALIGNMENT_OPTIONS = [\n\t{\n\t\ticon: alignLeft,\n\t\ttitle: __( 'Align text left' ),\n\t\talign: 'left',\n\t},\n\t{\n\t\ticon: alignCenter,\n\t\ttitle: __( 'Align text center' ),\n\t\talign: 'center',\n\t},\n\t{\n\t\ticon: alignRight,\n\t\ttitle: __( 'Align text right' ),\n\t\talign: 'right',\n\t},\n];\n\nconst VALID_TEXT_ALIGNMENTS = [ 'left', 'center', 'right' ];\nconst NO_TEXT_ALIGNMENTS = [];\n\n/**\n * Returns the valid text alignments.\n * Takes into consideration the text aligns supported by a block.\n * Exported just for testing purposes, not exported outside the module.\n *\n * @param {?boolean|string[]} blockTextAlign Text aligns supported by the block.\n *\n * @return {string[]} Valid text alignments.\n */\nexport function getValidTextAlignments( blockTextAlign ) {\n\tif ( Array.isArray( blockTextAlign ) ) {\n\t\treturn VALID_TEXT_ALIGNMENTS.filter( ( textAlign ) =>\n\t\t\tblockTextAlign.includes( textAlign )\n\t\t);\n\t}\n\n\treturn blockTextAlign === true ? VALID_TEXT_ALIGNMENTS : NO_TEXT_ALIGNMENTS;\n}\n\nfunction BlockEditTextAlignmentToolbarControlsPure( {\n\tstyle,\n\tname: blockName,\n\tsetAttributes,\n} ) {\n\tconst settings = useBlockSettings( blockName );\n\tconst hasTextAlignControl = settings?.typography?.textAlign;\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tif ( ! hasTextAlignControl || blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\tconst validTextAlignments = getValidTextAlignments(\n\t\tgetBlockSupport( blockName, TEXT_ALIGN_SUPPORT_KEY )\n\t);\n\tif ( ! validTextAlignments.length ) {\n\t\treturn null;\n\t}\n\n\tconst textAlignmentControls = TEXT_ALIGNMENT_OPTIONS.filter( ( control ) =>\n\t\tvalidTextAlignments.includes( control.align )\n\t);\n\n\tconst onChange = ( newTextAlignValue ) => {\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\ttextAlign: newTextAlignValue,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( { style: cleanEmptyObject( newStyle ) } );\n\t};\n\n\treturn (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ style?.typography?.textAlign }\n\t\t\t\tonChange={ onChange }\n\t\t\t\talignmentControls={ textAlignmentControls }\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n}\n\nexport default {\n\tedit: BlockEditTextAlignmentToolbarControlsPure,\n\tuseBlockProps,\n\taddSaveProps: addAssignedTextAlign,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, TEXT_ALIGN_SUPPORT_KEY, false );\n\t},\n};\n\nfunction useBlockProps( { name, style } ) {\n\tif ( ! style?.typography?.textAlign ) {\n\t\treturn null;\n\t}\n\n\tconst validTextAlignments = getValidTextAlignments(\n\t\tgetBlockSupport( name, TEXT_ALIGN_SUPPORT_KEY )\n\t);\n\n\tif ( ! validTextAlignments.length ) {\n\t\treturn null;\n\t}\n\n\tif (\n\t\tshouldSkipSerialization( name, TYPOGRAPHY_SUPPORT_KEY, 'textAlign' )\n\t) {\n\t\treturn null;\n\t}\n\n\tconst textAlign = style.typography.textAlign;\n\n\tconst className = clsx( {\n\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t} );\n\treturn { className };\n}\n\n/**\n * Override props assigned to save component to inject text alignment class\n * name if block supports it.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object} blockType Block type.\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addAssignedTextAlign( props, blockType, attributes ) {\n\tif ( ! attributes?.style?.typography?.textAlign ) {\n\t\treturn props;\n\t}\n\n\tconst { textAlign } = attributes.style.typography;\n\tconst blockTextAlign = getBlockSupport( blockType, TEXT_ALIGN_SUPPORT_KEY );\n\tconst isTextAlignValid =\n\t\tgetValidTextAlignments( blockTextAlign ).includes( textAlign );\n\tif (\n\t\tisTextAlignValid &&\n\t\t! shouldSkipSerialization(\n\t\t\tblockType,\n\t\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t\t'textAlign'\n\t\t)\n\t) {\n\t\tprops.className = clsx(\n\t\t\t`has-text-align-${ textAlign }`,\n\t\t\tprops.className\n\t\t);\n\t}\n\treturn props;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,eAAe,EAAEC,eAAe,QAAQ,mBAAmB;AACpE,SAASC,SAAS,EAAEC,UAAU,EAAEC,WAAW,QAAQ,kBAAkB;;AAErE;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,eAAe;AAC/D,SAASC,mBAAmB,QAAQ,kCAAkC;AACtE,SACCC,gBAAgB,EAChBC,uBAAuB,EACvBC,gBAAgB,QACV,SAAS;AAChB,SAASC,sBAAsB,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEtD,OAAO,MAAMC,sBAAsB,GAAG,sBAAsB;AAE5D,MAAMC,sBAAsB,GAAG,CAC9B;EACCC,IAAI,EAAEd,SAAS;EACfe,KAAK,EAAElB,EAAE,CAAE,iBAAkB,CAAC;EAC9BmB,KAAK,EAAE;AACR,CAAC,EACD;EACCF,IAAI,EAAEZ,WAAW;EACjBa,KAAK,EAAElB,EAAE,CAAE,mBAAoB,CAAC;EAChCmB,KAAK,EAAE;AACR,CAAC,EACD;EACCF,IAAI,EAAEb,UAAU;EAChBc,KAAK,EAAElB,EAAE,CAAE,kBAAmB,CAAC;EAC/BmB,KAAK,EAAE;AACR,CAAC,CACD;AAED,MAAMC,qBAAqB,GAAG,CAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAE;AAC3D,MAAMC,kBAAkB,GAAG,EAAE;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CA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