@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 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_blocks","_components","_compose","_data","_element","_useSettings","_inspectorControls","_useBlockDisplayInformation","_utils","_lockUnlock","_store","CustomSelectControl","unlock","componentsPrivateApis","POSITION_SUPPORT_KEY","OPTION_CLASSNAME","DEFAULT_OPTION","key","value","name","__","className","STICKY_OPTION","_x","__experimentalHint","FIXED_OPTION","POSITION_SIDES","VALID_POSITION_TYPES","getPositionCSS","selector","style","output","type","positionType","position","includes","forEach","side","undefined","hasStickyPositionSupport","blockType","support","getBlockSupport","sticky","hasFixedPositionSupport","fixed","hasPositionSupport","hasPositionValue","props","attributes","hasStickyOrFixedPositionValue","resetPosition","setAttributes","cleanEmptyObject","top","right","bottom","left","useIsPositionDisabled","blockName","allowFixed","allowSticky","useSettings","isDisabled","PositionPanelPure","clientId","firstParentClientId","useSelect","select","getBlockParents","blockEditorStore","parents","length","blockInformation","useBlockDisplayInformation","stickyHelpText","sprintf","title","options","useMemo","availableOptions","push","onChangeType","next","placementValue","newStyle","selectedOption","find","option","Platform","web","_react","createElement","default","group","BaseControl","__nextHasNoMarginBottom","help","__next40pxDefaultSize","label","hideLabelFromVision","describedBy","__experimentalShowSelectedHint","onChange","selectedItem","size","native","_default","exports","edit","Edit","isPositionDisabled","useBlockProps","attributeKeys","hasSupport","hasBlockSupport","hasPositionBlockSupport","allowPositionStyles","id","useInstanceId","positionSelector","css","clsx","useStyleOverride"],"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":";;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,O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;EACzC,MAAMsF,uBAAuB,GAAG,IAAAD,uBAAe,EAC9ChG,IAAI,EACJL,oBACD,CAAC;EACD,MAAMiG,kBAAkB,GAAGrD,qBAAqB,CAAE;IAAEvC;EAAK,CAAE,CAAC;EAC5D,MAAMkG,mBAAmB,GAAGD,uBAAuB,IAAI,CAAEL,kBAAkB;EAE3E,MAAMO,EAAE,GAAG,IAAAC,sBAAa,EAAEP,aAAc,CAAC;;EAEzC;EACA,MAAMQ,gBAAgB,GAAI,iBAAiBF,EAAI,iBAAiBA,EAAI,EAAC;;EAErE;EACA,IAAIG,GAAG;EACP,IAAKJ,mBAAmB,EAAG;IAC1BI,GAAG,GACF7F,cAAc,CAAE;MACfC,QAAQ,EAAE2F,gBAAgB;MAC1B1F;IACD,CAAE,CAAC,IAAI,EAAE;EACX;;EAEA;EACA,MAAMT,SAAS,GAAG,IAAAqG,aAAI,EAAE;IACvB,CAAG,gBAAgBJ,EAAI,EAAC,GAAID,mBAAmB,IAAI,CAAC,CAAEI,GAAG;IAAE;IAC3D,CAAG,eAAe3F,KAAK,EAAEI,QAAQ,EAAEF,IAAM,EAAC,GACzCqF,mBAAmB,IAAI,CAAC,CAAEI,GAAG,IAAI,CAAC,CAAE3F,KAAK,EAAEI,QAAQ,EAAEF;EACvD,CAAE,CAAC;EAEH,IAAA2F,uBAAgB,EAAE;IAAEF;EAAI,CAAE,CAAC;EAE3B,OAAO;IAAEpG;EAAU,CAAC;AACrB","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_blocks","_components","_compose","_data","_element","_useSettings","_inspectorControls","_useBlockDisplayInformation","_utils","_lockUnlock","_store","_jsxRuntime","CustomSelectControl","unlock","componentsPrivateApis","POSITION_SUPPORT_KEY","OPTION_CLASSNAME","DEFAULT_OPTION","key","value","name","__","className","STICKY_OPTION","_x","__experimentalHint","FIXED_OPTION","POSITION_SIDES","VALID_POSITION_TYPES","getPositionCSS","selector","style","output","type","positionType","position","includes","forEach","side","undefined","hasStickyPositionSupport","blockType","support","getBlockSupport","sticky","hasFixedPositionSupport","fixed","hasPositionSupport","hasPositionValue","props","attributes","hasStickyOrFixedPositionValue","resetPosition","setAttributes","cleanEmptyObject","top","right","bottom","left","useIsPositionDisabled","blockName","allowFixed","allowSticky","useSettings","isDisabled","PositionPanelPure","clientId","firstParentClientId","useSelect","select","getBlockParents","blockEditorStore","parents","length","blockInformation","useBlockDisplayInformation","stickyHelpText","sprintf","title","options","useMemo","availableOptions","push","onChangeType","next","placementValue","newStyle","selectedOption","find","option","Platform","web","jsx","default","group","children","BaseControl","__nextHasNoMarginBottom","help","__next40pxDefaultSize","label","hideLabelFromVision","describedBy","__experimentalShowSelectedHint","onChange","selectedItem","size","native","_default","exports","edit","Edit","isPositionDisabled","useBlockProps","attributeKeys","hasSupport","hasBlockSupport","hasPositionBlockSupport","allowPositionStyles","id","useInstanceId","positionSelector","css","clsx","useStyleOverride"],"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":";;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAIA,IAAAI,QAAA,G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AAe,EAC9ChG,IAAI,EACJL,oBACD,CAAC;EACD,MAAMiG,kBAAkB,GAAGrD,qBAAqB,CAAE;IAAEvC;EAAK,CAAE,CAAC;EAC5D,MAAMkG,mBAAmB,GAAGD,uBAAuB,IAAI,CAAEL,kBAAkB;EAE3E,MAAMO,EAAE,GAAG,IAAAC,sBAAa,EAAEP,aAAc,CAAC;;EAEzC;EACA,MAAMQ,gBAAgB,GAAI,iBAAiBF,EAAI,iBAAiBA,EAAI,EAAC;;EAErE;EACA,IAAIG,GAAG;EACP,IAAKJ,mBAAmB,EAAG;IAC1BI,GAAG,GACF7F,cAAc,CAAE;MACfC,QAAQ,EAAE2F,gBAAgB;MAC1B1F;IACD,CAAE,CAAC,IAAI,EAAE;EACX;;EAEA;EACA,MAAMT,SAAS,GAAG,IAAAqG,aAAI,EAAE;IACvB,CAAG,gBAAgBJ,EAAI,EAAC,GAAID,mBAAmB,IAAI,CAAC,CAAEI,GAAG;IAAE;IAC3D,CAAG,eAAe3F,KAAK,EAAEI,QAAQ,EAAEF,IAAM,EAAC,GACzCqF,mBAAmB,IAAI,CAAC,CAAEI,GAAG,IAAI,CAAC,CAAE3F,KAAK,EAAEI,QAAQ,EAAEF;EACvD,CAAE,CAAC;EAEH,IAAA2F,uBAAgB,EAAE;IAAEF;EAAI,CAAE,CAAC;EAE3B,OAAO;IAAEpG;EAAU,CAAC;AACrB","ignoreList":[]}
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.MarginVisualizer = MarginVisualizer;
8
8
  exports.PaddingVisualizer = PaddingVisualizer;
9
- var _react = require("react");
10
9
  var _element = require("@wordpress/element");
11
10
  var _isShallowEqual = _interopRequireDefault(require("@wordpress/is-shallow-equal"));
12
11
  var _cover = _interopRequireDefault(require("../components/block-popover/cover"));
13
12
  var _useBlockRefs = require("../components/block-list/use-block-props/use-block-refs");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
14
  /**
15
15
  * WordPress dependencies
16
16
  */
@@ -57,13 +57,14 @@ function SpacingVisualizer({
57
57
  if (!isActive && !forceShow) {
58
58
  return null;
59
59
  }
60
- return (0, _react.createElement)(_cover.default, {
60
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_cover.default, {
61
61
  clientId: clientId,
62
- __unstablePopoverSlot: "block-toolbar"
63
- }, (0, _react.createElement)("div", {
64
- className: "block-editor__spacing-visualizer",
65
- style: style
66
- }));
62
+ __unstablePopoverSlot: "block-toolbar",
63
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
64
+ className: "block-editor__spacing-visualizer",
65
+ style: style
66
+ })
67
+ });
67
68
  }
68
69
  function getComputedCSS(element, property) {
69
70
  return element.ownerDocument.defaultView.getComputedStyle(element).getPropertyValue(property);
@@ -73,7 +74,7 @@ function MarginVisualizer({
73
74
  value,
74
75
  forceShow
75
76
  }) {
76
- return (0, _react.createElement)(SpacingVisualizer, {
77
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(SpacingVisualizer, {
77
78
  clientId: clientId,
78
79
  value: value?.spacing?.margin,
79
80
  computeStyle: blockElement => {
@@ -100,7 +101,7 @@ function PaddingVisualizer({
100
101
  value,
101
102
  forceShow
102
103
  }) {
103
- return (0, _react.createElement)(SpacingVisualizer, {
104
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(SpacingVisualizer, {
104
105
  clientId: clientId,
105
106
  value: value?.spacing?.padding,
106
107
  computeStyle: blockElement => ({
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_isShallowEqual","_interopRequireDefault","_cover","_useBlockRefs","SpacingVisualizer","clientId","value","computeStyle","forceShow","blockElement","useBlockElement","style","updateStyle","useReducer","useLayoutEffect","window","requestAnimationFrame","previousValue","useRef","isActive","setIsActive","useState","useEffect","isShallowEqual","current","timeout","setTimeout","clearTimeout","_react","createElement","default","__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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AE,aAAc,CAAC;MAC1D,OAAO;QACNsC,cAAc,EAAEJ,GAAG;QACnBK,gBAAgB,EAAEJ,KAAK;QACvBK,iBAAiB,EAAEJ,MAAM;QACzBK,eAAe,EAAEJ,IAAI;QACrBH,GAAG,EAAEA,GAAG,GAAI,IAAIA,GAAK,EAAC,GAAG,CAAC;QAC1BC,KAAK,EAAEA,KAAK,GAAI,IAAIA,KAAO,EAAC,GAAG,CAAC;QAChCC,MAAM,EAAEA,MAAM,GAAI,IAAIA,MAAQ,EAAC,GAAG,CAAC;QACnCC,IAAI,EAAEA,IAAI,GAAI,IAAIA,IAAM,EAAC,GAAG;MAC7B,CAAC;IACF,CAAG;IACHtC,SAAS,EAAGA;EAAW,CACvB,CAAC;AAEJ;AAEO,SAAS2C,iBAAiBA,CAAE;EAAE9C,QAAQ;EAAEC,KAAK;EAAEE;AAAU,CAAC,EAAG;EACnE,OACC,IAAAoB,MAAA,CAAAC,aAAA,EAACzB,iBAAiB;IACjBC,QAAQ,EAAGA,QAAU;IACrBC,KAAK,EAAGA,KAAK,EAAEmC,OAAO,EAAEW,OAAS;IACjC7C,YAAY,EAAKE,YAAY,KAAQ;MACpCsC,cAAc,EAAEd,cAAc,CAAExB,YAAY,EAAE,aAAc,CAAC;MAC7DuC,gBAAgB,EAAEf,cAAc,CAC/BxB,YAAY,EACZ,eACD,CAAC;MACDwC,iBAAiB,EAAEhB,cAAc,CAChCxB,YAAY,EACZ,gBACD,CAAC;MACDyC,eAAe,EAAEjB,cAAc,CAAExB,YAAY,EAAE,cAAe;IAC/D,CAAC,CAAI;IACLD,SAAS,EAAGA;EAAW,CACvB,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_isShallowEqual","_interopRequireDefault","_cover","_useBlockRefs","_jsxRuntime","SpacingVisualizer","clientId","value","computeStyle","forceShow","blockElement","useBlockElement","style","updateStyle","useReducer","useLayoutEffect","window","requestAnimationFrame","previousValue","useRef","isActive","setIsActive","useState","useEffect","isShallowEqual","current","timeout","setTimeout","clearTimeout","jsx","default","__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":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAOA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAAuH,IAAAK,WAAA,GAAAL,OAAA;AAhBvH;AACA;AACA;;AAUA;AACA;AACA;;AAIA,SAASM,iBAAiBA,CAAE;EAAEC,QAAQ;EAAEC,KAAK;EAAEC,YAAY;EAAEC;AAAU,CAAC,EAAG;EAC1E,MAAMC,YAAY,GAAG,IAAAC,uCAAe,EAAEL,QAAS,CAAC;EAChD,MAAM,CAAEM,KAAK,EAAEC,WAAW,CAAE,GAAG,IAAAC,mBAAU,EAAE,MAC1CN,YAAY,CAAEE,YAAa,CAC5B,CAAC;EAED,IAAAK,wBAAe,EAAE,MAAM;IACtB,IAAK,CAAEL,YAAY,EAAG;MACrB;IACD;IACA;IACA;IACA;IACA;IACA;IACAM,MAAM,CAACC,qBAAqB,CAAE,MAC7BD,MAAM,CAACC,qBAAqB,CAAEJ,WAAY,CAC3C,CAAC;EACF,CAAC,EAAE,CAAEH,YAAY,EAAEH,KAAK,CAAG,CAAC;EAE5B,MAAMW,aAAa,GAAG,IAAAC,eAAM,EAAEZ,KAAM,CAAC;EACrC,MAAM,CAAEa,QAAQ,EAAEC,WAAW,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EAEnD,IAAAC,kBAAS,EAAE,MAAM;IAChB,IAAK,IAAAC,uBAAc,EAAEjB,KA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,6 @@ exports.addSaveProps = addSaveProps;
7
7
  exports.default = void 0;
8
8
  exports.getInlineStyles = getInlineStyles;
9
9
  exports.omitStyle = omitStyle;
10
- var _react = require("react");
11
10
  var _element = require("@wordpress/element");
12
11
  var _hooks = require("@wordpress/hooks");
13
12
  var _blocks = require("@wordpress/blocks");
@@ -21,6 +20,7 @@ var _dimensions = require("./dimensions");
21
20
  var _utils = require("./utils");
22
21
  var _utils2 = require("../components/global-styles/utils");
23
22
  var _blockEditingMode = require("../components/block-editing-mode");
23
+ var _jsxRuntime = require("react/jsx-runtime");
24
24
  /**
25
25
  * WordPress dependencies
26
26
  */
@@ -288,22 +288,32 @@ function BlockStyleControls({
288
288
  clientId,
289
289
  name,
290
290
  setAttributes,
291
- settings
291
+ settings: {
292
+ ...settings,
293
+ typography: {
294
+ ...settings.typography,
295
+ // The text alignment UI for individual blocks is rendered in
296
+ // the block toolbar, so disable it here.
297
+ textAlign: false
298
+ }
299
+ }
292
300
  };
293
301
  if (blockEditingMode !== 'default') {
294
302
  return null;
295
303
  }
296
- return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_color.ColorEdit, {
297
- ...passedProps
298
- }), (0, _react.createElement)(_background.BackgroundImagePanel, {
299
- ...passedProps
300
- }), (0, _react.createElement)(_typography.TypographyPanel, {
301
- ...passedProps
302
- }), (0, _react.createElement)(_border.BorderPanel, {
303
- ...passedProps
304
- }), (0, _react.createElement)(_dimensions.DimensionsPanel, {
305
- ...passedProps
306
- }));
304
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
305
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_color.ColorEdit, {
306
+ ...passedProps
307
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_background.BackgroundImagePanel, {
308
+ ...passedProps
309
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.TypographyPanel, {
310
+ ...passedProps
311
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_border.BorderPanel, {
312
+ ...passedProps
313
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_dimensions.DimensionsPanel, {
314
+ ...passedProps
315
+ })]
316
+ });
307
317
  }
308
318
  var _default = exports.default = {
309
319
  edit: BlockStyleControls,
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_hooks","_blocks","_compose","_styleEngine","_background","_border","_color","_typography","_dimensions","_utils","_utils2","_blockEditingMode","styleSupportKeys","TYPOGRAPHY_SUPPORT_KEYS","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","DIMENSIONS_SUPPORT_KEY","BACKGROUND_SUPPORT_KEY","SPACING_SUPPORT_KEY","SHADOW_SUPPORT_KEY","hasStyleSupport","nameOrType","some","key","hasBlockSupport","getInlineStyles","styles","output","getCSSRules","forEach","rule","value","addAttribute","settings","attributes","style","Object","assign","type","skipSerializationPathsEdit","TYPOGRAPHY_SUPPORT_KEY","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","getBlockSupport","featureName","feature","BlockStyleControls","clientId","name","setAttributes","__unstableParentLayout","useBlockSettings","blockEditingMode","useBlockEditingMode","passedProps","_react","createElement","Fragment","ColorEdit","BackgroundImagePanel","TypographyPanel","BorderPanel","DimensionsPanel","_default","exports","default","edit","hasSupport","attributeKeys","useBlockProps","elementTypes","elementType","pseudo","elements","blockElementsContainerIdentifier","useInstanceId","baseElementSelector","blockElementStyles","useMemo","elementCSSRules","shouldSkipSerialization","elementStyles","selector","scopeSelector","ELEMENTS","push","compileCSS","pseudoSelector","element","join","undefined","useStyleOverride","css","className","addFilter"],"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":";;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,O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oB,kCAAiC,GAAI,CAAE,QAAQ,CAAE;EAC3E,CAAG,GAAGC,wBAAmB,kCAAiC,GAAI,CAC7DA,wBAAiB,CACjB;EACD,CAAG,GAAGyB,kCAAwB,kCAAiC,GAAI,CAClEA,kCAAsB,CACtB;EACD,CAAG,GAAGxB,kCAAwB,kCAAiC,GAAI,CAClEA,kCAAsB,CACtB;EACD,CAAG,GAAGE,+BAAqB,kCAAiC,GAAI,CAC/DA,+BAAmB,CACnB;EACD,CAAG,GAAGC,0BAAoB,kCAAiC,GAAI,CAC9DA,0BAAkB;AAEpB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMsB,0BAA0B,GAAG;EAClC,GAAGF,0BAA0B;EAC7B,CAAG,GAAGvB,kCAAwB,cAAa,GAAI,CAC7C,GAAGA,kCAAwB,cAAa,CACzC;EAAE;EACH,CAAG,GAAGC,kCAAwB,EAAC,GAAI,CAAEA,kCAAsB,CAAE,CAAE;AAChE,CAAC;AAED,MAAMyB,gCAAgC,GAAG;EACxC,CAAG,GAAG1B,kCAAwB,cAAa,GAAI,IAAI;EACnD,CAAG,GAAGC,kCAAwB,EAAC,GAAI;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM0B,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;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,EAAET,kBAAkB,CAAEW,OAAO,CAAE,EAAE;cAC1CN,QAAQ,EAAE,IAAAC,qBAAa,EACtBP,mBAAmB,EACnBQ,+BAAQ,CAAEI,OAAO,CAClB;YACD,CAAE,CACH,CAAC;UACF;QACD,CAAE,CAAC;MACJ;IACD,CAAE,CAAC;IAEH,OAAOT,eAAe,CAAC9C,MAAM,GAAG,CAAC,GAC9B8C,eAAe,CAACU,IAAI,CAAE,EAAG,CAAC,GAC1BC,SAAS;EACb,CAAC,EAAE,CAAEd,mBAAmB,EAAEC,kBAAkB,EAAE7B,IAAI,CAAG,CAAC;EAEtD,IAAA2C,uBAAgB,EAAE;IAAEC,GAAG,EAAEzF;EAAO,CAAE,CAAC;EAEnC,OAAOiC,YAAY,CAClB;IAAEyD,SAAS,EAAEnB;EAAiC,CAAC,EAC/C1B,IAAI,EACJ;IAAEpC;EAAM,CAAC,EACTI,0BACD,CAAC;AACF;AAEA,IAAA8E,gBAAS,EACR,0BAA0B,EAC1B,yBAAyB,EACzBrF,YACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_hooks","_blocks","_compose","_styleEngine","_background","_border","_color","_typography","_dimensions","_utils","_utils2","_blockEditingMode","_jsxRuntime","styleSupportKeys","TYPOGRAPHY_SUPPORT_KEYS","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","DIMENSIONS_SUPPORT_KEY","BACKGROUND_SUPPORT_KEY","SPACING_SUPPORT_KEY","SHADOW_SUPPORT_KEY","hasStyleSupport","nameOrType","some","key","hasBlockSupport","getInlineStyles","styles","output","getCSSRules","forEach","rule","value","addAttribute","settings","attributes","style","Object","assign","type","skipSerializationPathsEdit","TYPOGRAPHY_SUPPORT_KEY","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","getBlockSupport","featureName","feature","BlockStyleControls","clientId","name","setAttributes","__unstableParentLayout","useBlockSettings","blockEditingMode","useBlockEditingMode","passedProps","typography","textAlign","jsxs","Fragment","children","jsx","ColorEdit","BackgroundImagePanel","TypographyPanel","BorderPanel","DimensionsPanel","_default","exports","default","edit","hasSupport","attributeKeys","useBlockProps","elementTypes","elementType","pseudo","elements","blockElementsContainerIdentifier","useInstanceId","baseElementSelector","blockElementStyles","useMemo","elementCSSRules","shouldSkipSerialization","elementStyles","selector","scopeSelector","ELEMENTS","push","compileCSS","pseudoSelector","element","join","undefined","useStyleOverride","css","className","addFilter"],"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":";;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAKA,IAAAS,WAAA,GAAAT,OAAA;AAKA,IAAAU,MAAA,GAAAV,OAAA;AAKA,IAAAW,OAAA,GAAAX,OAAA;AACA,IAAAY,iBAAA,GAAAZ,OAAA;AAAuE,IAAAa,WAAA,GAAAb,OAAA;AAnCvE;AACA;AACA;;AAWA;AACA;AACA;;AAsBA,MAAMc,gBAAgB,GAAG,CACxB,GAAGC,mCAAuB,EAC1BC,0BAAkB,EAClBC,wBAAiB,EACjBC,kCAAsB,EACtBC,kCAAsB,EACtBC,+BAAmB,EACnBC,0BAAkB,CAClB;AAED,MAAMC,eAAe,GAAKC,UAAU,IACnCT,gBAAgB,CAACU,IAAI,CAAIC,GAAG,IAAM,IAAAC,uBAAe,EAAEH,UAAU,EAAEE,GAAI,CAAE,CAAC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,eAAeA,CAAEC,MAAM,GAAG,CAAC,CAAC,E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Aa,CACzC;EAAE;EACH,CAAG,GAAGC,kCAAwB,EAAC,GAAI,CAAEA,kCAAsB,CAAE,CAAE;AAChE,CAAC;AAED,MAAMyB,gCAAgC,GAAG;EACxC,CAAG,GAAG1B,kCAAwB,cAAa,GAAI,IAAI;EACnD,CAAG,GAAGC,kCAAwB,EAAC,GAAI;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM0B,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;AACO,SAASC,SAASA,CAAEV,KAAK,EAAEW,KAAK,EAAEC,iBAAiB,GAAG,KAAK,EAAG;EACpE,IAAK,CAAEZ,KAAK,EAAG;IACd,OAAOA,KAAK;EACb;EAEA,IAAIa,QAAQ,GAAGb,KAAK;EACpB,IAAK,CAAEY,iBAAiB,EAAG;IAC1BC,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAAED,IAAI,CAACE,SAAS,CAAEhB,KAAM,CAAE,CAAC;EACjD;EAEA,IAAK,CAAEiB,KAAK,CAACC,OAAO,CAAEP,KAAM,CAAC,EAAG;IAC/BA,KAAK,GAAG,CAAEA,KAAK,CAAE;EAClB;EAEAA,KAAK,CAACjB,OAAO,CAAIyB,IAAI,IAAM;IAC1B,IAA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AAC;EAEtD,IAAA8C,uBAAgB,EAAE;IAAEC,GAAG,EAAE5F;EAAO,CAAE,CAAC;EAEnC,OAAOiC,YAAY,CAClB;IAAE4D,SAAS,EAAEnB;EAAiC,CAAC,EAC/C7B,IAAI,EACJ;IAAEpC;EAAM,CAAC,EACTI,0BACD,CAAC;AACF;AAEA,IAAAiF,gBAAS,EACR,0BAA0B,EAC1B,yBAAyB,EACzBxF,YACD,CAAC","ignoreList":[]}
@@ -8,7 +8,6 @@ exports.TEXT_ALIGN_SUPPORT_KEY = void 0;
8
8
  exports.addAssignedTextAlign = addAssignedTextAlign;
9
9
  exports.default = void 0;
10
10
  exports.getValidTextAlignments = getValidTextAlignments;
11
- var _react = require("react");
12
11
  var _clsx = _interopRequireDefault(require("clsx"));
13
12
  var _i18n = require("@wordpress/i18n");
14
13
  var _blocks = require("@wordpress/blocks");
@@ -17,6 +16,7 @@ var _components = require("../components");
17
16
  var _blockEditingMode = require("../components/block-editing-mode");
18
17
  var _utils = require("./utils");
19
18
  var _typography = require("./typography");
19
+ var _jsxRuntime = require("react/jsx-runtime");
20
20
  /**
21
21
  * External dependencies
22
22
  */
@@ -44,6 +44,7 @@ const TEXT_ALIGNMENT_OPTIONS = [{
44
44
  align: 'right'
45
45
  }];
46
46
  const VALID_TEXT_ALIGNMENTS = ['left', 'center', 'right'];
47
+ const NO_TEXT_ALIGNMENTS = [];
47
48
 
48
49
  /**
49
50
  * Returns the valid text alignments.
@@ -55,25 +56,24 @@ const VALID_TEXT_ALIGNMENTS = ['left', 'center', 'right'];
55
56
  * @return {string[]} Valid text alignments.
56
57
  */
57
58
  function getValidTextAlignments(blockTextAlign) {
58
- let validTextAlignments;
59
59
  if (Array.isArray(blockTextAlign)) {
60
- validTextAlignments = VALID_TEXT_ALIGNMENTS.filter(textAlign => blockTextAlign.includes(textAlign));
61
- } else if (blockTextAlign === true) {
62
- // `true` includes all alignments...
63
- validTextAlignments = [...VALID_TEXT_ALIGNMENTS];
64
- } else {
65
- validTextAlignments = [];
60
+ return VALID_TEXT_ALIGNMENTS.filter(textAlign => blockTextAlign.includes(textAlign));
66
61
  }
67
- return validTextAlignments;
62
+ return blockTextAlign === true ? VALID_TEXT_ALIGNMENTS : NO_TEXT_ALIGNMENTS;
68
63
  }
69
64
  function BlockEditTextAlignmentToolbarControlsPure({
70
65
  style,
71
66
  name: blockName,
72
67
  setAttributes
73
68
  }) {
74
- const validTextAlignments = getValidTextAlignments((0, _blocks.getBlockSupport)(blockName, TEXT_ALIGN_SUPPORT_KEY));
69
+ const settings = (0, _utils.useBlockSettings)(blockName);
70
+ const hasTextAlignControl = settings?.typography?.textAlign;
75
71
  const blockEditingMode = (0, _blockEditingMode.useBlockEditingMode)();
76
- if (!validTextAlignments.length || blockEditingMode !== 'default') {
72
+ if (!hasTextAlignControl || blockEditingMode !== 'default') {
73
+ return null;
74
+ }
75
+ const validTextAlignments = getValidTextAlignments((0, _blocks.getBlockSupport)(blockName, TEXT_ALIGN_SUPPORT_KEY));
76
+ if (!validTextAlignments.length) {
77
77
  return null;
78
78
  }
79
79
  const textAlignmentControls = TEXT_ALIGNMENT_OPTIONS.filter(control => validTextAlignments.includes(control.align));
@@ -89,13 +89,14 @@ function BlockEditTextAlignmentToolbarControlsPure({
89
89
  style: (0, _utils.cleanEmptyObject)(newStyle)
90
90
  });
91
91
  };
92
- return (0, _react.createElement)(_components.BlockControls, {
93
- group: "block"
94
- }, (0, _react.createElement)(_components.AlignmentControl, {
95
- value: style?.typography?.textAlign,
96
- onChange: onChange,
97
- alignmentControls: textAlignmentControls
98
- }));
92
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.BlockControls, {
93
+ group: "block",
94
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.AlignmentControl, {
95
+ value: style?.typography?.textAlign,
96
+ onChange: onChange,
97
+ alignmentControls: textAlignmentControls
98
+ })
99
+ });
99
100
  }
100
101
  var _default = exports.default = {
101
102
  edit: BlockEditTextAlignmentToolbarControlsPure,
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_blocks","_icons","_components","_blockEditingMode","_utils","_typography","TEXT_ALIGN_SUPPORT_KEY","exports","TEXT_ALIGNMENT_OPTIONS","icon","alignLeft","title","__","align","alignCenter","alignRight","VALID_TEXT_ALIGNMENTS","getValidTextAlignments","blockTextAlign","validTextAlignments","Array","isArray","filter","textAlign","includes","BlockEditTextAlignmentToolbarControlsPure","style","name","blockName","setAttributes","getBlockSupport","blockEditingMode","useBlockEditingMode","length","textAlignmentControls","control","onChange","newTextAlignValue","newStyle","typography","cleanEmptyObject","_react","createElement","BlockControls","group","AlignmentControl","value","alignmentControls","_default","default","edit","useBlockProps","addSaveProps","addAssignedTextAlign","attributeKeys","hasSupport","hasBlockSupport","shouldSkipSerialization","TYPOGRAPHY_SUPPORT_KEY","className","clsx","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":";;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA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B,IAChB,CAAE,IAAAP,8BAAuB,EACxBK,SAAS,EACTJ,kCAAsB,EACtB,WACD,CAAC,EACA;IACDG,KAAK,CAACF,SAAS,GAAG,IAAAC,aAAI,EACpB,kBAAkBrC,SAAW,EAAC,EAC/BsC,KAAK,CAACF,SACP,CAAC;EACF;EACA,OAAOE,KAAK;AACb","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_blocks","_icons","_components","_blockEditingMode","_utils","_typography","_jsxRuntime","TEXT_ALIGN_SUPPORT_KEY","exports","TEXT_ALIGNMENT_OPTIONS","icon","alignLeft","title","__","align","alignCenter","alignRight","VALID_TEXT_ALIGNMENTS","NO_TEXT_ALIGNMENTS","getValidTextAlignments","blockTextAlign","Array","isArray","filter","textAlign","includes","BlockEditTextAlignmentToolbarControlsPure","style","name","blockName","setAttributes","settings","useBlockSettings","hasTextAlignControl","typography","blockEditingMode","useBlockEditingMode","validTextAlignments","getBlockSupport","length","textAlignmentControls","control","onChange","newTextAlignValue","newStyle","cleanEmptyObject","jsx","BlockControls","group","children","AlignmentControl","value","alignmentControls","_default","default","edit","useBlockProps","addSaveProps","addAssignedTextAlign","attributeKeys","hasSupport","hasBlockSupport","shouldSkipSerialization","TYPOGRAPHY_SUPPORT_KEY","className","clsx","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":";;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAKA,IAAAO,WAAA,GAAAP,OAAA;AAAsD,IAAAQ,WAAA,GAAAR,OAAA;AAtBtD;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;;AAUO,MAAMS,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,sBAAsB;AAE5D,MAAME,sBAAsB,GAAG,CAC9B;EACCC,IAAI,EAAEC,gBAAS;EACfC,KAAK,EAAE,IAAAC,QAAE,EAAE,iBAAkB,CAAC;EAC9BC,KAAK,EAAE;AACR,CAAC,EACD;EACCJ,IAAI,EAAEK,kBAAW;EACjBH,KAAK,EAAE,IAAAC,QAAE,EAAE,mBAAoB,CAAC;EAChCC,KAAK,EAAE;AACR,CAAC,EACD;EACCJ,IAAI,EAAEM,iBAAU;EAChBJ,KAAK,EAAE,IAAAC,QAAE,EAAE,kBAAmB,CAAC;EAC/BC,KAAK,EAAE;AACR,CAAC,CACD;AAED,MAAMG,qBAAqB,GAAG,CAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAE;AAC3D,MAAMC,kBAAkB,GAAG,EAAE;;AAE7B;AACA;AACA;AACA;AAC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AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASN,oBAAoBA,CAAEQ,KAAK,EAAEC,SAAS,EAAEC,UAAU,EAAG;EACpE,IAAK,CAAEA,UAAU,EAAEzC,KAAK,EAAEO,UAAU,EAAEV,SAAS,EAAG;IACjD,OAAO0C,KAAK;EACb;EAEA,MAAM;IAAE1C;EAAU,CAAC,GAAG4C,UAAU,CAACzC,KAAK,CAACO,UAAU;EACjD,MAAMd,cAAc,GAAG,IAAAkB,uBAAe,EAAE6B,SAAS,EAAE5D,sBAAuB,CAAC;EAC3E,MAAM8D,gBAAgB,GACrBlD,sBAAsB,CAAEC,cAAe,CAAC,CAACK,QAAQ,CAAED,SAAU,CAAC;EAC/D,IACC6C,gBAAgB,IAChB,CAAE,IAAAP,8BAAuB,EACxBK,SAAS,EACTJ,kCAAsB,EACtB,WACD,CAAC,EACA;IACDG,KAAK,CAACF,SAAS,GAAG,IAAAC,aAAI,EACpB,kBAAkBzC,SAAW,EAAC,EAC/B0C,KAAK,CAACF,SACP,CAAC;EACF;EACA,OAAOE,KAAK;AACb","ignoreList":[]}
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.TYPOGRAPHY_SUPPORT_KEYS = exports.TYPOGRAPHY_SUPPORT_KEY = void 0;
8
8
  exports.TypographyPanel = TypographyPanel;
9
9
  exports.hasTypographySupport = void 0;
10
- var _react = require("react");
11
10
  var _blocks = require("@wordpress/blocks");
12
11
  var _element = require("@wordpress/element");
13
12
  var _data = require("@wordpress/data");
@@ -19,6 +18,7 @@ var _fontSize = require("./font-size");
19
18
  var _textAlign = require("./text-align");
20
19
  var _utils = require("./utils");
21
20
  var _store = require("../store");
21
+ var _jsxRuntime = require("react/jsx-runtime");
22
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
23
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
24
  /**
@@ -81,10 +81,11 @@ function TypographyInspectorControl({
81
81
  ...styleToAttributes(updatedStyle)
82
82
  };
83
83
  }, [resetAllFilter]);
84
- return (0, _react.createElement)(_inspectorControls.default, {
84
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_inspectorControls.default, {
85
85
  group: "typography",
86
- resetAllFilter: attributesResetAllFilter
87
- }, children);
86
+ resetAllFilter: attributesResetAllFilter,
87
+ children: children
88
+ });
88
89
  }
89
90
  function TypographyPanel({
90
91
  clientId,
@@ -122,7 +123,7 @@ function TypographyPanel({
122
123
  return null;
123
124
  }
124
125
  const defaultControls = (0, _blocks.getBlockSupport)(name, [TYPOGRAPHY_SUPPORT_KEY, '__experimentalDefaultControls']);
125
- return (0, _react.createElement)(_typographyPanel.default, {
126
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_typographyPanel.default, {
126
127
  as: TypographyInspectorControl,
127
128
  panelId: clientId,
128
129
  settings: settings,